%newgroup
+MustHaveApp(wxMenu);
+
class wxMenu : public wxEvtHandler
{
public:
%pythonAppend wxMenu "self._setOORInfo(self)"
+ %typemap(out) wxMenu*; // turn off this typemap
+
wxMenu(const wxString& title = wxPyEmptyString, long style = 0);
+ // Turn it back on again
+ %typemap(out) wxMenu* { $result = wxPyMake_wxObject($1, $owner); }
+
// append any kind of item (normal/check/radio/separator)
wxMenuItem* Append(int id,
const wxString& text,
//---------------------------------------------------------------------------
%newgroup
+MustHaveApp(wxMenuBar);
+
class wxMenuBar : public wxWindow
{
public:
%pythonAppend wxMenuBar "self._setOORInfo(self)"
+ %typemap(out) wxMenuBar*; // turn off this typemap
+
wxMenuBar(long style = 0);
+ // Turn it back on again
+ %typemap(out) wxMenuBar* { $result = wxPyMake_wxObject($1, $owner); }
// append a menu to the end of menubar, return True if ok
virtual bool Append(wxMenu *menu, const wxString& title);
virtual void EnableTop(size_t pos, bool enable);
// is the menu enabled?
- virtual bool IsEnabledTop(size_t WXUNUSED(pos)) const { return True; }
+ virtual bool IsEnabledTop(size_t WXUNUSED(pos)) const { return true; }
// get or change the label of the menu at given position
virtual void SetLabelTop(size_t pos, const wxString& label);
wxMenu *GetSubMenu() const;
// state
- virtual void Enable(bool enable = True);
+ virtual void Enable(bool enable = true);
virtual bool IsEnabled() const;
- virtual void Check(bool check = True);
+ virtual void Check(bool check = true);
virtual bool IsChecked() const;
void Toggle();
bool IsOwnerDrawn();
// switch on/off owner-drawing the item
- void SetOwnerDrawn(bool ownerDrawn = True);
+ void SetOwnerDrawn(bool ownerDrawn = true);
void ResetOwnerDrawn();
#else
// just to keep the global renamers in sync