projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update button style to include BS_MULTILINE when a multiline label is set
[wxWidgets.git]
/
src
/
common
/
iconbndl.cpp
diff --git
a/src/common/iconbndl.cpp
b/src/common/iconbndl.cpp
index cedfb1bdee1eb18de6bdbd380df5cd07ae71d642..2d3074716b0c6923847004573ee1a7dcf8e493a7 100644
(file)
--- a/
src/common/iconbndl.cpp
+++ b/
src/common/iconbndl.cpp
@@
-54,7
+54,7
@@
public:
protected:
wxIconArray m_icons;
protected:
wxIconArray m_icons;
- friend class
WXDLLEXPORT
wxIconBundle;
+ friend class wxIconBundle;
};
// ============================================================================
};
// ============================================================================
@@
-64,13
+64,11
@@
protected:
wxIconBundle::wxIconBundle()
: wxGDIObject()
{
wxIconBundle::wxIconBundle()
: wxGDIObject()
{
- m_refData = new wxIconBundleRefData;
}
wxIconBundle::wxIconBundle(const wxString& file, long type)
: wxGDIObject()
{
}
wxIconBundle::wxIconBundle(const wxString& file, long type)
: wxGDIObject()
{
- m_refData = new wxIconBundleRefData;
AddIcon(file, type);
}
AddIcon(file, type);
}
@@
-83,7
+81,6
@@
wxIconBundle::wxIconBundle(const wxIconBundle& icon)
wxIconBundle::wxIconBundle(const wxIcon& icon)
: wxGDIObject()
{
wxIconBundle::wxIconBundle(const wxIcon& icon)
: wxGDIObject()
{
- m_refData = new wxIconBundleRefData;
AddIcon(icon);
}
AddIcon(icon);
}
@@
-99,9
+96,7
@@
wxObjectRefData *wxIconBundle::CloneRefData(const wxObjectRefData *data) const
void wxIconBundle::DeleteIcons()
{
void wxIconBundle::DeleteIcons()
{
- wxIconBundleRefData* ref = new wxIconBundleRefData();
UnRef();
UnRef();
- m_refData = ref;
}
bool wxIconBundle::IsOk() const
}
bool wxIconBundle::IsOk() const
@@
-196,6
+191,18
@@
wxIcon wxIconBundle::GetIcon(const wxSize& size) const
#endif
}
#endif
}
+wxIcon wxIconBundle::GetIconOfExactSize(const wxSize& size) const
+{
+ wxIcon icon = GetIcon(size);
+ if ( icon.Ok() &&
+ (icon.GetWidth() != size.x || icon.GetHeight() != size.y) )
+ {
+ icon = wxNullIcon;
+ }
+
+ return icon;
+}
+
void wxIconBundle::AddIcon(const wxIcon& icon)
{
wxCHECK_RET( icon.IsOk(), _T("invalid icon") );
void wxIconBundle::AddIcon(const wxIcon& icon)
{
wxCHECK_RET( icon.IsOk(), _T("invalid icon") );