Main Page | Class Hierarchy | Class List | File List | Class Members

aedObject.h

00001 
00002 /*
00003  * The aedObject class
00004  * The alfa, the omega, the start and the end. aedGUI's main base class :)
00005  * Initial design by Eduardo B. Fonseca <ebf@aedsolucoes.com.br>
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Library General Public
00018  * License along with this library; if not, write to the Free
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  */
00022 
00023 #ifndef AEDOBJECT_H
00024 #define AEDOBJECT_H
00025 
00026 #include <vector>
00027 #include <map>
00028 #include <string>
00029 #include <algorithm>
00030 #include <math.h>
00031 #include <typeinfo>
00032 #include "SDL.h"
00033 #include "dllmacros.h"
00034 #include "aedSignal.h"
00035 
00036 // Events
00037 typedef enum
00038 {
00039     // Mouse events
00040     MOUSE_LBUTTON_DOWN = 1000,
00041     MOUSE_LBUTTON_UP,
00042     MOUSE_RBUTTON_DOWN,
00043     MOUSE_RBUTTON_UP,
00044     MOUSE_MBUTTON_DOWN,
00045     MOUSE_MBUTTON_UP,
00046     MOUSE_MOVE,
00047 
00048     // Focus events
00049     GOT_FOCUS = 1500,
00050     LOST_FOCUS,
00051 
00052     // Keyboard events
00053     KEY_DOWN = 2000,
00054 
00055     // Text events
00056     TEXT_CHANGED = 3000,
00057 
00058     // Screen events
00059     SCREEN_RESOLUTION_CHANGED = 4000,
00060 
00061     // State events
00062     STATE_CHANGED = 5000,
00063 
00064     // Timer Events
00065     TIMER_ALARM = 6000,
00066 
00067     // Generic "value changed" event (currently used by
00068     // sliders and scrollbars)
00069     VALUE_CHANGED = 7000
00070 } aedEvents;
00071 
00073 class DLLEXPORT aedObject
00074 {
00075   public:
00076     aedObject();
00077     virtual ~ aedObject();
00078 
00080     bool connect(aedEvents evt, aedCallBack cbf);
00081     bool disconnect(aedEvents evt);
00082     void triggerEvent(aedEvents evt, void *caller, void *data);
00083 
00084   protected:
00085       std::multimap < aedEvents, aedSignal > m_Signals;
00086 };
00087 
00088 #endif

Generated on Mon Mar 1 19:56:18 2004 for aedGUI by doxygen 1.3.6