KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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
9#include "widgets/wx_grid.h"
10
12
14
15DIALOG_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 )
16{
17 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
18
19 wxBoxSizer* m_MainSizer;
20 m_MainSizer = new wxBoxSizer( wxVERTICAL );
21
22 wxBoxSizer* m_TopSizer;
23 m_TopSizer = new wxBoxSizer( wxVERTICAL );
24
25 m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
26
27 // Grid
28 m_grid->CreateGrid( 5, 2 );
29 m_grid->EnableEditing( false );
30 m_grid->EnableGridLines( true );
31 m_grid->EnableDragGridSize( false );
32 m_grid->SetMargins( 0, 0 );
33
34 // Columns
35 m_grid->SetColSize( 0, 200 );
36 m_grid->SetColSize( 1, 400 );
37 m_grid->EnableDragColMove( false );
38 m_grid->EnableDragColSize( true );
39 m_grid->SetColLabelValue( 0, _("Name") );
40 m_grid->SetColLabelValue( 1, _("URL") );
42 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
43
44 // Rows
45 m_grid->EnableDragRowSize( true );
46 m_grid->SetRowLabelSize( 0 );
47 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
48
49 // Label Appearance
50
51 // Cell Defaults
52 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
53 m_TopSizer->Add( m_grid, 1, wxEXPAND|wxALL, 5 );
54
55 wxBoxSizer* bButtonsSizer;
56 bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
57
58 m_buttonAdd = new SPLIT_BUTTON( this, wxID_ANY, _( "Add Existing" ) );
59 m_buttonAdd->SetToolTip( _("Add repository") );
60
61 bButtonsSizer->Add( m_buttonAdd, 0, wxRIGHT, 5 );
62
63 m_buttonMoveUp = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
64 m_buttonMoveUp->SetToolTip( _("Move up") );
65
66 bButtonsSizer->Add( m_buttonMoveUp, 0, wxRIGHT, 5 );
67
68 m_buttonMoveDown = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
69 m_buttonMoveDown->SetToolTip( _("Move down") );
70
71 bButtonsSizer->Add( m_buttonMoveDown, 0, wxRIGHT, 5 );
72
73
74 bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
75
76 m_buttonRemove = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
77 m_buttonRemove->SetToolTip( _("Remove repository") );
78
79 bButtonsSizer->Add( m_buttonRemove, 0, 0, 5 );
80
81
82 m_TopSizer->Add( bButtonsSizer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
83
84
85 m_MainSizer->Add( m_TopSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
86
87 m_sdbSizer1 = new wxStdDialogButtonSizer();
88 m_sdbSizer1Save = new wxButton( this, wxID_SAVE );
89 m_sdbSizer1->AddButton( m_sdbSizer1Save );
90 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
91 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
92 m_sdbSizer1->Realize();
93
94 m_MainSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
95
96
97 this->SetSizer( m_MainSizer );
98 this->Layout();
99 m_MainSizer->Fit( this );
100
101 this->Centre( wxBOTH );
102
103 // Connect Events
104 m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnGridCellClicked ), NULL, this );
105 m_buttonMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnMoveUpButtonClicked ), NULL, this );
106 m_buttonMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnMoveDownButtonClicked ), NULL, this );
107 m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnRemoveButtonClicked ), NULL, this );
108 m_sdbSizer1Save->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnSaveClicked ), NULL, this );
109}
110
112{
113 // Disconnect Events
114 m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnGridCellClicked ), NULL, this );
115 m_buttonMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnMoveUpButtonClicked ), NULL, this );
116 m_buttonMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnMoveDownButtonClicked ), NULL, this );
117 m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnRemoveButtonClicked ), NULL, this );
118 m_sdbSizer1Save->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MANAGE_REPOSITORIES_BASE::OnSaveClicked ), NULL, this );
119
120}
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:88
A bitmap button widget that behaves like a standard dialog button except with an icon.
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:249
#define _(s)