KiCad PCB EDA Suite
KIPLATFORM::UI Namespace Reference

Functions

void ForceFocus (wxWindow *aWindow)
 Pass the current focus to the window. 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)
 

Function Documentation

◆ FixupCancelButtonCmdKeyCollision()

void KIPLATFORM::UI::FixupCancelButtonCmdKeyCollision ( wxWindow *  aWindow)

Definition at line 38 of file gtk/ui.cpp.

39 {
40  // Not needed on this platform
41 }

Referenced by CVPCB_MAINFRAME::CVPCB_MAINFRAME(), and DIALOG_SHIM::OnPaint().

◆ ForceFocus()

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.

Parameters
aWindowis the window to pass focus to

Definition at line 26 of file gtk/ui.cpp.

27 {
28  aWindow->SetFocus();
29 }

Referenced by NET_SELECTOR_COMBOPOPUP::doSetFocus().

◆ ReparentQuasiModal()

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.

Parameters
aWindowis the window to reparent

Definition at line 32 of file gtk/ui.cpp.

33 {
34  // Not needed on this platform
35 }

Referenced by PCB_VIEWER_TOOLS::Show3DViewer(), and DIALOG_SHIM::ShowQuasiModal().