KiCad PCB EDA Suite
DIALOG_LAYERS_SETUP Class Reference
Inheritance diagram for DIALOG_LAYERS_SETUP:
DIALOG_LAYERS_SETUP_BASE DIALOG_SHIM KIWAY_HOLDER

Public Member Functions

 DIALOG_LAYERS_SETUP (PCB_EDIT_FRAME *aCaller, BOARD *aBoard)
 
int ShowQuasiModal ()
 
void EndQuasiModal (int retCode)
 
bool IsQuasiModal ()
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
void OnPaint (wxPaintEvent &event)
 
KIWAYKiway () const
 Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in. More...
 
PROJECTPrj () const
 Function Prj returns a reference to the PROJECT "associated with" this KIWAY. More...
 
void SetKiway (wxWindow *aDest, KIWAY *aKiway)
 Function SetKiway. More...
 

Protected Member Functions

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)
 Convert an integer number of dialog units to pixels, horizontally. More...
 
int VertPixelsFromDU (int y)
 Convert an integer number of dialog units to pixels, vertically. More...
 

Protected Attributes

wxStaticText * m_staticTextGrouping
 
wxChoice * m_PresetsChoice
 
wxStaticText * m_staticTextCopperLayers
 
wxChoice * m_CopperLayersChoice
 
wxStaticText * m_staticTextBrdThickness
 
wxTextCtrl * m_textCtrlBrdThickness
 
wxStaticText * m_staticTextBrdThicknessUnit
 
wxStaticText * m_staticTextLayers
 
wxPanel * m_TitlePanel
 
wxScrolledWindow * m_LayersListPanel
 
wxFlexGridSizer * m_LayerListFlexGridSizer
 
wxStaticText * m_CrtYdFrontName
 
wxPanel * m_CrtYdFrontPanel
 
wxCheckBox * m_CrtYdFrontCheckBox
 
wxStaticText * m_CrtYdFrontStaticText
 
wxStaticText * m_FabFrontName
 
wxPanel * m_FabFrontPanel
 
wxCheckBox * m_FabFrontCheckBox
 
wxStaticText * m_FabFrontStaticText
 
wxStaticText * m_AdhesFrontName
 
wxPanel * m_AdhesFrontPanel
 
wxCheckBox * m_AdhesFrontCheckBox
 
wxStaticText * m_AdhesFrontStaticText
 
wxStaticText * m_SoldPFrontName
 
wxPanel * m_SoldPFrontPanel
 
wxCheckBox * m_SoldPFrontCheckBox
 
wxStaticText * m_SoldPFrontStaticText
 
wxStaticText * m_SilkSFrontName
 
wxPanel * m_SilkSFrontPanel
 
wxCheckBox * m_SilkSFrontCheckBox
 
wxStaticText * m_SilkSFrontStaticText
 
wxStaticText * m_MaskFrontName
 
wxPanel * m_MaskFrontPanel
 
wxCheckBox * m_MaskFrontCheckBox
 
wxStaticText * m_MaskFrontStaticText
 
wxTextCtrl * m_FrontName
 
wxPanel * m_FrontPanel
 
wxCheckBox * m_FrontCheckBox
 
wxChoice * m_FrontChoice
 
wxTextCtrl * m_In1Name
 
wxPanel * m_In1Panel
 
wxCheckBox * m_In1CheckBox
 
wxChoice * m_In1Choice
 
wxTextCtrl * m_In2Name
 
wxPanel * m_In2Panel
 
wxCheckBox * m_In2CheckBox
 
wxChoice * m_In2Choice
 
wxTextCtrl * m_In3Name
 
wxPanel * m_In3Panel
 
wxCheckBox * m_In3CheckBox
 
wxChoice * m_In3Choice
 
wxTextCtrl * m_In4Name
 
wxPanel * m_In4Panel
 
wxCheckBox * m_In4CheckBox
 
wxChoice * m_In4Choice
 
wxTextCtrl * m_In5Name
 
wxPanel * m_In5Panel
 
wxCheckBox * m_In5CheckBox
 
wxChoice * m_In5Choice
 
wxTextCtrl * m_In6Name
 
wxPanel * m_In6Panel
 
wxCheckBox * m_In6CheckBox
 
wxChoice * m_In6Choice
 
wxTextCtrl * m_In7Name
 
wxPanel * m_In7Panel
 
wxCheckBox * m_In7CheckBox
 
wxChoice * m_In7Choice
 
wxTextCtrl * m_In8Name
 
wxPanel * m_In8Panel
 
wxCheckBox * m_In8CheckBox
 
wxChoice * m_In8Choice
 
wxTextCtrl * m_In9Name
 
wxPanel * m_In9Panel
 
wxCheckBox * m_In9CheckBox
 
wxChoice * m_In9Choice
 
wxTextCtrl * m_In10Name
 
wxPanel * m_In10Panel
 
wxCheckBox * m_In10CheckBox
 
wxChoice * m_In10Choice
 
wxTextCtrl * m_In11Name
 
wxPanel * m_In11Panel
 
wxCheckBox * m_In11CheckBox
 
wxChoice * m_In11Choice
 
wxTextCtrl * m_In12Name
 
wxPanel * m_In12Panel
 
wxCheckBox * m_In12CheckBox
 
wxChoice * m_In12Choice
 
wxTextCtrl * m_In13Name
 
wxPanel * m_In13Panel
 
wxCheckBox * m_In13CheckBox
 
wxChoice * m_In13Choice
 
wxTextCtrl * m_In14Name
 
wxPanel * m_In14Panel
 
wxCheckBox * m_In14CheckBox
 
wxChoice * m_In14Choice
 
wxTextCtrl * m_In15Name
 
wxPanel * m_In15Panel
 
wxCheckBox * m_In15CheckBox
 
wxChoice * m_In15Choice
 
wxTextCtrl * m_In16Name
 
wxPanel * m_In16Panel
 
wxCheckBox * m_In16CheckBox
 
wxChoice * m_In16Choice
 
wxTextCtrl * m_In17Name
 
wxPanel * m_In17Panel
 
wxCheckBox * m_In17CheckBox
 
wxChoice * m_In17Choice
 
wxTextCtrl * m_In18Name
 
wxPanel * m_In18Panel
 
wxCheckBox * m_In18CheckBox
 
wxChoice * m_In18Choice
 
wxTextCtrl * m_In19Name
 
wxPanel * m_In19Panel
 
wxCheckBox * m_In19CheckBox
 
wxChoice * m_In19Choice
 
wxTextCtrl * m_In20Name
 
wxPanel * m_In20Panel
 
wxCheckBox * m_In20CheckBox
 
wxChoice * m_In20Choice
 
wxTextCtrl * m_In21Name
 
wxPanel * m_In21Panel
 
wxCheckBox * m_In21CheckBox
 
wxChoice * m_In21Choice
 
wxTextCtrl * m_In22Name
 
wxPanel * m_In22Panel
 
wxCheckBox * m_In22CheckBox
 
wxChoice * m_In22Choice
 
wxTextCtrl * m_In23Name
 
wxPanel * m_In23Panel
 
wxCheckBox * m_In23CheckBox
 
wxChoice * m_In23Choice
 
wxTextCtrl * m_In24Name
 
wxPanel * m_In24Panel
 
wxCheckBox * m_In24CheckBox
 
wxChoice * m_In24Choice
 
wxTextCtrl * m_In25Name
 
wxPanel * m_In25Panel
 
wxCheckBox * m_In25CheckBox
 
wxChoice * m_In25Choice
 
wxTextCtrl * m_In26Name
 
wxPanel * m_In26Panel
 
wxCheckBox * m_In26CheckBox
 
wxChoice * m_In26Choice
 
wxTextCtrl * m_In27Name
 
wxPanel * m_In27Panel
 
wxCheckBox * m_In27CheckBox
 
wxChoice * m_In27Choice
 
wxTextCtrl * m_In28Name
 
wxPanel * m_In28Panel
 
wxCheckBox * m_In28CheckBox
 
wxChoice * m_In28Choice
 
wxTextCtrl * m_In29Name
 
wxPanel * m_In29Panel
 
wxCheckBox * m_In29CheckBox
 
wxChoice * m_In29Choice
 
wxTextCtrl * m_In30Name
 
wxPanel * m_In30Panel
 
wxCheckBox * m_In30CheckBox
 
wxChoice * m_In30Choice
 
wxTextCtrl * m_BackName
 
wxPanel * m_BackPanel
 
wxCheckBox * m_BackCheckBox
 
wxChoice * m_BackChoice
 
wxStaticText * m_MaskBackName
 
wxPanel * m_MaskBackPanel
 
wxCheckBox * m_MaskBackCheckBox
 
wxStaticText * m_MaskBackStaticText
 
wxStaticText * m_SilkSBackName
 
wxPanel * m_SilkSBackPanel
 
wxCheckBox * m_SilkSBackCheckBox
 
wxStaticText * m_SilkSBackStaticText
 
wxStaticText * m_SoldPBackName
 
wxPanel * m_SoldPBackPanel
 
wxCheckBox * m_SoldPBackCheckBox
 
wxStaticText * m_SoldPBackStaticText
 
wxStaticText * m_AdhesBackName
 
wxPanel * m_AdhesBackPanel
 
wxCheckBox * m_AdhesBackCheckBox
 
wxStaticText * m_AdhesBackStaticText
 
wxStaticText * m_FabBackName
 
wxPanel * m_FabBackPanel
 
wxCheckBox * m_FabBackCheckBox
 
wxStaticText * m_FabBackStaticText
 
wxStaticText * m_CrtYdBackName
 
wxPanel * m_CrtYdBackPanel
 
wxCheckBox * m_CrtYdBackCheckBox
 
wxStaticText * m_CrtYdBackStaticText
 
wxStaticText * m_PCBEdgesName
 
wxPanel * m_PCBEdgesPanel
 
wxCheckBox * m_PCBEdgesCheckBox
 
wxStaticText * m_PCBEdgesStaticText
 
wxStaticText * m_MarginName
 
wxPanel * m_MarginPanel
 
wxCheckBox * m_MarginCheckBox
 
wxStaticText * m_MarginStaticText
 
wxStaticText * m_Eco1Name
 
wxPanel * m_Eco1Panel
 
wxCheckBox * m_Eco1CheckBox
 
wxStaticText * m_Eco1StaticText
 
wxStaticText * m_Eco2Name
 
wxPanel * m_Eco2Panel
 
