OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimViewEvent.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts
6 // Description: A brief description of the contents of the file.
7 //
8 //
9 //*************************************************************************
10 // $Id: ossimViewEvent.h 9968 2006-11-29 14:01:53Z gpotts $
11 #ifndef ossimViewEvent_HEADER
12 #define ossimViewEvent_HEADER
13 #include <ossim/base/ossimEvent.h>
14 #include <ossim/base/ossimGpt.h>
16 {
17 public:
19  {
20  OSSIM_VIEW_EVENT_TYPE_GENERIC = 0,
23  OSSIM_VIEW_EVENT_VIEW_TYPE_CHANGE
24  };
26  {
27  OSSIM_VIEW_EVENT_PROPAGATE_NONE = 0,
28  OSSIM_VIEW_EVENT_PROPAGATE_ALL_DISPLAYS = 1,
29  OSSIM_VIEW_EVENT_PROPAGATE_ALL_CHAINS = 2,
30  };
31 
33  ossimGpt centerPt,
34  ossimViewPropagateType propagateType = OSSIM_VIEW_EVENT_PROPAGATE_NONE,
35  ossimViewEventType eventType = OSSIM_VIEW_EVENT_TYPE_GENERIC,
36  ossimObject* object=NULL)
38  theView(view),
39  theCenterPoint(centerPt),
40  theEventType(eventType),
41  thePropagateType(propagateType),
42  theUpdateInputViewFlag(true),
43  theRefreshDisplayFlag(true)
44  {
45  }
47  :ossimEvent(rhs),
48  theView(rhs.theView),
49  theCenterPoint(rhs.theCenterPoint),
50  theEventType(rhs.theEventType),
51  thePropagateType(rhs.thePropagateType),
52  theUpdateInputViewFlag(rhs.theUpdateInputViewFlag),
53  theRefreshDisplayFlag(rhs.theRefreshDisplayFlag)
54  {
55  }
56  virtual ossimObject* dup()const
57  {
58  return new ossimViewEvent(*this);
59  }
60  virtual void setView(ossimObject* view)
61  {
62  theView = view;
63  }
64  virtual ossimObject* getView()
65  {
66  return theView;
67  }
69  {
70  thePropagateType = OSSIM_VIEW_EVENT_PROPAGATE_NONE;
71  }
73  {
74  thePropagateType = type;
75  }
77  {
78  theEventType = eventType;
79  }
81  {
82  theEventType = OSSIM_VIEW_EVENT_VIEW_TYPE_CHANGE;
83  }
85  {
86  theEventType = OSSIM_VIEW_EVENT_TRANSFORM_CHANGE;
87  }
89  {
90  theEventType = OSSIM_VIEW_EVENT_TYPE_GENERIC;
91  }
92  void setCenterGroundPoint(const ossimGpt& gpt)
93  {
94  theCenterPoint = gpt;
95  }
97  {
98  return theCenterPoint;
99  }
101  {
102  return theEventType;
103  }
104  bool isViewChange()const
105  {
106  return (theEventType == OSSIM_VIEW_EVENT_VIEW_TYPE_CHANGE);
107  }
108  bool isTransformChange()const
109  {
110  return (theEventType == OSSIM_VIEW_EVENT_TRANSFORM_CHANGE);
111  }
112  bool isScaleChange()const
113  {
114  return (theEventType == OSSIM_VIEW_EVENT_SCALE_CHANGE);
115 
116  }
117  bool isPropagateEnabled()const
118  {
119  return (thePropagateType != OSSIM_VIEW_EVENT_PROPAGATE_NONE);
120  }
122  {
123  return (thePropagateType & OSSIM_VIEW_EVENT_PROPAGATE_ALL_DISPLAYS);
124  }
126  {
127  return (thePropagateType & OSSIM_VIEW_EVENT_PROPAGATE_ALL_CHAINS);
128  }
129  void setUpdateInputViewFlag(bool flag)
130  {
131  theUpdateInputViewFlag = flag;
132  }
134  {
135  return theUpdateInputViewFlag;
136  }
137  void setRefreshDisplayFlag(bool flag)
138  {
139  theRefreshDisplayFlag = flag;
140  }
142  {
143  return theRefreshDisplayFlag;
144  }
145 protected:
152 TYPE_DATA
153 };
154 #endif
#define OSSIMDLLEXPORT
bool isViewChange() const
bool theUpdateInputViewFlag
#define OSSIM_EVENT_VIEW_ID
Definition: ossimEventIds.h:58
virtual void setView(ossimObject *view)
void setPropagateType(ossimViewPropagateType type)
void setCenterGroundPoint(const ossimGpt &gpt)
void setRefreshDisplayFlag(bool flag)
virtual ossimObject * getView()
void disablePropagation()
ossimViewEventType theEventType
ossimGpt theCenterPoint
bool getRefreshDisplayFlag() const
bool isScaleChange() const
bool getUpdateInputViewFlag() const
void setViewEventType(ossimViewEventType eventType)
ossimViewEvent(const ossimViewEvent &rhs)
void setUpdateInputViewFlag(bool flag)
ossimViewEventType getViewEventType() const
void setEventTypeGeneric()
bool theRefreshDisplayFlag
bool isTransformChange() const
#define TYPE_DATA
Definition: ossimRtti.h:339
ossimViewEvent(ossimObject *view, ossimGpt centerPt, ossimViewPropagateType propagateType=OSSIM_VIEW_EVENT_PROPAGATE_NONE, ossimViewEventType eventType=OSSIM_VIEW_EVENT_TYPE_GENERIC, ossimObject *object=NULL)
bool isPropagateEnabled() const
ossimObject * theView
ossimViewPropagateType thePropagateType
void setEventTypeViewTypeChange()
virtual ossimObject * dup() const
bool isPropagateToChains() const
void setEventTypeTransformChange()
bool isPropagateToDisplays() const
const ossimGpt & getCenterGroundPoint() const