X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8b4959678e39768dd949e6c77c41f14aa84100a..9e477492e29e03c02827b1e42a16cb09a13f5149:/wxPython/src/_menu.i diff --git a/wxPython/src/_menu.i b/wxPython/src/_menu.i index d1122ce95a..1bbb3a56e4 100644 --- a/wxPython/src/_menu.i +++ b/wxPython/src/_menu.i @@ -140,12 +140,20 @@ public: bool Delete(int id); %Rename(DeleteItem, bool, Delete(wxMenuItem *item)); - %pythonAppend Destroy "args[0].thisown = 0" + %pythonPrepend Destroy "args[0].this.own(False)" %extend { void Destroy() { delete self; } } // delete the item from menu and destroy it (if it's a submenu) - %Rename(DestroyId, bool, Destroy(int id)); - %Rename(DestroyItem, bool, Destroy(wxMenuItem *item)); + %pythonPrepend Destroy ""; + DocDeclStrName( + bool , Destroy(int id), + "", "", + DestroyId); + + DocDeclStrName( + bool , Destroy(wxMenuItem *item), + "", "", + DestroyItem); // get the items @@ -214,6 +222,17 @@ public: // set/get the parent of this menu void SetParent(wxMenu *parent); wxMenu *GetParent() const; + + %property(EventHandler, GetEventHandler, SetEventHandler, doc="See `GetEventHandler` and `SetEventHandler`"); + %property(HelpString, GetHelpString, SetHelpString, doc="See `GetHelpString` and `SetHelpString`"); + %property(InvokingWindow, GetInvokingWindow, SetInvokingWindow, doc="See `GetInvokingWindow` and `SetInvokingWindow`"); + %property(MenuBar, GetMenuBar, doc="See `GetMenuBar`"); + %property(MenuItemCount, GetMenuItemCount, doc="See `GetMenuItemCount`"); + %property(MenuItems, GetMenuItems, doc="See `GetMenuItems`"); + %property(Parent, GetParent, SetParent, doc="See `GetParent` and `SetParent`"); + %property(Style, GetStyle, doc="See `GetStyle`"); + %property(Title, GetTitle, SetTitle, doc="See `GetTitle` and `SetTitle`"); + }; //--------------------------------------------------------------------------- @@ -335,8 +354,11 @@ public: for m, l in items: self.Append(m, l) } - %property(Menus, GetMenus, SetMenus); + %property(Frame, GetFrame, doc="See `GetFrame`"); + %property(Menu, GetMenu, doc="See `GetMenu`"); + %property(MenuCount, GetMenuCount, doc="See `GetMenuCount`"); + %property(Menus, GetMenus, SetMenus, doc="See `GetMenus` and `SetMenus`"); }; //--------------------------------------------------------------------------- @@ -344,6 +366,9 @@ public: class wxMenuItem : public wxObject { public: + // turn off this typemap + %typemap(out) wxMenuItem*; + wxMenuItem(wxMenu* parentMenu=NULL, int id=wxID_ANY, const wxString& text = wxPyEmptyString, const wxString& help = wxPyEmptyString, @@ -351,6 +376,10 @@ public: wxMenu* subMenu = NULL); ~wxMenuItem(); + // Turn it back on again + %typemap(out) wxEvtHandler* { $result = wxPyMake_wxObject($1, $owner); } + + // the menu we're in wxMenu *GetMenu() const; void SetMenu(wxMenu* menu); @@ -452,6 +481,22 @@ public: void ResetOwnerDrawn() {} } #endif + + %property(Accel, GetAccel, SetAccel, doc="See `GetAccel` and `SetAccel`"); + %property(BackgroundColour, GetBackgroundColour, SetBackgroundColour, doc="See `GetBackgroundColour` and `SetBackgroundColour`"); + %property(Bitmap, GetBitmap, SetBitmap, doc="See `GetBitmap` and `SetBitmap`"); + %property(DisabledBitmap, GetDisabledBitmap, SetDisabledBitmap, doc="See `GetDisabledBitmap` and `SetDisabledBitmap`"); + %property(Font, GetFont, SetFont, doc="See `GetFont` and `SetFont`"); + %property(Help, GetHelp, SetHelp, doc="See `GetHelp` and `SetHelp`"); + %property(Id, GetId, SetId, doc="See `GetId` and `SetId`"); + %property(Kind, GetKind, SetKind, doc="See `GetKind` and `SetKind`"); + %property(Label, GetLabel, doc="See `GetLabel`"); + %property(MarginWidth, GetMarginWidth, SetMarginWidth, doc="See `GetMarginWidth` and `SetMarginWidth`"); + %property(Menu, GetMenu, SetMenu, doc="See `GetMenu` and `SetMenu`"); + %property(SubMenu, GetSubMenu, SetSubMenu, doc="See `GetSubMenu` and `SetSubMenu`"); + %property(Text, GetText, SetText, doc="See `GetText` and `SetText`"); + %property(TextColour, GetTextColour, SetTextColour, doc="See `GetTextColour` and `SetTextColour`"); + }; //---------------------------------------------------------------------------