2009-11-04 20:46:53 +00:00
|
|
|
/******************/
|
|
|
|
/* tool_sch.cpp */
|
|
|
|
/******************/
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
#include "common.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "class_drawpanel.h"
|
|
|
|
#include "confirm.h"
|
2009-09-25 18:49:04 +00:00
|
|
|
#include "bitmaps.h"
|
2010-11-10 15:30:12 +00:00
|
|
|
#include "wxEeschemaStruct.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
#include "general.h"
|
|
|
|
#include "protos.h"
|
2007-08-30 08:15:05 +00:00
|
|
|
#include "hotkeys.h"
|
2009-09-22 12:27:57 +00:00
|
|
|
#include "eeschema_id.h"
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2010-06-30 11:15:34 +00:00
|
|
|
#include "help_common_strings.h"
|
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
/* Create the main Horizontal Toolbar for the schematic editor
|
|
|
|
*/
|
2010-12-08 20:12:46 +00:00
|
|
|
void SCH_EDIT_FRAME::ReCreateHToolbar()
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
2007-08-30 08:15:05 +00:00
|
|
|
if( m_HToolBar != NULL )
|
|
|
|
return;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
wxString msg;
|
2011-04-13 19:30:27 +00:00
|
|
|
m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
|
2009-11-04 20:46:53 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
// Set up toolbar
|
2009-01-07 15:59:49 +00:00
|
|
|
m_HToolBar->AddTool( ID_NEW_PROJECT, wxEmptyString, wxBitmap( new_xpm ),
|
|
|
|
_( "New schematic project" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2011-03-19 20:39:18 +00:00
|
|
|
m_HToolBar->AddTool( ID_LOAD_PROJECT, wxEmptyString, wxBitmap( open_document_xpm ),
|
2009-01-07 15:59:49 +00:00
|
|
|
_( "Open schematic project" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_HToolBar->AddTool( ID_SAVE_PROJECT, wxEmptyString, wxBitmap( save_project_xpm ),
|
2009-01-07 15:59:49 +00:00
|
|
|
_( "Save schematic project" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_HToolBar->AddSeparator();
|
2009-01-07 15:59:49 +00:00
|
|
|
m_HToolBar->AddTool( ID_SHEET_SET, wxEmptyString, wxBitmap( sheetset_xpm ),
|
|
|
|
_( "Page settings" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_HToolBar->AddSeparator();
|
2009-01-07 15:59:49 +00:00
|
|
|
m_HToolBar->AddTool( ID_TO_LIBRARY, wxEmptyString, wxBitmap( libedit_xpm ),
|
|
|
|
_( "Library editor" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_HToolBar->AddTool( ID_TO_LIBVIEW, wxEmptyString, wxBitmap( library_browse_xpm ),
|
2009-01-07 15:59:49 +00:00
|
|
|
_( "Library browser" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_HToolBar->AddSeparator();
|
2011-02-21 13:54:29 +00:00
|
|
|
m_HToolBar->AddTool( ID_HIERARCHY, wxEmptyString, wxBitmap( hierarchy_nav_xpm ),
|
2009-11-04 20:46:53 +00:00
|
|
|
_( "Navigate schematic hierarchy" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_HToolBar->AddSeparator();
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2009-01-07 15:59:49 +00:00
|
|
|
m_HToolBar->AddTool( wxID_CUT, wxEmptyString, wxBitmap( cut_button ),
|
|
|
|
_( "Cut selected item" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2009-01-07 15:59:49 +00:00
|
|
|
m_HToolBar->AddTool( wxID_COPY, wxEmptyString, wxBitmap( copy_button ),
|
|
|
|
_( "Copy selected item" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2009-01-07 15:59:49 +00:00
|
|
|
m_HToolBar->AddTool( wxID_PASTE, wxEmptyString, wxBitmap( paste_xpm ),
|
|
|
|
_( "Paste" ) );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_HToolBar->AddSeparator();
|
2011-02-21 13:54:29 +00:00
|
|
|
msg = AddHotkeyName( HELP_UNDO, s_Schematic_Hokeys_Descr, HK_UNDO, false );
|
|
|
|
m_HToolBar->AddTool( wxID_UNDO, wxEmptyString, wxBitmap( undo_xpm ), msg );
|
2007-09-19 15:29:50 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
msg = AddHotkeyName( HELP_REDO, s_Schematic_Hokeys_Descr, HK_REDO, false );
|
|
|
|
m_HToolBar->AddTool( wxID_REDO, wxEmptyString, wxBitmap( redo_xpm ), msg );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_HToolBar->AddSeparator();
|
2010-02-02 15:01:09 +00:00
|
|
|
m_HToolBar->AddTool( wxID_PRINT, wxEmptyString, wxBitmap( print_button ),
|
2009-01-07 15:59:49 +00:00
|
|
|
_( "Print schematic" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_HToolBar->AddSeparator();
|
2009-01-07 15:59:49 +00:00
|
|
|
m_HToolBar->AddTool( ID_TO_CVPCB, wxEmptyString, wxBitmap( cvpcb_xpm ),
|
|
|
|
_( "Run Cvpcb" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2009-01-07 15:59:49 +00:00
|
|
|
m_HToolBar->AddTool( ID_TO_PCB, wxEmptyString, wxBitmap( pcbnew_xpm ),
|
|
|
|
_( "Run pcbnew" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_HToolBar->AddSeparator();
|
2010-06-30 11:15:34 +00:00
|
|
|
msg = AddHotkeyName( HELP_ZOOM_IN, s_Schematic_Hokeys_Descr, HK_ZOOM_IN, false );
|
2011-02-21 13:54:29 +00:00
|
|
|
m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, wxBitmap( zoom_in_xpm ), msg );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
msg = AddHotkeyName( HELP_ZOOM_OUT, s_Schematic_Hokeys_Descr, HK_ZOOM_OUT, false );
|
|
|
|
m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, wxBitmap( zoom_out_xpm ), msg );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
msg = AddHotkeyName( HELP_ZOOM_REDRAW, s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW, false );
|
|
|
|
m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, wxBitmap( zoom_redraw_xpm ), msg );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
msg = AddHotkeyName( HELP_ZOOM_FIT, s_Schematic_Hokeys_Descr, HK_ZOOM_AUTO, false );
|
2011-03-20 17:10:38 +00:00
|
|
|
m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, wxBitmap( zoom_fit_in_page_xpm ), msg );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_HToolBar->AddSeparator();
|
2011-02-21 13:54:29 +00:00
|
|
|
msg = AddHotkeyName( HELP_FIND, s_Schematic_Hokeys_Descr, HK_FIND_ITEM, false );
|
|
|
|
m_HToolBar->AddTool( ID_FIND_ITEMS, wxEmptyString, wxBitmap( find_xpm ), msg );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_HToolBar->AddSeparator();
|
2009-01-07 15:59:49 +00:00
|
|
|
m_HToolBar->AddTool( ID_GET_NETLIST, wxEmptyString, wxBitmap( netlist_xpm ),
|
2011-03-28 18:23:01 +00:00
|
|
|
_( "Generate netlist" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_HToolBar->AddTool( ID_GET_ANNOTATE, wxEmptyString, wxBitmap( annotate_xpm ),
|
2009-11-04 20:46:53 +00:00
|
|
|
_( "Annotate schematic" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2009-01-07 15:59:49 +00:00
|
|
|
m_HToolBar->AddTool( ID_GET_ERC, wxEmptyString, wxBitmap( erc_xpm ),
|
2011-03-28 18:23:01 +00:00
|
|
|
_( "Perform electric rules check" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2009-01-07 15:59:49 +00:00
|
|
|
m_HToolBar->AddTool( ID_GET_TOOLS, wxEmptyString, wxBitmap( tools_xpm ),
|
2011-03-28 18:23:01 +00:00
|
|
|
_( "Generate bill of materials and/or cross references" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2011-03-29 10:43:08 +00:00
|
|
|
m_HToolBar->AddTool( ID_BACKANNO_ITEMS, wxEmptyString, wxBitmap( import_footprint_names_xpm ),
|
2011-03-28 19:26:31 +00:00
|
|
|
_( "Back annotate component foot prints" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
// after adding the tools to the toolbar, must call Realize() to reflect the changes
|
2007-08-30 08:15:05 +00:00
|
|
|
m_HToolBar->Realize();
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
/* Create Vertical Right Toolbar
|
2007-08-30 08:15:05 +00:00
|
|
|
*/
|
2010-12-08 20:12:46 +00:00
|
|
|
void SCH_EDIT_FRAME::ReCreateVToolbar()
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
2007-08-30 08:15:05 +00:00
|
|
|
if( m_VToolBar )
|
|
|
|
return;
|
2011-02-21 13:54:29 +00:00
|
|
|
|
2011-04-13 19:30:27 +00:00
|
|
|
m_VToolBar = new EDA_TOOLBAR( TOOLBAR_TOOL, this, ID_V_TOOLBAR, false );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
|
|
|
// Set up toolbar
|
2011-02-24 20:22:12 +00:00
|
|
|
m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, wxBitmap( cursor_xpm ),
|
2011-02-21 13:54:29 +00:00
|
|
|
wxEmptyString, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
|
|
|
m_VToolBar->AddTool( ID_HIERARCHY_PUSH_POP_BUTT, wxEmptyString,
|
2009-01-07 15:59:49 +00:00
|
|
|
wxBitmap( hierarchy_cursor_xpm ),
|
2011-02-21 13:54:29 +00:00
|
|
|
_( "Ascend or descend hierarchy" ), wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_SCH_PLACE_COMPONENT, wxEmptyString, wxBitmap( add_component_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_COMPONENTS, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_PLACE_POWER_BUTT, wxEmptyString, wxBitmap( add_power_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_POWERPORT, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_WIRE_BUTT, wxEmptyString, wxBitmap( add_line_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_WIRE, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_BUS_BUTT, wxEmptyString, wxBitmap( add_bus_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_BUS, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_WIRETOBUS_ENTRY_BUTT, wxEmptyString, wxBitmap( add_line2bus_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_WIRE2BUS_ENTRY, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_BUSTOBUS_ENTRY_BUTT, wxEmptyString, wxBitmap( add_bus2bus_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_BUS2BUS_ENTRY, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_NOCONN_BUTT, wxEmptyString, wxBitmap( noconn_button ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_NC_FLAG, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_LABEL_BUTT, wxEmptyString, wxBitmap( add_line_label_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_NETLABEL, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_GLABEL_BUTT, wxEmptyString, wxBitmap( add_glabel_xpm ),
|
|
|
|
HELP_PLACE_GLOBALLABEL, wxITEM_CHECK );
|
2008-04-14 19:22:48 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_JUNCTION_BUTT, wxEmptyString, wxBitmap( add_junction_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_JUNCTION, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_HIERLABEL_BUTT, wxEmptyString, wxBitmap( add_hierarchical_label_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_HIER_LABEL, wxITEM_CHECK );
|
2008-02-15 22:50:52 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_VToolBar->AddTool( ID_SHEET_SYMBOL_BUTT, wxEmptyString,
|
2009-01-07 15:59:49 +00:00
|
|
|
wxBitmap( add_hierarchical_subsheet_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_SHEET, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2009-07-29 13:10:36 +00:00
|
|
|
m_VToolBar->AddTool( ID_IMPORT_HLABEL_BUTT, wxEmptyString,
|
2009-01-07 15:59:49 +00:00
|
|
|
wxBitmap( import_hierarchical_label_xpm ),
|
2011-03-30 19:26:05 +00:00
|
|
|
HELP_IMPORT_SHEETPIN, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-03-30 19:26:05 +00:00
|
|
|
m_VToolBar->AddTool( ID_SHEET_PIN_BUTT, wxEmptyString,
|
2009-01-07 15:59:49 +00:00
|
|
|
wxBitmap( add_hierar_pin_xpm ),
|
2011-03-30 19:26:05 +00:00
|
|
|
HELP_PLACE_SHEETPIN, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
|
|
|
m_VToolBar->AddTool( ID_LINE_COMMENT_BUTT, wxEmptyString,
|
2009-01-07 15:59:49 +00:00
|
|
|
wxBitmap( add_dashed_line_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_GRAPHICLINES, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_TEXT_COMMENT_BUTT, wxEmptyString, wxBitmap( add_text_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_PLACE_GRAPHICTEXTS, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
m_VToolBar->AddTool( ID_SCHEMATIC_DELETE_ITEM_BUTT, wxEmptyString, wxBitmap( delete_body_xpm ),
|
2010-06-30 11:15:34 +00:00
|
|
|
HELP_DELETE_ITEMS, wxITEM_CHECK );
|
2007-08-30 08:15:05 +00:00
|
|
|
|
|
|
|
m_VToolBar->Realize();
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Create Vertical Left Toolbar (Option Toolbar)
|
2007-08-30 08:15:05 +00:00
|
|
|
*/
|
2010-12-08 20:12:46 +00:00
|
|
|
void SCH_EDIT_FRAME::ReCreateOptToolbar()
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
2007-08-30 08:15:05 +00:00
|
|
|
if( m_OptionsToolBar )
|
|
|
|
return;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2011-04-13 19:30:27 +00:00
|
|
|
m_OptionsToolBar = new EDA_TOOLBAR( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, false );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString,
|
2009-01-07 15:59:49 +00:00
|
|
|
wxBitmap( grid_xpm ),
|
2009-11-04 20:46:53 +00:00
|
|
|
_( "Turn grid off" ), wxITEM_CHECK );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_INCH, wxEmptyString,
|
2009-01-07 15:59:49 +00:00
|
|
|
wxBitmap( unit_inch_xpm ),
|
2008-10-22 20:51:21 +00:00
|
|
|
_( "Units in inches" ), wxITEM_CHECK );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_MM, wxEmptyString,
|
2009-01-07 15:59:49 +00:00
|
|
|
wxBitmap( unit_mm_xpm ),
|
2008-10-22 20:51:21 +00:00
|
|
|
_( "Units in millimeters" ), wxITEM_CHECK );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
2009-01-07 15:59:49 +00:00
|
|
|
wxBitmap( cursor_shape_xpm ),
|
2009-11-04 20:46:53 +00:00
|
|
|
_( "Change cursor shape" ), wxITEM_CHECK );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_OptionsToolBar->AddSeparator();
|
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_HIDDEN_PINS, wxEmptyString,
|
2009-01-07 15:59:49 +00:00
|
|
|
wxBitmap( hidden_pin_xpm ),
|
2009-11-04 20:46:53 +00:00
|
|
|
_( "Show hidden pins" ), wxITEM_CHECK );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_OptionsToolBar->AddSeparator();
|
|
|
|
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_BUS_WIRES_ORIENT, wxEmptyString,
|
2009-01-07 15:59:49 +00:00
|
|
|
wxBitmap( lines90_xpm ),
|
2009-11-04 20:46:53 +00:00
|
|
|
_( "HV orientation for wires and bus" ),
|
|
|
|
wxITEM_CHECK );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
m_OptionsToolBar->Realize();
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-12-08 20:12:46 +00:00
|
|
|
void SCH_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
2007-08-30 08:15:05 +00:00
|
|
|
if( DrawPanel == NULL )
|
|
|
|
return;
|
|
|
|
|
2011-02-21 13:54:29 +00:00
|
|
|
int id = event.GetId();
|
2007-08-30 08:15:05 +00:00
|
|
|
|
|
|
|
switch( id )
|
|
|
|
{
|
|
|
|
case ID_TB_OPTIONS_HIDDEN_PINS:
|
2009-04-29 17:09:00 +00:00
|
|
|
m_ShowAllPins = m_OptionsToolBar->GetToolState( id );
|
2009-12-20 19:48:58 +00:00
|
|
|
DrawPanel->Refresh( );
|
2007-08-30 08:15:05 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_TB_OPTIONS_BUS_WIRES_ORIENT:
|
|
|
|
g_HVLines = m_OptionsToolBar->GetToolState( id );
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2011-03-28 18:23:01 +00:00
|
|
|
wxFAIL_MSG( wxT( "Unexpected select option tool bar ID." ) );
|
2007-08-30 08:15:05 +00:00
|
|
|
break;
|
|
|
|
}
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|