34 wxPanel( aWindow, wxID_ANY )
36 m_sizer =
new wxBoxSizer( wxHORIZONTAL );
54 const int btn_proportion = 0;
56 for(
size_t i = 0; i < aDefs.size(); ++i )
58 const auto& def = aDefs[i];
59 wxButton* btn =
new wxButton(
this, def.m_id, def.m_text );
62 long this_style = wxEXPAND;
64 if( ( aLeft && i > 0 ) || ( !aLeft ) )
67 if( ( aLeft ) || ( !aLeft && i < aDefs.size() - 1 ) )
68 this_style |= wxRIGHT;
70 btn->SetToolTip( def.m_tooltip );
72 m_sizer->Add( btn, btn_proportion, this_style, btn_margin );
74 btn->Bind( wxEVT_COMMAND_BUTTON_CLICKED, def.m_callback );
KICOMMON_API int GetStdMargin()
Get the standard margin around a widget in the KiCad UI.
Functions to provide common constants and other functions to assist in making a consistent UI.