]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/controls2.i
No longer needs to create a wxApp object before making bitmaps
[wxWidgets.git] / wxPython / src / controls2.i
index 945533fe2d79122dda0cf5282a6221f0da9c4720..998a4650c91d7c8238daa0373d1fadf15810cfa8 100644 (file)
 
 //----------------------------------------------------------------------
 
-%{
-extern wxValidator wxPyDefaultValidator;
-%}
-
-//----------------------------------------------------------------------
 
 enum {
     wxLIST_MASK_TEXT,
@@ -96,6 +91,28 @@ enum wxListColumnFormat
 };
 
 
+enum {
+    /* List control event types */
+    wxEVT_COMMAND_LIST_BEGIN_DRAG,
+    wxEVT_COMMAND_LIST_BEGIN_RDRAG,
+    wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT,
+    wxEVT_COMMAND_LIST_END_LABEL_EDIT,
+    wxEVT_COMMAND_LIST_DELETE_ITEM,
+    wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS,
+    wxEVT_COMMAND_LIST_GET_INFO,
+    wxEVT_COMMAND_LIST_SET_INFO,
+    wxEVT_COMMAND_LIST_ITEM_SELECTED,
+    wxEVT_COMMAND_LIST_ITEM_DESELECTED,
+    wxEVT_COMMAND_LIST_KEY_DOWN,
+    wxEVT_COMMAND_LIST_INSERT_ITEM,
+    wxEVT_COMMAND_LIST_COL_CLICK,
+    wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
+    wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK,
+    wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK,
+};
+
+
+
 class wxListItemAttr
 {
 public:
@@ -214,15 +231,16 @@ public:
 class wxListCtrl : public wxControl {
 public:
     wxListCtrl(wxWindow* parent, wxWindowID id,
-               const wxPoint& pos = wxPyDefaultPosition,
-               const wxSize& size = wxPyDefaultSize,
+               const wxPoint& pos = wxDefaultPosition,
+               const wxSize& size = wxDefaultSize,
                long style = wxLC_ICON,
-               const wxValidator& validator = wxPyDefaultValidator,
+               const wxValidator& validator = wxDefaultValidator,
                char* name = "listCtrl");
 
     %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
 
     bool Arrange(int flag = wxLIST_ALIGN_DEFAULT);
+    void AssignImageList(wxImageList* imageList, int which);
     bool DeleteItem(long item);
     bool DeleteAllItems();
     bool DeleteColumn(int col);
@@ -372,6 +390,29 @@ enum {
 };
 
 
+enum {
+    /* Tree control event types */
+    wxEVT_COMMAND_TREE_BEGIN_DRAG,
+    wxEVT_COMMAND_TREE_BEGIN_RDRAG,
+    wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT,
+    wxEVT_COMMAND_TREE_END_LABEL_EDIT,
+    wxEVT_COMMAND_TREE_DELETE_ITEM,
+    wxEVT_COMMAND_TREE_GET_INFO,
+    wxEVT_COMMAND_TREE_SET_INFO,
+    wxEVT_COMMAND_TREE_ITEM_EXPANDED,
+    wxEVT_COMMAND_TREE_ITEM_EXPANDING,
+    wxEVT_COMMAND_TREE_ITEM_COLLAPSED,
+    wxEVT_COMMAND_TREE_ITEM_COLLAPSING,
+    wxEVT_COMMAND_TREE_SEL_CHANGED,
+    wxEVT_COMMAND_TREE_SEL_CHANGING,
+    wxEVT_COMMAND_TREE_KEY_DOWN,
+    wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
+    wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK,
+    wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK,
+    wxEVT_COMMAND_TREE_END_DRAG,
+};
+
+
 class wxTreeItemId {
 public:
     wxTreeItemId();
@@ -449,6 +490,7 @@ public:
 
 %{
 class wxPyTreeCtrl : public wxTreeCtrl {
+    DECLARE_ABSTRACT_CLASS(wxPyTreeCtrl);
 public:
     wxPyTreeCtrl(wxWindow *parent, wxWindowID id,
                  const wxPoint& pos,
@@ -458,7 +500,6 @@ public:
                  char* name) :
         wxTreeCtrl(parent, id, pos, size, style, validator, name) {}
 
-
     int OnCompareItems(const wxTreeItemId& item1,
                        const wxTreeItemId& item2) {
         int rval = 0;
@@ -476,6 +517,8 @@ public:
     PYPRIVATE;
 };
 
+IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl);
+
 %}
 
 // These are for the GetFirstChild/GetNextChild methods below
@@ -486,22 +529,23 @@ public:
 %name(wxTreeCtrl)class wxPyTreeCtrl : public wxControl {
 public:
     wxPyTreeCtrl(wxWindow *parent, wxWindowID id = -1,
-               const wxPoint& pos = wxPyDefaultPosition,
-               const wxSize& size = wxPyDefaultSize,
+               const wxPoint& pos = wxDefaultPosition,
+               const wxSize& size = wxDefaultSize,
                long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
-               const wxValidator& validator = wxPyDefaultValidator,
+               const wxValidator& validator = wxDefaultValidator,
                char* name = "wxTreeCtrl");
 
     void _setSelf(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
     %pragma(python) addtomethod = "__init__:self._setSelf(self, wxTreeCtrl)"
 
+    void AssignImageList(wxImageList* imageList);
     size_t GetCount();
     unsigned int GetIndent();
     void SetIndent(unsigned int indent);
     wxImageList *GetImageList();
     wxImageList *GetStateImageList();
-    void SetImageList(wxImageList *imageList/*, int which = wxIMAGE_LIST_NORMAL*/);
+    void SetImageList(wxImageList *imageList);
     void SetStateImageList(wxImageList *imageList);
 
     unsigned int GetSpacing();
@@ -705,6 +749,15 @@ public:
 
 #ifdef SKIPTHIS
 #ifdef __WXMSW__
+
+
+enum {
+     /* tab control event types */
+    wxEVT_COMMAND_TAB_SEL_CHANGED,
+    wxEVT_COMMAND_TAB_SEL_CHANGING,
+};
+
+
 class wxTabEvent : public wxCommandEvent {
 public:
 };
@@ -714,8 +767,8 @@ public:
 class wxTabCtrl : public wxControl {
 public:
     wxTabCtrl(wxWindow* parent, wxWindowID id,
-              const wxPoint& pos = wxPyDefaultPosition,
-              const wxSize& size = wxPyDefaultSize,
+              const wxPoint& pos = wxDefaultPosition,
+              const wxSize& size = wxDefaultSize,
               long style = 0,
               char* name = "tabCtrl");