Planeshift
Public Member Functions

pawsRadioButton Class Reference

A combination widget that has a radio button and a text label. More...

#include <pawsradio.h>

List of all members.

Public Member Functions

pawsRadioButtonCreate (const char *txt, psRadioPos pos, bool state=true)
bool GetState ()
pawsTextBoxGetTextBox ()
bool OnButtonPressed (int mouseButton, int keyModifier, pawsWidget *widget)
 Called whenever a button is pressed.
 pawsRadioButton (const pawsRadioButton &origin)
 pawsRadioButton ()
void SetRadioOffImage (const char &image)
void SetRadioOnImage (const char &image)
void SetRadioSize (int s)
void SetState (bool state)
bool Setup (iDocumentNode *node)
 Setup this widget.
virtual ~pawsRadioButton ()

Detailed Description

A combination widget that has a radio button and a text label.

This should ALWAYS be a child of the pawsRadioButtonGroup in order to control his brothers properly ( ie have only 1 in group active at at time. )

This widget is defined in an XML as:

<widget name="nameHere" factory="pawsRadioButton" id="intIDNumber"> <!-- The size of the entire widget including text and button. --> <frame x="75" y="5" width="70" height="30" />

<!-- The text label to use and it's position relative to the button --> <text string="Sell" position="right"/> </widget>

Current supported positions are left/right.

To create Radio button group do this:

<widget name="RBG" factory="pawsRadioButtonGroup"> <!-- global radio buttons properties --> <radio on="radioon" off="radiooff" size="25"> <radionode> <!-- radio button 1 -->

<frame x="75" y="5" width="70" height="30" /> <text string="Sell" position="right"/>

<!-- self button properties. overrride global. --> <radio on="radioon1" off="radiooff1" size="20"> </radionode> <radionode> <!-- radio button 2 --> </radionode> </widget>

By default it uses the radioon/radiooff named images and automatically assumes that their size is 16x16.

Definition at line 81 of file pawsradio.h.


Constructor & Destructor Documentation

pawsRadioButton::pawsRadioButton ( )
pawsRadioButton::pawsRadioButton ( const pawsRadioButton origin)
virtual pawsRadioButton::~pawsRadioButton ( ) [virtual]

Member Function Documentation

pawsRadioButton* pawsRadioButton::Create ( const char *  txt,
psRadioPos  pos,
bool  state = true 
)
bool pawsRadioButton::GetState ( ) [virtual]

Reimplemented from pawsButton.

pawsTextBox* pawsRadioButton::GetTextBox ( ) [inline]

Definition at line 95 of file pawsradio.h.

bool pawsRadioButton::OnButtonPressed ( int  button,
int  keyModifier,
pawsWidget widget 
) [virtual]

Called whenever a button is pressed.

Parameters:
buttonThe button pressed.
keyModifierModifier key in effect.
widgetThe widget the button belongs to.
Returns:
bool Parent's result or FALSE if no parent.

Reimplemented from pawsWidget.

void pawsRadioButton::SetRadioOffImage ( const char &  image) [inline]

Definition at line 100 of file pawsradio.h.

void pawsRadioButton::SetRadioOnImage ( const char &  image) [inline]

Definition at line 104 of file pawsradio.h.

void pawsRadioButton::SetRadioSize ( int  s) [inline]

Definition at line 108 of file pawsradio.h.

void pawsRadioButton::SetState ( bool  state)
bool pawsRadioButton::Setup ( iDocumentNode *  ) [virtual]

Setup this widget.

Reimplemented from pawsButton.


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