Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
// -*- C++ -*-
//
// Package:     Core
// Class  :     FWViewContextMenuHandlerBase
//
// Implementation:
//     [Notes on implementation]
//
// Original Author:  Chris Jones
//         Created:  Mon Nov  2 13:46:48 CST 2009
//

// system include files

// user include files
#include "Fireworks/Core/interface/FWViewContextMenuHandlerBase.h"
#include "Fireworks/Core/src/FWModelContextMenuHandler.h"

//
// constants, enums and typedefs
//

//
// static data member definitions
//
FWViewContextMenuHandlerBase::MenuEntryAdder::MenuEntryAdder(FWModelContextMenuHandler& iHandler)
    : m_handler(&iHandler) {}

int FWViewContextMenuHandlerBase::MenuEntryAdder::addEntry(const char* iEntryName, int idx, bool enabled) {
  m_handler->addViewEntry(iEntryName, idx, enabled);
  return idx;
}

//
// constructors and destructor
//
FWViewContextMenuHandlerBase::FWViewContextMenuHandlerBase() {}

// FWViewContextMenuHandlerBase::FWViewContextMenuHandlerBase(const FWViewContextMenuHandlerBase& rhs)
// {
//    // do actual copying here;
// }

FWViewContextMenuHandlerBase::~FWViewContextMenuHandlerBase() {}

//
// assignment operators
//
// const FWViewContextMenuHandlerBase& FWViewContextMenuHandlerBase::operator=(const FWViewContextMenuHandlerBase& rhs)
// {
//   //An exception safe implementation is
//   FWViewContextMenuHandlerBase temp(rhs);
//   swap(rhs);
//
//   return *this;
// }

//
// member functions
//
void FWViewContextMenuHandlerBase::addTo(FWModelContextMenuHandler& iHandle, const FWModelId& id) {
  MenuEntryAdder adder(iHandle);
  init(adder, id);
}