Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions

vlWX::vlWXGLCanvas Class Reference

The vlWXGLCanvas class implements a vl::OpenGLContext using the wxWidgets library. More...

#include <vlWXGLCanvas.hpp>

Inheritance diagram for vlWX::vlWXGLCanvas:
vl::OpenGLContext vl::Object

List of all members.

Public Member Functions

 vlWXGLCanvas (wxWindow *parent, const wxGLContext *shared, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, int *attribList=0, const wxString &name=wxT("vlWXGLCanvas"), const wxPalette &palette=wxNullPalette)
 ~vlWXGLCanvas ()
void OnPaint (wxPaintEvent &ev)
void OnSize (wxSizeEvent &ev)
void OnEraseBackground (wxEraseEvent &ev)
void OnKeyDown (wxKeyEvent &ev)
void OnKeyUp (wxKeyEvent &ev)
void OnMouseMotion (wxMouseEvent &ev)
void OnMouseDown (wxMouseEvent &ev)
void OnMouseUp (wxMouseEvent &ev)
void OnMouseWheel (wxMouseEvent &ev)
void OnMouseEnter (wxMouseEvent &ev)
void OnIdle (wxIdleEvent &ev)
void OnDropFiles (wxDropFilesEvent &ev)
bool setFullscreen (bool fullscreen)
 If the OpenGL context is a widget this function requests a maximization to fullscreen.
void quitApplication ()
 Asks to the windowing system that is managing the OpenGLContext to quit the application.
void makeCurrent ()
 Sets the OpenGL context as current for the calling thread.
void swapBuffers ()
 Swaps the back and front buffers to present the last rendering.
void getFocus ()
 If the OpenGL context is a widget this function requests the mouse focus on it.
void setMousePosition (int x, int y)
 If the OpenGL context is a widget this function sets the mouse position.
void update ()
 If the OpenGLContext is a widget this function requests a redraw.
void setWindowTitle (const vl::String &text)
 If the OpenGL context is a top window this function sets its title.
void show ()
 If the OpenGL context is a widget this function makes it visible to the user.
void hide ()
 If the OpenGL context is a widget this function makes it invisible to the user.
void setPosition (int x, int y)
 If the OpenGL context is a widget this function sets its position.
void setSize (int w, int h)
 If the OpenGL context is a widget this function sets its size.
vl::ivec2 position () const
 If the OpenGL context is a widget this function returns its position.
void setMouseVisible (bool visible)
 If the OpenGL context is a widget this function sets whether the mouse is visible over it or not.

Detailed Description

The vlWXGLCanvas class implements a vl::OpenGLContext using the wxWidgets library.


Constructor & Destructor Documentation

vlWXGLCanvas::vlWXGLCanvas ( wxWindow *  parent,
const wxGLContext *  shared,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = 0,
int *  attribList = 0,
const wxString &  name = wxT("vlWXGLCanvas"),
const wxPalette &  palette = wxNullPalette 
)
vlWX::vlWXGLCanvas::~vlWXGLCanvas (  ) [inline]

Member Function Documentation

void vlWXGLCanvas::OnPaint ( wxPaintEvent &  ev )
void vlWXGLCanvas::OnSize ( wxSizeEvent &  ev )
void vlWXGLCanvas::OnEraseBackground ( wxEraseEvent &  ev )
void vlWXGLCanvas::OnKeyDown ( wxKeyEvent &  ev )
void vlWXGLCanvas::OnKeyUp ( wxKeyEvent &  ev )
void vlWXGLCanvas::OnMouseMotion ( wxMouseEvent &  ev )
void vlWXGLCanvas::OnMouseDown ( wxMouseEvent &  ev )
void vlWXGLCanvas::OnMouseUp ( wxMouseEvent &  ev )
void vlWXGLCanvas::OnMouseWheel ( wxMouseEvent &  ev )
void vlWX::vlWXGLCanvas::OnMouseEnter ( wxMouseEvent &  ev )
void vlWXGLCanvas::OnIdle ( wxIdleEvent &  ev )
void vlWXGLCanvas::OnDropFiles ( wxDropFilesEvent &  ev )
bool vlWXGLCanvas::setFullscreen ( bool   ) [virtual]

If the OpenGL context is a widget this function requests a maximization to fullscreen.

Reimplemented from vl::OpenGLContext.

void vlWXGLCanvas::quitApplication (  ) [virtual]

Asks to the windowing system that is managing the OpenGLContext to quit the application.

Reimplemented from vl::OpenGLContext.

void vlWXGLCanvas::makeCurrent (  ) [virtual]

Sets the OpenGL context as current for the calling thread.

Implements vl::OpenGLContext.

void vlWXGLCanvas::swapBuffers (  ) [virtual]

Swaps the back and front buffers to present the last rendering.

Implements vl::OpenGLContext.

void vlWXGLCanvas::getFocus (  ) [virtual]

If the OpenGL context is a widget this function requests the mouse focus on it.

Reimplemented from vl::OpenGLContext.

void vlWXGLCanvas::setMousePosition ( int  ,
int   
) [virtual]

If the OpenGL context is a widget this function sets the mouse position.

Reimplemented from vl::OpenGLContext.

void vlWXGLCanvas::update (  ) [virtual]

If the OpenGLContext is a widget this function requests a redraw.

Reimplemented from vl::OpenGLContext.

void vlWXGLCanvas::setWindowTitle ( const vl::String  ) [virtual]

If the OpenGL context is a top window this function sets its title.

Reimplemented from vl::OpenGLContext.

void vlWXGLCanvas::show (  ) [virtual]

If the OpenGL context is a widget this function makes it visible to the user.

Reimplemented from vl::OpenGLContext.

void vlWXGLCanvas::hide (  ) [virtual]

If the OpenGL context is a widget this function makes it invisible to the user.

Reimplemented from vl::OpenGLContext.

void vlWXGLCanvas::setPosition ( int  ,
int   
) [virtual]

If the OpenGL context is a widget this function sets its position.

Reimplemented from vl::OpenGLContext.

void vlWXGLCanvas::setSize ( int  ,
int   
) [virtual]

If the OpenGL context is a widget this function sets its size.

Reimplemented from vl::OpenGLContext.

ivec2 vlWXGLCanvas::position (  ) const [virtual]

If the OpenGL context is a widget this function returns its position.

Reimplemented from vl::OpenGLContext.

void vlWXGLCanvas::setMouseVisible ( bool   ) [virtual]

If the OpenGL context is a widget this function sets whether the mouse is visible over it or not.

Reimplemented from vl::OpenGLContext.


The documentation for this class was generated from the following files:

Visualization Library v2010.11.1125 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Fri Nov 26 2010 10:33:57.
Permission is granted to use this page to write and publish articles regarding Visualization Library.