ToolMap
Loading...
Searching...
No Matches
shortcut_panel_dlg.h
1/***************************************************************************
2 shortcut_panel_dlg.h
3 Dialog box for editing shortcuts
4 -------------------
5 copyright : (C) 2007 CREALP Lucien Schreiber
6 ***************************************************************************/
7
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17// comment doxygen
18
19#ifndef _TM_SHORTCUT_PANEL_DLG_H_
20#define _TM_SHORTCUT_PANEL_DLG_H_
21
22// For compilers that support precompilation, includes "wx/wx.h".
23#include <wx/wxprec.h>
24
25// Include wxWidgets' headers
26#ifndef WX_PRECOMP
27#include <wx/wx.h>
28#endif
29
30#include <wx/statline.h> // static line
31
32#include "shortcut_defs.h" // for key definitions (F1,...)
33#include "tmchecklistbox.h" // check list box
34
35#define ID_DLG_SHORTCUT_LIST 21000
36
37class DataBaseTM;
38
39class Shortcut_Panel_DLG : public wxDialog {
40 private:
41 wxChoice* m_ShortcutKey;
42 wxTextCtrl* m_ShortcutDescription;
43 tmCheckListBox* m_TypeList;
44 wxButton* m_SaveButton;
45
46 DataBaseTM* m_pDB;
47
48 // create controls
49 void CreateControls();
50
51 protected:
52 public:
53 Shortcut_Panel_DLG(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Edit Shortcut"),
54 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
55 long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
56
58
59 // key setter
60 void SetKeyList(const wxArrayString& keys);
61
62 void SetDataBase(DataBaseTM* database) {
63 wxASSERT(database);
64 m_pDB = database;
65 }
66
67 bool SetTypeList(DataBaseTM* database, int layer_type, int key = 0);
68
69 // transfer data from windows
70 virtual bool TransferDataFromWindow();
71
72 virtual bool TransferDataToWindow();
73
74 wxArrayLong m_CheckedTypes;
75 int m_SelectedKey;
76 wxString m_Description;
77};
78
79#endif
Definition database_tm.h:80
Definition shortcut_panel_dlg.h:39
virtual bool TransferDataToWindow()
Called just before displaying the dialog.
Definition shortcut_panel_dlg.cpp:125
virtual bool TransferDataFromWindow()
Called just before closing the dialog.
Definition shortcut_panel_dlg.cpp:101
void SetKeyList(const wxArrayString &keys)
Set values for keys.
Definition shortcut_panel_dlg.cpp:138
Deals with checkbox list.
Definition tmchecklistbox.h:56