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

#include <lwpp/panel.h>

List of all members.

Public Member Functions

 PanelControl (LWControlID ctl=0)
 PanelControl (const PanelControl &ctl)
void Draw (DrMode mode=DR_RENDER)
void Erase ()
 Erases the control from the panel.
template<typename T >
void Get (T &val, cTag tag=CTL_VALUE)
bool GetBool (cTag tag=CTL_VALUE)
LWControl * getControl ()
 Returns LWControl managed by this PanelControl.
double GetFloat ()
 Gets a double value of a control.
LWControlID getID () const
 Returns the ID of the LWControl managed by this PanelControl.
int GetInt (cTag tag=CTL_VALUE)
void * GetPointer (cTag tag=CTL_USERDATA)
 Gets an pointer value of a control.
void * GetUserData ()
 Gets the pointer to your data for this control.
void GetVec (int &a, int &b, int &c)
void GetVec (int v[])
void Ghost (bool render=true)
void initListBox ()
void initMultiListBox ()
bool isGhosted () const
bool isValid () const
 Returns true if is a valid control.
void LeftAlign (PanelControl &ref, int nudge=0)
void Move (int x, int y)
void MoveBelow (PanelControl &ref, int space=0)
void MoveBelowTab (PanelControl &ref)
void MoveLeftOf (PanelControl &ref, int space=0)
void MoveRightOf (PanelControl &ref, int space=0)
void MoveX (int x)
void MoveY (int y)
bool operator< (const PanelControl ctl) const
PanelControloperator= (const PanelControl &from)
void operator= (LWControlID ctl)
 Asignment operator.
void operator= (LWControl *ctl)
 Asignment operator.
bool operator== (const LWControlID ctl)
 Equal operator.
bool operator== (const PanelControl ctl)
 Equal operator.
bool operator== (const LWControl *ctl)
 Equal operator.
LWPanelFuncs * PanelFuncs ()
 Returns a pointer to the panel functions.
LWPanelID PanelID ()
 Returns the LWPanelID of the panel.
int RangeMax ()
void RangeMax (int m)
int RangeMin ()
 Set the minimum range.
void RangeMin (int m)
void Redraw ()
 Redraws the control in the panel.
void Refresh ()
void Render ()
 Renders the control in the panel.
void RightAlign (PanelControl &ref, int nudge=0)
template<typename T >
void Set (T val, cTag tag=CTL_VALUE)
void SetControl (LWControlID ctl)
template<typename T >
void SetDrawCallback ()
template<typename T >
void SetEventCallback ()
void setHeight (int h)
void setSize (int w, int h)
void SetUserData (void *d)
void SetUserDraw (LWCtlDrawHook d)
void setWidth (int w)
void UnGhost (bool render=true)
Control Layout

Functions to place any layout controls

int X ()
 Return the X position of the control.
int Y ()
 Return the Y position of the control.
int W ()
 Return the width of the control.
int H ()
 Return the height of the Controls.
int LW ()
 Return the label width of the control.
int HotX ()
 Return the left position of the clickable area of the control.
int HotY ()
 Return the top position of the clickable area of the control.
int HotW ()
 Return the width of the clickable area of the control.
int HotH ()
 Return the left height of the clickable area of the control.
int MouseX ()
 Return the mouse X position on the control for the most recent event.
int MouseY ()
 Return the mouse Y position on the control for the most recent event.

Protected Member Functions

void get (cTag tag, LWValue *val)
void set (cTag tag, LWValue *val)

Detailed Description

Class to adapt callbacks for Panel controls on a LW Panel.


Constructor & Destructor Documentation

lwpp::PanelControl::PanelControl ( LWControlID  ctl = 0)
inline

Constructor

Parameters:
ctlThe LWControlID of the control
lwpp::PanelControl::PanelControl ( const PanelControl ctl)
inline

Member Function Documentation

void lwpp::PanelControl::Draw ( DrMode  mode = DR_RENDER)
inline

Changes the draw mode of the control

Parameters:
modeThe draw mode for the control. Render by default.
void lwpp::PanelControl::Erase ( )
inline

Erases the control from the panel.

void lwpp::PanelControl::get ( cTag  tag,
LWValue *  val 
)
inlineprotected

Get the control attributes, including it's value.

