Commit 99b3739c authored by faa's avatar faa

minor spin repeat bug fixed, set eol-style native on new files

parent da857f27
#include "fctsys.h" #include "fctsys.h"
#include "class_base_screen.h" #include "class_base_screen.h"
#include "dialog_eeschema_options.h" #include "dialog_eeschema_options.h"
DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) : DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
DIALOG_EESCHEMA_OPTIONS_BASE( parent ) DIALOG_EESCHEMA_OPTIONS_BASE( parent )
{ {
m_choiceUnits->SetFocus(); m_choiceUnits->SetFocus();
} }
void DIALOG_EESCHEMA_OPTIONS::SetUnits( const wxArrayString& units, int select ) void DIALOG_EESCHEMA_OPTIONS::SetUnits( const wxArrayString& units, int select )
{ {
wxASSERT( units.GetCount() > 0 wxASSERT( units.GetCount() > 0
&& ( select >= 0 && (size_t) select < units.GetCount() ) ); && ( select >= 0 && (size_t) select < units.GetCount() ) );
m_choiceUnits->Append( units ); m_choiceUnits->Append( units );
m_choiceUnits->SetSelection( select ); m_choiceUnits->SetSelection( select );
} }
void DIALOG_EESCHEMA_OPTIONS::SetGridSizes( const GridArray& grid_sizes, void DIALOG_EESCHEMA_OPTIONS::SetGridSizes( const GridArray& grid_sizes,
int grid_id ) int grid_id )
{ {
wxASSERT( grid_sizes.GetCount() > 0 ); wxASSERT( grid_sizes.GetCount() > 0 );
int select = wxNOT_FOUND; int select = wxNOT_FOUND;
for( size_t i = 0; i < grid_sizes.GetCount(); i++ ) for( size_t i = 0; i < grid_sizes.GetCount(); i++ )
{ {
wxString tmp; wxString tmp;
tmp.Printf( wxT( "%0.1f" ), grid_sizes[i].m_Size.x ); tmp.Printf( wxT( "%0.1f" ), grid_sizes[i].m_Size.x );
m_choiceGridSize->Append( tmp ); m_choiceGridSize->Append( tmp );
if( grid_sizes[i].m_Id == grid_id ) if( grid_sizes[i].m_Id == grid_id )
select = (int) i; select = (int) i;
} }
m_choiceGridSize->SetSelection( select ); m_choiceGridSize->SetSelection( select );
} }
#ifndef __dialog_eeschema_options__ #ifndef __dialog_eeschema_options__
#define __dialog_eeschema_options__ #define __dialog_eeschema_options__
/** /**
* @file * @file
* Subclass of DIALOG_EESCHEMA_OPTIONS_BASE, which is generated by wxFormBuilder. * Subclass of DIALOG_EESCHEMA_OPTIONS_BASE, which is generated by wxFormBuilder.
*/ */
#include "dialog_eeschema_options_base.h" #include "dialog_eeschema_options_base.h"
class DIALOG_EESCHEMA_OPTIONS : public DIALOG_EESCHEMA_OPTIONS_BASE class DIALOG_EESCHEMA_OPTIONS : public DIALOG_EESCHEMA_OPTIONS_BASE
{ {
public: public:
DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ); DIALOG_EESCHEMA_OPTIONS( wxWindow* parent );
void SetUnits( const wxArrayString& units, int select = 0 ); void SetUnits( const wxArrayString& units, int select = 0 );
int GetUnitsSelection( void ) { return m_choiceUnits->GetSelection(); } int GetUnitsSelection( void ) { return m_choiceUnits->GetSelection(); }
void SetGridSelection( int select ) void SetGridSelection( int select )
{ {
m_choiceGridSize->SetSelection( select ); m_choiceGridSize->SetSelection( select );
} }
int GetGridSelection( void ) { return m_choiceGridSize->GetSelection(); } int GetGridSelection( void ) { return m_choiceGridSize->GetSelection(); }
void SetGridSizes( const GridArray& grid_sizes, int grid_id ); void SetGridSizes( const GridArray& grid_sizes, int grid_id );
void SetLineWidth( int line_width ) void SetLineWidth( int line_width )
{ {
m_spinLineWidth->SetValue( line_width ); m_spinLineWidth->SetValue( line_width );
} }
int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); } int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); }
void SetTextSize( int text_size ) void SetTextSize( int text_size )
{ {
m_spinTextSize->SetValue( text_size ); m_spinTextSize->SetValue( text_size );
} }
int GetTextSize( void ) { return m_spinTextSize->GetValue(); } int GetTextSize( void ) { return m_spinTextSize->GetValue(); }
void SetRepeatHorizontal( int displacement ) void SetRepeatHorizontal( int displacement )
{ {
m_spinRepeatHorizontal->SetValue( displacement ); m_spinRepeatHorizontal->SetValue( displacement );
} }
int GetRepeatHorizontal( void ) int GetRepeatHorizontal( void )
{ {
return m_spinRepeatHorizontal->GetValue(); return m_spinRepeatHorizontal->GetValue();
} }
void SetRepeatVertical( int displacement ) void SetRepeatVertical( int displacement )
{ {
m_spinRepeatVertical->SetValue( displacement ); m_spinRepeatVertical->SetValue( displacement );
} }
int GetRepeatVertical( void ) { return m_spinRepeatVertical->GetValue(); } int GetRepeatVertical( void ) { return m_spinRepeatVertical->GetValue(); }
void SetRepeatLabel( int increment ) void SetRepeatLabel( int increment )
{ {
m_spinRepeatLabel->SetValue( increment ); m_spinRepeatLabel->SetValue( increment );
} }
int GetRepeatLabel( void ) { return m_spinRepeatLabel->GetValue(); } int GetRepeatLabel( void ) { return m_spinRepeatLabel->GetValue(); }
void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); } void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); }
bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); } bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); }
void SetShowHiddenPins( bool show ) void SetShowHiddenPins( bool show )
{ {
m_checkShowHiddenPins->SetValue( show ); m_checkShowHiddenPins->SetValue( show );
} }
bool GetShowHiddenPins( void ) bool GetShowHiddenPins( void )
{ {
return m_checkShowHiddenPins->GetValue(); return m_checkShowHiddenPins->GetValue();
} }
void SetEnableAutoPan( bool enable ) void SetEnableAutoPan( bool enable )
{ {
m_checkAutoPan->SetValue( enable ); m_checkAutoPan->SetValue( enable );
} }
bool GetEnableAutoPan( void ) { return m_checkAutoPan->GetValue(); } bool GetEnableAutoPan( void ) { return m_checkAutoPan->GetValue(); }
void SetEnableAnyBusOrientation( bool enable ) void SetEnableAnyBusOrientation( bool enable )
{ {
m_checkAnyOrientation->SetValue( enable ); m_checkAnyOrientation->SetValue( enable );
} }
bool GetEnableAnyBusOrientation( void ) bool GetEnableAnyBusOrientation( void )
{ {
return m_checkAnyOrientation->GetValue(); return m_checkAnyOrientation->GetValue();
} }
void SetShowPageLimits( bool show ) void SetShowPageLimits( bool show )
{ {
m_checkPageLimits->SetValue( show ); m_checkPageLimits->SetValue( show );
} }
bool GetShowPageLimits( void ) bool GetShowPageLimits( void )
{ {
return m_checkPageLimits->GetValue(); return m_checkPageLimits->GetValue();
} }
}; };
#endif // __dialog_eeschema_options__ #endif // __dialog_eeschema_options__
...@@ -82,7 +82,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx ...@@ -82,7 +82,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
m_staticText9->Wrap( -1 ); m_staticText9->Wrap( -1 );
fgSizer1->Add( m_staticText9, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticText9, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_spinRepeatHorizontal = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2000, 1 ); m_spinRepeatHorizontal = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2000, 0 );
fgSizer1->Add( m_spinRepeatHorizontal, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); fgSizer1->Add( m_spinRepeatHorizontal, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticRepeatXUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticRepeatXUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
...@@ -93,7 +93,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx ...@@ -93,7 +93,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
m_staticText12->Wrap( -1 ); m_staticText12->Wrap( -1 );
fgSizer1->Add( m_staticText12, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticText12, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_spinRepeatVertical = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2000, 1 ); m_spinRepeatVertical = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2000, 100 );
fgSizer1->Add( m_spinRepeatVertical, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); fgSizer1->Add( m_spinRepeatVertical, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticRepeatYUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticRepeatYUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_eeschema_options_base__ #ifndef __dialog_eeschema_options_base__
#define __dialog_eeschema_options_base__ #define __dialog_eeschema_options_base__
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/string.h> #include <wx/string.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
#include <wx/font.h> #include <wx/font.h>
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/choice.h> #include <wx/choice.h>
#include <wx/spinctrl.h> #include <wx/spinctrl.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/dialog.h> #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_EESCHEMA_OPTIONS_BASE /// Class DIALOG_EESCHEMA_OPTIONS_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DIALOG_EESCHEMA_OPTIONS_BASE : public wxDialog class DIALOG_EESCHEMA_OPTIONS_BASE : public wxDialog
{ {
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
private: private:
// Private event handlers // Private event handlers
void _wxFB_OnChooseUnits( wxCommandEvent& event ){ OnChooseUnits( event ); } void _wxFB_OnChooseUnits( wxCommandEvent& event ){ OnChooseUnits( event ); }
protected: protected:
wxStaticText* m_staticText2; wxStaticText* m_staticText2;
wxChoice* m_choiceUnits; wxChoice* m_choiceUnits;
wxStaticText* m_staticText3; wxStaticText* m_staticText3;
wxChoice* m_choiceGridSize; wxChoice* m_choiceGridSize;
wxStaticText* m_staticGridUnits; wxStaticText* m_staticGridUnits;
wxStaticText* m_staticText5; wxStaticText* m_staticText5;
wxSpinCtrl* m_spinLineWidth; wxSpinCtrl* m_spinLineWidth;
wxStaticText* m_staticLineWidthUnits; wxStaticText* m_staticLineWidthUnits;
wxStaticText* m_staticText7; wxStaticText* m_staticText7;
wxSpinCtrl* m_spinTextSize; wxSpinCtrl* m_spinTextSize;
wxStaticText* m_staticTextSizeUnits; wxStaticText* m_staticTextSizeUnits;
wxStaticText* m_staticText9; wxStaticText* m_staticText9;
wxSpinCtrl* m_spinRepeatHorizontal; wxSpinCtrl* m_spinRepeatHorizontal;
wxStaticText* m_staticRepeatXUnits; wxStaticText* m_staticRepeatXUnits;
wxStaticText* m_staticText12; wxStaticText* m_staticText12;
wxSpinCtrl* m_spinRepeatVertical; wxSpinCtrl* m_spinRepeatVertical;
wxStaticText* m_staticRepeatYUnits; wxStaticText* m_staticRepeatYUnits;
wxStaticText* m_staticText16; wxStaticText* m_staticText16;
wxSpinCtrl* m_spinRepeatLabel; wxSpinCtrl* m_spinRepeatLabel;
wxCheckBox* m_checkShowGrid; wxCheckBox* m_checkShowGrid;
wxCheckBox* m_checkShowHiddenPins; wxCheckBox* m_checkShowHiddenPins;
wxCheckBox* m_checkAutoPan; wxCheckBox* m_checkAutoPan;
wxCheckBox* m_checkAnyOrientation; wxCheckBox* m_checkAnyOrientation;
wxCheckBox* m_checkPageLimits; wxCheckBox* m_checkPageLimits;
wxStdDialogButtonSizer* m_sdbSizer1; wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel; wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnChooseUnits( wxCommandEvent& event ){ event.Skip(); } virtual void OnChooseUnits( wxCommandEvent& event ){ event.Skip(); }
public: public:
DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EESCHEMA_OPTIONS_BASE(); ~DIALOG_EESCHEMA_OPTIONS_BASE();
}; };
#endif //__dialog_eeschema_options_base__ #endif //__dialog_eeschema_options_base__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment