OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimRefreshEvent.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: ossimRefreshEvent.h 19819 2011-07-14 17:28:48Z gpotts $
11 #ifndef ossimRefreshEvent_HEADER
12 #define ossimRefreshEvent_HEADER
13 #include <ossim/base/ossimEvent.h>
14 #include <ossim/base/ossimDpt.h>
15 
17 {
18 public:
20  {
21  REFRESH_NONE = 0,
22  REFRESH_POSITION = 1,
23  REFRESH_PIXELS = 2,
24  REFRESH_GEOMETRY = 4,
25  REFRESH_ALL = (REFRESH_POSITION|REFRESH_PIXELS|REFRESH_GEOMETRY)
26  };
28  {
29  ANCHOR_UPPER_LEFT = 1,
30  ANCHOR_CENTER = 2
31  };
32  ossimRefreshEvent(ossimObject* object=0) // the object associated with the event if any
34  m_refreshType(static_cast<RefreshType>(REFRESH_PIXELS|REFRESH_GEOMETRY)),
35  m_anchor(ANCHOR_CENTER)
36  {m_position.makeNan();}
37  ossimRefreshEvent(RefreshType refreshType, ossimObject* object=0)
39  m_refreshType(refreshType),
40  m_anchor(ANCHOR_CENTER)
41 
42  {
43  m_position.makeNan();
44  }
46  :ossimEvent(src),
47  m_refreshType(src.m_refreshType),
48  m_position(src.m_position),
49  m_anchor(src.m_anchor)
50  {
51  }
52  virtual ossimObject* dup()const
53  {
54  return new ossimRefreshEvent(*this);
55  }
56 
57  void setRefreshType(int refreshType, bool on=true);
58  RefreshType getRefreshType()const{return m_refreshType;}
59 
60  void setPosition(const ossimDpt& position)
61  {
62  m_position = position;
63  if(!m_position.hasNans())setRefreshType(REFRESH_POSITION);
64  }
65 
66  const ossimDpt& getPosition()const{return m_position;}
67 
68 
69 protected:
73  TYPE_DATA
74 };
75 
76 #endif
void setPosition(const ossimDpt &position)
#define OSSIMDLLEXPORT
PositionAnchor m_anchor
virtual ossimObject * dup() const
ossimRefreshEvent(const ossimRefreshEvent &src)
#define TYPE_DATA
Definition: ossimRtti.h:339
ossimRefreshEvent(ossimObject *object=0)
#define OSSIM_EVENT_REFRESH_ID
Definition: ossimEventIds.h:24
RefreshType m_refreshType
const ossimDpt & getPosition() const
RefreshType getRefreshType() const
ossimRefreshEvent(RefreshType refreshType, ossimObject *object=0)