SkyGI::RadioButton Class Reference

Inheritance diagram for SkyGI::RadioButton:
[legend]
Collaboration diagram for SkyGI::RadioButton:
[legend]
List of all members.

Public Member Functions

 RadioButton (Window *pParent, const Rect rFrame, const String &pLabel, unsigned int nWindowLayoutFlags)
 ~RadioButton ()
virtual void MouseDown (const InputEvent &nInputEvent)
virtual bool FocusLost ()
virtual bool FocusGet ()
virtual void Paint (const Rect &rDirty)
void KeyDown (const InputEvent &nInputEvent)
virtual String GetCaption ()
virtual void SetCaption (const String &cString)
Point GetSizeHint (enumSizeHint nSizeHint)
virtual void OnActivated (const InputEvent &nInputEvent)
void Activate (bool bCallOnActivated=false)
bool IsActive ()

Public Attributes

signal0 Activated
signal1< const InputEvent & > ActivatedEvent

Classes

class  Private

Detailed Description

RadioButton

Description:
The RadioButton class handles the interaction between radio buttons in the following way: A direct user action can only turn on a radio button, not turn it off. However, when the user turns a button on, the RadioButton object turns off all sibling RadioButtons—that is, all BRadioButtons that have the same parent as the one that was turned on. This means that a parent view should have no more than one group of radio buttons among its children. Each set of radio buttons should be assigned a separate parent—perhaps an empty BView that simply contains the radio buttons and does no drawing of its own.
Examples:

radiobutton.cpp.


Constructor & Destructor Documentation

RadioButton::RadioButton ( Window pParent,
const Rect  rFrame,
const String pLabel,
unsigned int  nWindowLayoutFlags 
)

RadioButton::~RadioButton (  ) 


Member Function Documentation

void RadioButton::MouseDown ( const InputEvent nInputEvent  )  [virtual]

Mouse pressed

Description:
This function gets called when a mouse press occured inside this window.
Overload this member function to react on mouse presses.
Parameters:
nButton - MouseButton which was pressed
nMouseButtonMask - Mask showing which mouse buttons were pressed when the mouse press occured
nInputEvent - INPUT_EVENT_MOUSE_PRESS for a single and INPUTE_EVENT_MOUSE_DOUBLECLICK for a doubleclick

Reimplemented from SkyGI::Window.

bool RadioButton::FocusLost (  )  [virtual]

Reimplemented from SkyGI::Window.

bool RadioButton::FocusGet (  )  [virtual]

Reimplemented from SkyGI::Window.

void RadioButton::Paint ( const Rect rDirty  )  [virtual]

Paint window content

Description:
This function gets called whenever an area of the window has to be redrawn. Usually you should only draw from inside the Paint function. If you need to redraw a window (when lets say some content must be updated), simply call Invalidate() which will then (asynchronly) call this paint function.

Usually you should draw the background using Window::DrawBackground(rDirty) and the border with DrawBorder(rRect). This way the user has full control over the appearance of your window, meaning he can change the background and border style.
The window content area itself is defined by the border margin and the window margin. Every window may define a margin. If you draw content into this window always make sure to not draw into the margin area. Additionally, the border has a margin too. As the user has full control to select any border for your window make sure to user the current borders margin when drawing window content. the dra Window::Paint() just redraws the background using DrawBackground. Overload this member function to add custom dawing code
Overload this member function to add custom dawing code
Parameters:
rDirty - Dirty rectangular region which has to be redrawn. Prior entering this function the painters clip region is automatically set to this dirty region.
See also:
DrawBorder, DrawBackground, Border, GetBorder, GetBorder::Margin, GetMargin

Reimplemented from SkyGI::Window.

void RadioButton::KeyDown ( const InputEvent nInputEvent  )  [virtual]

Reimplemented from SkyGI::Window.

String RadioButton::GetCaption (  )  [virtual]

Examples:
radiobutton.cpp.

void RadioButton::SetCaption ( const String cString  )  [virtual]

Point RadioButton::GetSizeHint ( enumSizeHint  nSizeHint  )  [virtual]

Get size hint

Description:
Overload this member function for derived classes to inform the GUI about size hints for your widget.
SIZE_HINT_PREFERRED
Return the preferred size of the widget (may depend on the actual content)
SIZE_HINT_MINIMUM
Return the minimum size the widget needs to display a proper content
Note:
If you want to get the minimum or preferred size of a window always use GetMinimumSize or GetPreferredSize. Don't call GetSizeHint directly
See also:
GetPreferredSize, GetMinimumSize, SetMinimumSize

Reimplemented from SkyGI::Window.

void RadioButton::OnActivated ( const InputEvent nInputEvent  )  [virtual]

void RadioButton::Activate ( bool  bCallOnActivated = false  ) 

bool RadioButton::IsActive (  )  [virtual]

Get activation state

Description:
Get the windows activation state. A window is active if it is the top most window and receives keyboard input.
Note:
The windows activation state is retrieved from the top level window always. Calling IsActive() for a child window will automatically return the activation state of the top level window.
Returns:
true if window is top level window is active.
See also:
HasFocus

Reimplemented from SkyGI::Window.

Examples:
radiobutton.cpp.


Member Data Documentation

signal0 SkyGI::RadioButton::Activated

Examples:
radiobutton.cpp.

signal1<const InputEvent&> SkyGI::RadioButton::ActivatedEvent


Generated on Thu Dec 13 18:14:41 2007 for SkyGI by  doxygen 1.5.1-p1