KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
dialog_git_repository_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a-dirty)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12DIALOG_GIT_REPOSITORY_BASE::DIALOG_GIT_REPOSITORY_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( wxSize( -1,-1 ), wxDefaultSize );
15
16 bSizerMain = new wxBoxSizer( wxVERTICAL );
17
18 m_staticText1 = new wxStaticText( this, wxID_ANY, _("Connection"), wxDefaultPosition, wxDefaultSize, 0 );
19 m_staticText1->Wrap( -1 );
20 bSizerMain->Add( m_staticText1, 0, wxLEFT|wxTOP, 10 );
21
22 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
23 bSizerMain->Add( m_staticline1, 0, wxALL|wxEXPAND, 5 );
24
25 wxFlexGridSizer* fgSizer2;
26 fgSizer2 = new wxFlexGridSizer( 0, 2, 5, 0 );
27 fgSizer2->AddGrowableCol( 1 );
28 fgSizer2->SetFlexibleDirection( wxBOTH );
29 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
30
31 m_staticText3 = new wxStaticText( this, wxID_ANY, _("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
32 m_staticText3->Wrap( -1 );
33 m_staticText3->Hide();
34
35 fgSizer2->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
36
37 m_txtName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
38 m_txtName->Hide();
39
40 fgSizer2->Add( m_txtName, 0, wxEXPAND|wxRIGHT, 5 );
41
42 m_staticText4 = new wxStaticText( this, wxID_ANY, _("Location:"), wxDefaultPosition, wxDefaultSize, 0 );
43 m_staticText4->Wrap( -1 );
44 fgSizer2->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
45
46 m_txtURL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
47 fgSizer2->Add( m_txtURL, 0, wxEXPAND|wxRIGHT, 5 );
48
49 m_staticText9 = new wxStaticText( this, wxID_ANY, _("Connection type:"), wxDefaultPosition, wxDefaultSize, 0 );
50 m_staticText9->Wrap( -1 );
51 m_staticText9->Hide();
52
53 fgSizer2->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
54
55 wxBoxSizer* bSizer3;
56 bSizer3 = new wxBoxSizer( wxHORIZONTAL );
57
58 wxString m_ConnTypeChoices[] = { _("HTTPS"), _("SSH"), _("Local") };
59 int m_ConnTypeNChoices = sizeof( m_ConnTypeChoices ) / sizeof( wxString );
60 m_ConnType = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ConnTypeNChoices, m_ConnTypeChoices, 0 );
61 m_ConnType->SetSelection( 0 );
62 m_ConnType->Hide();
63
64 bSizer3->Add( m_ConnType, 0, wxRIGHT, 5 );
65
66
67 bSizer3->Add( 0, 0, 0, wxEXPAND, 5 );
68
69
70 fgSizer2->Add( bSizer3, 1, wxEXPAND, 5 );
71
72
73 bSizerMain->Add( fgSizer2, 0, wxEXPAND, 5 );
74
75 m_panelAuth = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
76 wxBoxSizer* m_szAuth;
77 m_szAuth = new wxBoxSizer( wxVERTICAL );
78
79 m_staticText2 = new wxStaticText( m_panelAuth, wxID_ANY, _("Authentication"), wxDefaultPosition, wxDefaultSize, 0 );
80 m_staticText2->Wrap( -1 );
81 m_szAuth->Add( m_staticText2, 0, wxLEFT|wxTOP, 10 );
82
83 m_staticline2 = new wxStaticLine( m_panelAuth, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
84 m_szAuth->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
85
86 wxFlexGridSizer* fgSizer21;
87 fgSizer21 = new wxFlexGridSizer( 0, 2, 5, 0 );
88 fgSizer21->SetFlexibleDirection( wxBOTH );
89 fgSizer21->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
90
91 m_cbCustom = new wxCheckBox( m_panelAuth, wxID_ANY, _("SSH private key: "), wxDefaultPosition, wxDefaultSize, 0 );
92 fgSizer21->Add( m_cbCustom, 0, wxALL, 5 );
93
94 m_fpSSHKey = new wxFilePickerCtrl( m_panelAuth, wxID_ANY, wxEmptyString, _("Select SSH private key file"), _("*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE|wxFLP_FILE_MUST_EXIST|wxFLP_OPEN );
95 m_fpSSHKey->SetMinSize( wxSize( 250,-1 ) );
96
97 fgSizer21->Add( m_fpSSHKey, 0, wxEXPAND|wxRIGHT, 5 );
98
99 m_staticText11 = new wxStaticText( m_panelAuth, wxID_ANY, _("User name:"), wxDefaultPosition, wxDefaultSize, 0 );
100 m_staticText11->Wrap( -1 );
101 fgSizer21->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
102
103 m_txtUsername = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
104 fgSizer21->Add( m_txtUsername, 0, wxEXPAND|wxRIGHT, 5 );
105
106 m_labelPass1 = new wxStaticText( m_panelAuth, wxID_ANY, _("SSH key password:"), wxDefaultPosition, wxDefaultSize, 0 );
107 m_labelPass1->Wrap( -1 );
108 fgSizer21->Add( m_labelPass1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
109
110 m_txtPassword = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
111 fgSizer21->Add( m_txtPassword, 0, wxEXPAND|wxRIGHT, 5 );
112
113
114 m_szAuth->Add( fgSizer21, 1, wxBOTTOM|wxEXPAND, 5 );
115
116
117 m_panelAuth->SetSizer( m_szAuth );
118 m_panelAuth->Layout();
119 m_szAuth->Fit( m_panelAuth );
120 bSizerMain->Add( m_panelAuth, 0, wxEXPAND|wxTOP, 5 );
121
122
123 bSizerMain->Add( 0, 0, 1, wxEXPAND, 5 );
124
125 m_sdbSizer = new wxStdDialogButtonSizer();
126 m_sdbSizerOK = new wxButton( this, wxID_OK );
127 m_sdbSizer->AddButton( m_sdbSizerOK );
128 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
129 m_sdbSizer->AddButton( m_sdbSizerCancel );
130 m_sdbSizerHelp = new wxButton( this, wxID_HELP );
131 m_sdbSizer->AddButton( m_sdbSizerHelp );
132 m_sdbSizer->Realize();
133
134 bSizerMain->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
135
136
137 this->SetSizer( bSizerMain );
138 this->Layout();
139 bSizerMain->Fit( this );
140
141 this->Centre( wxBOTH );
142
143 // Connect Events
144 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnClose ) );
145 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnUpdateUI ) );
146 m_txtURL->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnLocationExit ), NULL, this );
147 m_ConnType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnSelectConnType ), NULL, this );
148 m_cbCustom->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GIT_REPOSITORY_BASE::onCbCustom ), NULL, this );
149 m_fpSSHKey->Connect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnFileUpdated ), NULL, this );
150 m_sdbSizerHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnTestClick ), NULL, this );
151 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnOKClick ), NULL, this );
152}
153
155{
156 // Disconnect Events
157 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnClose ) );
158 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnUpdateUI ) );
159 m_txtURL->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnLocationExit ), NULL, this );
160 m_ConnType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnSelectConnType ), NULL, this );
161 m_cbCustom->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GIT_REPOSITORY_BASE::onCbCustom ), NULL, this );
162 m_fpSSHKey->Disconnect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnFileUpdated ), NULL, this );
163 m_sdbSizerHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnTestClick ), NULL, this );
164 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GIT_REPOSITORY_BASE::OnOKClick ), NULL, this );
165
166}
wxStdDialogButtonSizer * m_sdbSizer
virtual void onCbCustom(wxCommandEvent &event)
virtual void OnOKClick(wxCommandEvent &event)
virtual void OnTestClick(wxCommandEvent &event)
virtual void OnClose(wxCloseEvent &event)
DIALOG_GIT_REPOSITORY_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Git Repository"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnFileUpdated(wxFileDirPickerEvent &event)
virtual void OnLocationExit(wxFocusEvent &event)
virtual void OnSelectConnType(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:52
#define _(s)