![]() |
KiCad PCB EDA Suite
|
Functions | |
void | ValidatorTransferToWindowWithoutEvents (wxValidator &aValidator) |
Call a text validator's TransferDataToWindow method without firing a text change event. More... | |
void | SetControlsTabOrder (const std::vector< wxWindow * > &aControlsInTabOrder) |
Set a list of controls to have a defined sequential tab order. More... | |
int | GetStdMargin () |
Get the standard margin around a widget in the KiCad UI. More... | |
wxSize | 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. More... | |
bool | EnsureTextCtrlWidth (wxTextCtrl *aCtrl, const wxString *aString=NULL) |
Set the minimum pixel width on a text control in order to make a text string be fully visible within it. More... | |
void | SelectReferenceNumber (wxTextEntry *aTextEntry) |
Select the number (or "?") in a reference for ease of editing. More... | |
bool | IsInputControlFocused () |
Checks if a input control has focus. More... | |
bool | IsModalDialogFocused () |
bool KIUI::EnsureTextCtrlWidth | ( | wxTextCtrl * | aCtrl, |
const wxString * | aString = NULL |
||
) |
Set the minimum pixel width on a text control in order to make a text string be fully visible within it.
The current font within the text control is considered. The text can come either from the control or be given as an argument. If the text control is larger than needed, then nothing is done.
aCtrl | the text control to potentially make wider. |
aString | the text that is used in sizing the control's pixel width. If NULL, then the text already within the control is used. |
Definition at line 73 of file ui_common.cpp.
References GetTextSize().
Referenced by GERBVIEW_FRAME::UpdateTitleAndInfo().
int KIUI::GetStdMargin | ( | ) |
Get the standard margin around a widget in the KiCad UI.
Definition at line 29 of file ui_common.cpp.
Referenced by BUTTON_ROW_PANEL::addButtons(), BUTTON_ROW_PANEL::BUTTON_ROW_PANEL(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), PANEL_HOTKEYS_EDITOR::installButtons(), and PANEL_HOTKEYS_EDITOR::PANEL_HOTKEYS_EDITOR().
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.
Definition at line 58 of file ui_common.cpp.
Referenced by DIALOG_EDIT_COMPONENTS_LIBID::AdjustGridColumns(), LIB_TREE_MODEL_ADAPTER::AttachTo(), DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), WX_ELLIPSIZED_STATIC_TEXT::DoGetBestSize(), EDA_DRAW_FRAME::EDA_DRAW_FRAME(), EnsureTextCtrlWidth(), FIELDS_EDITOR_GRID_DATA_MODEL::GetDataWidth(), PL_EDITOR_FRAME::PL_EDITOR_FRAME(), PANEL_SETUP_PINMAP::reBuildMatrixPanel(), DIALOG_FP_CONFLICT_ASSIGNMENT_SELECTOR::recalculateColumns(), PL_EDITOR_FRAME::ReCreateHToolbar(), ZONE_SETTINGS::SetupLayersList(), and NET_SELECTOR_COMBOPOPUP::updateSize().
bool KIUI::IsInputControlFocused | ( | ) |
Checks if a input control has focus.
Definition at line 137 of file ui_common.cpp.
Referenced by KIGFX::WX_VIEW_CONTROLS::onEnter(), EDA_DRAW_PANEL_GAL::onEnter(), and EDA_DRAW_PANEL_GAL::OnEvent().
bool KIUI::IsModalDialogFocused | ( | ) |
Definition at line 149 of file ui_common.cpp.
References Pgm().
Referenced by EDA_DRAW_PANEL_GAL::onEnter(), and EDA_DRAW_PANEL_GAL::OnEvent().
void KIUI::SelectReferenceNumber | ( | wxTextEntry * | aTextEntry | ) |
Select the number (or "?") in a reference for ease of editing.
Definition at line 102 of file ui_common.cpp.
Referenced by DIALOG_TEXT_PROPERTIES::OnSetFocusText(), DIALOG_EDIT_ONE_FIELD::OnSetFocusText(), DIALOG_SYMBOL_PROPERTIES::OnUpdateUI(), DIALOG_FOOTPRINT_PROPERTIES::OnUpdateUI(), and DIALOG_TEXT_PROPERTIES::TransferDataToWindow().
void KIUI::SetControlsTabOrder | ( | const std::vector< wxWindow * > & | aControlsInTabOrder | ) |
Set a list of controls to have a defined sequential tab order.
Each control in the list will come after the previous one. The first control will keep its current position. The end result will be that the given control will be sequential when tabbed though.
This can be slightly clearer than manually calling MoveAfterInTabOrder on each control in turn.
aControlsInTabOrder | list of controls (wxWindows) in desired tab order |
void KIUI::ValidatorTransferToWindowWithoutEvents | ( | wxValidator & | aValidator | ) |
Call a text validator's TransferDataToWindow method without firing a text change event.
This is useful when you want to keep a validator in sync with other data, but the act of changing it should not trigger other updates. It is the validator equivalent of ChangeValue() compared to SetValue().
This function blocks all events, but the same technique can be used to selectively block events.
aValidator | the validator to update the control of |
Definition at line 376 of file validators.cpp.
Referenced by DIALOG_FOOTPRINT_PROPERTIES::updateOrientationControl().