diff options
Diffstat (limited to 'linden/indra/llui/lleditmenuhandler.h')
-rw-r--r-- | linden/indra/llui/lleditmenuhandler.h | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/linden/indra/llui/lleditmenuhandler.h b/linden/indra/llui/lleditmenuhandler.h index ef9b1dd..82bb058 100644 --- a/linden/indra/llui/lleditmenuhandler.h +++ b/linden/indra/llui/lleditmenuhandler.h | |||
@@ -37,37 +37,43 @@ class LLEditMenuHandler | |||
37 | { | 37 | { |
38 | public: | 38 | public: |
39 | // this is needed even though this is just an interface class. | 39 | // this is needed even though this is just an interface class. |
40 | virtual ~LLEditMenuHandler(); | 40 | virtual ~LLEditMenuHandler() {}; |
41 | 41 | ||
42 | virtual void undo(); | 42 | virtual void undo() {}; |
43 | virtual BOOL canUndo(); | 43 | virtual BOOL canUndo() const { return FALSE; } |
44 | 44 | ||
45 | virtual void redo(); | 45 | virtual void redo() {}; |
46 | virtual BOOL canRedo(); | 46 | virtual BOOL canRedo() const { return FALSE; } |
47 | 47 | ||
48 | virtual void cut(); | 48 | virtual void cut() {}; |
49 | virtual BOOL canCut(); | 49 | virtual BOOL canCut() const { return FALSE; } |
50 | 50 | ||
51 | virtual void copy(); | 51 | virtual void copy() {}; |
52 | virtual BOOL canCopy(); | 52 | virtual BOOL canCopy() const { return FALSE; } |
53 | 53 | ||
54 | virtual void paste(); | 54 | virtual void paste() {}; |
55 | virtual BOOL canPaste(); | 55 | virtual BOOL canPaste() const { return FALSE; } |
56 | 56 | ||
57 | // "delete" is a keyword | 57 | // "delete" is a keyword |
58 | virtual void doDelete(); | 58 | virtual void doDelete() {}; |
59 | virtual BOOL canDoDelete(); | 59 | virtual BOOL canDoDelete() const { return FALSE; } |
60 | 60 | ||
61 | virtual void selectAll(); | 61 | virtual void selectAll() {}; |
62 | virtual BOOL canSelectAll(); | 62 | virtual BOOL canSelectAll() const { return FALSE; } |
63 | 63 | ||
64 | virtual void deselect(); | 64 | virtual void deselect() {}; |
65 | virtual BOOL canDeselect(); | 65 | virtual BOOL canDeselect() const { return FALSE; } |
66 | 66 | ||
67 | virtual void duplicate(); | 67 | virtual void duplicate() {}; |
68 | virtual BOOL canDuplicate(); | 68 | virtual BOOL canDuplicate() const { return FALSE; } |
69 | |||
70 | // TODO: Instead of being a public data member, it would be better to hide it altogether | ||
71 | // and have a "set" method and then a bunch of static versions of the cut, copy, paste | ||
72 | // methods, etc that operate on the current global instance. That would drastically | ||
73 | // simplify the existing code that accesses this global variable by putting all the | ||
74 | // null checks in the one implementation of those static methods. -MG | ||
75 | static LLEditMenuHandler* gEditMenuHandler; | ||
69 | }; | 76 | }; |
70 | 77 | ||
71 | extern LLEditMenuHandler* gEditMenuHandler; | ||
72 | 78 | ||
73 | #endif | 79 | #endif |