34 wxPanel( aWindow, wxID_ANY )
36 m_sizer =
new wxBoxSizer( wxHORIZONTAL );
55 const int btn_proportion = 0;
57 for(
size_t i = 0; i < aDefs.size(); ++i )
59 const auto& def = aDefs[i];
60 wxButton* btn =
new wxButton(
this, def.m_id, def.m_text );
63 long this_style = wxEXPAND;
65 if( ( aLeft && i > 0 ) || ( !aLeft ) )
68 if( ( aLeft ) || ( !aLeft && i < aDefs.size() - 1 ) )
69 this_style |= wxRIGHT;
71 btn->SetToolTip( def.m_tooltip );
73 m_sizer->Add( btn, btn_proportion, this_style, btn_margin );
75 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.