KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_group_properties_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
13
14DIALOG_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 )
15{
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
17
18 wxBoxSizer* bSizerMain;
19 bSizerMain = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* bSizerUpper;
22 bSizerUpper = new wxBoxSizer( wxVERTICAL );
23
24 wxFlexGridSizer* fgSizer1;
25 fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
26 fgSizer1->AddGrowableCol( 1 );
27 fgSizer1->SetFlexibleDirection( wxBOTH );
28 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
29
30 m_nameLabel = new wxStaticText( this, wxID_ANY, _("Group name:"), wxDefaultPosition, wxDefaultSize, 0 );
31 m_nameLabel->Wrap( -1 );
32 fgSizer1->Add( m_nameLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
33
34 m_nameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
35 fgSizer1->Add( m_nameCtrl, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
36
37
38 bSizerUpper->Add( fgSizer1, 0, wxEXPAND, 5 );
39
40 m_locked = new wxCheckBox( this, wxID_ANY, _("Locked"), wxDefaultPosition, wxDefaultSize, 0 );
41 m_locked->SetToolTip( _("Prevents group from being moved on canvas") );
42
43 bSizerUpper->Add( m_locked, 0, wxALL, 5 );
44
45 m_membersLabel = new wxStaticText( this, wxID_ANY, _("Group members:"), wxDefaultPosition, wxDefaultSize, 0 );
46 m_membersLabel->Wrap( -1 );
47 bSizerUpper->Add( m_membersLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
48
49 m_membersList = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
50 m_membersList->SetMinSize( wxSize( 360,200 ) );
51
52 bSizerUpper->Add( m_membersList, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
53
54 wxBoxSizer* bMembershipButtons;
55 bMembershipButtons = new wxBoxSizer( wxHORIZONTAL );
56
57 m_bpAddMember = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
58 bMembershipButtons->Add( m_bpAddMember, 0, wxALL, 5 );
59
60
61 bMembershipButtons->Add( 10, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
62
63 m_bpRemoveMember = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
64 bMembershipButtons->Add( m_bpRemoveMember, 0, wxALL, 5 );
65
66
67 bSizerUpper->Add( bMembershipButtons, 0, wxBOTTOM|wxEXPAND, 5 );
68
69
70 bSizerMain->Add( bSizerUpper, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
71
72 m_sdbSizer = new wxStdDialogButtonSizer();
73 m_sdbSizerOK = new wxButton( this, wxID_OK );
74 m_sdbSizer->AddButton( m_sdbSizerOK );
75 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
76 m_sdbSizer->AddButton( m_sdbSizerCancel );
77 m_sdbSizer->Realize();
78
79 bSizerMain->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
80
81
82 this->SetSizer( bSizerMain );
83 this->Layout();
84 bSizerMain->Fit( this );
85
86 this->Centre( wxBOTH );
87
88 // Connect Events
89 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GROUP_PROPERTIES_BASE::onClose ) );
90 m_membersList->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_GROUP_PROPERTIES_BASE::OnMemberSelected ), NULL, this );
91 m_bpAddMember->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GROUP_PROPERTIES_BASE::OnAddMember ), NULL, this );
92 m_bpRemoveMember->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GROUP_PROPERTIES_BASE::OnRemoveMember ), NULL, this );
93}
94
96{
97 // Disconnect Events
98 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GROUP_PROPERTIES_BASE::onClose ) );
99 m_membersList->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_GROUP_PROPERTIES_BASE::OnMemberSelected ), NULL, this );
100 m_bpAddMember->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GROUP_PROPERTIES_BASE::OnAddMember ), NULL, this );
101 m_bpRemoveMember->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GROUP_PROPERTIES_BASE::OnRemoveMember ), NULL, this );
102
103}
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:88
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)