Commit dc978a9c authored by jean-pierre charras's avatar jean-pierre charras

Code cleaning and Fix a crash under wxWidgets 2.9.2 and Linux, related to wxFileHistory.

Coding policy fixes and dialog design rules cosmetic enhancement.
parents cf8f8ca2 d5dbb531
......@@ -213,7 +213,6 @@ void EDA_BASE_FRAME::UpdateFileHistory( const wxString& FullFileName,
fileHistory = & wxGetApp().m_fileHistory;
fileHistory->AddFileToHistory( FullFileName );
ReCreateMenuBar();
}
......@@ -245,7 +244,6 @@ wxString EDA_BASE_FRAME::GetFileFromHistory( int cmdId, const wxString& type,
DisplayError( this, msg );
fileHistory->RemoveFileFromHistory( i );
fn = wxEmptyString;
ReCreateMenuBar();
}
}
......
......@@ -41,7 +41,7 @@ BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, EDA_BASE_FRAME )
CVPCB_MAINFRAME::SaveQuitCvpcb )
EVT_MENU( wxID_EXIT,
CVPCB_MAINFRAME::OnQuit )
EVT_MENU( ID_GENERAL_HELP,
EVT_MENU( wxID_HELP,
CVPCB_MAINFRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT,
CVPCB_MAINFRAME::GetKicadAbout )
......@@ -461,8 +461,6 @@ void CVPCB_MAINFRAME::LoadNetList( wxCommandEvent& event )
if( ReadNetList() )
{
UpdateFileHistory( m_NetlistFileName.GetFullPath() );
SetTitle( wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() +
wxT( " " ) + m_NetlistFileName.GetFullPath() );
}
......@@ -470,8 +468,6 @@ void CVPCB_MAINFRAME::LoadNetList( wxCommandEvent& event )
{
SetTitle( wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() );
}
ReCreateMenuBar();
}
......
......@@ -60,8 +60,6 @@ void WinEDA_App::MacOpenFile(const wxString &fileName)
if( frame->ReadNetList() )
{
frame->UpdateFileHistory( filename.GetFullPath() );
frame->SetTitle( wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() +
wxT( " " ) + filename.GetFullPath() );
}
......@@ -69,9 +67,6 @@ void WinEDA_App::MacOpenFile(const wxString &fileName)
{
frame->SetTitle( wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() );
}
frame->ReCreateMenuBar();
}
// Create a new application object
......
......@@ -115,6 +115,9 @@ bool CVPCB_MAINFRAME::ReadNetList()
/* Update the title of the main window. */
SetTitle( wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() +
wxT( " " ) + m_NetlistFileName.GetFullPath() );
UpdateFileHistory( m_NetlistFileName.GetFullPath() );
return true;
}
......
......@@ -23,7 +23,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
wxMenuItem* item;
wxMenuBar* menuBar = GetMenuBar();
if( ! menuBar )
if( ! menuBar ) // Delete all menus
menuBar = new wxMenuBar();
// Delete all existing menus so they can be rebuilt.
......@@ -45,8 +45,14 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
open_document_xpm );
// Open Recent submenu
wxMenu* openRecentMenu = new wxMenu();
wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu );
static wxMenu* openRecentMenu;
// Add this menu to list menu managed by m_fileHistory
// (the file history will be updated when adding/removing files in history
if( openRecentMenu )
wxGetApp().m_fileHistory.RemoveMenu( openRecentMenu );
openRecentMenu = new wxMenu();
wxGetApp().m_fileHistory.UseMenu( openRecentMenu );
wxGetApp().m_fileHistory.AddFilesToMenu( );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu, -1,
_( "Open &Recent" ),
_("Open a recent opened netlist document" ),
......@@ -111,8 +117,8 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
AddHelpVersionInfoMenuEntry( helpMenu );
// Contents
ADD_MENUITEM_WITH_HELP( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
_( "Open the cvpcb manual" ),
ADD_MENUITEM_WITH_HELP( helpMenu, wxID_HELP, _( "&Contents" ),
_( "Open the Cvpcb handbook" ),
online_help_xpm );
// About
......
......@@ -158,15 +158,13 @@ bool WinEDA_App::OnInit()
filename.SetExt( SchematicFileExtension );
wxSetWorkingDirectory( filename.GetPath() );
if( frame->DrawPanel
&& frame->LoadOneEEProject( filename.GetFullPath(), false ) )
if( frame->LoadOneEEProject( filename.GetFullPath(), false ) )
frame->DrawPanel->Refresh( true );
}
else
{
// Read a default config file if no file to load.
frame->LoadProjectFile( wxEmptyString, TRUE );
if( frame->DrawPanel )
frame->DrawPanel->Refresh( TRUE );
}
......
......@@ -153,9 +153,6 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew )
{
if( !IsOK( this, _( "Discard changes to the current schematic?" ) ) )
return false;
if( g_RootSheet->GetScreen()->GetFileName() != m_DefaultSchematicFileName )
UpdateFileHistory( g_RootSheet->GetScreen()->GetFileName() );
}
FullFileName = FileName;
......@@ -304,6 +301,8 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew )
bool diag = g_RootSheet->Load( this );
SetScreen( m_CurrentSheet->LastScreen() );
UpdateFileHistory( g_RootSheet->GetScreen()->GetFileName() );
/* Redraw base screen (ROOT) if necessary. */
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
Zoom_Automatique( false );
......
......@@ -114,7 +114,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_MENU( ID_LIBEDIT_SAVE_CURRENT_LIB_AS, LIB_EDIT_FRAME::SaveActiveLibrary )
EVT_MENU( ID_LIBEDIT_GEN_PNG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent )
EVT_MENU( ID_LIBEDIT_GEN_SVG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent )
EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( ID_COLORS_SETUP, LIB_EDIT_FRAME::OnColorConfig )
EVT_MENU( ID_CONFIG_REQ, LIB_EDIT_FRAME::InstallConfigFrame )
......
......@@ -61,10 +61,16 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
fileMenu->Append( item );
// Open Recent submenu
wxMenu* openRecentMenu = new wxMenu();
static wxMenu* openRecentMenu;
// Add this menu to list menu managed by m_fileHistory
// (the file history will be updated when adding/removing files in history
if( openRecentMenu )
wxGetApp().m_fileHistory.RemoveMenu( openRecentMenu );
openRecentMenu = new wxMenu();
wxGetApp().m_fileHistory.UseMenu( openRecentMenu );
wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( fileMenu, openRecentMenu,
-1, _( "Open &Recent" ),
wxID_ANY, _( "Open &Recent" ),
_( "Open a recent opened schematic project" ),
open_project_xpm );
// Separator
......@@ -464,9 +470,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// Contents
item = new wxMenuItem( helpMenu,
ID_GENERAL_HELP,
wxID_HELP,
_( "&Contents" ),
_( "Open the eeschema manual" ) );
_( "Open the Eeschema handbook" ) );
SET_BITMAP( online_help_xpm );
helpMenu->Append( item );
......
......@@ -275,7 +275,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
// Contens
item = new wxMenuItem( helpMenu,
ID_GENERAL_HELP,
wxID_HELP,
_( "&Contents" ),
_( "Open the eeschema manual" ) );
SET_BITMAP( online_help_xpm );
......
......@@ -99,7 +99,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_TOOL( ID_FIND_ITEMS, SCH_EDIT_FRAME::OnFindItems )
EVT_TOOL( ID_BACKANNO_ITEMS, SCH_EDIT_FRAME::OnLoadStuffFile )
EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout )
// Tools and buttons for vertical toolbar.
......
......@@ -60,7 +60,7 @@ EVT_MENU( ID_MENU_GERBVIEW_SELECT_PREFERED_EDITOR,
EVT_MENU( ID_GERBVIEW_GLOBAL_DELETE, GERBVIEW_FRAME::Process_Special_Functions )
// Menu Help
EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout )
EVT_TOOL( wxID_CUT, GERBVIEW_FRAME::Process_Special_Functions )
......
......@@ -55,8 +55,14 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void )
gerber_open_dcode_file_xpm );
// Recent gerber files
wxMenu* openRecentGbrMenu = new wxMenu();
wxGetApp().m_fileHistory.AddFilesToMenu( openRecentGbrMenu );
static wxMenu* openRecentGbrMenu;
// Add this menu to list menu managed by m_fileHistory
// (the file history will be updated when adding/removing files in history
if( openRecentGbrMenu )
wxGetApp().m_fileHistory.RemoveMenu( openRecentGbrMenu );
openRecentGbrMenu = new wxMenu();
wxGetApp().m_fileHistory.UseMenu( openRecentGbrMenu );
wxGetApp().m_fileHistory.AddFilesToMenu();
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( fileMenu, openRecentGbrMenu,
wxID_ANY,
_( "Open &Recent Gerber File" ),
......@@ -64,8 +70,12 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void )
gerber_recent_files_xpm );
// Recent drill files
wxMenu* openRecentDrlMenu = new wxMenu();
m_drillFileHistory.AddFilesToMenu( openRecentDrlMenu );
static wxMenu* openRecentDrlMenu;
if( openRecentDrlMenu )
wxGetApp().m_fileHistory.RemoveMenu( openRecentDrlMenu );
openRecentDrlMenu = new wxMenu();
wxGetApp().m_fileHistory.UseMenu( openRecentDrlMenu );
m_drillFileHistory.AddFilesToMenu( );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( fileMenu, openRecentDrlMenu,
wxID_ANY,
_( "Open Recent &Drill File" ),
......@@ -184,9 +194,9 @@ void GERBVIEW_FRAME::ReCreateMenuBar( void )
// Contents
ADD_MENUITEM_WITH_HELP( helpMenu,
ID_GENERAL_HELP,
wxID_HELP,
_( "&Contents" ),
_( "Open the gerbview manual" ),
_( "Open the Gerbview handbook" ),
help_xpm );
// About gerbview
......
......@@ -51,13 +51,7 @@ enum main_id
ID_GEN_COPY_BLOCK_TO_CLIPBOARD,
ID_GEN_EXPORT_FILE,
ID_GEN_EXPORT_SPECCTRA,
ID_GEN_EXPORT_FILE_GENCADFORMAT,
ID_GEN_EXPORT_FILE_MODULE_REPORT,
ID_GEN_IMPORT_FILE,
ID_GEN_IMPORT_SPECCTRA_SESSION,
ID_GEN_IMPORT_SPECCTRA_DESIGN,
ID_EXIT,
ID_OPTIONS_SETUP,
......@@ -68,10 +62,7 @@ enum main_id
ID_OPT_TOOLBAR,
ID_AUX_TOOLBAR,
ID_GENERAL_HELP,
ID_HELP_COPY_VERSION_STRING,
ID_LOCAL_HELP,
ID_KICAD_ABOUT, // @todo all handle by wxID_ABOUT
ID_EDIT,
ID_NO_TOOL_SELECTED,
......
......@@ -192,6 +192,9 @@ public:
/**
* Function GetFileFromHistory
* fetches the file name from the file history list.
* and removes the selected file, if this file does not exists
* Note also the menu is updated, if wxFileHistory::UseMenu
* was called at init time
* @param cmdId The command ID associated with the \a aFileHistory object.
* @param type Please document me!
* @param aFileHistory The wxFileHistory in use. If null, the main application file
......@@ -203,15 +206,23 @@ public:
/**
* Function UpdateFileHistory
* ypdates the list of recently opened files.
* Updates the list of recently opened files.
* Note also the menu is updated, if wxFileHistory::UseMenu
* was called at init time
* @param FullFileName The full file name including the path.
* @param aFileHistory The wxFileHistory in use. If NULL, the main application file
* history is used.
* @param aFileHistory The wxFileHistory in use.
* If NULL, the main application file history is used.
*/
void UpdateFileHistory( const wxString& FullFileName,
wxFileHistory * aFileHistory = NULL );
void DisplayActivity( int PerCent, const wxString& Text );
/**
* Function ReCreateMenuBar
* Creates recreates the menu bar.
* Needed when the language is changed
*/
virtual void ReCreateMenuBar();
};
......
......@@ -11,7 +11,7 @@
#include "../bitmap2component/bitmap2component.xpm"
RIGHT_KM_FRAME::RIGHT_KM_FRAME( WinEDA_MainFrame* parent ) :
RIGHT_KM_FRAME::RIGHT_KM_FRAME( KICAD_MANAGER_FRAME* parent ) :
wxSashLayoutWindow( parent, wxID_ANY )
{
#define BUTTON_HEIGHT 32
......
......@@ -27,11 +27,11 @@ static const wxString ZipFileExtension( wxT( "zip" ) );
static const wxString ZipFileWildcard( wxT( "Zip file (*.zip) | *.zip" ) );
void WinEDA_MainFrame::OnFileHistory( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnFileHistory( wxCommandEvent& event )
{
wxString fn;
fn = GetFileFromHistory( event.GetId(), _( "Printed circuit board" ) );
fn = GetFileFromHistory( event.GetId(), _( "Kicad project file" ) );
if( fn != wxEmptyString )
{
......@@ -39,11 +39,9 @@ void WinEDA_MainFrame::OnFileHistory( wxCommandEvent& event )
m_ProjectFileName = fn;
OnLoadProject( cmd );
}
ReCreateMenuBar();
}
void WinEDA_MainFrame::OnUnarchiveFiles( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnUnarchiveFiles( wxCommandEvent& event )
{
wxFileName fn = m_ProjectFileName;
fn.SetExt( ZipFileExtension );
......@@ -109,7 +107,7 @@ void WinEDA_MainFrame::OnUnarchiveFiles( wxCommandEvent& event )
}
void WinEDA_MainFrame::OnArchiveFiles( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnArchiveFiles( wxCommandEvent& event )
{
size_t i;
wxFileName fileName = m_ProjectFileName;
......
......@@ -43,7 +43,7 @@ IMPLEMENT_APP( WinEDA_App )
* http://wiki.wxwidgets.org/WxMac-specific_topics
*/
void WinEDA_App::MacOpenFile(const wxString &fileName) {
WinEDA_MainFrame * frame = ((WinEDA_MainFrame*)GetTopWindow());
KICAD_MANAGER_FRAME * frame = ((KICAD_MANAGER_FRAME*)GetTopWindow());
wxFileName fn = fileName;
frame->m_ProjectFileName = fn;
......@@ -75,7 +75,7 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) {
bool WinEDA_App::OnInit()
/*****************************************************************************/
{
WinEDA_MainFrame* frame;
KICAD_MANAGER_FRAME* frame;
InitEDA_Appl( wxT( "KiCad" ), APP_TYPE_KICAD );
......@@ -86,7 +86,7 @@ bool WinEDA_App::OnInit()
/* Make nameless project translatable */
wxFileName namelessProject( wxGetCwd(), NAMELESS_PROJECT, ProjectFileExtension );
frame = new WinEDA_MainFrame( NULL, wxT( "KiCad" ),
frame = new KICAD_MANAGER_FRAME( NULL, wxT( "KiCad" ),
wxPoint( 30, 20 ), wxSize( 600, 400 ) );
if( argc > 1 )
......
......@@ -54,10 +54,10 @@ enum id_kicad_frm {
};
/* class WinEDA_MainFrame
/* class KICAD_MANAGER_FRAME
* This is the main kicad frame
*/
class WinEDA_MainFrame : public EDA_BASE_FRAME
class KICAD_MANAGER_FRAME : public EDA_BASE_FRAME
{
public:
TREE_PROJECT_FRAME* m_LeftWin;
......@@ -72,10 +72,10 @@ private:
public:
WinEDA_MainFrame( wxWindow* parent, const wxString& title,
KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title,
const wxPoint& pos, const wxSize& size );
~WinEDA_MainFrame();
~KICAD_MANAGER_FRAME();
/**
* Function CreateCommandToolbar
......@@ -143,7 +143,7 @@ class RIGHT_KM_FRAME : public wxSashLayoutWindow
public:
wxTextCtrl* m_DialogWin;
private:
WinEDA_MainFrame* m_Parent;
KICAD_MANAGER_FRAME* m_Parent;
int m_ButtonsPanelHeight;
wxPanel* m_ButtPanel;
int m_ButtonSeparation; // button distance in pixels
......@@ -153,7 +153,7 @@ private:
wxPoint m_ButtonLastPosition; // position of the last button in the window
public:
RIGHT_KM_FRAME( WinEDA_MainFrame* parent );
RIGHT_KM_FRAME( KICAD_MANAGER_FRAME* parent );
~RIGHT_KM_FRAME() { };
void OnSize( wxSizeEvent& event );
......
/***********************************************************/
/* mdiframe.cpp - WinEDA_MainFrame is the kicad main frame */
/* mdiframe.cpp - KICAD_MANAGER_FRAME is the kicad main frame */
/***********************************************************/
#ifdef __GNUG__
......@@ -21,7 +21,7 @@
static const wxString TreeFrameWidthEntry( wxT( "LeftWinWidth" ) );
WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent,
const wxString& title,
const wxPoint& pos,
const wxSize& size ) :
......@@ -99,7 +99,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
}
WinEDA_MainFrame::~WinEDA_MainFrame()
KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME()
{
m_auimgr.UnInit();
}
......@@ -108,7 +108,7 @@ WinEDA_MainFrame::~WinEDA_MainFrame()
/*
* Put text in the dialog frame
*/
void WinEDA_MainFrame::PrintMsg( const wxString& text )
void KICAD_MANAGER_FRAME::PrintMsg( const wxString& text )
{
m_RightWin->m_DialogWin->AppendText( text );
}
......@@ -116,13 +116,13 @@ void WinEDA_MainFrame::PrintMsg( const wxString& text )
/* Resize windows when dragging window borders
*/
void WinEDA_MainFrame::OnSashDrag( wxSashEvent& event )
void KICAD_MANAGER_FRAME::OnSashDrag( wxSashEvent& event )
{
event.Skip();
}
void WinEDA_MainFrame::OnSize( wxSizeEvent& event )
void KICAD_MANAGER_FRAME::OnSize( wxSizeEvent& event )
{
if( m_auimgr.GetManagedWindow() )
m_auimgr.Update();
......@@ -131,7 +131,7 @@ void WinEDA_MainFrame::OnSize( wxSizeEvent& event )
}
void WinEDA_MainFrame::OnCloseWindow( wxCloseEvent& Event )
void KICAD_MANAGER_FRAME::OnCloseWindow( wxCloseEvent& Event )
{
int px, py;
......@@ -166,18 +166,18 @@ void WinEDA_MainFrame::OnCloseWindow( wxCloseEvent& Event )
}
void WinEDA_MainFrame::OnExit( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnExit( wxCommandEvent& event )
{
Close( true );
}
void WinEDA_MainFrame::OnRunBitmapConverter( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnRunBitmapConverter( wxCommandEvent& event )
{
ExecuteFile( this, BITMAPCONVERTER_EXE, wxEmptyString );
}
void WinEDA_MainFrame::OnRunPcbNew( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnRunPcbNew( wxCommandEvent& event )
{
wxFileName fn( m_ProjectFileName );
......@@ -186,7 +186,7 @@ void WinEDA_MainFrame::OnRunPcbNew( wxCommandEvent& event )
}
void WinEDA_MainFrame::OnRunCvpcb( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event )
{
wxFileName fn( m_ProjectFileName );
......@@ -195,7 +195,7 @@ void WinEDA_MainFrame::OnRunCvpcb( wxCommandEvent& event )
}
void WinEDA_MainFrame::OnRunEeschema( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event )
{
wxFileName fn( m_ProjectFileName );
......@@ -204,7 +204,7 @@ void WinEDA_MainFrame::OnRunEeschema( wxCommandEvent& event )
}
void WinEDA_MainFrame::OnRunGerbview( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnRunGerbview( wxCommandEvent& event )
{
wxFileName fn( m_ProjectFileName );
wxString path = wxT("\"");
......@@ -214,7 +214,7 @@ void WinEDA_MainFrame::OnRunGerbview( wxCommandEvent& event )
}
void WinEDA_MainFrame::OnOpenTextEditor( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnOpenTextEditor( wxCommandEvent& event )
{
wxString editorname = wxGetApp().GetEditorName();
......@@ -223,7 +223,7 @@ void WinEDA_MainFrame::OnOpenTextEditor( wxCommandEvent& event )
}
void WinEDA_MainFrame::OnOpenFileInTextEditor( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnOpenFileInTextEditor( wxCommandEvent& event )
{
wxString mask( wxT( "*" ) );
......@@ -246,13 +246,13 @@ void WinEDA_MainFrame::OnOpenFileInTextEditor( wxCommandEvent& event )
}
void WinEDA_MainFrame::OnRefresh( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnRefresh( wxCommandEvent& event )
{
m_LeftWin->ReCreateTreePrj();
}
void WinEDA_MainFrame::ClearMsg()
void KICAD_MANAGER_FRAME::ClearMsg()
{
m_RightWin->m_DialogWin->Clear();
}
......@@ -264,7 +264,7 @@ void WinEDA_MainFrame::ClearMsg()
* Don't forget to call this base method from any derived classes or the
* settings will not get loaded.
*/
void WinEDA_MainFrame::LoadSettings()
void KICAD_MANAGER_FRAME::LoadSettings()
{
wxASSERT( wxGetApp().m_EDA_Config != NULL );
......@@ -281,7 +281,7 @@ void WinEDA_MainFrame::LoadSettings()
* Don't forget to call this base method from any derived classes or the
* settings will not get saved.
*/
void WinEDA_MainFrame::SaveSettings()
void KICAD_MANAGER_FRAME::SaveSettings()
{
wxASSERT( wxGetApp().m_EDA_Config != NULL );
......@@ -291,4 +291,3 @@ void WinEDA_MainFrame::SaveSettings()
cfg->Write( TreeFrameWidthEntry, m_LeftWin->GetSize().x );
}
......@@ -10,49 +10,49 @@
#include "bitmaps.h"
/* Menubar and toolbar event table */
BEGIN_EVENT_TABLE( WinEDA_MainFrame, EDA_BASE_FRAME )
BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME )
/* Window events */
EVT_SIZE( WinEDA_MainFrame::OnSize )
EVT_CLOSE( WinEDA_MainFrame::OnCloseWindow )
EVT_SIZE( KICAD_MANAGER_FRAME::OnSize )
EVT_CLOSE( KICAD_MANAGER_FRAME::OnCloseWindow )
/* Sash drag events */
EVT_SASH_DRAGGED( ID_LEFT_FRAME, WinEDA_MainFrame::OnSashDrag )
EVT_SASH_DRAGGED( ID_LEFT_FRAME, KICAD_MANAGER_FRAME::OnSashDrag )
/* Toolbar events */
EVT_TOOL( ID_NEW_PROJECT, WinEDA_MainFrame::OnLoadProject )
EVT_TOOL( ID_LOAD_PROJECT, WinEDA_MainFrame::OnLoadProject )
EVT_TOOL( ID_SAVE_PROJECT, WinEDA_MainFrame::OnSaveProject )
EVT_TOOL( ID_SAVE_AND_ZIP_FILES, WinEDA_MainFrame::OnArchiveFiles )
EVT_TOOL( ID_NEW_PROJECT, KICAD_MANAGER_FRAME::OnLoadProject )
EVT_TOOL( ID_LOAD_PROJECT, KICAD_MANAGER_FRAME::OnLoadProject )
EVT_TOOL( ID_SAVE_PROJECT, KICAD_MANAGER_FRAME::OnSaveProject )
EVT_TOOL( ID_SAVE_AND_ZIP_FILES, KICAD_MANAGER_FRAME::OnArchiveFiles )
/* Menu events */
EVT_MENU( ID_SAVE_PROJECT, WinEDA_MainFrame::OnSaveProject )
EVT_MENU( wxID_EXIT, WinEDA_MainFrame::OnExit )
EVT_MENU( ID_TO_EDITOR, WinEDA_MainFrame::OnOpenTextEditor )
EVT_MENU( ID_BROWSE_AN_SELECT_FILE, WinEDA_MainFrame::OnOpenFileInTextEditor )
EVT_MENU( ID_SAVE_PROJECT, KICAD_MANAGER_FRAME::OnSaveProject )
EVT_MENU( wxID_EXIT, KICAD_MANAGER_FRAME::OnExit )
EVT_MENU( ID_TO_EDITOR, KICAD_MANAGER_FRAME::OnOpenTextEditor )
EVT_MENU( ID_BROWSE_AN_SELECT_FILE, KICAD_MANAGER_FRAME::OnOpenFileInTextEditor )
EVT_MENU( ID_SELECT_PREFERED_EDITOR, EDA_BASE_FRAME::OnSelectPreferredEditor )
EVT_MENU( ID_SELECT_DEFAULT_PDF_BROWSER, WinEDA_MainFrame::OnSelectDefaultPdfBrowser )
EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER, WinEDA_MainFrame::OnSelectPreferredPdfBrowser )
EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER_NAME, WinEDA_MainFrame::OnSelectPreferredPdfBrowser )
EVT_MENU( ID_SAVE_AND_ZIP_FILES, WinEDA_MainFrame::OnArchiveFiles )
EVT_MENU( ID_READ_ZIP_ARCHIVE, WinEDA_MainFrame::OnUnarchiveFiles )
EVT_MENU( ID_PROJECT_TREE_REFRESH, WinEDA_MainFrame::OnRefresh )
EVT_MENU( ID_GENERAL_HELP, WinEDA_MainFrame::GetKicadHelp )
EVT_MENU( wxID_ABOUT, WinEDA_MainFrame::GetKicadAbout )
EVT_MENU( ID_SELECT_DEFAULT_PDF_BROWSER, KICAD_MANAGER_FRAME::OnSelectDefaultPdfBrowser )
EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER, KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser )
EVT_MENU( ID_SELECT_PREFERED_PDF_BROWSER_NAME, KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser )
EVT_MENU( ID_SAVE_AND_ZIP_FILES, KICAD_MANAGER_FRAME::OnArchiveFiles )
EVT_MENU( ID_READ_ZIP_ARCHIVE, KICAD_MANAGER_FRAME::OnUnarchiveFiles )
EVT_MENU( ID_PROJECT_TREE_REFRESH, KICAD_MANAGER_FRAME::OnRefresh )
EVT_MENU( wxID_HELP, KICAD_MANAGER_FRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT, KICAD_MANAGER_FRAME::GetKicadAbout )
/* Range menu events */
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, WinEDA_MainFrame::SetLanguage )
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, KICAD_MANAGER_FRAME::SetLanguage )
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, WinEDA_MainFrame::OnFileHistory )
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, KICAD_MANAGER_FRAME::OnFileHistory )
/* Button events */
EVT_BUTTON( ID_TO_PCB, WinEDA_MainFrame::OnRunPcbNew )
EVT_BUTTON( ID_TO_CVPCB, WinEDA_MainFrame::OnRunCvpcb )
EVT_BUTTON( ID_TO_EESCHEMA, WinEDA_MainFrame::OnRunEeschema )
EVT_BUTTON( ID_TO_GERBVIEW, WinEDA_MainFrame::OnRunGerbview )
EVT_BUTTON( ID_TO_BITMAP_CONVERTER, WinEDA_MainFrame::OnRunBitmapConverter )
EVT_BUTTON( ID_TO_PCB, KICAD_MANAGER_FRAME::OnRunPcbNew )
EVT_BUTTON( ID_TO_CVPCB, KICAD_MANAGER_FRAME::OnRunCvpcb )
EVT_BUTTON( ID_TO_EESCHEMA, KICAD_MANAGER_FRAME::OnRunEeschema )
EVT_BUTTON( ID_TO_GERBVIEW, KICAD_MANAGER_FRAME::OnRunGerbview )
EVT_BUTTON( ID_TO_BITMAP_CONVERTER, KICAD_MANAGER_FRAME::OnRunBitmapConverter )
EVT_UPDATE_UI( ID_SELECT_DEFAULT_PDF_BROWSER, WinEDA_MainFrame::OnUpdateDefaultPdfBrowser )
EVT_UPDATE_UI( ID_SELECT_PREFERED_PDF_BROWSER, WinEDA_MainFrame::OnUpdatePreferredPdfBrowser )
EVT_UPDATE_UI( ID_SELECT_DEFAULT_PDF_BROWSER, KICAD_MANAGER_FRAME::OnUpdateDefaultPdfBrowser )
EVT_UPDATE_UI( ID_SELECT_PREFERED_PDF_BROWSER, KICAD_MANAGER_FRAME::OnUpdatePreferredPdfBrowser )
END_EVENT_TABLE()
......@@ -60,7 +60,7 @@ END_EVENT_TABLE()
/**
* @brief (Re)Create the menubar
*/
void WinEDA_MainFrame::ReCreateMenuBar()
void KICAD_MANAGER_FRAME::ReCreateMenuBar()
{
// Create and try to get the current menubar
wxMenuItem* item;
......@@ -88,8 +88,14 @@ void WinEDA_MainFrame::ReCreateMenuBar()
open_project_xpm );
// Open Recent submenu
wxMenu* openRecentMenu = new wxMenu();
wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu );
static wxMenu* openRecentMenu;
// Add this menu to list menu managed by m_fileHistory
// (the file history will be updated when adding/removing files in history
if( openRecentMenu )
wxGetApp().m_fileHistory.RemoveMenu( openRecentMenu );
openRecentMenu = new wxMenu();
wxGetApp().m_fileHistory.UseMenu( openRecentMenu );
wxGetApp().m_fileHistory.AddFilesToMenu( );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( fileMenu, openRecentMenu,
wxID_ANY,
_( "Open &Recent" ),
......@@ -217,9 +223,9 @@ void WinEDA_MainFrame::ReCreateMenuBar()
// Contents
ADD_MENUITEM_WITH_HELP( helpMenu,
ID_GENERAL_HELP,
wxID_HELP,
_( "&Contents" ),
_( "Open the kicad manual" ),
_( "Open the Kicad handbook" ),
online_help_xpm );
// Separator
......@@ -251,7 +257,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
/**
* @brief (Re)Create the horizontal toolbar
*/
void WinEDA_MainFrame::RecreateBaseHToolbar()
void KICAD_MANAGER_FRAME::RecreateBaseHToolbar()
{
// Check if toolbar is not already created
if( m_HToolBar != NULL )
......
......@@ -18,26 +18,26 @@
#include <wx/fontdlg.h>
void WinEDA_MainFrame::OnUpdateDefaultPdfBrowser( wxUpdateUIEvent& event )
void KICAD_MANAGER_FRAME::OnUpdateDefaultPdfBrowser( wxUpdateUIEvent& event )
{
event.Check( wxGetApp().m_PdfBrowserIsDefault );
}
void WinEDA_MainFrame::OnSelectDefaultPdfBrowser( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnSelectDefaultPdfBrowser( wxCommandEvent& event )
{
wxGetApp().m_PdfBrowserIsDefault = true;
wxGetApp().WritePdfBrowserInfos();
}
void WinEDA_MainFrame::OnUpdatePreferredPdfBrowser( wxUpdateUIEvent& event )
void KICAD_MANAGER_FRAME::OnUpdatePreferredPdfBrowser( wxUpdateUIEvent& event )
{
event.Check( !wxGetApp().m_PdfBrowserIsDefault );
}
void WinEDA_MainFrame::OnSelectPreferredPdfBrowser( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser( wxCommandEvent& event )
{
bool select = event.GetId() == ID_SELECT_PREFERED_PDF_BROWSER_NAME;
......@@ -69,7 +69,7 @@ void WinEDA_MainFrame::OnSelectPreferredPdfBrowser( wxCommandEvent& event )
wxGetApp().WritePdfBrowserInfos();
}
void WinEDA_MainFrame::SetLanguage( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::SetLanguage( wxCommandEvent& event )
{
EDA_BASE_FRAME::SetLanguage( event );
}
......@@ -21,7 +21,7 @@ static const wxString SchematicRootNameEntry( wxT( "RootSch" ) );
static const wxString BoardFileNameEntry( wxT( "BoardNm" ) );
void WinEDA_MainFrame::CreateNewProject( const wxString PrjFullFileName )
void KICAD_MANAGER_FRAME::CreateNewProject( const wxString PrjFullFileName )
{
wxString filename;
wxFileName newProjectName = PrjFullFileName;
......@@ -59,7 +59,7 @@ void WinEDA_MainFrame::CreateNewProject( const wxString PrjFullFileName )
/**
* Loading a new project
*/
void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event )
{
int style;
wxString title;
......@@ -78,7 +78,6 @@ void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event )
style = wxFD_OPEN | wxFD_FILE_MUST_EXIST;
}
UpdateFileHistory( m_ProjectFileName.GetFullPath() );
wxFileDialog dlg( this, title, wxGetCwd(), wxEmptyString,
ProjectFileWildcard, style );
......@@ -98,8 +97,6 @@ void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event )
}
CreateNewProject( m_ProjectFileName.GetFullPath() );
}
UpdateFileHistory( m_ProjectFileName.GetFullPath() );
}
wxLogDebug( wxT( "Loading Kicad project file: " ) +
......@@ -136,7 +133,7 @@ void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event )
/**
* Save the project top level configuration parameters.
*/
void WinEDA_MainFrame::OnSaveProject( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::OnSaveProject( wxCommandEvent& event )
{
wxString fn;
......
......@@ -94,7 +94,7 @@ END_EVENT_TABLE()
/******************************************************************/
TREE_PROJECT_FRAME::TREE_PROJECT_FRAME( WinEDA_MainFrame* parent ) :
TREE_PROJECT_FRAME::TREE_PROJECT_FRAME( KICAD_MANAGER_FRAME* parent ) :
wxSashLayoutWindow( parent,
ID_LEFT_FRAME,
wxDefaultPosition,
......
......@@ -66,7 +66,7 @@ protected:
TREEPROJECT_ITEM* GetItemIdData(wxTreeItemId aId);
public:
WinEDA_MainFrame* m_Parent;
KICAD_MANAGER_FRAME* m_Parent;
TREEPROJECTFILES* m_TreeProject;
wxTreeItemId m_root;
......@@ -75,7 +75,7 @@ public:
static wxString GetFileExt( TreeFileType type );
static wxString GetFileWildcard( TreeFileType type );
TREE_PROJECT_FRAME( WinEDA_MainFrame* parent );
TREE_PROJECT_FRAME( KICAD_MANAGER_FRAME* parent );
~TREE_PROJECT_FRAME();
void OnSelect( wxTreeEvent& Event );
void OnExpand( wxTreeEvent& Event );
......
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_design_rules.cpp
/////////////////////////////////////////////////////////////////////////////
......@@ -45,6 +44,10 @@
#include "wx/generic/gridctrl.h"
#include "dialog_design_rules_aux_helper_class.h"
// Column labels for net lists
#define NET_TITLE _( "Net" )
#define CLASS_TITLE _( "Class" )
// Field Positions on rules grid
enum {
GRID_CLEARANCE,
......@@ -161,8 +164,8 @@ DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES( PCB_EDIT_FRAME* parent ) :
column0.SetMask( wxLIST_MASK_TEXT );
column1.SetMask( wxLIST_MASK_TEXT );
column0.SetText( _( "Net" ) );
column1.SetText( _( "Class" ) );
column0.SetText( NET_TITLE );
column1.SetText( CLASS_TITLE );
m_leftListCtrl->InsertColumn( 0, column0 );
m_leftListCtrl->InsertColumn( 1, column1 );
......@@ -429,24 +432,30 @@ void DIALOG_DESIGN_RULES::FillListBoxWithNetNames( NETS_LIST_CTRL* aListCtrl,
#endif
// to speed up inserting we hide the control temporarily
aListCtrl->Hide();
// Add netclass info to m_Netnames and m_Classnames wxArrayString buffers
// aListCtrl uses wxLC_VIRTUAL option, so this is fast
wxClientDC sDC(aListCtrl);
int row = 0;
// recompute the column widths here, after setting texts
int net_colsize = sDC.GetTextExtent( NET_TITLE ).x;
int class_colsize = sDC.GetTextExtent( CLASS_TITLE ).x;
for( PNETCUPS::iterator i = ptrList.begin(); i!=ptrList.end(); ++i, ++row )
{
wxSize net_needed = sDC.GetTextExtent( (*i)->net );
wxSize class_needed = sDC.GetTextExtent( (*i)->clazz );
net_colsize = MAX( net_colsize, net_needed.x );
class_colsize = MAX( class_colsize, class_needed.x );
aListCtrl->setRowItems( row, (*i)->net, (*i)->clazz );
}
// recompute the column widths here, after setting texts
aListCtrl->SetColumnWidth( 0, wxLIST_AUTOSIZE );
aListCtrl->SetColumnWidth( 1, wxLIST_AUTOSIZE );
aListCtrl->Show();
int margin = sDC.GetTextExtent( wxT("XX") ).x;;
aListCtrl->SetColumnWidth( 0, net_colsize + margin);
aListCtrl->SetColumnWidth( 1, class_colsize + margin);
aListCtrl->Refresh();
}
/* Initialize the combo boxes by the list of existing net classes
/* Populates combo boxes with the list of existing net classes
*/
void DIALOG_DESIGN_RULES::InitializeRulesSelectionBoxes()
{
......
......@@ -153,7 +153,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_panelNetClassesEditor->SetSizer( bpanelNetClassesSizer );
m_panelNetClassesEditor->Layout();
bpanelNetClassesSizer->Fit( m_panelNetClassesEditor );
m_DRnotebook->AddPage( m_panelNetClassesEditor, _("Net Classes Editor"), true );
m_DRnotebook->AddPage( m_panelNetClassesEditor, _("Net Classes Editor"), false );
m_panelGolbalDesignRules = new wxPanel( m_DRnotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
wxBoxSizer* bpanelGlobRulesSizer;
bpanelGlobRulesSizer = new wxBoxSizer( wxVERTICAL );
......@@ -172,72 +172,21 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
sbViasOptionSizer->Add( m_OptViaType, 0, wxALL|wxEXPAND, 5 );
wxFlexGridSizer* fgViasMinValuesSizer;
fgViasMinValuesSizer = new wxFlexGridSizer( 2, 2, 0, 0 );
fgViasMinValuesSizer->AddGrowableCol( 1 );
fgViasMinValuesSizer->SetFlexibleDirection( wxBOTH );
fgViasMinValuesSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_ViaMinTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Min via diameter"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaMinTitle->Wrap( -1 );
fgViasMinValuesSizer->Add( m_ViaMinTitle, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_SetViasMinSizeCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgViasMinValuesSizer->Add( m_SetViasMinSizeCtrl, 0, wxEXPAND|wxALL, 5 );
m_ViaMinDrillTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Min via drill dia"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaMinDrillTitle->Wrap( -1 );
fgViasMinValuesSizer->Add( m_ViaMinDrillTitle, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT, 5 );
m_SetViasMinDrillCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgViasMinValuesSizer->Add( m_SetViasMinDrillCtrl, 0, wxALL|wxEXPAND, 5 );
sbViasOptionSizer->Add( fgViasMinValuesSizer, 0, wxEXPAND, 5 );
bDesignRulesUpperSizer->Add( sbViasOptionSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
wxStaticBoxSizer* sbuViasSizer;
sbuViasSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Micro Via Options:") ), wxVERTICAL );
wxString m_AllowMicroViaCtrlChoices[] = { _("Do not allow micro vias"), _("Allow micro vias") };
int m_AllowMicroViaCtrlNChoices = sizeof( m_AllowMicroViaCtrlChoices ) / sizeof( wxString );
m_AllowMicroViaCtrl = new wxRadioBox( m_panelGolbalDesignRules, wxID_ANY, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, m_AllowMicroViaCtrlNChoices, m_AllowMicroViaCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AllowMicroViaCtrl->SetSelection( 0 );
m_AllowMicroViaCtrl->SetToolTip( _("Allows or do not allow use of micro vias\nThey are very small vias only from an external copper layer to its near neightbour") );
sbuViasSizer->Add( m_AllowMicroViaCtrl, 0, wxALL|wxEXPAND, 5 );
wxFlexGridSizer* fgMinMicroviasValuesSizer;
fgMinMicroviasValuesSizer = new wxFlexGridSizer( 2, 2, 0, 0 );
fgMinMicroviasValuesSizer->AddGrowableCol( 1 );
fgMinMicroviasValuesSizer->SetFlexibleDirection( wxBOTH );
fgMinMicroviasValuesSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_MicroViaMinSizeTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Min uvia diameter"), wxDefaultPosition, wxDefaultSize, 0 );
m_MicroViaMinSizeTitle->Wrap( -1 );
fgMinMicroviasValuesSizer->Add( m_MicroViaMinSizeTitle, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_SetMicroViasMinSizeCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SetMicroViasMinSizeCtrl->SetMaxLength( 6 );
fgMinMicroviasValuesSizer->Add( m_SetMicroViasMinSizeCtrl, 0, wxALL|wxEXPAND, 5 );
m_MicroViaMinDrillTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Min uvia drill dia"), wxDefaultPosition, wxDefaultSize, 0 );
m_MicroViaMinDrillTitle->Wrap( -1 );
fgMinMicroviasValuesSizer->Add( m_MicroViaMinDrillTitle, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_SetMicroViasMinDrillCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SetMicroViasMinDrillCtrl->SetMaxLength( 6 );
fgMinMicroviasValuesSizer->Add( m_SetMicroViasMinDrillCtrl, 0, wxALL|wxEXPAND, 5 );
sbViasOptionSizer->Add( m_AllowMicroViaCtrl, 0, wxALL|wxEXPAND, 5 );
sbuViasSizer->Add( fgMinMicroviasValuesSizer, 1, wxEXPAND, 5 );
bDesignRulesUpperSizer->Add( sbuViasSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
bDesignRulesUpperSizer->Add( sbViasOptionSizer, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbMinSizesSizer;
sbMinSizesSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Minimum Allowed Values:") ), wxVERTICAL );
wxFlexGridSizer* fgMinValuesSizer;
fgMinValuesSizer = new wxFlexGridSizer( 1, 2, 0, 0 );
fgMinValuesSizer = new wxFlexGridSizer( 5, 2, 0, 0 );
fgMinValuesSizer->AddGrowableCol( 1 );
fgMinValuesSizer->SetFlexibleDirection( wxBOTH );
fgMinValuesSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
......@@ -249,9 +198,39 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_SetTrackMinWidthCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgMinValuesSizer->Add( m_SetTrackMinWidthCtrl, 0, wxALL|wxEXPAND, 5 );
sbMinSizesSizer->Add( fgMinValuesSizer, 0, 0, 5 );
m_ViaMinTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Min via diameter"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaMinTitle->Wrap( -1 );
fgMinValuesSizer->Add( m_ViaMinTitle, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
m_SetViasMinSizeCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgMinValuesSizer->Add( m_SetViasMinSizeCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_ViaMinDrillTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Min via drill dia"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaMinDrillTitle->Wrap( -1 );
fgMinValuesSizer->Add( m_ViaMinDrillTitle, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT, 5 );
m_SetViasMinDrillCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgMinValuesSizer->Add( m_SetViasMinDrillCtrl, 0, wxALL|wxEXPAND, 5 );
m_MicroViaMinSizeTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Min uvia diameter"), wxDefaultPosition, wxDefaultSize, 0 );
m_MicroViaMinSizeTitle->Wrap( -1 );
fgMinValuesSizer->Add( m_MicroViaMinSizeTitle, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
m_SetMicroViasMinSizeCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SetMicroViasMinSizeCtrl->SetMaxLength( 6 );
fgMinValuesSizer->Add( m_SetMicroViasMinSizeCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_MicroViaMinDrillTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Min uvia drill dia"), wxDefaultPosition, wxDefaultSize, 0 );
m_MicroViaMinDrillTitle->Wrap( -1 );
fgMinValuesSizer->Add( m_MicroViaMinDrillTitle, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_SetMicroViasMinDrillCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SetMicroViasMinDrillCtrl->SetMaxLength( 6 );
fgMinValuesSizer->Add( m_SetMicroViasMinDrillCtrl, 0, wxEXPAND|wxALL, 5 );
sbMinSizesSizer->Add( fgMinValuesSizer, 0, wxEXPAND, 5 );
bDesignRulesUpperSizer->Add( sbMinSizesSizer, 1, wxEXPAND, 5 );
bDesignRulesUpperSizer->Add( sbMinSizesSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bpanelGlobRulesSizer->Add( bDesignRulesUpperSizer, 0, wxEXPAND, 5 );
......@@ -357,7 +336,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_panelGolbalDesignRules->SetSizer( bpanelGlobRulesSizer );
m_panelGolbalDesignRules->Layout();
bpanelGlobRulesSizer->Fit( m_panelGolbalDesignRules );
m_DRnotebook->AddPage( m_panelGolbalDesignRules, _("Global Design Rules"), false );
m_DRnotebook->AddPage( m_panelGolbalDesignRules, _("Global Design Rules"), true );
bMainSizer->Add( m_DRnotebook, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
......
......@@ -199,7 +199,7 @@
<object class="notebookpage" expanded="1">
<property name="bitmap"></property>
<property name="label">Net Classes Editor</property>
<property name="select">1</property>
<property name="select">0</property>
<object class="wxPanel" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
......@@ -1469,7 +1469,7 @@
<object class="notebookpage" expanded="1">
<property name="bitmap"></property>
<property name="label">Global Design Rules</property>
<property name="select">0</property>
<property name="select">1</property>
<object class="wxPanel" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
......@@ -1561,7 +1561,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
......@@ -1660,25 +1660,9 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
<property name="name">fgViasMinValuesSizer</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">2</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
......@@ -1688,6 +1672,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Do not allow micro vias&quot; &quot;Allow micro vias&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
......@@ -1702,14 +1687,15 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Min via diameter</property>
<property name="label">Micro Vias:</property>
<property name="layer"></property>
<property name="majorDimension">1</property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_ViaMinTitle</property>
<property name="name">m_AllowMicroViaCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
......@@ -1719,12 +1705,13 @@
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="tooltip">Allows or do not allow use of micro vias&#x0A;They are very small vias only from an external copper layer to its near neightbour</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
......@@ -1732,7 +1719,6 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
......@@ -1750,6 +1736,7 @@
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
......@@ -1758,11 +1745,41 @@
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Minimum Allowed Values:</property>
<property name="minimum_size"></property>
<property name="name">sbMinSizesSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
<property name="name">fgMinValuesSizer</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">5</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
......@@ -1786,14 +1803,14 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Min track width</property>
<property name="layer"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_SetViasMinSizeCtrl</property>
<property name="name">m_TrackMinWidthTitle</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
......@@ -1813,10 +1830,10 @@
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
......@@ -1839,18 +1856,14 @@
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
......@@ -1874,14 +1887,14 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Min via drill dia</property>
<property name="layer"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_ViaMinDrillTitle</property>
<property name="name">m_SetTrackMinWidthCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
......@@ -1901,10 +1914,10 @@
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
......@@ -1927,14 +1940,18 @@
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="flag">wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
......@@ -1958,14 +1975,14 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Min via diameter</property>
<property name="layer"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_SetViasMinDrillCtrl</property>
<property name="name">m_ViaMinTitle</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
......@@ -1985,10 +2002,10 @@
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
......@@ -2011,34 +2028,14 @@
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Micro Via Options:</property>
<property name="minimum_size"></property>
<property name="name">sbuViasSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
......@@ -2048,7 +2045,6 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Do not allow micro vias&quot; &quot;Allow micro vias&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
......@@ -2063,15 +2059,14 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Micro Vias:</property>
<property name="layer"></property>
<property name="majorDimension">1</property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_AllowMicroViaCtrl</property>
<property name="name">m_SetViasMinSizeCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
......@@ -2081,17 +2076,17 @@
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Allows or do not allow use of micro vias&#x0A;They are very small vias only from an external copper layer to its near neightbour</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -2112,34 +2107,21 @@
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
<property name="name">fgMinMicroviasValuesSizer</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">2</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
......@@ -2165,14 +2147,14 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Min uvia diameter</property>
<property name="label">Min via drill dia</property>
<property name="layer"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_MicroViaMinSizeTitle</property>
<property name="name">m_ViaMinDrillTitle</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
......@@ -2252,11 +2234,11 @@
<property name="layer"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength">6</property>
<property name="maxlength">0</property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_SetMicroViasMinSizeCtrl</property>
<property name="name">m_SetViasMinDrillCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
......@@ -2311,7 +2293,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="flag">wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
......@@ -2337,14 +2319,14 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Min uvia drill dia</property>
<property name="label">Min uvia diameter</property>
<property name="layer"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_MicroViaMinDrillTitle</property>
<property name="name">m_MicroViaMinSizeTitle</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
......@@ -2395,7 +2377,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property>
......@@ -2428,7 +2410,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_SetMicroViasMinDrillCtrl</property>
<property name="name">m_SetMicroViasMinSizeCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
......@@ -2481,41 +2463,9 @@
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Minimum Allowed Values:</property>
<property name="minimum_size"></property>
<property name="name">sbMinSizesSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
<property name="name">fgMinValuesSizer</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">1</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="flag">wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
......@@ -2541,14 +2491,14 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Min track width</property>
<property name="label">Min uvia drill dia</property>
<property name="layer"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_TrackMinWidthTitle</property>
<property name="name">m_MicroViaMinDrillTitle</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
......@@ -2599,7 +2549,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property>
......@@ -2628,11 +2578,11 @@
<property name="layer"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="maxlength">6</property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_SetTrackMinWidthCtrl</property>
<property name="name">m_SetMicroViasMinDrillCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
......
......@@ -71,17 +71,17 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
NETS_LIST_CTRL* m_rightListCtrl;
wxPanel* m_panelGolbalDesignRules;
wxRadioBox* m_OptViaType;
wxRadioBox* m_AllowMicroViaCtrl;
wxStaticText* m_TrackMinWidthTitle;
wxTextCtrl* m_SetTrackMinWidthCtrl;
wxStaticText* m_ViaMinTitle;
wxTextCtrl* m_SetViasMinSizeCtrl;
wxStaticText* m_ViaMinDrillTitle;
wxTextCtrl* m_SetViasMinDrillCtrl;
wxRadioBox* m_AllowMicroViaCtrl;
wxStaticText* m_MicroViaMinSizeTitle;
wxTextCtrl* m_SetMicroViasMinSizeCtrl;
wxStaticText* m_MicroViaMinDrillTitle;
wxTextCtrl* m_SetMicroViasMinDrillCtrl;
wxStaticText* m_TrackMinWidthTitle;
wxTextCtrl* m_SetTrackMinWidthCtrl;
wxStaticLine* m_staticline1;
wxStaticText* m_staticTextInfo;
wxStaticText* m_staticText7;
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -62,7 +62,7 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi
m_OKbutton = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizer->Add( m_OKbutton, 0, wxALL, 5 );
m_Quitbutton = new wxButton( this, wxID_CANCEL, _("Quit"), wxDefaultPosition, wxDefaultSize, 0 );
m_Quitbutton = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizer->Add( m_Quitbutton, 0, wxALL, 5 );
m_Browsebutton = new wxButton( this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
......@@ -72,10 +72,14 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi
bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 );
m_staticTextMsg = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextMsg->Wrap( -1 );
bMainSizer->Add( m_staticTextMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_WinMessages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
m_WinMessages->SetMinSize( wxSize( 450,300 ) );
bMainSizer->Add( m_WinMessages, 1, wxALL|wxEXPAND, 5 );
bMainSizer->Add( m_WinMessages, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
this->SetSizer( bMainSizer );
this->Layout();
......@@ -94,4 +98,5 @@ DIALOG_EXCHANGE_MODULE_BASE::~DIALOG_EXCHANGE_MODULE_BASE()
m_OKbutton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnOkClick ), NULL, this );
m_Quitbutton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnQuit ), NULL, this );
m_Browsebutton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::BrowseAndSelectFootprint ), NULL, this );
}
This source diff could not be displayed because it is too large. You can view the blob instead.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -44,16 +44,18 @@ class DIALOG_EXCHANGE_MODULE_BASE : public wxDialog
wxButton* m_OKbutton;
wxButton* m_Quitbutton;
wxButton* m_Browsebutton;
wxStaticText* m_staticTextMsg;
wxTextCtrl* m_WinMessages;
// Virtual event handlers, overide them in your derived class
virtual void OnSelectionClicked( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnQuit( wxCommandEvent& event ){ event.Skip(); }
virtual void BrowseAndSelectFootprint( wxCommandEvent& event ){ event.Skip(); }
virtual void OnSelectionClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); }
virtual void BrowseAndSelectFootprint( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Exchange Modules"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 416,469 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EXCHANGE_MODULE_BASE();
......
......@@ -304,9 +304,9 @@ void WinEDA_ModuleEditFrame::ReCreateMenuBar()
// Contents
item = new wxMenuItem( helpMenu,
ID_GENERAL_HELP,
wxID_HELP,
_( "&Contents" ),
_( "Open the PCBNew manual" ) );
_( "Open the PCBNew handbook" ) );
SET_BITMAP( online_help_xpm );
helpMenu->Append( item );
......
......@@ -53,8 +53,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
filesMenu->Append( item );
// Load Recent submenu
wxMenu* openRecentMenu = new wxMenu();
wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu );
static wxMenu* openRecentMenu;
// Add this menu to list menu managed by m_fileHistory
// (the file history will be updated when adding/removing files in history
if( openRecentMenu )
wxGetApp().m_fileHistory.RemoveMenu( openRecentMenu );
openRecentMenu = new wxMenu();
wxGetApp().m_fileHistory.UseMenu( openRecentMenu );
wxGetApp().m_fileHistory.AddFilesToMenu();
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu,
-1, _( "Open &Recent" ),
_( "Open a recent opened board" ),
......@@ -599,9 +605,9 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
AddHelpVersionInfoMenuEntry( helpMenu );
// Contents
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP,
item = new wxMenuItem( helpMenu, wxID_HELP,
_( "&Contents" ),
_( "Open the on line PCBnew documentation" ) );
_( "Open the PCBNew handbook" ) );
SET_BITMAP( online_help_xpm );
helpMenu->Append( item );
......
......@@ -139,7 +139,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
PCB_EDIT_FRAME::Process_Special_Functions )
// Menu Help
EVT_MENU( ID_GENERAL_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout )
// Menu 3D Frame
......
......@@ -48,7 +48,6 @@ bool g_Alternate_Track_Posture = false;
bool g_Track_45_Only_Allowed = true; // True to allow horiz, vert. and 45deg only tracks
bool Segments_45_Only; // True to allow horiz, vert. and 45deg only graphic segments
bool g_TwoSegmentTrackBuild = true;
bool g_HighLight_Status;
wxSize g_ModuleTextSize; /* Default footprint texts size */
int g_ModuleSegmentWidth;
......@@ -58,7 +57,6 @@ int Route_Layer_BOTTOM;
int g_MaxLinksShowed;
int g_MagneticPadOption = capture_cursor_in_track_tool;
int g_MagneticTrackOption = capture_cursor_in_track_tool;
int g_HighLight_NetCode = -1;
wxPoint g_Offset_Module; /* Offset de trace du modul en depl */
......
......@@ -223,7 +223,13 @@ enum pcbnew_ids
ID_MENU_PCB_SWAP_LAYERS,
ID_MENU_PCB_RESET_TEXTMODULE_REFERENCE_SIZES,
ID_MENU_PCB_RESET_TEXTMODULE_VALUE_SIZES,
ID_GEN_EXPORT_FILE_VRML,
ID_GEN_EXPORT_SPECCTRA,
ID_GEN_EXPORT_FILE_GENCADFORMAT,
ID_GEN_EXPORT_FILE_MODULE_REPORT,
ID_GEN_IMPORT_SPECCTRA_SESSION,
ID_GEN_IMPORT_SPECCTRA_DESIGN,
ID_TOOLBARH_PCB_MODE_MODULE,
ID_TOOLBARH_PCB_MODE_TRACKS,
......
......@@ -68,7 +68,7 @@ void PCB_EDIT_FRAME::InstallExchangeModuleFrame( MODULE* Module )
void DIALOG_EXCHANGE_MODULE::OnQuit( wxCommandEvent& event )
{
s_SelectionMode = m_Selection->GetSelection();
Close( true ); // true is to force the frame to close
EndModal( 0 );
}
......
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