PageRenderTime 22ms CodeModel.GetById 8ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/llui/lleditmenuhandler.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 74 lines | 27 code | 14 blank | 33 comment | 0 complexity | 9ee4a36fb6753131444ddb31ee10bdd2 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file lleditmenuhandler.h
  3. * @authors Aaron Yonas, James Cook
  4. *
  5. * $LicenseInfo:firstyear=2006&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LLEDITMENUHANDLER_H
  27. #define LLEDITMENUHANDLER_H
  28. // Interface used by menu system for plug-in hotkey/menu handling
  29. class LLEditMenuHandler
  30. {
  31. public:
  32. // this is needed even though this is just an interface class.
  33. virtual ~LLEditMenuHandler();
  34. virtual void undo() {};
  35. virtual BOOL canUndo() const { return FALSE; }
  36. virtual void redo() {};
  37. virtual BOOL canRedo() const { return FALSE; }
  38. virtual void cut() {};
  39. virtual BOOL canCut() const { return FALSE; }
  40. virtual void copy() {};
  41. virtual BOOL canCopy() const { return FALSE; }
  42. virtual void paste() {};
  43. virtual BOOL canPaste() const { return FALSE; }
  44. // "delete" is a keyword
  45. virtual void doDelete() {};
  46. virtual BOOL canDoDelete() const { return FALSE; }
  47. virtual void selectAll() {};
  48. virtual BOOL canSelectAll() const { return FALSE; }
  49. virtual void deselect() {};
  50. virtual BOOL canDeselect() const { return FALSE; }
  51. virtual void duplicate() {};
  52. virtual BOOL canDuplicate() const { return FALSE; }
  53. // TODO: Instead of being a public data member, it would be better to hide it altogether
  54. // and have a "set" method and then a bunch of static versions of the cut, copy, paste
  55. // methods, etc that operate on the current global instance. That would drastically
  56. // simplify the existing code that accesses this global variable by putting all the
  57. // null checks in the one implementation of those static methods. -MG
  58. static LLEditMenuHandler* gEditMenuHandler;
  59. };
  60. #endif