KiCad PCB EDA Suite
dialog_group_properties_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version Oct 26 2018)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12DIALOG_GROUP_PROPERTIES_BASE::DIALOG_GROUP_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
13{
14 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15
16 wxBoxSizer* bSizerMain;
17 bSizerMain = new wxBoxSizer( wxVERTICAL );
18
19 wxBoxSizer* bSizerUpper;
20 bSizerUpper = new wxBoxSizer( wxVERTICAL );
21
22 wxFlexGridSizer* fgSizer1;
23 fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
24 fgSizer1->AddGrowableCol( 1 );
25 fgSizer1->SetFlexibleDirection( wxBOTH );
26 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
27
28 m_nameLabel = new wxStaticText( this, wxID_ANY, _("Group name:"), wxDefaultPosition, wxDefaultSize, 0 );
29 m_nameLabel->Wrap( -1 );
30 fgSizer1->Add( m_nameLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
31
32 m_nameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
33 fgSizer1->Add( m_nameCtrl, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
34
35
36 bSizerUpper->Add( fgSizer1, 0, wxEXPAND, 5 );
37
38 m_locked = new wxCheckBox( this, wxID_ANY, _("Locked"), wxDefaultPosition, wxDefaultSize, 0 );
39 m_locked->SetToolTip( _("Prevents group from being moved on canvas") );
40
41 bSizerUpper->Add( m_locked, 0, wxALL, 5 );
42
43 m_membersLabel = new wxStaticText( this, wxID_ANY, _("Group members:"), wxDefaultPosition, wxDefaultSize, 0 );
44 m_membersLabel->Wrap( -1 );
45 bSizerUpper->Add( m_membersLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
46
47 m_membersList = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
48 m_membersList->SetMinSize( wxSize( 360,200 ) );
49
50 bSizerUpper->Add( m_membersList, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
51
52 wxBoxSizer* bMembershipButtons;
53 bMembershipButtons = new wxBoxSizer( wxHORIZONTAL );
54
55 m_bpAddMember = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
56 bMembershipButtons->Add( m_bpAddMember, 0, wxALL, 5 );
57
58 m_bpRemoveMember = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
59 bMembershipButtons->Add( m_bpRemoveMember, 0, wxALL, 5 );
60
61
62 bSizerUpper->Add( bMembershipButtons, 0, wxEXPAND, 5 );
63
64
65 bSizerMain->Add( bSizerUpper, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
66
67 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
68 bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
69
70 m_sdbSizer = new wxStdDialogButtonSizer();
71 m_sdbSizerOK = new wxButton( this, wxID_OK );
72 m_sdbSizer->AddButton( m_sdbSizerOK );
73 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
74 m_sdbSizer->AddButton( m_sdbSizerCancel );
75 m_sdbSizer->Realize();
76
77 bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
78
79
80 this->SetSizer( bSizerMain );
81 this->Layout();
82 bSizerMain->Fit( this );
83
84 this->Centre( wxBOTH );
85
86 // Connect Events
87 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GROUP_PROPERTIES_BASE::onClose ) );
88 m_membersList->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_GROUP_PROPERTIES_BASE::OnMemberSelected ), NULL, this );
89 m_bpAddMember->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GROUP_PROPERTIES_BASE::OnAddMember ), NULL, this );
90 m_bpRemoveMember->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GROUP_PROPERTIES_BASE::OnRemoveMember ), NULL, this );
91}
92
94{
95 // Disconnect Events
96 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GROUP_PROPERTIES_BASE::onClose ) );
97 m_membersList->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_GROUP_PROPERTIES_BASE::OnMemberSelected ), NULL, this );
98 m_bpAddMember->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GROUP_PROPERTIES_BASE::OnAddMember ), NULL, this );
99 m_bpRemoveMember->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GROUP_PROPERTIES_BASE::OnRemoveMember ), NULL, this );
100
101}
virtual void OnRemoveMember(wxCommandEvent &event)
virtual void OnAddMember(wxCommandEvent &event)
virtual void onClose(wxCloseEvent &event)
virtual void OnMemberSelected(wxCommandEvent &event)
DIALOG_GROUP_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Group Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
#define _(s)