diff --git a/docs/doxygen/overviews/xrc_format.h b/docs/doxygen/overviews/xrc_format.h index fa222b0f34..9d9b9fdb16 100644 --- a/docs/doxygen/overviews/xrc_format.h +++ b/docs/doxygen/overviews/xrc_format.h @@ -832,14 +832,18 @@ Refer to the section @ref xrc_wxtoolbar for more details. 3.1.5.} @row3col{bitmap, @ref overview_xrcformat_type_bitmap, Bitmap to show on the button (default: none).} -@row3col{selected, @ref overview_xrcformat_type_bitmap, - Bitmap to show when the button is selected (default: none, same as @c bitmap).} +@row3col{pressed, @ref overview_xrcformat_type_bitmap, + Bitmap to show when the button is pressed (default: none, same as @c bitmap). + This property exists since wxWidgets 3.1.6, but the equivalent (and still + supported) "selected" property can be used in the older versions.} @row3col{focus, @ref overview_xrcformat_type_bitmap, Bitmap to show when the button has focus (default: none, same as @c bitmap).} @row3col{disabled, @ref overview_xrcformat_type_bitmap, Bitmap to show when the button is disabled (default: none, same as @c bitmap).} -@row3col{hover, @ref overview_xrcformat_type_bitmap, - Bitmap to show when mouse cursor hovers above the bitmap (default: none, same as @c bitmap).} +@row3col{current, @ref overview_xrcformat_type_bitmap, + Bitmap to show when mouse cursor hovers above the bitmap (default: none, same as @c bitmap). + This property exists since wxWidgets 3.1.6, but the equivalent (and still + supported) "hover" property can be used in the older versions.} @endTable diff --git a/include/wx/motif/menuitem.h b/include/wx/motif/menuitem.h index 456358a2de..3e539a44d7 100644 --- a/include/wx/motif/menuitem.h +++ b/include/wx/motif/menuitem.h @@ -39,8 +39,8 @@ public: // I'm not sure if this works but it silences the linker in the // menu sample. // JJ - virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } - virtual const wxBitmap& GetBitmap() const { return m_bitmap; } + virtual void SetBitmap(const wxBitmapBundle& bitmap) { m_bitmap = bitmap; } + virtual wxBitmap GetBitmap() const { return GetBitmapFromBundle(m_bitmap); } // implementation from now on void CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMenu, @@ -59,7 +59,7 @@ private: WXWidget m_buttonWidget; wxMenuBar* m_menuBar; wxMenu* m_topMenu; // Top-level menu e.g. popup-menu - wxBitmap m_bitmap; // Bitmap for menuitem, if any + wxBitmapBundle m_bitmap; // Bitmap for menuitem, if any wxDECLARE_DYNAMIC_CLASS(wxMenuItem); }; diff --git a/include/wx/qt/menuitem.h b/include/wx/qt/menuitem.h index f5219cd1a9..63d59ffce9 100644 --- a/include/wx/qt/menuitem.h +++ b/include/wx/qt/menuitem.h @@ -35,8 +35,8 @@ public: virtual void Check(bool check = true) wxOVERRIDE; virtual bool IsChecked() const wxOVERRIDE; - virtual void SetBitmap(const wxBitmap& bitmap); - virtual const wxBitmap& GetBitmap() const { return m_bitmap; } + virtual void SetBitmap(const wxBitmapBundle& bitmap); + virtual wxBitmap GetBitmap() const { return GetBitmapFromBundle(m_bitmap); } virtual QAction *GetHandle() const; @@ -44,7 +44,7 @@ public: private: // Qt is using an action instead of a menu item. wxQtAction *m_qtAction; - wxBitmap m_bitmap; + wxBitmapBundle m_bitmap; wxDECLARE_DYNAMIC_CLASS( wxMenuItem ); }; diff --git a/include/wx/univ/menuitem.h b/include/wx/univ/menuitem.h index 281c919cc7..d2b3717cd4 100644 --- a/include/wx/univ/menuitem.h +++ b/include/wx/univ/menuitem.h @@ -37,16 +37,16 @@ public: // we add some extra functions which are also available under MSW from // wxOwnerDrawn class - they will be moved to wxMenuItemBase later // hopefully - void SetBitmaps(const wxBitmap& bmpChecked, - const wxBitmap& bmpUnchecked = wxNullBitmap); - void SetBitmap(const wxBitmap& bmp) { SetBitmaps(bmp); } - const wxBitmap& GetBitmap(bool checked = true) const - { return checked ? m_bmpChecked : m_bmpUnchecked; } + void SetBitmaps(const wxBitmapBundle& bmpChecked, + const wxBitmapBundle& bmpUnchecked = wxBitmapBundle()); + void SetBitmap(const wxBitmapBundle& bmp) { SetBitmaps(bmp); } + wxBitmap GetBitmap(bool checked = true) const + { return GetBitmapFromBundle(checked ? m_bmpChecked : m_bmpUnchecked); } - void SetDisabledBitmap( const wxBitmap& bmpDisabled ) + void SetDisabledBitmap( const wxBitmapBundle& bmpDisabled ) { m_bmpDisabled = bmpDisabled; } - const wxBitmap& GetDisabledBitmap() const - { return m_bmpDisabled; } + wxBitmap GetDisabledBitmap() const + { return GetBitmapFromBundle(m_bmpDisabled); } // mark item as belonging to the given radio group void SetAsRadioGroupStart(); @@ -93,9 +93,9 @@ protected: void UpdateAccelInfo(); // the bitmaps (may be invalid, then they're not used) - wxBitmap m_bmpChecked, - m_bmpUnchecked, - m_bmpDisabled; + wxBitmapBundle m_bmpChecked, + m_bmpUnchecked, + m_bmpDisabled; // the positions of the first and last items of the radio group this item // belongs to or -1: start is the radio group start and is valid for all diff --git a/include/wx/xrc/xh_bmpbt.h b/include/wx/xrc/xh_bmpbt.h index 4e016a1ed5..f3e10b5b2d 100644 --- a/include/wx/xrc/xh_bmpbt.h +++ b/include/wx/xrc/xh_bmpbt.h @@ -14,6 +14,8 @@ #if wxUSE_XRC && wxUSE_BMPBUTTON +#include "wx/bmpbuttn.h" + class WXDLLIMPEXP_XRC wxBitmapButtonXmlHandler : public wxXmlResourceHandler { wxDECLARE_DYNAMIC_CLASS(wxBitmapButtonXmlHandler); @@ -22,6 +24,14 @@ public: wxBitmapButtonXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; + +private: + typedef void (wxBitmapButton::*BitmapSetter)(const wxBitmapBundle&); + + void SetBitmapIfSpecified(wxBitmapButton* button, + BitmapSetter setter, + const char* paramName, + const char* paramNameAlt = NULL); }; #endif // wxUSE_XRC && wxUSE_BMPBUTTON diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index 85be98a649..ab7004e67e 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -588,6 +588,11 @@ public: const wxArtClient& defaultArtClient = wxASCII_STR(wxART_OTHER), wxSize size = wxDefaultSize) wxOVERRIDE; + // Gets a bitmap bundle from the provided node. + wxBitmapBundle GetBitmapBundle(const wxXmlNode* node, + const wxArtClient& defaultArtClient = wxASCII_STR(wxART_OTHER), + wxSize size = wxDefaultSize) wxOVERRIDE; + // Gets an icon. wxIcon GetIcon(const wxString& param = wxT("icon"), const wxArtClient& defaultArtClient = wxASCII_STR(wxART_OTHER), diff --git a/include/wx/xrc/xmlreshandler.h b/include/wx/xrc/xmlreshandler.h index 531630dd7b..606eedaa09 100644 --- a/include/wx/xrc/xmlreshandler.h +++ b/include/wx/xrc/xmlreshandler.h @@ -93,6 +93,9 @@ public: virtual wxBitmapBundle GetBitmapBundle(const wxString& param = wxT("bitmap"), const wxArtClient& defaultArtClient = wxASCII_STR(wxART_OTHER), wxSize size = wxDefaultSize) = 0; + virtual wxBitmapBundle GetBitmapBundle(const wxXmlNode* node, + const wxArtClient& defaultArtClient = wxASCII_STR(wxART_OTHER), + wxSize size = wxDefaultSize) = 0; virtual wxIcon GetIcon(const wxString& param = wxT("icon"), const wxArtClient& defaultArtClient = wxASCII_STR(wxART_OTHER), wxSize size = wxDefaultSize) = 0; @@ -341,6 +344,12 @@ protected: { return GetImpl()->GetBitmapBundle(param, defaultArtClient, size); } + wxBitmapBundle GetBitmapBundle(const wxXmlNode* node, + const wxArtClient& defaultArtClient = wxASCII_STR(wxART_OTHER), + wxSize size = wxDefaultSize) + { + return GetImpl()->GetBitmapBundle(node, defaultArtClient, size); + } wxIcon GetIcon(const wxString& param = wxT("icon"), const wxArtClient& defaultArtClient = wxASCII_STR(wxART_OTHER), wxSize size = wxDefaultSize) diff --git a/interface/wx/xrc/xmlres.h b/interface/wx/xrc/xmlres.h index 9a87d7db3c..18741f29ad 100644 --- a/interface/wx/xrc/xmlres.h +++ b/interface/wx/xrc/xmlres.h @@ -613,6 +613,23 @@ protected: const wxArtClient& defaultArtClient = wxART_OTHER, wxSize size = wxDefaultSize); + /** + Gets a bitmap bundle. + + @since 3.1.6 + */ + wxBitmapBundle GetBitmapBundle(const wxString& param = "bitmap", + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize); + /** + Gets a bitmap bundle from the provided node. + + @since 3.1.6 + */ + wxBitmapBundle GetBitmapBundle(const wxXmlNode* node, + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize); + /** Gets a bool flag (1, t, yes, on, true are @true, everything else is @false). */ diff --git a/samples/xrc/rc/controls.xrc b/samples/xrc/rc/controls.xrc index 78c96300d5..638f91a167 100644 --- a/samples/xrc/rc/controls.xrc +++ b/samples/xrc/rc/controls.xrc @@ -219,6 +219,7 @@ 5 controls.xpm + custclas.xpm diff --git a/src/qt/menuitem.cpp b/src/qt/menuitem.cpp index 97a85fdb37..f589389a4a 100644 --- a/src/qt/menuitem.cpp +++ b/src/qt/menuitem.cpp @@ -112,14 +112,14 @@ bool wxMenuItem::IsChecked() const } -void wxMenuItem::SetBitmap(const wxBitmap& bitmap) +void wxMenuItem::SetBitmap(const wxBitmapBundle& bitmap) { if ( m_kind == wxITEM_NORMAL ) { m_bitmap = bitmap; - if ( !m_bitmap.IsNull() ) + if ( m_bitmap.IsOk() ) { - m_qtAction->setIcon( QIcon(*m_bitmap.GetHandle()) ); + m_qtAction->setIcon( QIcon(*GetBitmapFromBundle(m_bitmap).GetHandle()) ); } } else diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index 99fe79c716..21718a9ba9 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -1550,8 +1550,6 @@ wxMenuItem::wxMenuItem(wxMenu *parentMenu, m_radioGroup.start = -1; m_isRadioGroupStart = false; - m_bmpDisabled = wxNullBitmap; - UpdateAccelInfo(); } @@ -1615,8 +1613,8 @@ void wxMenuItem::SetCheckable(bool checkable) } } -void wxMenuItem::SetBitmaps(const wxBitmap& bmpChecked, - const wxBitmap& bmpUnchecked) +void wxMenuItem::SetBitmaps(const wxBitmapBundle& bmpChecked, + const wxBitmapBundle& bmpUnchecked) { m_bmpChecked = bmpChecked; m_bmpUnchecked = bmpUnchecked; diff --git a/src/xrc/xh_animatctrl.cpp b/src/xrc/xh_animatctrl.cpp index aafa6da0a3..8f2f98c228 100644 --- a/src/xrc/xh_animatctrl.cpp +++ b/src/xrc/xh_animatctrl.cpp @@ -61,9 +61,10 @@ wxObject *wxAnimationCtrlXmlHandler::DoCreateResource() if ( animation ) ctrl->SetAnimation(*animation); - // if no inactive-bitmap has been provided, GetBitmap() will return wxNullBitmap - // which just tells wxAnimationCtrl to use the default for inactive status - ctrl->SetInactiveBitmap(GetBitmap(wxT("inactive-bitmap"))); + // if no inactive-bitmap has been provided, GetBitmapBundle() will return + // an empty bundle, which just tells wxAnimationCtrl to use the default + // bitmap for inactive status + ctrl->SetInactiveBitmap(GetBitmapBundle(wxT("inactive-bitmap"))); SetupWindow(ctrl); diff --git a/src/xrc/xh_aui.cpp b/src/xrc/xh_aui.cpp index 141375fefb..d81e618ada 100644 --- a/src/xrc/xh_aui.cpp +++ b/src/xrc/xh_aui.cpp @@ -244,7 +244,7 @@ wxObject *wxAuiXmlHandler::DoCreateResource() m_notebook->AddPage(wnd, GetText(wxS("label")), GetBool(wxS("selected")), - GetBitmap(wxS("bitmap"), wxART_OTHER)); + GetBitmapBundle(wxS("bitmap"), wxART_OTHER)); } else { diff --git a/src/xrc/xh_auitoolb.cpp b/src/xrc/xh_auitoolb.cpp index 6d713637e6..e94a0e37e7 100644 --- a/src/xrc/xh_auitoolb.cpp +++ b/src/xrc/xh_auitoolb.cpp @@ -111,8 +111,8 @@ wxObject *wxAuiToolBarXmlHandler::DoCreateResource() ( GetID(), GetText(wxS("label")), - GetBitmap(wxS("bitmap"), wxART_TOOLBAR, m_toolSize), - GetBitmap(wxS("bitmap2"), wxART_TOOLBAR, m_toolSize), + GetBitmapBundle(wxS("bitmap"), wxART_TOOLBAR, m_toolSize), + GetBitmapBundle(wxS("bitmap2"), wxART_TOOLBAR, m_toolSize), kind, GetText(wxS("tooltip")), GetText(wxS("longhelp")), diff --git a/src/xrc/xh_bannerwindow.cpp b/src/xrc/xh_bannerwindow.cpp index 408e97ac01..56c5cb3a9c 100644 --- a/src/xrc/xh_bannerwindow.cpp +++ b/src/xrc/xh_bannerwindow.cpp @@ -56,7 +56,7 @@ wxObject *wxBannerWindowXmlHandler::DoCreateResource() } } - wxBitmap bitmap = GetBitmap(); + wxBitmapBundle bitmap = GetBitmapBundle(); if ( bitmap.IsOk() ) { if ( colStart.IsOk() || colEnd.IsOk() ) diff --git a/src/xrc/xh_bmpbt.cpp b/src/xrc/xh_bmpbt.cpp index 822fb2b235..2c72c54695 100644 --- a/src/xrc/xh_bmpbt.cpp +++ b/src/xrc/xh_bmpbt.cpp @@ -15,10 +15,6 @@ #include "wx/xrc/xh_bmpbt.h" -#ifndef WX_PRECOMP - #include "wx/bmpbuttn.h" -#endif - wxIMPLEMENT_DYNAMIC_CLASS(wxBitmapButtonXmlHandler, wxXmlResourceHandler); wxBitmapButtonXmlHandler::wxBitmapButtonXmlHandler() @@ -33,6 +29,27 @@ wxBitmapButtonXmlHandler::wxBitmapButtonXmlHandler() AddWindowStyles(); } +// Function calls the given setter with the contents of the node with the given +// name, if present. +// +// If alternative parameter name is specified, it is used too. +void +wxBitmapButtonXmlHandler::SetBitmapIfSpecified(wxBitmapButton* button, + BitmapSetter setter, + const char* paramName, + const char* paramNameAlt) +{ + if ( wxXmlNode* const node = GetParamNode(paramName) ) + { + (button->*setter)(GetBitmapBundle(node)); + } + else if ( paramNameAlt ) + { + if ( wxXmlNode* const nodeAlt = GetParamNode(paramNameAlt) ) + (button->*setter)(GetBitmap(nodeAlt)); + } +} + wxObject *wxBitmapButtonXmlHandler::DoCreateResource() { XRC_MAKE_INSTANCE(button, wxBitmapButton) @@ -47,7 +64,7 @@ wxObject *wxBitmapButtonXmlHandler::DoCreateResource() { button->Create(m_parentAsWindow, GetID(), - GetBitmap(wxT("bitmap"), wxART_BUTTON), + GetBitmapBundle(wxT("bitmap"), wxART_BUTTON), GetPosition(), GetSize(), GetStyle(wxT("style")), wxDefaultValidator, @@ -58,14 +75,12 @@ wxObject *wxBitmapButtonXmlHandler::DoCreateResource() button->SetDefault(); SetupWindow(button); - if (GetParamNode(wxT("selected"))) - button->SetBitmapSelected(GetBitmap(wxT("selected"))); - if (GetParamNode(wxT("focus"))) - button->SetBitmapFocus(GetBitmap(wxT("focus"))); - if (GetParamNode(wxT("disabled"))) - button->SetBitmapDisabled(GetBitmap(wxT("disabled"))); - if (GetParamNode(wxT("hover"))) - button->SetBitmapHover(GetBitmap(wxT("hover"))); + SetBitmapIfSpecified(button, &wxBitmapButton::SetBitmapPressed, + "pressed", "selected"); + SetBitmapIfSpecified(button, &wxBitmapButton::SetBitmapFocus, "focus"); + SetBitmapIfSpecified(button, &wxBitmapButton::SetBitmapDisabled, "disabled"); + SetBitmapIfSpecified(button, &wxBitmapButton::SetBitmapCurrent, + "current", "hover"); return button; } diff --git a/src/xrc/xh_menu.cpp b/src/xrc/xh_menu.cpp index 5d769e9b66..1c7e755645 100644 --- a/src/xrc/xh_menu.cpp +++ b/src/xrc/xh_menu.cpp @@ -152,11 +152,11 @@ wxObject *wxMenuXmlHandler::DoCreateResource() // and unchecked bitmaps for menu items #ifdef __WXMSW__ if (HasParam(wxT("bitmap2"))) - mitem->SetBitmaps(GetBitmap(wxT("bitmap2"), wxART_MENU), - GetBitmap(wxT("bitmap"), wxART_MENU)); + mitem->SetBitmaps(GetBitmapBundle(wxT("bitmap2"), wxART_MENU), + GetBitmapBundle(wxT("bitmap"), wxART_MENU)); else #endif // __WXMSW__ - mitem->SetBitmap(GetBitmap(wxT("bitmap"), wxART_MENU)); + mitem->SetBitmap(GetBitmapBundle(wxT("bitmap"), wxART_MENU)); } #endif p_menu->Append(mitem); diff --git a/src/xrc/xh_tglbtn.cpp b/src/xrc/xh_tglbtn.cpp index 45cd2fd8bf..1777bca82e 100644 --- a/src/xrc/xh_tglbtn.cpp +++ b/src/xrc/xh_tglbtn.cpp @@ -82,7 +82,7 @@ void wxToggleButtonXmlHandler::DoCreateToggleButton(wxObject *control) #ifdef wxHAVE_BITMAPS_IN_BUTTON if ( GetParamNode("bitmap") ) { - button->SetBitmap(GetBitmap("bitmap", wxART_BUTTON), + button->SetBitmap(GetBitmapBundle("bitmap", wxART_BUTTON), GetDirection("bitmapposition")); } #endif @@ -97,7 +97,7 @@ void wxToggleButtonXmlHandler::DoCreateBitmapToggleButton(wxObject *control) button->Create(m_parentAsWindow, GetID(), - GetBitmap(wxT("bitmap"), wxART_BUTTON), + GetBitmapBundle(wxT("bitmap"), wxART_BUTTON), GetPosition(), GetSize(), GetStyle(), wxDefaultValidator, diff --git a/src/xrc/xh_toolb.cpp b/src/xrc/xh_toolb.cpp index 8348c55433..407c854766 100644 --- a/src/xrc/xh_toolb.cpp +++ b/src/xrc/xh_toolb.cpp @@ -126,8 +126,8 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() ( GetID(), GetText(wxT("label")), - GetBitmap(wxT("bitmap"), wxART_TOOLBAR, m_toolSize), - GetBitmap(wxT("bitmap2"), wxART_TOOLBAR, m_toolSize), + GetBitmapBundle(wxT("bitmap"), wxART_TOOLBAR, m_toolSize), + GetBitmapBundle(wxT("bitmap2"), wxART_TOOLBAR, m_toolSize), kind, GetText(wxT("tooltip")), GetText(wxT("longhelp")) diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 53dca74238..482084c115 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -1946,16 +1946,27 @@ wxBitmapBundle wxXmlResourceHandlerImpl::GetBitmapBundle(const wxString& param, const wxArtClient& defaultArtClient, wxSize size) { - wxASSERT_MSG( !param.empty(), "bitmap parameter name can't be empty" ); + wxASSERT_MSG( !param.empty(), "bitmap bundle parameter name can't be empty" ); const wxXmlNode* const node = GetParamNode(param); if ( !node ) { // this is not an error as bitmap parameter could be optional - return wxNullBitmap; + return wxBitmapBundle(); } + return GetBitmapBundle(node, defaultArtClient, size); +} + +wxBitmapBundle +wxXmlResourceHandlerImpl::GetBitmapBundle(const wxXmlNode* node, + const wxArtClient& defaultArtClient, + wxSize size) +{ + if ( !node ) + return wxBitmapBundle(); + /* If the bitmap is specified as stock item, query wxArtProvider for it: */ wxString art_id, art_client; if ( GetStockArtAttrs(node, defaultArtClient, @@ -1974,7 +1985,7 @@ wxBitmapBundle wxXmlResourceHandlerImpl::GetBitmapBundle(const wxString& param, { ReportParamError ( - param, + node->GetName(), "may contain either one SVG file or a list of files separated by ';'" ); return bitmapBundle; @@ -1986,21 +1997,23 @@ wxBitmapBundle wxXmlResourceHandlerImpl::GetBitmapBundle(const wxString& param, { ReportParamError ( - param, + node->GetName(), "'default_size' attribute required with svg file" ); } else { #ifdef wxHAS_SVG - wxSize svgDefaultSize = ParseStringInPixels(this, param, svgDefaultSizeAttr, wxDefaultSize); + wxSize svgDefaultSize = ParseStringInPixels(this, node->GetName(), + svgDefaultSizeAttr, + wxDefaultSize); #if wxUSE_FILESYSTEM wxFSFile* fsfile = GetCurFileSystem().OpenFile(paramValue, wxFS_READ | wxFS_SEEKABLE); if (fsfile == NULL) { ReportParamError ( - param, + node->GetName(), wxString::Format("cannot open SVG resource \"%s\"", paramValue) ); } @@ -2023,7 +2036,7 @@ wxBitmapBundle wxXmlResourceHandlerImpl::GetBitmapBundle(const wxString& param, #else // !wxHAS_SVG ReportParamError ( - param, + node->GetName(), "SVG bitmaps are not supported in this build of the library" ); #endif // wxHAS_SVG/!wxHAS_SVG @@ -2035,7 +2048,7 @@ wxBitmapBundle wxXmlResourceHandlerImpl::GetBitmapBundle(const wxString& param, { ReportParamError ( - param, + node->GetName(), "may contain either one SVG file or a list of files separated by ';'" ); return bitmapBundle; @@ -2046,7 +2059,7 @@ wxBitmapBundle wxXmlResourceHandlerImpl::GetBitmapBundle(const wxString& param, wxArrayString paths = wxSplit(paramValue, ';', '\0'); for ( wxArrayString::const_iterator i = paths.begin(); i != paths.end(); ++i ) { - wxBitmap bmpNext = LoadBitmapFromFS(this, *i, size, param); + wxBitmap bmpNext = LoadBitmapFromFS(this, *i, size, node->GetName()); if ( !bmpNext.IsOk() ) { // error in loading wxBitmap, return invalid wxBitmapBundle