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 //---------------------------------------------------------------------------
73 void SetSize( long w, long h ) { m_width = w; m_height = h; }
74 long GetWidth () const { return m_width; }
75 long GetHeight () const { return m_height; }
79 wxObject * m_clientData;
87 bool m_deleteSecondBitmap;
92 wxString m_shortHelpString;
93 wxString m_longHelpString;
98 class wxToolBarBase : public wxControl {
102 void AddSeparator(void);
104 // Ignoge the clientData for now...
106 wxToolBarTool* AddTool(int toolIndex,
107 const wxBitmap& bitmap1,
108 const wxBitmap& bitmap2 = wxNullBitmap,
109 int isToggle = FALSE,
112 //wxObject* clientData = NULL,
113 const wxString& shortHelpString = wxPyEmptyStr,
114 const wxString& longHelpString = wxPyEmptyStr) {
115 return self->AddTool(toolIndex, bitmap1, bitmap2,
116 isToggle, xPos, yPos, NULL,
117 shortHelpString, longHelpString);
121 // void DrawTool(wxMemoryDC& memDC, wxToolBarTool* tool);
122 void EnableTool(int toolIndex, const bool enable);
123 wxToolBarTool* FindToolForPosition(const float x, const float y);
124 wxSize GetToolSize();
125 wxSize GetToolBitmapSize();
126 // wxSize GetMargins();
128 // wxObject* GetToolClientData(int toolIndex);
129 bool GetToolEnabled(int toolIndex);
130 wxString GetToolLongHelp(int toolIndex);
131 int GetToolPacking();
132 int GetToolSeparation();
133 wxString GetToolShortHelp(int toolIndex);
134 bool GetToolState(int toolIndex);
136 // TODO: figure out how to handle these
137 //bool OnLeftClick(int toolIndex, bool toggleDown);
138 //void OnMouseEnter(int toolIndex);
139 //void OnRightClick(int toolIndex, float x, float y);
142 void SetToolBitmapSize(const wxSize& size);
143 void SetMargins(const wxSize& size);
144 void SetToolLongHelp(int toolIndex, const wxString& helpString);
145 void SetToolPacking(int packing);
146 void SetToolShortHelp(int toolIndex, const wxString& helpString);
147 void SetToolSeparation(int separation);
148 void ToggleTool(int toolIndex, const bool toggle);
153 // The Native Toolbar
154 class wxToolBar : public wxToolBarBase {
156 wxToolBar(wxWindow* parent, wxWindowID id,
157 const wxPoint& pos = wxPyDefaultPosition,
158 const wxSize& size = wxPyDefaultSize,
159 long style = wxTB_HORIZONTAL | wxNO_BORDER,
160 char* name = "toolBar");
162 %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)"
168 class wxToolBarSimple : public wxToolBarBase {
170 wxToolBarSimple(wxWindow* parent, wxWindowID id,
171 const wxPoint& pos = wxPyDefaultPosition,
172 const wxSize& size = wxPyDefaultSize,
173 long style = wxTB_HORIZONTAL | wxNO_BORDER,
174 char* name = "toolBar");
176 %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)"
181 //---------------------------------------------------------------------------
183 /////////////////////////////////////////////////////////////////////////////
186 // Revision 1.1 1998/10/02 06:40:42 RD
187 // Version 0.4 of wxPython for MSW.