KiCad PCB EDA Suite
|
A panel that contains buttons, arranged on the left and/or right sides. More...
#include <button_row_panel.h>
Classes | |
struct | BTN_DEF |
The information needed to instantiate a button on a BUTTON_ROW_PANEL. More... | |
Public Types | |
using | BTN_CALLBACK = std::function< void(wxCommandEvent &) > |
Callback function definition. | |
using | BTN_DEF_LIST = std::vector< BTN_DEF > |
A list of BTN_DEFs, used to group buttons into the left/right groups. | |
Public Member Functions | |
BUTTON_ROW_PANEL (wxWindow *aWindow, const BTN_DEF_LIST &aLeftBtns, const BTN_DEF_LIST &aRightBtns) | |
Construct a SIMPLE_BUTTON_PANEL with a set of buttons on each side. | |
Private Member Functions | |
void | addButtons (bool aLeft, const BTN_DEF_LIST &aDefs) |
Add a set of buttons to one side of the panel. | |
Private Attributes | |
wxBoxSizer * | m_sizer |
A panel that contains buttons, arranged on the left and/or right sides.
Definition at line 40 of file button_row_panel.h.
using BUTTON_ROW_PANEL::BTN_CALLBACK = std::function< void( wxCommandEvent& ) > |
Callback function definition.
A callback of this type can be registered to handle the button click event.
Definition at line 48 of file button_row_panel.h.
using BUTTON_ROW_PANEL::BTN_DEF_LIST = std::vector<BTN_DEF> |
A list of BTN_DEFs, used to group buttons into the left/right groups.
Definition at line 81 of file button_row_panel.h.
BUTTON_ROW_PANEL::BUTTON_ROW_PANEL | ( | wxWindow * | aWindow, |
const BTN_DEF_LIST & | aLeftBtns, | ||
const BTN_DEF_LIST & | aRightBtns | ||
) |
Construct a SIMPLE_BUTTON_PANEL with a set of buttons on each side.
aLeftBtns | buttons on the left side, from left to right |
aRightBtns | buttons on the right side, from left to right |
Definition at line 31 of file button_row_panel.cpp.
References addButtons(), KIUI::GetStdMargin(), and m_sizer.
|
private |
Add a set of buttons to one side of the panel.
aSizer | the sizer to add them to |
aLeft | place on the left (false for right) |
aDefs | list of button defs, from left to right |
Definition at line 50 of file button_row_panel.cpp.
References KIUI::GetStdMargin(), and m_sizer.
Referenced by BUTTON_ROW_PANEL().
|
private |
Definition at line 104 of file button_row_panel.h.
Referenced by addButtons(), and BUTTON_ROW_PANEL().