2009-01-19 19:08:42 +00:00
|
|
|
/**
|
|
|
|
* This file is part of the common libary.
|
2010-11-20 10:59:59 +00:00
|
|
|
* @file dialog_get_component.h
|
2009-01-19 19:08:42 +00:00
|
|
|
*/
|
|
|
|
|
2010-11-20 10:59:59 +00:00
|
|
|
#ifndef __INCLUDE_DIALOG_GET_COMPONENT_H__
|
|
|
|
#define __INCLUDE_DIALOG_GET_COMPONENT_H__
|
2009-01-19 19:08:42 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <../common/dialogs/dialog_get_component_base.h>
|
2009-01-19 19:08:42 +00:00
|
|
|
|
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
|
|
|
|
2009-10-16 17:18:23 +00:00
|
|
|
/* Dialog frame to choose a component name */
|
2010-11-20 10:59:59 +00:00
|
|
|
class DIALOG_GET_COMPONENT : public DIALOG_GET_COMPONENT_BASE
|
2009-10-16 17:18:23 +00:00
|
|
|
{
|
|
|
|
private:
|
2010-11-20 10:59:59 +00:00
|
|
|
bool m_auxToolSelector;
|
2009-10-16 17:18:23 +00:00
|
|
|
wxString m_Text;
|
2012-02-19 19:53:11 +00:00
|
|
|
bool m_selectionIsKeyword;
|
2009-10-16 17:18:23 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
bool m_GetExtraFunction;
|
|
|
|
|
|
|
|
public:
|
|
|
|
// Constructor and destructor
|
2011-01-21 19:30:59 +00:00
|
|
|
DIALOG_GET_COMPONENT( EDA_DRAW_FRAME* parent, const wxPoint& framepos,
|
|
|
|
wxArrayString& HistoryList, const wxString& Title,
|
|
|
|
bool show_extra_tool );
|
2010-11-20 10:59:59 +00:00
|
|
|
~DIALOG_GET_COMPONENT() {};
|
2009-01-19 19:08:42 +00:00
|
|
|
|
2012-02-19 19:53:11 +00:00
|
|
|
/**
|
|
|
|
* Function GetComponentName
|
|
|
|
* @return the selection (name or keyword)
|
|
|
|
*/
|
2009-10-16 17:18:23 +00:00
|
|
|
wxString GetComponentName( void );
|
2012-02-19 19:53:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function IsKeyword
|
|
|
|
* @return true if the returned string is a keyword
|
|
|
|
*/
|
|
|
|
bool IsKeyword( void )
|
|
|
|
{
|
|
|
|
return m_selectionIsKeyword;
|
|
|
|
}
|
|
|
|
|
2009-10-16 17:18:23 +00:00
|
|
|
void SetComponentName( const wxString& name );
|
|
|
|
|
|
|
|
private:
|
2010-11-20 10:59:59 +00:00
|
|
|
void initDialog( wxArrayString& aHistoryList );
|
|
|
|
void OnCancel( wxCommandEvent& event );
|
2009-10-16 17:18:23 +00:00
|
|
|
void Accept( wxCommandEvent& event );
|
|
|
|
void GetExtraSelection( wxCommandEvent& event );
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-11-20 10:59:59 +00:00
|
|
|
#endif /* __INCLUDE_DIALOG_GET_COMPONENT_H__ */
|