diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0962860bb6..8909beb89c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,6 +76,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# Set default flags for Debug build.
set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
+
+ if( USE_PNG_BITMAPS )
+ #Add -DUSE_PNG_BITMAPS to windres.exe command line
+ set(CMAKE_RC_COMPILER windres.exe -DUSE_PNG_BITMAPS)
+ endif( USE_PNG_BITMAPS )
endif(CMAKE_COMPILER_IS_GNUCXX)
if(wxUSE_UNICODE)
diff --git a/bitmap2component/bitmap2cmp_gui.cpp b/bitmap2component/bitmap2cmp_gui.cpp
index 21daf44a12..b1eee90195 100644
--- a/bitmap2component/bitmap2cmp_gui.cpp
+++ b/bitmap2component/bitmap2cmp_gui.cpp
@@ -36,8 +36,6 @@
#include "potracelib.h"
#include "bitmap_io.h"
-#include "bitmap2component.xpm"
-
#include "colors_selection.h"
#include "build_version.h"
@@ -98,11 +96,10 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
m_Config->Read( KEYWORD_LAST_INPUT_FILE, &m_BitmapFileName );
m_Config->Read( KEYWORD_LAST_OUTPUT_FILE, &m_ConvertedFileName );
- #ifdef __WINDOWS__
- SetIcon( wxICON( bitmap2component_icon ) );
- #else
- SetIcon( wxICON( bitmap2component ) );
- #endif
+ // Give an icon
+ wxIcon icon;
+ icon.CopyFromBitmap( KiBitmap( icon_bitmap2component_xpm ) );
+ SetIcon( icon );
GetSizer()->SetSizeHints( this );
diff --git a/bitmap2component/bitmap2component.rc b/bitmap2component/bitmap2component.rc
index 98ff16a927..6acd99a63c 100644
--- a/bitmap2component/bitmap2component.rc
+++ b/bitmap2component/bitmap2component.rc
@@ -1,2 +1,7 @@
-bitmap2component_icon ICON bitmap2component.ico
+#ifdef USE_PNG_BITMAPS
+icon_bitmap2component ICON "../bitmaps_png/icons/icon_bitmap2component.ico"
+#else
+icon_bitmap2component ICON "../bitmaps_xpm/icons/icon_bitmap2component.ico"
+#endif
+
#include "wx/msw/wx.rc"
diff --git a/bitmap2component/bitmap2component_16x16.xpm b/bitmap2component/bitmap2component_16x16.xpm
deleted file mode 100644
index 2b4d283a98..0000000000
--- a/bitmap2component/bitmap2component_16x16.xpm
+++ /dev/null
@@ -1,38 +0,0 @@
-/* XPM */
-const char *bitmap2component_16x16_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 16 16 1",
-"& c #128B26",
-" c #0CFA0C",
-"# c #A75104",
-"@ c #22204C",
-"O c #050304",
-"; c #191327",
-"X c #054306",
-"* c #F27504",
-"o c #0C7E0C",
-": c #1ACC2E",
-"$ c #51280C",
-"- c #391E07",
-". c #0CBE0C",
-"% c #289F55",
-"= c #703505",
-"+ c #1C563C",
-/* pixels */
-" . X",
-"oooooooooooo .. ",
-"oXO+ooooooXO .. ",
-"@@#$+%+& XX X",
-"OO#*#O#=OX XOOO",
-"OO#*=O$-OO;@@@: ",
-"OO=OO.%:XOO***$o",
-"%:% X. ;***#X",
-"ooooo . .o;***#;",
-"OO=$OXooOOO###;o",
-"OO#*#O#$OOX+o&: ",
-"OO#*=O=-OX XOOO",
-"&X=;& %% XX X",
-"oX;oooooooXO .. ",
-"oooooooooooo .. ",
-" . X"
-};
diff --git a/bitmaps_png/icons/icon_bitmap2component.ico b/bitmaps_png/icons/icon_bitmap2component.ico
new file mode 100644
index 0000000000..ca4337f6e6
Binary files /dev/null and b/bitmaps_png/icons/icon_bitmap2component.ico differ
diff --git a/bitmaps_png/icons/icon_cvpcb.ico b/bitmaps_png/icons/icon_cvpcb.ico
new file mode 100644
index 0000000000..743c80afdc
Binary files /dev/null and b/bitmaps_png/icons/icon_cvpcb.ico differ
diff --git a/bitmaps_png/icons/icon_eeschema.ico b/bitmaps_png/icons/icon_eeschema.ico
new file mode 100644
index 0000000000..9a79f82481
Binary files /dev/null and b/bitmaps_png/icons/icon_eeschema.ico differ
diff --git a/bitmaps_png/icons/icon_gerbview.ico b/bitmaps_png/icons/icon_gerbview.ico
new file mode 100644
index 0000000000..80d5605f91
Binary files /dev/null and b/bitmaps_png/icons/icon_gerbview.ico differ
diff --git a/bitmaps_png/icons/icon_kicad.ico b/bitmaps_png/icons/icon_kicad.ico
new file mode 100644
index 0000000000..9f4d3619a2
Binary files /dev/null and b/bitmaps_png/icons/icon_kicad.ico differ
diff --git a/bitmaps_png/icons/icon_pcbcalculator.ico b/bitmaps_png/icons/icon_pcbcalculator.ico
new file mode 100644
index 0000000000..578c9bf97f
Binary files /dev/null and b/bitmaps_png/icons/icon_pcbcalculator.ico differ
diff --git a/bitmaps_png/icons/icon_pcbnew.ico b/bitmaps_png/icons/icon_pcbnew.ico
new file mode 100644
index 0000000000..9c00694b45
Binary files /dev/null and b/bitmaps_png/icons/icon_pcbnew.ico differ
diff --git a/bitmaps_png/icons/kicad_icon.png b/bitmaps_png/icons/kicad_icon.png
new file mode 100644
index 0000000000..6733771aa9
Binary files /dev/null and b/bitmaps_png/icons/kicad_icon.png differ
diff --git a/bitmaps_png/sources/icon_pcbcalculator.svg b/bitmaps_png/sources/icon_pcbcalculator.svg
index a2687dc152..c71e211da2 100644
--- a/bitmaps_png/sources/icon_pcbcalculator.svg
+++ b/bitmaps_png/sources/icon_pcbcalculator.svg
@@ -1,199 +1,1100 @@
-
diff --git a/bitmaps_xpm/CMakeLists.txt b/bitmaps_xpm/CMakeLists.txt
index f1ccb4a65b..8584aed228 100644
--- a/bitmaps_xpm/CMakeLists.txt
+++ b/bitmaps_xpm/CMakeLists.txt
@@ -164,6 +164,8 @@ set(BITMAP_SRCS
icon_kicad.xpm
icon_modedit.xpm
icon_pcbnew.xpm
+ icon_pcbcalculator.xpm
+ icon_bitmap2component.xpm
icon_txt.xpm
import3d.xpm
image.xpm
diff --git a/bitmap2component/bitmap2component.xpm b/bitmaps_xpm/icon_bitmap2component.xpm
similarity index 97%
rename from bitmap2component/bitmap2component.xpm
rename to bitmaps_xpm/icon_bitmap2component.xpm
index e968612ef9..93bb4aa676 100644
--- a/bitmap2component/bitmap2component.xpm
+++ b/bitmaps_xpm/icon_bitmap2component.xpm
@@ -1,5 +1,5 @@
/* XPM */
-const char *bitmap2component_xpm[] = {
+const char *icon_bitmap2component_xpm[] = {
/* columns rows colors chars-per-pixel */
"32 32 16 1",
"@ c #592904",
diff --git a/bitmaps_xpm/icon_pcbcalculator.xpm b/bitmaps_xpm/icon_pcbcalculator.xpm
new file mode 100644
index 0000000000..1ac1cc0d14
--- /dev/null
+++ b/bitmaps_xpm/icon_pcbcalculator.xpm
@@ -0,0 +1,54 @@
+/* XPM */
+const char *icon_pcbcalculator_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 16 1",
+"o c #AC9D99",
+"= c #6F5A87",
+"- c #4242BA",
+"& c #7E7EF7",
+"# c #37357B",
+"; c #9A5753",
+"O c #997366",
+". c #958280",
+"@ c #342D4E",
+"X c #B0816B",
+" c None",
+"$ c #3A1721",
+"* c #6258B4",
+": c #9C090B",
+"+ c #5C433C",
+"% c #6E5C55",
+/* pixels */
+" .XXX. ",
+" oXo..OX o ",
+" oX.+O.X.+@#$% ooo ",
+" oX.+%X%&&&&*@+o o oo ",
+" oOO%+.O&&&&&&*= o o ",
+" .@@=X%+OX&&&&&&& o o ",
+" oXX+@#&&&X%+%X&&&&&&& o o ",
+" oOoX=&&&&OX%+OX&&&&&&& o o=$ ",
+"O@O.OX..&O.%++OX&&&&&& oooooo-$o",
+"+-O.+O.XX.%+++%..&&&& ooo oo--@O",
+"@-*XO+++%%+++++%..&& oooo-----#+",
+"$--=XO+++++%++++OX. oooo----##@@",
+"$---OX..O..XO++++O ooo ---##@@@%",
+"@----*OOXOOOXO+++oooo --##@@@@@.",
+"%#----------OXO+oooo =#@@@@@@@@o",
+".#----------*;Xooooo.X+@@@@@@%$ ",
+" $=--------#$:$oooo++.X+@@@$%.+ ",
+" +O+#-----$:;;:$. ++++.O+$++..+ ",
+" o+O%$#--$::::::$.%++++.O. O..+ ",
+" +$$::::::::;.%++++.X %..+ ",
+" $:::::::::@O.%++++.X%.%+ ",
+" +:::;:::::$..O.++++%.X$%o ",
+" o$::+O:::::$O..+X.++++%.X ",
+" ;:::Oo:::::+ O..+ X.++++%.X ",
+" o$::;oo:::::$ O..+ X.++++%.o ",
+" +::X o:::::$ .+$+ X.++oo.X ",
+" $:o ;:::::$o %. X.% oOX ",
+" +:::::::::o X.OO.X ",
+" .::::::::% XXXXo ",
+" +::::::$ oo ",
+" +:::::o ",
+" %$:$. "
+};
diff --git a/bitmap2component/bitmap2component.ico b/bitmaps_xpm/icons/icon_bitmap2component.ico
similarity index 100%
rename from bitmap2component/bitmap2component.ico
rename to bitmaps_xpm/icons/icon_bitmap2component.ico
diff --git a/cvpcb/cvpcb.ico b/bitmaps_xpm/icons/icon_cvpcb.ico
similarity index 100%
rename from cvpcb/cvpcb.ico
rename to bitmaps_xpm/icons/icon_cvpcb.ico
diff --git a/eeschema/eeschema.ico b/bitmaps_xpm/icons/icon_eeschema.ico
similarity index 100%
rename from eeschema/eeschema.ico
rename to bitmaps_xpm/icons/icon_eeschema.ico
diff --git a/gerbview/gerbview.ico b/bitmaps_xpm/icons/icon_gerbview.ico
similarity index 100%
rename from gerbview/gerbview.ico
rename to bitmaps_xpm/icons/icon_gerbview.ico
diff --git a/kicad/kicad.ico b/bitmaps_xpm/icons/icon_kicad.ico
similarity index 100%
rename from kicad/kicad.ico
rename to bitmaps_xpm/icons/icon_kicad.ico
diff --git a/pcb_calculator/pcb_calculator.ico b/bitmaps_xpm/icons/icon_pcbcalculator.ico
similarity index 100%
rename from pcb_calculator/pcb_calculator.ico
rename to bitmaps_xpm/icons/icon_pcbcalculator.ico
diff --git a/pcbnew/icon_pcbnew.ico b/bitmaps_xpm/icons/icon_pcbnew.ico
similarity index 100%
rename from pcbnew/icon_pcbnew.ico
rename to bitmaps_xpm/icons/icon_pcbnew.ico
diff --git a/bitmaps_xpm/icon_kicad.png b/bitmaps_xpm/icons/kicad_icon.png
similarity index 100%
rename from bitmaps_xpm/icon_kicad.png
rename to bitmaps_xpm/icons/kicad_icon.png
diff --git a/bitmaps_xpm/kicad.png b/bitmaps_xpm/kicad.png
deleted file mode 100644
index 6c33035039..0000000000
Binary files a/bitmaps_xpm/kicad.png and /dev/null differ
diff --git a/common/hotkeys_basic.cpp b/common/hotkeys_basic.cpp
index d2a5364e57..f798969d02 100644
--- a/common/hotkeys_basic.cpp
+++ b/common/hotkeys_basic.cpp
@@ -339,9 +339,12 @@ void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame,
wxString keyname;
Ki_HotkeyInfo** List;
- wxString msg = _( "
" );
+ wxString msg = wxT( "" );
+
+ msg += wxT( "");
+ msg += _("Hotkeys List");
+ msg += wxT("
");
- msg += _( "Hotkeys List
");
for( ; aDescList->m_HK_InfoList != NULL; aDescList++ )
{
List = aDescList->m_HK_InfoList;
diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp
index 64885bcc22..c98cb2a53a 100644
--- a/cvpcb/cvframe.cpp
+++ b/cvpcb/cvframe.cpp
@@ -100,11 +100,9 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( const wxString& title, long style ) :
m_DocModulesFileName = DEFAULT_FOOTPRINTS_LIST_FILENAME;
// Give an icon
- #ifdef __WINDOWS__
- SetIcon( wxICON( a_icon_cvpcb ) );
- #else
- SetIcon( wxICON( icon_cvpcb ) );
- #endif
+ wxIcon icon;
+ icon.CopyFromBitmap( KiBitmap( icon_cvpcb_xpm ) );
+ SetIcon( icon );
SetAutoLayout( true );
diff --git a/cvpcb/cvpcb.rc b/cvpcb/cvpcb.rc
index d8f030bba3..69b038bd17 100644
--- a/cvpcb/cvpcb.rc
+++ b/cvpcb/cvpcb.rc
@@ -1,2 +1,6 @@
-a_icon_cvpcb ICON "cvpcb.ico"
+#ifdef USE_PNG_BITMAPS
+icon_cvpcb ICON "../bitmaps_png/icons/icon_cvpcb.ico"
+#else
+icon_cvpcb ICON "../bitmaps_xpm/icons/icon_cvpcb.ico"
+#endif
#include "wx/msw/wx.rc"
diff --git a/eeschema/eeschema.rc b/eeschema/eeschema.rc
index 04b92d0533..af1d25751f 100644
--- a/eeschema/eeschema.rc
+++ b/eeschema/eeschema.rc
@@ -1,4 +1,7 @@
-a_icon_eeschema ICON eeschema.ico
-libsch ICON libedit_icon.ico
-viewlibs ICON viewlibs_icon.ico
+#ifdef USE_PNG_BITMAPS
+icon_eeschema ICON "../bitmaps_png/icons/icon_eeschema.ico"
+#else
+icon_eeschema ICON "../bitmaps_xpm/icons/icon_eeschema.ico"
+#endif
+
#include "wx/msw/wx.rc"
diff --git a/eeschema/libedit_icon.ico b/eeschema/libedit_icon.ico
deleted file mode 100644
index 13d9821138..0000000000
Binary files a/eeschema/libedit_icon.ico and /dev/null differ
diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp
index b7cd3c6df3..d2a21559e9 100644
--- a/eeschema/libeditframe.cpp
+++ b/eeschema/libeditframe.cpp
@@ -184,7 +184,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent,
wxIcon icon;
- icon.CopyFromBitmap( KiBitmap( libedit_xpm ) );
+ icon.CopyFromBitmap( KiBitmap( libedit_icon_xpm ) );
SetIcon( icon );
diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp
index a61ef8f094..1c593f3a47 100644
--- a/eeschema/schframe.cpp
+++ b/eeschema/schframe.cpp
@@ -179,18 +179,16 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* father,
CreateScreens();
// Give an icon
-#ifdef __WINDOWS__
- SetIcon( wxICON( a_icon_eeschema ) );
-#else
- SetIcon( wxICON( icon_eeschema ) );
-#endif
+ wxIcon icon;
+ icon.CopyFromBitmap( KiBitmap( icon_eeschema_xpm ) );
+ SetIcon( icon );
m_itemToRepeat = NULL;
/* Get config */
LoadSettings();
- // Internalize grid id to a default value if not found in config or bad:
+ // Initialize grid id to a default value if not found in config or bad:
if( (m_LastGridSizeId <= 0)
|| ( m_LastGridSizeId < (ID_POPUP_GRID_USER - ID_POPUP_GRID_LEVEL_1000) ) )
m_LastGridSizeId = ID_POPUP_GRID_LEVEL_50 - ID_POPUP_GRID_LEVEL_1000;
diff --git a/eeschema/viewlibs_icon.ico b/eeschema/viewlibs_icon.ico
deleted file mode 100644
index ee2ad25ddb..0000000000
Binary files a/eeschema/viewlibs_icon.ico and /dev/null differ
diff --git a/gerbview/export_to_pcbnew.cpp b/gerbview/export_to_pcbnew.cpp
index 2496dfefd0..9f215f017f 100644
--- a/gerbview/export_to_pcbnew.cpp
+++ b/gerbview/export_to_pcbnew.cpp
@@ -8,6 +8,7 @@
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
+#include "macros.h"
#include "kicad_string.h"
#include "gestfich.h"
#include "trigo.h"
@@ -57,6 +58,7 @@ GBR_TO_PCB_EXPORTER::~GBR_TO_PCB_EXPORTER()
/* Export data in pcbnew format
+ * remember Pcbnew uses a Y reversed axis, so we must negate all Y coordinates
*/
void GERBVIEW_FRAME::ExportDataInPcbnewFormat( wxCommandEvent& event )
{
@@ -260,6 +262,10 @@ void GBR_TO_PCB_EXPORTER::export_non_copper_item( GERBER_DRAW_ITEM* aGbrItem, in
}
}
+ // Reverse Y axis:
+ NEGATE( drawitem->m_Start.y );
+ NEGATE( drawitem->m_End.y );
+
m_pcb->Add( drawitem );
}
@@ -291,6 +297,11 @@ void GBR_TO_PCB_EXPORTER::export_segline_copper_item( GERBER_DRAW_ITEM* aGbrItem
newtrack->m_Start = aGbrItem->m_Start;
newtrack->m_End = aGbrItem->m_End;
newtrack->m_Width = aGbrItem->m_Size.x;
+
+ // Reverse Y axis:
+ NEGATE( newtrack->m_Start.y );
+ NEGATE( newtrack->m_End.y );
+
m_pcb->Add( newtrack );
}
@@ -323,6 +334,9 @@ void GBR_TO_PCB_EXPORTER::export_segarc_copper_item( GERBER_DRAW_ITEM* aGbrItem,
RotatePoint( &curr_end, aGbrItem->m_ArcCentre, rot );
newtrack->m_End = curr_end;
newtrack->m_Width = aGbrItem->m_Size.x;
+ // Reverse Y axis:
+ NEGATE( newtrack->m_Start.y );
+ NEGATE( newtrack->m_End.y );
m_pcb->Add( newtrack );
curr_start = curr_end;
}
@@ -333,6 +347,9 @@ void GBR_TO_PCB_EXPORTER::export_segarc_copper_item( GERBER_DRAW_ITEM* aGbrItem,
newtrack->m_Start = curr_start;
newtrack->m_End = end;
newtrack->m_Width = aGbrItem->m_Size.x;
+ // Reverse Y axis:
+ NEGATE( newtrack->m_Start.y );
+ NEGATE( newtrack->m_End.y );
m_pcb->Add( newtrack );
}
}
@@ -352,5 +369,8 @@ void GBR_TO_PCB_EXPORTER::export_flashed_copper_item( GERBER_DRAW_ITEM* aGbrItem
newtrack->SetDrillDefault();
newtrack->m_Start = newtrack->m_End = aGbrItem->m_Start;
newtrack->m_Width = (aGbrItem->m_Size.x + aGbrItem->m_Size.y) / 2;
+ // Reverse Y axis:
+ NEGATE( newtrack->m_Start.y );
+ NEGATE( newtrack->m_End.y );
m_pcb->Add( newtrack );
}
diff --git a/gerbview/gerbview.rc b/gerbview/gerbview.rc
index fea2dabba4..9a6be7986e 100644
--- a/gerbview/gerbview.rc
+++ b/gerbview/gerbview.rc
@@ -1,2 +1,7 @@
-a_icon_gerbview ICON "gerbview.ico"
+#ifdef USE_PNG_BITMAPS
+icon_gerbview ICON "../bitmaps_png/icons/icon_gerbview.ico"
+#else
+icon_gerbview ICON "../bitmaps_xpm/icons/icon_gerbview.ico"
+#endif
+
#include "wx/msw/wx.rc"
diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp
index b9fc48de6e..b6fb086b37 100644
--- a/gerbview/gerbview_frame.cpp
+++ b/gerbview/gerbview_frame.cpp
@@ -50,11 +50,9 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( wxWindow* father,
DrawPanel->m_Block_Enable = true;
// Give an icon
-#ifdef __WINDOWS__
- SetIcon( wxICON( a_icon_gerbview ) );
-#else
- SetIcon( wxICON( icon_gerbview ) );
-#endif
+ wxIcon icon;
+ icon.CopyFromBitmap( KiBitmap( icon_gerbview_xpm ) );
+ SetIcon( icon );
SetScreen( ScreenPcb );
diff --git a/include/bitmaps.h b/include/bitmaps.h
index 7c22a950ed..01504c8acc 100644
--- a/include/bitmaps.h
+++ b/include/bitmaps.h
@@ -2,7 +2,11 @@
#ifndef BITMAPS_H_
#define BITMAPS_H_
-#include
+//FIXME: cannot include only this file in wxWidgets 2.9.3
+// test if it works under stable release
+// #include // only to define wxBitmap
+class wxBitmap; // only to define wxBitmap
+
#include "config.h"
diff --git a/kicad/commandframe.cpp b/kicad/commandframe.cpp
index 10be113537..e8dac08f1d 100644
--- a/kicad/commandframe.cpp
+++ b/kicad/commandframe.cpp
@@ -7,45 +7,47 @@
#include "kicad.h"
-#include "../bitmap2component/bitmap2component.xpm"
-#include "../pcb_calculator/bitmaps/pcb_calculator.xpm"
RIGHT_KM_FRAME::RIGHT_KM_FRAME( KICAD_MANAGER_FRAME* parent ) :
wxSashLayoutWindow( parent, wxID_ANY )
{
- #define BUTTON_HEIGHT 32
m_Parent = parent;
- m_DialogWin = NULL;
+ m_MessagesBox = NULL;
m_ButtPanel = new wxPanel( this, wxID_ANY );
- m_ButtonSeparation = 10; // control of command buttons position
- m_ButtonsListPosition.x = 10;
- m_ButtonsListPosition.y = 35 + BUTTON_HEIGHT;
- m_ButtonLastPosition = m_ButtonsListPosition;
- m_ButtonsPanelHeight = m_ButtonsListPosition.y + 10;
+ m_bitmapButtons_maxHeigth = 0;
+ m_ButtonSeparation = 10; // control of command buttons position
+ m_ButtonsListPosition.x = m_ButtonSeparation;
+ m_ButtonsListPosition.y = m_ButtonSeparation;
+ m_ButtonLastPosition = m_ButtonsListPosition;
+
+ // Add bitmap buttons to launch Kicad utilities:
CreateCommandToolbar();
- m_DialogWin = new wxTextCtrl( this, wxID_ANY, wxEmptyString,
+ m_ButtonsPanelHeight = m_ButtonsListPosition.y + m_bitmapButtons_maxHeigth + 10;
+
+ // Add the wxTextCtrl showaing all messages from Kicad:
+ m_MessagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE | wxSUNKEN_BORDER | wxTE_READONLY );
-
}
+
void RIGHT_KM_FRAME::OnSize( wxSizeEvent& event )
{
#define EXTRA_MARGE 4
- wxSize wsize = GetClientSize();
+ wxSize wsize = GetClientSize();
wsize.x -= EXTRA_MARGE;
wsize.y -= m_ButtonsPanelHeight + EXTRA_MARGE;
wxPoint wpos;
- wpos.x = EXTRA_MARGE/2;
- wpos.y = m_ButtonsPanelHeight + (EXTRA_MARGE/2);
- if( m_DialogWin )
+ wpos.x = EXTRA_MARGE / 2;
+ wpos.y = m_ButtonsPanelHeight + (EXTRA_MARGE / 2);
+ if( m_MessagesBox )
{
- m_DialogWin->SetSize( wsize );
- m_DialogWin->SetPosition(wpos );
+ m_MessagesBox->SetSize( wsize );
+ m_MessagesBox->SetPosition( wpos );
}
- wpos.y = EXTRA_MARGE/2;
- m_ButtPanel->SetPosition(wpos );
+ wpos.y = EXTRA_MARGE / 2;
+ m_ButtPanel->SetPosition( wpos );
wsize.y -= m_ButtonsPanelHeight - EXTRA_MARGE;
m_ButtPanel->SetSize( wsize );
m_ButtPanel->Refresh();
@@ -59,14 +61,11 @@ EVT_SIZE( RIGHT_KM_FRAME::OnSize )
END_EVENT_TABLE()
-/*************************************************/
-void RIGHT_KM_FRAME::CreateCommandToolbar( void )
-/*************************************************/
-
/**
* Function CreateCommandToolbar
* create the buttons to call eescheman cvpcb, pcbnew and gerbview
*/
+void RIGHT_KM_FRAME::CreateCommandToolbar( void )
{
wxBitmapButton* btn;
@@ -83,8 +82,9 @@ void RIGHT_KM_FRAME::CreateCommandToolbar( void )
btn->SetToolTip( _( "GerbView (Gerber viewer)" ) );
btn = AddBitmapButton( ID_TO_BITMAP_CONVERTER, KiBitmap( icon_bitmap2component_xpm ) );
- btn->SetToolTip( _( "Bitmap2Component (a tool to build a logo from a bitmap)\n\
-Creates a component (for Eeschema) or a footprint (for Pcbnew) that shows a B&W picture" ) );
+ btn->SetToolTip( _(
+ "Bitmap2Component (a tool to build a logo from a bitmap)\n\
+Creates a component (for Eeschema) or a footprint (for Pcbnew) that shows a B&W picture" ) );
btn = AddBitmapButton( ID_TO_PCB_CALCULATOR, KiBitmap( icon_pcbcalculator_xpm ) );
btn->SetToolTip( _( "Pcb calculator" ) );
@@ -97,15 +97,19 @@ Creates a component (for Eeschema) or a footprint (for Pcbnew) that shows a B&W
* @param aId = the button id
* @param aBitmap = the wxBitmap used to create the button
*/
-wxBitmapButton* RIGHT_KM_FRAME::AddBitmapButton( wxWindowID aId, const wxBitmap & aBitmap )
+wxBitmapButton* RIGHT_KM_FRAME::AddBitmapButton( wxWindowID aId, const wxBitmap& aBitmap )
{
wxPoint buttPos = m_ButtonLastPosition;
- wxSize buttSize;
- int btn_margin = 10;
+ wxSize buttSize;
+ int btn_margin = 0; // extra margin around the bitmap.
+
buttSize.x = aBitmap.GetWidth() + btn_margin;
buttSize.y = aBitmap.GetHeight() + btn_margin;
- buttPos.y -= buttSize.y;
- wxBitmapButton* btn = new wxBitmapButton( m_ButtPanel, aId, aBitmap, buttPos, buttSize);
+
+ if( m_bitmapButtons_maxHeigth < buttSize.y )
+ m_bitmapButtons_maxHeigth = buttSize.y;
+
+ wxBitmapButton* btn = new wxBitmapButton( m_ButtPanel, aId, aBitmap, buttPos, buttSize );
m_ButtonLastPosition.x += buttSize.x + m_ButtonSeparation;
return btn;
diff --git a/kicad/kicad.h b/kicad/kicad.h
index 1f7503226a..c53b4ac650 100644
--- a/kicad/kicad.h
+++ b/kicad/kicad.h
@@ -71,10 +71,8 @@ public:
private:
int m_LeftWin_Width;
-public:
-
- KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title,
- const wxPoint& pos, const wxSize& size );
+public: KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title,
+ const wxPoint& pos, const wxSize& size );
~KICAD_MANAGER_FRAME();
@@ -174,30 +172,32 @@ enum TreeFileType {
class RIGHT_KM_FRAME : public wxSashLayoutWindow
{
public:
- wxTextCtrl* m_DialogWin;
+ wxTextCtrl* m_MessagesBox;
private:
- KICAD_MANAGER_FRAME* m_Parent;
+ KICAD_MANAGER_FRAME* m_Parent; // a wxTextCtrl to displays messages frm Kicad
int m_ButtonsPanelHeight;
- wxPanel* m_ButtPanel;
- int m_ButtonSeparation; // button distance in pixels
- wxPoint m_ButtonsListPosition; /* position of the left bottom corner
- * of the first bitmap button
- */
- wxPoint m_ButtonLastPosition; // position of the last button in the window
+ wxPanel* m_ButtPanel;
+ int m_ButtonSeparation; // button distance in pixels
+ wxPoint m_ButtonsListPosition; /* position of the left bottom corner
+ * of the first bitmap button
+ */
+ wxPoint m_ButtonLastPosition; // position of the last button in the window
+ int m_bitmapButtons_maxHeigth; // height of bigger bitmap buttons
+ // Used to calculate the height of the panel.
-public:
- RIGHT_KM_FRAME( KICAD_MANAGER_FRAME* parent );
+public: RIGHT_KM_FRAME( KICAD_MANAGER_FRAME* parent );
~RIGHT_KM_FRAME() { };
- void OnSize( wxSizeEvent& event );
+ void OnSize( wxSizeEvent& event );
private:
+
/**
* Function CreateCommandToolbar
* creates the main tool bar buttons (fast launch buttons)
*/
- void CreateCommandToolbar( void );
+ void CreateCommandToolbar( void );
- wxBitmapButton* AddBitmapButton( wxWindowID aId, const wxBitmap & aBitmap );
+ wxBitmapButton* AddBitmapButton( wxWindowID aId, const wxBitmap& aBitmap );
DECLARE_EVENT_TABLE()
};
diff --git a/kicad/kicad.rc b/kicad/kicad.rc
index f44e8a9f25..0978d7d981 100644
--- a/kicad/kicad.rc
+++ b/kicad/kicad.rc
@@ -1,2 +1,7 @@
-a_kicad_icon ICON kicad.ico
+#ifdef USE_PNG_BITMAPS
+icon_kicad ICON "../bitmaps_png/icons/icon_kicad.ico"
+#else
+icon_kicad ICON "../bitmaps_xpm/icons/icon_kicad.ico"
+#endif
+
#include "wx/msw/wx.rc"
diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp
index 7f762fe255..2dd00b8f77 100644
--- a/kicad/mainframe.cpp
+++ b/kicad/mainframe.cpp
@@ -48,11 +48,9 @@ KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent,
SetStatusWidths( 3, dims );
// Give an icon
-#ifdef __WINDOWS__
- SetIcon( wxICON( a_kicad_icon ) );
-#else
- SetIcon( wxICON( icon_kicad ) );
-#endif
+ wxIcon icon;
+ icon.CopyFromBitmap( KiBitmap( icon_kicad_xpm ) );
+ SetIcon( icon );
clientsize = GetClientSize();
@@ -105,7 +103,7 @@ KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME()
void KICAD_MANAGER_FRAME::PrintMsg( const wxString& aText )
{
- m_RightWin->m_DialogWin->AppendText( aText );
+ m_RightWin->m_MessagesBox->AppendText( aText );
}
@@ -256,7 +254,7 @@ void KICAD_MANAGER_FRAME::OnRefresh( wxCommandEvent& event )
void KICAD_MANAGER_FRAME::ClearMsg()
{
- m_RightWin->m_DialogWin->Clear();
+ m_RightWin->m_MessagesBox->Clear();
}
diff --git a/pcb_calculator/bitmaps/sources/pcb_calculator.svg b/pcb_calculator/bitmaps/sources/pcb_calculator.svg
deleted file mode 100644
index b21a3c3a3f..0000000000
--- a/pcb_calculator/bitmaps/sources/pcb_calculator.svg
+++ /dev/null
@@ -1,688 +0,0 @@
-
-
-
-
- fabrication.svg
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- image/svg+xml
-
-
-
- Jakub Steiner
-
-
-
-
- fabrication.svg
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pcb_calculator/pcb_calculator.rc b/pcb_calculator/pcb_calculator.rc
index fcf6af9fa2..f214b0e672 100644
--- a/pcb_calculator/pcb_calculator.rc
+++ b/pcb_calculator/pcb_calculator.rc
@@ -1,2 +1,7 @@
-pcb_calculator_icon ICON pcb_calculator.ico
+#ifdef USE_PNG_BITMAPS
+icon_pcbcalculator ICON "../bitmaps_png/icons/icon_pcbcalculator.ico"
+#else
+icon_pcbcalculator ICON "../bitmaps_xpm/icons/icon_pcbcalculator.ico"
+#endif
+
#include "wx/msw/wx.rc"
diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp
index 8bfd656ed8..2e53d12235 100644
--- a/pcb_calculator/pcb_calculator_frame.cpp
+++ b/pcb_calculator/pcb_calculator_frame.cpp
@@ -27,7 +27,8 @@
#include "pcb_calculator.h"
#include "UnitSelector.h"
-#include "pcb_calculator.xpm"
+#include "bitmaps.h"
+
#define KEYWORD_FRAME_POSX wxT( "Pcb_calculator_Pos_x" )
#define KEYWORD_FRAME_POSY wxT( "Pcb_calculator_Pos_y" )
@@ -85,11 +86,10 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( wxWindow * parent ) :
ElectricalSpacingUpdateData( m_ElectricalSpacingUnitsSelector->GetUnitScale() );
- #ifdef __WINDOWS__
- SetIcon( wxICON( pcb_calculator_icon ) );
- #else
- SetIcon( wxICON( pcb_calculator ) );
- #endif
+ // Give an icon
+ wxIcon icon;
+ icon.CopyFromBitmap( KiBitmap( icon_pcbcalculator_xpm ) );
+ SetIcon( icon );
GetSizer()->SetSizeHints( this );
diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp
index 460deb4b53..7f7fb59f6c 100644
--- a/pcbnew/hotkeys.cpp
+++ b/pcbnew/hotkeys.cpp
@@ -153,45 +153,45 @@ static Ki_HotkeyInfo HkTrackDisplayMode( wxT( "Track Display Mode" ),
static Ki_HotkeyInfo HkAddModule( wxT( "Add Module" ), HK_ADD_MODULE, 'O' );
/* Record and play macros */
-static Ki_HotkeyInfo HkRecordMacros0( wxT( "Record Macros 0" ), HK_RECORD_MACROS_0, GR_KB_CTRL+'0' );
+static Ki_HotkeyInfo HkRecordMacros0( wxT( "Record Macro 0" ), HK_RECORD_MACROS_0, GR_KB_CTRL+'0' );
-static Ki_HotkeyInfo HkCallMacros0( wxT( "Call Macross 0" ), HK_CALL_MACROS_0, '0' );
+static Ki_HotkeyInfo HkCallMacros0( wxT( "Call Macro 0" ), HK_CALL_MACROS_0, '0' );
-static Ki_HotkeyInfo HkRecordMacros1( wxT( "Record Macros 1" ), HK_RECORD_MACROS_1, GR_KB_CTRL+'1' );
+static Ki_HotkeyInfo HkRecordMacros1( wxT( "Record Macro 1" ), HK_RECORD_MACROS_1, GR_KB_CTRL+'1' );
-static Ki_HotkeyInfo HkCallMacros1( wxT( "Call Macross 1" ), HK_CALL_MACROS_1, '1' );
+static Ki_HotkeyInfo HkCallMacros1( wxT( "Call Macro 1" ), HK_CALL_MACROS_1, '1' );
-static Ki_HotkeyInfo HkRecordMacros2( wxT( "Record Macros 2" ), HK_RECORD_MACROS_2, GR_KB_CTRL+'2' );
+static Ki_HotkeyInfo HkRecordMacros2( wxT( "Record Macro 2" ), HK_RECORD_MACROS_2, GR_KB_CTRL+'2' );
-static Ki_HotkeyInfo HkCallMacros2( wxT( "Call Macross 2" ), HK_CALL_MACROS_2, '2' );
+static Ki_HotkeyInfo HkCallMacros2( wxT( "Call Macro 2" ), HK_CALL_MACROS_2, '2' );
-static Ki_HotkeyInfo HkRecordMacros3( wxT( "Record Macros 3" ), HK_RECORD_MACROS_3, GR_KB_CTRL+'3' );
+static Ki_HotkeyInfo HkRecordMacros3( wxT( "Record Macro 3" ), HK_RECORD_MACROS_3, GR_KB_CTRL+'3' );
-static Ki_HotkeyInfo HkCallMacros3( wxT( "Call Macross 3" ), HK_CALL_MACROS_3, '3' );
+static Ki_HotkeyInfo HkCallMacros3( wxT( "Call Macro 3" ), HK_CALL_MACROS_3, '3' );
-static Ki_HotkeyInfo HkRecordMacros4( wxT( "Record Macros 4" ), HK_RECORD_MACROS_4, GR_KB_CTRL+'4' );
+static Ki_HotkeyInfo HkRecordMacros4( wxT( "Record Macro 4" ), HK_RECORD_MACROS_4, GR_KB_CTRL+'4' );
-static Ki_HotkeyInfo HkCallMacros4( wxT( "Call Macross 4" ), HK_CALL_MACROS_4, '4' );
+static Ki_HotkeyInfo HkCallMacros4( wxT( "Call Macro 4" ), HK_CALL_MACROS_4, '4' );
-static Ki_HotkeyInfo HkRecordMacros5( wxT( "Record Macros 5" ), HK_RECORD_MACROS_5, GR_KB_CTRL+'5' );
+static Ki_HotkeyInfo HkRecordMacros5( wxT( "Record Macro 5" ), HK_RECORD_MACROS_5, GR_KB_CTRL+'5' );
-static Ki_HotkeyInfo HkCallMacros5( wxT( "Call Macross 5" ), HK_CALL_MACROS_5, '5' );
+static Ki_HotkeyInfo HkCallMacros5( wxT( "Call Macro 5" ), HK_CALL_MACROS_5, '5' );
-static Ki_HotkeyInfo HkRecordMacros6( wxT( "Record Macros 6" ), HK_RECORD_MACROS_6, GR_KB_CTRL+'6' );
+static Ki_HotkeyInfo HkRecordMacros6( wxT( "Record Macro 6" ), HK_RECORD_MACROS_6, GR_KB_CTRL+'6' );
-static Ki_HotkeyInfo HkCallMacros6( wxT( "Call Macross 6" ), HK_CALL_MACROS_6, '6' );
+static Ki_HotkeyInfo HkCallMacros6( wxT( "Call Macro 6" ), HK_CALL_MACROS_6, '6' );
-static Ki_HotkeyInfo HkRecordMacros7( wxT( "Record Macros 7" ), HK_RECORD_MACROS_7, GR_KB_CTRL+'7' );
+static Ki_HotkeyInfo HkRecordMacros7( wxT( "Record Macro 7" ), HK_RECORD_MACROS_7, GR_KB_CTRL+'7' );
-static Ki_HotkeyInfo HkCallMacros7( wxT( "Call Macross 7" ), HK_CALL_MACROS_7, '7' );
+static Ki_HotkeyInfo HkCallMacros7( wxT( "Call Macro 7" ), HK_CALL_MACROS_7, '7' );
-static Ki_HotkeyInfo HkRecordMacros8( wxT( "Record Macros 8" ), HK_RECORD_MACROS_8, GR_KB_CTRL+'8' );
+static Ki_HotkeyInfo HkRecordMacros8( wxT( "Record Macro 8" ), HK_RECORD_MACROS_8, GR_KB_CTRL+'8' );
-static Ki_HotkeyInfo HkCallMacros8( wxT( "Call Macross 8" ), HK_CALL_MACROS_8, '8' );
+static Ki_HotkeyInfo HkCallMacros8( wxT( "Call Macro 8" ), HK_CALL_MACROS_8, '8' );
-static Ki_HotkeyInfo HkRecordMacros9( wxT( "Record Macros 9" ), HK_RECORD_MACROS_9, GR_KB_CTRL+'9' );
+static Ki_HotkeyInfo HkRecordMacros9( wxT( "Record Macro 9" ), HK_RECORD_MACROS_9, GR_KB_CTRL+'9' );
-static Ki_HotkeyInfo HkCallMacros9( wxT( "Call Macross 9" ), HK_CALL_MACROS_9, '9' );
+static Ki_HotkeyInfo HkCallMacros9( wxT( "Call Macro 9" ), HK_CALL_MACROS_9, '9' );
// List of common hotkey descriptors
Ki_HotkeyInfo* common_Hotkey_List[] =
diff --git a/pcbnew/icon_modedit.ico b/pcbnew/icon_modedit.ico
deleted file mode 100644
index 84852bf1bc..0000000000
Binary files a/pcbnew/icon_modedit.ico and /dev/null differ
diff --git a/pcbnew/icon_w3d.ico b/pcbnew/icon_w3d.ico
deleted file mode 100644
index a446a14d48..0000000000
Binary files a/pcbnew/icon_w3d.ico and /dev/null differ
diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp
index f61582a2f1..511e2023b9 100644
--- a/pcbnew/moduleframe.cpp
+++ b/pcbnew/moduleframe.cpp
@@ -120,7 +120,9 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( wxWindow* father,
m_HotkeysZoomAndGridList = g_Module_Editor_Hokeys_Descr;
// Give an icon
- SetIcon( wxICON( icon_modedit ) );
+ wxIcon icon;
+ icon.CopyFromBitmap( KiBitmap( icon_modedit_xpm ) );
+ SetIcon( icon );
UpdateTitle();
diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp
index 26929c14b9..f407f820b6 100644
--- a/pcbnew/pcbframe.cpp
+++ b/pcbnew/pcbframe.cpp
@@ -307,7 +307,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title,
wxIcon icon;
icon.CopyFromBitmap( KiBitmap( icon_pcbnew_xpm ) );
-
SetIcon( icon );
m_InternalUnits = PCB_INTERNAL_UNIT; // Unites internes = 1/10000 inch
diff --git a/pcbnew/pcbnew.rc b/pcbnew/pcbnew.rc
index 582a2f04bc..d993dfb98c 100644
--- a/pcbnew/pcbnew.rc
+++ b/pcbnew/pcbnew.rc
@@ -1,4 +1,7 @@
-a_icon_pcbnew ICON "icon_pcbnew.ico"
-icon_w3d ICON "icon_w3d.ico"
-icon_modedit ICON "icon_modedit.ico"
+#ifdef USE_PNG_BITMAPS
+icon_pcbnew ICON "../bitmaps_png/icons/icon_pcbnew.ico"
+#else
+icon_pcbnew ICON "../bitmaps_xpm/icons/icon_pcbnew.ico"
+#endif
+
#include "wx/msw/wx.rc"
diff --git a/pcbnew/surbrill.cpp b/pcbnew/surbrill.cpp
index 38d4a4e04b..aa23d6942b 100644
--- a/pcbnew/surbrill.cpp
+++ b/pcbnew/surbrill.cpp
@@ -39,15 +39,15 @@ void PCB_EDIT_FRAME::ListNetsAndSelect( wxCommandEvent& event )
if( netFilter.IsEmpty() )
return;
+ wxString Line;
for( unsigned ii = 0; ii < GetBoard()->m_NetInfo->GetCount(); ii++ )
{
net = GetBoard()->m_NetInfo->GetNetItem( ii );
- wxString Line;
if( !WildCompareString( netFilter, net->GetNetname(), false ) )
continue;
- Line.Printf( wxT( "net_code = %3.3d [%.16s] " ), net->GetNet(),
+ Line.Printf( wxT( "net %3.3d: %s" ), net->GetNet(),
GetChars( net->GetNetname() ) );
list.Add( Line );
}