Coin Logo http://www.sim.no
http://www.coin3d.org

SoWinDevice Class Reference
[Win Device Classes]

#include <Inventor/Win/devices/SoWinDevice.h>

Inheritance diagram for SoWinDevice:

SoWinObject SoWinKeyboard SoWinMouse SoWinSpaceball List of all members.

Detailed Description

The SoWinDevice class is the base class for the translation devices.

The SoWin device classes provide glue functionality for translating native GUI events from the underlying toolkit to Inventor scenegraph SoEvent events.

The device classes are mainly of interest to application programmers when writing extensions for new types of devices, and seldom in other contexts -- so they can most often be ignored.


Public Member Functions

virtual ~SoWinDevice ()
virtual void enable (HWND w, SoWinEventHandler *handler, void *closure)=0
virtual void disable (HWND w, SoWinEventHandler *handler, void *closure)=0
virtual const SoEvent * translateEvent (MSG *event)=0
void setWindowSize (const SbVec2s size)
SbVec2s getWindowSize (void) const

Static Public Member Functions

static void initClasses (void)

Protected Member Functions

 SoWinDevice (void)
void setEventPosition (SoEvent *event, int x, int y) const
void addEventHandler (HWND, SoWinEventHandler *, void *)
void removeEventHandler (HWND, SoWinEventHandler *, void *)
void invokeHandlers (MSG *event)

Static Protected Member Functions

static SbVec2s getLastEventPosition (void)

Friends

class SoWinDeviceP


Constructor & Destructor Documentation

SoWinDevice::~SoWinDevice (  )  [virtual]

Public virtual destructor.

SoWinDevice::SoWinDevice ( void   )  [protected]

Constructor. Protected to only enable invocation from derived device classes.


Member Function Documentation

void SoWinDevice::enable ( HWND  widget,
SoWinEventHandler *  handler,
void *  closure 
) [pure virtual]

This method will enable the device for the widget.

handler is invoked with the closure argument when an event occur in widget.

Implemented in SoWinMouse, SoWinKeyboard, and SoWinSpaceball.

void SoWinDevice::disable ( HWND  widget,
SoWinEventHandler *  handler,
void *  closure 
) [pure virtual]

This method will disable the handler for the device.

Implemented in SoWinMouse, SoWinKeyboard, and SoWinSpaceball.

const SoEvent * SoWinDevice::translateEvent ( MSG *  event  )  [pure virtual]

This method translates from native events to Open Inventor SoEvent events.

Implemented in SoWinMouse, SoWinKeyboard, and SoWinSpaceball.

void SoWinDevice::setWindowSize ( const SbVec2s  size  ) 

This method sets the cached size of the window the device is "attached" to.

SbVec2s SoWinDevice::getWindowSize ( void   )  const

This method returns the cached window size.

void SoWinDevice::initClasses ( void   )  [static]

This function initializes the type system for all the SoWin device classes. It is called indirectly when calling SoWin::init(), so the application programmer doesn't have to bother with it.

void SoWinDevice::setEventPosition ( SoEvent *  event,
int  x,
int  y 
) const [protected]

This method fills in the position information of event, translating the coordinates into the correct coordinate system.

SbVec2s SoWinDevice::getLastEventPosition ( void   )  [static, protected]

Returns last event position that was set with SoWinDevice::setEventPosition().

void SoWinDevice::addEventHandler ( HWND  widget,
SoWinEventHandler *  handler,
void *  closure 
) [protected]

Stores an event handler for the widget, which can later be invoked with SoWinDevice::invokeHandlers(). Used by extension device types.

void SoWinDevice::removeEventHandler ( HWND  widget,
SoWinEventHandler *  handler,
void *  closure 
) [protected]

Remove a handler registered with SoWinDevice::addEventHandler().

void SoWinDevice::invokeHandlers ( MSG *  event  )  [protected]

Invoke all handlers registered with SoWinDevice::addEventHandler().


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

Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.

Generated on Wed Oct 8 03:14:52 2008 for SoWin by Doxygen. 1.4.7