Accept bitmap bundles for menu items (but don't use it yet).
This commit is contained in:
parent
284cda1fca
commit
b6aa01a572
|
@ -355,7 +355,7 @@ void KIUI::Disable( wxWindow* aWindow )
|
|||
}
|
||||
|
||||
|
||||
void KIUI::AddBitmapToMenuItem( wxMenuItem* aMenu, const wxBitmap& aImage )
|
||||
void KIUI::AddBitmapToMenuItem( wxMenuItem* aMenu, const wxBitmapBundle& aImage )
|
||||
{
|
||||
// Retrieve the global application show icon option:
|
||||
bool useImagesInMenus = Pgm().GetCommonSettings()->m_Appearance.use_icons_in_menus;
|
||||
|
@ -369,8 +369,8 @@ void KIUI::AddBitmapToMenuItem( wxMenuItem* aMenu, const wxBitmap& aImage )
|
|||
}
|
||||
|
||||
|
||||
wxMenuItem* KIUI::AddMenuItem( wxMenu* aMenu, int aId, const wxString& aText, const wxBitmap& aImage,
|
||||
wxItemKind aType )
|
||||
wxMenuItem* KIUI::AddMenuItem( wxMenu* aMenu, int aId, const wxString& aText,
|
||||
const wxBitmapBundle& aImage, wxItemKind aType )
|
||||
{
|
||||
wxMenuItem* item = new wxMenuItem( aMenu, aId, aText, wxEmptyString, aType );
|
||||
AddBitmapToMenuItem( item, aImage );
|
||||
|
@ -381,8 +381,9 @@ wxMenuItem* KIUI::AddMenuItem( wxMenu* aMenu, int aId, const wxString& aText, co
|
|||
}
|
||||
|
||||
|
||||
wxMenuItem* KIUI::AddMenuItem( wxMenu* aMenu, int aId, const wxString& aText, const wxString& aHelpText,
|
||||
const wxBitmap& aImage, wxItemKind aType )
|
||||
wxMenuItem* KIUI::AddMenuItem( wxMenu* aMenu, int aId, const wxString& aText,
|
||||
const wxString& aHelpText, const wxBitmapBundle& aImage,
|
||||
wxItemKind aType )
|
||||
{
|
||||
wxMenuItem* item = new wxMenuItem( aMenu, aId, aText, aHelpText, aType );
|
||||
AddBitmapToMenuItem( item, aImage );
|
||||
|
@ -394,7 +395,7 @@ wxMenuItem* KIUI::AddMenuItem( wxMenu* aMenu, int aId, const wxString& aText, co
|
|||
|
||||
|
||||
wxMenuItem* KIUI::AddMenuItem( wxMenu* aMenu, wxMenu* aSubMenu, int aId, const wxString& aText,
|
||||
const wxBitmap& aImage )
|
||||
const wxBitmapBundle& aImage )
|
||||
{
|
||||
wxMenuItem* item = new wxMenuItem( aMenu, aId, aText );
|
||||
item->SetSubMenu( aSubMenu );
|
||||
|
@ -407,7 +408,7 @@ wxMenuItem* KIUI::AddMenuItem( wxMenu* aMenu, wxMenu* aSubMenu, int aId, const w
|
|||
|
||||
|
||||
wxMenuItem* KIUI::AddMenuItem( wxMenu* aMenu, wxMenu* aSubMenu, int aId, const wxString& aText,
|
||||
const wxString& aHelpText, const wxBitmap& aImage )
|
||||
const wxString& aHelpText, const wxBitmapBundle& aImage )
|
||||
{
|
||||
wxMenuItem* item = new wxMenuItem( aMenu, aId, aText, aHelpText );
|
||||
item->SetSubMenu( aSubMenu );
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <wx/string.h>
|
||||
#include <wx/font.h>
|
||||
|
||||
class wxBitmapBundle;
|
||||
class wxSize;
|
||||
class wxTextCtrl;
|
||||
class wxTextEntry;
|
||||
|
@ -142,7 +143,7 @@ KICOMMON_API extern const wxString s_FocusStealableInputName;
|
|||
* @param aMenu is the menuitem.
|
||||
* @param aImage is the icon to add to aMenu.
|
||||
*/
|
||||
KICOMMON_API void AddBitmapToMenuItem( wxMenuItem* aMenu, const wxBitmap& aImage );
|
||||
KICOMMON_API void AddBitmapToMenuItem( wxMenuItem* aMenu, const wxBitmapBundle& aImage );
|
||||
|
||||
|
||||
/**
|
||||
|
@ -155,7 +156,8 @@ KICOMMON_API void AddBitmapToMenuItem( wxMenuItem* aMenu, const wxBitmap& aImage
|
|||
* @param aType is the type of menu :wxITEM_NORMAL (default), wxITEM_CHECK ...
|
||||
* @return a pointer to the new created wxMenuItem.
|
||||
*/
|
||||
KICOMMON_API wxMenuItem* AddMenuItem( wxMenu* aMenu, int aId, const wxString& aText, const wxBitmap& aImage,
|
||||
KICOMMON_API wxMenuItem* AddMenuItem( wxMenu* aMenu, int aId, const wxString& aText,
|
||||
const wxBitmapBundle& aImage,
|
||||
wxItemKind aType = wxITEM_NORMAL );
|
||||
|
||||
|
||||
|
@ -170,8 +172,9 @@ KICOMMON_API wxMenuItem* AddMenuItem( wxMenu* aMenu, int aId, const wxString& aT
|
|||
* @param aType is the type of menu :wxITEM_NORMAL (default), wxITEM_CHECK ...
|
||||
* @return a pointer to the new created wxMenuItem.
|
||||
*/
|
||||
KICOMMON_API wxMenuItem* AddMenuItem( wxMenu* aMenu, int aId, const wxString& aText, const wxString& aHelpText,
|
||||
const wxBitmap& aImage, wxItemKind aType = wxITEM_NORMAL );
|
||||
KICOMMON_API wxMenuItem* AddMenuItem( wxMenu* aMenu, int aId, const wxString& aText,
|
||||
const wxString& aHelpText, const wxBitmapBundle& aImage,
|
||||
wxItemKind aType = wxITEM_NORMAL );
|
||||
|
||||
|
||||
/**
|
||||
|
@ -184,8 +187,8 @@ KICOMMON_API wxMenuItem* AddMenuItem( wxMenu* aMenu, int aId, const wxString& aT
|
|||
* @param aImage is the icon to add to the new menu item.
|
||||
* @return a pointer to the new created wxMenuItem,
|
||||
*/
|
||||
KICOMMON_API wxMenuItem* AddMenuItem( wxMenu* aMenu, wxMenu* aSubMenu, int aId, const wxString& aText,
|
||||
const wxBitmap& aImage );
|
||||
KICOMMON_API wxMenuItem* AddMenuItem( wxMenu* aMenu, wxMenu* aSubMenu, int aId,
|
||||
const wxString& aText, const wxBitmapBundle& aImage );
|
||||
|
||||
|
||||
/**
|
||||
|
@ -200,8 +203,9 @@ KICOMMON_API wxMenuItem* AddMenuItem( wxMenu* aMenu, wxMenu* aSubMenu, int aId,
|
|||
* @param aImage is the icon to add to the new menu item.
|
||||
* @return a pointer to the new created wxMenuItem.
|
||||
*/
|
||||
KICOMMON_API wxMenuItem* AddMenuItem( wxMenu* aMenu, wxMenu* aSubMenu, int aId, const wxString& aText,
|
||||
const wxString& aHelpText, const wxBitmap& aImage );
|
||||
KICOMMON_API wxMenuItem* AddMenuItem( wxMenu* aMenu, wxMenu* aSubMenu, int aId,
|
||||
const wxString& aText, const wxString& aHelpText,
|
||||
const wxBitmapBundle& aImage );
|
||||
}
|
||||
|
||||
KICOMMON_API SEVERITY SeverityFromString( const wxString& aSeverity );
|
||||
|
|
Loading…
Reference in New Issue