A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/cn3d__glcanvas_8cpp_source.html below:

NCBI C++ ToolKit: src/app/cn3d/cn3d_glcanvas.cpp Source File

41 #include <wx/fontutil.h> 63

wxGLCanvas(parent, -1, attribList, wxPoint(0, 0), wxDefaultSize, wxSUNKEN_BORDER, "

Cn3DGLCanvas

"),

66

glContext =

new

wxGLContext(

this

);

86

wxSizeEvent

resize

(GetSize());

97  ERRORMSG

(

"Cn3DGLCanvas::SetGLFontFromRegistry() - error getting font info from registry"

);

102

wxNativeFontInfo 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)

108

fontInfo.SetPointSize((

int

)(fontScale * fontInfo.GetPointSize()));

109

unique_ptr<wxFont> newFont(wxFont::New(fontInfo));

110  if

(!newFont.get() || !newFont->Ok()) {

111  ERRORMSG

(

"Cn3DGLCanvas::SetGLFontFromRegistry() - can't get wxFont from wxNativeFontInfo"

);

118

#

if

wxCHECK_VERSION(2,9,0)

124

wxBitmap 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  int

x, 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);

195

wxPaintDC dc(

this

);

213

GetClientSize(&w, &h);

214

glViewport(0, 0, (GLint) w, (GLint) h);

222

GetClientSize(&w, &h);

223

wxSizeEvent se(wxSize(w, h));

229  static bool

dragging =

false

;

230  static long

last_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())

264

last_x =

event

.GetX();

265

last_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