KiCad PCB EDA Suite
dialog_eeschema_options.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2009 Wayne Stambaugh <stambaughw@verizon.net>
5  * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
31 #ifndef __dialog_eeschema_options__
32 #define __dialog_eeschema_options__
33 
35 #include <template_fieldnames.h>
36 
38 class WIDGET_HOTKEY_LIST;
39 class SCH_EDIT_FRAME;
40 
42 {
43 protected:
46 
49 
59  void OnAddButtonClick( wxCommandEvent& event ) override;
60 
70  void OnDeleteButtonClick( wxCommandEvent& event ) override;
71 
76  bool TransferDataToWindow() override;
77 
82  bool TransferDataFromWindow() override;
83 
84 public:
91 
92  virtual SCH_EDIT_FRAME* GetParent();
93 
98  int GetUnitsSelection( void ) { return m_choiceUnits->GetSelection(); }
99 
109  void SetUnits( const wxArrayString& aUnits, int aSelect = 0 );
110 
115  int GetGridSelection( void ) { return m_choiceGridSize->GetSelection(); }
116 
124  void SetGridSizes( const GRIDS& aGridSizes, int aGridId );
125 
130  int GetBusWidth( void ) { return m_spinBusWidth->GetValue(); }
131 
138  void SetBusWidth( int aWidth ) { m_spinBusWidth->SetValue( aWidth ); }
139 
145  void SetLineWidth( int aWidth ) { m_spinLineWidth->SetValue( aWidth ); }
146 
151  int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); }
152 
158  void SetTextSize( int text_size ) { m_spinTextSize->SetValue( text_size ); }
159 
164  int GetTextSize( void ) { return m_spinTextSize->GetValue(); }
165 
171  void SetRepeatHorizontal( int displacement )
172  {
173  m_spinRepeatHorizontal->SetValue( displacement );
174  }
175 
180  int GetRepeatHorizontal( void ) { return m_spinRepeatHorizontal->GetValue(); }
181 
187  void SetRepeatVertical( int displacement ) { m_spinRepeatVertical->SetValue( displacement ); }
188 
193  int GetRepeatVertical( void ) { return m_spinRepeatVertical->GetValue(); }
194 
200  void SetRepeatLabel( int increment ) { m_spinRepeatLabel->SetValue( increment ); }
201 
206  int GetRepeatLabel( void ) { return m_spinRepeatLabel->GetValue(); }
207 
213  void SetAutoSaveInterval( int aInterval ) { m_spinAutoSaveInterval->SetValue( aInterval ); }
214 
219  int GetAutoSaveInterval() const { return m_spinAutoSaveInterval->GetValue(); }
220 
227  void SetRefIdSeparator( wxChar aSep, wxChar aFirstId);
228 
235  void GetRefIdSeparator( int& aSep, int& aFirstId);
236 
242  void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); }
243 
248  bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); }
249 
255  void SetShowHiddenPins( bool show ) { m_checkShowHiddenPins->SetValue( show ); }
256 
261  bool GetShowHiddenPins( void ) { return m_checkShowHiddenPins->GetValue(); }
262 
268  void SetEnableZoomNoCenter( bool enable )
269  {
270  m_checkEnableZoomCenter->SetValue( !enable );
271  }
272 
278  {
279  return !m_checkEnableZoomCenter->GetValue();
280  }
281 
288  void SetEnableMousewheelPan( bool enable ) { m_checkEnableMousewheelPan->SetValue( enable ); }
289 
294  bool GetEnableMousewheelPan( void ) { return m_checkEnableMousewheelPan->GetValue(); }
295 
302  void SetEnableAutoPan( bool enable ) { m_checkAutoPan->SetValue( enable ); }
303 
308  bool GetEnableAutoPan( void ) { return m_checkAutoPan->GetValue(); }
309 
316  void SetEnableHVBusOrientation( bool enable ) { m_checkHVOrientation->SetValue( enable ); }
317 
322  bool GetEnableHVBusOrientation( void ) { return m_checkHVOrientation->GetValue(); }
323 
328  void SetShowPageLimits( bool show ) { m_checkPageLimits->SetValue( show ); }
329 
334  bool GetShowPageLimits( void ) { return m_checkPageLimits->GetValue(); }
335 
340  void SetAutoplaceFields( bool enable ) { m_checkAutoplaceFields->SetValue( enable ); }
341 
346  bool GetAutoplaceFields() { return m_checkAutoplaceFields->GetValue(); }
347 
352  void SetAutoplaceJustify( bool enable ) { m_checkAutoplaceJustify->SetValue( enable ); }
353 
358  bool GetAutoplaceJustify() { return m_checkAutoplaceJustify->GetValue(); }
359 
364  void SetAutoplaceAlign( bool enable ) { m_checkAutoplaceAlign->SetValue( enable ); }
365 
370  bool GetAutoplaceAlign() { return m_checkAutoplaceAlign->GetValue(); }
371 
378  void SetTemplateFields( const TEMPLATE_FIELDNAMES& aFields );
379 
386 };
387 
388 #endif // __dialog_eeschema_options__
void SetEnableMousewheelPan(bool enable)
Function SetEnableMousewheelPan Sets the MousewheelPan setting in the dialog.
int GetRepeatVertical(void)
Function GetRepeatVertical Returns the current RepeatVertical displacement value from the dialog...
bool TransferDataToWindow() override
Function TransferDataToWindow Transfer data into the GUI.
int GetRepeatHorizontal(void)
Function GetRepeatHorizontal Returns the current RepeatHorizontal displacement value from the dialog...
bool GetEnableMousewheelPan(void)
Function GetEnableMousewheelPan Return the MousewheelPan setting from the dialog. ...
bool TransferDataFromWindow() override
Function TransferDataFromWindow Transfer data out of the GUI.
virtual SCH_EDIT_FRAME * GetParent()
void SetTemplateFields(const TEMPLATE_FIELDNAMES &aFields)
Function SetTemplateFields Set the template field data in the dialog.
void SetEnableHVBusOrientation(bool enable)
Function SetEnableHVBusOrientation Set the HVBusOrientation setting in the dialog.
void SetUnits(const wxArrayString &aUnits, int aSelect=0)
Function SetUnits Set the unit options.
void SetRepeatLabel(int increment)
Function SetRepeatLabel Sets the current RepeatLabel increment value in the dialog.
int GetUnitsSelection(void)
Function GetUnitsSelection Returns the currently selected grid size in the dialog.
DIALOG_EESCHEMA_OPTIONS(SCH_EDIT_FRAME *parent)
Public constructor.
Schematic editor (Eeschema) main window.
Definition: schframe.h:117
bool GetShowHiddenPins(void)
Function GetShowHiddenPins Returns the current ShowHiddenPins value from the dialog.
std::vector< GRID_TYPE > GRIDS
void GetRefIdSeparator(int &aSep, int &aFirstId)
Function GetRefIdSeparator Returns the current RefIdSeparator value from the dialog.
void SetEnableAutoPan(bool enable)
Function SetEnableAutoPan Sets the AutoPan setting in the dialog.
void OnDeleteButtonClick(wxCommandEvent &event) override
Function OnDeleteButtonClick Process the wxWidgets event produced when the user presses the Delete bu...
int GetLineWidth(void)
Function GetLineWidth Returns the current LineWidth value from the dialog.
void SetEnableZoomNoCenter(bool enable)
Function SetEnableZoomNoCenter Sets the current ZoomNoCenter value in the dialog. ...
WIDGET_HOTKEY_LIST * m_hotkeyListCtrl
void SetAutoSaveInterval(int aInterval)
Function SetAutoSaveInterval Sets the current AutoSaveInterval value in the dialog.
int GetRepeatLabel(void)
Function GetRepeatLabel Returns the current RepeatLabel increment value from the dialog.
bool GetAutoplaceAlign()
Function Return the current AutoplaceAlign setting from the dialog.
std::vector< TEMPLATE_FIELDNAME > TEMPLATE_FIELDNAMES
int GetGridSelection(void)
Function GetGridSelection Returns the curent grid size selected in the dialog.
TEMPLATE_FIELDNAMES templateFields
The template fieldnames for this dialog.
bool GetShowGrid(void)
Function GetShowGrid Returns the current ShowGrid value from the dialog.
bool GetEnableHVBusOrientation(void)
Function GetEnableHVBusOrientation Get the HVBusOrientation setting from the dialog.
void SetShowGrid(bool show)
Function SetShowGrid Sets the current ShowGrid value in the dialog.
bool GetAutoplaceFields()
Function Return the current AutoplaceFields setting from the dialog.
void OnAddButtonClick(wxCommandEvent &event) override
Function OnAddButtonClick Process the wxWidgets event produced when the user presses the Add buton fo...
void SetAutoplaceFields(bool enable)
Function Set the AutoplaceFields setting in the dialog.
int GetBusWidth(void)
Function GetBusWidth Get the current bus width setting from the dialog.
bool GetShowPageLimits(void)
Function Return the current ShowPageLimits setting from the dialog.
void SetShowHiddenPins(bool show)
Function SetShowHiddenPins Sets the current ShowHiddenPins value in the dialog.
void SetShowPageLimits(bool show)
Function Set the ShowPageLimits setting in the dialog.
void SetBusWidth(int aWidth)
Function SetBusWidth Sets the bus width setting in the dialog.
TEMPLATE_FIELDNAMES GetTemplateFields(void)
Function GetTemplateFields Get the dialog's template field data.
void SetRepeatHorizontal(int displacement)
Function SetRepeatHorizontal Sets the current RepeatHorizontal displacement value in the dialog...
Class DIALOG_EESCHEMA_OPTIONS_BASE.
bool GetEnableZoomNoCenter(void)
Function GetEnableZoomNoCenter Returns the current ZoomNoCenter value from the dialog.
void SetAutoplaceJustify(bool enable)
Function Set the AutoplaceJustify setting in the dialog.
int GetTextSize(void)
Function GetTextSize Returns the current default TextSize value from the dialog.
void SetAutoplaceAlign(bool enable)
Function Set the AutoplaceAlign setting in the dialog.
void SetRefIdSeparator(wxChar aSep, wxChar aFirstId)
Function SetRefIdSeparator Sets the current RefIdSeparator value in the dialog.
void SetTextSize(int text_size)
Function SetTextSize Sets the current default TextSize value in the dialog.
int GetAutoSaveInterval() const
Function GetAutoSaveInterval Returns the current AutoSaveInterval value from the dialog.
void SetLineWidth(int aWidth)
Function SetLineWidth Sets the current LineWidth value in the dialog.
void SetGridSizes(const GRIDS &aGridSizes, int aGridId)
Function SetGridSizes Sets the available grid size choices aGridSizes and selectd the current option ...
bool GetAutoplaceJustify()
Function Return the current AutoplaceJustify setting from the dialog.
WIDGET_EESCHEMA_COLOR_CONFIG * m_colorConfigCtrl
void SetRepeatVertical(int displacement)
Function SetRepeatVertical Sets the current RepeatVertical displacement value in the dialog...
bool GetEnableAutoPan(void)
Function GetEnableAutoPan Return the AutoPan setting from the dialog.