wxToolBoxTab Class Reference

Contains information about toolbox tab, including array of toolbox items. More...

#include <wxToolBox.h>

Inheritance diagram for wxToolBoxTab:

wxToolBoxItem wxToolObject List of all members.

Public Member Functions

int AddItem (wxToolBoxItem item)
 Inserts new item to current toolbox tab.
void CancelHotItemHover ()
 Resets MouseHover flag of current hover item and resets HotItemIndex.
bool CanMoveItemDown (wxToolBoxItem *item)
 Returns true if specified item can be moved downward.
bool CanMoveItemUp (wxToolBoxItem *item)
 Returns true if specified item can be moved upward.
bool CanScroll (wxScrollDirection scrollDir)
 Returns true is scrolling to specified direction is possible.
void CheckMouseMoveForItems (wxMouseEvent &event)
 Searches for hover item, sets MouseHover flag of this item and sets HotItemIndex.
bool Contains (wxToolBoxItem *item)
 Returns true if tab contains specified item.
bool DeleteItem (wxToolBoxItem *item)
 Deletes specified item.
bool DeleteItem (int index)
 Deletes item with specified index.
wxWindow * DetachChildWindow ()
 Detaches child window from tab.
bool EnsureItemVisible (int index)
 Makes item with specified index visible.
wxWindow * GetChildWindow ()
 Returns the child windows associated with toolbox tab.
wxRect GetItemArea ()
 Returns an area for displaying items.
size_t GetItemCount ()
 Returns the amount of items in current tab.
int GetSelItemIndex ()
 Returns index of selected item.
unsigned int GetStyle ()
 Returns tab style.
wxToolBoxItemArray & GetToolItems ()
 Returns array of toolbox items.
void HideChildWindow ()
 Hides child window associated with toolbox tab. You should never call this method manually.
int HitTestItem (wxPoint pt)
 Returns index of item that contains specified point.
int IndexOfItem (wxToolBoxItem *item)
 Returns index of specified item. If current tab doesn't contain this item then returns -1;.
bool ItemVisible (wxToolBoxItem *item)
 Returns true if specified item is visible. Otherwise returns false.
bool ItemVisible (unsigned int index)
 Returns true if item with specified index is visible. Otherwise returns false.
bool MoveItemDown (wxToolBoxItem *item)
 Moves specified item downward.
bool MoveItemUp (wxToolBoxItem *item)
 Moves specified item upward.
wxToolBoxItemoperator[] (int index)
 Returns toolbox item with specified index. If illegal index specified then returns NULL.
bool ScrollItems (wxScrollDirection scrollDir, bool bRedraw)
 Scrolls items to specified direction.
bool ScrollItems (wxScrollDirection scrollDir)
 Scrolls items to specified direction.
void SetChildWindow (wxWindow *window)
 Associates child window with toolbox tab and deletes window currently associated with this tab.
virtual void SetEnabled (bool enabled)
 Sets current tab enabled.
void SetItemArea (wxRect itemarea)
 Sets an area for displaying items (only items inside this area will be painted).
virtual void SetSelected (bool selected)
 Selects/deselects current tab.
void SetSelItemIndex (int selitemindex)
 Makes an item with specified index selected.
void SetStyle (wxToolBoxTabStyle value, bool bApply=true)
 Sets tab style (not used in current version).
void ShowChildWindow ()
 Displays child window associated with toolbox tab. You should never call this method manually.
bool SwapItems (unsigned int index1, unsigned int index2)
 Swaps the positions of two items.
void UpdateItemRects (bool bUpdateXY, bool bUpdateSize, bool bRedraw)
 Updates rectangles of all items on current tab.
void UpdateItemRects (bool bRedraw)
 Updates rectangles of all items on current tab.
 wxToolBoxTab (wxString caption=wxEmptyString, wxWindowID id=wxID_ANY, int imageindex=-1)
 Constructor.
 ~wxToolBoxTab ()
 Destructor.

Protected Member Functions

void PaintItems (wxDC &dc, const wxRect &clipRect)
 Draws all items.
void ScrollItemsO (int offset, bool bRedraw)
 Scrolls items with specified offset.
void ScrollItemsO (int offset)
 Scrolls items with specified offset.
void UpdateItemLoopIndexes (int index, bool *bUpdates)
 Updates indexes of first and last visible item.
void UpdateItemLoopIndexes ()
 Updates indexes of first and last visible item.
void UpdateNewItem (unsigned int index)
 Updates parameters of new item.

Protected Attributes

wxWindow * m_ChildWindow
 Child window.
int m_HotItemIndex
 Index of an element above which cursor of the mouse is placed.
wxRect m_ItemArea
 Used for storing size of visible area of toolbox tab.
int m_NewItemIndex
 New item will have this index.
int m_OldItemIndex
 Index of previously selected item.
int m_SelItemIndex
 Index of selected item.
wxToolBoxTabStyle m_Style
 Tab style wxTB_TAB_LIST or wxTB_TAB_THUMBNAILS.
wxToolBoxItemArray m_ToolItems
 Array of toolbox items.
int m_VisibleBottomIndex
 Index of last visible item.
int m_VisibleTopIndex
 Index of first visible item.

Detailed Description

Contains information about toolbox tab, including array of toolbox items.


Constructor & Destructor Documentation

wxToolBoxTab::wxToolBoxTab ( wxString  caption = wxEmptyString,
wxWindowID  id = wxID_ANY,
int  imageindex = -1 
)

Constructor.

Parameters:
caption - tab caption
id - ID of tab
imageindex - index of associated image in component's image list


