EESchema dialog box updates.

* Replace schematic editor options dialog with wxFormBuilder version.
* Fix ugly wxGTK sizer hack in pin properties dialog.
* Set dialog minimum size after initial fit to prevent dialog controls
  from being obscured when resizing.
* Move bitmaps in annotate dialog for cleaner control alignment.
This commit is contained in:
stambaughw 2009-12-01 15:14:18 +00:00
parent 9a878b0b3c
commit 9b3ca06859
19 changed files with 3202 additions and 3471 deletions

View File

@ -52,6 +52,8 @@ set(EESCHEMA_SRCS
dialog_edit_libentry_fields_in_lib_base.cpp
dialog_eeschema_config.cpp
dialog_eeschema_config_fbp.cpp
dialog_eeschema_options_base.cpp
dialog_eeschema_options.cpp
dialog_erc.cpp
dialog_erc_base.cpp
# dialog_find.cpp
@ -61,7 +63,6 @@ set(EESCHEMA_SRCS
dialog_lib_edit_pin_base.cpp
dialog_lib_new_component.cpp
dialog_lib_new_component_base.cpp
dialog_options.cpp
dialog_print_using_printer_base.cpp
dialog_print_using_printer.cpp
dialog_SVG_print.cpp

View File

@ -1,129 +1,139 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_annotate_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bmainSizer;
bmainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bupperSizer;
bupperSizer = new wxBoxSizer( wxVERTICAL );
m_staticTextScope = new wxStaticText( this, wxID_ANY, _("Scope"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextScope->Wrap( -1 );
m_staticTextScope->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bupperSizer->Add( m_staticTextScope, 0, wxALL, 5 );
wxBoxSizer* bscopeOptSizer;
bscopeOptSizer = new wxBoxSizer( wxVERTICAL );
m_rbEntireSchematic = new wxRadioButton( this, ID_ENTIRE_SCHEMATIC, _("Use the &entire schematic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
bscopeOptSizer->Add( m_rbEntireSchematic, 0, wxALL, 5 );
m_rbCurrPage = new wxRadioButton( this, ID_CURRENT_PAGE, _("Use the current &page only"), wxDefaultPosition, wxDefaultSize, 0 );
bscopeOptSizer->Add( m_rbCurrPage, 0, wxALL, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bscopeOptSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
m_rbKeepAnnotation = new wxRadioButton( this, ID_KEEP_ANNOTATION, _("&Keep existing annotation"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
bscopeOptSizer->Add( m_rbKeepAnnotation, 0, wxALL, 5 );
m_rbResetAnnotation = new wxRadioButton( this, ID_RESET_ANNOTATION, _("&Reset existing annotation"), wxDefaultPosition, wxDefaultSize, 0 );
bscopeOptSizer->Add( m_rbResetAnnotation, 0, wxALL, 5 );
bupperSizer->Add( bscopeOptSizer, 0, wxEXPAND|wxLEFT|wxALIGN_RIGHT, 25 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bupperSizer->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
m_staticTextOrder = new wxStaticText( this, wxID_ANY, _("Annotation Order"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextOrder->Wrap( -1 );
m_staticTextOrder->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bupperSizer->Add( m_staticTextOrder, 0, wxALL, 5 );
wxBoxSizer* b_orderOptSizer;
b_orderOptSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerXpos;
bSizerXpos = new wxBoxSizer( wxHORIZONTAL );
annotate_down_right_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerXpos->Add( annotate_down_right_bitmap, 0, wxRIGHT|wxLEFT, 5 );
m_rbSortBy_X_Position = new wxRadioButton( this, ID_SORT_BY_X_POSITION, _("Sort Components by &X Position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
bSizerXpos->Add( m_rbSortBy_X_Position, 0, wxALL, 5 );
b_orderOptSizer->Add( bSizerXpos, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerYpos;
bSizerYpos = new wxBoxSizer( wxHORIZONTAL );
annotate_right_down_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerYpos->Add( annotate_right_down_bitmap, 0, wxRIGHT|wxLEFT, 5 );
m_rbSortBy_Y_Position = new wxRadioButton( this, ID_SORT_BY_Y_POSITION, _("Sort Components by &Y Position"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerYpos->Add( m_rbSortBy_Y_Position, 0, wxALL, 5 );
b_orderOptSizer->Add( bSizerYpos, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerValuepos;
bSizerValuepos = new wxBoxSizer( wxHORIZONTAL );
annotate_by_value_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerValuepos->Add( annotate_by_value_bitmap, 0, wxRIGHT|wxLEFT, 5 );
rbSortByValue = new wxRadioButton( this, ID_SORT_BY_VALUE, _("Sort Components by &Value"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerValuepos->Add( rbSortByValue, 0, wxALL, 5 );
b_orderOptSizer->Add( bSizerValuepos, 0, wxEXPAND, 5 );
bupperSizer->Add( b_orderOptSizer, 1, wxEXPAND|wxLEFT, 25 );
bmainSizer->Add( bupperSizer, 1, wxEXPAND|wxLEFT, 5 );
m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bmainSizer->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 );
wxBoxSizer* bButtonsSizer;
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
m_btnClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_btnClose, 0, wxALL|wxEXPAND, 5 );
m_btnClear = new wxButton( this, ID_CLEAR_ANNOTATION_CMP, _("Clear Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_btnClear, 0, wxALL|wxEXPAND, 5 );
m_btnApply = new wxButton( this, wxID_APPLY, _("Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_btnApply, 0, wxALL|wxEXPAND, 5 );
bmainSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
this->SetSizer( bmainSizer );
this->Layout();
// Connect Events
m_btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCancelClick ), NULL, this );
m_btnClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this );
m_btnApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this );
}
DIALOG_ANNOTATE_BASE::~DIALOG_ANNOTATE_BASE()
{
// Disconnect Events
m_btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCancelClick ), NULL, this );
m_btnClear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this );
m_btnApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this );
}
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 21 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_annotate_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bmainSizer;
bmainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bupperSizer;
bupperSizer = new wxBoxSizer( wxVERTICAL );
m_staticTextScope = new wxStaticText( this, wxID_ANY, _("Scope"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextScope->Wrap( -1 );
m_staticTextScope->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bupperSizer->Add( m_staticTextScope, 0, wxALL, 6 );
wxBoxSizer* bscopeOptSizer;
bscopeOptSizer = new wxBoxSizer( wxVERTICAL );
m_rbEntireSchematic = new wxRadioButton( this, ID_ENTIRE_SCHEMATIC, _("Use the &entire schematic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
bscopeOptSizer->Add( m_rbEntireSchematic, 0, wxALL, 3 );
m_rbCurrPage = new wxRadioButton( this, ID_CURRENT_PAGE, _("Use the current &page only"), wxDefaultPosition, wxDefaultSize, 0 );
bscopeOptSizer->Add( m_rbCurrPage, 0, wxALL, 3 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bscopeOptSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
m_rbKeepAnnotation = new wxRadioButton( this, ID_KEEP_ANNOTATION, _("&Keep existing annotation"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
bscopeOptSizer->Add( m_rbKeepAnnotation, 0, wxALL, 3 );
m_rbResetAnnotation = new wxRadioButton( this, ID_RESET_ANNOTATION, _("&Reset existing annotation"), wxDefaultPosition, wxDefaultSize, 0 );
bscopeOptSizer->Add( m_rbResetAnnotation, 0, wxALL, 3 );
bupperSizer->Add( bscopeOptSizer, 0, wxEXPAND|wxLEFT|wxALIGN_RIGHT, 25 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bupperSizer->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
m_staticTextOrder = new wxStaticText( this, wxID_ANY, _("Annotation Order"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextOrder->Wrap( -1 );
m_staticTextOrder->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bupperSizer->Add( m_staticTextOrder, 0, wxALL, 6 );
wxBoxSizer* b_orderOptSizer;
b_orderOptSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerXpos;
bSizerXpos = new wxBoxSizer( wxHORIZONTAL );
m_rbSortBy_X_Position = new wxRadioButton( this, ID_SORT_BY_X_POSITION, _("Sort Components by &X Position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
bSizerXpos->Add( m_rbSortBy_X_Position, 0, wxALL, 3 );
bSizerXpos->Add( 0, 0, 1, wxEXPAND, 5 );
annotate_down_right_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerXpos->Add( annotate_down_right_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 12 );
b_orderOptSizer->Add( bSizerXpos, 0, wxEXPAND|wxRIGHT, 5 );
wxBoxSizer* bSizerYpos;
bSizerYpos = new wxBoxSizer( wxHORIZONTAL );
m_rbSortBy_Y_Position = new wxRadioButton( this, ID_SORT_BY_Y_POSITION, _("Sort Components by &Y Position"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerYpos->Add( m_rbSortBy_Y_Position, 0, wxALL, 3 );
bSizerYpos->Add( 0, 0, 1, wxEXPAND, 5 );
annotate_right_down_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerYpos->Add( annotate_right_down_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 12 );
b_orderOptSizer->Add( bSizerYpos, 0, wxEXPAND|wxRIGHT, 5 );
wxBoxSizer* bSizerValuepos;
bSizerValuepos = new wxBoxSizer( wxHORIZONTAL );
rbSortByValue = new wxRadioButton( this, ID_SORT_BY_VALUE, _("Sort Components by &Value"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerValuepos->Add( rbSortByValue, 0, wxALL, 3 );
bSizerValuepos->Add( 0, 0, 1, wxEXPAND, 5 );
annotate_by_value_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerValuepos->Add( annotate_by_value_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 12 );
b_orderOptSizer->Add( bSizerValuepos, 0, wxEXPAND|wxRIGHT, 5 );
bupperSizer->Add( b_orderOptSizer, 1, wxEXPAND|wxLEFT, 25 );
m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bupperSizer->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 );
wxBoxSizer* bButtonsSizer;
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
m_btnClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_btnClose, 0, wxALL|wxEXPAND, 5 );
m_btnClear = new wxButton( this, ID_CLEAR_ANNOTATION_CMP, _("Clear Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_btnClear, 0, wxALL|wxEXPAND, 5 );
m_btnApply = new wxButton( this, wxID_APPLY, _("Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_btnApply, 0, wxALL|wxEXPAND, 5 );
bupperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL, 6 );
bmainSizer->Add( bupperSizer, 1, wxALL|wxEXPAND, 6 );
this->SetSizer( bmainSizer );
this->Layout();
bmainSizer->Fit( this );
// Connect Events
m_btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCancelClick ), NULL, this );
m_btnClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this );
m_btnApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this );
}
DIALOG_ANNOTATE_BASE::~DIALOG_ANNOTATE_BASE()
{
// Disconnect Events
m_btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCancelClick ), NULL, this );
m_btnClear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this );
m_btnApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this );
}

File diff suppressed because it is too large Load Diff

View File

@ -1,79 +1,82 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_annotate_base__
#define __dialog_annotate_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/radiobut.h>
#include <wx/statline.h>
#include <wx/sizer.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/statbmp.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
#define ID_ENTIRE_SCHEMATIC 1000
#define ID_CURRENT_PAGE 1001
#define ID_KEEP_ANNOTATION 1002
#define ID_RESET_ANNOTATION 1003
#define ID_SORT_BY_X_POSITION 1004
#define ID_SORT_BY_Y_POSITION 1005
#define ID_SORT_BY_VALUE 1006
#define ID_CLEAR_ANNOTATION_CMP 1007
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_ANNOTATE_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_ANNOTATE_BASE : public wxDialog
{
private:
protected:
wxStaticText* m_staticTextScope;
wxRadioButton* m_rbEntireSchematic;
wxRadioButton* m_rbCurrPage;
wxStaticLine* m_staticline1;
wxRadioButton* m_rbKeepAnnotation;
wxRadioButton* m_rbResetAnnotation;
wxStaticLine* m_staticline2;
wxStaticText* m_staticTextOrder;
wxStaticBitmap* annotate_down_right_bitmap;
wxRadioButton* m_rbSortBy_X_Position;
wxStaticBitmap* annotate_right_down_bitmap;
wxRadioButton* m_rbSortBy_Y_Position;
wxStaticBitmap* annotate_by_value_bitmap;
wxRadioButton* rbSortByValue;
wxStaticLine* m_staticline5;
wxButton* m_btnClose;
wxButton* m_btnClear;
wxButton* m_btnApply;
// Virtual event handlers, overide them in your derived class
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnClearAnnotationCmpClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnApplyClick( wxCommandEvent& event ){ event.Skip(); }
public:
DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 331,338 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_ANNOTATE_BASE();
};
#endif //__dialog_annotate_base__
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 21 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_annotate_base__
#define __dialog_annotate_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/radiobut.h>
#include <wx/statline.h>
#include <wx/sizer.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/statbmp.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
#define ID_ENTIRE_SCHEMATIC 1000
#define ID_CURRENT_PAGE 1001
#define ID_KEEP_ANNOTATION 1002
#define ID_RESET_ANNOTATION 1003
#define ID_SORT_BY_X_POSITION 1004
#define ID_SORT_BY_Y_POSITION 1005
#define ID_SORT_BY_VALUE 1006
#define ID_CLEAR_ANNOTATION_CMP 1007
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_ANNOTATE_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_ANNOTATE_BASE : public wxDialog
{
private:
protected:
wxStaticText* m_staticTextScope;
wxRadioButton* m_rbEntireSchematic;
wxRadioButton* m_rbCurrPage;
wxStaticLine* m_staticline1;
wxRadioButton* m_rbKeepAnnotation;
wxRadioButton* m_rbResetAnnotation;
wxStaticLine* m_staticline2;
wxStaticText* m_staticTextOrder;
wxRadioButton* m_rbSortBy_X_Position;
wxStaticBitmap* annotate_down_right_bitmap;
wxRadioButton* m_rbSortBy_Y_Position;
wxStaticBitmap* annotate_right_down_bitmap;
wxRadioButton* rbSortByValue;
wxStaticBitmap* annotate_by_value_bitmap;
wxStaticLine* m_staticline5;
wxButton* m_btnClose;
wxButton* m_btnClear;
wxButton* m_btnApply;
// Virtual event handlers, overide them in your derived class
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnClearAnnotationCmpClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnApplyClick( wxCommandEvent& event ){ event.Skip(); }
public:
DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Annotate Schematic"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_ANNOTATE_BASE();
};
#endif //__dialog_annotate_base__

View File

@ -0,0 +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 )
{
}
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 );
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +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__

View File

@ -0,0 +1,162 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_eeschema_options_base.h"
///////////////////////////////////////////////////////////////////////////
BEGIN_EVENT_TABLE( DIALOG_EESCHEMA_OPTIONS_BASE, wxDialog )
EVT_CHOICE( wxID_ANY, DIALOG_EESCHEMA_OPTIONS_BASE::_wxFB_OnChooseUnits )
END_EVENT_TABLE()
DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* mainSizer;
mainSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizer3;
bSizer3 = new wxBoxSizer( wxVERTICAL );
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 7, 3, 0, 0 );
fgSizer1->AddGrowableCol( 0 );
fgSizer1->AddGrowableCol( 1 );
fgSizer1->AddGrowableCol( 2 );
fgSizer1->SetFlexibleDirection( wxHORIZONTAL );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Mesurement &units:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 );
fgSizer1->Add( m_staticText2, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
wxArrayString m_choiceUnitsChoices;
m_choiceUnits = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitsChoices, 0 );
m_choiceUnits->SetSelection( 0 );
fgSizer1->Add( m_choiceUnits, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
fgSizer1->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 3 );
m_staticText3 = new wxStaticText( this, wxID_ANY, _("&Grid size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText3->Wrap( -1 );
fgSizer1->Add( m_staticText3, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
wxArrayString m_choiceGridSizeChoices;
m_choiceGridSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceGridSizeChoices, 0 );
m_choiceGridSize->SetSelection( 0 );
fgSizer1->Add( m_choiceGridSize, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticGridUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticGridUnits->Wrap( -1 );
fgSizer1->Add( m_staticGridUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText5 = new wxStaticText( this, wxID_ANY, _("Default &line width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText5->Wrap( -1 );
fgSizer1->Add( m_staticText5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_spinLineWidth = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 );
fgSizer1->Add( m_spinLineWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticLineWidthUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticLineWidthUnits->Wrap( -1 );
fgSizer1->Add( m_staticLineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText7 = new wxStaticText( this, wxID_ANY, _("Default text &size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText7->Wrap( -1 );
fgSizer1->Add( m_staticText7, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_spinTextSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 1000, 0 );
fgSizer1->Add( m_spinTextSize, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticTextSizeUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSizeUnits->Wrap( -1 );
fgSizer1->Add( m_staticTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText9 = new wxStaticText( this, wxID_ANY, _("Repeat draw item &horizontal displacement:"), wxDefaultPosition, wxDefaultSize, 0 );
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 );
fgSizer1->Add( m_spinRepeatHorizontal, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticRepeatXUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticRepeatXUnits->Wrap( -1 );
fgSizer1->Add( m_staticRepeatXUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText12 = new wxStaticText( this, wxID_ANY, _("Repeat draw item &vertical displacement:"), wxDefaultPosition, wxDefaultSize, 0 );
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 );
fgSizer1->Add( m_spinRepeatVertical, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticRepeatYUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticRepeatYUnits->Wrap( -1 );
fgSizer1->Add( m_staticRepeatYUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText16 = new wxStaticText( this, wxID_ANY, _("&Repeat label increment:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText16->Wrap( -1 );
fgSizer1->Add( m_staticText16, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_spinRepeatLabel = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, -100, 100, 1 );
fgSizer1->Add( m_spinRepeatLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
fgSizer1->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 3 );
bSizer3->Add( fgSizer1, 0, wxALIGN_CENTER|wxEXPAND, 0 );
wxBoxSizer* bSizer2;
bSizer2 = new wxBoxSizer( wxVERTICAL );
m_checkShowGrid = new wxCheckBox( this, wxID_ANY, _("Show g&rid"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer2->Add( m_checkShowGrid, 0, wxALL|wxEXPAND, 3 );
m_checkShowHiddenPins = new wxCheckBox( this, wxID_ANY, _("Show hi&dden pins"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer2->Add( m_checkShowHiddenPins, 0, wxALL|wxEXPAND, 3 );
m_checkAutoPan = new wxCheckBox( this, wxID_ANY, _("Enable automatic &panning"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer2->Add( m_checkAutoPan, 0, wxALL|wxEXPAND, 3 );
m_checkAnyOrientation = new wxCheckBox( this, wxID_ANY, _("Allow buses and wires to be placed in any &orientation"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer2->Add( m_checkAnyOrientation, 0, wxALL|wxEXPAND, 3 );
m_checkPageLimits = new wxCheckBox( this, wxID_ANY, _("Show p&age limits"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer2->Add( m_checkPageLimits, 0, wxALL|wxEXPAND, 3 );
bSizer3->Add( bSizer2, 0, wxEXPAND, 0 );
bSizer3->Add( 0, 0, 1, wxALL|wxEXPAND, 10 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
bSizer3->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 0 );
mainSizer->Add( bSizer3, 1, wxALL|wxEXPAND, 12 );
this->SetSizer( mainSizer );
this->Layout();
mainSizer->Fit( this );
this->Centre( wxBOTH );
}
DIALOG_EESCHEMA_OPTIONS_BASE::~DIALOG_EESCHEMA_OPTIONS_BASE()
{
}

View File

@ -0,0 +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__

View File

@ -5,14 +5,6 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent ) :
{
/* Required to make escape key work correctly in wxGTK. */
m_textName->SetFocus();
/* This ugly hack fixes a bug in wxWidgets 2.8.7 and likely earlier
* versions for the flex grid sizer in wxGTK that prevents the last
* column from being sized correctly.
*/
#ifdef __WXGTK__
m_staticNameTextSizeUnits->SetMinSize( wxSize( 75, -1 ) );
#endif
}

View File

@ -1,476 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_options.cpp
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Created: 31/01/2006 13:27:33
// RCS-ID:
// Copyright: GNU Licence
// Licence: GNU
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 31/01/2006 13:27:33
#if defined (__GNUG__) && !defined (NO_GCC_PRAGMA)
#pragma implementation "dialog_options.h"
#endif
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "eeschema_id.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "program.h"
#include "general.h"
#include "protos.h"
////@begin includes
////@end includes
#include "dialog_options.h"
////@begin XPM images
////@end XPM images
/**************************************************************************/
void DisplayOptionFrame( WinEDA_SchematicFrame* parent, const wxPoint& framepos )
/**************************************************************************/
{
WinEDA_SetOptionsFrame* frame =
new WinEDA_SetOptionsFrame( parent );
frame->ShowModal(); frame->Destroy();
}
/*!
* WinEDA_SetOptionsFrame type definition
*/
IMPLEMENT_DYNAMIC_CLASS( WinEDA_SetOptionsFrame, wxDialog )
/*!
* WinEDA_SetOptionsFrame event table definition
*/
BEGIN_EVENT_TABLE( WinEDA_SetOptionsFrame, wxDialog )
////@begin WinEDA_SetOptionsFrame event table entries
EVT_BUTTON( wxID_OK, WinEDA_SetOptionsFrame::OnOkClick )
EVT_BUTTON( wxID_CANCEL, WinEDA_SetOptionsFrame::OnCancelClick )
////@end WinEDA_SetOptionsFrame event table entries
END_EVENT_TABLE()
/*!
* WinEDA_SetOptionsFrame constructors
*/
WinEDA_SetOptionsFrame::WinEDA_SetOptionsFrame()
{
}
WinEDA_SetOptionsFrame::WinEDA_SetOptionsFrame( WinEDA_SchematicFrame* parent,
wxWindowID id,
const wxString& caption,
const wxPoint& pos,
const wxSize& size,
long style )
{
m_Parent = parent;
Create( parent, id, caption, pos, size, style );
BASE_SCREEN* screen = m_Parent->GetBaseScreen();
/* Init options */
if( screen )
{
switch( (int)screen->GetGridSize().x )
{
case 50:
m_SelGridSize->SetSelection( 0 );
break;
case 25:
m_SelGridSize->SetSelection( 1 );
break;
case 10:
m_SelGridSize->SetSelection( 2 );
break;
case 5:
m_SelGridSize->SetSelection( 3 );
break;
case 2:
m_SelGridSize->SetSelection( 4 );
break;
case 1:
m_SelGridSize->SetSelection( 5 );
break;
default:
DisplayError( this, wxT( "WinEDA_SetOptionsFrame: Grid value not handle" ) );
break;
}
}
/* Adjust the current selections and options: */
m_ShowGridOpt->SetValue( m_Parent->m_Draw_Grid );
m_AutoPANOpt->SetValue( m_Parent->DrawPanel->m_AutoPAN_Enable );
m_SelShowPins->SetSelection( m_Parent->m_ShowAllPins );
m_Selunits->SetSelection( g_UnitMetric ? 0 : 1 );
m_SelDirWires->SetSelection( g_HVLines ? 0 : 1 );
m_Show_Page_Limits->SetSelection( g_ShowPageLimits ? 0 : 1 );
wxString msg;
msg = ReturnStringFromValue( g_UnitMetric, g_RepeatStep.x, m_Parent->m_InternalUnits );
m_DeltaStepCtrl_X->SetValue( msg );
wxString title = _( "Delta Step X" ) + ReturnUnitSymbol( g_UnitMetric );
m_DeltaStepXTitle->SetLabel( title );
msg = ReturnStringFromValue( g_UnitMetric, g_RepeatStep.y, m_Parent->m_InternalUnits );
m_DeltaStepCtrl_Y->SetValue( msg );
title = _( "Delta Step Y" ) + ReturnUnitSymbol( g_UnitMetric );
m_DeltaStepYTitle->SetLabel( title );
m_DeltaLabelCtrl->SetValue( g_RepeatDeltaLabel );
}
/*!
* WinEDA_SetOptionsFrame creator
*/
bool WinEDA_SetOptionsFrame::Create( wxWindow* parent,
wxWindowID id,
const wxString& caption,
const wxPoint& pos,
const wxSize& size,
long style )
{
////@begin WinEDA_SetOptionsFrame member initialisation
m_DrawOptionsSizer = NULL;
m_ShowGridOpt = NULL;
m_SelGridSize = NULL;
m_SelShowPins = NULL;
m_AutoPANOpt = NULL;
m_Selunits = NULL;
m_LabelSizeCtrlSizer = NULL;
m_SelDirWires = NULL;
m_Show_Page_Limits = NULL;
m_btClose = NULL;
m_DeltaStepXTitle = NULL;
m_DeltaStepCtrl_X = NULL;
m_DeltaStepYTitle = NULL;
m_DeltaStepCtrl_Y = NULL;
m_DeltaIncTitle = NULL;
m_DeltaLabelCtrl = NULL;
////@end WinEDA_SetOptionsFrame member initialisation
////@begin WinEDA_SetOptionsFrame creation
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
if (GetSizer())
{
GetSizer()->SetSizeHints(this);
}
Centre();
////@end WinEDA_SetOptionsFrame creation
return true;
}
/*!
* Control creation for WinEDA_SetOptionsFrame
*/
void WinEDA_SetOptionsFrame::CreateControls()
{
////@begin WinEDA_SetOptionsFrame content construction
// Generated by DialogBlocks, 27/04/2009 09:01:10 (unregistered)
WinEDA_SetOptionsFrame* itemDialog1 = this;
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
itemDialog1->SetSizer(itemBoxSizer2);
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticBox* itemStaticBoxSizer4Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Draw Options:"));
m_DrawOptionsSizer = new wxStaticBoxSizer(itemStaticBoxSizer4Static, wxVERTICAL);
itemBoxSizer3->Add(m_DrawOptionsSizer, 0, wxGROW|wxALL, 5);
m_ShowGridOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX1, _("Show grid"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_ShowGridOpt->SetValue(false);
m_DrawOptionsSizer->Add(m_ShowGridOpt, 0, wxALIGN_LEFT|wxALL, 5);
wxArrayString m_SelGridSizeStrings;
m_SelGridSizeStrings.Add(_("Normal (50 mils)"));
m_SelGridSizeStrings.Add(_("Small (25 mils)"));
m_SelGridSizeStrings.Add(_("Very small (10 mils)"));
m_SelGridSizeStrings.Add(_("Special (5 mils)"));
m_SelGridSizeStrings.Add(_("Special (2 mils)"));
m_SelGridSizeStrings.Add(_("Special (1 mil)"));
m_SelGridSize = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("Grid Size"), wxDefaultPosition, wxDefaultSize, m_SelGridSizeStrings, 1, wxRA_SPECIFY_COLS );
m_SelGridSize->SetSelection(0);
itemBoxSizer3->Add(m_SelGridSize, 0, wxGROW|wxALL, 5);
wxArrayString m_SelShowPinsStrings;
m_SelShowPinsStrings.Add(_("Normal"));
m_SelShowPinsStrings.Add(_("Show alls"));
m_SelShowPins = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("Show pins"), wxDefaultPosition, wxDefaultSize, m_SelShowPinsStrings, 1, wxRA_SPECIFY_COLS );
m_SelShowPins->SetSelection(0);
itemBoxSizer3->Add(m_SelShowPins, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_AutoPANOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Auto PAN"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_AutoPANOpt->SetValue(false);
itemBoxSizer8->Add(m_AutoPANOpt, 0, wxGROW|wxALL, 5);
wxArrayString m_SelunitsStrings;
m_SelunitsStrings.Add(_("millimeter"));
m_SelunitsStrings.Add(_("inches"));
m_Selunits = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("Units"), wxDefaultPosition, wxDefaultSize, m_SelunitsStrings, 1, wxRA_SPECIFY_COLS );
m_Selunits->SetSelection(0);
itemBoxSizer8->Add(m_Selunits, 0, wxGROW|wxALL, 5);
m_LabelSizeCtrlSizer = new wxBoxSizer(wxVERTICAL);
itemBoxSizer8->Add(m_LabelSizeCtrlSizer, 0, wxGROW|wxALL, 5);
wxArrayString m_SelDirWiresStrings;
m_SelDirWiresStrings.Add(_("Horiz/Vertical"));
m_SelDirWiresStrings.Add(_("Any"));
m_SelDirWires = new wxRadioBox( itemDialog1, ID_RADIOBOX3, _("Wires - Bus orient"), wxDefaultPosition, wxDefaultSize, m_SelDirWiresStrings, 1, wxRA_SPECIFY_COLS );
m_SelDirWires->SetSelection(0);
itemBoxSizer8->Add(m_SelDirWires, 0, wxGROW|wxALL, 5);
wxArrayString m_Show_Page_LimitsStrings;
m_Show_Page_LimitsStrings.Add(_("Yes"));
m_Show_Page_LimitsStrings.Add(_("No"));
m_Show_Page_Limits = new wxRadioBox( itemDialog1, ID_RADIOBOX4, _("Show page limits"), wxDefaultPosition, wxDefaultSize, m_Show_Page_LimitsStrings, 1, wxRA_SPECIFY_COLS );
m_Show_Page_Limits->SetSelection(0);
itemBoxSizer8->Add(m_Show_Page_Limits, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer14 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton15 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton15->SetDefault();
itemBoxSizer14->Add(itemButton15, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer14->Add(m_btClose, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
itemBoxSizer14->Add(5, 5, 0, wxGROW|wxALL, 5);
wxStaticBox* itemStaticBoxSizer18Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Auto increment params"));
wxStaticBoxSizer* itemStaticBoxSizer18 = new wxStaticBoxSizer(itemStaticBoxSizer18Static, wxVERTICAL);
itemBoxSizer14->Add(itemStaticBoxSizer18, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_DeltaStepXTitle = new wxStaticText( itemDialog1, wxID_STATIC, _("Delta Step X"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer18->Add(m_DeltaStepXTitle, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_DeltaStepCtrl_X = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer18->Add(m_DeltaStepCtrl_X, 0, wxGROW|wxALL, 5);
m_DeltaStepYTitle = new wxStaticText( itemDialog1, wxID_STATIC, _("Delta Step Y"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer18->Add(m_DeltaStepYTitle, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_DeltaStepCtrl_Y = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer18->Add(m_DeltaStepCtrl_Y, 0, wxGROW|wxALL, 5);
m_DeltaIncTitle = new wxStaticText( itemDialog1, wxID_STATIC, _("Delta Label:"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer18->Add(m_DeltaIncTitle, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_DeltaLabelCtrl = new wxSpinCtrl( itemDialog1, ID_SPINCTRL, _T("0"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -16, 16, 0 );
itemStaticBoxSizer18->Add(m_DeltaLabelCtrl, 0, wxGROW|wxALL, 5);
////@end WinEDA_SetOptionsFrame content construction
m_btClose->SetFocus();
m_DefaultDrawLineWidthCtrl = new WinEDA_ValueCtrl( this, _(
"Default Line Width" ),
g_DrawDefaultLineThickness,
g_UnitMetric, m_DrawOptionsSizer,
EESCHEMA_INTERNAL_UNIT );
m_DefaultLabelSizeCtrl = new WinEDA_ValueCtrl( this, _(
"Default Label Size" ),
g_DefaultTextLabelSize,
g_UnitMetric, m_LabelSizeCtrlSizer,
EESCHEMA_INTERNAL_UNIT );
}
/*!
* Should we show tooltips?
*/
bool WinEDA_SetOptionsFrame::ShowToolTips()
{
return true;
}
/*!
* Get bitmap resources
*/
wxBitmap WinEDA_SetOptionsFrame::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin WinEDA_SetOptionsFrame bitmap retrieval
wxUnusedVar(name);
return wxNullBitmap;
////@end WinEDA_SetOptionsFrame bitmap retrieval
}
/*!
* Get icon resources
*/
wxIcon WinEDA_SetOptionsFrame::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin WinEDA_SetOptionsFrame icon retrieval
wxUnusedVar(name);
return wxNullIcon;
////@end WinEDA_SetOptionsFrame icon retrieval
}
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
*/
void WinEDA_SetOptionsFrame::OnOkClick( wxCommandEvent& event )
{
Accept( event );
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK in WinEDA_SetOptionsFrame.
// Before editing this code, remove the block markers.
event.Skip();
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK in WinEDA_SetOptionsFrame.
}
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
*/
void WinEDA_SetOptionsFrame::OnCancelClick( wxCommandEvent& event )
{
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_SetOptionsFrame.
// Before editing this code, remove the block markers.
event.Skip();
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_SetOptionsFrame.
}
/**************************************************************************/
void WinEDA_SetOptionsFrame::Accept( wxCommandEvent& event )
/**************************************************************************/
{
wxRealPoint grid;
wxString msg;
g_DrawDefaultLineThickness = m_DefaultDrawLineWidthCtrl->GetValue();
if( g_DrawDefaultLineThickness < 0 )
g_DrawDefaultLineThickness = 0;
if( g_DrawDefaultLineThickness > 100 )
g_DrawDefaultLineThickness = 100;
g_DefaultTextLabelSize = m_DefaultLabelSizeCtrl->GetValue();
if( g_DefaultTextLabelSize < 0 )
g_DefaultTextLabelSize = 0;
if( g_DefaultTextLabelSize > 1000 )
g_DefaultTextLabelSize = 1000;
msg = m_DeltaStepCtrl_X->GetValue();
g_RepeatStep.x =
ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits );
msg = m_DeltaStepCtrl_Y->GetValue();
g_RepeatStep.y =
ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits );
g_RepeatDeltaLabel = m_DeltaLabelCtrl->GetValue();
if( m_Show_Page_Limits->GetSelection() == 0 )
g_ShowPageLimits = TRUE;
else
g_ShowPageLimits = FALSE;
if( m_SelDirWires->GetSelection() == 0 )
g_HVLines = true;
else
g_HVLines = false;
if( m_Selunits->GetSelection() == 0 )
g_UnitMetric = 1;
else
g_UnitMetric = 0;
if( m_SelShowPins->GetSelection() == 0 )
m_Parent->m_ShowAllPins = false;
else
m_Parent->m_ShowAllPins = true;
m_Parent->m_Draw_Grid = m_ShowGridOpt->GetValue();
m_Parent->DrawPanel->m_AutoPAN_Enable = m_AutoPANOpt->GetValue();
m_Parent->m_Draw_Grid = m_ShowGridOpt->GetValue();
switch( m_SelGridSize->GetSelection() )
{
default:
break;
case 0:
grid = wxRealPoint( 50, 50 );
break;
case 1:
grid = wxRealPoint( 25, 25 );
break;
case 2:
grid = wxRealPoint( 10, 10 );
break;
case 3:
grid = wxRealPoint( 5, 5 );
break;
case 4:
grid = wxRealPoint( 2, 2 );
break;
case 5:
grid = wxRealPoint( 1, 1 );
break;
}
if( m_Parent->GetBaseScreen() )
{
m_Parent->GetBaseScreen()->SetGrid( grid );
m_Parent->GetBaseScreen()->SetRefreshReq();
}
}

View File

@ -1,139 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_options.h
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Created: 31/01/2006 13:27:33
// RCS-ID:
// Copyright: GNU License
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 31/01/2006 13:27:33
#ifndef _DIALOG_OPTIONS_H_
#define _DIALOG_OPTIONS_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dialog_options.h"
#endif
/*!
* Includes
*/
////@begin includes
#include "wx/spinctrl.h"
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
class wxBoxSizer;
class wxSpinCtrl;
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#define ID_CHECKBOX1 10001
#define ID_RADIOBOX 10003
#define ID_RADIOBOX1 10004
#define ID_CHECKBOX 10002
#define ID_RADIOBOX2 10005
#define ID_RADIOBOX3 10006
#define ID_RADIOBOX4 10007
#define ID_TEXTCTRL 10008
#define ID_TEXTCTRL1 10009
#define ID_SPINCTRL 10010
#define SYMBOL_WINEDA_SETOPTIONSFRAME_STYLE wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_SETOPTIONSFRAME_TITLE _("General Options")
#define SYMBOL_WINEDA_SETOPTIONSFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_SETOPTIONSFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_SETOPTIONSFRAME_POSITION wxDefaultPosition
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
/*!
* WinEDA_SetOptionsFrame class declaration
*/
class WinEDA_SetOptionsFrame: public wxDialog
{
DECLARE_DYNAMIC_CLASS( WinEDA_SetOptionsFrame )
DECLARE_EVENT_TABLE()
public:
/// Constructors
WinEDA_SetOptionsFrame( );
WinEDA_SetOptionsFrame( WinEDA_SchematicFrame* parent, wxWindowID id = SYMBOL_WINEDA_SETOPTIONSFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_SETOPTIONSFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_SETOPTIONSFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_SETOPTIONSFRAME_SIZE, long style = SYMBOL_WINEDA_SETOPTIONSFRAME_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_SETOPTIONSFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_SETOPTIONSFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_SETOPTIONSFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_SETOPTIONSFRAME_SIZE, long style = SYMBOL_WINEDA_SETOPTIONSFRAME_STYLE );
/// Creates the controls and sizers
void CreateControls();
////@begin WinEDA_SetOptionsFrame event handler declarations
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
void OnOkClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event );
////@end WinEDA_SetOptionsFrame event handler declarations
////@begin WinEDA_SetOptionsFrame member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end WinEDA_SetOptionsFrame member function declarations
void Accept(wxCommandEvent& event);
/// Should we show tooltips?
static bool ShowToolTips();
WinEDA_SchematicFrame * m_Parent;
////@begin WinEDA_SetOptionsFrame member variables
wxStaticBoxSizer* m_DrawOptionsSizer;
wxCheckBox* m_ShowGridOpt;
wxRadioBox* m_SelGridSize;
wxRadioBox* m_SelShowPins;
wxCheckBox* m_AutoPANOpt;
wxRadioBox* m_Selunits;
wxBoxSizer* m_LabelSizeCtrlSizer;
wxRadioBox* m_SelDirWires;
wxRadioBox* m_Show_Page_Limits;
wxButton* m_btClose;
wxStaticText* m_DeltaStepXTitle;
wxTextCtrl* m_DeltaStepCtrl_X;
wxStaticText* m_DeltaStepYTitle;
wxTextCtrl* m_DeltaStepCtrl_Y;
wxStaticText* m_DeltaIncTitle;
wxSpinCtrl* m_DeltaLabelCtrl;
////@end WinEDA_SetOptionsFrame member variables
WinEDA_ValueCtrl * m_DefaultDrawLineWidthCtrl;
WinEDA_ValueCtrl * m_DefaultLabelSizeCtrl;
};
#endif
// _DIALOG_OPTIONS_H_

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
#include "wx/msw/wx.rc"

View File

@ -10,13 +10,13 @@
#include "class_drawpanel.h"
#include "confirm.h"
#include "gestfich.h"
#include "program.h"
#include "general.h"
#include "protos.h"
#include "eeschema_config.h"
#include "worksheet.h"
#include "hotkeys.h"
#include "dialog_eeschema_options.h"
#define HOTKEY_FILENAME wxT( "eeschema" )
@ -42,12 +42,6 @@ void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event )
InstallConfigFrame( pos );
break;
case ID_OPTIONS_SETUP:
DisplayOptionFrame( this, pos );
// Redraw, because grid settings may have changed.
DrawPanel->Refresh( TRUE );
break;
case ID_CONFIG_SAVE:
SaveProjectFile( this );
break;
@ -107,6 +101,54 @@ void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event )
}
void WinEDA_SchematicFrame::OnSetOptions( wxCommandEvent& event )
{
wxArrayString units;
GridArray& grid_list = GetBaseScreen()->m_GridList;
DIALOG_EESCHEMA_OPTIONS dlg( this );
wxLogDebug( _( "Current grid array index %d." ),
grid_list.Index( GetBaseScreen()->GetGrid() ) );
units.Add( GetUnitsLabel( INCHES ) );
units.Add( GetUnitsLabel( MILLIMETRE ) );
dlg.SetUnits( units, g_UnitMetric );
dlg.SetGridSizes( grid_list, GetBaseScreen()->GetGridId() );
dlg.SetLineWidth( g_DrawDefaultLineThickness );
dlg.SetTextSize( g_DefaultTextLabelSize );
dlg.SetRepeatHorizontal( g_RepeatStep.x );
dlg.SetRepeatVertical( g_RepeatStep.y );
dlg.SetRepeatLabel( g_RepeatDeltaLabel );
dlg.SetShowGrid( m_Draw_Grid );
dlg.SetShowHiddenPins( m_ShowAllPins );
dlg.SetEnableAutoPan( DrawPanel->m_AutoPAN_Enable );
dlg.SetEnableAnyBusOrientation( g_HVLines );
dlg.SetShowPageLimits( g_ShowPageLimits );
dlg.Layout();
dlg.Fit();
dlg.SetMinSize( dlg.GetSize() );
if( dlg.ShowModal() == wxID_CANCEL )
return;
g_UnitMetric = dlg.GetUnitsSelection();
GetBaseScreen()->SetGrid(
grid_list[ (size_t) dlg.GetGridSelection() ].m_Size );
g_DrawDefaultLineThickness = dlg.GetLineWidth();
g_DefaultTextLabelSize = dlg.GetTextSize();
g_RepeatStep.x = dlg.GetRepeatHorizontal();
g_RepeatStep.y = dlg.GetRepeatVertical();
g_RepeatDeltaLabel = dlg.GetRepeatLabel();
m_Draw_Grid = dlg.GetShowGrid();
m_ShowAllPins = dlg.GetShowHiddenPins();
DrawPanel->m_AutoPAN_Enable = dlg.GetEnableAutoPan();
g_HVLines = dlg.GetEnableAnyBusOrientation();
g_ShowPageLimits = dlg.GetShowPageLimits();
DrawPanel->Refresh( true );
}
/*
* Read the hotkey files config for eeschema and libedit
*/
@ -116,7 +158,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
g_ConfigFileLocationChoice );
FullFileName += HOTKEY_FILENAME;
FullFileName += wxT(".");
FullFileName += wxT( "." );
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
frame->ReadHotkeyConfigFile( FullFileName,
s_Eeschema_Hokeys_Descr,
@ -288,7 +330,6 @@ void WinEDA_SchematicFrame::SaveProjectFile( wxWindow* displayframe )
if( dlg.ShowModal() == wxID_CANCEL )
return;
/* ecriture de la configuration */
wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP,
GetProjectFileParameters() );
}
@ -415,7 +456,8 @@ void WinEDA_SchematicFrame::LoadSettings()
wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() );
g_DrawDefaultLineThickness = cfg->Read( DefaultDrawLineWidthEntry, (long) 6 );
g_DrawDefaultLineThickness = cfg->Read( DefaultDrawLineWidthEntry,
(long) 6 );
cfg->Read( ShowHiddenPinsEntry, &m_ShowAllPins, false );
cfg->Read( HorzVertLinesOnlyEntry, &g_HVLines, true );
}

View File

@ -501,6 +501,8 @@ lost!\n\nClear the current component from the screen?" ) ) )
m_drawItem = NULL;
DIALOG_LIB_NEW_COMPONENT dlg( this );
dlg.SetMinSize( dlg.GetSize() );
if( dlg.ShowModal() == wxID_CANCEL )
return;

View File

@ -71,6 +71,16 @@ void WinEDA_LibeditFrame::OnEditPin( wxCommandEvent& event )
dlg.SetAddToAllBodyStyles( pin->m_Convert == 0 );
dlg.SetVisible( pin->IsVisible() );
/* This ugly hack fixes a bug in wxWidgets 2.8.7 and likely earlier
* versions for the flex grid sizer in wxGTK that prevents the last
* column from being sized correctly. It doesn't cause any problems
* on win32 so it doesn't need to wrapped in ugly #ifdef __WXGTK__
* #endif.
*/
dlg.Layout();
dlg.Fit();
dlg.SetMinSize( dlg.GetSize() );
if( dlg.ShowModal() == wxID_CANCEL )
{
if( pin->IsNew() )
@ -172,7 +182,7 @@ void WinEDA_LibeditFrame::PlacePin( wxDC* DC )
// Tst for an other pin in same new position:
for( Pin = m_component->GetNextPin(); Pin != NULL;
Pin = m_component->GetNextPin( Pin ) )
Pin = m_component->GetNextPin( Pin ) )
{
if( Pin == CurrentPin || newpos != Pin->m_Pos || Pin->m_Flags )
continue;

View File

@ -66,7 +66,7 @@ BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame )
ID_CONFIG_AND_PREFERENCES_END,
WinEDA_SchematicFrame::Process_Config )
EVT_TOOL( ID_COLORS_SETUP, WinEDA_SchematicFrame::Process_Config )
EVT_TOOL( ID_OPTIONS_SETUP, WinEDA_SchematicFrame::Process_Config )
EVT_TOOL( ID_OPTIONS_SETUP, WinEDA_SchematicFrame::OnSetOptions )
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
WinEDA_DrawFrame::SetLanguage )

View File

@ -265,6 +265,7 @@ private:
void OnOpenCvpcb( wxCommandEvent& event );
void OnOpenLibraryViewer( wxCommandEvent& event );
void OnOpenLibraryEditor( wxCommandEvent& event );
void OnSetOptions( wxCommandEvent& event );
/* User interface update event handlers. */
void OnUpdateBlockSelected( wxUpdateUIEvent& event );