improved wxWidgets 3 compatibility
This commit is contained in:
parent
1e6a46528d
commit
6e6134ea5a
|
@ -72,11 +72,6 @@ wxString g_UserLibDirBuffer;
|
||||||
int g_DebugLevel;
|
int g_DebugLevel;
|
||||||
int g_MouseOldButtons;
|
int g_MouseOldButtons;
|
||||||
int g_KeyPressed;
|
int g_KeyPressed;
|
||||||
wxFont* g_FixedFont = NULL; /* Affichage de Texte en fenetres de dialogue,
|
|
||||||
* fonte a pas fixe)*/
|
|
||||||
int g_FixedFontPointSize; /* taille de la fonte */
|
|
||||||
int g_FontMinPointSize; /* taille minimum des fontes */
|
|
||||||
|
|
||||||
|
|
||||||
// Nom (full file name) du file Configuration par defaut (kicad.pro)
|
// Nom (full file name) du file Configuration par defaut (kicad.pro)
|
||||||
wxString g_Prj_Default_Config_FullFilename;
|
wxString g_Prj_Default_Config_FullFilename;
|
||||||
|
@ -393,18 +388,18 @@ wxArrayString* wxStringSplit(wxString txt, wxChar splitter)
|
||||||
int index=txt.Find(splitter);
|
int index=txt.Find(splitter);
|
||||||
if (index == wxNOT_FOUND)
|
if (index == wxNOT_FOUND)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
wxString tmp;
|
wxString tmp;
|
||||||
tmp = txt.Mid(0,index);
|
tmp = txt.Mid(0,index);
|
||||||
txt = txt.Mid( index+1, txt.size() - index);
|
txt = txt.Mid( index+1, txt.size() - index);
|
||||||
list->Add(tmp);
|
list->Add(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!txt.IsEmpty())
|
if (!txt.IsEmpty())
|
||||||
{
|
{
|
||||||
list->Add(txt);
|
list->Add(txt);
|
||||||
}
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,6 @@ WinEDA_App::~WinEDA_App()
|
||||||
if( m_EDA_CommonConfig )
|
if( m_EDA_CommonConfig )
|
||||||
delete m_EDA_CommonConfig;
|
delete m_EDA_CommonConfig;
|
||||||
delete m_EDA_Config;
|
delete m_EDA_Config;
|
||||||
delete g_FixedFont;
|
|
||||||
if( m_Checker )
|
if( m_Checker )
|
||||||
delete m_Checker;
|
delete m_Checker;
|
||||||
delete m_Locale;
|
delete m_Locale;
|
||||||
|
@ -303,12 +302,6 @@ void WinEDA_App::InitEDA_Appl( const wxString& aName, id_app_type aId )
|
||||||
m_EDA_CommonConfig = new wxConfig( CommonConfigPath );
|
m_EDA_CommonConfig = new wxConfig( CommonConfigPath );
|
||||||
wxASSERT( m_EDA_CommonConfig != NULL );
|
wxASSERT( m_EDA_CommonConfig != NULL );
|
||||||
|
|
||||||
/* Create the fonts used in dialogs and messages */
|
|
||||||
g_FixedFontPointSize = FONT_DEFAULT_SIZE;
|
|
||||||
|
|
||||||
g_FixedFont = new wxFont( g_FixedFontPointSize, wxFONTFAMILY_MODERN,
|
|
||||||
wxNORMAL, wxNORMAL );
|
|
||||||
|
|
||||||
/* Install some image handlers, mainly for help */
|
/* Install some image handlers, mainly for help */
|
||||||
wxImage::AddHandler( new wxPNGHandler );
|
wxImage::AddHandler( new wxPNGHandler );
|
||||||
wxImage::AddHandler( new wxGIFHandler );
|
wxImage::AddHandler( new wxGIFHandler );
|
||||||
|
@ -626,7 +619,6 @@ void WinEDA_App::GetSettings()
|
||||||
wxASSERT( m_EDA_Config != NULL && m_EDA_CommonConfig != NULL );
|
wxASSERT( m_EDA_Config != NULL && m_EDA_CommonConfig != NULL );
|
||||||
|
|
||||||
wxString Line;
|
wxString Line;
|
||||||
unsigned ii;
|
|
||||||
|
|
||||||
m_HelpSize.x = 500;
|
m_HelpSize.x = 500;
|
||||||
m_HelpSize.y = 400;
|
m_HelpSize.y = 400;
|
||||||
|
@ -639,12 +631,6 @@ void WinEDA_App::GetSettings()
|
||||||
|
|
||||||
m_fileHistory.Load( *m_EDA_Config );
|
m_fileHistory.Load( *m_EDA_Config );
|
||||||
|
|
||||||
/* Set default font sizes */
|
|
||||||
g_FixedFontPointSize = m_EDA_Config->Read( wxT( "FixedFontSize" ),
|
|
||||||
FONT_DEFAULT_SIZE );
|
|
||||||
|
|
||||||
g_FixedFont->SetPointSize( g_FixedFontPointSize );
|
|
||||||
|
|
||||||
m_EDA_Config->Read( wxT( "ShowPageLimits" ), &g_ShowPageLimits );
|
m_EDA_Config->Read( wxT( "ShowPageLimits" ), &g_ShowPageLimits );
|
||||||
|
|
||||||
if( m_EDA_Config->Read( wxT( "WorkingDir" ), &Line ) && wxDirExists( Line ) )
|
if( m_EDA_Config->Read( wxT( "WorkingDir" ), &Line ) && wxDirExists( Line ) )
|
||||||
|
@ -664,18 +650,9 @@ void WinEDA_App::GetSettings()
|
||||||
void WinEDA_App::SaveSettings()
|
void WinEDA_App::SaveSettings()
|
||||||
{
|
{
|
||||||
wxASSERT( m_EDA_Config != NULL );
|
wxASSERT( m_EDA_Config != NULL );
|
||||||
|
|
||||||
/* Sdt font settings */
|
|
||||||
|
|
||||||
#if wxCHECK_VERSION( 2, 9, 0 )
|
|
||||||
#warning TODO: under wxWidgets 3.0, see how to replace the next lines
|
|
||||||
#else
|
|
||||||
/* Misc settings */
|
|
||||||
m_EDA_Config->Write( wxT( "FixedFontSize" ), g_FixedFontPointSize );
|
|
||||||
m_EDA_Config->Write( wxT( "ShowPageLimits" ), g_ShowPageLimits );
|
m_EDA_Config->Write( wxT( "ShowPageLimits" ), g_ShowPageLimits );
|
||||||
m_EDA_Config->Write( wxT( "WorkingDir" ), wxGetCwd() );
|
m_EDA_Config->Write( wxT( "WorkingDir" ), wxGetCwd() );
|
||||||
m_EDA_Config->Write( wxT( "BgColor" ), g_DrawBgColor );
|
m_EDA_Config->Write( wxT( "BgColor" ), g_DrawBgColor );
|
||||||
#endif // wxCHECK_VERSION
|
|
||||||
|
|
||||||
/* Save the file history list */
|
/* Save the file history list */
|
||||||
m_fileHistory.Save( *m_EDA_Config );
|
m_fileHistory.Save( *m_EDA_Config );
|
||||||
|
|
|
@ -26,42 +26,42 @@ void WinEDA_CvpcbFrame::ReCreateHToolbar()
|
||||||
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
|
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
|
||||||
SetToolBar( m_HToolBar );
|
SetToolBar( m_HToolBar );
|
||||||
|
|
||||||
m_HToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxBitmap( open_xpm ),
|
m_HToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxEmptyString, wxBitmap( open_xpm ),
|
||||||
_( "Open a NetList file" ) );
|
_( "Open a NetList file" ) );
|
||||||
|
|
||||||
m_HToolBar->AddTool( ID_CVPCB_SAVEQUITCVPCB, wxBitmap( save_xpm ),
|
m_HToolBar->AddTool( ID_CVPCB_SAVEQUITCVPCB, wxEmptyString, wxBitmap( save_xpm ),
|
||||||
_( "Save NetList and Footprints List files" ) );
|
_( "Save NetList and Footprints List files" ) );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
m_HToolBar->AddTool( ID_CVPCB_CREATE_CONFIGWINDOW, wxBitmap( config_xpm ),
|
m_HToolBar->AddTool( ID_CVPCB_CREATE_CONFIGWINDOW, wxEmptyString, wxBitmap( config_xpm ),
|
||||||
_( "Configuration" ) );
|
_( "Configuration" ) );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
m_HToolBar->AddTool( ID_CVPCB_CREATE_SCREENCMP, wxBitmap( module_xpm ),
|
m_HToolBar->AddTool( ID_CVPCB_CREATE_SCREENCMP, wxEmptyString, wxBitmap( module_xpm ),
|
||||||
_( "View selected footprint" ) );
|
_( "View selected footprint" ) );
|
||||||
|
|
||||||
m_HToolBar->AddTool( ID_CVPCB_AUTO_ASSOCIE, wxBitmap( auto_associe_xpm ),
|
m_HToolBar->AddTool( ID_CVPCB_AUTO_ASSOCIE, wxEmptyString, wxBitmap( auto_associe_xpm ),
|
||||||
_( "Automatic Association" ) );
|
_( "Automatic Association" ) );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
m_HToolBar->AddTool( ID_CVPCB_GOTO_PREVIOUSNA, wxBitmap( left_xpm ),
|
m_HToolBar->AddTool( ID_CVPCB_GOTO_PREVIOUSNA, wxEmptyString, wxBitmap( left_xpm ),
|
||||||
_( "Select previous free component" ) );
|
_( "Select previous free component" ) );
|
||||||
|
|
||||||
m_HToolBar->AddTool( ID_CVPCB_GOTO_FIRSTNA, wxBitmap( right_xpm ),
|
m_HToolBar->AddTool( ID_CVPCB_GOTO_FIRSTNA, wxEmptyString, wxBitmap( right_xpm ),
|
||||||
_( "Select next free component" ) );
|
_( "Select next free component" ) );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
m_HToolBar->AddTool( ID_CVPCB_DEL_ASSOCIATIONS,
|
m_HToolBar->AddTool( ID_CVPCB_DEL_ASSOCIATIONS, wxEmptyString,
|
||||||
wxBitmap( delete_association_xpm ),
|
wxBitmap( delete_association_xpm ),
|
||||||
_( "Delete all associations" ) );
|
_( "Delete all associations" ) );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
m_HToolBar->AddTool( ID_CVPCB_CREATE_STUFF_FILE,
|
m_HToolBar->AddTool( ID_CVPCB_CREATE_STUFF_FILE, wxEmptyString,
|
||||||
wxBitmap( save_cmpstuff_xpm ),
|
wxBitmap( save_cmpstuff_xpm ),
|
||||||
_( "Create export file (component/footprint list, used by eeschema to fill the footprint field of components)" ) );
|
_( "Create export file (component/footprint list, used by eeschema to fill the footprint field of components)" ) );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
m_HToolBar->AddTool( ID_PCB_DISPLAY_FOOTPRINT_DOC,
|
m_HToolBar->AddTool( ID_PCB_DISPLAY_FOOTPRINT_DOC, wxEmptyString,
|
||||||
wxBitmap( datasheet_xpm ),
|
wxBitmap( datasheet_xpm ),
|
||||||
_( "Display footprints list documentation" ) );
|
_( "Display footprints list documentation" ) );
|
||||||
|
|
||||||
|
|
|
@ -165,27 +165,22 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
|
||||||
SetToolBar( m_HToolBar );
|
SetToolBar( m_HToolBar );
|
||||||
|
|
||||||
// Set up toolbar
|
// Set up toolbar
|
||||||
m_HToolBar->AddTool( ID_NEW_BOARD, wxBitmap( new_xpm ),
|
m_HToolBar->AddTool( ID_NEW_BOARD, wxEmptyString,
|
||||||
wxNullBitmap, FALSE,
|
wxBitmap( new_xpm ),
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "New World" ) );
|
_( "New World" ) );
|
||||||
|
|
||||||
m_HToolBar->AddTool( ID_LOAD_FILE, wxBitmap( open_xpm ),
|
m_HToolBar->AddTool( ID_LOAD_FILE, wxEmptyString,
|
||||||
wxNullBitmap, FALSE,
|
wxBitmap( open_xpm ),
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Open existing Layer" ) );
|
_( "Open existing Layer" ) );
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
m_HToolBar->AddTool( ID_SAVE_PROJECT, wxBitmap( save_button ),
|
m_HToolBar->AddTool( ID_SAVE_PROJECT, wxEmptyString,
|
||||||
wxNullBitmap, FALSE,
|
wxBitmap( save_button ),
|
||||||
-1, -1, (wxObject*) NULL,
|
_( "Save" ) );
|
||||||
_( "Save World" ) );
|
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
m_HToolBar->AddTool( ID_SHEET_SET, wxBitmap( sheetset_xpm ),
|
m_HToolBar->AddTool( ID_SHEET_SET, wxEmptyString,
|
||||||
wxNullBitmap,
|
wxBitmap( sheetset_xpm ),
|
||||||
FALSE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "page settings (size, texts)" ) );
|
_( "page settings (size, texts)" ) );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -193,71 +188,52 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
m_HToolBar->AddTool( wxID_CUT, wxBitmap( cut_button ),
|
m_HToolBar->AddTool( wxID_CUT, wxEmptyString,
|
||||||
wxNullBitmap,
|
wxBitmap( cut_button ),
|
||||||
FALSE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Cut selected item" ) );
|
_( "Cut selected item" ) );
|
||||||
|
|
||||||
m_HToolBar->AddTool( wxID_COPY, wxBitmap( copy_button ),
|
m_HToolBar->AddTool( wxID_COPY, wxEmptyString,
|
||||||
wxNullBitmap, FALSE,
|
wxBitmap( copy_button ),
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Copy selected item" ) );
|
_( "Copy selected item" ) );
|
||||||
|
|
||||||
m_HToolBar->AddTool( wxID_PASTE, wxBitmap( paste_xpm ),
|
m_HToolBar->AddTool( wxID_PASTE, wxEmptyString,
|
||||||
wxNullBitmap,
|
wxBitmap( paste_xpm ),
|
||||||
FALSE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Paste" ) );
|
_( "Paste" ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_HToolBar->AddTool( ID_UNDO_BUTT, wxBitmap( undelete_xpm ),
|
m_HToolBar->AddTool( ID_UNDO_BUTT, wxEmptyString,
|
||||||
wxNullBitmap,
|
wxBitmap( undelete_xpm ),
|
||||||
FALSE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Undelete" ) );
|
_( "Undelete" ) );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
m_HToolBar->AddTool( ID_GEN_PRINT, wxBitmap( print_button ),
|
m_HToolBar->AddTool( ID_GEN_PRINT, wxEmptyString,
|
||||||
wxNullBitmap,
|
wxBitmap( print_button ),
|
||||||
FALSE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Print World" ) );
|
_( "Print World" ) );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
msg = AddHotkeyName( _( "Zoom in" ), s_Gerbview_Hokeys_Descr, HK_ZOOM_IN );
|
msg = AddHotkeyName( _( "Zoom in" ), s_Gerbview_Hokeys_Descr, HK_ZOOM_IN );
|
||||||
m_HToolBar->AddTool( ID_ZOOM_IN, wxBitmap( zoom_in_xpm ),
|
m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString,
|
||||||
wxNullBitmap,
|
wxBitmap( zoom_in_xpm ),
|
||||||
FALSE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
msg );
|
msg );
|
||||||
|
|
||||||
msg = AddHotkeyName( _( "Zoom out" ), s_Gerbview_Hokeys_Descr, HK_ZOOM_OUT );
|
msg = AddHotkeyName( _( "Zoom out" ), s_Gerbview_Hokeys_Descr, HK_ZOOM_OUT );
|
||||||
m_HToolBar->AddTool( ID_ZOOM_OUT, wxBitmap( zoom_out_xpm ),
|
m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString,
|
||||||
wxNullBitmap,
|
wxBitmap( zoom_out_xpm ),
|
||||||
FALSE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
msg );
|
msg );
|
||||||
|
|
||||||
msg = AddHotkeyName( _( "Redraw view" ), s_Gerbview_Hokeys_Descr,
|
msg = AddHotkeyName( _( "Redraw view" ), s_Gerbview_Hokeys_Descr,
|
||||||
HK_ZOOM_REDRAW );
|
HK_ZOOM_REDRAW );
|
||||||
m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxBitmap( zoom_redraw_xpm ),
|
m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString,
|
||||||
wxNullBitmap,
|
wxBitmap( zoom_redraw_xpm ),
|
||||||
FALSE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
msg );
|
msg );
|
||||||
|
|
||||||
m_HToolBar->AddTool( ID_ZOOM_PAGE, wxBitmap( zoom_auto_xpm ),
|
m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString,
|
||||||
wxNullBitmap,
|
wxBitmap( zoom_auto_xpm ),
|
||||||
FALSE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Zoom auto" ) );
|
_( "Zoom auto" ) );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
m_HToolBar->AddTool( ID_FIND_ITEMS, wxBitmap( find_xpm ),
|
m_HToolBar->AddTool( ID_FIND_ITEMS, wxEmptyString,
|
||||||
wxNullBitmap,
|
wxBitmap( find_xpm ),
|
||||||
FALSE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Find D-codes" ) );
|
_( "Find D-codes" ) );
|
||||||
|
|
||||||
wxArrayString choices;
|
wxArrayString choices;
|
||||||
|
@ -313,45 +289,33 @@ create or update the right vertical toolbar
|
||||||
m_VToolBar = new WinEDA_Toolbar( TOOLBAR_TOOL, this, ID_V_TOOLBAR, FALSE );
|
m_VToolBar = new WinEDA_Toolbar( TOOLBAR_TOOL, this, ID_V_TOOLBAR, FALSE );
|
||||||
|
|
||||||
// Set up toolbar
|
// Set up toolbar
|
||||||
m_VToolBar->AddTool( ID_NO_SELECT_BUTT,
|
m_VToolBar->AddTool( ID_NO_SELECT_BUTT, wxEmptyString,
|
||||||
wxBitmap( cursor_xpm ),
|
wxBitmap( cursor_xpm ) );
|
||||||
wxNullBitmap, TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL );
|
|
||||||
m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );
|
m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
m_VToolBar->AddSeparator();
|
m_VToolBar->AddSeparator();
|
||||||
m_VToolBar->AddTool( ID_COMPONENT_BUTT,
|
m_VToolBar->AddTool( ID_COMPONENT_BUTT, wxEmptyString,
|
||||||
wxBitmap( component_button ),
|
wxBitmap( component_button ),
|
||||||
wxNullBitmap, TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Add Flashes" ) );
|
_( "Add Flashes" ) );
|
||||||
|
|
||||||
m_VToolBar->AddTool( ID_BUS_BUTT,
|
m_VToolBar->AddTool( ID_BUS_BUTT, wxEmptyString,
|
||||||
wxBitmap( bus_button ),
|
wxBitmap( bus_button ),
|
||||||
wxNullBitmap, TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Add Lines" ) );
|
_( "Add Lines" ) );
|
||||||
|
|
||||||
m_VToolBar->AddTool( ID_JUNCTION_BUTT,
|
m_VToolBar->AddTool( ID_JUNCTION_BUTT, wxEmptyString,
|
||||||
wxBitmap( junction_xpm ),
|
wxBitmap( junction_xpm ),
|
||||||
wxNullBitmap, TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Add layer alignment target" ) );
|
_( "Add layer alignment target" ) );
|
||||||
|
|
||||||
m_VToolBar->AddSeparator();
|
m_VToolBar->AddSeparator();
|
||||||
m_VToolBar->AddTool( ID_TEXT_COMMENT_BUTT,
|
m_VToolBar->AddTool( ID_TEXT_COMMENT_BUTT, wxEmptyString,
|
||||||
wxBitmap( tool_text_xpm ),
|
wxBitmap( tool_text_xpm ),
|
||||||
wxNullBitmap, TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Add Text" ) );
|
_( "Add Text" ) );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
m_VToolBar->AddSeparator();
|
m_VToolBar->AddSeparator();
|
||||||
m_VToolBar->AddTool( ID_PCB_DELETE_ITEM_BUTT,
|
m_VToolBar->AddTool( ID_PCB_DELETE_ITEM_BUTT, wxEmptyString,
|
||||||
wxBitmap( delete_body_xpm ),
|
wxBitmap( delete_body_xpm ),
|
||||||
wxNullBitmap, TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Delete items" ) );
|
_( "Delete items" ) );
|
||||||
|
|
||||||
m_VToolBar->Realize();
|
m_VToolBar->Realize();
|
||||||
|
@ -373,18 +337,13 @@ create or update the left vertical toolbar (option toolbar
|
||||||
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this,
|
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this,
|
||||||
ID_OPT_TOOLBAR, FALSE );
|
ID_OPT_TOOLBAR, FALSE );
|
||||||
|
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxBitmap( grid_xpm ),
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString,
|
||||||
wxNullBitmap,
|
wxBitmap( grid_xpm ),
|
||||||
TRUE,
|
_( "Display Grid OFF" ), wxITEM_CHECK );
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Display Grid OFF" ) );
|
|
||||||
|
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLAR_COORD,
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLAR_COORD, wxEmptyString,
|
||||||
wxBitmap( polar_coord_xpm ),
|
wxBitmap( polar_coord_xpm ),
|
||||||
wxNullBitmap,
|
_( "Display Polar Coord ON" ), wxITEM_CHECK );
|
||||||
TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Display Polar Coord ON" ) );
|
|
||||||
|
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_INCH, wxEmptyString,
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_INCH, wxEmptyString,
|
||||||
wxBitmap( unit_inch_xpm ),
|
wxBitmap( unit_inch_xpm ),
|
||||||
|
@ -394,41 +353,26 @@ create or update the left vertical toolbar (option toolbar
|
||||||
wxBitmap( unit_mm_xpm ),
|
wxBitmap( unit_mm_xpm ),
|
||||||
_( "Units in millimeters" ), wxITEM_CHECK );
|
_( "Units in millimeters" ), wxITEM_CHECK );
|
||||||
|
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR,
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||||
wxBitmap( cursor_shape_xpm ),
|
wxBitmap( cursor_shape_xpm ),
|
||||||
wxNullBitmap,
|
_( "Change Cursor Shape" ), wxITEM_CHECK );
|
||||||
TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Change Cursor Shape" ) );
|
|
||||||
|
|
||||||
m_OptionsToolBar->AddSeparator();
|
m_OptionsToolBar->AddSeparator();
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH, wxEmptyString,
|
||||||
wxBitmap( pad_sketch_xpm ),
|
wxBitmap( pad_sketch_xpm ),
|
||||||
wxNullBitmap,
|
_( "Show Spots in Sketch Mode" ), wxITEM_CHECK );
|
||||||
TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Show Spots in Sketch Mode" ) );
|
|
||||||
|
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, wxEmptyString,
|
||||||
wxBitmap( showtrack_xpm ),
|
wxBitmap( showtrack_xpm ),
|
||||||
wxNullBitmap,
|
_( "Show Lines in Sketch Mode" ), wxITEM_CHECK );
|
||||||
TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Show Lines in Sketch Mode" ) );
|
|
||||||
|
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH,
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH, wxEmptyString,
|
||||||
wxBitmap( opt_show_polygon_xpm ),
|
wxBitmap( opt_show_polygon_xpm ),
|
||||||
wxNullBitmap,
|
_( "Show Polygons in Sketch Mode" ), wxITEM_CHECK );
|
||||||
TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Show Polygons in Sketch Mode" ) );
|
|
||||||
|
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_DCODES,
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_DCODES, wxEmptyString,
|
||||||
wxBitmap( show_dcodenumber_xpm ),
|
wxBitmap( show_dcodenumber_xpm ),
|
||||||
wxNullBitmap,
|
_( "Show dcode number" ), wxITEM_CHECK );
|
||||||
TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Show dcode number" ) );
|
|
||||||
|
|
||||||
m_OptionsToolBar->Realize();
|
m_OptionsToolBar->Realize();
|
||||||
|
|
||||||
|
|
|
@ -150,16 +150,8 @@ extern int g_DebugLevel; // 0= Pas de debug */
|
||||||
extern int g_MouseOldButtons;
|
extern int g_MouseOldButtons;
|
||||||
extern int g_KeyPressed;
|
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_FixedFont; /* Affichage de Texte en fenetres de dialogue,
|
|
||||||
* fonte a pas fixe)*/
|
|
||||||
extern int g_FixedFontPointSize; /* taille de la fonte */
|
|
||||||
extern int g_FontMinPointSize; /* taille minimum des fontes */
|
|
||||||
|
|
||||||
extern bool g_ShowPageLimits; // TRUE to display the page limits
|
extern bool g_ShowPageLimits; // TRUE to display the page limits
|
||||||
|
|
||||||
|
|
||||||
/* File name extension definitions. */
|
/* File name extension definitions. */
|
||||||
extern const wxString ProjectFileExtension;
|
extern const wxString ProjectFileExtension;
|
||||||
extern const wxString SchematicFileExtension;
|
extern const wxString SchematicFileExtension;
|
||||||
|
|
|
@ -146,7 +146,6 @@ bool TEXTE_PCB::Save( FILE* aFile ) const
|
||||||
if( fprintf( aFile, "$TEXTPCB\n" ) != sizeof("$TEXTPCB\n") - 1 )
|
if( fprintf( aFile, "$TEXTPCB\n" ) != sizeof("$TEXTPCB\n") - 1 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool rc = false;
|
|
||||||
const char* style = m_Italic ? "Italic" : "Normal";
|
const char* style = m_Italic ? "Italic" : "Normal";
|
||||||
|
|
||||||
wxArrayString* list = wxStringSplit( m_Text, '\n' );
|
wxArrayString* list = wxStringSplit( m_Text, '\n' );
|
||||||
|
|
|
@ -201,10 +201,8 @@ void WinEDA_ModuleEditFrame::ReCreateOptToolbar()
|
||||||
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this,
|
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this,
|
||||||
ID_OPT_TOOLBAR, FALSE );
|
ID_OPT_TOOLBAR, FALSE );
|
||||||
|
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxBitmap( grid_xpm ),
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString,
|
||||||
wxNullBitmap,
|
wxBitmap( grid_xpm ),
|
||||||
TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Display Grid OFF" ) );
|
_( "Display Grid OFF" ) );
|
||||||
|
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLAR_COORD, wxEmptyString,
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLAR_COORD, wxEmptyString,
|
||||||
|
@ -219,33 +217,21 @@ void WinEDA_ModuleEditFrame::ReCreateOptToolbar()
|
||||||
wxBitmap( unit_mm_xpm ),
|
wxBitmap( unit_mm_xpm ),
|
||||||
_( "Units in millimeters" ), wxITEM_CHECK );
|
_( "Units in millimeters" ), wxITEM_CHECK );
|
||||||
|
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR,
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||||
wxBitmap( cursor_shape_xpm ),
|
wxBitmap( cursor_shape_xpm ),
|
||||||
wxNullBitmap,
|
|
||||||
TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Change Cursor Shape" ) );
|
_( "Change Cursor Shape" ) );
|
||||||
|
|
||||||
m_OptionsToolBar->AddSeparator();
|
m_OptionsToolBar->AddSeparator();
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH, wxEmptyString,
|
||||||
wxBitmap( pad_sketch_xpm ),
|
wxBitmap( pad_sketch_xpm ),
|
||||||
wxNullBitmap,
|
|
||||||
TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Show Pads Sketch" ) );
|
_( "Show Pads Sketch" ) );
|
||||||
|
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH,
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, wxEmptyString,
|
||||||
wxBitmap( text_sketch_xpm ),
|
wxBitmap( text_sketch_xpm ),
|
||||||
wxNullBitmap,
|
|
||||||
TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Show Texts Sketch" ) );
|
_( "Show Texts Sketch" ) );
|
||||||
|
|
||||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH,
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH, wxEmptyString,
|
||||||
wxBitmap( show_mod_edge_xpm ),
|
wxBitmap( show_mod_edge_xpm ),
|
||||||
wxNullBitmap,
|
|
||||||
TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Show Edges Sketch" ) );
|
_( "Show Edges Sketch" ) );
|
||||||
|
|
||||||
m_OptionsToolBar->Realize();
|
m_OptionsToolBar->Realize();
|
||||||
|
|
|
@ -490,37 +490,27 @@ void WinEDA_PcbFrame::ReCreateAuxVToolbar()
|
||||||
ID_AUX_V_TOOLBAR, FALSE );
|
ID_AUX_V_TOOLBAR, FALSE );
|
||||||
|
|
||||||
// Set up toolbar
|
// Set up toolbar
|
||||||
m_AuxVToolBar->AddTool( ID_PCB_MUWAVE_TOOL_SELF_CMD,
|
m_AuxVToolBar->AddTool( ID_PCB_MUWAVE_TOOL_SELF_CMD, wxEmptyString,
|
||||||
wxBitmap( mw_Add_Line_xpm ),
|
wxBitmap( mw_Add_Line_xpm ),
|
||||||
wxNullBitmap, TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Create line of specified length for microwave applications" ) );
|
_( "Create line of specified length for microwave applications" ) );
|
||||||
|
|
||||||
m_AuxVToolBar->AddTool( ID_PCB_MUWAVE_TOOL_GAP_CMD,
|
m_AuxVToolBar->AddTool( ID_PCB_MUWAVE_TOOL_GAP_CMD, wxEmptyString,
|
||||||
wxBitmap( mw_Add_Gap_xpm ),
|
wxBitmap( mw_Add_Gap_xpm ),
|
||||||
wxNullBitmap, TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Create gap of specified length for microwave applications" ) );
|
_( "Create gap of specified length for microwave applications" ) );
|
||||||
|
|
||||||
m_AuxVToolBar->AddSeparator();
|
m_AuxVToolBar->AddSeparator();
|
||||||
|
|
||||||
m_AuxVToolBar->AddTool( ID_PCB_MUWAVE_TOOL_STUB_CMD,
|
m_AuxVToolBar->AddTool( ID_PCB_MUWAVE_TOOL_STUB_CMD, wxEmptyString,
|
||||||
wxBitmap( mw_Add_Stub_xpm ),
|
wxBitmap( mw_Add_Stub_xpm ),
|
||||||
wxNullBitmap, TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Create stub of specified length for microwave applications" ) );
|
_( "Create stub of specified length for microwave applications" ) );
|
||||||
|
|
||||||
m_AuxVToolBar->AddTool( ID_PCB_MUWAVE_TOOL_STUB_ARC_CMD,
|
m_AuxVToolBar->AddTool( ID_PCB_MUWAVE_TOOL_STUB_ARC_CMD, wxEmptyString,
|
||||||
wxBitmap( mw_Add_stub_arc_xpm ),
|
wxBitmap( mw_Add_stub_arc_xpm ),
|
||||||
wxNullBitmap, TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Create stub (arc) of specified length for microwave applications" )
|
_( "Create stub (arc) of specified length for microwave applications" )
|
||||||
);
|
);
|
||||||
|
|
||||||
m_AuxVToolBar->AddTool( ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD,
|
m_AuxVToolBar->AddTool( ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD, wxEmptyString,
|
||||||
wxBitmap( mw_Add_Shape_xpm ),
|
wxBitmap( mw_Add_Shape_xpm ),
|
||||||
wxNullBitmap, TRUE,
|
|
||||||
-1, -1, (wxObject*) NULL,
|
|
||||||
_( "Create a polynomial shape for microwave applications" ) );
|
_( "Create a polynomial shape for microwave applications" ) );
|
||||||
|
|
||||||
m_AuxVToolBar->Realize();
|
m_AuxVToolBar->Realize();
|
||||||
|
|
Loading…
Reference in New Issue