LightWrap++
AC++wrapperfortheLightWave3DSDK
lwpp::ContextMenu Class Reference

#include <contextmenu.h>

+ Inheritance diagram for lwpp::ContextMenu:
+ Collaboration diagram for lwpp::ContextMenu:

List of all members.

Public Member Functions

 ContextMenu (void)
 ContextMenu (int width, size_t(*countFn)(void *), char *(*nameFn)(void *, int), void *userdata)
 Create a new context menu.
 ~ContextMenu ()
 Destroy the context menu.
void Create (void *userdata)
void Create (int width, size_t(*countFn)(void *), char *(*nameFn)(void *, int), void *userdata)
int Deploy (LWPanelID panel, int select)
 Show the context menu.

Protected Member Functions

bool _acquireGlobal ()
virtual bool available () const
 Check if the global is available.
virtual ContextMenuFuncs * getGlobal ()
 Get the pointer to the global.
ContextMenuFuncs * operator-> ()
 Get the pointer to the global.

Static Protected Attributes

static ContextMenuFuncs * globPtr
 Pointer to the global functions.

Detailed Description

Wrapper for ContextMenuFuncs


Constructor & Destructor Documentation

lwpp::ContextMenu::ContextMenu ( void  )
inline
lwpp::ContextMenu::ContextMenu ( int  width,
size_t(*)(void *)  countFn,
char *(*)(void *, int)  nameFn,
void *  userdata 
)
inline

Create a new context menu.

Parameters:
widthWidth of the menu in pixels
countFnCallback to count the number of menu items
nameFnCallback to return the name of the n'th item
userdataUser defined data to be associated with the menu (will be passed on to the Callbacks)
lwpp::ContextMenu::~ContextMenu ( )
inline

Destroy the context menu.


Member Function Documentation

bool lwpp::GlobalBase< ContextMenuFuncs >::_acquireGlobal ( )
inlineprotectedinherited
virtual bool lwpp::GlobalBase< ContextMenuFuncs >::available ( ) const
inlinevirtualinherited

Check if the global is available.

void lwpp::ContextMenu::Create ( void *  userdata)
inline
void lwpp::ContextMenu::Create ( int  width,
size_t(*)(void *)  countFn,
char *(*)(void *, int)  nameFn,
void *  userdata 
)
inline
int lwpp::ContextMenu::Deploy ( LWPanelID  panel,
int  select 
)
inline

Show the context menu.

Parameters:
panelParent LWPanelID
selectSelected item
Returns:
User selection or -1 if nothing was selected
virtual ContextMenuFuncs * lwpp::GlobalBase< ContextMenuFuncs >::getGlobal ( )
inlinevirtualinherited

Get the pointer to the global.

ContextMenuFuncs * lwpp::GlobalBase< ContextMenuFuncs >::operator-> ( )
inlineinherited

Get the pointer to the global.


Member Data Documentation

ContextMenuFuncs * lwpp::GlobalBase< ContextMenuFuncs >::globPtr
staticprotectedinherited

Pointer to the global functions.


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