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.
34 //---------------------------------------------------------------------------
36 class wxStatusBar : public wxWindow {
38 wxStatusBar(wxWindow* parent, wxWindowID id,
39 const wxPoint& pos = wxPyDefaultPosition,
40 const wxSize& size = wxPyDefaultSize,
41 long style = wxST_SIZEGRIP,
42 char* name = "statusBar");
44 %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)"
47 %new wxRect* GetFieldRect(long item) {
48 wxRect* rect= new wxRect;
49 self->GetFieldRect(item, *rect);
53 int GetFieldsCount(void);
54 wxString GetStatusText(int ir = 0);
55 void DrawField(wxDC& dc, int i);
56 void DrawFieldText(wxDC& dc, int i);
57 void InitColours(void);
59 // OnSysColourChanged(wxSysColourChangedEvent& event);
61 void SetFieldsCount(int number = 1);
62 void SetStatusText(const wxString& text, int i = 0);
63 void SetStatusWidths(int LCOUNT, int* LIST);
67 //---------------------------------------------------------------------------
74 void SetSize( long w, long h ) { m_width = w; m_height = h; }
75 long GetWidth () const { return m_width; }
76 long GetHeight () const { return m_height; }
81 wxObject * m_clientData;
91 bool m_deleteSecondBitmap;
96 wxString m_shortHelpString;
97 wxString m_longHelpString;
102 // class wxToolBarBase : public wxControl {
105 class wxToolBar : public wxControl {
107 wxToolBar(wxWindow* parent, wxWindowID id,
108 const wxPoint& pos = wxPyDefaultPosition,
109 const wxSize& size = wxPyDefaultSize,
110 long style = wxTB_HORIZONTAL | wxNO_BORDER,
111 char* name = "toolBar");
113 %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)"
116 void AddSeparator(void);
118 // Ignoge the clientData for now...
120 wxToolBarTool* AddTool(int toolIndex,
121 const wxBitmap& bitmap1,
122 const wxBitmap& bitmap2 = wxNullBitmap,
123 int isToggle = FALSE,
126 //wxObject* clientData = NULL,
127 const wxString& shortHelpString = wxPyEmptyStr,
128 const wxString& longHelpString = wxPyEmptyStr) {
129 return self->AddTool(toolIndex, bitmap1, bitmap2,
130 isToggle, xPos, yPos, NULL,
131 shortHelpString, longHelpString);
135 // void DrawTool(wxMemoryDC& memDC, wxToolBarTool* tool);
136 void EnableTool(int toolIndex, const bool enable);
138 wxToolBarTool* FindToolForPosition(const float x, const float y);
139 wxSize GetToolSize();
140 wxSize GetToolBitmapSize();
141 // wxSize GetMargins();
143 // wxObject* GetToolClientData(int toolIndex);
145 bool GetToolEnabled(int toolIndex);
147 wxString GetToolLongHelp(int toolIndex);
148 int GetToolPacking();
149 int GetToolSeparation();
150 wxString GetToolShortHelp(int toolIndex);
152 bool GetToolState(int toolIndex);
154 // TODO: figure out how to handle these
155 //bool OnLeftClick(int toolIndex, bool toggleDown);
156 //void OnMouseEnter(int toolIndex);
157 //void OnRightClick(int toolIndex, float x, float y);
166 void SetToolBitmapSize(const wxSize& size);
167 void SetToolLongHelp(int toolIndex, const wxString& helpString);
168 void SetToolShortHelp(int toolIndex, const wxString& helpString);
170 void SetMargins(const wxSize& size);
171 void SetToolPacking(int packing);
172 void SetToolSeparation(int separation);
173 void ToggleTool(int toolIndex, const bool toggle);
178 // // The Native Toolbar
179 // class wxToolBar : public wxToolBarBase {
181 // wxToolBar(wxWindow* parent, wxWindowID id,
182 // const wxPoint& pos = wxPyDefaultPosition,
183 // const wxSize& size = wxPyDefaultSize,
184 // long style = wxTB_HORIZONTAL | wxNO_BORDER,
185 // char* name = "toolBar");
187 // %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)"
192 // // A generic toolbar
193 // class wxToolBarSimple : public wxToolBarBase {
195 // wxToolBarSimple(wxWindow* parent, wxWindowID id,
196 // const wxPoint& pos = wxPyDefaultPosition,
197 // const wxSize& size = wxPyDefaultSize,
198 // long style = wxTB_HORIZONTAL | wxNO_BORDER,
199 // char* name = "toolBar");
201 // %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)"
206 //---------------------------------------------------------------------------
208 /////////////////////////////////////////////////////////////////////////////
211 // Revision 1.2 1998/10/07 07:34:34 RD
212 // Version 0.4.1 for wxGTK
214 // Revision 1.1 1998/10/02 06:40:42 RD
216 // Version 0.4 of wxPython for MSW.