wxGLCanvas(parent, -1, attribList, wxPoint(0, 0), wxDefaultSize, wxSUNKEN_BORDER, "
Cn3DGLCanvas"),
66glContext =
newwxGLContext(
this);
86wxSizeEvent
resize(GetSize());
97 ERRORMSG(
"Cn3DGLCanvas::SetGLFontFromRegistry() - error getting font info from registry");
102wxNativeFontInfo fontInfo;
103 if(!fontInfo.FromString(nativeFont.c_str())) {
104 ERRORMSG(
"Cn3DGLCanvas::SetGLFontFromRegistry() - can't set wxNativeFontInfo fron native font string");
107 if(fontScale != 1.0 && fontScale > 0.0)
108fontInfo.SetPointSize((
int)(fontScale * fontInfo.GetPointSize()));
109unique_ptr<wxFont> newFont(wxFont::New(fontInfo));
110 if(!newFont.get() || !newFont->Ok()) {
111 ERRORMSG(
"Cn3DGLCanvas::SetGLFontFromRegistry() - can't get wxFont from wxNativeFontInfo");
118#
ifwxCHECK_VERSION(2,9,0)
124wxBitmap tinyBitmap(1, 1, -1);
133 #define MYMAX(a, b) (((a) >= (b)) ? (a) : (b)) 150 memoryDC.SetBackground(*wxBLUE_BRUSH);
151 memoryDC.SetBackgroundMode(wxSOLID);
152 memoryDC.SetTextBackground(*wxGREEN);
153 memoryDC.SetTextForeground(*wxRED);
166 intx, y, top = image.GetHeight(), left = image.GetWidth(), bottom = -1, right = -1;
167 for(x=0; x<image.GetWidth(); ++x) {
168 for(y=0; y<image.GetHeight(); ++y) {
169 if(image.GetRed(x, y) >= 128) {
170 if(y < top) top = y;
171 if(x < left) left = x;
172 if(y > bottom) bottom = y;
173 if(x > right) right = x;
177 if(bottom < 0 || right < 0) {
178 WARNINGMSG(
"Cn3DGLCanvas::MeasureText() - no character pixels found!");
179*centerX = *centerY = 0;
185*centerX = (
int) (((
double) (right - left)) / 2 + 0.5);
186*centerY = (
int) (((
double) (bottom - top)) / 2 + 0.5);
195wxPaintDC dc(
this);
213GetClientSize(&w, &h);
214glViewport(0, 0, (GLint) w, (GLint) h);
222GetClientSize(&w, &h);
223wxSizeEvent se(wxSize(w, h));
229 static booldragging =
false;
230 static longlast_x, last_y;
236 #if !defined(__WXGTK__) 238 if(event.LeftDown())
240 if(event.LeftDClick())
246 if(event.LeftIsDown()) {
251 if(event.ShiftDown())
254 else if(event.MetaDown())
256 else if(event.ControlDown())
264last_x =
event.GetX();
265last_y =
event.GetY();
270 if(event.LeftDClick()) {
void OnEraseBackground(wxEraseEvent &event)
OpenGLRenderer * renderer
void OnPaint(wxPaintEvent &event)
void SetGLFontFromRegistry(double fontScale=1.0)
void SuspendRendering(bool suspend)
void OnSize(wxSizeEvent &event)
void OnMouseEvent(wxMouseEvent &event)
StructureSet * structureSet
bool MeasureText(const std::string &text, int *width, int *height, int *centerX, int *centerY)
bool GetSelected(int x, int y, unsigned int *name)
void ChangeView(eViewAdjust control, int dX=0, int dY=0, int X2=0, int Y2=0)
bool SetGLFont(int firstChar, int nChars, int fontBase)
void NewView(double eyeTranslateToAngleDegrees=0.0) const
static const unsigned int FONT_BASE
void SelectedAtom(unsigned int name, bool setCenter)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
unsigned int
A callback function used to compare two keys in a database.
static void text(MDB_val *v)
void resize(vector< SMethodDef > &container)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4