21#include <wx/treebook.h> 
   65                  wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL,
 
   74    SetSizeHints( wxDefaultSize, wxDefaultSize );
 
   90    wxIconBundle icon_bundle;
 
   93    icon_bundle.AddIcon( icon );
 
   95    icon_bundle.AddIcon( icon );
 
   97    icon_bundle.AddIcon( icon );
 
   99    icon_bundle.AddIcon( icon );
 
  101    icon_bundle.AddIcon( icon );
 
  103    SetIcons( icon_bundle );
 
  118    GetSizer()->SetSizeHints( 
this );
 
  127    for( 
size_t pageId = 0; pageId < 
m_treebook->GetPageCount(); pageId++ )
 
  134    Bind( wxEVT_SYS_COLOUR_CHANGED,
 
  137    m_treebook->Connect( wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED, wxTreebookEventHandler(
 
 
  144    m_treebook->Disconnect( wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED, wxTreebookEventHandler(
 
 
  158    if( aEvent.GetId() == wxID_EXIT )
 
  161    if( aEvent.GetId() == wxID_CLOSE || 
Kiface().IsSingle() )
 
 
  168    m_treebook->AddPage( 
nullptr, 
_( 
"General system design" ) );
 
  173    m_treebook->AddPage( 
nullptr, 
_( 
"Power, current and isolation" ) );
 
  197        regPanel->ReadDataFile();
 
 
  207    wxCHECK( base_frame,  );
 
  211    wxMenuBar*  oldMenuBar = base_frame->GetMenuBar();
 
  218    fileMenu->
AddClose( 
_( 
"Calculator Tools" ) );
 
  219    fileMenu->
AddQuit( 
_( 
"Calculator Tools" ) );
 
  227    prefsMenu->AppendSeparator();
 
  233    menuBar->Append( fileMenu, 
_( 
"&File" ) );
 
  234    menuBar->Append( prefsMenu, 
_( 
"&Preferences" ) );
 
  235    base_frame->AddStandardHelpMenu( menuBar );
 
  237    base_frame->SetMenuBar( menuBar );
 
 
  246    SetTitle( 
_( 
"Calculator Tools" ) );
 
 
  268    int page = aEvent.GetSelection();
 
  271    if ( 
m_treebook->GetPageParent( page ) == wxNOT_FOUND )
 
 
  288    m_treebook->AddSubPage( aPanel, panelUIName );
 
 
  299        panel->ThemeChanged();
 
 
  317        wxASSERT( translinePanel );
 
  318        wxASSERT( attenPanel );
 
  319        wxASSERT( viaSizePanel );
 
  320        wxASSERT( regulPanel );
 
  321        wxASSERT( elecSpacingPanel );
 
  324            wxCommandEvent event2( wxEVT_RADIOBUTTON );
 
  335                wxCommandEvent event2( wxEVT_RADIOBUTTON );
 
  345        viaSizePanel->Layout();
 
  346        regulPanel->Layout();
 
 
  360    wxASSERT( regPanel );
 
  365        wxString title = 
_( 
"Write Data Failed" );
 
  369            msg = 
_( 
"No data filename to save modifications.\n" 
  370                     "Do you want to exit and abandon your changes?" );
 
  372            if( wxMessageBox( msg, title, wxYES_NO | wxICON_QUESTION ) == wxNO )
 
  379                msg.Printf( 
_( 
"Unable to write file '%s'\n" 
  380                               "Do you want to exit and abandon your changes?"),
 
  383                if( wxMessageBox( msg, title, wxYES_NO | wxICON_ERROR ) == wxNO )
 
 
  395    if( aCfg == 
nullptr )
 
  405        panel->LoadSettings( cfg );
 
 
  411    if( aCfg == 
nullptr )
 
  424            panel->SaveSettings( cfg );
 
 
constexpr EDA_IU_SCALE unityScale
 
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
 
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
 
BITMAP_STORE * GetBitmapStore()
 
static TOOL_ACTION openPreferences
 
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
 
void ThemeChanged()
Notifies the store that the icon theme has been changed by the user, so caches must be invalidated.
 
Handle actions that are shared between different applications.
 
virtual APP_SETTINGS_BASE * config() const
Return the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
 
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
 
virtual void setupUIConditions()
Setup the UI conditions for the various actions and their controls in this frame.
 
EDA_BASE_FRAME(wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName, KIWAY *aKiway, const EDA_IU_SCALE &aIuScale)
 
void AddMenuLanguageList(ACTION_MENU *aMasterMenu, TOOL_INTERACTIVE *aControlTool)
Create a menu list for language choice, and add it as submenu to MasterMenu.
 
virtual void LoadSettings(APP_SETTINGS_BASE *aCfg)
Load common frame parameters from a configuration file.
 
virtual void SaveSettings(APP_SETTINGS_BASE *aCfg)
Save common frame parameters to a configuration data file.
 
void ReCreateMenuBar()
Recreate the menu bar.
 
APP_SETTINGS_BASE * KifaceSettings() const
 
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
 
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
 
KIWAY_PLAYER(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName, const EDA_IU_SCALE &aIuScale)
 
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
 
bool m_RegulatorListChanged
 
const wxString GetDataFilename()
 
ATTENUATOR * m_CurrAttenuator
 
std::vector< ATTENUATOR * > m_AttenuatorList
 
wxRadioBox * GetAttenuatorsSelector()
 
wxRadioBox * GetTranslineSelector()
 
TRANSLINE_TYPE_ID GetCurrTransLineType()
 
Handle actions for the various symbol editor and viewers.
 
PCB calculator the main frame.
 
void doReCreateMenuBar() override
 
void OnPageChanged(wxTreebookEvent &aEvent)
 
PCB_CALCULATOR_FRAME(KIWAY *aKiway, wxWindow *aParent)
 
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
 
std::vector< CALCULATOR_PANEL * > m_panels
 
void OnUpdateUI(wxUpdateUIEvent &event)
 
void onThemeChanged(wxSysColourChangedEvent &aEvent)
 
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
 
void OnExit(wxCommandEvent &aEvent)
Event handler for the wxID_EXIT and wxID_CLOSE events.
 
void OnClosePcbCalc(wxCloseEvent &event)
 
void AddCalculator(CALCULATOR_PANEL *aPanel, const wxString &panelUIName)
 
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
 
std::map< std::size_t, CALCULATOR_PANEL * > m_panelTypes
 
Represent a set of closed polygons.
 
KICOMMON_API wxFont GetControlFont(wxWindow *aWindow)
 
void Refresh()
Update the board display after modifying it by a python script (note: it is automatically called by a...
 
std::vector< FAB_LAYER_COLOR > dummy