lleditmenuhandler.h

Go to the documentation of this file.
00001 
00032 #ifndef LLEDITMENUHANDLER_H
00033 #define LLEDITMENUHANDLER_H
00034 
00035 // Interface used by menu system for plug-in hotkey/menu handling
00036 class LLEditMenuHandler
00037 {
00038 public:
00039         // this is needed even though this is just an interface class.
00040         virtual ~LLEditMenuHandler() {};
00041         
00042         virtual void    undo() {};
00043         virtual BOOL    canUndo() const { return FALSE; }
00044         
00045         virtual void    redo() {};
00046         virtual BOOL    canRedo() const { return FALSE; }
00047         
00048         virtual void    cut() {};
00049         virtual BOOL    canCut() const { return FALSE; }
00050         
00051         virtual void    copy() {};
00052         virtual BOOL    canCopy() const { return FALSE; }
00053         
00054         virtual void    paste() {};
00055         virtual BOOL    canPaste() const { return FALSE; }
00056         
00057         // "delete" is a keyword
00058         virtual void    doDelete() {};
00059         virtual BOOL    canDoDelete() const { return FALSE; }
00060         
00061         virtual void    selectAll() {};
00062         virtual BOOL    canSelectAll() const { return FALSE; }
00063         
00064         virtual void    deselect() {};
00065         virtual BOOL    canDeselect() const { return FALSE; }
00066         
00067         virtual void    duplicate() {};
00068         virtual BOOL    canDuplicate() const { return FALSE; }
00069 
00070         // TODO: Instead of being a public data member, it would be better to hide it altogether
00071         // and have a "set" method and then a bunch of static versions of the cut, copy, paste
00072         // methods, etc that operate on the current global instance. That would drastically
00073         // simplify the existing code that accesses this global variable by putting all the
00074         // null checks in the one implementation of those static methods. -MG
00075         static LLEditMenuHandler* gEditMenuHandler;
00076 };
00077 
00078 
00079 #endif

Generated on Fri May 16 08:32:51 2008 for SecondLife by  doxygen 1.5.5