wx.ToolBar Class Reference

Inheritance diagram for wx.ToolBar:

wx.Control wx.Window wx.EvtHandler wx.Object

List of all members.

Public Member Functions

override bool AcceptsFocus ()
ToolBarTool AddCheckTool (int toolid, wxString label, Bitmap bitmap, Bitmap bmpDisabled, wxString shortHelp, wxString longHelp)
ToolBarTool AddCheckTool (int toolid, string label, Bitmap bitmap, Bitmap bmpDisabled, string shortHelp, string longHelp)
ToolBarTool AddControl (Control ctrl)
ToolBarTool AddRadioTool (int toolid, wxString label, Bitmap bitmap, Bitmap bmpDisabled, wxString shortHelp, wxString longHelp)
ToolBarTool AddRadioTool (int toolid, string label, Bitmap bitmap, Bitmap bmpDisabled, string shortHelp, string longHelp)
ToolBarTool AddSeparator ()
ToolBarTool AddTool (int toolid, Bitmap bitmap, Bitmap bmpDisabled, bool toggle, int xPos, int yPos, ClientData clientData, wxString shortHelp, wxString longHelp)
ToolBarTool AddTool (int toolid, Bitmap bitmap, Bitmap bmpDisabled, bool toggle, int xPos, int yPos, ClientData clientData, string shortHelp, string longHelp)
ToolBarTool AddTool (int toolid, Bitmap bitmap, wxString shortHelpString, wxString longHelpString)
ToolBarTool AddTool (int toolid, Bitmap bitmap, string shortHelpString, string longHelpString)
ToolBarTool AddTool (Enum toolid, Bitmap bitmap, string shortHelpString)
ToolBarTool AddTool (int toolid, Bitmap bitmap, string shortHelpString)
ToolBarTool AddTool (int toolid, Bitmap bitmap, Bitmap bmpDisabled, bool toggle, ClientData clientData, wxString shortHelpString, wxString longHelpString)
ToolBarTool AddTool (int toolid, Bitmap bitmap, Bitmap bmpDisabled, bool toggle, ClientData clientData, string shortHelpString, string longHelpString)
ToolBarTool AddTool (int toolid, wxString label, Bitmap bitmap, wxString shortHelp, ItemKind kind)
ToolBarTool AddTool (int toolid, string label, Bitmap bitmap, string shortHelp, ItemKind kind)
ToolBarTool AddTool (int toolid, wxString label, Bitmap bitmap, Bitmap bmpDisabled, ItemKind kind, wxString shortHelp, wxString longHelp, ClientData clientData)
ToolBarTool AddTool (int toolid, string label, Bitmap bitmap, Bitmap bmpDisabled, ItemKind kind, string shortHelp, string longHelp, ClientData clientData)
ToolBarTool AddTool (Enum toolid, Bitmap bitmap)
ToolBarTool AddTool (int toolid, string label, Bitmap bitmap)
void ClearTools ()
bool DeleteTool (int toolid)
bool DeleteToolByPos (int pos)
void EnableTool (int toolid, bool enable)
ToolBarTool FindControl (int toolid)
ToolBarTool FindToolForPosition (int x, int y)
ClientData GetToolClientData (int toolid)
bool GetToolEnable (int toolid)
string GetToolLongHelp (int toolid)
string GetToolShortHelp (int toolid)
bool GetToolState (int toolid)
ToolBarTool InsertControl (int pos, Control ctrl)
ToolBarTool InsertSeparator (int pos)
ToolBarTool InsertTool (int pos, int toolid, Bitmap bitmap, Bitmap bmpDisabled, bool toggle, ClientData clientData, wxString shortHelp, wxString longHelp)
ToolBarTool InsertTool (int pos, int toolid, Bitmap bitmap, Bitmap bmpDisabled, bool toggle, ClientData clientData, string shortHelp, string longHelp)
bool Realize ()
ToolBarTool RemoveTool (int toolid)
void SetMargins (int x, int y)
void SetMaxRowsCols (int rows, int cols)
void SetToolClientData (int toolid, ClientData clientData)
void SetToolLongHelp (int toolid, string helpString)
void SetToolShortHelp (int toolid, string helpString)
void ToggleTool (int toolid, bool toggle)
 ToolBar (Window parent, Point pos, Size size, wx.WindowStyles style)
 ToolBar (Window parent, Point pos, Size size)
 ToolBar (Window parent, Point pos)
 ToolBar (Window parent)
 ToolBar (Window parent, int id, Point pos, Size size, wx.WindowStyles style)
 ToolBar (Window parent, int id, Point pos, Size size)
 ToolBar (Window parent, int id, Point pos)
 ToolBar (Window parent, int id)
 ToolBar (IntPtr wxObject)

