KiCad PCB EDA Suite
|
Functions | |
bool | IsDarkTheme () |
Determine if the desktop interface is currently using a dark theme or a light theme. More... | |
void | ForceFocus (wxWindow *aWindow) |
Pass the current focus to the window. More... | |
bool | IsWindowActive (wxWindow *aWindow) |
Check to see if the given window is the currently active window (e.g. More... | |
void | ReparentQuasiModal (wxNonOwnedWindow *aWindow) |
Move a window's parent to be the top-level window and force the window to be on top. More... | |
void | FixupCancelButtonCmdKeyCollision (wxWindow *aWindow) |
bool | IsStockCursorOk (wxStockCursor aCursor) |
Checks if we designated a stock cursor for this OS as "OK" or else we may need to load a custom one. More... | |
void | LargeChoiceBoxHack (wxChoice *aChoice) |
Configure a wxChoice control to support a lot of entries by disabling functionality that makes adding new items become very expensive. More... | |
void | EllipsizeChoiceBox (wxChoice *aChoice) |
Configure a wxChoice control to ellipsize the shown text in the button with the ellipses placed at the end of the string. More... | |
double | GetPixelScaleFactor (const wxWindow *aWindow) |
Tries to determine the pixel scaling factor currently in use for the window. More... | |
double | GetContentScaleFactor (const wxWindow *aWindow) |
Tries to determine the content scaling factor currently in use for the window. More... | |
wxSize | GetUnobscuredSize (const wxWindow *aWindow) |
Tries to determine the size of the viewport of a scrollable widget (wxDataViewCtrl, wxGrid) that won't be obscured by scrollbars. More... | |
void | SetOverlayScrolling (const wxWindow *aWindow, bool overlay) |
Used to set overlay/non-overlay scrolling mode in a window. More... | |
bool | AllowIconsInMenus () |
If the user has disabled icons system-wide, we check that here. More... | |
void | WarpPointer (wxWindow *aWindow, int aX, int aY) |
Move the mouse cursor to a specific position relative to the window. More... | |
void | ImmControl (wxWindow *aWindow, bool aEnable) |
Configures the IME mode of a given control handle. More... | |
bool KIPLATFORM::UI::AllowIconsInMenus | ( | ) |
If the user has disabled icons system-wide, we check that here.
Definition at line 186 of file gtk/ui.cpp.
Referenced by PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS().
void KIPLATFORM::UI::EllipsizeChoiceBox | ( | wxChoice * | aChoice | ) |
Configure a wxChoice control to ellipsize the shown text in the button with the ellipses placed at the end of the string.
aChoice | is the choice box to ellipsize |
Definition at line 131 of file gtk/ui.cpp.
Referenced by DIALOG_SELECT_3DMODEL::DIALOG_SELECT_3DMODEL().
void KIPLATFORM::UI::FixupCancelButtonCmdKeyCollision | ( | wxWindow * | aWindow | ) |
Definition at line 71 of file gtk/ui.cpp.
Referenced by CVPCB_MAINFRAME::CVPCB_MAINFRAME(), and DIALOG_SHIM::OnPaint().
void KIPLATFORM::UI::ForceFocus | ( | wxWindow * | aWindow | ) |
Pass the current focus to the window.
On OSX this will forcefully give the focus to the desired window, while on MSW and GTK it will simply call the wxWidgets SetFocus() function.
aWindow | is the window to pass focus to |
Definition at line 44 of file gtk/ui.cpp.
Referenced by NET_SELECTOR_COMBOPOPUP::doSetFocus(), DIALOG_SHIM::OnPaint(), DIALOG_DRC::OnRunDRCClick(), and DIALOG_ERC::OnRunERCClick().
double KIPLATFORM::UI::GetContentScaleFactor | ( | const wxWindow * | aWindow | ) |
Tries to determine the content scaling factor currently in use for the window.
The content scaling factor is typically settable by the user and may differ from the pixel scaling factor.
Definition at line 165 of file gtk/ui.cpp.
References GetPixelScaleFactor().
Referenced by DPI_SCALING::GetContentScaleFactor().
double KIPLATFORM::UI::GetPixelScaleFactor | ( | const wxWindow * | aWindow | ) |
Tries to determine the pixel scaling factor currently in use for the window.
Under wx3.0, GTK fails to properly detect the scale factor.
aWindow | pointer to the window to check |
Definition at line 152 of file gtk/ui.cpp.
Referenced by GetContentScaleFactor(), and DPI_SCALING::GetScaleFactor().
wxSize KIPLATFORM::UI::GetUnobscuredSize | ( | const wxWindow * | aWindow | ) |
Tries to determine the size of the viewport of a scrollable widget (wxDataViewCtrl, wxGrid) that won't be obscured by scrollbars.
aWindow | pointer to the scrollable widget to check |
Definition at line 172 of file gtk/ui.cpp.
Referenced by DIALOG_BOARD_STATISTICS::adjustDrillGridColumns(), DIALOG_SYMBOL_PROPERTIES::AdjustFieldsGridColumns(), DIALOG_EDIT_SYMBOLS_LIBID::AdjustGridColumns(), DIALOG_LIB_EDIT_PIN_TABLE::adjustGridColumns(), DIALOG_LIB_SYMBOL_PROPERTIES::adjustGridColumns(), DIALOG_PIN_PROPERTIES::adjustGridColumns(), DIALOG_SHEET_PROPERTIES::AdjustGridColumns(), DIALOG_FOOTPRINT_PROPERTIES::adjustGridColumns(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::adjustGridColumns(), DIALOG_SWAP_LAYERS::adjustGridColumns(), PANEL_FP_PROPERTIES_3D_MODEL::AdjustGridColumnWidths(), DIALOG_SYMBOL_PROPERTIES::AdjustPinsGridColumns(), DIALOG_SIM_MODEL< T_symbol, T_field >::onPinAssignmentsGridSize(), DIALOG_SYMBOL_FIELDS_TABLE::OnSizeFieldList(), and PANEL_PACKAGES_VIEW::OnSizeInfoBox().
void KIPLATFORM::UI::ImmControl | ( | wxWindow * | aWindow, |
bool | aEnable | ||
) |
Configures the IME mode of a given control handle.
Definition at line 221 of file gtk/ui.cpp.
Referenced by EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL().
bool KIPLATFORM::UI::IsDarkTheme | ( | ) |
Determine if the desktop interface is currently using a dark theme or a light theme.
Definition at line 31 of file gtk/ui.cpp.
Referenced by WX_AUI_TOOLBAR_ART::DrawButton(), WX_HTML_REPORT_PANEL::generateHtml(), MakeDisabledBitmap(), BITMAP_BUTTON::OnPaint(), SPLIT_BUTTON::OnPaint(), STD_BITMAP_BUTTON::OnPaint(), PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME(), SYMBOLS_LISTBOX::SYMBOLS_LISTBOX(), BITMAP_STORE::ThemeChanged(), NUMBER_BADGE::UpdateNumber(), and WX_INFOBAR::WX_INFOBAR().
bool KIPLATFORM::UI::IsStockCursorOk | ( | wxStockCursor | aCursor | ) |
Checks if we designated a stock cursor for this OS as "OK" or else we may need to load a custom one.
aCursor | is wxStockCursor we want to see if its acceptable |
Definition at line 77 of file gtk/ui.cpp.
Referenced by CURSOR_STORE::GetStockCursor().
bool KIPLATFORM::UI::IsWindowActive | ( | wxWindow * | aWindow | ) |
Check to see if the given window is the currently active window (e.g.
the window in the foreground the user is interacting with).
aWindow | is the window to check |
Definition at line 50 of file gtk/ui.cpp.
Referenced by TOOL_DISPATCHER::DispatchWxEvent(), EDA_DRAW_PANEL_GAL::onEnter(), KIGFX::WX_VIEW_CONTROLS::onEnter(), EDA_DRAW_PANEL_GAL::OnEvent(), and KIGFX::WX_VIEW_CONTROLS::onMotion().
void KIPLATFORM::UI::LargeChoiceBoxHack | ( | wxChoice * | aChoice | ) |
Configure a wxChoice control to support a lot of entries by disabling functionality that makes adding new items become very expensive.
aChoice | is the choice box to modify |
Definition at line 113 of file gtk/ui.cpp.
References disable_area_apply_attributes_cb().
Referenced by FONT_CHOICE::FONT_CHOICE().
void KIPLATFORM::UI::ReparentQuasiModal | ( | wxNonOwnedWindow * | aWindow | ) |
Move a window's parent to be the top-level window and force the window to be on top.
This only has an affect for OSX, it is a NOP for GTK and MSW.
Apple in its infinite wisdom will raise a disabled window before even passing us the event, so we have no way to stop it. Instead, we must set an order on the windows so that the quasi-modal will be pushed in front of the disabled window when it is raised.
aWindow | is the window to reparent |
Definition at line 65 of file gtk/ui.cpp.
Referenced by PCB_VIEWER_TOOLS::Show3DViewer(), and DIALOG_SHIM::ShowQuasiModal().
void KIPLATFORM::UI::SetOverlayScrolling | ( | const wxWindow * | aWindow, |
bool | overlay | ||
) |
Used to set overlay/non-overlay scrolling mode in a window.
Implemented only on GTK.
Definition at line 179 of file gtk/ui.cpp.
References overlay.
Referenced by EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL().
void KIPLATFORM::UI::WarpPointer | ( | wxWindow * | aWindow, |
int | aX, | ||
int | aY | ||
) |
Move the mouse cursor to a specific position relative to the window.
aWindow | Window in which to position to mouse cursor |
aX | destination x position |
aY | destination y position |
Definition at line 196 of file gtk/ui.cpp.
Referenced by KIGFX::WX_VIEW_CONTROLS::CenterOnCursor(), KIGFX::WX_VIEW_CONTROLS::handleCursorCapture(), KIGFX::WX_VIEW_CONTROLS::onMotion(), and KIGFX::WX_VIEW_CONTROLS::WarpMouseCursor().