KiCad PCB EDA Suite
panel_hotkeys_editor.cpp File Reference
#include <panel_hotkeys_editor.h>
#include <eda_base_frame.h>
#include <wx/srchctrl.h>
#include <wx/panel.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <widgets/button_row_panel.h>
#include <widgets/ui_common.h>

Go to the source code of this file.

Functions

static wxSearchCtrl * CreateTextFilterBox (wxWindow *aParent, const wxString &aDescriptiveText)
 Helper function to add a filter box to a panel, with some sensible defaults for that purpose. More...
 

Variables

static const wxSize default_dialog_size { 500, 350 }
 
static const wxSize min_dialog_size { -1, 350 }
 

Function Documentation

static wxSearchCtrl* CreateTextFilterBox ( wxWindow *  aParent,
const wxString &  aDescriptiveText 
)
static

Helper function to add a filter box to a panel, with some sensible defaults for that purpose.

Parameters
aParentThe panrent widget/panel
aDescriptiveTextThe text to show when the box is empty.
Returns
A newly constructed filter box - the caller owns it

Definition at line 47 of file panel_hotkeys_editor.cpp.

Referenced by PANEL_HOTKEYS_EDITOR::PANEL_HOTKEYS_EDITOR().

48 {
49  auto search_widget = new wxSearchCtrl( aParent, wxID_ANY );
50 
51  search_widget->ShowSearchButton( false );
52  search_widget->ShowCancelButton( true );
53 
54  search_widget->SetDescriptiveText( aDescriptiveText);
55 
56  return search_widget;
57 }

Variable Documentation

const wxSize default_dialog_size { 500, 350 }
static

Definition at line 36 of file panel_hotkeys_editor.cpp.

const wxSize min_dialog_size { -1, 350 }
static

Definition at line 37 of file panel_hotkeys_editor.cpp.