1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG definitions for StatusBar and ToolBar classes
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
18 #include <wx/toolbar.h>
19 #include <wx/tbarsmpl.h>
22 //----------------------------------------------------------------------
25 %include my_typemaps.i
27 // Import some definitions of other classes, etc.
33 %pragma(python) code = "import wx"
35 //---------------------------------------------------------------------------
37 class wxStatusBar : public wxWindow {
39 wxStatusBar(wxWindow* parent, wxWindowID id,
40 const wxPoint& pos = wxPyDefaultPosition,
41 const wxSize& size = wxPyDefaultSize,
42 long style = wxST_SIZEGRIP,
43 char* name = "statusBar");
45 %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
48 %new wxRect* GetFieldRect(long item) {
49 wxRect* rect= new wxRect;
50 self->GetFieldRect(item, *rect);
54 int GetFieldsCount(void);
55 wxString GetStatusText(int ir = 0);
56 void DrawField(wxDC& dc, int i);
57 void DrawFieldText(wxDC& dc, int i);
58 void InitColours(void);
60 void SetFieldsCount(int number = 1);
61 void SetStatusText(const wxString& text, int i = 0);
62 void SetStatusWidths(int LCOUNT, int* LIST);
66 //---------------------------------------------------------------------------
72 void SetSize( long w, long h ) { m_width = w; m_height = h; }
73 long GetWidth () const { return m_width; }
74 long GetHeight () const { return m_height; }
75 wxControl *GetControl();
79 wxObject * m_clientData;
87 bool m_deleteSecondBitmap;
92 wxString m_shortHelpString;
93 wxString m_longHelpString;
98 // class wxToolBarBase : public wxControl {
101 class wxToolBar : public wxControl {
103 wxToolBar(wxWindow* parent, wxWindowID id,
104 const wxPoint& pos = wxPyDefaultPosition,
105 const wxSize& size = wxPyDefaultSize,
106 long style = wxTB_HORIZONTAL | wxNO_BORDER,
107 char* name = "toolBar");
109 %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
112 bool AddControl(wxControl * control);
116 // Ignoge the clientData for now...
118 wxToolBarTool* AddTool(int toolIndex,
119 const wxBitmap& bitmap1,
120 const wxBitmap& bitmap2 = wxNullBitmap,
121 int isToggle = FALSE,
124 //wxObject* clientData = NULL,
125 const wxString& shortHelpString = wxPyEmptyStr,
126 const wxString& longHelpString = wxPyEmptyStr) {
127 return self->AddTool(toolIndex, bitmap1, bitmap2,
128 isToggle, xPos, yPos, NULL,
129 shortHelpString, longHelpString);
132 wxToolBarTool* AddSimpleTool(int toolIndex,
133 const wxBitmap& bitmap,
134 const wxString& shortHelpString = wxPyEmptyStr,
135 const wxString& longHelpString = wxPyEmptyStr) {
136 return self->AddTool(toolIndex, bitmap, wxNullBitmap,
138 shortHelpString, longHelpString);
143 void EnableTool(int toolIndex, bool enable);
144 wxToolBarTool* FindToolForPosition(long x, long y);
145 wxSize GetToolSize();
146 wxSize GetToolBitmapSize();
147 void SetToolBitmapSize(const wxSize& size);
148 wxSize GetToolMargins();
150 // wxObject* GetToolClientData(int toolIndex);
151 bool GetToolEnabled(int toolIndex);
152 wxString GetToolLongHelp(int toolIndex);
153 int GetToolPacking();
154 int GetToolSeparation();
155 wxString GetToolShortHelp(int toolIndex);
156 bool GetToolState(int toolIndex);
161 void SetToolLongHelp(int toolIndex, const wxString& helpString);
162 void SetToolShortHelp(int toolIndex, const wxString& helpString);
163 void SetMargins(const wxSize& size);
164 void SetToolPacking(int packing);
165 void SetToolSeparation(int separation);
166 void ToggleTool(int toolIndex, const bool toggle);
167 void SetToggle(int toolIndex, bool toggle);
169 void SetMaxRowsCols(int rows, int cols);
178 //---------------------------------------------------------------------------