Add wxBitmapBundle::GetIconFor()
This is to GetBitmapFor() as GetIcon() is to GetBitmap().
This commit is contained in:
parent
84b5e4639e
commit
fc2b7e5266
@ -115,10 +115,11 @@ public:
|
||||
// GetBitmap() converting the returned bitmap to the icon.
|
||||
wxIcon GetIcon(const wxSize& size) const;
|
||||
|
||||
// Helper combining GetBitmap() and GetPreferredSizeFor(): returns the
|
||||
// bitmap of the size appropriate for the current DPI scaling of the given
|
||||
// window.
|
||||
// Helpers combining GetBitmap() or GetIcon() and GetPreferredSizeFor():
|
||||
// return the bitmap or icon of the size appropriate for the current DPI
|
||||
// scaling of the given window.
|
||||
wxBitmap GetBitmapFor(const wxWindow* window) const;
|
||||
wxIcon GetIconFor(const wxWindow* window) const;
|
||||
|
||||
// Access implementation
|
||||
wxBitmapBundleImpl* GetImpl() const { return m_impl.get(); }
|
||||
|
@ -342,6 +342,17 @@ public:
|
||||
*/
|
||||
wxIcon GetIcon(const wxSize& size) const;
|
||||
|
||||
/**
|
||||
Get icon of the size appropriate for the DPI scaling used by the
|
||||
given window.
|
||||
|
||||
This is similar to GetBitmapFor(), but returns a wxIcon, as GetIcon()
|
||||
does.
|
||||
|
||||
@param window Non-null and fully created window.
|
||||
*/
|
||||
wxIcon GetIconFor(const wxWindow* window) const;
|
||||
|
||||
/**
|
||||
Check if the two bundles refer to the same object.
|
||||
|
||||
|
@ -477,6 +477,11 @@ wxBitmap wxBitmapBundle::GetBitmapFor(const wxWindow* window) const
|
||||
return GetBitmap(GetPreferredSizeFor(window));
|
||||
}
|
||||
|
||||
wxIcon wxBitmapBundle::GetIconFor(const wxWindow* window) const
|
||||
{
|
||||
return GetIcon(GetPreferredSizeFor(window));
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user