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()
* units */
WinEDA_VertexCtrl::WinEDA_VertexCtrl( wxWindow* parent, const wxString& title,
wxBoxSizer* BoxSizer,
UserUnitType units, int internal_unit )
EDA_UNITS_T units, int internal_unit )
{
wxString text;
wxStaticText* msgtitle;
......
This diff is collapsed.
......@@ -123,7 +123,7 @@ private:
public:
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();
......
......@@ -3,6 +3,22 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with
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>
================================================================================
Add Fabrizio Tappero <fabrizio-dot-tappero[at]gmail-dot-com> in contribuotors list.
......
......@@ -12,15 +12,6 @@ endif(WIN32)
# Path to local CMake modules.
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
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)")
......
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 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "wxstruct.h"
#include "common.h"
#include "confirm.h"
#include "gestfich.h"
......@@ -39,7 +38,6 @@
#include "bitmap2component.xpm"
#include "bitmaps.h"
#include "colors_selection.h"
#include "build_version.h"
......@@ -89,6 +87,7 @@ private:
void ExportFile( FILE* aOutfile, int aFormat );
};
BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
{
m_Config = new wxConfig();
......@@ -116,6 +115,7 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
Centre();
}
BM2CMP_FRAME::~BM2CMP_FRAME()
{
if( ( m_Config == NULL ) || IsIconized() )
......@@ -133,7 +133,7 @@ BM2CMP_FRAME::~BM2CMP_FRAME()
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
*/
this->Freeze( );
......@@ -156,7 +156,7 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event )
m_InitialPicturePanel->PrepareDC( pict_dc );
m_GreyscalePicturePanel->PrepareDC( greyscale_dc );
m_BNPicturePanel->PrepareDC( nb_dc );
// OSX crashes with empty bitmaps (on initial refreshes)
if(m_Pict_Bitmap.IsOk() && m_Greyscale_Bitmap.IsOk() && m_BN_Bitmap.IsOk())
{
......@@ -166,12 +166,14 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event )
}
}
/* Called to load a bitmap file
*/
void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
{
wxFileName fn(m_BitmapFileName);
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
path = wxGetCwd();
......@@ -182,7 +184,9 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
if( diag != wxID_OK )
return;
wxString fullFilename = FileDlg.GetPath();
if( ! LoadFile( fullFilename ) )
return;
......@@ -192,6 +196,7 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
Refresh();
}
bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName )
{
m_BitmapFileName = aFullFileName;
......@@ -232,6 +237,7 @@ bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName )
return true;
}
void BM2CMP_FRAME::Binarize( double aThreshold )
{
unsigned int pixin;
......@@ -244,10 +250,12 @@ void BM2CMP_FRAME::Binarize( double aThreshold )
for( int x = 1; x < w; x++ )
{
pixin = m_Greyscale_Image.GetGreen( x, y );
if( pixin < threshold )
pixout = 0;
else
pixout = 255;
m_NB_Image.SetRGB( x, y, pixout, pixout, pixout );
}
......@@ -289,8 +297,10 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event )
{
wxFileName fn(m_ConvertedFileName);
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd();
wxString msg = _( "Schematic lib file (*.lib)|*.lib" );
wxFileDialog FileDlg( this, _( "Create a lib file for Eeschema" ), path, wxEmptyString,
msg,
......@@ -299,10 +309,12 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event )
if( diag != wxID_OK )
return;
m_ConvertedFileName = FileDlg.GetPath();
FILE* outfile;
outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
if( outfile == NULL )
{
wxString msg;
......@@ -320,8 +332,10 @@ void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event )
{
wxFileName fn(m_ConvertedFileName);
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd();
wxString msg = _( "Footprint file (*.mod)|*.mod" );
wxFileDialog FileDlg( this, _( "Create a footprint file for PcbNew" ),
path, wxEmptyString,
......@@ -331,10 +345,13 @@ void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event )
if( diag != wxID_OK )
return;
m_ConvertedFileName = FileDlg.GetPath();
FILE* outfile;
outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
if( outfile == NULL )
{
wxString msg;
......@@ -353,6 +370,7 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat )
int h = m_NB_Image.GetHeight();
int w = m_NB_Image.GetWidth();
potrace_bitmap_t* potrace_bitmap = bm_new( w, h );
if( !potrace_bitmap )
{
wxString msg;
......@@ -377,18 +395,18 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat )
// 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
// main program
//-----------------------------------------------------------------------------
bool WinEDA_App::OnInit()
bool EDA_APP::OnInit()
{
wxInitAllImageHandlers();
......
......@@ -17,7 +17,6 @@ set( COMMON_ABOUT_DLG_SRCS
dialogs/dialog_get_component_base.cpp
dialogs/dialog_hotkeys_editor.cpp
dialogs/dialog_hotkeys_editor_base.cpp
dialogs/dialog_load_error.cpp
dialogs/dialog_page_settings_base.cpp
)
......@@ -58,6 +57,7 @@ set(COMMON_SRCS
gr_basic.cpp
hotkeys_basic.cpp
hotkey_grid_table.cpp
html_messagebox.cpp
msgpanel.cpp
netlist_keywords.cpp
newstroke_font.cpp
......
......@@ -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;
wxRealPoint new_size;
......
......@@ -6,7 +6,11 @@
#endif
#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
......
......@@ -236,7 +236,7 @@ void BITMAP_BASE::Mirror( bool aVertically )
if( m_image )
{
*m_image = m_image->Mirror( not aVertically );
*m_bitmap = wxBitmap( *m_image );
RebuildBitmap();
}
}
......@@ -246,7 +246,7 @@ void BITMAP_BASE::Rotate( bool aRotateCCW )
if( m_image )
{
*m_image = m_image->Rotate90( aRotateCCW );
*m_bitmap = wxBitmap( *m_image );
RebuildBitmap();
}
}
......
......@@ -59,6 +59,7 @@ const wxString NetlistFileExtension( wxT( "net" ) );
const wxString GerberFileExtension( wxT( "pho" ) );
const wxString PcbFileExtension( wxT( "brd" ) );
const wxString PdfFileExtension( wxT( "pdf" ) );
const wxString MacrosFileExtension( wxT( "mcr" ) );
/* Proper wxFileDialog wild card definitions. */
const wxString ProjectFileWildcard( _( "Kicad project files (*.pro)|*.pro" ) );
......@@ -67,6 +68,7 @@ const wxString NetlistFileWildcard( _( "Kicad netlist files (*.net)|*.net" ) );
const wxString GerberFileWildcard( _( "Gerber files (*.pho)|*.pho" ) );
const wxString PcbFileWildcard( _( "Kicad printed circuit board files (*.brd)|*.brd" ) );
const wxString PdfFileWildcard( _( "Portable document format files (*.pdf)|*.pdf" ) );
const wxString MacrosFileWildcard( _( "Kicad recorded macros (*.mcr)|*.mcr" ) );
const wxString AllFilesWildcard( _( "All files (*)|*" ) );
......@@ -78,7 +80,7 @@ wxString g_Prj_Default_Config_FullFilename;
wxString g_Prj_Config_LocalFilename;
/* Current user unit of measure */
UserUnitType g_UserUnit;
EDA_UNITS_T g_UserUnit;
/* Draw color for moving objects: */
int g_GhostColor;
......@@ -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 label;
......@@ -249,7 +251,7 @@ wxString ReturnUnitSymbol( UserUnitType aUnit, const wxString& formatString )
}
wxString GetUnitsLabel( UserUnitType aUnit )
wxString GetUnitsLabel( EDA_UNITS_T aUnit )
{
wxString label;
......@@ -272,7 +274,7 @@ wxString GetUnitsLabel( UserUnitType aUnit )
}
wxString GetAbbreviatedUnitsLabel( UserUnitType aUnit )
wxString GetAbbreviatedUnitsLabel( EDA_UNITS_T aUnit )
{
wxString label;
......@@ -298,7 +300,7 @@ wxString GetAbbreviatedUnitsLabel( UserUnitType aUnit )
* Add string " (mm):" or " ("):" to the static text Stext.
* 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();
......@@ -346,7 +348,7 @@ int ReturnValueFromTextCtrl( const wxTextCtrl& TextCtr, int Internal_Unit )
* @return a wxString what contains value and optionally the symbol unit
* (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 )
{
wxString StringValue;
......@@ -384,7 +386,7 @@ wxString ReturnStringFromValue( UserUnitType aUnit, int aValue, int aInternal_Un
* Value = text
* 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 Value;
......@@ -479,7 +481,7 @@ wxArrayString* wxStringSplit( wxString txt, wxChar splitter )
* @param val : double : the given value
* @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 )
{
......@@ -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
*/
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;
......
......@@ -5,7 +5,9 @@
#include "fctsys.h"
#include "common.h"
#include "wx/wx.h"
#include "wx/html/htmlwin.h"
#include "html_messagebox.h"
/* Display an error or warning message.
* TODO:
......@@ -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 )
{
int ii;
......
......@@ -40,6 +40,8 @@ DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem
: DIALOG_IMAGE_EDITOR_BASE( aParent )
{
m_workingImage = new BITMAP_BASE( * aItem );
m_lastImage = NULL;
m_buttonUndoLast->Enable( false );
wxString msg;
msg.Printf( wxT("%f"), m_workingImage->m_Scale );
m_textCtrlScale->SetValue( msg );;
......@@ -53,28 +55,106 @@ DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem
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_panelDraw->Refresh();
}
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_panelDraw->Refresh();
}
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_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 )
{
EndModal( wxID_OK );
if( CheckValues() )
EndModal( wxID_OK );
return;
}
void DIALOG_IMAGE_EDITOR::OnCancel_Button( wxCommandEvent& aEvent )
......@@ -97,7 +177,6 @@ void DIALOG_IMAGE_EDITOR::TransfertToImage(BITMAP_BASE* aItem )
{
wxString msg = m_textCtrlScale->GetValue();
msg.ToDouble( &m_workingImage->m_Scale );
m_textCtrlScale->SetValue( msg );
aItem->ImportData( m_workingImage );
}
This diff is collapsed.
......@@ -35,7 +35,9 @@
class DIALOG_IMAGE_EDITOR : public DIALOG_IMAGE_EDITOR_BASE
{
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:
DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem );
......@@ -51,12 +53,16 @@ public:
void TransfertToImage( BITMAP_BASE* aItem );
private:
void OnUndoLastChange( wxCommandEvent& event );
void OnGreyScaleConvert( wxCommandEvent& event );
void OnHalfSize( wxCommandEvent& event );
void OnMirrorX_click( wxCommandEvent& event );
void OnMirrorY_click( wxCommandEvent& event );
void OnRotateClick( wxCommandEvent& event );
void OnOK_Button( wxCommandEvent& aEvent );
void OnCancel_Button( wxCommandEvent& aEvent );
void OnRedrawPanel( wxPaintEvent& event );
bool CheckValues();
};
......
......@@ -31,13 +31,23 @@ DIALOG_IMAGE_EDITOR_BASE::DIALOG_IMAGE_EDITOR_BASE( wxWindow* parent, wxWindowID
bSizerRight = new wxBoxSizer( wxVERTICAL );
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 );
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 );
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->Wrap( -1 );
......@@ -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_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_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_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()
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_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_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
wxButton* m_buttonMirrorX;
wxButton* m_buttonMirrorY;
wxButton* m_buttonRotate;
wxButton* m_buttonGrey;
wxButton* m_buttonHalfSize;
wxButton* m_buttonUndoLast;
wxStaticText* m_staticTextScale;
wxTextCtrl* m_textCtrlScale;
wxStdDialogButtonSizer* m_sdbSizer1;
......@@ -49,13 +52,16 @@ class DIALOG_IMAGE_EDITOR_BASE : public wxDialog
virtual void OnMirrorX_click( wxCommandEvent& event ) { event.Skip(); }
virtual void OnMirrorY_click( 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 OnOK_Button( wxCommandEvent& event ) { event.Skip(); }
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();
};
......
......@@ -16,14 +16,14 @@ enum listbox {
};
BEGIN_EVENT_TABLE( WinEDAListBox, wxDialog )
EVT_BUTTON( wxID_OK, WinEDAListBox::OnOkClick )
EVT_BUTTON( wxID_CANCEL, WinEDAListBox::OnCancelClick )
EVT_LISTBOX( ID_LISTBOX_LIST, WinEDAListBox::ClickOnList )
EVT_LISTBOX_DCLICK( ID_LISTBOX_LIST, WinEDAListBox::D_ClickOnList )
EVT_CHAR( WinEDAListBox::OnKeyEvent )
EVT_CHAR_HOOK( WinEDAListBox::OnKeyEvent )
EVT_CLOSE( WinEDAListBox::OnClose )
BEGIN_EVENT_TABLE( EDA_LIST_DIALOG, wxDialog )
EVT_BUTTON( wxID_OK, EDA_LIST_DIALOG::OnOkClick )
EVT_BUTTON( wxID_CANCEL, EDA_LIST_DIALOG::OnCancelClick )
EVT_LISTBOX( ID_LISTBOX_LIST, EDA_LIST_DIALOG::ClickOnList )
EVT_LISTBOX_DCLICK( ID_LISTBOX_LIST, EDA_LIST_DIALOG::D_ClickOnList )
EVT_CHAR( EDA_LIST_DIALOG::OnKeyEvent )
EVT_CHAR_HOOK( EDA_LIST_DIALOG::OnKeyEvent )
EVT_CLOSE( EDA_LIST_DIALOG::OnClose )
END_EVENT_TABLE()
......@@ -37,9 +37,9 @@ END_EVENT_TABLE()
* @param aCallBackFunction callback function to display comments
* @param aPos = position of the dialog.
*/
WinEDAListBox::WinEDAListBox( EDA_DRAW_FRAME* aParent, const wxString& aTitle,
const wxArrayString& aItemList, const wxString& aRefText,
void(* aCallBackFunction)(wxString& Text), wxPoint aPos ) :
EDA_LIST_DIALOG::EDA_LIST_DIALOG( EDA_DRAW_FRAME* aParent, const wxString& aTitle,
const wxArrayString& aItemList, const wxString& aRefText,
void(* aCallBackFunction)(wxString& Text), wxPoint aPos ) :
wxDialog( aParent, wxID_ANY, aTitle, aPos, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | MAYBE_RESIZE_BORDER )
{
......@@ -61,8 +61,8 @@ WinEDAListBox::WinEDAListBox( EDA_DRAW_FRAME* aParent, const wxString& aTitle,
if( m_callBackFct )
{
m_messages = new wxTextCtrl( this, -1, wxEmptyString,
wxDefaultPosition, wxSize( -1, 60 ),
wxTE_READONLY | wxTE_MULTILINE );
wxDefaultPosition, wxSize( -1, 60 ),
wxTE_READONLY | wxTE_MULTILINE );
GeneralBoxSizer->Add( m_messages, 0, wxGROW | wxALL, 5 );
}
......@@ -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;
wxSize list_size = m_listBox->GetSize();
......@@ -96,32 +96,32 @@ void WinEDAListBox::MoveMouseToOrigin()
}
wxString WinEDAListBox::GetTextSelection()
wxString EDA_LIST_DIALOG::GetTextSelection()
{
wxString text = m_listBox->GetStringSelection();
return text;
}
void WinEDAListBox::Append( const wxString& item )
void EDA_LIST_DIALOG::Append( const wxString& 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 );
}
void WinEDAListBox::OnCancelClick( wxCommandEvent& event )
void EDA_LIST_DIALOG::OnCancelClick( wxCommandEvent& event )
{
EndModal( wxID_CANCEL );
}
void WinEDAListBox::ClickOnList( wxCommandEvent& event )
void EDA_LIST_DIALOG::ClickOnList( wxCommandEvent& event )
{
wxString text;
......@@ -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 );
}
void WinEDAListBox::OnOkClick( wxCommandEvent& event )
void EDA_LIST_DIALOG::OnOkClick( wxCommandEvent& event )
{
EndModal( wxID_OK );
}
void WinEDAListBox::OnClose( wxCloseEvent& event )
void EDA_LIST_DIALOG::OnClose( wxCloseEvent& event )
{
EndModal( wxID_CANCEL );
}
......@@ -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();
const wxString** BufList;
......@@ -170,6 +170,7 @@ void WinEDAListBox:: SortList()
return;
BufList = (const wxString**) MyZMalloc( 100 * NbItems * sizeof(wxString*) );
for( ii = 0; ii < NbItems; ii++ )
{
BufList[ii] = new wxString( m_listBox->GetString( ii ) );
......@@ -179,6 +180,7 @@ void WinEDAListBox:: SortList()
( int( * ) ( const void*, const void* ) )SortItems );
m_listBox->Clear();
for( ii = 0; ii < NbItems; ii++ )
{
m_listBox->Append( *BufList[ii] );
......@@ -189,7 +191,7 @@ void WinEDAListBox:: SortList()
}
void WinEDAListBox::OnKeyEvent( wxKeyEvent& event )
void EDA_LIST_DIALOG::OnKeyEvent( wxKeyEvent& event )
{
event.Skip();
}
......@@ -16,7 +16,7 @@
/* Read from Common config the Pdf browser choice
*/
void WinEDA_App::ReadPdfBrowserInfos()
void EDA_APP::ReadPdfBrowserInfos()
{
wxASSERT( m_EDA_CommonConfig != NULL );
......@@ -32,7 +32,7 @@ void WinEDA_App::ReadPdfBrowserInfos()
/* Write into Common config the Pdf browser choice
*/
void WinEDA_App::WritePdfBrowserInfos()
void EDA_APP::WritePdfBrowserInfos()
{
wxASSERT( m_EDA_CommonConfig != NULL );
......
......@@ -237,7 +237,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
};
WinEDA_App::WinEDA_App()
EDA_APP::EDA_APP()
{
m_Checker = NULL;
m_HtmlCtrl = NULL;
......@@ -251,7 +251,7 @@ WinEDA_App::WinEDA_App()
}
WinEDA_App::~WinEDA_App()
EDA_APP::~EDA_APP()
{
SaveSettings();
......@@ -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;
......@@ -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();
......@@ -376,7 +376,7 @@ void WinEDA_App::InitOnLineHelp()
}
bool WinEDA_App::SetBinDir()
bool EDA_APP::SetBinDir()
{
/* Apple MacOSx */
#ifdef __APPLE__
......@@ -460,7 +460,7 @@ bool WinEDA_App::SetBinDir()
}
void WinEDA_App::SetDefaultSearchPaths( void )
void EDA_APP::SetDefaultSearchPaths( void )
{
size_t i;
wxString path = m_BinDir;
......@@ -554,7 +554,7 @@ void WinEDA_App::SetDefaultSearchPaths( void )
/* Add schematic library file path to search path list.
* 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" ) );
......@@ -576,7 +576,7 @@ void WinEDA_App::SetDefaultSearchPaths( void )
}
/* 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" ) );
......@@ -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 );
......@@ -669,7 +669,7 @@ void WinEDA_App::GetSettings( bool aReopenLastUsedDirectory )
}
void WinEDA_App::SaveSettings()
void EDA_APP::SaveSettings()
{
wxASSERT( m_EDA_Config != NULL );
m_EDA_Config->Write( wxT( "ShowPageLimits" ), g_ShowPageLimits );
......@@ -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;
......@@ -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." ),
menu_id, LANGUAGE_DESCR_COUNT );
......@@ -773,7 +773,7 @@ void WinEDA_App::SetLanguageIdentifier( int menu_id )
}
void WinEDA_App::SetLanguagePath( void )
void EDA_APP::SetLanguagePath( void )
{
size_t i;
......@@ -811,7 +811,7 @@ void WinEDA_App::SetLanguagePath( void )
}
void WinEDA_App::AddMenuLanguageList( wxMenu* MasterMenu )
void EDA_APP::AddMenuLanguageList( wxMenu* MasterMenu )
{
wxMenu* menu = NULL;
wxMenuItem* item;
......@@ -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 )
{
size_t i, j;
......@@ -885,7 +885,7 @@ wxString WinEDA_App::FindFileInSearchPaths( const wxString& filename,
}
wxString WinEDA_App::GetHelpFile( void )
wxString EDA_APP::GetHelpFile( void )
{
wxString fn;
wxArrayString subdirs, altsubdirs;
......@@ -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;
......@@ -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() )
return m_LastVisitedLibPath;
......@@ -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;
}
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
* list, just add the library name to the list. Otherwise, add
......@@ -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 ) )
return 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" ) );
......@@ -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" ) );
......
......@@ -520,20 +520,20 @@ wxString ReturnKicadDatasPath()
if( PathFound )
{
data_path.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP );
if( data_path.Last() != '/' )
data_path += UNIX_STRING_DIR_SEP;
}
else
{
data_path.Empty();
}
return data_path;
}
/*
* Return the preferred editor name
*/
wxString& WinEDA_App::GetEditorName()
wxString& EDA_APP::GetEditorName()
{
wxString editorname = m_EditorName;
......
......@@ -339,8 +339,9 @@ void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame,
wxString keyname;
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++ )
{
List = aDescList->m_HK_InfoList;
......@@ -348,13 +349,17 @@ void DisplayHotkeyList( EDA_DRAW_FRAME* aFrame,
for( ; *List != NULL; List++ )
{
Ki_HotkeyInfo* hk_decr = *List;
msg += _( "key " );
keyname = ReturnKeyNameFromKeyCode( hk_decr->m_KeyCode );
msg += keyname + wxT( ": " ) + hk_decr->m_InfoMsg + wxT( "\n" );
if( !hk_decr->m_InfoMsg.Contains( wxT( "Macros" ) ) )
{
keyname = ReturnKeyNameFromKeyCode( hk_decr->m_KeyCode );
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 "dialog_load_error.h"
#include "html_messagebox.h"
#include "macros.h"
DIALOG_LOAD_ERROR::DIALOG_LOAD_ERROR( wxWindow* parent )
:
DIALOG_DISPLAY_HTML_TEXT_BASE( parent, wxID_ANY, _("Load Error!"),wxDefaultPosition, wxSize( 450,250 ) )
HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* parent, const wxString & aTitle,
wxPoint aPos, wxSize aSize)
: DIALOG_DISPLAY_HTML_TEXT_BASE( parent, wxID_ANY, aTitle, aPos, aSize )
{
SetFocus();
ListClear();
}
void DIALOG_LOAD_ERROR::OnCloseButtonClick( wxCommandEvent& event )
void HTML_MESSAGE_BOX::OnCloseButtonClick( wxCommandEvent& event )
{
EndModal(0);
}
void DIALOG_LOAD_ERROR::ListClear(void)
void HTML_MESSAGE_BOX::ListClear(void)
{
m_htmlWindow->SetPage(wxEmptyString);
}
......@@ -26,7 +26,7 @@ void DIALOG_LOAD_ERROR::ListClear(void)
* Add a list of items.
* @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 );
......@@ -48,7 +48,7 @@ void DIALOG_LOAD_ERROR::ListSet(const wxString &aList)
* Add a list of 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>");
for ( unsigned ii = 0; ii < aList.GetCount(); ii ++ )
......@@ -65,10 +65,20 @@ void DIALOG_LOAD_ERROR::ListSet(const wxArrayString &aList)
* Add a message (in bold) to message list.
* @param message = the message
*/
void DIALOG_LOAD_ERROR::MessageSet(const wxString &message)
void HTML_MESSAGE_BOX::MessageSet(const wxString &message)
{
wxString message_value;
message_value.Printf(wxT("<b>%s</b><br>"), GetChars( message ) );
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
int g_CurrentVersionPCB = 1;
int g_RotationAngle;
int g_TimeOut; // Timer for automatic saving
int g_SaveTime; // Time for next saving
......
This diff is collapsed.
This diff is collapsed.
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "wxstruct.h"
#include "common.h"
#include "cvpcb.h"
#include "cvpcb_mainframe.h"
......
......@@ -5,7 +5,6 @@
#include "fctsys.h"
#include "wxstruct.h"
#include "common.h"
#include "cvpcb.h"
#include "cvpcb_mainframe.h"
......
......@@ -17,7 +17,7 @@
#include "dialog_cvpcb_config.h"
#include "class_DisplayFootprintsFrame.h"
#include "cvpcb_id.h"
#include "dialog_load_error.h"
#include "html_messagebox.h"
#include "build_version.h"
......@@ -578,7 +578,7 @@ bool CVPCB_MAINFRAME::LoadFootprintFiles()
/* Display error messages, if any */
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() )
{
......
......@@ -5,13 +5,11 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "wxstruct.h"
#include "common.h"
#include "confirm.h"
#include "gestfich.h"
#include "cvpcb.h"
#include "zones.h"
#include "bitmaps.h"
#include "cvpcb_mainframe.h"
#include "colors_selection.h"
#include "cvpcb_id.h"
......@@ -39,7 +37,7 @@ const wxString titleLibLoadError( _( "Library Load Error" ) );
* MacOSX: Needed for file association
* http://wiki.wxwidgets.org/WxMac-specific_topics
*/
void WinEDA_App::MacOpenFile(const wxString &fileName)
void EDA_APP::MacOpenFile(const wxString &fileName)
{
wxFileName filename = fileName;
wxString oldPath;
......@@ -62,20 +60,20 @@ void WinEDA_App::MacOpenFile(const wxString &fileName)
}
// Create a new application object
IMPLEMENT_APP( WinEDA_App )
IMPLEMENT_APP( EDA_APP )
/************************************/
/* Called to initialize the program */
/************************************/
bool WinEDA_App::OnInit()
bool EDA_APP::OnInit()
{
wxFileName filename;
wxString message;
CVPCB_MAINFRAME* frame = NULL;
InitEDA_Appl( wxT( "CvPcb" ), APP_TYPE_CVPCB );
InitEDA_Appl( wxT( "CvPcb" ), APP_CVPCB_T );
if( m_Checker && m_Checker->IsAnotherRunning() )
{
......
......@@ -6,7 +6,6 @@
#include "wxstruct.h"
#include "confirm.h"
#include "gestfich.h"
#include "macros.h"
#include "cvpcb.h"
#include "cvpcb_mainframe.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "wxstruct.h"
#include "common.h"
#include "cvpcb.h"
#include "cvpcb_mainframe.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "wxstruct.h"
#include "common.h"
#include "confirm.h"
#include "kicad_string.h"
#include "gestfich.h"
......
......@@ -7,7 +7,6 @@
#include "fctsys.h"
#include "wxstruct.h"
#include "common.h"
#include "confirm.h"
#include "kicad_string.h"
#include "macros.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "wxstruct.h"
#include "common.h"
#include "confirm.h"
#include "kicad_string.h"
#include "gestfich.h"
......
......@@ -136,12 +136,12 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
* but they must exist because they appear in some classes.
* Do nothing in CvPcb.
*/
TRACK* Marque_Une_Piste( BOARD* aPcb,
TRACK* aStartSegm,
int* aSegmCount,
int* aTrackLen,
int* aLenDie,
bool aReorder )
TRACK* MarkTrace( BOARD* aPcb,
TRACK* aStartSegm,
int* aSegmCount,
int* aTrackLen,
int* aLenDie,
bool aReorder )
{
return NULL;
}
......@@ -6,7 +6,6 @@
#include <vector>
#include "fctsys.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "wxstruct.h"
......
......@@ -4,7 +4,6 @@
****************************************************************/
#include "fctsys.h"
#include "common.h"
#include "confirm.h"
#include "kicad_string.h"
#include "gestfich.h"
......
......@@ -5,7 +5,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "wxEeschemaStruct.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "block_commande.h"
......
......@@ -8,7 +8,6 @@
#include <vector>
#include "fctsys.h"
#include "common.h"
#include "class_sch_screen.h"
#include "kicad_string.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "wxEeschemaStruct.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "eeschema_id.h"
#include "confirm.h"
......
......@@ -3,7 +3,6 @@
/*************************/
#include "fctsys.h"
#include "common.h"
#include "macros.h"
#include "kicad_string.h"
#include "class_drawpanel.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "macros.h"
#include "kicad_string.h"
#include "confirm.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "common.h"
#include "macros.h"
#include "wxEeschemaStruct.h"
......
......@@ -33,10 +33,8 @@
#include <vector>
#include "fctsys.h"
#include "common.h"
#include "kicad_string.h"
#include "wxEeschemaStruct.h"
#include "wxstruct.h"
#include "netlist.h"
#include "class_sch_screen.h"
#include "sch_component.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "macros.h"
#include "eda_dde.h"
#include "wxEeschemaStruct.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "macros.h"
#include "confirm.h"
#include "eda_doc.h"
......@@ -50,9 +49,11 @@ wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufNa
if( nameList.IsEmpty() )
{
msg = _( "No components found matching " );
if( !BufName.IsEmpty() )
{
msg += _( "name search criteria <" ) + BufName + wxT( "> " );
if( !Keys.IsEmpty() )
msg += _( "and " );
}
......@@ -67,8 +68,8 @@ wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufNa
// Show candidate list:
wxString cmpname;
WinEDAListBox dlg( frame, _( "Select Component" ),
nameList, cmpname, DisplayCmpDoc );
EDA_LIST_DIALOG dlg( frame, _( "Select Component" ), nameList, cmpname, DisplayCmpDoc );
if( dlg.ShowModal() != wxID_OK )
return wxEmptyString;
......
......@@ -33,8 +33,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "bitmaps.h"
#include "common.h"
#include "wxEeschemaStruct.h"
#include "class_drawpanel.h"
......
......@@ -8,7 +8,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "gestfich.h"
......
......@@ -8,7 +8,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "confirm.h"
#include "gestfich.h"
#include "kicad_string.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "wxstruct.h"
#include "class_drawpanel.h"
......
......@@ -7,7 +7,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "class_sch_screen.h"
......@@ -633,9 +632,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel()
else
fieldValueTextCtrl->Enable( true );
textSizeTextCtrl->SetValue(
WinEDA_GraphicTextCtrl::FormatSize( EESCHEMA_INTERNAL_UNIT,
g_UserUnit, field.m_Size.x ) );
textSizeTextCtrl->SetValue( EDA_GRAPHIC_TEXT_CTRL::FormatSize( EESCHEMA_INTERNAL_UNIT,
g_UserUnit, field.m_Size.x ) );
wxPoint coord = field.m_Pos;
wxPoint zero = -m_Cmp->m_Pos; // relative zero
......@@ -714,8 +712,8 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField()
setRowItem( fieldNdx, field ); // update fieldListCtrl
field.m_Size.x = WinEDA_GraphicTextCtrl::ParseSize(
textSizeTextCtrl->GetValue(), EESCHEMA_INTERNAL_UNIT, g_UserUnit );
field.m_Size.x = EDA_GRAPHIC_TEXT_CTRL::ParseSize( textSizeTextCtrl->GetValue(),
EESCHEMA_INTERNAL_UNIT, g_UserUnit );
field.m_Size.y = field.m_Size.x;
int style = m_StyleRadioBox->GetSelection();
......
......@@ -10,7 +10,6 @@
#include "wx/valgen.h"
#include "wxEeschemaStruct.h"
#include "common.h"
#include "class_drawpanel.h"
#include "general.h"
#include "drawtxt.h"
......
......@@ -6,7 +6,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "confirm.h"
#include "class_drawpanel.h"
#include "wxEeschemaStruct.h"
......@@ -658,8 +657,8 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel()
fieldValueTextCtrl->SetValue( field.m_Text );
textSizeTextCtrl->SetValue(
WinEDA_GraphicTextCtrl::FormatSize( EESCHEMA_INTERNAL_UNIT, g_UserUnit, field.m_Size.x ) );
textSizeTextCtrl->SetValue( EDA_GRAPHIC_TEXT_CTRL::FormatSize( EESCHEMA_INTERNAL_UNIT,
g_UserUnit, field.m_Size.x ) );
wxPoint coord = field.m_Pos;
wxPoint zero;
......@@ -745,8 +744,8 @@ bool DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copyPanelToSelectedField()
setRowItem( fieldNdx, field ); // update fieldListCtrl
field.m_Size.x = WinEDA_GraphicTextCtrl::ParseSize(
textSizeTextCtrl->GetValue(), EESCHEMA_INTERNAL_UNIT, g_UserUnit );
field.m_Size.x = EDA_GRAPHIC_TEXT_CTRL::ParseSize( textSizeTextCtrl->GetValue(),
EESCHEMA_INTERNAL_UNIT, g_UserUnit );
field.m_Size.y = field.m_Size.x;
......
......@@ -9,7 +9,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "confirm.h"
#include "gestfich.h"
#include "wxEeschemaStruct.h"
......
......@@ -7,11 +7,9 @@
// License: GPL
/////////////////////////////////////////////////////////////////////////////
#include "fctsys.h"
#include "common.h"
#include "class_drawpanel.h"
#include "kicad_string.h"
#include "gestfich.h"
#include "bitmaps.h"
#include "appl_wxstruct.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
......
......@@ -3,7 +3,6 @@
* Handles the dialog so set current texts and pins sizes in LibEdit
*/
#include "fctsys.h"
#include "common.h"
#include "wxEeschemaStruct.h"
#include "general.h"
......
......@@ -27,7 +27,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "macros.h"
#include "plot_common.h"
#include "confirm.h"
......
......@@ -27,7 +27,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "confirm.h"
#include "plot_common.h"
#include "worksheet.h"
......
......@@ -27,7 +27,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "confirm.h"
#include "worksheet.h"
#include "plot_common.h"
......
......@@ -5,7 +5,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "class_sch_screen.h"
......
......@@ -31,7 +31,6 @@
#include "macros.h"
#include "class_drawpanel.h"
#include "trigo.h"
#include "common.h"
#include "richio.h"
#include "plot_common.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "class_sch_screen.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "base_struct.h"
#include "drawtxt.h"
#include "class_drawpanel.h"
......
......@@ -11,7 +11,7 @@
#include "general.h"
#include "class_library.h"
#include "dialog_load_error.h"
#include "html_messagebox.h"
/**
......@@ -94,7 +94,7 @@ void SCH_EDIT_FRAME::LoadLibraries( void )
/* Print the libraries not found */
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.ListSet( libraries_not_found );
libraries_not_found.empty();
......
......@@ -5,7 +5,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "appl_wxstruct.h"
#include "class_sch_screen.h"
......
......@@ -4,11 +4,9 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "gestfich.h"
#include "bitmaps.h"
#include "eda_dde.h"
#include "id.h"
#include "class_sch_screen.h"
......@@ -80,12 +78,12 @@ TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 );
// 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
// not wxApp)
IMPLEMENT_APP( WinEDA_App )
IMPLEMENT_APP( EDA_APP )
/* MacOSX: Needed for file association
* http://wiki.wxwidgets.org/WxMac-specific_topics
*/
void WinEDA_App::MacOpenFile( const wxString &fileName )
void EDA_APP::MacOpenFile( const wxString &fileName )
{
wxFileName filename = fileName;
SCH_EDIT_FRAME* frame = ((SCH_EDIT_FRAME*) GetTopWindow());
......@@ -100,12 +98,12 @@ void WinEDA_App::MacOpenFile( const wxString &fileName )
}
bool WinEDA_App::OnInit()
bool EDA_APP::OnInit()
{
wxFileName filename;
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() )
{
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "gestfich.h"
......@@ -211,7 +210,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
if( dlg.ShowModal() == wxID_CANCEL )
return;
g_UserUnit = (UserUnitType)dlg.GetUnitsSelection();
g_UserUnit = (EDA_UNITS_T)dlg.GetUnitsSelection();
GetScreen()->SetGrid( grid_list[ (size_t) dlg.GetGridSelection() ].m_Size );
......
......@@ -3,10 +3,8 @@
/**************************************/
#include "fctsys.h"
#include "common.h"
#include "class_drawpanel.h"
#include "kicad_string.h"
#include "bitmaps.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
......
......@@ -5,7 +5,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "general.h"
#include "kicad_device_context.h"
......
......@@ -3,7 +3,6 @@
/****************************/
#include "fctsys.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "gestfich.h"
......
......@@ -9,7 +9,6 @@
*/
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "kicad_string.h"
......
......@@ -5,7 +5,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "class_sch_screen.h"
......
......@@ -57,3 +57,4 @@
#define HELP_ADD_BODYCIRCLE _( "Add circles 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_PLACE_GRAPHICIMAGES _("Add a bitmap image")
......@@ -3,10 +3,8 @@
/******************/
#include "fctsys.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "bitmaps.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
......
......@@ -3,7 +3,6 @@
/***************/
#include "fctsys.h"
#include "common.h"
#include "eeschema_id.h"
#include "hotkeys.h"
#include "wxEeschemaStruct.h"
......@@ -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 + '-' );
#endif
static Ki_HotkeyInfo HkHelp( wxT( "Help: this message" ), HK_HELP, '?' );
static Ki_HotkeyInfo HkResetLocalCoord( wxT( "Reset local coord." ),
static Ki_HotkeyInfo HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
static Ki_HotkeyInfo HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
HK_RESET_LOCAL_COORD, ' ' );
/* Undo */
......@@ -104,11 +103,11 @@ static Ki_HotkeyInfo HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_SHIFT + GR_KB_CTRL +
// Schematic editor
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 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 HkBeginWire( wxT( "begin Wire" ), HK_BEGIN_WIRE, 'W' );
static Ki_HotkeyInfo HkBeginBus( wxT( "begin Bus" ), HK_BEGIN_BUS, 'B' );
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 HkAddJunction( wxT( "Add Junction" ), HK_ADD_JUNCTION, 'J' );
static Ki_HotkeyInfo HkBeginWire( wxT( "Draw Wire" ), HK_BEGIN_WIRE, 'W' );
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 HkAddPower( wxT( "Add Power" ), HK_ADD_NEW_POWER, 'P' );
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" ),
static Ki_HotkeyInfo HkDrag( wxT( "Drag Schematic Item" ), HK_DRAG, 'G',
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' );
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 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 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 );
// Special keys for library editor:
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 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
......@@ -977,7 +976,7 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
break;
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 );
break;
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "macros.h"
#include "class_drawpanel.h"
#include "plot_common.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "macros.h"
#include "class_drawpanel.h"
#include "plot_common.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "macros.h"
#include "class_drawpanel.h"
#include "plot_common.h"
......
......@@ -9,7 +9,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "gestfich.h"
......
......@@ -5,7 +5,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "gr_basic.h"
#include "common.h"
#include "macros.h"
#include "base_struct.h"
#include "drawtxt.h"
......
......@@ -11,7 +11,6 @@
#include "drawtxt.h"
#include "plot_common.h"
#include "wxEeschemaStruct.h"
#include "bitmaps.h"
#include "general.h"
#include "protos.h"
......
......@@ -4,7 +4,7 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "macros.h"
#include "class_drawpanel.h"
#include "plot_common.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "macros.h"
#include "class_drawpanel.h"
#include "plot_common.h"
......
......@@ -9,7 +9,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "macros.h"
#include "class_drawpanel.h"
#include "plot_common.h"
......
......@@ -3,7 +3,6 @@
/* Module for generation of component archive files. */
/*****************************************************/
#include "fctsys.h"
#include "common.h"
#include "confirm.h"
#include "class_sch_screen.h"
#include "wxstruct.h"
......
......@@ -4,7 +4,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "macros.h"
#include "appl_wxstruct.h"
#include "class_drawpanel.h"
......
......@@ -7,7 +7,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "eeschema_id.h"
......
......@@ -5,7 +5,6 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "appl_wxstruct.h"
#include "class_drawpanel.h"
#include "confirm.h"
......
......@@ -5,7 +5,6 @@
#include "fctsys.h"
#include "class_drawpanel.h"
#include "common.h"
#include "general.h"
#include "protos.h"
#include "libeditframe.h"
......
......@@ -4,13 +4,11 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "class_sch_screen.h"
#include "general.h"
//#include "protos.h"
#include "sch_component.h"
#include "libeditframe.h"
#include "class_library.h"
......
......@@ -196,8 +196,13 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
AddMenuItem( editMenu,
ID_BACKANNO_ITEMS,
_( "&Backannotate" ),
<<<<<<< TREE
_( "Back annotate the footprint fields" ),
KiBitmap( import_footprint_names_xpm ) );
=======
_( "Back Annotate Footprint Fields" ),
import_footprint_names_xpm );
>>>>>>> MERGE-SOURCE
// Menu View:
wxMenu* viewMenu = new wxMenu;
......@@ -258,7 +263,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
KiBitmap( add_component_xpm ) );
// 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
AddMenuItem( placeMenu, ID_PLACE_POWER_BUTT, text,
HELP_PLACE_POWERPORT,
......@@ -279,21 +284,21 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
KiBitmap( add_bus_xpm ) );
// 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
AddMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, text,
HELP_PLACE_WIRE2BUS_ENTRY,
KiBitmap( add_line2bus_xpm ) );
// 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
AddMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, text,
HELP_PLACE_BUS2BUS_ENTRY,
KiBitmap( add_bus2bus_xpm ) );
// No connect flag
text = AddHotkeyName( _( "No connect flag" ), s_Schematic_Hokeys_Descr,
// No Connect Flag
text = AddHotkeyName( _( "No Connect Flag" ), s_Schematic_Hokeys_Descr,
HK_ADD_NOCONN_FLAG, false ); // add comment, not a shortcut
AddMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, KiBitmap( noconn_xpm ) );
......@@ -305,7 +310,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
KiBitmap( add_line_label_xpm ) );
// 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
AddMenuItem( placeMenu, ID_GLABEL_BUTT, text,
HELP_PLACE_GLOBALLABEL,
......@@ -322,9 +327,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
placeMenu->AppendSeparator();
// 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
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
AddMenuItem( placeMenu, ID_HIERLABEL_BUTT,
text, HELP_PLACE_HIER_LABEL,
......@@ -332,7 +337,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// 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
AddMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, text,
HELP_PLACE_SHEET,
......@@ -348,7 +353,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// Add hierarchical Pin to Sheet
AddMenuItem( placeMenu,
ID_SHEET_PIN_BUTT,
_( "Add Hierarchical Pin to Sheet" ),
_( "Hierarchical Pin to Sheet" ),
HELP_PLACE_SHEETPIN,
KiBitmap( add_hierar_pin_xpm ) );
......@@ -356,19 +361,23 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
placeMenu->AppendSeparator();
// 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
AddMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, text,
HELP_PLACE_GRAPHICLINES,
KiBitmap( add_dashed_line_xpm ) );
// 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
AddMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, text,
HELP_PLACE_GRAPHICTEXTS,
KiBitmap( add_text_xpm ) );
// Graphic image
AddMenuItem( placeMenu, ID_ADD_IMAGE_BUTT, _("Image"),
HELP_PLACE_GRAPHICIMAGES,
image_xpm );
// Menu Preferences:
wxMenu* preferencesMenu = new wxMenu;
......@@ -412,14 +421,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// Save preferences
AddMenuItem( preferencesMenu,
ID_CONFIG_SAVE,
_( "&Save preferences" ),
_( "&Save Preferences" ),
_( "Save application preferences" ),
KiBitmap( save_setup_xpm ) );
// Read preferences
AddMenuItem( preferencesMenu,
ID_CONFIG_READ,
_( "&Read preferences" ),
_( "&Read Preferences" ),
_( "Read application preferences" ),
KiBitmap( read_setup_xpm ) );
......@@ -478,14 +487,14 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
//Run CVPcb
AddMenuItem( toolsMenu,
ID_TO_CVPCB,
_( "A&ssign component footprints" ),
_( "A&ssign Component Footprints" ),
_( "Run CVPcb" ),
KiBitmap( cvpcb_xpm ) );
// Run PCBNew
AddMenuItem( toolsMenu,
ID_TO_PCB,
_( "&Layout printed circuit board" ),
_( "&Layout Printed Circuit Board" ),
_( "Run PCBNew" ),
KiBitmap( pcbnew_xpm ) );
......
......@@ -31,7 +31,6 @@
#include "fctsys.h"
#include "common.h"
#include "confirm.h"
#include "kicad_string.h"
#include "gestfich.h"
......
......@@ -3,7 +3,6 @@
/*****************/
#include "fctsys.h"
#include "common.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
......
......@@ -14,7 +14,6 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "confirm.h"
#include "gestfich.h"
#include "wxEeschemaStruct.h"
......@@ -255,16 +254,23 @@ void NETLIST_DIALOG::InstallPageSpice()
wxDefaultPosition, wxDefaultSize,
2, netlist_opt, 1,
wxRA_SPECIFY_COLS );
if( !g_OptNetListUseNames )
m_UseNetNamesInNetlist->SetSelection( 1 );
page->m_LeftBoxSizer->Add( m_UseNetNamesInNetlist, 0, wxGROW | wxALL, 5 );
page->m_CommandStringCtrl = new WinEDA_EnterText( page,
_( "Simulator command:" ),
m_Parent->GetSimulatorCommand(),
page->m_LowBoxSizer,
wxDefaultSize );
page->m_LowBoxSizer->Add( new wxStaticText( page, -1, _( "Simulator command:" ) ), 0,
wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, 5 );
page->m_CommandStringCtrl = new wxTextCtrl( page, -1, m_Parent->GetSimulatorCommand(),
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
Button = new wxButton( page, ID_CREATE_NETLIST, _( "Netlist" ) );
......@@ -302,6 +308,7 @@ void NETLIST_DIALOG::InstallCustomPages()
/* Install the panel "Add Plugin" after
* the last initialized panel */
previoustitle = title;
if( title.IsEmpty() )
CurrPage =
......@@ -325,17 +332,32 @@ void NETLIST_DIALOG::InstallCustomPages()
msg = CUSTOM_NETLIST_COMMAND;
msg << ii + 1;
wxString Command = wxGetApp().m_EDA_Config->Read( msg );
CurrPage->m_CommandStringCtrl =
new WinEDA_EnterText( CurrPage,
_( "Netlist command:" ), Command,
CurrPage->m_LowBoxSizer,
wxDefaultSize );
CurrPage->m_TitleStringCtrl =
new WinEDA_EnterText( CurrPage,
_( "Title:" ), title,
CurrPage->m_LowBoxSizer,
wxDefaultSize );
CurrPage->m_LowBoxSizer->Add( new wxStaticText( CurrPage,
-1, _( "Netlist command:" ) ), 0,
wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, 5 );
CurrPage->m_CommandStringCtrl = new wxTextCtrl( CurrPage, -1, Command,
wxDefaultPosition, wxDefaultSize );
CurrPage->m_CommandStringCtrl->SetInsertionPoint( 1 );
CurrPage->m_LowBoxSizer->Add( CurrPage->m_CommandStringCtrl,
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 )
/* Get a title for this page */
wxString title = CurrPage->m_TitleStringCtrl->GetValue();
if( title.IsEmpty() )
DisplayInfoMessage( this,
_( "Do not forget to choose a title for this netlist control page" ) );
......
......@@ -48,8 +48,8 @@ public:
int m_IdNetType;
wxCheckBox* m_IsCurrentFormat;
wxCheckBox* m_AddSubPrefix;
WinEDA_EnterText* m_CommandStringCtrl;
WinEDA_EnterText* m_TitleStringCtrl;
wxTextCtrl* m_CommandStringCtrl;
wxTextCtrl* m_TitleStringCtrl;
wxButton* m_ButtonCancel;
wxBoxSizer* m_LeftBoxSizer;
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