2011-10-15 13:25:57 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@verizon.net>
|
|
|
|
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
2010-01-27 16:35:15 +00:00
|
|
|
|
|
|
|
/**
|
2011-10-15 13:25:57 +00:00
|
|
|
* @file dialog_eeschema_options.h
|
|
|
|
*
|
2010-01-27 16:35:15 +00:00
|
|
|
* Subclass of DIALOG_EESCHEMA_OPTIONS_BASE, which is generated by wxFormBuilder.
|
|
|
|
*/
|
|
|
|
|
2011-10-15 13:25:57 +00:00
|
|
|
#ifndef __dialog_eeschema_options__
|
|
|
|
#define __dialog_eeschema_options__
|
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <dialog_eeschema_options_base.h>
|
2010-01-27 16:35:15 +00:00
|
|
|
|
|
|
|
class DIALOG_EESCHEMA_OPTIONS : public DIALOG_EESCHEMA_OPTIONS_BASE
|
|
|
|
{
|
|
|
|
public:
|
2010-06-17 16:30:10 +00:00
|
|
|
DIALOG_EESCHEMA_OPTIONS( wxWindow* parent );
|
2010-01-27 16:35:15 +00:00
|
|
|
|
|
|
|
void SetUnits( const wxArrayString& units, int select = 0 );
|
|
|
|
int GetUnitsSelection( void ) { return m_choiceUnits->GetSelection(); }
|
|
|
|
|
2012-05-24 06:51:52 +00:00
|
|
|
void SetGridSelection( int select ) { m_choiceGridSize->SetSelection( select ); }
|
2010-01-27 16:35:15 +00:00
|
|
|
int GetGridSelection( void ) { return m_choiceGridSize->GetSelection(); }
|
2010-12-08 20:12:46 +00:00
|
|
|
void SetGridSizes( const GRIDS& grid_sizes, int grid_id );
|
2010-01-27 16:35:15 +00:00
|
|
|
|
2012-05-24 06:51:52 +00:00
|
|
|
void SetBusWidth( int aWidth )
|
2010-01-27 16:35:15 +00:00
|
|
|
{
|
2012-05-24 06:51:52 +00:00
|
|
|
m_spinBusWidth->SetValue( aWidth );
|
2010-01-27 16:35:15 +00:00
|
|
|
}
|
|
|
|
|
2012-05-24 06:51:52 +00:00
|
|
|
int GetBusWidth( void )
|
2010-01-27 16:35:15 +00:00
|
|
|
{
|
2012-05-24 06:51:52 +00:00
|
|
|
return m_spinBusWidth->GetValue();
|
2010-01-27 16:35:15 +00:00
|
|
|
}
|
2012-05-24 06:51:52 +00:00
|
|
|
|
|
|
|
void SetLineWidth( int aWidth ) { m_spinLineWidth->SetValue( aWidth ); }
|
|
|
|
int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); }
|
|
|
|
|
|
|
|
void SetTextSize( int text_size ) { m_spinTextSize->SetValue( text_size ); }
|
2010-01-27 16:35:15 +00:00
|
|
|
int GetTextSize( void ) { return m_spinTextSize->GetValue(); }
|
|
|
|
|
|
|
|
void SetRepeatHorizontal( int displacement )
|
|
|
|
{
|
|
|
|
m_spinRepeatHorizontal->SetValue( displacement );
|
|
|
|
}
|
2012-05-24 06:51:52 +00:00
|
|
|
int GetRepeatHorizontal( void ) { return m_spinRepeatHorizontal->GetValue(); }
|
|
|
|
void SetRepeatVertical( int displacement ) { m_spinRepeatVertical->SetValue( displacement ); }
|
2010-01-27 16:35:15 +00:00
|
|
|
|
|
|
|
int GetRepeatVertical( void ) { return m_spinRepeatVertical->GetValue(); }
|
2012-05-24 06:51:52 +00:00
|
|
|
void SetRepeatLabel( int increment ) { m_spinRepeatLabel->SetValue( increment ); }
|
2010-01-27 16:35:15 +00:00
|
|
|
int GetRepeatLabel( void ) { return m_spinRepeatLabel->GetValue(); }
|
|
|
|
|
2011-10-15 13:25:57 +00:00
|
|
|
void SetAutoSaveInterval( int aInterval ) { m_spinAutoSaveInterval->SetValue( aInterval ); }
|
|
|
|
int GetAutoSaveInterval() const { return m_spinAutoSaveInterval->GetValue(); }
|
|
|
|
|
2010-01-27 16:35:15 +00:00
|
|
|
void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); }
|
|
|
|
bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); }
|
|
|
|
|
2012-05-24 06:51:52 +00:00
|
|
|
void SetShowHiddenPins( bool show ) { m_checkShowHiddenPins->SetValue( show ); }
|
|
|
|
bool GetShowHiddenPins( void ) { return m_checkShowHiddenPins->GetValue(); }
|
2010-01-27 16:35:15 +00:00
|
|
|
|
2013-02-02 19:10:48 +00:00
|
|
|
void SetEnableZoomNoCenter( bool enable )
|
|
|
|
{
|
|
|
|
m_checkEnableZoomNoCenter->SetValue( enable );
|
|
|
|
}
|
|
|
|
|
|
|
|
bool GetEnableZoomNoCenter( void )
|
|
|
|
{
|
|
|
|
return m_checkEnableZoomNoCenter->GetValue();
|
|
|
|
}
|
2012-04-11 18:54:20 +00:00
|
|
|
void SetEnableMiddleButtonPan( bool enable )
|
|
|
|
{
|
|
|
|
m_checkEnableMiddleButtonPan->SetValue( enable );
|
|
|
|
m_checkMiddleButtonPanLimited->Enable( enable );
|
|
|
|
}
|
|
|
|
|
|
|
|
bool GetEnableMiddleButtonPan( void )
|
|
|
|
{
|
|
|
|
return m_checkEnableMiddleButtonPan->GetValue();
|
|
|
|
}
|
|
|
|
void SetMiddleButtonPanLimited( bool enable )
|
|
|
|
{
|
|
|
|
m_checkMiddleButtonPanLimited->SetValue( enable );
|
|
|
|
}
|
|
|
|
bool GetMiddleButtonPanLimited( void )
|
|
|
|
{
|
2012-04-11 21:01:20 +00:00
|
|
|
return m_checkMiddleButtonPanLimited->GetValue();
|
2012-04-11 18:54:20 +00:00
|
|
|
}
|
|
|
|
|
2012-05-24 06:51:52 +00:00
|
|
|
void SetEnableAutoPan( bool enable ) { m_checkAutoPan->SetValue( enable ); }
|
2010-01-27 16:35:15 +00:00
|
|
|
bool GetEnableAutoPan( void ) { return m_checkAutoPan->GetValue(); }
|
|
|
|
|
2012-05-24 06:51:52 +00:00
|
|
|
void SetEnableHVBusOrientation( bool enable ) { m_checkHVOrientation->SetValue( enable ); }
|
|
|
|
bool GetEnableHVBusOrientation( void ) { return m_checkHVOrientation->GetValue(); }
|
2010-06-17 16:30:10 +00:00
|
|
|
|
2012-05-24 06:51:52 +00:00
|
|
|
void SetShowPageLimits( bool show ) { m_checkPageLimits->SetValue( show ); }
|
|
|
|
bool GetShowPageLimits( void ) { return m_checkPageLimits->GetValue(); }
|
2010-06-17 16:30:10 +00:00
|
|
|
|
|
|
|
/** Set the field \a aNdx textctrl to \a aName */
|
2010-11-19 16:28:46 +00:00
|
|
|
void SetFieldName( int aNdx, wxString aName );
|
2010-06-17 16:30:10 +00:00
|
|
|
|
|
|
|
/** Get the field \a aNdx name from the fields textctrl */
|
|
|
|
wxString GetFieldName( int aNdx );
|
2012-04-11 18:54:20 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void OnMiddleBtnPanEnbl( wxCommandEvent& event )
|
|
|
|
{
|
|
|
|
m_checkMiddleButtonPanLimited->Enable( GetEnableMiddleButtonPan() );
|
|
|
|
}
|
2010-01-27 16:35:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __dialog_eeschema_options__
|