Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

GCombo Class Reference

Combo Box widget. More...

#include <GCombo.h>

Inheritance diagram for GCombo:

GControl List< char > GView GView GTarget GEvent GFlags GTarget GEvent GFlags List of all members.

Public Member Functions

 GCombo (int id, int x, int y, int cx, int cy, char *name)
 Constructor.
bool Sort ()
 Returns whether to sort the list.
void Sort (bool s)
 Sets whether to sort the list.
int Sub ()
 Returns whether to classify the list into submenus.
void Sub (int Type)
 Makes the list of entries sort into submenus. Good for large lists.
void Value (int i)
 Sets the selected item.
int Value ()
 Returns the select item.
bool Name (char *n)
 Sets the selected item by name.
char * Name ()
 Returns the selected item's name.
GSubMenuGetMenu ()
 Gets the menu used.
void SetMenu (GSubMenu *m)
 Sets the menu used.
bool Delete ()
 Deletes the currently select item in the list.
bool Delete (int i)
 Deletes the item at index 'i'.
bool Delete (char *p)
 Deletes the item matching 'p'.
bool Insert (char *p, int Index=-1)
 Inserts a new item.
int GetItems ()
 Gets the items in the list.
char * operator[] (int i)
 Returns the item at index 'i'.
int OnEvent (GMessage *Msg)
 Called to process every message received by this window.
void OnMouseClick (GMouse &m)
 The mouse was clicked over this view.
bool OnKey (GKey &k)
 A key was pressed while this view has focus.
void OnFocus (bool f)
 The view gains or loses the keyboard focus.
void OnPaint (GSurface *pDC)
 Called to paint the onscreen representation of the view.
void SetFont (GFont *Fnt, bool OwnIt=false)
 Sets the font for this control.
bool SetPos (GRect &p, bool Repaint=false)
 Set the position of the view in terms of it's parent.
void Value (int i)
 Sets the integer representation of the view's contents.
int Value ()
 Gets the integer representation of the view's contents.
int OnEvent (GMessage *Msg)
 Called to process every message received by this window.
bool Delete ()
 Deletes the current item.
bool Delete (int i)
 Deletes the item at position 'i'.
bool Delete (char *p)
 Deletes the pointer 'p'.
bool Insert (char *p, int Index=-1)
 Inserts a pointer.

Detailed Description

Combo Box widget.


Constructor & Destructor Documentation

GCombo::GCombo int  id,
int  x,
int  y,
int  cx,
int  cy,
char *  name
 

Constructor.

Parameters:
id  The control ID
x  The left edge x coordinate
y  The top edge y coordinate
cx  The width
cy  The height
name  The initial text


Member Function Documentation

bool GCombo::Insert char *  p,
int  Index = -1
[virtual]
 

Inserts a new item.

Parameters:
p  The new item
Index  The location to insert or -1 for the end of the list

Reimplemented from List< char >.

void GCombo::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.

void GCombo::Sub int  Type  ) 
 

Makes the list of entries sort into submenus. Good for large lists.

Parameters:
Type  The type of classification to use. One of GV_INT32, GV_DOUBLE or GV_STRING.


The documentation for this class was generated from the following files:
Generated on Wed Oct 26 14:46:56 2005 for Lgi by  doxygen 1.4.1