KiCad PCB EDA Suite
dialog_manage_repositories_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
8#include "widgets/wx_grid.h"
9
11
13
14DIALOG_MANAGE_REPOSITORIES_BASE::DIALOG_MANAGE_REPOSITORIES_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( wxSize( -1,-1 ), wxDefaultSize );
17
18 wxBoxSizer* m_MainSizer;
19 m_MainSizer = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* m_TopSizer;
22 m_TopSizer = new wxBoxSizer( wxVERTICAL );
23
24 m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
25
26 // Grid
27 m_grid->CreateGrid( 5, 2 );
28 m_grid->EnableEditing( false );
29 m_grid->EnableGridLines( true );
30 m_grid->EnableDragGridSize( false );
31 m_grid->SetMargins( 0, 0 );
32
33 // Columns
34 m_grid->SetColSize( 0, 200 );
35 m_grid->SetColSize( 1, 400 );
36 m_grid->EnableDragColMove( false );
37 m_grid->EnableDragColSize( true );
38 m_grid->SetColLabelValue( 0, _("Name") );
39 m_grid->SetColLabelValue( 1, _("URL") );
41 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
42
43 // Rows
44 m_grid->EnableDragRowSize( true );
45 m_grid->SetRowLabelSize( 0 );
46 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
47
48 // Label Appearance
49
50 // Cell Defaults
51 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
52 m_TopSizer->Add( m_grid, 1, wxEXPAND|wxALL, 5 );
53
54 wxBoxSizer* bButtonsSizer;
55 bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
56
57 m_buttonAdd = new SPLIT_BUTTON( this, wxID_ANY, _( "Add Existing" ) );
58 bButtonsSizer->Add( m_buttonAdd, 0, wxRIGHT, 5 );
59
60 m_buttonMoveUp = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
61 bButtonsSizer->Add( m_buttonMoveUp, 0, wxRIGHT, 5 );
62
63 m_buttonMoveDown = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
64 bButtonsSizer->Add( m_buttonMoveDown, 0, wxRIGHT, 5 );
65
66
67 bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
68
69 m_buttonRemove = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
70 bButtonsSizer->Add( m_buttonRemove, 0, 0, 5 );
71
72
73 m_TopSizer->Add( bButtonsSizer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
74
75
76 m_MainSizer->Add( m_TopSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
77
78 m_sdbSizer1 = new wxStdDialogButtonSizer();
79 m_sdbSizer1Save = new wxButton( this, wxID_SAVE );
80 m_sdbSizer1->AddButton( m_sdbSizer1Save );
81 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
82 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
83 m_sdbSizer1->Realize();
84
85 m_MainSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
86
87
88 this->SetSizer( m_MainSizer );
89 this->Layout();
90 m_MainSizer->Fit( this );
91
92 this->Centre( wxBOTH );
93
94 // Connect Events
95 m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnGridCellClicked ), NULL, this );
96 m_buttonMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnMoveUpButtonClicked ), NULL, this );
97 m_buttonMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnMoveDownButtonClicked ), NULL, this );
98 m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnRemoveButtonClicked ), NULL, this );
99 m_sdbSizer1Save->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnSaveClicked ), NULL, this );
100}
101
103{
104 // Disconnect Events
105 m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnGridCellClicked ), NULL, this );
106 m_buttonMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnMoveUpButtonClicked ), NULL, this );
107 m_buttonMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnMoveDownButtonClicked ), NULL, this );
108 m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnRemoveButtonClicked ), NULL, this );
109 m_sdbSizer1Save->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnSaveClicked ), NULL, this );
110
111}
virtual void OnMoveUpButtonClicked(wxCommandEvent &event)
virtual void OnRemoveButtonClicked(wxCommandEvent &event)
virtual void OnSaveClicked(wxCommandEvent &event)
virtual void OnMoveDownButtonClicked(wxCommandEvent &event)
DIALOG_MANAGE_REPOSITORIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Manage Repositories"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnGridCellClicked(wxGridEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:74
#define _(s)