Commit 87f4916a authored by CHARRAS's avatar CHARRAS

files reorder

parent 8e4e0fb5
/* XPM */
static const char * add_bus2bus_xpm[] = {
#ifndef XPMMAIN
extern const char *add_bus2bus_xpm[];
#else
const char * add_bus2bus_xpm[] = {
"16 16 38 1",
" c None",
". c #AFAFFF",
......@@ -55,3 +59,4 @@ static const char * add_bus2bus_xpm[] = {
" ..&67 ",
" ..89 ",
" .}+ "};
#endif
/* XPM */
static const char * add_line2bus_xpm[] = {
#ifndef XPMMAIN
extern const char *add_line2bus_xpm[];
#else
const char * add_line2bus_xpm[] = {
"16 16 31 1",
" c None",
"! c black",
......@@ -48,3 +52,4 @@ static const char * add_line2bus_xpm[] = {
" ##61& ",
" ##9& ",
" #@& "};
#endif
/* XPM */
static const char * add_power_xpm[] = {
#ifndef XPMMAIN
extern const char *add_power_xpm[];
#else
const char * add_power_xpm[] = {
"16 16 26 1",
" c None",
". c #D72D2D",
......@@ -43,3 +47,4 @@ static const char * add_power_xpm[] = {
" ),/>> ",
" <>> ",
" "};
#endif
/* XPM */
static const char * add_bus_xpm[] = {
#ifndef XPMMAIN
extern const char *add_bus_xpm[];
#else
const char * add_bus_xpm[] = {
"16 16 4 1",
" c None",
"! c black",
......@@ -21,3 +25,4 @@ static const char * add_bus_xpm[] = {
" ",
" ",
" "};
#endif
/* XPM */
static const char * add_hierar_pin_xpm[] = {
#ifndef XPMMAIN
extern const char *add_hierar_pin_xpm[];
#else
const char * add_hierar_pin_xpm[] = {
"16 16 37 1",
" c None",
"! c black",
......@@ -54,3 +58,4 @@ static const char * add_hierar_pin_xpm[] = {
"!#)!!!!!!!!!!)D!",
"!EEEEEEEEEEEEEF!",
" !!!!!!!!!!!!!! "};
#endif
/* XPM */
static const char * add_hierar_symbol_xpm[] = {
#ifndef XPMMAIN
extern const char *add_hierarchical_subsheet_xpm[];
#else
const char * add_hierarchical_subsheet_xpm[] = {
"16 16 35 1",
" c None",
"! c black",
......@@ -52,3 +56,4 @@ static const char * add_hierar_symbol_xpm[] = {
"!#)!!!!!!!!!!)A!",
"!###B@@@CCAAAAD!",
" !!!!!!!!!!!!!! "};
#endif
/* XPM */
#ifndef XPMMAIN
extern const char *add_hierarchical_label_xpm[];
#else
const char *add_hierarchical_label_xpm[]={
"16 16 51 1",
"c c None",
"# c None",
"b c #303030",
"e c #695f00",
"G c #6c6209",
"g c #6d640f",
"h c #6f6714",
"V c #706716",
"i c #706818",
"o c #746d25",
"O c #756d25",
"U c #766f2b",
"x c #7a7437",
"M c #7b7437",
"w c #7d7539",
"z c #7d773e",
". c #800080",
"f c #837e52",
"L c #847c39",
"n c #857f66",
"P c #898664",
"F c #8c896d",
"r c #8f8c76",
"k c #9191ff",
"q c #97968f",
"H c #989894",
"T c #999997",
"W c #9a9a9a",
"N c #9b9566",
"p c #9b9b9b",
"l c #9b9bff",
"j c #9c9c9c",
"s c #9e9eff",
"m c #a5a5ff",
"t c #a8a8ff",
"A c #acacff",
"u c #b2b2ff",
"B c #b6b6ff",
"I c #b9b9ff",
"v c #bbbbf9",
"E c #bfbdcc",
"C c #c0c0ff",
"J c #c3c3ff",
"Q c #c7c7ff",
"D c #cacaff",
"y c #ceceff",
"R c #d1d1ff",
"K c #d5d5f9",
"S c #dbdbff",
"d c #dcdcdc",
"a c #ffffff",
".....###########",
"aaab..c#########",
"aaabd..c########",
"aaabdd..########",
"aaabbbb.########",
"aaaeedd.########",
"aaeeefd.eeeee###",
"aaeghij.eklmno##",
"aaepqer.estuvwx#",
"aeeyyez.eABCDEeF",
"aeeeeeGHeIJyKLMp",
"eeNNNOePeQRSNoTp",
"eeyyyyeUeeeeVqp#",
"ddddddd.Wppppp##",
"ddddddd.########",
"........########"};
#endif
/* XPM */
#ifndef XPMMAIN
extern const char *import_hierarchical_label_xpm[];
#else
const char * import_hierarchical_label_xpm[] = {
"16 16 92 2",
" c None",
". c #000000",
"+ c #020202",
"@ c #00AE00",
"# c #007000",
"$ c #7C7C7C",
"% c #3C3C3C",
"& c #E5E5E5",
"* c #EBEBEB",
"= c #98914E",
"- c #6F6500",
"; c #676767",
"> c #303030",
", c #008800",
"' c #00AD00",
") c #002600",
"! c #6A6F6A",
"~ c #005800",
"{ c #505050",
"] c #E4E4E0",
"^ c #746A09",
"/ c #8D853A",
"( c #E5E5E1",
"_ c #3F3F3F",
": c #606060",
"< c #004900",
"[ c #00BD00",
"} c #00BA00",
"| c #009A00",
"1 c #007400",
"2 c #535143",
"3 c #C9C6AE",
"4 c #C1BE9C",
"5 c #C3C3C3",
"6 c #005C00",
"7 c #00B800",
"8 c #002D00",
"9 c #544C00",
"0 c #001300",
"a c #004500",
"b c #015B01",
"c c #007800",
"d c #302C03",
"e c #BCB892",
"f c #727872",
"g c #009200",
"h c #3B3F2F",
"i c #6E6400",
"j c #DBDACD",
"k c #747674",
"l c #314131",
"m c #A49F71",
"n c #695F00",
"o c #B3AF86",
"p c #9E9E9E",
"q c #DADADA",
"r c #AAA575",
"s c #7D7880",
"t c #9B9BFF",
"u c #A5A5FF",
"v c #A4A3D8",
"w c #6E6510",
"x c #C3C0A4",
"y c #FDFDFD",
"z c #847F80",
"A c #A8A8FF",
"B c #B2B2FF",
"C c #BDBDFF",
"D c #AAA7B1",
"E c #6F660C",
"F c #B2B09E",
"G c #8B8680",
"H c #B6B6FF",
"I c #C0C0FF",
"J c #CACAFF",
"K c #D4D4FF",
"L c #8C854C",
"M c #7C7429",
"N c #918C80",
"O c #C3C3FF",
"P c #CECEFF",
"Q c #D8D8FF",
"R c #BDBAB1",
"S c #70670C",
"T c #989380",
"U c #D1D1FF",
"V c #DBDBFF",
"W c #D2D1D8",
"X c #716810",
"Y c #BEBEBE",
"Z c #969161",
"` c #9C986F",
". . . . . . . . . . . . + ",
". @ # . $ % & * = - = * ; > ",
". , ' ) . ! ~ { ] ^ / ^ ( _ : . ",
" < [ } | 1 [ ~ 2 - 3 - 4 * 5 . ",
" 6 7 [ [ [ [ 8 9 - - = * 5 . ",
" 0 a b [ c d e * e ^ ( 5 . ",
" . f g h i j * j - 4 5 . ",
" . k l m n n n n o * 5 . ",
" . p q r s t u v w x 5 . ",
" . y * r z A B C D E F . ",
" . y * r G H I J K L M . ",
" . y * r N O P Q R S F . ",
" . y * r T U V W X x 5 . ",
" . Y 5 Z n n n n ` 5 5 . ",
" . . . . . . . . . . . . ",
" "};
#endif
/* XPM */
static const char * AddBus2Bus_xpm[] = {
"16 16 28 1",
" c None",
". c #9B9BFF",
"+ c #C3C3C3",
"@ c #000069",
"# c #AEAEE1",
"$ c #4A4A80",
"% c #AAAAAA",
"& c #4B4B81",
"* c #9B9B9B",
"= c #676798",
"- c #4C4C81",
"; c #0F0F6D",
"> c #03036A",
", c #4D4D81",
"' c #10106D",
") c #4E4E82",
"! c #10106E",
"~ c #4E4E81",
"{ c #A8A8A8",
"] c #A0A0A0",
"^ c #12126E",
"/ c #505082",
"( c #646495",
"_ c #515182",
": c #04046B",
"< c #535384",
"[ c #13136F",
"} c #13136E",
" .. ........",
" ..+ @.......#",
" ..+ @$%+++++++",
" ..+ @&* ",
" ..=@-*;........",
" ..>,*'@.......#",
" ..)*!@~{+++++++",
" ..]^@/* ",
" ..(@_*'........",
" ..:_*^@.......#",
" ..<*[@~{+++++++",
" ..]}@/* ",
" ..(@_* ",
" ..:_* ",
" ..<* ",
" .#] "};
/* XPM */
static const char * AddLine2Bus_xpm[] = {
"16 16 29 1",
" c None",
". c #9B9BFF",
"+ c #006900",
"@ c #95F400",
"# c #9B9B9B",
"$ c #397B39",
"% c #026902",
"& c #437E43",
"* c #879487",
"= c #046A04",
"- c #498049",
"; c #788F78",
"> c #126F12",
", c #4C814C",
"' c #006800",
") c #397C39",
"! c #4D814D",
"~ c #437F43",
"{ c #126E12",
"] c #387B38",
"^ c #9A9A9A",
"/ c #4D824D",
"( c #016901",
"_ c #427E42",
": c #488048",
"< c #799079",
"[ c #4B814B",
"} c #869386",
"| c #9B9BCD",
" .. +@@@@@@@@",
" ..# +$########",
" ..# %&# ",
" ..*=-;+@@@@@@@@",
" ..>,;')########",
" ..!;%~# ",
" ..*=-;+@@@@@@@@",
" ..{,;']^#######",
" ../;(_# ",
" ..*=:<+@@@@@@@@",
" ..{[<')########",
" ../<%~# ",
" ..}=-# ",
" ..{,# ",
" ../# ",
" .|# "};
/* XPM */
static const char * add_glabel_xpm[] = {
"16 16 54 1",
" c None",
". c #695F00",
"+ c #837E52",
"@ c #6D640F",
"# c #6F6714",
"$ c #706818",
"% c #9C9C9C",
"& c #9191FF",
"* c #9B9BFF",
"= c #A5A5FF",
"- c #857F66",
"; c #746D25",
"> c #827D4F",
", c #7E7841",
"' c #8F8C76",
") c #9E9EFF",
"! c #A8A8FF",
"~ c #B2B2FF",
"{ c #BBBBF9",
"] c #7D7539",
"^ c #7A7437",
"/ c #95948B",
"( c #878460",
"_ c #7D773E",
": c #ACACFF",
"< c #B6B6FF",
"[ c #C0C0FF",
"} c #CACAFF",
"| c #BFBDCC",
"1 c #8C896D",
"2 c #6C6209",
"3 c #989894",
"4 c #B9B9FF",
"5 c #C3C3FF",
"6 c #CECEFF",
"7 c #D5D5F9",
"8 c #847C39",
"9 c #7B7437",
"0 c #9B9B9B",
"a c #797233",
"b c #817C4D",
"c c #756D25",
"d c #898664",
"e c #C7C7FF",
"f c #D1D1FF",
"g c #DBDBFF",
"h c #9B9566",
"i c #999997",
"j c #96958D",
"k c #86825B",
"l c #766F2B",
"m c #706716",
"n c #97968F",
"o c #9A9A9A",
" ",
" ",
" ",
" .. ",
" ...+ ..... ",
" .@#$% .&*=-; ",
" .>,.' .)!~{]^ ",
" ../(._ .:<[}|.1",
" .....23.4567890",
"..abbc.d.efgh;i0",
"..j00k.l....mn0 ",
" o0 0o00000 ",
" ",
" ",
" ",
" "};
/* XPM */
static const char * add_junction_xpm[] = {
"16 16 60 1",
" c None",
". c #007D00",
"+ c #4D8B4D",
"@ c #9B9B9B",
"# c #000000",
"$ c #000700",
"% c #0A130A",
"& c #282828",
"* c #222222",
"= c #868483",
"- c #E1D5CA",
"; c #B7A595",
"> c #564A3F",
", c #080707",
"' c #151515",
") c #EAE2DB",
"! c #FFEBDA",
"~ c #FFE0C5",
"{ c #FFD5B1",
"] c #FFCA9C",
"^ c #806044",
"/ c #004C00",
"( c #645F59",
"_ c #FFE6CF",
": c #FFDBBB",
"< c #FFD0A6",
"[ c #FFC591",
"} c #FFBA7D",
"| c #E49C5D",
"1 c #000D00",
"2 c #2F552F",
"3 c #64584D",
"4 c #FFD5B0",
"5 c #FFCA9B",
"6 c #FFBF87",
"7 c #FFB472",
"8 c #FFA95D",
"9 c #E48D41",
"0 c #080F08",
"a c #757575",
"b c #16120F",
"c c #EAB485",
"d c #FFB97C",
"e c #FFAF67",
"f c #FFA453",
"g c #FF993E",
"h c #804715",
"i c #3A3A3A",
"j c #414141",
"k c #22180F",
"l c #865931",
"m c #E18B40",
"n c #B76925",
"o c #562E0A",
"p c #131110",
"q c #8E8E8E",
"r c #686868",
"s c #242424",
"t c #3F3F3F",
"u c #909090",
" .. ",
" .+@ ",
" .+@ ",
" #$%& ",
" *=-;>, ",
" ')!~{]^* ",
".../(_:<[}|1... ",
".++234567890+++@",
" @@abcdefghi@@@@",
" jklmnopq ",
" rs$%tu ",
" @.+@ ",
" .+@ ",
" .+@ ",
" .+@ ",
" @@ "};
/* XPM */
static const char * add_line_label_xpm[] = {
"16 16 24 1",
" c None",
". c #000000",
"+ c #020202",
"@ c #8D8D8D",
"# c #202020",
"$ c #555555",
"% c #9A9A9A",
"& c #8C8C8C",
"* c #080808",
"= c #161616",
"- c #9B9B9B",
"; c #131313",
"> c #969696",
", c #212121",
"' c #7C7C7C",
") c #414141",
"! c #515151",
"~ c #525252",
"{ c #070707",
"] c #0B0B0B",
"^ c #979797",
"/ c #1F1F1F",
"( c #6B6B6B",
"_ c #009B00",
" ",
" ..+ ",
" ..+@ ",
" .#.$% ",
" ..&*=- ",
" .;>,.' ",
" ......)- ",
" ..!~~{]^ ",
" ./-% #+( ",
" -- -- ",
" ",
"________________",
"________________",
"----------------",
" ",
" "};
/* XPM */
static const char * import_glabel_xpm[] = {
static const char * import_hierarchical_label_xpm[] = {
"16 16 92 2",
" c None",
". c #000000",
......
/*************************************************************/
/* menubar.cpp - create the menubar for the schematic frame */
/*************************************************************/
/*************************************************************/
/* menubar.cpp - create the menubar for the schematic frame */
/*************************************************************/
#ifdef __GNUG__
#pragma implementation
......@@ -18,395 +18,393 @@
#include "id.h"
#include "hotkeys.h"
/* Specific bitmaps */
#include "Add_Power.xpm"
#include "add_bus.xpm"
#include "Add_Line2Bus.xpm"
#include "Add_Bus2Bus.xpm"
#include "add_hierar_symbol.xpm"
#include "add_hierar_pin.xpm"
#include "Import_GLabel.xpm"
/************************************************/
void WinEDA_SchematicFrame::ReCreateMenuBar()
/************************************************/
/* create or update the menubar for the schematic frame
*/
*/
{
int ii;
wxMenuBar * menuBar = GetMenuBar();
wxString msg;
int ii;
wxMenuBar* menuBar = GetMenuBar();
wxString msg;
if( menuBar == NULL )
{
menuBar = new wxMenuBar();
m_FilesMenu = new wxMenu;
// Menu File:
wxMenuItem *item = new wxMenuItem(m_FilesMenu, ID_NEW_PROJECT,
_("&New"),
_("New schematic") );
item->SetBitmap(new_xpm);
m_FilesMenu->Append(item);
item = new wxMenuItem(m_FilesMenu, ID_LOAD_PROJECT,
_("&Open"),
_("Open a schematic") );
item->SetBitmap(open_xpm);
m_FilesMenu->Append(item);
item = new wxMenuItem(m_FilesMenu, ID_LOAD_ONE_SHEET,
_("&Reload the current sheet"),
_("Load or reload a schematic file from file into the current sheet") );
item->SetBitmap(import_xpm);
m_FilesMenu->Append(item);
wxMenuItem* item = new wxMenuItem( m_FilesMenu, ID_NEW_PROJECT,
_( "&New" ),
_( "New schematic" ) );
item->SetBitmap( new_xpm );
m_FilesMenu->Append( item );
item = new wxMenuItem( m_FilesMenu, ID_LOAD_PROJECT,
_( "&Open" ),
_( "Open a schematic" ) );
item->SetBitmap( open_xpm );
m_FilesMenu->Append( item );
item = new wxMenuItem( m_FilesMenu, ID_LOAD_ONE_SHEET,
_( "&Reload the current sheet" ),
_(
"Load or reload a schematic file from file into the current sheet" ) );
item->SetBitmap( import_xpm );
m_FilesMenu->Append( item );
m_FilesMenu->AppendSeparator();
item = new wxMenuItem(m_FilesMenu,ID_SAVE_PROJECT,
_("&Save"),
_("Save schematic project") );
item->SetBitmap(save_project_xpm);
m_FilesMenu->Append(item);
item = new wxMenuItem( m_FilesMenu, ID_SAVE_PROJECT,
_( "&Save" ),
_( "Save schematic project" ) );
item->SetBitmap( save_project_xpm );
m_FilesMenu->Append( item );
m_FilesMenu->AppendSeparator();
item = new wxMenuItem(m_FilesMenu, ID_SAVE_ONE_SHEET,
_("Save &Current sheet"),
_("Save current sheet only") );
item->SetBitmap(save_xpm);
m_FilesMenu->Append(item);
item = new wxMenuItem(m_FilesMenu, ID_SAVE_ONE_SHEET_AS,
_("Save Current sheet &as.."),
_("Save current sheet as..") );
item->SetBitmap(save_as_xpm);
m_FilesMenu->Append(item);
item = new wxMenuItem(m_FilesMenu, ID_GEN_PRINT,
_("P&rint"), _("Print on current printer") );
item->SetBitmap(print_button);
m_FilesMenu->Append(item);
item = new wxMenuItem( m_FilesMenu, ID_SAVE_ONE_SHEET,
_( "Save &Current sheet" ),
_( "Save current sheet only" ) );
item->SetBitmap( save_xpm );
m_FilesMenu->Append( item );
item = new wxMenuItem( m_FilesMenu, ID_SAVE_ONE_SHEET_AS,
_( "Save Current sheet &as.." ),
_( "Save current sheet as.." ) );
item->SetBitmap( save_as_xpm );
m_FilesMenu->Append( item );
item = new wxMenuItem( m_FilesMenu, ID_GEN_PRINT,
_( "P&rint" ), _( "Print on current printer" ) );
item->SetBitmap( print_button );
m_FilesMenu->Append( item );
/* Plot Submenu */
wxMenu *choice_plot_fmt = new wxMenu;
item = new wxMenuItem(choice_plot_fmt, ID_GEN_PLOT_PS,
_("Plot PostScript"), _("Plotting in PostScript format") );
item->SetBitmap(plot_PS_xpm);
choice_plot_fmt->Append(item);
item = new wxMenuItem(choice_plot_fmt, ID_GEN_PLOT_HPGL,
_("Plot HPGL"), _("Plotting in HPGL format") );
item->SetBitmap(plot_HPG_xpm);
choice_plot_fmt->Append(item);
item = new wxMenuItem(choice_plot_fmt, ID_GEN_PLOT_SVG,
_("Plot SVG"), _("Plotting in SVG format") );
item->SetBitmap(plot_xpm);
choice_plot_fmt->Append(item);
wxMenu* choice_plot_fmt = new wxMenu;
item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_PS,
_( "Plot PostScript" ), _( "Plotting in PostScript format" ) );
item->SetBitmap( plot_PS_xpm );
choice_plot_fmt->Append( item );
item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_HPGL,
_( "Plot HPGL" ), _( "Plotting in HPGL format" ) );
item->SetBitmap( plot_HPG_xpm );
choice_plot_fmt->Append( item );
item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_SVG,
_( "Plot SVG" ), _( "Plotting in SVG format" ) );
item->SetBitmap( plot_xpm );
choice_plot_fmt->Append( item );
#ifdef __WINDOWS__
/* Under windows, one can draw to the clipboard */
item = new wxMenuItem(choice_plot_fmt, ID_GEN_COPY_SHEET_TO_CLIPBOARD,
_("Plot to Clipboard"), _("Export drawings to clipboard") );
item->SetBitmap(copy_button);
choice_plot_fmt->Append(item);
item = new wxMenuItem( choice_plot_fmt, ID_GEN_COPY_SHEET_TO_CLIPBOARD,
_( "Plot to Clipboard" ), _( "Export drawings to clipboard" ) );
item->SetBitmap( copy_button );
choice_plot_fmt->Append( item );
#endif
m_FilesMenu->AppendSeparator();
ADD_MENUITEM_WITH_HELP_AND_SUBMENU(m_FilesMenu, choice_plot_fmt,
ID_GEN_PLOT, _("&Plot"), _("Plot HPGL, PostScript, SVG"), plot_xpm);
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( m_FilesMenu, choice_plot_fmt,
ID_GEN_PLOT, _( "&Plot" ),
_( "Plot HPGL, PostScript, SVG" ), plot_xpm );
m_FilesMenu->AppendSeparator();
item = new wxMenuItem(m_FilesMenu, ID_EXIT, _("E&xit"), _("Quit Eeschema") );
item->SetBitmap(exit_xpm);
m_FilesMenu->Append(item);
item = new wxMenuItem( m_FilesMenu, ID_EXIT, _( "E&xit" ), _( "Quit Eeschema" ) );
item->SetBitmap( exit_xpm );
m_FilesMenu->Append( item );
// Create the list of last edited schematic files
m_FilesMenu->AppendSeparator();
int max_file = m_Parent->m_LastProjectMaxCount;
for ( ii = 0; ii < max_file; ii++ )
for( ii = 0; ii < max_file; ii++ )
{
if ( GetLastProject(ii).IsEmpty() ) break;
item = new wxMenuItem(m_FilesMenu, ID_LOAD_FILE_1 + ii,
GetLastProject(ii));
m_FilesMenu->Append(item);
if( GetLastProject( ii ).IsEmpty() )
break;
item = new wxMenuItem( m_FilesMenu, ID_LOAD_FILE_1 + ii,
GetLastProject( ii ) );
m_FilesMenu->Append( item );
}
// Menu Edit:
wxMenu * editMenu = new wxMenu;
wxMenu* editMenu = new wxMenu;
msg = AddHotkeyName( _( "&Undo\t" ), s_Schematic_Hokeys_Descr, HK_UNDO );
item = new wxMenuItem(editMenu, ID_SCHEMATIC_UNDO,
item = new wxMenuItem( editMenu, ID_SCHEMATIC_UNDO,
msg,
_("Undo last edition") );
item->SetBitmap(undo_xpm);
editMenu->Append(item);
_( "Undo last edition" ) );
item->SetBitmap( undo_xpm );
editMenu->Append( item );
msg = AddHotkeyName( _( "&Redo\t" ), s_Schematic_Hokeys_Descr, HK_REDO );
item = new wxMenuItem(editMenu, ID_SCHEMATIC_REDO,
item = new wxMenuItem( editMenu, ID_SCHEMATIC_REDO,
msg,
_("Redo the last undo command") );
item->SetBitmap(redo_xpm);
editMenu->Append(item);
_( "Redo the last undo command" ) );
item->SetBitmap( redo_xpm );
editMenu->Append( item );
editMenu->AppendSeparator();
item = new wxMenuItem(
editMenu,
ID_SCHEMATIC_DELETE_ITEM_BUTT,
_("Delete"),
_("Delete items"),
_( "Delete" ),
_( "Delete items" ),
wxITEM_NORMAL
);
item->SetBitmap(delete_body_xpm);
editMenu->Append(item);
item->SetBitmap( delete_body_xpm );
editMenu->Append( item );
// Place Menu
//TODO: Unify the ID names!
wxMenu *placeMenu = new wxMenu;
wxMenu* placeMenu = new wxMenu;
item = new wxMenuItem(
placeMenu,
ID_COMPONENT_BUTT,
_("&Component"),
_("Place the component")
_( "&Component" ),
_( "Place the component" )
);
item->SetBitmap(add_component_xpm);
placeMenu->Append(item);
item->SetBitmap( add_component_xpm );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_PLACE_POWER_BUTT,
_("&Power port"),
_("Place the power port"),
_( "&Power port" ),
_( "Place the power port" ),
wxITEM_NORMAL
);
item->SetBitmap(add_power_xpm);
placeMenu->Append(item);
item->SetBitmap( add_power_xpm );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_WIRE_BUTT,
_("&Wire"),
_("Place the wire"),
_( "&Wire" ),
_( "Place the wire" ),
wxITEM_NORMAL
);
item->SetBitmap(add_line_xpm);
placeMenu->Append(item);
item->SetBitmap( add_line_xpm );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_BUS_BUTT,
_("&Bus"),
_("Place the bus"),
_( "&Bus" ),
_( "Place the bus" ),
wxITEM_NORMAL
);
item->SetBitmap(add_bus_xpm);
placeMenu->Append(item);
item->SetBitmap( add_bus_xpm );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_WIRETOBUS_ENTRY_BUTT,
_("W&ire to bus entry"),
_("Place the wire to bus entry"),
_( "W&ire to bus entry" ),
_( "Place the wire to bus entry" ),
wxITEM_NORMAL
);
item->SetBitmap(add_line2bus_xpm);
placeMenu->Append(item);
item->SetBitmap( add_line2bus_xpm );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_BUSTOBUS_ENTRY_BUTT,
_("B&us to bus entry"),
_("Place the bus to bus entry"),
_( "B&us to bus entry" ),
_( "Place the bus to bus entry" ),
wxITEM_NORMAL
);
item->SetBitmap(add_bus2bus_xpm);
placeMenu->Append(item);
item->SetBitmap( add_bus2bus_xpm );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_NOCONN_BUTT,
_("No connect flag"),
_("Place the no connect flag"),
_( "No connect flag" ),
_( "Place the no connect flag" ),
wxITEM_NORMAL
);
item->SetBitmap(noconn_button);
placeMenu->Append(item);
item->SetBitmap( noconn_button );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_LABEL_BUTT,
_("Net name"),
_("Place the Net name"),
_( "Net name" ),
_( "Place the Net name" ),
wxITEM_NORMAL
);
item->SetBitmap(add_line_label_xpm);
placeMenu->Append(item);
item->SetBitmap( add_line_label_xpm );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_GLABEL_BUTT,
_("Global label"),
_("Place the global label"),
item = new wxMenuItem( placeMenu, ID_GLABEL_BUTT,
_( "Global label" ),
_( "Add global label.\nWarning: all global labels with the same name are connected in whole hierarchy" ),
wxITEM_NORMAL
);
item->SetBitmap(add_glabel_xpm);
placeMenu->Append(item);
item->SetBitmap( add_glabel_xpm );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_HIERLABEL_BUTT,
_("Hierarchical label"),
_("Place the hierarchical label"),
ID_JUNCTION_BUTT,
_( "Junction" ),
_( "Place the junction" ),
wxITEM_NORMAL
);
item->SetBitmap(add_glabel_xpm);
placeMenu->Append(item);
item->SetBitmap( add_junction_xpm );
placeMenu->Append( item );
placeMenu->AppendSeparator();
item = new wxMenuItem(
placeMenu,
ID_JUNCTION_BUTT,
_("Junction"),
_("Place the junction"),
ID_HIERLABEL_BUTT,
_( "Hierarchical label" ),
_( "Add a hierarchical label. This label will be seen as a pin sheet in the sheet symbol" ),
wxITEM_NORMAL
);
item->SetBitmap(add_junction_xpm);
placeMenu->Append(item);
placeMenu->AppendSeparator();
item->SetBitmap( add_hierarchical_label_xpm );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_SHEET_SYMBOL_BUTT,
_("Hierarchical sheet"),
_("Place the hierarchical sheet"),
_( "Hierarchical sheet" ),
_( "Place the hierarchical sheet" ),
wxITEM_NORMAL
);
item->SetBitmap(add_hierar_symbol_xpm);
placeMenu->Append(item);
item->SetBitmap( add_hierarchical_subsheet_xpm );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_IMPORT_GLABEL_BUTT,
_("Imported hierarchical label"),
_("Place the pinsheet (imported hierarchical label from sheet)"),
_( "Imported hierarchical label" ),
_( "Place the pinsheet (imported hierarchical label from sheet)" ),
wxITEM_NORMAL
);
item->SetBitmap(import_glabel_xpm);
placeMenu->Append(item);
item->SetBitmap( import_hierarchical_label_xpm );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_SHEET_LABEL_BUTT,
_("Hierarchical pin to sheet"),
_("Place the hierarchical pin to sheet"),
_( "Hierarchical pin to sheet" ),
_( "Place the hierarchical pin to sheet" ),
wxITEM_NORMAL
);
item->SetBitmap(add_hierar_pin_xpm);
placeMenu->Append(item);
item->SetBitmap( add_hierar_pin_xpm );
placeMenu->Append( item );
placeMenu->AppendSeparator();
item = new wxMenuItem(
placeMenu,
ID_LINE_COMMENT_BUTT,
_("Graphic line or poligon"),
_("Place the Graphic line or poligon"),
_( "Graphic line or poligon" ),
_( "Place the Graphic line or poligon" ),
wxITEM_NORMAL
);
item->SetBitmap(add_dashed_line_xpm);
placeMenu->Append(item);
item->SetBitmap( add_dashed_line_xpm );
placeMenu->Append( item );
item = new wxMenuItem(
placeMenu,
ID_TEXT_COMMENT_BUTT,
_("Graphic text (comment)"),
_("Place the Graphic text (comment)"),
_( "Graphic text (comment)" ),
_( "Place the Graphic text (comment)" ),
wxITEM_NORMAL
);
item->SetBitmap(add_text_xpm);
placeMenu->Append(item);
item->SetBitmap( add_text_xpm );
placeMenu->Append( item );
// Menu Configuration:
wxMenu * configmenu = new wxMenu;
item = new wxMenuItem(configmenu, ID_CONFIG_REQ,
_("&Libs and Dir"),
_("Setting Libraries, Directories and others...") );
item->SetBitmap(library_xpm);
configmenu->Append(item);
item = new wxMenuItem(configmenu, ID_COLORS_SETUP,
_("&Colors"),
_("Setting colors...") );
item->SetBitmap(palette_xpm);
configmenu->Append(item);
wxMenu* configmenu = new wxMenu;
item = new wxMenuItem( configmenu, ID_CONFIG_REQ,
_( "&Libs and Dir" ),
_( "Setting Libraries, Directories and others..." ) );
item->SetBitmap( library_xpm );
configmenu->Append( item );
item = new wxMenuItem( configmenu, ID_COLORS_SETUP,
_( "&Colors" ),
_( "Setting colors..." ) );
item->SetBitmap( palette_xpm );
configmenu->Append( item );
// ADD_MENUITEM(configmenu, ID_OPTIONS_SETUP, _("&Options"), preference_xpm);
item = new wxMenuItem(configmenu, ID_OPTIONS_SETUP,
_("&Options"),
_("Select general options...") );
item->SetBitmap(preference_xpm);
configmenu->Append(item);
item = new wxMenuItem( configmenu, ID_OPTIONS_SETUP,
_( "&Options" ),
_( "Select general options..." ) );
item->SetBitmap( preference_xpm );
configmenu->Append( item );
// Font selection and setup
AddFontSelectionMenu(configmenu);
AddFontSelectionMenu( configmenu );
m_Parent->SetLanguageList(configmenu);
m_Parent->SetLanguageList( configmenu );
configmenu->AppendSeparator();
item = new wxMenuItem(configmenu, ID_CONFIG_SAVE, _("&Save preferences"),
_("Save application preferences") );
item->SetBitmap(save_setup_xpm);
configmenu->Append(item);
item = new wxMenuItem(configmenu, ID_CONFIG_READ, _("&Read preferences"),
_("Read application preferences"));
item->SetBitmap(read_setup_xpm);
configmenu->Append(item);
item = new wxMenuItem( configmenu, ID_CONFIG_SAVE, _( "&Save preferences" ),
_( "Save application preferences" ) );
item->SetBitmap( save_setup_xpm );
configmenu->Append( item );
item = new wxMenuItem( configmenu, ID_CONFIG_READ, _( "&Read preferences" ),
_( "Read application preferences" ) );
item->SetBitmap( read_setup_xpm );
configmenu->Append( item );
configmenu->AppendSeparator();
AddHotkeyConfigMenu( configmenu );
// Menu Help:
wxMenu *helpMenu = new wxMenu;
item = new wxMenuItem(helpMenu , ID_GENERAL_HELP,
_("&Contents"), _("Open the eeschema manual"));
item->SetBitmap(help_xpm);
helpMenu->Append(item);
wxMenu* helpMenu = new wxMenu;
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP,
_( "&Contents" ), _( "Open the eeschema manual" ) );
item->SetBitmap( help_xpm );
helpMenu->Append( item );
item = new wxMenuItem(helpMenu , ID_KICAD_ABOUT,
_("&About"), _("About this application"));
item->SetBitmap(info_xpm);
helpMenu->Append(item);
item = new wxMenuItem( helpMenu, ID_KICAD_ABOUT,
_( "&About" ), _( "About this application" ) );
item->SetBitmap( info_xpm );
helpMenu->Append( item );
menuBar->Append(m_FilesMenu, _("&File") );
menuBar->Append(editMenu, _("&Edit") );
menuBar->Append(placeMenu, _("&Place") );
menuBar->Append(configmenu, _("&Preferences") );
menuBar->Append(helpMenu, _("&Help") );
menuBar->Append( m_FilesMenu, _( "&File" ) );
menuBar->Append( editMenu, _( "&Edit" ) );
menuBar->Append( placeMenu, _( "&Place" ) );
menuBar->Append( configmenu, _( "&Preferences" ) );
menuBar->Append( helpMenu, _( "&Help" ) );
// Associate the menu bar with the frame
SetMenuBar(menuBar);
SetMenuBar( menuBar );
}
else // Update the list of last edited schematic files
{
wxMenuItem * item;
wxMenuItem* item;
int max_file = m_Parent->m_LastProjectMaxCount;
for ( ii = max_file-1; ii >=0 ; ii-- )
for( ii = max_file - 1; ii >=0; ii-- )
{
if( m_FilesMenu->FindItem(ID_LOAD_FILE_1 + ii) )
if( m_FilesMenu->FindItem( ID_LOAD_FILE_1 + ii ) )
{
item = m_FilesMenu->Remove(ID_LOAD_FILE_1 + ii);
if ( item ){ SAFE_DELETE( item );}
item = m_FilesMenu->Remove( ID_LOAD_FILE_1 + ii );
if( item )
{
SAFE_DELETE( item );
}
}
}
for ( ii = 0; ii < max_file; ii++ )
for( ii = 0; ii < max_file; ii++ )
{
if ( GetLastProject(ii).IsEmpty() ) break;
item = new wxMenuItem(m_FilesMenu, ID_LOAD_FILE_1 + ii,
GetLastProject(ii));
m_FilesMenu->Append(item);
if( GetLastProject( ii ).IsEmpty() )
break;
item = new wxMenuItem( m_FilesMenu, ID_LOAD_FILE_1 + ii,
GetLastProject( ii ) );
m_FilesMenu->Append( item );
}
}
}
......@@ -21,17 +21,10 @@
#include "cvpcb.xpm"
#include "Hierarchy_Nav.xpm"
#include "Hierarchy_cursor.xpm"
#include "Add_Power.xpm"
#include "Lines90.xpm"
#include "Hidden_Pin.xpm"
#include "Add_Bus2Bus.xpm"
#include "Add_Line2Bus.xpm"
#include "add_bus.xpm"
#include "library_browse.xpm"
#include "libedit.xpm"
#include "add_hierar_pin.xpm"
#include "add_hierar_symbol.xpm"
#include "Import_GLabel.xpm"
#include "Lines90.xpm"
#include "Hidden_Pin.xpm"
#include "id.h"
......@@ -201,24 +194,27 @@ void WinEDA_SchematicFrame::ReCreateVToolbar()
m_VToolBar->AddTool( ID_GLABEL_BUTT, wxEmptyString,
BITMAP( add_glabel_xpm ),
_( "Add global label" ), wxITEM_CHECK );
m_VToolBar->AddTool( ID_HIERLABEL_BUTT, wxEmptyString,
BITMAP( add_glabel_xpm ),
_( "Add hierarchical label" ), wxITEM_CHECK );
_( "Add global label.\nWarning: all global labels with the same name are connected in whole hierarchy" ),
wxITEM_CHECK );
m_VToolBar->AddTool( ID_JUNCTION_BUTT, wxEmptyString,
BITMAP( add_junction_xpm ),
_( "Add junction" ), wxITEM_CHECK );
m_VToolBar->AddSeparator();
m_VToolBar->AddTool( ID_HIERLABEL_BUTT, wxEmptyString,
BITMAP( add_hierarchical_label_xpm ),
_( "Add a hierarchical label. This label will be seen as a pin sheet in the sheet symbol" ),
wxITEM_CHECK );
m_VToolBar->AddTool( ID_SHEET_SYMBOL_BUTT, wxEmptyString,
BITMAP( add_hierar_symbol_xpm ),
_( "Add hierarchical symbol (sheet)" ), wxITEM_CHECK );
BITMAP( add_hierarchical_subsheet_xpm ),
_( "Add hierarchical sheet" ), wxITEM_CHECK );
m_VToolBar->AddTool( ID_IMPORT_GLABEL_BUTT, wxEmptyString,
BITMAP( import_glabel_xpm ),
_( "Import hierarchical label from sheet & create pinsheet" ), wxITEM_CHECK );
BITMAP( import_hierarchical_label_xpm ),
_( "Import hierarchical label from sheet and create the corresponding pin sheet" ),
wxITEM_CHECK );
m_VToolBar->AddTool( ID_SHEET_LABEL_BUTT, wxEmptyString,
BITMAP( add_hierar_pin_xpm ),
......
......@@ -49,6 +49,15 @@
#include "../bitmaps/Add_GLabel.xpm"
#include "../bitmaps/Add_Junction.xpm"
#include "../bitmaps/Add_Power.xpm"
#include "../bitmaps/Add_Bus2Bus.xpm"
#include "../bitmaps/Add_Line2Bus.xpm"
#include "../bitmaps/add_bus.xpm"
#include "../bitmaps/add_hierarchical_label.xpm"
#include "../bitmaps/add_hierar_pin.xpm"
#include "../bitmaps/add_hierar_subsheet.xpm"
#include "../bitmaps/import_hierarchical_label.xpm"
#include "../bitmaps/general_deletions.xpm"
#include "../bitmaps/Delete_Text.xpm"
#include "../bitmaps/Delete_Cotation.xpm"
......
......@@ -5,7 +5,7 @@
COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE
(wxT("(2008-02-01)"))
(wxT("(2008-02-13)"))
#endif
;
......
/****************************/
/* PcbNew - docedit.cppp */
/****************************/
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "pcbnew.h"
#include "protos.h"
/*******************************************************************/
int KeyWordOk(const wxString & KeyList, const wxString & Database )
/*******************************************************************/
/* Recherche si dans le texte Database on retrouve tous les mots
cles donnes dans KeyList ( KeyList = suite de mots cles
separes par des espaces
*/
{
char * Keys, *Token, *Data, * TLoc = NULL;
if(*KeyList < ' ' ) return(0);
Keys = strdup(KeyList.GetData()); strupper(Keys);
Data = strdup(Database.GetData()); strupper(Data);
Token = strtok(Keys," \n\r");
while (Token)
{
TLoc = strstr( Data, Token);
if( TLoc == NULL) break;
/* Verification que la chaine trouvee ne soit pas un morceau de mot */
if( TLoc > Data )
{
if ( *(TLoc-1) != ' ' )
{
TLoc = NULL; break;
}
}
TLoc += strlen(Token);
if( *TLoc > ' ' ) { TLoc = NULL; break; }
Token = strtok(NULL," \n\r");
}
free( Keys );
free( Data );
if ( TLoc ) return (1);
return(0);
}
/***************************************************************/
/* Edition des pistes: Routines de modification de dimensions: */
/* Modif de largeurs de segment, piste, net , zone et diam Via */
/***************************************************************/
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "pcbnew.h"
#include "autorout.h"
#include "protos.h"
/* Routines Locales */
/*********************************************************************/
int WinEDA_PcbFrame::Edit_TrackSegm_Width(wxDC * DC, TRACK * pt_segm)
/*********************************************************************/
/* Routine de modification de la largeur d'un segment ( ou via) de piste
Routine de base utilisee par les autres routines
*/
{
int errdrc = OK_DRC;
int old_w, consigne ;
pt_segm->Draw(DrawPanel, DC, GR_XOR) ; // effacement a l'ecran
/* Test DRC et mise a la largeur */
old_w = pt_segm->m_Width;
consigne = pt_segm->m_Width = g_DesignSettings.m_CurrentTrackWidth;
if( pt_segm->Type() == TYPEVIA )
{
consigne = pt_segm->m_Width = g_DesignSettings.m_CurrentViaSize;
}
if ( old_w < consigne) /* DRC utile puisque augm de dimension */
{
if(Drc_On) errdrc = Drc(this, DC, pt_segm, m_Pcb->m_Track,1);
if(errdrc == BAD_DRC) pt_segm->m_Width = old_w;
else GetScreen()->SetModify();
}
else GetScreen()->SetModify(); /* Correction systematiquement faite si reduction */
pt_segm->Draw(DrawPanel, DC, GR_OR) ;
return(errdrc);
}
/*****************************************************************/
void WinEDA_PcbFrame::Edit_Track_Width(wxDC * DC,TRACK * pt_segm)
/*****************************************************************/
{
int ii;
TRACK * pt_track;
int errdrc;
int nb_segm, nb_segm_modifies = 0, nb_segm_non_modifies = 0;
if( pt_segm == NULL) return;
pt_track = Marque_Une_Piste(this, DC, pt_segm, &nb_segm, 0);
for(ii = 0; ii < nb_segm; ii++, pt_track = (TRACK*) pt_track->Pnext)
{
pt_track->SetState(BUSY,OFF);
errdrc = Edit_TrackSegm_Width(DC, pt_track);
if(errdrc == BAD_DRC) nb_segm_non_modifies++;
else nb_segm_modifies++;
}
}
/***********************************************************/
void WinEDA_PcbFrame::Edit_Net_Width(wxDC * DC, int Netcode)
/***********************************************************/
{
TRACK *pt_segm;
int errdrc;
int nb_segm_modifies = 0;
int nb_segm_non_modifies = 0;
if (Netcode <= 0 ) return;
if( ! IsOK(this, "Change largeur NET ?") ) return;
/* balayage des segments */
for( pt_segm = m_Pcb->m_Track; pt_segm != NULL; pt_segm = (TRACK*) pt_segm->Pnext )
{
if ( Netcode != pt_segm->GetNet() ) /* mauvaise piste */
continue ;
/* piste d'un net trouvee */
errdrc = Edit_TrackSegm_Width(DC, pt_segm);
if(errdrc == BAD_DRC) nb_segm_non_modifies++;
else nb_segm_modifies++;
}
}
/*************************************************************************/
bool WinEDA_PcbFrame::Resize_Pistes_Vias(wxDC * DC, bool Track, bool Via)
/*************************************************************************/
/* remet a jour la largeur des pistes et/ou le diametre des vias
Si piste == 0 , pas de cht sur les pistes
Si via == 0 , pas de cht sur les vias
*/
{
TRACK * pt_segm ;
int errdrc;
int nb_segm_modifies = 0;
int nb_segm_non_modifies = 0;
if ( Track && Via)
{
if( ! IsOK(this, _("Edit All Tracks and Vias Sizes")) ) return FALSE;
}
else if ( Via )
{
if( ! IsOK(this, _("Edit All Via Sizes")) ) return FALSE;
}
else if( Track )
{
if( ! IsOK(this, _("Edit All Track Sizes")) ) return FALSE;
}
pt_segm = m_Pcb->m_Track ;
for ( ; pt_segm != NULL; pt_segm = (TRACK*) pt_segm->Pnext )
{
if( pt_segm->Type() == TYPEVIA ) /* mise a jour du diametre de la via */
{
if ( Via )
{
errdrc = Edit_TrackSegm_Width(DC, pt_segm);
if(errdrc == BAD_DRC) nb_segm_non_modifies++;
else nb_segm_modifies++;
}
}
else /* mise a jour de la largeur du segment */
{
if ( Track )
{
errdrc = Edit_TrackSegm_Width(DC, pt_segm);
if(errdrc == BAD_DRC) nb_segm_non_modifies++;
else nb_segm_modifies++;
}
}
}
if ( nb_segm_modifies ) return TRUE;
return FALSE;
}
......@@ -8,16 +8,13 @@ EXTRACPPFLAGS += -DPCBNEW -fno-strict-aliasing -I./ -Ibitmaps -I../include -I..
LIBVIEWER3D = ../3d-viewer/3d-viewer.a
ZONE_FILES = zones_by_polygon.o
#ZONE_FILES = zones.o
ZONE_FILES = zones_by_polygon.o zones_test_and_combine_areas.o zone_filling_algorithm.o
SPECCTRA_TOOLS = specctra.o specctra_export.o dsn.o
SPECCTRA_TOOLS = specctra.o specctra_export.o dsn.o specctra_import.o
OBJECTS= $(TARGET).o classpcb.o\
$(ZONE_FILES)\
$(SPECCTRA_TOOLS)\
zones_test_and_combine_areas.o\
zone_filling_algorithm.o\
lay2plot.o\
modedit_undo_redo.o\
block_module_editor.o\
......@@ -119,10 +116,7 @@ OBJECTS= $(TARGET).o classpcb.o\
modedit.o\
export_gencad.o\
hotkeys.o \
collectors.o \
specctra.cpp \
specctra_import.cpp \
specctra_export.cpp
collectors.o
......@@ -301,8 +295,6 @@ undelete.o: undelete.cpp $(COMMON)
move_or_drag_track.o: move_or_drag_track.cpp $(COMMON)
copy_track.o: copy_track.cpp $(COMMON)
ioascii.o: ioascii.cpp $(COMMON)
coordbox.o: coordbox.cpp $(COMMON)
......
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