better hotkey.cpp (code cleaning and info messages)
This commit is contained in:
parent
2ac1fe57c5
commit
f7d85ecae6
|
@ -13,10 +13,11 @@ email address.
|
|||
though I'm not perfectly happy with the implementation -- wxwidgets puts
|
||||
the control-characters in alphabetical order!
|
||||
|
||||
2007-June-21 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
||||
2007-June-25 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
||||
================================================================================
|
||||
+ pcbnew
|
||||
minor enhancement in Edit footprint dialog (some help tool tips).
|
||||
minor enhancement in Edit footprint dialog (more help tool tips).
|
||||
better hotkey.cpp (code cleaning and info messages)
|
||||
|
||||
|
||||
|
||||
|
|
13953
demos/video/video.ps
13953
demos/video/video.ps
File diff suppressed because it is too large
Load Diff
|
@ -27,7 +27,7 @@ int ii;
|
|||
wxMenuBar * menuBar = GetMenuBar();
|
||||
|
||||
if( menuBar == NULL )
|
||||
{
|
||||
{
|
||||
menuBar = new wxMenuBar();
|
||||
|
||||
m_FilesMenu = new wxMenu;
|
||||
|
@ -48,7 +48,7 @@ wxMenuBar * menuBar = GetMenuBar();
|
|||
|
||||
m_FilesMenu->Append(ID_GERBVIEW_LOAD_DCODE_FILE,
|
||||
_("Load DCodes"),
|
||||
_("Load DCodes File"),
|
||||
_("Load D-Codes File"),
|
||||
FALSE);
|
||||
#if 0
|
||||
m_FilesMenu->Append(ID_GERBVIEW_LOAD_DRILL_FILE,
|
||||
|
@ -100,15 +100,15 @@ wxMenuBar * menuBar = GetMenuBar();
|
|||
|
||||
// Configuration:
|
||||
wxMenu * configmenu = new wxMenu;
|
||||
configmenu->Append(ID_CONFIG_REQ, _("&Files and Dir"),
|
||||
_("Setting Files extension, Directories and others..."));
|
||||
configmenu->Append(ID_COLORS_SETUP, _("&Colors"),
|
||||
_("Select Colors and Display for layers"));
|
||||
configmenu->Append(ID_OPTIONS_SETUP, _("&Options"),
|
||||
_(" Select general options"));
|
||||
ADD_MENUITEM_WITH_HELP(configmenu, ID_CONFIG_REQ, _("&File ext"),
|
||||
_("Setting Files extension"), config_xpm );
|
||||
ADD_MENUITEM_WITH_HELP(configmenu, ID_COLORS_SETUP, _("&Colors"),
|
||||
_("Select Colors and Display for layers"), palette_xpm);
|
||||
ADD_MENUITEM_WITH_HELP(configmenu, ID_OPTIONS_SETUP, _("&Options"),
|
||||
_(" Select general options"), preference_xpm);
|
||||
|
||||
configmenu->Append(ID_PCB_LOOK_SETUP, _("Display"),
|
||||
_(" Select how items are displayed"));
|
||||
ADD_MENUITEM_WITH_HELP(configmenu, ID_PCB_LOOK_SETUP, _("Display"),
|
||||
_(" Select how items are displayed"), display_options_xpm);
|
||||
|
||||
// Font selection and setup
|
||||
AddFontSelectionMenu(configmenu);
|
||||
|
@ -116,8 +116,8 @@ wxMenuBar * menuBar = GetMenuBar();
|
|||
m_Parent->SetLanguageList(configmenu);
|
||||
|
||||
configmenu->AppendSeparator();
|
||||
configmenu->Append(ID_CONFIG_SAVE, _("&Save Setup"),
|
||||
_("Save application preferences"));
|
||||
ADD_MENUITEM_WITH_HELP(configmenu, ID_CONFIG_SAVE, _("&Save Gerbview Setup"),
|
||||
_("Save application preferences"), save_setup_xpm);
|
||||
|
||||
// Menu drill ( generation fichiers percage)
|
||||
/* wxMenu *drill_menu = new wxMenu;
|
||||
|
@ -126,18 +126,20 @@ wxMenuBar * menuBar = GetMenuBar();
|
|||
*/
|
||||
// Menu d'outils divers
|
||||
wxMenu *miscellaneous_menu = new wxMenu;
|
||||
miscellaneous_menu->Append(ID_GERBVIEW_SHOW_LIST_DCODES, _("&List DCodes"),
|
||||
_("List and Edit DCodes") );
|
||||
miscellaneous_menu->Append(ID_GERBVIEW_SHOW_SOURCE,_("&Show source"),
|
||||
_("Show source file for the current layer") );
|
||||
ADD_MENUITEM_WITH_HELP(miscellaneous_menu, ID_GERBVIEW_SHOW_LIST_DCODES, _("&List DCodes"),
|
||||
_("List and Edit DCodes"), show_dcodenumber_xpm );
|
||||
ADD_MENUITEM_WITH_HELP(miscellaneous_menu, ID_GERBVIEW_SHOW_SOURCE,_("&Show source"),
|
||||
_("Show source file for the current layer"), tools_xpm );
|
||||
miscellaneous_menu->AppendSeparator();
|
||||
miscellaneous_menu->Append(ID_PCB_GLOBAL_DELETE, _("&Delete Layer"),
|
||||
_("Delete current layer") );
|
||||
ADD_MENUITEM_WITH_HELP(miscellaneous_menu, ID_PCB_GLOBAL_DELETE, _("&Delete Layer"),
|
||||
_("Delete current layer"), general_deletions_xpm );
|
||||
|
||||
// Menu Help:
|
||||
wxMenu *helpMenu = new wxMenu;
|
||||
helpMenu->Append(ID_GENERAL_HELP, _("&Contents"), _("Open the gerbview manual") );
|
||||
helpMenu->Append(ID_KICAD_ABOUT, _("&About"), _("About this application") );
|
||||
ADD_MENUITEM_WITH_HELP(helpMenu, ID_GENERAL_HELP, _("&Contents"),
|
||||
_("Open the gerbview manual"), help_xpm );
|
||||
ADD_MENUITEM_WITH_HELP(helpMenu, ID_KICAD_ABOUT, _("&About"),
|
||||
_("About this application"), info_xpm );
|
||||
|
||||
menuBar->Append(m_FilesMenu, _("&File"));
|
||||
menuBar->Append(configmenu, _("&Preferences"));
|
||||
|
@ -147,7 +149,7 @@ wxMenuBar * menuBar = GetMenuBar();
|
|||
|
||||
// Associate the menu bar with the frame
|
||||
SetMenuBar(menuBar);
|
||||
}
|
||||
}
|
||||
|
||||
else // simple mise a jour de la liste des fichiers anciens
|
||||
{
|
||||
|
@ -255,32 +257,32 @@ int ii;
|
|||
wxNullBitmap,
|
||||
FALSE,
|
||||
-1, -1, (wxObject *) NULL,
|
||||
_("Zoom + (F1)"));
|
||||
_("zoom + (F1)"));
|
||||
|
||||
m_HToolBar->AddTool(ID_ZOOM_MOINS_BUTT, BITMAP(zoom_out_xpm),
|
||||
wxNullBitmap,
|
||||
FALSE,
|
||||
-1, -1, (wxObject *) NULL,
|
||||
_("Zoom - (F2)"));
|
||||
_("zoom - (F2)"));
|
||||
|
||||
m_HToolBar->AddTool(ID_ZOOM_REDRAW_BUTT, BITMAP(repaint_xpm),
|
||||
wxNullBitmap,
|
||||
FALSE,
|
||||
-1, -1, (wxObject *) NULL,
|
||||
_("Redraw (F3)"));
|
||||
_("redraw (F3)"));
|
||||
|
||||
m_HToolBar->AddTool(ID_ZOOM_PAGE_BUTT, BITMAP(zoom_optimal_xpm),
|
||||
wxNullBitmap,
|
||||
FALSE,
|
||||
-1, -1, (wxObject *) NULL,
|
||||
_("Auto zoom"));
|
||||
_("auto zoom"));
|
||||
|
||||
m_HToolBar->AddSeparator();
|
||||
m_HToolBar->AddTool(ID_FIND_ITEMS, BITMAP(find_xpm),
|
||||
wxNullBitmap,
|
||||
FALSE,
|
||||
-1, -1, (wxObject *) NULL,
|
||||
_("Find DCodes"));
|
||||
_("Find D Codes"));
|
||||
|
||||
wxArrayString choices;
|
||||
m_HToolBar->AddSeparator();
|
||||
|
@ -426,7 +428,7 @@ void WinEDA_GerberFrame::ReCreateOptToolbar(void)
|
|||
wxNullBitmap,
|
||||
TRUE,
|
||||
-1, -1, (wxObject *) NULL,
|
||||
_("Show DCode number"));
|
||||
_("Show dcode number"));
|
||||
|
||||
m_OptionsToolBar->Realize();
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
COMMON_GLOBL wxString g_BuildVersion
|
||||
#ifdef EDA_BASE
|
||||
(wxT("(2007-06-21)"))
|
||||
(wxT("(2007-06-25)"))
|
||||
#endif
|
||||
;
|
||||
|
||||
|
|
|
@ -51,6 +51,11 @@
|
|||
l_item = new wxMenuItem(menu, id, text);\
|
||||
l_item->SetBitmap(icon); menu->Append(l_item);}
|
||||
|
||||
#define ADD_MENUITEM_WITH_HELP(menu, id, text, help, icon) {\
|
||||
wxMenuItem * l_item;\
|
||||
l_item = new wxMenuItem(menu, id, text, help);\
|
||||
l_item->SetBitmap(icon); menu->Append(l_item);}
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#define ADD_MENUITEM_WITH_SUBMENU(menu, submenu, id, text, icon) {\
|
||||
wxMenuItem * l_item;\
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -85,24 +85,6 @@ WinEDA_PrjFrame::WinEDA_PrjFrame(WinEDA_MainFrame * parent,
|
|||
item->SetBitmap( directory_xpm );
|
||||
menu->Append( item );
|
||||
|
||||
#if 0
|
||||
item = new wxMenuItem(menu, ID_PROJECT_NEWSCH, _("New &Schematic"), _("Create a New Schematic File") );
|
||||
item->SetBitmap( new_sch_xpm );
|
||||
menu->Append( item );
|
||||
|
||||
item = new wxMenuItem(menu, ID_PROJECT_NEWBRD, _("New &PCB"), _("Create a New PCB File") );
|
||||
item->SetBitmap( new_pcb_xpm );
|
||||
menu->Append( item );
|
||||
|
||||
item = new wxMenuItem(menu, ID_PROJECT_NEWGERBER, _("New &Gerber File"), _("Create a New Gerber File") );
|
||||
item->SetBitmap( new_gerb_xpm );
|
||||
menu->Append( item );
|
||||
|
||||
item = new wxMenuItem(menu, ID_PROJECT_NEWNET, _("New &Netlist"), _("Create a New Netlist") );
|
||||
item->SetBitmap( new_cvpcb_xpm );
|
||||
menu->Append( item );
|
||||
#endif
|
||||
|
||||
#ifdef KICAD_PYTHON
|
||||
item = new wxMenuItem(menu, ID_PROJECT_NEWPY, _("New P&ython Script"), _("Create a New Python Script") );
|
||||
item->SetBitmap( new_python_xpm );
|
||||
|
|
2
news.txt
2
news.txt
|
@ -1,5 +1,5 @@
|
|||
**************************************************************
|
||||
Update 25 may 2007
|
||||
Update 25 jun 2007
|
||||
pcbnew:
|
||||
bug fix (problem in postscript generation due to the internationalization
|
||||
of floating point number notation )
|
||||
|
|
|
@ -133,7 +133,7 @@ void WinEDA_CleaningOptionsFrame::Init()
|
|||
void WinEDA_CleaningOptionsFrame::CreateControls()
|
||||
{
|
||||
////@begin WinEDA_CleaningOptionsFrame content construction
|
||||
// Generated by DialogBlocks, 28/05/2007 19:08:46 (unregistered)
|
||||
// Generated by DialogBlocks, 21/06/2007 19:58:26 (unregistered)
|
||||
|
||||
WinEDA_CleaningOptionsFrame* itemDialog1 = this;
|
||||
|
||||
|
@ -159,16 +159,18 @@ void WinEDA_CleaningOptionsFrame::CreateControls()
|
|||
m_DeleteunconnectedOpt->SetValue(false);
|
||||
itemStaticBoxSizer4->Add(m_DeleteunconnectedOpt, 0, wxALIGN_LEFT|wxALL, 5);
|
||||
|
||||
m_ConnectToPadsOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Connect stubs to Pads"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_ConnectToPadsOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Connect to Pads"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_ConnectToPadsOpt->SetValue(false);
|
||||
itemStaticBoxSizer4->Add(m_ConnectToPadsOpt, 0, wxALIGN_LEFT|wxALL, 5);
|
||||
|
||||
wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxVERTICAL);
|
||||
itemBoxSizer3->Add(itemBoxSizer9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
itemStaticBoxSizer4->Add(5, 5, 0, wxGROW|wxALL, 5);
|
||||
|
||||
wxButton* itemButton10 = new wxButton( itemDialog1, ID_BUTTON_EXECUTE, _("Clean pcb"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
itemButton10->SetDefault();
|
||||
itemBoxSizer9->Add(itemButton10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||
wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxVERTICAL);
|
||||
itemBoxSizer3->Add(itemBoxSizer10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
|
||||
wxButton* itemButton11 = new wxButton( itemDialog1, ID_BUTTON_EXECUTE, _("Clean pcb"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
itemButton11->SetDefault();
|
||||
itemBoxSizer10->Add(itemButton11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||
|
||||
// Set validators
|
||||
m_CleanViasOpt->SetValidator( wxGenericValidator(& s_CleanVias) );
|
||||
|
|
|
@ -34,14 +34,11 @@ BEGIN_EVENT_TABLE(Panel3D_Ctrl, wxPanel)
|
|||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
#define H_SIZE 430
|
||||
#define V_SIZE 530
|
||||
/**************************************************************************************/
|
||||
WinEDA_ModulePropertiesFrame::WinEDA_ModulePropertiesFrame(WinEDA_BasePcbFrame *parent,
|
||||
MODULE * Module,wxDC * DC,
|
||||
const wxPoint & framepos):
|
||||
wxDialog(parent, -1, _("Module properties"), framepos,
|
||||
wxSize(H_SIZE, V_SIZE), DIALOG_STYLE)
|
||||
wxDialog(parent, -1, _("Module properties"), framepos, wxDefaultSize, DIALOG_STYLE)
|
||||
/**************************************************************************************/
|
||||
{
|
||||
wxString number;
|
||||
|
@ -77,20 +74,15 @@ void WinEDA_ModulePropertiesFrame::CreateControls(void)
|
|||
{
|
||||
wxPoint pos;
|
||||
wxButton * Button;
|
||||
wxSize usize;
|
||||
bool FullOptions = FALSE;
|
||||
|
||||
if ( m_Parent->m_Ident == PCB_FRAME ) FullOptions = TRUE;
|
||||
|
||||
usize = GetClientSize();
|
||||
|
||||
m_GeneralBoxSizer = new wxBoxSizer(wxVERTICAL);
|
||||
SetSizer(m_GeneralBoxSizer);
|
||||
|
||||
m_NoteBook = new wxNotebook(this, ID_NOTEBOOK,
|
||||
wxDefaultPosition,wxSize(usize.x,usize.y - 34) );
|
||||
m_NoteBook = new wxNotebook(this, ID_NOTEBOOK);
|
||||
m_NoteBook->SetFont(*g_DialogFont);
|
||||
|
||||
m_GeneralBoxSizer->Add(m_NoteBook, 0, wxGROW|wxALL, 5);
|
||||
|
||||
// Add panels
|
||||
|
|
151
pcbnew/essai.cpp
151
pcbnew/essai.cpp
|
@ -1,151 +0,0 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: essai.cpp
|
||||
// Purpose:
|
||||
// Author: jean-pierre Charras
|
||||
// Modified by:
|
||||
// Created: 28/02/2006 07:46:42
|
||||
// RCS-ID:
|
||||
// Copyright: License GNU
|
||||
// Licence:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Generated by DialogBlocks (unregistered), 28/02/2006 07:46:42
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma implementation "essai.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
////@begin includes
|
||||
////@end includes
|
||||
|
||||
#include "essai.h"
|
||||
|
||||
////@begin XPM images
|
||||
////@end XPM images
|
||||
|
||||
/*!
|
||||
* essai type definition
|
||||
*/
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS( essai, wxDialog )
|
||||
|
||||
/*!
|
||||
* essai event table definition
|
||||
*/
|
||||
|
||||
BEGIN_EVENT_TABLE( essai, wxDialog )
|
||||
|
||||
////@begin essai event table entries
|
||||
////@end essai event table entries
|
||||
|
||||
END_EVENT_TABLE()
|
||||
|
||||
/*!
|
||||
* essai constructors
|
||||
*/
|
||||
|
||||
essai::essai( )
|
||||
{
|
||||
}
|
||||
|
||||
essai::essai( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
||||
{
|
||||
Create(parent, id, caption, pos, size, style);
|
||||
}
|
||||
|
||||
/*!
|
||||
* essai creator
|
||||
*/
|
||||
|
||||
bool essai::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
||||
{
|
||||
////@begin essai member initialisation
|
||||
GridSizer = NULL;
|
||||
////@end essai member initialisation
|
||||
|
||||
////@begin essai creation
|
||||
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
|
||||
wxDialog::Create( parent, id, caption, pos, size, style );
|
||||
|
||||
CreateControls();
|
||||
GetSizer()->Fit(this);
|
||||
GetSizer()->SetSizeHints(this);
|
||||
Centre();
|
||||
////@end essai creation
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Control creation for essai
|
||||
*/
|
||||
|
||||
void essai::CreateControls()
|
||||
{
|
||||
////@begin essai content construction
|
||||
// Generated by DialogBlocks, 28/02/2006 07:48:35 (unregistered)
|
||||
|
||||
essai* itemDialog1 = this;
|
||||
|
||||
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
|
||||
itemDialog1->SetSizer(itemBoxSizer2);
|
||||
|
||||
wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC, _("Static text"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
itemBoxSizer2->Add(itemStaticText3, 0, wxGROW|wxALL|wxADJUST_MINSIZE, 5);
|
||||
|
||||
GridSizer = new wxFlexGridSizer(3, 2, 0, 0);
|
||||
itemBoxSizer2->Add(GridSizer, 0, wxGROW|wxALL, 5);
|
||||
|
||||
wxStaticText* itemStaticText5 = new wxStaticText( itemDialog1, wxID_STATIC, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
GridSizer->Add(itemStaticText5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
|
||||
|
||||
wxTextCtrl* itemTextCtrl6 = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
GridSizer->Add(itemTextCtrl6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
|
||||
|
||||
////@end essai content construction
|
||||
}
|
||||
|
||||
/*!
|
||||
* Should we show tooltips?
|
||||
*/
|
||||
|
||||
bool essai::ShowToolTips()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get bitmap resources
|
||||
*/
|
||||
|
||||
wxBitmap essai::GetBitmapResource( const wxString& name )
|
||||
{
|
||||
// Bitmap retrieval
|
||||
////@begin essai bitmap retrieval
|
||||
wxUnusedVar(name);
|
||||
return wxNullBitmap;
|
||||
////@end essai bitmap retrieval
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get icon resources
|
||||
*/
|
||||
|
||||
wxIcon essai::GetIconResource( const wxString& name )
|
||||
{
|
||||
// Icon retrieval
|
||||
////@begin essai icon retrieval
|
||||
wxUnusedVar(name);
|
||||
return wxNullIcon;
|
||||
////@end essai icon retrieval
|
||||
}
|
100
pcbnew/essai.h
100
pcbnew/essai.h
|
@ -1,100 +0,0 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: essai.h
|
||||
// Purpose:
|
||||
// Author: jean-pierre Charras
|
||||
// Modified by:
|
||||
// Created: 28/02/2006 07:46:42
|
||||
// RCS-ID:
|
||||
// Copyright: License GNU
|
||||
// Licence:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Generated by DialogBlocks (unregistered), 28/02/2006 07:46:42
|
||||
|
||||
#ifndef _ESSAI_H_
|
||||
#define _ESSAI_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "essai.h"
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* Includes
|
||||
*/
|
||||
|
||||
////@begin includes
|
||||
////@end includes
|
||||
|
||||
/*!
|
||||
* Forward declarations
|
||||
*/
|
||||
|
||||
////@begin forward declarations
|
||||
class wxFlexGridSizer;
|
||||
////@end forward declarations
|
||||
|
||||
/*!
|
||||
* Control identifiers
|
||||
*/
|
||||
|
||||
////@begin control identifiers
|
||||
#define ID_DIALOG 10000
|
||||
#define SYMBOL_ESSAI_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
|
||||
#define SYMBOL_ESSAI_TITLE _("essai")
|
||||
#define SYMBOL_ESSAI_IDNAME ID_DIALOG
|
||||
#define SYMBOL_ESSAI_SIZE wxSize(400, 300)
|
||||
#define SYMBOL_ESSAI_POSITION wxDefaultPosition
|
||||
#define ID_TEXTCTRL 10001
|
||||
////@end control identifiers
|
||||
|
||||
/*!
|
||||
* Compatibility
|
||||
*/
|
||||
|
||||
#ifndef wxCLOSE_BOX
|
||||
#define wxCLOSE_BOX 0x1000
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* essai class declaration
|
||||
*/
|
||||
|
||||
class essai: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( essai )
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
public:
|
||||
/// Constructors
|
||||
essai( );
|
||||
essai( wxWindow* parent, wxWindowID id = SYMBOL_ESSAI_IDNAME, const wxString& caption = SYMBOL_ESSAI_TITLE, const wxPoint& pos = SYMBOL_ESSAI_POSITION, const wxSize& size = SYMBOL_ESSAI_SIZE, long style = SYMBOL_ESSAI_STYLE );
|
||||
|
||||
/// Creation
|
||||
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_ESSAI_IDNAME, const wxString& caption = SYMBOL_ESSAI_TITLE, const wxPoint& pos = SYMBOL_ESSAI_POSITION, const wxSize& size = SYMBOL_ESSAI_SIZE, long style = SYMBOL_ESSAI_STYLE );
|
||||
|
||||
/// Creates the controls and sizers
|
||||
void CreateControls();
|
||||
|
||||
////@begin essai event handler declarations
|
||||
|
||||
////@end essai event handler declarations
|
||||
|
||||
////@begin essai member function declarations
|
||||
|
||||
/// Retrieves bitmap resources
|
||||
wxBitmap GetBitmapResource( const wxString& name );
|
||||
|
||||
/// Retrieves icon resources
|
||||
wxIcon GetIconResource( const wxString& name );
|
||||
////@end essai member function declarations
|
||||
|
||||
/// Should we show tooltips?
|
||||
static bool ShowToolTips();
|
||||
|
||||
////@begin essai member variables
|
||||
wxFlexGridSizer* GridSizer;
|
||||
////@end essai member variables
|
||||
};
|
||||
|
||||
#endif
|
||||
// _ESSAI_H_
|
|
@ -1 +0,0 @@
|
|||
#include "wx/msw/wx.rc"
|
|
@ -40,163 +40,129 @@ sous le courseur souris
|
|||
|
||||
MODULE* module = NULL;
|
||||
|
||||
hotkey = toupper(hotkey);
|
||||
switch (hotkey)
|
||||
{
|
||||
case WXK_DELETE:
|
||||
case WXK_NUMPAD_DELETE:
|
||||
OnHotkeyDeleteItem(DC, DrawStruct);
|
||||
break;
|
||||
case WXK_DELETE:
|
||||
case WXK_NUMPAD_DELETE:
|
||||
OnHotkeyDeleteItem(DC, DrawStruct);
|
||||
break;
|
||||
|
||||
case WXK_BACK:
|
||||
{
|
||||
if( m_ID_current_state == ID_TRACK_BUTT &&
|
||||
GetScreen()->m_Active_Layer <= CMP_N )
|
||||
{
|
||||
bool ItemFree = (GetScreen()->m_CurrentItem == NULL ) ||
|
||||
(GetScreen()->m_CurrentItem->m_Flags == 0);
|
||||
if ( ItemFree )
|
||||
{
|
||||
//no track is currently being edited - select a segment and remove it.
|
||||
DrawStruct = PcbGeneralLocateAndDisplay();
|
||||
//don't let backspace delete modules!!
|
||||
if ( DrawStruct && (DrawStruct->m_StructType == TYPETRACK
|
||||
|| DrawStruct->m_StructType == TYPEVIA))
|
||||
Delete_Segment(DC, (TRACK*)DrawStruct);
|
||||
GetScreen()->SetModify();
|
||||
}
|
||||
else if ( GetScreen()->m_CurrentItem->m_StructType == TYPETRACK )
|
||||
{
|
||||
//then an element is being edited - remove the last segment.
|
||||
GetScreen()->m_CurrentItem =
|
||||
Delete_Segment(DC, (TRACK*)GetScreen()->m_CurrentItem);
|
||||
GetScreen()->SetModify();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WXK_END:
|
||||
DrawPanel->MouseToCursorSchema();
|
||||
End_Route( (TRACK *) (GetScreen()->m_CurrentItem), DC);
|
||||
break;
|
||||
case WXK_BACK:
|
||||
{
|
||||
if( m_ID_current_state == ID_TRACK_BUTT &&
|
||||
GetScreen()->m_Active_Layer <= CMP_N )
|
||||
{
|
||||
bool ItemFree = (GetScreen()->m_CurrentItem == NULL ) ||
|
||||
(GetScreen()->m_CurrentItem->m_Flags == 0);
|
||||
if ( ItemFree )
|
||||
{
|
||||
//no track is currently being edited - select a segment and remove it.
|
||||
DrawStruct = PcbGeneralLocateAndDisplay();
|
||||
//don't let backspace delete modules!!
|
||||
if ( DrawStruct && (DrawStruct->m_StructType == TYPETRACK
|
||||
|| DrawStruct->m_StructType == TYPEVIA))
|
||||
Delete_Segment(DC, (TRACK*)DrawStruct);
|
||||
GetScreen()->SetModify();
|
||||
}
|
||||
else if ( GetScreen()->m_CurrentItem->m_StructType == TYPETRACK )
|
||||
{
|
||||
//then an element is being edited - remove the last segment.
|
||||
GetScreen()->m_CurrentItem =
|
||||
Delete_Segment(DC, (TRACK*)GetScreen()->m_CurrentItem);
|
||||
GetScreen()->SetModify();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case (int('f') + GR_KB_CTRL) :
|
||||
case (int('F') + GR_KB_CTRL) :
|
||||
case 1030:{ // f = letter 6 in the alphabet + 1024 = 1030
|
||||
wxCommandEvent evt;
|
||||
evt.SetId(ID_FIND_ITEMS);
|
||||
Process_Special_Functions(evt);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'v': // Switch to alternate layer and Place a via if a track is in progress
|
||||
case 'V':
|
||||
if ( m_ID_current_state != ID_TRACK_BUTT ) return;
|
||||
if ( ItemFree )
|
||||
{
|
||||
Other_Layer_Route( NULL, DC);
|
||||
break;
|
||||
}
|
||||
if ( GetScreen()->m_CurrentItem->m_StructType != TYPETRACK )
|
||||
return;
|
||||
if ( (GetScreen()->m_CurrentItem->m_Flags & IS_NEW) == 0 )
|
||||
return;
|
||||
Other_Layer_Route( (TRACK *) GetScreen()->m_CurrentItem, DC);
|
||||
if ( DisplayOpt.ContrastModeDisplay )
|
||||
GetScreen()->SetRefreshReq();
|
||||
break;
|
||||
case WXK_END:
|
||||
DrawPanel->MouseToCursorSchema();
|
||||
End_Route( (TRACK *) (GetScreen()->m_CurrentItem), DC);
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
case 'O':
|
||||
case (int('o') + GR_KB_CTRL) :
|
||||
case (int('O') + GR_KB_CTRL) :
|
||||
case 1039: //o is the 15th letter in the alphabet + 1024 = 1039
|
||||
if( hotkey & GR_KB_CTRL ){
|
||||
//try not to duplicate save, load code etc.
|
||||
wxCommandEvent evt;
|
||||
evt.SetId(ID_LOAD_FILE);
|
||||
Files_io(evt);
|
||||
}
|
||||
break;
|
||||
case 'r': // Rotation
|
||||
case 'R':
|
||||
if ( ItemFree )
|
||||
module = Locate_Prefered_Module(m_Pcb,
|
||||
CURSEUR_ON_GRILLE | IGNORE_LOCKED | MATCH_LAYER );
|
||||
else if (GetScreen()->m_CurrentItem->m_StructType == TYPEMODULE)
|
||||
{
|
||||
module = (MODULE*)GetScreen()->m_CurrentItem;
|
||||
// @todo: might need to add a layer check in if() below
|
||||
if( module->IsLocked() )
|
||||
module = 0; // do not move it.
|
||||
}
|
||||
if ( module )
|
||||
{
|
||||
GetScreen()->m_CurrentItem = module;
|
||||
module->Display_Infos(this);
|
||||
Rotate_Module(DC, module, 900, TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
case 's': // move to other side
|
||||
case 'S':
|
||||
case (int('s') + GR_KB_CTRL) :
|
||||
case (int('S') + GR_KB_CTRL) :
|
||||
case 1043: //as before, 19th letter..
|
||||
if( hotkey & GR_KB_CTRL ){
|
||||
//try not to duplicate save, load code etc.
|
||||
wxCommandEvent evt;
|
||||
evt.SetId(ID_SAVE_BOARD);
|
||||
Files_io(evt);
|
||||
}else{
|
||||
case 'V': // Switch to alternate layer and Place a via if a track is in progress
|
||||
if ( m_ID_current_state != ID_TRACK_BUTT ) return;
|
||||
if ( ItemFree )
|
||||
{
|
||||
Other_Layer_Route( NULL, DC);
|
||||
break;
|
||||
}
|
||||
if ( GetScreen()->m_CurrentItem->m_StructType != TYPETRACK )
|
||||
return;
|
||||
if ( (GetScreen()->m_CurrentItem->m_Flags & IS_NEW) == 0 )
|
||||
return;
|
||||
Other_Layer_Route( (TRACK *) GetScreen()->m_CurrentItem, DC);
|
||||
if ( DisplayOpt.ContrastModeDisplay )
|
||||
GetScreen()->SetRefreshReq();
|
||||
break;
|
||||
|
||||
// Footprint edition:
|
||||
case 'L': // toggle module "MODULE_is_LOCKED" status:
|
||||
// get any module, locked or not locked and toggle its locked status
|
||||
if ( ItemFree )
|
||||
module = Locate_Prefered_Module( m_Pcb, CURSEUR_ON_GRILLE | MATCH_LAYER );
|
||||
else if (GetScreen()->m_CurrentItem->m_StructType == TYPEMODULE)
|
||||
module = (MODULE*)GetScreen()->m_CurrentItem;
|
||||
if( module )
|
||||
{
|
||||
GetScreen()->m_CurrentItem = module;
|
||||
module->SetLocked( !module->IsLocked() );
|
||||
module->Display_Infos(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'G': // Start move (and drag) module
|
||||
case 'M': // Start move module
|
||||
if ( PopupOn ) break;
|
||||
case 'R': // Rotation
|
||||
case 'S': // move to other side
|
||||
if ( ItemFree )
|
||||
{
|
||||
module = Locate_Prefered_Module(m_Pcb,
|
||||
CURSEUR_ON_GRILLE | IGNORE_LOCKED | MATCH_LAYER );
|
||||
if ( module == NULL ) // no footprint found
|
||||
{
|
||||
module = Locate_Prefered_Module(m_Pcb, CURSEUR_ON_GRILLE );
|
||||
if ( module ) // a footprint is found, but locked or on an other layer
|
||||
{
|
||||
if ( module->IsLocked() ) DisplayInfo(this, _("Footprint found, but locked") );
|
||||
else DisplayInfo(this, _("Footprint found, but not on this layer") );
|
||||
module = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (GetScreen()->m_CurrentItem->m_StructType == TYPEMODULE)
|
||||
{
|
||||
module = (MODULE*)GetScreen()->m_CurrentItem;
|
||||
// @todo: might need to add a layer check in if() below
|
||||
if( module->IsLocked() )
|
||||
module = 0; // do not move it.
|
||||
if ( (GetScreen()->m_CurrentItem->m_Flags == 0) &&
|
||||
module->IsLocked() )
|
||||
module = NULL; // do not move, rotate ... it.
|
||||
}
|
||||
if ( module )
|
||||
{
|
||||
GetScreen()->m_CurrentItem = module;
|
||||
module->Display_Infos(this);
|
||||
Change_Side_Module(module, DC);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'L': // toggle module "MODULE_is_LOCKED" status:
|
||||
case 'l':
|
||||
// get any module, locked or not locked and toggle its locked status
|
||||
module = Locate_Prefered_Module( m_Pcb, CURSEUR_ON_GRILLE | MATCH_LAYER );
|
||||
if( module )
|
||||
{
|
||||
GetScreen()->m_CurrentItem = module;
|
||||
module->SetLocked( !module->IsLocked() );
|
||||
module->Display_Infos(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
case 'G': // Start move (and drag) module
|
||||
g_Drag_Pistes_On = TRUE;
|
||||
// fall through
|
||||
if ( module == NULL) break;
|
||||
|
||||
case 'm':
|
||||
case 'M': // Start move module
|
||||
if ( PopupOn ) break;
|
||||
module = Locate_Prefered_Module( m_Pcb,
|
||||
CURSEUR_ON_GRILLE | IGNORE_LOCKED | MATCH_LAYER );
|
||||
if( module )
|
||||
{
|
||||
GetScreen()->m_CurrentItem = module;
|
||||
module->Display_Infos(this);
|
||||
StartMove_Module( module, DC);
|
||||
}
|
||||
break;
|
||||
GetScreen()->m_CurrentItem = module;
|
||||
switch (hotkey)
|
||||
{
|
||||
case 'R': // Rotation
|
||||
Rotate_Module(DC, module, 900, TRUE);
|
||||
break;
|
||||
|
||||
case 'S': // move to other side
|
||||
Change_Side_Module(module, DC);
|
||||
break;
|
||||
|
||||
case 'G': // Start move (and drag) module
|
||||
g_Drag_Pistes_On = TRUE;
|
||||
// fall through
|
||||
case 'M': // Start move module
|
||||
StartMove_Module( module, DC);
|
||||
break;
|
||||
}
|
||||
module->Display_Infos(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
est le curseur sur grille ou le curseur a deplacement fin hors grille */
|
||||
#define CURSEUR_ON_GRILLE (0<<0)
|
||||
#define CURSEUR_OFF_GRILLE (1<<0)
|
||||
|
||||
#define IGNORE_LOCKED (1<<1) ///< if module is locked, do not select for single module operation
|
||||
#define MATCH_LAYER (1<<2) ///< if module not on current layer, do not select
|
||||
#define VISIBLE_ONLY (1<<3) ///< if module not on a visible layer, do not select
|
||||
|
|
|
@ -51,6 +51,10 @@
|
|||
/* Data to build the layer pair indicator button */
|
||||
static wxBitmap * LayerPairBitmap = NULL;
|
||||
static char s_BitmapLayerIcon[16][16] = {
|
||||
// 0 = draw pixel with active layer color
|
||||
// 1 = draw pixel with top layer color (top/bottom layer used in autoroute and place via)
|
||||
// 2 = draw pixel with bottom layer color
|
||||
// 3 = draw pixel with via color
|
||||
{0,0,0,0,0,0,0,3,3,3,1,1,1,1,0,0},
|
||||
{0,0,0,0,0,0,3,3,3,3,3,1,1,0,0,0},
|
||||
{0,0,0,0,0,3,3,0,1,1,3,3,0,0,0,0},
|
||||
|
@ -116,7 +120,7 @@ bool change = false;
|
|||
LayerPairBitmap = new wxBitmap(16, 16);
|
||||
}
|
||||
|
||||
/* Draw the icon, witj colors according to the active layer and layer pairs for
|
||||
/* Draw the icon, with colors according to the active layer and layer pairs for
|
||||
via command (change layer) */
|
||||
wxMemoryDC iconDC;
|
||||
iconDC.SelectObject( *LayerPairBitmap );
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Since the 2007-05-25 version, Kicad (which used unicode strings) can run under W98,
|
||||
Since the 2007-05-25 version, Kicad (which uses unicode strings) can run under W98,
|
||||
if the library unicows.dll is found by kicad.
|
||||
|
||||
If you want to use kicad you must download unicows.dll,
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
release version:
|
||||
25 jun 2007
|
||||
files (.zip,.tgz):
|
||||
kicad-2007-06-25
|
Loading…
Reference in New Issue