CMS 3D CMS Logo

Public Member Functions

FWPSetCellEditor Class Reference

#include <Fireworks/FWInterface/interface/FWPSetCellEditor.h>

List of all members.

Public Member Functions

bool apply (FWPSetTableManager::PSetData &data, FWPSetTableManager::PSetData &parent)
 FWPSetCellEditor (const TGWindow *w, const char *txt)
virtual bool HandleKey (Event_t *event)
virtual ~FWPSetCellEditor ()

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 26 of file FWPSetCellEditor.h.


Constructor & Destructor Documentation

FWPSetCellEditor::FWPSetCellEditor ( const TGWindow *  w,
const char *  txt 
) [inline]

Definition at line 29 of file FWPSetCellEditor.h.

: TGTextEntry(w, txt) {};
virtual FWPSetCellEditor::~FWPSetCellEditor ( ) [inline, virtual]

Definition at line 30 of file FWPSetCellEditor.h.

{};

Member Function Documentation

bool FWPSetCellEditor::apply ( FWPSetTableManager::PSetData data,
FWPSetTableManager::PSetData parent 
)

Definition at line 234 of file FWPSetCellEditor.cc.

References editESInputTag(), editFileInPath(), editInputTag(), editStringParameter(), editVInputTag(), fwLog, fwlog::kError, FWPSetTableManager::PSetData::label, FWPSetTableManager::PSetData::pset, FWPSetTableManager::PSetData::tracked, and FWPSetTableManager::PSetData::type.

Referenced by FWPSetTableManager::applyEditor().

{
   switch (data.type)
   {
      case 'I':
         editNumericParameter<int32_t>(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'U':
         editNumericParameter<uint32_t>(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'D':
         editNumericParameter<double>(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'L':
         editNumericParameter<long long>(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'X':
         editNumericParameter<unsigned long long>(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'S':
         editStringParameter(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'i':
         editVectorParameter<int32_t>(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'u':
         editVectorParameter<uint32_t>(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'l':
         editVectorParameter<long long>(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'x':
         editVectorParameter<unsigned long long>(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'd':
         editVectorParameter<double>(parent.pset, data.tracked, data.label, GetText());
         break;
      case 's':
         editVectorParameter<std::string>(parent.pset, data.tracked, data.label, GetText());
         break; 
      case 't':
         editInputTag(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'g':
         editESInputTag(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'v':
         editVInputTag(parent.pset, data.tracked, data.label, GetText());
         break;
      case 'F':
         editFileInPath(parent.pset, data.tracked, data.label, GetText());
         break;
      default:
         fwLog(fwlog::kError) << "unsupported parameter" << std::endl;
         UnmapWindow();
         return false;
   }
   return true;
}
bool FWPSetCellEditor::HandleKey ( Event_t *  event) [virtual]

Definition at line 296 of file FWPSetCellEditor.cc.

References L1TEmulatorMonitor_cff::p.

{
   UInt_t keysym = event->fCode;

   if (keysym == (UInt_t) gVirtualX->KeysymToKeycode(kKey_Escape))
   {
      TGFrame *p = dynamic_cast<TGFrame*>(const_cast<TGWindow*>(GetParent()));
      while (p)
      {
         TGMainFrame *mp = dynamic_cast<TGMainFrame*>(p);
         //   printf("editor find parent %p, %s, %p\n", p, p->ClassName(), mp);
         if (mp)
         {
            return mp->HandleKey(event);
         }
         p = dynamic_cast<TGFrame*>(const_cast<TGWindow*>(p->GetParent()));
      }
   }

   return TGTextEntry::HandleKey(event);
}