2007-09-10 04:51:01 +00:00
|
|
|
/***************************************************/
|
|
|
|
/* tool_gerber.cpp: Build tool bars and main menu */
|
|
|
|
/***************************************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include "gerbview.h"
|
|
|
|
#include "pcbplot.h"
|
|
|
|
|
|
|
|
#include "protos.h"
|
|
|
|
|
|
|
|
#define BITMAP wxBitmap
|
|
|
|
|
|
|
|
#include "bitmaps.h"
|
|
|
|
|
|
|
|
#include "id.h"
|
|
|
|
|
2007-09-10 04:51:01 +00:00
|
|
|
#include "hotkeys.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
/***********************************************/
|
2007-09-10 04:51:01 +00:00
|
|
|
void WinEDA_GerberFrame::ReCreateMenuBar( void )
|
2007-06-05 12:10:51 +00:00
|
|
|
/***********************************************/
|
2007-09-10 04:51:01 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
/* Cree ou reinitialise le menu du haut d'ecran
|
2007-09-10 04:51:01 +00:00
|
|
|
*/
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2007-09-10 04:51:01 +00:00
|
|
|
int ii;
|
|
|
|
wxMenuBar* menuBar = GetMenuBar();
|
|
|
|
|
|
|
|
if( menuBar == NULL )
|
|
|
|
{
|
|
|
|
menuBar = new wxMenuBar();
|
|
|
|
|
|
|
|
m_FilesMenu = new wxMenu;
|
|
|
|
m_FilesMenu->Append( ID_MENU_LOAD_FILE,
|
|
|
|
_( "Clear and Load Gerber file" ),
|
|
|
|
_( "Clear all layers and Load new Gerber file" ),
|
|
|
|
FALSE );
|
|
|
|
|
|
|
|
m_FilesMenu->Append( ID_MENU_APPEND_FILE,
|
|
|
|
_( "Load Gerber file" ),
|
|
|
|
_( "Load new Gerber file on currrent layer" ),
|
|
|
|
FALSE );
|
|
|
|
|
|
|
|
m_FilesMenu->Append( ID_MENU_INC_LAYER_AND_APPEND_FILE,
|
|
|
|
_( "Inc Layer and load Gerber file" ),
|
|
|
|
_( "Increment layer number, and Load Gerber file" ),
|
|
|
|
FALSE );
|
|
|
|
|
|
|
|
m_FilesMenu->Append( ID_GERBVIEW_LOAD_DCODE_FILE,
|
|
|
|
_( "Load DCodes" ),
|
|
|
|
_( "Load D-Codes File" ),
|
|
|
|
FALSE );
|
2007-06-05 12:10:51 +00:00
|
|
|
#if 0
|
2007-09-10 04:51:01 +00:00
|
|
|
m_FilesMenu->Append( ID_GERBVIEW_LOAD_DRILL_FILE,
|
2008-10-03 13:13:21 +00:00
|
|
|
_( "Load drill" ),
|
|
|
|
_( "Load excellon drill file" ),
|
2007-09-10 04:51:01 +00:00
|
|
|
FALSE );
|
2007-06-05 12:10:51 +00:00
|
|
|
#endif
|
|
|
|
|
2007-09-10 04:51:01 +00:00
|
|
|
m_FilesMenu->Append( ID_MENU_NEW_BOARD,
|
|
|
|
_( "&New" ),
|
|
|
|
_( "Clear all layers" ),
|
|
|
|
FALSE );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-09-10 04:51:01 +00:00
|
|
|
m_FilesMenu->AppendSeparator();
|
|
|
|
m_FilesMenu->Append( ID_GERBVIEW_EXPORT_TO_PCBNEW,
|
|
|
|
_( "&Export to Pcbnew" ),
|
|
|
|
_( "Export data in pcbnew format" ),
|
|
|
|
FALSE );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#if 0
|
2007-09-10 04:51:01 +00:00
|
|
|
m_FilesMenu->AppendSeparator();
|
|
|
|
m_FilesMenu->Append( ID_MENU_SAVE_BOARD,
|
|
|
|
_( "&Save layers" ),
|
|
|
|
_( "Save current layers (GERBER format)" ),
|
|
|
|
FALSE );
|
|
|
|
|
|
|
|
m_FilesMenu->Append( ID_MENU_SAVE_BOARD_AS,
|
|
|
|
_( "Save layers as.." ),
|
|
|
|
_( "Save current layers as.." ),
|
|
|
|
FALSE );
|
2007-06-05 12:10:51 +00:00
|
|
|
#endif
|
|
|
|
|
2007-09-10 04:51:01 +00:00
|
|
|
m_FilesMenu->AppendSeparator();
|
|
|
|
|
|
|
|
m_FilesMenu->Append( ID_GEN_PRINT, _( "P&rint" ), _( "Print on current printer" ) );
|
|
|
|
m_FilesMenu->Append( ID_GEN_PLOT,
|
|
|
|
_( "Plot" ), _( "Plotting in various formats" ) );
|
|
|
|
|
|
|
|
m_FilesMenu->AppendSeparator();
|
|
|
|
m_FilesMenu->Append( ID_EXIT, _( "E&xit" ), _( "Quit Gerbview" ) );
|
|
|
|
|
|
|
|
// Creation des selections des anciens fichiers
|
|
|
|
m_FilesMenu->AppendSeparator();
|
|
|
|
for( int ii = 0; ii < 10; ii++ )
|
|
|
|
{
|
|
|
|
if( GetLastProject( ii ).IsEmpty() )
|
|
|
|
break;
|
|
|
|
m_FilesMenu->Append( ID_LOAD_FILE_1 + ii, GetLastProject( ii ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Configuration:
|
|
|
|
wxMenu* configmenu = new wxMenu;
|
|
|
|
ADD_MENUITEM_WITH_HELP( configmenu, ID_CONFIG_REQ, _( "&File ext" ),
|
|
|
|
_( "Setting Files extension" ), config_xpm );
|
|
|
|
ADD_MENUITEM_WITH_HELP( configmenu, ID_COLORS_SETUP, _( "&Colors" ),
|
|
|
|
_( "Select Colors and Display for layers" ), palette_xpm );
|
|
|
|
ADD_MENUITEM_WITH_HELP( configmenu, ID_OPTIONS_SETUP, _( "&Options" ),
|
|
|
|
_( " Select general options" ), preference_xpm );
|
|
|
|
|
|
|
|
ADD_MENUITEM_WITH_HELP( configmenu, ID_PCB_LOOK_SETUP, _( "Display" ),
|
|
|
|
_( " Select how items are displayed" ), display_options_xpm );
|
|
|
|
|
|
|
|
// Font selection and setup
|
|
|
|
AddFontSelectionMenu( configmenu );
|
|
|
|
|
|
|
|
m_Parent->SetLanguageList( configmenu );
|
|
|
|
|
|
|
|
configmenu->AppendSeparator();
|
|
|
|
ADD_MENUITEM_WITH_HELP( configmenu, ID_CONFIG_SAVE, _( "&Save Setup" ),
|
|
|
|
_( "Save application preferences" ), save_setup_xpm );
|
|
|
|
|
|
|
|
configmenu->AppendSeparator();
|
2008-04-17 16:25:29 +00:00
|
|
|
AddHotkeyConfigMenu( configmenu );
|
2007-09-10 04:51:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Menu drill ( generation fichiers percage)
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
/* wxMenu *drill_menu = new wxMenu;
|
2007-09-10 04:51:01 +00:00
|
|
|
* postprocess_menu->Append(ID_PCB_GEN_DRILL_FILE, "Create &Drill file",
|
|
|
|
* "Gen Drill (EXCELLON] file and/or Drill sheet");
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Menu d'outils divers
|
|
|
|
wxMenu* miscellaneous_menu = new wxMenu;
|
|
|
|
ADD_MENUITEM_WITH_HELP( miscellaneous_menu, ID_GERBVIEW_SHOW_LIST_DCODES,
|
|
|
|
_( "&List DCodes" ),
|
2008-10-03 13:13:21 +00:00
|
|
|
_( "List and edit D-codes" ), show_dcodenumber_xpm );
|
2007-09-10 04:51:01 +00:00
|
|
|
ADD_MENUITEM_WITH_HELP( miscellaneous_menu, ID_GERBVIEW_SHOW_SOURCE, _( "&Show source" ),
|
|
|
|
_( "Show source file for the current layer" ), tools_xpm );
|
|
|
|
miscellaneous_menu->AppendSeparator();
|
2008-10-03 13:13:21 +00:00
|
|
|
ADD_MENUITEM_WITH_HELP( miscellaneous_menu, ID_PCB_GLOBAL_DELETE, _( "&Delete layer" ),
|
2007-09-10 04:51:01 +00:00
|
|
|
_( "Delete current layer" ), general_deletions_xpm );
|
|
|
|
|
|
|
|
// Menu Help:
|
|
|
|
wxMenu* helpMenu = new wxMenu;
|
|
|
|
ADD_MENUITEM_WITH_HELP( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
|
|
|
|
_( "Open the gerbview manual" ), help_xpm );
|
2008-10-07 16:33:57 +00:00
|
|
|
ADD_MENUITEM_WITH_HELP(helpMenu,
|
|
|
|
ID_KICAD_ABOUT, _( "&About gerbview" ),
|
|
|
|
_( "About gerbview gerber and drill viewer" ),
|
|
|
|
info_xpm );
|
2007-09-10 04:51:01 +00:00
|
|
|
|
|
|
|
menuBar->Append( m_FilesMenu, _( "&File" ) );
|
|
|
|
menuBar->Append( configmenu, _( "&Preferences" ) );
|
|
|
|
menuBar->Append( miscellaneous_menu, _( "&Miscellaneous" ) );
|
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
// menuBar->Append(drill_menu, _("&Drill"));
|
2007-09-10 04:51:01 +00:00
|
|
|
menuBar->Append( helpMenu, _( "&Help" ) );
|
|
|
|
|
|
|
|
// Associate the menu bar with the frame
|
|
|
|
SetMenuBar( menuBar );
|
|
|
|
}
|
2007-11-02 09:58:42 +00:00
|
|
|
else // Only an update of the files list
|
2007-09-10 04:51:01 +00:00
|
|
|
{
|
|
|
|
wxMenuItem* item;
|
|
|
|
int max_file = m_Parent->m_LastProjectMaxCount;
|
|
|
|
for( ii = max_file - 1; ii >=0; ii-- )
|
|
|
|
{
|
|
|
|
if( m_FilesMenu->FindItem( ID_LOAD_FILE_1 + ii ) )
|
|
|
|
{
|
|
|
|
item = m_FilesMenu->Remove( ID_LOAD_FILE_1 + ii );
|
|
|
|
if( item )
|
|
|
|
delete item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for( ii = 0; ii < max_file; ii++ )
|
|
|
|
{
|
|
|
|
if( GetLastProject( ii ).IsEmpty() )
|
|
|
|
break;
|
|
|
|
m_FilesMenu->Append( ID_LOAD_FILE_1 + ii, GetLastProject( ii ) );
|
|
|
|
}
|
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************/
|
2007-09-10 04:51:01 +00:00
|
|
|
void WinEDA_GerberFrame::ReCreateHToolbar( void )
|
2007-06-05 12:10:51 +00:00
|
|
|
/***********************************************/
|
|
|
|
{
|
2007-09-10 04:51:01 +00:00
|
|
|
int layer = 0;
|
|
|
|
GERBER_Descr* gerber_layer = NULL;
|
|
|
|
int ii;
|
|
|
|
wxString msg;
|
|
|
|
|
|
|
|
// delete and recreate the toolbar
|
|
|
|
if( m_HToolBar != NULL )
|
|
|
|
return;
|
|
|
|
|
|
|
|
if( GetScreen() )
|
|
|
|
{
|
2008-04-17 16:25:29 +00:00
|
|
|
layer = GetScreen()->m_Active_Layer;
|
2007-09-10 04:51:01 +00:00
|
|
|
gerber_layer = g_GERBER_Descr_List[layer];
|
|
|
|
}
|
|
|
|
|
|
|
|
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
|
|
|
|
SetToolBar( m_HToolBar );
|
|
|
|
|
|
|
|
// Set up toolbar
|
|
|
|
m_HToolBar->AddTool( ID_NEW_BOARD, BITMAP( new_xpm ),
|
|
|
|
wxNullBitmap, FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "New World" ) );
|
|
|
|
|
|
|
|
m_HToolBar->AddTool( ID_LOAD_FILE, BITMAP( open_xpm ),
|
|
|
|
wxNullBitmap, FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Open existing Layer" ) );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#if 0
|
2007-09-10 04:51:01 +00:00
|
|
|
m_HToolBar->AddTool( ID_SAVE_PROJECT, BITMAP( save_button ),
|
|
|
|
wxNullBitmap, FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Save World" ) );
|
|
|
|
|
|
|
|
m_HToolBar->AddSeparator();
|
|
|
|
m_HToolBar->AddTool( ID_SHEET_SET, BITMAP( sheetset_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "page settings (size, texts)" ) );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2007-09-10 04:51:01 +00:00
|
|
|
m_HToolBar->AddSeparator();
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#if 0
|
2007-09-10 04:51:01 +00:00
|
|
|
m_HToolBar->AddTool( wxID_CUT, BITMAP( cut_button ),
|
|
|
|
wxNullBitmap,
|
|
|
|
FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Cut selected item" ) );
|
|
|
|
|
|
|
|
m_HToolBar->AddTool( wxID_COPY, BITMAP( copy_button ),
|
|
|
|
wxNullBitmap, FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Copy selected item" ) );
|
|
|
|
|
|
|
|
m_HToolBar->AddTool( wxID_PASTE, BITMAP( paste_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Paste" ) );
|
2007-06-05 12:10:51 +00:00
|
|
|
#endif
|
|
|
|
|
2007-09-10 04:51:01 +00:00
|
|
|
m_HToolBar->AddTool( ID_UNDO_BUTT, BITMAP( undelete_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Undelete" ) );
|
|
|
|
|
|
|
|
m_HToolBar->AddSeparator();
|
|
|
|
m_HToolBar->AddTool( ID_GEN_PRINT, BITMAP( print_button ),
|
|
|
|
wxNullBitmap,
|
|
|
|
FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Print World" ) );
|
|
|
|
|
|
|
|
m_HToolBar->AddSeparator();
|
2008-10-03 13:13:21 +00:00
|
|
|
msg = AddHotkeyName( _( "Zoom in" ), s_Gerbview_Hokeys_Descr, HK_ZOOM_IN );
|
2008-02-17 21:19:13 +00:00
|
|
|
m_HToolBar->AddTool( ID_ZOOM_IN_BUTT, BITMAP( zoom_in_xpm ),
|
2007-09-10 04:51:01 +00:00
|
|
|
wxNullBitmap,
|
|
|
|
FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
msg );
|
|
|
|
|
2008-10-03 13:13:21 +00:00
|
|
|
msg = AddHotkeyName( _( "Zoom out" ), s_Gerbview_Hokeys_Descr, HK_ZOOM_OUT );
|
2008-02-17 21:19:13 +00:00
|
|
|
m_HToolBar->AddTool( ID_ZOOM_OUT_BUTT, BITMAP( zoom_out_xpm ),
|
2007-09-10 04:51:01 +00:00
|
|
|
wxNullBitmap,
|
|
|
|
FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
msg );
|
|
|
|
|
2008-10-03 13:13:21 +00:00
|
|
|
msg = AddHotkeyName( _( "Redraw view" ), s_Gerbview_Hokeys_Descr, HK_ZOOM_REDRAW );
|
2008-08-26 06:00:27 +00:00
|
|
|
m_HToolBar->AddTool( ID_ZOOM_REDRAW_BUTT, BITMAP( zoom_redraw_xpm ),
|
2007-09-10 04:51:01 +00:00
|
|
|
wxNullBitmap,
|
|
|
|
FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
msg );
|
|
|
|
|
2008-08-26 06:00:27 +00:00
|
|
|
m_HToolBar->AddTool( ID_ZOOM_PAGE_BUTT, BITMAP( zoom_auto_xpm ),
|
2007-09-10 04:51:01 +00:00
|
|
|
wxNullBitmap,
|
|
|
|
FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
2008-10-03 13:13:21 +00:00
|
|
|
_( "Zoom auto" ) );
|
2007-09-10 04:51:01 +00:00
|
|
|
|
|
|
|
m_HToolBar->AddSeparator();
|
|
|
|
m_HToolBar->AddTool( ID_FIND_ITEMS, BITMAP( find_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
FALSE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
2008-10-03 13:13:21 +00:00
|
|
|
_( "Find D-codes" ) );
|
2007-09-10 04:51:01 +00:00
|
|
|
|
|
|
|
wxArrayString choices;
|
|
|
|
m_HToolBar->AddSeparator();
|
|
|
|
for( ii = 0; ii < 32; ii++ )
|
|
|
|
{
|
|
|
|
wxString msg;
|
|
|
|
msg = _( "Layer " ); msg << ii + 1;
|
|
|
|
choices.Add( msg );
|
|
|
|
}
|
|
|
|
|
|
|
|
m_SelLayerBox = new WinEDAChoiceBox( m_HToolBar, ID_TOOLBARH_PCB_SELECT_LAYER,
|
|
|
|
wxDefaultPosition, wxSize( 150, -1 ), choices );
|
2008-04-17 16:25:29 +00:00
|
|
|
m_SelLayerBox->SetSelection( GetScreen()->m_Active_Layer );
|
2007-09-10 04:51:01 +00:00
|
|
|
m_HToolBar->AddControl( m_SelLayerBox );
|
|
|
|
|
|
|
|
m_HToolBar->AddSeparator();
|
|
|
|
choices.Clear();
|
|
|
|
choices.Add( _( "No tool" ) );
|
|
|
|
for( ii = 0; ii < MAX_TOOLS; ii++ )
|
|
|
|
{
|
|
|
|
wxString msg;
|
|
|
|
msg = _( "Tool " ); msg << ii + FIRST_DCODE;
|
|
|
|
choices.Add( msg );
|
|
|
|
}
|
|
|
|
|
|
|
|
m_SelLayerTool = new WinEDAChoiceBox( m_HToolBar, ID_TOOLBARH_GERBER_SELECT_TOOL,
|
|
|
|
wxDefaultPosition, wxSize( 150, -1 ), choices );
|
|
|
|
m_HToolBar->AddControl( m_SelLayerTool );
|
|
|
|
|
|
|
|
|
|
|
|
// after adding the buttons to the toolbar, must call Realize() to reflect
|
|
|
|
// the changes
|
|
|
|
m_HToolBar->Realize();
|
|
|
|
SetToolbars();
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************/
|
2007-09-10 04:51:01 +00:00
|
|
|
void WinEDA_GerberFrame::ReCreateVToolbar( void )
|
2007-06-05 12:10:51 +00:00
|
|
|
/**********************************************/
|
2007-11-02 09:58:42 +00:00
|
|
|
/**
|
|
|
|
create or update the right vertical toolbar
|
|
|
|
*/
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2007-09-10 04:51:01 +00:00
|
|
|
if( m_VToolBar )
|
|
|
|
return;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-09-10 04:51:01 +00:00
|
|
|
m_VToolBar = new WinEDA_Toolbar( TOOLBAR_TOOL, this, ID_V_TOOLBAR, FALSE );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-09-10 04:51:01 +00:00
|
|
|
// Set up toolbar
|
|
|
|
m_VToolBar->AddTool( ID_NO_SELECT_BUTT,
|
|
|
|
BITMAP( cursor_xpm ),
|
|
|
|
wxNullBitmap, TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL );
|
|
|
|
m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#if 0
|
2007-09-10 04:51:01 +00:00
|
|
|
m_VToolBar->AddSeparator();
|
|
|
|
m_VToolBar->AddTool( ID_COMPONENT_BUTT,
|
|
|
|
BITMAP( component_button ),
|
|
|
|
wxNullBitmap, TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Add Flashes" ) );
|
|
|
|
|
|
|
|
m_VToolBar->AddTool( ID_BUS_BUTT,
|
|
|
|
BITMAP( bus_button ),
|
|
|
|
wxNullBitmap, TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Add Lines" ) );
|
|
|
|
|
|
|
|
m_VToolBar->AddTool( ID_JUNCTION_BUTT,
|
|
|
|
BITMAP( junction_xpm ),
|
|
|
|
wxNullBitmap, TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
2007-10-10 14:08:26 +00:00
|
|
|
_( "Add layer alignment target" ) );
|
2007-09-10 04:51:01 +00:00
|
|
|
|
|
|
|
m_VToolBar->AddSeparator();
|
|
|
|
m_VToolBar->AddTool( ID_TEXT_COMMENT_BUTT,
|
|
|
|
BITMAP( tool_text_xpm ),
|
|
|
|
wxNullBitmap, TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Add Text" ) );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#endif
|
2007-09-10 04:51:01 +00:00
|
|
|
m_VToolBar->AddSeparator();
|
|
|
|
m_VToolBar->AddTool( ID_PCB_DELETE_ITEM_BUTT,
|
|
|
|
BITMAP( delete_body_xpm ),
|
|
|
|
wxNullBitmap, TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Delete items" ) );
|
|
|
|
|
|
|
|
m_VToolBar->Realize();
|
|
|
|
SetToolbars();
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************/
|
2007-09-10 04:51:01 +00:00
|
|
|
void WinEDA_GerberFrame::ReCreateOptToolbar( void )
|
2007-06-05 12:10:51 +00:00
|
|
|
/************************************************/
|
2007-11-02 09:58:42 +00:00
|
|
|
/**
|
|
|
|
create or update the left vertical toolbar (option toolbar
|
|
|
|
*/
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2007-09-10 04:51:01 +00:00
|
|
|
if( m_OptionsToolBar )
|
|
|
|
return;
|
|
|
|
|
|
|
|
// creation du tool bar options
|
|
|
|
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, FALSE );
|
|
|
|
|
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, BITMAP( grid_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Display Grid OFF" ) );
|
|
|
|
|
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLAR_COORD, BITMAP( polar_coord_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Display Polar Coord ON" ) );
|
|
|
|
|
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_INCH, wxEmptyString,
|
|
|
|
BITMAP( unit_inch_xpm ),
|
|
|
|
_( "Units = Inch" ), wxITEM_CHECK );
|
|
|
|
|
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_MM, wxEmptyString,
|
|
|
|
BITMAP( unit_mm_xpm ),
|
|
|
|
_( "Units = mm" ), wxITEM_CHECK );
|
|
|
|
|
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, BITMAP( cursor_shape_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Change Cursor Shape" ) );
|
|
|
|
|
|
|
|
m_OptionsToolBar->AddSeparator();
|
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
|
|
|
|
BITMAP( pad_sketch_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
2007-11-02 09:58:42 +00:00
|
|
|
_( "Show Spots in Sketch Mode" ) );
|
2007-09-10 04:51:01 +00:00
|
|
|
|
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
|
|
|
|
BITMAP( showtrack_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
2007-11-02 09:58:42 +00:00
|
|
|
_( "Show Lines in Sketch Mode" ) );
|
|
|
|
|
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH,
|
|
|
|
BITMAP( opt_show_polygon_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Show Polygons in Sketch Mode" ) );
|
2007-09-10 04:51:01 +00:00
|
|
|
|
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_DCODES,
|
|
|
|
BITMAP( show_dcodenumber_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
TRUE,
|
|
|
|
-1, -1, (wxObject*) NULL,
|
|
|
|
_( "Show dcode number" ) );
|
|
|
|
|
|
|
|
m_OptionsToolBar->Realize();
|
|
|
|
|
|
|
|
SetToolbars();
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
2007-09-24 07:14:01 +00:00
|
|
|
|