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/gl__demo__dlg_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/gl/demo_wx/gl_demo_dlg.cpp Source File

15 #include "wx/imaglist.h" 18 #include <wx/bitmap.h> 20 #include <wx/button.h> 44

IMPLEMENT_DYNAMIC_CLASS(

CGLDemoDlg

, wxDialog )

72 CGLDemoDlg::CGLDemoDlg

( wxWindow* parent, wxWindowID

id

,

const

wxString& caption,

const

wxPoint& pos,

const

wxSize&

size

,

long

style )

75  Create

(parent,

id

, caption, pos,

size

, style);

83 bool CGLDemoDlg::Create

( wxWindow* parent, wxWindowID

id

,

const

wxString& caption,

const

wxPoint& pos,

const

wxSize&

size

,

long

style )

86 

SetExtraStyle(wxWS_EX_BLOCK_EVENTS);

87

wxDialog::Create( parent,

id

, caption, pos,

size

, style );

92

GetSizer()->SetSizeHints(

this

);

120

wxSize ppi = wxGetDisplayPPI();

138

wxSize sz = GetClientSize();

142

gl.

Ortho

(-1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 1.0f);

143

gl.

Begin

(GL_LINE_STRIP);

151

gl.

Begin

(GL_LINE_STRIP);

170

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

171

itemDialog1->SetSizer(itemBoxSizer2);

173

wxNotebook* itemNotebook3 =

new

wxNotebook( itemDialog1,

ID_NOTEBOOK1

, wxDefaultPosition, wxSize(512, 384), wxBK_DEFAULT|wxCLIP_CHILDREN );

175

itemBoxSizer2->Add(itemNotebook3, 1, wxGROW|wxALL, 5);

177

wxBoxSizer* itemBoxSizer4 =

new

wxBoxSizer(wxHORIZONTAL);

178

itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_RIGHT|wxALL, 5);

180

wxButton* itemButton5 =

new

wxButton( itemDialog1, wxID_CLOSE,

_

(

"&Close"

), wxDefaultPosition, wxDefaultSize, 0 );

181

itemBoxSizer4->Add(itemButton5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);

185

wxNotebook* itemNotebook = (wxNotebook*)FindWindow(

ID_NOTEBOOK1

);

188

itemNotebook->AddPage(itemPane,

wxT

(

"CRuler"

));

191

itemNotebook->AddPage(itemPane,

wxT

(

"OpenGL Fonts"

));

194

itemNotebook->AddPage(itemPane,

wxT

(

"Gl3d"

));

197

itemNotebook->AddPage(itemPane,

wxT

(

"GlSysInfo"

));

200

itemNotebook->AddPage(itemPane,

wxT

(

"GlPaneWidget"

));

202 #ifdef __WXOSX_COCOA__ 203

itemNotebook->AddPage(

new CMetalWindow

(itemNotebook),

wxT

(

"Metal View"

));

void CreateControls()

Creates the controls and sizers.

void OnCloseClick(wxCommandEvent &event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE

CGLDemoDlg()

Constructors.

void OnCloseWindow(wxCloseEvent &event)

wxEVT_CLOSE_WINDOW event handler for ID_CGLDEMODLG

wxBitmap GetBitmapResource(const wxString &name)

Retrieves bitmap resources.

void Init()

Initialises member variables.

static bool ShowToolTips()

Should we show tooltips?

bool Create(wxWindow *parent, wxWindowID id=10000, const wxString &caption=_("wxWidgets GL Demo"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX)

Creation.

wxIcon GetIconResource(const wxString &name)

Retrieves icon resources.

~CGLDemoDlg()

Destructor.

class CRgbaColor provides a simple abstraction for managing colors.

static wxString GetResourcePath(void)

the shared resource path corresponds to the <res> alias above.

virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height)=0

virtual void Begin(GLenum mode)=0

Start rendering.

virtual void MatrixMode(GLenum mode)=0

void SetDeviceResolution(unsigned int res)

Get/set device resolution in pixels per inch (defaults to 72) You can get this value from wxWidgets v...

IRender & GetGl()

convenience function for getting current render manager

void SetFontPath(const string &p)

This path will be prepended to filename when calling GetFont It should be set to "ToStdString(CSysPat...

virtual void LoadIdentity()=0

static CFtglFontManager & Instance()

Get an instance of the manager so you can retrieve fonts.

virtual void End()=0

Finish rendering (create buffer and send to renderer)

void Vertex2f(GLfloat x, GLfloat y)

virtual void Ortho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearVal, GLdouble farVal)=0

virtual void ColorC(const CRgbaColor &c)=0

Set current color (glColor{3,4}{f,d}{v,})

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

const struct ncbi::grid::netcache::search::fields::SIZE size


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