wxCheckBox * m_Eco2CheckBox
 
wxStaticText * m_Eco2StaticText
 
wxStaticText * m_CommentsName
 
wxPanel * m_CommentsPanel
 
wxCheckBox * m_CommentsCheckBox
 
wxStaticText * m_CommentsStaticText
 
wxStaticText * m_DrawingsName
 
wxPanel * m_DrawingsPanel
 
wxCheckBox * m_DrawingsCheckBox
 
wxStaticText * m_DrawingsStaticText
 
wxStdDialogButtonSizer * m_sdbSizer
 
wxButton * m_sdbSizerOK
 
wxButton * m_sdbSizerCancel
 
bool m_fixupsRun
 
std::string m_hash_key
 
EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 

Private Member Functions

void setLayerCheckBox (LAYER_NUM layer, bool isChecked)
 
void setCopperLayerCheckBoxes (int copperCount)
 
void setStateMandatoryLayerCheckBoxes ()
 
void showCopperChoice (int copperCount)
 
void showBoardLayerNames ()
 
void showSelectedLayerCheckBoxes (LSET enableLayerMask)
 
void showLayerTypes ()
 
void showPresets (LSET enabledLayerMask)
 
LSET getUILayerMask ()
 Return the selected layer mask within the UI checkboxes. More...
 
wxString getLayerName (LAYER_NUM layer)
 
int getLayerTypeIndex (LAYER_NUM layer)
 
void OnInitDialog (wxInitDialogEvent &aEvent) override
 
void OnCheckBox (wxCommandEvent &event) override
 
void DenyChangeCheckBox (wxCommandEvent &event) override
 
void OnPresetsChoice (wxCommandEvent &event) override
 
void OnCopperLayersChoice (wxCommandEvent &event) override
 
bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
bool testLayerNames ()
 
LSEQ getRemovedLayersWithItems ()
 Return a list of layers removed from the board that contain items. More...
 
LSEQ getNonRemovableLayers ()
 Return a list of layers in use in footprints, and therefore not removable. More...
 
CTLs getCTLs (LAYER_NUM aLayerNumber)
 Map aLayerNumber to the wx IDs for that layer which are the layer name control ID, checkbox control ID, and choice control ID. More...
 
wxControl * getName (LAYER_NUM aLayer)
 
wxCheckBox * getCheckBox (LAYER_NUM aLayer)
 
wxChoice * getChoice (LAYER_NUM aLayer)
 
void moveTitles ()
 
void OnSize (wxSizeEvent &event) override
 

Private Attributes

int m_copperLayerCount
 
LSET m_enabledLayers
 
BOARDm_pcb
 
wxStaticText * m_nameStaticText
 
wxStaticText * m_enabledStaticText
 
wxStaticText * m_typeStaticText
 

Detailed Description

Definition at line 136 of file dialog_layers_setup.cpp.

Constructor & Destructor Documentation

DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP ( PCB_EDIT_FRAME aCaller,
BOARD aBoard 
)

Definition at line 331 of file dialog_layers_setup.cpp.

References BOARD::GetCopperLayerCount(), BOARD::GetEnabledLayers(), m_copperLayerCount, m_enabledLayers, m_enabledStaticText, m_nameStaticText, m_pcb, DIALOG_LAYERS_SETUP_BASE::m_TitlePanel, and m_typeStaticText.

331  :
332  DIALOG_LAYERS_SETUP_BASE( aParent )
333 {
334  m_pcb = aBoard;
335 
338 
339  SetAutoLayout( true );
340 
341  // these 3 controls are handled outside wxformbuilder so that we can add
342  // them without a sizer. Then we position them manually based on the column
343  // widths from m_LayerListFlexGridSizer->GetColWidths()
344  m_nameStaticText = new wxStaticText( m_TitlePanel, wxID_ANY, _( "Name" ),
345  wxDefaultPosition, wxDefaultSize, 0 );
346 
347  m_enabledStaticText = new wxStaticText( m_TitlePanel, wxID_ANY, _( "Enabled" ),
348  wxDefaultPosition, wxDefaultSize, 0 );
349 
350  m_typeStaticText = new wxStaticText( m_TitlePanel, wxID_ANY, _( "Type" ),
351  wxDefaultPosition, wxDefaultSize, 0 );
352 }
int GetCopperLayerCount() const
Function GetCopperLayerCount.
wxStaticText * m_typeStaticText
wxStaticText * m_enabledStaticText
LSET GetEnabledLayers() const
Function GetEnabledLayers is a proxy function that calls the corresponding function in m_BoardSetting...
wxStaticText * m_nameStaticText
DIALOG_LAYERS_SETUP_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Layer Setup"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)

Member Function Documentation

void DIALOG_LAYERS_SETUP::DenyChangeCheckBox ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_LAYERS_SETUP_BASE.

Definition at line 588 of file dialog_layers_setup.cpp.

References m_copperLayerCount, and setCopperLayerCheckBoxes().

589 {
590  // user may not change copper layer checkboxes from anything other than
591  // either presets choice or the copper layer choice controls.
592 
593  // I tried to simply disable the copper CheckBoxes but they look like crap,
594  // so leave them enabled and reverse the user's attempt to toggle them.
595 
597 }
void setCopperLayerCheckBoxes(int copperCount)
bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 205 of file dialog_shim.cpp.

Referenced by DIALOG_PRINT_USING_PRINTER::InitValues(), and DIALOG_SHIM::IsQuasiModal().

206 {
207  // so we can do logging of this state change:
208 
209 #if defined(DEBUG)
210  const char* type_id = typeid( *this ).name();
211  printf( "wxDialog %s: %s\n", type_id, enable ? "enabled" : "disabled" );
212 #endif
213 
214  return wxDialog::Enable( enable );
215 }
void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 610 of file dialog_shim.cpp.

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

