]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_artprov.i
Removed GetVisible and SetVisible
[wxWidgets.git] / wxPython / src / _artprov.i
index afbe69738aaed1fa2db55b5e7dd2b31c442db73b..4d02334a93f5b59c8e5a25863fb5aa12d5b94e95 100644 (file)
@@ -48,13 +48,20 @@ MAKE_CONST_WXSTRING(ART_GO_DOWN);
 MAKE_CONST_WXSTRING(ART_GO_TO_PARENT);
 MAKE_CONST_WXSTRING(ART_GO_HOME);
 MAKE_CONST_WXSTRING(ART_FILE_OPEN);
 MAKE_CONST_WXSTRING(ART_GO_TO_PARENT);
 MAKE_CONST_WXSTRING(ART_GO_HOME);
 MAKE_CONST_WXSTRING(ART_FILE_OPEN);
+MAKE_CONST_WXSTRING(ART_FILE_SAVE);
+MAKE_CONST_WXSTRING(ART_FILE_SAVE_AS);
 MAKE_CONST_WXSTRING(ART_PRINT);
 MAKE_CONST_WXSTRING(ART_HELP);
 MAKE_CONST_WXSTRING(ART_TIP);
 MAKE_CONST_WXSTRING(ART_REPORT_VIEW);
 MAKE_CONST_WXSTRING(ART_LIST_VIEW);
 MAKE_CONST_WXSTRING(ART_NEW_DIR);
 MAKE_CONST_WXSTRING(ART_PRINT);
 MAKE_CONST_WXSTRING(ART_HELP);
 MAKE_CONST_WXSTRING(ART_TIP);
 MAKE_CONST_WXSTRING(ART_REPORT_VIEW);
 MAKE_CONST_WXSTRING(ART_LIST_VIEW);
 MAKE_CONST_WXSTRING(ART_NEW_DIR);
+MAKE_CONST_WXSTRING(ART_HARDDISK);
+MAKE_CONST_WXSTRING(ART_FLOPPY);
+MAKE_CONST_WXSTRING(ART_CDROM);
+MAKE_CONST_WXSTRING(ART_REMOVABLE);
 MAKE_CONST_WXSTRING(ART_FOLDER);
 MAKE_CONST_WXSTRING(ART_FOLDER);
+MAKE_CONST_WXSTRING(ART_FOLDER_OPEN);
 MAKE_CONST_WXSTRING(ART_GO_DIR_UP);
 MAKE_CONST_WXSTRING(ART_EXECUTABLE_FILE);
 MAKE_CONST_WXSTRING(ART_NORMAL_FILE);
 MAKE_CONST_WXSTRING(ART_GO_DIR_UP);
 MAKE_CONST_WXSTRING(ART_EXECUTABLE_FILE);
 MAKE_CONST_WXSTRING(ART_NORMAL_FILE);
@@ -65,6 +72,16 @@ MAKE_CONST_WXSTRING(ART_QUESTION);
 MAKE_CONST_WXSTRING(ART_WARNING);
 MAKE_CONST_WXSTRING(ART_INFORMATION);
 MAKE_CONST_WXSTRING(ART_MISSING_IMAGE);
 MAKE_CONST_WXSTRING(ART_WARNING);
 MAKE_CONST_WXSTRING(ART_INFORMATION);
 MAKE_CONST_WXSTRING(ART_MISSING_IMAGE);
+MAKE_CONST_WXSTRING(ART_COPY);
+MAKE_CONST_WXSTRING(ART_CUT);
+MAKE_CONST_WXSTRING(ART_PASTE);
+MAKE_CONST_WXSTRING(ART_DELETE);
+MAKE_CONST_WXSTRING(ART_NEW);
+MAKE_CONST_WXSTRING(ART_UNDO);
+MAKE_CONST_WXSTRING(ART_REDO);
+MAKE_CONST_WXSTRING(ART_QUIT);
+MAKE_CONST_WXSTRING(ART_FIND);
+MAKE_CONST_WXSTRING(ART_FIND_AND_REPLACE);
 
 //---------------------------------------------------------------------------
 
 
 //---------------------------------------------------------------------------
 
