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
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
-------
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.
* 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:
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(
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(
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; }}