Referenced by DIALOG_SHIM::OnButton(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnCancelButtonClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCancelButtonClick(), DIALOG_EDIT_ONE_FIELD::OnCancelClick(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnCloseDialog(), DIALOG_EDIT_ONE_FIELD::OnCloseDialog(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCloseDialog(), DIALOG_CHOOSE_COMPONENT::OnCloseTimer(), DIALOG_SHIM::OnCloseWindow(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnOKButtonClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick(), DIALOG_EDIT_ONE_FIELD::OnOkClick(), DIALOG_EXCHANGE_FOOTPRINTS::OnQuit(), DIALOG_CHOOSE_COMPONENT::OnSchViewDClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp(), and DIALOG_SHIM::~DIALOG_SHIM().

611 {
612  // Hook up validator and transfer data from controls handling so quasi-modal dialogs
613  // handle validation in the same way as other dialogs.
614  if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
615  return;
616 
617  SetReturnCode( retCode );
618 
619  if( !IsQuasiModal() )
620  {
621  wxFAIL_MSG( wxT( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ) );
622  return;
623  }
624 
625  m_qmodal_showing = false;
626 
627  if( m_qmodal_loop )
628  {
629  if( m_qmodal_loop->IsRunning() )
630  m_qmodal_loop->Exit( 0 );
631  else
632  m_qmodal_loop->ScheduleExit( 0 );
633 
634  m_qmodal_loop = NULL;
635  }
636 
639 
640  Show( false );
641 }
bool m_qmodal_showing
Definition: dialog_shim.h:155
EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:154
bool IsQuasiModal()
Definition: dialog_shim.h:103
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:156
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, when all widgets are initialized, and therefore their size fixed. If TransferDataToWindow() is used to initialize widgets, at end of TransferDataToWindow, or better at end of a wxInitDialogEvent handler

In any case, the best way is to call it in a wxInitDialogEvent handler after calling TransfertDataToWindow(), which is the default wxInitDialogEvent handler wxDialog

Definition at line 104 of file dialog_shim.cpp.

References PCAD2KICAD::Center.

Referenced by COLOR4D_PICKER_DLG::COLOR4D_PICKER_DLG(), DIALOG_3D_VIEW_OPTIONS::DIALOG_3D_VIEW_OPTIONS(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOM::DIALOG_BOM(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES(), DIALOG_DIMENSION_EDITOR::DIALOG_DIMENSION_EDITOR(), DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS(), DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY(), DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE(), DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS(), DIALOG_ENUM_PADS::DIALOG_ENUM_PADS(), 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_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG(), DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES(), DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR(), DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM(), DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT(), DIALOG_LIB_NEW_COMPONENT::DIALOG_LIB_NEW_COMPONENT(), DIALOG_LIBEDIT_OPTIONS::DIALOG_LIBEDIT_OPTIONS(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PADS_MASK_CLEARANCE::DIALOG_PADS_MASK_CLEARANCE(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_SCH_EDIT_SHEET_PIN::DIALOG_SCH_EDIT_SHEET_PIN(), DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS(), DIALOG_SELECT_PRETTY_LIB::DIALOG_SELECT_PRETTY_LIB(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_EDIT_ONE_FIELD::init(), DIALOG_SHIM::IsQuasiModal(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_LIB_EDIT_PIN::OnInitDialog(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnInitDialog(), DIALOG_TRACK_VIA_PROPERTIES::OnInitDlg(), DIALOG_GRAPHIC_ITEMS_OPTIONS::OnInitDlg(), DIALOG_EDIT_FPTEXT::OnInitDlg(), DIALOG_SET_GRID::OnInitDlg(), DIALOG_PCB_TEXT_PROPERTIES::OnInitDlg(), DIALOG_PRINT_FOR_MODEDIT::OnInitDlg(), DIALOG_FOOTPRINT_FP_EDITOR::OnInitDlg(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_FOOTPRINT_BOARD_EDITOR::OnInitDlg(), DIALOG_PRINT_USING_PRINTER::OnInitDlg(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnInitDlg(), TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), and DIALOG_UPDATE_FIELDS::TransferDataToWindow().

105 {
106  // must be called from the constructor of derived classes,
107  // when all widgets are initialized, and therefore their size fixed
108 
109  // SetSizeHints fixes the minimal size of sizers in the dialog
110  // (SetSizeHints calls Fit(), so no need to call it)
111  GetSizer()->SetSizeHints( this );
112 
113  // the default position, when calling the first time the dlg
114  Center();
115 }
wxCheckBox* DIALOG_LAYERS_SETUP::getCheckBox ( LAYER_NUM  aLayer)
inlineprivate

Definition at line 198 of file dialog_layers_setup.cpp.

Referenced by getUILayerMask(), setLayerCheckBox(), and setStateMandatoryLayerCheckBoxes().

199  {
200  return getCTLs( aLayer ).checkbox;
201  }
CTLs getCTLs(LAYER_NUM aLayerNumber)
Map aLayerNumber to the wx IDs for that layer which are the layer name control ID, checkbox control ID, and choice control ID.
wxCheckBox * checkbox
wxChoice* DIALOG_LAYERS_SETUP::getChoice ( LAYER_NUM  aLayer)
inlineprivate

Definition at line 203 of file dialog_layers_setup.cpp.

Referenced by getLayerTypeIndex(), and showLayerTypes().

204  {
205  return (wxChoice*) getCTLs( aLayer ).choice;
206  }
CTLs getCTLs(LAYER_NUM aLayerNumber)
Map aLayerNumber to the wx IDs for that layer which are the layer name control ID, checkbox control ID, and choice control ID.
wxControl * choice
CTLs DIALOG_LAYERS_SETUP::getCTLs ( LAYER_NUM  aLayerNumber)
private

Map aLayerNumber to the wx IDs for that layer which are the layer name control ID, checkbox control ID, and choice control ID.

Definition at line 260 of file dialog_layers_setup.cpp.

References B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, CTLs::CTLs(), Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, In10_Cu, In11_Cu, In12_Cu, In13_Cu, In14_Cu, In15_Cu, In16_Cu, In17_Cu, In18_Cu, In19_Cu, In1_Cu, In20_Cu, In21_Cu, In22_Cu, In23_Cu, In24_Cu, In25_Cu, In26_Cu, In27_Cu, In28_Cu, In29_Cu, In2_Cu, In30_Cu, In3_Cu, In4_Cu, In5_Cu, In6_Cu, In7_Cu, In8_Cu, In9_Cu, Margin, RETAUX, and RETCOP.

Referenced by setCopperLayerCheckBoxes().

261 {
262 #define RETCOP(x) return CTLs( x##Name, x##CheckBox, x##Choice, x##Panel );
263 #define RETAUX(x) return CTLs( x##Name, x##CheckBox, x##StaticText, x##Panel );
264 
265  switch( aLayerNumber )
266  {
267  case F_CrtYd: RETAUX( m_CrtYdFront );
268  case F_Fab: RETAUX( m_FabFront );
269  case F_Adhes: RETAUX( m_AdhesFront );
270  case F_Paste: RETAUX( m_SoldPFront );
271  case F_SilkS: RETAUX( m_SilkSFront );
272  case F_Mask: RETAUX( m_MaskFront );
273  case F_Cu: RETCOP( m_Front );
274 
275  case In1_Cu: RETCOP( m_In1 );
276  case In2_Cu: RETCOP( m_In2 );
277  case In3_Cu: RETCOP( m_In3 );
278  case In4_Cu: RETCOP( m_In4 );
279  case In5_Cu: RETCOP( m_In5 );
280  case In6_Cu: RETCOP( m_In6 );
281  case In7_Cu: RETCOP( m_In7 );
282  case In8_Cu: RETCOP( m_In8 );
283  case In9_Cu: RETCOP( m_In9 );
284  case In10_Cu: RETCOP( m_In10 );
285  case In11_Cu: RETCOP( m_In11 );
286  case In12_Cu: RETCOP( m_In12 );
287  case In13_Cu: RETCOP( m_In13 );
288  case In14_Cu: RETCOP( m_In14 );
289  case In15_Cu: RETCOP( m_In15 );
290 
291  case In16_Cu: RETCOP( m_In16 );
292  case In17_Cu: RETCOP( m_In17 );
293  case In18_Cu: RETCOP( m_In18 );
294  case In19_Cu: RETCOP( m_In19 );
295  case In20_Cu: RETCOP( m_In20 );
296  case In21_Cu: RETCOP( m_In21 );
297  case In22_Cu: RETCOP( m_In22 );
298  case In23_Cu: RETCOP( m_In23 );
299  case In24_Cu: RETCOP( m_In24 );
300  case In25_Cu: RETCOP( m_In25 );
301  case In26_Cu: RETCOP( m_In26 );
302  case In27_Cu: RETCOP( m_In27 );
303  case In28_Cu: RETCOP( m_In28 );
304  case In29_Cu: RETCOP( m_In29 );
305  case In30_Cu: RETCOP( m_In30 );
306 
307  case B_Cu: RETCOP( m_Back );
308  case B_Mask: RETAUX( m_MaskBack );
309  case B_SilkS: RETAUX( m_SilkSBack );
310  case B_Paste: RETAUX( m_SoldPBack );
311  case B_Adhes: RETAUX( m_AdhesBack );
312  case B_Fab: RETAUX( m_FabBack );
313  case B_CrtYd: RETAUX( m_CrtYdBack );
314 
315  case Edge_Cuts: RETAUX( m_PCBEdges );
316  case Margin: RETAUX( m_Margin );
317  case Eco2_User: RETAUX( m_Eco2 );
318  case Eco1_User: RETAUX( m_Eco1 );
319  case Cmts_User: RETAUX( m_Comments );
320  case Dwgs_User: RETAUX( m_Drawings );
321  default:
322  wxASSERT_MSG( 0, wxT( "bad layer id" ) );
323  return CTLs( 0, 0, 0 );
324  }
325 
326 #undef RETCOP
327 #undef RETAUX
328 }
Holds the 3 UI control pointers for a single board layer.
#define RETCOP(x)
#define RETAUX(x)
wxString DIALOG_LAYERS_SETUP::getLayerName ( LAYER_NUM  layer)
private

Definition at line 751 of file dialog_layers_setup.cpp.

References getName(), and IsCopperLayer().

Referenced by testLayerNames(), and TransferDataFromWindow().

752 {
753  wxString ret;
754  wxASSERT( IsCopperLayer( aLayer ) );
755  wxTextCtrl* ctl = (wxTextCtrl*) getName( aLayer );
756  ret = ctl->GetValue().Trim();
757 
758  return ret;
759 }
wxControl * getName(LAYER_NUM aLayer)
bool IsCopperLayer(LAYER_NUM aLayerId)
Function IsCopperLayer tests whether a layer is a copper layer.
int DIALOG_LAYERS_SETUP::getLayerTypeIndex ( LAYER_NUM  layer)
private

Definition at line 743 of file dialog_layers_setup.cpp.

References getChoice().

Referenced by TransferDataFromWindow().

744 {
745  wxChoice* ctl = getChoice( aLayer );
746  int ret = ctl->GetCurrentSelection(); // indices must have same sequence as LAYER_T
747  return ret;
748 }
wxChoice * getChoice(LAYER_NUM aLayer)
wxControl* DIALOG_LAYERS_SETUP::getName ( LAYER_NUM  aLayer)
inlineprivate

Definition at line 193 of file dialog_layers_setup.cpp.

Referenced by getLayerName(), showBoardLayerNames(), and testLayerNames().

194  {
195  return getCTLs( aLayer ).name;
196  }
CTLs getCTLs(LAYER_NUM aLayerNumber)
Map aLayerNumber to the wx IDs for that layer which are the layer name control ID, checkbox control ID, and choice control ID.
wxControl * name
LSEQ DIALOG_LAYERS_SETUP::getNonRemovableLayers ( )
private

Return a list of layers in use in footprints, and therefore not removable.

Definition at line 870 of file dialog_layers_setup.cpp.

References PCB_LAYER_COLLECTOR::Collect(), COLLECTOR::GetCount(), BOARD::GetEnabledLayers(), getUILayerMask(), IsCopperLayer(), m_pcb, GENERAL_COLLECTOR::ModuleItems, LSET::Seq(), and PCB_LAYER_COLLECTOR::SetLayerId().

Referenced by TransferDataFromWindow().

871 {
872  //Build the list of non copper layers in use in footprints.
873  LSEQ inUseLayers;
874  LSET newLayers = getUILayerMask();
875  LSET curLayers = m_pcb->GetEnabledLayers();
876 
877  if( newLayers == curLayers ) // return a empty list if no change
878  return inUseLayers;
879 
880  PCB_LAYER_COLLECTOR collector;
881  LSEQ newLayerSeq = newLayers.Seq();
882  std::vector< PCB_LAYER_ID >::iterator it;
883 
884  for( auto layer_id : curLayers.Seq() )
885  {
886  if( IsCopperLayer( layer_id ) ) // Copper layers are not taken in account here
887  continue;
888 
889  if( std::find( newLayerSeq.begin(), newLayerSeq.end(), layer_id ) == newLayerSeq.end() )
890  {
891  collector.SetLayerId( layer_id );
893 
894  if( collector.GetCount() != 0 )
895  inUseLayers.push_back( layer_id );
896  }
897  }
898 
899  return inUseLayers;
900 }
int GetCount() const
Function GetCount returns the number of objects in the list.
Definition: collector.h:106
void Collect(BOARD_ITEM *aBoard, const KICAD_T aScanList[])
Tests a BOARD_ITEM using this class&#39;s Inspector method, which does the collection.
Definition: collectors.cpp:514
Collect all BOARD_ITEM objects on a given layer.
Definition: collectors.h:614
LSET GetEnabledLayers() const
Function GetEnabledLayers is a proxy function that calls the corresponding function in m_BoardSetting...
void SetLayerId(PCB_LAYER_ID aLayerId)
Definition: collectors.h:624
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Function Seq returns an LSEQ from the union of this LSET and a desired sequence.
Definition: lset.cpp:364
Class LSET is a set of PCB_LAYER_IDs.
Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
LSET getUILayerMask()
Return the selected layer mask within the UI checkboxes.
static const KICAD_T ModuleItems[]
A scan list for primary module items.
Definition: collectors.h:300
bool IsCopperLayer(LAYER_NUM aLayerId)
Function IsCopperLayer tests whether a layer is a copper layer.
LSEQ DIALOG_LAYERS_SETUP::getRemovedLayersWithItems ( )
private

Return a list of layers removed from the board that contain items.

Definition at line 841 of file dialog_layers_setup.cpp.

References GENERAL_COLLECTOR::BoardLevelItems, PCB_LAYER_COLLECTOR::Collect(), COLLECTOR::GetCount(), BOARD::GetEnabledLayers(), getUILayerMask(), m_pcb, LSET::Seq(), and PCB_LAYER_COLLECTOR::SetLayerId().

Referenced by TransferDataFromWindow().

842 {
843  LSEQ removedLayers;
844  LSET newLayers = getUILayerMask();
845  LSET curLayers = m_pcb->GetEnabledLayers();
846 
847  if( newLayers == curLayers ) // return a empty list if no change
848  return removedLayers;
849 
850  PCB_LAYER_COLLECTOR collector;
851  LSEQ newLayerSeq = newLayers.Seq();
852  std::vector< PCB_LAYER_ID >::iterator it;
853 
854  for( auto layer_id : curLayers.Seq() )
855  {
856  if( std::find( newLayerSeq.begin(), newLayerSeq.end(), layer_id ) == newLayerSeq.end() )
857  {
858  collector.SetLayerId( layer_id );
860 
861  if( collector.GetCount() != 0 )
862  removedLayers.push_back( layer_id );
863  }
864  }
865 
866  return removedLayers;
867 }
int GetCount() const
Function GetCount returns the number of objects in the list.
Definition: collector.h:106
static const KICAD_T BoardLevelItems[]
A scan list for all primary board items, omitting items which are subordinate to a MODULE...
Definition: collectors.h:275
void Collect(BOARD_ITEM *aBoard, const KICAD_T aScanList[])
Tests a BOARD_ITEM using this class&#39;s Inspector method, which does the collection.
Definition: collectors.cpp:514
Collect all BOARD_ITEM objects on a given layer.
Definition: collectors.h:614
LSET GetEnabledLayers() const
Function GetEnabledLayers is a proxy function that calls the corresponding function in m_BoardSetting...
void SetLayerId(PCB_LAYER_ID aLayerId)
Definition: collectors.h:624
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Function Seq returns an LSEQ from the union of this LSET and a desired sequence.
Definition: lset.cpp:364
Class LSET is a set of PCB_LAYER_IDs.
Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
LSET getUILayerMask()
Return the selected layer mask within the UI checkboxes.
LSET DIALOG_LAYERS_SETUP::getUILayerMask ( )
private

Return the selected layer mask within the UI checkboxes.

Definition at line 510 of file dialog_layers_setup.cpp.

References dlg_layers(), and getCheckBox().

Referenced by getNonRemovableLayers(), getRemovedLayersWithItems(), OnCheckBox(), OnCopperLayersChoice(), and TransferDataFromWindow().

511 {
512  LSET layerMaskResult;
513 
514  for( LSEQ seq = dlg_layers(); seq; ++seq )
515  {
516  PCB_LAYER_ID layer = *seq;
517  wxCheckBox* ctl = getCheckBox( layer );
518 
519  if( ctl->GetValue() )
520  {
521  layerMaskResult.set( layer );
522  }
523  }
524 
525  return layerMaskResult;
526 }
wxCheckBox * getCheckBox(LAYER_NUM aLayer)
static LSEQ dlg_layers()
PCB_LAYER_ID
A quick note on layer IDs:
Class LSET is a set of PCB_LAYER_IDs.
Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
int DIALOG_SHIM::HorizPixelsFromDU ( int  x)
protectedinherited

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

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 125 of file dialog_shim.cpp.

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

126 {
127  wxSize sz( x, 0 );
128  return ConvertDialogToPixels( sz ).x;
129 }
KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

Function Kiway returns 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 60 of file kiway_player.h.

References KIWAY_HOLDER::m_kiway, KIWAY_HOLDER::Prj(), and KIWAY_HOLDER::SetKiway().

Referenced by SCH_EDIT_FRAME::AppendSchematic(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_CHOOSE_COMPONENT::ConstructRightPanel(), CVPCB_MAINFRAME::CreateScreenCmp(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_SHIM::DIALOG_SHIM(), EDIT_TOOL::editFootprintInFpEditor(), SCH_EDIT_FRAME::EditSheet(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), LIB_MANAGER::GetBufferedPart(), FOOTPRINT_EDIT_FRAME::GetIconScale(), LIB_MANAGER::getLibraryBuffer(), FOOTPRINT_EDIT_FRAME::GetPlotSettings(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers(), SCH_EDIT_FRAME::KiwayMailIn(), KIWAY_PLAYER::language_change(), CVPCB_MAINFRAME::LoadFootprintFiles(), KIWAY_PLAYER::OnChangeIconsOptions(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), SCH_BASE_FRAME::OnEditSymbolLibTable(), DIALOG_CHOOSE_COMPONENT::OnIdle(), KICAD_MANAGER_FRAME::OnImportEagleFiles(), SCH_EDIT_FRAME::OnLeftClick(), SCH_BASE_FRAME::OnOpenLibraryViewer(), SCH_EDIT_FRAME::OnSimulate(), DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard(), SCH_EDIT_FRAME::OpenProjectFiles(), KIWAY_HOLDER::Prj(), PCB_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Special_Functions(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), FOOTPRINT_WIZARD_FRAME::ReCreateVToolbar(), LIB_EDIT_FRAME::refreshSchematic(), SCH_EDIT_FRAME::SaveEEFile(), CVPCB_MAINFRAME::SaveFootprintAssociation(), SCH_BASE_FRAME::SelectComponentFromLibBrowser(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlist(), FOOTPRINT_EDIT_FRAME::SetPlotSettings(), DISPLAY_FOOTPRINTS_FRAME::Show3D_Frame(), FOOTPRINT_EDIT_FRAME::Show3D_Frame(), FOOTPRINT_VIEWER_FRAME::Show3D_Frame(), FOOTPRINT_WIZARD_FRAME::Show3D_Frame(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::showButtonHandler(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::UpdatePart(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

61  {
62  wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine.
63  return *m_kiway;
64  }
KIWAY * m_kiway
Definition: kiway_player.h:85
void DIALOG_LAYERS_SETUP::moveTitles ( )
inlineprivate

Definition at line 208 of file dialog_layers_setup.cpp.

Referenced by OnSize().

209  {
210  wxArrayInt widths = m_LayerListFlexGridSizer->GetColWidths();
211 
212  int offset = 0;
213  wxSize txtz;
214 
215  wxSize panel_sz = m_TitlePanel->GetSize();
216  int voffset = panel_sz.y/2 - VertPixelsFromDU( 4 );
217 
218  txtz = m_nameStaticText->GetSize();
219  m_nameStaticText->Move( offset + (widths[0] - txtz.x)/2, voffset );
220  offset += widths[0];
221 
222  txtz = m_enabledStaticText->GetSize();
223  m_enabledStaticText->Move( offset + (widths[1] - txtz.x)/2, voffset );
224  offset += widths[1];
225 
226  txtz = m_typeStaticText->GetSize();
227  m_typeStaticText->Move( offset + (widths[2] - txtz.x)/2, voffset );
228  }
wxFlexGridSizer * m_LayerListFlexGridSizer
wxStaticText * m_typeStaticText
wxStaticText * m_enabledStaticText
wxStaticText * m_nameStaticText
int VertPixelsFromDU(int y)
Convert an integer number of dialog units to pixels, vertically.
void DIALOG_LAYERS_SETUP::OnCheckBox ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_LAYERS_SETUP_BASE.

Definition at line 580 of file dialog_layers_setup.cpp.

References getUILayerMask(), m_enabledLayers, and showPresets().

581 {
583 
585 }
void showPresets(LSET enabledLayerMask)
LSET getUILayerMask()
Return the selected layer mask within the UI checkboxes.
void DIALOG_LAYERS_SETUP::OnCopperLayersChoice ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_LAYERS_SETUP_BASE.

Definition at line 624 of file dialog_layers_setup.cpp.

References getUILayerMask(), m_copperLayerCount, DIALOG_LAYERS_SETUP_BASE::m_CopperLayersChoice, m_enabledLayers, setCopperLayerCheckBoxes(), and showPresets().

625 {
626  m_copperLayerCount = m_CopperLayersChoice->GetCurrentSelection() * 2 + 2;
630 }
void showPresets(LSET enabledLayerMask)
void setCopperLayerCheckBoxes(int copperCount)
LSET getUILayerMask()
Return the selected layer mask within the UI checkboxes.
void DIALOG_LAYERS_SETUP::OnInitDialog ( wxInitDialogEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_LAYERS_SETUP_BASE.

Definition at line 355 of file dialog_layers_setup.cpp.

References PCAD2KICAD::Center, DIALOG_LAYERS_SETUP_BASE::m_LayersListPanel, DIALOG_LAYERS_SETUP_BASE::m_sdbSizerOK, DIALOG_LAYERS_SETUP_BASE::m_TitlePanel, DIALOG_SHIM::SetSizeInDU(), and DIALOG_SHIM::VertPixelsFromDU().

356 {
357  wxWindowBase::OnInitDialog( aEvent );
358 
359  m_TitlePanel->SetMinSize( wxSize( -1, VertPixelsFromDU( 10 ) ) );
360 
361  m_LayersListPanel->ShowScrollbars( wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS );
362 
363  Layout();
364  SetSizeInDU( 240, 240 );
365  Center();
366 
367  m_sdbSizerOK->SetFocus();
368  m_sdbSizerOK->SetDefault();
369 
370  // OnSize() will fix the title spacing.
371  QueueEvent( new wxSizeEvent( GetSize() ) );
372 }
void SetSizeInDU(int x, int y)
Set the dialog to the given dimensions in "dialog units".
int VertPixelsFromDU(int y)
Convert an integer number of dialog units to pixels, vertically.
void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 271 of file dialog_shim.cpp.

References DIALOG_SHIM::m_fixupsRun, and recursiveDescent().

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

272 {
273  if( !m_fixupsRun )
274  {
275 #if DLGSHIM_SELECT_ALL_IN_TEXT_CONTROLS
276  const bool selectAllInTextCtrls = true;
277 #else
278  const bool selectAllInTextCtrls = false;
279 #endif
280  wxWindow* firstTextCtrl = NULL;
281  wxWindow* windowWithFocus = NULL;
282 
283  recursiveDescent( GetChildren(), selectAllInTextCtrls, firstTextCtrl,
284  windowWithFocus );
285 
286 #if DLGSHIM_USE_SETFOCUS
287  // While it would be nice to honour any focus already set (which was
288  // recorded in windowWithFocus), the reality is that it's currently wrong
289  // far more often than it's right.
290  // So just focus on the first text control if we have one; otherwise the
291  // focus on the dialog itself, which will at least allow esc, return, etc.
292  // to function.
293  if( firstTextCtrl )
294  firstTextCtrl->SetFocus();
295  else
296  SetFocus();
297 #endif
298 
299 #ifdef __WXMAC__
300  fixOSXCancelButtonIssue( this );
301 #endif
302 
303  m_fixupsRun = true;
304  }
305 
306  event.Skip();
307 }
static void recursiveDescent(wxWindowList &children, const bool selectTextInTextCtrls, wxWindow *&firstTextCtrl, wxWindow *&windowWithFocus)
bool m_fixupsRun
Definition: dialog_shim.h:149
void DIALOG_LAYERS_SETUP::OnPresetsChoice ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_LAYERS_SETUP_BASE.

Definition at line 600 of file dialog_layers_setup.cpp.

References LSET::AllCuMask(), DIM, m_copperLayerCount, m_enabledLayers, DIALOG_LAYERS_SETUP_BASE::m_PresetsChoice, setCopperLayerCheckBoxes(), setStateMandatoryLayerCheckBoxes(), showCopperChoice(), and showSelectedLayerCheckBoxes().

601 {
602  unsigned presetNdx = m_PresetsChoice->GetCurrentSelection();
603 
604  if( presetNdx == 0 ) // the Custom setting controls nothing.
605  return;
606 
607  if( presetNdx < DIM(presets) )
608  {
609  m_enabledLayers = presets[ presetNdx ];
610  LSET copperSet = m_enabledLayers & LSET::AllCuMask();
611  int copperCount = copperSet.count();
612 
613  m_copperLayerCount = copperCount;
617  }
618 
619  // Ensure mandatory layers are activated
621 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:673
#define DIM(x)
of elements in an array
Definition: macros.h:98
static const LSET presets[]
Class LSET is a set of PCB_LAYER_IDs.
void showCopperChoice(int copperCount)
void setCopperLayerCheckBoxes(int copperCount)
void showSelectedLayerCheckBoxes(LSET enableLayerMask)
void DIALOG_LAYERS_SETUP::OnSize ( wxSizeEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_LAYERS_SETUP_BASE.

Definition at line 414 of file dialog_layers_setup.cpp.

References moveTitles(), and Refresh().

415 {
416  moveTitles();
417  event.Skip();
418  Refresh();
419 }
void Refresh()
Update the board display after modifying it bu a python script (note: it is automatically called by a...
PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

Function Prj returns a reference to the PROJECT "associated with" this KIWAY.

Definition at line 34 of file kiway_holder.cpp.

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

Referenced by SCH_EDIT_FRAME::AppendSchematic(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), DIALOG_SYMBOL_REMAP::backupProject(), LIB_VIEW_FRAME::BestZoom(), DIALOG_FOOTPRINT_FP_EDITOR::BrowseAndAdd3DShapeFile(), DIALOG_FOOTPRINT_BOARD_EDITOR::BrowseAndAdd3DShapeFile(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile(), DIALOG_SYMBOL_LIB_TABLE::browseLibrariesHandler(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_FOOTPRINT_FP_EDITOR::Cfg3DPath(), DIALOG_FOOTPRINT_BOARD_EDITOR::Cfg3DPath(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::checkNewAlias(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), DIALOG_PLOT_SCHEMATIC::createPlotFileName(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_SYMBOL_LIB_TABLE::DIALOG_SYMBOL_LIB_TABLE(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), LIB_VIEW_FRAME::DisplayLibInfos(), LIB_EDIT_FRAME::DisplayLibInfos(), SCH_BASE_FRAME::DisplayListComponentsInLib(), PCB_EDIT_FRAME::doAutoSave(), DIALOG_FOOTPRINT_FP_EDITOR::Edit3DShapeFileName(), DIALOG_FOOTPRINT_BOARD_EDITOR::Edit3DShapeFileName(), SCH_EDIT_FRAME::EditSheet(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::Files_io_from_id(), NETLIST_DIALOG::GenNetlist(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), LIB_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), FOOTPRINT_EDIT_FRAME::GetCurrentLib(), SCH_BASE_FRAME::GetLibAlias(), SCH_BASE_FRAME::GetLibPart(), FOOTPRINT_EDIT_FRAME::getLibPath(), LIB_EDIT_FRAME::getLibraryFileName(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), DIALOG_BOM::getPluginFileName(), LIB_VIEW_FRAME::getSelectedAlias(), FP_THREAD_IFACE::GetTable(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), DIALOG_FOOTPRINT_FP_EDITOR::initModeditProperties(), DIALOG_FOOTPRINT_BOARD_EDITOR::InitModeditProperties(), PCB_EDIT_FRAME::InstallNetlistFrame(), SCH_EDIT_FRAME::IsSearchCacheObsolete(), KIWAY_HOLDER::Kiway(), SCH_EDIT_FRAME::Load_Component(), SCH_EDIT_FRAME::LoadCmpToFootprintLinkFile(), LIB_EDIT_FRAME::LoadComponentFromCurrentLib(), CVPCB_MAINFRAME::LoadFootprintFiles(), DIALOG_SPICE_MODEL::loadLibrary(), LIB_EDIT_FRAME::LoadOneSymbol(), CVPCB_MAINFRAME::LoadProjectFile(), SCH_EDIT_FRAME::LoadProjectFile(), PCB_EDIT_FRAME::LoadProjectSettings(), DIALOG_DRC_CONTROL::makeValidFileNameReport(), FOOTPRINT_VIEWER_FRAME::OnActivate(), DIALOG_GENCAD_EXPORT_OPTIONS::onBrowse(), DIALOG_DRC_CONTROL::OnButtonBrowseRptFileClick(), DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), SCH_BASE_FRAME::OnEditSymbolLibTable(), DIALOG_GENDRILL::OnGenReportFile(), DIALOG_CHOOSE_COMPONENT::OnIdle(), SCH_EDIT_FRAME::OnImportProject(), PCB_EDIT_FRAME::OnLeftClick(), DIALOG_NETLIST::OnOpenNetlistClick(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_SVG_PRINT::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), LIB_EDIT_FRAME::OnPlotCurrentComponent(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), SCH_EDIT_FRAME::OnRightClick(), DIALOG_BOM::OnRunPlugin(), SCH_EDIT_FRAME::OnSaveProject(), DIALOG_CHOOSE_COMPONENT::OnSchViewPaint(), DIALOG_SPICE_MODEL::onSelectLibrary(), LIB_VIEW_FRAME::OnSelectSymbol(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnTestChipName(), FOOTPRINT_EDIT_FRAME::OnUpdateSelectCurrentLib(), LIB_EDIT_FRAME::OnViewEntryDoc(), LIB_VIEW_FRAME::onViewSymbolDocument(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::PasteListOfItems(), DIALOG_CHOOSE_COMPONENT::PopulateFootprintSelector(), SCH_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Config(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), LIB_VIEW_FRAME::ReCreateHToolbar(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), LIB_VIEW_FRAME::ReCreateListCmp(), LIB_VIEW_FRAME::ReCreateListLib(), LIB_VIEW_FRAME::RedrawActiveWindow(), EDA_3D_VIEWER::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), LIB_EDIT_FRAME::saveLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), CVPCB_MAINFRAME::SaveProjectFile(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), SCH_BASE_FRAME::saveSymbolLibTables(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), SCH_BASE_FRAME::SelectComponentFromLibrary(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), LIB_EDIT_FRAME::selectSymLibTable(), SCH_EDIT_FRAME::sendNetlist(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), LIB_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), LIB_EDIT_FRAME::SetCurPart(), DIALOG_CHOOSE_COMPONENT::ShowFootprintFor(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::symTable(), EDA_3D_VIEWER::takeScreenshot(), SIM_PLOT_FRAME::updateNetlistExporter(), SCH_SCREEN::UpdateSymbolLinks(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), FOOTPRINT_EDIT_FRAME::updateTitle(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_BOARD_EDITOR::~DIALOG_FOOTPRINT_BOARD_EDITOR(), and DIALOG_FOOTPRINT_FP_EDITOR::~DIALOG_FOOTPRINT_FP_EDITOR().

35 {
36  return Kiway().Prj();
37 }
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_player.h:60
VTBL_ENTRY PROJECT & Prj() const
Function Prj returns the PROJECT associated with this KIWAY.
Definition: kiway.cpp:142
void DIALOG_LAYERS_SETUP::setCopperLayerCheckBoxes ( int  copperCount)
private

Definition at line 536 of file dialog_layers_setup.cpp.

References B_Cu, CTLs::checkbox, CTLs::choice, F_Cu, getCTLs(), LSET::InternalCuMask(), DIALOG_LAYERS_SETUP_BASE::m_LayersListPanel, CTLs::name, CTLs::panel, and setLayerCheckBox().

Referenced by DenyChangeCheckBox(), OnCopperLayersChoice(), OnPresetsChoice(), and TransferDataToWindow().

537 {
538  if( copperCount > 0 )
539  {
540  setLayerCheckBox( F_Cu, true );
541  --copperCount;
542  }
543 
544  if( copperCount > 0 )
545  {
546  setLayerCheckBox( B_Cu, true );
547  --copperCount;
548  }
549 
550  for( LSEQ seq = LSET::InternalCuMask().Seq(); seq; ++seq, --copperCount )
551  {
552  PCB_LAYER_ID layer = *seq;
553  bool state = copperCount > 0;
554 
555 #ifdef HIDE_INACTIVE_LAYERS
556  // This code hides non-active copper layers, or redisplays hidden
557  // layers which are now needed.
558  CTLs ctl = getCTLs( layer );
559 
560  ctl.name->Show( state );
561  ctl.checkbox->Show( state );
562  ctl.choice->Show( state );
563 
564  if( ctl.panel )
565  ctl.panel->Show( state );
566 #endif
567 
568  setLayerCheckBox( layer, state );
569  }
570 
571 #ifdef HIDE_INACTIVE_LAYERS
572  // Send an size event to force sizers to be updated,
573  // because the number of copper layers can have changed.
574  wxSizeEvent evt_size( m_LayersListPanel->GetSize() );
575  m_LayersListPanel->GetEventHandler()->ProcessEvent( evt_size );
576 #endif
577 }
Holds the 3 UI control pointers for a single board layer.
void setLayerCheckBox(LAYER_NUM layer, bool isChecked)
CTLs getCTLs(LAYER_NUM aLayerNumber)
Map aLayerNumber to the wx IDs for that layer which are the layer name control ID, checkbox control ID, and choice control ID.
wxControl * choice
wxPanel * panel
PCB_LAYER_ID
A quick note on layer IDs:
static LSET InternalCuMask()
Function InternalCuMask() returns a complete set of internal copper layers, which is all Cu layers ex...
Definition: lset.cpp:633
Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
wxCheckBox * checkbox
wxControl * name
void KIWAY_HOLDER::SetKiway ( wxWindow *  aDest,
KIWAY aKiway 
)
inherited

Function SetKiway.

Parameters
aDestis the recipient of aKiway pointer. It is only used for debugging, since "this" is not a wxWindow*. "this" is a KIWAY_HOLDER mix-in.
aKiwayis often from a parent window, or from KIFACE::CreateWindow().

Definition at line 41 of file kiway_holder.cpp.

References KIWAY_HOLDER::m_kiway, and name.

Referenced by DIALOG_SHIM::DIALOG_SHIM(), KIWAY_HOLDER::Kiway(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

42 {
43 #if defined(DEBUG)
44  // offer a trap point for debugging most any window
45  wxASSERT( aDest );
46  if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) )
47  {
48  int breakhere=1;
49  (void) breakhere;
50  }
51 #endif
52 
53  (void) aDest;
54 
55  m_kiway = aKiway;
56 }
KIWAY * m_kiway
Definition: kiway_player.h:85
const char * name
Definition: DXF_plotter.cpp:61
void DIALOG_LAYERS_SETUP::setLayerCheckBox ( LAYER_NUM  layer,
bool  isChecked 
)
private

Definition at line 529 of file dialog_layers_setup.cpp.

References getCheckBox().

Referenced by setCopperLayerCheckBoxes(), setStateMandatoryLayerCheckBoxes(), and showSelectedLayerCheckBoxes().

530 {
531  wxCheckBox* ctl = getCheckBox( aLayer );
532  ctl->SetValue( isChecked );
533 }
wxCheckBox * getCheckBox(LAYER_NUM aLayer)
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 118 of file dialog_shim.cpp.

Referenced by DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_EDIT_COMPONENTS_LIBID::DIALOG_EDIT_COMPONENTS_LIBID(), DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SYMBOL_LIB_TABLE::DIALOG_SYMBOL_LIB_TABLE(), HOTKEYS_EDITOR_DIALOG::HOTKEYS_EDITOR_DIALOG(), HTML_MESSAGE_BOX::HTML_MESSAGE_BOX(), DIALOG_SHIM::IsQuasiModal(), OnInitDialog(), and HTML_MESSAGE_BOX::SetDialogSizeInDU().

119 {
120  wxSize sz( x, y );
121  SetSize( ConvertDialogToPixels( sz ) );
122 }
void DIALOG_LAYERS_SETUP::setStateMandatoryLayerCheckBoxes ( )
private

Definition at line 399 of file dialog_layers_setup.cpp.

References B_CrtYd, Edge_Cuts, F_CrtYd, getCheckBox(), Margin, and setLayerCheckBox().

Referenced by OnPresetsChoice(), and TransferDataToWindow().

400 {
401  int layerList[4] =
402  {
404  };
405 
406  for( int ii = 0; ii < 4; ii++ )
407  {
408  setLayerCheckBox( layerList[ii], true );
409  getCheckBox( layerList[ii] )->Enable( false ); // do not allow changes
410  }
411 }
wxCheckBox * getCheckBox(LAYER_NUM aLayer)
void setLayerCheckBox(LAYER_NUM layer, bool isChecked)
bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 146 of file dialog_shim.cpp.

References class_map, EDA_RECT::GetPosition(), EDA_RECT::GetSize(), DIALOG_SHIM::m_hash_key, max, wxPoint::x, and wxPoint::y.

Referenced by DisplayHotkeyList(), DIALOG_SHIM::EndQuasiModal(), InvokeDialogERC(), DIALOG_SHIM::IsQuasiModal(), DIALOG_SCH_FIND::OnCancel(), DIALOG_DRC_CONTROL::OnLeftDClickClearance(), DIALOG_DRC_CONTROL::OnLeftDClickUnconnected(), DIALOG_DRC_CONTROL::OnPopupMenu(), DIALOG_EXCHANGE_FOOTPRINTS::OnQuit(), POSITION_RELATIVE_TOOL::PositionRelative(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), SCH_COMPONENT::SetPosition(), DRC::ShowDRCDialog(), and DIALOG_SHIM::ShowQuasiModal().

147 {
148  bool ret;
149  const char* hash_key;
150 
151  if( m_hash_key.size() )
152  {
153  // a special case like EDA_LIST_DIALOG, which has multiple uses.
154  hash_key = m_hash_key.c_str();
155  }
156  else
157  {
158  hash_key = typeid(*this).name();
159  }
160 
161  // Show or hide the window. If hiding, save current position and size.
162  // If showing, use previous position and size.
163  if( show )
164  {
165 #ifndef __WINDOWS__
166  wxDialog::Raise(); // Needed on OS X and some other window managers (i.e. Unity)
167 #endif
168  ret = wxDialog::Show( show );
169 
170  // classname is key, returns a zeroed out default EDA_RECT if none existed before.
171  EDA_RECT savedDialogRect = class_map[ hash_key ];
172 
173  if( savedDialogRect.GetSize().x != 0 && savedDialogRect.GetSize().y != 0 )
174  {
175  SetSize( savedDialogRect.GetPosition().x,
176  savedDialogRect.GetPosition().y,
177  std::max( wxDialog::GetSize().x, savedDialogRect.GetSize().x ),
178  std::max( wxDialog::GetSize().y, savedDialogRect.GetSize().y ),
179  0 );
180  }
181 
182  // Be sure that the dialog appears in a visible area
183  // (the dialog position might have been stored at the time when it was
184  // shown on another display)
185  if( wxDisplay::GetFromWindow( this ) == wxNOT_FOUND )
186  Centre();
187  }
188  else
189  {
190  // Save the dialog's position & size before hiding, using classname as key
191  class_map[ hash_key ] = EDA_RECT( wxDialog::GetPosition(), wxDialog::GetSize() );
192 
193 #ifdef __WXMAC__
194  if ( m_eventLoop )
195  m_eventLoop->Exit( GetReturnCode() ); // Needed for APP-MODAL dlgs on OSX
196 #endif
197 
198  ret = wxDialog::Show( show );
199  }
200 
201  return ret;
202 }
const wxSize GetSize() const
Definition: eda_rect.h:101
std::string m_hash_key
Definition: dialog_shim.h:151
static RECT_MAP class_map
const wxPoint GetPosition() const
Definition: eda_rect.h:113
#define max(a, b)
Definition: auxiliary.h:86
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
void DIALOG_LAYERS_SETUP::showBoardLayerNames ( )
private

Definition at line 443 of file dialog_layers_setup.cpp.

References dlg_layers(), BOARD::GetLayerName(), getName(), and m_pcb.

Referenced by TransferDataToWindow().

444 {
445  // Establish all the board's layer names into the dialog presentation, by
446  // obtaining them from BOARD::GetLayerName() which calls
447  // BOARD::GetStandardLayerName() for non-coppers.
448 
449  for( LSEQ seq = dlg_layers(); seq; ++seq )
450  {
451  PCB_LAYER_ID layer = *seq;
452 
453  wxControl* ctl = getName( layer );
454 
455  wxASSERT( ctl );
456 
457  if( ctl )
458  {
459  wxString lname = m_pcb->GetLayerName( layer );
460 
461  if( ctl->IsKindOf( CLASSINFO( wxTextCtrl ) ) )
462  ((wxTextCtrl*)ctl)->SetValue( lname ); // wxTextCtrl
463  else
464  ctl->SetLabel( lname ); // wxStaticText
465  }
466  }
467 }
static LSEQ dlg_layers()
wxControl * getName(LAYER_NUM aLayer)
PCB_LAYER_ID
A quick note on layer IDs:
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Function GetLayerName returns the name of a layer given by aLayer.
Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
void DIALOG_LAYERS_SETUP::showCopperChoice ( int  copperCount)
private

Definition at line 422 of file dialog_layers_setup.cpp.

References DIALOG_LAYERS_SETUP_BASE::m_CopperLayersChoice, and MAX_CU_LAYERS.

Referenced by OnPresetsChoice(), and TransferDataToWindow().

423 {
424  if( copperCount > MAX_CU_LAYERS )
425  copperCount = MAX_CU_LAYERS;
426 
427  if( copperCount < 2 )
428  copperCount = 2;
429 
430  for( int lyrCnt = 2; lyrCnt <= MAX_CU_LAYERS; lyrCnt += 2 )
431  {
432  // note this will change a one layer board to 2:
433  if( copperCount <= lyrCnt )
434  {
435  int idx = lyrCnt/2 - 1;
436  m_CopperLayersChoice->SetSelection(idx);
437  break;
438  }
439  }
440 }
void DIALOG_LAYERS_SETUP::showLayerTypes ( )
private

Definition at line 498 of file dialog_layers_setup.cpp.

References LSET::AllCuMask(), getChoice(), BOARD::GetLayerType(), and m_pcb.

Referenced by TransferDataToWindow().

499 {
500  for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq )
501  {
502  PCB_LAYER_ID cu_layer = *seq;
503 
504  wxChoice* ctl = getChoice( cu_layer );
505  ctl->SetSelection( m_pcb->GetLayerType( cu_layer ) );
506  }
507 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:673
PCB_LAYER_ID
A quick note on layer IDs:
Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
wxChoice * getChoice(LAYER_NUM aLayer)
LAYER_T GetLayerType(PCB_LAYER_ID aLayer) const
Function GetLayerType returns the type of the copper layer given by aLayer.
void DIALOG_LAYERS_SETUP::showPresets ( LSET  enabledLayerMask)
private

Definition at line 481 of file dialog_layers_setup.cpp.

References DIM, i, and DIALOG_LAYERS_SETUP_BASE::m_PresetsChoice.

Referenced by OnCheckBox(), OnCopperLayersChoice(), and TransferDataToWindow().

482 {
483  int presetsNdx = 0; // the "Custom" setting, matches nothing
484 
485  for( unsigned i=1; i<DIM( presets ); ++i )
486  {
487  if( enabledLayers == presets[i] )
488  {
489  presetsNdx = i;
490  break;
491  }
492  }
493 
494  m_PresetsChoice->SetSelection( presetsNdx );
495 }
#define DIM(x)
of elements in an array
Definition: macros.h:98
static const LSET presets[]
size_t i
Definition: json11.cpp:597
int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 558 of file dialog_shim.cpp.

References DBG, DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, DIALOG_SHIM::m_qmodal_showing, and DIALOG_SHIM::Show().

Referenced by SCH_EDIT_FRAME::EditComponent(), SCH_EDIT_FRAME::EditComponentFieldText(), LIB_EDIT_FRAME::EditField(), EDIT_TOOL::ExchangeFootprints(), PCB_EDIT_FRAME::InstallExchangeModuleFrame(), LIB_EDIT_FRAME::InstallFieldsEditorDialog(), SCH_EDIT_FRAME::InstallHierarchyFrame(), InvokeDialogCreateBOMEditor(), InvokeDialogEditComponentsLibId(), InvokeDialogUpdateFields(), SCH_EDIT_FRAME::OnRemapSymbols(), LIB_VIEW_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OpenProjectFiles(), and SCH_BASE_FRAME::SelectComponentFromLibrary().

559 {
560  // This is an exception safe way to zero a pointer before returning.
561  // Yes, even though DismissModal() clears this first normally, this is
562  // here in case there's an exception before the dialog is dismissed.
563  struct NULLER
564  {
565  void*& m_what;
566  NULLER( void*& aPtr ) : m_what( aPtr ) {}
567  ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction
568  } clear_this( (void*&) m_qmodal_loop );
569 
570  // release the mouse if it's currently captured as the window having it
571  // will be disabled when this dialog is shown -- but will still keep the
572  // capture making it impossible to do anything in the modal dialog itself
573  wxWindow* win = wxWindow::GetCapture();
574  if( win )
575  win->ReleaseMouse();
576 
577  // Get the optimal parent
578  wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
579 
580  // Show the optimal parent
581  DBG( if( parent ) printf( "%s: optimal parent: %s\n", __func__, typeid(*parent).name() );)
582 
583  wxASSERT_MSG( !m_qmodal_parent_disabler,
584  wxT( "Caller using ShowQuasiModal() twice on same window?" ) );
585 
586  // quasi-modal: disable only my "optimal" parent
588 
589 #ifdef __WXMAC__
590  // Apple in its infinite wisdom will raise a disabled window before even passing
591  // us the event, so we have no way to stop it. Instead, we must set an order on
592  // the windows so that the quasi-modal will be pushed in front of the disabled
593  // window when it is raised.
594  ReparentQuasiModal();
595 #endif
596  Show( true );
597 
598  m_qmodal_showing = true;
599 
600  EVENT_LOOP event_loop;
601 
602  m_qmodal_loop = &event_loop;
603 
604  event_loop.Run();
605 
606  return GetReturnCode();
607 }
bool m_qmodal_showing
Definition: dialog_shim.h:155
EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:154
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:156
Toggle a window&#39;s "enable" status to disabled, then enabled on destruction.
Definition: dialog_shim.cpp:33
#define DBG(x)
Definition: fctsys.h:33
void DIALOG_LAYERS_SETUP::showSelectedLayerCheckBoxes ( LSET  enableLayerMask)
private

Definition at line 470 of file dialog_layers_setup.cpp.

References dlg_layers(), and setLayerCheckBox().

Referenced by OnPresetsChoice(), and TransferDataToWindow().

471 {
472  // the check boxes
473  for( LSEQ seq = dlg_layers(); seq; ++seq )
474  {
475  PCB_LAYER_ID layer = *seq;
476  setLayerCheckBox( layer, enabledLayers[layer] );
477  }
478 }
static LSEQ dlg_layers()
void setLayerCheckBox(LAYER_NUM layer, bool isChecked)
PCB_LAYER_ID
A quick note on layer IDs:
Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
bool DIALOG_LAYERS_SETUP::testLayerNames ( )
private

Definition at line 774 of file dialog_layers_setup.cpp.

References LSET::AllCuMask(), DisplayError(), getLayerName(), getName(), hasOneOf(), m_enabledLayers, and name.

Referenced by TransferDataFromWindow().

775 {
776  std::vector<wxString> names;
777  wxTextCtrl* ctl;
778 
779  for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq )
780  {
781  PCB_LAYER_ID layer = *seq;
782 
783  // we _can_ rely on m_enabledLayers being current here:
784  if( !m_enabledLayers[layer] )
785  continue;
786 
787  wxString name = getLayerName( layer );
788 
789  ctl = (wxTextCtrl*) getName( layer );
790 
791  // check name for legality.
792  // 1) cannot be blank.
793  // 2) cannot have blanks.
794  // 3) cannot have " chars
795  // 4) cannot be 'signal'
796  // 5) must be unique.
797  // 6) cannot have illegal chars in filenames ( some filenames are built from layer names )
798  // like : % $ \ " / :
799  wxString badchars = wxFileName::GetForbiddenChars( wxPATH_DOS );
800  badchars.Append( '%' );
801 
802  if( !name )
803  {
804  DisplayError( this, _( "Layer name may not be empty." ) );
805  ctl->SetFocus(); // on the bad name
806  return false;
807  }
808 
809  if( hasOneOf( name, badchars ) )
810  {
811  DisplayError( this, _( "Layer name has an illegal character, one of: '" ) +
812  badchars + wxT( "'" ) );
813  ctl->SetFocus(); // on the bad name
814  return false;
815  }
816 
817  if( name == wxT( "signal" ) )
818  {
819  DisplayError( this, _( "Layer name 'signal' is reserved." ) );
820  ctl->SetFocus(); // on the bad name
821  return false;
822  }
823 
824  for( std::vector<wxString>::iterator it = names.begin(); it != names.end(); ++it )
825  {
826  if( name == *it )
827  {
828  DisplayError( this, _( "Duplicate layer names are not permitted." ) );
829  ctl->SetFocus(); // on the bad name
830  return false;
831  }
832  }
833 
834  names.push_back( name );
835  }
836 
837  return true;
838 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:673
wxControl * getName(LAYER_NUM aLayer)
PCB_LAYER_ID
A quick note on layer IDs:
Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
const char * name
Definition: DXF_plotter.cpp:61
wxString getLayerName(LAYER_NUM layer)
static bool hasOneOf(const wxString &str, const wxString &chars)
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:185
bool DIALOG_LAYERS_SETUP::TransferDataFromWindow ( )
overrideprivate

Definition at line 633 of file dialog_layers_setup.cpp.

References LSET::AllCuMask(), GENERAL_COLLECTOR::BoardLevelItems, BOARD::BuildConnectivity(), PCB_LAYER_COLLECTOR::Collect(), PCB_BASE_FRAME::Compile_Ratsnest(), DisplayError(), Format(), g_UserUnit, COLLECTOR::GetCount(), BOARD::GetDesignSettings(), getLayerName(), BOARD::GetLayerName(), getLayerTypeIndex(), getNonRemovableLayers(), getRemovedLayersWithItems(), getUILayerMask(), i, IsOK(), m_enabledLayers, m_pcb, DIALOG_LAYERS_SETUP_BASE::m_textCtrlBrdThickness, name, BOARD::Remove(), BOARD_DESIGN_SETTINGS::SetBoardThickness(), BOARD::SetEnabledLayers(), PCB_LAYER_COLLECTOR::SetLayerId(), BOARD::SetLayerName(), BOARD::SetLayerType(), BOARD::SetVisibleLayers(), StringFromValue(), testLayerNames(), and ValueFromTextCtrl().

634 {
635  if( !wxWindow::TransferDataFromWindow() || !testLayerNames() )
636  return false;
637 
638  wxString msg;
639 
640  // Make sure the board thickness is sane.
641  int thickness = ValueFromTextCtrl( *m_textCtrlBrdThickness );
642 
643  if( thickness < Millimeter2iu( 0.1 ) || thickness > Millimeter2iu( 10.0 ) )
644  {
645  msg.Printf( _( "Board thickness %s is out of range." ),
646  StringFromValue( g_UserUnit, thickness, true ) );
647  DisplayError( this, msg );
648  return false;
649  }
650 
651  // Check for removed layers with items which will get deleted from the board.
652  LSEQ removedLayers = getRemovedLayersWithItems();
653 
654  // Check for non copper layers in use in footprints, and therefore not removable.
655  LSEQ notremovableLayers = getNonRemovableLayers();
656 
657  if( !notremovableLayers.empty() )
658  {
659  for( unsigned int ii = 0; ii < notremovableLayers.size(); ii++ )
660  msg << m_pcb->GetLayerName( notremovableLayers[ii] ) << "\n";
661 
662  if( !IsOK( this, wxString::Format( _( "Footprints have some items on removed layers:\n"
663  "%s\n"
664  "These items will be no longer accessible\n"
665  "Do you wish to continue?" ), msg ) ) )
666  return false;
667  }
668 
669  if( !removedLayers.empty() &&
670  !IsOK( this, _( "Items have been found on removed layers. This operation will delete "
671  "all items from removed layers and cannot be undone. Do you wish to "
672  "continue?" ) ) )
673  return false;
674 
675  // Delete all objects on layers that have been removed. Leaving them in copper layers
676  // can (will?) result in DRC errors and it pollutes the board file with cruft.
677  bool hasRemovedBoardItems = false;
678 
679  if( !removedLayers.empty() )
680  {
681  PCB_LAYER_COLLECTOR collector;
682 
683  for( auto layer_id : removedLayers )
684  {
685  collector.SetLayerId( layer_id );
687 
688  // Bye-bye items on on removed layer.
689  if( collector.GetCount() != 0 )
690  {
691  hasRemovedBoardItems = true;
692 
693  for( int i = 0; i < collector.GetCount(); i++ )
694  {
695  BOARD_ITEM* item = collector[i];
696  m_pcb->Remove( item );
697  delete item;
698  }
699  }
700  }
701  }
702 
703  wxString name;
704 
707 
708  /* Ensure enabled layers are also visible
709  * This is mainly to avoid mistakes if some enabled
710  * layers are not visible when exiting this dialog
711  */
713 
714  for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq )
715  {
716  PCB_LAYER_ID layer = *seq;
717 
718  if( m_enabledLayers[layer] )
719  {
720  name = getLayerName( layer );
721  m_pcb->SetLayerName( layer, name );
722  LAYER_T t = (LAYER_T) getLayerTypeIndex( layer );
723  m_pcb->SetLayerType( layer, t );
724  }
725  }
726 
727  m_pcb->GetDesignSettings().SetBoardThickness( thickness );
728 
729  // If some board items are deleted: rebuild the connectivity,
730  // because it is likely some tracks and vias where removed
731  if( hasRemovedBoardItems )
732  {
733  PCB_EDIT_FRAME* editFrame = static_cast<PCB_EDIT_FRAME*>( GetParent() );
734  // Rebuild list of nets (full ratsnest rebuild)
735  editFrame->Compile_Ratsnest( NULL, true );
737  }
738 
739  return true;
740 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:673
int GetCount() const
Function GetCount returns the number of objects in the list.
Definition: collector.h:106
static const KICAD_T BoardLevelItems[]
A scan list for all primary board items, omitting items which are subordinate to a MODULE...
Definition: collectors.h:275
Class BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class...
wxString StringFromValue(EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol)
Function StringFromValue returns the string from aValue according to units (inch, mm ...
Definition: base_units.cpp:205
void Collect(BOARD_ITEM *aBoard, const KICAD_T aScanList[])
Tests a BOARD_ITEM using this class&#39;s Inspector method, which does the collection.
Definition: collectors.cpp:514
Collect all BOARD_ITEM objects on a given layer.
Definition: collectors.h:614
bool SetLayerType(PCB_LAYER_ID aLayer, LAYER_T aLayerType)
Function SetLayerType changes the type of the layer given by aLayer.
void SetBoardThickness(int aThickness)
LSEQ getNonRemovableLayers()
Return a list of layers in use in footprints, and therefore not removable.
void SetLayerId(PCB_LAYER_ID aLayerId)
Definition: collectors.h:624
PCB_LAYER_ID
A quick note on layer IDs:
void SetVisibleLayers(LSET aLayerMask)
Function SetVisibleLayers is a proxy function that calls the correspondent function in m_BoardSetting...
LAYER_T
Enum LAYER_T gives the allowed types of layers, same as Specctra DSN spec.
Definition: class_board.h:71
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Function GetLayerName returns the name of a layer given by aLayer.
bool SetLayerName(PCB_LAYER_ID aLayer, const wxString &aLayerName)
Function SetLayerName changes the name of the layer given by aLayer.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:532
void BuildConnectivity()
Builds or rebuilds the board connectivity database for the board, especially the list of connected it...
int ValueFromTextCtrl(const wxTextCtrl &aTextCtr)
Convert the number Value in a string according to the internal units and the selected unit (g_UserUni...
Definition: base_units.cpp:386
Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
void Compile_Ratsnest(wxDC *aDC, bool aDisplayStatus)
Function Compile_Ratsnest Create the entire board ratsnest.
Definition: ratsnest.cpp:54
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:57
LSET getUILayerMask()
Return the selected layer mask within the UI checkboxes.
LSEQ getRemovedLayersWithItems()
Return a list of layers removed from the board that contain items.
const char * name
Definition: DXF_plotter.cpp:61
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
wxString getLayerName(LAYER_NUM layer)
size_t i
Definition: json11.cpp:597
int getLayerTypeIndex(LAYER_NUM layer)
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:185
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Function IsOK displays a yes/no dialog with aMessage and returns the user response.
Definition: confirm.cpp:233
void SetEnabledLayers(LSET aLayerMask)
Function SetEnabledLayers is a proxy function that calls the correspondent function in m_BoardSetting...
void Remove(BOARD_ITEM *aBoardItem) override
Removes an item from the container.
bool DIALOG_LAYERS_SETUP::TransferDataToWindow ( )
overrideprivate

Definition at line 375 of file dialog_layers_setup.cpp.

References g_UserUnit, GetAbbreviatedUnitsLabel(), BOARD_DESIGN_SETTINGS::GetBoardThickness(), BOARD::GetDesignSettings(), m_copperLayerCount, m_enabledLayers, m_pcb, DIALOG_LAYERS_SETUP_BASE::m_staticTextBrdThicknessUnit, DIALOG_LAYERS_SETUP_BASE::m_textCtrlBrdThickness, PutValueInLocalUnits(), setCopperLayerCheckBoxes(), setStateMandatoryLayerCheckBoxes(), showBoardLayerNames(), showCopperChoice(), showLayerTypes(), showPresets(), and showSelectedLayerCheckBoxes().

376 {
377  if( !wxDialog::TransferDataToWindow() )
378  return false;
379 
385 
389  showLayerTypes();
391 
392  // All widgets are now initialized. Fix the min sizes:
393  GetSizer()->SetSizeHints( this );
394 
395  return true;
396 }
void showPresets(LSET enabledLayerMask)
void showCopperChoice(int copperCount)
wxString GetAbbreviatedUnitsLabel(EDA_UNITS_T aUnit)
Definition: base_units.cpp:485
void setCopperLayerCheckBoxes(int copperCount)
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:532
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:57
void showSelectedLayerCheckBoxes(LSET enableLayerMask)
void PutValueInLocalUnits(wxTextCtrl &aTextCtr, int aValue)
Function PutValueInLocalUnits converts aValue from internal units to user units and append the units ...
Definition: base_units.cpp:267
int DIALOG_SHIM::VertPixelsFromDU ( int  y)
protectedinherited

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

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 132 of file dialog_shim.cpp.

Referenced by DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_SHIM::IsQuasiModal(), and OnInitDialog().

133 {
134  wxSize sz( 0, y );
135  return ConvertDialogToPixels( sz ).y;
136 }

Member Data Documentation

wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_AdhesBackCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_AdhesBackName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_AdhesBackPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_AdhesBackStaticText
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_AdhesFrontCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_AdhesFrontName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_AdhesFrontPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_AdhesFrontStaticText
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_BackCheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_BackChoice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_BackName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_BackPanel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_CommentsCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_CommentsName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_CommentsPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_CommentsStaticText
protectedinherited
int DIALOG_LAYERS_SETUP::m_copperLayerCount
private
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_CopperLayersChoice
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_CrtYdBackCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_CrtYdBackName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_CrtYdBackPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_CrtYdBackStaticText
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_CrtYdFrontCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_CrtYdFrontName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_CrtYdFrontPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_CrtYdFrontStaticText
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_DrawingsCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_DrawingsName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_DrawingsPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_DrawingsStaticText
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_Eco1CheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_Eco1Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_Eco1Panel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_Eco1StaticText
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_Eco2CheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_Eco2Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_Eco2Panel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_Eco2StaticText
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP::m_enabledStaticText
private

Definition at line 148 of file dialog_layers_setup.cpp.

Referenced by DIALOG_LAYERS_SETUP().

wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_FabBackCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_FabBackName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_FabBackPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_FabBackStaticText
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_FabFrontCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_FabFrontName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_FabFrontPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_FabFrontStaticText
protectedinherited
bool DIALOG_SHIM::m_fixupsRun
protectedinherited

Definition at line 149 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint().

wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_FrontCheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_FrontChoice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_FrontName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_FrontPanel
protectedinherited
std::string DIALOG_SHIM::m_hash_key
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In10CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In10Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In10Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In10Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In11CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In11Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In11Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In11Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In12CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In12Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In12Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In12Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In13CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In13Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In13Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In13Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In14CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In14Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In14Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In14Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In15CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In15Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In15Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In15Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In16CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In16Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In16Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In16Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In17CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In17Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In17Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In17Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In18CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In18Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In18Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In18Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In19CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In19Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In19Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In19Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In1CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In1Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In1Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In1Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In20CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In20Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In20Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In20Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In21CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In21Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In21Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In21Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In22CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In22Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In22Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In22Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In23CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In23Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In23Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In23Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In24CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In24Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In24Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In24Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In25CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In25Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In25Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In25Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In26CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In26Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In26Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In26Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In27CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In27Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In27Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In27Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In28CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In28Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In28Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In28Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In29CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In29Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In29Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In29Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In2CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In2Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In2Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In2Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In30CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In30Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In30Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In30Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In3CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In3Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In3Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In3Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In4CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In4Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In4Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In4Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In5CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In5Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In5Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In5Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In6CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In6Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In6Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In6Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In7CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In7Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In7Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In7Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In8CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In8Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In8Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In8Panel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_In9CheckBox
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_In9Choice
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_In9Name
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_In9Panel
protectedinherited
wxFlexGridSizer* DIALOG_LAYERS_SETUP_BASE::m_LayerListFlexGridSizer
protectedinherited
wxScrolledWindow* DIALOG_LAYERS_SETUP_BASE::m_LayersListPanel
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_MarginCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_MarginName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_MarginPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_MarginStaticText
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_MaskBackCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_MaskBackName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_MaskBackPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_MaskBackStaticText
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_MaskFrontCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_MaskFrontName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_MaskFrontPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_MaskFrontStaticText
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP::m_nameStaticText
private

Definition at line 147 of file dialog_layers_setup.cpp.

Referenced by DIALOG_LAYERS_SETUP().

wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_PCBEdgesCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_PCBEdgesName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_PCBEdgesPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_PCBEdgesStaticText
protectedinherited
wxChoice* DIALOG_LAYERS_SETUP_BASE::m_PresetsChoice
protectedinherited
EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 154 of file dialog_shim.h.

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

WDO_ENABLE_DISABLE* DIALOG_SHIM::m_qmodal_parent_disabler
protectedinherited
bool DIALOG_SHIM::m_qmodal_showing
protectedinherited
wxStdDialogButtonSizer* DIALOG_LAYERS_SETUP_BASE::m_sdbSizer
protectedinherited
wxButton* DIALOG_LAYERS_SETUP_BASE::m_sdbSizerCancel
protectedinherited
wxButton* DIALOG_LAYERS_SETUP_BASE::m_sdbSizerOK
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_SilkSBackCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_SilkSBackName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_SilkSBackPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_SilkSBackStaticText
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_SilkSFrontCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_SilkSFrontName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_SilkSFrontPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_SilkSFrontStaticText
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_SoldPBackCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_SoldPBackName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_SoldPBackPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_SoldPBackStaticText
protectedinherited
wxCheckBox* DIALOG_LAYERS_SETUP_BASE::m_SoldPFrontCheckBox
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_SoldPFrontName
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_SoldPFrontPanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_SoldPFrontStaticText
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_staticTextBrdThickness
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_staticTextBrdThicknessUnit
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_staticTextCopperLayers
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_staticTextGrouping
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP_BASE::m_staticTextLayers
protectedinherited
wxTextCtrl* DIALOG_LAYERS_SETUP_BASE::m_textCtrlBrdThickness
protectedinherited
wxPanel* DIALOG_LAYERS_SETUP_BASE::m_TitlePanel
protectedinherited
wxStaticText* DIALOG_LAYERS_SETUP::m_typeStaticText
private

Definition at line 149 of file dialog_layers_setup.cpp.

Referenced by DIALOG_LAYERS_SETUP().


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