X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e7da44f189bc8506bdd0ea326ab01059a82200b..9ac884500ce30c58e24b0a6af1288b576d2e03e4:/wxPython/src/_artprov.i?ds=sidebyside diff --git a/wxPython/src/_artprov.i b/wxPython/src/_artprov.i index 83798bd6bf..3e1444579d 100644 --- a/wxPython/src/_artprov.i +++ b/wxPython/src/_artprov.i @@ -76,6 +76,7 @@ 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); @@ -130,7 +131,7 @@ asks wx.ArtProvider for it instead. This way the users can plug in their own wx.ArtProvider class and easily replace standard art with his/her own version. It is easy thing to do: all that is needed is to derive a class from wx.ArtProvider, override it's CreateBitmap -method and register the provider with wx.ArtProvider.PushProvider:: +method and register the provider with `wx.ArtProvider.Push`:: class MyArtProvider(wx.ArtProvider): def __init__(self): @@ -147,7 +148,7 @@ 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 -custom art providers registered using `PushProvider` may be used. +custom art providers registered using `Push` may be used. GTK+ Note --------- @@ -160,7 +161,6 @@ 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_HELP_SIDE_PANEL @@ -175,13 +175,20 @@ or wx.NullIcon. The default theme is typically installed in /usr/share/icons/hi * 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_HARDDISK + * wx.ART_FLOPPY + * wx.ART_CDROM + * wx.ART_REMOVABLE * wx.ART_FOLDER + * wx.ART_FOLDER_OPEN * wx.ART_GO_DIR_UP * wx.ART_EXECUTABLE_FILE * wx.ART_NORMAL_FILE @@ -191,7 +198,17 @@ or wx.NullIcon. The default theme is typically installed in /usr/share/icons/hi * 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 @@ -228,24 +245,37 @@ public: %pythonAppend wxPyArtProvider "self._setCallbackInfo(self, ArtProvider)" wxPyArtProvider(); + ~wxPyArtProvider(); void _setCallbackInfo(PyObject* self, PyObject* _class); + %disownarg( wxPyArtProvider *provider ); + DocDeclStr( - static void , PushProvider(wxPyArtProvider *provider), + static void , Push(wxPyArtProvider *provider), "Add new provider to the top of providers stack.", ""); + %pythoncode { PushProvider = Push } + + DocDeclStr( + static void , Insert(wxPyArtProvider *provider), + "Add new provider to the bottom of providers stack.", ""); + %pythoncode { InsertProvider = Insert } + + %cleardisown( wxPyArtProvider *provider ); DocDeclStr( - static bool , PopProvider(), + static bool , Pop(), "Remove latest added provider and delete it.", ""); + %pythoncode { PopProvider = Pop } - + %pythonAppend Delete "args[1].thisown = 1"; DocDeclStr( - static bool , RemoveProvider(wxPyArtProvider *provider), + static bool , Delete(wxPyArtProvider *provider), "Remove provider. The provider must have been added previously! The provider is _not_ deleted.", ""); - + %pythoncode { RemoveProvider = Delete } + DocDeclStr( static wxBitmap , GetBitmap(const wxString& id, @@ -263,12 +293,13 @@ wx.NullBitmap if no provider provides it.", ""); wx.NullIcon if no provider provides it.", ""); DocDeclStr( - static wxSize , GetHintSize(const wxString& client, bool platform_dependent = false), + 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", ""); + %pythonPrepend Destroy "args[0].this.own(False)" %extend { void Destroy() { delete self; }} };