ToolMap
Loading...
Searching...
No Matches
tmshortcutmemory.h
1/***************************************************************************
2 tmShortcutMemory.h
3 Store shortcut in memory for attribution
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_MEMORY_H_
20#define _TM_SHORTCUT_MEMORY_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
31 private:
32 void InitMemberValues();
33
34 public:
35 int m_LayerType;
36 int m_ShortcutKey;
37 wxString m_ShortcutDescription;
38 wxArrayLong m_ShortcutValues;
39 bool m_ShortcutValid;
40
42
44};
45
46// Creating a list of MemoryObjects
47WX_DECLARE_OBJARRAY(tmShortcutObject, tmShortCutObjArray);
48
49/***************************************************************************/
65class tmShortcutMemory : public wxObject {
66 private:
67 tmShortCutObjArray m_Shortcuts;
68
69 protected:
70 public:
72
74
75 // shortcut operations
76 void AddShortcutMemory(int iLayerType, int iKey, const wxString& description, long lShortcutValue);
77
78 void Clear();
79
80 int GetShortcut(int iKey, int& iLayerType, wxString& description, wxArrayLong& shortcutvalues);
81
82 int GetCount() {
83 return m_Shortcuts.GetCount();
84 }
85};
86
87#endif
Store shortcuts for attribution in memory.
Definition tmshortcutmemory.h:65
int GetShortcut(int iKey, int &iLayerType, wxString &description, wxArrayLong &shortcutvalues)
Get shortcut by key.
Definition tmshortcutmemory.cpp:93
void Clear()
Clear all shortcuts from memory.
Definition tmshortcutmemory.cpp:78
void AddShortcutMemory(int iLayerType, int iKey, const wxString &description, long lShortcutValue)
Add a shortcut to the memory.
Definition tmshortcutmemory.cpp:55
Definition tmshortcutmemory.h:30