X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/853b255a6b035f9448b4ca7e07a453be7bd2f892..0d6f9504aef08d44d8b20df4419f4db9150ef073:/utils/wxPython/src/windows.i?ds=sidebyside diff --git a/utils/wxPython/src/windows.i b/utils/wxPython/src/windows.i index 592bdeb551..4bebc0bdc9 100644 --- a/utils/wxPython/src/windows.i +++ b/utils/wxPython/src/windows.i @@ -1,5 +1,3 @@ -%module windows -%{ ///////////////////////////////////////////////////////////////////////////// // Name: windows.i // Purpose: SWIG definitions of various window classes @@ -13,6 +11,9 @@ ///////////////////////////////////////////////////////////////////////////// +%module windows + +%{ #include "helpers.h" #ifdef __WXMSW__ @@ -66,7 +67,7 @@ public: void CaptureMouse(); - //void Center(int direction = wxHORIZONTAL); + void Center(int direction = wxHORIZONTAL); void Centre(int direction = wxHORIZONTAL); void ClientToScreen(int *BOTH, int *BOTH); bool Close(int force = FALSE); @@ -77,12 +78,12 @@ public: #endif void Enable(bool enable); //bool FakePopupMenu(wxMenu* menu, int x, int y); + %name(FindWindowByID) wxWindow* FindWindow(long id); + %name(FindWindowByName) wxWindow* FindWindow(const wxString& name); void Fit(); wxColour GetBackgroundColour(); -#ifdef __WXMSW__ int GetCharHeight(); int GetCharWidth(); -#endif void GetClientSize(int *OUTPUT, int *OUTPUT); wxLayoutConstraints * GetConstraints(); #ifdef __WXMSW__ @@ -90,42 +91,27 @@ public: #endif //wxEvtHandler* GetEventHandler(); wxFont* GetFont(); -#ifdef __WXMSW__ wxColour GetForegroundColour(); wxWindow * GetGrandParent(); -#endif int GetId(); void GetPosition(int *OUTPUT, int *OUTPUT); -#ifdef __WXMSW__ - wxString& GetLabel(); - wxString& GetName(); -#else wxString GetLabel(); wxString GetName(); -#endif wxWindow * GetParent(); int GetReturnCode(); int GetScrollThumb(int orientation); int GetScrollPos(int orientation); int GetScrollRange(int orientation); void GetSize(int *OUTPUT, int *OUTPUT); -#ifdef __WXMSW__ void GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT); // int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL, bool use16 = FALSE) -#endif -#ifdef __WXMSW__ - wxString& GetTitle(); -#else wxString GetTitle(); -#endif long GetWindowStyleFlag(); void InitDialog(); bool IsEnabled(); bool IsRetained(); bool IsShown(); void Layout(); -#ifdef __WXMSW__ bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL); -#endif void Lower(); void MakeModal(bool flag); void Move(int x, int y); @@ -145,9 +131,7 @@ public: void SetDoubleClick(bool allowDoubleClick); void SetFocus(); void SetFont(const wxFont& font); -#ifdef __WXMSW__ void SetForegroundColour(const wxColour& colour); -#endif void SetId(int id); void SetName(const wxString& name); void SetReturnCode(int retCode); @@ -168,9 +152,7 @@ public: } } -#ifdef __WXMSW__ void SetSizeHints(int minW=-1, int minH=-1, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1); -#endif void SetClientSize(int width, int height); //void SetPalette(wxPalette* palette); //void SetColourMap(wxColourMap *colourMap); @@ -214,16 +196,12 @@ public: bool CreateStatusBar(int number = 1); wxMenuBar* GetMenuBar(); wxStatusBar* GetStatusBar(); -#ifdef __WXMSW__ - wxString& GetTitle(); -#else wxString GetTitle(); -#endif -#ifdef __WXMSW__ void Iconize(bool iconize); bool IsIconized(); - void SetAcceleratorTable(const wxAcceleratorTable& accel); void Maximize(bool maximize); +#ifdef __WXMSW__ + void SetAcceleratorTable(const wxAcceleratorTable& accel); #endif void SetIcon(const wxIcon& icon); void SetMenuBar(wxMenuBar* menuBar); @@ -275,11 +253,9 @@ public: void Centre(int direction = wxBOTH); void EndModal(int retCode); wxString GetTitle(); -#ifdef __WXMSW__ void Iconize(bool iconize); bool IsIconized(); void SetModal(bool flag); -#endif bool IsModal(); void SetTitle(const wxString& title); bool Show(bool show); @@ -327,20 +303,19 @@ public: void Enable(int id, bool enable); int FindItem(const wxString& itemString); #ifdef __WXMSW__ - wxMenuItem* FindItemForId(int id); - wxString& GetHelpString(int id); - wxString GetLabel(int id); wxString GetTitle(); - void SetHelpString(int id, const wxString& helpString); void SetTitle(const wxString& title); #endif + wxMenuItem* FindItemForId(int id); + wxString GetHelpString(int id); + wxString GetLabel(int id); + void SetHelpString(int id, const wxString& helpString); bool IsChecked(int id); bool IsEnabled(int id); void SetLabel(int id, const wxString& label); }; -#ifdef __WXMSW__ // // This one knows how to set a callback and handle INC- and DECREFing it. To // be used for PopupMenus, but you must retain a referece to it while using @@ -351,7 +326,6 @@ public: wxPyMenu(const wxString& title = wxPyEmptyStr, PyObject* func = NULL); ~wxPyMenu(); }; -#endif //---------------------------------------------------------------------- @@ -363,10 +337,14 @@ public: void Check(int id, bool flag); bool Checked(int id); void Enable(int id, bool enable); + bool Enabled(int id); int FindMenuItem(const wxString& menuString, const wxString& itemString); +#ifdef __WXGTK__ + %name(FindItemForId) wxMenuItem* FindMenuItemById( int id ); +#endif #ifdef __WXMSW__ - void EnableTop(int pos, bool enable); wxMenuItem * FindItemForId(int id); + void EnableTop(int pos, bool enable); wxString GetHelpString(int id); wxString GetLabel(int id); void SetHelpString(int id, const wxString& helpString); @@ -374,6 +352,8 @@ public: wxString GetLabelTop(int pos); void SetLabelTop(int pos, const wxString& label); #endif + int GetMenuCount(); + wxMenu* GetMenu(int i); }; @@ -384,26 +364,37 @@ public: bool IsSeparator(); bool IsEnabled(); bool IsChecked(); + bool IsCheckable(); int GetId(); wxMenu* GetSubMenu(); #ifdef __WXMSW__ - const wxString& GetHelp(); void SetName(const wxString& strName); - void SetHelp(const wxString& strHelp); -#endif - void Enable(bool bDoEnable = TRUE); - void Check(bool bDoCheck = TRUE); -#ifdef __WXMSW__ void DeleteSubMenu(); const wxString& GetName(); #endif - bool IsCheckable(); + const wxString& GetHelp(); + void SetHelp(const wxString& strHelp); + void Enable(bool bDoEnable = TRUE); + void Check(bool bDoCheck = TRUE); }; //--------------------------------------------------------------------------- ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.5 1998/08/17 18:29:40 RD +// Removed an extra method definition +// +// Revision 1.4 1998/08/16 04:31:11 RD +// More wxGTK work. +// +// Revision 1.3 1998/08/15 07:36:47 RD +// - Moved the header in the .i files out of the code that gets put into +// the .cpp files. It caused CVS conflicts because of the RCS ID being +// different each time. +// +// - A few minor fixes. +// // Revision 1.2 1998/08/14 23:36:46 RD // Beginings of wxGTK compatibility //