Properties

bool IsVertical [get]
Size Margins [get, set]
int MaxCols [get]
int MaxRows [get]
int Rows [set]
int Separation [get, set]
Size ToolBitmapSize [get, set]
int ToolPacking [get, set]
Size ToolSize [get]


Detailed Description

You may also create a toolbar that is managed by the frame, by calling wx.Frame.CreateToolBar(). Under Pocket PC, you should always use this function for creating the toolbar to be managed by the frame, so that wxWidgets can use a combined menubar and toolbar. Where you manage your own toolbars, create a wxToolBar as usual.

The meaning of a "separator" is a vertical line under Windows and simple space under GTK+.

The toolbar family of classes allows an application to use toolbars in a variety of configurations and styles.

The toolbar is a popular user interface component and contains a set of bitmap buttons or toggles. A toolbar gives faster access to an application's facilities than menus, which have to be popped up and selected rather laboriously.

For each platform, the symbol wxToolBar is defined to be one of the specific toolbar classes.

A toolbar might appear as a single row of images under the menubar, or it might be in a separate frame layout in several rows and columns. The class handles the layout of the images, unless explicit positioning is requested.

A tool is a bitmap which can either be a button (there is no 'state', it just generates an event when clicked) or it can be a toggle. If a toggle, a second bitmap can be provided to depict the 'on' state; if the second bitmap is omitted, either the inverse of the first bitmap will be used (for monochrome displays) or a thick border is drawn around the bitmap (for colour displays where inverting will not have the desired result).

The Windows-specific toolbar classes expect 16-colour bitmaps that are 16 pixels wide and 15 pixels high. If you want to use a different size, call SetToolBitmapSize as the demo shows, before adding tools to the button bar. Don't supply more than one bitmap for each tool, because the toolbar generates all three images (normal, depressed and checked) from the single bitmap you give it.


Constructor & Destructor Documentation

wx.ToolBar.ToolBar ( IntPtr  wxObject  ) 

wx.ToolBar.ToolBar ( Window  parent,
int  id 
)

wx.ToolBar.ToolBar ( Window  parent,
int  id,
Point  pos 
)

wx.ToolBar.ToolBar ( Window  parent,
int  id,
Point  pos,
Size  size 
)

wx.ToolBar.ToolBar ( Window  parent,
int  id,
Point  pos,
Size  size,
wx.WindowStyles  style 
)

wx.ToolBar.ToolBar ( Window  parent  ) 

wx.ToolBar.ToolBar ( Window  parent,
Point  pos 
)

wx.ToolBar.ToolBar ( Window  parent,
Point  pos,
Size  size 
)

wx.ToolBar.ToolBar ( Window  parent,
Point  pos,
Size  size,
wx.WindowStyles  style 
)


Member Function Documentation

override bool wx.ToolBar.AcceptsFocus (  )  [virtual]

can this window have focus?

Reimplemented from wx.Window.

ToolBarTool wx.ToolBar.AddCheckTool ( int  toolid,
wxString  label,
Bitmap  bitmap,
Bitmap  bmpDisabled,
wxString  shortHelp,
wxString  longHelp 
)

ToolBarTool wx.ToolBar.AddCheckTool ( int  toolid,
string  label,
Bitmap  bitmap,
Bitmap  bmpDisabled,
string  shortHelp,
string  longHelp 
)

ToolBarTool wx.ToolBar.AddControl ( Control  ctrl  ) 

ToolBarTool wx.ToolBar.AddRadioTool ( int  toolid,
wxString  label,
Bitmap  bitmap,
Bitmap  bmpDisabled,
wxString  shortHelp,
wxString  longHelp 
)

