KiCad PCB EDA Suite
DIALOG_CONFIGURE_PATHS Class Reference

#include <dialog_configure_paths.h>

Inheritance diagram for DIALOG_CONFIGURE_PATHS:
DIALOG_CONFIGURE_PATHS_BASE DIALOG_SHIM KIWAY_HOLDER

Public Types

enum  HOLDER_TYPE { DIALOG, FRAME, PANEL }
 

Public Member Functions

 DIALOG_CONFIGURE_PATHS (wxWindow *aParent, FILENAME_RESOLVER *aResolver)
 
 ~DIALOG_CONFIGURE_PATHS () override
 
bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
void SetInitialFocus (wxWindow *aWindow)
 Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown. More...
 
int ShowQuasiModal ()
 
void EndQuasiModal (int retCode)
 
bool IsQuasiModal () const
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
void OnPaint (wxPaintEvent &event)
 
void OnModify ()
 
void SetPosition (const wxPoint &aNewPosition)
 Force the position of the dialog to a new position. More...
 
EDA_UNITS GetUserUnits () const
 
HOLDER_TYPE GetType () const
 
KIWAYKiway () const
 Return a reference to the KIWAY that this object has an opportunity to participate in. More...
 
PROJECTPrj () const
 Return a reference to the PROJECT associated with this KIWAY. More...
 
void SetKiway (wxWindow *aDest, KIWAY *aKiway)
 It is only used for debugging, since "this" is not a wxWindow*. More...
 

Static Public Member Functions

static bool IsCtrl (int aChar, const wxKeyEvent &e)
 
static bool IsShiftCtrl (int aChar, const wxKeyEvent &e)
 

Protected Member Functions

void OnGridCellRightClick (wxGridEvent &event) override
 
void OnGridSize (wxSizeEvent &event) override
 
void OnUpdateUI (wxUpdateUIEvent &event) override
 
void OnGridCellChanging (wxGridEvent &event)
 
void OnAddEnvVar (wxCommandEvent &event) override
 
void OnRemoveEnvVar (wxCommandEvent &event) override
 
void OnAddSearchPath (wxCommandEvent &event) override
 
void OnDeleteSearchPath (wxCommandEvent &event) override
 
void OnSearchPathMoveUp (wxCommandEvent &event) override
 
void OnSearchPathMoveDown (wxCommandEvent &event) override
 
void OnHelp (wxCommandEvent &event) override
 
void AppendEnvVar (const wxString &aName, const wxString &aPath, bool isExternal)
 
void AppendSearchPath (const wxString &aName, const wxString &aPath, const wxString &aDesc)
 
virtual void OnGridCellChange (wxGridEvent &event)
 
void finishDialogSettings ()
 In all dialogs, we must call the same functions to fix minimal dlg size, the default position and perhaps some others to fix a few issues depending on Windows Managers this helper function does these calls. More...
 
void setSizeInDU (int x, int y)
 Set the dialog to the given dimensions in "dialog units". More...
 
int horizPixelsFromDU (int x) const
 Convert an integer number of dialog units to pixels, horizontally. More...
 
int vertPixelsFromDU (int y) const
 Convert an integer number of dialog units to pixels, vertically. More...
 
void resetSize ()
 Clear the existing dialog size and position. More...
 
virtual void OnCharHook (wxKeyEvent &aEvt)
 

Protected Attributes

WX_GRIDm_EnvVars
 
wxBitmapButton * m_btnAddEnvVar
 
wxBitmapButton * m_btnDeleteEnvVar
 
wxStaticBoxSizer * m_sb3DSearchPaths
 
WX_GRIDm_SearchPaths
 
wxBitmapButton * m_btnAddSearchPath
 
wxBitmapButton * m_btnMoveUp
 
wxBitmapButton * m_btnMoveDown
 
wxBitmapButton * m_btnDeleteSearchPath
 
wxStdDialogButtonSizer * m_sdbSizer
 
wxButton * m_sdbSizerOK
 
wxButton * m_sdbSizerCancel
 
wxButton * m_sdbSizerHelp
 
EDA_UNITS m_units
 
std::string m_hash_key
 
bool m_useCalculatedSize
 
bool m_firstPaintEvent
 
wxWindow * m_initialFocusTarget
 
WX_EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 
EDA_BASE_FRAMEm_parentFrame
 
std::vector< wxWindow * > m_tabOrder
 
wxSize m_initialSize
 

Private Attributes

wxString m_errorMsg
 
wxGrid * m_errorGrid
 
int m_errorRow
 
int m_errorCol
 
FILENAME_RESOLVERm_resolver
 
wxString m_curdir
 
wxTextValidator m_aliasValidator
 
int m_gridWidth
 
bool m_gridWidthsDirty
 
HTML_MESSAGE_BOXm_helpDialog
 

Detailed Description

Definition at line 38 of file dialog_configure_paths.h.

Member Enumeration Documentation

◆ HOLDER_TYPE

enum KIWAY_HOLDER::HOLDER_TYPE
inherited
Enumerator
DIALOG 
FRAME 
PANEL 

Definition at line 39 of file kiway_holder.h.

Constructor & Destructor Documentation

◆ DIALOG_CONFIGURE_PATHS()

DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS ( wxWindow *  aParent,
FILENAME_RESOLVER aResolver 
)

Definition at line 57 of file dialog_configure_paths.cpp.

57  :
58  DIALOG_CONFIGURE_PATHS_BASE( aParent ),
59  m_errorGrid( nullptr ),
60  m_errorRow( -1 ),
61  m_errorCol( -1 ),
62  m_resolver( aResolver ),
63  m_gridWidth( 0 ),
64  m_gridWidthsDirty( true ),
65  m_helpDialog( nullptr )
66 {
71  m_btnMoveUp->SetBitmap( KiBitmap( BITMAPS::small_up ) );
73 
75  m_EnvVars->AppendCols( 1 ); // for the isExternal flags
76  m_EnvVars->HideCol( TV_FLAG_COL );
77  m_EnvVars->UseNativeColHeader( true );
78 
79  wxGridCellAttr* attr = new wxGridCellAttr;
80  attr->SetEditor( new GRID_CELL_PATH_EDITOR( this, m_EnvVars, &m_curdir, wxEmptyString ) );
81  m_EnvVars->SetColAttr( TV_VALUE_COL, attr );
82 
83  attr = new wxGridCellAttr;
84  attr->SetEditor( new GRID_CELL_PATH_EDITOR( this, m_SearchPaths, &m_curdir, wxEmptyString ) );
85  m_SearchPaths->SetColAttr( TV_VALUE_COL, attr );
86 
87  // Give a bit more room for combobox editors
88  m_EnvVars->SetDefaultRowSize( m_EnvVars->GetDefaultRowSize() + 4 );
89  m_SearchPaths->SetDefaultRowSize( m_SearchPaths->GetDefaultRowSize() + 4 );
90 
91  m_EnvVars->PushEventHandler( new GRID_TRICKS( m_EnvVars ) );
92  m_SearchPaths->PushEventHandler( new GRID_TRICKS( m_SearchPaths ) );
93 
94  m_EnvVars->SetSelectionMode( wxGrid::wxGridSelectionModes::wxGridSelectRows );
95  m_SearchPaths->SetSelectionMode( wxGrid::wxGridSelectionModes::wxGridSelectRows );
96 
97  if( m_resolver )
98  {
100  m_SearchPaths->UseNativeColHeader( true );
101 
102  // prohibit these characters in the alias names: []{}()%~<>"='`;:.,&?/\|$
103  m_aliasValidator.SetStyle( wxFILTER_EXCLUDE_CHAR_LIST );
104  m_aliasValidator.SetCharExcludes( wxT( "{}[]()%~<>\"='`;:.,&?/\\|$" ) );
105  }
106  else
107  m_sb3DSearchPaths->Show( false );
108 
110  m_sdbSizerOK->SetDefault();
111 
112  // wxFormBuilder doesn't include this event...
113  m_EnvVars->Connect( wxEVT_GRID_CELL_CHANGING,
114  wxGridEventHandler( DIALOG_CONFIGURE_PATHS::OnGridCellChanging ),
115  nullptr, this );
116  m_SearchPaths->Connect( wxEVT_GRID_CELL_CHANGING,
117  wxGridEventHandler( DIALOG_CONFIGURE_PATHS::OnGridCellChanging ),
118  nullptr, this );
119 
120  GetSizer()->SetSizeHints( this );
121  Centre();
122 }
HTML_MESSAGE_BOX * m_helpDialog
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
Definition: grid_tricks.h:55
void OnGridCellChanging(wxGridEvent &event)
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
Definition: dialog_shim.h:97
FILENAME_RESOLVER * m_resolver
Editor for wxGrid cells that adds a file/folder browser to the grid input field.
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition: bitmap.cpp:105
void ClearRows()
wxWidgets recently added an ASSERT which fires if the position is greater than or equal to the number...
Definition: wx_grid.h:106
DIALOG_CONFIGURE_PATHS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Configure Paths"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)

References WX_GRID::ClearRows(), KiBitmap(), m_aliasValidator, DIALOG_CONFIGURE_PATHS_BASE::m_btnAddEnvVar, DIALOG_CONFIGURE_PATHS_BASE::m_btnAddSearchPath, DIALOG_CONFIGURE_PATHS_BASE::m_btnDeleteEnvVar, DIALOG_CONFIGURE_PATHS_BASE::m_btnDeleteSearchPath, DIALOG_CONFIGURE_PATHS_BASE::m_btnMoveDown, DIALOG_CONFIGURE_PATHS_BASE::m_btnMoveUp, m_curdir, DIALOG_CONFIGURE_PATHS_BASE::m_EnvVars, m_resolver, DIALOG_CONFIGURE_PATHS_BASE::m_sb3DSearchPaths, DIALOG_CONFIGURE_PATHS_BASE::m_sdbSizerOK, DIALOG_CONFIGURE_PATHS_BASE::m_SearchPaths, OnGridCellChanging(), DIALOG_SHIM::SetInitialFocus(), small_down, small_plus, small_trash, small_up, TV_FLAG_COL, and TV_VALUE_COL.

◆ ~DIALOG_CONFIGURE_PATHS()

DIALOG_CONFIGURE_PATHS::~DIALOG_CONFIGURE_PATHS ( )
override

