GTabView Class Reference

A tab control that displays multiple pages of information in a small area. More...

#include <GTabView.h>

Inheritance diagram for GTabView:

GLayout GView

List of all members.

Public Member Functions

 GTabView (int id=-1, int x=0, int y=0, int cx=1000, int cy=1000, char *name=0, int Init=0)
 Creates the tab view object.
char * GetClass ()
int64 Value ()
 Gets the selected tab.
void Value (int64 i)
 Sets the selected tab.
bool Append (GTabPage *Page, int Where=-1)
 Append an existing tab.
GTabPage * Append (char *name, int Where=-1)
 Append a new tab with the title 'name'.
bool Delete (GTabPage *Page)
 Delete a tab.
GTabPage * TabAt (int i)
 .Returns the tab at position 'i'
GTabPage * GetCurrent ()
 Gets a pointer to the current tab.
int GetTabs ()
 Gets the number of tabs.
bool Attach (GViewI *parent)
 Attaches the view to a parent view.
int OnEvent (GMessage *Msg)
 Handles the incoming events.
GViewI * FindControl (int Id)
 Returns the view by it's ID.
int OnNotify (GViewI *Ctrl, int Flags)
 Called when a child view or view with it's SetNotify() set to this window changes.
void OnChildrenChanged (GViewI *Wnd, bool Attaching)
 Called when the contents of the Children list have changed.
void OnPosChange ()
 Called when the view position changes.
void OnPaint (GSurface *pDC)
 Called to paint the onscreen representation of the view.
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 OnCreate ()
 The view is attached.

Detailed Description

A tab control that displays multiple pages of information in a small area.

Member Function Documentation

bool GTabView::Attach ( GViewI *  p  )  [virtual]

Attaches the view to a parent view.

Each GView starts in an un-attached state. When you attach it to a Parent GView the view gains a OS-specific handle and becomes visible on the screen (if the Visible() property is TRUE). However if a view is inserted into the Children list of a GView and it's parent pointer is set correctly it will still paint on the screen without the OS knowing about it. This is known in Lgi as a "virtual window" and is primarily used to cut down on windowing resources. Mouse clicks are handled by the parent window and passed down to the virtual children. Virtual children are somewhat limited. They can't receive focus, or participate in drag and drop operations. If you want to see an example have a look at the GToolBar code.

Reimplemented from GLayout.

References OnPosChange().

char* GTabView::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().

the Class' name for debugging

Reimplemented from GLayout.

int GTabView::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 GLayout.

References GView::GetParent().

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

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