#include <GList.h>
Inheritance diagram for GList:
Public Member Functions | |
GList (int id, int x, int y, int cx, int cy, char *name="List") | |
Constructor. | |
virtual void | OnItemClick (GListItem *Item, GMouse &m) |
Called when an item is clicked. | |
virtual void | OnItemBeginDrag (GListItem *Item, GMouse &m) |
Called when the user selects an item and starts to drag it. | |
virtual void | OnItemSelect (GListItem *Item) |
virtual void | OnColumnClick (int Col, GMouse &m) |
Called when a column is clicked. | |
virtual void | OnColumnDrag (int Col, GMouse &m) |
Called when a column is dragged somewhere. | |
virtual bool | OnColumnReindex (GListColumn *Col, int OldIndex, int NewIndex) |
Called when the column is dropped to a new location. | |
void | OnPaint (GSurface *pDC) |
Called to paint the onscreen representation of the view. | |
int | OnEvent (GMessage *Msg) |
Handles the incoming events. | |
int | OnHitTest (int x, int y) |
Return the type of cursor that should be visible when the mouse is at x,y. | |
void | OnMouseClick (GMouse &m) |
The mouse was clicked over this view. | |
void | OnMouseMove (GMouse &m) |
The mouse moves over the control. | |
int | OnNotify (GView *Ctrl, int Flags) |
Called when a child view or view with it's SetNotify() set to this window changes. | |
void | OnPosChange () |
Called when the view position changes. | |
bool | OnKey (GKey &k) |
A key was pressed while this view has focus. | |
void | OnMouseWheel (double Lines) |
The mouse wheel was scrolled. | |
void | OnFocus (bool b) |
The view gains or loses the keyboard focus. | |
void | OnPulse () |
Called every so often by the timer system. | |
GListColumn * | AddColumn (char *Name, int Width=50, int Where=-1) |
Adds a column to the list. | |
bool | AddColumn (GListColumn *Col, int Where=-1) |
Adds a preexisting column to the control. | |
bool | DeleteColumn (GListColumn *Col) |
Deletes a column from the GList. | |
void | EmptyColumns () |
Deletes all the columns of the GList. | |
GListColumn * | ColumnAt (int Index) |
Returns the column at index 'Index'. | |
int | ColumnAtX (int X, GListColumn **Col=0, int *Offset=0) |
Returns the column at horizontal offset 'x'. | |
int | GetColumns () |
Returns the number of columns. | |
void | DragColumn (int Index) |
Starts a column d'n'd operation with the column at index 'Index'. | |
bool | GetColumnClickInfo (int &Col, GMouse &m) |
Returns the last column click info. | |
bool | ShowColumnHeader () |
Returns whether display of column headers is switched on. | |
void | ShowColumnHeader (bool Show) |
Turns on display of column headers. | |
bool | AllowEditLabels () |
Returns whether the user can edit labels. | |
void | AllowEditLabels (bool b) |
Sets whether the user can edit labels. | |
bool | DrawGridLines () |
Returns whether grid lines are drawn. | |
void | DrawGridLines (bool b) |
Sets whether grid lines are drawn. | |
bool | MultiSelect () |
Returns whether the user can select multiple items at the same time. | |
void | MultiSelect (bool b) |
Sets whether the user can select multiple items at the same time. | |
GListMode | GetMode () |
void | SetMode (GListMode m) |
int | Value () |
Returns the index of the first selected item. | |
void | Value (int i) |
Selects the item at index 'i'. | |
bool | Select (GListItem *Obj) |
Selects 'obj'. | |
GListItem * | GetSelection () |
Gets the first selected object. | |
bool | GetSelection (List< GListItem > &l) |
Gets all the selected objects. | |
void | SelectAll () |
Select all the item in the list. | |
bool | GetAll (List< GListItem > &l) |
Fills the list 'l' pointers to all the items in the list, however the GList retains ownership of the objects. | |
void | ScrollToSelection () |
Scrolls the view to the first selected item if not in view. | |
void | UpdateAllItems () |
Clears the text cache for all the items and repaints the screen. | |
GListItem * | First () |
Returns the first item in the list. | |
GListItem * | Last () |
Returns the list item in the list. | |
GListItem * | Next () |
Returns the next item in the list. | |
GListItem * | Prev () |
Returns the previous item in the list. | |
GListItem * | Current () |
Returns the current item in the list. This is not the selected item(s). | |
int | GetItems () |
Gets the number of items. | |
bool | IsEmpty () |
Returns true if the list is empty. | |
bool | Delete () |
Deletes the current item. | |
bool | Delete (int Index) |
Deletes the item at index 'Index'. | |
bool | Delete (GListItem *p) |
Deletes the item 'p'. | |
bool | Insert (GListItem *p, int Index=-1, bool Update=true) |
Inserts the item 'p' at index 'Index'. | |
bool | Insert (List< GListItem > &l, int Index=-1, bool Update=true) |
Insert a list of item. | |
bool | Remove (GListItem *Obj) |
Remove the item 'Obj' but don't delete it. | |
bool | HasItem (GListItem *Obj) |
Return true if the item 'Obj' is in the list. | |
int | IndexOf (GListItem *Obj) |
Return the index of the item 'Obj' or -1 if not present. | |
GListItem * | ItemAt (int Index) |
Returns the item at index 'Index'. | |
void | Sort (GListCompareFunc Compare, int Data) |
Sort the list. | |
void | Empty () |
Removes all items from list and delete the objects. | |
void | RemoveAll () |
Removes all references to externally owned items. Doesn't delete objects. | |
void | ResizeColumnsToContent (int Border=DEFAULT_COLUMN_SPACING) |
Resizes all the columns to their content, allowing a little extra space for visual effect. | |
Friends | |
class | GListItem |
class | GListColumn |
|
Constructor.
|
|
Adds a preexisting column to the control.
|
|
Adds a column to the list.
|
|
Get the display mode.
|
|
Insert a list of item.
|
|
Inserts the item 'p' at index 'Index'.
|
|
Called when a column is clicked.
|
|
Called when a column is dragged somewhere.
|
|
Called when the column is dropped to a new location.
|
|
Called when the user selects an item and starts to drag it.
|
|
Called when an item is clicked.
|
|
Called when the user selects an item. If multiple items are selected in one hit this is only called for the first item. Use GetSelection to get the extent of the selected items.
|
|
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 GLayout. |
|
Called every so often by the timer system.
Reimplemented from GView. |
|
Set the display mode.
|
|
Sort the list.
|