"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "layer4/PopUp.cpp" between
pymol-v1.8.6.0.tar.bz2 and pymol-v2.1.0.tar.bz2

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

PopUp.cpp  (pymol-v1.8.6.0.tar.bz2):PopUp.cpp  (pymol-v2.1.0.tar.bz2)
skipping to change at line 37 skipping to change at line 37
#include "PopUp.h" #include "PopUp.h"
#include "Ortho.h" #include "Ortho.h"
#include "Util.h" #include "Util.h"
#include "P.h" #include "P.h"
#include "Util.h" #include "Util.h"
#include "Color.h" #include "Color.h"
#include "Text.h" #include "Text.h"
#include "PyMOL.h" #include "PyMOL.h"
#include "CGO.h" #include "CGO.h"
#define cPopUpLineHeight 17 #define cPopUpLineHeight DIP2PIXEL(17)
#define cPopUpTitleHeight 19 #define cPopUpTitleHeight DIP2PIXEL(19)
#define cPopUpBarHeight 4 #define cPopUpBarHeight DIP2PIXEL(4)
#define cPopUpCharWidth 8 #define cPopUpCharWidth DIP2PIXEL(8)
#define cPopUpCharMargin 2 #define cPopUpCharMargin DIP2PIXEL(2)
#define cPopUpCharLift 2 #define cPopUpCharLift DIP2PIXEL(2)
#define cChildDelay 0.25 #define cChildDelay 0.25
#define cPassiveDelay 0.45 #define cPassiveDelay 0.45
#define cDirtyDelay 0.05 #define cDirtyDelay 0.05
typedef struct CPopUp { typedef struct CPopUp {
::Block *Block; ::Block *Block;
::Block *Parent; ::Block *Parent;
::Block *Child; ::Block *Child;
int ChildLine; int ChildLine;
skipping to change at line 90 skipping to change at line 90
* @param a : array index * @param a : array index
*/ */
static PyObject * SubGetItem(PyMOLGlobals * G, PyObject ** Sub, const int a) { static PyObject * SubGetItem(PyMOLGlobals * G, PyObject ** Sub, const int a) {
#ifndef _PYMOL_NOPY #ifndef _PYMOL_NOPY
PyObject *elem = Sub[a]; PyObject *elem = Sub[a];
ok_assert(1, elem); ok_assert(1, elem);
if(!PyList_Check(elem)) { if(!PyList_Check(elem)) {
PBlock(G); PBlock(G);
elem = PyObject_CallObject(elem, NULL); elem = PyObject_CallObject(elem, NULL);
PUnblock(G);
ok_assert(2, elem); if(PyErr_Occurred())
PyErr_Print();
Py_DECREF(Sub[a]); Py_DECREF(Sub[a]);
Py_INCREF(Sub[a] = elem); Sub[a] = elem;
PUnblock(G);
} }
return elem; return elem;
ok_except2:
if(PyErr_Occurred())
PyErr_Print();
ok_except1: ok_except1:
#endif #endif
return NULL; return NULL;
} }
/*========================================================================*/ /*========================================================================*/
static Block *PopUpRecursiveFind(Block * block, int x, int y) static Block *PopUpRecursiveFind(Block * block, int x, int y)
{ {
PyMOLGlobals *G = block->G; PyMOLGlobals *G = block->G;
CPopUp *I = (CPopUp *) block->reference; CPopUp *I = (CPopUp *) block->reference;
skipping to change at line 136 skipping to change at line 135
int passive, PyObject * list, Block * parent) int passive, PyObject * list, Block * parent)
{ {
#ifdef _PYMOL_NOPY #ifdef _PYMOL_NOPY
return NULL; return NULL;
#else #else
/* assumes blocked threads (calls the Python C API) */ /* assumes blocked threads (calls the Python C API) */
int mx, a, l, cl, cmx; int mx, a, l, cl, cmx;
int dim[2]; int dim[2];
PyObject *elem; PyObject *elem;
char *str, *c; const char *str, *c;
int blocked = PAutoBlock(G); int blocked = PAutoBlock(G);
int ui_light_bg = SettingGetGlobal_b(G, cSetting_internal_gui_mode); int ui_light_bg = SettingGetGlobal_b(G, cSetting_internal_gui_mode);
OOAlloc(G, CPopUp); OOAlloc(G, CPopUp);
I->Block = OrthoNewBlock(G, NULL); I->Block = OrthoNewBlock(G, NULL);
I->Block->reference = (void *) I; I->Block->reference = (void *) I;
I->Block->fDraw = PopUpDraw; I->Block->fDraw = PopUpDraw;
I->Block->fDrag = PopUpDrag; I->Block->fDrag = PopUpDrag;
I->Block->fRelease = PopUpRelease; I->Block->fRelease = PopUpRelease;
I->Block->active = false; I->Block->active = false;
skipping to change at line 864 skipping to change at line 863
TextSetColor(G, ColorGetNamed(G, c)); TextSetColor(G, ColorGetNamed(G, c));
} else { } else {
TextSetColor3f(G, (*(c + 1) - '0') / 9.0F, (*(c + 2) - '0') / 9.0F, TextSetColor3f(G, (*(c + 1) - '0') / 9.0F, (*(c + 2) - '0') / 9.0F,
(*(c + 3) - '0') / 9.0F); (*(c + 3) - '0') / 9.0F);
c += 4; c += 4;
} }
} }
TextSetPos2i(G, xx, y + cPopUpCharLift); TextSetPos2i(G, xx, y + cPopUpCharLift);
TextDrawChar(G, *(c++) ORTHOCGOARGVAR); TextDrawChar(G, *(c++) ORTHOCGOARGVAR);
xx = xx + 8; xx = xx + DIP2PIXEL(8);
} }
if(I->Sub[a]) { if(I->Sub[a]) {
if (orthoCGO){ if (orthoCGO){
CGOBegin(orthoCGO, GL_TRIANGLE_STRIP); CGOBegin(orthoCGO, GL_TRIANGLE_STRIP);
CGOColor(orthoCGO, 0.4F, 0.4F, 0.4F); CGOColor(orthoCGO, 0.4F, 0.4F, 0.4F);
CGOVertex(orthoCGO, I->Block->rect.left - 3, y + ((cPopUpLineHeight)) - 4, 0.f); CGOVertex(orthoCGO, I->Block->rect.left - 3, y + ((cPopUpLineHeight)) - 4, 0.f);
CGOColor(orthoCGO, 0.4F, 0.4F, 0.4F); CGOColor(orthoCGO, 0.4F, 0.4F, 0.4F);
CGOVertex(orthoCGO, I->Block->rect.left - 3, y + 1, 0.f); CGOVertex(orthoCGO, I->Block->rect.left - 3, y + 1, 0.f);
 End of changes. 7 change blocks. 
14 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)