2007-05-06 16:03:28 +00:00
|
|
|
/***********************************************************/
|
|
|
|
/* wxstruct.h: */
|
|
|
|
/* descriptions des principales classes derivees utilisees */
|
|
|
|
/***********************************************************/
|
|
|
|
|
|
|
|
#ifndef CVSTRUCT_H
|
|
|
|
#define CVSTRUCT_H
|
|
|
|
|
|
|
|
#ifndef eda_global
|
|
|
|
#define eda_global extern
|
|
|
|
#endif
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include "wx/listctrl.h"
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
/* Forward declarations of all top-level window classes. */
|
|
|
|
class FootprintListBox;
|
|
|
|
class ListBoxCmp;
|
|
|
|
class WinEDA_DisplayFrame;
|
|
|
|
class STORECMP;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#define LIST_BOX_TYPE wxListView
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
/******************************************************/
|
|
|
|
/* classe derivee pour la Fenetre principale de cvpcb */
|
|
|
|
/******************************************************/
|
|
|
|
|
|
|
|
class WinEDA_CvpcbFrame: public WinEDA_BasicFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
FootprintListBox * m_FootprintList;
|
|
|
|
ListBoxCmp * m_ListCmp;
|
|
|
|
WinEDA_DisplayFrame * DrawFrame;
|
|
|
|
WinEDA_Toolbar * m_HToolBar; // Toolbar horizontal haut d'ecran
|
|
|
|
|
|
|
|
private:
|
|
|
|
wxMenu * m_FilesMenu;
|
|
|
|
|
|
|
|
// Constructor and destructor
|
|
|
|
public:
|
|
|
|
WinEDA_CvpcbFrame(WinEDA_App * parent, const wxString & title);
|
2007-09-13 11:55:46 +00:00
|
|
|
~WinEDA_CvpcbFrame();
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
void OnLeftClick(wxListEvent & event);
|
2007-06-05 12:10:51 +00:00
|
|
|
void OnLeftDClick(wxListEvent & event);
|
2007-05-06 16:03:28 +00:00
|
|
|
void OnSelectComponent(wxListEvent & event);
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
void Update_Config(wxCommandEvent& event);/* enregistrement de la config */
|
|
|
|
void OnQuit(wxCommandEvent& event);
|
|
|
|
void OnCloseWindow(wxCloseEvent & Event);
|
|
|
|
void OnSize(wxSizeEvent& SizeEvent);
|
|
|
|
void OnChar(wxKeyEvent& event);
|
2007-09-13 11:55:46 +00:00
|
|
|
void ReCreateHToolbar();
|
|
|
|
virtual void ReCreateMenuBar();
|
2007-05-06 16:03:28 +00:00
|
|
|
void SetLanguage(wxCommandEvent& event);
|
2007-06-05 12:10:51 +00:00
|
|
|
void AddFontSelectionMenu(wxMenu * main_menu);
|
|
|
|
void ProcessFontPreferences(wxCommandEvent& event);
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
void ToFirstNA(wxCommandEvent& event);
|
|
|
|
void ToPreviousNA(wxCommandEvent& event);
|
|
|
|
void DelAssociations(wxCommandEvent& event);
|
|
|
|
void SaveQuitCvpcb(wxCommandEvent& event);
|
|
|
|
void LoadNetList(wxCommandEvent& event);
|
|
|
|
void ConfigCvpcb(wxCommandEvent& event);
|
|
|
|
void DisplayModule(wxCommandEvent& event);
|
|
|
|
void AssocieModule(wxCommandEvent& event);
|
|
|
|
void WriteStuffList(wxCommandEvent & event);
|
2007-06-05 12:10:51 +00:00
|
|
|
void DisplayDocFile(wxCommandEvent & event);
|
2007-05-06 16:03:28 +00:00
|
|
|
void OnSelectFilteringFootprint(wxCommandEvent & event);
|
|
|
|
void SetNewPkg(const wxString & package);
|
2007-09-13 11:55:46 +00:00
|
|
|
void BuildCmpListBox();
|
|
|
|
void BuildFootprintListBox();
|
|
|
|
void CreateScreenCmp();
|
|
|
|
void CreateConfigWindow();
|
2007-05-06 16:03:28 +00:00
|
|
|
int SaveNetList(const wxString & FullFileName);
|
|
|
|
int SaveComponentList(const wxString & FullFileName);
|
|
|
|
bool ReadInputNetList(const wxString & FullFileName);
|
2007-09-13 11:55:46 +00:00
|
|
|
void ReadNetListe();
|
|
|
|
int rdpcad();
|
|
|
|
int ReadSchematicNetlist();
|
2007-05-06 16:03:28 +00:00
|
|
|
int ReadFootprintFilterList( FILE * f);
|
2007-09-13 11:55:46 +00:00
|
|
|
int ReadViewlogicWirList();
|
|
|
|
int ReadViewlogicNetList();
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
/***********************************************/
|
|
|
|
/* ListBox derivee pour l'affichage des listes */
|
|
|
|
/***********************************************/
|
|
|
|
class ListBoxBase: public LIST_BOX_TYPE
|
|
|
|
{
|
|
|
|
public:
|
2007-06-05 12:10:51 +00:00
|
|
|
WinEDA_CvpcbFrame * m_Parent;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
ListBoxBase(WinEDA_CvpcbFrame * parent, wxWindowID id,
|
|
|
|
const wxPoint& loc, const wxSize& size);
|
|
|
|
|
2007-09-13 11:55:46 +00:00
|
|
|
~ListBoxBase();
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-09-13 11:55:46 +00:00
|
|
|
int GetSelection();
|
2007-06-05 12:10:51 +00:00
|
|
|
void OnSize(wxSizeEvent& event);
|
2007-05-06 16:03:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************/
|
|
|
|
/* ListBox derivee pour l'affichage de la liste des Modules */
|
|
|
|
/************************************************************/
|
|
|
|
|
|
|
|
class FootprintListBox: public ListBoxBase
|
|
|
|
{
|
|
|
|
private:
|
2007-06-05 12:10:51 +00:00
|
|
|
wxArrayString m_FullFootprintList;
|
|
|
|
wxArrayString m_FilteredFootprintList;
|
2007-05-06 16:03:28 +00:00
|
|
|
public:
|
|
|
|
wxArrayString * m_ActiveFootprintList;
|
2007-06-05 12:10:51 +00:00
|
|
|
bool m_UseFootprintFullList;
|
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
public:
|
|
|
|
FootprintListBox(WinEDA_CvpcbFrame * parent,
|
|
|
|
wxWindowID id, const wxPoint& loc, const wxSize& size,
|
|
|
|
int nbitems, wxString choice[]);
|
2007-09-13 11:55:46 +00:00
|
|
|
~FootprintListBox();
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-09-13 11:55:46 +00:00
|
|
|
int GetCount();
|
2007-05-06 16:03:28 +00:00
|
|
|
void SetSelection(unsigned index, bool State = TRUE);
|
2007-06-05 12:10:51 +00:00
|
|
|
void SetString(unsigned linecount, const wxString & text);
|
2007-05-06 16:03:28 +00:00
|
|
|
void AppendLine(const wxString & text);
|
2007-09-13 11:55:46 +00:00
|
|
|
void SetFootprintFullList();
|
2007-05-06 16:03:28 +00:00
|
|
|
void SetFootprintFilteredList(STORECMP * Component);
|
|
|
|
void SetActiveFootprintList(bool FullList, bool Redraw = FALSE);
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-09-13 11:55:46 +00:00
|
|
|
wxString GetSelectedFootprint();
|
2007-05-06 16:03:28 +00:00
|
|
|
wxString OnGetItemText(long item, long column) const;
|
|
|
|
void OnLeftClick(wxListEvent & event);
|
2007-06-05 12:10:51 +00:00
|
|
|
void OnLeftDClick(wxListEvent & event);
|
2007-05-06 16:03:28 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************/
|
|
|
|
/* ListBox derivee pour l'affichage de la liste des Composants */
|
|
|
|
/***************************************************************/
|
|
|
|
|
|
|
|
class ListBoxCmp: public ListBoxBase
|
|
|
|
{
|
|
|
|
public:
|
2007-06-05 12:10:51 +00:00
|
|
|
wxArrayString m_ComponentList;
|
2007-05-06 16:03:28 +00:00
|
|
|
WinEDA_CvpcbFrame * m_Parent;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
ListBoxCmp(WinEDA_CvpcbFrame * parent, wxWindowID id,
|
|
|
|
const wxPoint& loc, const wxSize& size,
|
|
|
|
int nbitems, wxString choice[]);
|
|
|
|
|
2007-09-13 11:55:46 +00:00
|
|
|
~ListBoxCmp();
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-09-13 11:55:46 +00:00
|
|
|
void Clear();
|
|
|
|
int GetCount();
|
2007-05-06 16:03:28 +00:00
|
|
|
wxString OnGetItemText(long item, long column) const;
|
|
|
|
void SetSelection(unsigned index, bool State = TRUE);
|
2007-06-05 12:10:51 +00:00
|
|
|
void SetString(unsigned linecount, const wxString & text);
|
2007-05-06 16:03:28 +00:00
|
|
|
void AppendLine(const wxString & text);
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*******************************************************/
|
|
|
|
/* class WWinEDA_DisplayFrame: public WinEDA_DrawFrame */
|
|
|
|
/*******************************************************/
|
|
|
|
|
|
|
|
class WinEDA_DisplayFrame: public WinEDA_BasePcbFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
public:
|
2007-06-05 12:10:51 +00:00
|
|
|
WinEDA_DisplayFrame( wxWindow * father, WinEDA_App *parent,
|
2007-05-06 16:03:28 +00:00
|
|
|
const wxString & title,
|
|
|
|
const wxPoint& pos, const wxSize& size);
|
|
|
|
|
2007-09-13 11:55:46 +00:00
|
|
|
~WinEDA_DisplayFrame();
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
void OnCloseWindow(wxCloseEvent & Event);
|
|
|
|
void Process_Special_Functions(wxCommandEvent& event);
|
|
|
|
void RedrawActiveWindow(wxDC * DC, bool EraseBg);
|
2007-09-13 11:55:46 +00:00
|
|
|
void ReCreateHToolbar();
|
|
|
|
void ReCreateVToolbar();
|
|
|
|
void RecreateMenuBar();
|
2007-05-06 16:03:28 +00:00
|
|
|
void OnLeftClick(wxDC * DC, const wxPoint& MousePos);
|
|
|
|
void OnLeftDClick(wxDC * DC, const wxPoint& MousePos);
|
2007-10-07 18:24:15 +00:00
|
|
|
bool OnRightClick(const wxPoint& MousePos, wxMenu * PopMenu);
|
2007-09-13 11:55:46 +00:00
|
|
|
void SetToolbars();
|
2007-05-06 16:03:28 +00:00
|
|
|
void InstallOptionsDisplay(wxCommandEvent& event);
|
|
|
|
MODULE * Get_Module(const wxString & CmpName);
|
|
|
|
|
|
|
|
void Process_Settings(wxCommandEvent& event);
|
|
|
|
void Show3D_Frame(wxCommandEvent& event);
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif //#ifndef CVSTRUCT_H
|
|
|
|
|