X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/630d84f26f30e2cac046baa864f93596e51368b2..d3b4d1131395d0413bd904579a310f6d9f7382f7:/utils/wxPython/src/controls2.i diff --git a/utils/wxPython/src/controls2.i b/utils/wxPython/src/controls2.i index 7a21fbe916..bd3ea2da4e 100644 --- a/utils/wxPython/src/controls2.i +++ b/utils/wxPython/src/controls2.i @@ -16,9 +16,6 @@ #include "helpers.h" #include #include -#if 0 -#include -#endif %} //---------------------------------------------------------------------- @@ -34,7 +31,7 @@ %import events.i %import controls.i -%pragma(python) code = "import wxp" +%pragma(python) code = "import wx" //---------------------------------------------------------------------- @@ -80,32 +77,25 @@ public: class wxListCtrl : public wxControl { public: -#ifdef __WXMSW__ wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxPyDefaultPosition, const wxSize& size = wxPyDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxPyDefaultValidator, char* name = "listCtrl"); -#else - wxListCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, - long style = wxLC_ICON, - char* name = "listctrl"); -#endif - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); bool DeleteItem(long item); bool DeleteAllItems(); bool DeleteColumn(int col); -#ifdef __WXMSW__ bool DeleteAllColumns(void); void ClearAll(void); +#ifdef __WXMSW__ wxTextCtrl* EditLabel(long item); bool EndEditLabel(bool cancel); + wxTextCtrl* GetEditControl(); #endif bool EnsureVisible(long item); long FindItem(long start, const wxString& str, bool partial = FALSE); @@ -115,9 +105,6 @@ public: bool GetColumn(int col, wxListItem& item); int GetColumnWidth(int col); int GetCountPerPage(); -#ifdef __WXMSW__ - wxTextCtrl* GetEditControl(); -#endif wxImageList* GetImageList(int which); long GetItemData(long item); @@ -149,6 +136,7 @@ public: int GetSelectedItemCount(); #ifdef __WXMSW__ wxColour GetTextColour(); + void SetTextColour(const wxColour& col); #endif long GetTopItem(); long HitTest(const wxPoint& point, int& OUTPUT); @@ -177,9 +165,6 @@ public: bool SetItemState(long item, long state, long stateMask); void SetItemText(long item, const wxString& text); void SetSingleStyle(long style, bool add = TRUE); -#ifdef __WXMSW__ - void SetTextColour(const wxColour& col); -#endif void SetWindowStyleFlag(long style); // TODO: bool SortItems(wxListCtrlCompare fn, long data); }; @@ -189,16 +174,15 @@ public: //---------------------------------------------------------------------- -#ifdef __WXMSW__ class wxTreeItemId { public: wxTreeItemId(); ~wxTreeItemId(); bool IsOk() const { return m_itemId != 0; } - %addmethods { - long GetId() { return (long)(*self); } - } +// %addmethods { +// long GetId() { return (long)(*self); } +// } }; @@ -241,7 +225,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "wxTreeCtrl"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" size_t GetCount(); unsigned int GetIndent(); @@ -315,13 +299,15 @@ public: wxTextCtrl* GetEditControl(); void EndEditLabel(const wxTreeItemId& item, bool discardChanges = FALSE); - void SortChildren(const wxTreeItemId& item); +// void SortChildren(const wxTreeItemId& item); // **** And this too // wxTreeItemCmpFunc *cmpFunction = NULL); + void SetItemBold(const wxTreeItemId& item, bool bold = TRUE); + bool IsBold(const wxTreeItemId& item) const; + wxTreeItemId HitTest(const wxPoint& point); }; -#endif //---------------------------------------------------------------------- @@ -341,7 +327,7 @@ public: long style = 0, char* name = "tabCtrl"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" bool DeleteAllItems(); bool DeleteItem(int item); @@ -383,7 +369,47 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.13 1998/12/17 14:07:34 RR +// Removed minor differences between wxMSW and wxGTK +// +// Revision 1.12 1998/12/16 22:10:52 RD +// +// Tweaks needed to be able to build wxPython with wxGTK. +// +// Revision 1.11 1998/12/15 20:41:16 RD +// Changed the import semantics from "from wxPython import *" to "from +// wxPython.wx import *" This is for people who are worried about +// namespace pollution, they can use "from wxPython import wx" and then +// prefix all the wxPython identifiers with "wx." +// +// Added wxTaskbarIcon for wxMSW. +// +// Made the events work for wxGrid. +// +// Added wxConfig. +// +// Added wxMiniFrame for wxGTK, (untested.) +// +// Changed many of the args and return values that were pointers to gdi +// objects to references to reflect changes in the wxWindows API. +// +// Other assorted fixes and additions. +// +// Revision 1.10 1998/11/25 08:45:23 RD +// +// Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon +// Added events for wxGrid +// Other various fixes and additions +// +// Revision 1.9 1998/11/16 00:00:54 RD +// Generic treectrl for wxPython/GTK compiles... +// +// Revision 1.8 1998/11/11 04:40:20 RD +// wxTreeCtrl now works (sort of) for wxPython-GTK. This is the new +// TreeCtrl in src/gtk/treectrl.cpp not the old generic one. +// // Revision 1.7 1998/11/11 03:12:25 RD +// // Additions for wxTreeCtrl // // Revision 1.6 1998/10/20 06:43:55 RD