Commit 50dbd5b7 authored by Dick Hollenbeck's avatar Dick Hollenbeck

merge from testing

parents 07ab5534 0c443357
...@@ -175,7 +175,7 @@ Info_3D_Visu::~Info_3D_Visu() ...@@ -175,7 +175,7 @@ Info_3D_Visu::~Info_3D_Visu()
* units */ * units */
WinEDA_VertexCtrl::WinEDA_VertexCtrl( wxWindow* parent, const wxString& title, WinEDA_VertexCtrl::WinEDA_VertexCtrl( wxWindow* parent, const wxString& title,
wxBoxSizer* BoxSizer, wxBoxSizer* BoxSizer,
UserUnitType units, int internal_unit ) EDA_UNITS_T units, int internal_unit )
{ {
wxString text; wxString text;
wxStaticText* msgtitle; wxStaticText* msgtitle;
......
This diff is collapsed.
...@@ -123,7 +123,7 @@ private: ...@@ -123,7 +123,7 @@ private:
public: public:
WinEDA_VertexCtrl( wxWindow* parent, const wxString& title, WinEDA_VertexCtrl( wxWindow* parent, const wxString& title,
wxBoxSizer* BoxSizer, UserUnitType units, int internal_unit ); wxBoxSizer* BoxSizer, EDA_UNITS_T units, int internal_unit );
~WinEDA_VertexCtrl(); ~WinEDA_VertexCtrl();
......
...@@ -3,6 +3,22 @@ KiCad ChangeLog 2010 ...@@ -3,6 +3,22 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2011-Sept-07, UPDATE Andrey Fedorushkov <andrf@mail.ru>
================================================================================
Pcbnew:
Add hotkey "P" - place item
Add Roman Bashkov patch for record/play sequence hotkey macros
Add record and play macros for sequence hotkey.
Macros set to numeric key 0..9:
<Ctrl>+<numkey> - start record macros
<hotkey> <mouse move> ... <hotkey>|<mouse place>
<Ctrl>+<numkey> - end record macros
<numkey> - play macros
Add menu save/read macros to/from xml-file
Add configure rotate angle for rotate module: 45 or 90 deg.
Fix segfault when move/drag segment if disconnected to pad
2011-Sept-01, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr> 2011-Sept-01, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================ ================================================================================
Add Fabrizio Tappero <fabrizio-dot-tappero[at]gmail-dot-com> in contribuotors list. Add Fabrizio Tappero <fabrizio-dot-tappero[at]gmail-dot-com> in contribuotors list.
......
...@@ -12,15 +12,6 @@ endif(WIN32) ...@@ -12,15 +12,6 @@ endif(WIN32)
# Path to local CMake modules. # Path to local CMake modules.
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
# Command line option to enable or disable building minizip. Minizip
# building is enabled by default. Use -DKICAD_MINIZIP=OFF to disable
# building minizip.
option(KICAD_MINIZIP "enable/disable building minizip (default ON)" ON)
option(USE_PNG_BITMAPS "use PNG bitmaps instead of XPM (default OFF)" OFF)
# Russian GOST patch # Russian GOST patch
option(wxUSE_UNICODE "enable/disable building unicode (default OFF)") option(wxUSE_UNICODE "enable/disable building unicode (default OFF)")
option(KICAD_GOST "enable/disable building using GOST notation for multiple gates per package (default OFF)") option(KICAD_GOST "enable/disable building using GOST notation for multiple gates per package (default OFF)")
......
Contribute to KiCad (under Linux)
--------------------
1) make sure you have all the dependencies of KiCad:
sudo apt-get install debhelper dpatch libx11-dev
sudo apt-get install libglu1-mesa-dev libgl1-mesa-dev mesa-common-dev
sudo apt-get install libwxbase2.8-dev libwxgtk2.8-dev libboost-dev fakeroot
sudo apt-get install cmake bzr
2) initialize Bazaar:
bzr whoami "John Doe <john.doe@gmail.com>"
3) get LATEST KiCad source tree and name it, for instance, "kicad_john":
cd ~/
bzr branch lp:kicad kicad_john
4) create a copy of this folder and zip it away (just in case).
5) Modify/add source code.
cd kicad_john
gedit .......
6) Compile:
cd kicad_john
mkdir build; cd build
cmake ../ -DKICAD_TESTING_VERSION=ON -DCMAKE_BUILD_TYPE=Debug
make -j 4 # this is for a 4 core machine
7) Repeat step 5 and 6 until satisfied.
8) Delete the "build" folder and create a patch:
cd kicad_john
rm -R ./build
bzr add .
bzr status
bzr diff > gui_better_zoom.patch
9) Send the patch file "gui_better_zoom.patch" to the KiCad developers mailing list.
in the subject of the e-mail include the keyword "[PATCH]".
in the body of the e-mail clearly explain what you have done.
for more info see INSTALL.txt.
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
...@@ -39,7 +38,6 @@ ...@@ -39,7 +38,6 @@
#include "bitmap2component.xpm" #include "bitmap2component.xpm"
#include "bitmaps.h"
#include "colors_selection.h" #include "colors_selection.h"
#include "build_version.h" #include "build_version.h"
...@@ -89,6 +87,7 @@ private: ...@@ -89,6 +87,7 @@ private:
void ExportFile( FILE* aOutfile, int aFormat ); void ExportFile( FILE* aOutfile, int aFormat );
}; };
BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
{ {
m_Config = new wxConfig(); m_Config = new wxConfig();
...@@ -116,6 +115,7 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) ...@@ -116,6 +115,7 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
Centre(); Centre();
} }
BM2CMP_FRAME::~BM2CMP_FRAME() BM2CMP_FRAME::~BM2CMP_FRAME()
{ {
if( ( m_Config == NULL ) || IsIconized() ) if( ( m_Config == NULL ) || IsIconized() )
...@@ -133,7 +133,7 @@ BM2CMP_FRAME::~BM2CMP_FRAME() ...@@ -133,7 +133,7 @@ BM2CMP_FRAME::~BM2CMP_FRAME()
delete m_Config; delete m_Config;
/* This needed for OSX: avoids furter OnDraw processing after this /* This needed for OSX: avoids further OnDraw processing after this
* destructor and before the native window is destroyed * destructor and before the native window is destroyed
*/ */
this->Freeze( ); this->Freeze( );
...@@ -166,12 +166,14 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event ) ...@@ -166,12 +166,14 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event )
} }
} }
/* Called to load a bitmap file /* Called to load a bitmap file
*/ */
void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
{ {
wxFileName fn(m_BitmapFileName); wxFileName fn(m_BitmapFileName);
wxString path = fn.GetPath(); wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) ) if( path.IsEmpty() || !wxDirExists(path) )
path = wxGetCwd(); path = wxGetCwd();
...@@ -182,7 +184,9 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) ...@@ -182,7 +184,9 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
if( diag != wxID_OK ) if( diag != wxID_OK )
return; return;
wxString fullFilename = FileDlg.GetPath(); wxString fullFilename = FileDlg.GetPath();
if( ! LoadFile( fullFilename ) ) if( ! LoadFile( fullFilename ) )
return; return;
...@@ -192,6 +196,7 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) ...@@ -192,6 +196,7 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
Refresh(); Refresh();
} }
bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName ) bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName )
{ {
m_BitmapFileName = aFullFileName; m_BitmapFileName = aFullFileName;
...@@ -232,6 +237,7 @@ bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName ) ...@@ -232,6 +237,7 @@ bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName )
return true; return true;
} }
void BM2CMP_FRAME::Binarize( double aThreshold ) void BM2CMP_FRAME::Binarize( double aThreshold )
{ {
unsigned int pixin; unsigned int pixin;
...@@ -244,10 +250,12 @@ void BM2CMP_FRAME::Binarize( double aThreshold ) ...@@ -244,10 +250,12 @@ void BM2CMP_FRAME::Binarize( double aThreshold )
for( int x = 1; x < w; x++ ) for( int x = 1; x < w; x++ )
{ {
pixin = m_Greyscale_Image.GetGreen( x, y ); pixin = m_Greyscale_Image.GetGreen( x, y );
if( pixin < threshold ) if( pixin < threshold )
pixout = 0; pixout = 0;
else else
pixout = 255; pixout = 255;
m_NB_Image.SetRGB( x, y, pixout, pixout, pixout ); m_NB_Image.SetRGB( x, y, pixout, pixout, pixout );
} }
...@@ -289,8 +297,10 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event ) ...@@ -289,8 +297,10 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event )
{ {
wxFileName fn(m_ConvertedFileName); wxFileName fn(m_ConvertedFileName);
wxString path = fn.GetPath(); wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) ) if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd(); path = ::wxGetCwd();
wxString msg = _( "Schematic lib file (*.lib)|*.lib" ); wxString msg = _( "Schematic lib file (*.lib)|*.lib" );
wxFileDialog FileDlg( this, _( "Create a lib file for Eeschema" ), path, wxEmptyString, wxFileDialog FileDlg( this, _( "Create a lib file for Eeschema" ), path, wxEmptyString,
msg, msg,
...@@ -299,10 +309,12 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event ) ...@@ -299,10 +309,12 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event )
if( diag != wxID_OK ) if( diag != wxID_OK )
return; return;
m_ConvertedFileName = FileDlg.GetPath(); m_ConvertedFileName = FileDlg.GetPath();
FILE* outfile; FILE* outfile;
outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) ); outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
if( outfile == NULL ) if( outfile == NULL )
{ {
wxString msg; wxString msg;
...@@ -320,8 +332,10 @@ void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event ) ...@@ -320,8 +332,10 @@ void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event )
{ {
wxFileName fn(m_ConvertedFileName); wxFileName fn(m_ConvertedFileName);
wxString path = fn.GetPath(); wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) ) if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd(); path = ::wxGetCwd();
wxString msg = _( "Footprint file (*.mod)|*.mod" ); wxString msg = _( "Footprint file (*.mod)|*.mod" );
wxFileDialog FileDlg( this, _( "Create a footprint file for PcbNew" ), wxFileDialog FileDlg( this, _( "Create a footprint file for PcbNew" ),
path, wxEmptyString, path, wxEmptyString,
...@@ -331,10 +345,13 @@ void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event ) ...@@ -331,10 +345,13 @@ void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event )
if( diag != wxID_OK ) if( diag != wxID_OK )
return; return;
m_ConvertedFileName = FileDlg.GetPath(); m_ConvertedFileName = FileDlg.GetPath();
FILE* outfile; FILE* outfile;
outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) ); outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
if( outfile == NULL ) if( outfile == NULL )
{ {
wxString msg; wxString msg;
...@@ -353,6 +370,7 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat ) ...@@ -353,6 +370,7 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat )
int h = m_NB_Image.GetHeight(); int h = m_NB_Image.GetHeight();
int w = m_NB_Image.GetWidth(); int w = m_NB_Image.GetWidth();
potrace_bitmap_t* potrace_bitmap = bm_new( w, h ); potrace_bitmap_t* potrace_bitmap = bm_new( w, h );
if( !potrace_bitmap ) if( !potrace_bitmap )
{ {
wxString msg; wxString msg;
...@@ -377,18 +395,18 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat ) ...@@ -377,18 +395,18 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat )
// BM_TO_CMP_APP // BM_TO_CMP_APP
void WinEDA_App::MacOpenFile(const wxString &fileName) void EDA_APP::MacOpenFile(const wxString &fileName)
{ {
} }
IMPLEMENT_APP( WinEDA_App ) IMPLEMENT_APP( EDA_APP )
///----------------------------------------------------------------------------- ///-----------------------------------------------------------------------------
// BM_TO_CMP_APP // BM_TO_CMP_APP
// main program // main program
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool WinEDA_App::OnInit() bool EDA_APP::OnInit()
{ {
wxInitAllImageHandlers(); wxInitAllImageHandlers();
......
...@@ -17,7 +17,6 @@ set( COMMON_ABOUT_DLG_SRCS ...@@ -17,7 +17,6 @@ set( COMMON_ABOUT_DLG_SRCS
dialogs/dialog_get_component_base.cpp dialogs/dialog_get_component_base.cpp
dialogs/dialog_hotkeys_editor.cpp dialogs/dialog_hotkeys_editor.cpp
dialogs/dialog_hotkeys_editor_base.cpp dialogs/dialog_hotkeys_editor_base.cpp
dialogs/dialog_load_error.cpp
dialogs/dialog_page_settings_base.cpp dialogs/dialog_page_settings_base.cpp
) )
...@@ -58,6 +57,7 @@ set(COMMON_SRCS ...@@ -58,6 +57,7 @@ set(COMMON_SRCS
gr_basic.cpp gr_basic.cpp
hotkeys_basic.cpp hotkeys_basic.cpp
hotkey_grid_table.cpp hotkey_grid_table.cpp
html_messagebox.cpp
msgpanel.cpp msgpanel.cpp
netlist_keywords.cpp netlist_keywords.cpp
newstroke_font.cpp newstroke_font.cpp
......
...@@ -334,7 +334,7 @@ void BASE_SCREEN::AddGrid( const wxRealPoint& size, int id ) ...@@ -334,7 +334,7 @@ void BASE_SCREEN::AddGrid( const wxRealPoint& size, int id )
} }
void BASE_SCREEN::AddGrid( const wxRealPoint& size, UserUnitType aUnit, int id ) void BASE_SCREEN::AddGrid( const wxRealPoint& size, EDA_UNITS_T aUnit, int id )
{ {
double x, y; double x, y;
wxRealPoint new_size; wxRealPoint new_size;
......
...@@ -6,7 +6,11 @@ ...@@ -6,7 +6,11 @@
#endif #endif
#ifndef KICAD_BUILD_VERSION #ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2011-aug-04)" #if defined KICAD_GOST
# define KICAD_BUILD_VERSION "(2011-aug-04 GOST)"
#else
# define KICAD_BUILD_VERSION "(2011-aug-04)"
#endif
#endif #endif
......
...@@ -236,7 +236,7 @@ void BITMAP_BASE::Mirror( bool aVertically ) ...@@ -236,7 +236,7 @@ void BITMAP_BASE::Mirror( bool aVertically )
if( m_image ) if( m_image )
{ {
*m_image = m_image->Mirror( not aVertically ); *m_image = m_image->Mirror( not aVertically );
*m_bitmap = wxBitmap( *m_image ); RebuildBitmap();
} }
} }
...@@ -246,7 +246,7 @@ void BITMAP_BASE::Rotate( bool aRotateCCW ) ...@@ -246,7 +246,7 @@ void BITMAP_BASE::Rotate( bool aRotateCCW )
if( m_image ) if( m_image )
{ {
*m_image = m_image->Rotate90( aRotateCCW ); *m_image = m_image->Rotate90( aRotateCCW );
*m_bitmap = wxBitmap( *m_image ); RebuildBitmap();
} }
} }
......
...@@ -59,6 +59,7 @@ const wxString NetlistFileExtension( wxT( "net" ) ); ...@@ -59,6 +59,7 @@ const wxString NetlistFileExtension( wxT( "net" ) );
const wxString GerberFileExtension( wxT( "pho" ) ); const wxString GerberFileExtension( wxT( "pho" ) );
const wxString PcbFileExtension( wxT( "brd" ) ); const wxString PcbFileExtension( wxT( "brd" ) );
const wxString PdfFileExtension( wxT( "pdf" ) ); const wxString PdfFileExtension( wxT( "pdf" ) );
const wxString MacrosFileExtension( wxT( "mcr" ) );
/* Proper wxFileDialog wild card definitions. */ /* Proper wxFileDialog wild card definitions. */
const wxString ProjectFileWildcard( _( "Kicad project files (*.pro)|*.pro" ) ); const wxString ProjectFileWildcard( _( "Kicad project files (*.pro)|*.pro" ) );
...@@ -67,6 +68,7 @@ const wxString NetlistFileWildcard( _( "Kicad netlist files (*.net)|*.net" ) ); ...@@ -67,6 +68,7 @@ const wxString NetlistFileWildcard( _( "Kicad netlist files (*.net)|*.net" ) );
const wxString GerberFileWildcard( _( "Gerber files (*.pho)|*.pho" ) ); const wxString GerberFileWildcard( _( "Gerber files (*.pho)|*.pho" ) );
const wxString PcbFileWildcard( _( "Kicad printed circuit board files (*.brd)|*.brd" ) ); const wxString PcbFileWildcard( _( "Kicad printed circuit board files (*.brd)|*.brd" ) );
const wxString PdfFileWildcard( _( "Portable document format files (*.pdf)|*.pdf" ) ); const wxString PdfFileWildcard( _( "Portable document format files (*.pdf)|*.pdf" ) );
const wxString MacrosFileWildcard( _( "Kicad recorded macros (*.mcr)|*.mcr" ) );
const wxString AllFilesWildcard( _( "All files (*)|*" ) ); const wxString AllFilesWildcard( _( "All files (*)|*" ) );
...@@ -78,7 +80,7 @@ wxString g_Prj_Default_Config_FullFilename; ...@@ -78,7 +80,7 @@ wxString g_Prj_Default_Config_FullFilename;
wxString g_Prj_Config_LocalFilename; wxString g_Prj_Config_LocalFilename;
/* Current user unit of measure */ /* Current user unit of measure */
UserUnitType g_UserUnit; EDA_UNITS_T g_UserUnit;
/* Draw color for moving objects: */ /* Draw color for moving objects: */
int g_GhostColor; int g_GhostColor;
...@@ -221,7 +223,7 @@ Ki_PageDescr::Ki_PageDescr( const wxSize& size, ...@@ -221,7 +223,7 @@ Ki_PageDescr::Ki_PageDescr( const wxSize& size,
} }
wxString ReturnUnitSymbol( UserUnitType aUnit, const wxString& formatString ) wxString ReturnUnitSymbol( EDA_UNITS_T aUnit, const wxString& formatString )
{ {
wxString tmp; wxString tmp;
wxString label; wxString label;
...@@ -249,7 +251,7 @@ wxString ReturnUnitSymbol( UserUnitType aUnit, const wxString& formatString ) ...@@ -249,7 +251,7 @@ wxString ReturnUnitSymbol( UserUnitType aUnit, const wxString& formatString )
} }
wxString GetUnitsLabel( UserUnitType aUnit ) wxString GetUnitsLabel( EDA_UNITS_T aUnit )
{ {
wxString label; wxString label;
...@@ -272,7 +274,7 @@ wxString GetUnitsLabel( UserUnitType aUnit ) ...@@ -272,7 +274,7 @@ wxString GetUnitsLabel( UserUnitType aUnit )
} }
wxString GetAbbreviatedUnitsLabel( UserUnitType aUnit ) wxString GetAbbreviatedUnitsLabel( EDA_UNITS_T aUnit )
{ {
wxString label; wxString label;
...@@ -298,7 +300,7 @@ wxString GetAbbreviatedUnitsLabel( UserUnitType aUnit ) ...@@ -298,7 +300,7 @@ wxString GetAbbreviatedUnitsLabel( UserUnitType aUnit )
* Add string " (mm):" or " ("):" to the static text Stext. * Add string " (mm):" or " ("):" to the static text Stext.
* Used in dialog boxes for entering values depending on selected units * Used in dialog boxes for entering values depending on selected units
*/ */
void AddUnitSymbol( wxStaticText& Stext, UserUnitType aUnit ) void AddUnitSymbol( wxStaticText& Stext, EDA_UNITS_T aUnit )
{ {
wxString msg = Stext.GetLabel(); wxString msg = Stext.GetLabel();
...@@ -346,7 +348,7 @@ int ReturnValueFromTextCtrl( const wxTextCtrl& TextCtr, int Internal_Unit ) ...@@ -346,7 +348,7 @@ int ReturnValueFromTextCtrl( const wxTextCtrl& TextCtr, int Internal_Unit )
* @return a wxString what contains value and optionally the symbol unit * @return a wxString what contains value and optionally the symbol unit
* (like 2.000 mm) * (like 2.000 mm)
*/ */
wxString ReturnStringFromValue( UserUnitType aUnit, int aValue, int aInternal_Unit, wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, int aInternal_Unit,
bool aAdd_unit_symbol ) bool aAdd_unit_symbol )
{ {
wxString StringValue; wxString StringValue;
...@@ -384,7 +386,7 @@ wxString ReturnStringFromValue( UserUnitType aUnit, int aValue, int aInternal_Un ...@@ -384,7 +386,7 @@ wxString ReturnStringFromValue( UserUnitType aUnit, int aValue, int aInternal_Un
* Value = text * Value = text
* Internal_Unit = units per inch for computed value * Internal_Unit = units per inch for computed value
*/ */
int ReturnValueFromString( UserUnitType aUnit, const wxString& TextValue, int ReturnValueFromString( EDA_UNITS_T aUnit, const wxString& TextValue,
int Internal_Unit ) int Internal_Unit )
{ {
int Value; int Value;
...@@ -479,7 +481,7 @@ wxArrayString* wxStringSplit( wxString txt, wxChar splitter ) ...@@ -479,7 +481,7 @@ wxArrayString* wxStringSplit( wxString txt, wxChar splitter )
* @param val : double : the given value * @param val : double : the given value
* @param internal_unit_value = internal units per inch * @param internal_unit_value = internal units per inch
*/ */
double To_User_Unit( UserUnitType aUnit, double val, int internal_unit_value ) double To_User_Unit( EDA_UNITS_T aUnit, double val, int internal_unit_value )
{ {
switch( aUnit ) switch( aUnit )
{ {
...@@ -498,7 +500,7 @@ double To_User_Unit( UserUnitType aUnit, double val, int internal_unit_value ) ...@@ -498,7 +500,7 @@ double To_User_Unit( UserUnitType aUnit, double val, int internal_unit_value )
/* /*
* Return in internal units the value "val" given in inch or mm * Return in internal units the value "val" given in inch or mm
*/ */
int From_User_Unit( UserUnitType aUnit, double val, int internal_unit_value ) int From_User_Unit( EDA_UNITS_T aUnit, double val, int internal_unit_value )
{ {
double value; double value;
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "wx/wx.h"
#include "wx/html/htmlwin.h"
#include "html_messagebox.h"
/* Display an error or warning message. /* Display an error or warning message.
* TODO: * TODO:
...@@ -45,6 +47,18 @@ void DisplayInfoMessage( wxWindow* parent, const wxString& text, ...@@ -45,6 +47,18 @@ void DisplayInfoMessage( wxWindow* parent, const wxString& text,
} }
/* Display a simple message window in html format.
*/
void DisplayHtmlInfoMessage( wxWindow* parent, const wxString& title,
const wxString& text, const wxSize& size )
{
HTML_MESSAGE_BOX *dlg = new HTML_MESSAGE_BOX(parent,title, wxDefaultPosition, size );
dlg->AddHTML_Text( text );
dlg->ShowModal();
dlg->Destroy();
}
bool IsOK( wxWindow* parent, const wxString& text ) bool IsOK( wxWindow* parent, const wxString& text )
{ {
int ii; int ii;
......
...@@ -40,6 +40,8 @@ DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem ...@@ -40,6 +40,8 @@ DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem
: DIALOG_IMAGE_EDITOR_BASE( aParent ) : DIALOG_IMAGE_EDITOR_BASE( aParent )
{ {
m_workingImage = new BITMAP_BASE( * aItem ); m_workingImage = new BITMAP_BASE( * aItem );
m_lastImage = NULL;
m_buttonUndoLast->Enable( false );
wxString msg; wxString msg;
msg.Printf( wxT("%f"), m_workingImage->m_Scale ); msg.Printf( wxT("%f"), m_workingImage->m_Scale );
m_textCtrlScale->SetValue( msg );; m_textCtrlScale->SetValue( msg );;
...@@ -53,28 +55,106 @@ DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem ...@@ -53,28 +55,106 @@ DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem
SetFocus(); SetFocus();
} }
void DIALOG_IMAGE_EDITOR::OnMirrorX_click( wxCommandEvent& event ) void DIALOG_IMAGE_EDITOR::OnUndoLastChange( wxCommandEvent& event )
{ {
BITMAP_BASE * tmp = m_workingImage;
m_workingImage = m_lastImage;
delete tmp;
m_buttonUndoLast->Enable( false );
m_lastImage = NULL;
m_panelDraw->Refresh();
}
void DIALOG_IMAGE_EDITOR::OnMirrorX_click( wxCommandEvent& event )
{
delete m_lastImage;
m_lastImage = new BITMAP_BASE( * m_workingImage );
m_buttonUndoLast->Enable( true );
m_buttonUndoLast->Enable( true );
m_workingImage->Mirror( true ); m_workingImage->Mirror( true );
m_panelDraw->Refresh(); m_panelDraw->Refresh();
} }
void DIALOG_IMAGE_EDITOR::OnMirrorY_click( wxCommandEvent& event ) void DIALOG_IMAGE_EDITOR::OnMirrorY_click( wxCommandEvent& event )
{ {
delete m_lastImage;
m_lastImage = new BITMAP_BASE( * m_workingImage );
m_buttonUndoLast->Enable( true );
m_workingImage->Mirror( false ); m_workingImage->Mirror( false );
m_panelDraw->Refresh(); m_panelDraw->Refresh();
} }
void DIALOG_IMAGE_EDITOR::OnRotateClick( wxCommandEvent& event ) void DIALOG_IMAGE_EDITOR::OnRotateClick( wxCommandEvent& event )
{ {
delete m_lastImage;
m_lastImage = new BITMAP_BASE( * m_workingImage );
m_buttonUndoLast->Enable( true );
m_workingImage->Rotate( false ); m_workingImage->Rotate( false );
m_panelDraw->Refresh(); m_panelDraw->Refresh();
} }
void DIALOG_IMAGE_EDITOR::OnGreyScaleConvert( wxCommandEvent& event )
{
delete m_lastImage;
m_lastImage = new BITMAP_BASE( * m_workingImage );
m_buttonUndoLast->Enable( true );
wxImage& image = *m_workingImage->GetImageData();
image = image.ConvertToGreyscale();
m_workingImage->RebuildBitmap();
m_panelDraw->Refresh();
}
void DIALOG_IMAGE_EDITOR::OnHalfSize( wxCommandEvent& event )
{
delete m_lastImage;
m_lastImage = new BITMAP_BASE( * m_workingImage );
m_buttonUndoLast->Enable( true );
wxSize psize = m_workingImage->GetSizePixels();
wxImage& image = *m_workingImage->GetImageData();
image = image.Scale(psize.x/2, psize.y/2, wxIMAGE_QUALITY_HIGH);
m_workingImage->RebuildBitmap();
m_panelDraw->Refresh();
}
/* Test params values correctness
* Currently scale value must give an actual image
* > MIN_SIZE pixels and < MAX_SIZE pixels
*/
bool DIALOG_IMAGE_EDITOR::CheckValues()
{
#define MIN_SIZE 16
#define MAX_SIZE 6000
double tmp;
wxString msg = m_textCtrlScale->GetValue();
// Test number correctness
if( ! msg.ToDouble( &tmp ) )
{
wxMessageBox( _("Incorrect scale number" ) );
return false;
}
// Test value correctness
wxSize psize = m_workingImage->GetSizePixels();
if ( (psize.x * tmp) < MIN_SIZE || (psize.y * tmp) < MIN_SIZE )
{
wxMessageBox( _("Scale is too small for this image" ) );
return false;
}
if ( (psize.x * tmp) > MAX_SIZE || (psize.y * tmp) > MAX_SIZE )
{
wxMessageBox( _("Scale is too large for this image" ) );
return false;
}
return true;
}
void DIALOG_IMAGE_EDITOR::OnOK_Button( wxCommandEvent& aEvent ) void DIALOG_IMAGE_EDITOR::OnOK_Button( wxCommandEvent& aEvent )
{ {
if( CheckValues() )
EndModal( wxID_OK ); EndModal( wxID_OK );
return;
} }
void DIALOG_IMAGE_EDITOR::OnCancel_Button( wxCommandEvent& aEvent ) void DIALOG_IMAGE_EDITOR::OnCancel_Button( wxCommandEvent& aEvent )
...@@ -97,7 +177,6 @@ void DIALOG_IMAGE_EDITOR::TransfertToImage(BITMAP_BASE* aItem ) ...@@ -97,7 +177,6 @@ void DIALOG_IMAGE_EDITOR::TransfertToImage(BITMAP_BASE* aItem )
{ {
wxString msg = m_textCtrlScale->GetValue(); wxString msg = m_textCtrlScale->GetValue();
msg.ToDouble( &m_workingImage->m_Scale ); msg.ToDouble( &m_workingImage->m_Scale );
m_textCtrlScale->SetValue( msg );
aItem->ImportData( m_workingImage ); aItem->ImportData( m_workingImage );
} }
This diff is collapsed.
...@@ -35,7 +35,9 @@ ...@@ -35,7 +35,9 @@
class DIALOG_IMAGE_EDITOR : public DIALOG_IMAGE_EDITOR_BASE class DIALOG_IMAGE_EDITOR : public DIALOG_IMAGE_EDITOR_BASE
{ {
private: private:
BITMAP_BASE* m_workingImage; BITMAP_BASE* m_workingImage; // The copy of BITMAP_BASE to be edited
BITMAP_BASE* m_lastImage; // the saved BITMAP_BASE before a new change.
// Used to undo the last change
public: public:
DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem ); DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem );
...@@ -51,12 +53,16 @@ public: ...@@ -51,12 +53,16 @@ public:
void TransfertToImage( BITMAP_BASE* aItem ); void TransfertToImage( BITMAP_BASE* aItem );
private: private:
void OnUndoLastChange( wxCommandEvent& event );
void OnGreyScaleConvert( wxCommandEvent& event );
void OnHalfSize( wxCommandEvent& event );
void OnMirrorX_click( wxCommandEvent& event ); void OnMirrorX_click( wxCommandEvent& event );
void OnMirrorY_click( wxCommandEvent& event ); void OnMirrorY_click( wxCommandEvent& event );
void OnRotateClick( wxCommandEvent& event ); void OnRotateClick( wxCommandEvent& event );
void OnOK_Button( wxCommandEvent& aEvent ); void OnOK_Button( wxCommandEvent& aEvent );
void OnCancel_Button( wxCommandEvent& aEvent ); void OnCancel_Button( wxCommandEvent& aEvent );
void OnRedrawPanel( wxPaintEvent& event ); void OnRedrawPanel( wxPaintEvent& event );
bool CheckValues();
}; };
......
...@@ -31,13 +31,23 @@ DIALOG_IMAGE_EDITOR_BASE::DIALOG_IMAGE_EDITOR_BASE( wxWindow* parent, wxWindowID ...@@ -31,13 +31,23 @@ DIALOG_IMAGE_EDITOR_BASE::DIALOG_IMAGE_EDITOR_BASE( wxWindow* parent, wxWindowID
bSizerRight = new wxBoxSizer( wxVERTICAL ); bSizerRight = new wxBoxSizer( wxVERTICAL );
m_buttonMirrorX = new wxButton( this, wxID_ANY, _("Mirror X"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonMirrorX = new wxButton( this, wxID_ANY, _("Mirror X"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerRight->Add( m_buttonMirrorX, 0, wxEXPAND|wxALL, 5 ); bSizerRight->Add( m_buttonMirrorX, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_buttonMirrorY = new wxButton( this, wxID_ANY, _("Mirror Y"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonMirrorY = new wxButton( this, wxID_ANY, _("Mirror Y"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerRight->Add( m_buttonMirrorY, 0, wxEXPAND|wxALL, 5 ); bSizerRight->Add( m_buttonMirrorY, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_buttonRotate = new wxButton( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonRotate = new wxButton( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerRight->Add( m_buttonRotate, 0, wxALL|wxEXPAND, 5 ); bSizerRight->Add( m_buttonRotate, 0, wxEXPAND|wxALL, 5 );
m_buttonGrey = new wxButton( this, wxID_ANY, _("Grey"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerRight->Add( m_buttonGrey, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_buttonHalfSize = new wxButton( this, wxID_ANY, _("Half Size"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonHalfSize->SetDefault();
bSizerRight->Add( m_buttonHalfSize, 0, wxALL|wxEXPAND, 5 );
m_buttonUndoLast = new wxButton( this, wxID_ANY, _("Undo Last"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerRight->Add( m_buttonUndoLast, 0, wxALL|wxEXPAND, 5 );
m_staticTextScale = new wxStaticText( this, wxID_ANY, _("Image Scale:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextScale = new wxStaticText( this, wxID_ANY, _("Image Scale:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextScale->Wrap( -1 ); m_staticTextScale->Wrap( -1 );
...@@ -70,6 +80,9 @@ DIALOG_IMAGE_EDITOR_BASE::DIALOG_IMAGE_EDITOR_BASE( wxWindow* parent, wxWindowID ...@@ -70,6 +80,9 @@ DIALOG_IMAGE_EDITOR_BASE::DIALOG_IMAGE_EDITOR_BASE( wxWindow* parent, wxWindowID
m_buttonMirrorX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnMirrorX_click ), NULL, this ); m_buttonMirrorX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnMirrorX_click ), NULL, this );
m_buttonMirrorY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnMirrorY_click ), NULL, this ); m_buttonMirrorY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnMirrorY_click ), NULL, this );
m_buttonRotate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnRotateClick ), NULL, this ); m_buttonRotate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnRotateClick ), NULL, this );
m_buttonGrey->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnGreyScaleConvert ), NULL, this );
m_buttonHalfSize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnHalfSize ), NULL, this );
m_buttonUndoLast->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnUndoLastChange ), NULL, this );
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnCancel_Button ), NULL, this ); m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnCancel_Button ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnOK_Button ), NULL, this ); m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnOK_Button ), NULL, this );
} }
...@@ -81,6 +94,9 @@ DIALOG_IMAGE_EDITOR_BASE::~DIALOG_IMAGE_EDITOR_BASE() ...@@ -81,6 +94,9 @@ DIALOG_IMAGE_EDITOR_BASE::~DIALOG_IMAGE_EDITOR_BASE()
m_buttonMirrorX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnMirrorX_click ), NULL, this ); m_buttonMirrorX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnMirrorX_click ), NULL, this );
m_buttonMirrorY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnMirrorY_click ), NULL, this ); m_buttonMirrorY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnMirrorY_click ), NULL, this );
m_buttonRotate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnRotateClick ), NULL, this ); m_buttonRotate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnRotateClick ), NULL, this );
m_buttonGrey->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnGreyScaleConvert ), NULL, this );
m_buttonHalfSize->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnHalfSize ), NULL, this );
m_buttonUndoLast->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnUndoLastChange ), NULL, this );
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnCancel_Button ), NULL, this ); m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnCancel_Button ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnOK_Button ), NULL, this ); m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnOK_Button ), NULL, this );
......
...@@ -38,6 +38,9 @@ class DIALOG_IMAGE_EDITOR_BASE : public wxDialog ...@@ -38,6 +38,9 @@ class DIALOG_IMAGE_EDITOR_BASE : public wxDialog
wxButton* m_buttonMirrorX; wxButton* m_buttonMirrorX;
wxButton* m_buttonMirrorY; wxButton* m_buttonMirrorY;
wxButton* m_buttonRotate; wxButton* m_buttonRotate;
wxButton* m_buttonGrey;
wxButton* m_buttonHalfSize;
wxButton* m_buttonUndoLast;
wxStaticText* m_staticTextScale; wxStaticText* m_staticTextScale;
wxTextCtrl* m_textCtrlScale; wxTextCtrl* m_textCtrlScale;
wxStdDialogButtonSizer* m_sdbSizer1; wxStdDialogButtonSizer* m_sdbSizer1;
...@@ -49,13 +52,16 @@ class DIALOG_IMAGE_EDITOR_BASE : public wxDialog ...@@ -49,13 +52,16 @@ class DIALOG_IMAGE_EDITOR_BASE : public wxDialog
virtual void OnMirrorX_click( wxCommandEvent& event ) { event.Skip(); } virtual void OnMirrorX_click( wxCommandEvent& event ) { event.Skip(); }
virtual void OnMirrorY_click( wxCommandEvent& event ) { event.Skip(); } virtual void OnMirrorY_click( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRotateClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnRotateClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnGreyScaleConvert( wxCommandEvent& event ) { event.Skip(); }
virtual void OnHalfSize( wxCommandEvent& event ) { event.Skip(); }
virtual void OnUndoLastChange( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancel_Button( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancel_Button( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOK_Button( wxCommandEvent& event ) { event.Skip(); } virtual void OnOK_Button( wxCommandEvent& event ) { event.Skip(); }
public: public:
DIALOG_IMAGE_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Image Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 340,256 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_IMAGE_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Image Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 340,299 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_IMAGE_EDITOR_BASE(); ~DIALOG_IMAGE_EDITOR_BASE();
}; };
......
...@@ -16,14 +16,14 @@ enum listbox { ...@@ -16,14 +16,14 @@ enum listbox {
}; };
BEGIN_EVENT_TABLE( WinEDAListBox, wxDialog ) BEGIN_EVENT_TABLE( EDA_LIST_DIALOG, wxDialog )
EVT_BUTTON( wxID_OK, WinEDAListBox::OnOkClick ) EVT_BUTTON( wxID_OK, EDA_LIST_DIALOG::OnOkClick )
EVT_BUTTON( wxID_CANCEL, WinEDAListBox::OnCancelClick ) EVT_BUTTON( wxID_CANCEL, EDA_LIST_DIALOG::OnCancelClick )
EVT_LISTBOX( ID_LISTBOX_LIST, WinEDAListBox::ClickOnList ) EVT_LISTBOX( ID_LISTBOX_LIST, EDA_LIST_DIALOG::ClickOnList )
EVT_LISTBOX_DCLICK( ID_LISTBOX_LIST, WinEDAListBox::D_ClickOnList ) EVT_LISTBOX_DCLICK( ID_LISTBOX_LIST, EDA_LIST_DIALOG::D_ClickOnList )
EVT_CHAR( WinEDAListBox::OnKeyEvent ) EVT_CHAR( EDA_LIST_DIALOG::OnKeyEvent )
EVT_CHAR_HOOK( WinEDAListBox::OnKeyEvent ) EVT_CHAR_HOOK( EDA_LIST_DIALOG::OnKeyEvent )
EVT_CLOSE( WinEDAListBox::OnClose ) EVT_CLOSE( EDA_LIST_DIALOG::OnClose )
END_EVENT_TABLE() END_EVENT_TABLE()
...@@ -37,7 +37,7 @@ END_EVENT_TABLE() ...@@ -37,7 +37,7 @@ END_EVENT_TABLE()
* @param aCallBackFunction callback function to display comments * @param aCallBackFunction callback function to display comments
* @param aPos = position of the dialog. * @param aPos = position of the dialog.
*/ */
WinEDAListBox::WinEDAListBox( EDA_DRAW_FRAME* aParent, const wxString& aTitle, EDA_LIST_DIALOG::EDA_LIST_DIALOG( EDA_DRAW_FRAME* aParent, const wxString& aTitle,
const wxArrayString& aItemList, const wxString& aRefText, const wxArrayString& aItemList, const wxString& aRefText,
void(* aCallBackFunction)(wxString& Text), wxPoint aPos ) : void(* aCallBackFunction)(wxString& Text), wxPoint aPos ) :
wxDialog( aParent, wxID_ANY, aTitle, aPos, wxDefaultSize, wxDialog( aParent, wxID_ANY, aTitle, aPos, wxDefaultSize,
...@@ -78,12 +78,12 @@ WinEDAListBox::WinEDAListBox( EDA_DRAW_FRAME* aParent, const wxString& aTitle, ...@@ -78,12 +78,12 @@ WinEDAListBox::WinEDAListBox( EDA_DRAW_FRAME* aParent, const wxString& aTitle,
} }
WinEDAListBox::~WinEDAListBox() EDA_LIST_DIALOG::~EDA_LIST_DIALOG()
{ {
} }
void WinEDAListBox::MoveMouseToOrigin() void EDA_LIST_DIALOG::MoveMouseToOrigin()
{ {
int x, y, w, h; int x, y, w, h;
wxSize list_size = m_listBox->GetSize(); wxSize list_size = m_listBox->GetSize();
...@@ -96,32 +96,32 @@ void WinEDAListBox::MoveMouseToOrigin() ...@@ -96,32 +96,32 @@ void WinEDAListBox::MoveMouseToOrigin()
} }
wxString WinEDAListBox::GetTextSelection() wxString EDA_LIST_DIALOG::GetTextSelection()
{ {
wxString text = m_listBox->GetStringSelection(); wxString text = m_listBox->GetStringSelection();
return text; return text;
} }
void WinEDAListBox::Append( const wxString& item ) void EDA_LIST_DIALOG::Append( const wxString& item )
{ {
m_listBox->Append( item ); m_listBox->Append( item );
} }
void WinEDAListBox::InsertItems( const wxArrayString& itemlist, int position ) void EDA_LIST_DIALOG::InsertItems( const wxArrayString& itemlist, int position )
{ {
m_listBox->InsertItems( itemlist, position ); m_listBox->InsertItems( itemlist, position );
} }
void WinEDAListBox::OnCancelClick( wxCommandEvent& event ) void EDA_LIST_DIALOG::OnCancelClick( wxCommandEvent& event )
{ {
EndModal( wxID_CANCEL ); EndModal( wxID_CANCEL );
} }
void WinEDAListBox::ClickOnList( wxCommandEvent& event ) void EDA_LIST_DIALOG::ClickOnList( wxCommandEvent& event )
{ {
wxString text; wxString text;
...@@ -135,19 +135,19 @@ void WinEDAListBox::ClickOnList( wxCommandEvent& event ) ...@@ -135,19 +135,19 @@ void WinEDAListBox::ClickOnList( wxCommandEvent& event )
} }
void WinEDAListBox::D_ClickOnList( wxCommandEvent& event ) void EDA_LIST_DIALOG::D_ClickOnList( wxCommandEvent& event )
{ {
EndModal( wxID_OK ); EndModal( wxID_OK );
} }
void WinEDAListBox::OnOkClick( wxCommandEvent& event ) void EDA_LIST_DIALOG::OnOkClick( wxCommandEvent& event )
{ {
EndModal( wxID_OK ); EndModal( wxID_OK );
} }
void WinEDAListBox::OnClose( wxCloseEvent& event ) void EDA_LIST_DIALOG::OnClose( wxCloseEvent& event )
{ {
EndModal( wxID_CANCEL ); EndModal( wxID_CANCEL );
} }
...@@ -161,7 +161,7 @@ static int SortItems( const wxString** ptr1, const wxString** ptr2 ) ...@@ -161,7 +161,7 @@ static int SortItems( const wxString** ptr1, const wxString** ptr2 )
} }
void WinEDAListBox:: SortList() void EDA_LIST_DIALOG:: SortList()
{ {
int ii, NbItems = m_listBox->GetCount(); int ii, NbItems = m_listBox->GetCount();
const wxString** BufList; const wxString** BufList;
...@@ -170,6 +170,7 @@ void WinEDAListBox:: SortList() ...@@ -170,6 +170,7 @@ void WinEDAListBox:: SortList()
return; return;
BufList = (const wxString**) MyZMalloc( 100 * NbItems * sizeof(wxString*) ); BufList = (const wxString**) MyZMalloc( 100 * NbItems * sizeof(wxString*) );
for( ii = 0; ii < NbItems; ii++ ) for( ii = 0; ii < NbItems; ii++ )
{ {
BufList[ii] = new wxString( m_listBox->GetString( ii ) ); BufList[ii] = new wxString( m_listBox->GetString( ii ) );
...@@ -179,6 +180,7 @@ void WinEDAListBox:: SortList() ...@@ -179,6 +180,7 @@ void WinEDAListBox:: SortList()
( int( * ) ( const void*, const void* ) )SortItems ); ( int( * ) ( const void*, const void* ) )SortItems );
m_listBox->Clear(); m_listBox->Clear();
for( ii = 0; ii < NbItems; ii++ ) for( ii = 0; ii < NbItems; ii++ )
{ {
m_listBox->Append( *BufList[ii] ); m_listBox->Append( *BufList[ii] );
...@@ -189,7 +191,7 @@ void WinEDAListBox:: SortList() ...@@ -189,7 +191,7 @@ void WinEDAListBox:: SortList()
} }
void WinEDAListBox::OnKeyEvent( wxKeyEvent& event ) void EDA_LIST_DIALOG::OnKeyEvent( wxKeyEvent& event )
{ {
event.Skip(); event.Skip();
} }
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* Read from Common config the Pdf browser choice /* Read from Common config the Pdf browser choice
*/ */
void WinEDA_App::ReadPdfBrowserInfos() void EDA_APP::ReadPdfBrowserInfos()
{ {
wxASSERT( m_EDA_CommonConfig != NULL ); wxASSERT( m_EDA_CommonConfig != NULL );
...@@ -32,7 +32,7 @@ void WinEDA_App::ReadPdfBrowserInfos() ...@@ -32,7 +32,7 @@ void WinEDA_App::ReadPdfBrowserInfos()
/* Write into Common config the Pdf browser choice /* Write into Common config the Pdf browser choice
*/ */
void WinEDA_App::WritePdfBrowserInfos() void EDA_APP::WritePdfBrowserInfos()
{ {
wxASSERT( m_EDA_CommonConfig != NULL ); wxASSERT( m_EDA_CommonConfig != NULL );
......
...@@ -237,7 +237,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -237,7 +237,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
}; };
WinEDA_App::WinEDA_App() EDA_APP::EDA_APP()
{ {
m_Checker = NULL; m_Checker = NULL;
m_HtmlCtrl = NULL; m_HtmlCtrl = NULL;
...@@ -251,7 +251,7 @@ WinEDA_App::WinEDA_App() ...@@ -251,7 +251,7 @@ WinEDA_App::WinEDA_App()
} }
WinEDA_App::~WinEDA_App() EDA_APP::~EDA_APP()
{ {
SaveSettings(); SaveSettings();
...@@ -271,7 +271,7 @@ WinEDA_App::~WinEDA_App() ...@@ -271,7 +271,7 @@ WinEDA_App::~WinEDA_App()
} }
void WinEDA_App::InitEDA_Appl( const wxString& aName, id_app_type aId ) void EDA_APP::InitEDA_Appl( const wxString& aName, EDA_APP_T aId )
{ {
wxString EnvLang; wxString EnvLang;
...@@ -349,7 +349,7 @@ void WinEDA_App::InitEDA_Appl( const wxString& aName, id_app_type aId ) ...@@ -349,7 +349,7 @@ void WinEDA_App::InitEDA_Appl( const wxString& aName, id_app_type aId )
} }
void WinEDA_App::InitOnLineHelp() void EDA_APP::InitOnLineHelp()
{ {
wxString fullfilename = FindKicadHelpPath(); wxString fullfilename = FindKicadHelpPath();
...@@ -376,7 +376,7 @@ void WinEDA_App::InitOnLineHelp() ...@@ -376,7 +376,7 @@ void WinEDA_App::InitOnLineHelp()
} }
bool WinEDA_App::SetBinDir() bool EDA_APP::SetBinDir()
{ {
/* Apple MacOSx */ /* Apple MacOSx */
#ifdef __APPLE__ #ifdef __APPLE__
...@@ -460,7 +460,7 @@ bool WinEDA_App::SetBinDir() ...@@ -460,7 +460,7 @@ bool WinEDA_App::SetBinDir()
} }
void WinEDA_App::SetDefaultSearchPaths( void ) void EDA_APP::SetDefaultSearchPaths( void )
{ {
size_t i; size_t i;
wxString path = m_BinDir; wxString path = m_BinDir;
...@@ -554,7 +554,7 @@ void WinEDA_App::SetDefaultSearchPaths( void ) ...@@ -554,7 +554,7 @@ void WinEDA_App::SetDefaultSearchPaths( void )
/* Add schematic library file path to search path list. /* Add schematic library file path to search path list.
* we must add <kicad path>/library and <kicad path>/library/doc * we must add <kicad path>/library and <kicad path>/library/doc
*/ */
if( m_Id == APP_TYPE_EESCHEMA ) if( m_Id == APP_EESCHEMA_T )
{ {
fn.AppendDir( wxT( "library" ) ); fn.AppendDir( wxT( "library" ) );
...@@ -576,7 +576,7 @@ void WinEDA_App::SetDefaultSearchPaths( void ) ...@@ -576,7 +576,7 @@ void WinEDA_App::SetDefaultSearchPaths( void )
} }
/* Add PCB library file path to search path list. */ /* Add PCB library file path to search path list. */
if( ( m_Id == APP_TYPE_PCBNEW ) || ( m_Id == APP_TYPE_CVPCB ) ) if( ( m_Id == APP_PCBNEW_T ) || ( m_Id == APP_CVPCB_T ) )
{ {
fn.AppendDir( wxT( "modules" ) ); fn.AppendDir( wxT( "modules" ) );
...@@ -611,7 +611,7 @@ void WinEDA_App::SetDefaultSearchPaths( void ) ...@@ -611,7 +611,7 @@ void WinEDA_App::SetDefaultSearchPaths( void )
} }
void WinEDA_App::GetSettings( bool aReopenLastUsedDirectory ) void EDA_APP::GetSettings( bool aReopenLastUsedDirectory )
{ {
wxASSERT( m_EDA_Config != NULL && m_EDA_CommonConfig != NULL ); wxASSERT( m_EDA_Config != NULL && m_EDA_CommonConfig != NULL );
...@@ -669,7 +669,7 @@ void WinEDA_App::GetSettings( bool aReopenLastUsedDirectory ) ...@@ -669,7 +669,7 @@ void WinEDA_App::GetSettings( bool aReopenLastUsedDirectory )
} }
void WinEDA_App::SaveSettings() void EDA_APP::SaveSettings()
{ {
wxASSERT( m_EDA_Config != NULL ); wxASSERT( m_EDA_Config != NULL );
m_EDA_Config->Write( wxT( "ShowPageLimits" ), g_ShowPageLimits ); m_EDA_Config->Write( wxT( "ShowPageLimits" ), g_ShowPageLimits );
...@@ -681,7 +681,7 @@ void WinEDA_App::SaveSettings() ...@@ -681,7 +681,7 @@ void WinEDA_App::SaveSettings()
} }
bool WinEDA_App::SetLanguage( bool first_time ) bool EDA_APP::SetLanguage( bool first_time )
{ {
bool retv = true; bool retv = true;
...@@ -757,7 +757,7 @@ bool WinEDA_App::SetLanguage( bool first_time ) ...@@ -757,7 +757,7 @@ bool WinEDA_App::SetLanguage( bool first_time )
} }
void WinEDA_App::SetLanguageIdentifier( int menu_id ) void EDA_APP::SetLanguageIdentifier( int menu_id )
{ {
wxLogDebug( wxT( "Select language ID %d from %d possible languages." ), wxLogDebug( wxT( "Select language ID %d from %d possible languages." ),
menu_id, LANGUAGE_DESCR_COUNT ); menu_id, LANGUAGE_DESCR_COUNT );
...@@ -773,7 +773,7 @@ void WinEDA_App::SetLanguageIdentifier( int menu_id ) ...@@ -773,7 +773,7 @@ void WinEDA_App::SetLanguageIdentifier( int menu_id )
} }
void WinEDA_App::SetLanguagePath( void ) void EDA_APP::SetLanguagePath( void )
{ {
size_t i; size_t i;
...@@ -811,7 +811,7 @@ void WinEDA_App::SetLanguagePath( void ) ...@@ -811,7 +811,7 @@ void WinEDA_App::SetLanguagePath( void )
} }
void WinEDA_App::AddMenuLanguageList( wxMenu* MasterMenu ) void EDA_APP::AddMenuLanguageList( wxMenu* MasterMenu )
{ {
wxMenu* menu = NULL; wxMenu* menu = NULL;
wxMenuItem* item; wxMenuItem* item;
...@@ -858,7 +858,7 @@ void WinEDA_App::AddMenuLanguageList( wxMenu* MasterMenu ) ...@@ -858,7 +858,7 @@ void WinEDA_App::AddMenuLanguageList( wxMenu* MasterMenu )
} }
wxString WinEDA_App::FindFileInSearchPaths( const wxString& filename, wxString EDA_APP::FindFileInSearchPaths( const wxString& filename,
const wxArrayString* subdirs ) const wxArrayString* subdirs )
{ {
size_t i, j; size_t i, j;
...@@ -885,7 +885,7 @@ wxString WinEDA_App::FindFileInSearchPaths( const wxString& filename, ...@@ -885,7 +885,7 @@ wxString WinEDA_App::FindFileInSearchPaths( const wxString& filename,
} }
wxString WinEDA_App::GetHelpFile( void ) wxString EDA_APP::GetHelpFile( void )
{ {
wxString fn; wxString fn;
wxArrayString subdirs, altsubdirs; wxArrayString subdirs, altsubdirs;
...@@ -963,7 +963,7 @@ wxString WinEDA_App::GetHelpFile( void ) ...@@ -963,7 +963,7 @@ wxString WinEDA_App::GetHelpFile( void )
} }
wxString WinEDA_App::GetLibraryFile( const wxString& filename ) wxString EDA_APP::GetLibraryFile( const wxString& filename )
{ {
wxArrayString subdirs; wxArrayString subdirs;
...@@ -978,7 +978,7 @@ wxString WinEDA_App::GetLibraryFile( const wxString& filename ) ...@@ -978,7 +978,7 @@ wxString WinEDA_App::GetLibraryFile( const wxString& filename )
} }
wxString WinEDA_App::ReturnLastVisitedLibraryPath( const wxString& aSubPathToSearch ) wxString EDA_APP::ReturnLastVisitedLibraryPath( const wxString& aSubPathToSearch )
{ {
if( !m_LastVisitedLibPath.IsEmpty() ) if( !m_LastVisitedLibPath.IsEmpty() )
return m_LastVisitedLibPath; return m_LastVisitedLibPath;
...@@ -1021,13 +1021,13 @@ wxString WinEDA_App::ReturnLastVisitedLibraryPath( const wxString& aSubPathToSea ...@@ -1021,13 +1021,13 @@ wxString WinEDA_App::ReturnLastVisitedLibraryPath( const wxString& aSubPathToSea
} }
void WinEDA_App::SaveLastVisitedLibraryPath( const wxString& aPath ) void EDA_APP::SaveLastVisitedLibraryPath( const wxString& aPath )
{ {
m_LastVisitedLibPath = aPath; m_LastVisitedLibPath = aPath;
} }
wxString WinEDA_App::ReturnFilenameWithRelativePathInLibPath( const wxString& aFullFilename ) wxString EDA_APP::ReturnFilenameWithRelativePathInLibPath( const wxString& aFullFilename )
{ {
/* If the library path is already in the library search paths /* If the library path is already in the library search paths
* list, just add the library name to the list. Otherwise, add * list, just add the library name to the list. Otherwise, add
...@@ -1065,7 +1065,7 @@ wxString WinEDA_App::ReturnFilenameWithRelativePathInLibPath( const wxString& aF ...@@ -1065,7 +1065,7 @@ wxString WinEDA_App::ReturnFilenameWithRelativePathInLibPath( const wxString& aF
} }
wxString WinEDA_App::FindLibraryPath( const wxString& aFileName ) wxString EDA_APP::FindLibraryPath( const wxString& aFileName )
{ {
if( wxFileName::FileExists( aFileName ) ) if( wxFileName::FileExists( aFileName ) )
return aFileName; return aFileName;
...@@ -1074,7 +1074,7 @@ wxString WinEDA_App::FindLibraryPath( const wxString& aFileName ) ...@@ -1074,7 +1074,7 @@ wxString WinEDA_App::FindLibraryPath( const wxString& aFileName )
} }
void WinEDA_App::RemoveLibraryPath( const wxString& aPaths ) void EDA_APP::RemoveLibraryPath( const wxString& aPaths )
{ {
wxStringTokenizer Token( aPaths, wxT( ";\n\r" ) ); wxStringTokenizer Token( aPaths, wxT( ";\n\r" ) );
...@@ -1090,7 +1090,7 @@ void WinEDA_App::RemoveLibraryPath( const wxString& aPaths ) ...@@ -1090,7 +1090,7 @@ void WinEDA_App::RemoveLibraryPath( const wxString& aPaths )
} }
void WinEDA_App::InsertLibraryPath( const wxString& aPaths, size_t aIndex ) void EDA_APP::InsertLibraryPath( const wxString& aPaths, size_t aIndex )
{ {
wxStringTokenizer Token( aPaths, wxT( ";\n\r" ) ); wxStringTokenizer Token( aPaths, wxT( ";\n\r" ) );
......
...@@ -520,20 +520,20 @@ wxString ReturnKicadDatasPath() ...@@ -520,20 +520,20 @@ wxString ReturnKicadDatasPath()
if( PathFound ) if( PathFound )
{ {
data_path.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP ); data_path.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP );
if( data_path.Last() != '/' ) if( data_path.Last() != '/' )
data_path += UNIX_STRING_DIR_SEP; data_path += UNIX_STRING_DIR_SEP;
} }
else else
{
data_path.Empty(); data_path.Empty();
}
return data_path; return data_path;
} }
/* wxString& EDA_APP::GetEditorName()
* Return the preferred editor name
*/
wxString& WinEDA_App::GetEditorName()
{ {
wxString editorname = m_EditorName; wxString editorname = m_EditorName;
......
...@@ -339,8 +339,9 @@ void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame, ...@@ -339,8 +339,9 @@ void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame,
wxString keyname; wxString keyname;
Ki_HotkeyInfo** List; Ki_HotkeyInfo** List;
wxString msg = _( "Current hotkey list:\n\n" ); wxString msg = _( "<html><body>" );
msg += _( "<H3>Hotkeys List</H3> <table cellpadding=\"0\">");
for( ; aDescList->m_HK_InfoList != NULL; aDescList++ ) for( ; aDescList->m_HK_InfoList != NULL; aDescList++ )
{ {
List = aDescList->m_HK_InfoList; List = aDescList->m_HK_InfoList;
...@@ -348,13 +349,17 @@ void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame, ...@@ -348,13 +349,17 @@ void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame,
for( ; *List != NULL; List++ ) for( ; *List != NULL; List++ )
{ {
Ki_HotkeyInfo* hk_decr = *List; Ki_HotkeyInfo* hk_decr = *List;
msg += _( "key " ); if( !hk_decr->m_InfoMsg.Contains( wxT( "Macros" ) ) )
{
keyname = ReturnKeyNameFromKeyCode( hk_decr->m_KeyCode ); keyname = ReturnKeyNameFromKeyCode( hk_decr->m_KeyCode );
msg += keyname + wxT( ": " ) + hk_decr->m_InfoMsg + wxT( "\n" ); msg += wxT( "<tr><td>" ) + hk_decr->m_InfoMsg + wxT("</td>");
msg += wxT("<td><b>&nbsp;&nbsp;") + keyname + wxT( "</b></td></tr>" );
}
} }
} }
DisplayInfoMessage( aFrame, msg ); msg += wxT("</table></html></body>");
DisplayHtmlInfoMessage( aFrame, _("Hotkeys List"), msg, wxSize(340, 750));
} }
......
#include "fctsys.h" #include "fctsys.h"
#include "dialog_load_error.h" #include "html_messagebox.h"
#include "macros.h" #include "macros.h"
DIALOG_LOAD_ERROR::DIALOG_LOAD_ERROR( wxWindow* parent ) HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* parent, const wxString & aTitle,
: wxPoint aPos, wxSize aSize)
DIALOG_DISPLAY_HTML_TEXT_BASE( parent, wxID_ANY, _("Load Error!"),wxDefaultPosition, wxSize( 450,250 ) ) : DIALOG_DISPLAY_HTML_TEXT_BASE( parent, wxID_ANY, aTitle, aPos, aSize )
{ {
SetFocus(); SetFocus();
ListClear(); ListClear();
} }
void DIALOG_LOAD_ERROR::OnCloseButtonClick( wxCommandEvent& event ) void HTML_MESSAGE_BOX::OnCloseButtonClick( wxCommandEvent& event )
{ {
EndModal(0); EndModal(0);
} }
void DIALOG_LOAD_ERROR::ListClear(void) void HTML_MESSAGE_BOX::ListClear(void)
{ {
m_htmlWindow->SetPage(wxEmptyString); m_htmlWindow->SetPage(wxEmptyString);
} }
...@@ -26,7 +26,7 @@ void DIALOG_LOAD_ERROR::ListClear(void) ...@@ -26,7 +26,7 @@ void DIALOG_LOAD_ERROR::ListClear(void)
* Add a list of items. * Add a list of items.
* @param aList = a string containing items. Items are separated by '\n' * @param aList = a string containing items. Items are separated by '\n'
*/ */
void DIALOG_LOAD_ERROR::ListSet(const wxString &aList) void HTML_MESSAGE_BOX::ListSet(const wxString &aList)
{ {
wxArrayString* wxStringSplit( wxString txt, wxChar splitter ); wxArrayString* wxStringSplit( wxString txt, wxChar splitter );
...@@ -48,7 +48,7 @@ void DIALOG_LOAD_ERROR::ListSet(const wxString &aList) ...@@ -48,7 +48,7 @@ void DIALOG_LOAD_ERROR::ListSet(const wxString &aList)
* Add a list of items. * Add a list of items.
* @param aList = a wxArrayString containing items * @param aList = a wxArrayString containing items
*/ */
void DIALOG_LOAD_ERROR::ListSet(const wxArrayString &aList) void HTML_MESSAGE_BOX::ListSet(const wxArrayString &aList)
{ {
wxString msg = wxT("<ul>"); wxString msg = wxT("<ul>");
for ( unsigned ii = 0; ii < aList.GetCount(); ii ++ ) for ( unsigned ii = 0; ii < aList.GetCount(); ii ++ )
...@@ -65,10 +65,20 @@ void DIALOG_LOAD_ERROR::ListSet(const wxArrayString &aList) ...@@ -65,10 +65,20 @@ void DIALOG_LOAD_ERROR::ListSet(const wxArrayString &aList)
* Add a message (in bold) to message list. * Add a message (in bold) to message list.
* @param message = the message * @param message = the message
*/ */
void DIALOG_LOAD_ERROR::MessageSet(const wxString &message) void HTML_MESSAGE_BOX::MessageSet(const wxString &message)
{ {
wxString message_value; wxString message_value;
message_value.Printf(wxT("<b>%s</b><br>"), GetChars( message ) ); message_value.Printf(wxT("<b>%s</b><br>"), GetChars( message ) );
m_htmlWindow->AppendToPage( message_value ); m_htmlWindow->AppendToPage( message_value );
} }
/**
* Function AddHTML_Text
* Add a text to message list.
* @param message = the text to add
*/
void HTML_MESSAGE_BOX::AddHTML_Text(const wxString &message)
{
m_htmlWindow->AppendToPage( message );
}
...@@ -83,6 +83,7 @@ const wxString ModuleFileWildcard( _( "Kicad footprint library files (*.mod)|*.m ...@@ -83,6 +83,7 @@ const wxString ModuleFileWildcard( _( "Kicad footprint library files (*.mod)|*.m
int g_CurrentVersionPCB = 1; int g_CurrentVersionPCB = 1;
int g_RotationAngle;
int g_TimeOut; // Timer for automatic saving int g_TimeOut; // Timer for automatic saving
int g_SaveTime; // Time for next saving int g_SaveTime; // Time for next saving
......
This diff is collapsed.
/***************/ /**
/* wxwineda.cpp */ * @file wxwineda.cpp
/****************/ */
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "dialog_helpers.h" #include "dialog_helpers.h"
/*
* Text entry dialog to enter one or more lines of text.
*/
WinEDA_EnterText::WinEDA_EnterText( wxWindow* parent,
const wxString& Title,
const wxString& TextToEdit,
wxBoxSizer* BoxSizer,
const wxSize& Size, bool Multiline )
{
m_Modify = FALSE;
if( ! TextToEdit.IsEmpty() )
m_NewText = TextToEdit;
m_Title = new wxStaticText( parent, -1, Title );
BoxSizer->Add( m_Title, 0,
wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, 5 );
long style = 0;
if (Multiline)
style = wxTE_MULTILINE;
m_FrameText = new wxTextCtrl( parent, -1, TextToEdit, wxDefaultPosition,
Size,style );
m_FrameText->SetInsertionPoint( 1 );
BoxSizer->Add( m_FrameText,
0,
wxGROW | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM,
5 );
}
wxString WinEDA_EnterText::GetValue()
{
m_Modify = m_FrameText->IsModified();
m_NewText = m_FrameText->GetValue();
return m_NewText;
}
void WinEDA_EnterText::GetValue( char* buffer, int lenmax )
{
m_Modify = m_FrameText->IsModified();
if( buffer )
{
m_NewText = m_FrameText->GetValue();
int ii, ll = m_NewText.Len();
for( ii = 0; ii < ll && ii < (lenmax - 1); ii++ )
;
buffer[ii] = m_NewText.GetChar( ii );
buffer[lenmax - 1] = 0;
}
}
void WinEDA_EnterText::SetValue( const wxString& new_text )
{
m_FrameText->SetValue( new_text );
}
void WinEDA_EnterText::Enable( bool enbl )
{
m_Title->Enable( enbl );
m_FrameText->Enable( enbl );
}
/*******************************************************/ /*******************************************************/
/* Class to edit a graphic + text size in INCHES or MM */ /* Class to edit a graphic + text size in INCHES or MM */
/*******************************************************/ /*******************************************************/
WinEDA_GraphicTextCtrl::WinEDA_GraphicTextCtrl( wxWindow* parent, EDA_GRAPHIC_TEXT_CTRL::EDA_GRAPHIC_TEXT_CTRL( wxWindow* parent,
const wxString& Title, const wxString& Title,
const wxString& TextToEdit, const wxString& TextToEdit,
int textsize, int textsize,
UserUnitType user_unit, EDA_UNITS_T user_unit,
wxBoxSizer* BoxSizer, wxBoxSizer* BoxSizer,
int framelen, int framelen,
int internal_unit ) int internal_unit )
...@@ -121,7 +50,7 @@ WinEDA_GraphicTextCtrl::WinEDA_GraphicTextCtrl( wxWindow* parent, ...@@ -121,7 +50,7 @@ WinEDA_GraphicTextCtrl::WinEDA_GraphicTextCtrl( wxWindow* parent,
} }
WinEDA_GraphicTextCtrl::~WinEDA_GraphicTextCtrl() EDA_GRAPHIC_TEXT_CTRL::~EDA_GRAPHIC_TEXT_CTRL()
{ {
/* no, these are deleted by the BoxSizer /* no, these are deleted by the BoxSizer
delete m_FrameText; delete m_FrameText;
...@@ -130,7 +59,7 @@ WinEDA_GraphicTextCtrl::~WinEDA_GraphicTextCtrl() ...@@ -130,7 +59,7 @@ WinEDA_GraphicTextCtrl::~WinEDA_GraphicTextCtrl()
} }
wxString WinEDA_GraphicTextCtrl::FormatSize( int internalUnit, UserUnitType aUnit, wxString EDA_GRAPHIC_TEXT_CTRL::FormatSize( int internalUnit, EDA_UNITS_T aUnit,
int textSize ) int textSize )
{ {
wxString value; wxString value;
...@@ -149,34 +78,34 @@ wxString WinEDA_GraphicTextCtrl::FormatSize( int internalUnit, UserUnitType aUni ...@@ -149,34 +78,34 @@ wxString WinEDA_GraphicTextCtrl::FormatSize( int internalUnit, UserUnitType aUni
} }
void WinEDA_GraphicTextCtrl::SetTitle( const wxString& title ) void EDA_GRAPHIC_TEXT_CTRL::SetTitle( const wxString& title )
{ {
m_Title->SetLabel( title ); m_Title->SetLabel( title );
} }
void WinEDA_GraphicTextCtrl::SetValue( const wxString& value ) void EDA_GRAPHIC_TEXT_CTRL::SetValue( const wxString& value )
{ {
m_FrameText->SetValue( value ); m_FrameText->SetValue( value );
} }
void WinEDA_GraphicTextCtrl::SetValue( int textSize ) void EDA_GRAPHIC_TEXT_CTRL::SetValue( int textSize )
{ {
wxString value = FormatSize( m_Internal_Unit, m_UserUnit, textSize ); wxString value = FormatSize( m_Internal_Unit, m_UserUnit, textSize );
m_FrameSize->SetValue( value ); m_FrameSize->SetValue( value );
} }
wxString WinEDA_GraphicTextCtrl::GetText() wxString EDA_GRAPHIC_TEXT_CTRL::GetText()
{ {
wxString text = m_FrameText->GetValue(); wxString text = m_FrameText->GetValue();
return text; return text;
} }
int WinEDA_GraphicTextCtrl::ParseSize( const wxString& sizeText, int EDA_GRAPHIC_TEXT_CTRL::ParseSize( const wxString& sizeText,
int internalUnit, UserUnitType aUnit ) int internalUnit, EDA_UNITS_T aUnit )
{ {
int textsize; int textsize;
...@@ -193,13 +122,13 @@ int WinEDA_GraphicTextCtrl::ParseSize( const wxString& sizeText, ...@@ -193,13 +122,13 @@ int WinEDA_GraphicTextCtrl::ParseSize( const wxString& sizeText,
} }
int WinEDA_GraphicTextCtrl::GetTextSize() int EDA_GRAPHIC_TEXT_CTRL::GetTextSize()
{ {
return ParseSize( m_FrameSize->GetValue(), m_Internal_Unit, m_UserUnit ); return ParseSize( m_FrameSize->GetValue(), m_Internal_Unit, m_UserUnit );
} }
void WinEDA_GraphicTextCtrl::Enable( bool state ) void EDA_GRAPHIC_TEXT_CTRL::Enable( bool state )
{ {
m_FrameText->Enable( state ); m_FrameText->Enable( state );
} }
...@@ -208,10 +137,10 @@ void WinEDA_GraphicTextCtrl::Enable( bool state ) ...@@ -208,10 +137,10 @@ void WinEDA_GraphicTextCtrl::Enable( bool state )
/********************************************************/ /********************************************************/
/* Class to display and edit a coordinated INCHES or MM */ /* Class to display and edit a coordinated INCHES or MM */
/********************************************************/ /********************************************************/
WinEDA_PositionCtrl::WinEDA_PositionCtrl( wxWindow* parent, EDA_POSITION_CTRL::EDA_POSITION_CTRL( wxWindow* parent,
const wxString& title, const wxString& title,
const wxPoint& pos_to_edit, const wxPoint& pos_to_edit,
UserUnitType user_unit, EDA_UNITS_T user_unit,
wxBoxSizer* BoxSizer, wxBoxSizer* BoxSizer,
int internal_unit ) int internal_unit )
{ {
...@@ -219,10 +148,12 @@ WinEDA_PositionCtrl::WinEDA_PositionCtrl( wxWindow* parent, ...@@ -219,10 +148,12 @@ WinEDA_PositionCtrl::WinEDA_PositionCtrl( wxWindow* parent,
m_UserUnit = user_unit; m_UserUnit = user_unit;
m_Internal_Unit = internal_unit; m_Internal_Unit = internal_unit;
if( title.IsEmpty() ) if( title.IsEmpty() )
text = _( "Pos " ); text = _( "Pos " );
else else
text = title; text = title;
text += _( "X" ) + ReturnUnitSymbol( m_UserUnit ); text += _( "X" ) + ReturnUnitSymbol( m_UserUnit );
m_TextX = new wxStaticText( parent, -1, text ); m_TextX = new wxStaticText( parent, -1, text );
...@@ -239,6 +170,7 @@ WinEDA_PositionCtrl::WinEDA_PositionCtrl( wxWindow* parent, ...@@ -239,6 +170,7 @@ WinEDA_PositionCtrl::WinEDA_PositionCtrl( wxWindow* parent,
else else
text = title; text = title;
text += _( "Y" ) + ReturnUnitSymbol( m_UserUnit ); text += _( "Y" ) + ReturnUnitSymbol( m_UserUnit );
m_TextY = new wxStaticText( parent, -1, text ); m_TextY = new wxStaticText( parent, -1, text );
BoxSizer->Add( m_TextY, 0, BoxSizer->Add( m_TextY, 0,
...@@ -252,7 +184,7 @@ WinEDA_PositionCtrl::WinEDA_PositionCtrl( wxWindow* parent, ...@@ -252,7 +184,7 @@ WinEDA_PositionCtrl::WinEDA_PositionCtrl( wxWindow* parent,
} }
WinEDA_PositionCtrl::~WinEDA_PositionCtrl() EDA_POSITION_CTRL::~EDA_POSITION_CTRL()
{ {
delete m_TextX; delete m_TextX;
delete m_TextY; delete m_TextY;
...@@ -263,7 +195,7 @@ WinEDA_PositionCtrl::~WinEDA_PositionCtrl() ...@@ -263,7 +195,7 @@ WinEDA_PositionCtrl::~WinEDA_PositionCtrl()
/* Returns (in internal units) to coordinate between (in user units) /* Returns (in internal units) to coordinate between (in user units)
*/ */
wxPoint WinEDA_PositionCtrl::GetValue() wxPoint EDA_POSITION_CTRL::GetValue()
{ {
wxPoint coord; wxPoint coord;
...@@ -274,14 +206,14 @@ wxPoint WinEDA_PositionCtrl::GetValue() ...@@ -274,14 +206,14 @@ wxPoint WinEDA_PositionCtrl::GetValue()
} }
void WinEDA_PositionCtrl::Enable( bool x_win_on, bool y_win_on ) void EDA_POSITION_CTRL::Enable( bool x_win_on, bool y_win_on )
{ {
m_FramePosX->Enable( x_win_on ); m_FramePosX->Enable( x_win_on );
m_FramePosY->Enable( y_win_on ); m_FramePosY->Enable( y_win_on );
} }
void WinEDA_PositionCtrl::SetValue( int x_value, int y_value ) void EDA_POSITION_CTRL::SetValue( int x_value, int y_value )
{ {
wxString msg; wxString msg;
...@@ -299,22 +231,22 @@ void WinEDA_PositionCtrl::SetValue( int x_value, int y_value ) ...@@ -299,22 +231,22 @@ void WinEDA_PositionCtrl::SetValue( int x_value, int y_value )
/*******************/ /*******************/
/* WinEDA_SizeCtrl */ /* EDA_SIZE_CTRL */
/*******************/ /*******************/
WinEDA_SizeCtrl::WinEDA_SizeCtrl( wxWindow* parent, const wxString& title, EDA_SIZE_CTRL::EDA_SIZE_CTRL( wxWindow* parent, const wxString& title,
const wxSize& size_to_edit, const wxSize& size_to_edit,
UserUnitType aUnit, wxBoxSizer* BoxSizer, EDA_UNITS_T aUnit, wxBoxSizer* aBoxSizer,
int internal_unit ) : int internal_unit ) :
WinEDA_PositionCtrl( parent, title, EDA_POSITION_CTRL( parent, title,
wxPoint( size_to_edit.x, size_to_edit.y ), wxPoint( size_to_edit.x, size_to_edit.y ),
aUnit, BoxSizer, internal_unit ) aUnit, aBoxSizer, internal_unit )
{ {
} }
wxSize WinEDA_SizeCtrl::GetValue() wxSize EDA_SIZE_CTRL::GetValue()
{ {
wxPoint pos = WinEDA_PositionCtrl::GetValue(); wxPoint pos = EDA_POSITION_CTRL::GetValue();
wxSize size; wxSize size;
size.x = pos.x; size.x = pos.x;
...@@ -326,8 +258,8 @@ wxSize WinEDA_SizeCtrl::GetValue() ...@@ -326,8 +258,8 @@ wxSize WinEDA_SizeCtrl::GetValue()
/**************************************************************/ /**************************************************************/
/* Class to display and edit a dimension INCHES, MM, or other */ /* Class to display and edit a dimension INCHES, MM, or other */
/**************************************************************/ /**************************************************************/
WinEDA_ValueCtrl::WinEDA_ValueCtrl( wxWindow* parent, const wxString& title, EDA_VALUE_CTRL::EDA_VALUE_CTRL( wxWindow* parent, const wxString& title,
int value, UserUnitType user_unit, wxBoxSizer* BoxSizer, int value, EDA_UNITS_T user_unit, wxBoxSizer* BoxSizer,
int internal_unit ) int internal_unit )
{ {
wxString label = title; wxString label = title;
...@@ -353,14 +285,14 @@ WinEDA_ValueCtrl::WinEDA_ValueCtrl( wxWindow* parent, const wxString& title, ...@@ -353,14 +285,14 @@ WinEDA_ValueCtrl::WinEDA_ValueCtrl( wxWindow* parent, const wxString& title,
} }
WinEDA_ValueCtrl::~WinEDA_ValueCtrl() EDA_VALUE_CTRL::~EDA_VALUE_CTRL()
{ {
delete m_ValueCtrl; delete m_ValueCtrl;
delete m_Text; delete m_Text;
} }
int WinEDA_ValueCtrl::GetValue() int EDA_VALUE_CTRL::GetValue()
{ {
int coord; int coord;
wxString txtvalue = m_ValueCtrl->GetValue(); wxString txtvalue = m_ValueCtrl->GetValue();
...@@ -370,7 +302,7 @@ int WinEDA_ValueCtrl::GetValue() ...@@ -370,7 +302,7 @@ int WinEDA_ValueCtrl::GetValue()
} }
void WinEDA_ValueCtrl::SetValue( int new_value ) void EDA_VALUE_CTRL::SetValue( int new_value )
{ {
wxString buffer; wxString buffer;
...@@ -381,7 +313,7 @@ void WinEDA_ValueCtrl::SetValue( int new_value ) ...@@ -381,7 +313,7 @@ void WinEDA_ValueCtrl::SetValue( int new_value )
} }
void WinEDA_ValueCtrl::Enable( bool enbl ) void EDA_VALUE_CTRL::Enable( bool enbl )
{ {
m_ValueCtrl->Enable( enbl ); m_ValueCtrl->Enable( enbl );
m_Text->Enable( enbl ); m_Text->Enable( enbl );
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "common.h"
#include "cvpcb.h" #include "cvpcb.h"
#include "cvpcb_mainframe.h" #include "cvpcb_mainframe.h"
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "common.h"
#include "cvpcb.h" #include "cvpcb.h"
#include "cvpcb_mainframe.h" #include "cvpcb_mainframe.h"
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "dialog_cvpcb_config.h" #include "dialog_cvpcb_config.h"
#include "class_DisplayFootprintsFrame.h" #include "class_DisplayFootprintsFrame.h"
#include "cvpcb_id.h" #include "cvpcb_id.h"
#include "dialog_load_error.h" #include "html_messagebox.h"
#include "build_version.h" #include "build_version.h"
...@@ -578,7 +578,7 @@ bool CVPCB_MAINFRAME::LoadFootprintFiles() ...@@ -578,7 +578,7 @@ bool CVPCB_MAINFRAME::LoadFootprintFiles()
/* Display error messages, if any */ /* Display error messages, if any */
if( !m_footprints.m_filesNotFound.IsEmpty() || !m_footprints.m_filesInvalid.IsEmpty() ) if( !m_footprints.m_filesNotFound.IsEmpty() || !m_footprints.m_filesInvalid.IsEmpty() )
{ {
DIALOG_LOAD_ERROR dialog( NULL ); HTML_MESSAGE_BOX dialog( this, _("Load Error") );
if( !m_footprints.m_filesNotFound.IsEmpty() ) if( !m_footprints.m_filesNotFound.IsEmpty() )
{ {
......
...@@ -5,13 +5,11 @@ ...@@ -5,13 +5,11 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "cvpcb.h" #include "cvpcb.h"
#include "zones.h" #include "zones.h"
#include "bitmaps.h"
#include "cvpcb_mainframe.h" #include "cvpcb_mainframe.h"
#include "colors_selection.h" #include "colors_selection.h"
#include "cvpcb_id.h" #include "cvpcb_id.h"
...@@ -39,7 +37,7 @@ const wxString titleLibLoadError( _( "Library Load Error" ) ); ...@@ -39,7 +37,7 @@ const wxString titleLibLoadError( _( "Library Load Error" ) );
* MacOSX: Needed for file association * MacOSX: Needed for file association
* http://wiki.wxwidgets.org/WxMac-specific_topics * http://wiki.wxwidgets.org/WxMac-specific_topics
*/ */
void WinEDA_App::MacOpenFile(const wxString &fileName) void EDA_APP::MacOpenFile(const wxString &fileName)
{ {
wxFileName filename = fileName; wxFileName filename = fileName;
wxString oldPath; wxString oldPath;
...@@ -62,20 +60,20 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) ...@@ -62,20 +60,20 @@ void WinEDA_App::MacOpenFile(const wxString &fileName)
} }
// Create a new application object // Create a new application object
IMPLEMENT_APP( WinEDA_App ) IMPLEMENT_APP( EDA_APP )
/************************************/ /************************************/
/* Called to initialize the program */ /* Called to initialize the program */
/************************************/ /************************************/
bool WinEDA_App::OnInit() bool EDA_APP::OnInit()
{ {
wxFileName filename; wxFileName filename;
wxString message; wxString message;
CVPCB_MAINFRAME* frame = NULL; CVPCB_MAINFRAME* frame = NULL;
InitEDA_Appl( wxT( "CvPcb" ), APP_TYPE_CVPCB ); InitEDA_Appl( wxT( "CvPcb" ), APP_CVPCB_T );
if( m_Checker && m_Checker->IsAnotherRunning() ) if( m_Checker && m_Checker->IsAnotherRunning() )
{ {
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "wxstruct.h" #include "wxstruct.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "macros.h"
#include "cvpcb.h" #include "cvpcb.h"
#include "cvpcb_mainframe.h" #include "cvpcb_mainframe.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "common.h"
#include "cvpcb.h" #include "cvpcb.h"
#include "cvpcb_mainframe.h" #include "cvpcb_mainframe.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "gestfich.h" #include "gestfich.h"
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "macros.h" #include "macros.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "gestfich.h" #include "gestfich.h"
......
...@@ -136,7 +136,7 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin ...@@ -136,7 +136,7 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
* but they must exist because they appear in some classes. * but they must exist because they appear in some classes.
* Do nothing in CvPcb. * Do nothing in CvPcb.
*/ */
TRACK* Marque_Une_Piste( BOARD* aPcb, TRACK* MarkTrace( BOARD* aPcb,
TRACK* aStartSegm, TRACK* aStartSegm,
int* aSegmCount, int* aSegmCount,
int* aTrackLen, int* aTrackLen,
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <vector> #include <vector>
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "wxstruct.h" #include "wxstruct.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
****************************************************************/ ****************************************************************/
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "gestfich.h" #include "gestfich.h"
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "block_commande.h" #include "block_commande.h"
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <vector> #include <vector>
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "kicad_string.h" #include "kicad_string.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "confirm.h" #include "confirm.h"
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
/*************************/ /*************************/
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "confirm.h" #include "confirm.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
......
...@@ -33,10 +33,8 @@ ...@@ -33,10 +33,8 @@
#include <vector> #include <vector>
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "wxstruct.h"
#include "netlist.h" #include "netlist.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "sch_component.h" #include "sch_component.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "eda_dde.h" #include "eda_dde.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "confirm.h" #include "confirm.h"
#include "eda_doc.h" #include "eda_doc.h"
...@@ -50,9 +49,11 @@ wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufNa ...@@ -50,9 +49,11 @@ wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufNa
if( nameList.IsEmpty() ) if( nameList.IsEmpty() )
{ {
msg = _( "No components found matching " ); msg = _( "No components found matching " );
if( !BufName.IsEmpty() ) if( !BufName.IsEmpty() )
{ {
msg += _( "name search criteria <" ) + BufName + wxT( "> " ); msg += _( "name search criteria <" ) + BufName + wxT( "> " );
if( !Keys.IsEmpty() ) if( !Keys.IsEmpty() )
msg += _( "and " ); msg += _( "and " );
} }
...@@ -67,8 +68,8 @@ wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufNa ...@@ -67,8 +68,8 @@ wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufNa
// Show candidate list: // Show candidate list:
wxString cmpname; wxString cmpname;
WinEDAListBox dlg( frame, _( "Select Component" ), EDA_LIST_DIALOG dlg( frame, _( "Select Component" ), nameList, cmpname, DisplayCmpDoc );
nameList, cmpname, DisplayCmpDoc );
if( dlg.ShowModal() != wxID_OK ) if( dlg.ShowModal() != wxID_OK )
return wxEmptyString; return wxEmptyString;
......
...@@ -33,8 +33,6 @@ ...@@ -33,8 +33,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "bitmaps.h"
#include "common.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "kicad_string.h" #include "kicad_string.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
...@@ -633,8 +632,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel() ...@@ -633,8 +632,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel()
else else
fieldValueTextCtrl->Enable( true ); fieldValueTextCtrl->Enable( true );
textSizeTextCtrl->SetValue( textSizeTextCtrl->SetValue( EDA_GRAPHIC_TEXT_CTRL::FormatSize( EESCHEMA_INTERNAL_UNIT,
WinEDA_GraphicTextCtrl::FormatSize( EESCHEMA_INTERNAL_UNIT,
g_UserUnit, field.m_Size.x ) ); g_UserUnit, field.m_Size.x ) );
wxPoint coord = field.m_Pos; wxPoint coord = field.m_Pos;
...@@ -714,8 +712,8 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField() ...@@ -714,8 +712,8 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField()
setRowItem( fieldNdx, field ); // update fieldListCtrl setRowItem( fieldNdx, field ); // update fieldListCtrl
field.m_Size.x = WinEDA_GraphicTextCtrl::ParseSize( field.m_Size.x = EDA_GRAPHIC_TEXT_CTRL::ParseSize( textSizeTextCtrl->GetValue(),
textSizeTextCtrl->GetValue(), EESCHEMA_INTERNAL_UNIT, g_UserUnit ); EESCHEMA_INTERNAL_UNIT, g_UserUnit );
field.m_Size.y = field.m_Size.x; field.m_Size.y = field.m_Size.x;
int style = m_StyleRadioBox->GetSelection(); int style = m_StyleRadioBox->GetSelection();
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "wx/valgen.h" #include "wx/valgen.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "general.h" #include "general.h"
#include "drawtxt.h" #include "drawtxt.h"
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
...@@ -658,8 +657,8 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel() ...@@ -658,8 +657,8 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel()
fieldValueTextCtrl->SetValue( field.m_Text ); fieldValueTextCtrl->SetValue( field.m_Text );
textSizeTextCtrl->SetValue( textSizeTextCtrl->SetValue( EDA_GRAPHIC_TEXT_CTRL::FormatSize( EESCHEMA_INTERNAL_UNIT,
WinEDA_GraphicTextCtrl::FormatSize( EESCHEMA_INTERNAL_UNIT, g_UserUnit, field.m_Size.x ) ); g_UserUnit, field.m_Size.x ) );
wxPoint coord = field.m_Pos; wxPoint coord = field.m_Pos;
wxPoint zero; wxPoint zero;
...@@ -745,8 +744,8 @@ bool DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copyPanelToSelectedField() ...@@ -745,8 +744,8 @@ bool DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copyPanelToSelectedField()
setRowItem( fieldNdx, field ); // update fieldListCtrl setRowItem( fieldNdx, field ); // update fieldListCtrl
field.m_Size.x = WinEDA_GraphicTextCtrl::ParseSize( field.m_Size.x = EDA_GRAPHIC_TEXT_CTRL::ParseSize( textSizeTextCtrl->GetValue(),
textSizeTextCtrl->GetValue(), EESCHEMA_INTERNAL_UNIT, g_UserUnit ); EESCHEMA_INTERNAL_UNIT, g_UserUnit );
field.m_Size.y = field.m_Size.x; field.m_Size.y = field.m_Size.x;
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
......
...@@ -7,11 +7,9 @@ ...@@ -7,11 +7,9 @@
// License: GPL // License: GPL
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "gestfich.h" #include "gestfich.h"
#include "bitmaps.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
* Handles the dialog so set current texts and pins sizes in LibEdit * Handles the dialog so set current texts and pins sizes in LibEdit
*/ */
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "general.h" #include "general.h"
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "plot_common.h" #include "plot_common.h"
#include "confirm.h" #include "confirm.h"
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "plot_common.h" #include "plot_common.h"
#include "worksheet.h" #include "worksheet.h"
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "worksheet.h" #include "worksheet.h"
#include "plot_common.h" #include "plot_common.h"
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "macros.h" #include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "trigo.h" #include "trigo.h"
#include "common.h"
#include "richio.h" #include "richio.h"
#include "plot_common.h" #include "plot_common.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "base_struct.h" #include "base_struct.h"
#include "drawtxt.h" #include "drawtxt.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "general.h" #include "general.h"
#include "class_library.h" #include "class_library.h"
#include "dialog_load_error.h" #include "html_messagebox.h"
/** /**
...@@ -94,7 +94,7 @@ void SCH_EDIT_FRAME::LoadLibraries( void ) ...@@ -94,7 +94,7 @@ void SCH_EDIT_FRAME::LoadLibraries( void )
/* Print the libraries not found */ /* Print the libraries not found */
if( !libraries_not_found.IsEmpty() ) if( !libraries_not_found.IsEmpty() )
{ {
DIALOG_LOAD_ERROR dialog( this ); HTML_MESSAGE_BOX dialog( this, _("Files not found") );
dialog.MessageSet( _( "The following libraries could not be found:" ) ); dialog.MessageSet( _( "The following libraries could not be found:" ) );
dialog.ListSet( libraries_not_found ); dialog.ListSet( libraries_not_found );
libraries_not_found.empty(); libraries_not_found.empty();
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
......
...@@ -4,11 +4,9 @@ ...@@ -4,11 +4,9 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "bitmaps.h"
#include "eda_dde.h" #include "eda_dde.h"
#include "id.h" #include "id.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
...@@ -80,12 +78,12 @@ TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 ); ...@@ -80,12 +78,12 @@ TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 );
// static object for many reasons) and also declares the accessor function // static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and // wxGetApp() which will return the reference of the right type (i.e. MyApp and
// not wxApp) // not wxApp)
IMPLEMENT_APP( WinEDA_App ) IMPLEMENT_APP( EDA_APP )
/* MacOSX: Needed for file association /* MacOSX: Needed for file association
* http://wiki.wxwidgets.org/WxMac-specific_topics * http://wiki.wxwidgets.org/WxMac-specific_topics
*/ */
void WinEDA_App::MacOpenFile( const wxString &fileName ) void EDA_APP::MacOpenFile( const wxString &fileName )
{ {
wxFileName filename = fileName; wxFileName filename = fileName;
SCH_EDIT_FRAME* frame = ((SCH_EDIT_FRAME*) GetTopWindow()); SCH_EDIT_FRAME* frame = ((SCH_EDIT_FRAME*) GetTopWindow());
...@@ -100,12 +98,12 @@ void WinEDA_App::MacOpenFile( const wxString &fileName ) ...@@ -100,12 +98,12 @@ void WinEDA_App::MacOpenFile( const wxString &fileName )
} }
bool WinEDA_App::OnInit() bool EDA_APP::OnInit()
{ {
wxFileName filename; wxFileName filename;
SCH_EDIT_FRAME* frame = NULL; SCH_EDIT_FRAME* frame = NULL;
InitEDA_Appl( wxT( "EESchema" ), APP_TYPE_EESCHEMA ); InitEDA_Appl( wxT( "EESchema" ), APP_EESCHEMA_T );
if( m_Checker && m_Checker->IsAnotherRunning() ) if( m_Checker && m_Checker->IsAnotherRunning() )
{ {
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
...@@ -211,7 +210,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) ...@@ -211,7 +210,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
if( dlg.ShowModal() == wxID_CANCEL ) if( dlg.ShowModal() == wxID_CANCEL )
return; return;
g_UserUnit = (UserUnitType)dlg.GetUnitsSelection(); g_UserUnit = (EDA_UNITS_T)dlg.GetUnitsSelection();
GetScreen()->SetGrid( grid_list[ (size_t) dlg.GetGridSelection() ].m_Size ); GetScreen()->SetGrid( grid_list[ (size_t) dlg.GetGridSelection() ].m_Size );
......
...@@ -3,10 +3,8 @@ ...@@ -3,10 +3,8 @@
/**************************************/ /**************************************/
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "bitmaps.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "general.h" #include "general.h"
#include "kicad_device_context.h" #include "kicad_device_context.h"
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
/****************************/ /****************************/
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
*/ */
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "kicad_string.h" #include "kicad_string.h"
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
......
...@@ -57,3 +57,4 @@ ...@@ -57,3 +57,4 @@
#define HELP_ADD_BODYCIRCLE _( "Add circles to the component body" ) #define HELP_ADD_BODYCIRCLE _( "Add circles to the component body" )
#define HELP_ADD_BODYARC _( "Add arcs to the component body" ) #define HELP_ADD_BODYARC _( "Add arcs to the component body" )
#define HELP_ADD_BODYPOLYGON _( "Add lines and polygons to the component body" ) #define HELP_ADD_BODYPOLYGON _( "Add lines and polygons to the component body" )
#define HELP_PLACE_GRAPHICIMAGES _("Add a bitmap image")
...@@ -3,10 +3,8 @@ ...@@ -3,10 +3,8 @@
/******************/ /******************/
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "bitmaps.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
/***************/ /***************/
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "hotkeys.h" #include "hotkeys.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
...@@ -87,8 +86,8 @@ static Ki_HotkeyInfo HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 ); ...@@ -87,8 +86,8 @@ static Ki_HotkeyInfo HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 );
static Ki_HotkeyInfo HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-' ); static Ki_HotkeyInfo HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-' );
#endif #endif
static Ki_HotkeyInfo HkHelp( wxT( "Help: this message" ), HK_HELP, '?' ); static Ki_HotkeyInfo HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
static Ki_HotkeyInfo HkResetLocalCoord( wxT( "Reset local coord." ), static Ki_HotkeyInfo HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
HK_RESET_LOCAL_COORD, ' ' ); HK_RESET_LOCAL_COORD, ' ' );
/* Undo */ /* Undo */
...@@ -104,11 +103,11 @@ static Ki_HotkeyInfo HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_SHIFT + GR_KB_CTRL + ...@@ -104,11 +103,11 @@ static Ki_HotkeyInfo HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_SHIFT + GR_KB_CTRL +
// Schematic editor // Schematic editor
static Ki_HotkeyInfo HkAddLabel( wxT( "add Label" ), HK_ADD_LABEL, 'L' ); static Ki_HotkeyInfo HkAddLabel( wxT( "add Label" ), HK_ADD_LABEL, 'L' );
static Ki_HotkeyInfo HkAddHierarchicalLabel( wxT( "add Hierarchical Label" ), HK_ADD_HLABEL, 'H' ); static Ki_HotkeyInfo HkAddHierarchicalLabel( wxT( "Add Hierarchical Label" ), HK_ADD_HLABEL, 'H' );
static Ki_HotkeyInfo HkAddGlobalLabel( wxT( "add Global Label" ), HK_ADD_GLABEL, GR_KB_CTRL + 'L' ); static Ki_HotkeyInfo HkAddGlobalLabel( wxT( "Add Global Label" ), HK_ADD_GLABEL, GR_KB_CTRL + 'L' );
static Ki_HotkeyInfo HkAddJunction( wxT( "add Junction" ), HK_ADD_JUNCTION, 'J' ); static Ki_HotkeyInfo HkAddJunction( wxT( "Add Junction" ), HK_ADD_JUNCTION, 'J' );
static Ki_HotkeyInfo HkBeginWire( wxT( "begin Wire" ), HK_BEGIN_WIRE, 'W' ); static Ki_HotkeyInfo HkBeginWire( wxT( "Draw Wire" ), HK_BEGIN_WIRE, 'W' );
static Ki_HotkeyInfo HkBeginBus( wxT( "begin Bus" ), HK_BEGIN_BUS, 'B' ); static Ki_HotkeyInfo HkBeginBus( wxT( "Draw Bus" ), HK_BEGIN_BUS, 'B' );
static Ki_HotkeyInfo HkAddComponent( wxT( "Add Component" ), HK_ADD_NEW_COMPONENT, 'A' ); static Ki_HotkeyInfo HkAddComponent( wxT( "Add Component" ), HK_ADD_NEW_COMPONENT, 'A' );
static Ki_HotkeyInfo HkAddPower( wxT( "Add Power" ), HK_ADD_NEW_POWER, 'P' ); static Ki_HotkeyInfo HkAddPower( wxT( "Add Power" ), HK_ADD_NEW_POWER, 'P' );
static Ki_HotkeyInfo HkAddNoConn( wxT( "Add NoConnected Flag" ), HK_ADD_NOCONN_FLAG, 'Q' ); static Ki_HotkeyInfo HkAddNoConn( wxT( "Add NoConnected Flag" ), HK_ADD_NOCONN_FLAG, 'Q' );
...@@ -139,20 +138,20 @@ static Ki_HotkeyInfo HkCopyComponentOrText( wxT( "Copy Component or Label" ), ...@@ -139,20 +138,20 @@ static Ki_HotkeyInfo HkCopyComponentOrText( wxT( "Copy Component or Label" ),
static Ki_HotkeyInfo HkDrag( wxT( "Drag Schematic Item" ), HK_DRAG, 'G', static Ki_HotkeyInfo HkDrag( wxT( "Drag Schematic Item" ), HK_DRAG, 'G',
ID_POPUP_SCH_DRAG_CMP_REQUEST ); ID_POPUP_SCH_DRAG_CMP_REQUEST );
static Ki_HotkeyInfo HkMove2Drag( wxT( "Switch move block to drag block" ), static Ki_HotkeyInfo HkMove2Drag( wxT( "Move Block -> Drag Block" ),
HK_MOVEBLOCK_TO_DRAGBLOCK, '\t' ); HK_MOVEBLOCK_TO_DRAGBLOCK, '\t' );
static Ki_HotkeyInfo HkInsert( wxT( "Repeat Last Item" ), HK_REPEAT_LAST, WXK_INSERT ); static Ki_HotkeyInfo HkInsert( wxT( "Repeat Last Item" ), HK_REPEAT_LAST, WXK_INSERT );
static Ki_HotkeyInfo HkDelete( wxT( "Delete Item" ), HK_DELETE, WXK_DELETE ); static Ki_HotkeyInfo HkDelete( wxT( "Delete Item" ), HK_DELETE, WXK_DELETE );
static Ki_HotkeyInfo HkFindItem( wxT( "Find Item" ), HK_FIND_ITEM, 'F' + GR_KB_CTRL ); static Ki_HotkeyInfo HkFindItem( wxT( "Find Item" ), HK_FIND_ITEM, 'F' + GR_KB_CTRL );
static Ki_HotkeyInfo HkFindNextItem( wxT( "Find Next Item" ), HK_FIND_NEXT_ITEM, WXK_F5 ); static Ki_HotkeyInfo HkFindNextItem( wxT( "Find Next Item" ), HK_FIND_NEXT_ITEM, WXK_F5 );
static Ki_HotkeyInfo HkFindNextDrcMarker( wxT( "Find next DRC marker" ), HK_FIND_NEXT_DRC_MARKER, static Ki_HotkeyInfo HkFindNextDrcMarker( wxT( "Find Next DRC Marker" ), HK_FIND_NEXT_DRC_MARKER,
WXK_F5 + GR_KB_SHIFT ); WXK_F5 + GR_KB_SHIFT );
// Special keys for library editor: // Special keys for library editor:
static Ki_HotkeyInfo HkCreatePin( wxT( "Create Pin" ), HK_LIBEDIT_CREATE_PIN, 'P' ); static Ki_HotkeyInfo HkCreatePin( wxT( "Create Pin" ), HK_LIBEDIT_CREATE_PIN, 'P' );
static Ki_HotkeyInfo HkInsertPin( wxT( "Repeat Pin" ), HK_REPEAT_LAST, WXK_INSERT ); static Ki_HotkeyInfo HkInsertPin( wxT( "Repeat Pin" ), HK_REPEAT_LAST, WXK_INSERT );
static Ki_HotkeyInfo HkMoveLibItem( wxT( "Move Lib Item" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' ); static Ki_HotkeyInfo HkMoveLibItem( wxT( "Move Library Item" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' );
// List of common hotkey descriptors // List of common hotkey descriptors
...@@ -977,7 +976,7 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, ...@@ -977,7 +976,7 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
break; break;
case HK_LIBEDIT_CREATE_PIN: case HK_LIBEDIT_CREATE_PIN:
SetToolID( ID_LIBEDIT_PIN_BUTT, wxCURSOR_PENCIL, _( "Add pin" ) ); SetToolID( ID_LIBEDIT_PIN_BUTT, wxCURSOR_PENCIL, _( "Add Pin" ) );
OnLeftClick( aDC, aPosition ); OnLeftClick( aDC, aPosition );
break; break;
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "base_struct.h" #include "base_struct.h"
#include "drawtxt.h" #include "drawtxt.h"
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "drawtxt.h" #include "drawtxt.h"
#include "plot_common.h" #include "plot_common.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "bitmaps.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
/* Module for generation of component archive files. */ /* Module for generation of component archive files. */
/*****************************************************/ /*****************************************************/
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "wxstruct.h" #include "wxstruct.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "macros.h" #include "macros.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "eeschema_id.h" #include "eeschema_id.h"
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "common.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
......
...@@ -4,13 +4,11 @@ ...@@ -4,13 +4,11 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "general.h" #include "general.h"
//#include "protos.h"
#include "sch_component.h" #include "sch_component.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_library.h" #include "class_library.h"
......
...@@ -196,8 +196,13 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() ...@@ -196,8 +196,13 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
AddMenuItem( editMenu, AddMenuItem( editMenu,
ID_BACKANNO_ITEMS, ID_BACKANNO_ITEMS,
_( "&Backannotate" ), _( "&Backannotate" ),
<<<<<<< TREE
_( "Back annotate the footprint fields" ), _( "Back annotate the footprint fields" ),
KiBitmap( import_footprint_names_xpm ) ); KiBitmap( import_footprint_names_xpm ) );
=======
_( "Back Annotate Footprint Fields" ),
import_footprint_names_xpm );
>>>>>>> MERGE-SOURCE
// Menu View: // Menu View:
wxMenu* viewMenu = new wxMenu; wxMenu* viewMenu = new wxMenu;
...@@ -258,7 +263,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() ...@@ -258,7 +263,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
KiBitmap( add_component_xpm ) ); KiBitmap( add_component_xpm ) );
// Power port // Power port
text = AddHotkeyName( _( "Power port" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Power Port" ), s_Schematic_Hokeys_Descr,
HK_ADD_NEW_POWER, false ); // add comment, not a shortcut HK_ADD_NEW_POWER, false ); // add comment, not a shortcut
AddMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text, AddMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text,
HELP_PLACE_POWERPORT, HELP_PLACE_POWERPORT,
...@@ -279,21 +284,21 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() ...@@ -279,21 +284,21 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
KiBitmap( add_bus_xpm ) ); KiBitmap( add_bus_xpm ) );
// Wire to Bus entry // Wire to Bus entry
text = AddHotkeyName( _( "Wire to bus entry" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Wire to Bus Entry" ), s_Schematic_Hokeys_Descr,
HK_ADD_WIRE_ENTRY, false ); // add comment, not a shortcut HK_ADD_WIRE_ENTRY, false ); // add comment, not a shortcut
AddMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text, AddMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text,
HELP_PLACE_WIRE2BUS_ENTRY, HELP_PLACE_WIRE2BUS_ENTRY,
KiBitmap( add_line2bus_xpm ) ); KiBitmap( add_line2bus_xpm ) );
// Bus to Bus entry // Bus to Bus entry
text = AddHotkeyName( _( "Bus to bus entry" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Bus to Bus Entry" ), s_Schematic_Hokeys_Descr,
HK_ADD_BUS_ENTRY, false ); // add comment, not a shortcut HK_ADD_BUS_ENTRY, false ); // add comment, not a shortcut
AddMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text, AddMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text,
HELP_PLACE_BUS2BUS_ENTRY, HELP_PLACE_BUS2BUS_ENTRY,
KiBitmap( add_bus2bus_xpm ) ); KiBitmap( add_bus2bus_xpm ) );
// No connect flag // No Connect Flag
text = AddHotkeyName( _( "No connect flag" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "No Connect Flag" ), s_Schematic_Hokeys_Descr,
HK_ADD_NOCONN_FLAG, false ); // add comment, not a shortcut HK_ADD_NOCONN_FLAG, false ); // add comment, not a shortcut
AddMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, KiBitmap( noconn_xpm ) ); AddMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, KiBitmap( noconn_xpm ) );
...@@ -305,7 +310,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() ...@@ -305,7 +310,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
KiBitmap( add_line_label_xpm ) ); KiBitmap( add_line_label_xpm ) );
// Global label // Global label
text = AddHotkeyName( _( "Global label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Global Label" ), s_Schematic_Hokeys_Descr,
HK_ADD_GLABEL, false ); // add comment, not a shortcut HK_ADD_GLABEL, false ); // add comment, not a shortcut
AddMenuItem( placeMenu, ID_GLABEL_BUTT, text, AddMenuItem( placeMenu, ID_GLABEL_BUTT, text,
HELP_PLACE_GLOBALLABEL, HELP_PLACE_GLOBALLABEL,
...@@ -322,9 +327,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() ...@@ -322,9 +327,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
placeMenu->AppendSeparator(); placeMenu->AppendSeparator();
// Hierarchical label // Hierarchical label
text = AddHotkeyName( _( "Hierarchical label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr,
HK_ADD_HLABEL, false ); // add comment, not a shortcut HK_ADD_HLABEL, false ); // add comment, not a shortcut
text = AddHotkeyName( _( "Hierarchical label" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Hierarchical Label" ), s_Schematic_Hokeys_Descr,
HK_ADD_HLABEL, false ); // add comment, not a shortcut HK_ADD_HLABEL, false ); // add comment, not a shortcut
AddMenuItem( placeMenu, ID_HIERLABEL_BUTT, AddMenuItem( placeMenu, ID_HIERLABEL_BUTT,
text, HELP_PLACE_HIER_LABEL, text, HELP_PLACE_HIER_LABEL,
...@@ -332,7 +337,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() ...@@ -332,7 +337,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// Hierarchical sheet // Hierarchical sheet
text = AddHotkeyName( _( "Hierarchical sheet" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Hierarchical Sheet" ), s_Schematic_Hokeys_Descr,
HK_ADD_HIER_SHEET, false ); // add comment, not a shortcut HK_ADD_HIER_SHEET, false ); // add comment, not a shortcut
AddMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text, AddMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text,
HELP_PLACE_SHEET, HELP_PLACE_SHEET,
...@@ -348,7 +353,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() ...@@ -348,7 +353,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// Add hierarchical Pin to Sheet // Add hierarchical Pin to Sheet
AddMenuItem( placeMenu, AddMenuItem( placeMenu,
ID_SHEET_PIN_BUTT, ID_SHEET_PIN_BUTT,
_( "Add Hierarchical Pin to Sheet" ), _( "Hierarchical Pin to Sheet" ),
HELP_PLACE_SHEETPIN, HELP_PLACE_SHEETPIN,
KiBitmap( add_hierar_pin_xpm ) ); KiBitmap( add_hierar_pin_xpm ) );
...@@ -356,19 +361,23 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() ...@@ -356,19 +361,23 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
placeMenu->AppendSeparator(); placeMenu->AppendSeparator();
// Graphic line or polygon // Graphic line or polygon
text = AddHotkeyName( _( "Graphic polyline" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Graphic Polyline" ), s_Schematic_Hokeys_Descr,
HK_ADD_GRAPHIC_POLYLINE, false ); // add comment, not a shortcut HK_ADD_GRAPHIC_POLYLINE, false ); // add comment, not a shortcut
AddMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text, AddMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text,
HELP_PLACE_GRAPHICLINES, HELP_PLACE_GRAPHICLINES,
KiBitmap( add_dashed_line_xpm ) ); KiBitmap( add_dashed_line_xpm ) );
// Graphic text // Graphic text
text = AddHotkeyName( _( "Graphic text" ), s_Schematic_Hokeys_Descr, text = AddHotkeyName( _( "Graphic Text" ), s_Schematic_Hokeys_Descr,
HK_ADD_GRAPHIC_TEXT, false ); // add comment, not a shortcut HK_ADD_GRAPHIC_TEXT, false ); // add comment, not a shortcut
AddMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text, AddMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text,
HELP_PLACE_GRAPHICTEXTS, HELP_PLACE_GRAPHICTEXTS,
KiBitmap( add_text_xpm ) ); KiBitmap( add_text_xpm ) );
// Graphic image
AddMenuItem( placeMenu, ID_ADD_IMAGE_BUTT, _("Image"),
HELP_PLACE_GRAPHICIMAGES,
image_xpm );
// Menu Preferences: // Menu Preferences:
wxMenu* preferencesMenu = new wxMenu; wxMenu* preferencesMenu = new wxMenu;
...@@ -412,14 +421,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() ...@@ -412,14 +421,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// Save preferences // Save preferences
AddMenuItem( preferencesMenu, AddMenuItem( preferencesMenu,
ID_CONFIG_SAVE, ID_CONFIG_SAVE,
_( "&Save preferences" ), _( "&Save Preferences" ),
_( "Save application preferences" ), _( "Save application preferences" ),
KiBitmap( save_setup_xpm ) ); KiBitmap( save_setup_xpm ) );
// Read preferences // Read preferences
AddMenuItem( preferencesMenu, AddMenuItem( preferencesMenu,
ID_CONFIG_READ, ID_CONFIG_READ,
_( "&Read preferences" ), _( "&Read Preferences" ),
_( "Read application preferences" ), _( "Read application preferences" ),
KiBitmap( read_setup_xpm ) ); KiBitmap( read_setup_xpm ) );
...@@ -478,14 +487,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() ...@@ -478,14 +487,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
//Run CVPcb //Run CVPcb
AddMenuItem( toolsMenu, AddMenuItem( toolsMenu,
ID_TO_CVPCB, ID_TO_CVPCB,
_( "A&ssign component footprints" ), _( "A&ssign Component Footprints" ),
_( "Run CVPcb" ), _( "Run CVPcb" ),
KiBitmap( cvpcb_xpm ) ); KiBitmap( cvpcb_xpm ) );
// Run PCBNew // Run PCBNew
AddMenuItem( toolsMenu, AddMenuItem( toolsMenu,
ID_TO_PCB, ID_TO_PCB,
_( "&Layout printed circuit board" ), _( "&Layout Printed Circuit Board" ),
_( "Run PCBNew" ), _( "Run PCBNew" ),
KiBitmap( pcbnew_xpm ) ); KiBitmap( pcbnew_xpm ) );
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "gestfich.h" #include "gestfich.h"
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
/*****************/ /*****************/
#include "fctsys.h" #include "fctsys.h"
#include "common.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
...@@ -255,16 +254,23 @@ void NETLIST_DIALOG::InstallPageSpice() ...@@ -255,16 +254,23 @@ void NETLIST_DIALOG::InstallPageSpice()
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
2, netlist_opt, 1, 2, netlist_opt, 1,
wxRA_SPECIFY_COLS ); wxRA_SPECIFY_COLS );
if( !g_OptNetListUseNames ) if( !g_OptNetListUseNames )
m_UseNetNamesInNetlist->SetSelection( 1 ); m_UseNetNamesInNetlist->SetSelection( 1 );
page->m_LeftBoxSizer->Add( m_UseNetNamesInNetlist, 0, wxGROW | wxALL, 5 ); page->m_LeftBoxSizer->Add( m_UseNetNamesInNetlist, 0, wxGROW | wxALL, 5 );
page->m_CommandStringCtrl = new WinEDA_EnterText( page, page->m_LowBoxSizer->Add( new wxStaticText( page, -1, _( "Simulator command:" ) ), 0,
_( "Simulator command:" ), wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, 5 );
m_Parent->GetSimulatorCommand(),
page->m_LowBoxSizer, page->m_CommandStringCtrl = new wxTextCtrl( page, -1, m_Parent->GetSimulatorCommand(),
wxDefaultSize ); wxDefaultPosition, wxDefaultSize );
page->m_CommandStringCtrl->SetInsertionPoint( 1 );
page->m_LowBoxSizer->Add( page->m_CommandStringCtrl,
0,
wxGROW | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM,
5 );
// Add buttons // Add buttons
Button = new wxButton( page, ID_CREATE_NETLIST, _( "Netlist" ) ); Button = new wxButton( page, ID_CREATE_NETLIST, _( "Netlist" ) );
...@@ -302,6 +308,7 @@ void NETLIST_DIALOG::InstallCustomPages() ...@@ -302,6 +308,7 @@ void NETLIST_DIALOG::InstallCustomPages()
/* Install the panel "Add Plugin" after /* Install the panel "Add Plugin" after
* the last initialized panel */ * the last initialized panel */
previoustitle = title; previoustitle = title;
if( title.IsEmpty() ) if( title.IsEmpty() )
CurrPage = CurrPage =
...@@ -325,17 +332,32 @@ void NETLIST_DIALOG::InstallCustomPages() ...@@ -325,17 +332,32 @@ void NETLIST_DIALOG::InstallCustomPages()
msg = CUSTOM_NETLIST_COMMAND; msg = CUSTOM_NETLIST_COMMAND;
msg << ii + 1; msg << ii + 1;
wxString Command = wxGetApp().m_EDA_Config->Read( msg ); wxString Command = wxGetApp().m_EDA_Config->Read( msg );
CurrPage->m_CommandStringCtrl =
new WinEDA_EnterText( CurrPage, CurrPage->m_LowBoxSizer->Add( new wxStaticText( CurrPage,
_( "Netlist command:" ), Command, -1, _( "Netlist command:" ) ), 0,
CurrPage->m_LowBoxSizer, wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, 5 );
wxDefaultSize );
CurrPage->m_CommandStringCtrl = new wxTextCtrl( CurrPage, -1, Command,
CurrPage->m_TitleStringCtrl = wxDefaultPosition, wxDefaultSize );
new WinEDA_EnterText( CurrPage,
_( "Title:" ), title, CurrPage->m_CommandStringCtrl->SetInsertionPoint( 1 );
CurrPage->m_LowBoxSizer, CurrPage->m_LowBoxSizer->Add( CurrPage->m_CommandStringCtrl,
wxDefaultSize ); 0,
wxGROW | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM,
5 );
CurrPage->m_LowBoxSizer->Add( new wxStaticText( CurrPage,
-1, _( "Title:" ) ), 0,
wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, 5 );
CurrPage->m_TitleStringCtrl = new wxTextCtrl( CurrPage, -1, title,
wxDefaultPosition, wxDefaultSize );
CurrPage->m_TitleStringCtrl->SetInsertionPoint( 1 );
CurrPage->m_LowBoxSizer->Add( CurrPage->m_TitleStringCtrl,
0,
wxGROW | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM,
5 );
} }
} }
...@@ -385,6 +407,7 @@ void NETLIST_DIALOG::AddNewPluginPanel( wxCommandEvent& event ) ...@@ -385,6 +407,7 @@ void NETLIST_DIALOG::AddNewPluginPanel( wxCommandEvent& event )
/* Get a title for this page */ /* Get a title for this page */
wxString title = CurrPage->m_TitleStringCtrl->GetValue(); wxString title = CurrPage->m_TitleStringCtrl->GetValue();
if( title.IsEmpty() ) if( title.IsEmpty() )
DisplayInfoMessage( this, DisplayInfoMessage( this,
_( "Do not forget to choose a title for this netlist control page" ) ); _( "Do not forget to choose a title for this netlist control page" ) );
......
...@@ -48,8 +48,8 @@ public: ...@@ -48,8 +48,8 @@ public:
int m_IdNetType; int m_IdNetType;
wxCheckBox* m_IsCurrentFormat; wxCheckBox* m_IsCurrentFormat;
wxCheckBox* m_AddSubPrefix; wxCheckBox* m_AddSubPrefix;
WinEDA_EnterText* m_CommandStringCtrl; wxTextCtrl* m_CommandStringCtrl;
WinEDA_EnterText* m_TitleStringCtrl; wxTextCtrl* m_TitleStringCtrl;
wxButton* m_ButtonCancel; wxButton* m_ButtonCancel;
wxBoxSizer* m_LeftBoxSizer; wxBoxSizer* m_LeftBoxSizer;
wxBoxSizer* m_RightBoxSizer; wxBoxSizer* m_RightBoxSizer;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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