CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FWViewContextMenuHandlerBase.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Core
4 // Class : FWViewContextMenuHandlerBase
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Chris Jones
10 // Created: Mon Nov 2 13:46:48 CST 2009
11 //
12 
13 // system include files
14 
15 // user include files
18 
19 //
20 // constants, enums and typedefs
21 //
22 
23 //
24 // static data member definitions
25 //
27  : m_handler(&iHandler) {}
28 
29 int FWViewContextMenuHandlerBase::MenuEntryAdder::addEntry(const char* iEntryName, int idx, bool enabled) {
30  m_handler->addViewEntry(iEntryName, idx, enabled);
31  return idx;
32 }
33 
34 //
35 // constructors and destructor
36 //
38 
39 // FWViewContextMenuHandlerBase::FWViewContextMenuHandlerBase(const FWViewContextMenuHandlerBase& rhs)
40 // {
41 // // do actual copying here;
42 // }
43 
45 
46 //
47 // assignment operators
48 //
49 // const FWViewContextMenuHandlerBase& FWViewContextMenuHandlerBase::operator=(const FWViewContextMenuHandlerBase& rhs)
50 // {
51 // //An exception safe implementation is
52 // FWViewContextMenuHandlerBase temp(rhs);
53 // swap(rhs);
54 //
55 // return *this;
56 // }
57 
58 //
59 // member functions
60 //
62  MenuEntryAdder adder(iHandle);
63  init(adder, id);
64 }
virtual void init(MenuEntryAdder &, const FWModelId &id)=0
Called when have to add entries to the context menu.
void addTo(FWModelContextMenuHandler &, const FWModelId &id)
int addEntry(const char *iEntryName, int idx, bool enable=true)