NCBI C++ ToolKit
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
Cn3DGLCanvas Class Reference

Search Toolkit Book for Cn3DGLCanvas

#include "cn3d_glcanvas.hpp"
(Private to src/app/cn3d.)

+ Inheritance diagram for Cn3DGLCanvas:
+ Collaboration diagram for Cn3DGLCanvas:

Public Member Functions

 Cn3DGLCanvas (wxWindow *parent, int *attribList)
 ~Cn3DGLCanvas (void)
void SetCurrent (void)
void SetGLFontFromRegistry (double fontScale=1.0)
bool MeasureText (const std::string &text, int *width, int *height, int *centerX, int *centerY)
const wxFont & GetGLFont (void) const
void SuspendRendering (bool suspend)
void FakeOnSize (void)

Public Attributes


Private Member Functions

void OnPaint (wxPaintEvent &event)
void OnSize (wxSizeEvent &event)
void OnEraseBackground (wxEraseEvent &event)
void OnMouseEvent (wxMouseEvent &event)

Private Attributes

wxGLContext * glContext
wxMemoryDC memoryDC
wxBitmap memoryBitmap
wxFont font
bool suspended

Detailed Description

Definition at line 52 of file cn3d_glcanvas.hpp.

Constructor & Destructor Documentation

◆ Cn3DGLCanvas()

Cn3DGLCanvas::Cn3DGLCanvas ( wxWindow *  parent,
int attribList 

Definition at line 62 of file cn3d_glcanvas.cpp.

◆ ~Cn3DGLCanvas()

Cn3DGLCanvas::~Cn3DGLCanvas ( void  )

Definition at line 70 of file cn3d_glcanvas.cpp.

References glContext, renderer, and structureSet.

Member Function Documentation

◆ FakeOnSize()

void Cn3DGLCanvas::FakeOnSize ( void  )

Definition at line 219 of file cn3d_glcanvas.cpp.

References OnSize().

Referenced by Cn3DApp::OnInit().

◆ GetGLFont()

const wxFont& Cn3DGLCanvas::GetGLFont ( void  ) const

Definition at line 66 of file cn3d_glcanvas.hpp.

References font.

Referenced by OpenGLRenderer::GetGLFont().

◆ MeasureText()

bool Cn3DGLCanvas::MeasureText ( const std::string text,
int width,
int height,
int centerX,
int centerY 

Definition at line 135 of file cn3d_glcanvas.cpp.

References int, memoryBitmap, memoryDC, MYMAX, text(), and WARNINGMSG.

Referenced by OpenGLRenderer::DrawLabel().

◆ OnEraseBackground()

void Cn3DGLCanvas::OnEraseBackground ( wxEraseEvent &  event)

Definition at line 283 of file cn3d_glcanvas.cpp.

◆ OnMouseEvent()

void Cn3DGLCanvas::OnMouseEvent ( wxMouseEvent &  event)

◆ OnPaint()

void Cn3DGLCanvas::OnPaint ( wxPaintEvent &  event)

Definition at line 191 of file cn3d_glcanvas.cpp.

References OpenGLRenderer::Display(), renderer, SetCurrent(), and suspended.

◆ OnSize()

void Cn3DGLCanvas::OnSize ( wxSizeEvent &  event)

Definition at line 203 of file cn3d_glcanvas.cpp.

References OpenGLRenderer::NewView(), renderer, SetCurrent(), and suspended.

Referenced by FakeOnSize(), and SuspendRendering().

◆ SetCurrent()

void Cn3DGLCanvas::SetCurrent ( void  )

◆ SetGLFontFromRegistry()

void Cn3DGLCanvas::SetGLFontFromRegistry ( double  fontScale = 1.0)

◆ SuspendRendering()

void Cn3DGLCanvas::SuspendRendering ( bool  suspend)

Definition at line 82 of file cn3d_glcanvas.cpp.

References OnSize(), pythonpp::resize(), and suspended.

Referenced by ExportPNG().

Member Data Documentation

◆ font

wxFont Cn3DGLCanvas::font

Definition at line 82 of file cn3d_glcanvas.hpp.

Referenced by GetGLFont(), and SetGLFontFromRegistry().

◆ glContext

wxGLContext* Cn3DGLCanvas::glContext

Definition at line 77 of file cn3d_glcanvas.hpp.

Referenced by SetCurrent(), and ~Cn3DGLCanvas().

◆ memoryBitmap

wxBitmap Cn3DGLCanvas::memoryBitmap

Definition at line 81 of file cn3d_glcanvas.hpp.

Referenced by MeasureText(), and SetGLFontFromRegistry().

◆ memoryDC

wxMemoryDC Cn3DGLCanvas::memoryDC

Definition at line 80 of file cn3d_glcanvas.hpp.

Referenced by MeasureText(), and SetGLFontFromRegistry().

◆ renderer

OpenGLRenderer* Cn3DGLCanvas::renderer

◆ structureSet

StructureSet* Cn3DGLCanvas::structureSet

◆ suspended

bool Cn3DGLCanvas::suspended

Definition at line 83 of file cn3d_glcanvas.hpp.

Referenced by OnMouseEvent(), OnPaint(), OnSize(), and SuspendRendering().

The documentation for this class was generated from the following files:
Modified on Mon Feb 26 04:03:01 2024 by rev. 669887