|
KiCad PCB EDA Suite
|
Public Member Functions | |
| IFACE (const char *aName, KIWAY::FACE_T aType) | |
| bool | OnKifaceStart (PGM_BASE *aProgram, int aCtlBits, KIWAY *aKiway) override |
| Typically start_common() is called from here. | |
| void | Reset () override |
| Reloads global state. | |
| void | OnKifaceEnd () override |
| Called just once just before the DSO is to be unloaded. | |
| wxWindow * | CreateKiWindow (wxWindow *aParent, int aClassId, KIWAY *aKiway, int aCtlBits=0) override |
| Create a wxWindow for the current project. | |
| void * | IfaceOrAddress (int aDataId) override |
| Return a pointer to the requested object. | |
| PCBNEW_JOBS_HANDLER * | JobHandler () const |
| Accessor for the non-job diff/merge exports (pcbnewMergeExport etc.). | |
| void | SaveFileAs (const wxString &aProjectBasePath, const wxString &aSrcProjectName, const wxString &aNewProjectBasePath, const wxString &aNewProjectName, const wxString &aSrcFilePath, wxString &aErrors) override |
| Saving a file under a different name is delegated to the various KIFACEs because the project doesn't know the internal format of the various files (which may have paths in them that need updating). | |
| int | HandleJob (JOB *aJob, REPORTER *aReporter, PROGRESS_REPORTER *aProgressReporter) override |
| bool | HandleJobConfig (JOB *aJob, wxWindow *aParent) override |
| bool | HandleApiOpenDocument (const DOCUMENT_SPEC &aSpec, KICAD_API_SERVER *aServer, wxString *aError) override |
| bool | HandleApiCloseDocument (const DOCUMENT_SPEC &aSpec, KICAD_API_SERVER *aServer, wxString *aError) override |
Close the document identified by aSpec. | |
| bool | handleOpenPcb (const wxString &aPath, KICAD_API_SERVER *aServer, wxString *aError) |
| bool | handleCreatePcb (const wxString &aPath, KICAD_API_SERVER *aServer, wxString *aError) |
| bool | handleOpenFootprint (const wxString &aProjectPath, const wxString &aLibIdStr, KICAD_API_SERVER *aServer, wxString *aError) |
| void | PreloadLibraries (KIWAY *aKiway) override |
| void | ProjectChanged () override |
| void | CancelPreload (bool aBlock=true) override |
| void | RegisterLibraryHandlers (KICAD_API_SERVER *aServer) override |
| Register this face's library API handlers on the given server. | |
| bool | LoadAllLibraries () override |
| Starts a background load of all libraries of the type owned by this face. | |
| const wxString | Name () |
| APP_SETTINGS_BASE * | KifaceSettings () const |
| void | InitSettings (APP_SETTINGS_BASE *aSettings) |
| int | StartFlags () const |
| Return whatever was passed as aCtlBits to OnKifaceStart(). | |
| bool | IsSingle () const |
| Is this KIFACE running under single_top? | |
| const wxString & | GetHelpFileName () const |
| Return just the basename portion of the current help file. | |
| SEARCH_STACK & | KifaceSearch () |
| Only for DSO specific 'non-library' files. | |
| void | GetActions (std::vector< TOOL_ACTION * > &aActions) const override |
| Append this Kiface's registered actions to the given list. | |
| EDA_UNITS | GetUserUnits () const |
| void | SetUserUnits (EDA_UNITS aUnits) |
| virtual void | GetUnitPair (EDA_UNITS &aPrimaryUnit, EDA_UNITS &aSecondaryUnits) |
| const EDA_IU_SCALE & | GetIuScale () const |
| virtual ORIGIN_TRANSFORMS & | GetOriginTransforms () |
| wxString | StringFromValue (double aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
| Converts aValue in internal units into a united string. | |
| wxString | StringFromValue (const EDA_ANGLE &aValue, bool aAddUnitLabel=false) const |
| wxString | StringFromOptionalValue (std::optional< int > aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
| Converts an optional aValue in internal units into a united string. | |
| wxString | MessageTextFromValue (double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
| A lower-precision version of StringFromValue(). | |
| wxString | MessageTextFromValue (const EDA_ANGLE &aValue, bool aAddUnitLabel=true) const |
| wxString | MessageTextFromUnscaledValue (double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
| wxString | MessageTextFromMinOptMax (const MINOPTMAX< int > &aValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
| int | ValueFromString (const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
| Converts aTextValue in aUnits to internal units used by the frame. | |
| std::optional< int > | OptionalValueFromString (const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
| Converts aTextValue in aUnits to internal units used by the frame. | |
| EDA_ANGLE | AngleValueFromString (const wxString &aTextValue) const |
| EDA_UNITS | GetUnitsFromType (EDA_DATA_TYPE aType) const |
| Gets the units to use in the conversion based on the underlying user units. | |
Static Public Member Functions | |
| static EDA_DATA_TYPE | GetTypeFromUnits (const EDA_UNITS aUnits) |
| Gets the inferred type from the given units. | |
Static Public Attributes | |
| static const wxString | NullUiString = "" |
| The string that is used in the UI to represent a null value. | |
Protected Member Functions | |
| bool | start_common (int aCtlBits) |
| Common things to do for a top program module, during OnKifaceStart(). | |
| void | end_common () |
| Common things to do for a top program module, during OnKifaceEnd();. | |
Protected Attributes | |
| int | m_start_flags |
| flags provided in OnKifaceStart() | |
Private Member Functions | |
| void | closeBoard (KICAD_API_SERVER *aServer) |
| void | closeFootprint (KICAD_API_SERVER *aServer) |
Private Attributes | |
| std::unique_ptr< PCBNEW_JOBS_HANDLER > | m_jobHandler |
| std::shared_ptr< BACKGROUND_JOB > | m_libraryPreloadBackgroundJob |
| std::future< void > | m_libraryPreloadReturn |
| std::atomic_bool | m_libraryPreloadInProgress |
| std::atomic_bool | m_libraryPreloadAbort |
| KIWAY * | m_kiway = nullptr |
| std::shared_ptr< HEADLESS_PCB_CONTEXT > | m_openContext |
| std::unique_ptr< API_HANDLER_PCB > | m_openHandler |
| std::shared_ptr< HEADLESS_FOOTPRINT_CONTEXT > | m_openFpContext |
| std::unique_ptr< API_HANDLER_FOOTPRINT > | m_openFpHandler |
| std::unique_ptr< API_HANDLER_FP_LIBRARIES > | m_apiHandlerFpLibs |
| KIWAY::FACE_T | m_id |
| BIN_MOD | m_bm |
| const EDA_IU_SCALE & | m_iuScale |
| EDA_UNITS | m_userUnits |
Definition at line 316 of file pcbnew.cpp.
|
inline |
Definition at line 320 of file pcbnew.cpp.
References KIFACE_BASE::KIFACE_BASE(), MM, pcbIUScale, and UNITS_PROVIDER::UNITS_PROVIDER().
|
inlineinherited |
Definition at line 191 of file units_provider.h.
References DEGREES, DEGREES_T, EDA_UNIT_UTILS::UI::DoubleValueFromString(), and GetIuScale().
|
overridevirtual |
Reimplemented from KIFACE.
Definition at line 1445 of file pcbnew.cpp.
References m_libraryPreloadAbort, m_libraryPreloadInProgress, and m_libraryPreloadReturn.
|
private |
Definition at line 963 of file pcbnew.cpp.
References KICAD_API_SERVER::DeregisterHandler(), m_jobHandler, m_openContext, and m_openHandler.
Referenced by HandleApiCloseDocument(), handleCreatePcb(), handleOpenPcb(), and Reset().
|
private |
Definition at line 982 of file pcbnew.cpp.
References KICAD_API_SERVER::DeregisterHandler(), m_openFpContext, and m_openFpHandler.
Referenced by HandleApiCloseDocument(), handleOpenFootprint(), and Reset().
|
inlineoverridevirtual |
Create a wxWindow for the current project.
The caller must cast the return value into the known type.
| aParent | may be NULL or is otherwise the parent to connect under. If NULL then caller may want to connect the returned wxWindow into some hierarchy after this function returns. |
| aClassId | identifies which wxFrame or wxDialog to retrieve, using a value known to the implementing KIFACE. |
| aKIWAY | tells the window which KIWAY (and PROJECT) it is a participant in. |
| aCtlBits | consists of bit flags from the set of KFCTL_* #defines above. |
Implements KIFACE_BASE.
Definition at line 331 of file pcbnew.cpp.
References CROSS_PROBE_CLIENT::AnnounceToPrimary(), FRAME_PCB_EDITOR, CROSS_PROBE_CLIENT::IsOnStandardSocketPath(), KIFACE_BASE::IsSingle(), and Kiface().
|
protectedinherited |
Common things to do for a top program module, during OnKifaceEnd();.
Definition at line 38 of file kiface_base.cpp.
References m_bm.
Referenced by CV::IFACE::OnKifaceEnd(), GERBV::IFACE::OnKifaceEnd(), OnKifaceEnd(), PCB::IFACE::OnKifaceEnd(), PCBCALC::IFACE::OnKifaceEnd(), PGE::IFACE::OnKifaceEnd(), and SCH::IFACE::OnKifaceEnd().
|
inlineoverridevirtualinherited |
Append this Kiface's registered actions to the given list.
Implements KIFACE.
Definition at line 115 of file kiface_base.h.
References ACTION_MANAGER::GetActionList().
|
inlineinherited |
Return just the basename portion of the current help file.
Definition at line 109 of file kiface_base.h.
References m_bm.
Referenced by EDA_BASE_FRAME::help_name().
|
inlineinherited |
Definition at line 51 of file units_provider.h.
References m_iuScale.
Referenced by AngleValueFromString(), GRID_MENU::BuildChoiceList(), RC_ITEM::GetJsonViolation(), DRC_ENGINE::loadImplicitRules(), MessageTextFromMinOptMax(), MessageTextFromValue(), MARGIN_OFFSET_BINDER::onUnitsChanged(), UNIT_BINDER::onUnitsChanged(), OptionalValueFromString(), StringFromOptionalValue(), StringFromValue(), GRID::UserUnitsMessageText(), and ValueFromString().
|
inlinevirtualinherited |
Reimplemented in EDA_BASE_FRAME, and PCB_BASE_FRAME.
Definition at line 54 of file units_provider.h.
|
inlinestaticinherited |
Gets the inferred type from the given units.
Note: will always return the most simple type (e.g. a DISTANCE rather than AREA or VOLUME for a measurement unit).
Definition at line 224 of file units_provider.h.
References CM, DEGREES, DISTANCE, FS, INCH, LENGTH_DELAY, MILS, MM, PERCENT, PS, PS_PER_CM, PS_PER_INCH, PS_PER_MM, TIME, UM, UNITLESS, and UNSCALED.
Referenced by DRC_RULES_PARSER::parseConstraint(), and WX_GRID::SetAutoEvalColUnits().
|
inlinevirtualinherited |
Reimplemented in EDA_DRAW_FRAME.
Definition at line 44 of file units_provider.h.
References GetUserUnits(), EDA_UNIT_UTILS::IsImperialUnit(), MILS, and MM.
|
inlineinherited |
Gets the units to use in the conversion based on the underlying user units.
Definition at line 202 of file units_provider.h.
References GetUserUnits(), EDA_UNIT_UTILS::IsMetricUnit(), LENGTH_DELAY, PS, PS_PER_CM, PS_PER_INCH, and TIME.
Referenced by PANEL_SETUP_TUNING_PROFILE_INFO::initPanel(), MessageTextFromMinOptMax(), MessageTextFromValue(), OptionalValueFromString(), StringFromOptionalValue(), StringFromValue(), and ValueFromString().
|
inlineinherited |
Definition at line 41 of file units_provider.h.
References m_userUnits.
Referenced by FOOTPRINT_EDIT_FRAME::borrowBoardNonDestructive(), PGE::IFACE::CreateKiWindow(), DIALOG_SHIM::DIALOG_SHIM(), PL_EDITOR_FRAME::DisplayGridMsg(), EDA_DRAW_FRAME::DisplayUnitsMsg(), FOOTPRINT_PREVIEW_PANEL::FOOTPRINT_PREVIEW_PANEL(), FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME(), WX_GRID::getColumnUnits(), RC_ITEM::GetJsonViolation(), GERBER_DRAW_ITEM::GetMsgPanelInfo(), EDA_DRAW_FRAME::GetUnitPair(), GetUnitPair(), GetUnitsFromType(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), MARGIN_OFFSET_BINDER::onUnitsChanged(), PANEL_PREVIEW_3D_MODEL::onUnitsChanged(), UNIT_BINDER::onUnitsChanged(), PopulateConstraintList(), POSITION_RELATIVE_TOOL::PositionRelative(), EDA_DRAW_FRAME::SaveSettings(), SCH_EDIT_FRAME::SaveSettings(), PCB_BASE_FRAME::SetBoard(), WX_GRID::SetUnitsProvider(), EDA_DRAW_FRAME::ToggleUserUnits(), EDA_DRAW_FRAME::unitsChangeRefresh(), PCB_BASE_FRAME::unitsChangeRefresh(), EDITOR_CONDITIONS::unitsFunc(), GERBVIEW_FRAME::updateDCodeSelectBox(), PL_EDITOR_FRAME::UpdateStatusBar(), PCB_EDIT_FRAME::UpdateViaSizeSelectBox(), and GRID::UserUnitsMessageText().
|
overridevirtual |
Close the document identified by aSpec.
KIND::FILE_KIND and KIND::CREATE_KIND address the KIFACE's file-backed document (board or schematic); KIND::LIBID_KIND addresses a library item (footprint or symbol). For LIBID_KIND the spec's libId must match the open library item; for the file kinds, an empty path means "whatever document is open".
Reimplemented from KIFACE.
Definition at line 1279 of file pcbnew.cpp.
References closeBoard(), closeFootprint(), LIB_ID::IsValid(), KIFACE::DOCUMENT_SPEC::kind, KIFACE::DOCUMENT_SPEC::libId, m_openContext, m_openFpContext, and KIFACE::DOCUMENT_SPEC::path.
|
overridevirtual |
Reimplemented from KIFACE.
Definition at line 996 of file pcbnew.cpp.
References LIB_ID::GetUniStringLibId(), handleCreatePcb(), handleOpenFootprint(), handleOpenPcb(), KIFACE::DOCUMENT_SPEC::kind, KIFACE::DOCUMENT_SPEC::libId, and KIFACE::DOCUMENT_SPEC::path.
| bool IFACE::handleCreatePcb | ( | const wxString & | aPath, |
| KICAD_API_SERVER * | aServer, | ||
| wxString * | aError ) |
Definition at line 1201 of file pcbnew.cpp.
References closeBoard(), BOARD_LOADER::CreateEmptyBoard(), GetAppSettings(), SETTINGS_MANAGER::GetProject(), PGM_BASE::GetSettingsManager(), SETTINGS_MANAGER::LoadProject(), m_apiHandlerFpLibs, m_kiway, m_openContext, m_openHandler, Pgm(), FILEEXT::ProjectFileExtension, and KICAD_API_SERVER::RegisterHandler().
Referenced by HandleApiOpenDocument().
|
overridevirtual |
|
overridevirtual |
| bool IFACE::handleOpenFootprint | ( | const wxString & | aProjectPath, |
| const wxString & | aLibIdStr, | ||
| KICAD_API_SERVER * | aServer, | ||
| wxString * | aError ) |
Definition at line 1018 of file pcbnew.cpp.
References LIBRARY_MANAGER_ADAPTER::AsyncLoad(), LIBRARY_MANAGER_ADAPTER::BlockUntilLoaded(), closeFootprint(), PROJECT_PCB::FootprintLibAdapter(), GetAppSettings(), SETTINGS_MANAGER::GetProject(), PGM_BASE::GetSettingsManager(), FOOTPRINT_LIBRARY_ADAPTER::LoadFootprintWithOptionalNickname(), SETTINGS_MANAGER::LoadProject(), m_apiHandlerFpLibs, m_kiway, m_openFpContext, m_openFpHandler, LIB_ID::Parse(), Pgm(), KICAD_API_SERVER::RegisterHandler(), and traceApi.
Referenced by HandleApiOpenDocument().
| bool IFACE::handleOpenPcb | ( | const wxString & | aPath, |
| KICAD_API_SERVER * | aServer, | ||
| wxString * | aError ) |
Definition at line 1096 of file pcbnew.cpp.
References closeBoard(), PCB_IO_MGR::FILE_TYPE_NONE, PCB_IO_MGR::FindPluginTypeFromBoardPath(), GetAppSettings(), SETTINGS_MANAGER::GetProject(), PGM_BASE::GetSettingsManager(), FILEEXT::KiCadPcbFileExtension, KICTL_KICAD_ONLY, BOARD_LOADER::Load(), SETTINGS_MANAGER::LoadProject(), m_apiHandlerFpLibs, m_kiway, m_openContext, m_openHandler, Pgm(), FILEEXT::ProjectFileExtension, KICAD_API_SERVER::RegisterHandler(), traceApi, and IO_ERROR::What().
Referenced by HandleApiOpenDocument().
|
inlineoverridevirtual |
Return a pointer to the requested object.
The safest way to use this is to retrieve a pointer to a static instance of an interface, similar to how the KIFACE interface is exported. But if you know what you are doing use it to retrieve anything you want.
| aDataId | identifies which object you want the address of. |
Implements KIFACE_BASE.
Definition at line 602 of file pcbnew.cpp.
References filterFootprints(), PROJECT_PCB::FootprintLibAdapter(), footprintLibraryLoadProgress(), PGM_BASE::GetSettingsManager(), KIFACE_FILTER_FOOTPRINTS, KIFACE_FOOTPRINT_LIBRARY_ADAPTER, KIFACE_FOOTPRINTS_LOAD_PROGRESS, KIFACE_MERGE_DOCUMENT, KIFACE_OPEN_DIFF_DIALOG, KIFACE_TRIGGER_FOOTPRINTS_LOAD, PCB::pcbnewMergeExport(), PCB::pcbnewOpenDiffDialogExport(), Pgm(), SETTINGS_MANAGER::Prj(), startFootprintLibraryLoad(), and top().
|
inlineinherited |
Definition at line 94 of file kiface_base.h.
References m_bm.
Referenced by BMP2CMP::IFACE::CreateKiWindow(), CV::IFACE::OnKifaceStart(), GERBV::IFACE::OnKifaceStart(), PCB::IFACE::OnKifaceStart(), PCBCALC::IFACE::OnKifaceStart(), PGE::IFACE::OnKifaceStart(), and SCH::IFACE::OnKifaceStart().
|
inlineinherited |
Is this KIFACE running under single_top?
Definition at line 104 of file kiface_base.h.
References KFCTL_STANDALONE, and m_start_flags.
Referenced by ACTION_MENU::AddQuitOrClose(), PCB::IFACE::CreateKiWindow(), SCH::IFACE::CreateKiWindow(), SCH_EDIT_FRAME::OnImportProject(), and SCH_EDIT_FRAME::SaveProject().
|
inline |
Accessor for the non-job diff/merge exports (pcbnewMergeExport etc.).
Definition at line 663 of file pcbnew.cpp.
References m_jobHandler.
|
inlineinherited |
Only for DSO specific 'non-library' files.
(The library search path is in the PROJECT class.)
Definition at line 113 of file kiface_base.h.
References m_bm.
Referenced by CVPCB_MAINFRAME::buildEquivalenceList(), and EDA_BASE_FRAME::sys_search().
|
inlineinherited |
Definition at line 92 of file kiface_base.h.
References m_bm.
Referenced by AUTOPLACER::AUTOPLACER(), SCH_EDIT_FRAME::CaptureHierarchyPaneSize(), EDA_BASE_FRAME::config(), BMP2CMP::IFACE::CreateKiWindow(), DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER(), KIGFX::eeconfig(), PCB_IO_KICAD_SEXPR::FootprintSave(), SCH_RENDER_SETTINGS::GetShowPageLimits(), DIALOG_MAP_GERBER_LAYERS_TO_PCB::initDialog(), DIALOG_EXPORT_NETLIST::InstallCustomPages(), DIALOG_MAP_GERBER_LAYERS_TO_PCB::OnGetSetup(), CV::IFACE::OnKifaceStart(), GERBV::IFACE::OnKifaceStart(), PCB::IFACE::OnKifaceStart(), PCBCALC::IFACE::OnKifaceStart(), PGE::IFACE::OnKifaceStart(), SCH::IFACE::OnKifaceStart(), DIALOG_RESCUE_EACH::OnNeverShowClick(), SCH_EDIT_FRAME::onResizeNetNavigator(), DIALOG_MAP_GERBER_LAYERS_TO_PCB::OnStoreSetup(), DIALOG_EESCHEMA_PAGE_SETTINGS::onTransferDataToWindow(), SCH_EDIT_FRAME::OpenProjectFiles(), pcbconfig(), TRANSLINE_IDENT::ReadConfig(), PCB_EDIT_FRAME::redrawNetnames(), PCB_CALCULATOR_FRAME::SaveSettings(), PANEL_PCBNEW_ACTION_PLUGINS::TransferDataFromWindow(), DIALOG_ANNOTATE::TransferDataToWindow(), DIALOG_PLOT_SCHEMATIC::TransferDataToWindow(), RATSNEST_VIEW_ITEM::ViewDraw(), TRANSLINE_IDENT::WriteConfig(), DIALOG_EXPORT_NETLIST::WriteCurrentNetlistSetup(), DIALOG_ANNOTATE::~DIALOG_ANNOTATE(), DIALOG_COLOR_PICKER::~DIALOG_COLOR_PICKER(), and DIALOG_EESCHEMA_PAGE_SETTINGS::~DIALOG_EESCHEMA_PAGE_SETTINGS().
|
overridevirtual |
Starts a background load of all libraries of the type owned by this face.
Called by the API server's LoadAllLibraries handler after ensuring this kiface is loaded. Returns true if a load was started.
Reimplemented from KIFACE.
Definition at line 1469 of file pcbnew.cpp.
References LIBRARY_MANAGER_ADAPTER::AsyncLoad(), PROJECT_PCB::FootprintLibAdapter(), and m_kiway.
|
inlineinherited |
Definition at line 144 of file units_provider.h.
References DISTANCE, GetIuScale(), GetUnitsFromType(), and EDA_UNIT_UTILS::UI::MessageTextFromMinOptMax().
Referenced by PCB_TRACK::GetMsgPanelInfo(), and PCB_TUNING_PATTERN::GetMsgPanelInfo().
|
inlineinherited |
Definition at line 137 of file units_provider.h.
References DISTANCE, EDA_UNIT_UTILS::UI::MessageTextFromValue(), unityScale, and UNSCALED.
Referenced by DRC_ENGINE::EvalRules().
|
inlineinherited |
Definition at line 130 of file units_provider.h.
References EDA_ANGLE::AsDegrees(), DEGREES, DISTANCE, EDA_UNIT_UTILS::UI::MessageTextFromValue(), and unityScale.
|
inlineinherited |
A lower-precision version of StringFromValue().
Should ONLY be used for status text and messages. Not suitable for dialogs, files, etc. where the loss of precision matters.
Definition at line 123 of file units_provider.h.
References DISTANCE, GetIuScale(), GetUnitsFromType(), and EDA_UNIT_UTILS::UI::MessageTextFromValue().
Referenced by BOOST_FIXTURE_TEST_CASE(), Build_Board_Characteristics_Table(), CheckDuplicatePins(), CheckLibSymbol(), CheckLibSymbolGraphics(), DRC_TEST_PROVIDER_MATCHED_LENGTH::checkSkews(), DRC_TEST_PROVIDER_MATCHED_LENGTH::checkStubLengths(), GERBVIEW_FRAME::DisplayGridMsg(), GERBER_FILE_IMAGE::DisplayImageInfo(), DRC_ENGINE::EvalRules(), FormatBoardStatisticsJson(), FormatBoardStatisticsMinimum(), FormatBoardStatisticsReport(), DRC_TEST_PROVIDER::formatMsg(), DRC_TEST_PROVIDER::formatMsg(), DRC_TEST_PROVIDER::formatMsg(), DS_DRAW_ITEM_LINE::GetItemDescription(), DS_DRAW_ITEM_RECT::GetItemDescription(), PCB_TRACK::GetItemDescription(), SCH_LINE::GetItemDescription(), SCH_SHAPE::GetItemDescription(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), NETINFO_ITEM::GetMsgPanelInfo(), PAD::GetMsgPanelInfo(), PCB_BARCODE::GetMsgPanelInfo(), PCB_DIM_ALIGNED::GetMsgPanelInfo(), PCB_DIM_LEADER::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_POINT::GetMsgPanelInfo(), PCB_REFERENCE_IMAGE::GetMsgPanelInfo(), PCB_TABLECELL::GetMsgPanelInfo(), PCB_TARGET::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), PCB_TRACK::GetMsgPanelInfo(), PCB_TUNING_PATTERN::GetMsgPanelInfo(), PCB_VIA::GetMsgPanelInfo(), SCH_BITMAP::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), SCH_JUNCTION::GetMsgPanelInfo(), SCH_LABEL_BASE::GetMsgPanelInfo(), SCH_PIN::GetMsgPanelInfo(), SCH_TABLECELL::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), STROKE_PARAMS::GetMsgPanelInfo(), ZONE::GetMsgPanelInfo(), GetNetNavigatorItemText(), PCB_TUNING_PATTERN::GetPreviewItems(), PCB_BASE_FRAME::MessageTextFromCoord(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), EDA_SHAPE::ShapeGetMsgPanelInfo(), showCoord(), DRC_TEST_PROVIDER_MISC::testOutline(), VIA_SIZE_MENU::update(), PL_EDITOR_FRAME::UpdateMsgPanelInfo(), GERBVIEW_FRAME::UpdateStatusBar(), PCB_BASE_FRAME::UpdateStatusBar(), and SCH_BASE_FRAME::UpdateStatusBar().
|
inlineinherited |
Definition at line 87 of file kiface_base.h.
References m_bm.
|
overridevirtual |
Called just once just before the DSO is to be unloaded.
It is called before static C++ destructors are called. A default implementation is supplied.
Reimplemented from KIFACE_BASE.
Definition at line 813 of file pcbnew.cpp.
References KICAD_API_SERVER::DeregisterHandler(), KIFACE_BASE::end_common(), PGM_BASE::GetApiServer(), m_apiHandlerFpLibs, m_jobHandler, and Pgm().
Typically start_common() is called from here.
Implements KIFACE_BASE.
Definition at line 755 of file pcbnew.cpp.
References KIGIT_PCB_MERGE::Apply(), KIGIT_TRIVIAL_MERGE_BASE< KIGIT_FP_MERGE >::Apply(), PGM_BASE::GetApiServer(), CLI_PROGRESS_REPORTER::GetInstance(), CLI_REPORTER::GetInstance(), PGM_BASE::GetSettingsManager(), KIFACE_BASE::InitSettings(), KFCTL_CLI, KIFACE_BASE::KifaceSettings(), m_apiHandlerFpLibs, m_jobHandler, m_kiway, KIFACE_BASE::m_start_flags, Pgm(), KICAD_API_SERVER::RegisterHandler(), KIGIT::RegisterMergeDriver(), SETTINGS_MANAGER::RegisterSettings(), and KIFACE_BASE::start_common().
|
inlineinherited |
Converts aTextValue in aUnits to internal units used by the frame.
Allows the return of an empty optional if the string represents a null value (currently empty string)
| aType | is the type of this value, and controls the way the string is converted to a value |
| aTextValue | A reference to a wxString object containing the string to convert. |
Definition at line 178 of file units_provider.h.
References DISTANCE, EDA_UNIT_UTILS::UI::DoubleValueFromString(), GetIuScale(), GetUnitsFromType(), KiROUND(), and NullUiString.
Referenced by WX_GRID::GetOptionalUnitValue(), and WX_GRID::onCellEditorHidden().
|
overridevirtual |
Reimplemented from KIFACE.
Definition at line 1331 of file pcbnew.cpp.
References _, LIBRARY_MANAGER_ADAPTER::AbortAsyncLoad(), PGM_BASE::AddLibraryLoadMessages(), LIBRARY_MANAGER_ADAPTER::AsyncLoad(), LIBRARY_MANAGER_ADAPTER::AsyncLoadProgress(), LIBRARY_MANAGER_ADAPTER::BlockUntilLoaded(), PGM_BASE::ClearLibraryLoadMessages(), BACKGROUND_JOBS_MONITOR::Create(), expected, KIWAY::ExpressMail(), PROJECT_PCB::FootprintLibAdapter(), FRAME_CVPCB, FRAME_FOOTPRINT_EDITOR, FRAME_PCB_EDITOR, PGM_BASE::GetBackgroundJobMonitor(), LIBRARY_MANAGER_ADAPTER::GetLibraryLoadErrors(), m_libraryPreloadAbort, m_libraryPreloadBackgroundJob, m_libraryPreloadInProgress, m_libraryPreloadReturn, MAIL_RELOAD_LIB, Pgm(), KIWAY::Prj(), BACKGROUND_JOBS_MONITOR::Remove(), reporter, and traceLibraries.
|
overridevirtual |
Reimplemented from KIFACE.
Definition at line 1438 of file pcbnew.cpp.
References m_libraryPreloadAbort, and m_libraryPreloadInProgress.
|
overridevirtual |
Register this face's library API handlers on the given server.
Called by the API server's library command handler after loading the kiface, so that library commands are available before any document is opened. The kiface retains ownership.
Reimplemented from KIFACE.
Definition at line 1457 of file pcbnew.cpp.
References m_apiHandlerFpLibs, and KICAD_API_SERVER::RegisterHandler().
|
overridevirtual |
Reloads global state.
Reimplemented from KIFACE_BASE.
Definition at line 806 of file pcbnew.cpp.
References closeBoard(), and closeFootprint().
|
overridevirtual |
Saving a file under a different name is delegated to the various KIFACEs because the project doesn't know the internal format of the various files (which may have paths in them that need updating).
Reimplemented from KIFACE.
Definition at line 836 of file pcbnew.cpp.
References FILEEXT::BackupFileSuffix, CopySexprFile(), and FILEEXT::KiCadPcbFileExtension.
|
inlineinherited |
Definition at line 42 of file units_provider.h.
References m_userUnits.
Referenced by EDA_BASE_FRAME::ChangeUserUnits(), PGE::IFACE::CreateKiWindow(), EDA_DRAW_FRAME::EDA_DRAW_FRAME(), FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME(), PCB_DIM_ALIGNED::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), EDA_DRAW_FRAME::LoadSettings(), PL_EDITOR_FRAME::PL_EDITOR_FRAME(), DRC_ENGINE::RunTests(), DRC_TEST_PROVIDER::RunTests(), and EDA_DRAW_FRAME::ToggleUserUnits().
|
protectedinherited |
Common things to do for a top program module, during OnKifaceStart().
Definition at line 28 of file kiface_base.cpp.
References GlobalPathsAppend(), m_bm, m_id, and m_start_flags.
Referenced by BMP2CMP::IFACE::OnKifaceStart(), CV::IFACE::OnKifaceStart(), GERBV::IFACE::OnKifaceStart(), PCB::IFACE::OnKifaceStart(), PCBCALC::IFACE::OnKifaceStart(), PGE::IFACE::OnKifaceStart(), and SCH::IFACE::OnKifaceStart().
|
inlineinherited |
Return whatever was passed as aCtlBits to OnKifaceStart().
Definition at line 99 of file kiface_base.h.
References m_start_flags.
|
inlineinherited |
Converts an optional aValue in internal units into a united string.
For readability, trailing 0s are removed if the mantissa has 3 or more digits. This function should be used to display values in dialogs because a value entered in mm (for instance 2.0 mm) could need up to 8 digits mantissa if displayed in inch to avoid truncation or rounding made just by the printf function.
| aValue | = optional value in internal units |
| aAddUnitLabel | = true to add symbol unit to the string value |
| aType | is the type of this value, and controls the way the value is converted to a string, and the suitable unit |
Definition at line 96 of file units_provider.h.
References DISTANCE, GetIuScale(), GetUnitsFromType(), NullUiString, and EDA_UNIT_UTILS::UI::StringFromValue().
Referenced by WX_GRID::onCellEditorHidden().
|
inlineinherited |
Definition at line 110 of file units_provider.h.
References EDA_ANGLE::AsDegrees(), DEGREES, DISTANCE, EDA_UNIT_UTILS::UI::StringFromValue(), and unityScale.
|
inlineinherited |
Converts aValue in internal units into a united string.
For readability, trailing 0s are removed if the mantissa has 3 or more digits. This function should be used to display values in dialogs because a value entered in mm (for instance 2.0 mm) could need up to 8 digits mantissa if displayed in inch to avoid truncation or rounding made just by the printf function.
| aValue | = value in internal units |
| aAddUnitLabel | = true to add symbol unit to the string value |
| aType | is the type of this value, and controls the way the value is converted to a string, and the suitable unit |
Definition at line 75 of file units_provider.h.
References DISTANCE, GetIuScale(), GetUnitsFromType(), and EDA_UNIT_UTILS::UI::StringFromValue().
Referenced by Build_Board_Stackup_Table(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), PAD::doCheckPad(), VALIDATION_ERROR_TOO_LARGE< T >::Format(), VALIDATION_ERROR_TOO_SMALL< T >::Format(), formatBBox(), DRC_TEST_PROVIDER::formatMsg(), DRC_TEST_PROVIDER::formatMsg(), DRC_TEST_PROVIDER::formatMsg(), WX_GRID::onCellEditorHidden(), reportMax(), reportMin(), reportOpt(), PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow(), and UpdateDrillCells().
|
inlineinherited |
Converts aTextValue in aUnits to internal units used by the frame.
| aType | is the type of this value, and controls the way the string is converted to a value |
| aTextValue | A reference to a wxString object containing the string to convert. |
Definition at line 159 of file units_provider.h.
References DISTANCE, EDA_UNIT_UTILS::UI::DoubleValueFromString(), GetIuScale(), GetUnitsFromType(), and KiROUND().
Referenced by PIN_TABLE_DATA_MODEL::compare(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), WX_GRID::GetUnitValue(), and WX_GRID::onCellEditorHidden().
|
private |
Definition at line 715 of file pcbnew.cpp.
Referenced by handleCreatePcb(), handleOpenFootprint(), handleOpenPcb(), OnKifaceEnd(), OnKifaceStart(), and RegisterLibraryHandlers().
|
privateinherited |
Definition at line 126 of file kiface_base.h.
Referenced by end_common(), GetHelpFileName(), InitSettings(), KIFACE_BASE(), KifaceSearch(), KifaceSettings(), Name(), and start_common().
|
privateinherited |
Definition at line 125 of file kiface_base.h.
Referenced by KIFACE_BASE(), and start_common().
|
privateinherited |
Definition at line 256 of file units_provider.h.
Referenced by GetIuScale(), and UNITS_PROVIDER().
|
private |
Definition at line 701 of file pcbnew.cpp.
Referenced by closeBoard(), HandleJob(), HandleJobConfig(), JobHandler(), OnKifaceEnd(), and OnKifaceStart().
|
private |
Definition at line 710 of file pcbnew.cpp.
Referenced by handleCreatePcb(), handleOpenFootprint(), handleOpenPcb(), LoadAllLibraries(), and OnKifaceStart().
|
private |
Definition at line 705 of file pcbnew.cpp.
Referenced by CancelPreload(), PreloadLibraries(), and ProjectChanged().
|
private |
Definition at line 702 of file pcbnew.cpp.
Referenced by PreloadLibraries().
|
private |
Definition at line 704 of file pcbnew.cpp.
Referenced by CancelPreload(), PreloadLibraries(), and ProjectChanged().
|
private |
Definition at line 703 of file pcbnew.cpp.
Referenced by CancelPreload(), and PreloadLibraries().
|
private |
Definition at line 711 of file pcbnew.cpp.
Referenced by closeBoard(), HandleApiCloseDocument(), handleCreatePcb(), and handleOpenPcb().
|
private |
Definition at line 713 of file pcbnew.cpp.
Referenced by closeFootprint(), HandleApiCloseDocument(), and handleOpenFootprint().
|
private |
Definition at line 714 of file pcbnew.cpp.
Referenced by closeFootprint(), and handleOpenFootprint().
|
private |
Definition at line 712 of file pcbnew.cpp.
Referenced by closeBoard(), handleCreatePcb(), and handleOpenPcb().
|
protectedinherited |
flags provided in OnKifaceStart()
Definition at line 122 of file kiface_base.h.
Referenced by IsSingle(), KIFACE_BASE(), GERBV::IFACE::OnKifaceStart(), PCB::IFACE::OnKifaceStart(), SCH::IFACE::OnKifaceStart(), start_common(), and StartFlags().
|
privateinherited |
Definition at line 257 of file units_provider.h.
Referenced by GetUserUnits(), SetUserUnits(), and UNITS_PROVIDER().
|
inlinestaticinherited |
The string that is used in the UI to represent a null value.
Definition at line 253 of file units_provider.h.
Referenced by WX_GRID::GetOptionalUnitValue(), WX_GRID::onCellEditorHidden(), OptionalValueFromString(), and StringFromOptionalValue().