File indexing completed on 2023-03-17 11:01:13
0001 #ifndef Fireworks_Core_FWViewContextMenuHandlerBase_h
0002 #define Fireworks_Core_FWViewContextMenuHandlerBase_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 class FWModelId;
0027 class FWModelContextMenuHandler;
0028
0029 class FWViewContextMenuHandlerBase {
0030 public:
0031 FWViewContextMenuHandlerBase();
0032 virtual ~FWViewContextMenuHandlerBase();
0033
0034 class MenuEntryAdder {
0035 friend class FWViewContextMenuHandlerBase;
0036 MenuEntryAdder(FWModelContextMenuHandler&);
0037 FWModelContextMenuHandler* m_handler;
0038
0039 public:
0040
0041
0042 int addEntry(const char* iEntryName, int idx, bool enable = true);
0043 };
0044
0045
0046
0047
0048
0049
0050 void addTo(FWModelContextMenuHandler&, const FWModelId& id);
0051
0052
0053
0054
0055
0056 virtual void select(int iEntryIndex, const FWModelId& id, int iX, int iY) = 0;
0057
0058 FWViewContextMenuHandlerBase(const FWViewContextMenuHandlerBase&) = delete;
0059
0060 const FWViewContextMenuHandlerBase& operator=(const FWViewContextMenuHandlerBase&) = delete;
0061
0062 private:
0063
0064 virtual void init(MenuEntryAdder&, const FWModelId& id) = 0;
0065 };
0066
0067 #endif