dialog_hotkeys_editor.h 1.23 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

#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>

19 20 21 22
#include <hotkeys_basic.h>
#include <hotkey_grid_table.h>
#include <wxstruct.h>
#include <../common/dialogs/dialog_hotkeys_editor_base.h>
23 24 25 26

class HOTKEYS_EDITOR_DIALOG : public HOTKEYS_EDITOR_DIALOG_BASE
{
protected:
27
    EDA_DRAW_FRAME* m_parent;
28
    struct EDA_HOTKEY_CONFIG* m_hotkeys;
29 30 31 32 33
    HotkeyGridTable* m_table;

    int m_curEditingRow;

public:
34
    HOTKEYS_EDITOR_DIALOG( EDA_DRAW_FRAME* parent, EDA_HOTKEY_CONFIG* hotkeys );
35 36 37 38 39 40 41

    ~HOTKEYS_EDITOR_DIALOG() {};

private:
    void OnOKClicked( wxCommandEvent& event );
    void CancelClicked( wxCommandEvent& event );
    void UndoClicked( wxCommandEvent& event );
42 43 44
    void OnClickOnCell( wxGridEvent& event );
    void OnRightClickOnCell( wxGridEvent& event );
    void OnKeyPressed( wxKeyEvent& event );
45 46 47
    void SetHotkeyCellState( int aRow, bool aHightlight );
};

48
void InstallHotkeyFrame( EDA_DRAW_FRAME* parent, EDA_HOTKEY_CONFIG* hotkeys );
49 50

#endif