• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List
  • File Members

MouseButtonState.h

Go to the documentation of this file.
00001 // Thatcher Ulrich <tu@tulrich.com> 2003
00002 
00003 // This source code has been donated to the Public Domain.  Do
00004 // whatever you want with it.
00005 
00006 
00007 #ifndef GNASH_MOUSE_BUTTON_STATE_H
00008 #define GNASH_MOUSE_BUTTON_STATE_H
00009 
00010 #include "smart_ptr.h" // GNASH_USE_GC
00011 #include "InteractiveObject.h" // for use in intrusive_ptr
00012 
00013 // Forward declarations
00014 namespace gnash {
00015         class MovieClip;
00016 }
00017 
00018 namespace gnash {
00019 
00021 struct MouseButtonState
00022 {
00023 
00024 public:
00025 
00027         InteractiveObject* activeEntity;
00028 
00030         InteractiveObject* topmostEntity;
00031 
00033         bool wasDown;   
00034 
00036         bool isDown;    
00037 
00039         bool wasInsideActiveEntity;
00040 
00041         MouseButtonState()
00042                 :
00043         activeEntity(0),
00044         topmostEntity(0),
00045                 wasDown(false),
00046                 isDown(false),
00047                 wasInsideActiveEntity(false)
00048         {
00049         }
00050 
00051 #ifdef GNASH_USE_GC
00052 
00053         void markReachableResources() const
00054         {
00055                 if (activeEntity) activeEntity->setReachable();
00056                 if (topmostEntity) topmostEntity->setReachable();
00057         }
00058 #endif // GNASH_USE_GC
00059 };
00060 
00061 }       // end namespace gnash
00062 
00063 
00064 #endif // GNASH_MOUSE_BUTTON_STATE_H
00065 
00066 
00067 // Local Variables:
00068 // mode: C++
00069 // c-basic-offset: 8 
00070 // tab-width: 8
00071 // indent-tabs-mode: t
00072 // End:

Generated on Thu Sep 30 2010 14:35:00 for Gnash by  doxygen 1.7.1