File indexing completed on 2024-09-07 04:36:20
0001 #ifndef Fireworks_Core_FWViewManagerBase_h
0002 #define Fireworks_Core_FWViewManagerBase_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <string>
0023 #include <vector>
0024 #include <set>
0025 #include <map>
0026
0027
0028
0029
0030 #include "Fireworks/Core/interface/FWTypeToRepresentations.h"
0031
0032
0033 class FWEventItem;
0034 class TClass;
0035 class FWGeometry;
0036 class FWModelId;
0037 class FWModelChangeManager;
0038 class FWColorManager;
0039 class FWTypeToRepresentations;
0040
0041 namespace fireworks {
0042 class Context;
0043 }
0044
0045 class FWViewManagerBase {
0046 public:
0047 virtual ~FWViewManagerBase();
0048
0049
0050 virtual FWTypeToRepresentations supportedTypesAndRepresentations() const = 0;
0051
0052
0053
0054 virtual void newItem(const FWEventItem*) = 0;
0055
0056 virtual void setContext(const fireworks::Context* x) { m_context = x; }
0057
0058 void setChangeManager(FWModelChangeManager* iCM);
0059 void setColorManager(FWColorManager* iCM);
0060
0061 void modelChangesComingSlot();
0062 void modelChangesDoneSlot();
0063 void colorsChangedSlot();
0064 virtual void eventBegin() {}
0065 virtual void eventEnd() {}
0066
0067
0068
0069 const fireworks::Context& context() const { return *m_context; }
0070
0071 protected:
0072 FWViewManagerBase();
0073
0074
0075
0076
0077
0078 void* createInstanceOf(const TClass* iBaseClass, const char* iNameOfClass);
0079
0080
0081 virtual void modelChangesComing() = 0;
0082 virtual void modelChangesDone() = 0;
0083 virtual void colorsChanged() = 0;
0084
0085 FWModelChangeManager& changeManager() const;
0086 FWColorManager& colorManager() const;
0087
0088 public:
0089 FWViewManagerBase(const FWViewManagerBase&) = delete;
0090
0091 const FWViewManagerBase& operator=(const FWViewManagerBase&) = delete;
0092
0093 private:
0094
0095 const fireworks::Context* m_context;
0096
0097 FWModelChangeManager* m_changeManager;
0098 FWColorManager* m_colorManager;
0099 };
0100
0101 #endif