|
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. | |
| EESCHEMA_JOBS_HANDLER * | JobHandler () const |
| Accessor for the non-job diff/merge exports (eeschemaMergeExport etc.). | |
| void | SaveFileAs (const wxString &aProjectBasePath, const wxString &aProjectName, 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 | handleCreateSchematic (const wxString &aPath, KICAD_API_SERVER *aServer, wxString *aError) |
| bool | handleOpenSymbol (const wxString &aProjectPath, const wxString &aLibIdStr, KICAD_API_SERVER *aServer, wxString *aError) |
| bool | HandleApiCloseDocument (const DOCUMENT_SPEC &aSpec, KICAD_API_SERVER *aServer, wxString *aError) override |
Close the document identified by aSpec. | |
| void | PreloadLibraries (KIWAY *aKiway) override |
| void | CancelPreload (bool aBlock=true) override |
| void | ProjectChanged () 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 | closeSchematic (KICAD_API_SERVER *aServer) |
| void | closeSymbol (KICAD_API_SERVER *aServer) |
Private Attributes | |
| std::unique_ptr< EESCHEMA_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 |
| SCHEMATIC * | m_openSchematic = nullptr |
| std::shared_ptr< HEADLESS_SCH_CONTEXT > | m_openContext |
| std::shared_ptr< HEADLESS_SYMBOL_EDITOR_CONTEXT > | m_openSymbolContext |
| std::unique_ptr< API_HANDLER_SYMBOL > | m_openSymbolHandler |
| std::unique_ptr< API_HANDLER_SCH > | m_openHandler |
| std::unique_ptr< API_HANDLER_SCH_LIBRARIES > | m_apiHandlerSchLibs |
| KIWAY::FACE_T | m_id |
| BIN_MOD | m_bm |
| const EDA_IU_SCALE & | m_iuScale |
| EDA_UNITS | m_userUnits |
Definition at line 508 of file eeschema.cpp.
|
inline |
Definition at line 512 of file eeschema.cpp.
References KIFACE_BASE::KIFACE_BASE(), m_libraryPreloadInProgress, MM, schIUScale, 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 1021 of file eeschema.cpp.
References m_libraryPreloadAbort, m_libraryPreloadInProgress, and m_libraryPreloadReturn.
Referenced by OnKifaceEnd().
|
private |
Definition at line 1214 of file eeschema.cpp.
References KICAD_API_SERVER::DeregisterHandler(), m_jobHandler, m_openContext, m_openHandler, and m_openSchematic.
Referenced by HandleApiCloseDocument(), HandleApiOpenDocument(), handleCreateSchematic(), and Reset().
|
private |
Definition at line 1236 of file eeschema.cpp.
References KICAD_API_SERVER::DeregisterHandler(), m_openSymbolContext, and m_openSymbolHandler.
Referenced by HandleApiCloseDocument(), handleOpenSymbol(), 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 524 of file eeschema.cpp.
References CROSS_PROBE_CLIENT::AnnounceToPrimary(), CreateSnappingPanel(), KIWAY_PLAYER::Destroy(), DIALOG_DESIGN_BLOCK_LIBRARY_TABLE, DIALOG_SCH_LIBRARY_TABLE, FRAME_SCH, FRAME_SCH_SYMBOL_EDITOR, FRAME_SCH_VIEWER, FRAME_SIMULATOR, FRAME_SYMBOL_CHOOSER, ACTION_MANAGER::GetActionList(), GetAppSettings(), ACTION_TOOLBAR::GetCustomControlList(), GetToolbarSettings(), UNITS_PROVIDER::GetUserUnits(), InvokeEditDesignBlockLibTable(), InvokeSchEditSymbolLibTable(), CROSS_PROBE_CLIENT::IsOnStandardSocketPath(), KIFACE_BASE::IsSingle(), Kiface(), EESCHEMA_SETTINGS::m_SnapInference, SYMBOL_EDITOR_SETTINGS::m_SnapInference, PANEL_SCH_COLORS, PANEL_SCH_DISP_OPTIONS, PANEL_SCH_EDIT_OPTIONS, PANEL_SCH_FIELD_NAME_TEMPLATES, PANEL_SCH_GRIDS, PANEL_SCH_SIMULATOR, PANEL_SCH_SNAPPING, PANEL_SCH_TOOLBARS, PANEL_SYM_COLORS, PANEL_SYM_DISP_OPTIONS, PANEL_SYM_EDIT_GRIDS, PANEL_SYM_EDIT_OPTIONS, PANEL_SYM_SNAPPING, PANEL_SYM_TOOLBARS, KIWAY::Player(), EESCHEMA_HELPERS::SetSchEditFrame(), and UNITS_PROVIDER::SetUserUnits().
|
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(), SCH::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 1503 of file eeschema.cpp.
References closeSchematic(), closeSymbol(), LIB_ID::IsValid(), KIFACE::DOCUMENT_SPEC::kind, KIFACE::DOCUMENT_SPEC::libId, m_openContext, m_openSymbolContext, and KIFACE::DOCUMENT_SPEC::path.
|
overridevirtual |
Reimplemented from KIFACE.
Definition at line 1250 of file eeschema.cpp.
References closeSchematic(), SETTINGS_MANAGER::GetProject(), PGM_BASE::GetSettingsManager(), LIB_ID::GetUniStringLibId(), handleCreateSchematic(), handleOpenSymbol(), FILEEXT::KiCadSchematicFileExtension, KIFACE::DOCUMENT_SPEC::kind, KIFACE::DOCUMENT_SPEC::libId, SETTINGS_MANAGER::LoadProject(), EESCHEMA_HELPERS::LoadSchematic(), m_apiHandlerSchLibs, m_kiway, m_openContext, m_openHandler, m_openSchematic, KIFACE::DOCUMENT_SPEC::path, Pgm(), FILEEXT::ProjectFileExtension, KICAD_API_SERVER::RegisterHandler(), and traceApi.
| bool IFACE::handleCreateSchematic | ( | const wxString & | aPath, |
| KICAD_API_SERVER * | aServer, | ||
| wxString * | aError ) |
Definition at line 1353 of file eeschema.cpp.
References closeSchematic(), SETTINGS_MANAGER::GetProject(), PGM_BASE::GetSettingsManager(), SETTINGS_MANAGER::LoadProject(), m_apiHandlerSchLibs, m_kiway, m_openContext, m_openHandler, m_openSchematic, Pgm(), FILEEXT::ProjectFileExtension, and KICAD_API_SERVER::RegisterHandler().
Referenced by HandleApiOpenDocument().
|
overridevirtual |
|
overridevirtual |
| bool IFACE::handleOpenSymbol | ( | const wxString & | aProjectPath, |
| const wxString & | aLibIdStr, | ||
| KICAD_API_SERVER * | aServer, | ||
| wxString * | aError ) |
Definition at line 1417 of file eeschema.cpp.
References LIBRARY_MANAGER_ADAPTER::AsyncLoad(), LIBRARY_MANAGER_ADAPTER::BlockUntilLoaded(), closeSymbol(), GetAppSettings(), SETTINGS_MANAGER::GetProject(), PGM_BASE::GetSettingsManager(), SETTINGS_MANAGER::LoadProject(), SYMBOL_LIBRARY_ADAPTER::LoadSymbol(), m_apiHandlerSchLibs, m_kiway, m_openSymbolContext, m_openSymbolHandler, LIB_ID::Parse(), Pgm(), KICAD_API_SERVER::RegisterHandler(), PROJECT_SCH::SymbolLibAdapter(), 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 743 of file eeschema.cpp.
References SCH::eeschemaMergeExport(), SCH::eeschemaOpenDiffDialogExport(), SCH::filterFootprintUsers(), SCH::generateSchematicNetlist(), KIFACE_FILTER_FOOTPRINT_USERS, KIFACE_MERGE_DOCUMENT, KIFACE_NETLIST_SCHEMATIC, KIFACE_OPEN_DIFF_DIALOG, KIFACE_SYMBOLS_LOAD_PROGRESS, KIFACE_TRIGGER_SYMBOLS_LOAD, SCH::startSymbolLibraryLoad(), and SCH::symbolLibraryLoadProgress().
|
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 (eeschemaMergeExport etc.).
Definition at line 770 of file eeschema.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 1567 of file eeschema.cpp.
References LIBRARY_MANAGER_ADAPTER::AsyncLoad(), m_kiway, and PROJECT_SCH::SymbolLibAdapter().
|
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 1040 of file eeschema.cpp.
References CancelPreload(), KICAD_API_SERVER::DeregisterHandler(), KIFACE_BASE::end_common(), PGM_BASE::GetApiServer(), m_apiHandlerSchLibs, m_jobHandler, and Pgm().
Typically start_common() is called from here.
Implements KIFACE_BASE.
Definition at line 859 of file eeschema.cpp.
References KIGIT_TRIVIAL_MERGE_BASE< KIGIT_SCH_MERGE >::Apply(), KIGIT_TRIVIAL_MERGE_BASE< KIGIT_SYM_LIB_MERGE >::Apply(), PGM_BASE::GetApiServer(), CLI_PROGRESS_REPORTER::GetInstance(), CLI_REPORTER::GetInstance(), PGM_BASE::GetSettingsManager(), KIFACE_BASE::InitSettings(), KFCTL_CLI, KIFACE_BASE::KifaceSettings(), m_apiHandlerSchLibs, 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 914 of file eeschema.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(), FRAME_SCH, FRAME_SCH_SYMBOL_EDITOR, FRAME_SCH_VIEWER, 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, PROJECT_SCH::SymbolLibAdapter(), and traceLibraries.
|
overridevirtual |
Reimplemented from KIFACE.
Definition at line 1033 of file eeschema.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 1555 of file eeschema.cpp.
References m_apiHandlerSchLibs, and KICAD_API_SERVER::RegisterHandler().
|
overridevirtual |
Reloads global state.
Reimplemented from KIFACE_BASE.
Definition at line 904 of file eeschema.cpp.
References closeSchematic(), closeSymbol(), and m_jobHandler.
|
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 1061 of file eeschema.cpp.
References _, FILEEXT::BackupFileSuffix, CopySexprFile(), FILEEXT::KiCadSchematicFileExtension, and FILEEXT::LegacySchematicFileExtension.
|
inlineinherited |
Definition at line 42 of file units_provider.h.
References m_userUnits.
Referenced by EDA_BASE_FRAME::ChangeUserUnits(), PGE::IFACE::CreateKiWindow(), SCH::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 820 of file eeschema.cpp.
Referenced by HandleApiOpenDocument(), handleCreateSchematic(), handleOpenSymbol(), 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 805 of file eeschema.cpp.
Referenced by closeSchematic(), HandleJob(), HandleJobConfig(), JobHandler(), OnKifaceEnd(), OnKifaceStart(), and Reset().
|
private |
Definition at line 814 of file eeschema.cpp.
Referenced by HandleApiOpenDocument(), handleCreateSchematic(), handleOpenSymbol(), LoadAllLibraries(), and OnKifaceStart().
|
private |
Definition at line 809 of file eeschema.cpp.
Referenced by CancelPreload(), PreloadLibraries(), and ProjectChanged().
|
private |
Definition at line 806 of file eeschema.cpp.
Referenced by PreloadLibraries().
|
private |
Definition at line 808 of file eeschema.cpp.
Referenced by CancelPreload(), IFACE(), PreloadLibraries(), and ProjectChanged().
|
private |
Definition at line 807 of file eeschema.cpp.
Referenced by CancelPreload(), and PreloadLibraries().
|
private |
Definition at line 816 of file eeschema.cpp.
Referenced by closeSchematic(), HandleApiCloseDocument(), HandleApiOpenDocument(), and handleCreateSchematic().
|
private |
Definition at line 819 of file eeschema.cpp.
Referenced by closeSchematic(), HandleApiOpenDocument(), and handleCreateSchematic().
|
private |
Definition at line 815 of file eeschema.cpp.
Referenced by closeSchematic(), HandleApiOpenDocument(), and handleCreateSchematic().
|
private |
Definition at line 817 of file eeschema.cpp.
Referenced by closeSymbol(), HandleApiCloseDocument(), and handleOpenSymbol().
|
private |
Definition at line 818 of file eeschema.cpp.
Referenced by closeSymbol(), and handleOpenSymbol().
|
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().