GRadioGroup Class Reference

#include <GRadioGroup.h>

Inheritance diagram for GRadioGroup:

GView

List of all members.

Public Member Functions

char * GetClass ()
int64 Value ()
 Returns the index of the set radio button.
void Value (int64 i)
 Sets the 'ith' radio button to on.
GRadioButtonAppend (int x, int y, char *name)
 Adds a radio button to the group.
int OnNotify (GViewI *Ctrl, int Flags)
 Called when a child view or view with it's SetNotify() set to this window changes.
void OnPaint (GSurface *pDC)
 Called to paint the onscreen representation of the view.
void OnAttach ()
 Called after the view is attached to a new parent.
int OnEvent (GMessage *m)
 Called to process every message received by this window.
char * Name ()
 Returns the utf-8 text associated with this view.
char16NameW ()
 Returns the wide char text associated with this view.
bool Name (char *n)
 Sets the utf-8 text associated with this view.
bool NameW (char16 *n)
 Sets the wide char text associated with this view.
void SetFont (GFont *Fnt, bool OwnIt=false)
 Sets the font for this control.


Detailed Description

A grouping control. All radio buttons that are children of this control will automatically have only one option selected. Other controls can be children as well but are ignored in the calculation of the groups value. The value of the group is the index into a list of radio buttons of the radio button that is on.

Member Function Documentation

char* GRadioGroup::GetClass (  )  [inline]

The class' name. Should be overriden in child classes to return the right class name. Mostly used for debugging, but in the win32 port it is also the default WIN32 class name passed to RegisterClass() in GView::CreateClass().

Returns:
the Class' name for debugging

Reimplemented from GView.

bool GRadioGroup::Name ( char *  n  ) 

Sets the utf-8 text associated with this view.

Name and NameW are interchangable. Using them in any order will convert the text between utf-8 and wide to satify any requirement. Generally once the opposing version of the string is required both the utf-8 and wide copies of the string remain cached in RAM until the Name is changed.

Reimplemented from GView.

References GView::GetFont(), and Name().

char16* GRadioGroup::NameW (  )  [inline, virtual]

Returns the wide char text associated with this view.

On Win32 the wide characters are 16 bits, on unix systems they are 32-bit characters.

Reimplemented from GView.

References GView::NameW().

Referenced by NameW().

int GRadioGroup::OnNotify ( GViewI *  Ctrl,
int  Flags 
)

Called when a child view or view with it's SetNotify() set to this window changes.

The event by default will bubble up to the GWindow at the top of the window heirarchy visiting each GView on the way. If it reaches a GView that processes it then the event stops propergating up the heirarchy.

Reimplemented from GView.

References GView::GetNotify(), and GView::GetParent().

void GRadioGroup::SetFont ( GFont Fnt,
bool  OwnIt = false 
) [virtual]

Sets the font for this control.

The lifetime of the font passed in is the responsibility of the caller. The GView object assumes the pointer will be valid at all times.

Reimplemented from GView.

References GView::GetFont(), and GView::Invalidate().


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

Generated on Wed Dec 1 15:41:04 2010 for Lgi by  doxygen 1.5.7.1