Member Function Documentation

int wxToolBoxTab::AddItem ( wxToolBoxItem  item  ) 

Inserts new item to current toolbox tab.

Parameters:
item - item to be inserted

bool wxToolBoxTab::CanMoveItemDown ( wxToolBoxItem item  ) 

Returns true if specified item can be moved downward.

Parameters:
item - toolbox item

bool wxToolBoxTab::CanMoveItemUp ( wxToolBoxItem item  ) 

Returns true if specified item can be moved upward.

Parameters:
item - toolbox item

bool wxToolBoxTab::CanScroll ( wxScrollDirection  scrollDir  ) 

Returns true is scrolling to specified direction is possible.

Parameters:
scrollDir - scrolling direction

bool wxToolBoxTab::Contains ( wxToolBoxItem item  ) 

Returns true if tab contains specified item.

Parameters:
item - toolbox item

bool wxToolBoxTab::DeleteItem ( wxToolBoxItem item  ) 

Deletes specified item.

Parameters:
item - toolbox item

bool wxToolBoxTab::DeleteItem ( int  index  ) 

Deletes item with specified index.

Parameters:
index - item index

bool wxToolBoxTab::EnsureItemVisible ( int  index  ) 

Makes item with specified index visible.

Parameters:
index - item index

int wxToolBoxTab::HitTestItem ( wxPoint  pt  ) 

Returns index of item that contains specified point.

Parameters:
pt - point to be tested

int wxToolBoxTab::IndexOfItem ( wxToolBoxItem item  ) 

Returns index of specified item. If current tab doesn't contain this item then returns -1;.

Parameters:
item - toolbox item

bool wxToolBoxTab::ItemVisible ( wxToolBoxItem item  ) 

Returns true if specified item is visible. Otherwise returns false.

Parameters:
item - toolbox item

bool wxToolBoxTab::ItemVisible ( unsigned int  index  ) 

Returns true if item with specified index is visible. Otherwise returns false.

Parameters:
index - item index

bool wxToolBoxTab::MoveItemDown ( wxToolBoxItem item  ) 

Moves specified item downward.

Parameters:
item - toolbox item

bool wxToolBoxTab::MoveItemUp ( wxToolBoxItem item  ) 

Moves specified item upward.

Parameters:
item - toolbox item

wxToolBoxItem* wxToolBoxTab::operator[] ( int  index  ) 

Returns toolbox item with specified index. If illegal index specified then returns NULL.

Parameters:
index - index of toolbox item on current tab

void wxToolBoxTab::PaintItems ( wxDC &  dc,
const wxRect &  clipRect 
) [protected]

Draws all items.

Parameters:
dc - device context to draw to
clipRect - visible area

bool wxToolBoxTab::ScrollItems ( wxScrollDirection  scrollDir,
bool  bRedraw 
)

Scrolls items to specified direction.

Parameters:
scrollDir - scrolling direction
bRedraw - if set to true then toolbox component should be repainted after scrolling

bool wxToolBoxTab::ScrollItems ( wxScrollDirection  scrollDir  ) 

Scrolls items to specified direction.

Parameters:
scrollDir - scrolling direction

void wxToolBoxTab::SetChildWindow ( wxWindow *  window  ) 

Associates child window with toolbox tab and deletes window currently associated with this tab.

Parameters:
window child window which should be associated with toolbox tab

virtual void wxToolBoxTab::SetEnabled ( bool  enabled  )  [virtual]

Sets current tab enabled.

Parameters:
enabled - new value of Enabled flag

Reimplemented from wxToolBoxItem.

void wxToolBoxTab::SetItemArea ( wxRect  itemarea  )  [inline]

Sets an area for displaying items (only items inside this area will be painted).

Parameters:
itemarea - new area for displaying items

virtual void wxToolBoxTab::SetSelected ( bool  selected  )  [virtual]

Selects/deselects current tab.

Parameters:
selected - new value of selection flag

Reimplemented from wxToolBoxItem.

void wxToolBoxTab::SetSelItemIndex ( int  selitemindex  )  [inline]

Makes an item with specified index selected.

Parameters:
selitemindex - index of item to be selected

void wxToolBoxTab::SetStyle ( wxToolBoxTabStyle  value,
bool  bApply = true 
)

Sets tab style (not used in current version).

Avaliable tab styles:

void wxToolBoxTab::ShowChildWindow (  ) 

Displays child window associated with toolbox tab. You should never call this method manually.

Returns:
pointer to detached child window

bool wxToolBoxTab::SwapItems ( unsigned int  index1,
unsigned int  index2 
)

Swaps the positions of two items.

Parameters:
index1 - first item index
index2 - second item index

void wxToolBoxTab::UpdateItemLoopIndexes ( int  index,
bool *  bUpdates 
) [protected]

Updates indexes of first and last visible item.

Parameters:
index - currently selected item
bUpdates - flags

void wxToolBoxTab::UpdateItemRects ( bool  bUpdateXY,
bool  bUpdateSize,
bool  bRedraw 
)

Updates rectangles of all items on current tab.

Parameters:
bUpdateXY - if set to TRUE then positions of items should be updated
bUpdateSize - if set to TRUE then sizes of items should be updated
bRedraw - if set to TRUE then items should be repainted

void wxToolBoxTab::UpdateNewItem ( unsigned int  index  )  [protected]

Updates parameters of new item.

Parameters:
index - index of new item


Generated on Sun Apr 8 00:19:07 2007 for wxToolBox by  doxygen 1.5.2
Hosted by uCoz