ToolBarTool wx.ToolBar.AddRadioTool ( int  toolid,
string  label,
Bitmap  bitmap,
Bitmap  bmpDisabled,
string  shortHelp,
string  longHelp 
)

ToolBarTool wx.ToolBar.AddSeparator (  ) 

ToolBarTool wx.ToolBar.AddTool ( int  toolid,
Bitmap  bitmap,
Bitmap  bmpDisabled,
bool  toggle,
int  xPos,
int  yPos,
ClientData  clientData,
wxString  shortHelp,
wxString  longHelp 
)

ToolBarTool wx.ToolBar.AddTool ( int  toolid,
Bitmap  bitmap,
Bitmap  bmpDisabled,
bool  toggle,
int  xPos,
int  yPos,
ClientData  clientData,
string  shortHelp,
string  longHelp 
)

ToolBarTool wx.ToolBar.AddTool ( int  toolid,
Bitmap  bitmap,
wxString  shortHelpString,
wxString  longHelpString 
)

ToolBarTool wx.ToolBar.AddTool ( int  toolid,
Bitmap  bitmap,
string  shortHelpString,
string  longHelpString 
)

ToolBarTool wx.ToolBar.AddTool ( Enum  toolid,
Bitmap  bitmap,
string  shortHelpString 
)

Adds a tool to the toolbar. After you have added tools to a toolbar, you must call wx.ToolBar.Realize in order to have the tools appear.

Parameters:
toolid An enumeration value, that defines tool id and label of the new tool. The conversion to integer is a kay by which the tool may be identified in subsequent operations. The translation will be used as label.
bitmap The primary tool bitmap
shortHelpString A short help string.
Returns:
The added tool

ToolBarTool wx.ToolBar.AddTool ( int  toolid,
Bitmap  bitmap,
string  shortHelpString 
)

ToolBarTool wx.ToolBar.AddTool ( int  toolid,
Bitmap  bitmap,
Bitmap  bmpDisabled,
bool  toggle,
ClientData  clientData,
wxString  shortHelpString,
wxString  longHelpString 
)

ToolBarTool wx.ToolBar.AddTool ( int  toolid,
Bitmap  bitmap,
Bitmap  bmpDisabled,
bool  toggle,
ClientData  clientData,
string  shortHelpString,
string  longHelpString 
)

Adds a tool to the toolbar. After you have added tools to a toolbar, you must call wx.ToolBar.Realize in order to have the tools appear.

Parameters:
toolid An integer by which the tool may be identified in subsequent operations.
label String label of the tool.
bitmap The primary tool bitmap
Returns:

ToolBarTool wx.ToolBar.AddTool ( int  toolid,
wxString  label,
Bitmap  bitmap,
wxString  shortHelp,
ItemKind  kind 
)

Adds a tool to the toolbar. After you have added tools to a toolbar, you must call wx.ToolBar.Realize in order to have the tools appear.

Parameters:
toolid An integer by which the tool may be identified in subsequent operations.
label String label of the tool.
bitmap The primary tool bitmap
Returns:

ToolBarTool wx.ToolBar.AddTool ( int  toolid,
string  label,
Bitmap  bitmap,
string  shortHelp,
ItemKind  kind 
)

Adds a tool to the toolbar. After you have added tools to a toolbar, you must call wx.ToolBar.Realize in order to have the tools appear.

Parameters:
toolid An integer by which the tool may be identified in subsequent operations.
label String label of the tool.
bitmap The primary tool bitmap
Returns:
The added tool

ToolBarTool wx.ToolBar.AddTool ( int  toolid,
wxString  label,
Bitmap  bitmap,
Bitmap  bmpDisabled,
ItemKind  kind,
wxString  shortHelp,
wxString  longHelp,
ClientData  clientData 
)

Adds a tool to the toolbar. After you have added tools to a toolbar, you must call wx.ToolBar.Realize in order to have the tools appear.

Parameters:
toolid An integer by which the tool may be identified in subsequent operations.
label String label of the tool.
bitmap The primary tool bitmap
bmpDisabled The bitmap used when the tool is disabled. If it is equal to wx.NullBitmap, the disabled bitmap is automatically generated by greing the normal one.
Returns:
The added tool

