more updates for recent toolbar changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -106,18 +106,20 @@ public:
|
|||||||
bool IsEnabled();
|
bool IsEnabled();
|
||||||
bool IsToggled();
|
bool IsToggled();
|
||||||
bool CanBeToggled();
|
bool CanBeToggled();
|
||||||
wxBitmap GetBitmap1();
|
const wxBitmap& GetNormalBitmap();
|
||||||
wxBitmap GetBitmap2();
|
const wxBitmap& GetDisabledBitmap();
|
||||||
wxBitmap GetBitmap();
|
wxBitmap GetBitmap();
|
||||||
|
wxString GetLabel();
|
||||||
wxString GetShortHelp();
|
wxString GetShortHelp();
|
||||||
wxString GetLongHelp();
|
wxString GetLongHelp();
|
||||||
bool Enable(bool enable);
|
bool Enable(bool enable);
|
||||||
bool Toggle(bool toggle);
|
void Toggle();
|
||||||
bool SetToggle(bool toggle);
|
bool SetToggle(bool toggle);
|
||||||
bool SetShortHelp(const wxString& help);
|
bool SetShortHelp(const wxString& help);
|
||||||
bool SetLongHelp(const wxString& help);
|
bool SetLongHelp(const wxString& help);
|
||||||
void SetBitmap1(const wxBitmap& bmp);
|
void SetNormalBitmap(const wxBitmap& bmp);
|
||||||
void SetBitmap2(const wxBitmap& bmp);
|
void SetDisabledBitmap(const wxBitmap& bmp);
|
||||||
|
void SetLabel(const wxString& label);
|
||||||
void Detach();
|
void Detach();
|
||||||
void Attach(wxToolBarBase *tbar);
|
void Attach(wxToolBarBase *tbar);
|
||||||
|
|
||||||
@@ -139,6 +141,13 @@ public:
|
|||||||
self->SetClientData(new wxPyUserData(clientData));
|
self->SetClientData(new wxPyUserData(clientData));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%pragma(python) addtoclass="
|
||||||
|
GetBitmap1 = GetNormalBitmap
|
||||||
|
GetBitmap2 = GetDisabledBitmap
|
||||||
|
SetBitmap1 = SetNormalBitmap
|
||||||
|
SetBitmap2 = SetDisabledBitmap
|
||||||
|
"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -224,8 +233,8 @@ public:
|
|||||||
|
|
||||||
%addmethods {
|
%addmethods {
|
||||||
// convert the ClientData back to a PyObject
|
// convert the ClientData back to a PyObject
|
||||||
PyObject* GetToolClientData(int index) {
|
PyObject* GetToolClientData(int id) {
|
||||||
wxPyUserData* udata = (wxPyUserData*)self->GetToolClientData(index);
|
wxPyUserData* udata = (wxPyUserData*)self->GetToolClientData(id);
|
||||||
if (udata) {
|
if (udata) {
|
||||||
Py_INCREF(udata->m_obj);
|
Py_INCREF(udata->m_obj);
|
||||||
return udata->m_obj;
|
return udata->m_obj;
|
||||||
@@ -235,8 +244,8 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetToolClientData(int index, PyObject* clientData) {
|
void SetToolClientData(int id, PyObject* clientData) {
|
||||||
self->SetToolClientData(index, new wxPyUserData(clientData));
|
self->SetToolClientData(id, new wxPyUserData(clientData));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,6 +275,12 @@ public:
|
|||||||
wxSize GetToolBitmapSize();
|
wxSize GetToolBitmapSize();
|
||||||
wxSize GetToolSize();
|
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();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user