118 :
121 m_leftWin( nullptr ),
122 m_launcher( nullptr ),
123 m_mainToolBar( nullptr )
124{
125 m_active_project = false;
126 m_leftWinWidth = 250;
127 m_aboutTitle = "KiCad";
128
129
130
131
132
134
135
136
137 CreateStatusBar( 2 );
139
140
141 wxIcon icon;
142 wxIconBundle icon_bundle;
143
145 {
147 icon_bundle.AddIcon( icon );
149 icon_bundle.AddIcon( icon );
151 icon_bundle.AddIcon( icon );
152 }
153 else
154 {
156 icon_bundle.AddIcon( icon );
158 icon_bundle.AddIcon( icon );
160 icon_bundle.AddIcon( icon );
161 }
162
163 SetIcons( icon_bundle );
164
165
167
168 m_pcmButton = nullptr;
169 m_pcmUpdateCount = 0;
170 m_pcm = std::make_shared<PLUGIN_CONTENT_MANAGER>(
171 [this]( int aUpdateCount )
172 {
173 m_pcmUpdateCount = aUpdateCount;
174 CallAfter(
175 [this]()
176 {
177 updatePcmButtonBadge();
178 } );
179 },
180 [this]( const wxString aText )
181 {
182 CallAfter(
183 [aText, this]()
184 {
185 SetStatusText( aText, 1 );
186 } );
187 } );
188 m_pcm->SetRepositoryList( kicadSettings()->m_PcmRepositories );
189
190
192
193 setupTools();
194 setupUIConditions();
195
197
198 RecreateBaseHToolbar();
199 ReCreateMenuBar();
200
201 m_auimgr.SetManagedWindow( this );
202 m_auimgr.SetFlags( wxAUI_MGR_LIVE_RESIZE );
203
204 m_auimgr.AddPane( m_mainToolBar,
EDA_PANE().HToolbar().Name(
"MainToolbar" ).
Left()
205 .Layer( 2 ) );
206
207
208
209
210
211
212 m_auimgr.AddPane( m_leftWin,
EDA_PANE().Palette().Name(
"ProjectTree" ).
Left().Layer( 1 )
213 .Caption(
_(
"Project Files" ) ).PaneBorder(
false )
214 .MinSize( m_leftWinWidth, -1 ).BestSize( m_leftWinWidth, -1 ) );
215
216 m_auimgr.AddPane( m_launcher,
EDA_PANE().Canvas().Name(
"Launcher" ).
Center()
217 .Caption(
_(
"Editors" ) ).PaneBorder(
false )
218 .MinSize( m_launcher->GetBestSize() ) );
219
220 m_auimgr.Update();
221
222
223 m_auimgr.GetPane( m_leftWin ).MinSize( 250, -1 );
224
225 wxSizer* mainSizer = GetSizer();
226
227
228 if( mainSizer &&
config()->m_Window.state.size_x == 0 &&
config()->m_Window.state.size_y == 0 )
229 mainSizer->Fit( this );
230
232 SetTitle( wxT( "KiCad" ) );
233 else
235
236
237 m_leftWin->SetFocus();
238
239
242
243
244
248
249
253
254
258
259 DragAcceptFiles( true );
260
261
262 Raise();
263}
constexpr EDA_IU_SCALE unityScale
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
wxString GetMajorMinorVersion()
Get only the major and minor version in a string major.minor.
bool IsNightlyVersion()
Check if the build is meant to be nightly.
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
The base frame for deriving all KiCad main window classes.
Specialization of the wxAuiPaneInfo class for KiCad panels.
static TOOL_ACTION viewDroppedGerbers
static TOOL_ACTION loadProject
static TOOL_ACTION importNonKicadProj
PROJECT_TREE_PANE Window to display the tree files.
#define KICAD_DEFAULT_DRAWFRAME_STYLE
#define KICAD_MANAGER_FRAME_NAME
const std::string CadstarPcbFileExtension
const std::string GerberJobFileExtension
const std::string DrillFileExtension
const std::string EagleSchematicFileExtension
const std::string LegacyProjectFileExtension
const std::string ProjectFileExtension
const std::string EaglePcbFileExtension
const std::string CadstarSchematicFileExtension
const std::string GerberFileExtension
wxFont GetStatusFont(wxWindow *aWindow)
std::vector< FAB_LAYER_COLOR > dummy