00001 #ifndef VIS_ROOT_MODEL_VIS_ROOT_MODEL_H 00002 # define VIS_ROOT_MODEL_VIS_ROOT_MODEL_H 00003 00004 # include "VisRoot/VisRootModel/interface/config.h" 00005 # include "Iguana/Framework/interface/IgModel.h" 00006 # include "Iguana/Framework/interface/IgState.h" 00007 # include "Iguana/Framework/interface/IgDispatcher.h" 00008 # include "VisRoot/VisRootModel/interface/VisRootModelEvent.h" 00009 # include <set> 00010 # include <vector> 00011 00012 //<<<<<< INCLUDES >>>>>> 00013 //<<<<<< PUBLIC DEFINES >>>>>> 00014 //<<<<<< PUBLIC CONSTANTS >>>>>> 00015 //<<<<<< PUBLIC TYPES >>>>>> 00016 00017 class TCanvas; 00018 class VisRootRep; 00019 class TVirtualPad; 00020 00021 //<<<<<< PUBLIC VARIABLES >>>>>> 00022 //<<<<<< PUBLIC FUNCTIONS >>>>>> 00023 //<<<<<< CLASS DECLARATIONS >>>>>> 00024 00025 class VIS_ROOT_MODEL_API VisRootModel : public IgModel 00026 { 00027 public: 00028 typedef IgDispatcher<VisRootModelEvent> Dispatcher; 00029 enum {ModelChanged}; 00030 00031 VisRootModel (IgState *state); 00032 ~VisRootModel (void); 00033 00034 // implicit copy constructor 00035 // implicit assignment operator 00036 // implicit destructor 00037 TCanvas * canvas (void); 00038 TVirtualPad * pad (void); 00039 void canvas (TCanvas *canvas); 00040 void pad (TVirtualPad *pad); 00041 Dispatcher *dispatcher (unsigned int eventType); 00042 void changed (void); 00043 IgState * state (void); 00044 void setCanvasSubdivisions (unsigned int x, unsigned int y); 00045 void setPad (TVirtualPad * p, unsigned int n); 00046 TVirtualPad * getCurrentVecElement (); 00047 unsigned int getNextPad (void); 00048 void trackRep (VisRootRep *rep); 00049 void resetVec (); 00050 void untrackRep (VisRootRep *rep); 00051 std::vector <TVirtualPad *> getVec (); 00052 private: 00053 IgState * m_state; 00054 TCanvas * m_canvas; 00055 std::vector <TVirtualPad *> m_vec; 00056 00057 TVirtualPad * m_pad; 00058 Dispatcher * m_modelChangedDispatcher; 00059 unsigned int m_maxPads; 00060 unsigned int m_currentPad; 00061 std::set <VisRootRep *> m_repSet; 00062 }; 00063 00064 //<<<<<< INLINE PUBLIC FUNCTIONS >>>>>> 00065 //<<<<<< INLINE MEMBER FUNCTIONS >>>>>> 00066 00067 #endif // VIS_ROOT_MODEL_VIS_ROOT_MODEL_H