| 
    KiCad PCB EDA Suite
    
   | 
 
Functions to provide common constants and other functions to assist in making a consistent UI. More...
Go to the source code of this file.
Namespaces | |
| namespace | KIUI | 
Macros | |
| #define | INDETERMINATE_STATE _( "-- mixed values --" ) | 
| Used for holding indeterminate values, such as with multiple selections holding different values or controls which do not wish to set a value.   | |
| #define | INDETERMINATE_ACTION _( "-- leave unchanged --" ) | 
Functions | |
| KICOMMON_API int | KIUI::GetStdMargin () | 
| Get the standard margin around a widget in the KiCad UI.   | |
| KICOMMON_API wxSize | KIUI::GetTextSize (const wxString &aSingleLine, wxWindow *aWindow) | 
| Return the size of aSingleLine of text when it is rendered in aWindow using whatever font is currently set in that window.   | |
| KICOMMON_API wxFont | KIUI::GetMonospacedUIFont () | 
| KICOMMON_API wxFont | KIUI::GetControlFont (wxWindow *aWindow) | 
| KICOMMON_API wxFont | KIUI::GetInfoFont (wxWindow *aWindow) | 
| KICOMMON_API wxFont | KIUI::GetSmallInfoFont (wxWindow *aWindow) | 
| KICOMMON_API wxFont | KIUI::GetDockedPaneFont (wxWindow *aWindow) | 
| KICOMMON_API wxFont | KIUI::GetStatusFont (wxWindow *aWindow) | 
| KICOMMON_API bool | KIUI::EnsureTextCtrlWidth (wxTextCtrl *aCtrl, const wxString *aString=nullptr) | 
| Set the minimum pixel width on a text control in order to make a text string be fully visible within it.   | |
| KICOMMON_API void | KIUI::SelectReferenceNumber (wxTextEntry *aTextEntry) | 
| Select the number (or "?") in a reference for ease of editing.   | |
| KICOMMON_API wxString | KIUI::EllipsizeStatusText (wxWindow *aWindow, const wxString &aString) | 
| Ellipsize text (at the end) to be no more than 1/3 of the window width.   | |
| KICOMMON_API wxString | KIUI::EllipsizeMenuText (const wxString &aString) | 
| Ellipsize text (at the end) to be no more than 36 characters.   | |
| KICOMMON_API bool | KIUI::IsInputControlFocused (wxWindow *aFocus=nullptr) | 
| Check if a input control has focus.   | |
| KICOMMON_API bool | KIUI::IsInputControlEditable (wxWindow *aControl) | 
| Check if a input control has focus.   | |
| KICOMMON_API bool | KIUI::IsModalDialogFocused () | 
| KICOMMON_API void | KIUI::Disable (wxWindow *aWindow) | 
| Makes a window read-only.   | |
| KICOMMON_API void | KIUI::AddBitmapToMenuItem (wxMenuItem *aMenu, const wxBitmapBundle &aImage) | 
| Add a bitmap to a menuitem.   | |
| KICOMMON_API wxMenuItem * | KIUI::AddMenuItem (wxMenu *aMenu, int aId, const wxString &aText, const wxBitmapBundle &aImage, wxItemKind aType=wxITEM_NORMAL) | 
| Create and insert a menu item with an icon into aMenu.   | |
| KICOMMON_API wxMenuItem * | KIUI::AddMenuItem (wxMenu *aMenu, int aId, const wxString &aText, const wxString &aHelpText, const wxBitmapBundle &aImage, wxItemKind aType=wxITEM_NORMAL) | 
| Create and insert a menu item with an icon and a help message string into aMenu.   | |
| KICOMMON_API wxMenuItem * | KIUI::AddMenuItem (wxMenu *aMenu, wxMenu *aSubMenu, int aId, const wxString &aText, const wxBitmapBundle &aImage) | 
| Create and insert a menu item with an icon into aSubMenu in aMenu.   | |
| KICOMMON_API wxMenuItem * | KIUI::AddMenuItem (wxMenu *aMenu, wxMenu *aSubMenu, int aId, const wxString &aText, const wxString &aHelpText, const wxBitmapBundle &aImage) | 
| Create and insert a menu item with an icon and a help message string into aSubMenu in aMenu.   | |
| KICOMMON_API SEVERITY | SeverityFromString (const wxString &aSeverity) | 
| KICOMMON_API wxString | SeverityToString (const SEVERITY &aSeverity) | 
Variables | |
| const int | KIUI::c_IndicatorSizeDIP = 10 | 
| KICOMMON_API const wxString | KIUI::s_FocusStealableInputName = wxS( "KI_NOFOCUS" ) | 
Functions to provide common constants and other functions to assist in making a consistent UI.
Definition in file ui_common.h.
| #define INDETERMINATE_ACTION _( "-- leave unchanged --" ) | 
Definition at line 47 of file ui_common.h.
Referenced by DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(), UNIT_BINDER::IsIndeterminate(), UNIT_BINDER::onClick(), UNIT_BINDER::onSetFocus(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::onUnitsChanged(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), DIALOG_JUNCTION_PROPS::TransferDataToWindow(), DIALOG_LINE_PROPERTIES::TransferDataToWindow(), DIALOG_TRACK_VIA_PROPERTIES::TransferDataToWindow(), DIALOG_WIRE_BUS_PROPERTIES::TransferDataToWindow(), and UNIT_BINDER::Validate().
| #define INDETERMINATE_STATE _( "-- mixed values --" ) | 
Used for holding indeterminate values, such as with multiple selections holding different values or controls which do not wish to set a value.
Definition at line 46 of file ui_common.h.
Referenced by PG_NET_SELECTOR_EDITOR::CreateControls(), DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE(), GRID_CELL_CHECKBOX_RENDERER::Draw(), SCH_FIELD::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), FIELDS_EDITOR_GRID_DATA_MODEL::GetValue(), FIELDS_GRID_TABLE::GetValue(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetValue(), PIN_TABLE_DATA_MODEL::GetValue(), UNIT_BINDER::IsIndeterminate(), UNIT_BINDER::onClick(), UNIT_BINDER::onSetFocus(), PIN_TABLE_DATA_MODEL::SetValue(), DIALOG_TABLECELL_PROPERTIES::TransferDataToWindow(), DIALOG_TRACK_VIA_PROPERTIES::TransferDataToWindow(), and UNIT_BINDER::Validate().
| KICOMMON_API SEVERITY SeverityFromString | ( | const wxString & | aSeverity | ) | 
Definition at line 56 of file ui_common.cpp.
References RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, and RPT_SEVERITY_WARNING.
Referenced by BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS(), and ERC_SETTINGS::ERC_SETTINGS().
| KICOMMON_API wxString SeverityToString | ( | const SEVERITY & | aSeverity | ) | 
Definition at line 67 of file ui_common.cpp.
References RPT_SEVERITY_IGNORE, and RPT_SEVERITY_WARNING.
Referenced by BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS(), and ERC_SETTINGS::ERC_SETTINGS().