| 
    KiCad PCB EDA Suite
    
   | 
 
A popup window that contains a row of toolbar-like buttons for the user to choose from. More...
#include <action_toolbar.h>
 Public Member Functions | |
| ACTION_TOOLBAR_PALETTE (wxWindow *aParent, bool aVertical) | |
| Create the palette.   | |
| void | AddAction (const TOOL_ACTION &aAction) | 
| Add an action to the palette.   | |
| void | EnableAction (const TOOL_ACTION &aAction, bool aEnable=true) | 
| Enable the button for an action on the palette.   | |
| void | CheckAction (const TOOL_ACTION &aAction, bool aCheck=true) | 
| Check/Toggle the button for an action on the palette.   | |
| void | SetButtonSize (wxRect &aSize) | 
| Set the size all the buttons on this palette should be.   | |
| void | Popup (wxWindow *aFocus=nullptr) override | 
| Popup this window.   | |
| void | SetGroup (ACTION_GROUP *aGroup) | 
| Set the action group that this palette contains the actions for.   | |
| ACTION_GROUP * | GetGroup () | 
Protected Member Functions | |
| void | onCharHook (wxKeyEvent &aEvent) | 
Protected Attributes | |
| ACTION_GROUP * | m_group | 
| The size each button on the toolbar should be.   | |
| wxRect | m_buttonSize | 
| True if the palette uses vertical buttons, false for horizontal buttons.   | |
| bool | m_isVertical | 
| wxPanel * | m_panel | 
| wxBoxSizer * | m_mainSizer | 
| wxBoxSizer * | m_buttonSizer | 
| The buttons that act as the toolbar on the palette.   | |
| std::map< int, BITMAP_BUTTON * > | m_buttons | 
A popup window that contains a row of toolbar-like buttons for the user to choose from.
Definition at line 114 of file action_toolbar.h.
| ACTION_TOOLBAR_PALETTE::ACTION_TOOLBAR_PALETTE | ( | wxWindow * | aParent, | 
| bool | aVertical ) | 
Create the palette.
| aParent | is the parent window | 
| aVertical | is true if the palette should make the buttons a vertical line, false for a horizontal line. | 
Definition at line 112 of file action_toolbar.cpp.
References m_buttonSizer, m_group, m_isVertical, m_mainSizer, m_panel, onCharHook(), and PALETTE_BORDER.
| void ACTION_TOOLBAR_PALETTE::AddAction | ( | const TOOL_ACTION & | aAction | ) | 
Add an action to the palette.
| aAction | is the action to add | 
Definition at line 137 of file action_toolbar.cpp.
References BITMAP_BUTTON::AcceptDragInAsClick(), BUTTON_BORDER, TOOL_ACTION::GetButtonTooltip(), PGM_BASE::GetCommonSettings(), KIPLATFORM::UI::GetContentScaleFactor(), TOOL_ACTION::GetIcon(), TOOL_ACTION::GetUIId(), KiBitmapBundle(), KiDisabledBitmapBundle(), COMMON_SETTINGS::m_Appearance, m_buttons, m_buttonSize, m_buttonSizer, m_isVertical, m_panel, Pgm(), BITMAP_BUTTON::SetBitmap(), BITMAP_BUTTON::SetBitmapCentered(), BITMAP_BUTTON::SetDisabledBitmap(), BITMAP_BUTTON::SetIsToolbarButton(), BITMAP_BUTTON::SetPadding(), and COMMON_SETTINGS::APPEARANCE::toolbar_icon_size.
| void ACTION_TOOLBAR_PALETTE::CheckAction | ( | const TOOL_ACTION & | aAction, | 
| bool | aCheck = true ) | 
Check/Toggle the button for an action on the palette.
| aAction | is the action who's button should be checked | 
| aCheck | is true to check the button, false to uncheck | 
Definition at line 177 of file action_toolbar.cpp.
References TOOL_ACTION::GetUIId(), and m_buttons.
| void ACTION_TOOLBAR_PALETTE::EnableAction | ( | const TOOL_ACTION & | aAction, | 
| bool | aEnable = true ) | 
Enable the button for an action on the palette.
| aAction | is the action who's button should be enabled | 
| aEnable | is true to enable the button, false to disable | 
Definition at line 168 of file action_toolbar.cpp.
References TOOL_ACTION::GetUIId(), and m_buttons.
      
  | 
  inline | 
Definition at line 169 of file action_toolbar.h.
References m_group.
      
  | 
  protected | 
Definition at line 195 of file action_toolbar.cpp.
Referenced by ACTION_TOOLBAR_PALETTE().
      
  | 
  override | 
Popup this window.
| aFocus | is the window to keep focus on (if supported) | 
Definition at line 186 of file action_toolbar.cpp.
References m_mainSizer, and m_panel.
      
  | 
  inline | 
Set the size all the buttons on this palette should be.
This function will automatically pad all button bitmaps to ensure this size is met.
| aSize | is the requested size of the buttons | 
Definition at line 156 of file action_toolbar.h.
References m_buttonSize.
      
  | 
  inline | 
Set the action group that this palette contains the actions for.
Definition at line 168 of file action_toolbar.h.
References m_group.
      
  | 
  protected | 
Definition at line 188 of file action_toolbar.h.
Referenced by AddAction(), CheckAction(), and EnableAction().
      
  | 
  protected | 
True if the palette uses vertical buttons, false for horizontal buttons.
Definition at line 178 of file action_toolbar.h.
Referenced by AddAction(), and SetButtonSize().
      
  | 
  protected | 
The buttons that act as the toolbar on the palette.
Definition at line 185 of file action_toolbar.h.
Referenced by ACTION_TOOLBAR_PALETTE(), and AddAction().
      
  | 
  protected | 
The size each button on the toolbar should be.
Definition at line 175 of file action_toolbar.h.
Referenced by ACTION_TOOLBAR_PALETTE(), GetGroup(), and SetGroup().
      
  | 
  protected | 
Definition at line 181 of file action_toolbar.h.
Referenced by ACTION_TOOLBAR_PALETTE(), and AddAction().
      
  | 
  protected | 
Definition at line 184 of file action_toolbar.h.
Referenced by ACTION_TOOLBAR_PALETTE(), and Popup().
      
  | 
  protected | 
Definition at line 183 of file action_toolbar.h.
Referenced by ACTION_TOOLBAR_PALETTE(), AddAction(), and Popup().