remove unused files. some translations.
cvpcb: set flag wxFRAME_FLOAT_ON_PARENT when create the footprint 3D frame and the display frame
This commit is contained in:
parent
a95237d83a
commit
ec02baab5f
|
@ -38,9 +38,9 @@ END_EVENT_TABLE()
|
||||||
|
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
WinEDA3D_DrawFrame::WinEDA3D_DrawFrame(WinEDA_BasePcbFrame * parent,
|
WinEDA3D_DrawFrame::WinEDA3D_DrawFrame(WinEDA_BasePcbFrame * parent,
|
||||||
WinEDA_App *app_parent, const wxString& title ):
|
WinEDA_App *app_parent, const wxString& title, long style ):
|
||||||
wxFrame(parent, DISPLAY3D_FRAME, title,
|
wxFrame(parent, DISPLAY3D_FRAME, title,
|
||||||
wxPoint(-1,-1), wxSize(-1,-1) )
|
wxPoint(-1,-1), wxSize(-1,-1), style )
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
{
|
{
|
||||||
m_FrameName = wxT("Frame3D");
|
m_FrameName = wxT("Frame3D");
|
||||||
|
|
|
@ -29,6 +29,9 @@
|
||||||
#include "pcbstruct.h"
|
#include "pcbstruct.h"
|
||||||
#include "3d_struct.h"
|
#include "3d_struct.h"
|
||||||
|
|
||||||
|
#define KICAD_DEFAULT_3D_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE|wxWANTS_CHARS
|
||||||
|
|
||||||
|
|
||||||
#define LIB3D_PATH wxT("packages3d/")
|
#define LIB3D_PATH wxT("packages3d/")
|
||||||
|
|
||||||
class Pcb3D_GLCanvas;
|
class Pcb3D_GLCanvas;
|
||||||
|
@ -124,11 +127,10 @@ public:
|
||||||
private:
|
private:
|
||||||
wxString m_FrameName; // name used for writting and reading setup
|
wxString m_FrameName; // name used for writting and reading setup
|
||||||
// It is "Frame3D"
|
// It is "Frame3D"
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WinEDA3D_DrawFrame(WinEDA_BasePcbFrame * parent, WinEDA_App *app_parent,
|
WinEDA3D_DrawFrame(WinEDA_BasePcbFrame * parent, WinEDA_App *app_parent,
|
||||||
const wxString& title );
|
const wxString& title, long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE );
|
||||||
|
|
||||||
void Exit3DFrame(wxCommandEvent& event);
|
void Exit3DFrame(wxCommandEvent& event);
|
||||||
void OnCloseWindow(wxCloseEvent & Event);
|
void OnCloseWindow(wxCloseEvent & Event);
|
||||||
|
|
|
@ -4,6 +4,19 @@ Started 2007-June-11
|
||||||
Please add newer entries at the top, list the date and your name with
|
Please add newer entries at the top, list the date and your name with
|
||||||
email address.
|
email address.
|
||||||
|
|
||||||
|
2007-Oct-27 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
||||||
|
================================================================================
|
||||||
|
+ all:
|
||||||
|
remove unused files.
|
||||||
|
some translations
|
||||||
|
|
||||||
|
+cvpcb:
|
||||||
|
set flag wxFRAME_FLOAT_ON_PARENT when create the footprint 3D frame and the
|
||||||
|
display frame
|
||||||
|
minor other changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2007-Oct-26 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
2007-Oct-26 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
||||||
================================================================================
|
================================================================================
|
||||||
+ pcbnew:
|
+ pcbnew:
|
||||||
|
|
|
@ -18,9 +18,8 @@
|
||||||
|
|
||||||
WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow * father, int idtype,
|
WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow * father, int idtype,
|
||||||
WinEDA_App *parent, const wxString & title,
|
WinEDA_App *parent, const wxString & title,
|
||||||
const wxPoint& pos, const wxSize& size):
|
const wxPoint& pos, const wxSize& size, long style):
|
||||||
wxFrame(father, -1, title, pos, size,
|
wxFrame(father, -1, title, pos, size, style )
|
||||||
wxDEFAULT_FRAME_STYLE|wxWANTS_CHARS)
|
|
||||||
{
|
{
|
||||||
wxSize minsize;
|
wxSize minsize;
|
||||||
|
|
||||||
|
|
|
@ -1,142 +1,125 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: svg_print.h
|
// Name: svg_print.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: jean-pierre Charras
|
// Author: jean-pierre Charras
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 05/02/2006 11:05:20
|
// Created: 27/10/2007 12:48:35
|
||||||
// RCS-ID:
|
// RCS-ID:
|
||||||
// Copyright: License GNU
|
// Copyright: License GNU
|
||||||
// Licence:
|
// Licence:
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Generated by DialogBlocks (unregistered), 05/02/2006 11:05:20
|
// Generated by DialogBlocks (unregistered), 27/10/2007 12:48:35
|
||||||
|
|
||||||
#ifndef _SVG_PRINT_H_
|
#ifndef _SVG_PRINT_H_
|
||||||
#define _SVG_PRINT_H_
|
#define _SVG_PRINT_H_
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||||
#pragma interface "svg_print.h"
|
#pragma interface "svg_print.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Includes
|
* Includes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
////@begin includes
|
////@begin includes
|
||||||
#include "wx/valgen.h"
|
#include "wx/valgen.h"
|
||||||
#include "wx/spinctrl.h"
|
#include "wx/spinctrl.h"
|
||||||
////@end includes
|
////@end includes
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Forward declarations
|
* Forward declarations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
////@begin forward declarations
|
////@begin forward declarations
|
||||||
class wxSpinCtrl;
|
class wxSpinCtrl;
|
||||||
////@end forward declarations
|
////@end forward declarations
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Control identifiers
|
* Control identifiers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
////@begin control identifiers
|
////@begin control identifiers
|
||||||
#define ID_DIALOG 10000
|
#define ID_DIALOG 10000
|
||||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxFRAME_FLOAT_ON_PARENT
|
#define ID_SPINCTRL 10003
|
||||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_TITLE _("Create SVG file")
|
#define ID_RADIOBOX_SETPRINTMODE 10007
|
||||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME ID_DIALOG
|
#define ID_CHECKBOX 10004
|
||||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_SIZE wxSize(400, 300)
|
#define ID_RADIOBOX 10005
|
||||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_POSITION wxDefaultPosition
|
#define ID_PRINT_EXECUTE 10002
|
||||||
#define ID_SPINCTRL 10003
|
#define ID_TEXTCTRL 10001
|
||||||
#define ID_RADIOBOX_SETPRINTMODE 10007
|
#define ID_TEXTCTRL1 10006
|
||||||
#define ID_CHECKBOX 10004
|
#define SYMBOL_WINEDA_PRINTSVGFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|wxFRAME_FLOAT_ON_PARENT|MAYBE_RESIZE_BORDER
|
||||||
#define ID_RADIOBOX 10005
|
#define SYMBOL_WINEDA_PRINTSVGFRAME_TITLE _("Create SVG file")
|
||||||
#define ID_PRINT_EXECUTE 10002
|
#define SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME ID_DIALOG
|
||||||
#define ID_TEXTCTRL 10001
|
#define SYMBOL_WINEDA_PRINTSVGFRAME_SIZE wxSize(400, 300)
|
||||||
#define ID_TEXTCTRL1 10006
|
#define SYMBOL_WINEDA_PRINTSVGFRAME_POSITION wxDefaultPosition
|
||||||
////@end control identifiers
|
////@end control identifiers
|
||||||
|
|
||||||
/*!
|
|
||||||
* Compatibility
|
/*!
|
||||||
*/
|
* WinEDA_PrintSVGFrame class declaration
|
||||||
|
*/
|
||||||
#ifndef wxCLOSE_BOX
|
|
||||||
#define wxCLOSE_BOX 0x1000
|
class WinEDA_PrintSVGFrame: public wxDialog
|
||||||
#endif
|
{
|
||||||
|
DECLARE_DYNAMIC_CLASS( WinEDA_PrintSVGFrame )
|
||||||
/*!
|
DECLARE_EVENT_TABLE()
|
||||||
* WinEDA_PrintSVGFrame class declaration
|
|
||||||
*/
|
public:
|
||||||
|
/// Constructors
|
||||||
class WinEDA_PrintSVGFrame: public wxDialog
|
WinEDA_PrintSVGFrame();
|
||||||
{
|
WinEDA_PrintSVGFrame( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PRINTSVGFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PRINTSVGFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PRINTSVGFRAME_SIZE, long style = SYMBOL_WINEDA_PRINTSVGFRAME_STYLE );
|
||||||
DECLARE_DYNAMIC_CLASS( WinEDA_PrintSVGFrame )
|
|
||||||
DECLARE_EVENT_TABLE()
|
/// Creation
|
||||||
|
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PRINTSVGFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PRINTSVGFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PRINTSVGFRAME_SIZE, long style = SYMBOL_WINEDA_PRINTSVGFRAME_STYLE );
|
||||||
public:
|
|
||||||
/// Constructors
|
/// Destructor
|
||||||
WinEDA_PrintSVGFrame( );
|
~WinEDA_PrintSVGFrame();
|
||||||
WinEDA_PrintSVGFrame( WinEDA_DrawFrame* parent,
|
|
||||||
wxWindowID id = SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME,
|
/// Initialises member variables
|
||||||
const wxString& caption = SYMBOL_WINEDA_PRINTSVGFRAME_TITLE,
|
void Init();
|
||||||
const wxPoint& pos = SYMBOL_WINEDA_PRINTSVGFRAME_POSITION,
|
|
||||||
const wxSize& size = SYMBOL_WINEDA_PRINTSVGFRAME_SIZE,
|
/// Creates the controls and sizers
|
||||||
long style = SYMBOL_WINEDA_PRINTSVGFRAME_STYLE );
|
void CreateControls();
|
||||||
|
|
||||||
/// Creation
|
////@begin WinEDA_PrintSVGFrame event handler declarations
|
||||||
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PRINTSVGFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PRINTSVGFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PRINTSVGFRAME_SIZE, long style = SYMBOL_WINEDA_PRINTSVGFRAME_STYLE );
|
/// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG
|
||||||
|
void OnCloseWindow( wxCloseEvent& event );
|
||||||
/// Creates the controls and sizers
|
|
||||||
void CreateControls();
|
/// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_SPINCTRL
|
||||||
|
void OnSpinctrlUpdated( wxSpinEvent& event );
|
||||||
////@begin WinEDA_PrintSVGFrame event handler declarations
|
|
||||||
|
/// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX_SETPRINTMODE
|
||||||
/// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG
|
void OnRadioboxSetprintmodeSelected( wxCommandEvent& event );
|
||||||
void OnCloseWindow( wxCloseEvent& event );
|
|
||||||
|
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_EXECUTE
|
||||||
/// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_SPINCTRL
|
void OnPrintExecuteClick( wxCommandEvent& event );
|
||||||
void OnSpinctrlUpdated( wxSpinEvent& event );
|
|
||||||
|
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
|
||||||
/// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX_SETPRINTMODE
|
void OnCloseClick( wxCommandEvent& event );
|
||||||
void OnRadioboxSetprintmodeSelected( wxCommandEvent& event );
|
|
||||||
|
////@end WinEDA_PrintSVGFrame event handler declarations
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_EXECUTE
|
|
||||||
void OnPrintExecuteClick( wxCommandEvent& event );
|
////@begin WinEDA_PrintSVGFrame member function declarations
|
||||||
|
/// Retrieves bitmap resources
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
|
wxBitmap GetBitmapResource( const wxString& name );
|
||||||
void OnCloseClick( wxCommandEvent& event );
|
|
||||||
|
/// Retrieves icon resources
|
||||||
////@end WinEDA_PrintSVGFrame event handler declarations
|
wxIcon GetIconResource( const wxString& name );
|
||||||
|
////@end WinEDA_PrintSVGFrame member function declarations
|
||||||
////@begin WinEDA_PrintSVGFrame member function declarations
|
|
||||||
|
/// Should we show tooltips?
|
||||||
/// Retrieves bitmap resources
|
static bool ShowToolTips();
|
||||||
wxBitmap GetBitmapResource( const wxString& name );
|
|
||||||
|
////@begin WinEDA_PrintSVGFrame member variables
|
||||||
/// Retrieves icon resources
|
wxSpinCtrl* m_ButtPenWidth;
|
||||||
wxIcon GetIconResource( const wxString& name );
|
wxRadioBox* m_ModeColorOption;
|
||||||
////@end WinEDA_PrintSVGFrame member function declarations
|
wxCheckBox* m_Print_Sheet_Ref;
|
||||||
|
wxRadioBox* m_PagesOption;
|
||||||
/// Should we show tooltips?
|
wxTextCtrl* m_FileNameCtrl;
|
||||||
static bool ShowToolTips();
|
wxTextCtrl* m_MessagesBox;
|
||||||
|
////@end WinEDA_PrintSVGFrame member variables
|
||||||
void PrintSVGDoc(wxCommandEvent& event);
|
};
|
||||||
bool DrawPage(const wxString & FullFileName);
|
|
||||||
void SetPenWidth(wxSpinEvent& event);
|
#endif
|
||||||
wxString ReturnFullFileName();
|
// _SVG_PRINT_H_
|
||||||
|
|
||||||
////@begin WinEDA_PrintSVGFrame member variables
|
|
||||||
wxSpinCtrl* m_ButtPenWidth;
|
|
||||||
wxRadioBox* m_ModeColorOption;
|
|
||||||
wxCheckBox* m_Print_Sheet_Ref;
|
|
||||||
wxRadioBox* m_PagesOption;
|
|
||||||
wxTextCtrl* m_FileNameCtrl;
|
|
||||||
wxTextCtrl* m_MessagesBox;
|
|
||||||
////@end WinEDA_PrintSVGFrame member variables
|
|
||||||
|
|
||||||
WinEDA_DrawFrame * m_Parent;
|
|
||||||
int m_PrintMaskLayer;
|
|
||||||
int m_ImageXSize_mm;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// _SVG_PRINT_H_
|
|
|
@ -1,19 +0,0 @@
|
||||||
/**********************************************************/
|
|
||||||
/* Routines d'affichage de parametres et caracteristiques */
|
|
||||||
/**********************************************************/
|
|
||||||
|
|
||||||
/* Fichier AFFICHE.CC */
|
|
||||||
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
|
||||||
|
|
||||||
#include "wxstruct.h"
|
|
||||||
#include "menu.h"
|
|
||||||
#include "pcbnew.h"
|
|
||||||
#include "cvpcb.h"
|
|
||||||
|
|
||||||
#include "3d_struct.h"
|
|
||||||
|
|
||||||
#include "protos.h"
|
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
/* Constructeur de WinEDA_CvpcbFrame: la fenetre generale */
|
/* Constructeur de WinEDA_CvpcbFrame: la fenetre generale */
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
WinEDA_CvpcbFrame::WinEDA_CvpcbFrame(WinEDA_App *parent, const wxString & title ):
|
WinEDA_CvpcbFrame::WinEDA_CvpcbFrame(WinEDA_App *parent, const wxString & title, long style ):
|
||||||
WinEDA_BasicFrame(NULL, CVPCB_FRAME, parent, title, wxDefaultPosition, wxDefaultSize )
|
WinEDA_BasicFrame(NULL, CVPCB_FRAME, parent, title, wxDefaultPosition, wxDefaultSize, style )
|
||||||
{
|
{
|
||||||
m_FrameName = wxT("CvpcbFrame");
|
m_FrameName = wxT("CvpcbFrame");
|
||||||
m_ListCmp = NULL;
|
m_ListCmp = NULL;
|
||||||
|
|
163
cvpcb/cvpcb.h
163
cvpcb/cvpcb.h
|
@ -1,6 +1,6 @@
|
||||||
/**********************************************/
|
/**********************************************/
|
||||||
/* CVPCB : declaration des variables globales */
|
/* CVPCB : declaration des variables globales */
|
||||||
/**********************************************/
|
/**********************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef eda_global
|
#ifndef eda_global
|
||||||
|
@ -15,140 +15,139 @@
|
||||||
#include "colors.h"
|
#include "colors.h"
|
||||||
|
|
||||||
// Define print format d to display a schematic component line
|
// Define print format d to display a schematic component line
|
||||||
#define CMP_FORMAT wxT("%3d %8s - %16s : %-.32s")
|
#define CMP_FORMAT wxT( "%3d %8s - %16s : %-.32s" )
|
||||||
|
|
||||||
#define FILTERFOOTPRINTKEY "FilterFootprint"
|
#define FILTERFOOTPRINTKEY "FilterFootprint"
|
||||||
|
|
||||||
enum TypeOfStruct
|
enum TypeOfStruct {
|
||||||
{
|
STRUCT_NOT_INIT,
|
||||||
STRUCT_NOT_INIT,
|
STRUCT_COMPONENT,
|
||||||
STRUCT_COMPONENT,
|
STRUCT_PIN,
|
||||||
STRUCT_PIN,
|
STRUCT_MODULE,
|
||||||
STRUCT_MODULE,
|
STRUCT_PSEUDOMODULE
|
||||||
STRUCT_PSEUDOMODULE
|
};
|
||||||
};
|
|
||||||
|
|
||||||
class STOREPIN
|
class STOREPIN
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int m_Type; /* Type de la structure */
|
int m_Type; /* Type de la structure */
|
||||||
STOREPIN * Pnext; /* Chainage avant */
|
STOREPIN* Pnext; /* Chainage avant */
|
||||||
int m_Index; /* variable utilisee selon types de netlistes */
|
int m_Index; /* variable utilisee selon types de netlistes */
|
||||||
int m_PinType; /* code type electrique ( Entree Sortie Passive..) */
|
int m_PinType; /* code type electrique ( Entree Sortie Passive..) */
|
||||||
wxString m_PinNet; /* Pointeur sur le texte nom de net */
|
wxString m_PinNet; /* Pointeur sur le texte nom de net */
|
||||||
wxString m_PinNum;
|
wxString m_PinNum;
|
||||||
wxString m_PinName;
|
wxString m_PinName;
|
||||||
wxString m_Repere; /* utilise selon formats de netliste */
|
wxString m_Repere; /* utilise selon formats de netliste */
|
||||||
|
|
||||||
STOREPIN();
|
STOREPIN();
|
||||||
} ;
|
};
|
||||||
|
|
||||||
class STORECMP
|
class STORECMP
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int m_Type; /* Type de la structure */
|
int m_Type; /* Type de la structure */
|
||||||
STORECMP * Pnext; /* Chainage avant */
|
STORECMP* Pnext; /* Chainage avant */
|
||||||
STORECMP * Pback; /* Chainage arriere */
|
STORECMP* Pback; /* Chainage arriere */
|
||||||
int m_Num; /* Numero d'ordre */
|
int m_Num; /* Numero d'ordre */
|
||||||
int m_Multi; /* Nombre d' unites par boitier */
|
int m_Multi; /* Nombre d' unites par boitier */
|
||||||
STOREPIN * m_Pins; /* pointeur sur la liste des Pins */
|
STOREPIN* m_Pins; /* pointeur sur la liste des Pins */
|
||||||
wxString m_Reference; /* U3, R5 ... */
|
wxString m_Reference; /* U3, R5 ... */
|
||||||
wxString m_Valeur; /* 7400, 47K ... */
|
wxString m_Valeur; /* 7400, 47K ... */
|
||||||
wxString m_TimeStamp; /* Signature temporelle ("00000000" si absente) */
|
wxString m_TimeStamp; /* Signature temporelle ("00000000" si absente) */
|
||||||
wxString m_Module; /* Nom du module (Package) corresp */
|
wxString m_Module; /* Nom du module (Package) corresp */
|
||||||
wxString m_Repere; /* utilise selon formats de netliste */
|
wxString m_Repere; /* utilise selon formats de netliste */
|
||||||
wxArrayString m_FootprintFilter; /* List of allowed footprints (wildcart allowed
|
wxArrayString m_FootprintFilter; /* List of allowed footprints (wildcart allowed
|
||||||
if void: no filtering */
|
* if void: no filtering */
|
||||||
|
|
||||||
STORECMP();
|
STORECMP();
|
||||||
~STORECMP();
|
~STORECMP();
|
||||||
} ;
|
};
|
||||||
|
|
||||||
class STOREMOD
|
class STOREMOD
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int m_Type; /* Type de la structure */
|
int m_Type; /* Type de la structure */
|
||||||
STOREMOD * Pnext; /* Chainage avant */
|
STOREMOD* Pnext; /* Chainage avant */
|
||||||
STOREMOD * Pback; /* Chainage arriere */
|
STOREMOD* Pback; /* Chainage arriere */
|
||||||
wxString m_Module; /* Nom du module */
|
wxString m_Module; /* Nom du module */
|
||||||
wxString m_LibName; /* Nom de la librairie contenant ce module */
|
wxString m_LibName; /* Nom de la librairie contenant ce module */
|
||||||
int m_Num ; /* Numero d'ordre pour affichage sur la liste */
|
int m_Num; /* Numero d'ordre pour affichage sur la liste */
|
||||||
wxString m_Doc; /* Doc associee */
|
wxString m_Doc; /* Doc associee */
|
||||||
wxString m_KeyWord; /* Mots cles associes */
|
wxString m_KeyWord; /* Mots cles associes */
|
||||||
|
|
||||||
STOREMOD();
|
STOREMOD();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
eda_global STOREMOD * g_BaseListePkg;
|
eda_global STOREMOD* g_BaseListePkg;
|
||||||
eda_global STORECMP * g_BaseListeCmp;
|
eda_global STORECMP* g_BaseListeCmp;
|
||||||
|
|
||||||
eda_global FILE *source ;
|
eda_global FILE* source;
|
||||||
eda_global FILE *dest ;
|
eda_global FILE* dest;
|
||||||
eda_global FILE *libcmp ;
|
eda_global FILE* libcmp;
|
||||||
eda_global FILE *lib_module ;
|
eda_global FILE* lib_module;
|
||||||
|
|
||||||
/* nom des fichiers a traiter */
|
/* nom des fichiers a traiter */
|
||||||
eda_global wxString FFileName;
|
eda_global wxString FFileName;
|
||||||
|
|
||||||
/* Types de netliste: */
|
/* Types de netliste: */
|
||||||
#define TYPE_NON_SPECIFIE 0
|
#define TYPE_NON_SPECIFIE 0
|
||||||
#define TYPE_ORCADPCB2 1
|
#define TYPE_ORCADPCB2 1
|
||||||
#define TYPE_PCAD 2
|
#define TYPE_PCAD 2
|
||||||
#define TYPE_VIEWLOGIC_WIR 3
|
#define TYPE_VIEWLOGIC_WIR 3
|
||||||
#define TYPE_VIEWLOGIC_NET 4
|
#define TYPE_VIEWLOGIC_NET 4
|
||||||
|
|
||||||
/* Gestion des noms des librairies */
|
/* Gestion des noms des librairies */
|
||||||
eda_global wxString g_EquivExtBuffer
|
eda_global wxString g_EquivExtBuffer
|
||||||
#ifdef MAIN
|
#ifdef MAIN
|
||||||
( wxT(".equ") )
|
( wxT( ".equ" ) )
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
eda_global wxString g_ExtCmpBuffer
|
eda_global wxString g_ExtCmpBuffer
|
||||||
#ifdef MAIN
|
#ifdef MAIN
|
||||||
( wxT(".cmp") )
|
( wxT( ".cmp" ) )
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
eda_global wxString g_UserNetDirBuffer; // Netlist path (void = current working directory)
|
eda_global wxString g_UserNetDirBuffer; // Netlist path (void = current working directory)
|
||||||
|
|
||||||
eda_global wxArrayString g_ListName_Equ; // list of .equ files to load
|
eda_global wxArrayString g_ListName_Equ; // list of .equ files to load
|
||||||
|
|
||||||
eda_global int g_FlagEESchema;
|
eda_global int g_FlagEESchema;
|
||||||
eda_global int Rjustify; /* flag pout troncature des noms de Net:
|
eda_global int Rjustify; /* flag pout troncature des noms de Net:
|
||||||
= 0: debut de chaine conservee (->ORCADPCB2)
|
* = 0: debut de chaine conservee (->ORCADPCB2)
|
||||||
= 1: fin de chaine conservee (->VIEWLOGIC) */
|
* = 1: fin de chaine conservee (->VIEWLOGIC) */
|
||||||
eda_global int selection_type; /* 0 pour sel par U??, 1 pour sel par ref ORCADPCB */
|
eda_global int selection_type; /* 0 pour sel par U??, 1 pour sel par ref ORCADPCB */
|
||||||
|
|
||||||
eda_global int modified; /* Flag != 0 si modif attribution des modules */
|
eda_global int modified; /* Flag != 0 si modif attribution des modules */
|
||||||
eda_global int ListModIsModified; /* Flag != 0 si modif liste des lib modules */
|
eda_global int ListModIsModified; /* Flag != 0 si modif liste des lib modules */
|
||||||
|
|
||||||
eda_global char alim[1024];
|
eda_global char alim[1024];
|
||||||
|
|
||||||
eda_global int nbcomp ; /* nombre de composants trouves */
|
eda_global int nbcomp; /* nombre de composants trouves */
|
||||||
eda_global int nblib ; /* nombre d'empreintes trouvees */
|
eda_global int nblib; /* nombre d'empreintes trouvees */
|
||||||
eda_global int composants_non_affectes ;/* nbre de composants non affectes */
|
eda_global int composants_non_affectes; /* nbre de composants non affectes */
|
||||||
|
|
||||||
eda_global wxString NameBuffer;
|
eda_global wxString NameBuffer;
|
||||||
eda_global wxString NetInNameBuffer;
|
eda_global wxString NetInNameBuffer;
|
||||||
eda_global wxString NetInExtBuffer;
|
eda_global wxString NetInExtBuffer;
|
||||||
eda_global wxString PkgInExtBuffer;
|
eda_global wxString PkgInExtBuffer;
|
||||||
eda_global wxString NetDirBuffer;
|
eda_global wxString NetDirBuffer;
|
||||||
|
|
||||||
eda_global wxString ExtRetroBuffer
|
eda_global wxString ExtRetroBuffer
|
||||||
#ifdef MAIN
|
#ifdef MAIN
|
||||||
( wxT(".stf") )
|
( wxT( ".stf" ) )
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
// Variables generales */
|
// Variables generales */
|
||||||
// Unused, for pcbnew compatibility:
|
// Unused, for pcbnew compatibility:
|
||||||
eda_global Ki_PageDescr * SheetList[]
|
eda_global Ki_PageDescr* SheetList[]
|
||||||
#ifdef MAIN
|
#ifdef MAIN
|
||||||
= {NULL}
|
= { NULL }
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
// Unused, for pcbnew compatibility:
|
// Unused, for pcbnew compatibility:
|
||||||
void Plume(int state);
|
void Plume( int state );
|
||||||
|
|
|
@ -39,7 +39,8 @@ private:
|
||||||
|
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
public:
|
public:
|
||||||
WinEDA_CvpcbFrame(WinEDA_App * parent, const wxString & title);
|
WinEDA_CvpcbFrame(WinEDA_App * parent, const wxString & title,
|
||||||
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE);
|
||||||
~WinEDA_CvpcbFrame();
|
~WinEDA_CvpcbFrame();
|
||||||
|
|
||||||
void OnLeftClick(wxListEvent & event);
|
void OnLeftClick(wxListEvent & event);
|
||||||
|
@ -180,7 +181,8 @@ public:
|
||||||
public:
|
public:
|
||||||
WinEDA_DisplayFrame( wxWindow * father, WinEDA_App *parent,
|
WinEDA_DisplayFrame( wxWindow * father, WinEDA_App *parent,
|
||||||
const wxString & title,
|
const wxString & title,
|
||||||
const wxPoint& pos, const wxSize& size);
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE);
|
||||||
|
|
||||||
~WinEDA_DisplayFrame();
|
~WinEDA_DisplayFrame();
|
||||||
|
|
||||||
|
@ -194,6 +196,7 @@ public:
|
||||||
void OnLeftDClick(wxDC * DC, const wxPoint& MousePos);
|
void OnLeftDClick(wxDC * DC, const wxPoint& MousePos);
|
||||||
bool OnRightClick(const wxPoint& MousePos, wxMenu * PopMenu);
|
bool OnRightClick(const wxPoint& MousePos, wxMenu * PopMenu);
|
||||||
void SetToolbars();
|
void SetToolbars();
|
||||||
|
void GeneralControle( wxDC* DC, wxPoint Mouse );
|
||||||
void InstallOptionsDisplay(wxCommandEvent& event);
|
void InstallOptionsDisplay(wxCommandEvent& event);
|
||||||
MODULE * Get_Module(const wxString & CmpName);
|
MODULE * Get_Module(const wxString & CmpName);
|
||||||
|
|
||||||
|
|
|
@ -96,12 +96,14 @@ bool KiConfigCvpcbFrame::Create( wxWindow* parent, wxWindowID id, const wxString
|
||||||
////@end KiConfigCvpcbFrame member initialisation
|
////@end KiConfigCvpcbFrame member initialisation
|
||||||
|
|
||||||
////@begin KiConfigCvpcbFrame creation
|
////@begin KiConfigCvpcbFrame creation
|
||||||
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
|
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
|
||||||
wxDialog::Create( parent, id, caption, pos, size, style );
|
wxDialog::Create( parent, id, caption, pos, size, style );
|
||||||
|
|
||||||
CreateControls();
|
CreateControls();
|
||||||
GetSizer()->Fit(this);
|
if (GetSizer())
|
||||||
GetSizer()->SetSizeHints(this);
|
{
|
||||||
|
GetSizer()->SetSizeHints(this);
|
||||||
|
}
|
||||||
Centre();
|
Centre();
|
||||||
////@end KiConfigCvpcbFrame creation
|
////@end KiConfigCvpcbFrame creation
|
||||||
return true;
|
return true;
|
||||||
|
@ -116,7 +118,7 @@ void KiConfigCvpcbFrame::CreateControls()
|
||||||
SetFont(*g_DialogFont);
|
SetFont(*g_DialogFont);
|
||||||
|
|
||||||
////@begin KiConfigCvpcbFrame content construction
|
////@begin KiConfigCvpcbFrame content construction
|
||||||
// Generated by DialogBlocks, 28/02/2006 16:11:39 (unregistered)
|
// Generated by DialogBlocks, 27/10/2007 10:35:43 (unregistered)
|
||||||
|
|
||||||
KiConfigCvpcbFrame* itemDialog1 = this;
|
KiConfigCvpcbFrame* itemDialog1 = this;
|
||||||
|
|
||||||
|
@ -128,7 +130,7 @@ void KiConfigCvpcbFrame::CreateControls()
|
||||||
|
|
||||||
wxButton* itemButton4 = new wxButton( itemDialog1, SAVE_CFG, _("Save Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxButton* itemButton4 = new wxButton( itemDialog1, SAVE_CFG, _("Save Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemButton4->SetForegroundColour(wxColour(198, 0, 0));
|
itemButton4->SetForegroundColour(wxColour(198, 0, 0));
|
||||||
itemBoxSizer3->Add(itemButton4, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
|
itemBoxSizer3->Add(itemButton4, 0, wxGROW|wxALL, 5);
|
||||||
|
|
||||||
wxButton* itemButton5 = new wxButton( itemDialog1, ID_READ_OLDCFG, _("Read Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxButton* itemButton5 = new wxButton( itemDialog1, ID_READ_OLDCFG, _("Read Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemButton5->SetForegroundColour(wxColour(0, 0, 255));
|
itemButton5->SetForegroundColour(wxColour(0, 0, 255));
|
||||||
|
@ -136,14 +138,14 @@ void KiConfigCvpcbFrame::CreateControls()
|
||||||
|
|
||||||
wxButton* itemButton6 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxButton* itemButton6 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemButton6->SetForegroundColour(wxColour(0, 128, 0));
|
itemButton6->SetForegroundColour(wxColour(0, 128, 0));
|
||||||
itemBoxSizer3->Add(itemButton6, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
itemBoxSizer3->Add(itemButton6, 0, wxGROW|wxALL, 5);
|
||||||
|
|
||||||
wxString m_NetFormatBoxStrings[] = {
|
wxArrayString m_NetFormatBoxStrings;
|
||||||
_("&PcbNew"),
|
m_NetFormatBoxStrings.Add(_("&PcbNew"));
|
||||||
_("&ViewLogic"),
|
m_NetFormatBoxStrings.Add(_("&ViewLogic"));
|
||||||
_("View &Net + Pkg")
|
m_NetFormatBoxStrings.Add(_("View &Net + Pkg"));
|
||||||
};
|
m_NetFormatBox = new wxRadioBox( itemDialog1, FORMAT_NETLIST, _("NetList Formats:"), wxDefaultPosition, wxDefaultSize, m_NetFormatBoxStrings, 1, wxRA_SPECIFY_COLS );
|
||||||
m_NetFormatBox = new wxRadioBox( itemDialog1, FORMAT_NETLIST, _("NetList Formats:"), wxDefaultPosition, wxDefaultSize, 3, m_NetFormatBoxStrings, 1, wxRA_SPECIFY_COLS );
|
m_NetFormatBox->SetSelection(0);
|
||||||
itemBoxSizer3->Add(m_NetFormatBox, 0, wxGROW|wxALL, 5);
|
itemBoxSizer3->Add(m_NetFormatBox, 0, wxGROW|wxALL, 5);
|
||||||
|
|
||||||
wxStaticBox* itemStaticBoxSizer8Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Files ext:"));
|
wxStaticBox* itemStaticBoxSizer8Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Files ext:"));
|
||||||
|
@ -154,71 +156,71 @@ void KiConfigCvpcbFrame::CreateControls()
|
||||||
itemBoxSizer2->Add(m_RightBoxSizer, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
itemBoxSizer2->Add(m_RightBoxSizer, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
m_RightBoxSizer->Add(itemBoxSizer10, 0, wxALIGN_CENTER_HORIZONTAL, 5);
|
m_RightBoxSizer->Add(itemBoxSizer10, 1, wxALIGN_CENTER_HORIZONTAL, 5);
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL);
|
||||||
itemBoxSizer10->Add(itemBoxSizer11, 0, wxGROW|wxLEFT|wxTOP|wxBOTTOM, 5);
|
itemBoxSizer10->Add(itemBoxSizer11, 0, wxGROW|wxLEFT|wxTOP|wxBOTTOM, 5);
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxVERTICAL);
|
||||||
itemBoxSizer11->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL, 5);
|
itemBoxSizer11->Add(itemBoxSizer12, 1, wxALIGN_CENTER_HORIZONTAL, 5);
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
itemBoxSizer12->Add(itemBoxSizer13, 0, wxALIGN_CENTER_HORIZONTAL, 5);
|
itemBoxSizer12->Add(itemBoxSizer13, 0, wxGROW, 5);
|
||||||
|
|
||||||
wxButton* itemButton14 = new wxButton( itemDialog1, DEL_LIB, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxButton* itemButton14 = new wxButton( itemDialog1, DEL_LIB, _("Del"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemButton14->SetForegroundColour(wxColour(191, 0, 0));
|
itemButton14->SetForegroundColour(wxColour(191, 0, 0));
|
||||||
itemBoxSizer13->Add(itemButton14, 0, wxGROW|wxLEFT|wxTOP|wxBOTTOM, 5);
|
itemBoxSizer13->Add(itemButton14, 0, wxGROW|wxLEFT|wxTOP|wxBOTTOM, 5);
|
||||||
|
|
||||||
wxButton* itemButton15 = new wxButton( itemDialog1, ADD_LIB, _("Add below"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxButton* itemButton15 = new wxButton( itemDialog1, ADD_LIB, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemButton15->SetForegroundColour(wxColour(0, 128, 0));
|
itemButton15->SetForegroundColour(wxColour(0, 128, 0));
|
||||||
itemBoxSizer13->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
|
itemBoxSizer13->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
|
||||||
|
|
||||||
wxButton* itemButton16 = new wxButton( itemDialog1, INSERT_LIB, _("Add above"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxButton* itemButton16 = new wxButton( itemDialog1, INSERT_LIB, _("Ins"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemButton16->SetForegroundColour(wxColour(0, 0, 255));
|
itemButton16->SetForegroundColour(wxColour(0, 0, 255));
|
||||||
itemBoxSizer13->Add(itemButton16, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
|
itemBoxSizer13->Add(itemButton16, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer17 = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* itemBoxSizer17 = new wxBoxSizer(wxVERTICAL);
|
||||||
itemBoxSizer12->Add(itemBoxSizer17, 0, wxGROW|wxTOP, 5);
|
itemBoxSizer12->Add(itemBoxSizer17, 1, wxGROW|wxTOP, 5);
|
||||||
|
|
||||||
wxStaticText* itemStaticText18 = new wxStaticText( itemDialog1, wxID_STATIC, _("Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText18 = new wxStaticText( itemDialog1, wxID_STATIC, _("Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemStaticText18->SetForegroundColour(wxColour(204, 0, 0));
|
itemStaticText18->SetForegroundColour(wxColour(204, 0, 0));
|
||||||
itemBoxSizer17->Add(itemStaticText18, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
itemBoxSizer17->Add(itemStaticText18, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
||||||
|
|
||||||
wxString* m_ListLibrStrings = NULL;
|
wxArrayString m_ListLibrStrings;
|
||||||
m_ListLibr = new wxListBox( itemDialog1, ID_LISTBOX, wxDefaultPosition, wxSize(-1, 200), 0, m_ListLibrStrings, wxLB_SINGLE );
|
m_ListLibr = new wxListBox( itemDialog1, ID_LISTBOX, wxDefaultPosition, wxSize(-1, 200), m_ListLibrStrings, wxLB_SINGLE );
|
||||||
itemBoxSizer17->Add(m_ListLibr, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
itemBoxSizer17->Add(m_ListLibr, 1, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxVERTICAL);
|
||||||
itemBoxSizer10->Add(itemBoxSizer20, 0, wxGROW|wxTOP|wxBOTTOM, 5);
|
itemBoxSizer10->Add(itemBoxSizer20, 0, wxGROW|wxTOP|wxBOTTOM, 5);
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer21 = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* itemBoxSizer21 = new wxBoxSizer(wxVERTICAL);
|
||||||
itemBoxSizer20->Add(itemBoxSizer21, 0, wxALIGN_CENTER_HORIZONTAL, 5);
|
itemBoxSizer20->Add(itemBoxSizer21, 1, wxALIGN_CENTER_HORIZONTAL, 5);
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer22 = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* itemBoxSizer22 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
itemBoxSizer21->Add(itemBoxSizer22, 0, wxALIGN_CENTER_HORIZONTAL, 5);
|
itemBoxSizer21->Add(itemBoxSizer22, 0, wxGROW, 5);
|
||||||
|
|
||||||
wxButton* itemButton23 = new wxButton( itemDialog1, DEL_EQU, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxButton* itemButton23 = new wxButton( itemDialog1, DEL_EQU, _("Del"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemButton23->SetForegroundColour(wxColour(196, 0, 0));
|
itemButton23->SetForegroundColour(wxColour(196, 0, 0));
|
||||||
itemBoxSizer22->Add(itemButton23, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
|
itemBoxSizer22->Add(itemButton23, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
|
||||||
|
|
||||||
wxButton* itemButton24 = new wxButton( itemDialog1, ADD_EQU, _("Add below"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxButton* itemButton24 = new wxButton( itemDialog1, ADD_EQU, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemButton24->SetForegroundColour(wxColour(0, 128, 0));
|
itemButton24->SetForegroundColour(wxColour(0, 128, 0));
|
||||||
itemBoxSizer22->Add(itemButton24, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
|
itemBoxSizer22->Add(itemButton24, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
|
||||||
|
|
||||||
wxButton* itemButton25 = new wxButton( itemDialog1, INSERT_EQU, _("Add above"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxButton* itemButton25 = new wxButton( itemDialog1, INSERT_EQU, _("Ins"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemButton25->SetForegroundColour(wxColour(0, 0, 255));
|
itemButton25->SetForegroundColour(wxColour(0, 0, 255));
|
||||||
itemBoxSizer22->Add(itemButton25, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
|
itemBoxSizer22->Add(itemButton25, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL);
|
||||||
itemBoxSizer21->Add(itemBoxSizer26, 0, wxGROW|wxTOP, 5);
|
itemBoxSizer21->Add(itemBoxSizer26, 1, wxGROW|wxTOP, 5);
|
||||||
|
|
||||||
wxStaticText* itemStaticText27 = new wxStaticText( itemDialog1, wxID_STATIC, _("Equiv"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxStaticText* itemStaticText27 = new wxStaticText( itemDialog1, wxID_STATIC, _("Equiv"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
itemStaticText27->SetForegroundColour(wxColour(204, 0, 0));
|
itemStaticText27->SetForegroundColour(wxColour(204, 0, 0));
|
||||||
itemBoxSizer26->Add(itemStaticText27, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
itemBoxSizer26->Add(itemStaticText27, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
||||||
|
|
||||||
wxString* m_ListEquivStrings = NULL;
|
wxArrayString m_ListEquivStrings;
|
||||||
m_ListEquiv = new wxListBox( itemDialog1, ID_LISTBOX1, wxDefaultPosition, wxSize(-1, 200), 0, m_ListEquivStrings, wxLB_SINGLE );
|
m_ListEquiv = new wxListBox( itemDialog1, ID_LISTBOX1, wxDefaultPosition, wxSize(-1, 200), m_ListEquivStrings, wxLB_SINGLE );
|
||||||
itemBoxSizer26->Add(m_ListEquiv, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
itemBoxSizer26->Add(m_ListEquiv, 1, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||||
|
|
||||||
m_FileExtBoxSizerH = new wxBoxSizer(wxHORIZONTAL);
|
m_FileExtBoxSizerH = new wxBoxSizer(wxHORIZONTAL);
|
||||||
m_RightBoxSizer->Add(m_FileExtBoxSizerH, 0, wxGROW, 5);
|
m_RightBoxSizer->Add(m_FileExtBoxSizerH, 0, wxGROW, 5);
|
||||||
|
|
|
@ -35,11 +35,6 @@ class wxBoxSizer;
|
||||||
|
|
||||||
////@begin control identifiers
|
////@begin control identifiers
|
||||||
#define ID_DIALOG 10000
|
#define ID_DIALOG 10000
|
||||||
#define SYMBOL_KICONFIGCVPCBFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
|
|
||||||
#define SYMBOL_KICONFIGCVPCBFRAME_TITLE _("Dialog")
|
|
||||||
#define SYMBOL_KICONFIGCVPCBFRAME_IDNAME ID_DIALOG
|
|
||||||
#define SYMBOL_KICONFIGCVPCBFRAME_SIZE wxSize(400, 300)
|
|
||||||
#define SYMBOL_KICONFIGCVPCBFRAME_POSITION wxDefaultPosition
|
|
||||||
#define SAVE_CFG 10001
|
#define SAVE_CFG 10001
|
||||||
#define ID_READ_OLDCFG 10002
|
#define ID_READ_OLDCFG 10002
|
||||||
#define FORMAT_NETLIST 10003
|
#define FORMAT_NETLIST 10003
|
||||||
|
@ -51,6 +46,11 @@ class wxBoxSizer;
|
||||||
#define ADD_EQU 10008
|
#define ADD_EQU 10008
|
||||||
#define INSERT_EQU 10009
|
#define INSERT_EQU 10009
|
||||||
#define ID_LISTBOX1 10011
|
#define ID_LISTBOX1 10011
|
||||||
|
#define SYMBOL_KICONFIGCVPCBFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
|
||||||
|
#define SYMBOL_KICONFIGCVPCBFRAME_TITLE _("Cvpcb Configuration")
|
||||||
|
#define SYMBOL_KICONFIGCVPCBFRAME_IDNAME ID_DIALOG
|
||||||
|
#define SYMBOL_KICONFIGCVPCBFRAME_SIZE wxSize(400, 300)
|
||||||
|
#define SYMBOL_KICONFIGCVPCBFRAME_POSITION wxDefaultPosition
|
||||||
////@end control identifiers
|
////@end control identifiers
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -221,7 +221,7 @@
|
||||||
<string name="proxy-Implementation filename">"dialog_cvpcb_config.cpp"</string>
|
<string name="proxy-Implementation filename">"dialog_cvpcb_config.cpp"</string>
|
||||||
<string name="proxy-Header filename">"dialog_cvpcb_config.h"</string>
|
<string name="proxy-Header filename">"dialog_cvpcb_config.h"</string>
|
||||||
<string name="proxy-XRC filename">""</string>
|
<string name="proxy-XRC filename">""</string>
|
||||||
<string name="proxy-Title">"Dialog"</string>
|
<string name="proxy-Title">"Cvpcb Configuration"</string>
|
||||||
<bool name="proxy-Centre">1</bool>
|
<bool name="proxy-Centre">1</bool>
|
||||||
<string name="proxy-Icon">""</string>
|
<string name="proxy-Icon">""</string>
|
||||||
<bool name="proxy-Dialog units">0</bool>
|
<bool name="proxy-Dialog units">0</bool>
|
||||||
|
@ -360,7 +360,7 @@
|
||||||
<bool name="proxy-wxLEFT">1</bool>
|
<bool name="proxy-wxLEFT">1</bool>
|
||||||
<bool name="proxy-wxRIGHT">1</bool>
|
<bool name="proxy-wxRIGHT">1</bool>
|
||||||
<bool name="proxy-wxTOP">1</bool>
|
<bool name="proxy-wxTOP">1</bool>
|
||||||
<bool name="proxy-wxBOTTOM">0</bool>
|
<bool name="proxy-wxBOTTOM">1</bool>
|
||||||
<bool name="proxy-wxSHAPED">0</bool>
|
<bool name="proxy-wxSHAPED">0</bool>
|
||||||
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
|
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
|
||||||
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
|
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
|
||||||
|
@ -477,7 +477,7 @@
|
||||||
<long name="proxy-Border">5</long>
|
<long name="proxy-Border">5</long>
|
||||||
<bool name="proxy-wxLEFT">1</bool>
|
<bool name="proxy-wxLEFT">1</bool>
|
||||||
<bool name="proxy-wxRIGHT">1</bool>
|
<bool name="proxy-wxRIGHT">1</bool>
|
||||||
<bool name="proxy-wxTOP">0</bool>
|
<bool name="proxy-wxTOP">1</bool>
|
||||||
<bool name="proxy-wxBOTTOM">1</bool>
|
<bool name="proxy-wxBOTTOM">1</bool>
|
||||||
<bool name="proxy-wxSHAPED">0</bool>
|
<bool name="proxy-wxSHAPED">0</bool>
|
||||||
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
|
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
|
||||||
|
@ -620,7 +620,7 @@
|
||||||
<string name="proxy-Member variable name">""</string>
|
<string name="proxy-Member variable name">""</string>
|
||||||
<string name="proxy-AlignH">"Centre"</string>
|
<string name="proxy-AlignH">"Centre"</string>
|
||||||
<string name="proxy-AlignV">"Centre"</string>
|
<string name="proxy-AlignV">"Centre"</string>
|
||||||
<long name="proxy-Stretch factor">0</long>
|
<long name="proxy-Stretch factor">1</long>
|
||||||
<long name="proxy-Border">5</long>
|
<long name="proxy-Border">5</long>
|
||||||
<bool name="proxy-wxLEFT">0</bool>
|
<bool name="proxy-wxLEFT">0</bool>
|
||||||
<bool name="proxy-wxRIGHT">0</bool>
|
<bool name="proxy-wxRIGHT">0</bool>
|
||||||
|
@ -670,7 +670,7 @@
|
||||||
<string name="proxy-Member variable name">""</string>
|
<string name="proxy-Member variable name">""</string>
|
||||||
<string name="proxy-AlignH">"Centre"</string>
|
<string name="proxy-AlignH">"Centre"</string>
|
||||||
<string name="proxy-AlignV">"Centre"</string>
|
<string name="proxy-AlignV">"Centre"</string>
|
||||||
<long name="proxy-Stretch factor">0</long>
|
<long name="proxy-Stretch factor">1</long>
|
||||||
<long name="proxy-Border">5</long>
|
<long name="proxy-Border">5</long>
|
||||||
<bool name="proxy-wxLEFT">0</bool>
|
<bool name="proxy-wxLEFT">0</bool>
|
||||||
<bool name="proxy-wxRIGHT">0</bool>
|
<bool name="proxy-wxRIGHT">0</bool>
|
||||||
|
@ -693,7 +693,7 @@
|
||||||
<string name="proxy-type">"wbBoxSizerProxy"</string>
|
<string name="proxy-type">"wbBoxSizerProxy"</string>
|
||||||
<string name="proxy-Orientation">"Horizontal"</string>
|
<string name="proxy-Orientation">"Horizontal"</string>
|
||||||
<string name="proxy-Member variable name">""</string>
|
<string name="proxy-Member variable name">""</string>
|
||||||
<string name="proxy-AlignH">"Centre"</string>
|
<string name="proxy-AlignH">"Expand"</string>
|
||||||
<string name="proxy-AlignV">"Centre"</string>
|
<string name="proxy-AlignV">"Centre"</string>
|
||||||
<long name="proxy-Stretch factor">0</long>
|
<long name="proxy-Stretch factor">0</long>
|
||||||
<long name="proxy-Border">5</long>
|
<long name="proxy-Border">5</long>
|
||||||
|
@ -898,7 +898,7 @@
|
||||||
<string name="proxy-Member variable name">""</string>
|
<string name="proxy-Member variable name">""</string>
|
||||||
<string name="proxy-AlignH">"Expand"</string>
|
<string name="proxy-AlignH">"Expand"</string>
|
||||||
<string name="proxy-AlignV">"Centre"</string>
|
<string name="proxy-AlignV">"Centre"</string>
|
||||||
<long name="proxy-Stretch factor">0</long>
|
<long name="proxy-Stretch factor">1</long>
|
||||||
<long name="proxy-Border">5</long>
|
<long name="proxy-Border">5</long>
|
||||||
<bool name="proxy-wxLEFT">0</bool>
|
<bool name="proxy-wxLEFT">0</bool>
|
||||||
<bool name="proxy-wxRIGHT">0</bool>
|
<bool name="proxy-wxRIGHT">0</bool>
|
||||||
|
@ -1027,7 +1027,7 @@
|
||||||
<long name="proxy-Height">200</long>
|
<long name="proxy-Height">200</long>
|
||||||
<string name="proxy-AlignH">"Expand"</string>
|
<string name="proxy-AlignH">"Expand"</string>
|
||||||
<string name="proxy-AlignV">"Centre"</string>
|
<string name="proxy-AlignV">"Centre"</string>
|
||||||
<long name="proxy-Stretch factor">0</long>
|
<long name="proxy-Stretch factor">1</long>
|
||||||
<long name="proxy-Border">5</long>
|
<long name="proxy-Border">5</long>
|
||||||
<bool name="proxy-wxLEFT">1</bool>
|
<bool name="proxy-wxLEFT">1</bool>
|
||||||
<bool name="proxy-wxRIGHT">1</bool>
|
<bool name="proxy-wxRIGHT">1</bool>
|
||||||
|
@ -1082,7 +1082,7 @@
|
||||||
<string name="proxy-Member variable name">""</string>
|
<string name="proxy-Member variable name">""</string>
|
||||||
<string name="proxy-AlignH">"Centre"</string>
|
<string name="proxy-AlignH">"Centre"</string>
|
||||||
<string name="proxy-AlignV">"Centre"</string>
|
<string name="proxy-AlignV">"Centre"</string>
|
||||||
<long name="proxy-Stretch factor">0</long>
|
<long name="proxy-Stretch factor">1</long>
|
||||||
<long name="proxy-Border">5</long>
|
<long name="proxy-Border">5</long>
|
||||||
<bool name="proxy-wxLEFT">0</bool>
|
<bool name="proxy-wxLEFT">0</bool>
|
||||||
<bool name="proxy-wxRIGHT">0</bool>
|
<bool name="proxy-wxRIGHT">0</bool>
|
||||||
|
@ -1105,7 +1105,7 @@
|
||||||
<string name="proxy-type">"wbBoxSizerProxy"</string>
|
<string name="proxy-type">"wbBoxSizerProxy"</string>
|
||||||
<string name="proxy-Orientation">"Horizontal"</string>
|
<string name="proxy-Orientation">"Horizontal"</string>
|
||||||
<string name="proxy-Member variable name">""</string>
|
<string name="proxy-Member variable name">""</string>
|
||||||
<string name="proxy-AlignH">"Centre"</string>
|
<string name="proxy-AlignH">"Expand"</string>
|
||||||
<string name="proxy-AlignV">"Centre"</string>
|
<string name="proxy-AlignV">"Centre"</string>
|
||||||
<long name="proxy-Stretch factor">0</long>
|
<long name="proxy-Stretch factor">0</long>
|
||||||
<long name="proxy-Border">5</long>
|
<long name="proxy-Border">5</long>
|
||||||
|
@ -1310,7 +1310,7 @@
|
||||||
<string name="proxy-Member variable name">""</string>
|
<string name="proxy-Member variable name">""</string>
|
||||||
<string name="proxy-AlignH">"Expand"</string>
|
<string name="proxy-AlignH">"Expand"</string>
|
||||||
<string name="proxy-AlignV">"Centre"</string>
|
<string name="proxy-AlignV">"Centre"</string>
|
||||||
<long name="proxy-Stretch factor">0</long>
|
<long name="proxy-Stretch factor">1</long>
|
||||||
<long name="proxy-Border">5</long>
|
<long name="proxy-Border">5</long>
|
||||||
<bool name="proxy-wxLEFT">0</bool>
|
<bool name="proxy-wxLEFT">0</bool>
|
||||||
<bool name="proxy-wxRIGHT">0</bool>
|
<bool name="proxy-wxRIGHT">0</bool>
|
||||||
|
@ -1439,7 +1439,7 @@
|
||||||
<long name="proxy-Height">200</long>
|
<long name="proxy-Height">200</long>
|
||||||
<string name="proxy-AlignH">"Expand"</string>
|
<string name="proxy-AlignH">"Expand"</string>
|
||||||
<string name="proxy-AlignV">"Centre"</string>
|
<string name="proxy-AlignV">"Centre"</string>
|
||||||
<long name="proxy-Stretch factor">0</long>
|
<long name="proxy-Stretch factor">1</long>
|
||||||
<long name="proxy-Border">5</long>
|
<long name="proxy-Border">5</long>
|
||||||
<bool name="proxy-wxLEFT">1</bool>
|
<bool name="proxy-wxLEFT">1</bool>
|
||||||
<bool name="proxy-wxRIGHT">1</bool>
|
<bool name="proxy-wxRIGHT">1</bool>
|
||||||
|
|
|
@ -133,7 +133,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
|
||||||
SetFont(*g_DialogFont);
|
SetFont(*g_DialogFont);
|
||||||
|
|
||||||
////@begin WinEDA_FootprintDisplayOptionsFrame content construction
|
////@begin WinEDA_FootprintDisplayOptionsFrame content construction
|
||||||
// Generated by DialogBlocks, 25/10/2007 10:39:07 (unregistered)
|
// Generated by DialogBlocks, 27/10/2007 09:57:04 (unregistered)
|
||||||
|
|
||||||
WinEDA_FootprintDisplayOptionsFrame* itemDialog1 = this;
|
WinEDA_FootprintDisplayOptionsFrame* itemDialog1 = this;
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
|
||||||
m_EdgesDisplayOptionStrings.Add(_("&Sketch"));
|
m_EdgesDisplayOptionStrings.Add(_("&Sketch"));
|
||||||
m_EdgesDisplayOption = new wxRadioBox( itemDialog1, EDGE_SELECT, _("Edges:"), wxDefaultPosition, wxDefaultSize, m_EdgesDisplayOptionStrings, 1, wxRA_SPECIFY_COLS );
|
m_EdgesDisplayOption = new wxRadioBox( itemDialog1, EDGE_SELECT, _("Edges:"), wxDefaultPosition, wxDefaultSize, m_EdgesDisplayOptionStrings, 1, wxRA_SPECIFY_COLS );
|
||||||
m_EdgesDisplayOption->SetSelection(0);
|
m_EdgesDisplayOption->SetSelection(0);
|
||||||
MainBoxSizer->Add(m_EdgesDisplayOption, 1, wxALIGN_TOP|wxALL, 5);
|
MainBoxSizer->Add(m_EdgesDisplayOption, 0, wxALIGN_TOP|wxALL, 5);
|
||||||
|
|
||||||
wxArrayString m_TextDisplayOptionStrings;
|
wxArrayString m_TextDisplayOptionStrings;
|
||||||
m_TextDisplayOptionStrings.Add(_("&Line"));
|
m_TextDisplayOptionStrings.Add(_("&Line"));
|
||||||
|
@ -157,7 +157,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
|
||||||
m_TextDisplayOptionStrings.Add(_("&Sketch"));
|
m_TextDisplayOptionStrings.Add(_("&Sketch"));
|
||||||
m_TextDisplayOption = new wxRadioBox( itemDialog1, TEXT_SELECT, _("Texts:"), wxDefaultPosition, wxDefaultSize, m_TextDisplayOptionStrings, 1, wxRA_SPECIFY_COLS );
|
m_TextDisplayOption = new wxRadioBox( itemDialog1, TEXT_SELECT, _("Texts:"), wxDefaultPosition, wxDefaultSize, m_TextDisplayOptionStrings, 1, wxRA_SPECIFY_COLS );
|
||||||
m_TextDisplayOption->SetSelection(0);
|
m_TextDisplayOption->SetSelection(0);
|
||||||
MainBoxSizer->Add(m_TextDisplayOption, 1, wxALIGN_TOP|wxALL, 5);
|
MainBoxSizer->Add(m_TextDisplayOption, 0, wxALIGN_TOP|wxALL, 5);
|
||||||
|
|
||||||
ColumnBoxSizer = new wxBoxSizer(wxVERTICAL);
|
ColumnBoxSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
MainBoxSizer->Add(ColumnBoxSizer, 1, wxALIGN_TOP|wxLEFT|wxRIGHT|wxTOP, 5);
|
MainBoxSizer->Add(ColumnBoxSizer, 1, wxALIGN_TOP|wxLEFT|wxRIGHT|wxTOP, 5);
|
||||||
|
@ -168,14 +168,14 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
|
||||||
|
|
||||||
m_IsShowPadNum = new wxCheckBox( itemDialog1, PADNUM_OPT, _("Display Pad &Num"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
m_IsShowPadNum = new wxCheckBox( itemDialog1, PADNUM_OPT, _("Display Pad &Num"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
||||||
m_IsShowPadNum->SetValue(false);
|
m_IsShowPadNum->SetValue(false);
|
||||||
if (WinEDA_FootprintDisplayOptionsFrame::ShowToolTips())
|
if (ShowToolTips())
|
||||||
m_IsShowPadNum->SetToolTip(_("Display pad number"));
|
m_IsShowPadNum->SetToolTip(_("Display pad number"));
|
||||||
ColumnBoxSizer->Add(m_IsShowPadNum, 1, wxGROW|wxALL, 5);
|
ColumnBoxSizer->Add(m_IsShowPadNum, 1, wxGROW|wxALL, 5);
|
||||||
|
|
||||||
ColumnBoxSizer->Add(5, 5, 0, wxGROW|wxTOP, 5);
|
ColumnBoxSizer->Add(5, 5, 0, wxGROW|wxTOP, 5);
|
||||||
|
|
||||||
wxButton* itemButton10 = new wxButton( itemDialog1, ID_SAVE_CONFIG, _("Save Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxButton* itemButton10 = new wxButton( itemDialog1, ID_SAVE_CONFIG, _("Save Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
ColumnBoxSizer->Add(itemButton10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5);
|
ColumnBoxSizer->Add(itemButton10, 0, wxALIGN_LEFT|wxALL, 5);
|
||||||
|
|
||||||
wxStaticLine* itemStaticLine11 = new wxStaticLine( itemDialog1, ID_STATICLINE1, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
wxStaticLine* itemStaticLine11 = new wxStaticLine( itemDialog1, ID_STATICLINE1, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
OuterBoxSizer->Add(itemStaticLine11, 0, wxGROW|wxALL, 5);
|
OuterBoxSizer->Add(itemStaticLine11, 0, wxGROW|wxALL, 5);
|
||||||
|
|
|
@ -10,10 +10,8 @@
|
||||||
<bool name="convert_images_to_xpm">0</bool>
|
<bool name="convert_images_to_xpm">0</bool>
|
||||||
<bool name="inline_images">0</bool>
|
<bool name="inline_images">0</bool>
|
||||||
<bool name="generate_cpp_for_xrc">0</bool>
|
<bool name="generate_cpp_for_xrc">0</bool>
|
||||||
<long name="working_mode">1</long>
|
|
||||||
<bool name="use_help_text_for_tooltips">1</bool>
|
<bool name="use_help_text_for_tooltips">1</bool>
|
||||||
<bool name="translate_strings">1</bool>
|
<bool name="translate_strings">1</bool>
|
||||||
<bool name="make_unicode_strings">1</bool>
|
|
||||||
<bool name="extract_strings">0</bool>
|
<bool name="extract_strings">0</bool>
|
||||||
<string name="user_name">"jean-pierre Charras"</string>
|
<string name="user_name">"jean-pierre Charras"</string>
|
||||||
<string name="copyright_string">"License GNU"</string>
|
<string name="copyright_string">"License GNU"</string>
|
||||||
|
@ -215,7 +213,6 @@
|
||||||
<bool name="use-id-suffix">0</bool>
|
<bool name="use-id-suffix">0</bool>
|
||||||
<string name="id-suffix">""</string>
|
<string name="id-suffix">""</string>
|
||||||
<long name="use-xrc">0</long>
|
<long name="use-xrc">0</long>
|
||||||
<long name="working-mode">0</long>
|
|
||||||
<string name="proxy-Id name">"ID_DIALOG"</string>
|
<string name="proxy-Id name">"ID_DIALOG"</string>
|
||||||
<long name="proxy-Id value">10000</long>
|
<long name="proxy-Id value">10000</long>
|
||||||
<string name="proxy-Class">"WinEDA_FootprintDisplayOptionsFrame"</string>
|
<string name="proxy-Class">"WinEDA_FootprintDisplayOptionsFrame"</string>
|
||||||
|
@ -236,13 +233,6 @@
|
||||||
<bool name="proxy-Hidden">0</bool>
|
<bool name="proxy-Hidden">0</bool>
|
||||||
<bool name="proxy-Enabled">1</bool>
|
<bool name="proxy-Enabled">1</bool>
|
||||||
<string name="proxy-Platform">"<Any platform>"</string>
|
<string name="proxy-Platform">"<Any platform>"</string>
|
||||||
<string name="proxy-Data source">""</string>
|
|
||||||
<string name="proxy-Data class name">""</string>
|
|
||||||
<string name="proxy-Data class implementation filename">""</string>
|
|
||||||
<string name="proxy-Data class header filename">""</string>
|
|
||||||
<string name="proxy-Data class manager window">""</string>
|
|
||||||
<string name="proxy-Texture">""</string>
|
|
||||||
<string name="proxy-Texture style">"Tiled"</string>
|
|
||||||
<bool name="proxy-wxDEFAULT_DIALOG_STYLE">1</bool>
|
<bool name="proxy-wxDEFAULT_DIALOG_STYLE">1</bool>
|
||||||
<bool name="proxy-wxCAPTION">0</bool>
|
<bool name="proxy-wxCAPTION">0</bool>
|
||||||
<bool name="proxy-wxRESIZE_BORDER">0</bool>
|
<bool name="proxy-wxRESIZE_BORDER">0</bool>
|
||||||
|
@ -353,11 +343,6 @@
|
||||||
<string name="proxy-Platform">"<Any platform>"</string>
|
<string name="proxy-Platform">"<Any platform>"</string>
|
||||||
<string name="proxy-Data variable">"DisplayOpt.DisplayModEdge"</string>
|
<string name="proxy-Data variable">"DisplayOpt.DisplayModEdge"</string>
|
||||||
<string name="proxy-Data validator">"wxGenericValidator(& %VARIABLE%)"</string>
|
<string name="proxy-Data validator">"wxGenericValidator(& %VARIABLE%)"</string>
|
||||||
<string name="proxy-Data source">""</string>
|
|
||||||
<string name="proxy-Data class name">""</string>
|
|
||||||
<string name="proxy-Data class implementation filename">""</string>
|
|
||||||
<string name="proxy-Data class header filename">""</string>
|
|
||||||
<string name="proxy-Data class manager window">""</string>
|
|
||||||
<bool name="proxy-wxRA_SPECIFY_ROWS">0</bool>
|
<bool name="proxy-wxRA_SPECIFY_ROWS">0</bool>
|
||||||
<bool name="proxy-wxRA_SPECIFY_COLS">1</bool>
|
<bool name="proxy-wxRA_SPECIFY_COLS">1</bool>
|
||||||
<bool name="proxy-wxWANTS_CHARS">0</bool>
|
<bool name="proxy-wxWANTS_CHARS">0</bool>
|
||||||
|
@ -370,7 +355,7 @@
|
||||||
<long name="proxy-Height">-1</long>
|
<long name="proxy-Height">-1</long>
|
||||||
<string name="proxy-AlignH">"Centre"</string>
|
<string name="proxy-AlignH">"Centre"</string>
|
||||||
<string name="proxy-AlignV">"Top"</string>
|
<string name="proxy-AlignV">"Top"</string>
|
||||||
<long name="proxy-Stretch factor">1</long>
|
<long name="proxy-Stretch factor">0</long>
|
||||||
<long name="proxy-Border">5</long>
|
<long name="proxy-Border">5</long>
|
||||||
<bool name="proxy-wxLEFT">1</bool>
|
<bool name="proxy-wxLEFT">1</bool>
|
||||||
<bool name="proxy-wxRIGHT">1</bool>
|
<bool name="proxy-wxRIGHT">1</bool>
|
||||||
|
@ -416,11 +401,6 @@
|
||||||
<string name="proxy-Platform">"<Any platform>"</string>
|
<string name="proxy-Platform">"<Any platform>"</string>
|
||||||
<string name="proxy-Data variable">"DisplayOpt.DisplayModText"</string>
|
<string name="proxy-Data variable">"DisplayOpt.DisplayModText"</string>
|
||||||
<string name="proxy-Data validator">"wxGenericValidator(& %VARIABLE%)"</string>
|
<string name="proxy-Data validator">"wxGenericValidator(& %VARIABLE%)"</string>
|
||||||
<string name="proxy-Data source">""</string>
|
|
||||||
<string name="proxy-Data class name">""</string>
|
|
||||||
<string name="proxy-Data class implementation filename">""</string>
|
|
||||||
<string name="proxy-Data class header filename">""</string>
|
|
||||||
<string name="proxy-Data class manager window">""</string>
|
|
||||||
<bool name="proxy-wxRA_SPECIFY_ROWS">0</bool>
|
<bool name="proxy-wxRA_SPECIFY_ROWS">0</bool>
|
||||||
<bool name="proxy-wxRA_SPECIFY_COLS">1</bool>
|
<bool name="proxy-wxRA_SPECIFY_COLS">1</bool>
|
||||||
<bool name="proxy-wxWANTS_CHARS">0</bool>
|
<bool name="proxy-wxWANTS_CHARS">0</bool>
|
||||||
|
@ -433,7 +413,7 @@
|
||||||
<long name="proxy-Height">-1</long>
|
<long name="proxy-Height">-1</long>
|
||||||
<string name="proxy-AlignH">"Centre"</string>
|
<string name="proxy-AlignH">"Centre"</string>
|
||||||
<string name="proxy-AlignV">"Top"</string>
|
<string name="proxy-AlignV">"Top"</string>
|
||||||
<long name="proxy-Stretch factor">1</long>
|
<long name="proxy-Stretch factor">0</long>
|
||||||
<long name="proxy-Border">5</long>
|
<long name="proxy-Border">5</long>
|
||||||
<bool name="proxy-wxLEFT">1</bool>
|
<bool name="proxy-wxLEFT">1</bool>
|
||||||
<bool name="proxy-wxRIGHT">1</bool>
|
<bool name="proxy-wxRIGHT">1</bool>
|
||||||
|
@ -496,11 +476,6 @@
|
||||||
<string name="proxy-Tooltip text">""</string>
|
<string name="proxy-Tooltip text">""</string>
|
||||||
<string name="proxy-Data variable">"DisplayOpt.DisplayPadFill"</string>
|
<string name="proxy-Data variable">"DisplayOpt.DisplayPadFill"</string>
|
||||||
<string name="proxy-Data validator">"wxGenericValidator(& %VARIABLE%)"</string>
|
<string name="proxy-Data validator">"wxGenericValidator(& %VARIABLE%)"</string>
|
||||||
<string name="proxy-Data source">""</string>
|
|
||||||
<string name="proxy-Data class name">""</string>
|
|
||||||
<string name="proxy-Data class implementation filename">""</string>
|
|
||||||
<string name="proxy-Data class header filename">""</string>
|
|
||||||
<string name="proxy-Data class manager window">""</string>
|
|
||||||
<string name="proxy-Background colour">""</string>
|
<string name="proxy-Background colour">""</string>
|
||||||
<string name="proxy-Foreground colour">""</string>
|
<string name="proxy-Foreground colour">""</string>
|
||||||
<string name="proxy-Font">""</string>
|
<string name="proxy-Font">""</string>
|
||||||
|
@ -559,11 +534,6 @@
|
||||||
<string name="proxy-Tooltip text">"Display pad number"</string>
|
<string name="proxy-Tooltip text">"Display pad number"</string>
|
||||||
<string name="proxy-Data variable">"DisplayOpt.DisplayPadNum"</string>
|
<string name="proxy-Data variable">"DisplayOpt.DisplayPadNum"</string>
|
||||||
<string name="proxy-Data validator">"wxGenericValidator(& %VARIABLE%)"</string>
|
<string name="proxy-Data validator">"wxGenericValidator(& %VARIABLE%)"</string>
|
||||||
<string name="proxy-Data source">""</string>
|
|
||||||
<string name="proxy-Data class name">""</string>
|
|
||||||
<string name="proxy-Data class implementation filename">""</string>
|
|
||||||
<string name="proxy-Data class header filename">""</string>
|
|
||||||
<string name="proxy-Data class manager window">""</string>
|
|
||||||
<string name="proxy-Background colour">""</string>
|
<string name="proxy-Background colour">""</string>
|
||||||
<string name="proxy-Foreground colour">""</string>
|
<string name="proxy-Foreground colour">""</string>
|
||||||
<string name="proxy-Font">""</string>
|
<string name="proxy-Font">""</string>
|
||||||
|
@ -647,13 +617,6 @@
|
||||||
<bool name="proxy-Default">0</bool>
|
<bool name="proxy-Default">0</bool>
|
||||||
<string name="proxy-Help text">""</string>
|
<string name="proxy-Help text">""</string>
|
||||||
<string name="proxy-Tooltip text">""</string>
|
<string name="proxy-Tooltip text">""</string>
|
||||||
<string name="proxy-Data variable">""</string>
|
|
||||||
<string name="proxy-Data validator">""</string>
|
|
||||||
<string name="proxy-Data source">""</string>
|
|
||||||
<string name="proxy-Data class name">""</string>
|
|
||||||
<string name="proxy-Data class implementation filename">""</string>
|
|
||||||
<string name="proxy-Data class header filename">""</string>
|
|
||||||
<string name="proxy-Data class manager window">""</string>
|
|
||||||
<string name="proxy-Background colour">""</string>
|
<string name="proxy-Background colour">""</string>
|
||||||
<string name="proxy-Foreground colour">""</string>
|
<string name="proxy-Foreground colour">""</string>
|
||||||
<string name="proxy-Font">""</string>
|
<string name="proxy-Font">""</string>
|
||||||
|
@ -681,7 +644,7 @@
|
||||||
<bool name="proxy-wxLEFT">1</bool>
|
<bool name="proxy-wxLEFT">1</bool>
|
||||||
<bool name="proxy-wxRIGHT">1</bool>
|
<bool name="proxy-wxRIGHT">1</bool>
|
||||||
<bool name="proxy-wxTOP">1</bool>
|
<bool name="proxy-wxTOP">1</bool>
|
||||||
<bool name="proxy-wxBOTTOM">0</bool>
|
<bool name="proxy-wxBOTTOM">1</bool>
|
||||||
<bool name="proxy-wxSHAPED">0</bool>
|
<bool name="proxy-wxSHAPED">0</bool>
|
||||||
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
|
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
|
||||||
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
|
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
|
||||||
|
@ -794,13 +757,6 @@
|
||||||
<bool name="proxy-Default">1</bool>
|
<bool name="proxy-Default">1</bool>
|
||||||
<string name="proxy-Help text">""</string>
|
<string name="proxy-Help text">""</string>
|
||||||
<string name="proxy-Tooltip text">""</string>
|
<string name="proxy-Tooltip text">""</string>
|
||||||
<string name="proxy-Data variable">""</string>
|
|
||||||
<string name="proxy-Data validator">""</string>
|
|
||||||
<string name="proxy-Data source">""</string>
|
|
||||||
<string name="proxy-Data class name">""</string>
|
|
||||||
<string name="proxy-Data class implementation filename">""</string>
|
|
||||||
<string name="proxy-Data class header filename">""</string>
|
|
||||||
<string name="proxy-Data class manager window">""</string>
|
|
||||||
<string name="proxy-Background colour">""</string>
|
<string name="proxy-Background colour">""</string>
|
||||||
<string name="proxy-Foreground colour">"FF0000"</string>
|
<string name="proxy-Foreground colour">"FF0000"</string>
|
||||||
<string name="proxy-Font">""</string>
|
<string name="proxy-Font">""</string>
|
||||||
|
@ -860,13 +816,6 @@
|
||||||
<bool name="proxy-Default">0</bool>
|
<bool name="proxy-Default">0</bool>
|
||||||
<string name="proxy-Help text">""</string>
|
<string name="proxy-Help text">""</string>
|
||||||
<string name="proxy-Tooltip text">""</string>
|
<string name="proxy-Tooltip text">""</string>
|
||||||
<string name="proxy-Data variable">""</string>
|
|
||||||
<string name="proxy-Data validator">""</string>
|
|
||||||
<string name="proxy-Data source">""</string>
|
|
||||||
<string name="proxy-Data class name">""</string>
|
|
||||||
<string name="proxy-Data class implementation filename">""</string>
|
|
||||||
<string name="proxy-Data class header filename">""</string>
|
|
||||||
<string name="proxy-Data class manager window">""</string>
|
|
||||||
<string name="proxy-Background colour">""</string>
|
<string name="proxy-Background colour">""</string>
|
||||||
<string name="proxy-Foreground colour">"0000FF"</string>
|
<string name="proxy-Foreground colour">"0000FF"</string>
|
||||||
<string name="proxy-Font">""</string>
|
<string name="proxy-Font">""</string>
|
||||||
|
@ -926,13 +875,6 @@
|
||||||
<bool name="proxy-Default">0</bool>
|
<bool name="proxy-Default">0</bool>
|
||||||
<string name="proxy-Help text">""</string>
|
<string name="proxy-Help text">""</string>
|
||||||
<string name="proxy-Tooltip text">""</string>
|
<string name="proxy-Tooltip text">""</string>
|
||||||
<string name="proxy-Data variable">""</string>
|
|
||||||
<string name="proxy-Data validator">""</string>
|
|
||||||
<string name="proxy-Data source">""</string>
|
|
||||||
<string name="proxy-Data class name">""</string>
|
|
||||||
<string name="proxy-Data class implementation filename">""</string>
|
|
||||||
<string name="proxy-Data class header filename">""</string>
|
|
||||||
<string name="proxy-Data class manager window">""</string>
|
|
||||||
<string name="proxy-Background colour">""</string>
|
<string name="proxy-Background colour">""</string>
|
||||||
<string name="proxy-Foreground colour">""</string>
|
<string name="proxy-Foreground colour">""</string>
|
||||||
<string name="proxy-Font">""</string>
|
<string name="proxy-Font">""</string>
|
||||||
|
|
|
@ -29,21 +29,26 @@ EVT_TOOL( ID_CVPCB_SHOW3D_FRAME, WinEDA_BasePcbFrame::Show3D_Frame )
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************/
|
/***************************************************************************/
|
||||||
/* Constructeur de WinEDA_DisplayFrame: la fenetre de visu du composant */
|
/* WinEDA_DisplayFrame: the frame to display the current focused footprint */
|
||||||
/*********************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
WinEDA_DisplayFrame::WinEDA_DisplayFrame( wxWindow* father, WinEDA_App* parent,
|
WinEDA_DisplayFrame::WinEDA_DisplayFrame( wxWindow* father, WinEDA_App* parent,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size ) :
|
const wxPoint& pos, const wxSize& size, long style ) :
|
||||||
WinEDA_BasePcbFrame( father, parent, CVPCB_DISPLAY_FRAME, title, pos, size )
|
WinEDA_BasePcbFrame( father, parent, CVPCB_DISPLAY_FRAME, title, pos, size, style )
|
||||||
{
|
{
|
||||||
m_FrameName = wxT( "CmpFrame" );
|
m_FrameName = wxT( "CmpFrame" );
|
||||||
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
|
m_Draw_Axis = TRUE; // TRUE if we want the axis
|
||||||
m_Draw_Grid = TRUE; // TRUE pour avoir la axes dessinee
|
m_Draw_Grid = TRUE; // TRUE if we want the grid
|
||||||
m_Draw_Sheet_Ref = FALSE; // TRUE pour avoir le cartouche dessiné
|
m_Draw_Sheet_Ref = FALSE; // TRUE if we want the sheet references
|
||||||
|
|
||||||
SetIcon( wxIcon( wxT( "icon_cvpcb" ) ) ); // Give an icon
|
// Give an icon
|
||||||
|
#ifdef __WINDOWS__
|
||||||
|
SetIcon( wxICON( a_icon_cvpcb ) );
|
||||||
|
#else
|
||||||
|
SetIcon( wxICON( icon_cvpcb ) );
|
||||||
|
#endif
|
||||||
SetTitle( title );
|
SetTitle( title );
|
||||||
|
|
||||||
m_Pcb = new BOARD( NULL, this );
|
m_Pcb = new BOARD( NULL, this );
|
||||||
|
@ -58,17 +63,16 @@ WinEDA_DisplayFrame::WinEDA_DisplayFrame( wxWindow* father, WinEDA_App* parent,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************/
|
/******************************************/
|
||||||
/* Fonctions de base de WinEDA_DisplayFrame */
|
|
||||||
/*****************************************/
|
|
||||||
|
|
||||||
// Destructeur
|
|
||||||
WinEDA_DisplayFrame::~WinEDA_DisplayFrame()
|
WinEDA_DisplayFrame::~WinEDA_DisplayFrame()
|
||||||
|
/******************************************/
|
||||||
|
|
||||||
|
// Destructor
|
||||||
{
|
{
|
||||||
delete m_CurrentScreen;
|
delete m_CurrentScreen;
|
||||||
|
|
||||||
delete m_Pcb;
|
delete m_Pcb;
|
||||||
|
|
||||||
m_Parent->m_CvpcbFrame->DrawFrame = NULL;
|
m_Parent->m_CvpcbFrame->DrawFrame = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +81,8 @@ WinEDA_DisplayFrame::~WinEDA_DisplayFrame()
|
||||||
void WinEDA_DisplayFrame::OnCloseWindow( wxCloseEvent& event )
|
void WinEDA_DisplayFrame::OnCloseWindow( wxCloseEvent& event )
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
|
|
||||||
/* Fermeture par icone ou systeme
|
/* Called when the frame is closed
|
||||||
|
* Save current settings (frame position and size
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
wxPoint pos;
|
wxPoint pos;
|
||||||
|
@ -162,12 +167,12 @@ void WinEDA_DisplayFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
|
||||||
bool WinEDA_DisplayFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu )
|
bool WinEDA_DisplayFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu )
|
||||||
/*********************************************************************************/
|
/*********************************************************************************/
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
void WinEDA_DisplayFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
{
|
{
|
||||||
wxSize delta;
|
wxSize delta;
|
||||||
|
@ -216,28 +221,28 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||||
m_CurrentScreen->m_O_Curseur = m_CurrentScreen->m_Curseur;
|
m_CurrentScreen->m_O_Curseur = m_CurrentScreen->m_Curseur;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_NUMPAD8: /* Deplacement curseur vers le haut */
|
case WXK_NUMPAD8: /* cursor moved up */
|
||||||
case WXK_UP:
|
case WXK_UP:
|
||||||
DrawPanel->CalcScrolledPosition( Mouse.x, Mouse.y - delta.y,
|
DrawPanel->CalcScrolledPosition( Mouse.x, Mouse.y - delta.y,
|
||||||
&Mouse.x, &Mouse.y );
|
&Mouse.x, &Mouse.y );
|
||||||
GRMouseWarp( DrawPanel, Mouse );
|
GRMouseWarp( DrawPanel, Mouse );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_NUMPAD2: /* Deplacement curseur vers le bas */
|
case WXK_NUMPAD2: /* cursor moved down */
|
||||||
case WXK_DOWN:
|
case WXK_DOWN:
|
||||||
DrawPanel->CalcScrolledPosition( Mouse.x, Mouse.y + delta.y,
|
DrawPanel->CalcScrolledPosition( Mouse.x, Mouse.y + delta.y,
|
||||||
&Mouse.x, &Mouse.y );
|
&Mouse.x, &Mouse.y );
|
||||||
GRMouseWarp( DrawPanel, Mouse );
|
GRMouseWarp( DrawPanel, Mouse );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_NUMPAD4: /* Deplacement curseur vers la gauche */
|
case WXK_NUMPAD4: /* cursor moved left */
|
||||||
case WXK_LEFT:
|
case WXK_LEFT:
|
||||||
DrawPanel->CalcScrolledPosition( Mouse.x - delta.x, Mouse.y,
|
DrawPanel->CalcScrolledPosition( Mouse.x - delta.x, Mouse.y,
|
||||||
&Mouse.x, &Mouse.y );
|
&Mouse.x, &Mouse.y );
|
||||||
GRMouseWarp( DrawPanel, Mouse );
|
GRMouseWarp( DrawPanel, Mouse );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_NUMPAD6: /* Deplacement curseur vers la droite */
|
case WXK_NUMPAD6: /* cursor moved right */
|
||||||
case WXK_RIGHT:
|
case WXK_RIGHT:
|
||||||
DrawPanel->CalcScrolledPosition( Mouse.x + delta.x, Mouse.y,
|
DrawPanel->CalcScrolledPosition( Mouse.x + delta.x, Mouse.y,
|
||||||
&Mouse.x, &Mouse.y );
|
&Mouse.x, &Mouse.y );
|
||||||
|
@ -246,9 +251,8 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Recalcul de la position du curseur schema */
|
|
||||||
m_CurrentScreen->m_Curseur = curpos;
|
m_CurrentScreen->m_Curseur = curpos;
|
||||||
/* Placement sur la grille generale */
|
/* Put cursor on grid */
|
||||||
PutOnGrid( &m_CurrentScreen->m_Curseur );
|
PutOnGrid( &m_CurrentScreen->m_Curseur );
|
||||||
|
|
||||||
if( m_CurrentScreen->IsRefreshReq() )
|
if( m_CurrentScreen->IsRefreshReq() )
|
||||||
|
@ -276,7 +280,7 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Affiche_Status_Box(); /* Affichage des coord curseur */
|
Affiche_Status_Box(); /* Display new cursor coordinates */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -284,10 +288,11 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||||
void WinEDA_DisplayFrame::Process_Special_Functions( wxCommandEvent& event )
|
void WinEDA_DisplayFrame::Process_Special_Functions( wxCommandEvent& event )
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
/* Traite les selections d'outils et les commandes appelees du menu POPUP
|
/* Called when a tool is selected, or when a popup menu is clicked
|
||||||
|
* Currently : no action exists
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int id = event.GetId();
|
int id = event.GetId();
|
||||||
|
|
||||||
wxClientDC dc( DrawPanel );
|
wxClientDC dc( DrawPanel );
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@ OBJECTS = $(TARGET).o \
|
||||||
setvisu.o\
|
setvisu.o\
|
||||||
dialog_display_options.o\
|
dialog_display_options.o\
|
||||||
zoom.o \
|
zoom.o \
|
||||||
visumod.o\
|
|
||||||
tracemod.o \
|
tracemod.o \
|
||||||
classpcb.o \
|
classpcb.o \
|
||||||
class_board.o \
|
class_board.o \
|
||||||
|
@ -136,8 +135,6 @@ setvisu.o: setvisu.cpp $(DEPEND)
|
||||||
zoom.o: ../share/zoom.cpp $(DEPEND)
|
zoom.o: ../share/zoom.cpp $(DEPEND)
|
||||||
$(CC) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp
|
$(CC) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp
|
||||||
|
|
||||||
visumod.o: visumod.cpp $(DEPEND)
|
|
||||||
|
|
||||||
tracemod.o: ../pcbnew/tracemod.cpp ../include/gr_basic.h $(DEPEND)
|
tracemod.o: ../pcbnew/tracemod.cpp ../include/gr_basic.h $(DEPEND)
|
||||||
$(CC) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
|
$(CC) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
void WinEDA_CvpcbFrame::CreateScreenCmp()
|
void WinEDA_CvpcbFrame::CreateScreenCmp()
|
||||||
/*******************************************/
|
/*******************************************/
|
||||||
|
|
||||||
/* Creation de la fenetre d'affichage du composant
|
/* Create or Update the frame showing the current highlighted footprint
|
||||||
|
* and (if showed) the 3D display frame
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
wxString msg, FootprintName;
|
wxString msg, FootprintName;
|
||||||
|
@ -28,15 +29,13 @@ void WinEDA_CvpcbFrame::CreateScreenCmp()
|
||||||
if( DrawFrame == NULL )
|
if( DrawFrame == NULL )
|
||||||
{
|
{
|
||||||
DrawFrame = new WinEDA_DisplayFrame( this, m_Parent, _( "Module" ),
|
DrawFrame = new WinEDA_DisplayFrame( this, m_Parent, _( "Module" ),
|
||||||
wxPoint( 0, 0 ), wxSize( 600, 400 ) );
|
wxPoint( 0, 0 ), wxSize( 600,
|
||||||
|
400 ),
|
||||||
|
KICAD_DEFAULT_DRAWFRAME_STYLE |
|
||||||
|
wxFRAME_FLOAT_ON_PARENT );
|
||||||
IsNew = TRUE;
|
IsNew = TRUE;
|
||||||
|
DrawFrame->Show( TRUE );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
DrawFrame->Maximize( FALSE );
|
|
||||||
|
|
||||||
DrawFrame->SetFocus(); /* Active entree clavier */
|
|
||||||
DrawFrame->Show( TRUE );
|
|
||||||
|
|
||||||
if( !FootprintName.IsEmpty() )
|
if( !FootprintName.IsEmpty() )
|
||||||
{
|
{
|
||||||
|
@ -44,19 +43,19 @@ void WinEDA_CvpcbFrame::CreateScreenCmp()
|
||||||
DrawFrame->SetTitle( msg );
|
DrawFrame->SetTitle( msg );
|
||||||
STOREMOD* Module = GetModuleDescrByName( FootprintName );
|
STOREMOD* Module = GetModuleDescrByName( FootprintName );
|
||||||
msg = _( "Lib: " );
|
msg = _( "Lib: " );
|
||||||
|
|
||||||
if( Module )
|
if( Module )
|
||||||
msg += Module->m_LibName;
|
msg += Module->m_LibName;
|
||||||
else
|
else
|
||||||
msg += wxT( "???" );
|
msg += wxT( "???" );
|
||||||
|
|
||||||
DrawFrame->SetStatusText( msg, 0 );
|
DrawFrame->SetStatusText( msg, 0 );
|
||||||
|
|
||||||
if( DrawFrame->m_Pcb->m_Modules )
|
if( DrawFrame->m_Pcb->m_Modules )
|
||||||
{
|
{
|
||||||
// there is only one module in the list
|
// there is only one module in the list
|
||||||
DrawFrame->m_Pcb->m_Modules->DeleteStructure();
|
DrawFrame->m_Pcb->m_Modules->DeleteStructure();
|
||||||
|
|
||||||
DrawFrame->m_Pcb->m_Modules = NULL;
|
DrawFrame->m_Pcb->m_Modules = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,3 +72,32 @@ void WinEDA_CvpcbFrame::CreateScreenCmp()
|
||||||
DrawFrame->m_Draw3DFrame->NewDisplay();
|
DrawFrame->m_Draw3DFrame->NewDisplay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************/
|
||||||
|
void WinEDA_DisplayFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
|
||||||
|
/*******************************************************************/
|
||||||
|
/* Draws the current highlighted footprint */
|
||||||
|
{
|
||||||
|
if( !m_Pcb )
|
||||||
|
return;
|
||||||
|
|
||||||
|
MODULE* Module = m_Pcb->m_Modules;
|
||||||
|
|
||||||
|
ActiveScreen = (PCB_SCREEN*) GetScreen();
|
||||||
|
|
||||||
|
if( EraseBg )
|
||||||
|
DrawPanel->EraseScreen( DC );
|
||||||
|
|
||||||
|
DrawPanel->DrawBackGround( DC );
|
||||||
|
|
||||||
|
if( Module )
|
||||||
|
{
|
||||||
|
Module->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_COPY );
|
||||||
|
Module->Display_Infos( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
Affiche_Status_Box();
|
||||||
|
DrawPanel->Trace_Curseur( DC );
|
||||||
|
}
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
/************************************************/
|
|
||||||
/* Routines de visualisation du module courant */
|
|
||||||
/************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "cvpcb.h"
|
|
||||||
#include "macros.h"
|
|
||||||
#include "pcbnew.h"
|
|
||||||
|
|
||||||
#include "protos.h"
|
|
||||||
|
|
||||||
/* defines locaux */
|
|
||||||
|
|
||||||
/* Variables locales */
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************/
|
|
||||||
void WinEDA_DisplayFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
|
|
||||||
/*******************************************************************/
|
|
||||||
/* Affiche le module courant */
|
|
||||||
{
|
|
||||||
if( !m_Pcb )
|
|
||||||
return;
|
|
||||||
|
|
||||||
MODULE* Module = m_Pcb->m_Modules;
|
|
||||||
|
|
||||||
ActiveScreen = (PCB_SCREEN*) GetScreen();
|
|
||||||
|
|
||||||
if( EraseBg )
|
|
||||||
DrawPanel->EraseScreen( DC );
|
|
||||||
|
|
||||||
DrawPanel->DrawBackGround( DC );
|
|
||||||
|
|
||||||
if( Module )
|
|
||||||
{
|
|
||||||
Module->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_COPY );
|
|
||||||
Module->Display_Infos( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
Affiche_Status_Box();
|
|
||||||
DrawPanel->Trace_Curseur( DC );
|
|
||||||
}
|
|
|
@ -1,282 +0,0 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: dialog_set_status.cpp
|
|
||||||
// Purpose:
|
|
||||||
// Author: jean-pierre Charras
|
|
||||||
// Modified by:
|
|
||||||
// Created: 11/02/2006 21:42:23
|
|
||||||
// RCS-ID:
|
|
||||||
// Copyright: License GNU
|
|
||||||
// Licence:
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// Generated by DialogBlocks (unregistered), 11/02/2006 21:42:23
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
|
||||||
#pragma implementation "dialog_set_status.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 "dialog_set_status.h"
|
|
||||||
|
|
||||||
////@begin XPM images
|
|
||||||
////@end XPM images
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* WinEDA_ConfigFrame type definition
|
|
||||||
*/
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS( WinEDA_ConfigFrame, wxDialog )
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* WinEDA_ConfigFrame event table definition
|
|
||||||
*/
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( WinEDA_ConfigFrame, wxDialog )
|
|
||||||
|
|
||||||
////@begin WinEDA_ConfigFrame event table entries
|
|
||||||
EVT_BUTTON( ID_BUTTON, WinEDA_ConfigFrame::OnButtonClick )
|
|
||||||
|
|
||||||
EVT_BUTTON( ID_BUTTON1, WinEDA_ConfigFrame::OnButton1Click )
|
|
||||||
|
|
||||||
EVT_BUTTON( ID_BUTTON2, WinEDA_ConfigFrame::OnButton2Click )
|
|
||||||
|
|
||||||
EVT_BUTTON( ID_BUTTON3, WinEDA_ConfigFrame::OnButton3Click )
|
|
||||||
|
|
||||||
////@end WinEDA_ConfigFrame event table entries
|
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* WinEDA_ConfigFrame constructors
|
|
||||||
*/
|
|
||||||
|
|
||||||
WinEDA_ConfigFrame::WinEDA_ConfigFrame( )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
WinEDA_ConfigFrame::WinEDA_ConfigFrame( WinEDA_SchematicFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
|
||||||
{
|
|
||||||
m_Parent = parent;
|
|
||||||
m_LibListChanged = FALSE;
|
|
||||||
|
|
||||||
msg = _("from ") + EDA_Appl->m_CurrentOptionFile;
|
|
||||||
SetTitle(msg);
|
|
||||||
Create(parent, id, caption, pos, size, style);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* WinEDA_ConfigFrame creator
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool WinEDA_ConfigFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
|
||||||
{
|
|
||||||
////@begin WinEDA_ConfigFrame member initialisation
|
|
||||||
m_CmpfileExtText = NULL;
|
|
||||||
m_NetfileExtText = NULL;
|
|
||||||
m_LibfileExtText = NULL;
|
|
||||||
m_SymbolfileExtText = NULL;
|
|
||||||
m_SchfileExtText = NULL;
|
|
||||||
m_ListLibr = NULL;
|
|
||||||
m_CmpfileExtText = NULL;
|
|
||||||
m_LibDirCtrl = NULL;
|
|
||||||
////@end WinEDA_ConfigFrame member initialisation
|
|
||||||
|
|
||||||
////@begin WinEDA_ConfigFrame creation
|
|
||||||
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
|
|
||||||
wxDialog::Create( parent, id, caption, pos, size, style );
|
|
||||||
|
|
||||||
CreateControls();
|
|
||||||
GetSizer()->Fit(this);
|
|
||||||
GetSizer()->SetSizeHints(this);
|
|
||||||
Centre();
|
|
||||||
////@end WinEDA_ConfigFrame creation
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Control creation for WinEDA_ConfigFrame
|
|
||||||
*/
|
|
||||||
|
|
||||||
void WinEDA_ConfigFrame::CreateControls()
|
|
||||||
{
|
|
||||||
SetFont(*g_DialogFont);
|
|
||||||
////@begin WinEDA_ConfigFrame content construction
|
|
||||||
// Generated by DialogBlocks, 11/02/2006 22:06:21 (unregistered)
|
|
||||||
|
|
||||||
WinEDA_ConfigFrame* itemDialog1 = this;
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
|
|
||||||
itemDialog1->SetSizer(itemBoxSizer2);
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
|
|
||||||
itemBoxSizer2->Add(itemBoxSizer3, 0, 0, 0);
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
|
|
||||||
itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
|
||||||
|
|
||||||
wxButton* itemButton5 = new wxButton( itemDialog1, ID_BUTTON, _("Save Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemButton5->SetForegroundColour(wxColour(204, 0, 0));
|
|
||||||
itemBoxSizer4->Add(itemButton5, 0, wxGROW|wxALL, 5);
|
|
||||||
|
|
||||||
wxString itemRadioBox6Strings[] = {
|
|
||||||
_("&PcbNew"),
|
|
||||||
_("&OrcadPcb2"),
|
|
||||||
_("&CadStar"),
|
|
||||||
_("&Spice"),
|
|
||||||
_("Other")
|
|
||||||
};
|
|
||||||
wxRadioBox* itemRadioBox6 = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("NetList Formats:"), wxDefaultPosition, wxDefaultSize, 5, itemRadioBox6Strings, 1, wxRA_SPECIFY_COLS );
|
|
||||||
itemBoxSizer4->Add(itemRadioBox6, 0, wxGROW|wxALL, 5);
|
|
||||||
|
|
||||||
wxStaticBox* itemStaticBoxSizer7Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Files ext:"));
|
|
||||||
wxStaticBoxSizer* itemStaticBoxSizer7 = new wxStaticBoxSizer(itemStaticBoxSizer7Static, wxVERTICAL);
|
|
||||||
itemBoxSizer4->Add(itemStaticBoxSizer7, 0, wxGROW|wxALL, 5);
|
|
||||||
|
|
||||||
m_CmpfileExtText = new wxStaticText( itemDialog1, wxID_STATIC, _("Cmp file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemStaticBoxSizer7->Add(m_CmpfileExtText, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
|
|
||||||
|
|
||||||
m_NetfileExtText = new wxStaticText( itemDialog1, wxID_STATIC, _("Net file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemStaticBoxSizer7->Add(m_NetfileExtText, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
|
|
||||||
|
|
||||||
m_LibfileExtText = new wxStaticText( itemDialog1, wxID_STATIC, _("Library file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemStaticBoxSizer7->Add(m_LibfileExtText, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
|
|
||||||
|
|
||||||
m_SymbolfileExtText = new wxStaticText( itemDialog1, wxID_STATIC, _("Symbol file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemStaticBoxSizer7->Add(m_SymbolfileExtText, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
|
|
||||||
|
|
||||||
m_SchfileExtText = new wxStaticText( itemDialog1, wxID_STATIC, _("Schematic file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_SchfileExtText->Enable(false);
|
|
||||||
itemStaticBoxSizer7->Add(m_SchfileExtText, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL);
|
|
||||||
itemBoxSizer3->Add(itemBoxSizer13, 0, wxGROW|wxALL, 5);
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer14 = new wxBoxSizer(wxHORIZONTAL);
|
|
||||||
itemBoxSizer13->Add(itemBoxSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
|
||||||
|
|
||||||
wxButton* itemButton15 = new wxButton( itemDialog1, ID_BUTTON1, _("Del"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemButton15->SetForegroundColour(wxColour(204, 0, 0));
|
|
||||||
itemBoxSizer14->Add(itemButton15, 0, wxGROW|wxALL, 5);
|
|
||||||
|
|
||||||
wxButton* itemButton16 = new wxButton( itemDialog1, ID_BUTTON2, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemButton16->SetForegroundColour(wxColour(0, 128, 0));
|
|
||||||
itemBoxSizer14->Add(itemButton16, 0, wxGROW|wxALL, 5);
|
|
||||||
|
|
||||||
wxButton* itemButton17 = new wxButton( itemDialog1, ID_BUTTON3, _("Ins"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemButton17->SetForegroundColour(wxColour(0, 0, 255));
|
|
||||||
itemBoxSizer14->Add(itemButton17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
|
||||||
|
|
||||||
wxStaticText* itemStaticText18 = new wxStaticText( itemDialog1, wxID_STATIC, _("Libraries:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemStaticText18->SetForegroundColour(wxColour(196, 0, 0));
|
|
||||||
itemBoxSizer13->Add(itemStaticText18, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
|
||||||
|
|
||||||
wxString* m_ListLibrStrings = NULL;
|
|
||||||
m_ListLibr = new wxListBox( itemDialog1, ID_LISTBOX, wxDefaultPosition, wxSize(-1, 250), 0, m_ListLibrStrings, wxLB_SINGLE );
|
|
||||||
itemBoxSizer13->Add(m_ListLibr, 0, wxGROW|wxALL, 5);
|
|
||||||
|
|
||||||
m_CmpfileExtText = new wxStaticText( itemDialog1, wxID_STATIC, _("Library files path:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_CmpfileExtText->SetForegroundColour(wxColour(198, 0, 0));
|
|
||||||
itemBoxSizer2->Add(m_CmpfileExtText, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
|
||||||
|
|
||||||
m_LibDirCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemBoxSizer2->Add(m_LibDirCtrl, 0, wxGROW|wxALL, 5);
|
|
||||||
|
|
||||||
////@end WinEDA_ConfigFrame content construction
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Should we show tooltips?
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool WinEDA_ConfigFrame::ShowToolTips()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Get bitmap resources
|
|
||||||
*/
|
|
||||||
|
|
||||||
wxBitmap WinEDA_ConfigFrame::GetBitmapResource( const wxString& name )
|
|
||||||
{
|
|
||||||
// Bitmap retrieval
|
|
||||||
////@begin WinEDA_ConfigFrame bitmap retrieval
|
|
||||||
wxUnusedVar(name);
|
|
||||||
return wxNullBitmap;
|
|
||||||
////@end WinEDA_ConfigFrame bitmap retrieval
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Get icon resources
|
|
||||||
*/
|
|
||||||
|
|
||||||
wxIcon WinEDA_ConfigFrame::GetIconResource( const wxString& name )
|
|
||||||
{
|
|
||||||
// Icon retrieval
|
|
||||||
////@begin WinEDA_ConfigFrame icon retrieval
|
|
||||||
wxUnusedVar(name);
|
|
||||||
return wxNullIcon;
|
|
||||||
////@end WinEDA_ConfigFrame icon retrieval
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON
|
|
||||||
*/
|
|
||||||
|
|
||||||
void WinEDA_ConfigFrame::OnButtonClick( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON in WinEDA_ConfigFrame.
|
|
||||||
// Before editing this code, remove the block markers.
|
|
||||||
event.Skip();
|
|
||||||
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON in WinEDA_ConfigFrame.
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1
|
|
||||||
*/
|
|
||||||
|
|
||||||
void WinEDA_ConfigFrame::OnButton1Click( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1 in WinEDA_ConfigFrame.
|
|
||||||
// Before editing this code, remove the block markers.
|
|
||||||
event.Skip();
|
|
||||||
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1 in WinEDA_ConfigFrame.
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON2
|
|
||||||
*/
|
|
||||||
|
|
||||||
void WinEDA_ConfigFrame::OnButton2Click( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON2 in WinEDA_ConfigFrame.
|
|
||||||
// Before editing this code, remove the block markers.
|
|
||||||
event.Skip();
|
|
||||||
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON2 in WinEDA_ConfigFrame.
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON3
|
|
||||||
*/
|
|
||||||
|
|
||||||
void WinEDA_ConfigFrame::OnButton3Click( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON3 in WinEDA_ConfigFrame.
|
|
||||||
// Before editing this code, remove the block markers.
|
|
||||||
event.Skip();
|
|
||||||
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON3 in WinEDA_ConfigFrame.
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,124 +0,0 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: dialog_set_status.h
|
|
||||||
// Purpose:
|
|
||||||
// Author: jean-pierre Charras
|
|
||||||
// Modified by:
|
|
||||||
// Created: 11/02/2006 21:42:23
|
|
||||||
// RCS-ID:
|
|
||||||
// Copyright: License GNU
|
|
||||||
// Licence:
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// Generated by DialogBlocks (unregistered), 11/02/2006 21:42:23
|
|
||||||
|
|
||||||
#ifndef _DIALOG_SET_STATUS_H_
|
|
||||||
#define _DIALOG_SET_STATUS_H_
|
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
|
||||||
#pragma interface "dialog_set_status.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Includes
|
|
||||||
*/
|
|
||||||
|
|
||||||
////@begin includes
|
|
||||||
////@end includes
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Forward declarations
|
|
||||||
*/
|
|
||||||
|
|
||||||
////@begin forward declarations
|
|
||||||
////@end forward declarations
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Control identifiers
|
|
||||||
*/
|
|
||||||
|
|
||||||
////@begin control identifiers
|
|
||||||
#define ID_DIALOG 10000
|
|
||||||
#define SYMBOL_WINEDA_CONFIGFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
|
|
||||||
#define SYMBOL_WINEDA_CONFIGFRAME_TITLE _("from ")
|
|
||||||
#define SYMBOL_WINEDA_CONFIGFRAME_IDNAME ID_DIALOG
|
|
||||||
#define SYMBOL_WINEDA_CONFIGFRAME_SIZE wxSize(400, 300)
|
|
||||||
#define SYMBOL_WINEDA_CONFIGFRAME_POSITION wxDefaultPosition
|
|
||||||
#define ID_BUTTON 10001
|
|
||||||
#define ID_RADIOBOX 10006
|
|
||||||
#define ID_BUTTON1 10002
|
|
||||||
#define ID_BUTTON2 10003
|
|
||||||
#define ID_BUTTON3 10004
|
|
||||||
#define ID_LISTBOX 10005
|
|
||||||
#define ID_TEXTCTRL 10007
|
|
||||||
////@end control identifiers
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Compatibility
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef wxCLOSE_BOX
|
|
||||||
#define wxCLOSE_BOX 0x1000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* WinEDA_ConfigFrame class declaration
|
|
||||||
*/
|
|
||||||
|
|
||||||
class WinEDA_ConfigFrame: public wxDialog
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( WinEDA_ConfigFrame )
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
|
|
||||||
public:
|
|
||||||
/// Constructors
|
|
||||||
WinEDA_ConfigFrame( );
|
|
||||||
WinEDA_ConfigFrame( WinEDA_SchematicFrame* parent, wxWindowID id = SYMBOL_WINEDA_CONFIGFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_CONFIGFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_CONFIGFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_CONFIGFRAME_SIZE, long style = SYMBOL_WINEDA_CONFIGFRAME_STYLE );
|
|
||||||
|
|
||||||
/// Creation
|
|
||||||
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_CONFIGFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_CONFIGFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_CONFIGFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_CONFIGFRAME_SIZE, long style = SYMBOL_WINEDA_CONFIGFRAME_STYLE );
|
|
||||||
|
|
||||||
/// Creates the controls and sizers
|
|
||||||
void CreateControls();
|
|
||||||
|
|
||||||
////@begin WinEDA_ConfigFrame event handler declarations
|
|
||||||
|
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON
|
|
||||||
void OnButtonClick( wxCommandEvent& event );
|
|
||||||
|
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1
|
|
||||||
void OnButton1Click( wxCommandEvent& event );
|
|
||||||
|
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON2
|
|
||||||
void OnButton2Click( wxCommandEvent& event );
|
|
||||||
|
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON3
|
|
||||||
void OnButton3Click( wxCommandEvent& event );
|
|
||||||
|
|
||||||
////@end WinEDA_ConfigFrame event handler declarations
|
|
||||||
|
|
||||||
////@begin WinEDA_ConfigFrame member function declarations
|
|
||||||
|
|
||||||
/// Retrieves bitmap resources
|
|
||||||
wxBitmap GetBitmapResource( const wxString& name );
|
|
||||||
|
|
||||||
/// Retrieves icon resources
|
|
||||||
wxIcon GetIconResource( const wxString& name );
|
|
||||||
////@end WinEDA_ConfigFrame member function declarations
|
|
||||||
|
|
||||||
/// Should we show tooltips?
|
|
||||||
static bool ShowToolTips();
|
|
||||||
|
|
||||||
////@begin WinEDA_ConfigFrame member variables
|
|
||||||
wxStaticText* m_CmpfileExtText;
|
|
||||||
wxStaticText* m_NetfileExtText;
|
|
||||||
wxStaticText* m_LibfileExtText;
|
|
||||||
wxStaticText* m_SymbolfileExtText;
|
|
||||||
wxStaticText* m_SchfileExtText;
|
|
||||||
wxListBox* m_ListLibr;
|
|
||||||
wxStaticText* m_CmpfileExtText;
|
|
||||||
wxTextCtrl* m_LibDirCtrl;
|
|
||||||
////@end WinEDA_ConfigFrame member variables
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// _DIALOG_SET_STATUS_H_
|
|
|
@ -1,840 +0,0 @@
|
||||||
/***************************************************/
|
|
||||||
/* EESchema: */
|
|
||||||
/* Edition des textes sur Composants en Schematique */
|
|
||||||
/****************************************************/
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
|
||||||
#include "gr_basic.h"
|
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "program.h"
|
|
||||||
#include "libcmp.h"
|
|
||||||
#include "general.h"
|
|
||||||
|
|
||||||
#include "wx/checklst.h"
|
|
||||||
|
|
||||||
#include "protos.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* Fonctions exportees */
|
|
||||||
|
|
||||||
/* Fonctions locales */
|
|
||||||
static void AbortMoveCmpField( WinEDA_DrawFrame* frame, wxDC* DC );
|
|
||||||
static void MoveCmpField( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
|
|
||||||
|
|
||||||
/* variables locales */
|
|
||||||
static PartTextStruct* CurrentField;
|
|
||||||
static int Multiflag;
|
|
||||||
static int TextFieldSize = DEFAULT_SIZE_TEXT;
|
|
||||||
static wxPoint OldPos;
|
|
||||||
|
|
||||||
/* Classe de la frame des propriétés d'un composant en librairie */
|
|
||||||
|
|
||||||
enum id_cmpedit {
|
|
||||||
ID_SCHEDIT_NOTEBOOK = 3200,
|
|
||||||
ID_PANEL_BASIC,
|
|
||||||
ID_PANEL_REFERENCE,
|
|
||||||
ID_PANEL_VALUE,
|
|
||||||
ID_PANEL_FIELD1,
|
|
||||||
ID_PANEL_FIELD2,
|
|
||||||
ID_PANEL_FIELD3,
|
|
||||||
ID_PANEL_FIELD4,
|
|
||||||
ID_PANEL_FIELD5,
|
|
||||||
ID_PANEL_FIELD6,
|
|
||||||
ID_PANEL_FIELD7,
|
|
||||||
ID_PANEL_FIELD8,
|
|
||||||
ID_PANEL_MODULEPCB,
|
|
||||||
ID_PANEL_SUBSCHEMATIC,
|
|
||||||
ID_CLOSE_CMP_PROPERTIES,
|
|
||||||
ID_ACCEPT_CMP_PROPERTIES,
|
|
||||||
ID_RESTORE_CMP_DEFAULTS
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/************************************/
|
|
||||||
/* class WinEDA_PartPropertiesFrame */
|
|
||||||
/************************************/
|
|
||||||
|
|
||||||
class WinEDA_ComponentPropertiesFrame : public wxDialog
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
|
|
||||||
WinEDA_SchematicFrame* m_Parent;
|
|
||||||
EDA_SchComponentStruct* m_Cmp;
|
|
||||||
EDA_LibComponentStruct* m_LibEntry;
|
|
||||||
|
|
||||||
wxCheckBox* m_ConvertButt;
|
|
||||||
wxRadioBox* m_SelectUnit;
|
|
||||||
wxRadioBox* m_MirrorUnit;
|
|
||||||
wxRadioBox* m_OrientUnit;
|
|
||||||
wxNotebook* m_NoteBook;
|
|
||||||
WinEDA_EnterText* m_RefInLib;
|
|
||||||
wxPanel* m_PanelBasic;
|
|
||||||
|
|
||||||
wxPanel* m_PanelField[NUMBER_OF_FIELDS];
|
|
||||||
|
|
||||||
wxCheckBox* ShowFieldText[NUMBER_OF_FIELDS];
|
|
||||||
wxCheckBox* VorientFieldText[NUMBER_OF_FIELDS];
|
|
||||||
|
|
||||||
WinEDA_GraphicTextCtrl* FieldTextCtrl[NUMBER_OF_FIELDS];
|
|
||||||
WinEDA_PositionCtrl* FieldPosition[NUMBER_OF_FIELDS];
|
|
||||||
int FieldFlags[NUMBER_OF_FIELDS];
|
|
||||||
int FieldOrient[NUMBER_OF_FIELDS];
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructor and destructor
|
|
||||||
WinEDA_ComponentPropertiesFrame( WinEDA_SchematicFrame* parent, wxPoint& pos,
|
|
||||||
EDA_SchComponentStruct* cmp );
|
|
||||||
~WinEDA_ComponentPropertiesFrame()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
void BuildPanelBasic();
|
|
||||||
void ComponentPropertiesAccept( wxCommandEvent& event );
|
|
||||||
void SetInitCmp( wxCommandEvent& event );
|
|
||||||
void OnQuit( wxCommandEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( WinEDA_ComponentPropertiesFrame, wxDialog )
|
|
||||||
EVT_BUTTON( ID_ACCEPT_CMP_PROPERTIES, WinEDA_ComponentPropertiesFrame::ComponentPropertiesAccept )
|
|
||||||
EVT_BUTTON( ID_CLOSE_CMP_PROPERTIES, WinEDA_ComponentPropertiesFrame::OnQuit )
|
|
||||||
EVT_BUTTON( ID_RESTORE_CMP_DEFAULTS, WinEDA_ComponentPropertiesFrame::SetInitCmp )
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************/
|
|
||||||
void InstallCmpeditFrame( WinEDA_SchematicFrame* parent, wxPoint& pos,
|
|
||||||
EDA_SchComponentStruct* cmp )
|
|
||||||
/*********************************************************************/
|
|
||||||
|
|
||||||
/* Create the dialog box for the current component edition
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
parent->DrawPanel->m_IgnoreMouseEvents = TRUE;
|
|
||||||
if( cmp->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
|
|
||||||
{
|
|
||||||
DisplayError( parent,
|
|
||||||
wxT( "InstallCmpeditFrame() error: This struct is not a component" ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
WinEDA_ComponentPropertiesFrame* frame =
|
|
||||||
new WinEDA_ComponentPropertiesFrame( parent, pos, cmp );
|
|
||||||
frame->ShowModal();
|
|
||||||
frame->Destroy();
|
|
||||||
}
|
|
||||||
parent->DrawPanel->m_IgnoreMouseEvents = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define XSIZE 370
|
|
||||||
#define YSIZE 300
|
|
||||||
/***********************************************************************************/
|
|
||||||
WinEDA_ComponentPropertiesFrame::WinEDA_ComponentPropertiesFrame(
|
|
||||||
WinEDA_SchematicFrame* parent, wxPoint& framepos, EDA_SchComponentStruct* cmp ) :
|
|
||||||
wxDialog( parent, -1, _( "Component properties" ), framepos,
|
|
||||||
wxSize( XSIZE, YSIZE ), DIALOG_STYLE )
|
|
||||||
/***********************************************************************************/
|
|
||||||
{
|
|
||||||
wxPoint pos, postmp;
|
|
||||||
wxLayoutConstraints* c;
|
|
||||||
wxPoint cmp_pos;
|
|
||||||
int ii;
|
|
||||||
|
|
||||||
Centre();
|
|
||||||
m_Parent = parent;
|
|
||||||
m_Cmp = cmp;
|
|
||||||
cmp_pos = m_Cmp->m_Pos;
|
|
||||||
m_LibEntry = FindLibPart( m_Cmp->m_ChipName.GetData(), wxEmptyString, FIND_ROOT );
|
|
||||||
|
|
||||||
if( m_LibEntry == NULL )
|
|
||||||
{
|
|
||||||
SetTitle( _( "Component properties (Not found in lib)" ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
SetAutoLayout( TRUE );
|
|
||||||
|
|
||||||
m_NoteBook = new wxNotebook( this, ID_SCHEDIT_NOTEBOOK,
|
|
||||||
wxDefaultPosition, wxSize( XSIZE - 6, YSIZE - 70 ) );
|
|
||||||
c = new wxLayoutConstraints;
|
|
||||||
c->left.SameAs( this, wxLeft, 4 );
|
|
||||||
c->right.SameAs( this, wxRight, 4 );
|
|
||||||
c->top.SameAs( this, wxTop, 4 );
|
|
||||||
c->bottom.SameAs( this, wxBottom, 40 );
|
|
||||||
m_NoteBook->SetConstraints( c );
|
|
||||||
m_NoteBook->SetAutoLayout( TRUE );
|
|
||||||
|
|
||||||
/* Creation des boutons de commande */
|
|
||||||
pos.x = 40; pos.y = YSIZE - 60;
|
|
||||||
wxButton* GButton = new wxButton( this, ID_CLOSE_CMP_PROPERTIES,
|
|
||||||
_( "Close" ), pos );
|
|
||||||
GButton->SetForegroundColour( *wxBLUE );
|
|
||||||
c = new wxLayoutConstraints;
|
|
||||||
c->left.SameAs( this, wxLeft, 20 );
|
|
||||||
c->height.AsIs();
|
|
||||||
c->width.AsIs();
|
|
||||||
c->bottom.SameAs( this, wxBottom, 5 );
|
|
||||||
GButton->SetConstraints( c );
|
|
||||||
|
|
||||||
pos.x += GButton->GetDefaultSize().x + 10;
|
|
||||||
wxButton* MButton = new wxButton( this, ID_RESTORE_CMP_DEFAULTS,
|
|
||||||
_( "Defaults" ), pos );
|
|
||||||
MButton->SetForegroundColour( *wxRED );
|
|
||||||
c = new wxLayoutConstraints;
|
|
||||||
c->left.SameAs( GButton, wxRight, 20 );
|
|
||||||
c->height.AsIs();
|
|
||||||
c->width.AsIs();
|
|
||||||
c->bottom.SameAs( this, wxBottom, 5 );
|
|
||||||
MButton->SetConstraints( c );
|
|
||||||
|
|
||||||
pos.x += MButton->GetDefaultSize().x + 10;
|
|
||||||
wxButton* Button = new wxButton( this, ID_ACCEPT_CMP_PROPERTIES,
|
|
||||||
_( "OK" ), pos );
|
|
||||||
Button->SetForegroundColour( *wxBLUE );
|
|
||||||
c = new wxLayoutConstraints;
|
|
||||||
c->left.SameAs( MButton, wxRight, 20 );
|
|
||||||
c->height.AsIs();
|
|
||||||
c->width.AsIs();
|
|
||||||
c->bottom.SameAs( this, wxBottom, 5 );
|
|
||||||
Button->SetConstraints( c );
|
|
||||||
|
|
||||||
// Add panel Basic
|
|
||||||
BuildPanelBasic();
|
|
||||||
m_NoteBook->AddPage( m_PanelBasic, _( "Options" ), TRUE );
|
|
||||||
|
|
||||||
// Add panel Fields
|
|
||||||
for( ii = 0; ii < NUMBER_OF_FIELDS; ii++ )
|
|
||||||
{
|
|
||||||
m_PanelField[ii] = new wxPanel( m_NoteBook, ID_PANEL_REFERENCE + ii );
|
|
||||||
c = new wxLayoutConstraints;
|
|
||||||
c->left.SameAs( m_NoteBook, wxLeft );
|
|
||||||
c->right.SameAs( m_NoteBook, wxRight );
|
|
||||||
c->bottom.SameAs( m_NoteBook, wxBottom );
|
|
||||||
m_PanelField[ii]->SetConstraints( c );
|
|
||||||
m_NoteBook->AddPage( m_PanelField[ii],
|
|
||||||
DrawPartStruct::ReturnFieldName( ii ), FALSE );
|
|
||||||
|
|
||||||
pos.x = 10; pos.y = 20;
|
|
||||||
ShowFieldText[ii] = new wxCheckBox( m_PanelField[ii], -1,
|
|
||||||
_( "Show Text" ), pos );
|
|
||||||
if( (m_Cmp->m_Field[ii].m_Attributs & TEXT_NO_VISIBLE ) == 0 )
|
|
||||||
ShowFieldText[ii]->SetValue( TRUE );
|
|
||||||
|
|
||||||
pos.x += 150;
|
|
||||||
VorientFieldText[ii] = new wxCheckBox( m_PanelField[ii], -1,
|
|
||||||
_( "Vertical" ), pos );
|
|
||||||
if( m_Cmp->m_Field[ii].m_Orient )
|
|
||||||
VorientFieldText[ii]->SetValue( TRUE );
|
|
||||||
|
|
||||||
pos.x = 10; pos.y += 50;
|
|
||||||
|
|
||||||
wxPoint field_pos;
|
|
||||||
FieldTextCtrl[ii] = new WinEDA_GraphicTextCtrl( m_PanelField[ii],
|
|
||||||
DrawPartStruct::ReturnFieldName( ii ),
|
|
||||||
m_Cmp->m_Field[ii].m_Text,
|
|
||||||
m_Cmp->m_Field[ii].m_Size.x,
|
|
||||||
g_UnitMetric,
|
|
||||||
pos, 200, TRUE );
|
|
||||||
field_pos.x = m_Cmp->m_Field[ii].m_Pos.x - cmp_pos.x;
|
|
||||||
field_pos.y = m_Cmp->m_Field[ii].m_Pos.y - cmp_pos.y;
|
|
||||||
if( m_Cmp->m_Field[ii].m_Text == wxEmptyString ) // Field non initialisé, set pos a 0,0)
|
|
||||||
field_pos = wxPoint( 0, 0 );
|
|
||||||
FieldPosition[ii] = new WinEDA_PositionCtrl( m_PanelField[ii], _( "Pos" ),
|
|
||||||
field_pos,
|
|
||||||
g_UnitMetric,
|
|
||||||
wxPoint( pos.x + 150, pos.y + 32 ),
|
|
||||||
m_Parent->m_InternalUnits );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( m_LibEntry && m_LibEntry->m_Options == ENTRY_POWER )
|
|
||||||
FieldTextCtrl[VALUE]->Enable( FALSE );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************/
|
|
||||||
void WinEDA_ComponentPropertiesFrame::OnQuit( wxCommandEvent& WXUNUSED (event) )
|
|
||||||
/************************************************************************/
|
|
||||||
{
|
|
||||||
// true is to force the frame to close
|
|
||||||
Close( true );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************/
|
|
||||||
void WinEDA_ComponentPropertiesFrame::BuildPanelBasic()
|
|
||||||
/**********************************************************/
|
|
||||||
|
|
||||||
/* create the basic panel for component properties editing
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
wxPoint pos, postmp;
|
|
||||||
int ii, jj;
|
|
||||||
|
|
||||||
m_PanelBasic = new wxPanel( m_NoteBook, ID_PANEL_BASIC );
|
|
||||||
wxLayoutConstraints* c = new wxLayoutConstraints;
|
|
||||||
c->left.SameAs( m_NoteBook, wxLeft );
|
|
||||||
c->right.SameAs( m_NoteBook, wxRight );
|
|
||||||
c->bottom.SameAs( m_NoteBook, wxBottom );
|
|
||||||
m_PanelBasic->SetConstraints( c );
|
|
||||||
|
|
||||||
pos.x = 5; pos.y = 15;
|
|
||||||
|
|
||||||
#define NB_MAX_UNIT 16
|
|
||||||
int nb_units = m_LibEntry ? MAX( m_LibEntry->m_UnitCount, 1 ) : 0;
|
|
||||||
wxString list_units[NB_MAX_UNIT];
|
|
||||||
|
|
||||||
if( nb_units > 16 )
|
|
||||||
nb_units = 16;
|
|
||||||
for( ii = 0; ii < NB_MAX_UNIT; ii++ )
|
|
||||||
list_units[ii] << _( "Unit" ) << (ii + 1);
|
|
||||||
|
|
||||||
m_SelectUnit = new wxRadioBox( m_PanelBasic, -1, _( "Unit:" ),
|
|
||||||
pos, wxSize( -1, -1 ),
|
|
||||||
(nb_units < 8 ) ? 8 : nb_units, list_units, 1 );
|
|
||||||
for( ii = nb_units; ii < 8; ii++ )
|
|
||||||
{
|
|
||||||
m_SelectUnit->Enable( ii, FALSE ); // Disable non existant units
|
|
||||||
}
|
|
||||||
|
|
||||||
m_SelectUnit->SetSelection( m_Cmp->m_Multi - 1 );
|
|
||||||
|
|
||||||
m_SelectUnit->GetSize( &ii, &jj );
|
|
||||||
pos.x += ii + 5; postmp = pos;
|
|
||||||
|
|
||||||
wxString list_orient[4] = { wxT( "0" ), wxT( "+90" ), wxT( "180" ), wxT( "-90" ) };
|
|
||||||
pos.x += 45; pos.y = 15;
|
|
||||||
m_OrientUnit = new wxRadioBox( m_PanelBasic, -1, _( "Orient:" ),
|
|
||||||
pos, wxSize( -1, -1 ), 4, list_orient, 1 );
|
|
||||||
ii = m_Cmp->GetRotationMiroir() & ~(CMP_MIROIR_X | CMP_MIROIR_Y);
|
|
||||||
|
|
||||||
if( ii == CMP_ORIENT_90 )
|
|
||||||
m_OrientUnit->SetSelection( 1 );
|
|
||||||
else if( ii == CMP_ORIENT_180 )
|
|
||||||
m_OrientUnit->SetSelection( 2 );
|
|
||||||
else if( ii == CMP_ORIENT_270 )
|
|
||||||
m_OrientUnit->SetSelection( 3 );
|
|
||||||
|
|
||||||
m_OrientUnit->GetSize( &ii, &jj );
|
|
||||||
pos.x += ii + 30;
|
|
||||||
wxString list_mirror[3] = { _( "Normal" ), _( "Mirror --" ), _( "Mirror |" ) };
|
|
||||||
m_MirrorUnit = new wxRadioBox( m_PanelBasic, -1, _( "Mirror:" ),
|
|
||||||
pos, wxSize( -1, -1 ), 3, list_mirror, 1 );
|
|
||||||
ii = m_Cmp->GetRotationMiroir() & (CMP_MIROIR_X | CMP_MIROIR_Y);
|
|
||||||
if( ii == CMP_MIROIR_X )
|
|
||||||
m_MirrorUnit->SetSelection( 1 );
|
|
||||||
else if( ii == CMP_MIROIR_Y )
|
|
||||||
m_MirrorUnit->SetSelection( 2 );
|
|
||||||
|
|
||||||
// Positionnement de la selection normal/convert
|
|
||||||
m_OrientUnit->GetSize( &ii, &jj );
|
|
||||||
pos = postmp;
|
|
||||||
pos.y += jj + 10;
|
|
||||||
m_ConvertButt = new wxCheckBox( m_PanelBasic, -1, _( "Convert" ), pos );
|
|
||||||
if( m_Cmp->m_Convert > 1 )
|
|
||||||
m_ConvertButt->SetValue( TRUE );
|
|
||||||
|
|
||||||
if( (m_LibEntry == NULL) || LookForConvertPart( m_LibEntry ) <= 1 )
|
|
||||||
{
|
|
||||||
m_ConvertButt->Enable( FALSE );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show the "Parts Locked" option:
|
|
||||||
if( m_LibEntry && m_LibEntry->m_UnitSelectionLocked )
|
|
||||||
{
|
|
||||||
new wxStaticText( m_PanelBasic, -1, _( "Parts are locked" ),
|
|
||||||
wxPoint( m_MirrorUnit->GetRect().x, pos.y ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Positionnement de la reference en librairie
|
|
||||||
m_ConvertButt->GetSize( &ii, &jj );
|
|
||||||
pos.y += jj + 20;
|
|
||||||
m_RefInLib = new WinEDA_EnterText( m_PanelBasic, _( "Chip Name:" ),
|
|
||||||
m_Cmp->m_ChipName,
|
|
||||||
pos, wxSize( XSIZE - pos.x - 30, -1 ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************************/
|
|
||||||
void WinEDA_ComponentPropertiesFrame::ComponentPropertiesAccept( wxCommandEvent& event )
|
|
||||||
/***********************************************************************************/
|
|
||||||
|
|
||||||
/* Update the new parameters for the current edited component
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
wxPoint cmp_pos = m_Cmp->m_Pos;
|
|
||||||
wxClientDC dc( m_Parent->DrawPanel );
|
|
||||||
wxString newname;
|
|
||||||
|
|
||||||
m_Parent->DrawPanel->PrepareGraphicContext( &dc );
|
|
||||||
|
|
||||||
RedrawOneStruct( m_Parent->DrawPanel, &dc, m_Cmp, g_XorMode );
|
|
||||||
|
|
||||||
newname = m_RefInLib->GetValue();
|
|
||||||
newname.MakeUpper();
|
|
||||||
newname.Replace( wxT( " " ), wxT( "_" ) );
|
|
||||||
|
|
||||||
if( newname.IsEmpty() )
|
|
||||||
DisplayError( this, _( "No Component Name!" ) );
|
|
||||||
else if( newname.CmpNoCase( m_Cmp->m_ChipName ) )
|
|
||||||
{
|
|
||||||
if( FindLibPart( newname.GetData(), wxEmptyString, FIND_ALIAS ) == NULL )
|
|
||||||
{
|
|
||||||
wxString msg;
|
|
||||||
msg.Printf( _( "Component [%s] not found!" ), newname.GetData() );
|
|
||||||
DisplayError( this, msg );
|
|
||||||
}
|
|
||||||
else // Changement de composant!
|
|
||||||
{
|
|
||||||
m_Cmp->m_ChipName = newname;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mise a jour de la representation:
|
|
||||||
if( m_ConvertButt->IsEnabled() )
|
|
||||||
(m_ConvertButt->GetValue() == TRUE) ?
|
|
||||||
m_Cmp->m_Convert = 2 : m_Cmp->m_Convert = 1;
|
|
||||||
|
|
||||||
//Mise a jour de la selection de l'élément dans le boitier
|
|
||||||
if( m_Cmp->m_Multi )
|
|
||||||
m_Cmp->m_Multi = m_SelectUnit->GetSelection() + 1;
|
|
||||||
|
|
||||||
//Mise a jour de l'orientation:
|
|
||||||
switch( m_OrientUnit->GetSelection() )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
m_Cmp->SetRotationMiroir( CMP_ORIENT_0 );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
m_Cmp->SetRotationMiroir( CMP_ORIENT_90 );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
m_Cmp->SetRotationMiroir( CMP_ORIENT_180 );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
m_Cmp->SetRotationMiroir( CMP_ORIENT_270 );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( m_MirrorUnit->GetSelection() )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
m_Cmp->SetRotationMiroir( CMP_MIROIR_X );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
m_Cmp->SetRotationMiroir( CMP_MIROIR_Y );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Mise a jour des textes
|
|
||||||
for( int ii = REFERENCE; ii < NUMBER_OF_FIELDS; ii++ )
|
|
||||||
{
|
|
||||||
if( ii == REFERENCE ) // la reference ne peut etre vide
|
|
||||||
{
|
|
||||||
if( !FieldTextCtrl[ii]->GetText().IsEmpty() )
|
|
||||||
m_Cmp->m_Field[ii].m_Text = FieldTextCtrl[ii]->GetText();
|
|
||||||
}
|
|
||||||
else if( ii == VALUE ) // la valeur ne peut etre vide et ne peut etre change sur un POWER
|
|
||||||
{
|
|
||||||
EDA_LibComponentStruct* Entry = FindLibPart( m_Cmp->m_ChipName.GetData(
|
|
||||||
), wxEmptyString, FIND_ROOT );
|
|
||||||
if( Entry && (Entry->m_Options == ENTRY_POWER) )
|
|
||||||
m_Cmp->m_Field[ii].m_Text = m_Cmp->m_ChipName;
|
|
||||||
else if( !FieldTextCtrl[ii]->GetText().IsEmpty() )
|
|
||||||
{
|
|
||||||
m_Cmp->m_Field[ii].m_Text = FieldTextCtrl[ii]->GetText();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
m_Cmp->m_Field[ii].m_Text = FieldTextCtrl[ii]->GetText();
|
|
||||||
|
|
||||||
m_Cmp->m_Field[ii].m_Size.x =
|
|
||||||
m_Cmp->m_Field[ii].m_Size.y = FieldTextCtrl[ii]->GetTextSize();
|
|
||||||
if( ShowFieldText[ii]->GetValue() )
|
|
||||||
m_Cmp->m_Field[ii].m_Attributs &= ~TEXT_NO_VISIBLE;
|
|
||||||
else
|
|
||||||
m_Cmp->m_Field[ii].m_Attributs |= TEXT_NO_VISIBLE;
|
|
||||||
m_Cmp->m_Field[ii].m_Orient = VorientFieldText[ii]->GetValue() ? 1 : 0;
|
|
||||||
m_Cmp->m_Field[ii].m_Pos = FieldPosition[ii]->GetValue();
|
|
||||||
m_Cmp->m_Field[ii].m_Pos.x += cmp_pos.x;
|
|
||||||
m_Cmp->m_Field[ii].m_Pos.y += cmp_pos.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_Parent->m_CurrentScreen->SetModify();
|
|
||||||
|
|
||||||
RedrawOneStruct( m_Parent->DrawPanel, &dc, m_Cmp, GR_DEFAULT_DRAWMODE );
|
|
||||||
m_Parent->TestDanglingEnds( m_Parent->m_CurrentScreen->EEDrawList, &dc );
|
|
||||||
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************************/
|
|
||||||
void WinEDA_SchematicFrame::StartMoveCmpField( PartTextStruct* Field, wxDC* DC )
|
|
||||||
/************************************************************************************/
|
|
||||||
|
|
||||||
/* Prepare le deplacement du texte en cours d'edition
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
EDA_LibComponentStruct* Entry;
|
|
||||||
|
|
||||||
CurrentField = Field;
|
|
||||||
if( Field == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if( Field->m_Text == wxEmptyString )
|
|
||||||
{
|
|
||||||
DisplayError( this, _( "No Field to move" ), 10 );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
OldPos = Field->m_Pos;
|
|
||||||
Multiflag = 0;
|
|
||||||
if( Field->m_FieldId == REFERENCE )
|
|
||||||
{
|
|
||||||
Entry = FindLibPart( ( (EDA_SchComponentStruct*) Field->m_Parent )->m_ChipName.GetData(),
|
|
||||||
wxEmptyString, FIND_ROOT );
|
|
||||||
if( Entry != NULL )
|
|
||||||
{
|
|
||||||
if( Entry->m_UnitCount > 1 )
|
|
||||||
Multiflag = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawPanel->ForceCloseManageCurseur = AbortMoveCmpField;
|
|
||||||
DrawPanel->ManageCurseur = MoveCmpField;
|
|
||||||
Field->m_Flags = IS_MOVED;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************/
|
|
||||||
void WinEDA_SchematicFrame::EditCmpFieldText( PartTextStruct* Field, wxDC* DC )
|
|
||||||
/**********************************************************************************/
|
|
||||||
/* Routine de changement du texte selectionne */
|
|
||||||
{
|
|
||||||
int FieldNumber, flag;
|
|
||||||
EDA_LibComponentStruct* Entry;
|
|
||||||
|
|
||||||
if( Field == NULL )
|
|
||||||
{
|
|
||||||
DisplayError( this, _( "No Field To Edit" ), 10 );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
FieldNumber = Field->m_FieldId;
|
|
||||||
if( FieldNumber == VALUE )
|
|
||||||
{
|
|
||||||
Entry = FindLibPart( ( (EDA_SchComponentStruct*) Field->m_Parent )->m_ChipName.GetData(),
|
|
||||||
wxEmptyString, FIND_ROOT );
|
|
||||||
if( Entry && (Entry->m_Options == ENTRY_POWER) )
|
|
||||||
{
|
|
||||||
DisplayInfo( this,
|
|
||||||
_(
|
|
||||||
"Part is a POWER, value cannot be modified!\nYou must create a new power" )
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
flag = 0;
|
|
||||||
if( FieldNumber == REFERENCE )
|
|
||||||
{
|
|
||||||
Entry = FindLibPart( ( (EDA_SchComponentStruct*) Field->m_Parent )->m_ChipName.GetData(),
|
|
||||||
wxEmptyString, FIND_ROOT );
|
|
||||||
if( Entry != NULL )
|
|
||||||
{
|
|
||||||
if( Entry->m_UnitCount > 1 )
|
|
||||||
flag = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
wxString newtext = Field->m_Text;
|
|
||||||
Get_Message( DrawPartStruct::ReturnFieldName( FieldNumber ), newtext, this );
|
|
||||||
|
|
||||||
DrawTextField( DrawPanel, DC, Field, flag, g_XorMode );
|
|
||||||
|
|
||||||
if( !newtext.IsEmpty() )
|
|
||||||
{
|
|
||||||
if( Field->m_Text.IsEmpty() )
|
|
||||||
{
|
|
||||||
Field->m_Pos = ( (EDA_SchComponentStruct*) Field->m_Parent )->m_Pos;
|
|
||||||
Field->m_Size.x = Field->m_Size.y = TextFieldSize;
|
|
||||||
}
|
|
||||||
Field->m_Text = newtext;
|
|
||||||
}
|
|
||||||
else /* Nouveau texte NULL */
|
|
||||||
{
|
|
||||||
if( FieldNumber == REFERENCE )
|
|
||||||
{
|
|
||||||
DisplayError( this, _( "Reference needed !, No change" ) );
|
|
||||||
}
|
|
||||||
else if( FieldNumber == VALUE )
|
|
||||||
{
|
|
||||||
DisplayError( this, _( "Value needed !, No change" ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Field->m_Text = wxT( "~" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawTextField( DrawPanel, DC, Field, flag, g_XorMode );
|
|
||||||
( (EDA_SchComponentStruct*) Field->m_Parent )->Display_Infos( this );
|
|
||||||
m_CurrentScreen->SetModify();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************/
|
|
||||||
static void MoveCmpField( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
|
|
||||||
/************************************************************************/
|
|
||||||
|
|
||||||
/* Routine de deplacement d'un texte type Field.
|
|
||||||
* Celle routine est normalement attachee au deplacement du curseur
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
#define TRF ( (EDA_SchComponentStruct*) CurrentField->m_Parent )->m_Transform
|
|
||||||
wxPoint pos;
|
|
||||||
int x1, y1;
|
|
||||||
int FieldNumber;
|
|
||||||
|
|
||||||
if( CurrentField == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
FieldNumber = CurrentField->m_FieldId;
|
|
||||||
|
|
||||||
/* Effacement: */
|
|
||||||
if( erase )
|
|
||||||
DrawTextField( panel, DC, CurrentField, Multiflag, g_XorMode );
|
|
||||||
|
|
||||||
pos = ( (EDA_SchComponentStruct*) CurrentField->m_Parent )->m_Pos;
|
|
||||||
|
|
||||||
/* Les positions sont caculees par la matrice TRANSPOSEE de la matrice
|
|
||||||
* de rotation-miroir */
|
|
||||||
x1 = panel->GetScreen()->m_Curseur.x - pos.x;
|
|
||||||
y1 = panel->GetScreen()->m_Curseur.y - pos.y;
|
|
||||||
CurrentField->m_Pos.x = pos.x + TRF[0][0] * x1 + TRF[1][0] * y1;
|
|
||||||
CurrentField->m_Pos.y = pos.y + TRF[0][1] * x1 + TRF[1][1] * y1;
|
|
||||||
|
|
||||||
DrawTextField( panel, DC, CurrentField, Multiflag, g_XorMode );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************/
|
|
||||||
static void AbortMoveCmpField( WinEDA_DrawFrame* frame, wxDC* DC )
|
|
||||||
/******************************************************************/
|
|
||||||
{
|
|
||||||
frame->DrawPanel->ForceCloseManageCurseur = NULL;
|
|
||||||
frame->DrawPanel->ManageCurseur = NULL;
|
|
||||||
if( CurrentField )
|
|
||||||
{
|
|
||||||
DrawTextField( frame->DrawPanel, DC, CurrentField, Multiflag, g_XorMode );
|
|
||||||
CurrentField->m_Flags = 0;
|
|
||||||
CurrentField->m_Pos = OldPos;
|
|
||||||
DrawTextField( frame->DrawPanel, DC, CurrentField, Multiflag, GR_DEFAULT_DRAWMODE );
|
|
||||||
}
|
|
||||||
CurrentField = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************************/
|
|
||||||
void WinEDA_SchematicFrame::RotateCmpField( PartTextStruct* Field, wxDC* DC )
|
|
||||||
/*********************************************************************************/
|
|
||||||
{
|
|
||||||
int FieldNumber, flag;
|
|
||||||
EDA_LibComponentStruct* Entry;
|
|
||||||
|
|
||||||
if( Field == NULL )
|
|
||||||
return;
|
|
||||||
if( Field->m_Text == wxEmptyString )
|
|
||||||
return;
|
|
||||||
|
|
||||||
FieldNumber = Field->m_FieldId;
|
|
||||||
flag = 0;
|
|
||||||
if( FieldNumber == REFERENCE )
|
|
||||||
{
|
|
||||||
Entry = FindLibPart( ( (EDA_SchComponentStruct*) Field->m_Parent )->m_ChipName.GetData(),
|
|
||||||
wxEmptyString, FIND_ROOT );
|
|
||||||
if( Entry != NULL )
|
|
||||||
{
|
|
||||||
if( Entry->m_UnitCount > 1 )
|
|
||||||
flag = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawTextField( DrawPanel, DC, Field, flag, g_XorMode );
|
|
||||||
|
|
||||||
if( Field->m_Orient == TEXT_ORIENT_HORIZ )
|
|
||||||
Field->m_Orient = TEXT_ORIENT_VERT;
|
|
||||||
else
|
|
||||||
Field->m_Orient = TEXT_ORIENT_HORIZ;
|
|
||||||
DrawTextField( DrawPanel, DC, Field, flag, g_XorMode );
|
|
||||||
|
|
||||||
GetScreen()->SetModify();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************/
|
|
||||||
void PartTextStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC )
|
|
||||||
/***************************************************************/
|
|
||||||
{
|
|
||||||
int FieldNumber, flag;
|
|
||||||
EDA_LibComponentStruct* Entry;
|
|
||||||
|
|
||||||
frame->DrawPanel->ManageCurseur = NULL;
|
|
||||||
frame->DrawPanel->ForceCloseManageCurseur = NULL;
|
|
||||||
|
|
||||||
FieldNumber = m_FieldId;
|
|
||||||
flag = 0;
|
|
||||||
if( FieldNumber == REFERENCE )
|
|
||||||
{
|
|
||||||
Entry = FindLibPart( ( (EDA_SchComponentStruct*) m_Parent )->m_ChipName.GetData(),
|
|
||||||
wxEmptyString, FIND_ROOT );
|
|
||||||
if( Entry != NULL )
|
|
||||||
{
|
|
||||||
if( Entry->m_UnitCount > 1 )
|
|
||||||
flag = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawTextField( frame->DrawPanel, DC, this, flag, GR_DEFAULT_DRAWMODE );
|
|
||||||
m_Flags = 0;
|
|
||||||
frame->GetScreen()->SetCurItem( NULL );
|
|
||||||
frame->GetScreen()->SetModify();
|
|
||||||
CurrentField = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************************************/
|
|
||||||
void WinEDA_SchematicFrame::EditComponentReference( EDA_SchComponentStruct* DrawLibItem, wxDC* DC )
|
|
||||||
/**************************************************************************************************/
|
|
||||||
/* Edit the component text reference*/
|
|
||||||
{
|
|
||||||
wxString msg;
|
|
||||||
EDA_LibComponentStruct* Entry;
|
|
||||||
int flag = 0;
|
|
||||||
|
|
||||||
if( DrawLibItem == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
Entry = FindLibPart( DrawLibItem->m_ChipName.GetData(), wxEmptyString, FIND_ROOT );
|
|
||||||
if( Entry == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if( Entry->m_UnitCount > 1 )
|
|
||||||
flag = 1;
|
|
||||||
|
|
||||||
PartTextStruct* TextField = &DrawLibItem->m_Field[REFERENCE];
|
|
||||||
|
|
||||||
msg = TextField->m_Text;
|
|
||||||
Get_Message( _( "Reference" ), msg, this );
|
|
||||||
|
|
||||||
if( !msg.IsEmpty() ) // New text entered
|
|
||||||
{
|
|
||||||
DrawTextField( DrawPanel, DC, &DrawLibItem->m_Field[REFERENCE], flag, g_XorMode );
|
|
||||||
TextField->m_Text = msg;
|
|
||||||
DrawTextField( DrawPanel, DC, &DrawLibItem->m_Field[REFERENCE], flag,
|
|
||||||
DrawLibItem->m_Flags ? g_XorMode : GR_DEFAULT_DRAWMODE );
|
|
||||||
GetScreen()->SetModify();
|
|
||||||
}
|
|
||||||
DrawLibItem->Display_Infos( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************************/
|
|
||||||
void WinEDA_SchematicFrame::EditComponentValue( EDA_SchComponentStruct* DrawLibItem, wxDC* DC )
|
|
||||||
/*****************************************************************************************/
|
|
||||||
/* Routine de changement du texte selectionne */
|
|
||||||
{
|
|
||||||
wxString msg;
|
|
||||||
EDA_LibComponentStruct* Entry;
|
|
||||||
int flag = 0;
|
|
||||||
|
|
||||||
if( DrawLibItem == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
Entry = FindLibPart( DrawLibItem->m_ChipName.GetData(), wxEmptyString, FIND_ROOT );
|
|
||||||
if( Entry == NULL )
|
|
||||||
return;
|
|
||||||
if( Entry->m_UnitCount > 1 )
|
|
||||||
flag = 1;
|
|
||||||
|
|
||||||
PartTextStruct* TextField = &DrawLibItem->m_Field[VALUE];
|
|
||||||
|
|
||||||
msg = TextField->m_Text;
|
|
||||||
Get_Message( _( "Value" ), msg, this );
|
|
||||||
|
|
||||||
if( !msg.IsEmpty() )
|
|
||||||
{
|
|
||||||
DrawTextField( DrawPanel, DC, &DrawLibItem->m_Field[VALUE], flag, g_XorMode );
|
|
||||||
TextField->m_Text = msg;
|
|
||||||
DrawTextField( DrawPanel, DC, &DrawLibItem->m_Field[VALUE], flag,
|
|
||||||
DrawLibItem->m_Flags ? g_XorMode : GR_DEFAULT_DRAWMODE );
|
|
||||||
m_CurrentScreen->SetModify();
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawLibItem->Display_Infos( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
void WinEDA_ComponentPropertiesFrame::SetInitCmp( wxCommandEvent& event )
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
/* Replace le composant en position normale, dimensions et positions
|
|
||||||
* fields comme definies en librairie
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
EDA_LibComponentStruct* Entry;
|
|
||||||
|
|
||||||
if( m_Cmp == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
Entry = FindLibPart( m_Cmp->m_ChipName.GetData(), wxEmptyString, FIND_ROOT );
|
|
||||||
|
|
||||||
if( Entry == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
wxClientDC dc( m_Parent->DrawPanel );
|
|
||||||
m_Parent->DrawPanel->PrepareGraphicContext( &dc );
|
|
||||||
|
|
||||||
RedrawOneStruct( m_Parent->DrawPanel, &dc, m_Cmp, g_XorMode );
|
|
||||||
|
|
||||||
/* Mise aux valeurs par defaut des champs et orientation */
|
|
||||||
m_Cmp->m_Field[REFERENCE].m_Pos.x =
|
|
||||||
Entry->m_Prefix.m_Pos.x + m_Cmp->m_Pos.x;
|
|
||||||
m_Cmp->m_Field[REFERENCE].m_Pos.y =
|
|
||||||
Entry->m_Prefix.m_Pos.y + m_Cmp->m_Pos.y;
|
|
||||||
m_Cmp->m_Field[REFERENCE].m_Orient = Entry->m_Prefix.m_Orient;
|
|
||||||
m_Cmp->m_Field[REFERENCE].m_Size = Entry->m_Prefix.m_Size;
|
|
||||||
m_Cmp->m_Field[REFERENCE].m_HJustify = Entry->m_Prefix.m_HJustify;
|
|
||||||
m_Cmp->m_Field[REFERENCE].m_VJustify = Entry->m_Prefix.m_VJustify;
|
|
||||||
|
|
||||||
m_Cmp->m_Field[VALUE].m_Pos.x =
|
|
||||||
Entry->m_Name.m_Pos.x + m_Cmp->m_Pos.x;
|
|
||||||
m_Cmp->m_Field[VALUE].m_Pos.y =
|
|
||||||
Entry->m_Name.m_Pos.y + m_Cmp->m_Pos.y;
|
|
||||||
m_Cmp->m_Field[VALUE].m_Orient = Entry->m_Name.m_Orient;
|
|
||||||
m_Cmp->m_Field[VALUE].m_Size = Entry->m_Name.m_Size;
|
|
||||||
m_Cmp->m_Field[VALUE].m_HJustify = Entry->m_Name.m_HJustify;
|
|
||||||
m_Cmp->m_Field[VALUE].m_VJustify = Entry->m_Name.m_VJustify;
|
|
||||||
|
|
||||||
m_Cmp->SetRotationMiroir( CMP_NORMAL );
|
|
||||||
|
|
||||||
m_Parent->m_CurrentScreen->SetModify();
|
|
||||||
|
|
||||||
RedrawOneStruct( m_Parent->DrawPanel, &dc, m_Cmp, GR_DEFAULT_DRAWMODE );
|
|
||||||
Close();
|
|
||||||
}
|
|
|
@ -1,121 +0,0 @@
|
||||||
/**********************************************************/
|
|
||||||
/* EECLASS.CPP */
|
|
||||||
/* fonctions relatives aux classes definies dans EESCHEMA */
|
|
||||||
/**********************************************************/
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
|
||||||
#include "gr_basic.h"
|
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "program.h"
|
|
||||||
#include "libcmp.h"
|
|
||||||
#include "general.h"
|
|
||||||
|
|
||||||
#include "protos.h"
|
|
||||||
|
|
||||||
|
|
||||||
/************************************************************/
|
|
||||||
void SetStructFather( EDA_BaseStruct* Struct, BASE_SCREEN* Screen )
|
|
||||||
/************************************************************/
|
|
||||||
{
|
|
||||||
switch( Struct->Type() )
|
|
||||||
{
|
|
||||||
case DRAW_POLYLINE_STRUCT_TYPE:
|
|
||||||
case DRAW_JUNCTION_STRUCT_TYPE:
|
|
||||||
case DRAW_TEXT_STRUCT_TYPE:
|
|
||||||
case DRAW_LABEL_STRUCT_TYPE:
|
|
||||||
case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
|
|
||||||
case DRAW_LIB_ITEM_STRUCT_TYPE:
|
|
||||||
case DRAW_SEGMENT_STRUCT_TYPE:
|
|
||||||
case DRAW_BUSENTRY_STRUCT_TYPE:
|
|
||||||
case DRAW_SHEET_STRUCT_TYPE:
|
|
||||||
case DRAW_MARKER_STRUCT_TYPE:
|
|
||||||
case DRAW_NOCONNECT_STRUCT_TYPE:
|
|
||||||
Struct->m_Parent = Screen;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DRAW_SHEETLABEL_STRUCT_TYPE:
|
|
||||||
case DRAW_PICK_ITEM_STRUCT_TYPE:
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************/
|
|
||||||
void EDA_BaseStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC )
|
|
||||||
/*************************************************************/
|
|
||||||
{
|
|
||||||
if( m_Flags & IS_NEW )
|
|
||||||
{
|
|
||||||
Pnext = frame->m_CurrentScreen->EEDrawList;
|
|
||||||
frame->m_CurrentScreen->EEDrawList = this;
|
|
||||||
g_ItemToRepeat = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_Flags = 0;
|
|
||||||
SetFlagModify( frame->GetScreen() );
|
|
||||||
frame->GetScreen()->SetCurItem( NULL );
|
|
||||||
frame->DrawPanel->ManageCurseur = NULL;
|
|
||||||
frame->DrawPanel->ForceCloseManageCurseur = NULL;
|
|
||||||
|
|
||||||
frame->DrawPanel->CursorOff( DC ); // Erase schematic cursor
|
|
||||||
RedrawOneStruct( frame->DrawPanel, DC, this, GR_DEFAULT_DRAWMODE );
|
|
||||||
frame->DrawPanel->CursorOn( DC ); // Display schematic cursor
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**************************************************/
|
|
||||||
/* Class SCH_SCREEN: classe de gestion d'un affichage pour schematique */
|
|
||||||
/***************************************************/
|
|
||||||
static int table_zoom[] = { 1, 2, 4, 8, 16, 32, 64, 128, 0 }; /* Valeurs standards du zoom */
|
|
||||||
|
|
||||||
/* Constructeur de SCREEN */
|
|
||||||
SCH_SCREEN::SCH_SCREEN( EDA_BaseStruct* parent, WinEDA_DrawFrame* frame_source, int idtype ) :
|
|
||||||
BASE_SCREEN( parent, frame_source, idtype )
|
|
||||||
{
|
|
||||||
EEDrawList = NULL; /* Schematic items list */
|
|
||||||
m_Zoom = 32;
|
|
||||||
m_Grid = wxSize( 50, 50 ); /* pas de la grille */
|
|
||||||
SetZoomList( table_zoom );
|
|
||||||
SetGridList( g_GridList );
|
|
||||||
m_UndoRedoCountMax = 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/****************************/
|
|
||||||
SCH_SCREEN::~SCH_SCREEN()
|
|
||||||
/****************************/
|
|
||||||
{
|
|
||||||
ClearUndoRedoList();
|
|
||||||
FreeDrawList();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************/
|
|
||||||
SCH_SCREEN* SCH_SCREEN::GenCopy()
|
|
||||||
/*************************************/
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************/
|
|
||||||
void SCH_SCREEN::FreeDrawList()
|
|
||||||
/***********************************/
|
|
||||||
|
|
||||||
/* Routine to clear EESchema drawing list of a screen.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
EDA_BaseStruct* DrawStruct;
|
|
||||||
|
|
||||||
while( EEDrawList != NULL )
|
|
||||||
{
|
|
||||||
DrawStruct = EEDrawList;
|
|
||||||
EEDrawList = EEDrawList->Pnext;
|
|
||||||
delete DrawStruct;
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,730 +0,0 @@
|
||||||
/***********************************************************/
|
|
||||||
/* genliste.cpp */
|
|
||||||
/* Module de generation de listing de composants, labels.. */
|
|
||||||
/***********************************************************/
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
|
||||||
#include "gr_basic.h"
|
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "program.h"
|
|
||||||
#include "libcmp.h"
|
|
||||||
#include "general.h"
|
|
||||||
#include "netlist.h"
|
|
||||||
|
|
||||||
#include "protos.h"
|
|
||||||
|
|
||||||
/* Structures pour memo et liste des elements */
|
|
||||||
typedef struct ListLabel
|
|
||||||
{
|
|
||||||
int Type();
|
|
||||||
void * m_Label;
|
|
||||||
int m_SheetNumber;
|
|
||||||
} ListLabel;
|
|
||||||
|
|
||||||
|
|
||||||
/* fonctions locales */
|
|
||||||
static void GenereListeOfItems(wxWindow * frame, const wxString & FullFileName);
|
|
||||||
static int GenListeGLabels( ListLabel * List );
|
|
||||||
static int ListTriComposantByRef(EDA_SchComponentStruct **Objet1,
|
|
||||||
EDA_SchComponentStruct **Objet2);
|
|
||||||
static int ListTriComposantByVal(EDA_SchComponentStruct **Objet1,
|
|
||||||
EDA_SchComponentStruct **Objet2);
|
|
||||||
static int ListTriGLabelBySheet(ListLabel *Objet1, ListLabel *Objet2);
|
|
||||||
static int ListTriGLabelByVal(ListLabel *Objet1, ListLabel *Objet2);
|
|
||||||
static void DeleteSubCmp( EDA_BaseStruct ** List , int NbItems);
|
|
||||||
|
|
||||||
static int PrintListeCmpByRef( FILE *f, EDA_BaseStruct **List, int NbItems);
|
|
||||||
static int PrintListeCmpByVal( FILE *f, EDA_BaseStruct **List, int NbItems);
|
|
||||||
|
|
||||||
static int PrintListeGLabel( FILE *f, ListLabel *List, int NbItems);
|
|
||||||
|
|
||||||
// Constantes:
|
|
||||||
#define LISTCMP_BY_REF 1
|
|
||||||
#define LISTCMP_BY_VAL 2
|
|
||||||
#define LIST_SUBCMP 4
|
|
||||||
#define LIST_HPINS_BY_NAME 8
|
|
||||||
#define LIST_HPINS_BY_SHEET 0x10
|
|
||||||
|
|
||||||
/* Variable locales */
|
|
||||||
int ItemsToList = LISTCMP_BY_REF | LISTCMP_BY_VAL;
|
|
||||||
|
|
||||||
enum id_tools {
|
|
||||||
ID_TOOLS_GEN_LIST = 1500,
|
|
||||||
ID_EXIT_TOOLS,
|
|
||||||
ID_SET_FILENAME_LIST
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Classe de la frame de gestion de l'annotation */
|
|
||||||
class WinEDA_GenCmpListFrame: public wxDialog
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
WinEDA_DrawFrame * m_Parent;
|
|
||||||
|
|
||||||
wxCheckBox * m_ListCmpbyRefItems;
|
|
||||||
wxCheckBox * m_ListCmpbyValItems;
|
|
||||||
wxCheckBox * m_ListSubCmpItems;
|
|
||||||
wxCheckBox * m_GenListLabelsbyVal;
|
|
||||||
wxCheckBox * m_GenListLabelsbySheet;
|
|
||||||
wxString m_LibArchiveFileName;
|
|
||||||
wxString m_ListFileName;
|
|
||||||
|
|
||||||
// Constructor and destructor
|
|
||||||
WinEDA_GenCmpListFrame(WinEDA_DrawFrame *parent, wxPoint& pos);
|
|
||||||
~WinEDA_GenCmpListFrame() {};
|
|
||||||
|
|
||||||
void GenList(wxCommandEvent& event);
|
|
||||||
void GenListUpdateOpt();
|
|
||||||
void ToolsExit(wxCommandEvent& event);
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(WinEDA_GenCmpListFrame, wxDialog)
|
|
||||||
EVT_BUTTON(ID_EXIT_TOOLS, WinEDA_GenCmpListFrame::ToolsExit)
|
|
||||||
EVT_BUTTON(ID_TOOLS_GEN_LIST, WinEDA_GenCmpListFrame::GenList)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************/
|
|
||||||
void InstallToolsFrame(WinEDA_DrawFrame *parent, wxPoint & pos)
|
|
||||||
/***************************************************************/
|
|
||||||
{
|
|
||||||
WinEDA_GenCmpListFrame * frame = new WinEDA_GenCmpListFrame(parent, pos);
|
|
||||||
frame->ShowModal(); frame->Destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
WinEDA_GenCmpListFrame::WinEDA_GenCmpListFrame(WinEDA_DrawFrame *parent,
|
|
||||||
wxPoint& framepos):
|
|
||||||
wxDialog(parent, -1, _("List of Material"), framepos, wxSize(360, 200),
|
|
||||||
DIALOG_STYLE)
|
|
||||||
/*****************************************************************************/
|
|
||||||
{
|
|
||||||
wxPoint pos;
|
|
||||||
|
|
||||||
m_Parent = parent;
|
|
||||||
SetFont(*g_DialogFont);
|
|
||||||
|
|
||||||
if ( (framepos.x == -1) && (framepos.x == -1) ) Centre();
|
|
||||||
|
|
||||||
/* Calcul du nom du fichier d'archivage */
|
|
||||||
m_LibArchiveFileName = MakeFileName(wxEmptyString,ScreenSch->m_FileName,wxEmptyString);
|
|
||||||
/* mise a jour extension */
|
|
||||||
ChangeFileNameExt(m_LibArchiveFileName, g_LibExtBuffer);
|
|
||||||
|
|
||||||
/* Calcul du nom du fichier de listage */
|
|
||||||
m_ListFileName = MakeFileName(wxEmptyString,ScreenSch->m_FileName,wxEmptyString);
|
|
||||||
/* mise a jour extension */
|
|
||||||
ChangeFileNameExt(m_ListFileName, wxT(".lst"));
|
|
||||||
|
|
||||||
pos.x = 5; pos.y = 15;
|
|
||||||
new wxStaticBox(this, -1,_(" List items: "), pos, wxSize(230, 120));
|
|
||||||
|
|
||||||
pos.x = 10; pos.y += 22;
|
|
||||||
m_ListCmpbyRefItems = new wxCheckBox(this,-1, _("Components by Reference"), pos);
|
|
||||||
if ( ItemsToList & LISTCMP_BY_REF ) m_ListCmpbyRefItems->SetValue(TRUE);
|
|
||||||
pos.y += 17;
|
|
||||||
m_ListCmpbyValItems = new wxCheckBox(this,-1, _("Components by Value"), pos);
|
|
||||||
if ( ItemsToList & LISTCMP_BY_VAL ) m_ListCmpbyValItems->SetValue(TRUE);
|
|
||||||
pos.y += 17;
|
|
||||||
m_ListSubCmpItems = new wxCheckBox(this,-1, _("Sub Components (i.e U2A, U2B..)"), pos);
|
|
||||||
if ( ItemsToList & LIST_SUBCMP ) m_ListSubCmpItems->SetValue(TRUE);
|
|
||||||
pos.y += 17;
|
|
||||||
m_GenListLabelsbyVal = new wxCheckBox(this,-1, _("Hierachy Pins by name"), pos);
|
|
||||||
if ( ItemsToList & LIST_HPINS_BY_NAME ) m_GenListLabelsbyVal->SetValue(TRUE);
|
|
||||||
pos.y += 17;
|
|
||||||
m_GenListLabelsbySheet = new wxCheckBox(this,-1, _("Hierachy Pins by Sheets"), pos);
|
|
||||||
if ( ItemsToList & LIST_HPINS_BY_SHEET ) m_GenListLabelsbySheet->SetValue(TRUE);
|
|
||||||
|
|
||||||
/* Creation des boutons de commande */
|
|
||||||
pos.x = 260; pos.y = 40;
|
|
||||||
wxButton * Button = new wxButton(this, ID_TOOLS_GEN_LIST,
|
|
||||||
_("&Create List"), pos);
|
|
||||||
Button->SetForegroundColour(*wxRED);
|
|
||||||
|
|
||||||
pos.y += Button->GetSize().y + 5;
|
|
||||||
Button = new wxButton(this, ID_EXIT_TOOLS,
|
|
||||||
_("&Exit"), pos);
|
|
||||||
Button->SetForegroundColour(*wxBLUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fonctions de positionnement des variables d'option
|
|
||||||
void WinEDA_GenCmpListFrame::GenListUpdateOpt()
|
|
||||||
{
|
|
||||||
ItemsToList = 0;
|
|
||||||
if ( m_ListCmpbyRefItems->GetValue() ) ItemsToList |= LISTCMP_BY_REF;
|
|
||||||
if ( m_ListCmpbyValItems->GetValue() ) ItemsToList |= LISTCMP_BY_VAL;
|
|
||||||
if ( m_ListSubCmpItems->GetValue() ) ItemsToList |= LIST_SUBCMP;
|
|
||||||
if ( m_GenListLabelsbyVal->GetValue() ) ItemsToList |= LIST_HPINS_BY_NAME;
|
|
||||||
if ( m_GenListLabelsbySheet->GetValue() ) ItemsToList |= LIST_HPINS_BY_SHEET;
|
|
||||||
}
|
|
||||||
|
|
||||||
void WinEDA_GenCmpListFrame::GenList(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
#define EXT_LIST wxT(".lst")
|
|
||||||
wxString mask, filename;
|
|
||||||
|
|
||||||
GenListUpdateOpt();
|
|
||||||
|
|
||||||
mask = wxT("*"); mask += EXT_LIST;
|
|
||||||
filename = EDA_FileSelector(_("List of material:"),
|
|
||||||
wxEmptyString, /* Chemin par defaut (ici dir courante) */
|
|
||||||
m_ListFileName, /* nom fichier par defaut, et resultat */
|
|
||||||
EXT_LIST, /* extension par defaut */
|
|
||||||
mask, /* Masque d'affichage */
|
|
||||||
this,
|
|
||||||
wxSAVE,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
if ( filename.IsEmpty() ) return;
|
|
||||||
else m_ListFileName = filename;
|
|
||||||
|
|
||||||
GenereListeOfItems(this, m_ListFileName);
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
void WinEDA_GenCmpListFrame::ToolsExit(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
GenListUpdateOpt();
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
static void GenereListeOfItems(wxWindow * frame, const wxString & FullFileName)
|
|
||||||
/***************************************************************************/
|
|
||||||
/*
|
|
||||||
Routine principale pour la creation des listings ( composants et/ou labels
|
|
||||||
globaux et "sheet labels" )
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
FILE *f;
|
|
||||||
EDA_BaseStruct ** List;
|
|
||||||
ListLabel * ListOfLabels;
|
|
||||||
int NbItems;
|
|
||||||
char Line[1024];
|
|
||||||
wxString msg;
|
|
||||||
|
|
||||||
/* Creation de la liste des elements */
|
|
||||||
if ((f = wxFopen(FullFileName, wxT("wt"))) == NULL)
|
|
||||||
{
|
|
||||||
msg = _("Failed to open file "); msg << FullFileName;
|
|
||||||
DisplayError(frame, msg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
NbItems = GenListeCmp(NULL );
|
|
||||||
if ( NbItems )
|
|
||||||
{
|
|
||||||
List = (EDA_BaseStruct **)
|
|
||||||
MyZMalloc( NbItems * sizeof(EDA_BaseStruct **) );
|
|
||||||
if (List == NULL )
|
|
||||||
{
|
|
||||||
fclose(f); return;
|
|
||||||
}
|
|
||||||
|
|
||||||
GenListeCmp(List);
|
|
||||||
|
|
||||||
/* generation du fichier listing */
|
|
||||||
DateAndTime(Line);
|
|
||||||
fprintf( f, "%s >> Creation date: %s\n", CONV_TO_UTF8(Main_Title), Line );
|
|
||||||
|
|
||||||
/* Tri et impression de la liste des composants */
|
|
||||||
|
|
||||||
qsort( List, NbItems, sizeof( EDA_BaseStruct * ),
|
|
||||||
(int(*)(const void*, const void*))ListTriComposantByRef);
|
|
||||||
|
|
||||||
if( (ItemsToList & LIST_SUBCMP) == 0 ) DeleteSubCmp(List, NbItems);
|
|
||||||
|
|
||||||
if( (ItemsToList & LISTCMP_BY_REF) )
|
|
||||||
{
|
|
||||||
PrintListeCmpByRef(f, List, NbItems);
|
|
||||||
}
|
|
||||||
|
|
||||||
if( (ItemsToList & LISTCMP_BY_VAL) )
|
|
||||||
{
|
|
||||||
qsort( List, NbItems, sizeof( EDA_BaseStruct * ),
|
|
||||||
(int(*)(const void*, const void*))ListTriComposantByVal);
|
|
||||||
PrintListeCmpByVal(f, List, NbItems);
|
|
||||||
}
|
|
||||||
MyFree( List );
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************/
|
|
||||||
/* Generation liste des Labels globaux */
|
|
||||||
/***************************************/
|
|
||||||
|
|
||||||
NbItems = GenListeGLabels( NULL );
|
|
||||||
if ( NbItems )
|
|
||||||
{
|
|
||||||
ListOfLabels = (ListLabel *) MyZMalloc( NbItems * sizeof(ListLabel) );
|
|
||||||
if (ListOfLabels == NULL )
|
|
||||||
{
|
|
||||||
fclose(f); return;
|
|
||||||
}
|
|
||||||
|
|
||||||
GenListeGLabels(ListOfLabels);
|
|
||||||
|
|
||||||
/* Tri de la liste */
|
|
||||||
if( (ItemsToList & LIST_HPINS_BY_SHEET) )
|
|
||||||
{
|
|
||||||
qsort( ListOfLabels, NbItems, sizeof( ListLabel ),
|
|
||||||
(int(*)(const void*, const void*))ListTriGLabelBySheet);
|
|
||||||
|
|
||||||
msg = _("\n#Glob labels ( order = Sheet Number )\n");
|
|
||||||
fprintf( f, "%s", CONV_TO_UTF8(msg));
|
|
||||||
PrintListeGLabel(f, ListOfLabels, NbItems);
|
|
||||||
}
|
|
||||||
|
|
||||||
if( (ItemsToList & LIST_HPINS_BY_NAME) )
|
|
||||||
{
|
|
||||||
qsort( ListOfLabels, NbItems, sizeof( ListLabel ),
|
|
||||||
(int(*)(const void*, const void*))ListTriGLabelByVal);
|
|
||||||
|
|
||||||
msg = _("\n#Glob labels ( order = Alphab. )\n");
|
|
||||||
fprintf( f, "%s", CONV_TO_UTF8(msg));
|
|
||||||
PrintListeGLabel(f, ListOfLabels, NbItems);
|
|
||||||
}
|
|
||||||
MyFree( ListOfLabels );
|
|
||||||
}
|
|
||||||
|
|
||||||
msg = _("\n#End List\n");
|
|
||||||
fprintf( f, "%s", CONV_TO_UTF8(msg));
|
|
||||||
fclose(f);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************/
|
|
||||||
int GenListeCmp( EDA_BaseStruct ** List )
|
|
||||||
/****************************************/
|
|
||||||
/* Routine de generation de la liste des elements utiles du dessin
|
|
||||||
Si List == NULL: comptage des elements
|
|
||||||
Sinon remplissage de la liste
|
|
||||||
Initialise "FlagControlMulti" a SheetNumber pour la sortie des listes
|
|
||||||
et m_Father comme pointeur sur la sheet d'appartenance
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
int ii = 0;
|
|
||||||
EDA_BaseStruct *DrawList;
|
|
||||||
EDA_SchComponentStruct *DrawLibItem;
|
|
||||||
BASE_SCREEN * screen = ScreenSch;
|
|
||||||
|
|
||||||
for( ; screen != NULL ; screen = (BASE_SCREEN*)screen->Pnext )
|
|
||||||
{
|
|
||||||
DrawList = screen->EEDrawList;
|
|
||||||
while ( DrawList )
|
|
||||||
{
|
|
||||||
switch( DrawList->Type() )
|
|
||||||
{
|
|
||||||
|
|
||||||
case DRAW_LIB_ITEM_STRUCT_TYPE :
|
|
||||||
ii++;
|
|
||||||
DrawLibItem = (EDA_SchComponentStruct *) DrawList;
|
|
||||||
DrawLibItem->m_FlagControlMulti = screen->m_SheetNumber;
|
|
||||||
DrawLibItem->m_Parent = screen;
|
|
||||||
if( List )
|
|
||||||
{
|
|
||||||
*List = DrawList; List++;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
DrawList = DrawList->Pnext;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ( ii );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********************************************/
|
|
||||||
static int GenListeGLabels( ListLabel * List )
|
|
||||||
/*********************************************/
|
|
||||||
/* Count the Glabels, or fill the list Listwith Glabel pointers
|
|
||||||
If List == NULL: Item count only
|
|
||||||
Else fill list of Glabels
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
int ii = 0;
|
|
||||||
EDA_BaseStruct *DrawList;
|
|
||||||
DrawSheetLabelStruct *SheetLabel;
|
|
||||||
BASE_SCREEN * screen = ScreenSch;
|
|
||||||
|
|
||||||
for( ; screen != NULL ; screen = (BASE_SCREEN*)screen->Pnext )
|
|
||||||
{
|
|
||||||
DrawList = screen->EEDrawList;
|
|
||||||
while ( DrawList )
|
|
||||||
{
|
|
||||||
switch( DrawList->Type() )
|
|
||||||
{
|
|
||||||
case DRAW_GLOBAL_LABEL_STRUCT_TYPE :
|
|
||||||
if( List )
|
|
||||||
{
|
|
||||||
List->Type() = DRAW_TEXT_STRUCT_TYPE;
|
|
||||||
List->m_SheetNumber = screen->m_SheetNumber;
|
|
||||||
List->m_Label = DrawList; List++;
|
|
||||||
}
|
|
||||||
ii++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DRAW_SHEET_STRUCT_TYPE :
|
|
||||||
{
|
|
||||||
#define Sheet ((DrawSheetStruct * ) DrawList)
|
|
||||||
SheetLabel= Sheet->m_Label;
|
|
||||||
while( SheetLabel != NULL )
|
|
||||||
{
|
|
||||||
if ( List )
|
|
||||||
{
|
|
||||||
List->Type() = DRAW_SHEETLABEL_STRUCT_TYPE;
|
|
||||||
List->m_SheetNumber = screen->m_SheetNumber;
|
|
||||||
List->m_Label = SheetLabel;
|
|
||||||
List++;
|
|
||||||
}
|
|
||||||
ii++;
|
|
||||||
SheetLabel = (DrawSheetLabelStruct*)(SheetLabel->Pnext);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
DrawList = DrawList->Pnext;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ( ii );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**********************************************************/
|
|
||||||
static int ListTriComposantByVal(EDA_SchComponentStruct **Objet1,
|
|
||||||
EDA_SchComponentStruct **Objet2)
|
|
||||||
/**********************************************************/
|
|
||||||
/* Routine de comparaison pour le tri du Tableau par qsort()
|
|
||||||
Les composants sont tries
|
|
||||||
par valeur
|
|
||||||
si meme valeur: par reference
|
|
||||||
si meme valeur: par numero d'unite
|
|
||||||
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
int ii;
|
|
||||||
const wxString * Text1, *Text2;
|
|
||||||
|
|
||||||
if( (*Objet1 == NULL) && (*Objet2 == NULL ) ) return(0);
|
|
||||||
if( *Objet1 == NULL) return(-1);
|
|
||||||
if( *Objet2 == NULL) return(1);
|
|
||||||
|
|
||||||
Text1 = &(*Objet1)->m_Field[VALUE].m_Text;
|
|
||||||
Text2 = &(*Objet2)->m_Field[VALUE].m_Text;
|
|
||||||
ii = Text1->CmpNoCase(*Text2);
|
|
||||||
|
|
||||||
if( ii == 0 )
|
|
||||||
{
|
|
||||||
Text1 = &(*Objet1)->m_Field[REFERENCE].m_Text;
|
|
||||||
Text2 = &(*Objet2)->m_Field[REFERENCE].m_Text;
|
|
||||||
ii = Text1->CmpNoCase(*Text2);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ii == 0 )
|
|
||||||
{
|
|
||||||
ii = (*Objet1)->m_Multi - (*Objet2)->m_Multi;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(ii);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**********************************************************/
|
|
||||||
static int ListTriComposantByRef(EDA_SchComponentStruct **Objet1,
|
|
||||||
EDA_SchComponentStruct **Objet2)
|
|
||||||
/**********************************************************/
|
|
||||||
/* Routine de comparaison pour le tri du Tableau par qsort()
|
|
||||||
Les composants sont tries
|
|
||||||
par reference
|
|
||||||
si meme referenece: par valeur
|
|
||||||
si meme valeur: par numero d'unite
|
|
||||||
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
int ii;
|
|
||||||
const wxString * Text1, *Text2;
|
|
||||||
|
|
||||||
if( (*Objet1 == NULL) && (*Objet2 == NULL ) ) return(0);
|
|
||||||
if( *Objet1 == NULL) return(-1);
|
|
||||||
if( *Objet2 == NULL) return(1);
|
|
||||||
|
|
||||||
Text1 = &(*Objet1)->m_Field[REFERENCE].m_Text;
|
|
||||||
Text2 = &(*Objet2)->m_Field[REFERENCE].m_Text;
|
|
||||||
ii = Text1->CmpNoCase(*Text2);
|
|
||||||
|
|
||||||
if( ii == 0 )
|
|
||||||
{
|
|
||||||
Text1 = &(*Objet1)->m_Field[VALUE].m_Text;
|
|
||||||
Text2 = &(*Objet2)->m_Field[VALUE].m_Text;
|
|
||||||
ii = Text1->CmpNoCase(*Text2);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ii == 0 )
|
|
||||||
{
|
|
||||||
ii = (*Objet1)->m_Multi - (*Objet2)->m_Multi;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(ii);
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************/
|
|
||||||
static int ListTriGLabelByVal(ListLabel *Objet1, ListLabel *Objet2)
|
|
||||||
/*******************************************************************/
|
|
||||||
/* Routine de comparaison pour le tri du Tableau par qsort()
|
|
||||||
Les labels sont tries
|
|
||||||
par comparaison ascii
|
|
||||||
si meme valeur: par numero de sheet
|
|
||||||
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
int ii;
|
|
||||||
const wxString * Text1, *Text2;
|
|
||||||
|
|
||||||
if( Objet1->Type() == DRAW_SHEETLABEL_STRUCT_TYPE )
|
|
||||||
Text1 = &((DrawSheetLabelStruct *)Objet1->m_Label)->m_Text;
|
|
||||||
else
|
|
||||||
Text1 = &((DrawTextStruct *)Objet1->m_Label)->m_Text;
|
|
||||||
|
|
||||||
if( Objet2->Type() == DRAW_SHEETLABEL_STRUCT_TYPE )
|
|
||||||
Text2 = &((DrawSheetLabelStruct *)Objet2->m_Label)->m_Text;
|
|
||||||
else
|
|
||||||
Text2 = &((DrawTextStruct *)Objet2->m_Label)->m_Text;
|
|
||||||
ii = Text1->CmpNoCase(*Text2);
|
|
||||||
|
|
||||||
if ( ii == 0 )
|
|
||||||
{
|
|
||||||
ii = Objet1->m_SheetNumber - Objet2->m_SheetNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(ii);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*******************************************************************/
|
|
||||||
static int ListTriGLabelBySheet(ListLabel *Objet1, ListLabel *Objet2)
|
|
||||||
/*******************************************************************/
|
|
||||||
/* Routine de comparaison pour le tri du Tableau par qsort()
|
|
||||||
Les labels sont tries
|
|
||||||
par sheet number
|
|
||||||
si meme valeur, par ordre alphabetique
|
|
||||||
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
int ii;
|
|
||||||
const wxString * Text1, *Text2;
|
|
||||||
|
|
||||||
ii = Objet1->m_SheetNumber - Objet2->m_SheetNumber;
|
|
||||||
|
|
||||||
if ( ii == 0 )
|
|
||||||
{
|
|
||||||
if( Objet1->Type() == DRAW_SHEETLABEL_STRUCT_TYPE )
|
|
||||||
Text1 = &((DrawSheetLabelStruct *)Objet1->m_Label)->m_Text;
|
|
||||||
else
|
|
||||||
Text1 = &((DrawTextStruct *)Objet1->m_Label)->m_Text;
|
|
||||||
|
|
||||||
if( Objet2->Type() == DRAW_SHEETLABEL_STRUCT_TYPE )
|
|
||||||
Text2 = &((DrawSheetLabelStruct *)Objet2->m_Label)->m_Text;
|
|
||||||
else
|
|
||||||
Text2 = &((DrawTextStruct *)Objet2->m_Label)->m_Text;
|
|
||||||
ii = Text1->CmpNoCase(*Text2);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(ii);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************/
|
|
||||||
static void DeleteSubCmp( EDA_BaseStruct ** List, int NbItems )
|
|
||||||
/**************************************************************/
|
|
||||||
/* Supprime les sous-composants, c'est a dire les descriptions redonnantes des
|
|
||||||
boitiers multiples
|
|
||||||
La liste des composant doit etre triee par reference et par num d'unite
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
int ii;
|
|
||||||
EDA_SchComponentStruct * LibItem;
|
|
||||||
const wxString * OldName = NULL;
|
|
||||||
|
|
||||||
for( ii = 0; ii < NbItems ; ii++ )
|
|
||||||
{
|
|
||||||
LibItem = (EDA_SchComponentStruct *) List[ii];
|
|
||||||
if ( LibItem == NULL ) continue;
|
|
||||||
if( OldName )
|
|
||||||
{
|
|
||||||
if ( OldName->CmpNoCase( LibItem->m_Field[REFERENCE].m_Text ) == 0 )
|
|
||||||
{
|
|
||||||
List[ii] = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
OldName = &LibItem->m_Field[REFERENCE].m_Text;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************/
|
|
||||||
int PrintListeCmpByRef( FILE * f, EDA_BaseStruct ** List, int NbItems )
|
|
||||||
/**********************************************************************/
|
|
||||||
/* Impression de la liste des composants tries par reference
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
int ii, Multi, Unit;
|
|
||||||
EDA_BaseStruct *DrawList;
|
|
||||||
EDA_SchComponentStruct *DrawLibItem;
|
|
||||||
EDA_LibComponentStruct *Entry;
|
|
||||||
char NameCmp[80];
|
|
||||||
wxString msg;
|
|
||||||
|
|
||||||
msg = _("\n#Cmp ( order = Reference )");
|
|
||||||
if ( (ItemsToList & LIST_SUBCMP) ) msg << _(" (with SubCmp)");
|
|
||||||
fprintf( f, "%s\n", CONV_TO_UTF8(msg));
|
|
||||||
|
|
||||||
for ( ii = 0; ii < NbItems; ii++ )
|
|
||||||
{
|
|
||||||
DrawList = List[ii];
|
|
||||||
|
|
||||||
if( DrawList == NULL ) continue;
|
|
||||||
if( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) continue;
|
|
||||||
|
|
||||||
DrawLibItem = (EDA_SchComponentStruct *) DrawList;
|
|
||||||
if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue;
|
|
||||||
|
|
||||||
Multi = 0; Unit = ' ';
|
|
||||||
Entry = FindLibPart(DrawLibItem->m_ChipName.GetData(), wxEmptyString, FIND_ROOT);
|
|
||||||
if( Entry ) Multi = Entry->m_UnitCount;
|
|
||||||
if( (Multi > 1 ) && ( ItemsToList & LIST_SUBCMP ) )
|
|
||||||
Unit = DrawLibItem->m_Multi + 'A' - 1;
|
|
||||||
|
|
||||||
sprintf( NameCmp,"%s%c", CONV_TO_UTF8(DrawLibItem->m_Field[REFERENCE].m_Text),
|
|
||||||
Unit);
|
|
||||||
fprintf(f, "| %-10.10s %-12.12s",
|
|
||||||
NameCmp,
|
|
||||||
CONV_TO_UTF8(DrawLibItem->m_Field[VALUE].m_Text));
|
|
||||||
|
|
||||||
if ( (ItemsToList & LIST_SUBCMP) )
|
|
||||||
{
|
|
||||||
BASE_SCREEN * screen = (BASE_SCREEN *)(DrawLibItem->m_Parent);
|
|
||||||
wxString sheetname;
|
|
||||||
if( screen->m_Parent )
|
|
||||||
sheetname = ((DrawSheetStruct*)screen->m_Parent)->m_Field[VALUE].m_Text.GetData();
|
|
||||||
else sheetname = _("Root");
|
|
||||||
fprintf(f, " (Sheet %.2d: \"%s\")", DrawLibItem->m_FlagControlMulti,
|
|
||||||
CONV_TO_UTF8(sheetname));
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(f,"\n");
|
|
||||||
}
|
|
||||||
msg = _("#End Cmp\n");
|
|
||||||
fprintf(f, CONV_TO_UTF8(msg));
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************/
|
|
||||||
int PrintListeCmpByVal( FILE * f, EDA_BaseStruct ** List, int NbItems )
|
|
||||||
/**********************************************************************/
|
|
||||||
{
|
|
||||||
int ii, Multi;
|
|
||||||
wxChar Unit;
|
|
||||||
EDA_BaseStruct *DrawList;
|
|
||||||
EDA_SchComponentStruct *DrawLibItem;
|
|
||||||
EDA_LibComponentStruct *Entry;
|
|
||||||
wxString msg;
|
|
||||||
|
|
||||||
msg = _("\n#Cmp ( order = Value )");
|
|
||||||
if ( (ItemsToList & LIST_SUBCMP) ) msg << _(" (with SubCmp)");
|
|
||||||
msg << wxT("\n");
|
|
||||||
fprintf(f, CONV_TO_UTF8(msg));
|
|
||||||
|
|
||||||
for ( ii = 0; ii < NbItems; ii++ )
|
|
||||||
{
|
|
||||||
DrawList = List[ii];
|
|
||||||
|
|
||||||
if( DrawList == NULL ) continue;
|
|
||||||
if( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) continue;
|
|
||||||
|
|
||||||
DrawLibItem = (EDA_SchComponentStruct *) DrawList;
|
|
||||||
if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue;
|
|
||||||
|
|
||||||
Multi = 0; Unit = ' ';
|
|
||||||
Entry = FindLibPart(DrawLibItem->m_ChipName.GetData(), wxEmptyString, FIND_ROOT);
|
|
||||||
if( Entry ) Multi = Entry->m_UnitCount;
|
|
||||||
if( (Multi > 1 ) && ( ItemsToList & LIST_SUBCMP ) )
|
|
||||||
Unit = DrawLibItem->m_Multi + 'A' - 1;
|
|
||||||
msg = DrawLibItem->m_Field[REFERENCE].m_Text;
|
|
||||||
msg.Append(Unit);
|
|
||||||
|
|
||||||
fprintf(f, "| %-12.12s %-10.10s",
|
|
||||||
CONV_TO_UTF8(DrawLibItem->m_Field[VALUE].m_Text),
|
|
||||||
CONV_TO_UTF8(msg) );
|
|
||||||
if ( (ItemsToList & LIST_SUBCMP) )
|
|
||||||
{
|
|
||||||
fprintf(f, " (Sheet %.2d)", DrawLibItem->m_FlagControlMulti);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(f,"\n");
|
|
||||||
}
|
|
||||||
msg = _("#End Cmp\n");
|
|
||||||
fprintf(f, CONV_TO_UTF8(msg));
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************/
|
|
||||||
static int PrintListeGLabel( FILE *f, ListLabel *List, int NbItems)
|
|
||||||
/******************************************************************/
|
|
||||||
{
|
|
||||||
int ii, jj;
|
|
||||||
DrawGlobalLabelStruct *DrawTextItem;
|
|
||||||
DrawSheetLabelStruct * DrawSheetLabel;
|
|
||||||
ListLabel * LabelItem;
|
|
||||||
wxString msg;
|
|
||||||
|
|
||||||
for ( ii = 0; ii < NbItems; ii++ )
|
|
||||||
{
|
|
||||||
LabelItem = & List[ii];
|
|
||||||
|
|
||||||
switch( LabelItem->Type() )
|
|
||||||
{
|
|
||||||
case DRAW_GLOBAL_LABEL_STRUCT_TYPE :
|
|
||||||
DrawTextItem = (DrawGlobalLabelStruct *)(LabelItem->m_Label);
|
|
||||||
msg.Printf(
|
|
||||||
_("> %-28.28s Global (Sheet %.2d) pos: %3.3f, %3.3f\n"),
|
|
||||||
DrawTextItem->m_Text.GetData(),
|
|
||||||
LabelItem->m_SheetNumber,
|
|
||||||
(float)DrawTextItem->m_Pos.x / 1000,
|
|
||||||
(float)DrawTextItem->m_Pos.y / 1000);
|
|
||||||
|
|
||||||
fprintf(f, CONV_TO_UTF8(msg));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DRAW_SHEETLABEL_STRUCT_TYPE :
|
|
||||||
{
|
|
||||||
DrawSheetLabel = (DrawSheetLabelStruct *) LabelItem->m_Label;
|
|
||||||
jj = DrawSheetLabel->m_Shape;
|
|
||||||
if ( jj < 0 ) jj = NET_TMAX; if ( jj > NET_TMAX ) jj = 4;
|
|
||||||
wxString labtype = CONV_FROM_UTF8(SheetLabelType[jj]);
|
|
||||||
msg.Printf(
|
|
||||||
_("> %-28.28s Sheet %-7.7s (Sheet %.2d) pos: %3.3f, %3.3f\n"),
|
|
||||||
DrawSheetLabel->m_Text.GetData(),
|
|
||||||
labtype.GetData(),
|
|
||||||
LabelItem->m_SheetNumber,
|
|
||||||
(float)DrawSheetLabel->m_Pos.x / 1000,
|
|
||||||
(float)DrawSheetLabel->m_Pos.y / 1000);
|
|
||||||
fprintf(f, CONV_TO_UTF8(msg));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
msg = _("#End labels\n");
|
|
||||||
fprintf(f, CONV_TO_UTF8(msg));
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -63,8 +63,9 @@ WinEDA_LibeditFrame::WinEDA_LibeditFrame( wxWindow* father,
|
||||||
WinEDA_App* parent,
|
WinEDA_App* parent,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size ) :
|
const wxSize& size,
|
||||||
WinEDA_DrawFrame( father, LIBEDITOR_FRAME, parent, title, pos, size )
|
long style ) :
|
||||||
|
WinEDA_DrawFrame( father, LIBEDITOR_FRAME, parent, title, pos, size, style )
|
||||||
{
|
{
|
||||||
m_FrameName = wxT( "LibeditFrame" );
|
m_FrameName = wxT( "LibeditFrame" );
|
||||||
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
|
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
|
||||||
|
|
|
@ -1,285 +0,0 @@
|
||||||
/*************************/
|
|
||||||
/* eeschema: options.cpp */
|
|
||||||
/*************************/
|
|
||||||
|
|
||||||
/*
|
|
||||||
Gestion de la fenetre des options generales:
|
|
||||||
Grille
|
|
||||||
Unites d'affichage
|
|
||||||
options complementaires (increments X, Y et label pour la fct de repetition
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
|
||||||
#include "gr_basic.h"
|
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "program.h"
|
|
||||||
#include "libcmp.h"
|
|
||||||
#include "general.h"
|
|
||||||
|
|
||||||
#include "id.h"
|
|
||||||
#include "wx/spinctrl.h"
|
|
||||||
|
|
||||||
#include "protos.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* Variables locales */
|
|
||||||
|
|
||||||
/* Fonctions locales: */
|
|
||||||
|
|
||||||
enum options_id {
|
|
||||||
ID_OPTION_ACCEPT = 3900,
|
|
||||||
ID_OPTION_CANCEL,
|
|
||||||
ID_GRID_SIZE,
|
|
||||||
ID_SHOW_GRID,
|
|
||||||
ID_GRID_NORMAL,
|
|
||||||
ID_GRID_SMALL,
|
|
||||||
ID_GRID_VERY_SMALL,
|
|
||||||
|
|
||||||
ID_SEL_SHOW_PINS,
|
|
||||||
ID_SEL_HV_WIRE,
|
|
||||||
ID_SEL_SHOW_PAGE_LIMITS,
|
|
||||||
ID_SEL_METRIC
|
|
||||||
};
|
|
||||||
|
|
||||||
/*************************************************************/
|
|
||||||
/* classe derivee pour la frame de Configuration des options*/
|
|
||||||
/*************************************************************/
|
|
||||||
|
|
||||||
class WinEDA_SetOptionsFrame: public wxDialog
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
WinEDA_DrawFrame * m_Parent;
|
|
||||||
wxCheckBox * m_ShowGridButt;
|
|
||||||
wxCheckBox * m_AutoPANOpt;
|
|
||||||
wxRadioBox * m_SelGridSize;
|
|
||||||
wxRadioBox * m_SelShowPins;
|
|
||||||
wxRadioBox * m_Selunits;
|
|
||||||
wxRadioBox * m_SelDirWires;
|
|
||||||
wxRadioBox * m_Show_Page_Limits;
|
|
||||||
WinEDA_SizeCtrl * m_DeltaStepCtrl;
|
|
||||||
wxSpinCtrl * m_DeltaLabelCtrl;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructor and destructor
|
|
||||||
WinEDA_SetOptionsFrame(WinEDA_DrawFrame *parent, const wxPoint& framepos);
|
|
||||||
~WinEDA_SetOptionsFrame() {};
|
|
||||||
|
|
||||||
private:
|
|
||||||
void Accept(wxCommandEvent& event);
|
|
||||||
void OnCancel(wxCommandEvent& event);
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
|
|
||||||
};
|
|
||||||
/* Table des evenements pour WinEDA_SetOptionsFrame */
|
|
||||||
BEGIN_EVENT_TABLE(WinEDA_SetOptionsFrame, wxDialog)
|
|
||||||
EVT_BUTTON(ID_OPTION_ACCEPT, WinEDA_SetOptionsFrame::Accept)
|
|
||||||
EVT_BUTTON(ID_OPTION_CANCEL, WinEDA_SetOptionsFrame::OnCancel)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
/**************************************************************************/
|
|
||||||
void DisplayOptionFrame(WinEDA_DrawFrame * parent, const wxPoint & framepos)
|
|
||||||
/**************************************************************************/
|
|
||||||
{
|
|
||||||
WinEDA_SetOptionsFrame * frame =
|
|
||||||
new WinEDA_SetOptionsFrame(parent, framepos);
|
|
||||||
frame->ShowModal(); frame->Destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************/
|
|
||||||
WinEDA_SetOptionsFrame::WinEDA_SetOptionsFrame(WinEDA_DrawFrame *parent,
|
|
||||||
const wxPoint& framepos):
|
|
||||||
wxDialog(parent, -1, _("EESchema Preferences"), framepos,
|
|
||||||
wxSize(450, 340), DIALOG_STYLE)
|
|
||||||
/***********************************************************************/
|
|
||||||
{
|
|
||||||
#define START_Y 10
|
|
||||||
wxButton * Button;
|
|
||||||
wxPoint pos;
|
|
||||||
wxSize size;
|
|
||||||
int w, h;
|
|
||||||
|
|
||||||
m_Parent = parent;
|
|
||||||
SetFont(*g_DialogFont);
|
|
||||||
|
|
||||||
pos.x = 330; pos.y = START_Y;
|
|
||||||
Button = new wxButton(this, ID_OPTION_ACCEPT, _("OK"), pos);
|
|
||||||
Button->SetForegroundColour(*wxRED);
|
|
||||||
|
|
||||||
pos.y += Button->GetDefaultSize().y + 5;
|
|
||||||
Button = new wxButton(this, ID_OPTION_CANCEL, _("Cancel"), pos);
|
|
||||||
Button->SetForegroundColour(*wxBLUE);
|
|
||||||
|
|
||||||
|
|
||||||
pos.x = 5; pos.y = START_Y;
|
|
||||||
m_ShowGridButt = new wxCheckBox( this, ID_SHOW_GRID, _("Show grid"),
|
|
||||||
pos);
|
|
||||||
m_ShowGridButt->SetValue(m_Parent->m_Draw_Grid);
|
|
||||||
|
|
||||||
pos.x += 150;
|
|
||||||
m_AutoPANOpt = new wxCheckBox( this, ID_SHOW_GRID, _("Auto PAN"),
|
|
||||||
pos);
|
|
||||||
m_AutoPANOpt->SetValue(m_Parent->DrawPanel-> m_AutoPAN_Enable);
|
|
||||||
m_AutoPANOpt->SetForegroundColour(*wxBLUE);
|
|
||||||
|
|
||||||
pos.x = 5; pos.y += 25;
|
|
||||||
wxString grid_choice[6] = { _("Normal (50 mils)"),
|
|
||||||
_("Small (25 mils)"),
|
|
||||||
_("Very small (10 mils)"),
|
|
||||||
_("Special (5 mils)"),
|
|
||||||
_("Special (2 mils)"),
|
|
||||||
_("Special (1 mil)"), };
|
|
||||||
|
|
||||||
m_SelGridSize = new wxRadioBox(this, ID_GRID_SIZE,
|
|
||||||
_("Grid Size"), pos,
|
|
||||||
wxDefaultSize, 6, grid_choice, 1, wxRA_SPECIFY_COLS);
|
|
||||||
if ( m_Parent->GetScreen() )
|
|
||||||
{
|
|
||||||
switch( m_Parent->GetScreen()->GetGrid().x )
|
|
||||||
{
|
|
||||||
case 50:
|
|
||||||
m_SelGridSize->SetSelection(0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 25:
|
|
||||||
m_SelGridSize->SetSelection(1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 10:
|
|
||||||
m_SelGridSize->SetSelection(2);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 5:
|
|
||||||
m_SelGridSize->SetSelection(3);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
m_SelGridSize->SetSelection(4);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
m_SelGridSize->SetSelection(5);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
DisplayError(this, wxT("WinEDA_SetOptionsFrame: Grid value not handle"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Choix d' l'affichage des pins invisibles */
|
|
||||||
m_SelGridSize->GetSize(&w, &h);
|
|
||||||
pos.y += h + 20;
|
|
||||||
wxString pin_choice[2] = { _("Normal"), _("Show alls") };
|
|
||||||
m_SelShowPins = new wxRadioBox(this, ID_SEL_SHOW_PINS,
|
|
||||||
_("Show pins"), pos,
|
|
||||||
wxDefaultSize, 2, pin_choice, 1, wxRA_SPECIFY_COLS);
|
|
||||||
m_SelShowPins->SetSelection( g_ShowAllPins ? TRUE : FALSE);
|
|
||||||
|
|
||||||
/* Choix de l'affichage des unites */
|
|
||||||
pos.x = 15 + w; pos.y = START_Y + 25;
|
|
||||||
wxString unit_choice[2] = { _("millimeters"), _("inches") };
|
|
||||||
m_Selunits = new wxRadioBox(this, ID_SEL_METRIC,
|
|
||||||
_("Units"), pos,
|
|
||||||
wxDefaultSize, 2, unit_choice, 1, wxRA_SPECIFY_COLS);
|
|
||||||
m_Selunits->SetSelection( UnitMetric ? 0 : 1);
|
|
||||||
|
|
||||||
/* Choix de l'orientation des bus et wires */
|
|
||||||
m_Selunits->GetSize(&w, &h);
|
|
||||||
pos.y += h + 15;
|
|
||||||
wxString dir_choice[2] = { _("Horiz/Vertical"), _("Any") };
|
|
||||||
m_SelDirWires = new wxRadioBox(this, ID_SEL_HV_WIRE,
|
|
||||||
_("Wires - Bus orient"), pos,
|
|
||||||
wxDefaultSize, 2, dir_choice, 1, wxRA_SPECIFY_COLS);
|
|
||||||
m_SelDirWires->SetSelection( g_HVLines ? 0 : 1);
|
|
||||||
|
|
||||||
m_SelDirWires->GetSize(&w, &h);
|
|
||||||
pos.y += h + 15;
|
|
||||||
wxString show_page_limits_choice[2] = { _("Yes"), _("No") };
|
|
||||||
m_Show_Page_Limits = new wxRadioBox(this, ID_SEL_SHOW_PAGE_LIMITS,
|
|
||||||
_("Show page limits"), pos,
|
|
||||||
wxDefaultSize, 2, show_page_limits_choice, 1, wxRA_SPECIFY_COLS);
|
|
||||||
m_Show_Page_Limits->SetSelection( g_ShowPageLimits ? 0 : 1);
|
|
||||||
|
|
||||||
/* Choix des parametres pour la fonction de repetition */
|
|
||||||
size.x = 100; size.y = -1;
|
|
||||||
pos.y = 90; pos.x = 320;
|
|
||||||
m_DeltaStepCtrl = new WinEDA_SizeCtrl(this, _("Delta Step"),
|
|
||||||
g_RepeatStep,
|
|
||||||
UnitMetric, pos, m_Parent->m_InternalUnits);
|
|
||||||
|
|
||||||
pos.y += 10 + m_DeltaStepCtrl->GetDimension().y;
|
|
||||||
new wxStaticText(this, -1, _("Delta Label:"),
|
|
||||||
wxPoint(pos.x, pos.y ),
|
|
||||||
wxSize(-1,-1), 0 );
|
|
||||||
wxString val;
|
|
||||||
pos.y += 14;
|
|
||||||
val << g_RepeatDeltaLabel;
|
|
||||||
m_DeltaLabelCtrl = new wxSpinCtrl(this, -1, val, pos);
|
|
||||||
m_DeltaLabelCtrl->SetRange(-16, +16);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************/
|
|
||||||
void WinEDA_SetOptionsFrame::OnCancel(wxCommandEvent& event)
|
|
||||||
/**************************************************************************/
|
|
||||||
{
|
|
||||||
Close(TRUE);
|
|
||||||
}
|
|
||||||
/**************************************************************************/
|
|
||||||
void WinEDA_SetOptionsFrame::Accept(wxCommandEvent& event)
|
|
||||||
/**************************************************************************/
|
|
||||||
{
|
|
||||||
wxSize grid;
|
|
||||||
bool setgrid = TRUE;
|
|
||||||
|
|
||||||
g_RepeatStep = m_DeltaStepCtrl->GetCoord();
|
|
||||||
|
|
||||||
g_RepeatDeltaLabel = m_DeltaLabelCtrl->GetValue();
|
|
||||||
|
|
||||||
if ( m_Show_Page_Limits->GetSelection() == 0 ) g_ShowPageLimits = TRUE;
|
|
||||||
else g_ShowPageLimits = FALSE;
|
|
||||||
|
|
||||||
if ( m_SelDirWires->GetSelection() == 0 ) g_HVLines = 1;
|
|
||||||
else g_HVLines = 0;
|
|
||||||
|
|
||||||
if ( m_Selunits->GetSelection() == 0 ) UnitMetric = 1;
|
|
||||||
else UnitMetric = 0;
|
|
||||||
|
|
||||||
if ( m_SelShowPins->GetSelection() == 0 ) g_ShowAllPins = FALSE;
|
|
||||||
else g_ShowAllPins = TRUE;
|
|
||||||
|
|
||||||
g_ShowGrid = m_Parent->m_Draw_Grid = m_ShowGridButt->GetValue();
|
|
||||||
m_Parent->DrawPanel->m_AutoPAN_Enable = m_AutoPANOpt->GetValue();
|
|
||||||
|
|
||||||
switch( m_SelGridSize->GetSelection() )
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
setgrid = FALSE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0:
|
|
||||||
grid = wxSize(50,50);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
grid = wxSize(25,25);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
grid = wxSize(10,10);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( m_Parent->m_CurrentScreen )
|
|
||||||
{
|
|
||||||
if ( setgrid ) m_Parent->m_CurrentScreen->SetGrid(grid);
|
|
||||||
m_Parent->m_CurrentScreen->SetRefreshReq();
|
|
||||||
}
|
|
||||||
|
|
||||||
Close(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,172 +0,0 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: optionsframe.cpp
|
|
||||||
// Purpose:
|
|
||||||
// Author: jean-pierre charras
|
|
||||||
// Modified by:
|
|
||||||
// Created: 01/27/04 14:48:57
|
|
||||||
// RCS-ID:
|
|
||||||
// Copyright: suite kicad
|
|
||||||
// Licence:
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "optionsframe.cpp"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
////@begin includes
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/valgen.h"
|
|
||||||
////@end includes
|
|
||||||
|
|
||||||
#include "optionsframe.h"
|
|
||||||
|
|
||||||
////@begin XPM images
|
|
||||||
////@end XPM images
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* DisplayOptionFrame type definition
|
|
||||||
*/
|
|
||||||
|
|
||||||
IMPLEMENT_CLASS( DisplayOptionFrame, wxDialog )
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* DisplayOptionFrame event table definition
|
|
||||||
*/
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( DisplayOptionFrame, wxDialog )
|
|
||||||
|
|
||||||
////@begin DisplayOptionFrame event table entries
|
|
||||||
////@end DisplayOptionFrame event table entries
|
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* DisplayOptionFrame constructors
|
|
||||||
*/
|
|
||||||
|
|
||||||
DisplayOptionFrame::DisplayOptionFrame( )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
DisplayOptionFrame::DisplayOptionFrame( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
|
||||||
{
|
|
||||||
Create(parent, id, caption, pos, size, style);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* optionsframe creator
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool DisplayOptionFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
|
||||||
{
|
|
||||||
////@begin DisplayOptionFrame member initialisation
|
|
||||||
////@end DisplayOptionFrame member initialisation
|
|
||||||
|
|
||||||
////@begin DisplayOptionFrame creation
|
|
||||||
wxDialog::Create( parent, id, caption, pos, size, style );
|
|
||||||
|
|
||||||
CreateControls();
|
|
||||||
GetSizer()->Fit(this);
|
|
||||||
GetSizer()->SetSizeHints(this);
|
|
||||||
Centre();
|
|
||||||
////@end DisplayOptionFrame creation
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Control creation for optionsframe
|
|
||||||
*/
|
|
||||||
|
|
||||||
void DisplayOptionFrame::CreateControls()
|
|
||||||
{
|
|
||||||
////@begin DisplayOptionFrame content construction
|
|
||||||
|
|
||||||
DisplayOptionFrame* item1 = this;
|
|
||||||
|
|
||||||
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
|
|
||||||
item1->SetSizer(item2);
|
|
||||||
item1->SetAutoLayout(TRUE);
|
|
||||||
|
|
||||||
wxBoxSizer* item3 = new wxBoxSizer(wxHORIZONTAL);
|
|
||||||
item2->Add(item3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
|
||||||
|
|
||||||
wxBoxSizer* item4 = new wxBoxSizer(wxHORIZONTAL);
|
|
||||||
item3->Add(item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
|
||||||
|
|
||||||
wxBoxSizer* item5 = new wxBoxSizer(wxVERTICAL);
|
|
||||||
item4->Add(item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
|
||||||
|
|
||||||
wxCheckBox* item6 = new wxCheckBox( item1, ID_CHECKBOX, _("Show grid"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_ShowGridButt = item6;
|
|
||||||
item6->SetValue(FALSE);
|
|
||||||
item5->Add(item6, 0, wxALIGN_LEFT|wxALL, 5);
|
|
||||||
|
|
||||||
wxString item7Strings[] = {
|
|
||||||
_("&Normal (50 mils)"),
|
|
||||||
_("&Small (20 mils)"),
|
|
||||||
_("&Very small (10 mils)")
|
|
||||||
};
|
|
||||||
wxRadioBox* item7 = new wxRadioBox( item1, ID_RADIOBOX, _("Grid Size"), wxDefaultPosition, wxDefaultSize, 3, item7Strings, 1, 0 );
|
|
||||||
m_SelGridSize = item7;
|
|
||||||
item5->Add(item7, 0, wxALIGN_LEFT|wxALL, 5);
|
|
||||||
|
|
||||||
wxString item8Strings[] = {
|
|
||||||
_("&Normal"),
|
|
||||||
_("&inches")
|
|
||||||
};
|
|
||||||
wxRadioBox* item8 = new wxRadioBox( item1, ID_RADIOBOX1, _("Show pins"), wxDefaultPosition, wxDefaultSize, 2, item8Strings, 1, 0 );
|
|
||||||
m_SelShowPins = item8;
|
|
||||||
item5->Add(item8, 0, wxALIGN_LEFT|wxALL, 5);
|
|
||||||
|
|
||||||
wxBoxSizer* item9 = new wxBoxSizer(wxVERTICAL);
|
|
||||||
item4->Add(item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
|
||||||
|
|
||||||
wxString item10Strings[] = {
|
|
||||||
_("&millimeters"),
|
|
||||||
_("&inches")
|
|
||||||
};
|
|
||||||
wxRadioBox* item10 = new wxRadioBox( item1, ID_RADIOBOX3, _("Units"), wxDefaultPosition, wxDefaultSize, 2, item10Strings, 1, wxRA_SPECIFY_COLS );
|
|
||||||
m_Selunits = item10;
|
|
||||||
item9->Add(item10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
|
||||||
|
|
||||||
item9->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
|
||||||
|
|
||||||
wxString item12Strings[] = {
|
|
||||||
_("&Horiz/Vertical"),
|
|
||||||
_("&Any")
|
|
||||||
};
|
|
||||||
wxRadioBox* item12 = new wxRadioBox( item1, ID_RADIOBOX2, _("Wire - Bus orient"), wxDefaultPosition, wxDefaultSize, 2, item12Strings, 1, wxRA_SPECIFY_COLS );
|
|
||||||
item9->Add(item12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
|
||||||
|
|
||||||
wxBoxSizer* item13 = new wxBoxSizer(wxVERTICAL);
|
|
||||||
item4->Add(item13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
|
||||||
|
|
||||||
wxButton* item14 = new wxButton( item1, ID_BUTTON, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
item14->SetForegroundColour(wxColour(255, 0, 0));
|
|
||||||
item13->Add(item14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
|
||||||
|
|
||||||
wxButton* item15 = new wxButton( item1, ID_BUTTON1, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
item15->SetForegroundColour(wxColour(0, 0, 255));
|
|
||||||
item13->Add(item15, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
|
||||||
|
|
||||||
|
|
||||||
// Set validators
|
|
||||||
item6->SetValidator( wxGenericValidator(& ShowGrid ) );
|
|
||||||
////@end DisplayOptionFrame content construction
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Should we show tooltips?
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool DisplayOptionFrame::ShowToolTips()
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
|
@ -1,89 +0,0 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: optionsframe.h
|
|
||||||
// Purpose:
|
|
||||||
// Author: jean-pierre charras
|
|
||||||
// Modified by:
|
|
||||||
// Created: 01/27/04 14:48:57
|
|
||||||
// RCS-ID:
|
|
||||||
// Copyright: suite kicad
|
|
||||||
// Licence:
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _OPTIONSFRAME_H_
|
|
||||||
#define _OPTIONSFRAME_H_
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma interface "optionsframe.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Includes
|
|
||||||
*/
|
|
||||||
|
|
||||||
////@begin includes
|
|
||||||
////@end includes
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Forward declarations
|
|
||||||
*/
|
|
||||||
|
|
||||||
////@begin forward declarations
|
|
||||||
////@end forward declarations
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Control identifiers
|
|
||||||
*/
|
|
||||||
|
|
||||||
////@begin control identifiers
|
|
||||||
#define ID_DIALOG 10000
|
|
||||||
#define ID_CHECKBOX 10001
|
|
||||||
#define ID_RADIOBOX 10002
|
|
||||||
#define ID_RADIOBOX1 10003
|
|
||||||
#define ID_RADIOBOX3 10005
|
|
||||||
#define ID_RADIOBOX2 10004
|
|
||||||
#define ID_BUTTON 10006
|
|
||||||
#define ID_BUTTON1 10007
|
|
||||||
////@end control identifiers
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* DisplayOptionFrame class declaration
|
|
||||||
*/
|
|
||||||
|
|
||||||
class DisplayOptionFrame: public wxDialog
|
|
||||||
{
|
|
||||||
DECLARE_CLASS( DisplayOptionFrame )
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
|
|
||||||
public:
|
|
||||||
/// Constructors
|
|
||||||
DisplayOptionFrame( );
|
|
||||||
DisplayOptionFrame( wxWindow* parent, wxWindowID id = -1, const wxString& caption = _("optionsframe"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU );
|
|
||||||
|
|
||||||
/// Creation
|
|
||||||
bool Create( wxWindow* parent, wxWindowID id = -1, const wxString& caption = _("optionsframe"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU );
|
|
||||||
|
|
||||||
/// Creates the controls and sizers
|
|
||||||
void CreateControls();
|
|
||||||
|
|
||||||
////@begin DisplayOptionFrame event handler declarations
|
|
||||||
|
|
||||||
////@end DisplayOptionFrame event handler declarations
|
|
||||||
|
|
||||||
////@begin DisplayOptionFrame member function declarations
|
|
||||||
|
|
||||||
////@end DisplayOptionFrame member function declarations
|
|
||||||
|
|
||||||
/// Should we show tooltips?
|
|
||||||
static bool ShowToolTips();
|
|
||||||
|
|
||||||
////@begin DisplayOptionFrame member variables
|
|
||||||
wxCheckBox* m_ShowGridButt;
|
|
||||||
wxRadioBox* m_SelGridSize;
|
|
||||||
wxRadioBox* m_SelShowPins;
|
|
||||||
wxRadioBox* m_Selunits;
|
|
||||||
WinEDA_DrawFrame * m_Parent;
|
|
||||||
////@end DisplayOptionFrame member variables
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// _OPTIONSFRAME_H_
|
|
|
@ -116,8 +116,8 @@ END_EVENT_TABLE()
|
||||||
/****************/
|
/****************/
|
||||||
|
|
||||||
WinEDA_SchematicFrame:: WinEDA_SchematicFrame(wxWindow * father, WinEDA_App *parent,
|
WinEDA_SchematicFrame:: WinEDA_SchematicFrame(wxWindow * father, WinEDA_App *parent,
|
||||||
const wxString & title, const wxPoint& pos, const wxSize& size) :
|
const wxString & title, const wxPoint& pos, const wxSize& size, long style) :
|
||||||
WinEDA_DrawFrame(father, SCHEMATIC_FRAME, parent, title, pos, size)
|
WinEDA_DrawFrame(father, SCHEMATIC_FRAME, parent, title, pos, size, style)
|
||||||
{
|
{
|
||||||
m_FrameName = wxT("SchematicFrame");
|
m_FrameName = wxT("SchematicFrame");
|
||||||
m_Draw_Axis = FALSE; // TRUE pour avoir les axes dessines
|
m_Draw_Axis = FALSE; // TRUE pour avoir les axes dessines
|
||||||
|
|
|
@ -124,8 +124,8 @@ END_EVENT_TABLE()
|
||||||
/****************/
|
/****************/
|
||||||
|
|
||||||
WinEDA_GerberFrame::WinEDA_GerberFrame(wxWindow * father, WinEDA_App *parent,
|
WinEDA_GerberFrame::WinEDA_GerberFrame(wxWindow * father, WinEDA_App *parent,
|
||||||
const wxString & title, const wxPoint& pos, const wxSize& size) :
|
const wxString & title, const wxPoint& pos, const wxSize& size, long style) :
|
||||||
WinEDA_BasePcbFrame(father, parent, GERBER_FRAME, title, pos, size)
|
WinEDA_BasePcbFrame(father, parent, GERBER_FRAME, title, pos, size, style)
|
||||||
{
|
{
|
||||||
m_FrameName = wxT("GerberFrame");
|
m_FrameName = wxT("GerberFrame");
|
||||||
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
|
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
// #define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxFRAME_FLOAT_ON_PARENT|wxSTAY_ON_TOP
|
// #define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxFRAME_FLOAT_ON_PARENT|wxSTAY_ON_TOP
|
||||||
#define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE | wxFRAME_FLOAT_ON_PARENT | MAYBE_RESIZE_BORDER
|
#define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE | wxFRAME_FLOAT_ON_PARENT | MAYBE_RESIZE_BORDER
|
||||||
|
|
||||||
|
#define KICAD_DEFAULT_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE|wxWANTS_CHARS
|
||||||
#define EDA_DRAW_PANEL wxScrolledWindow
|
#define EDA_DRAW_PANEL wxScrolledWindow
|
||||||
|
|
||||||
class wxMyDialogModalData;
|
class wxMyDialogModalData;
|
||||||
|
@ -168,7 +169,8 @@ public:
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
WinEDA_BasicFrame( wxWindow* father, int idtype, WinEDA_App* parent,
|
WinEDA_BasicFrame( wxWindow* father, int idtype, WinEDA_App* parent,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size );
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE);
|
||||||
#ifdef KICAD_PYTHON
|
#ifdef KICAD_PYTHON
|
||||||
WinEDA_BasicFrame( const WinEDA_BasicFrame& ) { } // Should throw!!
|
WinEDA_BasicFrame( const WinEDA_BasicFrame& ) { } // Should throw!!
|
||||||
WinEDA_BasicFrame() { } // Should throw!!
|
WinEDA_BasicFrame() { } // Should throw!!
|
||||||
|
@ -239,7 +241,8 @@ public:
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
WinEDA_DrawFrame( wxWindow* father, int idtype, WinEDA_App* parent,
|
WinEDA_DrawFrame( wxWindow* father, int idtype, WinEDA_App* parent,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size );
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
|
||||||
|
|
||||||
~WinEDA_DrawFrame();
|
~WinEDA_DrawFrame();
|
||||||
|
|
||||||
|
@ -352,7 +355,8 @@ protected:
|
||||||
public:
|
public:
|
||||||
WinEDA_BasePcbFrame( wxWindow* father, WinEDA_App* parent, int idtype,
|
WinEDA_BasePcbFrame( wxWindow* father, WinEDA_App* parent, int idtype,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size );
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
|
||||||
|
|
||||||
~WinEDA_BasePcbFrame();
|
~WinEDA_BasePcbFrame();
|
||||||
|
|
||||||
|
@ -574,7 +578,8 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WinEDA_PcbFrame( wxWindow* father, WinEDA_App* parent, const wxString& title,
|
WinEDA_PcbFrame( wxWindow* father, WinEDA_App* parent, const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size );
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
|
||||||
|
|
||||||
~WinEDA_PcbFrame();
|
~WinEDA_PcbFrame();
|
||||||
|
|
||||||
|
@ -803,7 +808,8 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WinEDA_GerberFrame( wxWindow* father, WinEDA_App* parent, const wxString& title,
|
WinEDA_GerberFrame( wxWindow* father, WinEDA_App* parent, const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size );
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
|
||||||
|
|
||||||
~WinEDA_GerberFrame();
|
~WinEDA_GerberFrame();
|
||||||
|
|
||||||
|
@ -908,7 +914,8 @@ public:
|
||||||
public:
|
public:
|
||||||
WinEDA_ModuleEditFrame( wxWindow* father, WinEDA_App* parent,
|
WinEDA_ModuleEditFrame( wxWindow* father, WinEDA_App* parent,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size );
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
|
||||||
|
|
||||||
~WinEDA_ModuleEditFrame();
|
~WinEDA_ModuleEditFrame();
|
||||||
|
|
||||||
|
@ -1003,7 +1010,8 @@ private:
|
||||||
public:
|
public:
|
||||||
WinEDA_SchematicFrame( wxWindow* father, WinEDA_App* parent,
|
WinEDA_SchematicFrame( wxWindow* father, WinEDA_App* parent,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size );
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
|
||||||
|
|
||||||
~WinEDA_SchematicFrame();
|
~WinEDA_SchematicFrame();
|
||||||
|
|
||||||
|
@ -1212,7 +1220,8 @@ public:
|
||||||
public:
|
public:
|
||||||
WinEDA_LibeditFrame( wxWindow* father, WinEDA_App* parent,
|
WinEDA_LibeditFrame( wxWindow* father, WinEDA_App* parent,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size );
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
|
||||||
|
|
||||||
~WinEDA_LibeditFrame();
|
~WinEDA_LibeditFrame();
|
||||||
|
|
||||||
|
@ -1357,9 +1366,10 @@ private:
|
||||||
#include "drawpanel_wxstruct.h"
|
#include "drawpanel_wxstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************/
|
/*********************************************************
|
||||||
/* classe representant un ecran d'affichage des messages */
|
class WinEDA_MsgPanel : this is a panel to display various infos
|
||||||
/*********************************************************/
|
and messages on items in eeschema an pcbnew
|
||||||
|
*********************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Struct MsgItem
|
* Struct MsgItem
|
||||||
|
@ -1422,9 +1432,9 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************/
|
/************************************************/
|
||||||
/* Classe pour editer une ligne de texte dans les menus de config */
|
/* Class to enter a line, is some dialog frames */
|
||||||
/******************************************************************/
|
/************************************************/
|
||||||
class WinEDA_EnterText
|
class WinEDA_EnterText
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -1460,9 +1470,9 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*********************************************************************/
|
/************************************************************************/
|
||||||
/* Classe pour editer un texte graphique + dimension en INCHES ou MM */
|
/* Class to edit/enter a graphic text and its dimension ( INCHES or MM )*/
|
||||||
/*********************************************************************/
|
/************************************************************************/
|
||||||
class WinEDA_GraphicTextCtrl
|
class WinEDA_GraphicTextCtrl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -1494,9 +1504,9 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************/
|
/*************************************************************************************/
|
||||||
/* Classe pour afficher et editer une coordonn<6E>e en INCHES ou MM */
|
/*Class to edit/enter a coordinate (pair of values) ( INCHES or MM ) in dialog boxes */
|
||||||
/*****************************************************************/
|
/*************************************************************************************/
|
||||||
class WinEDA_PositionCtrl
|
class WinEDA_PositionCtrl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -1523,9 +1533,10 @@ public:
|
||||||
wxPoint GetValue();
|
wxPoint GetValue();
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************/
|
/*************************************************************
|
||||||
/* Classe pour afficher et editer une coordonn<6E>e en INCHES ou MM */
|
Class to edit/enter a size (pair of values for X and Y size)
|
||||||
/*****************************************************************/
|
( INCHES or MM ) in dialog boxes
|
||||||
|
***************************************************************/
|
||||||
class WinEDA_SizeCtrl : public WinEDA_PositionCtrl
|
class WinEDA_SizeCtrl : public WinEDA_PositionCtrl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -1541,9 +1552,9 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************/
|
/****************************************************************/
|
||||||
/* Classe pour afficher et editer une valeur en INCHES ou MM */
|
/* Class to edit/enter a value ( INCHES or MM ) in dialog boxes */
|
||||||
/*****************************************************************/
|
/****************************************************************/
|
||||||
|
|
||||||
/* internal_unit est le nombre d'unites internes par inch
|
/* internal_unit est le nombre d'unites internes par inch
|
||||||
* - 1000 sur EESchema
|
* - 1000 sur EESchema
|
||||||
|
@ -1578,9 +1589,9 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************/
|
/************************************************************************/
|
||||||
/* Classe pour afficher et editer une valeur double flottant */
|
/* Class to edit/enter a pair of float (double) values in dialog boxes */
|
||||||
/*****************************************************************/
|
/************************************************************************/
|
||||||
class WinEDA_DFloatValueCtrl
|
class WinEDA_DFloatValueCtrl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -40,8 +40,9 @@ WinEDA_BasePcbFrame::WinEDA_BasePcbFrame( wxWindow* father,
|
||||||
int idtype,
|
int idtype,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size ) :
|
const wxSize& size,
|
||||||
WinEDA_DrawFrame( father, idtype, parent, title, pos, size )
|
long style) :
|
||||||
|
WinEDA_DrawFrame( father, idtype, parent, title, pos, size, style )
|
||||||
{
|
{
|
||||||
m_InternalUnits = 10000; // Internal unit = 1/10000 inch
|
m_InternalUnits = 10000; // Internal unit = 1/10000 inch
|
||||||
m_CurrentScreen = NULL;
|
m_CurrentScreen = NULL;
|
||||||
|
@ -101,6 +102,15 @@ void WinEDA_BasePcbFrame::ReCreateMenuBar( void )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CVPCB
|
||||||
|
/********************************************************************/
|
||||||
|
void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||||
|
/********************************************************************/
|
||||||
|
|
||||||
|
// Virtual function
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "3d_viewer.h"
|
#include "3d_viewer.h"
|
||||||
|
|
||||||
|
@ -119,8 +129,13 @@ void WinEDA_BasePcbFrame::Show3D_Frame( wxCommandEvent& event )
|
||||||
DisplayInfo( this, _( "3D Frame already opened" ) );
|
DisplayInfo( this, _( "3D Frame already opened" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CVPCB
|
||||||
|
m_Draw3DFrame = new WinEDA3D_DrawFrame( this, m_Parent, _( "3D Viewer" ),
|
||||||
|
KICAD_DEFAULT_3D_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT );
|
||||||
|
#else
|
||||||
m_Draw3DFrame = new WinEDA3D_DrawFrame( this, m_Parent, _( "3D Viewer" ) );
|
m_Draw3DFrame = new WinEDA3D_DrawFrame( this, m_Parent, _( "3D Viewer" ) );
|
||||||
|
#endif
|
||||||
// Show the frame
|
// Show the frame
|
||||||
m_Draw3DFrame->Show( TRUE );
|
m_Draw3DFrame->Show( TRUE );
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
/* Routines locales : */
|
/* Routines locales : */
|
||||||
static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC );
|
static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC );
|
||||||
static void suppression_piste_non_connectee( WinEDA_PcbFrame* frame, wxDC* DC );
|
static void DeleteUnconnectedTracks( WinEDA_PcbFrame* frame, wxDC* DC );
|
||||||
static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extremite );
|
static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extremite );
|
||||||
static void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC );
|
static void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC );
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
frame->MsgPanel->EraseMsgBox();
|
frame->MsgPanel->EraseMsgBox();
|
||||||
frame->m_Pcb->GetNumSegmTrack(); // update the count
|
frame->m_Pcb->GetNumSegmTrack(); // update the count
|
||||||
|
|
||||||
/* construction de la liste des coordonn<6E>s des pastilles */
|
/* Rebuild the pad infos (pad list and netcodes) to ensure an up to date info */
|
||||||
frame->m_Pcb->m_Status_Pcb = 0;
|
frame->m_Pcb->m_Status_Pcb = 0;
|
||||||
frame->build_liste_pads();
|
frame->build_liste_pads();
|
||||||
frame->recalcule_pad_net_code();
|
frame->recalcule_pad_net_code();
|
||||||
|
@ -120,26 +120,28 @@ void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONN2PAD_ENBL
|
#ifdef CONN2PAD_ENBL
|
||||||
if( s_ConnectToPads ) /* Creation de points de connexion */
|
/* Create missing segments when a track end covers a pad or a via,
|
||||||
|
but is not on the pad or the via center */
|
||||||
|
if( s_ConnectToPads )
|
||||||
{
|
{
|
||||||
/* Raccordement des extremites de piste au centre des pastilles : */
|
/* Create missing segments when a track end covers a pad, but is not on the pad center */ if( s_ConnectToPads )
|
||||||
ConnectDanglingEndToPad( frame, DC );
|
ConnectDanglingEndToPad( frame, DC );
|
||||||
|
|
||||||
// creation of points of connections at the intersection of tracks
|
// creation of points of connections at the intersection of tracks
|
||||||
// Gen_Raccord_Track(frame, DC);
|
// Gen_Raccord_Track(frame, DC);
|
||||||
|
|
||||||
|
/* Create missing segments when a track end covers a via, but is not on the via center */ if( s_ConnectToPads )
|
||||||
ConnectDanglingEndToVia( frame->m_Pcb );
|
ConnectDanglingEndToVia( frame->m_Pcb );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* suppression des segments de longueur nulle et des points intermediaires
|
/* Remove null segments and intermediate points on aligned segments */
|
||||||
* alignes */
|
|
||||||
if( s_MergeSegments )
|
if( s_MergeSegments )
|
||||||
clean_segments( frame, DC );
|
clean_segments( frame, DC );
|
||||||
|
|
||||||
/* suppression des pistes non connectees ( c.a.d dont 1 extremite est en l'air) */
|
/* Delete dangling tracks */
|
||||||
if( s_DeleteUnconnectedSegm )
|
if( s_DeleteUnconnectedSegm )
|
||||||
suppression_piste_non_connectee( frame, DC );
|
DeleteUnconnectedTracks( frame, DC );
|
||||||
|
|
||||||
frame->Compile_Ratsnest( DC, AFFICHE );
|
frame->Compile_Ratsnest( DC, AFFICHE );
|
||||||
|
|
||||||
|
@ -148,14 +150,13 @@ void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
static void suppression_piste_non_connectee( WinEDA_PcbFrame* frame, wxDC* DC )
|
static void DeleteUnconnectedTracks( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Supprime les segments de piste ayant 1 ou 2 extremites non connectees
|
* Delete dangling tracks
|
||||||
* Cas des vias:
|
* Vias:
|
||||||
* si une extremite de segment est connectee uniquement a une via, la via
|
* If a via is only connected to a dangling track, it also will be removed
|
||||||
* et le segment seront supprimes
|
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
TRACK* segment;
|
TRACK* segment;
|
||||||
|
@ -229,7 +230,8 @@ static void suppression_piste_non_connectee( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
|
|
||||||
flag_erase = 0;
|
flag_erase = 0;
|
||||||
type_end = 0;
|
type_end = 0;
|
||||||
/* y a t-il une pastille sur chaque extremite */
|
|
||||||
|
/* Is a pad found on a track end ? */
|
||||||
|
|
||||||
masklayer = segment->ReturnMaskLayer();
|
masklayer = segment->ReturnMaskLayer();
|
||||||
|
|
||||||
|
@ -339,7 +341,7 @@ static void suppression_piste_non_connectee( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
|
static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
/* Supprime segments nulls, points inutiles .. */
|
/* Delete null lenght segments, and intermediate points .. */
|
||||||
{
|
{
|
||||||
TRACK* segment;
|
TRACK* segment;
|
||||||
TRACK* other;
|
TRACK* other;
|
||||||
|
@ -350,7 +352,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
frame->DrawPanel->m_AbortRequest = FALSE;
|
frame->DrawPanel->m_AbortRequest = FALSE;
|
||||||
|
|
||||||
/**********************************************/
|
/**********************************************/
|
||||||
/* suppression des segments de longueur nulle */
|
/* Delete null segments */
|
||||||
/**********************************************/
|
/**********************************************/
|
||||||
|
|
||||||
a_color = GREEN;
|
a_color = GREEN;
|
||||||
|
@ -378,7 +380,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************/
|
/**************************************/
|
||||||
/* suppression des segments confondus */
|
/* Delete redundant segments */
|
||||||
/**************************************/
|
/**************************************/
|
||||||
|
|
||||||
Affiche_1_Parametre( frame, POS_AFF_VAR, wxT( "Ident" ), wxT( "0" ), a_color );
|
Affiche_1_Parametre( frame, POS_AFF_VAR, wxT( "Ident" ), wxT( "0" ), a_color );
|
||||||
|
@ -388,7 +390,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
|
|
||||||
for( segment = frame->m_Pcb->m_Track, ii = 0; segment; segment = segment->Next(), ii++ )
|
for( segment = frame->m_Pcb->m_Track, ii = 0; segment; segment = segment->Next(), ii++ )
|
||||||
{
|
{
|
||||||
/* affichage activite */
|
/* Display activity */
|
||||||
percent = (100 * ii) / frame->m_Pcb->m_NbSegmTrack;
|
percent = (100 * ii) / frame->m_Pcb->m_NbSegmTrack;
|
||||||
if( percent != oldpercent )
|
if( percent != oldpercent )
|
||||||
{
|
{
|
||||||
|
@ -430,7 +432,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
erase = 1;
|
erase = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* suppression du point en trop */
|
/* Delete redundant point */
|
||||||
if( erase )
|
if( erase )
|
||||||
{
|
{
|
||||||
ii--;
|
ii--;
|
||||||
|
@ -444,9 +446,9 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************/
|
/****************************/
|
||||||
/* suppression des points intermediaires ( segments alignes ) */
|
/* delete intermediate points */
|
||||||
/**************************************************************/
|
/****************************/
|
||||||
|
|
||||||
nbpoints_supprimes = 0;
|
nbpoints_supprimes = 0;
|
||||||
percent = 0;
|
percent = 0;
|
||||||
|
@ -465,7 +467,6 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
|
||||||
|
|
||||||
next = segment->Next();
|
next = segment->Next();
|
||||||
|
|
||||||
/* affichage activite */
|
|
||||||
ii++;
|
ii++;
|
||||||
percent = (100 * ii) / frame->m_Pcb->m_NbSegmTrack;
|
percent = (100 * ii) / frame->m_Pcb->m_NbSegmTrack;
|
||||||
if( percent != oldpercent )
|
if( percent != oldpercent )
|
||||||
|
|
|
@ -104,8 +104,9 @@ END_EVENT_TABLE()
|
||||||
|
|
||||||
WinEDA_ModuleEditFrame::WinEDA_ModuleEditFrame( wxWindow* father, WinEDA_App* parent,
|
WinEDA_ModuleEditFrame::WinEDA_ModuleEditFrame( wxWindow* father, WinEDA_App* parent,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size ) :
|
const wxPoint& pos, const wxSize& size,
|
||||||
WinEDA_BasePcbFrame( father, parent, MODULE_EDITOR_FRAME, wxEmptyString, pos, size )
|
long style ) :
|
||||||
|
WinEDA_BasePcbFrame( father, parent, MODULE_EDITOR_FRAME, wxEmptyString, pos, size, style )
|
||||||
{
|
{
|
||||||
m_FrameName = wxT( "ModEditFrame" );
|
m_FrameName = wxT( "ModEditFrame" );
|
||||||
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
|
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
|
||||||
|
|
|
@ -176,8 +176,9 @@ END_EVENT_TABLE()
|
||||||
|
|
||||||
WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, WinEDA_App* parent,
|
WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, WinEDA_App* parent,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size ) :
|
const wxPoint& pos, const wxSize& size,
|
||||||
WinEDA_BasePcbFrame( father, parent, PCB_FRAME, title, pos, size )
|
long style) :
|
||||||
|
WinEDA_BasePcbFrame( father, parent, PCB_FRAME, title, pos, size, style )
|
||||||
{
|
{
|
||||||
m_FrameName = wxT( "PcbFrame" );
|
m_FrameName = wxT( "PcbFrame" );
|
||||||
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
|
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
|
||||||
|
|
|
@ -40,8 +40,8 @@
|
||||||
|
|
||||||
WinEDA_DrawFrame::WinEDA_DrawFrame( wxWindow* father, int idtype,
|
WinEDA_DrawFrame::WinEDA_DrawFrame( wxWindow* father, int idtype,
|
||||||
WinEDA_App* parent, const wxString& title,
|
WinEDA_App* parent, const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size ) :
|
const wxPoint& pos, const wxSize& size, long style ) :
|
||||||
WinEDA_BasicFrame( father, idtype, parent, title, pos, size )
|
WinEDA_BasicFrame( father, idtype, parent, title, pos, size, style )
|
||||||
{
|
{
|
||||||
wxSize minsize;
|
wxSize minsize;
|
||||||
|
|
||||||
|
|
|
@ -1,166 +0,0 @@
|
||||||
/************************/
|
|
||||||
/* SETCOLOR.CPP */
|
|
||||||
/************************/
|
|
||||||
|
|
||||||
/* Affichage et selection de la palette des couleurs disponibles
|
|
||||||
* dans une frame
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
|
||||||
#include "gr_basic.h"
|
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "colors.h"
|
|
||||||
|
|
||||||
|
|
||||||
enum colors_id {
|
|
||||||
ID_COLOR_BLACK = 2000, // ID_COLOR_ = ID_COLOR_BLACK a ID_COLOR_BLACK + 31
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************/
|
|
||||||
class WinEDA_SelColorFrame : public wxDialog
|
|
||||||
/*******************************************/
|
|
||||||
|
|
||||||
/* Frame d'affichage de la palette des couleurs disponibles
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructor and destructor
|
|
||||||
WinEDA_SelColorFrame( wxWindow * parent, const wxPoint &framepos );
|
|
||||||
~WinEDA_SelColorFrame( void ) { };
|
|
||||||
|
|
||||||
private:
|
|
||||||
void SelColor( wxCommandEvent& event );
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Construction de la table des evenements pour FrameClassMain */
|
|
||||||
BEGIN_EVENT_TABLE( WinEDA_SelColorFrame, wxDialog )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 1, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 2, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 3, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 4, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 5, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 6, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 7, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 8, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 9, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 10, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 11, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 12, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 13, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 14, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 15, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 16, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 17, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 18, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 19, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 20, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 21, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 22, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 23, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 24, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 25, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 26, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 27, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 28, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 29, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 30, WinEDA_SelColorFrame::SelColor )
|
|
||||||
EVT_BUTTON( ID_COLOR_BLACK + 31, WinEDA_SelColorFrame::SelColor )
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
/***************************************/
|
|
||||||
int DisplayColorFrame( wxWindow* parent )
|
|
||||||
/***************************************/
|
|
||||||
{
|
|
||||||
wxPoint framepos;
|
|
||||||
int color;
|
|
||||||
|
|
||||||
wxGetMousePosition( &framepos.x, &framepos.y );
|
|
||||||
|
|
||||||
WinEDA_SelColorFrame* frame = new WinEDA_SelColorFrame( parent, framepos );
|
|
||||||
|
|
||||||
color = frame->ShowModal(); frame->Destroy();
|
|
||||||
if( color > NBCOLOR )
|
|
||||||
color = -1;
|
|
||||||
return color;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************/
|
|
||||||
WinEDA_SelColorFrame::WinEDA_SelColorFrame( wxWindow* parent,
|
|
||||||
const wxPoint& framepos ) :
|
|
||||||
wxDialog( parent, -1, _( "Colors" ), framepos, wxSize( 375, 240 ),
|
|
||||||
DIALOG_STYLE )
|
|
||||||
/*******************************************************************/
|
|
||||||
{
|
|
||||||
#define START_Y 10
|
|
||||||
wxBitmapButton* Button;
|
|
||||||
int ii, yy, butt_ID, buttcolor;
|
|
||||||
wxPoint pos;
|
|
||||||
int w = 20, h = 20;
|
|
||||||
|
|
||||||
SetFont( *g_DialogFont );
|
|
||||||
|
|
||||||
SetReturnCode( -1 );
|
|
||||||
|
|
||||||
pos.x = 5; pos.y = START_Y;
|
|
||||||
for( ii = 0; ColorRefs[ii].m_Name != NULL; ii++ )
|
|
||||||
{
|
|
||||||
butt_ID = ID_COLOR_BLACK + ii;
|
|
||||||
wxMemoryDC iconDC;
|
|
||||||
wxBitmap ButtBitmap( w, h );
|
|
||||||
|
|
||||||
wxBrush Brush;
|
|
||||||
iconDC.SelectObject( ButtBitmap );
|
|
||||||
buttcolor = ColorRefs[ii].m_Numcolor;
|
|
||||||
iconDC.SetPen( *wxBLACK_PEN );
|
|
||||||
Brush.SetColour(
|
|
||||||
ColorRefs[buttcolor].m_Red,
|
|
||||||
ColorRefs[buttcolor].m_Green,
|
|
||||||
ColorRefs[buttcolor].m_Blue
|
|
||||||
);
|
|
||||||
Brush.SetStyle( wxSOLID );
|
|
||||||
|
|
||||||
iconDC.SetBrush( Brush );
|
|
||||||
iconDC.SetBackground( *wxGREY_BRUSH );
|
|
||||||
iconDC.Clear();
|
|
||||||
iconDC.DrawRoundedRectangle( 0, 0, w, h, (double) h / 3 );
|
|
||||||
|
|
||||||
Button = new wxBitmapButton( this, butt_ID,
|
|
||||||
ButtBitmap,
|
|
||||||
wxPoint (pos.x, pos.y), wxSize (w, h) );
|
|
||||||
|
|
||||||
new wxStaticText( this, -1,
|
|
||||||
ColorRefs[ii].m_Name,
|
|
||||||
wxPoint (pos.x + 2 + w, pos.y + 4 ),
|
|
||||||
wxSize( -1, -1 ), 0 );
|
|
||||||
|
|
||||||
yy = h + 5;
|
|
||||||
pos.y += yy;
|
|
||||||
if( ii == 7 )
|
|
||||||
{
|
|
||||||
pos.x += w + 80; pos.y = START_Y;
|
|
||||||
}
|
|
||||||
else if( (ii == 15) || (ii == 23) )
|
|
||||||
{
|
|
||||||
pos.x += w + 110; pos.y = START_Y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************/
|
|
||||||
void WinEDA_SelColorFrame::SelColor( wxCommandEvent& event )
|
|
||||||
/*********************************************************/
|
|
||||||
{
|
|
||||||
int id = event.GetId();
|
|
||||||
|
|
||||||
EndModal( id - ID_COLOR_BLACK );
|
|
||||||
}
|
|
Loading…
Reference in New Issue