Parameters:
tagOne of the cTag defined in lwpanel.h (line 186).
*valPointer to an LWValue.
template<typename T >
void lwpp::PanelControl::Get ( T &  val,
cTag  tag = CTL_VALUE 
)
inline

Template version. Gets the control attributes, including it's value.

Parameters:
&valreference to the value for the tag.
tagOne of the TAGS defined in lwpanel.h (line 186).
bool lwpp::PanelControl::GetBool ( cTag  tag = CTL_VALUE)
inline

Gets an boolean value of a control.

Parameters:
tagOne of the TAGS defined in lwpanel.h (line 186).
LWControl* lwpp::PanelControl::getControl ( )
inline

Returns LWControl managed by this PanelControl.

double lwpp::PanelControl::GetFloat ( )
inline

Gets a double value of a control.

LWControlID lwpp::PanelControl::getID ( void  ) const
inline

Returns the ID of the LWControl managed by this PanelControl.

int lwpp::PanelControl::GetInt ( cTag  tag = CTL_VALUE)
inline

Gets an int value of a control.

Parameters:
tagOne of the TAGS defined in lwpanel.h (line 186).
void* lwpp::PanelControl::GetPointer ( cTag  tag = CTL_USERDATA)
inline

Gets an pointer value of a control.

Parameters:
tagOne of the TAGS defined in lwpanel.h (line 186).
Returns:
A pointer to the value
void* lwpp::PanelControl::GetUserData ( )
inline

Gets the pointer to your data for this control.

void lwpp::PanelControl::GetVec ( int &  a,
int &  b,
int &  c 
)
inline
void lwpp::PanelControl::GetVec ( int  v[])
inline
void lwpp::PanelControl::Ghost ( bool  render = true)
inline

Ghost the control in the panel. How to show to the user a control is deactivated.

int lwpp::PanelControl::H ( )
inline

Return the height of the Controls.

int lwpp::PanelControl::HotH ( )
inline

Return the left height of the clickable area of the control.

int lwpp::PanelControl::HotW ( )
inline

Return the width of the clickable area of the control.

int lwpp::PanelControl::HotX ( )
inline

Return the left position of the clickable area of the control.

int lwpp::PanelControl::HotY ( )
inline

Return the top position of the clickable area of the control.

void lwpp::PanelControl::initListBox ( )
inline
void lwpp::PanelControl::initMultiListBox ( )
inline
bool lwpp::PanelControl::isGhosted ( ) const
inline
bool lwpp::PanelControl::isValid ( void  ) const
inline

Returns true if is a valid control.

void lwpp::PanelControl::LeftAlign ( PanelControl ref,
int  nudge = 0 
)
inline

Aligns a control to the left of another control

Parameters:
&refreference to the original control used to left align this control
int lwpp::PanelControl::LW ( )
inline

Return the label width of the control.

int lwpp::PanelControl::MouseX ( )
inline

Return the mouse X position on the control for the most recent event.

int lwpp::PanelControl::MouseY ( )
inline

Return the mouse Y position on the control for the most recent event.

void lwpp::PanelControl::Move ( int  x,
int  y 
)
inline

Moves a control by the number of pixels indicated on x, and y.

Parameters:
xNumber of pixels to move the control horizontally
yNumber of pixels to move the control vertically
void lwpp::PanelControl::MoveBelow ( PanelControl ref,
int  space = 0 
)
inline

Moves a control under another control

Parameters:
&refreference to the original control used to position this control belows it
spaceNumber of pixels to separate the control vertically
void lwpp::PanelControl::MoveBelowTab ( PanelControl ref)
inline
void lwpp::PanelControl::MoveLeftOf ( PanelControl ref,
int  space = 0 
)
inline

Moves a control to the left side of another control

Parameters:
&refreference to the original control used to position this control at is left side
spaceNumber of pixels to separate the control horizontally
void lwpp::PanelControl::MoveRightOf ( PanelControl ref,
int  space = 0 
)
inline

Moves a control to the right side of another control

Parameters:
&refreference to the original control used to position this control at is right side
spaceNumber of pixels to separate the control horizontally
void lwpp::PanelControl::MoveX ( int  x)
inline

Moves horizontally a control by the number of pixels indicated on x

Parameters:
xNumber of pixels to move the control horizontally
void lwpp::PanelControl::MoveY ( int  y)
inline

Moves vertically a control by the number of pixels indicated on y

