2009-01-19 19:08:42 +00:00
|
|
|
/**
|
|
|
|
* This file is part of the common libary.
|
|
|
|
* @file get_component_dialog.h
|
|
|
|
* @see common.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __INCLUDE__GET_COMPONENT_DIALOG_H__
|
|
|
|
#define __INCLUDE__GET_COMPONENT_DIALOG_H__ 1
|
|
|
|
|
|
|
|
|
2009-10-16 17:18:23 +00:00
|
|
|
wxPoint GetComponentDialogPosition( void );
|
2009-01-19 19:08:42 +00:00
|
|
|
|
2009-10-16 17:18:23 +00:00
|
|
|
void AddHistoryComponentName( wxArrayString& HistoryList,
|
|
|
|
const wxString& Name );
|
2009-01-19 19:08:42 +00:00
|
|
|
|
|
|
|
/* Add the string "Name" to the history list */
|
|
|
|
|
2009-10-16 17:18:23 +00:00
|
|
|
enum selcmp_id {
|
|
|
|
ID_ACCEPT_NAME = 3900,
|
|
|
|
ID_ACCEPT_KEYWORD,
|
|
|
|
ID_LIST_ALL,
|
|
|
|
ID_EXTRA_TOOL,
|
|
|
|
ID_SEL_BY_LISTBOX
|
|
|
|
};
|
2009-01-19 19:08:42 +00:00
|
|
|
|
2009-10-16 17:18:23 +00:00
|
|
|
/* Dialog frame to choose a component name */
|
|
|
|
class WinEDA_SelectCmp : public wxDialog
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
bool m_AuxTool;
|
|
|
|
wxString m_Text;
|
|
|
|
wxTextCtrl* m_TextCtrl;
|
|
|
|
wxListBox* m_List;
|
|
|
|
|
|
|
|
public:
|
|
|
|
bool m_GetExtraFunction;
|
|
|
|
|
|
|
|
public:
|
|
|
|
// Constructor and destructor
|
|
|
|
WinEDA_SelectCmp( WinEDA_DrawFrame* parent, const wxPoint& framepos,
|
|
|
|
wxArrayString& HistoryList, const wxString& Title,
|
|
|
|
bool show_extra_tool );
|
|
|
|
~WinEDA_SelectCmp() {};
|
2009-01-19 19:08:42 +00:00
|
|
|
|
2009-10-16 17:18:23 +00:00
|
|
|
wxString GetComponentName( void );
|
|
|
|
void SetComponentName( const wxString& name );
|
|
|
|
|
|
|
|
private:
|
2010-06-02 10:44:50 +00:00
|
|
|
void InitDialog( wxArrayString& aHistoryList );
|
2009-10-16 17:18:23 +00:00
|
|
|
void Accept( wxCommandEvent& event );
|
|
|
|
void GetExtraSelection( wxCommandEvent& event );
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __INCLUDE__GET_COMPONENT_DIALOG_H__ */
|