%pragma(python) code = "import wx"
-%{
- static wxString wxPyEmptyStr("");
-%}
-
//---------------------------------------------------------------------------
class wxStatusBar : public wxWindow {
bool IsEnabled();
bool IsToggled();
bool CanBeToggled();
- const wxBitmap& GetBitmap1();
- const wxBitmap& GetBitmap2();
- const wxBitmap& GetBitmap();
+ const wxBitmap& GetNormalBitmap();
+ const wxBitmap& GetDisabledBitmap();
+ wxBitmap GetBitmap();
+ wxString GetLabel();
wxString GetShortHelp();
wxString GetLongHelp();
bool Enable(bool enable);
- bool Toggle(bool toggle);
+ void Toggle();
bool SetToggle(bool toggle);
bool SetShortHelp(const wxString& help);
bool SetLongHelp(const wxString& help);
- void SetBitmap1(const wxBitmap& bmp);
- void SetBitmap2(const wxBitmap& bmp);
+ void SetNormalBitmap(const wxBitmap& bmp);
+ void SetDisabledBitmap(const wxBitmap& bmp);
+ void SetLabel(const wxString& label);
void Detach();
void Attach(wxToolBarBase *tbar);
self->SetClientData(new wxPyUserData(clientData));
}
}
+
+ %pragma(python) addtoclass="
+ GetBitmap1 = GetNormalBitmap
+ GetBitmap2 = GetDisabledBitmap
+ SetBitmap1 = SetNormalBitmap
+ SetBitmap2 = SetDisabledBitmap
+ "
};
const wxBitmap& pushedBitmap = wxNullBitmap,
int isToggle = FALSE,
PyObject *clientData = NULL,
- const wxString& shortHelpString = wxPyEmptyStr,
- const wxString& longHelpString = wxPyEmptyStr) {
+ const wxString& shortHelpString = wxEmptyString,
+ const wxString& longHelpString = wxEmptyString) {
wxPyUserData* udata = NULL;
if (clientData)
udata = new wxPyUserData(clientData);
// This one is easier to use...
wxToolBarToolBase *AddSimpleTool(int id,
const wxBitmap& bitmap,
- const wxString& shortHelpString = wxPyEmptyStr,
- const wxString& longHelpString = wxPyEmptyStr,
+ const wxString& shortHelpString = wxEmptyString,
+ const wxString& longHelpString = wxEmptyString,
int isToggle = FALSE) {
return self->AddTool(id, bitmap, wxNullBitmap, isToggle, NULL,
shortHelpString, longHelpString);
const wxBitmap& pushedBitmap = wxNullBitmap,
int isToggle = FALSE,
PyObject *clientData = NULL,
- const wxString& shortHelpString = wxPyEmptyStr,
- const wxString& longHelpString = wxPyEmptyStr) {
+ const wxString& shortHelpString = wxEmptyString,
+ const wxString& longHelpString = wxEmptyString) {
wxPyUserData* udata = NULL;
if (clientData)
udata = new wxPyUserData(clientData);
wxToolBarToolBase *InsertSimpleTool(size_t pos,
int id,
const wxBitmap& bitmap,
- const wxString& shortHelpString = wxPyEmptyStr,
- const wxString& longHelpString = wxPyEmptyStr,
+ const wxString& shortHelpString = wxEmptyString,
+ const wxString& longHelpString = wxEmptyString,
int isToggle = FALSE) {
return self->InsertTool(pos, id, bitmap, wxNullBitmap, isToggle, NULL,
shortHelpString, longHelpString);
%addmethods {
// convert the ClientData back to a PyObject
- PyObject* GetToolClientData(int index) {
- wxPyUserData* udata = (wxPyUserData*)self->GetToolClientData(index);
+ PyObject* GetToolClientData(int id) {
+ wxPyUserData* udata = (wxPyUserData*)self->GetToolClientData(id);
if (udata) {
Py_INCREF(udata->m_obj);
return udata->m_obj;
}
}
- void SetToolClientData(int index, PyObject* clientData) {
- self->SetToolClientData(index, new wxPyUserData(clientData));
+ void SetToolClientData(int id, PyObject* clientData) {
+ self->SetToolClientData(id, new wxPyUserData(clientData));
}
}
wxSize GetToolBitmapSize();
wxSize GetToolSize();
+ // returns a (non separator) tool containing the point (x, y) or NULL if
+ // there is no tool at this point (corrdinates are client)
+ wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y);
+
+ // return TRUE if this is a vertical toolbar, otherwise FALSE
+ bool IsVertical();
};