Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:43

0001 // -*- C++ -*-
0002 //
0003 // Package:     Core
0004 // Class  :     FWViewContextMenuHandlerBase
0005 //
0006 // Implementation:
0007 //     [Notes on implementation]
0008 //
0009 // Original Author:  Chris Jones
0010 //         Created:  Mon Nov  2 13:46:48 CST 2009
0011 //
0012 
0013 // system include files
0014 
0015 // user include files
0016 #include "Fireworks/Core/interface/FWViewContextMenuHandlerBase.h"
0017 #include "Fireworks/Core/src/FWModelContextMenuHandler.h"
0018 
0019 //
0020 // constants, enums and typedefs
0021 //
0022 
0023 //
0024 // static data member definitions
0025 //
0026 FWViewContextMenuHandlerBase::MenuEntryAdder::MenuEntryAdder(FWModelContextMenuHandler& iHandler)
0027     : m_handler(&iHandler) {}
0028 
0029 int FWViewContextMenuHandlerBase::MenuEntryAdder::addEntry(const char* iEntryName, int idx, bool enabled) {
0030   m_handler->addViewEntry(iEntryName, idx, enabled);
0031   return idx;
0032 }
0033 
0034 //
0035 // constructors and destructor
0036 //
0037 FWViewContextMenuHandlerBase::FWViewContextMenuHandlerBase() {}
0038 
0039 // FWViewContextMenuHandlerBase::FWViewContextMenuHandlerBase(const FWViewContextMenuHandlerBase& rhs)
0040 // {
0041 //    // do actual copying here;
0042 // }
0043 
0044 FWViewContextMenuHandlerBase::~FWViewContextMenuHandlerBase() {}
0045 
0046 //
0047 // assignment operators
0048 //
0049 // const FWViewContextMenuHandlerBase& FWViewContextMenuHandlerBase::operator=(const FWViewContextMenuHandlerBase& rhs)
0050 // {
0051 //   //An exception safe implementation is
0052 //   FWViewContextMenuHandlerBase temp(rhs);
0053 //   swap(rhs);
0054 //
0055 //   return *this;
0056 // }
0057 
0058 //
0059 // member functions
0060 //
0061 void FWViewContextMenuHandlerBase::addTo(FWModelContextMenuHandler& iHandle, const FWModelId& id) {
0062   MenuEntryAdder adder(iHandle);
0063   init(adder, id);
0064 }