SkyGI::TabView Class Reference

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

Public Member Functions

 TabView (Window *pParent, const Rect rFrame, unsigned int nWindowLayoutFlags)
 ~TabView ()
void Append (const String &szCaption, Image *pImage, Window *pWindow)
void Remove (Window *pWindow)
void ReLayout ()
void Paint (const Rect &rDirty)
bool Select (Window *pWindow)
virtual void Sized (const Point &pDelta)
virtual void MouseDown (const InputEvent &nInputEvent)
virtual void OnSelected (Window *pWindow, bool bSelected)
virtual void OnClicked (Window *pWindow, const InputEvent &nInputEvent)
bool GetTabPosition (Window *pWindow, Rect &rRect)
bool SetCaption (const String &szCaption, Window *pWindow)
String GetCaption (Window *pWindow)
bool SetImage (Image *pImage, Window *pWindow)
WindowGetWindowAt (int iX)
WindowGetSelected ()
bool SelectNext ()

Public Attributes

signal2< Window *, bool > Selected
signal2< Window *, const InputEvent & > Clicked

Classes

class  Private

Detailed Description

Examples:

tabview.cpp.


Constructor & Destructor Documentation

TabView::TabView ( Window pParent,
const Rect  rFrame,
unsigned int  nWindowLayoutFlags 
)

TabView::~TabView (  ) 


Member Function Documentation

void TabView::Append ( const String szCaption,
Image pImage,
Window pWindow 
)

void TabView::Remove ( Window pWindow  ) 

void TabView::ReLayout (  ) 

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

bool TabView::Select ( Window pWindow  ) 

Select a tab

Description:
Selectes the tab associated with pWindow
Note:
Will call OnSelected for the current active and for this just selected tab.
The new tab window will be shown, resized to the client rectangle and gets the focus, the old tab window will be hidden

void TabView::Sized ( const Point pDelta  )  [virtual]

Called when window is resized

Description:
Overload this function to get notified when the window is resized
Note:
Call this function from the overloaded function to perform automatic window layout on child windows
Parameters:
pDelta - Size the window was resized
See also:
MoveTo, MoveBy, SetRect, Moved, Layout

Reimplemented from SkyGI::Window.

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

void TabView::OnSelected ( Window pWindow,
bool  bSelected 
) [virtual]

void TabView::OnClicked ( Window pWindow,
const InputEvent nInputEvent 
) [virtual]

bool TabView::GetTabPosition ( Window pWindow,
Rect rRect 
)

bool TabView::SetCaption ( const String szCaption,
Window pWindow 
)

Set the caption of a tab

Description:
Sets the caption of the tab associated with pWindow
Note:
Call ReLayout to actually apply the changes

String TabView::GetCaption ( Window pWindow  ) 

bool TabView::SetImage ( Image pImage,
Window pWindow 
)

Set the image of a tab

Description:
Sets the image of the tab associated with pWindow
Note:
Call ReLayout to actually apply the changes

Window * TabView::GetWindowAt ( int  iX  ) 

Window * TabView::GetSelected (  ) 

bool TabView::SelectNext (  ) 


Member Data Documentation

signal2<Window*, bool> SkyGI::TabView::Selected

signal2<Window*, const InputEvent&> SkyGI::TabView::Clicked


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