Commit 0652ab4f authored by stambaughw's avatar stambaughw

PCBNew UI normalization and global variable reductions.

* All: remove all remaining occurrences of g_DialogFont and dialog font menu handers.
* All: remove all remaining non-standard fonts and button text colors from common dialogs.
* PCBNew: remove all non-standard fonts and button text colors from dialogs.
* PCBNew: update project library and path dialog to match changes to CVPCB version.
* EESchema: update project library and path dialog to match changes to CVPCB version.
* EESchema: save vertical/horizontal line direction setting between sessions.
parent ac45264b
......@@ -285,38 +285,3 @@ void WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& WXUNUSED(event) )
InitKiCadAbout(info);
wxAboutBox(info);
}
/*
*
*/
/********************************************************************/
void WinEDA_BasicFrame::ProcessFontPreferences( int id )
/********************************************************************/
{
wxFont font;
switch( id )
{
case ID_PREFERENCES_FONT:
break;
case ID_PREFERENCES_FONT_DIALOG:
font = wxGetFontFromUser( this, *g_DialogFont );
if( font.Ok() )
{
int pointsize = font.GetPointSize();
*g_DialogFont = font;
SetFont( *g_DialogFont );
g_DialogFontPointSize = pointsize;
g_FixedFontPointSize = pointsize;
g_FixedFont->SetPointSize( g_FixedFontPointSize );
}
break;
default:
DisplayError( this, wxT( "WinEDA_BasicFrame::ProcessFontPreferences Internal Error" ) );
break;
}
}
......@@ -72,10 +72,8 @@ wxString g_UserLibDirBuffer;
int g_DebugLevel;
int g_MouseOldButtons;
int g_KeyPressed;
wxFont* g_DialogFont = NULL; /* Normal font used in dialog box */
wxFont* g_FixedFont = NULL; /* Affichage de Texte en fenetres de dialogue,
* fonte a pas fixe)*/
int g_DialogFontPointSize; /* taille de la fonte */
int g_FixedFontPointSize; /* taille de la fonte */
int g_FontMinPointSize; /* taille minimum des fontes */
......
......@@ -114,49 +114,6 @@ WinEDA_DrawFrame::~WinEDA_DrawFrame()
}
/****************************************************************/
void WinEDA_DrawFrame::AddFontSelectionMenu( wxMenu* main_menu )
/*****************************************************************/
/* create the submenu for font selection and setup font size
*/
{
wxMenu* fontmenu = new wxMenu();
ADD_MENUITEM( fontmenu,
ID_PREFERENCES_FONT_DIALOG,
_( "Dialog boxes" ),
fonts_xpm );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( main_menu,
fontmenu,
ID_PREFERENCES_FONT,
_( "&Font" ),
_( "Choose font type and size for dialogs, infos and status box" ),
fonts_xpm );
}
/********************************************************************/
void WinEDA_DrawFrame::ProcessFontPreferences( wxCommandEvent& event )
/********************************************************************/
{
int id = event.GetId();
switch( id )
{
case ID_PREFERENCES_FONT:
case ID_PREFERENCES_FONT_DIALOG:
WinEDA_BasicFrame::ProcessFontPreferences( id );
break;
default:
DisplayError( this, wxT( "WinEDA_DrawFrame::ProcessFontPreferences " \
"Internal Error" ) );
break;
}
}
/**************************************************************/
void WinEDA_DrawFrame::Affiche_Message( const wxString& message )
/**************************************************************/
......
......@@ -248,7 +248,6 @@ WinEDA_App::~WinEDA_App()
if( m_EDA_CommonConfig )
delete m_EDA_CommonConfig;
delete m_EDA_Config;
delete g_DialogFont;
delete g_FixedFont;
if( m_Checker )
delete m_Checker;
......@@ -305,12 +304,8 @@ void WinEDA_App::InitEDA_Appl( const wxString& aName, id_app_type aId )
wxASSERT( m_EDA_CommonConfig != NULL );
/* Create the fonts used in dialogs and messages */
g_DialogFontPointSize = FONT_DEFAULT_SIZE;
g_FixedFontPointSize = FONT_DEFAULT_SIZE;
g_DialogFont = new wxFont( g_DialogFontPointSize, wxFONTFAMILY_ROMAN,
wxNORMAL, wxNORMAL );
g_FixedFont = new wxFont( g_FixedFontPointSize, wxFONTFAMILY_MODERN,
wxNORMAL, wxNORMAL );
......@@ -645,21 +640,9 @@ void WinEDA_App::GetSettings()
m_fileHistory.Load( *m_EDA_Config );
/* Set default font sizes */
g_DialogFontPointSize = m_EDA_Config->Read( wxT( "DialogFontSize" ),
FONT_DEFAULT_SIZE );
g_FixedFontPointSize = m_EDA_Config->Read( wxT( "FixedFontSize" ),
FONT_DEFAULT_SIZE );
Line = m_EDA_Config->Read( wxT( "DialogFontType" ), wxEmptyString );
if( !Line.IsEmpty() )
g_DialogFont->SetFaceName( Line );
ii = m_EDA_Config->Read( wxT( "DialogFontStyle" ), wxFONTFAMILY_ROMAN );
g_DialogFont->SetStyle( ii );
ii = m_EDA_Config->Read( wxT( "DialogFontWeight" ), wxNORMAL );
g_DialogFont->SetWeight( ii );
g_DialogFont->SetPointSize( g_DialogFontPointSize );
g_FixedFont->SetPointSize( g_FixedFontPointSize );
m_EDA_Config->Read( wxT( "ShowPageLimits" ), &g_ShowPageLimits );
......@@ -687,12 +670,6 @@ void WinEDA_App::SaveSettings()
#if wxCHECK_VERSION( 2, 9, 0 )
#warning TODO: under wxWidgets 3.0, see how to replace the next lines
#else
/* Dialog font settings */
m_EDA_Config->Write( wxT( "DialogFontSize" ), g_DialogFontPointSize );
m_EDA_Config->Write( wxT( "DialogFontType" ), g_DialogFont->GetFaceName() );
m_EDA_Config->Write( wxT( "DialogFontStyle" ), g_DialogFont->GetStyle() );
m_EDA_Config->Write( wxT( "DialogFontWeight" ), g_DialogFont->GetWeight() );
/* Misc settings */
m_EDA_Config->Write( wxT( "FixedFontSize" ), g_FixedFontPointSize );
m_EDA_Config->Write( wxT( "ShowPageLimits" ), g_ShowPageLimits );
......
......@@ -2,6 +2,7 @@
/****************/
/* SELCOLOR.CPP */
/****************/
/* Affichage et selection de la palette des couleurs disponibles
* dans une frame
*/
......@@ -22,8 +23,9 @@ enum colors_id {
/*******************************************/
class WinEDA_SelColorFrame: public wxDialog
class WinEDA_SelColorFrame : public wxDialog
/*******************************************/
/* Frame d'affichage de la palette des couleurs disponibles
*/
{
......@@ -31,19 +33,20 @@ private:
public:
// Constructor and destructor
WinEDA_SelColorFrame( wxWindow *parent,
WinEDA_SelColorFrame( wxWindow* parent,
const wxPoint& framepos, int OldColor );
~WinEDA_SelColorFrame() {};
private:
void OnCancel(wxCommandEvent& event);
void SelColor(wxCommandEvent& event);
void OnCancel( wxCommandEvent& event );
void SelColor( wxCommandEvent& event );
DECLARE_EVENT_TABLE()
};
/* Construction de la table des evenements pour FrameClassMain */
BEGIN_EVENT_TABLE(WinEDA_SelColorFrame, wxDialog)
BEGIN_EVENT_TABLE( WinEDA_SelColorFrame, wxDialog )
EVT_BUTTON( wxID_CANCEL, WinEDA_SelColorFrame::OnCancel )
EVT_COMMAND_RANGE( ID_COLOR_BLACK, ID_COLOR_BLACK + 31,
wxEVT_COMMAND_BUTTON_CLICKED,
......@@ -51,16 +54,14 @@ BEGIN_EVENT_TABLE(WinEDA_SelColorFrame, wxDialog)
END_EVENT_TABLE()
/***************************************/
int DisplayColorFrame(wxWindow * parent, int OldColor)
/***************************************/
int DisplayColorFrame( wxWindow* parent, int OldColor )
{
wxPoint framepos;
int color;
wxPoint framepos;
int color;
wxGetMousePosition(&framepos.x, &framepos.y);
wxGetMousePosition( &framepos.x, &framepos.y );
WinEDA_SelColorFrame * frame = new WinEDA_SelColorFrame( parent,
WinEDA_SelColorFrame* frame = new WinEDA_SelColorFrame( parent,
framepos, OldColor );
color = frame->ShowModal();
frame->Destroy();
......@@ -70,12 +71,11 @@ int color;
}
/*******************************************************************/
WinEDA_SelColorFrame::WinEDA_SelColorFrame( wxWindow *parent,
const wxPoint& framepos, int OldColor ):
wxDialog( parent, -1, _("Colors"), framepos, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE|MAYBE_RESIZE_BORDER )
/*******************************************************************/
WinEDA_SelColorFrame::WinEDA_SelColorFrame( wxWindow* parent,
const wxPoint& framepos,
int OldColor ) :
wxDialog( parent, -1, _( "Colors" ), framepos, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | MAYBE_RESIZE_BORDER )
{
wxBoxSizer* OuterBoxSizer = NULL;
wxBoxSizer* MainBoxSizer = NULL;
......@@ -90,34 +90,33 @@ WinEDA_SelColorFrame::WinEDA_SelColorFrame( wxWindow *parent,
int w = 20, h = 20;
bool ColorFound = false;
SetFont( *g_DialogFont );
SetReturnCode( -1 );
OuterBoxSizer = new wxBoxSizer(wxVERTICAL);
SetSizer(OuterBoxSizer);
OuterBoxSizer = new wxBoxSizer( wxVERTICAL );
SetSizer( OuterBoxSizer );
MainBoxSizer = new wxBoxSizer(wxHORIZONTAL);
OuterBoxSizer->Add(MainBoxSizer, 1, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
MainBoxSizer = new wxBoxSizer( wxHORIZONTAL );
OuterBoxSizer->Add( MainBoxSizer, 1, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
for( ii = 0; ColorRefs[ii].m_Name != NULL; ii++ )
{
// Provide a separate column for every eight buttons (and their associated text
// strings), so provide a FlexGrid Sizer with eight rows and two columns.
// Provide a separate column for every eight buttons (and their
// associated text strings), so provide a FlexGrid Sizer with
// eight rows and two columns.
if( ii % 8 == 0 )
{
FlexColumnBoxSizer = new wxFlexGridSizer(8, 2, 0, 0);
FlexColumnBoxSizer = new wxFlexGridSizer( 8, 2, 0, 0 );
// Specify that all of the rows can be expanded.
for( int ii = 0; ii < 8; ii++ )
{
FlexColumnBoxSizer->AddGrowableRow(ii);
FlexColumnBoxSizer->AddGrowableRow( ii );
}
// Specify that the second column can also be expanded.
FlexColumnBoxSizer->AddGrowableCol(1);
FlexColumnBoxSizer->AddGrowableCol( 1 );
MainBoxSizer->Add(FlexColumnBoxSizer, 1, wxGROW|wxTOP, 5);
MainBoxSizer->Add( FlexColumnBoxSizer, 1, wxGROW | wxTOP, 5 );
}
butt_ID = ID_COLOR_BLACK + ii;
......@@ -127,21 +126,21 @@ WinEDA_SelColorFrame::WinEDA_SelColorFrame( wxWindow *parent,
iconDC.SelectObject( ButtBitmap );
buttcolor = ColorRefs[ii].m_Numcolor;
iconDC.SetPen( *wxBLACK_PEN );
Brush.SetColour(
ColorRefs[buttcolor].m_Red,
Brush.SetColour( ColorRefs[buttcolor].m_Red,
ColorRefs[buttcolor].m_Green,
ColorRefs[buttcolor].m_Blue
);
ColorRefs[buttcolor].m_Blue );
Brush.SetStyle( wxSOLID );
iconDC.SetBrush( Brush );
iconDC.SetBackground( *wxGREY_BRUSH );
iconDC.Clear();
iconDC.DrawRoundedRectangle( 0, 0, w, h, (double)h / 3 );
iconDC.DrawRoundedRectangle( 0, 0, w, h, (double) h / 3 );
BitmapButton = new wxBitmapButton( this, butt_ID, ButtBitmap,
wxDefaultPosition, wxSize( w, h ) );
FlexColumnBoxSizer->Add(BitmapButton, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxBOTTOM, 5);
FlexColumnBoxSizer->Add( BitmapButton, 0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL |
wxLEFT | wxBOTTOM, 5 );
// Set focus to this button if its color matches the
// color which had been selected previously (for
......@@ -154,23 +153,26 @@ WinEDA_SelColorFrame::WinEDA_SelColorFrame( wxWindow *parent,
Label = new wxStaticText( this, -1, ColorRefs[ii].m_Name,
wxDefaultPosition, wxDefaultSize, 0 );
FlexColumnBoxSizer->Add(Label, 1, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
FlexColumnBoxSizer->Add( Label, 1,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL |
wxLEFT | wxRIGHT | wxBOTTOM, 5 );
}
// Provide a Cancel button as well, so that this dialog
// box can also be cancelled by pressing the Esc key
// box can also be canceled by pressing the Esc key
// (and also provide a horizontal static line to separate
// that button from all of the other buttons).
Line = new wxStaticLine( this, -1, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
OuterBoxSizer->Add(Line, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
Line = new wxStaticLine( this, -1, wxDefaultPosition,
wxDefaultSize, wxLI_HORIZONTAL );
OuterBoxSizer->Add( Line, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
StdDialogButtonSizer = new wxStdDialogButtonSizer;
OuterBoxSizer->Add(StdDialogButtonSizer, 0, wxGROW|wxALL, 10);
OuterBoxSizer->Add( StdDialogButtonSizer, 0, wxGROW | wxALL, 10 );
Button = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
Button->SetForegroundColour( *wxBLUE );
StdDialogButtonSizer->AddButton(Button);
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ), wxDefaultPosition,
wxDefaultSize, 0 );
StdDialogButtonSizer->AddButton( Button );
StdDialogButtonSizer->Realize();
......@@ -183,29 +185,23 @@ WinEDA_SelColorFrame::WinEDA_SelColorFrame( wxWindow *parent,
// Resize the dialog
if( GetSizer() )
{
GetSizer()->SetSizeHints(this);
GetSizer()->SetSizeHints( this );
}
}
/***************************************************************/
void WinEDA_SelColorFrame::OnCancel(wxCommandEvent& WXUNUSED(event))
/***************************************************************/
/* Called by the Cancel button
*/
void WinEDA_SelColorFrame::OnCancel( wxCommandEvent& WXUNUSED( event ) )
{
// Setting the return value to -1 indicates that the
// dialog box has been cancelled (and thus that the
// dialog box has been canceled (and thus that the
// previously selected color is to be retained).
EndModal( -1 );
}
/*********************************************************/
void WinEDA_SelColorFrame::SelColor(wxCommandEvent& event)
/*********************************************************/
void WinEDA_SelColorFrame::SelColor( wxCommandEvent& event )
{
int id = event.GetId();
int id = event.GetId();
EndModal( id - ID_COLOR_BLACK );
}
......@@ -98,8 +98,6 @@ DIALOG_BUILD_BOM::DIALOG_BUILD_BOM( WinEDA_DrawFrame* parent ):
void DIALOG_BUILD_BOM::Init()
{
SetFont( *g_DialogFont );
SetFocus();
/* Get options */
......
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_eeschema_config.cpp
// Purpose:
// Author: jean-pierre Charras
......@@ -39,7 +38,6 @@ private:
// event handlers, overiding the fbp handlers
void Init();
void OnCloseWindow( wxCloseEvent& event );
void OnSaveCfgClick( wxCommandEvent& event );
void OnRemoveLibClick( wxCommandEvent& event );
void OnAddOrInsertLibClick( wxCommandEvent& event );
void OnAddOrInsertPath( wxCommandEvent& event );
......@@ -87,27 +85,13 @@ DIALOG_EESCHEMA_CONFIG::DIALOG_EESCHEMA_CONFIG( WinEDA_SchematicFrame* parent )
void DIALOG_EESCHEMA_CONFIG::Init()
/***********************************/
{
wxString msg;
SetFocus();
m_LibListChanged = false;
m_LibPathChanged = false;
m_UserLibDirBufferImg = m_Parent->m_UserLibraryPath; // Save the original lib path
// Display current files extension (info)
wxString msg = m_InfoCmpFileExt->GetLabel() + g_NetCmpExtBuffer;
m_InfoCmpFileExt->SetLabel( msg );
msg = m_InfoNetFileExt->GetLabel() + NetlistFileExtension;
m_InfoNetFileExt->SetLabel( msg );
msg = m_InfoLibFileExt->GetLabel() + CompLibFileExtension;
m_InfoLibFileExt->SetLabel( msg );
msg = m_InfoSymbFileExt->GetLabel() + g_SymbolExtBuffer;
m_InfoSymbFileExt->SetLabel( msg );
msg = m_InfoSchFileExt->GetLabel() + SchematicFileExtension;
m_InfoSchFileExt->SetLabel( msg );
m_UserLibDirBufferImg = m_Parent->m_UserLibraryPath;
// Init currently availlable netlist formats
wxArrayString NetlistNameItems;
......@@ -165,7 +149,8 @@ void DIALOG_EESCHEMA_CONFIG::OnCancelClick( wxCommandEvent& event )
wxGetApp().RemoveLibraryPath( m_listUserPaths->GetString(ii)) ;
wxGetApp().InsertLibraryPath( m_Parent->m_UserLibraryPath, 1);
}
EndModal( -1 );
EndModal( wxID_CANCEL );
}
......@@ -188,8 +173,9 @@ void DIALOG_EESCHEMA_CONFIG::OnOkClick( wxCommandEvent& event )
}
}
// Set new active library list if the lib list of if default path list was modified
/* Set new active library list if the lib list of if default path list
* was modified
*/
if( m_LibListChanged || m_LibPathChanged )
{
// Recreate lib list
......@@ -202,15 +188,16 @@ void DIALOG_EESCHEMA_CONFIG::OnOkClick( wxCommandEvent& event )
if( m_Parent->m_ViewlibFrame )
m_Parent->m_ViewlibFrame->ReCreateListLib();
}
if ( event.GetId() != ID_SAVE_CFG )
EndModal( 0 );
m_Parent->SaveProjectFile( this );
EndModal( wxID_OK );
}
/**************************************************************/
void DIALOG_EESCHEMA_CONFIG::OnCloseWindow( wxCloseEvent& event )
/**************************************************************/
{
EndModal( 0 );
EndModal( wxID_CANCEL );
}
......@@ -277,8 +264,8 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
* list, just add the library name to the list. Otherwise, add
* the library name with the full or relative path.
* the relative path, when possible is preferable,
* because it preserve use of default libraries paths, when the path is a sub path of these default paths
*
* because it preserve use of default libraries paths, when the path
* is a sub path of these default paths
*/
if( wxGetApp().GetLibraryPathList().Index( fn.GetPath() ) != wxNOT_FOUND ) // Ok, trivial case
libfilename = fn.GetName();
......@@ -315,26 +302,15 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
/*******************************************************************/
void DIALOG_EESCHEMA_CONFIG::OnSaveCfgClick( wxCommandEvent& event )
/*******************************************************************/
{
OnOkClick( event );
m_Parent->SaveProjectFile( this );
}
/***********************************************************************/
void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath( wxCommandEvent& event )
/***********************************************************************/
{
wxString path = wxGetApp().ReturnLastVisitedLibraryPath();
bool select = EDA_DirectorySelector( _( "Default Path for Libraries" ), /* Titre de la fenetre */
path, /* Chemin par defaut */
wxDD_DEFAULT_STYLE,
this, /* parent frame */
wxDefaultPosition );
bool select = EDA_DirectorySelector( _( "Default Path for Libraries" ),
path, wxDD_DEFAULT_STYLE,
this, wxDefaultPosition );
if( !select )
return;
......@@ -365,7 +341,6 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath( wxCommandEvent& event )
m_DefaultLibraryPathslistBox->Append( libpaths[ii]);
}
}
else
DisplayError(this, _("Path already in use") );
......
This diff is collapsed.
This diff is collapsed.
......@@ -11,12 +11,11 @@
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/listbox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/listbox.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/button.h>
......@@ -37,50 +36,39 @@ class DIALOG_EESCHEMA_CONFIG_FBP : public wxDialog
{
ID_ADD_LIB = 1000,
ID_REMOVE_LIB,
ID_SAVE_CFG,
ID_LIB_PATH_SEL,
wxID_INSERT_PATH,
wxID_REMOVE_PATH,
};
wxStaticText* m_staticTextNetListFormats;
wxListBox* m_NetFormatBox;
wxStaticText* m_InfoCmpFileExt;
wxStaticText* m_InfoNetFileExt;
wxStaticText* m_InfoLibFileExt;
wxStaticText* m_InfoSymbFileExt;
wxStaticText* m_InfoSchFileExt;
wxStaticText* m_staticTextlibList;
wxListBox* m_ListLibr;
wxButton* m_buttonAddLib;
wxButton* m_buttonIns;
wxButton* m_buttonRemoveLib;
wxButton* m_buttonOk;
wxButton* m_buttonCancel;
wxButton* m_buttonSave;
wxStaticLine* m_staticline1;
wxListBox* m_listUserPaths;
wxButton* m_buttonAddPath;
wxButton* m_buttonInsPath;
wxButton* m_buttonRemovePath;
wxStaticText* m_staticTextcurrenpaths;
wxListBox* m_DefaultLibraryPathslistBox;
wxStaticLine* m_staticline3;
// Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); }
virtual void OnAddOrInsertLibClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnRemoveLibClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnSaveCfgClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnAddOrInsertPath( wxCommandEvent& event ){ event.Skip(); }
virtual void OnRemoveUserPath( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
public:
DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 593,559 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EESCHEMA_CONFIG_FBP();
};
......
......@@ -420,9 +420,9 @@ void WinEDA_SetOptionsFrame::Accept( wxCommandEvent& event )
g_ShowPageLimits = FALSE;
if( m_SelDirWires->GetSelection() == 0 )
g_HVLines = 1;
g_HVLines = true;
else
g_HVLines = 0;
g_HVLines = false;
if( m_Selunits->GetSelection() == 0 )
g_UnitMetric = 1;
......
......@@ -303,6 +303,7 @@ void WinEDA_SchematicFrame::SaveProjectFile( wxWindow* displayframe )
static const wxString MinDrawLineWidthEntry( wxT( "MinimunDrawLineWidth" ) );
static const wxString PlotLineWidthEntry( wxT( "PlotLineWidth" ) );
static const wxString ShowHiddenPinsEntry( wxT( "ShowHiddenPins" ) );
static const wxString HorzVertLinesOnlyEntry( wxT( "HorizVertLinesOnly" ) );
/*
......@@ -428,7 +429,7 @@ void WinEDA_SchematicFrame::LoadSettings()
g_DrawMinimunLineWidth = cfg->Read( MinDrawLineWidthEntry, (long) 0 );
g_PlotLine_Width = cfg->Read( PlotLineWidthEntry, (long) 4 );
cfg->Read( ShowHiddenPinsEntry, &m_ShowAllPins, false );
cfg->Read( HorzVertLinesOnlyEntry, &g_HVLines, true );
}
......@@ -448,4 +449,5 @@ void WinEDA_SchematicFrame::SaveSettings()
cfg->Write( MinDrawLineWidthEntry, (long) g_DrawMinimunLineWidth );
cfg->Write( PlotLineWidthEntry, (long) g_PlotLine_Width );
cfg->Write( ShowHiddenPinsEntry, m_ShowAllPins );
cfg->Write( HorzVertLinesOnlyEntry, g_HVLines );
}
......@@ -43,7 +43,7 @@ bool g_LastSearchIsMarker; /* True if last seach is a marker serach
SCH_ITEM* g_BlockSaveDataList; // List of items to paste (Created by Block Save)
// Gestion d'options
int g_HVLines = 1; // Bool: force H or V directions (Wires, Bus ..)
bool g_HVLines = true; // Bool: force H or V directions (Wires, Bus ..)
int g_PlotPSColorOpt; // True = plot postcript color (see plotps.cpp)
......
......@@ -115,8 +115,7 @@ extern bool g_LastSearchIsMarker; // True if last seach is a marker se
extern SCH_ITEM* g_BlockSaveDataList; // List of items to paste (Created by Block Save)
// Gestion d'options
extern int g_ShowAllPins;
extern int g_HVLines;
extern bool g_HVLines;
extern int g_PlotPSColorOpt; // True = plot postcript color (see plotps.cpp)
......
......@@ -160,6 +160,7 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father,
m_LibeditFrame = NULL; // Component editor frame.
m_ViewlibFrame = NULL; // Frame for browsing component libraries
m_DefaultSchematicFileName = wxT( "noname.sch" );
m_ShowAllPins = false;
CreateScreens();
......
......@@ -152,10 +152,8 @@ extern int g_KeyPressed;
// Font used by kicad.
// these font have a size which do not depend on default size system font
extern wxFont* g_DialogFont; /* Normal font used in dialog box */
extern wxFont* g_FixedFont; /* Affichage de Texte en fenetres de dialogue,
* fonte a pas fixe)*/
extern int g_DialogFontPointSize; /* taille de la fonte */
extern int g_FixedFontPointSize; /* taille de la fonte */
extern int g_FontMinPointSize; /* taille minimum des fontes */
......
......@@ -92,15 +92,6 @@ enum main_id {
ID_EXIT,
ID_OPTIONS_SETUP,
ID_PREFERENCES_FONT,
ID_PREFERENCES_FONT_DIALOG,
ID_PREFERENCES_FONT_UNUSED3,
ID_PREFERENCES_FONT_UNUSED4,
ID_PREFERENCES_FONT_UNUSED5,
ID_PREFERENCES_FONT_UNUSED6,
ID_PREFERENCES_FONT_UNUSED7,
ID_PREFERENCES_FONT_END,
// Find id menu
ID_H_TOOLBAR,
ID_V_TOOLBAR,
......
......@@ -70,7 +70,7 @@ enum id_drawframe {
enum id_toolbar {
TOOLBAR_MAIN = 1, // Main horizontal Toolbar
TOOLBAR_TOOL, // Rigth vertical Toolbar (list of tools)
TOOLBAR_TOOL, // Right vertical Toolbar (list of tools)
TOOLBAR_OPTION, // Left vertical Toolbar (option toolbar
TOOLBAR_AUX // Secondary horizontal Toolbar
};
......@@ -98,7 +98,7 @@ public:
WinEDA_Toolbar* m_HToolBar; // Standard horizontal Toolbar
bool m_FrameIsActive;
wxString m_FrameName; // name used for writting and reading setup
wxString m_FrameName; // name used for writing and reading setup
// It is "SchematicFrame", "PcbFrame" ....
wxString m_AboutTitle; // Name of program displayed in About.
......@@ -129,7 +129,6 @@ public:
struct Ki_HotkeyInfoSectionDescriptor* DescList,
bool verbose );
void SetLanguage( wxCommandEvent& event );
void ProcessFontPreferences( int id );
wxString GetFileFromHistory( int cmdId, const wxString& type );
void SetLastProject( const wxString& FullFileName );
......@@ -193,17 +192,15 @@ public:
/**
* Function GetBaseScreen
* is virtual and returns a pointer to a BASE_SCREEN or one of its derivatives.
* It may be overloaded by derived classes.
* is virtual and returns a pointer to a BASE_SCREEN or one of its
* derivatives. It may be overloaded by derived classes.
*/
virtual BASE_SCREEN* GetBaseScreen() const { return m_CurrentScreen; }
void OnMenuOpen( wxMenuEvent& event );
void OnMouseEvent( wxMouseEvent& event );
virtual void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct );
void AddFontSelectionMenu( wxMenu* main_menu );
void ProcessFontPreferences( wxCommandEvent& event );
virtual void OnHotKey( wxDC* DC, int hotkey,
EDA_BaseStruct* DrawStruct );
void Affiche_Message( const wxString& message );
void EraseMsgBox();
......
......@@ -110,10 +110,10 @@ WinEDA_ExecBlockCmdFrame::WinEDA_ExecBlockCmdFrame( WinEDA_BasePcbFrame* parent,
wxButton* m_button2;
m_Parent = parent;
SetFont( *g_DialogFont );
Centre();
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
this->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
this->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90,
false, wxEmptyString ) );
/* Sizer 1 creation */
wxFlexGridSizer* fgSizer1;
......@@ -155,10 +155,8 @@ WinEDA_ExecBlockCmdFrame::WinEDA_ExecBlockCmdFrame( WinEDA_BasePcbFrame* parent,
/* Creation des boutons de commande */
m_button2 = new wxButton( this, wxID_CANCEL, _( "Cancel" ), wxDefaultPosition, wxDefaultSize, 0 );
m_button2->SetForegroundColour( *wxBLUE );
fgSizer2->Add( m_button2, 0, wxALL, 5 );
m_button1 = new wxButton( this, wxID_OK, _( "OK" ), wxDefaultPosition, wxDefaultSize, 0 );
m_button1->SetForegroundColour( *wxRED );
m_button1->SetDefault();
fgSizer2->Add( m_button1, 0, wxALL, 5 );
......
......@@ -87,7 +87,6 @@ WinEDA_CotationPropertiesFrame::WinEDA_CotationPropertiesFrame( WinEDA_PcbFrame*
wxButton* Button;
m_Parent = parent;
SetFont( *g_DialogFont );
m_DC = DC;
Centre();
......@@ -102,11 +101,9 @@ WinEDA_CotationPropertiesFrame::WinEDA_CotationPropertiesFrame( WinEDA_PcbFrame*
/* Creation des boutons de commande */
Button = new wxButton( this, wxID_OK, _( "OK" ) );
Button->SetForegroundColour( *wxRED );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) );
Button->SetForegroundColour( *wxBLUE );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
wxString display_msg[2] = { _( "Normal" ), _( "Mirror" ) };
......
......@@ -88,7 +88,6 @@ DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ) :
void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event )
/*************************************************************/
{
SetFont( *g_DialogFont );
SetFocus(); // Make ESC key working
m_ImageXSize_mm = 270;
......
......@@ -129,13 +129,9 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow
bRightSizer->Add( 10, 10, 0, 0, 5 );
m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonOK->SetForegroundColour( wxColour( 204, 0, 0 ) );
bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonCANCEL->SetForegroundColour( wxColour( 0, 0, 200 ) );
bRightSizer->Add( m_buttonCANCEL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bMainSizer->Add( bRightSizer, 0, wxEXPAND|wxALL, 5 );
......
......@@ -826,7 +826,7 @@
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg">204,0,0</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_OK</property>
......@@ -878,7 +878,7 @@
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg">0,0,200</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_CANCEL</property>
......
......@@ -416,10 +416,8 @@ bool DrcDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption
void DrcDialog::CreateControls()
{
SetFont( *g_DialogFont );
////@begin DrcDialog content construction
// Generated by DialogBlocks, Wed 19 Mar 2008 11:39:08 CDT (unregistered)
// Generated by DialogBlocks, 29/04/2009 15:13:47 (unregistered)
DrcDialog* itemDialog1 = this;
......@@ -495,19 +493,16 @@ void DrcDialog::CreateControls()
wxButton* itemButton18 = new wxButton( itemDialog1, ID_STARTDRC, _("Start DRC"), wxDefaultPosition, wxDefaultSize, 0 );
if (DrcDialog::ShowToolTips())
itemButton18->SetToolTip(_("Start the Design Rule Checker"));
itemButton18->SetForegroundColour(wxColour(202, 0, 0));
itemBoxSizer17->Add(itemButton18, 0, wxGROW|wxALL, 5);
wxButton* itemButton19 = new wxButton( itemDialog1, ID_LIST_UNCONNECTED, _("List Unconnected"), wxDefaultPosition, wxDefaultSize, 0 );
if (DrcDialog::ShowToolTips())
itemButton19->SetToolTip(_("List unconnected pads or tracks"));
itemButton19->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer17->Add(itemButton19, 0, wxGROW|wxALL, 5);
m_DeleteAllButton = new wxButton( itemDialog1, ID_DELETE_ALL, _("Delete All Markers"), wxDefaultPosition, wxDefaultSize, 0 );
if (DrcDialog::ShowToolTips())
m_DeleteAllButton->SetToolTip(_("Delete every marker"));
m_DeleteAllButton->SetForegroundColour(wxColour(0, 128, 0));
itemBoxSizer17->Add(m_DeleteAllButton, 0, wxGROW|wxALL, 5);
m_DeleteCurrentMarkerButton = new wxButton( itemDialog1, ID_DELETE_ONE, _("Delete Current Marker"), wxDefaultPosition, wxDefaultSize, 0 );
......@@ -546,7 +541,6 @@ void DrcDialog::CreateControls()
m_MainSizer->Add(StdDialogButtonSizer, 0, wxGROW|wxALL, 10);
wxButton* itemButton27 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton27->SetForegroundColour(wxColour(0, 0, 255));
StdDialogButtonSizer->AddButton(itemButton27);
wxButton* itemButton28 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
......
......@@ -62,7 +62,7 @@ class wxStdDialogButtonSizer;
#define SYMBOL_DRCDIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX
#define SYMBOL_DRCDIALOG_TITLE _("DRC Control")
#define SYMBOL_DRCDIALOG_IDNAME ID_DIALOG
#define SYMBOL_DRCDIALOG_SIZE wxSize(450, 300)
#define SYMBOL_DRCDIALOG_SIZE wxSize(400, 300)
#define SYMBOL_DRCDIALOG_POSITION wxDefaultPosition
////@end control identifiers
......
......@@ -20,6 +20,7 @@
<string name="resource_prefix">""</string>
<bool name="use_two_step_construction">0</bool>
<bool name="use_enums">0</bool>
<bool name="generate_for_xrced">0</bool>
<string name="current_platform">"&lt;All platforms&gt;"</string>
<string name="target_wx_version">"&lt;Any&gt;"</string>
<string name="cpp_header_comment">"/////////////////////////////////////////////////////////////////////////////
......@@ -114,6 +115,7 @@
<bool name="archive_all_image_files">0</bool>
<bool name="xrc_retain_relative_paths">1</bool>
<bool name="xrc_generate_id_tags">0</bool>
<bool name="xrc_use_name_property">0</bool>
</header>
<data>
<document>
......@@ -136,6 +138,7 @@
<long name="locked">0</long>
<string name="template-name">""</string>
<bool name="dirty">1</bool>
<long name="makefile-last-written">0</long>
<string name="Compiler name">""</string>
<string name="Build mode">"Debug"</string>
<string name="Unicode mode">"ANSI"</string>
......@@ -156,6 +159,7 @@
<string name="Compiler location">"%AUTO%"</string>
<string name="wxWidgets location">"%AUTO%"</string>
<string name="C++ command">"%AUTO%"</string>
<string name="C command">"%AUTO%"</string>
<string name="Resource compiler">"%AUTO%"</string>
<string name="Make command">"%AUTO%"</string>
<string name="Project makefile">"%AUTO%"</string>
......@@ -167,6 +171,7 @@
<string name="Optimizations">"%AUTO%"</string>
<string name="Warnings">"%AUTO%"</string>
<string name="Debug flags">"%AUTO%"</string>
<string name="Extra compile flags">"%AUTO%"</string>
<string name="Libraries">"%AUTO%"</string>
<string name="Library path">"%AUTO%"</string>
<string name="Linker flags">"%AUTO%"</string>
......@@ -177,6 +182,9 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
<bool name="Suppress source rules">0</bool>
<bool name="Enable makefile generation">1</bool>
<string name="CFG">""</string>
</document>
</document>
</data>
......@@ -1094,7 +1102,7 @@
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">"CA0000"</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
......@@ -1161,7 +1169,7 @@
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">"0000FF"</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
......@@ -1228,7 +1236,7 @@
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">"008000"</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
......@@ -1690,7 +1698,7 @@
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">"0000FF"</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
......
......@@ -47,7 +47,6 @@ WinEDA_ModulePropertiesFrame::WinEDA_ModulePropertiesFrame( WinEDA_BasePcbFrame*
SetIcon( wxICON( icon_modedit ) ); // Give an icon
m_Parent = parent;
SetFont( *g_DialogFont );
m_DC = DC;
m_LayerCtrl = NULL;
......@@ -85,12 +84,10 @@ void WinEDA_ModulePropertiesFrame::CreateControls()
SetSizer( m_GeneralBoxSizer );
m_NoteBook = new wxNotebook( this, ID_NOTEBOOK );
m_NoteBook->SetFont( *g_DialogFont );
m_GeneralBoxSizer->Add( m_NoteBook, 0, wxGROW | wxALL, 5 );
// Add panels
m_PanelProperties = new wxPanel( m_NoteBook, -1 );
m_PanelProperties->SetFont( *g_DialogFont );
m_PanelPropertiesBoxSizer = new wxBoxSizer( wxHORIZONTAL );
m_PanelProperties->SetSizer( m_PanelPropertiesBoxSizer );
BuildPanelModuleProperties( FullOptions );
......@@ -118,11 +115,9 @@ void WinEDA_ModulePropertiesFrame::CreateControls()
m_GeneralBoxSizer->Add( ButtonsBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
Button = new wxButton( this, wxID_OK, _( "OK" ) );
Button->SetForegroundColour( *wxRED );
ButtonsBoxSizer->Add( Button, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) );
Button->SetForegroundColour( *wxBLUE );
ButtonsBoxSizer->Add( Button, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
}
......@@ -187,11 +182,9 @@ void WinEDA_ModulePropertiesFrame::BuildPanelModuleProperties( bool FullOptions
wxStaticText* YPositionStatic = new wxStaticText(m_PanelProperties, -1, _("Y"));
Button = new wxButton( m_PanelProperties, ID_MODULE_PROPERTIES_EXCHANGE,
_( "Change module(s)" ) );
Button->SetForegroundColour( wxColor( 80, 40, 0 ) );
PropRightSizer->Add( Button, 0, wxGROW | wxALL, 5 );
Button = new wxButton( m_PanelProperties, ID_GOTO_MODULE_EDITOR,
_( "Edit Module" ) );
Button->SetForegroundColour( wxColor( 0, 128, 80 ) );
PropRightSizer->Add( Button, 0, wxGROW | wxALL, 5 );
wxStaticBox* positionBox = new wxStaticBox(m_PanelProperties, -1, _("Position") );
......@@ -244,17 +237,14 @@ void WinEDA_ModulePropertiesFrame::BuildPanelModuleProperties( bool FullOptions
Button = new wxButton( m_PanelProperties, ID_MODULE_EDIT_ADD_TEXT,
_( "Add Field" ) );
Button->SetForegroundColour( *wxBLACK );
StaticBoxSizer->Add( Button, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
Button = new wxButton( m_PanelProperties, ID_MODULE_EDIT_EDIT_TEXT,
_( "Edit Field" ) );
Button->SetForegroundColour( *wxBLACK );
StaticBoxSizer->Add( Button, 0, wxGROW | wxLEFT | wxRIGHT, 5 );
m_DeleteFieddButton = Button = new wxButton( m_PanelProperties, ID_MODULE_EDIT_DELETE_TEXT,
_( "Delete Field" ) );
m_DeleteFieddButton->SetForegroundColour( *wxBLACK );
m_DeleteFieddButton->Enable( FALSE ); // Enable pour fields autres que ref et valeur
StaticBoxSizer->Add( Button, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
......@@ -400,7 +390,6 @@ Panel3D_Ctrl::Panel3D_Ctrl( WinEDA_ModulePropertiesFrame* parentframe,
m_Parent = parent;
m_ParentFrame = parentframe;
SetFont( *g_DialogFont );
wxBoxSizer* Panel3DBoxSizer = new wxBoxSizer( wxVERTICAL );
SetSizer( Panel3DBoxSizer );
......@@ -422,17 +411,14 @@ Panel3D_Ctrl::Panel3D_Ctrl( WinEDA_ModulePropertiesFrame* parentframe,
LowerBoxSizer->Add( PropRightSizer, 0, wxGROW | wxALL, 5 );
button = new wxButton( this, ID_BROWSE_3D_LIB, _( "Browse" ) );
button->SetForegroundColour( *wxBLUE );
PropRightSizer->Add( button, 0, wxGROW | wxLEFT | wxRIGHT, 5 );
button = new wxButton( this, ID_ADD_3D_SHAPE, _( "Add 3D Shape" ) );
button->SetForegroundColour( *wxRED );
PropRightSizer->Add( button, 0, wxGROW | wxLEFT | wxRIGHT, 5 );
if( (struct3D == NULL) || (struct3D->Back() != NULL) )
{
button = new wxButton( this, ID_REMOVE_3D_SHAPE, _( "Remove 3D Shape" ) );
button->SetForegroundColour( *wxRED );
PropRightSizer->Add( button, 0, wxGROW | wxLEFT | wxRIGHT, 5 );
}
......
......@@ -77,7 +77,6 @@ void DialogEditModuleText::OnCancelClick( wxCommandEvent& event )
void DialogEditModuleText::OnInitDialog( wxInitDialogEvent& event )
/********************************************************/
{
SetFont( *g_DialogFont );
SetFocus();
wxString msg;
......
......@@ -104,13 +104,9 @@ DialogEditModuleText_base::DialogEditModuleText_base( wxWindow* parent, wxWindow
m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonOK->SetDefault();
m_buttonOK->SetForegroundColour( wxColour( 202, 0, 0 ) );
bSizer5->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonCANCEL->SetForegroundColour( wxColour( 0, 0, 220 ) );
bSizer5->Add( m_buttonCANCEL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
bSizer2->Add( bSizer5, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
......
......@@ -1032,7 +1032,7 @@
<property name="context_help"></property>
<property name="default">1</property>
<property name="enabled">1</property>
<property name="fg">202,0,0</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_OK</property>
......@@ -1084,7 +1084,7 @@
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg">0,0,220</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_CANCEL</property>
......
......@@ -73,7 +73,6 @@ WinEDA_DrillFrame::WinEDA_DrillFrame( WinEDA_PcbFrame* parent, wxWindowID id,
const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
m_Parent = parent;
//SetFont( *g_DialogFont );
SetReturnCode( 1 );
Init();
......@@ -152,7 +151,7 @@ void WinEDA_DrillFrame::Init()
void WinEDA_DrillFrame::CreateControls()
{
////@begin WinEDA_DrillFrame content construction
// Generated by DialogBlocks, 12/08/2008 13:05:18 (unregistered)
// Generated by DialogBlocks, 29/04/2009 15:14:32 (unregistered)
WinEDA_DrillFrame* itemDialog1 = this;
......@@ -177,7 +176,7 @@ void WinEDA_DrillFrame::CreateControls()
m_Choice_Zeros_Format = new wxRadioBox( itemDialog1, ID_SEL_ZEROS_FMT, _("Zeros Format"), wxDefaultPosition, wxDefaultSize, m_Choice_Zeros_FormatStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Zeros_Format->SetSelection(0);
if (WinEDA_DrillFrame::ShowToolTips())
m_Choice_Zeros_Format->SetToolTip(_("Choose excellon numbers notation"));
m_Choice_Zeros_Format->SetToolTip(_("Choose EXCELLON numbers notation"));
m_LeftBoxSizer->Add(m_Choice_Zeros_Format, 0, wxALIGN_LEFT|wxALL, 5);
wxArrayString m_Choice_PrecisionStrings;
......@@ -186,7 +185,7 @@ void WinEDA_DrillFrame::CreateControls()
m_Choice_Precision = new wxRadioBox( itemDialog1, ID_SEL_PRECISION, _("Precision"), wxDefaultPosition, wxDefaultSize, m_Choice_PrecisionStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Precision->SetSelection(0);
if (WinEDA_DrillFrame::ShowToolTips())
m_Choice_Precision->SetToolTip(_("Choose excellon numbers precision"));
m_Choice_Precision->SetToolTip(_("Choose EXCELLON numbers precision"));
m_LeftBoxSizer->Add(m_Choice_Precision, 0, wxGROW|wxALL, 5);
wxArrayString m_Choice_Drill_OffsetStrings;
......@@ -247,7 +246,7 @@ void WinEDA_DrillFrame::CreateControls()
m_Check_Minimal = new wxCheckBox( itemDialog1, ID_CHECKBOX3, _("minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
m_Check_Minimal->SetValue(false);
if (WinEDA_DrillFrame::ShowToolTips())
m_Check_Minimal->SetToolTip(_("If checked, the excellon header is minimal"));
m_Check_Minimal->SetToolTip(_("If checked, the EXCELLON header is minimal"));
itemStaticBoxSizer16->Add(m_Check_Minimal, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer19 = new wxBoxSizer(wxVERTICAL);
......@@ -291,11 +290,9 @@ void WinEDA_DrillFrame::CreateControls()
m_OkButton = new wxButton( itemDialog1, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
m_OkButton->SetDefault();
m_OkButton->SetForegroundColour(wxColour(156, 1, 5));
itemBoxSizer19->Add(m_OkButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_CancelButton = new wxButton( itemDialog1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
m_CancelButton->SetForegroundColour(wxColour(16, 1, 205));
itemBoxSizer19->Add(m_CancelButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
// Set validators
......
......@@ -20,6 +20,7 @@
<string name="resource_prefix">""</string>
<bool name="use_two_step_construction">0</bool>
<bool name="use_enums">0</bool>
<bool name="generate_for_xrced">0</bool>
<string name="current_platform">"&lt;All platforms&gt;"</string>
<string name="target_wx_version">"2.8.7"</string>
<string name="cpp_header_comment">"/////////////////////////////////////////////////////////////////////////////
......@@ -106,6 +107,7 @@
<bool name="archive_all_image_files">0</bool>
<bool name="xrc_retain_relative_paths">1</bool>
<bool name="xrc_generate_id_tags">0</bool>
<bool name="xrc_use_name_property">0</bool>
</header>
<data>
<document>
......@@ -149,6 +151,7 @@
<string name="Compiler location">"%AUTO%"</string>
<string name="wxWidgets location">"%AUTO%"</string>
<string name="C++ command">"%AUTO%"</string>
<string name="C command">"%AUTO%"</string>
<string name="Resource compiler">"%AUTO%"</string>
<string name="Make command">"%AUTO%"</string>
<string name="Project makefile">"%AUTO%"</string>
......@@ -160,6 +163,7 @@
<string name="Optimizations">"%AUTO%"</string>
<string name="Warnings">"%AUTO%"</string>
<string name="Debug flags">"%AUTO%"</string>
<string name="Extra compile flags">"%AUTO%"</string>
<string name="Libraries">"%AUTO%"</string>
<string name="Library path">"%AUTO%"</string>
<string name="Linker flags">"%AUTO%"</string>
......@@ -172,6 +176,7 @@
<string name="PATH variable">"%AUTO%"</string>
<bool name="Suppress source rules">0</bool>
<bool name="Enable makefile generation">1</bool>
<string name="CFG">""</string>
</document>
</document>
</data>
......@@ -1876,7 +1881,7 @@
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">"9C0105"</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
......@@ -1943,7 +1948,7 @@
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">"1001CD"</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
......
......@@ -35,7 +35,6 @@ Dialog_GeneralOptions::Dialog_GeneralOptions( WinEDA_PcbFrame* parent, wxDC* DC
void Dialog_GeneralOptions::init()
/********************************************************************/
{
SetFont( *g_DialogFont );
SetFocus();
/* Set display options */
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Feb 8 2009)
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -81,41 +81,49 @@ DialogGeneralOptionsBoardEditor_base::DialogGeneralOptionsBoardEditor_base( wxWi
m_DrcOn = new wxCheckBox( this, wxID_DRC_ONOFF, _("Drc ON"), wxDefaultPosition, wxDefaultSize, 0 );
m_DrcOn->SetValue(true);
m_DrcOn->SetToolTip( _("Enable/disable the DRC control.\nWhen DRC is disable, all connections are allowed.") );
bMiddleRightBoxSizer->Add( m_DrcOn, 0, wxALL|wxEXPAND, 5 );
m_ShowGlobalRatsnest = new wxCheckBox( this, wxID_GENERAL_RATSNEST, _("Show Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
m_ShowGlobalRatsnest->SetToolTip( _("Show (or not) the full rastnest.") );
bMiddleRightBoxSizer->Add( m_ShowGlobalRatsnest, 0, wxALL, 5 );
m_ShowModuleRatsnest = new wxCheckBox( this, wxID_RATSNEST_MODULE, _("Show Mod Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
m_ShowModuleRatsnest->SetToolTip( _("Shows (or not) the local ratsnest relative to a footprint, when moving it.\nThis ratsnest is useful to place a footprint.") );
bMiddleRightBoxSizer->Add( m_ShowModuleRatsnest, 0, wxALL, 5 );
m_TrackAutodel = new wxCheckBox( this, wxID_TRACK_AUTODEL, _("Tracks Auto Del"), wxDefaultPosition, wxDefaultSize, 0 );
m_TrackAutodel->SetToolTip( _("Enable/disable the automatic track deletion when recreating a track.") );
bMiddleRightBoxSizer->Add( m_TrackAutodel, 0, wxALL, 5 );
m_Track_45_Only_Ctrl = new wxCheckBox( this, wxID_TRACKS45, _("Track only 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
m_Track_45_Only_Ctrl->SetToolTip( _("If enabled, force tracks directions to H, V or 45 degrees, when creating a track.") );
bMiddleRightBoxSizer->Add( m_Track_45_Only_Ctrl, 0, wxALL, 5 );
m_Segments_45_Only_Ctrl = new wxCheckBox( this, wxID_SEGMENTS45, _("Segments 45 Only"), wxDefaultPosition, wxDefaultSize, 0 );
m_Segments_45_Only_Ctrl->SetToolTip( _("If enabled, force segments directions to H, V or 45 degrees, when creating a segment on technical layers.") );
bMiddleRightBoxSizer->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 );
m_AutoPANOpt = new wxCheckBox( this, wxID_AUTOPAN, _("Auto PAN"), wxDefaultPosition, wxDefaultSize, 0 );
m_AutoPANOpt->SetToolTip( _("Allows auto pan when creating a track, or moving an item.") );
bMiddleRightBoxSizer->Add( m_AutoPANOpt, 0, wxALL, 5 );
m_Track_DoubleSegm_Ctrl = new wxCheckBox( this, wxID_ANY, _("Double Segm Track"), wxDefaultPosition, wxDefaultSize, 0 );
m_Track_DoubleSegm_Ctrl->SetToolTip( _("If enabled, uses two track segments, with 45 degrees angle between them when creating a new track ") );
bMiddleRightBoxSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxALL, 5 );
......@@ -143,13 +151,9 @@ DialogGeneralOptionsBoardEditor_base::DialogGeneralOptionsBoardEditor_base( wxWi
m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonOK->SetDefault();
m_buttonOK->SetForegroundColour( wxColour( 174, 0, 0 ) );
bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonCANCEL->SetForegroundColour( wxColour( 0, 0, 200 ) );
bRightSizer->Add( m_buttonCANCEL, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
bMainSizer->Add( bRightSizer, 1, wxEXPAND, 5 );
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Feb 8 2009)
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -72,12 +72,11 @@ class DialogGeneralOptionsBoardEditor_base : public wxDialog
wxButton* m_buttonCANCEL;
// Virtual event handlers, overide them in your derived class
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
public:
DialogGeneralOptionsBoardEditor_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("General settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 585,280 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DialogGeneralOptionsBoardEditor_base();
......
......@@ -72,7 +72,6 @@ void DialogGraphicItemProperties::OnInitDialog( wxInitDialogEvent& event )
* according to the item parameters values
*/
{
SetFont( *g_DialogFont );
SetFocus();
wxString msg;
......
......@@ -181,10 +181,8 @@ bool WinEDA_GraphicItemsOptionsDialog::Create( wxWindow* parent, wxWindowID id,
void WinEDA_GraphicItemsOptionsDialog::CreateControls()
{
SetFont(*g_DialogFont);
////@begin WinEDA_GraphicItemsOptionsDialog content construction
// Generated by DialogBlocks, Mon 26 Nov 2007 18:58:29 CST (unregistered)
// Generated by DialogBlocks, 29/04/2009 15:15:02 (unregistered)
WinEDA_GraphicItemsOptionsDialog* itemDialog1 = this;
......@@ -261,11 +259,9 @@ void WinEDA_GraphicItemsOptionsDialog::CreateControls()
itemBoxSizer2->Add(itemBoxSizer25, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton26 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton26->SetForegroundColour(wxColour(206, 0, 0));
itemBoxSizer25->Add(itemButton26, 0, wxGROW|wxALL, 5);
wxButton* itemButton27 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton27->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer25->Add(itemButton27, 0, wxGROW|wxALL, 5);
////@end WinEDA_GraphicItemsOptionsDialog content construction
......
......@@ -20,6 +20,7 @@
<string name="resource_prefix">""</string>
<bool name="use_two_step_construction">0</bool>
<bool name="use_enums">0</bool>
<bool name="generate_for_xrced">0</bool>
<string name="current_platform">"&lt;All platforms&gt;"</string>
<string name="target_wx_version">"&lt;Any&gt;"</string>
<string name="cpp_header_comment">"/////////////////////////////////////////////////////////////////////////////
......@@ -114,6 +115,7 @@
<bool name="archive_all_image_files">0</bool>
<bool name="xrc_retain_relative_paths">1</bool>
<bool name="xrc_generate_id_tags">0</bool>
<bool name="xrc_use_name_property">0</bool>
</header>
<data>
<document>
......@@ -136,6 +138,7 @@
<long name="locked">0</long>
<string name="template-name">""</string>
<bool name="dirty">1</bool>
<long name="makefile-last-written">0</long>
<string name="Compiler name">""</string>
<string name="Build mode">"Debug"</string>
<string name="Unicode mode">"ANSI"</string>
......@@ -156,6 +159,7 @@
<string name="Compiler location">"%AUTO%"</string>
<string name="wxWidgets location">"%AUTO%"</string>
<string name="C++ command">"%AUTO%"</string>
<string name="C command">"%AUTO%"</string>
<string name="Resource compiler">"%AUTO%"</string>
<string name="Make command">"%AUTO%"</string>
<string name="Project makefile">"%AUTO%"</string>
......@@ -167,6 +171,7 @@
<string name="Optimizations">"%AUTO%"</string>
<string name="Warnings">"%AUTO%"</string>
<string name="Debug flags">"%AUTO%"</string>
<string name="Extra compile flags">"%AUTO%"</string>
<string name="Libraries">"%AUTO%"</string>
<string name="Library path">"%AUTO%"</string>
<string name="Linker flags">"%AUTO%"</string>
......@@ -177,6 +182,9 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
<bool name="Suppress source rules">0</bool>
<bool name="Enable makefile generation">1</bool>
<string name="CFG">""</string>
</document>
</document>
</data>
......@@ -1852,7 +1860,7 @@
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">"CE0000"</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
......@@ -1919,7 +1927,7 @@
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">"0000FF"</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
......
......@@ -92,8 +92,6 @@ bool WinEDA_PcbGlobalDeleteFrame::Create( wxWindow* parent, wxWindowID id, const
void WinEDA_PcbGlobalDeleteFrame::CreateControls()
{
SetFont(*g_DialogFont);
////@begin WinEDA_PcbGlobalDeleteFrame content construction
// Generated by DialogBlocks, 15/02/2006 22:10:20 (unregistered)
......
......@@ -110,8 +110,6 @@ void DialogPadProperties::InitDialog( wxInitDialogEvent& event )
int tmp;
wxCommandEvent cmd_event;
SetFont( *g_DialogFont );
SetFocus(); // Required under wxGTK if we want to demiss the dialog with the ESC key
m_PadNumCtrl->SetValue( g_Current_PadName );
......
......@@ -53,7 +53,7 @@ DialogPadPropertiesBase::DialogPadPropertiesBase( wxWindow* parent, wxWindowID i
wxString m_DrillShapeCtrlChoices[] = { _("Circle"), _("Oval") };
int m_DrillShapeCtrlNChoices = sizeof( m_DrillShapeCtrlChoices ) / sizeof( wxString );
m_DrillShapeCtrl = new wxRadioBox( this, ID_RADIOBOX_DRILL_SHAPE, _("Drill Shape:"), wxDefaultPosition, wxDefaultSize, m_DrillShapeCtrlNChoices, m_DrillShapeCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_DrillShapeCtrl->SetSelection( 0 );
m_DrillShapeCtrl->SetSelection( 1 );
m_DrillShapeBoxSizer->Add( m_DrillShapeCtrl, 0, wxALL|wxEXPAND, 5 );
m_MainSizer->Add( m_DrillShapeBoxSizer, 1, wxBOTTOM, 5 );
......@@ -90,13 +90,9 @@ DialogPadPropertiesBase::DialogPadPropertiesBase( wxWindow* parent, wxWindowID i
m_buttonOk = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonOk->SetDefault();
m_buttonOk->SetForegroundColour( wxColour( 209, 26, 5 ) );
m_RightBoxSizer->Add( m_buttonOk, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonCancel->SetForegroundColour( wxColour( 14, 2, 164 ) );
m_RightBoxSizer->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
......
......@@ -691,7 +691,7 @@
<property name="context_help"></property>
<property name="default">1</property>
<property name="enabled">1</property>
<property name="fg">209,26,5</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_OK</property>
......@@ -743,7 +743,7 @@
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg">14,2,164</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_CANCEL</property>
......
......@@ -79,7 +79,6 @@ WinEDA_TextPCBPropertiesFrame::WinEDA_TextPCBPropertiesFrame( WinEDA_PcbFrame* p
m_Parent = parent;
SetFont( *g_DialogFont );
m_DC = DC;
Centre();
......
......@@ -48,26 +48,12 @@ DIALOG_PCBNEW_CONFIG_LIBS::DIALOG_PCBNEW_CONFIG_LIBS( WinEDA_PcbFrame* parent ):
void DIALOG_PCBNEW_CONFIG_LIBS::Init()
/*************************************/
{
SetFont( *g_DialogFont );
SetFocus();
m_LibListChanged = false;
m_LibPathChanged = false;
m_UserLibDirBufferImg = g_UserLibDirBuffer; // Save the original lib path
// Display current files extension (info)
wxString msg = m_InfoBoardFileExt->GetLabel() + PcbExtBuffer;
m_InfoBoardFileExt->SetLabel( msg );
msg = m_InfoCmpFileExt->GetLabel() + NetCmpExtBuffer;
m_InfoCmpFileExt->SetLabel( msg );
msg = m_InfoLibFileExt->GetLabel() + ModuleFileExtension;
m_InfoLibFileExt->SetLabel( msg );
msg = m_InfoNetlistFileExt->GetLabel() + NetExtBuffer;
m_InfoNetlistFileExt->SetLabel( msg );
m_ListLibr->InsertItems( g_LibName_List, 0 );
// Display current modules doc file:
......@@ -90,7 +76,7 @@ void DIALOG_PCBNEW_CONFIG_LIBS::Init()
m_DefaultLibraryPathslistBox->Append( libpaths[ii]);
}
// select the first path afer the current path project
// select the first path after the current path project
if ( libpaths.GetCount() > 1 )
m_DefaultLibraryPathslistBox->Select( 1 );
}
......@@ -107,7 +93,8 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnCancelClick( wxCommandEvent& event )
wxGetApp().RemoveLibraryPath( m_listUserPaths->GetString(ii)) ;
wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1);
}
EndModal( -1 );
EndModal( wxID_CANCEL );
}
......@@ -130,8 +117,8 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnOkClick( wxCommandEvent& event )
}
}
// Set new active library list if the lib list of if default path list was modified
// Set new active library list if the lib list of if default path list
// was modified
if( m_LibListChanged || m_LibPathChanged )
{
// Recreate lib list
......@@ -139,15 +126,17 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnOkClick( wxCommandEvent& event )
for ( unsigned ii = 0; ii < m_ListLibr->GetCount(); ii ++ )
g_LibName_List.Add(m_ListLibr->GetString(ii) );
}
if ( event.GetId() != ID_SAVE_CFG )
EndModal( 0 );
m_Parent->Update_config( this );
EndModal( wxID_OK );
}
/**************************************************************/
void DIALOG_PCBNEW_CONFIG_LIBS::OnCloseWindow( wxCloseEvent& event )
/**************************************************************/
{
EndModal( 0 );
EndModal( wxID_CANCEL );
}
......@@ -156,7 +145,7 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnCloseWindow( wxCloseEvent& event )
void DIALOG_PCBNEW_CONFIG_LIBS::OnRemoveLibClick( wxCommandEvent& event )
/*********************************************************************/
/* Remove a library to the library list.
* The real list (g_LibName_List) is not changed, so the change can be cancelled
* The real list (g_LibName_List) is not changed, so the change can be canceled
*/
{
int ii;
......@@ -177,7 +166,7 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertLibClick( wxCommandEvent& event )
/* Insert or add a library to the library list:
* The new library is put in list before (insert button) the selection,
* or added (add button) to end of list
* The real list (g_LibName_List) is not changed, so the change can be cancelled
* The real list (g_LibName_List) is not changed, so the change can be canceled
*/
{
int ii;
......@@ -213,8 +202,8 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertLibClick( wxCommandEvent& event )
* list, just add the library name to the list. Otherwise, add
* the library name with the full or relative path.
* the relative path, when possible is preferable,
* because it preserve use of default libraries paths, when the path is a sub path of these default paths
*
* because it preserve use of default libraries paths, when the
* path is a sub path of these default paths
*/
if( wxGetApp().GetLibraryPathList().Index( fn.GetPath() ) != wxNOT_FOUND ) // Ok, trivial case
libfilename = fn.GetName();
......@@ -250,27 +239,15 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertLibClick( wxCommandEvent& event )
}
/*******************************************************************/
void DIALOG_PCBNEW_CONFIG_LIBS::OnSaveCfgClick( wxCommandEvent& event )
/*******************************************************************/
{
OnOkClick( event );
m_Parent->Update_config( this );
}
/***********************************************************************/
void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertPath( wxCommandEvent& event )
/***********************************************************************/
{
wxString path = wxGetApp().ReturnLastVisitedLibraryPath();
bool select = EDA_DirectorySelector( _( "Default Path for Libraries" ), /* Titre de la fenetre */
path, /* Chemin par defaut */
wxDD_DEFAULT_STYLE,
this, /* parent frame */
wxDefaultPosition );
bool select = EDA_DirectorySelector( _( "Default Path for Libraries" ),
path, wxDD_DEFAULT_STYLE,
this, wxDefaultPosition );
if( !select )
return;
......@@ -306,7 +283,6 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertPath( wxCommandEvent& event )
DisplayError(this, _("Path already in use") );
wxGetApp().SaveLastVisitedLibraryPath( path );
}
......@@ -333,19 +309,18 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnRemoveUserPath( wxCommandEvent& event )
}
}
/**************************************************************************/
void DIALOG_PCBNEW_CONFIG_LIBS::OnBrowseModDocFile( wxCommandEvent& event )
/**************************************************************************/
{
wxString FullFileName, mask;
wxString FullFileName;
wxString docpath, filename;
docpath = wxGetApp().ReturnLastVisitedLibraryPath(wxT( "doc" ));
mask = wxT( "*.pdf" );
wxFileDialog FilesDialog( this, _( "Footprint document file:" ), docpath,
wxEmptyString, mask,
wxEmptyString, PdfFileWildcard,
wxFD_DEFAULT_STYLE );
if( FilesDialog.ShowModal() != wxID_OK )
......@@ -356,7 +331,8 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnBrowseModDocFile( wxCommandEvent& event )
* list, just add the library name to the list. Otherwise, add
* the library name with the full or relative path.
* the relative path, when possible is preferable,
* because it preserve use of default libraries paths, when the path is a sub path of these default paths
* because it preserve use of default libraries paths, when the path is
* a sub path of these default paths
*/
wxFileName fn = FullFileName;
wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() );
......
......@@ -10,18 +10,17 @@
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/sizer.h>
#include <wx/gdicmn.h>
#include <wx/string.h>
#include <wx/listbox.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/listbox.h>
#include <wx/button.h>
#include <wx/statline.h>
#include <wx/statbox.h>
#include <wx/textctrl.h>
#include <wx/statline.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
......@@ -38,50 +37,41 @@ class DIALOG_PCBNEW_CONFIG_LIBS_FBP : public wxDialog
{
ID_ADD_LIB = 1000,
ID_REMOVE_LIB,
ID_SAVE_CFG,
wxID_BROWSE_MOD_DOC,
ID_LIB_PATH_SEL,
wxID_INSERT_PATH,
wxID_REMOVE_PATH,
};
wxStaticText* m_InfoBoardFileExt;
wxStaticText* m_InfoCmpFileExt;
wxStaticText* m_InfoLibFileExt;
wxStaticText* m_InfoNetlistFileExt;
wxStaticText* m_staticTextlibList;
wxListBox* m_ListLibr;
wxButton* m_buttonAddLib;
wxButton* m_buttonIns;
wxButton* m_buttonRemoveLib;
wxButton* m_buttonOk;
wxButton* m_buttonCancel;
wxButton* m_buttonSave;
wxStaticLine* m_staticline1;
wxTextCtrl* m_TextHelpModulesFileName;
wxButton* m_buttonModDoc;
wxListBox* m_listUserPaths;
wxButton* m_buttonAddPath;
wxButton* m_buttonInsPath;
wxButton* m_buttonRemovePath;
wxStaticText* m_staticTextcurrenpaths;
wxListBox* m_DefaultLibraryPathslistBox;
wxStaticLine* m_staticline1;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); }
virtual void OnAddOrInsertLibClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnRemoveLibClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnSaveCfgClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnBrowseModDocFile( wxCommandEvent& event ){ event.Skip(); }
virtual void OnAddOrInsertPath( wxCommandEvent& event ){ event.Skip(); }
virtual void OnRemoveUserPath( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
public:
DIALOG_PCBNEW_CONFIG_LIBS_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 593,612 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_PCBNEW_CONFIG_LIBS_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PCBNEW_CONFIG_LIBS_FBP();
};
......
......@@ -154,7 +154,6 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_DrawFrame* parent
void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event )
/************************************************************************/
{
SetFont( *g_DialogFont );
SetFocus();
int layer_max = NB_LAYERS;
wxString msg;
......
......@@ -29,7 +29,6 @@ DIALOG_TRACKS_OPTIONS::DIALOG_TRACKS_OPTIONS( WinEDA_PcbFrame* parent )
void DIALOG_TRACKS_OPTIONS::OnInitDialog( wxInitDialogEvent& event )
{
SetFont( *g_DialogFont );
SetFocus();
// deselect the existing text, seems SetFocus() wants to emulate Microsoft, which is not desireable here.
......
......@@ -131,13 +131,9 @@ DIALOG_TRACKS_OPTIONS_BASE::DIALOG_TRACKS_OPTIONS_BASE( wxWindow* parent, wxWind
m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonOK->SetDefault();
m_buttonOK->SetForegroundColour( wxColour( 194, 0, 0 ) );
bRightSizer->Add( m_buttonOK, 0, wxALL, 5 );
m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonCANCEL->SetForegroundColour( wxColour( 2, 2, 196 ) );
bRightSizer->Add( m_buttonCANCEL, 0, wxALL, 5 );
bMainSizer->Add( bRightSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
......
......@@ -1109,7 +1109,7 @@
<property name="context_help"></property>
<property name="default">1</property>
<property name="enabled">1</property>
<property name="fg">194,0,0</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_OK</property>
......@@ -1161,7 +1161,7 @@
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg">2,2,196</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_CANCEL</property>
......
......@@ -151,13 +151,13 @@ IMPLEMENT_DYNAMIC_CLASS( WinEDA_PcbFindFrame, wxDialog )
BEGIN_EVENT_TABLE( WinEDA_PcbFindFrame, wxDialog )
////@begin WinEDA_PcbFindFrame event table entries
EVT_BUTTON( ID_FIND_ITEM, WinEDA_PcbFindFrame::OnFindItemClick )
EVT_BUTTON( ID_FIND_ITEM, WinEDA_PcbFindFrame::OnFindItemClick )
EVT_BUTTON( ID_FIND_NEXT_ITEM, WinEDA_PcbFindFrame::OnFindNextItemClick )
EVT_BUTTON( ID_FIND_NEXT_ITEM, WinEDA_PcbFindFrame::OnFindNextItemClick )
EVT_BUTTON( ID_FIND_MARKER, WinEDA_PcbFindFrame::OnFindMarkerClick )
EVT_BUTTON( ID_FIND_MARKER, WinEDA_PcbFindFrame::OnFindMarkerClick )
EVT_BUTTON( ID_FIND_NEXT_MARKER, WinEDA_PcbFindFrame::OnFindNextMarkerClick )
EVT_BUTTON( ID_FIND_NEXT_MARKER, WinEDA_PcbFindFrame::OnFindNextMarkerClick )
////@end WinEDA_PcbFindFrame event table entries
......@@ -202,18 +202,18 @@ bool WinEDA_PcbFindFrame::Create( wxWindow* parent,
{
////@begin WinEDA_PcbFindFrame member initialisation
m_NewText = NULL;
////@end WinEDA_PcbFindFrame member initialisation
////@begin WinEDA_PcbFindFrame creation
SetExtraStyle( GetExtraStyle() | wxWS_EX_BLOCK_EVENTS );
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
if (GetSizer())
{
GetSizer()->SetSizeHints(this);
}
Centre();
////@end WinEDA_PcbFindFrame creation
return true;
}
......@@ -225,64 +225,41 @@ bool WinEDA_PcbFindFrame::Create( wxWindow* parent,
void WinEDA_PcbFindFrame::CreateControls()
{
SetFont( *g_DialogFont );
////@begin WinEDA_PcbFindFrame content construction
// Generated by DialogBlocks, 04/03/2006 14:04:20 (unregistered)
// Generated by DialogBlocks, 29/04/2009 15:15:49 (unregistered)
WinEDA_PcbFindFrame* itemDialog1 = this;
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxVERTICAL );
itemDialog1->SetSizer( itemBoxSizer2 );
wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC,
_(
"Item to find:" ),
wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add( itemStaticText3,
0,
wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
5 );
m_NewText = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(
"" ), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add( m_NewText, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer( wxHORIZONTAL );
itemBoxSizer2->Add( itemBoxSizer5,
0,
wxALIGN_CENTER_HORIZONTAL | wxLEFT | wxRIGHT | wxBOTTOM,
5 );
wxBoxSizer* itemBoxSizer6 = new wxBoxSizer( wxVERTICAL );
itemBoxSizer5->Add( itemBoxSizer6, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5 );
wxButton* itemButton7 = new wxButton( itemDialog1, ID_FIND_ITEM, _(
"Find Item" ), wxDefaultPosition, wxDefaultSize, 0 );
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
itemDialog1->SetSizer(itemBoxSizer2);
wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC, _("Item to find:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add(itemStaticText3, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_NewText = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add(m_NewText, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer2->Add(itemBoxSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer5->Add(itemBoxSizer6, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
wxButton* itemButton7 = new wxButton( itemDialog1, ID_FIND_ITEM, _("Find Item"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton7->SetDefault();
itemButton7->SetForegroundColour( wxColour( 102, 0, 0 ) );
itemBoxSizer6->Add( itemButton7, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
wxButton* itemButton8 = new wxButton( itemDialog1, ID_FIND_NEXT_ITEM, _(
"Find Next Item" ), wxDefaultPosition, wxDefaultSize,
0 );
itemButton8->SetForegroundColour( wxColour( 111, 0, 0 ) );
itemBoxSizer6->Add( itemButton8, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
wxBoxSizer* itemBoxSizer9 = new wxBoxSizer( wxVERTICAL );
itemBoxSizer5->Add( itemBoxSizer9, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5 );
wxButton* itemButton10 = new wxButton( itemDialog1, ID_FIND_MARKER, _(
"Find Marker" ), wxDefaultPosition, wxDefaultSize,
0 );
itemButton10->SetForegroundColour( wxColour( 0, 0, 255 ) );
itemBoxSizer9->Add( itemButton10, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
wxButton* itemButton11 = new wxButton( itemDialog1, ID_FIND_NEXT_MARKER, _(
"Find Next Marker" ), wxDefaultPosition,
wxDefaultSize, 0 );
itemButton11->SetForegroundColour( wxColour( 0, 0, 255 ) );
itemBoxSizer9->Add( itemButton11, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
itemBoxSizer6->Add(itemButton7, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
wxButton* itemButton8 = new wxButton( itemDialog1, ID_FIND_NEXT_ITEM, _("Find Next Item"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer6->Add(itemButton8, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer5->Add(itemBoxSizer9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
wxButton* itemButton10 = new wxButton( itemDialog1, ID_FIND_MARKER, _("Find Marker"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer9->Add(itemButton10, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
wxButton* itemButton11 = new wxButton( itemDialog1, ID_FIND_NEXT_MARKER, _("Find Next Marker"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer9->Add(itemButton11, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
////@end WinEDA_PcbFindFrame content construction
}
......@@ -306,9 +283,8 @@ wxBitmap WinEDA_PcbFindFrame::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin WinEDA_PcbFindFrame bitmap retrieval
wxUnusedVar( name );
wxUnusedVar(name);
return wxNullBitmap;
////@end WinEDA_PcbFindFrame bitmap retrieval
}
......@@ -321,9 +297,8 @@ wxIcon WinEDA_PcbFindFrame::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin WinEDA_PcbFindFrame icon retrieval
wxUnusedVar( name );
wxUnusedVar(name);
return wxNullIcon;
////@end WinEDA_PcbFindFrame icon retrieval
}
......
......@@ -34,16 +34,16 @@
////@begin control identifiers
#define ID_DIALOG 10000
#define SYMBOL_WINEDA_PCBFINDFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_PCBFINDFRAME_TITLE _("Find")
#define SYMBOL_WINEDA_PCBFINDFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_PCBFINDFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_PCBFINDFRAME_POSITION wxDefaultPosition
#define ID_TEXTCTRL 10001
#define ID_FIND_ITEM 10002
#define ID_FIND_NEXT_ITEM 10003
#define ID_FIND_MARKER 10004
#define ID_FIND_NEXT_MARKER 10005
#define SYMBOL_WINEDA_PCBFINDFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_PCBFINDFRAME_TITLE _("Find")
#define SYMBOL_WINEDA_PCBFINDFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_PCBFINDFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_PCBFINDFRAME_POSITION wxDefaultPosition
////@end control identifiers
/*!
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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