Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends

H3D::WxWidgetsWindow Class Reference

H3DWindowNode implemented using wxWidgets. More...

#include <WxWidgetsWindow.h>

List of all members.

Classes

class  MyWxGLCanvas

Public Types

typedef void(* OnDropFileFunc )(wxCoord x, wxCoord y, const wxArrayString &, void *)

Public Member Functions

 WxWidgetsWindow (wxWindow *_theParent=0, Inst< SFInt32 > _width=0, Inst< SFInt32 > _height=0, Inst< SFBool > _fullscreen=0, Inst< SFBool > _mirrored=0, Inst< RenderMode > _renderMode=0, Inst< SFViewpoint > _viewpoint=0, Inst< SFInt32 > _posX=0, Inst< SFInt32 > _posY=0, Inst< SFBool > _manualCursorControl=0, Inst< SFString > _cursorType=0)
 Constructor.
 ~WxWidgetsWindow ()
virtual void swapBuffers ()
 Calls wxGLCanvas::SwapBuffers.
virtual void initWindow ()
 Creates and initializes a wxWindow for OpenGL rendering.
virtual void initWindowHandler ()
 Initializes wxWindow.
virtual void setFullscreen (bool fullscreen)
 Sets fullscreen mode.
virtual void makeWindowActive ()
 Make this the current window.
void onFileDraggedAndDroppedFunction (OnDropFileFunc func, void *arg=NULL)
MyWxGLCanvasgetGlCanvas ()

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.

Protected Member Functions

virtual int setCursorType (const std::string &cursor_type)
string getCursorForMode (const string &mode)
void getSupportedCursorsTypes (vector< string > &types)

Protected Attributes

OnDropFileFunc drag_file_func
void * drag_file_func_arg
bool is_initialized
bool have_parent
wxWindow * theWindow
MyWxGLCanvastheWxGLCanvas
bool last_fullscreen

Friends

class DragAndDropFile

Detailed Description

H3DWindowNode implemented using wxWidgets.

Valid values for the cursorType field depend on the platform and are different on Windows, OSX and Linux. Use cursorType->getValidValues() to get the ones supported.


Member Typedef Documentation

typedef void(* H3D::WxWidgetsWindow::OnDropFileFunc)(wxCoord x, wxCoord y, const wxArrayString &, void *)

Constructor & Destructor Documentation

WxWidgetsWindow::WxWidgetsWindow ( wxWindow *  _theParent = 0,
Inst< SFInt32 >  _width = 0,
Inst< SFInt32 >  _height = 0,
Inst< SFBool >  _fullscreen = 0,
Inst< SFBool >  _mirrored = 0,
Inst< RenderMode >  _renderMode = 0,
Inst< SFViewpoint >  _viewpoint = 0,
Inst< SFInt32 >  _posX = 0,
Inst< SFInt32 >  _posY = 0,
Inst< SFBool >  _manualCursorControl = 0,
Inst< SFString >  _cursorType = 0 
)

Constructor.

H3D::WxWidgetsWindow::~WxWidgetsWindow (  )  [inline]

Member Function Documentation

string WxWidgetsWindow::getCursorForMode ( const string &  mode  )  [protected]

Return the cursor type to use for given modes. This should be implemented for each subclass to choose appropriate cursors. The standard modes are: "DEFAULT" - normal mode "ON_SENSOR_OVER" - when mouse pointer is over a pointing device sensor. "ON_SENSOR_ACTIVE" - when a sensor node is active "ON_NAV_LOOKAT" - when lookat mode is chosen

MyWxGLCanvas* H3D::WxWidgetsWindow::getGlCanvas (  )  [inline]
void WxWidgetsWindow::getSupportedCursorsTypes ( vector< string > &  types  )  [protected]

Adds the supported cursor type for the current platform to the given vector.

void WxWidgetsWindow::initWindow (  )  [virtual]

Creates and initializes a wxWindow for OpenGL rendering.

virtual void H3D::WxWidgetsWindow::initWindowHandler (  )  [inline, virtual]

Initializes wxWindow.

void WxWidgetsWindow::makeWindowActive (  )  [virtual]

Make this the current window.

void H3D::WxWidgetsWindow::onFileDraggedAndDroppedFunction ( OnDropFileFunc  func,
void *  arg = NULL 
) [inline]

Set a callback function that will be called when a file is dragged and dropped over the window.

int WxWidgetsWindow::setCursorType ( const std::string &  cursor_type  )  [protected, virtual]

Set the cursor to the given cursor type. See cursorType field for valid values. Returns 0 on success. -1 if the cursor_type is not supported.

void WxWidgetsWindow::setFullscreen ( bool  fullscreen  )  [virtual]

Sets fullscreen mode.

void WxWidgetsWindow::swapBuffers (  )  [virtual]

Calls wxGLCanvas::SwapBuffers.


Friends And Related Function Documentation

friend class DragAndDropFile [friend]

Member Data Documentation

H3DNodeDatabase WxWidgetsWindow::database [static]

The H3DNodeDatabase for this node.

wxWindow* H3D::WxWidgetsWindow::theWindow [protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines