KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ui.cpp File Reference
#include <kiplatform/ui.h>
#include <wx/choice.h>
#include <wx/dataview.h>
#include <wx/dialog.h>
#include <wx/nonownedwnd.h>
#include <wx/popupwin.h>
#include <wx/settings.h>
#include <wx/window.h>
#include <wx/log.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>

Go to the source code of this file.

Functions

static void setWindowClassHint (GtkWidget *aWidget, gpointer)
 
static void disable_area_apply_attributes_cb (GtkWidget *pItem, gpointer userdata)
 The following two functions are based on the "hack" contained in the attached patch at https://gitlab.gnome.org/GNOME/gtk/-/issues/1910 which is supposed to speed up creation of GTK choice boxes.
 

Variables

const wxString traceWayland = wxS( "KICAD_WAYLAND" )
 
static const wxChar traceRhi [] = wxT( "KICAD_RHI" )
 
static const char *const WM_CLASS_DATA_KEY = "kicad-wm-class"
 

Function Documentation

◆ disable_area_apply_attributes_cb()

static void disable_area_apply_attributes_cb ( GtkWidget * pItem,
gpointer userdata )
static

The following two functions are based on the "hack" contained in the attached patch at https://gitlab.gnome.org/GNOME/gtk/-/issues/1910 which is supposed to speed up creation of GTK choice boxes.

The basic idea is to disable some of the event handlers on the menus for the choice box to prevent them from running, which will speed up the creation of the choice box and its popup menu.

Definition at line 376 of file wxgtk/ui.cpp.

Referenced by KIPLATFORM::UI::LargeChoiceBoxHack().

◆ setWindowClassHint()

static void setWindowClassHint ( GtkWidget * aWidget,
gpointer  )
static

Definition at line 270 of file wxgtk/ui.cpp.

References WM_CLASS_DATA_KEY.

Referenced by KIPLATFORM::UI::SetWMClass().

Variable Documentation

◆ traceRhi

const wxChar traceRhi[] = wxT( "KICAD_RHI" )
static

Definition at line 51 of file wxgtk/ui.cpp.

◆ traceWayland

const wxString traceWayland = wxS( "KICAD_WAYLAND" )

Definition at line 50 of file wxgtk/ui.cpp.

Referenced by KIPLATFORM::UI::WarpPointer().

◆ WM_CLASS_DATA_KEY

const char* const WM_CLASS_DATA_KEY = "kicad-wm-class"
static

Definition at line 263 of file wxgtk/ui.cpp.

Referenced by setWindowClassHint(), and KIPLATFORM::UI::SetWMClass().