KiCad PCB EDA Suite
PANEL_MODEDIT_SETTINGS_BASE Class Reference

Class PANEL_MODEDIT_SETTINGS_BASE. More...

#include <panel_modedit_settings_base.h>

Inheritance diagram for PANEL_MODEDIT_SETTINGS_BASE:
PANEL_MODEDIT_SETTINGS

Public Member Functions

 PANEL_MODEDIT_SETTINGS_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL)
 
 ~PANEL_MODEDIT_SETTINGS_BASE ()
 

Protected Attributes

wxRadioBox * m_PolarDisplay
 
wxRadioBox * m_UnitsSelection
 
wxCheckBox * m_MagneticPads
 
wxCheckBox * m_Segments_45_Only_Ctrl
 
wxCheckBox * m_dragSelects
 

Detailed Description

Constructor & Destructor Documentation

PANEL_MODEDIT_SETTINGS_BASE::PANEL_MODEDIT_SETTINGS_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint pos = wxDefaultPosition,
const wxSize &  size = wxSize( -1,-1 ),
long  style = wxTAB_TRAVERSAL 
)

Definition at line 12 of file panel_modedit_settings_base.cpp.

References m_dragSelects, m_MagneticPads, m_PolarDisplay, m_Segments_45_Only_Ctrl, m_UnitsSelection, wxID_POLAR_CTRL, wxID_SEGMENTS45, and wxID_UNITS.

12  : wxPanel( parent, id, pos, size, style )
13 {
14  wxBoxSizer* bSizerMain;
15  bSizerMain = new wxBoxSizer( wxHORIZONTAL );
16 
17  wxBoxSizer* bSizerColumns;
18  bSizerColumns = new wxBoxSizer( wxVERTICAL );
19 
20  wxBoxSizer* bSizerDisplayOptions;
21  bSizerDisplayOptions = new wxBoxSizer( wxVERTICAL );
22 
23  wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") };
24  int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
25  m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
26  m_PolarDisplay->SetSelection( 0 );
27  m_PolarDisplay->SetToolTip( _("Set display of relative (dx/dy) coordinates to Cartesian (rectangular) or polar (angle/distance).") );
28 
29  bSizerDisplayOptions->Add( m_PolarDisplay, 0, wxEXPAND|wxBOTTOM, 5 );
30 
31  wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") };
32  int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString );
33  m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS );
34  m_UnitsSelection->SetSelection( 0 );
35  m_UnitsSelection->SetToolTip( _("Set units used to display dimensions and positions.") );
36 
37  bSizerDisplayOptions->Add( m_UnitsSelection, 0, wxEXPAND|wxBOTTOM, 5 );
38 
39 
40  bSizerColumns->Add( bSizerDisplayOptions, 0, wxEXPAND, 5 );
41 
42  wxStaticBoxSizer* sbSizerEditOptions;
43  sbSizerEditOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Editing Options") ), wxVERTICAL );
44 
45  m_MagneticPads = new wxCheckBox( sbSizerEditOptions->GetStaticBox(), wxID_ANY, _("Magnetic pads"), wxDefaultPosition, wxDefaultSize, 0 );
46  sbSizerEditOptions->Add( m_MagneticPads, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
47 
48 
49  sbSizerEditOptions->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
50 
51  m_Segments_45_Only_Ctrl = new wxCheckBox( sbSizerEditOptions->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
52  m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") );
53 
54  sbSizerEditOptions->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 );
55 
56  m_dragSelects = new wxCheckBox( sbSizerEditOptions->GetStaticBox(), wxID_ANY, _("Prefer selection to dragging"), wxDefaultPosition, wxDefaultSize, 0 );
57  m_dragSelects->SetToolTip( _("When enabled and nothing is selected, drag gesture will draw a selection box, even if there are items under the cursor that could be immediately dragged.") );
58 
59  sbSizerEditOptions->Add( m_dragSelects, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
60 
61 
62  bSizerColumns->Add( sbSizerEditOptions, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
63 
64 
65  bSizerMain->Add( bSizerColumns, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
66 
67 
68  this->SetSizer( bSizerMain );
69  this->Layout();
70  bSizerMain->Fit( this );
71 }
#define wxID_UNITS
#define wxID_POLAR_CTRL
#define wxID_SEGMENTS45
PANEL_MODEDIT_SETTINGS_BASE::~PANEL_MODEDIT_SETTINGS_BASE ( )

Definition at line 73 of file panel_modedit_settings_base.cpp.

74 {
75 }

Member Data Documentation

wxCheckBox* PANEL_MODEDIT_SETTINGS_BASE::m_dragSelects
protected
wxCheckBox* PANEL_MODEDIT_SETTINGS_BASE::m_MagneticPads
protected
wxRadioBox* PANEL_MODEDIT_SETTINGS_BASE::m_PolarDisplay
protected
wxCheckBox* PANEL_MODEDIT_SETTINGS_BASE::m_Segments_45_Only_Ctrl
protected
wxRadioBox* PANEL_MODEDIT_SETTINGS_BASE::m_UnitsSelection
protected

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