KiCad PCB EDA Suite
|
Macros and inline functions to create menus items in menubars or popup menus. More...
#include <wx/menu.h>
#include <wx/menuitem.h>
Go to the source code of this file.
Functions | |
void | AddMenuLanguageList (ACTION_MENU *aMasterMenu, TOOL_INTERACTIVE *aControlTool) |
Function AddMenuLanguageList creates a menu list for language choice, and add it as submenu to MasterMenu. More... | |
void | AddBitmapToMenuItem (wxMenuItem *aMenu, const wxBitmap &aImage) |
Add a bitmap to a menuitem. More... | |
wxMenuItem * | AddMenuItem (wxMenu *aMenu, int aId, const wxString &aText, const wxBitmap &aImage, wxItemKind aType=wxITEM_NORMAL) |
Create and insert a menu item with an icon into aMenu. More... | |
wxMenuItem * | AddMenuItem (wxMenu *aMenu, int aId, const wxString &aText, const wxString &aHelpText, const wxBitmap &aImage, wxItemKind aType=wxITEM_NORMAL) |
Create and insert a menu item with an icon and a help message string into aMenu. More... | |
wxMenuItem * | AddMenuItem (wxMenu *aMenu, wxMenu *aSubMenu, int aId, const wxString &aText, const wxBitmap &aImage) |
Create and insert a menu item with an icon into aSubMenu in aMenu. More... | |
wxMenuItem * | AddMenuItem (wxMenu *aMenu, wxMenu *aSubMenu, int aId, const wxString &aText, const wxString &aHelpText, const wxBitmap &aImage) |
Create and insert a menu item with an icon and a help message string into aSubMenu in aMenu. More... | |
Macros and inline functions to create menus items in menubars or popup menus.
Definition in file menus_helpers.h.
void AddBitmapToMenuItem | ( | wxMenuItem * | aMenu, |
const wxBitmap & | aImage | ||
) |
Add a bitmap to a menuitem.
It is added only if use images in menus config option allows it. For wxITEM_CHECK or wxITEM_RADIO menuitems, the bitmap is added only on Windows, other platforms do not support it
aMenu | is the menuitem. |
aImage | is the icon to add to aMenu. |
Definition at line 252 of file bitmap.cpp.
References Pgm().
Referenced by ACTION_MENU::Add(), CONDITIONAL_MENU::AddCheckItem(), CONDITIONAL_MENU::AddItem(), AddMenuItem(), ACTION_MENU::appendCopy(), ACTION_MENU::DisplayTitle(), and CONDITIONAL_MENU::Evaluate().
wxMenuItem * AddMenuItem | ( | wxMenu * | aMenu, |
int | aId, | ||
const wxString & | aText, | ||
const wxBitmap & | aImage, | ||
wxItemKind | aType = wxITEM_NORMAL |
||
) |
Create and insert a menu item with an icon into aMenu.
aMenu | is the menu to add the new item. |
aId | is the command ID for the new menu item. |
aText | is the string for the new menu item. |
aImage | is the icon to add to the new menu item. |
aType | is the type of menu :wxITEM_NORMAL (default), wxITEM_CHECK ... |
Definition at line 266 of file bitmap.cpp.
References AddBitmapToMenuItem().
Referenced by GERBER_LAYER_WIDGET::AddRightClickMenuItems(), PCB_EDIT_FRAME::buildActionPluginMenus(), PROJECT_TREE_PANE::onRight(), LAYER_WIDGET::OnRightDownLayer(), LAYER_WIDGET::OnRightDownRender(), APPEARANCE_CONTROLS::rebuildLayerContextMenu(), and PANEL_COLOR_SETTINGS::ShowColorContextMenu().
wxMenuItem * AddMenuItem | ( | wxMenu * | aMenu, |
int | aId, | ||
const wxString & | aText, | ||
const wxString & | aHelpText, | ||
const wxBitmap & | aImage, | ||
wxItemKind | aType = wxITEM_NORMAL |
||
) |
Create and insert a menu item with an icon and a help message string into aMenu.
aMenu | is the menu to add the new item. |
aId | is the command ID for the new menu item. |
aText | is the string for the new menu item. |
aHelpText | is the help message string for the new menu item. |
aImage | is the icon to add to the new menu item. |
aType | is the type of menu :wxITEM_NORMAL (default), wxITEM_CHECK ... |
Definition at line 278 of file bitmap.cpp.
References AddBitmapToMenuItem().
wxMenuItem * AddMenuItem | ( | wxMenu * | aMenu, |
wxMenu * | aSubMenu, | ||
int | aId, | ||
const wxString & | aText, | ||
const wxBitmap & | aImage | ||
) |
Create and insert a menu item with an icon into aSubMenu in aMenu.
aMenu | is the menu to add the new submenu item. |
aSubMenu | is the submenu to add the new menu. |
aId | is the command ID for the new menu item. |
aText | is the string for the new menu item. |
aImage | is the icon to add to the new menu item. |
Definition at line 291 of file bitmap.cpp.
References AddBitmapToMenuItem().
wxMenuItem * AddMenuItem | ( | wxMenu * | aMenu, |
wxMenu * | aSubMenu, | ||
int | aId, | ||
const wxString & | aText, | ||
const wxString & | aHelpText, | ||
const wxBitmap & | aImage | ||
) |
Create and insert a menu item with an icon and a help message string into aSubMenu in aMenu.
aMenu | is the menu to add the new submenu item. |
aSubMenu | is the submenu to add the new menu. |
aId | is the command ID for the new menu item. |
aText | is the string for the new menu item. |
aHelpText | is the help message string for the new menu item. |
aImage | is the icon to add to the new menu item. |
Definition at line 304 of file bitmap.cpp.
References AddBitmapToMenuItem().
void AddMenuLanguageList | ( | ACTION_MENU * | aMasterMenu, |
TOOL_INTERACTIVE * | aControlTool | ||
) |
Function AddMenuLanguageList creates a menu list for language choice, and add it as submenu to MasterMenu.
aMasterMenu | is the main menu. |
aControlTool | is the tool to associate with the menu |
Definition at line 45 of file languages_menu.cpp.
References _, ACTION_MENU::Add(), language, LanguagesList, LANGUAGE_DESCR::m_KI_Lang_Identifier, LANGUAGE_DESCR::m_Lang_Label, ACTION_MENU::SetIcon(), and ACTION_MENU::SetTitle().
Referenced by EDA_3D_VIEWER_FRAME::doReCreateMenuBar(), BITMAP2CMP_FRAME::doReCreateMenuBar(), CVPCB_MAINFRAME::doReCreateMenuBar(), SCH_EDIT_FRAME::doReCreateMenuBar(), SIMULATOR_FRAME::doReCreateMenuBar(), SYMBOL_EDIT_FRAME::doReCreateMenuBar(), GERBVIEW_FRAME::doReCreateMenuBar(), KICAD_MANAGER_FRAME::doReCreateMenuBar(), PL_EDITOR_FRAME::doReCreateMenuBar(), PCB_CALCULATOR_FRAME::doReCreateMenuBar(), FOOTPRINT_EDIT_FRAME::doReCreateMenuBar(), and PCB_EDIT_FRAME::doReCreateMenuBar().