mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-11 00:30:01 +00:00
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
3d-viewer
change_log.txtcommon
cvpcb
affiche.cpp.notusedcvframe.cppcvpcb.hcvstruct.hdialog_cvpcb_config.cppdialog_cvpcb_config.hdialog_cvpcb_config.pjddialog_display_options.cppdialog_display_options.pjddisplayframe.cppmakefile.includesetvisu.cppvisumod.cpp
eeschema
dialog_set_status.cpp.notuseddialog_set_status.h.notusededitpart.cpp.notusedeeclass.cpp.notusedfieldedi.cpp.notusedgenliste.cpp.notusedlibedpart.cpp.notusedlibframe.cppoptions.cpp.notusedoptionsframe.cpp.notusedoptionsframe.h.notusedschframe.cpp
gerbview
include
pcbnew
share
@ -38,9 +38,9 @@ END_EVENT_TABLE()
|
||||
|
||||
/*******************************************************************/
|
||||
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,
|
||||
wxPoint(-1,-1), wxSize(-1,-1) )
|
||||
wxPoint(-1,-1), wxSize(-1,-1), style )
|
||||
/*******************************************************************/
|
||||
{
|
||||
m_FrameName = wxT("Frame3D");
|
||||
|
@ -29,6 +29,9 @@
|
||||
#include "pcbstruct.h"
|
||||
#include "3d_struct.h"
|
||||
|
||||
#define KICAD_DEFAULT_3D_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE|wxWANTS_CHARS
|
||||
|
||||
|
||||
#define LIB3D_PATH wxT("packages3d/")
|
||||
|
||||
class Pcb3D_GLCanvas;
|
||||
@ -124,11 +127,10 @@ public:
|
||||
private:
|
||||
wxString m_FrameName; // name used for writting and reading setup
|
||||
// It is "Frame3D"
|
||||
|
||||
|
||||
public:
|
||||
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 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
|
||||
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>
|
||||
================================================================================
|
||||
+ pcbnew:
|
||||
|
@ -18,9 +18,8 @@
|
||||
|
||||
WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow * father, int idtype,
|
||||
WinEDA_App *parent, const wxString & title,
|
||||
const wxPoint& pos, const wxSize& size):
|
||||
wxFrame(father, -1, title, pos, size,
|
||||
wxDEFAULT_FRAME_STYLE|wxWANTS_CHARS)
|
||||
const wxPoint& pos, const wxSize& size, long style):
|
||||
wxFrame(father, -1, title, pos, size, style )
|
||||
{
|
||||
wxSize minsize;
|
||||
|
||||
|
@ -1,142 +1,125 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: svg_print.h
|
||||
// Purpose:
|
||||
// Author: jean-pierre Charras
|
||||
// Modified by:
|
||||
// Created: 05/02/2006 11:05:20
|
||||
// RCS-ID:
|
||||
// Copyright: License GNU
|
||||
// Licence:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Generated by DialogBlocks (unregistered), 05/02/2006 11:05:20
|
||||
|
||||
#ifndef _SVG_PRINT_H_
|
||||
#define _SVG_PRINT_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "svg_print.h"
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* Includes
|
||||
*/
|
||||
|
||||
////@begin includes
|
||||
#include "wx/valgen.h"
|
||||
#include "wx/spinctrl.h"
|
||||
////@end includes
|
||||
|
||||
/*!
|
||||
* Forward declarations
|
||||
*/
|
||||
|
||||
////@begin forward declarations
|
||||
class wxSpinCtrl;
|
||||
////@end forward declarations
|
||||
|
||||
/*!
|
||||
* Control identifiers
|
||||
*/
|
||||
|
||||
////@begin control identifiers
|
||||
#define ID_DIALOG 10000
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxFRAME_FLOAT_ON_PARENT
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_TITLE _("Create SVG file")
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME ID_DIALOG
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_SIZE wxSize(400, 300)
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_POSITION wxDefaultPosition
|
||||
#define ID_SPINCTRL 10003
|
||||
#define ID_RADIOBOX_SETPRINTMODE 10007
|
||||
#define ID_CHECKBOX 10004
|
||||
#define ID_RADIOBOX 10005
|
||||
#define ID_PRINT_EXECUTE 10002
|
||||
#define ID_TEXTCTRL 10001
|
||||
#define ID_TEXTCTRL1 10006
|
||||
////@end control identifiers
|
||||
|
||||
/*!
|
||||
* Compatibility
|
||||
*/
|
||||
|
||||
#ifndef wxCLOSE_BOX
|
||||
#define wxCLOSE_BOX 0x1000
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* WinEDA_PrintSVGFrame class declaration
|
||||
*/
|
||||
|
||||
class WinEDA_PrintSVGFrame: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( WinEDA_PrintSVGFrame )
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
public:
|
||||
/// Constructors
|
||||
WinEDA_PrintSVGFrame( );
|
||||
WinEDA_PrintSVGFrame( WinEDA_DrawFrame* 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 );
|
||||
|
||||
/// 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 );
|
||||
|
||||
/// Creates the controls and sizers
|
||||
void CreateControls();
|
||||
|
||||
////@begin WinEDA_PrintSVGFrame event handler declarations
|
||||
|
||||
/// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_SPINCTRL
|
||||
void OnSpinctrlUpdated( wxSpinEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX_SETPRINTMODE
|
||||
void OnRadioboxSetprintmodeSelected( wxCommandEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_EXECUTE
|
||||
void OnPrintExecuteClick( wxCommandEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
|
||||
void OnCloseClick( wxCommandEvent& event );
|
||||
|
||||
////@end WinEDA_PrintSVGFrame event handler declarations
|
||||
|
||||
////@begin WinEDA_PrintSVGFrame member function declarations
|
||||
|
||||
/// Retrieves bitmap resources
|
||||
wxBitmap GetBitmapResource( const wxString& name );
|
||||
|
||||
/// Retrieves icon resources
|
||||
wxIcon GetIconResource( const wxString& name );
|
||||
////@end WinEDA_PrintSVGFrame member function declarations
|
||||
|
||||
/// Should we show tooltips?
|
||||
static bool ShowToolTips();
|
||||
|
||||
void PrintSVGDoc(wxCommandEvent& event);
|
||||
bool DrawPage(const wxString & FullFileName);
|
||||
void SetPenWidth(wxSpinEvent& event);
|
||||
wxString ReturnFullFileName();
|
||||
|
||||
////@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_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: svg_print.h
|
||||
// Purpose:
|
||||
// Author: jean-pierre Charras
|
||||
// Modified by:
|
||||
// Created: 27/10/2007 12:48:35
|
||||
// RCS-ID:
|
||||
// Copyright: License GNU
|
||||
// Licence:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Generated by DialogBlocks (unregistered), 27/10/2007 12:48:35
|
||||
|
||||
#ifndef _SVG_PRINT_H_
|
||||
#define _SVG_PRINT_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "svg_print.h"
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* Includes
|
||||
*/
|
||||
|
||||
////@begin includes
|
||||
#include "wx/valgen.h"
|
||||
#include "wx/spinctrl.h"
|
||||
////@end includes
|
||||
|
||||
/*!
|
||||
* Forward declarations
|
||||
*/
|
||||
|
||||
////@begin forward declarations
|
||||
class wxSpinCtrl;
|
||||
////@end forward declarations
|
||||
|
||||
/*!
|
||||
* Control identifiers
|
||||
*/
|
||||
|
||||
////@begin control identifiers
|
||||
#define ID_DIALOG 10000
|
||||
#define ID_SPINCTRL 10003
|
||||
#define ID_RADIOBOX_SETPRINTMODE 10007
|
||||
#define ID_CHECKBOX 10004
|
||||
#define ID_RADIOBOX 10005
|
||||
#define ID_PRINT_EXECUTE 10002
|
||||
#define ID_TEXTCTRL 10001
|
||||
#define ID_TEXTCTRL1 10006
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|wxFRAME_FLOAT_ON_PARENT|MAYBE_RESIZE_BORDER
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_TITLE _("Create SVG file")
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_IDNAME ID_DIALOG
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_SIZE wxSize(400, 300)
|
||||
#define SYMBOL_WINEDA_PRINTSVGFRAME_POSITION wxDefaultPosition
|
||||
////@end control identifiers
|
||||
|
||||
|
||||
/*!
|
||||
* WinEDA_PrintSVGFrame class declaration
|
||||
*/
|
||||
|
||||
class WinEDA_PrintSVGFrame: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( WinEDA_PrintSVGFrame )
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
public:
|
||||
/// Constructors
|
||||
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 );
|
||||
|
||||
/// 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 );
|
||||
|
||||
/// Destructor
|
||||
~WinEDA_PrintSVGFrame();
|
||||
|
||||
/// Initialises member variables
|
||||
void Init();
|
||||
|
||||
/// Creates the controls and sizers
|
||||
void CreateControls();
|
||||
|
||||
////@begin WinEDA_PrintSVGFrame event handler declarations
|
||||
/// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_SPINCTRL
|
||||
void OnSpinctrlUpdated( wxSpinEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX_SETPRINTMODE
|
||||
void OnRadioboxSetprintmodeSelected( wxCommandEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_EXECUTE
|
||||
void OnPrintExecuteClick( wxCommandEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
|
||||
void OnCloseClick( wxCommandEvent& event );
|
||||
|
||||
////@end WinEDA_PrintSVGFrame event handler declarations
|
||||
|
||||
////@begin WinEDA_PrintSVGFrame member function declarations
|
||||
/// Retrieves bitmap resources
|
||||
wxBitmap GetBitmapResource( const wxString& name );
|
||||
|
||||
/// Retrieves icon resources
|
||||
wxIcon GetIconResource( const wxString& name );
|
||||
////@end WinEDA_PrintSVGFrame member function declarations
|
||||
|
||||
/// Should we show tooltips?
|
||||
static bool ShowToolTips();
|
||||
|
||||
////@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
|
||||
};
|
||||
|
||||
#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 */
|
||||
/*******************************************************/
|
||||
WinEDA_CvpcbFrame::WinEDA_CvpcbFrame(WinEDA_App *parent, const wxString & title ):
|
||||
WinEDA_BasicFrame(NULL, CVPCB_FRAME, parent, title, wxDefaultPosition, wxDefaultSize )
|
||||
WinEDA_CvpcbFrame::WinEDA_CvpcbFrame(WinEDA_App *parent, const wxString & title, long style ):
|
||||
WinEDA_BasicFrame(NULL, CVPCB_FRAME, parent, title, wxDefaultPosition, wxDefaultSize, style )
|
||||
{
|
||||
m_FrameName = wxT("CvpcbFrame");
|
||||
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
|
||||
@ -15,140 +15,139 @@
|
||||
#include "colors.h"
|
||||
|
||||
// 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"
|
||||
|
||||
enum TypeOfStruct
|
||||
{
|
||||
STRUCT_NOT_INIT,
|
||||
STRUCT_COMPONENT,
|
||||
STRUCT_PIN,
|
||||
STRUCT_MODULE,
|
||||
STRUCT_PSEUDOMODULE
|
||||
};
|
||||
enum TypeOfStruct {
|
||||
STRUCT_NOT_INIT,
|
||||
STRUCT_COMPONENT,
|
||||
STRUCT_PIN,
|
||||
STRUCT_MODULE,
|
||||
STRUCT_PSEUDOMODULE
|
||||
};
|
||||
|
||||
class STOREPIN
|
||||
{
|
||||
public:
|
||||
int m_Type; /* Type de la structure */
|
||||
STOREPIN * Pnext; /* Chainage avant */
|
||||
int m_Index; /* variable utilisee selon types de netlistes */
|
||||
int m_PinType; /* code type electrique ( Entree Sortie Passive..) */
|
||||
wxString m_PinNet; /* Pointeur sur le texte nom de net */
|
||||
wxString m_PinNum;
|
||||
wxString m_PinName;
|
||||
wxString m_Repere; /* utilise selon formats de netliste */
|
||||
int m_Type; /* Type de la structure */
|
||||
STOREPIN* Pnext; /* Chainage avant */
|
||||
int m_Index; /* variable utilisee selon types de netlistes */
|
||||
int m_PinType; /* code type electrique ( Entree Sortie Passive..) */
|
||||
wxString m_PinNet; /* Pointeur sur le texte nom de net */
|
||||
wxString m_PinNum;
|
||||
wxString m_PinName;
|
||||
wxString m_Repere; /* utilise selon formats de netliste */
|
||||
|
||||
STOREPIN();
|
||||
} ;
|
||||
STOREPIN();
|
||||
};
|
||||
|
||||
class STORECMP
|
||||
{
|
||||
public:
|
||||
int m_Type; /* Type de la structure */
|
||||
STORECMP * Pnext; /* Chainage avant */
|
||||
STORECMP * Pback; /* Chainage arriere */
|
||||
int m_Num; /* Numero d'ordre */
|
||||
int m_Multi; /* Nombre d' unites par boitier */
|
||||
STOREPIN * m_Pins; /* pointeur sur la liste des Pins */
|
||||
wxString m_Reference; /* U3, R5 ... */
|
||||
wxString m_Valeur; /* 7400, 47K ... */
|
||||
wxString m_TimeStamp; /* Signature temporelle ("00000000" si absente) */
|
||||
wxString m_Module; /* Nom du module (Package) corresp */
|
||||
wxString m_Repere; /* utilise selon formats de netliste */
|
||||
wxArrayString m_FootprintFilter; /* List of allowed footprints (wildcart allowed
|
||||
if void: no filtering */
|
||||
int m_Type; /* Type de la structure */
|
||||
STORECMP* Pnext; /* Chainage avant */
|
||||
STORECMP* Pback; /* Chainage arriere */
|
||||
int m_Num; /* Numero d'ordre */
|
||||
int m_Multi; /* Nombre d' unites par boitier */
|
||||
STOREPIN* m_Pins; /* pointeur sur la liste des Pins */
|
||||
wxString m_Reference; /* U3, R5 ... */
|
||||
wxString m_Valeur; /* 7400, 47K ... */
|
||||
wxString m_TimeStamp; /* Signature temporelle ("00000000" si absente) */
|
||||
wxString m_Module; /* Nom du module (Package) corresp */
|
||||
wxString m_Repere; /* utilise selon formats de netliste */
|
||||
wxArrayString m_FootprintFilter; /* List of allowed footprints (wildcart allowed
|
||||
* if void: no filtering */
|
||||
|
||||
STORECMP();
|
||||
~STORECMP();
|
||||
} ;
|
||||
STORECMP();
|
||||
~STORECMP();
|
||||
};
|
||||
|
||||
class STOREMOD
|
||||
{
|
||||
public:
|
||||
int m_Type; /* Type de la structure */
|
||||
STOREMOD * Pnext; /* Chainage avant */
|
||||
STOREMOD * Pback; /* Chainage arriere */
|
||||
wxString m_Module; /* Nom du module */
|
||||
wxString m_LibName; /* Nom de la librairie contenant ce module */
|
||||
int m_Num ; /* Numero d'ordre pour affichage sur la liste */
|
||||
wxString m_Doc; /* Doc associee */
|
||||
wxString m_KeyWord; /* Mots cles associes */
|
||||
int m_Type; /* Type de la structure */
|
||||
STOREMOD* Pnext; /* Chainage avant */
|
||||
STOREMOD* Pback; /* Chainage arriere */
|
||||
wxString m_Module; /* Nom du module */
|
||||
wxString m_LibName; /* Nom de la librairie contenant ce module */
|
||||
int m_Num; /* Numero d'ordre pour affichage sur la liste */
|
||||
wxString m_Doc; /* Doc associee */
|
||||
wxString m_KeyWord; /* Mots cles associes */
|
||||
|
||||
STOREMOD();
|
||||
STOREMOD();
|
||||
};
|
||||
|
||||
|
||||
eda_global STOREMOD * g_BaseListePkg;
|
||||
eda_global STORECMP * g_BaseListeCmp;
|
||||
eda_global STOREMOD* g_BaseListePkg;
|
||||
eda_global STORECMP* g_BaseListeCmp;
|
||||
|
||||
eda_global FILE *source ;
|
||||
eda_global FILE *dest ;
|
||||
eda_global FILE *libcmp ;
|
||||
eda_global FILE *lib_module ;
|
||||
eda_global FILE* source;
|
||||
eda_global FILE* dest;
|
||||
eda_global FILE* libcmp;
|
||||
eda_global FILE* lib_module;
|
||||
|
||||
/* nom des fichiers a traiter */
|
||||
eda_global wxString FFileName;
|
||||
eda_global wxString FFileName;
|
||||
|
||||
/* Types de netliste: */
|
||||
#define TYPE_NON_SPECIFIE 0
|
||||
#define TYPE_ORCADPCB2 1
|
||||
#define TYPE_PCAD 2
|
||||
#define TYPE_NON_SPECIFIE 0
|
||||
#define TYPE_ORCADPCB2 1
|
||||
#define TYPE_PCAD 2
|
||||
#define TYPE_VIEWLOGIC_WIR 3
|
||||
#define TYPE_VIEWLOGIC_NET 4
|
||||
|
||||
/* Gestion des noms des librairies */
|
||||
eda_global wxString g_EquivExtBuffer
|
||||
#ifdef MAIN
|
||||
( wxT(".equ") )
|
||||
( wxT( ".equ" ) )
|
||||
#endif
|
||||
;
|
||||
eda_global wxString g_ExtCmpBuffer
|
||||
#ifdef MAIN
|
||||
( wxT(".cmp") )
|
||||
( wxT( ".cmp" ) )
|
||||
#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 Rjustify; /* flag pout troncature des noms de Net:
|
||||
= 0: debut de chaine conservee (->ORCADPCB2)
|
||||
= 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 g_FlagEESchema;
|
||||
eda_global int Rjustify; /* flag pout troncature des noms de Net:
|
||||
* = 0: debut de chaine conservee (->ORCADPCB2)
|
||||
* = 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 modified; /* Flag != 0 si modif attribution des modules */
|
||||
eda_global int ListModIsModified; /* Flag != 0 si modif liste des lib 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 char alim[1024];
|
||||
eda_global char alim[1024];
|
||||
|
||||
eda_global int nbcomp ; /* nombre de composants trouves */
|
||||
eda_global int nblib ; /* nombre d'empreintes trouvees */
|
||||
eda_global int composants_non_affectes ;/* nbre de composants non affectes */
|
||||
eda_global int nbcomp; /* nombre de composants trouves */
|
||||
eda_global int nblib; /* nombre d'empreintes trouvees */
|
||||
eda_global int composants_non_affectes; /* nbre de composants non affectes */
|
||||
|
||||
eda_global wxString NameBuffer;
|
||||
eda_global wxString NetInNameBuffer;
|
||||
eda_global wxString NetInExtBuffer;
|
||||
eda_global wxString PkgInExtBuffer;
|
||||
eda_global wxString NetDirBuffer;
|
||||
eda_global wxString NameBuffer;
|
||||
eda_global wxString NetInNameBuffer;
|
||||
eda_global wxString NetInExtBuffer;
|
||||
eda_global wxString PkgInExtBuffer;
|
||||
eda_global wxString NetDirBuffer;
|
||||
|
||||
eda_global wxString ExtRetroBuffer
|
||||
eda_global wxString ExtRetroBuffer
|
||||
#ifdef MAIN
|
||||
( wxT(".stf") )
|
||||
( wxT( ".stf" ) )
|
||||
#endif
|
||||
;
|
||||
|
||||
|
||||
// Variables generales */
|
||||
// Unused, for pcbnew compatibility:
|
||||
eda_global Ki_PageDescr * SheetList[]
|
||||
eda_global Ki_PageDescr* SheetList[]
|
||||
#ifdef MAIN
|
||||
= {NULL}
|
||||
= { NULL }
|
||||
#endif
|
||||
;
|
||||
|
||||
// Unused, for pcbnew compatibility:
|
||||
void Plume(int state);
|
||||
void Plume( int state );
|
||||
|
@ -39,7 +39,8 @@ private:
|
||||
|
||||
// Constructor and destructor
|
||||
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();
|
||||
|
||||
void OnLeftClick(wxListEvent & event);
|
||||
@ -180,7 +181,8 @@ public:
|
||||
public:
|
||||
WinEDA_DisplayFrame( 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_DisplayFrame();
|
||||
|
||||
@ -194,6 +196,7 @@ public:
|
||||
void OnLeftDClick(wxDC * DC, const wxPoint& MousePos);
|
||||
bool OnRightClick(const wxPoint& MousePos, wxMenu * PopMenu);
|
||||
void SetToolbars();
|
||||
void GeneralControle( wxDC* DC, wxPoint Mouse );
|
||||
void InstallOptionsDisplay(wxCommandEvent& event);
|
||||
MODULE * Get_Module(const wxString & CmpName);
|
||||
|
||||
|
@ -96,12 +96,14 @@ bool KiConfigCvpcbFrame::Create( wxWindow* parent, wxWindowID id, const wxString
|
||||
////@end KiConfigCvpcbFrame member initialisation
|
||||
|
||||
////@begin KiConfigCvpcbFrame creation
|
||||
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
|
||||
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
|
||||
wxDialog::Create( parent, id, caption, pos, size, style );
|
||||
|
||||
CreateControls();
|
||||
GetSizer()->Fit(this);
|
||||
GetSizer()->SetSizeHints(this);
|
||||
if (GetSizer())
|
||||
{
|
||||
GetSizer()->SetSizeHints(this);
|
||||
}
|
||||
Centre();
|
||||
////@end KiConfigCvpcbFrame creation
|
||||
return true;
|
||||
@ -116,7 +118,7 @@ void KiConfigCvpcbFrame::CreateControls()
|
||||
SetFont(*g_DialogFont);
|
||||
|
||||
////@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;
|
||||
|
||||
@ -128,7 +130,7 @@ void KiConfigCvpcbFrame::CreateControls()
|
||||
|
||||
wxButton* itemButton4 = new wxButton( itemDialog1, SAVE_CFG, _("Save Cfg"), wxDefaultPosition, wxDefaultSize, 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 );
|
||||
itemButton5->SetForegroundColour(wxColour(0, 0, 255));
|
||||
@ -136,14 +138,14 @@ void KiConfigCvpcbFrame::CreateControls()
|
||||
|
||||
wxButton* itemButton6 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 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[] = {
|
||||
_("&PcbNew"),
|
||||
_("&ViewLogic"),
|
||||
_("View &Net + Pkg")
|
||||
};
|
||||
m_NetFormatBox = new wxRadioBox( itemDialog1, FORMAT_NETLIST, _("NetList Formats:"), wxDefaultPosition, wxDefaultSize, 3, m_NetFormatBoxStrings, 1, wxRA_SPECIFY_COLS );
|
||||
wxArrayString m_NetFormatBoxStrings;
|
||||
m_NetFormatBoxStrings.Add(_("&PcbNew"));
|
||||
m_NetFormatBoxStrings.Add(_("&ViewLogic"));
|
||||
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->SetSelection(0);
|
||||
itemBoxSizer3->Add(m_NetFormatBox, 0, wxGROW|wxALL, 5);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
itemBoxSizer10->Add(itemBoxSizer11, 0, wxGROW|wxLEFT|wxTOP|wxBOTTOM, 5);
|
||||
|
||||
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);
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
itemBoxSizer13->Add(itemButton16, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
|
||||
|
||||
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 );
|
||||
itemStaticText18->SetForegroundColour(wxColour(204, 0, 0));
|
||||
itemBoxSizer17->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, 200), 0, m_ListLibrStrings, wxLB_SINGLE );
|
||||
itemBoxSizer17->Add(m_ListLibr, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||
wxArrayString m_ListLibrStrings;
|
||||
m_ListLibr = new wxListBox( itemDialog1, ID_LISTBOX, wxDefaultPosition, wxSize(-1, 200), m_ListLibrStrings, wxLB_SINGLE );
|
||||
itemBoxSizer17->Add(m_ListLibr, 1, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||
|
||||
wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxVERTICAL);
|
||||
itemBoxSizer10->Add(itemBoxSizer20, 0, wxGROW|wxTOP|wxBOTTOM, 5);
|
||||
|
||||
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);
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
itemBoxSizer22->Add(itemButton25, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
|
||||
|
||||
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 );
|
||||
itemStaticText27->SetForegroundColour(wxColour(204, 0, 0));
|
||||
itemBoxSizer26->Add(itemStaticText27, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
|
||||
|
||||
wxString* m_ListEquivStrings = NULL;
|
||||
m_ListEquiv = new wxListBox( itemDialog1, ID_LISTBOX1, wxDefaultPosition, wxSize(-1, 200), 0, m_ListEquivStrings, wxLB_SINGLE );
|
||||
itemBoxSizer26->Add(m_ListEquiv, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||
wxArrayString m_ListEquivStrings;
|
||||
m_ListEquiv = new wxListBox( itemDialog1, ID_LISTBOX1, wxDefaultPosition, wxSize(-1, 200), m_ListEquivStrings, wxLB_SINGLE );
|
||||
itemBoxSizer26->Add(m_ListEquiv, 1, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||
|
||||
m_FileExtBoxSizerH = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_RightBoxSizer->Add(m_FileExtBoxSizerH, 0, wxGROW, 5);
|
||||
|
@ -35,11 +35,6 @@ class wxBoxSizer;
|
||||
|
||||
////@begin control identifiers
|
||||
#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 ID_READ_OLDCFG 10002
|
||||
#define FORMAT_NETLIST 10003
|
||||
@ -51,6 +46,11 @@ class wxBoxSizer;
|
||||
#define ADD_EQU 10008
|
||||
#define INSERT_EQU 10009
|
||||
#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
|
||||
|
||||
/*!
|
||||
|
@ -221,7 +221,7 @@
|
||||
<string name="proxy-Implementation filename">"dialog_cvpcb_config.cpp"</string>
|
||||
<string name="proxy-Header filename">"dialog_cvpcb_config.h"</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>
|
||||
<string name="proxy-Icon">""</string>
|
||||
<bool name="proxy-Dialog units">0</bool>
|
||||
@ -360,7 +360,7 @@
|
||||
<bool name="proxy-wxLEFT">1</bool>
|
||||
<bool name="proxy-wxRIGHT">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-wxADJUST_MINSIZE">0</bool>
|
||||
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
|
||||
@ -477,7 +477,7 @@
|
||||
<long name="proxy-Border">5</long>
|
||||
<bool name="proxy-wxLEFT">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-wxSHAPED">0</bool>
|
||||
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
|
||||
@ -620,7 +620,7 @@
|
||||
<string name="proxy-Member variable name">""</string>
|
||||
<string name="proxy-AlignH">"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>
|
||||
<bool name="proxy-wxLEFT">0</bool>
|
||||
<bool name="proxy-wxRIGHT">0</bool>
|
||||
@ -670,7 +670,7 @@
|
||||
<string name="proxy-Member variable name">""</string>
|
||||
<string name="proxy-AlignH">"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>
|
||||
<bool name="proxy-wxLEFT">0</bool>
|
||||
<bool name="proxy-wxRIGHT">0</bool>
|
||||
@ -693,7 +693,7 @@
|
||||
<string name="proxy-type">"wbBoxSizerProxy"</string>
|
||||
<string name="proxy-Orientation">"Horizontal"</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>
|
||||
<long name="proxy-Stretch factor">0</long>
|
||||
<long name="proxy-Border">5</long>
|
||||
@ -898,7 +898,7 @@
|
||||
<string name="proxy-Member variable name">""</string>
|
||||
<string name="proxy-AlignH">"Expand"</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>
|
||||
<bool name="proxy-wxLEFT">0</bool>
|
||||
<bool name="proxy-wxRIGHT">0</bool>
|
||||
@ -1027,7 +1027,7 @@
|
||||
<long name="proxy-Height">200</long>
|
||||
<string name="proxy-AlignH">"Expand"</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>
|
||||
<bool name="proxy-wxLEFT">1</bool>
|
||||
<bool name="proxy-wxRIGHT">1</bool>
|
||||
@ -1082,7 +1082,7 @@
|
||||
<string name="proxy-Member variable name">""</string>
|
||||
<string name="proxy-AlignH">"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>
|
||||
<bool name="proxy-wxLEFT">0</bool>
|
||||
<bool name="proxy-wxRIGHT">0</bool>
|
||||
@ -1105,7 +1105,7 @@
|
||||
<string name="proxy-type">"wbBoxSizerProxy"</string>
|
||||
<string name="proxy-Orientation">"Horizontal"</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>
|
||||
<long name="proxy-Stretch factor">0</long>
|
||||
<long name="proxy-Border">5</long>
|
||||
@ -1310,7 +1310,7 @@
|
||||
<string name="proxy-Member variable name">""</string>
|
||||
<string name="proxy-AlignH">"Expand"</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>
|
||||
<bool name="proxy-wxLEFT">0</bool>
|
||||
<bool name="proxy-wxRIGHT">0</bool>
|
||||
@ -1439,7 +1439,7 @@
|
||||
<long name="proxy-Height">200</long>
|
||||
<string name="proxy-AlignH">"Expand"</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>
|
||||
<bool name="proxy-wxLEFT">1</bool>
|
||||
<bool name="proxy-wxRIGHT">1</bool>
|
||||
|
@ -133,7 +133,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
|
||||
SetFont(*g_DialogFont);
|
||||
|
||||
////@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;
|
||||
|
||||
@ -149,7 +149,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
|
||||
m_EdgesDisplayOptionStrings.Add(_("&Sketch"));
|
||||
m_EdgesDisplayOption = new wxRadioBox( itemDialog1, EDGE_SELECT, _("Edges:"), wxDefaultPosition, wxDefaultSize, m_EdgesDisplayOptionStrings, 1, wxRA_SPECIFY_COLS );
|
||||
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;
|
||||
m_TextDisplayOptionStrings.Add(_("&Line"));
|
||||
@ -157,7 +157,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
|
||||
m_TextDisplayOptionStrings.Add(_("&Sketch"));
|
||||
m_TextDisplayOption = new wxRadioBox( itemDialog1, TEXT_SELECT, _("Texts:"), wxDefaultPosition, wxDefaultSize, m_TextDisplayOptionStrings, 1, wxRA_SPECIFY_COLS );
|
||||
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);
|
||||
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->SetValue(false);
|
||||
if (WinEDA_FootprintDisplayOptionsFrame::ShowToolTips())
|
||||
if (ShowToolTips())
|
||||
m_IsShowPadNum->SetToolTip(_("Display pad number"));
|
||||
ColumnBoxSizer->Add(m_IsShowPadNum, 1, wxGROW|wxALL, 5);
|
||||
|
||||
ColumnBoxSizer->Add(5, 5, 0, wxGROW|wxTOP, 5);
|
||||
|
||||
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 );
|
||||
OuterBoxSizer->Add(itemStaticLine11, 0, wxGROW|wxALL, 5);
|
||||
|
@ -10,10 +10,8 @@
|
||||
<bool name="convert_images_to_xpm">0</bool>
|
||||
<bool name="inline_images">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="translate_strings">1</bool>
|
||||
<bool name="make_unicode_strings">1</bool>
|
||||
<bool name="extract_strings">0</bool>
|
||||
<string name="user_name">"jean-pierre Charras"</string>
|
||||
<string name="copyright_string">"License GNU"</string>
|
||||
@ -215,7 +213,6 @@
|
||||
<bool name="use-id-suffix">0</bool>
|
||||
<string name="id-suffix">""</string>
|
||||
<long name="use-xrc">0</long>
|
||||
<long name="working-mode">0</long>
|
||||
<string name="proxy-Id name">"ID_DIALOG"</string>
|
||||
<long name="proxy-Id value">10000</long>
|
||||
<string name="proxy-Class">"WinEDA_FootprintDisplayOptionsFrame"</string>
|
||||
@ -236,13 +233,6 @@
|
||||
<bool name="proxy-Hidden">0</bool>
|
||||
<bool name="proxy-Enabled">1</bool>
|
||||
<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-wxCAPTION">0</bool>
|
||||
<bool name="proxy-wxRESIZE_BORDER">0</bool>
|
||||
@ -353,11 +343,6 @@
|
||||
<string name="proxy-Platform">"<Any platform>"</string>
|
||||
<string name="proxy-Data variable">"DisplayOpt.DisplayModEdge"</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_COLS">1</bool>
|
||||
<bool name="proxy-wxWANTS_CHARS">0</bool>
|
||||
@ -370,7 +355,7 @@
|
||||
<long name="proxy-Height">-1</long>
|
||||
<string name="proxy-AlignH">"Centre"</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>
|
||||
<bool name="proxy-wxLEFT">1</bool>
|
||||
<bool name="proxy-wxRIGHT">1</bool>
|
||||
@ -416,11 +401,6 @@
|
||||
<string name="proxy-Platform">"<Any platform>"</string>
|
||||
<string name="proxy-Data variable">"DisplayOpt.DisplayModText"</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_COLS">1</bool>
|
||||
<bool name="proxy-wxWANTS_CHARS">0</bool>
|
||||
@ -433,7 +413,7 @@
|
||||
<long name="proxy-Height">-1</long>
|
||||
<string name="proxy-AlignH">"Centre"</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>
|
||||
<bool name="proxy-wxLEFT">1</bool>
|
||||
<bool name="proxy-wxRIGHT">1</bool>
|
||||
@ -496,11 +476,6 @@
|
||||
<string name="proxy-Tooltip text">""</string>
|
||||
<string name="proxy-Data variable">"DisplayOpt.DisplayPadFill"</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-Foreground colour">""</string>
|
||||
<string name="proxy-Font">""</string>
|
||||
@ -559,11 +534,6 @@
|
||||
<string name="proxy-Tooltip text">"Display pad number"</string>
|
||||
<string name="proxy-Data variable">"DisplayOpt.DisplayPadNum"</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-Foreground colour">""</string>
|
||||
<string name="proxy-Font">""</string>
|
||||
@ -647,13 +617,6 @@
|
||||
<bool name="proxy-Default">0</bool>
|
||||
<string name="proxy-Help 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-Foreground colour">""</string>
|
||||
<string name="proxy-Font">""</string>
|
||||
@ -681,7 +644,7 @@
|
||||
<bool name="proxy-wxLEFT">1</bool>
|
||||
<bool name="proxy-wxRIGHT">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-wxADJUST_MINSIZE">0</bool>
|
||||
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
|
||||
@ -794,13 +757,6 @@
|
||||
<bool name="proxy-Default">1</bool>
|
||||
<string name="proxy-Help 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-Foreground colour">"FF0000"</string>
|
||||
<string name="proxy-Font">""</string>
|
||||
@ -860,13 +816,6 @@
|
||||
<bool name="proxy-Default">0</bool>
|
||||
<string name="proxy-Help 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-Foreground colour">"0000FF"</string>
|
||||
<string name="proxy-Font">""</string>
|
||||
@ -926,13 +875,6 @@
|
||||
<bool name="proxy-Default">0</bool>
|
||||
<string name="proxy-Help 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-Foreground colour">""</string>
|
||||
<string name="proxy-Font">""</string>
|
||||
|
@ -29,21 +29,26 @@ EVT_TOOL( ID_CVPCB_SHOW3D_FRAME, WinEDA_BasePcbFrame::Show3D_Frame )
|
||||
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,
|
||||
const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size ) :
|
||||
WinEDA_BasePcbFrame( father, parent, CVPCB_DISPLAY_FRAME, title, pos, size )
|
||||
const wxPoint& pos, const wxSize& size, long style ) :
|
||||
WinEDA_BasePcbFrame( father, parent, CVPCB_DISPLAY_FRAME, title, pos, size, style )
|
||||
{
|
||||
m_FrameName = wxT( "CmpFrame" );
|
||||
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
|
||||
m_Draw_Grid = TRUE; // TRUE pour avoir la axes dessinee
|
||||
m_Draw_Sheet_Ref = FALSE; // TRUE pour avoir le cartouche dessiné
|
||||
m_Draw_Axis = TRUE; // TRUE if we want the axis
|
||||
m_Draw_Grid = TRUE; // TRUE if we want the grid
|
||||
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 );
|
||||
|
||||
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()
|
||||
/******************************************/
|
||||
|
||||
// Destructor
|
||||
{
|
||||
delete m_CurrentScreen;
|
||||
|
||||
|
||||
delete m_Pcb;
|
||||
|
||||
|
||||
m_Parent->m_CvpcbFrame->DrawFrame = NULL;
|
||||
}
|
||||
|
||||
@ -77,7 +81,8 @@ WinEDA_DisplayFrame::~WinEDA_DisplayFrame()
|
||||
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;
|
||||
@ -162,12 +167,12 @@ void WinEDA_DisplayFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
|
||||
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;
|
||||
@ -216,28 +221,28 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||
m_CurrentScreen->m_O_Curseur = m_CurrentScreen->m_Curseur;
|
||||
break;
|
||||
|
||||
case WXK_NUMPAD8: /* Deplacement curseur vers le haut */
|
||||
case WXK_NUMPAD8: /* cursor moved up */
|
||||
case WXK_UP:
|
||||
DrawPanel->CalcScrolledPosition( Mouse.x, Mouse.y - delta.y,
|
||||
&Mouse.x, &Mouse.y );
|
||||
GRMouseWarp( DrawPanel, Mouse );
|
||||
break;
|
||||
|
||||
case WXK_NUMPAD2: /* Deplacement curseur vers le bas */
|
||||
case WXK_NUMPAD2: /* cursor moved down */
|
||||
case WXK_DOWN:
|
||||
DrawPanel->CalcScrolledPosition( Mouse.x, Mouse.y + delta.y,
|
||||
&Mouse.x, &Mouse.y );
|
||||
GRMouseWarp( DrawPanel, Mouse );
|
||||
break;
|
||||
|
||||
case WXK_NUMPAD4: /* Deplacement curseur vers la gauche */
|
||||
case WXK_NUMPAD4: /* cursor moved left */
|
||||
case WXK_LEFT:
|
||||
DrawPanel->CalcScrolledPosition( Mouse.x - delta.x, Mouse.y,
|
||||
&Mouse.x, &Mouse.y );
|
||||
GRMouseWarp( DrawPanel, Mouse );
|
||||
break;
|
||||
|
||||
case WXK_NUMPAD6: /* Deplacement curseur vers la droite */
|
||||
case WXK_NUMPAD6: /* cursor moved right */
|
||||
case WXK_RIGHT:
|
||||
DrawPanel->CalcScrolledPosition( Mouse.x + delta.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;
|
||||
/* Placement sur la grille generale */
|
||||
/* Put cursor on grid */
|
||||
PutOnGrid( &m_CurrentScreen->m_Curseur );
|
||||
|
||||
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 )
|
||||
/*************************************************************************/
|
||||
|
||||
/* 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 );
|
||||
|
||||
|
@ -33,7 +33,6 @@ OBJECTS = $(TARGET).o \
|
||||
setvisu.o\
|
||||
dialog_display_options.o\
|
||||
zoom.o \
|
||||
visumod.o\
|
||||
tracemod.o \
|
||||
classpcb.o \
|
||||
class_board.o \
|
||||
@ -136,8 +135,6 @@ setvisu.o: setvisu.cpp $(DEPEND)
|
||||
zoom.o: ../share/zoom.cpp $(DEPEND)
|
||||
$(CC) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp
|
||||
|
||||
visumod.o: visumod.cpp $(DEPEND)
|
||||
|
||||
tracemod.o: ../pcbnew/tracemod.cpp ../include/gr_basic.h $(DEPEND)
|
||||
$(CC) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
|
||||
|
||||
|
@ -17,7 +17,8 @@
|
||||
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;
|
||||
@ -28,15 +29,13 @@ void WinEDA_CvpcbFrame::CreateScreenCmp()
|
||||
if( DrawFrame == NULL )
|
||||
{
|
||||
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;
|
||||
DrawFrame->Show( TRUE );
|
||||
}
|
||||
else
|
||||
DrawFrame->Maximize( FALSE );
|
||||
|
||||
DrawFrame->SetFocus(); /* Active entree clavier */
|
||||
DrawFrame->Show( TRUE );
|
||||
|
||||
if( !FootprintName.IsEmpty() )
|
||||
{
|
||||
@ -44,19 +43,19 @@ void WinEDA_CvpcbFrame::CreateScreenCmp()
|
||||
DrawFrame->SetTitle( msg );
|
||||
STOREMOD* Module = GetModuleDescrByName( FootprintName );
|
||||
msg = _( "Lib: " );
|
||||
|
||||
|
||||
if( Module )
|
||||
msg += Module->m_LibName;
|
||||
else
|
||||
msg += wxT( "???" );
|
||||
|
||||
|
||||
DrawFrame->SetStatusText( msg, 0 );
|
||||
|
||||
if( DrawFrame->m_Pcb->m_Modules )
|
||||
{
|
||||
// there is only one module in the list
|
||||
DrawFrame->m_Pcb->m_Modules->DeleteStructure();
|
||||
|
||||
|
||||
DrawFrame->m_Pcb->m_Modules = NULL;
|
||||
}
|
||||
|
||||
@ -73,3 +72,32 @@ void WinEDA_CvpcbFrame::CreateScreenCmp()
|
||||
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
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user