X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d07d2bc9d05408c58b76c53a0a291915b88e5064..c437fde9f90fc7dfcac79053d214fc9146d7be21:/wxPython/src/_artprov.i?ds=sidebyside diff --git a/wxPython/src/_artprov.i b/wxPython/src/_artprov.i index 0f1511589a..ac11b64e9c 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 @@ -47,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_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_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_OPEN); MAKE_CONST_WXSTRING(ART_GO_DIR_UP); MAKE_CONST_WXSTRING(ART_EXECUTABLE_FILE); MAKE_CONST_WXSTRING(ART_NORMAL_FILE); @@ -64,6 +72,15 @@ 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_COPY); +MAKE_CONST_WXSTRING(ART_CUT); +MAKE_CONST_WXSTRING(ART_PASTE); +MAKE_CONST_WXSTRING(ART_DELETE); +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); //--------------------------------------------------------------------------- @@ -75,7 +92,7 @@ public: 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; @@ -128,8 +145,21 @@ 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. + +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 @@ -168,7 +198,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,11 +212,17 @@ 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) "); -%name(ArtProvider) class wxPyArtProvider /*: public wxObject*/ +MustHaveApp(wxPyArtProvider); +MustHaveApp(wxPyArtProvider::GetBitmap); +MustHaveApp(wxPyArtProvider::GetIcon); + +%rename(ArtProvider) wxPyArtProvider; +class wxPyArtProvider /*: public wxObject*/ { public: @@ -225,6 +261,12 @@ 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.", ""); + + 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", ""); + %extend { void Destroy() { delete self; }}