@@ -76,7 +93,7 @@ public:
                                   const wxArtClient& client,
                                   const wxSize& size) {
         wxBitmap rval = wxNullBitmap;
                                   const wxArtClient& client,
                                   const wxSize& size) {
         wxBitmap rval = wxNullBitmap;
-        bool blocked = wxPyBeginBlockThreads();
+        wxPyBlock_t blocked = wxPyBeginBlockThreads();
         if ((wxPyCBH_findCallback(m_myInst, "CreateBitmap"))) {
             PyObject* so = wxPyConstructObject((void*)&size, wxT("wxSize"), 0);
             PyObject* ro;
         if ((wxPyCBH_findCallback(m_myInst, "CreateBitmap"))) {
             PyObject* so = wxPyConstructObject((void*)&size, wxT("wxSize"), 0);
             PyObject* ro;
@@ -131,10 +148,18 @@ Identifying art resources
 Every bitmap is known to wx.ArtProvider under an unique ID that is
 used when requesting a resource from it. The IDs can have one of the
 following predefined values.  Additionally, any string recognized by
 Every bitmap is known to wx.ArtProvider under an unique ID that is
 used when requesting a resource from it. The IDs can have one of the
 following predefined values.  Additionally, any string recognized by
-custom art providers registered using `PushProvider` may be used. When
-running under GTK+ 2, GTK+ stock item IDs (e.g. 'gtk-cdrom') may be
-used as well.
+custom art providers registered using `PushProvider` may be used.
 
 
+GTK+ Note
+---------
+
+When running under GTK+ 2, GTK+ stock item IDs (e.g. 'gtk-cdrom') may be used
+as well.  Additionally, if wxGTK was compiled against GTK+ >= 2.4, then it is
+also possible to load icons from current icon theme by specifying their name
+without the extension and directory components. Icon themes recognized by GTK+
+follow the freedesktop.org Icon Themes specification.  Note that themes are
+not guaranteed to contain all icons, so wx.ArtProvider may return wx.NullBitmap
+or wx.NullIcon.  The default theme is typically installed in /usr/share/icons/hicolor.
 
     * wx.ART_ADD_BOOKMARK
     * wx.ART_DEL_BOOKMARK
 
     * wx.ART_ADD_BOOKMARK
     * wx.ART_DEL_BOOKMARK
@@ -150,13 +175,20 @@ used as well.
     * wx.ART_GO_TO_PARENT
     * wx.ART_GO_HOME
     * wx.ART_FILE_OPEN
     * wx.ART_GO_TO_PARENT
     * wx.ART_GO_HOME
     * wx.ART_FILE_OPEN
+    * wx.ART_FILE_SAVE
+    * wx.ART_FILE_SAVE_AS
     * wx.ART_PRINT
     * wx.ART_HELP
     * wx.ART_TIP
     * wx.ART_REPORT_VIEW
     * wx.ART_LIST_VIEW
     * wx.ART_NEW_DIR
     * wx.ART_PRINT
     * wx.ART_HELP
     * wx.ART_TIP
     * wx.ART_REPORT_VIEW
     * wx.ART_LIST_VIEW
     * wx.ART_NEW_DIR
+    * wx.ART_HARDDISK
+    * wx.ART_FLOPPY
+    * wx.ART_CDROM
+    * wx.ART_REMOVABLE
     * wx.ART_FOLDER
     * wx.ART_FOLDER
+    * wx.ART_FOLDER_OPEN
     * wx.ART_GO_DIR_UP
     * wx.ART_EXECUTABLE_FILE
     * wx.ART_NORMAL_FILE
     * wx.ART_GO_DIR_UP
     * wx.ART_EXECUTABLE_FILE
     * wx.ART_NORMAL_FILE
@@ -166,7 +198,17 @@ used as well.
     * wx.ART_QUESTION
     * wx.ART_WARNING
     * wx.ART_INFORMATION
     * wx.ART_QUESTION
     * wx.ART_WARNING
     * wx.ART_INFORMATION
-    * wx.ART_MISSING_IMAGE 
+    * wx.ART_MISSING_IMAGE
+    * wx.ART_COPY
+    * wx.ART_CUT
+    * wx.ART_PASTE
+    * wx.ART_DELETE
+    * wx.ART_NEW
+    * wx.ART_UNDO
+    * wx.ART_REDO
+    * wx.ART_QUIT
+    * wx.ART_FIND
+    * wx.ART_FIND_AND_REPLACE
 
 
 Clients
 
 
 Clients
@@ -196,25 +238,29 @@ MustHaveApp(wxPyArtProvider);
 MustHaveApp(wxPyArtProvider::GetBitmap);
 MustHaveApp(wxPyArtProvider::GetIcon);
 
 MustHaveApp(wxPyArtProvider::GetBitmap);
 MustHaveApp(wxPyArtProvider::GetIcon);
 
-%name(ArtProvider) class wxPyArtProvider /*: public wxObject*/
+%rename(ArtProvider) wxPyArtProvider;
+class wxPyArtProvider /*: public wxObject*/
 {
 public:
 
     %pythonAppend wxPyArtProvider "self._setCallbackInfo(self, ArtProvider)"
     wxPyArtProvider();
 {
 public:
 
     %pythonAppend wxPyArtProvider "self._setCallbackInfo(self, ArtProvider)"
     wxPyArtProvider();
+    ~wxPyArtProvider();
     
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
     
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
+    %disownarg( wxPyArtProvider *provider );
     DocDeclStr(
         static void , PushProvider(wxPyArtProvider *provider),
         "Add new provider to the top of providers stack.", "");
     DocDeclStr(
         static void , PushProvider(wxPyArtProvider *provider),
         "Add new provider to the top of providers stack.", "");
+    %cleardisown( wxPyArtProvider *provider );
     
 
     DocDeclStr(
         static bool , PopProvider(),
         "Remove latest added provider and delete it.", "");
     
     
 
     DocDeclStr(
         static bool , PopProvider(),
         "Remove latest added provider and delete it.", "");
     
-
+    %pythonAppend RemoveProvider "args[1].thisown = 1";
     DocDeclStr(
         static bool , RemoveProvider(wxPyArtProvider *provider),
         "Remove provider. The provider must have been added previously!  The
     DocDeclStr(
         static bool , RemoveProvider(wxPyArtProvider *provider),
         "Remove provider. The provider must have been added previously!  The
@@ -235,8 +281,15 @@ wx.NullBitmap if no provider provides it.", "");
                                 const wxSize& size = wxDefaultSize),
         "Query the providers for icon with given ID and return it.  Return
 wx.NullIcon if no provider provides it.", "");
                                 const wxSize& size = wxDefaultSize),
         "Query the providers for icon with given ID and return it.  Return
 wx.NullIcon if no provider provides it.", "");
+
+    DocDeclStr(
+        static wxSize , GetSizeHint(const wxString& client, bool platform_dependent = false),
+        "Get the size hint of an icon from a specific Art Client, queries the
+topmost provider if platform_dependent = false", "");
+    
     
 
     
 
+    %pythonAppend Destroy "args[0].thisown = 0"
     %extend { void Destroy() { delete self; }}
 };
 
     %extend { void Destroy() { delete self; }}
 };