Gnash  0.8.10
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 "InteractiveObject.h" 
00011 
00012 // Forward declarations
00013 namespace gnash {
00014         class MovieClip;
00015 }
00016 
00017 namespace gnash {
00018 
00020 struct MouseButtonState
00021 {
00022 
00023 public:
00024 
00026         InteractiveObject* activeEntity;
00027 
00029         InteractiveObject* topmostEntity;
00030 
00032         bool wasDown;   
00033 
00035         bool isDown;    
00036 
00038         bool wasInsideActiveEntity;
00039 
00040         MouseButtonState()
00041                 :
00042         activeEntity(0),
00043         topmostEntity(0),
00044                 wasDown(false),
00045                 isDown(false),
00046                 wasInsideActiveEntity(false)
00047         {
00048         }
00049 
00051         void markReachableResources() const {
00052                 if (activeEntity) activeEntity->setReachable();
00053                 if (topmostEntity) topmostEntity->setReachable();
00054         }
00055 };
00056 
00057 }       // end namespace gnash
00058 
00059 
00060 #endif // GNASH_MOUSE_BUTTON_STATE_H
00061 
00062 
00063 // Local Variables:
00064 // mode: C++
00065 // c-basic-offset: 8 
00066 // tab-width: 8
00067 // indent-tabs-mode: nil
00068 // End: