minor spin repeat bug fixed, set eol-style native on new files
This commit is contained in:
parent
da857f2774
commit
99b3739cbb
|
@ -1,42 +1,42 @@
|
|||
#include "fctsys.h"
|
||||
#include "class_base_screen.h"
|
||||
|
||||
#include "dialog_eeschema_options.h"
|
||||
|
||||
|
||||
DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
|
||||
DIALOG_EESCHEMA_OPTIONS_BASE( parent )
|
||||
{
|
||||
m_choiceUnits->SetFocus();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_EESCHEMA_OPTIONS::SetUnits( const wxArrayString& units, int select )
|
||||
{
|
||||
wxASSERT( units.GetCount() > 0
|
||||
&& ( select >= 0 && (size_t) select < units.GetCount() ) );
|
||||
|
||||
m_choiceUnits->Append( units );
|
||||
m_choiceUnits->SetSelection( select );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_EESCHEMA_OPTIONS::SetGridSizes( const GridArray& grid_sizes,
|
||||
int grid_id )
|
||||
{
|
||||
wxASSERT( grid_sizes.GetCount() > 0 );
|
||||
|
||||
int select = wxNOT_FOUND;
|
||||
|
||||
for( size_t i = 0; i < grid_sizes.GetCount(); i++ )
|
||||
{
|
||||
wxString tmp;
|
||||
tmp.Printf( wxT( "%0.1f" ), grid_sizes[i].m_Size.x );
|
||||
m_choiceGridSize->Append( tmp );
|
||||
|
||||
if( grid_sizes[i].m_Id == grid_id )
|
||||
select = (int) i;
|
||||
}
|
||||
|
||||
m_choiceGridSize->SetSelection( select );
|
||||
}
|
||||
#include "fctsys.h"
|
||||
#include "class_base_screen.h"
|
||||
|
||||
#include "dialog_eeschema_options.h"
|
||||
|
||||
|
||||
DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
|
||||
DIALOG_EESCHEMA_OPTIONS_BASE( parent )
|
||||
{
|
||||
m_choiceUnits->SetFocus();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_EESCHEMA_OPTIONS::SetUnits( const wxArrayString& units, int select )
|
||||
{
|
||||
wxASSERT( units.GetCount() > 0
|
||||
&& ( select >= 0 && (size_t) select < units.GetCount() ) );
|
||||
|
||||
m_choiceUnits->Append( units );
|
||||
m_choiceUnits->SetSelection( select );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_EESCHEMA_OPTIONS::SetGridSizes( const GridArray& grid_sizes,
|
||||
int grid_id )
|
||||
{
|
||||
wxASSERT( grid_sizes.GetCount() > 0 );
|
||||
|
||||
int select = wxNOT_FOUND;
|
||||
|
||||
for( size_t i = 0; i < grid_sizes.GetCount(); i++ )
|
||||
{
|
||||
wxString tmp;
|
||||
tmp.Printf( wxT( "%0.1f" ), grid_sizes[i].m_Size.x );
|
||||
m_choiceGridSize->Append( tmp );
|
||||
|
||||
if( grid_sizes[i].m_Id == grid_id )
|
||||
select = (int) i;
|
||||
}
|
||||
|
||||
m_choiceGridSize->SetSelection( select );
|
||||
}
|
||||
|
|
|
@ -1,96 +1,96 @@
|
|||
#ifndef __dialog_eeschema_options__
|
||||
#define __dialog_eeschema_options__
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Subclass of DIALOG_EESCHEMA_OPTIONS_BASE, which is generated by wxFormBuilder.
|
||||
*/
|
||||
|
||||
#include "dialog_eeschema_options_base.h"
|
||||
|
||||
class DIALOG_EESCHEMA_OPTIONS : public DIALOG_EESCHEMA_OPTIONS_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_EESCHEMA_OPTIONS( wxWindow* parent );
|
||||
|
||||
void SetUnits( const wxArrayString& units, int select = 0 );
|
||||
int GetUnitsSelection( void ) { return m_choiceUnits->GetSelection(); }
|
||||
|
||||
void SetGridSelection( int select )
|
||||
{
|
||||
m_choiceGridSize->SetSelection( select );
|
||||
}
|
||||
int GetGridSelection( void ) { return m_choiceGridSize->GetSelection(); }
|
||||
void SetGridSizes( const GridArray& grid_sizes, int grid_id );
|
||||
|
||||
void SetLineWidth( int line_width )
|
||||
{
|
||||
m_spinLineWidth->SetValue( line_width );
|
||||
}
|
||||
int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); }
|
||||
|
||||
void SetTextSize( int text_size )
|
||||
{
|
||||
m_spinTextSize->SetValue( text_size );
|
||||
}
|
||||
int GetTextSize( void ) { return m_spinTextSize->GetValue(); }
|
||||
|
||||
void SetRepeatHorizontal( int displacement )
|
||||
{
|
||||
m_spinRepeatHorizontal->SetValue( displacement );
|
||||
}
|
||||
int GetRepeatHorizontal( void )
|
||||
{
|
||||
return m_spinRepeatHorizontal->GetValue();
|
||||
}
|
||||
|
||||
void SetRepeatVertical( int displacement )
|
||||
{
|
||||
m_spinRepeatVertical->SetValue( displacement );
|
||||
}
|
||||
int GetRepeatVertical( void ) { return m_spinRepeatVertical->GetValue(); }
|
||||
|
||||
void SetRepeatLabel( int increment )
|
||||
{
|
||||
m_spinRepeatLabel->SetValue( increment );
|
||||
}
|
||||
int GetRepeatLabel( void ) { return m_spinRepeatLabel->GetValue(); }
|
||||
|
||||
void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); }
|
||||
bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); }
|
||||
|
||||
void SetShowHiddenPins( bool show )
|
||||
{
|
||||
m_checkShowHiddenPins->SetValue( show );
|
||||
}
|
||||
bool GetShowHiddenPins( void )
|
||||
{
|
||||
return m_checkShowHiddenPins->GetValue();
|
||||
}
|
||||
|
||||
void SetEnableAutoPan( bool enable )
|
||||
{
|
||||
m_checkAutoPan->SetValue( enable );
|
||||
}
|
||||
bool GetEnableAutoPan( void ) { return m_checkAutoPan->GetValue(); }
|
||||
|
||||
void SetEnableAnyBusOrientation( bool enable )
|
||||
{
|
||||
m_checkAnyOrientation->SetValue( enable );
|
||||
}
|
||||
bool GetEnableAnyBusOrientation( void )
|
||||
{
|
||||
return m_checkAnyOrientation->GetValue();
|
||||
}
|
||||
|
||||
void SetShowPageLimits( bool show )
|
||||
{
|
||||
m_checkPageLimits->SetValue( show );
|
||||
}
|
||||
bool GetShowPageLimits( void )
|
||||
{
|
||||
return m_checkPageLimits->GetValue();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // __dialog_eeschema_options__
|
||||
#ifndef __dialog_eeschema_options__
|
||||
#define __dialog_eeschema_options__
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Subclass of DIALOG_EESCHEMA_OPTIONS_BASE, which is generated by wxFormBuilder.
|
||||
*/
|
||||
|
||||
#include "dialog_eeschema_options_base.h"
|
||||
|
||||
class DIALOG_EESCHEMA_OPTIONS : public DIALOG_EESCHEMA_OPTIONS_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_EESCHEMA_OPTIONS( wxWindow* parent );
|
||||
|
||||
void SetUnits( const wxArrayString& units, int select = 0 );
|
||||
int GetUnitsSelection( void ) { return m_choiceUnits->GetSelection(); }
|
||||
|
||||
void SetGridSelection( int select )
|
||||
{
|
||||
m_choiceGridSize->SetSelection( select );
|
||||
}
|
||||
int GetGridSelection( void ) { return m_choiceGridSize->GetSelection(); }
|
||||
void SetGridSizes( const GridArray& grid_sizes, int grid_id );
|
||||
|
||||
void SetLineWidth( int line_width )
|
||||
{
|
||||
m_spinLineWidth->SetValue( line_width );
|
||||
}
|
||||
int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); }
|
||||
|
||||
void SetTextSize( int text_size )
|
||||
{
|
||||
m_spinTextSize->SetValue( text_size );
|
||||
}
|
||||
int GetTextSize( void ) { return m_spinTextSize->GetValue(); }
|
||||
|
||||
void SetRepeatHorizontal( int displacement )
|
||||
{
|
||||
m_spinRepeatHorizontal->SetValue( displacement );
|
||||
}
|
||||
int GetRepeatHorizontal( void )
|
||||
{
|
||||
return m_spinRepeatHorizontal->GetValue();
|
||||
}
|
||||
|
||||
void SetRepeatVertical( int displacement )
|
||||
{
|
||||
m_spinRepeatVertical->SetValue( displacement );
|
||||
}
|
||||
int GetRepeatVertical( void ) { return m_spinRepeatVertical->GetValue(); }
|
||||
|
||||
void SetRepeatLabel( int increment )
|
||||
{
|
||||
m_spinRepeatLabel->SetValue( increment );
|
||||
}
|
||||
int GetRepeatLabel( void ) { return m_spinRepeatLabel->GetValue(); }
|
||||
|
||||
void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); }
|
||||
bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); }
|
||||
|
||||
void SetShowHiddenPins( bool show )
|
||||
{
|
||||
m_checkShowHiddenPins->SetValue( show );
|
||||
}
|
||||
bool GetShowHiddenPins( void )
|
||||
{
|
||||
return m_checkShowHiddenPins->GetValue();
|
||||
}
|
||||
|
||||
void SetEnableAutoPan( bool enable )
|
||||
{
|
||||
m_checkAutoPan->SetValue( enable );
|
||||
}
|
||||
bool GetEnableAutoPan( void ) { return m_checkAutoPan->GetValue(); }
|
||||
|
||||
void SetEnableAnyBusOrientation( bool enable )
|
||||
{
|
||||
m_checkAnyOrientation->SetValue( enable );
|
||||
}
|
||||
bool GetEnableAnyBusOrientation( void )
|
||||
{
|
||||
return m_checkAnyOrientation->GetValue();
|
||||
}
|
||||
|
||||
void SetShowPageLimits( bool show )
|
||||
{
|
||||
m_checkPageLimits->SetValue( show );
|
||||
}
|
||||
bool GetShowPageLimits( void )
|
||||
{
|
||||
return m_checkPageLimits->GetValue();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // __dialog_eeschema_options__
|
||||
|
|
|
@ -82,7 +82,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
m_staticText9->Wrap( -1 );
|
||||
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 );
|
||||
|
||||
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
|
|||
m_staticText12->Wrap( -1 );
|
||||
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 );
|
||||
|
||||
m_staticRepeatYUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
|
|
@ -1,82 +1,82 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __dialog_eeschema_options_base__
|
||||
#define __dialog_eeschema_options_base__
|
||||
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_EESCHEMA_OPTIONS_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_EESCHEMA_OPTIONS_BASE : public wxDialog
|
||||
{
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
|
||||
// Private event handlers
|
||||
void _wxFB_OnChooseUnits( wxCommandEvent& event ){ OnChooseUnits( event ); }
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticText2;
|
||||
wxChoice* m_choiceUnits;
|
||||
|
||||
wxStaticText* m_staticText3;
|
||||
wxChoice* m_choiceGridSize;
|
||||
wxStaticText* m_staticGridUnits;
|
||||
wxStaticText* m_staticText5;
|
||||
wxSpinCtrl* m_spinLineWidth;
|
||||
wxStaticText* m_staticLineWidthUnits;
|
||||
wxStaticText* m_staticText7;
|
||||
wxSpinCtrl* m_spinTextSize;
|
||||
wxStaticText* m_staticTextSizeUnits;
|
||||
wxStaticText* m_staticText9;
|
||||
wxSpinCtrl* m_spinRepeatHorizontal;
|
||||
wxStaticText* m_staticRepeatXUnits;
|
||||
wxStaticText* m_staticText12;
|
||||
wxSpinCtrl* m_spinRepeatVertical;
|
||||
wxStaticText* m_staticRepeatYUnits;
|
||||
wxStaticText* m_staticText16;
|
||||
wxSpinCtrl* m_spinRepeatLabel;
|
||||
|
||||
wxCheckBox* m_checkShowGrid;
|
||||
wxCheckBox* m_checkShowHiddenPins;
|
||||
wxCheckBox* m_checkAutoPan;
|
||||
wxCheckBox* m_checkAnyOrientation;
|
||||
wxCheckBox* m_checkPageLimits;
|
||||
|
||||
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||
wxButton* m_sdbSizer1OK;
|
||||
wxButton* m_sdbSizer1Cancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnChooseUnits( wxCommandEvent& event ){ event.Skip(); }
|
||||
|
||||
|
||||
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();
|
||||
|
||||
};
|
||||
|
||||
#endif //__dialog_eeschema_options_base__
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __dialog_eeschema_options_base__
|
||||
#define __dialog_eeschema_options_base__
|
||||
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_EESCHEMA_OPTIONS_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_EESCHEMA_OPTIONS_BASE : public wxDialog
|
||||
{
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
|
||||
// Private event handlers
|
||||
void _wxFB_OnChooseUnits( wxCommandEvent& event ){ OnChooseUnits( event ); }
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticText2;
|
||||
wxChoice* m_choiceUnits;
|
||||
|
||||
wxStaticText* m_staticText3;
|
||||
wxChoice* m_choiceGridSize;
|
||||
wxStaticText* m_staticGridUnits;
|
||||
wxStaticText* m_staticText5;
|
||||
wxSpinCtrl* m_spinLineWidth;
|
||||
wxStaticText* m_staticLineWidthUnits;
|
||||
wxStaticText* m_staticText7;
|
||||
wxSpinCtrl* m_spinTextSize;
|
||||
wxStaticText* m_staticTextSizeUnits;
|
||||
wxStaticText* m_staticText9;
|
||||
wxSpinCtrl* m_spinRepeatHorizontal;
|
||||
wxStaticText* m_staticRepeatXUnits;
|
||||
wxStaticText* m_staticText12;
|
||||
wxSpinCtrl* m_spinRepeatVertical;
|
||||
wxStaticText* m_staticRepeatYUnits;
|
||||
wxStaticText* m_staticText16;
|
||||
wxSpinCtrl* m_spinRepeatLabel;
|
||||
|
||||
wxCheckBox* m_checkShowGrid;
|
||||
wxCheckBox* m_checkShowHiddenPins;
|
||||
wxCheckBox* m_checkAutoPan;
|
||||
wxCheckBox* m_checkAnyOrientation;
|
||||
wxCheckBox* m_checkPageLimits;
|
||||
|
||||
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||
wxButton* m_sdbSizer1OK;
|
||||
wxButton* m_sdbSizer1Cancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnChooseUnits( wxCommandEvent& event ){ event.Skip(); }
|
||||
|
||||
|
||||
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();
|
||||
|
||||
};
|
||||
|
||||
#endif //__dialog_eeschema_options_base__
|
||||
|
|
Loading…
Reference in New Issue