X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dce2bd223c2370f001f9ca93e04cbd437ff3f988..f1fabff5b28f3fa789247db5a30b167a4c92c1a2:/wxPython/src/_artprov.i?ds=inline diff --git a/wxPython/src/_artprov.i b/wxPython/src/_artprov.i index e8f19c9eb6..afbe69738a 100644 --- a/wxPython/src/_artprov.i +++ b/wxPython/src/_artprov.i @@ -30,6 +30,7 @@ MAKE_CONST_WXSTRING(ART_FRAME_ICON); MAKE_CONST_WXSTRING(ART_CMN_DIALOG); MAKE_CONST_WXSTRING(ART_HELP_BROWSER); MAKE_CONST_WXSTRING(ART_MESSAGE_BOX); +MAKE_CONST_WXSTRING(ART_BUTTON); MAKE_CONST_WXSTRING(ART_OTHER); // Art IDs @@ -122,14 +123,18 @@ method and register the provider with wx.ArtProvider.PushProvider:: def CreateBitmap(self, artid, client, size): ... return bmp - +", " 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 these -predefined values: +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. + * wx.ART_ADD_BOOKMARK * wx.ART_DEL_BOOKMARK @@ -168,7 +173,7 @@ Clients ------- The Client is the entity that calls wx.ArtProvider's `GetBitmap` or -`GetIcon` function. Client IDs server as a hint to wx.ArtProvider +`GetIcon` function. Client IDs serve as a hint to wx.ArtProvider that is supposed to help it to choose the best looking bitmap. For example it is often desirable to use slightly different icons in menus and toolbars even though they represent the same action (e.g. @@ -182,10 +187,15 @@ identical bitmap for different client values! * wx.ART_CMN_DIALOG * wx.ART_HELP_BROWSER * wx.ART_MESSAGE_BOX + * wx.ART_BUTTON * wx.ART_OTHER (used for all requests that don't fit into any of the categories above) "); +MustHaveApp(wxPyArtProvider); +MustHaveApp(wxPyArtProvider::GetBitmap); +MustHaveApp(wxPyArtProvider::GetIcon); + %name(ArtProvider) class wxPyArtProvider /*: public wxObject*/ { public: @@ -197,18 +207,18 @@ public: DocDeclStr( static void , PushProvider(wxPyArtProvider *provider), - "Add new provider to the top of providers stack."); + "Add new provider to the top of providers stack.", ""); DocDeclStr( static bool , PopProvider(), - "Remove latest added provider and delete it."); + "Remove latest added provider and delete it.", ""); DocDeclStr( static bool , RemoveProvider(wxPyArtProvider *provider), "Remove provider. The provider must have been added previously! The -provider is _not_ deleted."); +provider is _not_ deleted.", ""); DocDeclStr( @@ -216,7 +226,7 @@ provider is _not_ deleted."); const wxString& client = wxPyART_OTHER, const wxSize& size = wxDefaultSize), "Query the providers for bitmap with given ID and return it. Return -wx.NullBitmap if no provider provides it."); +wx.NullBitmap if no provider provides it.", ""); DocDeclStr( @@ -224,7 +234,7 @@ wx.NullBitmap if no provider provides it."); const wxString& client = wxPyART_OTHER, const wxSize& size = wxDefaultSize), "Query the providers for icon with given ID and return it. Return -wx.NullIcon if no provider provides it."); +wx.NullIcon if no provider provides it.", ""); %extend { void Destroy() { delete self; }}