ToolBarTool wx.ToolBar.AddTool ( int  toolid,
string  label,
Bitmap  bitmap,
Bitmap  bmpDisabled,
ItemKind  kind,
string  shortHelp,
string  longHelp,
ClientData  clientData 
)

Adds a tool to the toolbar. After you have added tools to a toolbar, you must call wx.ToolBar.Realize in order to have the tools appear.

Parameters:
toolid An integer by which the tool may be identified in subsequent operations.
label String label of the tool.
bitmap The primary tool bitmap
bmpDisabled The bitmap used when the tool is disabled. If it is equal to wx.NullBitmap, the disabled bitmap is automatically generated by greing the normal one.
Returns:
The added tool

ToolBarTool wx.ToolBar.AddTool ( Enum  toolid,
Bitmap  bitmap 
)

Adds a tool to the toolbar. After you have added tools to a toolbar, you must call wx.ToolBar.Realize in order to have the tools appear.

Parameters:
toolid An enumeration value, that defines tool id and label of the new tool. The conversion to integer is a kay by which the tool may be identified in subsequent operations. The translation will be used as label.
bitmap The primary tool bitmap
Returns:
The added tool

ToolBarTool wx.ToolBar.AddTool ( int  toolid,
string  label,
Bitmap  bitmap 
)

Adds a tool to the toolbar. After you have added tools to a toolbar, you must call wx.ToolBar.Realize in order to have the tools appear.

Parameters:
toolid An integer by which the tool may be identified in subsequent operations.
label String label of the tool.
bitmap The primary tool bitmap
Returns:
The added tool

void wx.ToolBar.ClearTools (  ) 

bool wx.ToolBar.DeleteTool ( int  toolid  ) 

bool wx.ToolBar.DeleteToolByPos ( int  pos  ) 

void wx.ToolBar.EnableTool ( int  toolid,
bool  enable 
)

ToolBarTool wx.ToolBar.FindControl ( int  toolid  ) 

ToolBarTool wx.ToolBar.FindToolForPosition ( int  x,
int  y 
)

ClientData wx.ToolBar.GetToolClientData ( int  toolid  ) 

bool wx.ToolBar.GetToolEnable ( int  toolid  ) 

string wx.ToolBar.GetToolLongHelp ( int  toolid  ) 

string wx.ToolBar.GetToolShortHelp ( int  toolid  ) 

bool wx.ToolBar.GetToolState ( int  toolid  ) 

ToolBarTool wx.ToolBar.InsertControl ( int  pos,
Control  ctrl 
)

ToolBarTool wx.ToolBar.InsertSeparator ( int  pos  ) 

ToolBarTool wx.ToolBar.InsertTool ( int  pos,
int  toolid,
Bitmap  bitmap,
Bitmap  bmpDisabled,
bool  toggle,
ClientData  clientData,
wxString  shortHelp,
wxString  longHelp 
)

ToolBarTool wx.ToolBar.InsertTool ( int  pos,
int  toolid,
Bitmap  bitmap,
Bitmap  bmpDisabled,
bool  toggle,
ClientData  clientData,
string  shortHelp,
string  longHelp 
)

bool wx.ToolBar.Realize (  ) 

This function should be called after you have added tools.

ToolBarTool wx.ToolBar.RemoveTool ( int  toolid  ) 

void wx.ToolBar.SetMargins ( int  x,
int  y 
)

void wx.ToolBar.SetMaxRowsCols ( int  rows,
int  cols 
)

void wx.ToolBar.SetToolClientData ( int  toolid,
ClientData  clientData 
)

void wx.ToolBar.SetToolLongHelp ( int  toolid,
string  helpString 
)

void wx.ToolBar.SetToolShortHelp ( int  toolid,
string  helpString 
)

void wx.ToolBar.ToggleTool ( int  toolid,
bool  toggle 
)


Property Documentation

bool wx.ToolBar.IsVertical [get]

Size wx.ToolBar.Margins [get, set]

int wx.ToolBar.MaxCols [get]

int wx.ToolBar.MaxRows [get]

int wx.ToolBar.Rows [set]

int wx.ToolBar.Separation [get, set]

Size wx.ToolBar.ToolBitmapSize [get, set]

int wx.ToolBar.ToolPacking [get, set]

Size wx.ToolBar.ToolSize [get]


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads