KiCad PCB EDA Suite
dialog_libedit_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_LIBEDIT_OPTIONS__
32 #define __DIALOG_LIBEDIT_OPTIONS__
33 
35 
36 class LIB_EDIT_FRAME;
37 
39 {
40 public:
42 
43  LIB_EDIT_FRAME* Parent() { return (LIB_EDIT_FRAME*) GetParent(); }
44 
45  void SetGridSelection( int select ) { m_choiceGridSize->SetSelection( select ); }
46  int GetGridSelection( void ) { return m_choiceGridSize->GetSelection(); }
47  void SetGridSizes( const GRIDS& grid_sizes, int grid_id );
48 
49  void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); }
50  bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); }
51 
52  void SetLineWidth( int aWidth ) { m_spinLineWidth->SetValue( aWidth ); }
53  int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); }
54 
55  void SetPinLength( int aLength ) { m_spinPinLength->SetValue( aLength ); }
56  int GetPinLength( void ) { return m_spinPinLength->GetValue(); }
57 
58  void SetPinNumSize( int text_size ) { m_spinPinNumSize->SetValue( text_size ); }
59  int GetPinNumSize( void ) { return m_spinPinNumSize->GetValue(); }
60 
61  void SetPinNameSize( int text_size ) { m_spinPinNameSize->SetValue( text_size ); }
62  int GetPinNameSize( void ) { return m_spinPinNameSize->GetValue(); }
63 
64  void SetPinRepeatStep( int aValue ) { m_choicePinDisplacement->SetSelection( aValue == 50 ? 1 : 0 ); }
65  int GetPinRepeatStep( void )
66  {
67  return m_choicePinDisplacement->GetSelection() == 1 ? 50 : 100;
68  }
69 
70  void SetItemRepeatStep( wxPoint aValue )
71  {
72  m_spinRepeatHorizontal->SetValue( aValue.x );
73  m_spinRepeatVertical->SetValue( aValue.y );
74  }
76  {
77  wxPoint step;
78  step.x = m_spinRepeatHorizontal->GetValue();
79  step.y = m_spinRepeatVertical->GetValue();
80  return step;
81  }
82 
83  void SetRepeatLabelInc( int aValue ) { m_spinRepeatLabel->SetValue( aValue ); }
84  int GetRepeatLabelInc( void )
85  {
86  return m_spinRepeatLabel->GetValue();
87  }
88 
89  void SetShowElectricalType( bool show ) { m_checkShowPinElectricalType->SetValue( show ); }
90  bool GetShowElectricalType( void )
91  {
92  return m_checkShowPinElectricalType->GetValue();
93  }
94 
95 };
96 
97 #endif // __DIALOG_LIBEDIT_OPTIONS__
void SetRepeatLabelInc(int aValue)
void SetPinLength(int aLength)
DIALOG_LIBEDIT_OPTIONS(LIB_EDIT_FRAME *parent)
void SetItemRepeatStep(wxPoint aValue)
void SetPinNumSize(int text_size)
std::vector< GRID_TYPE > GRIDS
void SetGridSizes(const GRIDS &grid_sizes, int grid_id)
Class DIALOG_LIBEDIT_OPTIONS_BASE.
void SetShowElectricalType(bool show)
The component library editor main window.
Definition: libeditframe.h:51
void SetPinRepeatStep(int aValue)
void SetPinNameSize(int text_size)
void SetGridSelection(int select)