Definition at line 125 of file dialog_configure_paths.cpp.

126 {
127  // Delete the GRID_TRICKS.
128  m_SearchPaths->PopEventHandler( true );
129  m_EnvVars->PopEventHandler( true );
130 
131  if( m_helpDialog )
132  m_helpDialog->Destroy();
133 
134  m_EnvVars->Disconnect( wxEVT_GRID_CELL_CHANGING,
135  wxGridEventHandler( DIALOG_CONFIGURE_PATHS::OnGridCellChanging ),
136  nullptr, this );
137  m_SearchPaths->Disconnect( wxEVT_GRID_CELL_CHANGING,
138  wxGridEventHandler( DIALOG_CONFIGURE_PATHS::OnGridCellChanging ),
139  nullptr, this );
140 }
HTML_MESSAGE_BOX * m_helpDialog
void OnGridCellChanging(wxGridEvent &event)

References DIALOG_CONFIGURE_PATHS_BASE::m_EnvVars, m_helpDialog, DIALOG_CONFIGURE_PATHS_BASE::m_SearchPaths, and OnGridCellChanging().

Member Function Documentation

◆ AppendEnvVar()

void DIALOG_CONFIGURE_PATHS::AppendEnvVar ( const wxString &  aName,
const wxString &  aPath,
bool  isExternal 
)
protected

Definition at line 183 of file dialog_configure_paths.cpp.

185 {
186  int i = m_EnvVars->GetNumberRows();
187 
188  m_EnvVars->AppendRows( 1 );
189 
190  m_EnvVars->SetCellValue( i, TV_NAME_COL, aName );
191 
192  wxGridCellAttr* nameCellAttr = m_EnvVars->GetOrCreateCellAttr( i, TV_NAME_COL );
193  wxGridCellTextEditor* nameTextEditor = new GRID_CELL_TEXT_EDITOR();
194  nameTextEditor->SetValidator( ENV_VAR_NAME_VALIDATOR() );
195  nameCellAttr->SetEditor( nameTextEditor );
196  nameCellAttr->SetReadOnly( ENV_VAR::IsEnvVarImmutable( aName ) );
197  nameCellAttr->DecRef();
198 
199  m_EnvVars->SetCellValue( i, TV_VALUE_COL, aPath );
200 
201  wxGridCellAttr* pathCellAttr = m_EnvVars->GetOrCreateCellAttr( i, TV_VALUE_COL );
202  wxSystemColour c = isExternal ? wxSYS_COLOUR_MENU : wxSYS_COLOUR_LISTBOX;
203  pathCellAttr->SetBackgroundColour( wxSystemSettings::GetColour( c ) );
204  pathCellAttr->DecRef();
205 
206  m_EnvVars->SetCellValue( i, TV_FLAG_COL, isExternal ? wxT( "external" ) : wxEmptyString );
207 }
bool IsEnvVarImmutable(const wxString &aEnvVar)
Determine if an environment variable is "predefined", i.e.
Definition: env_vars.cpp:48
This class works around a bug in wxGrid where the first keystroke doesn't get sent through the valida...
Definition: validators.h:44
This class provides a custom wxValidator object for limiting the allowable characters when defining a...
Definition: validators.h:91

References ENV_VAR::IsEnvVarImmutable(), DIALOG_CONFIGURE_PATHS_BASE::m_EnvVars, TV_FLAG_COL, TV_NAME_COL, and TV_VALUE_COL.

Referenced by OnAddEnvVar(), and TransferDataToWindow().

◆ AppendSearchPath()

void DIALOG_CONFIGURE_PATHS::AppendSearchPath ( const wxString &  aName,
const wxString &  aPath,
const wxString &  aDesc 
)
protected

Definition at line 210 of file dialog_configure_paths.cpp.

212 {
213  int i = m_SearchPaths->GetNumberRows();
214 
215  m_SearchPaths->AppendRows( 1 );
216 
217  m_SearchPaths->SetCellValue( i, SP_ALIAS_COL, aName );
218 
219  wxGridCellAttr* nameCellAttr = m_SearchPaths->GetOrCreateCellAttr( i, SP_ALIAS_COL );
220  wxGridCellTextEditor* nameTextEditor = new GRID_CELL_TEXT_EDITOR();
221  nameTextEditor->SetValidator( m_aliasValidator );
222  nameCellAttr->SetEditor( nameTextEditor );
223  nameCellAttr->DecRef();
224 
225  m_SearchPaths->SetCellValue( i, SP_PATH_COL, aPath );
226  m_SearchPaths->SetCellValue( i, SP_DESC_COL, aDescription );
227 }
This class works around a bug in wxGrid where the first keystroke doesn't get sent through the valida...
Definition: validators.h:44

References m_aliasValidator, DIALOG_CONFIGURE_PATHS_BASE::m_SearchPaths, SP_ALIAS_COL, SP_DESC_COL, and SP_PATH_COL.

Referenced by OnAddSearchPath(), and TransferDataToWindow().

◆ Enable()

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 312 of file dialog_shim.cpp.

313 {
314  // so we can do logging of this state change:
315  return wxDialog::Enable( enable );
316 }

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 480 of file dialog_shim.cpp.

481 {
482  // Hook up validator and transfer data from controls handling so quasi-modal dialogs
483  // handle validation in the same way as other dialogs.
484  if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
485  return;
486 
487  SetReturnCode( retCode );
488 
489  if( !IsQuasiModal() )
490  {
491  wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal"
492  "wasn't called" );
493  return;
494  }
495 
496  if( m_qmodal_loop )
497  {
498  if( m_qmodal_loop->IsRunning() )
499  m_qmodal_loop->Exit( 0 );
500  else
501  m_qmodal_loop->ScheduleExit( 0 );
502 
503  m_qmodal_loop = nullptr;
504  }
505 
507  m_qmodal_parent_disabler = nullptr;
508 
509  Show( false );
510 }
bool IsQuasiModal() const
Definition: dialog_shim.h:106
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:213
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:216

References DIALOG_SHIM::IsQuasiModal(), DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, and DIALOG_SHIM::Show().

Referenced by NETLIST_DIALOG::OnAddGenerator(), DIALOG_SHIM::OnButton(), DIALOG_EDIT_SYMBOLS_LIBID::onCancel(), DIALOG_LIB_SYMBOL_PROPERTIES::OnCancelButtonClick(), DIALOG_SYMBOL_PROPERTIES::OnCancelButtonClick(), DIALOG_LIB_EDIT_PIN_TABLE::OnClose(), DIALOG_CHOOSE_FOOTPRINT::OnCloseTimer(), DIALOG_SHIM::OnCloseWindow(), NETLIST_DIALOG::OnDelGenerator(), DIALOG_SYMBOL_PROPERTIES::OnEditLibrarySymbol(), DIALOG_SYMBOL_PROPERTIES::OnEditSymbol(), DIALOG_SYMBOL_PROPERTIES::OnExchangeSymbol(), PCB_ONE_LAYER_SELECTOR::OnLeftGridCellClick(), PCB_ONE_LAYER_SELECTOR::OnRightGridCellClick(), DIALOG_SYMBOL_PROPERTIES::OnUpdateSymbol(), DIALOG_CHOOSE_FOOTPRINT::OnUseBrowser(), DIALOG_PUSH_PAD_PROPERTIES::PadPropertiesAccept(), and DIALOG_SHIM::~DIALOG_SHIM().

◆ finishDialogSettings()

void DIALOG_SHIM::finishDialogSettings ( )
protectedinherited

In all dialogs, we must call the same functions to fix minimal dlg size, the default position and perhaps some others to fix a few issues depending on Windows Managers this helper function does these calls.

finishDialogSettings must be called from derived classes after all widgets have been initialized, and therefore their size fixed. If TransferDataToWindow() is used to initialize widgets, at the end of TransferDataToWindow, or better yet, at end of a wxInitDialogEvent handler.

Definition at line 151 of file dialog_shim.cpp.

152 {
153  // must be called from the constructor of derived classes,
154  // when all widgets are initialized, and therefore their size fixed
155 
156  // SetSizeHints fixes the minimal size of sizers in the dialog
157  // (SetSizeHints calls Fit(), so no need to call it)
158  GetSizer()->SetSizeHints( this );
159 }

