|
KiCad PCB EDA Suite
|
Classes | |
| struct | TOUCHPAD_GESTURE |
| A pan and zoom update produced by a native touchpad gesture recognizer. More... | |
| class | TOUCHPAD_GESTURE_HANDLER |
| Owns a platform touchpad input registration for the lifetime of an input window. More... | |
Typedefs | |
| using | TOUCHPAD_GESTURE_CALLBACK = std::function<void( const TOUCHPAD_GESTURE& )> |
Enumerations | |
| enum | NATIVE_DISPLAY_TYPE { DISPLAY_UNKNOWN = 0 , DISPLAY_X11 = 1 , DISPLAY_WAYLAND = 2 , DISPLAY_WIN32 = 3 , DISPLAY_COCOA = 4 } |
| Display server types reported by GetNativeWindowHandles(). More... | |
Functions | |
| bool | IsNativeTouchpadGestureAvailable () |
| Check whether this port provides the native touchpad gesture APIs. | |
| std::unique_ptr< TOUCHPAD_GESTURE_HANDLER > | CreateTouchpadGestureHandler (wxWindow *aInputWindow, TOUCHPAD_GESTURE_CALLBACK aCallback) |
| Register a window for native touchpad pan and pinch gestures when the port supports it. | |
| bool | IsDarkTheme () |
| Determine if the desktop interface is currently using a dark theme or a light theme. | |
| wxColour | GetDialogBGColour () |
| void | ForceFocus (wxWindow *aWindow) |
| Pass the current focus to the window. | |
| bool | IsWindowActive (wxWindow *aWindow) |
| Check to see if the given window is the currently active window (e.g. | |
| void | ReparentModal (wxNonOwnedWindow *aWindow) |
| Move a window's parent to be the top-level window and force the window to be on top. | |
| void | ReparentWindow (wxNonOwnedWindow *aWindow, wxTopLevelWindow *aParent) |
| 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. | |
| 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. | |
| 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. | |
| double | GetPixelScaleFactor (const wxWindow *aWindow) |
| Tries to determine the pixel scaling factor currently in use for the window. | |
| double | GetContentScaleFactor (const wxWindow *aWindow) |
| Tries to determine the content scaling factor currently in use for the window. | |
| double | GetDisplayRefreshRate (const wxWindow *aWindow) |
| Return the refresh rate in Hz of the display showing most of the window, or 0 if unknown. | |
| void | GetInfoBarColours (wxColour &aFGColour, wxColour &aBGColour) |
| Return the background and foreground colors for info bars in the current scheme. | |
| wxWindow * | CreateCanvasOverlay (wxWindow *aCanvas) |
| Create a window for widgets that are shown over a canvas without taking space from it. | |
| 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. | |
| void | SetOverlayScrolling (const wxWindow *aWindow, bool overlay) |
| Used to set overlay/non-overlay scrolling mode in a window. | |
| bool | AllowIconsInMenus () |
| If the user has disabled icons system-wide, we check that here. | |
| bool | SupportsKeyState () |
| Return whether wxGetKeyState() can query ordinary keys, beyond modifiers and lock keys. | |
| wxPoint | GetMousePosition () |
| Returns the mouse position in screen coordinates. | |
| bool | WarpPointer (wxWindow *aWindow, int aX, int aY) |
| Move the mouse cursor to a specific position relative to the window. | |
| void | ImmControl (wxWindow *aWindow, bool aEnable) |
| Configures the IME mode of a given control handle. | |
| void | ImeNotifyCancelComposition (wxWindow *aWindow) |
| Asks the IME to cancel. | |
| bool | InfiniteDragPrepareWindow (wxWindow *aWindow) |
On Wayland, restricts the pointer movement to a rectangle slightly bigger than the given wxWindow. | |
| void | InfiniteDragReleaseWindow () |
On Wayland, allows the cursor to freely move again after a drag (see InfiniteDragPrepareWindow). | |
| void | EnsureVisible (wxWindow *aWindow) |
| Ensure that a window is visible on the screen. | |
| void | StabilizeWindowPosition (wxWindow *aWindow) |
| Prepare a top-level window for reliable position round-tripping. | |
| void | SetFloatLevel (wxWindow *aWindow) |
| Intended to set the floating window level in macOS on a window. | |
| void | ReleaseChildWindow (wxNonOwnedWindow *aWindow) |
| Release a modal window's parent-child relationship with its parent window. | |
| void | AllowNetworkFileSystems (wxDialog *aDialog) |
| Configure a file dialog to show network and virtual file systems. | |
| void | CancelPendingScroll (wxDataViewCtrl *aCtrl) |
Cancel any pending scroll-to-item request on aCtrl. | |
| void | SetWMClass (wxWindow *aWindow, const wxString &aClass) |
| Tag a top-level window with the freedesktop application id of its installed launcher, setting the X11 WM_CLASS and, on Wayland, the surface application id. | |
| void | GetNativeWindowHandles (wxWindow *aWindow, void **aHandle, void **aDisplay, int *aDisplayType=nullptr) |
| Get the native handles needed to create a GPU surface for aWindow. | |
| void | PrepareForExternalRendering (wxWindow *aWindow) |
| Prepare a realized widget for Vulkan or Metal rendering, before its first present. | |
| void | KeepAboveExternalRendering (wxWindow *aChild) |
| Keep a child visible on top of a parent prepared with PrepareForExternalRendering(). | |
| using KIPLATFORM::UI::TOUCHPAD_GESTURE_CALLBACK = std::function<void( const TOUCHPAD_GESTURE& )> |
Definition at line 56 of file touchpad.h.
Display server types reported by GetNativeWindowHandles().
| Enumerator | |
|---|---|
| DISPLAY_UNKNOWN | |
| DISPLAY_X11 | |
| DISPLAY_WAYLAND | |
| DISPLAY_WIN32 | |
| DISPLAY_COCOA | |
| bool KIPLATFORM::UI::AllowIconsInMenus | ( | ) |
If the user has disabled icons system-wide, we check that here.
Definition at line 481 of file wxgtk/ui.cpp.
Referenced by PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS().
| void KIPLATFORM::UI::AllowNetworkFileSystems | ( | wxDialog * | aDialog | ) |
Configure a file dialog to show network and virtual file systems.
On GTK, file dialogs default to showing only local files, which excludes GVFS-mounted filesystems like Google Drive, SMB shares, SFTP connections, and removable media mounted through GVFS. This function configures the dialog to also show these non-local filesystems.
This function must be called after creating the dialog but before calling ShowModal().
This is a NOP on Windows and macOS where network filesystems are shown by default.
| aDialog | is the file dialog to configure |
Definition at line 640 of file wxgtk/ui.cpp.
Referenced by KICAD_MANAGER_CONTROL::ArchiveProject(), AskLoadBoardFileName(), AskSaveBoardFileName(), PANEL_DESIGN_BLOCK_LIB_TABLE::browseLibrariesHandler(), PANEL_FP_LIB_TABLE::browseLibrariesHandler(), PANEL_SYM_LIB_TABLE::browseLibrariesHandler(), DIALOG_DATABASE_LIB_SETTINGS::chooseSavePath(), PL_EDITOR_FRAME::CreateDrawingSheetItem(), BOARD_EDITOR_CONTROL::ExportCmpFile(), FOOTPRINT_EDIT_FRAME::ExportFootprint(), BOARD_EDITOR_CONTROL::ExportHyperlynx(), BOARD_EDITOR_CONTROL::ExportNetlist(), SIMULATOR_CONTROL::ExportPlotAsCSV(), SIMULATOR_CONTROL::ExportPlotAsPNG(), SYMBOL_EDIT_FRAME::ExportSymbol(), PCB_EDIT_TABLE_TOOL::ExportTableToCSV(), SCH_EDIT_TABLE_TOOL::ExportTableToCSV(), GERBVIEW_CONTROL::ExportToPcbnew(), SYMBOL_EDITOR_CONTROL::ExportView(), PL_EDITOR_FRAME::Files_io(), BOARD_EDITOR_CONTROL::GenBOMFileFromBoard(), BOARD_EDITOR_CONTROL::GenD356File(), PCB_NET_INSPECTOR_PANEL::generateReport(), EDA_3D_VIEWER_FRAME::getExportFileName(), FOOTPRINT_EDIT_FRAME::ImportFootprint(), SCH_EDITOR_CONTROL::ImportFPAssignments(), KICAD_MANAGER_FRAME::ImportNonKiCadProject(), SCH_DRAWING_TOOLS::ImportSheet(), SYMBOL_EDIT_FRAME::ImportSymbol(), EDA_DRAW_FRAME::LibraryFileBrowser(), GERBVIEW_FRAME::LoadFileOrShowDialog(), GERBVIEW_FRAME::LoadGerberJobFile(), SCH_EDIT_FRAME::LoadProject(), GERBVIEW_FRAME::LoadZipArchiveFile(), KICAD_MANAGER_CONTROL::NewJobsetFile(), KICAD_MANAGER_CONTROL::NewProject(), SCH_EDIT_FRAME::NewProject(), KICAD_MANAGER_CONTROL::newProjectDirectory(), PANEL_EMBEDDED_FILES::onAddEmbeddedFiles(), DIALOG_CONFIG_EQUFILES::OnAddFiles(), DIALOG_SIM_MODEL< T >::onBrowseButtonClick(), DIALOG_IMPORT_SETTINGS::OnBrowseClicked(), DIALOG_SCH_IMPORT_SETTINGS::OnBrowseClicked(), DIALOG_EXPORT_2581::onBrowseClicked(), DIALOG_EXPORT_ODBPP::onBrowseClicked(), DIALOG_EXPORT_STEP::onBrowseClicked(), DIALOG_GENCAD_EXPORT_OPTIONS::onBrowseClicked(), DIALOG_IMPORT_GFX::onBrowseFiles(), DIALOG_IMPORT_GRAPHICS::onBrowseFiles(), DIALOG_IMPORT_NETLIST::onBrowseNetlistFiles(), WX_HTML_REPORT_PANEL::onBtnSaveToFile(), TEXT_BUTTON_FILE_BROWSER::OnButtonClick(), TEXT_BUTTON_URL::OnButtonClick(), PANEL_REGULATOR::OnDataFileSelection(), PANEL_PACKAGES_VIEW::OnDownloadVersionClicked(), PG_URL_EDITOR::OnEvent(), DIALOG_FP_EDIT_PAD_TABLE::OnExportButtonClick(), DIALOG_LIB_EDIT_PIN_TABLE::OnExportButtonClick(), DIALOG_GENDRILL::onGenReportFile(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_PCM::OnInstallFromFileClicked(), PNS_LOG_VIEWER_FRAME::onOpen(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), DIALOG_FIELDS_TABLE::OnOutputFileBrowseClicked(), DIALOG_DESTINATION::onOutputPathBrowseClicked(), PANEL_COMMON_SETTINGS::OnPDFViewerClick(), PNS_LOG_VIEWER_FRAME::onSaveAs(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), DIALOG_DOWNGRADE_REPORT::OnSaveReport(), DIALOG_DRC::OnSaveReport(), DIALOG_ERC::OnSaveReport(), DIALOG_PAGES_SETTINGS::OnWksFileSelection(), KICAD_MANAGER_CONTROL::OpenJobsetFile(), KICAD_MANAGER_CONTROL::openProject(), SIMULATOR_CONTROL::OpenWorkbook(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceReferenceImage(), ReadTableFromFileOrClipboard(), SCH_EDITOR_CONTROL::SaveCurrSheetCopyAs(), SYMBOL_EDIT_FRAME::saveLibrary(), SCH_EDIT_FRAME::SaveProject(), KICAD_MANAGER_CONTROL::SaveProjectAs(), DIALOG_BOARD_STATISTICS::saveReportClicked(), ROUTER_TOOL::saveRouterDebugLog(), SIMULATOR_CONTROL::SaveWorkbook(), DIALOG_EXPORT_NETLIST::TransferDataFromWindow(), and KICAD_MANAGER_FRAME::UnarchiveFiles().
| void KIPLATFORM::UI::CancelPendingScroll | ( | wxDataViewCtrl * | aCtrl | ) |
Cancel any pending scroll-to-item request on aCtrl.
GtkTreeView keeps a "scroll_to_path" reference that survives across model resets. If the path becomes invalid (because the underlying rows were rebuilt or removed) the next frame-clock tick crashes in gtk_tree_view_get_row_height(NULL) from validate_visible_area. Calling this helper before a model reset replaces the queued row reference with a column-only scroll request, which GtkTreeView frees on the way through its deferred-scroll branch. No-op on MSW and macOS where the native controls do not exhibit this race.
Definition at line 649 of file wxgtk/ui.cpp.
Referenced by DESIGN_BLOCK_TREE_MODEL_ADAPTER::ClearLibraries(), LIB_TREE_MODEL_ADAPTER::ResetTreeView::ResetTreeView(), LIB_TREE_MODEL_ADAPTER::resortTree(), DB_LIB_PREVIEW_TREE_ADAPTER::SetLibrary(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), and LIB_TREE_MODEL_ADAPTER::UpdateSearchString().
| wxWindow * KIPLATFORM::UI::CreateCanvasOverlay | ( | wxWindow * | aCanvas | ) |
Create a window for widgets that are shown over a canvas without taking space from it.
This is only needed where a child of the canvas cannot be drawn above its OpenGL surface. The window stays at the top left corner of the canvas and above its surface, and the caller sets its size and shows it.
| aCanvas | is the window to cover, which owns the new window |
Definition at line 197 of file wxgtk/ui.cpp.
Referenced by overlayParent().
| std::unique_ptr< KIPLATFORM::UI::TOUCHPAD_GESTURE_HANDLER > KIPLATFORM::UI::CreateTouchpadGestureHandler | ( | wxWindow * | aInputWindow, |
| TOUCHPAD_GESTURE_CALLBACK | aCallback ) |
Register a window for native touchpad pan and pinch gestures when the port supports it.
| aInputWindow | is the window that receives native pointer input. |
| aCallback | receives gesture deltas in the input window's pixel coordinate space. |
Definition at line 30 of file wxgtk/touchpad.cpp.
Referenced by EDA_DRAW_PANEL_GAL::UpdateTouchpadGestureHandler().
| 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 407 of file wxgtk/ui.cpp.
Referenced by GIT_ADVANCED_DIALOG::GIT_ADVANCED_DIALOG(), GIT_COMMIT_PANE::GIT_COMMIT_PANE(), and PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL().
| void KIPLATFORM::UI::EnsureVisible | ( | wxWindow * | aWindow | ) |
Ensure that a window is visible on the screen.
On MacOS, this will make it visible in all Spaces. Other platforms are nops.
| aWindow | window to make visible |
Definition at line 245 of file wxgtk/ui.cpp.
Referenced by DIALOG_SHIM::Show().
| void KIPLATFORM::UI::FixupCancelButtonCmdKeyCollision | ( | wxWindow * | aWindow | ) |
Definition at line 347 of file wxgtk/ui.cpp.
Referenced by CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_SHIM::OnPaint(), FOOTPRINT_CHOOSER_FRAME::OnPaint(), and SYMBOL_CHOOSER_FRAME::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 208 of file wxgtk/ui.cpp.
Referenced by FILTER_COMBOPOPUP::doSetFocus(), DIALOG_SHIM::forceInitialFocus(), FOOTPRINT_CHOOSER_FRAME::OnPaint(), SYMBOL_CHOOSER_FRAME::OnPaint(), DIALOG_DRC::OnRunDRCClick(), DIALOG_ERC::OnRunERCClick(), KISTATUSBAR::openWarningList(), SCH_INSPECTION_TOOL::ShowERCDialog(), and NOTIFICATIONS_MANAGER::ShowList().
| 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 441 of file wxgtk/ui.cpp.
References GetPixelScaleFactor().
Referenced by DPI_SCALING_COMMON::GetContentScaleFactor().
| wxColour KIPLATFORM::UI::GetDialogBGColour | ( | ) |
Definition at line 67 of file wxgtk/ui.cpp.
Referenced by SCH_PIN_TABLE_DATA_MODEL::BuildAttrs(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), and DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES().
| double KIPLATFORM::UI::GetDisplayRefreshRate | ( | const wxWindow * | aWindow | ) |
Return the refresh rate in Hz of the display showing most of the window, or 0 if unknown.
Definition at line 448 of file wxgtk/ui.cpp.
Referenced by EDA_DRAW_PANEL_GAL::displayRefreshRate().
| void KIPLATFORM::UI::GetInfoBarColours | ( | wxColour & | aFGColour, |
| wxColour & | aBGColour ) |
Return the background and foreground colors for info bars in the current scheme.
Definition at line 73 of file wxgtk/ui.cpp.
References path.
Referenced by ERROR_CARD::ERROR_CARD(), NOTIFICATION_PANEL::NOTIFICATION_PANEL(), NOTIFICATIONS_LIST::NOTIFICATIONS_LIST(), WX_INFOBAR::onThemeChange(), STATUSBAR_WARNING_LIST::STATUSBAR_WARNING_LIST(), and WX_INFOBAR::WX_INFOBAR().
| wxPoint KIPLATFORM::UI::GetMousePosition | ( | ) |
Returns the mouse position in screen coordinates.
If we've just warped the cursor, returns the new coordinates.
Definition at line 958 of file wxgtk/ui.cpp.
Referenced by SCH_DRAWING_TOOLS::AutoPlaceAllSheetPins(), TOOL_MANAGER::DispatchContextMenu(), EDIT_TOOL::doMoveSelection(), PAD_TOOL::EnumeratePads(), TOOL_MANAGER::GetCursorPosition(), TOOL_MANAGER::GetMousePosition(), KIGFX::WX_VIEW_CONTROLS::getMouseScreenPosition(), PCB_CONTROL::InteractiveDelete(), POSITION_RELATIVE_TOOL::InteractiveOffset(), FILTER_COMBOPOPUP::onIdle(), KIGFX::WX_VIEW_CONTROLS::onMotion(), PCB_ONE_LAYER_SELECTOR::OnMouseMove(), ACTION_TOOLBAR::onTimerDone(), BOARD_INSPECTION_TOOL::pickItemForInspection(), PCB_GROUP_TOOL::PickNewMember(), SCH_GROUP_TOOL::PickNewMember(), EDIT_TOOL::pickReferencePoint(), MATCH_PROPERTIES_TOOL::runInteractive(), PCB_PICKER_TOOL::SelectItemInteractively(), PCB_PICKER_TOOL::SelectPointInteractively(), and SCH_DRAWING_TOOLS::TwoClickPlace().
| void KIPLATFORM::UI::GetNativeWindowHandles | ( | wxWindow * | aWindow, |
| void ** | aHandle, | ||
| void ** | aDisplay, | ||
| int * | aDisplayType = nullptr ) |
Get the native handles needed to create a GPU surface for aWindow.
| aHandle | [out] receives the X11 Window, wl_surface*, HWND or NSView*, or nullptr on failure. |
| aDisplay | [out] receives the X11 Display* or wl_display*, otherwise nullptr. |
| aDisplayType | [out] receives a NATIVE_DISPLAY_TYPE when not nullptr. |
Definition at line 967 of file wxgtk/ui.cpp.
References DISPLAY_UNKNOWN, DISPLAY_WAYLAND, DISPLAY_X11, and traceRhi.
Referenced by GetNativeWindowHandle().
| 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 428 of file wxgtk/ui.cpp.
Referenced by GRID_CELL_ICON_TEXT_RENDERER::Draw(), WX_GRID::DrawRowLabel(), GetContentScaleFactor(), and DPI_SCALING_COMMON::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 467 of file wxgtk/ui.cpp.
Referenced by DIALOG_BOARD_STATISTICS::adjustDrillGridColumns(), DIALOG_EDIT_SYMBOLS_LIBID::AdjustGridColumns(), DIALOG_LIB_EDIT_PIN_TABLE::adjustGridColumns(), DIALOG_PIN_PROPERTIES::adjustGridColumns(), DIALOG_SWAP_LAYERS::adjustGridColumns(), DIALOG_SYMBOL_PROPERTIES::AdjustPinsGridColumns(), DIALOG_SIM_MODEL< T >::onPinAssignmentsGridSize(), and PANEL_PACKAGES_VIEW::OnSizeInfoBox().
| void KIPLATFORM::UI::ImeNotifyCancelComposition | ( | wxWindow * | aWindow | ) |
Asks the IME to cancel.
Definition at line 615 of file wxgtk/ui.cpp.
Referenced by EDA_DRAW_PANEL_GAL::SetFocus().
| void KIPLATFORM::UI::ImmControl | ( | wxWindow * | aWindow, |
| bool | aEnable ) |
Configures the IME mode of a given control handle.
Definition at line 610 of file wxgtk/ui.cpp.
Referenced by EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL().
| bool KIPLATFORM::UI::InfiniteDragPrepareWindow | ( | wxWindow * | aWindow | ) |
On Wayland, restricts the pointer movement to a rectangle slightly bigger than the given wxWindow.
This way, the cursor doesn't exit the (bigger) application window and we retain control on it. Required to make the infinite mouse-drag work with fast movement. See https://gitlab.com/kicad/code/kicad/-/issues/7207#note_1562089503
| aWindow | Window in which to position to mouse cursor |
Definition at line 945 of file wxgtk/ui.cpp.
Referenced by KIGFX::WX_VIEW_CONTROLS::onButton().
| void KIPLATFORM::UI::InfiniteDragReleaseWindow | ( | ) |
On Wayland, allows the cursor to freely move again after a drag (see InfiniteDragPrepareWindow).
Definition at line 952 of file wxgtk/ui.cpp.
Referenced by KIGFX::WX_VIEW_CONTROLS::onButton().
| bool KIPLATFORM::UI::IsDarkTheme | ( | ) |
Determine if the desktop interface is currently using a dark theme or a light theme.
Definition at line 54 of file wxgtk/ui.cpp.
Referenced by EDA_DRAW_FRAME::AddApiPluginMenuItems(), EDA_DRAW_FRAME::AddApiPluginTools(), PANEL_GIT_STASHES::checkStashChanges(), DIALOG_GIT_CREDENTIALS::DIALOG_GIT_CREDENTIALS(), WX_AUI_TOOLBAR_ART::DrawButton(), FillTextDiffControl(), FILTER_COMBOBOX::FILTER_COMBOBOX(), WX_HTML_REPORT_PANEL::generateHtml(), getBoundBoundingFillColor(), getCanvasBackgroundColor(), BITMAP_STORE::GetDisabledBitmapBundle(), BITMAP_STORE::GetDisabledBitmapBundleDef(), GIT_COMMIT_PANE::layoutWide(), DIALOG_TEMPLATE_SELECTOR::LoadTemplatePreview(), KIGIT::MarkDestructive(), BITMAP_BUTTON::OnPaint(), SPLIT_BUTTON::OnPaint(), STD_BITMAP_BUTTON::OnPaint(), WX_COLLAPSIBLE_PANE_HEADER::onPaint(), GIT_COMMIT_PANE::RefreshFileList(), LIB_TREE_RENDERER::Render(), ACTION_TOOLBAR::SetToolBitmap(), DIALOG_TEMPLATE_SELECTOR::ShowWelcomeHtml(), SYMBOLS_LISTBOX::SYMBOLS_LISTBOX(), BITMAP_STORE::ThemeChanged(), DIALOG_TABLE_PROPERTIES::TransferDataToWindow(), PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow(), WX_GRID_ALT_ROW_COLOR_PROVIDER::UpdateColors(), NUMBER_BADGE::UpdateNumber(), and PANEL_SYMBOL_PIN_MAP::ValidateCell().
| bool KIPLATFORM::UI::IsNativeTouchpadGestureAvailable | ( | ) |
Check whether this port provides the native touchpad gesture APIs.
Definition at line 23 of file wxgtk/touchpad.cpp.
| 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 353 of file wxgtk/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 230 of file wxgtk/ui.cpp.
Referenced by TOOL_DISPATCHER::DispatchWxEvent(), DIALOG_SHIM::focusParentCanvas(), DIALOG_SHIM::OnActivate(), EDA_DRAW_PANEL_GAL::onEnter(), KIGFX::WX_VIEW_CONTROLS::onEnter(), EDA_DRAW_PANEL_GAL::OnEvent(), and KIGFX::WX_VIEW_CONTROLS::onMotion().
| void KIPLATFORM::UI::KeepAboveExternalRendering | ( | wxWindow * | aChild | ) |
Keep a child visible on top of a parent prepared with PrepareForExternalRendering().
On GTK3/X11 a child is painted into its parent's window, where the next present overwrites it. This makes the realized child's window native so the present is clipped around it.
Definition at line 1149 of file wxgtk/ui.cpp.
References traceRhi.
Referenced by PrepareForExternalRendering(), and WX_INFOBAR::ShowMessage().
| 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 389 of file wxgtk/ui.cpp.
References disable_area_apply_attributes_cb().
| void KIPLATFORM::UI::PrepareForExternalRendering | ( | wxWindow * | aWindow | ) |
Prepare a realized widget for Vulkan or Metal rendering, before its first present.
On GTK3/X11 this stops GTK's double-buffer blit from overwriting the GPU output. Other platforms need nothing.
Definition at line 1072 of file wxgtk/ui.cpp.
References KeepAboveExternalRendering(), None, and traceRhi.
Referenced by EDA_DRAW_PANEL_GAL::presentFrame(), and EDA_DRAW_PANEL_GAL::SwitchBackend().
| void KIPLATFORM::UI::ReleaseChildWindow | ( | wxNonOwnedWindow * | aWindow | ) |
Release a modal window's parent-child relationship with its parent window.
This only has an effect on macOS, it is a NOP for GTK and MSW.
On macOS, modal dialogs are attached as child windows using addChildWindow, which causes them to disappear when dragged to a different monitor. This function removes that child relationship and sets the window to a floating level, allowing it to be freely moved across monitors while still staying above other windows.
Definition at line 634 of file wxgtk/ui.cpp.
Referenced by DIALOG_SHIM::OnMove().
| void KIPLATFORM::UI::ReparentModal | ( | 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 335 of file wxgtk/ui.cpp.
Referenced by DIALOG_SHIM::OnMove(), KISTATUSBAR::openWarningList(), PCB_VIEWER_TOOLS::Show3DViewer(), FOOTPRINT_CHOOSER_FRAME::Show3DViewerFrame(), DIALOG_SHIM::ShowModal(), and DIALOG_SHIM::ShowQuasiModal().
| void KIPLATFORM::UI::ReparentWindow | ( | wxNonOwnedWindow * | aWindow, |
| wxTopLevelWindow * | aParent ) |
Definition at line 341 of file wxgtk/ui.cpp.
Referenced by BOARD_INSPECTION_TOOL::DiffFootprint(), and BOARD_INSPECTION_TOOL::InspectDRCError().
| void KIPLATFORM::UI::SetFloatLevel | ( | wxWindow * | aWindow | ) |
Intended to set the floating window level in macOS on a window.
Definition at line 629 of file wxgtk/ui.cpp.
Referenced by DIALOG_DRC::DIALOG_DRC(), DIALOG_ERC::DIALOG_ERC(), DIALOG_DRC::OnRunDRCClick(), and DIALOG_ERC::OnRunERCClick().
| 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 474 of file wxgtk/ui.cpp.
References overlay.
Referenced by EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL().
| void KIPLATFORM::UI::SetWMClass | ( | wxWindow * | aWindow, |
| const wxString & | aClass ) |
Tag a top-level window with the freedesktop application id of its installed launcher, setting the X11 WM_CLASS and, on Wayland, the surface application id.
wxGTK derives the X11 res_class from the human-facing application display name and only feeds the Wayland application id (from the class name) on wx >= 3.3.1. Neither matches the installed .desktop launcher, so a taskbar that groups by WM_CLASS mis-associates the windows with an unrelated application (wrong icon, name, and group). Setting the id explicitly restores the association. No-op on MSW and macOS, where the application identity comes from the AppUserModelID / bundle identifier.
May be called before the window is realized; the GTK backend defers applying the hint to the realize/map signals, and also applies it immediately if already realized.
| aWindow | is the top-level window to tag |
| aClass | is the desktop application id, e.g. org.kicad.kicad |
Definition at line 307 of file wxgtk/ui.cpp.
References setWindowClassHint(), and WM_CLASS_DATA_KEY.
Referenced by EDA_BASE_FRAME::commonInit().
| void KIPLATFORM::UI::StabilizeWindowPosition | ( | wxWindow * | aWindow | ) |
Prepare a top-level window for reliable position round-tripping.
On GTK/X11, default window gravity lets window-manager decorations affect the coordinates returned by wxWindow::GetPosition(). Some window managers, notably i3, can then shift a restored top-level window each time it is shown. Other platforms are nops.
| aWindow | window to prepare |
Definition at line 251 of file wxgtk/ui.cpp.
Referenced by DIALOG_SHIM::Show(), and DIALOG_SHIM::ShowModal().
| bool KIPLATFORM::UI::SupportsKeyState | ( | ) |
Return whether wxGetKeyState() can query ordinary keys, beyond modifiers and lock keys.
On GTK, this requires an active X11 display.
Definition at line 491 of file wxgtk/ui.cpp.
Referenced by TOOL_DISPATCHER::DispatchWxEvent(), EDA_VIEW_SWITCHER::EDA_VIEW_SWITCHER(), TOOL_DISPATCHER::isStaleAutoRepeat(), and EDA_VIEW_SWITCHER::TryBefore().
| bool 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 537 of file wxgtk/ui.cpp.
References traceWayland.
Referenced by KIGFX::WX_VIEW_CONTROLS::CenterOnCursor(), KIGFX::WX_VIEW_CONTROLS::handleCursorCapture(), KIGFX::WX_VIEW_CONTROLS::onMotion(), and KIGFX::WX_VIEW_CONTROLS::WarpMouseCursor().