2010-08-28 20:02:24 +02:00
|
|
|
|
|
|
|
#ifndef __dialog_hotkeys_editor__
|
|
|
|
#define __dialog_hotkeys_editor__
|
|
|
|
|
|
|
|
#include <wx/intl.h>
|
|
|
|
|
|
|
|
#include <wx/string.h>
|
|
|
|
#include <wx/choice.h>
|
|
|
|
#include <wx/gdicmn.h>
|
|
|
|
#include <wx/font.h>
|
|
|
|
#include <wx/settings.h>
|
|
|
|
#include <wx/textctrl.h>
|
|
|
|
#include <wx/stattext.h>
|
|
|
|
#include <wx/button.h>
|
|
|
|
#include <wx/listctrl.h>
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include <wx/grid.h>
|
|
|
|
|
2012-01-22 22:33:36 -06:00
|
|
|
#include <hotkeys_basic.h>
|
|
|
|
#include <hotkey_grid_table.h>
|
|
|
|
#include <wxstruct.h>
|
|
|
|
#include <../common/dialogs/dialog_hotkeys_editor_base.h>
|
2010-08-28 20:02:24 +02:00
|
|
|
|
|
|
|
class HOTKEYS_EDITOR_DIALOG : public HOTKEYS_EDITOR_DIALOG_BASE
|
|
|
|
{
|
|
|
|
protected:
|
2011-01-21 14:30:59 -05:00
|
|
|
EDA_DRAW_FRAME* m_parent;
|
2011-09-29 12:49:40 -04:00
|
|
|
struct EDA_HOTKEY_CONFIG* m_hotkeys;
|
2010-08-28 20:02:24 +02:00
|
|
|
HotkeyGridTable* m_table;
|
|
|
|
|
|
|
|
int m_curEditingRow;
|
|
|
|
|
|
|
|
public:
|
2011-09-29 12:49:40 -04:00
|
|
|
HOTKEYS_EDITOR_DIALOG( EDA_DRAW_FRAME* parent, EDA_HOTKEY_CONFIG* hotkeys );
|
2010-08-28 20:02:24 +02:00
|
|
|
|
|
|
|
~HOTKEYS_EDITOR_DIALOG() {};
|
|
|
|
|
|
|
|
private:
|
|
|
|
void OnOKClicked( wxCommandEvent& event );
|
|
|
|
void CancelClicked( wxCommandEvent& event );
|
|
|
|
void UndoClicked( wxCommandEvent& event );
|
2010-08-29 18:36:52 +02:00
|
|
|
void OnClickOnCell( wxGridEvent& event );
|
|
|
|
void OnRightClickOnCell( wxGridEvent& event );
|
|
|
|
void OnKeyPressed( wxKeyEvent& event );
|
2010-08-28 20:02:24 +02:00
|
|
|
void SetHotkeyCellState( int aRow, bool aHightlight );
|
|
|
|
};
|
|
|
|
|
2011-09-29 12:49:40 -04:00
|
|
|
void InstallHotkeyFrame( EDA_DRAW_FRAME* parent, EDA_HOTKEY_CONFIG* hotkeys );
|
2010-08-28 20:02:24 +02:00
|
|
|
|
|
|
|
#endif
|