Referenced by DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOM::DIALOG_BOM(), DIALOG_BUS_MANAGER::DIALOG_BUS_MANAGER(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CLEANUP_TRACKS_AND_VIAS::DIALOG_CLEANUP_TRACKS_AND_VIAS(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_DRC::DIALOG_DRC(), DIALOG_EDIT_SYMBOLS_LIBID::DIALOG_EDIT_SYMBOLS_LIBID(), DIALOG_ENUM_PADS::DIALOG_ENUM_PADS(), DIALOG_ERC::DIALOG_ERC(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FOOTPRINT_CHECKER::DIALOG_FOOTPRINT_CHECKER(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(), DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR(), DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS(), DIALOG_INSPECTOR::DIALOG_INSPECTOR(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LIB_NEW_SYMBOL::DIALOG_LIB_NEW_SYMBOL(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), DIALOG_LINE_WIRE_BUS_PROPERTIES::DIALOG_LINE_WIRE_BUS_PROPERTIES(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_NET_INSPECTOR::DIALOG_NET_INSPECTOR(), DIALOG_NETLIST::DIALOG_NETLIST(), DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PASTE_SPECIAL::DIALOG_PASTE_SPECIAL(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_PRINT_GENERIC::DIALOG_PRINT_GENERIC(), DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER(), DIALOG_PUSH_PAD_PROPERTIES::DIALOG_PUSH_PAD_PROPERTIES(), DIALOG_REGULATOR_FORM::DIALOG_REGULATOR_FORM(), DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SELECT_3DMODEL::DIALOG_SELECT_3DMODEL(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_AND_LABEL_PROPERTIES::DIALOG_TEXT_AND_LABEL_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), DIALOG_UPDATE_SYMBOL_FIELDS::DIALOG_UPDATE_SYMBOL_FIELDS(), DIALOG_CONSTRAINTS_REPORTER::FinishInitialization(), PAGED_DIALOG::finishInitialization(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), DIALOG_SHEET_PROPERTIES::OnInitDlg(), DIALOG_SYMBOL_PROPERTIES::OnInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_BOARD_STATISTICS::TransferDataToWindow(), and DIALOG_COLOR_PICKER::TransferDataToWindow().

◆ GetType()

HOLDER_TYPE KIWAY_HOLDER::GetType ( ) const
inlineinherited

Definition at line 46 of file kiway_holder.h.

46 { return m_type; }
HOLDER_TYPE m_type
Definition: kiway_holder.h:76

References KIWAY_HOLDER::m_type.

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ GetUserUnits()

◆ horizPixelsFromDU()

int DIALOG_SHIM::horizPixelsFromDU ( int  x) const
protectedinherited

Convert an integer number of dialog units to pixels, horizontally.

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 169 of file dialog_shim.cpp.

170 {
171  wxSize sz( x, 0 );
172  return ConvertDialogToPixels( sz ).x;
173 }

Referenced by DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), and DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL().

◆ IsCtrl()

static bool DIALOG_SHIM::IsCtrl ( int  aChar,
const wxKeyEvent &  e 
)
inlinestaticinherited

Definition at line 126 of file dialog_shim.h.

127  {
128  return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
129  !e.ShiftDown() && !e.MetaDown();
130  }

◆ IsQuasiModal()

◆ IsShiftCtrl()

static bool DIALOG_SHIM::IsShiftCtrl ( int  aChar,
const wxKeyEvent &  e 
)
inlinestaticinherited

Definition at line 132 of file dialog_shim.h.

133  {
134  return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
135  e.ShiftDown() && !e.MetaDown();
136  }

◆ Kiway()

KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

Return a reference to the KIWAY that this object has an opportunity to participate in.

A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER.

Definition at line 53 of file kiway_holder.h.

54  {
55  wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine.
56  return *m_kiway;
57  }
KIWAY * m_kiway
Definition: kiway_holder.h:75

References KIWAY_HOLDER::m_kiway.

Referenced by PROJECT_TREE_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_EDIT_FRAME::AddLibraryFile(), SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), SYMBOL_EDIT_FRAME::canCloseWindow(), SCH_EDIT_FRAME::canCloseWindow(), KICAD_MANAGER_FRAME::CloseProject(), COMMON_CONTROL::ConfigurePaths(), DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel(), DIALOG_CHOOSE_SYMBOL::ConstructRightPanel(), PCB_BASE_FRAME::CreateAndShow3D_Frame(), FOOTPRINT_EDITOR_CONTROL::CreateFootprint(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), SCH_EDIT_FRAME::doCloseWindow(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), BACK_ANNOTATE::FetchNetlistFromPCB(), KICAD_MANAGER_FRAME::ImportNonKiCadProject(), SCRIPTING_TOOL::Init(), EDA_DRAW_FRAME::IsScriptingConsoleVisible(), KICAD_MANAGER_FRAME::language_change(), KIWAY_PLAYER::language_change(), DIALOG_CHANGE_SYMBOLS::launchMatchIdSymbolBrowser(), DIALOG_CHANGE_SYMBOLS::launchNewIdSymbolBrowser(), LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), PL_EDITOR_FRAME::OnExit(), SCH_EDIT_FRAME::OnExit(), FOOTPRINT_EDIT_FRAME::OnExitKiCad(), FOOTPRINT_VIEWER_FRAME::OnExitKiCad(), SYMBOL_EDIT_FRAME::OnExitKiCad(), SAVE_AS_TRAVERSER::OnFile(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbnew(), EDA_BASE_FRAME::OnPreferences(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_FIELD_PROPERTIES::OnTextValueSelectButtonClick(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadFootprintFromBoard(), SCH_EDIT_FRAME::OnUpdatePCB(), FOOTPRINT_EDIT_FRAME::OnUpdateSaveFootprintToBoard(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), SCH_BASE_FRAME::PickSymbolFromLibBrowser(), KIWAY_HOLDER::Prj(), SCH_EDIT_TOOL::Properties(), BACK_ANNOTATE::PushNewLinksToPCB(), FOOTPRINT_WIZARD_FRAME::PythonPluginsReload(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SCH_EDITOR_CONTROL::rescueProject(), EE_INSPECTION_TOOL::RunSimulation(), SYMBOL_EDIT_FRAME::Save(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), LIB_TREE_MODEL_ADAPTER::SavePinnedItems(), EDA_DRAW_FRAME::ScriptingConsoleEnableDisable(), SCH_EDIT_FRAME::SendCrossProbeClearHighlight(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlistToCvpcb(), SCH_EDIT_FRAME::SetCrossProbeConnection(), SYMBOL_EDIT_FRAME::SetCurSymbol(), CVPCB_CONTROL::ShowFootprintViewer(), COMMON_CONTROL::ShowLibraryTable(), COMMON_CONTROL::ShowPlayer(), KICAD_MANAGER_CONTROL::ShowPlayer(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), BOARD_EDITOR_CONTROL::UpdateSchematicFromPCB(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

◆ OnAddEnvVar()

void DIALOG_CONFIGURE_PATHS::OnAddEnvVar ( wxCommandEvent &  event)
overrideprotectedvirtual

Reimplemented from DIALOG_CONFIGURE_PATHS_BASE.

Definition at line 387 of file dialog_configure_paths.cpp.

388 {
390  return;
391 
392  AppendEnvVar( wxEmptyString, wxEmptyString, false );
393 
394  m_EnvVars->MakeCellVisible( m_EnvVars->GetNumberRows() - 1, TV_NAME_COL );
395  m_EnvVars->SetGridCursor( m_EnvVars->GetNumberRows() - 1, TV_NAME_COL );
396 
397  m_EnvVars->EnableCellEditControl( true );
398  m_EnvVars->ShowCellEditControl();
399 }
void AppendEnvVar(const wxString &aName, const wxString &aPath, bool isExternal)
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:190

References AppendEnvVar(), WX_GRID::CommitPendingChanges(), DIALOG_CONFIGURE_PATHS_BASE::m_EnvVars, and TV_NAME_COL.

◆ OnAddSearchPath()

void DIALOG_CONFIGURE_PATHS::OnAddSearchPath ( wxCommandEvent &  event)
overrideprotectedvirtual

Reimplemented from DIALOG_CONFIGURE_PATHS_BASE.

Definition at line 402 of file dialog_configure_paths.cpp.

403 {
405  return;
406 
407  AppendSearchPath( wxEmptyString, wxEmptyString, wxEmptyString);
408 
409  m_SearchPaths->MakeCellVisible( m_SearchPaths->GetNumberRows() - 1, SP_ALIAS_COL );
410  m_SearchPaths->SetGridCursor( m_SearchPaths->GetNumberRows() - 1, SP_ALIAS_COL );
411 
412  m_SearchPaths->EnableCellEditControl( true );
413  m_SearchPaths->ShowCellEditControl();
414 }
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:190
void AppendSearchPath(const wxString &aName, const wxString &aPath, const wxString &aDesc)

References AppendSearchPath(), WX_GRID::CommitPendingChanges(), DIALOG_CONFIGURE_PATHS_BASE::m_SearchPaths, and SP_ALIAS_COL.

◆ OnCharHook()

void DIALOG_SHIM::OnCharHook ( wxKeyEvent &  aEvt)
protectedvirtualinherited

Reimplemented in DIALOG_CHOOSE_SYMBOL, HK_PROMPT_DIALOG, and HTML_MESSAGE_BOX.

Definition at line 570 of file dialog_shim.cpp.

571 {
572  if( aEvt.GetKeyCode() == 'U' && aEvt.GetModifiers() == wxMOD_CONTROL )
573  {
574  if( m_parentFrame )
575  {
577  return;
578  }
579  }
580  // shift-return (Mac default) or Ctrl-Return (GTK) for OK
581  else if( aEvt.GetKeyCode() == WXK_RETURN && ( aEvt.ShiftDown() || aEvt.ControlDown() ) )
582  {
583  wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
584  return;
585  }
586  else if( aEvt.GetKeyCode() == WXK_TAB && !aEvt.ControlDown() )
587  {
588  wxWindow* currentWindow = wxWindow::FindFocus();
589  int currentIdx = -1;
590  int delta = aEvt.ShiftDown() ? -1 : 1;
591 
592  auto advance = [&]( int& idx )
593  {
594  // Wrap-around modulus
595  int size = m_tabOrder.size();
596  idx = ( ( idx + delta ) % size + size ) % size;
597  };
598 
599  for( size_t i = 0; i < m_tabOrder.size(); ++i )
600  {
601  if( m_tabOrder[i] == currentWindow )
602  {
603  currentIdx = (int) i;
604  break;
605  }
606  }
607 
608  if( currentIdx >= 0 )
609  {
610  advance( currentIdx );
611 
612  //todo: We don't currently have non-textentry dialog boxes but this will break if
613  // we add them.
614 #ifdef __APPLE__
615  while( dynamic_cast<wxTextEntry*>( m_tabOrder[ currentIdx ] ) == nullptr )
616  advance( currentIdx );
617 #endif
618 
619  m_tabOrder[ currentIdx ]->SetFocus();
620  return;
621  }
622  }
623 
624  aEvt.Skip();
625 }
std::vector< wxWindow * > m_tabOrder
Definition: dialog_shim.h:220
EDA_BASE_FRAME * m_parentFrame
Definition: dialog_shim.h:218
virtual void ToggleUserUnits()
constexpr int delta

References delta, DIALOG_SHIM::m_parentFrame, DIALOG_SHIM::m_tabOrder, and EDA_BASE_FRAME::ToggleUserUnits().

Referenced by DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), and DIALOG_TEXT_PROPERTIES::~DIALOG_TEXT_PROPERTIES().

◆ OnDeleteSearchPath()

void DIALOG_CONFIGURE_PATHS::OnDeleteSearchPath ( wxCommandEvent &  event)
overrideprotectedvirtual

Reimplemented from DIALOG_CONFIGURE_PATHS_BASE.

Definition at line 437 of file dialog_configure_paths.cpp.

438 {
439  int curRow = m_SearchPaths->GetGridCursorRow();
440 
441  if( curRow < 0 || m_SearchPaths->GetNumberRows() <= curRow )
442  return;
443 
444  m_SearchPaths->CommitPendingChanges( true /* silent mode; we don't care if it's valid */ );
445  m_SearchPaths->DeleteRows( curRow, 1 );
446 
447  // if there are still rows in grid, make previous row visible
448  if( m_SearchPaths->GetNumberRows() )
449  {
450  m_SearchPaths->MakeCellVisible( std::max( 0, curRow-1 ),
451  m_SearchPaths->GetGridCursorCol() );
452  m_SearchPaths->SetGridCursor( std::max( 0, curRow-1 ), m_SearchPaths->GetGridCursorCol() );
453  }
454 }
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:190

References WX_GRID::CommitPendingChanges(), and DIALOG_CONFIGURE_PATHS_BASE::m_SearchPaths.

◆ OnGridCellChange()

virtual void DIALOG_CONFIGURE_PATHS_BASE::OnGridCellChange ( wxGridEvent &  event)
inlineprotectedvirtualinherited

◆ OnGridCellChanging()

void DIALOG_CONFIGURE_PATHS::OnGridCellChanging ( wxGridEvent &  event)
protected

Definition at line 318 of file dialog_configure_paths.cpp.

319 {
320  wxGrid* grid = dynamic_cast<wxGrid*>( event.GetEventObject() );
321  int row = event.GetRow();
322  int col = event.GetCol();
323  wxString text = event.GetString();
324 
325  if( text.IsEmpty() )
326  {
327  if( grid == m_EnvVars )
328  {
329  if( col == TV_NAME_COL )
330  m_errorMsg = _( "Environment variable name cannot be empty." );
331  else
332  m_errorMsg = _( "Environment variable path cannot be empty." );
333  }
334  else
335  {
336  if( col == SP_ALIAS_COL )
337  m_errorMsg = _( "3D search path alias cannot be empty." );
338  else
339  m_errorMsg = _( "3D search path cannot be empty." );
340  }
341 
342  m_errorGrid = dynamic_cast<wxGrid*>( event.GetEventObject() );
343  m_errorRow = row;
344  m_errorCol = col;
345 
346  event.Veto();
347  }
348 
349  if( grid == m_EnvVars )
350  {
351  if( col == TV_VALUE_COL && m_EnvVars->GetCellValue( row, TV_FLAG_COL ).Length()
352  && !Pgm().GetCommonSettings()->m_DoNotShowAgain.env_var_overwrite_warning )
353  {
354  wxString msg1 = _( "This path was defined externally to the running process and\n"
355  "will only be temporarily overwritten." );
356  wxString msg2 = _( "The next time KiCad is launched, any paths that have already\n"
357  "been defined are honored and any settings defined in the path\n"
358  "configuration dialog are ignored. If you did not intend for\n"
359  "this behavior, either rename any conflicting entries or remove\n"
360  "the external environment variable(s) from your system." );
361  KIDIALOG dlg( this, msg1, KIDIALOG::KD_WARNING );
362  dlg.ShowDetailedText( msg2 );
363  dlg.DoNotShowCheckbox( __FILE__, __LINE__ );
364  dlg.ShowModal();
365 
366  if( dlg.DoNotShowAgain() )
367  Pgm().GetCommonSettings()->m_DoNotShowAgain.env_var_overwrite_warning = true;
368  }
369  else if( col == TV_NAME_COL && m_EnvVars->GetCellValue( row, TV_NAME_COL ) != text )
370  {
371  // This env var name is reserved and cannot be added here.
372  if( text == PROJECT_VAR_NAME )
373  {
374  wxMessageBox( wxString::Format( _( "The name %s is reserved, and cannot be used." ),
375  PROJECT_VAR_NAME ) );
376  event.Veto();
377  }
378  else // Changing name; clear external flag
379  {
380  m_EnvVars->SetCellValue( row, TV_FLAG_COL, wxEmptyString );
381  }
382  }
383  }
384 }
Helper class to create more flexible dialogs, including 'do not show again' checkbox handling.
Definition: confirm.h:45
#define PROJECT_VAR_NAME
A variable name whose value holds the current project directory.
Definition: project.h:38
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106
#define _(s)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References _, KIDIALOG::DoNotShowAgain(), KIDIALOG::DoNotShowCheckbox(), Format(), grid, KIDIALOG::KD_WARNING, DIALOG_CONFIGURE_PATHS_BASE::m_EnvVars, m_errorCol, m_errorGrid, m_errorMsg, m_errorRow, Pgm(), PROJECT_VAR_NAME, KIDIALOG::ShowModal(), SP_ALIAS_COL, text, TV_FLAG_COL, TV_NAME_COL, and TV_VALUE_COL.

Referenced by DIALOG_CONFIGURE_PATHS(), and ~DIALOG_CONFIGURE_PATHS().

◆ OnGridCellRightClick()

void DIALOG_CONFIGURE_PATHS::OnGridCellRightClick ( wxGridEvent &  event)
overrideprotectedvirtual

Reimplemented from DIALOG_CONFIGURE_PATHS_BASE.

Definition at line 509 of file dialog_configure_paths.cpp.

510 {
511  wxASSERT((int) TV_VALUE_COL == (int) SP_PATH_COL );
512 
513  if( aEvent.GetCol() == TV_VALUE_COL )
514  {
515  wxMenu menu;
516 
517  AddMenuItem( &menu, 1, _( "File Browser..." ), KiBitmap( BITMAPS::small_folder ) );
518 
519  if( GetPopupMenuSelectionFromUser( menu ) == 1 )
520  {
521  wxDirDialog dlg( nullptr, _( "Select Path" ), m_curdir,
522  wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
523 
524  if( dlg.ShowModal() == wxID_OK )
525  {
526  wxGrid* grid = dynamic_cast<wxGrid*>( aEvent.GetEventObject() );
527  grid->SetCellValue( aEvent.GetRow(), TV_VALUE_COL, dlg.GetPath() );
528  m_curdir = dlg.GetPath();
529  }
530  }
531  }
532 }
wxMenuItem * AddMenuItem(wxMenu *aMenu, int aId, const wxString &aText, const wxBitmap &aImage, wxItemKind aType=wxITEM_NORMAL)
Create and insert a menu item with an icon into aMenu.
Definition: bitmap.cpp:257
#define _(s)
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition: bitmap.cpp:105

References _, AddMenuItem(), grid, KiBitmap(), m_curdir, small_folder, SP_PATH_COL, and TV_VALUE_COL.

◆ OnGridSize()

void DIALOG_CONFIGURE_PATHS::OnGridSize ( wxSizeEvent &  event)
overrideprotectedvirtual

Reimplemented from DIALOG_CONFIGURE_PATHS_BASE.

Definition at line 586 of file dialog_configure_paths.cpp.

587 {
588  if( event.GetSize().GetX() != m_gridWidth )
589  m_gridWidthsDirty = true;
590 
591  event.Skip();
592 }

References m_gridWidth, and m_gridWidthsDirty.

◆ OnHelp()

void DIALOG_CONFIGURE_PATHS::OnHelp ( wxCommandEvent &  event)
overrideprotectedvirtual

Reimplemented from DIALOG_CONFIGURE_PATHS_BASE.

Definition at line 595 of file dialog_configure_paths.cpp.

596 {
597  if( m_helpDialog )
598  {
600  return;
601  }
602 
603  wxString msg = _( "Enter the name and value for each environment variable. Grey entries "
604  "are names that have been defined externally at the system or user "
605  "level. Environment variables defined at the system or user level "
606  "take precedence over the ones defined in this table. This means the "
607  "values in this table are ignored." );
608  msg << "<br><br><b>";
609  msg << _( "To ensure environment variable names are valid on all platforms, the name field "
610  "will only accept upper case letters, digits, and the underscore characters." );
611  msg << "</b>";
612 
613  for( const auto& var : ENV_VAR::GetPredefinedEnvVars() )
614  {
615  msg << "<br><br><b>" << var << "</b>";
616 
617  const auto desc = ENV_VAR::LookUpEnvVarHelp( var );
618 
619  if( desc.size() > 0 )
620  msg << ": " << desc;
621 
622  }
623 
624  m_helpDialog = new HTML_MESSAGE_BOX( nullptr, _( "Environment Variable Help" ) );
625  m_helpDialog->SetDialogSizeInDU( 400, 250 );
626 
627  m_helpDialog->AddHTML_Text( msg );
629 
630  // m_helpDialog will be destroyed when closing the dialog
631 }
HTML_MESSAGE_BOX * m_helpDialog
#define _(s)
void ShowModeless()
Show a modeless version of the dialog (without an OK button).
void SetDialogSizeInDU(int aWidth, int aHeight)
Set the dialog size, using a "logical" value.
wxString LookUpEnvVarHelp(const wxString &aEnvVar)
Look up long-form help text for a given environment variable.
Definition: env_vars.cpp:108
void AddHTML_Text(const wxString &message)
Add HTML text (without any change) to message list.
const ENV_VAR_LIST & GetPredefinedEnvVars()
Get the list of pre-defined environment variables.
Definition: env_vars.cpp:60

References _, HTML_MESSAGE_BOX::AddHTML_Text(), ENV_VAR::GetPredefinedEnvVars(), ENV_VAR::LookUpEnvVarHelp(), m_helpDialog, HTML_MESSAGE_BOX::SetDialogSizeInDU(), and HTML_MESSAGE_BOX::ShowModeless().

◆ OnModify()

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 380 of file dialog_shim.cpp.

381 {
382  if( m_firstPaintEvent )
383  {
385 
386  selectAllInTextCtrls( GetChildren() );
387 
390  else
391  KIPLATFORM::UI::ForceFocus( this ); // Focus the dialog itself
392 
393  m_firstPaintEvent = false;
394  }
395 
396  event.Skip();
397 }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:211
bool m_firstPaintEvent
Definition: dialog_shim.h:210
void ForceFocus(wxWindow *aWindow)
Pass the current focus to the window.
Definition: gtk/ui.cpp:44
void FixupCancelButtonCmdKeyCollision(wxWindow *aWindow)
Definition: gtk/ui.cpp:71
static void selectAllInTextCtrls(wxWindowList &children)

References KIPLATFORM::UI::FixupCancelButtonCmdKeyCollision(), KIPLATFORM::UI::ForceFocus(), DIALOG_SHIM::m_firstPaintEvent, DIALOG_SHIM::m_initialFocusTarget, and selectAllInTextCtrls().

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ OnRemoveEnvVar()

void DIALOG_CONFIGURE_PATHS::OnRemoveEnvVar ( wxCommandEvent &  event)
overrideprotectedvirtual

Reimplemented from DIALOG_CONFIGURE_PATHS_BASE.

Definition at line 417 of file dialog_configure_paths.cpp.

418 {
419  int curRow = m_EnvVars->GetGridCursorRow();
420 
421  if( curRow < 0 || m_EnvVars->GetNumberRows() <= curRow )
422  return;
423  else if( ENV_VAR::IsEnvVarImmutable( m_EnvVars->GetCellValue( curRow, TV_NAME_COL ) ) )
424  {
425  wxBell();
426  return;
427  }
428 
429  m_EnvVars->CommitPendingChanges( true /* silent mode; we don't care if it's valid */ );
430  m_EnvVars->DeleteRows( curRow, 1 );
431 
432  m_EnvVars->MakeCellVisible( std::max( 0, curRow-1 ), m_EnvVars->GetGridCursorCol() );
433  m_EnvVars->SetGridCursor( std::max( 0, curRow-1 ), m_EnvVars->GetGridCursorCol() );
434 }
bool IsEnvVarImmutable(const wxString &aEnvVar)
Determine if an environment variable is "predefined", i.e.
Definition: env_vars.cpp:48
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:190

References WX_GRID::CommitPendingChanges(), ENV_VAR::IsEnvVarImmutable(), DIALOG_CONFIGURE_PATHS_BASE::m_EnvVars, and TV_NAME_COL.

◆ OnSearchPathMoveDown()

void DIALOG_CONFIGURE_PATHS::OnSearchPathMoveDown ( wxCommandEvent &  event)
overrideprotectedvirtual

Reimplemented from DIALOG_CONFIGURE_PATHS_BASE.

Definition at line 483 of file dialog_configure_paths.cpp.

484 {
486  return;
487 
488  int curRow = m_SearchPaths->GetGridCursorRow();
489  int nextRow = curRow + 1;
490 
491  if( curRow < m_SearchPaths->GetNumberRows() - 1 )
492  {
493  for( int i = 0; i < m_SearchPaths->GetNumberCols(); ++i )
494  {
495  wxString tmp = m_SearchPaths->GetCellValue( curRow, i );
496  m_SearchPaths->SetCellValue( curRow, i, m_SearchPaths->GetCellValue( nextRow, i ) );
497  m_SearchPaths->SetCellValue( nextRow, i, tmp );
498  }
499 
500  m_SearchPaths->SetGridCursor( nextRow, m_SearchPaths->GetGridCursorCol() );
501  }
502  else
503  {
504  wxBell();
505  }
506 }
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:190

References WX_GRID::CommitPendingChanges(), and DIALOG_CONFIGURE_PATHS_BASE::m_SearchPaths.

◆ OnSearchPathMoveUp()

void DIALOG_CONFIGURE_PATHS::OnSearchPathMoveUp ( wxCommandEvent &  event)
overrideprotectedvirtual

Reimplemented from DIALOG_CONFIGURE_PATHS_BASE.

Definition at line 457 of file dialog_configure_paths.cpp.

458 {
460  return;
461 
462  int curRow = m_SearchPaths->GetGridCursorRow();
463  int prevRow = curRow - 1;
464 
465  if( curRow > 0 )
466  {
467  for( int i = 0; i < m_SearchPaths->GetNumberCols(); ++i )
468  {
469  wxString tmp = m_SearchPaths->GetCellValue( curRow, i );
470  m_SearchPaths->SetCellValue( curRow, i, m_SearchPaths->GetCellValue( prevRow, i ) );
471  m_SearchPaths->SetCellValue( prevRow, i, tmp );
472  }
473 
474  m_SearchPaths->SetGridCursor( prevRow, m_SearchPaths->GetGridCursorCol() );
475  }
476  else
477  {
478  wxBell();
479  }
480 }
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:190

References WX_GRID::CommitPendingChanges(), and DIALOG_CONFIGURE_PATHS_BASE::m_SearchPaths.

◆ OnUpdateUI()

void DIALOG_CONFIGURE_PATHS::OnUpdateUI ( wxUpdateUIEvent &  event)
overrideprotectedvirtual

Reimplemented from DIALOG_CONFIGURE_PATHS_BASE.

Definition at line 535 of file dialog_configure_paths.cpp.

536 {
537  if( m_gridWidthsDirty )
538  {
539  int width = m_EnvVars->GetClientRect().GetWidth();
540 
541  m_EnvVars->AutoSizeColumn( TV_NAME_COL );
542  m_EnvVars->SetColSize( TV_NAME_COL, std::max( m_EnvVars->GetColSize( TV_NAME_COL ), 120 ) );
543 
544  m_EnvVars->SetColSize( TV_VALUE_COL, width - m_EnvVars->GetColSize( TV_NAME_COL ) );
545 
546  width = m_SearchPaths->GetClientRect().GetWidth();
547 
548  m_SearchPaths->AutoSizeColumn( SP_ALIAS_COL );
549  m_SearchPaths->SetColSize( SP_ALIAS_COL,
550  std::max( m_SearchPaths->GetColSize( SP_ALIAS_COL ), 120 ) );
551 
552  m_SearchPaths->AutoSizeColumn( SP_PATH_COL );
553  m_SearchPaths->SetColSize( SP_PATH_COL,
554  std::max( m_SearchPaths->GetColSize( SP_PATH_COL ), 300 ) );
555 
556  m_SearchPaths->SetColSize( SP_DESC_COL, width -
557  ( m_SearchPaths->GetColSize( SP_ALIAS_COL ) +
558  m_SearchPaths->GetColSize( SP_PATH_COL ) ) );
559  m_gridWidth = m_EnvVars->GetSize().GetX();
560  m_gridWidthsDirty = false;
561  }
562 
563  // Handle a grid error. This is delayed to OnUpdateUI so that we can change focus
564  // even when the original validation was triggered from a killFocus event (and for
565  // dialog with notebooks, so that the corresponding notebook page can be shown in
566  // the background when triggered from an OK).
567  if( m_errorGrid )
568  {
569  // We will re-enter this routine when the error dialog is displayed, so make
570  // sure we don't keep putting up more dialogs.
571  wxGrid* grid = m_errorGrid;
572  m_errorGrid = nullptr;
573 
575 
576  grid->SetFocus();
577  grid->MakeCellVisible( m_errorRow, m_errorCol );
578  grid->SetGridCursor( m_errorRow, m_errorCol );
579 
580  grid->EnableCellEditControl( true );
581  grid->ShowCellEditControl();
582  }
583 }
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition: confirm.cpp:292

References DisplayErrorMessage(), grid, DIALOG_CONFIGURE_PATHS_BASE::m_EnvVars, m_errorCol, m_errorGrid, m_errorMsg, m_errorRow, m_gridWidth, m_gridWidthsDirty, DIALOG_CONFIGURE_PATHS_BASE::m_SearchPaths, SP_ALIAS_COL, SP_DESC_COL, SP_PATH_COL, TV_NAME_COL, and TV_VALUE_COL.

◆ Prj()

PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

Return a reference to the PROJECT associated with this KIWAY.

Definition at line 36 of file kiway_holder.cpp.

37 {
38  return Kiway().Prj();
39 }
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
Definition: kiway_holder.h:53
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
Definition: kiway.cpp:190

References KIWAY_HOLDER::Kiway(), and KIWAY::Prj().

Referenced by PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_LIBRARY_MANAGER::addLibrary(), SYMBOL_EDIT_FRAME::addLibTableEntry(), SCH_EDIT_FRAME::AppendSchematic(), AskSaveBoardFileName(), DIALOG_SYMBOL_REMAP::backupProject(), CVPCB_MAINFRAME::buildEquivalenceList(), CVPCB_MAINFRAME::BuildLibrariesListBox(), SIM_PLOT_FRAME::canCloseWindow(), PANEL_FP_PROPERTIES_3D_MODEL::Cfg3DPath(), KICAD_MANAGER_FRAME::CloseProject(), DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles(), DIALOG_GEN_FOOTPRINT_POSITION::CreateGerberFiles(), PCB_BASE_EDIT_FRAME::createNewLibrary(), PCB_BASE_EDIT_FRAME::CreateNewProjectLibrary(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), SCH_EDIT_FRAME::CreateScreens(), FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION(), DIALOG_NETLIST::DIALOG_NETLIST(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_PLOT::DIALOG_PLOT(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), FOOTPRINT_PREVIEW_PANEL::DisplayFootprint(), SYMBOL_VIEWER_FRAME::DisplayLibInfos(), CVPCB_MAINFRAME::DisplayStatus(), PCB_EDIT_FRAME::doAutoSave(), SCH_EDIT_FRAME::doAutoSave(), PCB_BASE_EDIT_FRAME::doCloseWindow(), FOOTPRINT_EDIT_FRAME::doCloseWindow(), SCH_EDIT_FRAME::doCloseWindow(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), KICAD_MANAGER_CONTROL::Execute(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::ExportFootprintsToLibrary(), BOARD_EDITOR_CONTROL::ExportNetlist(), DIALOG_EXPORT_SVG::ExportSVGFile(), SYMBOL_EDITOR_CONTROL::ExportSymbolAsSVG(), SYMBOL_EDITOR_CONTROL::ExportView(), PCB_EDIT_FRAME::ExportVRML_File(), BACK_ANNOTATE::FetchNetlistFromPCB(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), DIALOG_GENDRILL::GenDrillAndMapFiles(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), SYMBOL_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), SIM_PLOT_FRAME::getDefaultFilename(), SIM_PLOT_FRAME::getDefaultPath(), PCB_BASE_EDIT_FRAME::GetDesignRulesPath(), DISPLAY_FOOTPRINTS_FRAME::GetFootprint(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), SCH_BASE_FRAME::GetLibSymbol(), DIALOG_PLOT_SCHEMATIC::getOutputPath(), KICAD_MANAGER_FRAME::GetProjectFileName(), SCH_EDIT_FRAME::GetSchematicJunctionSize(), SYMBOL_VIEWER_FRAME::GetSelectedSymbol(), SCH_EDIT_FRAME::importFile(), SCH_EDITOR_CONTROL::ImportFPAssignments(), DIALOG_CONFIG_EQUFILES::Init(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), SCH_EDIT_FRAME::KiwayMailIn(), SYMBOL_EDIT_FRAME::KiwayMailIn(), EDA_DRAW_FRAME::LibraryFileBrowser(), CVPCB_MAINFRAME::LoadFootprintFiles(), DIALOG_SPICE_MODEL::loadLibrary(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProjectSettings(), PCB_EDIT_FRAME::LoadProjectSettings(), SIM_PLOT_FRAME::LoadSettings(), SCH_EDIT_FRAME::LoadSheetFromFile(), SYMBOL_EDIT_FRAME::LoadSymbolFromCurrentLib(), EDA_BASE_FRAME::LoadWindowState(), SIM_PLOT_FRAME::loadWorkbook(), SIM_PLOT_FRAME::menuSaveWorkbook(), SIM_PLOT_FRAME::menuSaveWorkbookAs(), PANEL_FP_PROPERTIES_3D_MODEL::On3DModelCellChanged(), FOOTPRINT_VIEWER_FRAME::OnActivate(), PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel(), DIALOG_BOARD_SETUP::OnAuxiliaryAction(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), TEXT_BUTTON_URL::OnButtonClick(), TEXT_BUTTON_FILE_BROWSER::OnButtonClick(), DIALOG_EDIT_SYMBOLS_LIBID::onClickOrphansButton(), DIALOG_EXPORT_STEP::onExportButton(), DIALOG_GENDRILL::OnGenReportFile(), KICAD_MANAGER_FRAME::OnIdle(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), DIALOG_CONFIG_EQUFILES::OnOkClick(), SCH_EDIT_FRAME::OnOpenCvpcb(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), DIALOG_NETLIST::OnOpenNetlistClick(), SCH_EDIT_FRAME::OnOpenPcbnew(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_SCHEMATIC_SETUP::OnPageChange(), DIALOG_BOARD_SETUP::OnPageChange(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), DIALOG_ERC::OnSaveReport(), DIALOG_DRC::OnSaveReport(), DIALOG_TEXT_AND_LABEL_PROPERTIES::onScintillaCharAdded(), PROPERTIES_FRAME::onScintillaCharAdded(), DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded(), DIALOG_SPICE_MODEL::onSelectLibrary(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), SCH_EDIT_FRAME::OnUpdatePCB(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::OpenProjectFiles(), PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), SCH_EDITOR_CONTROL::Paste(), FOOTPRINT_EDITOR_CONTROL::PasteFootprint(), SCH_BASE_FRAME::PickSymbolFromLibTree(), DIALOG_PLOT::Plot(), DIALOG_PLOT_SCHEMATIC::plotOneSheetDXF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetHpgl(), DIALOG_CHOOSE_SYMBOL::PopulateFootprintSelector(), SCH_EDITOR_CONTROL::Print(), EDA_DRAW_FRAME::PrintDrawingSheet(), SCH_EDIT_FRAME::PrintPage(), KICAD_MANAGER_FRAME::PrintPrjInfo(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SYMBOL_VIEWER_FRAME::ReCreateSymbolList(), PANEL_FP_PROPERTIES_3D_MODEL::ReloadModelsFromFootprint(), EDA_3D_VIEWER_FRAME::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), SYMBOL_EDIT_FRAME::replaceLibTableEntry(), SCH_EDITOR_CONTROL::RescueLegacyProject(), SCH_EDITOR_CONTROL::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), SYMBOL_EDIT_FRAME::saveLibrary(), PCB_EDIT_FRAME::SavePcbFile(), SCH_EDIT_FRAME::SaveProject(), PCB_EDIT_FRAME::SaveProjectSettings(), DIALOG_BOARD_STATISTICS::saveReportClicked(), SCH_EDIT_FRAME::saveSchematicFile(), SIM_PLOT_FRAME::SaveSettings(), EDA_BASE_FRAME::SaveSettings(), SYMBOL_EDIT_FRAME::saveSymbolAs(), SCH_BASE_FRAME::saveSymbolLibTables(), SIM_PLOT_FRAME::saveWorkbook(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), PCB_BASE_FRAME::SelectLibrary(), SYMBOL_EDIT_FRAME::SelectLibraryFromList(), PCB_BASE_EDIT_FRAME::selectLibTable(), SYMBOL_EDIT_FRAME::selectSymLibTable(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), SYMBOL_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), SYMBOL_EDIT_FRAME::SetCurSymbol(), GERBVIEW_FRAME::SetPageSettings(), EE_INSPECTION_TOOL::ShowDatasheet(), DIALOG_CHOOSE_SYMBOL::ShowFootprintFor(), COMMON_CONTROL::ShowHelp(), SYMBOL_VIEWER_FRAME::ShowModal(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SYMBOL_LIBRARY_MANAGER::symTable(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER_FRAME::takeScreenshot(), PANEL_SETUP_RULES::TransferDataFromWindow(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), NETLIST_DIALOG::TransferDataFromWindow(), DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataToWindow(), SCH_EDIT_FRAME::updateAutoSaveFile(), DIALOG_PAGES_SETTINGS::UpdateDrawingSheetExample(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), SIM_PLOT_FRAME::updateTitle(), FOOTPRINT_EDIT_FRAME::UpdateTitle(), SCH_EDIT_FRAME::UpdateTitle(), PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_PROPERTIES::~DIALOG_FOOTPRINT_PROPERTIES(), PANEL_FP_PROPERTIES_3D_MODEL::~PANEL_FP_PROPERTIES_3D_MODEL(), and SCH_EDIT_FRAME::~SCH_EDIT_FRAME().

◆ resetSize()

void DIALOG_SHIM::resetSize ( )
protectedinherited

Clear the existing dialog size and position.

This will cause the dialog size to be clear so the next time the dialog is shown the sizers will layout the dialog accordingly. This useful when there are dialog windows that size changes due to layout dependency hidden controls.

Definition at line 287 of file dialog_shim.cpp.

288 {
289  const char* hash_key;
290 
291  if( m_hash_key.size() )
292  {
293  // a special case like EDA_LIST_DIALOG, which has multiple uses.
294  hash_key = m_hash_key.c_str();
295  }
296  else
297  {
298  hash_key = typeid(*this).name();
299  }
300 
301  std::unordered_map<std::string, wxRect>::iterator it = class_map.find( hash_key );
302 
303  if( it == class_map.end() )
304  return;
305 
306  wxRect rect = it->second;
307  rect.SetSize( wxSize( 0, 0 ) );
308  class_map[ hash_key ] = rect;
309 }
std::string m_hash_key
Definition: dialog_shim.h:201
static std::unordered_map< std::string, wxRect > class_map

References class_map, and DIALOG_SHIM::m_hash_key.

Referenced by DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES().

◆ SetInitialFocus()

void DIALOG_SHIM::SetInitialFocus ( wxWindow *  aWindow)
inlineinherited

Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.

Definition at line 97 of file dialog_shim.h.

98  {
99  m_initialFocusTarget = aWindow;
100  }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:211

References DIALOG_SHIM::m_initialFocusTarget.

Referenced by DIALOG_BOM::DIALOG_BOM(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CONFIGURE_PATHS(), DIALOG_FIND::DIALOG_FIND(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), DIALOG_LINE_WIRE_BUS_PROPERTIES::DIALOG_LINE_WIRE_BUS_PROPERTIES(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_SCH_FIND::DIALOG_SCH_FIND(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_AND_LABEL_PROPERTIES::DIALOG_TEXT_AND_LABEL_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), EDA_VIEW_SWITCHER::EDA_VIEW_SWITCHER(), HK_PROMPT_DIALOG::HK_PROMPT_DIALOG(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchAllClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchIDClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchRefClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchSelectedClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchValueClicked(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), SYMBOL_EDIT_FRAME::saveSymbolAs(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), DIALOG_RULE_AREA_PROPERTIES::TransferDataToWindow(), DIALOG_COPPER_ZONE::TransferDataToWindow(), and WX_TEXT_ENTRY_DIALOG::WX_TEXT_ENTRY_DIALOG().

◆ SetKiway()

void KIWAY_HOLDER::SetKiway ( wxWindow *  aDest,
KIWAY aKiway 
)
inherited

It is only used for debugging, since "this" is not a wxWindow*.

"this" is a KIWAY_HOLDER mix-in.

Parameters
aDestis the recipient of aKiway pointer.
aKiwayis often from a parent window or from KIFACE::CreateWindow().

Definition at line 43 of file kiway_holder.cpp.

44 {
45 #if defined(DEBUG)
46  // offer a trap point for debugging most any window
47  wxASSERT( aDest );
48  if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) )
49  {
50  int breakhere=1;
51  ignore_unused( breakhere );
52  }
53 #endif
54 
55  ignore_unused( aDest );
56 
57  m_kiway = aKiway;
58 }
KIWAY * m_kiway
Definition: kiway_holder.h:75
const char * name
Definition: DXF_plotter.cpp:56
void ignore_unused(const T &)
Definition: ignore.h:24

References ignore_unused(), KIWAY_HOLDER::m_kiway, and name.

Referenced by BM2CMP_FRAME::BM2CMP_FRAME(), PCB::IFACE::CreateWindow(), InvokePcbLibTableEditor(), InvokeSchEditSymbolLibTable(), PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

◆ SetPosition()

void DIALOG_SHIM::SetPosition ( const wxPoint &  aNewPosition)
inherited

Force the position of the dialog to a new position.

Parameters
aNewPositionis the new forced position

Definition at line 190 of file dialog_shim.cpp.

191 {
192  wxDialog::SetPosition( aNewPosition );
193 
194  // Now update the stored position:
195  const char* hash_key;
196 
197  if( m_hash_key.size() )
198  {
199  // a special case like EDA_LIST_DIALOG, which has multiple uses.
200  hash_key = m_hash_key.c_str();
201  }
202  else
203  {
204  hash_key = typeid(*this).name();
205  }
206 
207  std::unordered_map<std::string, wxRect>::iterator it = class_map.find( hash_key );
208 
209  if( it == class_map.end() )
210  return;
211 
212  wxRect rect = it->second;
213  rect.SetPosition( aNewPosition );
214 
215  class_map[ hash_key ] = rect;
216 }
std::string m_hash_key
Definition: dialog_shim.h:201
static std::unordered_map< std::string, wxRect > class_map
void SetPosition(const wxString &aStr, const wxString &aDefaultMeasurementUnit, int *aX, int *aY, const wxString &aActualConversion)

References class_map, DIALOG_SHIM::m_hash_key, and PCAD2KICAD::SetPosition().

Referenced by PCB_BASE_FRAME::SelectOneLayer().

◆ setSizeInDU()

void DIALOG_SHIM::setSizeInDU ( int  x,
int  y 
)
protectedinherited

Set the dialog to the given dimensions in "dialog units".

These are units equivalent to 4* the average character width and 8* the average character height, allowing a dialog to be sized in a way that scales it with the system font.

Definition at line 162 of file dialog_shim.cpp.

163 {
164  wxSize sz( x, y );
165  SetSize( ConvertDialogToPixels( sz ) );
166 }

Referenced by DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), HTML_MESSAGE_BOX::HTML_MESSAGE_BOX(), and HTML_MESSAGE_BOX::SetDialogSizeInDU().

◆ Show()

bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 219 of file dialog_shim.cpp.

220 {
221  bool ret;
222  const char* hash_key;
223 
224  if( m_hash_key.size() )
225  {
226  // a special case like EDA_LIST_DIALOG, which has multiple uses.
227  hash_key = m_hash_key.c_str();
228  }
229  else
230  {
231  hash_key = typeid(*this).name();
232  }
233 
234  // Show or hide the window. If hiding, save current position and size.
235  // If showing, use previous position and size.
236  if( show )
237  {
238 #ifndef __WINDOWS__
239  wxDialog::Raise(); // Needed on OS X and some other window managers (i.e. Unity)
240 #endif
241  ret = wxDialog::Show( show );
242 
243  // classname is key, returns a zeroed out default EDA_RECT if none existed before.
244  wxRect savedDialogRect = class_map[ hash_key ];
245 
246  if( savedDialogRect.GetSize().x != 0 && savedDialogRect.GetSize().y != 0 )
247  {
248  if( m_useCalculatedSize )
249  {
250  SetSize( savedDialogRect.GetPosition().x, savedDialogRect.GetPosition().y,
251  wxDialog::GetSize().x, wxDialog::GetSize().y, 0 );
252  }
253  else
254  {
255  SetSize( savedDialogRect.GetPosition().x, savedDialogRect.GetPosition().y,
256  std::max( wxDialog::GetSize().x, savedDialogRect.GetSize().x ),
257  std::max( wxDialog::GetSize().y, savedDialogRect.GetSize().y ),
258  0 );
259  }
260  }
261  else if( m_initialSize != wxDefaultSize )
262  SetSize( m_initialSize );
263 
264  // Be sure that the dialog appears in a visible area
265  // (the dialog position might have been stored at the time when it was
266  // shown on another display)
267  if( wxDisplay::GetFromWindow( this ) == wxNOT_FOUND )
268  Centre();
269  }
270  else
271  {
272  // Save the dialog's position & size before hiding, using classname as key
273  class_map[ hash_key ] = wxRect( wxDialog::GetPosition(), wxDialog::GetSize() );
274 
275 #ifdef __WXMAC__
276  if ( m_eventLoop )
277  m_eventLoop->Exit( GetReturnCode() ); // Needed for APP-MODAL dlgs on OSX
278 #endif
279 
280  ret = wxDialog::Show( show );
281  }
282 
283  return ret;
284 }
std::string m_hash_key
Definition: dialog_shim.h:201
static std::unordered_map< std::string, wxRect > class_map
bool m_useCalculatedSize
Definition: dialog_shim.h:205
wxSize m_initialSize
Definition: dialog_shim.h:223

References class_map, DIALOG_SHIM::m_hash_key, DIALOG_SHIM::m_initialSize, and DIALOG_SHIM::m_useCalculatedSize.

Referenced by FOOTPRINT_EDITOR_CONTROL::CheckFootprint(), DRC_TOOL::CrossProbe(), DIALOG_SHIM::EndQuasiModal(), GROUP_TOOL::GroupProperties(), EE_INSPECTION_TOOL::NextMarker(), DRC_TOOL::NextMarker(), SCH_EDIT_FRAME::OnAnnotate(), DIALOG_DRC::OnDRCItemDClick(), DIALOG_ERC::OnERCItemDClick(), DIALOG_CLEANUP_GRAPHICS::OnLeftDClickItem(), DIALOG_CLEANUP_TRACKS_AND_VIAS::OnLeftDClickItem(), DIALOG_FOOTPRINT_CHECKER::OnLeftDClickItem(), GROUP_TOOL::PickNewMember(), POSITION_RELATIVE_TOOL::PositionRelative(), EE_INSPECTION_TOOL::PrevMarker(), DRC_TOOL::PrevMarker(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), EDA_VIEW_SWITCHER::Show(), DIALOG_PAD_PROPERTIES::Show(), DRC_TOOL::ShowDRCDialog(), EE_INSPECTION_TOOL::ShowERCDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), HTML_MESSAGE_BOX::ShowModeless(), DIALOG_SHIM::ShowQuasiModal(), DIALOG_POSITION_RELATIVE::UpdateAnchor(), and SCH_EDIT_FRAME::UpdateHierarchyNavigator().

◆ ShowQuasiModal()

int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 430 of file dialog_shim.cpp.

431 {
432  // This is an exception safe way to zero a pointer before returning.
433  // Yes, even though DismissModal() clears this first normally, this is
434  // here in case there's an exception before the dialog is dismissed.
435  struct NULLER
436  {
437  void*& m_what;
438  NULLER( void*& aPtr ) : m_what( aPtr ) {}
439  ~NULLER() { m_what = nullptr; } // indeed, set it to NULL on destruction
440  } clear_this( (void*&) m_qmodal_loop );
441 
442  // release the mouse if it's currently captured as the window having it
443  // will be disabled when this dialog is shown -- but will still keep the
444  // capture making it impossible to do anything in the modal dialog itself
445  wxWindow* win = wxWindow::GetCapture();
446  if( win )
447  win->ReleaseMouse();
448 
449  // Get the optimal parent
450  wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
451 
452  wxASSERT_MSG( !m_qmodal_parent_disabler,
453  wxT( "Caller using ShowQuasiModal() twice on same window?" ) );
454 
455  // quasi-modal: disable only my "optimal" parent
457 
458  // Apple in its infinite wisdom will raise a disabled window before even passing
459  // us the event, so we have no way to stop it. Instead, we must set an order on
460  // the windows so that the quasi-modal will be pushed in front of the disabled
461  // window when it is raised.
463 
464  Show( true );
465 
466  m_qmodal_showing = true;
467 
468  WX_EVENT_LOOP event_loop;
469 
470  m_qmodal_loop = &event_loop;
471 
472  event_loop.Run();
473 
474  m_qmodal_showing = false;
475 
476  return GetReturnCode();
477 }
bool m_qmodal_showing
Definition: dialog_shim.h:215
#define WX_EVENT_LOOP
Definition: kiway_player.h:41
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:213
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:216
Toggle a window's "enable" status to disabled, then enabled on destruction.
Definition: dialog_shim.cpp:44
void ReparentQuasiModal(wxNonOwnedWindow *aWindow)
Move a window's parent to be the top-level window and force the window to be on top.
Definition: gtk/ui.cpp:65

References DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, DIALOG_SHIM::m_qmodal_showing, KIPLATFORM::UI::ReparentQuasiModal(), DIALOG_SHIM::Show(), and WX_EVENT_LOOP.

Referenced by SCH_EDIT_TOOL::ChangeSymbols(), S3D::Configure3DPaths(), COMMON_CONTROL::ConfigurePaths(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), SCH_DRAWING_TOOLS::createNewText(), SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties(), SCH_EDIT_TOOL::editFieldText(), SCH_EDITOR_CONTROL::EditSymbolFields(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties(), GLOBAL_EDIT_TOOL::EditTracksAndVias(), GLOBAL_EDIT_TOOL::ExchangeFootprints(), InvokeCopperZonesEditor(), InvokeDialogCreateBOM(), InvokeDialogEditSymbolsLibId(), InvokeDialogRescueEach(), InvokeNonCopperZonesEditor(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SCH_EDITOR_CONTROL::RemapSymbols(), S3D::Select3DModel(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), PCB_EDIT_FRAME::ShowDimensionPropertiesDialog(), PCB_EDIT_FRAME::ShowExchangeFootprintsDialog(), PCB_EDIT_FRAME::ShowFootprintPropertiesDialog(), PCB_BASE_EDIT_FRAME::ShowGraphicItemPropertiesDialog(), PCB_BASE_FRAME::ShowPadPropertiesDialog(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), and PCB_BASE_EDIT_FRAME::ShowTextPropertiesDialog().

◆ TransferDataFromWindow()

bool DIALOG_CONFIGURE_PATHS::TransferDataFromWindow ( )
override

Definition at line 230 of file dialog_configure_paths.cpp.

231 {
233  return false;
234 
235  if( !wxDialog::TransferDataFromWindow() )
236  return false;
237 
238  // Environment variables
239 
240  ENV_VAR_MAP& envVarMap = Pgm().GetLocalEnvVariables();
241 
242  for( int row = 0; row < m_EnvVars->GetNumberRows(); ++row )
243  {
244  wxString name = m_EnvVars->GetCellValue( row, TV_NAME_COL );
245  wxString path = m_EnvVars->GetCellValue( row, TV_VALUE_COL );
246  bool external = !m_EnvVars->GetCellValue( row, TV_FLAG_COL ).IsEmpty();
247 
248  if( external )
249  {
250  // Don't check for consistency on external variables, just use them as-is
251  }
252  else if( name.IsEmpty() )
253  {
255  m_errorRow = row;
257  m_errorMsg = _( "Environment variable name cannot be empty." );
258  return false;
259  }
260  else if( path.IsEmpty() )
261  {
263  m_errorRow = row;
265  m_errorMsg = _( "Environment variable path cannot be empty." );
266  return false;
267  }
268 
269  if( envVarMap.count( name ) )
270  envVarMap.at( name ).SetValue( path );
271  else
272  envVarMap[ name ] = ENV_VAR_ITEM( name, path );
273  }
274 
275  Pgm().SetLocalEnvVariables();
276 
277  // 3D search paths
278 
279  if( m_resolver )
280  {
281  std::vector<SEARCH_PATH> alist;
282  SEARCH_PATH alias;
283 
284  for( int row = 0; row < m_SearchPaths->GetNumberRows(); ++row )
285  {
286  alias.m_Alias = m_SearchPaths->GetCellValue( row, SP_ALIAS_COL );
287  alias.m_Pathvar = m_SearchPaths->GetCellValue( row, SP_PATH_COL );
288  alias.m_Description = m_SearchPaths->GetCellValue( row, SP_DESC_COL );
289 
290  if( alias.m_Alias.IsEmpty() )
291  {
293  m_errorRow = row;
295  m_errorMsg = _( "3D search path alias cannot be empty." );
296  return false;
297  }
298  else if( alias.m_Pathvar.IsEmpty() )
299  {
301  m_errorRow = row;
303  m_errorMsg = _( "3D search path cannot be empty." );
304  return false;
305  }
306 
307  alist.push_back( alias );
308  }
309 
310  if( !m_resolver->UpdatePathList( alist ) )
311  return false;
312  }
313 
314  return true;
315 }
KiCad uses environment variables internally for determining the base paths for libraries,...
bool UpdatePathList(const std::vector< SEARCH_PATH > &aPathList)
Clear the current path list and substitutes the given path list and update the path configuration fil...
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106
wxString m_Alias
FILENAME_RESOLVER * m_resolver
wxString m_Description
wxString m_Pathvar
#define _(s)
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:190
std::map< wxString, ENV_VAR_ITEM > ENV_VAR_MAP
const char * name
Definition: DXF_plotter.cpp:56

References _, WX_GRID::CommitPendingChanges(), SEARCH_PATH::m_Alias, SEARCH_PATH::m_Description, DIALOG_CONFIGURE_PATHS_BASE::m_EnvVars, m_errorCol, m_errorGrid, m_errorMsg, m_errorRow, SEARCH_PATH::m_Pathvar, m_resolver, DIALOG_CONFIGURE_PATHS_BASE::m_SearchPaths, name, path, Pgm(), SP_ALIAS_COL, SP_DESC_COL, SP_PATH_COL, TV_FLAG_COL, TV_NAME_COL, TV_VALUE_COL, and FILENAME_RESOLVER::UpdatePathList().

◆ TransferDataToWindow()

bool DIALOG_CONFIGURE_PATHS::TransferDataToWindow ( )
override

Definition at line 143 of file dialog_configure_paths.cpp.

144 {
145  if( !wxDialog::TransferDataToWindow() )
146  return false;
147 
148  // Do 3D search paths first so they get first crack at setting m_curdir
149 
150  if( m_resolver )
151  {
152  const std::list<SEARCH_PATH>* paths = m_resolver->GetPaths();
153 
154  for( auto it = paths->begin(); it != paths->end(); ++it )
155  {
156  if ( !( *it ).m_Alias.StartsWith( "${" ) && !( *it ).m_Alias.StartsWith( "$(" ) )
157  {
158  AppendSearchPath( it->m_Alias, it->m_Pathvar, it->m_Description );
159 
160  if( m_curdir.IsEmpty() )
161  m_curdir = it->m_Pathexp;
162  }
163  }
164  }
165 
166  // Environment variables
167 
168  const ENV_VAR_MAP& envVars = Pgm().GetLocalEnvVariables();
169 
170  for( auto it = envVars.begin(); it != envVars.end(); ++it )
171  {
172  const wxString& path = it->second.GetValue();
173  AppendEnvVar( it->first, path, it->second.GetDefinedExternally() );
174 
175  if( m_curdir.IsEmpty() && !path.StartsWith( "${" ) && !path.StartsWith( "$(" ) )
176  m_curdir = path;
177  }
178 
179  return true;
180 }
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106
void AppendEnvVar(const wxString &aName, const wxString &aPath, bool isExternal)
FILENAME_RESOLVER * m_resolver
const std::list< SEARCH_PATH > * GetPaths() const
Return a pointer to the internal path list; the items in:load.
std::map< wxString, ENV_VAR_ITEM > ENV_VAR_MAP
void AppendSearchPath(const wxString &aName, const wxString &aPath, const wxString &aDesc)

References AppendEnvVar(), AppendSearchPath(), FILENAME_RESOLVER::GetPaths(), m_curdir, m_resolver, path, and Pgm().

◆ vertPixelsFromDU()

int DIALOG_SHIM::vertPixelsFromDU ( int  y) const
protectedinherited

Convert an integer number of dialog units to pixels, vertically.

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 176 of file dialog_shim.cpp.

177 {
178  wxSize sz( 0, y );
179  return ConvertDialogToPixels( sz ).y;
180 }

Referenced by DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL().

Member Data Documentation

◆ m_aliasValidator

wxTextValidator DIALOG_CONFIGURE_PATHS::m_aliasValidator
private

Definition at line 72 of file dialog_configure_paths.h.

Referenced by AppendSearchPath(), and DIALOG_CONFIGURE_PATHS().

◆ m_btnAddEnvVar

wxBitmapButton* DIALOG_CONFIGURE_PATHS_BASE::m_btnAddEnvVar
protectedinherited

◆ m_btnAddSearchPath

wxBitmapButton* DIALOG_CONFIGURE_PATHS_BASE::m_btnAddSearchPath
protectedinherited

◆ m_btnDeleteEnvVar

wxBitmapButton* DIALOG_CONFIGURE_PATHS_BASE::m_btnDeleteEnvVar
protectedinherited

◆ m_btnDeleteSearchPath

wxBitmapButton* DIALOG_CONFIGURE_PATHS_BASE::m_btnDeleteSearchPath
protectedinherited

◆ m_btnMoveDown

wxBitmapButton* DIALOG_CONFIGURE_PATHS_BASE::m_btnMoveDown
protectedinherited

◆ m_btnMoveUp

wxBitmapButton* DIALOG_CONFIGURE_PATHS_BASE::m_btnMoveUp
protectedinherited

◆ m_curdir

wxString DIALOG_CONFIGURE_PATHS::m_curdir
private

◆ m_EnvVars

◆ m_errorCol

int DIALOG_CONFIGURE_PATHS::m_errorCol
private

Definition at line 68 of file dialog_configure_paths.h.

Referenced by OnGridCellChanging(), OnUpdateUI(), and TransferDataFromWindow().

◆ m_errorGrid

wxGrid* DIALOG_CONFIGURE_PATHS::m_errorGrid
private

Definition at line 66 of file dialog_configure_paths.h.

Referenced by OnGridCellChanging(), OnUpdateUI(), and TransferDataFromWindow().

◆ m_errorMsg

wxString DIALOG_CONFIGURE_PATHS::m_errorMsg
private

Definition at line 65 of file dialog_configure_paths.h.

Referenced by OnGridCellChanging(), OnUpdateUI(), and TransferDataFromWindow().

◆ m_errorRow

int DIALOG_CONFIGURE_PATHS::m_errorRow
private

Definition at line 67 of file dialog_configure_paths.h.

Referenced by OnGridCellChanging(), OnUpdateUI(), and TransferDataFromWindow().

◆ m_firstPaintEvent

bool DIALOG_SHIM::m_firstPaintEvent
protectedinherited

Definition at line 210 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint().

◆ m_gridWidth

int DIALOG_CONFIGURE_PATHS::m_gridWidth
private

Definition at line 74 of file dialog_configure_paths.h.

Referenced by OnGridSize(), and OnUpdateUI().

◆ m_gridWidthsDirty

bool DIALOG_CONFIGURE_PATHS::m_gridWidthsDirty
private

Definition at line 75 of file dialog_configure_paths.h.

Referenced by OnGridSize(), and OnUpdateUI().

◆ m_hash_key

◆ m_helpDialog

HTML_MESSAGE_BOX* DIALOG_CONFIGURE_PATHS::m_helpDialog
private

Definition at line 77 of file dialog_configure_paths.h.

Referenced by OnHelp(), and ~DIALOG_CONFIGURE_PATHS().

◆ m_initialFocusTarget

wxWindow* DIALOG_SHIM::m_initialFocusTarget
protectedinherited

Definition at line 211 of file dialog_shim.h.

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

◆ m_initialSize

wxSize DIALOG_SHIM::m_initialSize
protectedinherited

Definition at line 223 of file dialog_shim.h.

Referenced by DIALOG_SHIM::Show().

◆ m_parentFrame

EDA_BASE_FRAME* DIALOG_SHIM::m_parentFrame
protectedinherited

◆ m_qmodal_loop

WX_EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 213 of file dialog_shim.h.

Referenced by DIALOG_SHIM::EndQuasiModal(), and DIALOG_SHIM::ShowQuasiModal().

◆ m_qmodal_parent_disabler

WDO_ENABLE_DISABLE* DIALOG_SHIM::m_qmodal_parent_disabler
protectedinherited

◆ m_qmodal_showing

bool DIALOG_SHIM::m_qmodal_showing
protectedinherited

Definition at line 215 of file dialog_shim.h.

Referenced by DIALOG_SHIM::IsQuasiModal(), and DIALOG_SHIM::ShowQuasiModal().

◆ m_resolver

FILENAME_RESOLVER* DIALOG_CONFIGURE_PATHS::m_resolver
private

◆ m_sb3DSearchPaths

wxStaticBoxSizer* DIALOG_CONFIGURE_PATHS_BASE::m_sb3DSearchPaths
protectedinherited

◆ m_sdbSizer

wxStdDialogButtonSizer* DIALOG_CONFIGURE_PATHS_BASE::m_sdbSizer
protectedinherited

◆ m_sdbSizerCancel

wxButton* DIALOG_CONFIGURE_PATHS_BASE::m_sdbSizerCancel
protectedinherited

◆ m_sdbSizerHelp

wxButton* DIALOG_CONFIGURE_PATHS_BASE::m_sdbSizerHelp
protectedinherited

◆ m_sdbSizerOK

wxButton* DIALOG_CONFIGURE_PATHS_BASE::m_sdbSizerOK
protectedinherited

◆ m_SearchPaths

◆ m_tabOrder

◆ m_units

◆ m_useCalculatedSize

bool DIALOG_SHIM::m_useCalculatedSize
protectedinherited

The documentation for this class was generated from the following files: