109 :
112 m_leftWin( nullptr ),
113 m_launcher( nullptr ),
114 m_mainToolBar( nullptr )
115{
116 m_active_project = false;
117 m_leftWinWidth = 250;
118 m_aboutTitle = "KiCad";
119
120
121
122
123
125
126
127
128 CreateStatusBar( 2 );
130
131
132 wxIcon icon;
133 wxIconBundle icon_bundle;
134
135#if KICAD_IS_NIGHTLY
137 icon_bundle.AddIcon( icon );
139 icon_bundle.AddIcon( icon );
141 icon_bundle.AddIcon( icon );
142#else
144 icon_bundle.AddIcon( icon );
146 icon_bundle.AddIcon( icon );
148 icon_bundle.AddIcon( icon );
149#endif
150
151 SetIcons( icon_bundle );
152
153
155
156
158
159 setupTools();
160 setupUIConditions();
161
163
164 RecreateBaseHToolbar();
165 ReCreateMenuBar();
166
167 m_auimgr.SetManagedWindow( this );
168 m_auimgr.SetFlags( wxAUI_MGR_LIVE_RESIZE );
169
170 m_auimgr.AddPane( m_mainToolBar,
EDA_PANE().HToolbar().Name(
"MainToolbar" ).
Left()
171 .Layer( 2 ) );
172
173
174
175
176
177
178 m_auimgr.AddPane( m_leftWin,
EDA_PANE().Palette().Name(
"ProjectTree" ).
Left().Layer( 1 )
179 .Caption(
_(
"Project Files" ) ).PaneBorder(
false )
180 .MinSize( m_leftWinWidth, -1 ).BestSize( m_leftWinWidth, -1 ) );
181
182 m_auimgr.AddPane( m_launcher,
EDA_PANE().Canvas().Name(
"Launcher" ).
Center()
183 .Caption(
_(
"Editors" ) ).PaneBorder(
false )
184 .MinSize( m_launcher->GetBestSize() ) );
185
186 m_auimgr.Update();
187
188
189 m_auimgr.GetPane( m_leftWin ).MinSize( 250, -1 );
190
191 wxSizer* mainSizer = GetSizer();
192
193
194 if( mainSizer &&
config()->m_Window.state.size_x == 0 &&
config()->m_Window.state.size_y == 0 )
195 mainSizer->Fit( this );
196
198 SetTitle( wxT( "KiCad" ) );
199 else
201
202
203 m_leftWin->SetFocus();
204
205 DragAcceptFiles( true );
206
207
208 Raise();
209}
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.
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.
PROJECT_TREE_PANE Window to display the tree files.
#define KICAD_DEFAULT_DRAWFRAME_STYLE
#define KICAD_MANAGER_FRAME_NAME
wxFont GetStatusFont(wxWindow *aWindow)
static LIB_SYMBOL * dummy()
Used to draw a dummy shape when a LIB_SYMBOL is not found in library.