You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.2 KiB

  1. #ifndef __dialog_hotkeys_editor__
  2. #define __dialog_hotkeys_editor__
  3. #include <wx/intl.h>
  4. #include <wx/string.h>
  5. #include <wx/choice.h>
  6. #include <wx/gdicmn.h>
  7. #include <wx/font.h>
  8. #include <wx/settings.h>
  9. #include <wx/textctrl.h>
  10. #include <wx/stattext.h>
  11. #include <wx/button.h>
  12. #include <wx/listctrl.h>
  13. #include <wx/dialog.h>
  14. #include <wx/grid.h>
  15. #include <hotkeys_basic.h>
  16. #include <hotkey_grid_table.h>
  17. #include <wxstruct.h>
  18. #include <../common/dialogs/dialog_hotkeys_editor_base.h>
  19. class HOTKEYS_EDITOR_DIALOG : public HOTKEYS_EDITOR_DIALOG_BASE
  20. {
  21. protected:
  22. EDA_DRAW_FRAME* m_parent;
  23. struct EDA_HOTKEY_CONFIG* m_hotkeys;
  24. HotkeyGridTable* m_table;
  25. int m_curEditingRow;
  26. public:
  27. HOTKEYS_EDITOR_DIALOG( EDA_DRAW_FRAME* parent, EDA_HOTKEY_CONFIG* hotkeys );
  28. ~HOTKEYS_EDITOR_DIALOG() {};
  29. private:
  30. void OnOKClicked( wxCommandEvent& event );
  31. void CancelClicked( wxCommandEvent& event );
  32. void UndoClicked( wxCommandEvent& event );
  33. void OnClickOnCell( wxGridEvent& event );
  34. void OnRightClickOnCell( wxGridEvent& event );
  35. void OnKeyPressed( wxKeyEvent& event );
  36. void SetHotkeyCellState( int aRow, bool aHightlight );
  37. };
  38. void InstallHotkeyFrame( EDA_DRAW_FRAME* parent, EDA_HOTKEY_CONFIG* hotkeys );
  39. #endif