Parameters:
yNumber of pixels to move the control vertically
bool lwpp::PanelControl::operator< ( const PanelControl  ctl) const
inline
PanelControl& lwpp::PanelControl::operator= ( const PanelControl from)
inline
void lwpp::PanelControl::operator= ( LWControlID  ctl)
inline

Asignment operator.

void lwpp::PanelControl::operator= ( LWControl *  ctl)
inline

Asignment operator.

bool lwpp::PanelControl::operator== ( const LWControlID  ctl)
inline

Equal operator.

bool lwpp::PanelControl::operator== ( const PanelControl  ctl)
inline

Equal operator.

bool lwpp::PanelControl::operator== ( const LWControl *  ctl)
inline

Equal operator.

LWPanelFuncs* lwpp::PanelControl::PanelFuncs ( )
inline

Returns a pointer to the panel functions.

LWPanelID lwpp::PanelControl::PanelID ( )
inline

Returns the LWPanelID of the panel.

int lwpp::PanelControl::RangeMax ( )
inline
void lwpp::PanelControl::RangeMax ( int  m)
inline
int lwpp::PanelControl::RangeMin ( )
inline

Set the minimum range.

void lwpp::PanelControl::RangeMin ( int  m)
inline
void lwpp::PanelControl::Redraw ( )
inline

Redraws the control in the panel.

void lwpp::PanelControl::Refresh ( )
inline
void lwpp::PanelControl::Render ( )
inline

Renders the control in the panel.

void lwpp::PanelControl::RightAlign ( PanelControl ref,
int  nudge = 0 
)
inline

Aligns a control to the right of another control

Parameters:
&refreference to the original control used to right align this control
void lwpp::PanelControl::set ( cTag  tag,
LWValue *  val 
)
inlineprotected

Set the control attributes, including it's value.

Parameters:
tagOne of the TAGS defined in lwpanel.h (line 186).
*valPointer to an LWValue.
template<typename T >
void lwpp::PanelControl::Set ( val,
cTag  tag = CTL_VALUE 
)
inline

Template version. Sets the control attributes, including it's value.

Parameters:
valThe value for the tag.
tagOne of the TAGS defined in lwpanel.h (line 186).
void lwpp::PanelControl::SetControl ( LWControlID  ctl)
inline

Set the id of LWControl managed by this PanelControl

Parameters:
ctlThe LWControlID of the control
template<typename T >
void lwpp::PanelControl::SetDrawCallback ( )
inline

Template version of the CON_SETUSERDRAW macro. Sets the PanelControlAdaptor<T>::cb_Draw callback for the control draw

template<typename T >
void lwpp::PanelControl::SetEventCallback ( )
inline

Template version of the CON_SETEVENT macro. Sets the PanelControlAdaptor<T>::cb_Event callback for the control events

void lwpp::PanelControl::setHeight ( int  h)
inline

Sets the height of a control by the number of pixels indicated on h.

Parameters:
hNumber of pixels to indicate control's height
void lwpp::PanelControl::setSize ( int  w,
int  h 
)
inline

Sets the width and height of a control by the number of pixels indicated on w, and h.

Parameters:
wNumber of pixels to indicate control's width
hNumber of pixels to indicate control's height
void lwpp::PanelControl::SetUserData ( void *  d)
inline

Sets a pointer to your data for this control. This data pointer is passed as the second argument to the control callbacks. Note: For some control types, calling set with this tag has important side effects. Even if your userdata is NULL for those controls, you'll want to explicitly set it before opening the panel.

Parameters:
[in]*dPointer to your data
void lwpp::PanelControl::SetUserDraw ( LWCtlDrawHook  d)
inline

Sets a control draw callback You can draw anywhere on the panel from within this callback.

Parameters:
dA pointer to a function: typedef void (*LWCtlDrawHook)(LWControlID, void *,DrMode);
void lwpp::PanelControl::setWidth ( int  w)
inline

Sets the width of a control by the number of pixels indicated on w.

Parameters:
wNumber of pixels to indicate control's width
void lwpp::PanelControl::UnGhost ( bool  render = true)
inline
int lwpp::PanelControl::W ( )
inline

Return the width of the control.

int lwpp::PanelControl::X ( )
inline

Return the X position of the control.

int lwpp::PanelControl::Y ( )
inline

Return the Y position of the control.


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