Woopsi 1.0 GUI Framework for Nintendo DS Homebrew

- Main Page
- Classes
- Files

- File List

# gadgeteventhandlerlist.h

    00001 #ifndef _GADGET_EVENT_HANDLER_LIST_H_
    00002 #define _GADGET_EVENT_HANDLER_LIST_H_
    00003
    00004 #include <nds.h>
    00005 #include "gadgeteventhandler.h"
    00006 #include "woopsiarray.h"
    00007
    00008 namespace WoopsiUI {
    00009
    00010         class Gadget;
    00011
    00015         class GadgetEventHandlerList {
    00016         public:
    00017
    00022                 GadgetEventHandlerList(Gadget* gadget);
    00023
    00027                 ~GadgetEventHandlerList() { };
    00028
    00033                 const bool isEnabled() const;
    00034
    00040                 inline GadgetEventHandler* at(const s32 index) const { return _gadgetEventHandlers.at(index); };
    00041
    00046                 inline const s32 size() const { return _gadgetEventHandlers.size(); };
    00047
    00053                 void addGadgetEventHandler(GadgetEventHandler* eventHandler);
    00054
    00059                 void removeGadgetEventHandler(GadgetEventHandler* eventHandler);
    00060
    00064                 inline void enable() { _isEnabled = true; };
    00065
    00069                 inline void disable() { _isEnabled = false; };
    00070
    00076                 void raiseClickEvent(s16 x, s16 y);
    00077
    00083                 void raiseDoubleClickEvent(s16 x, s16 y);
    00084
    00090                 void raiseShiftClickEvent(s16 x, s16 y);
    00091
    00097                 void raiseReleaseEvent(s16 x, s16 y);
    00098
    00104                 void raiseReleaseOutsideEvent(s16 x, s16 y);
    00105
    00113                 void raiseDragEvent(s16 x, s16 y, s16 vX, s16 vY);
    00114
    00120                 void raiseDropEvent(s16 x, s16 y);
    00121
    00125                 void raiseMoveForwardEvent();
    00126
    00130                 void raiseMoveBackwardEvent();
    00131
    00136                 void raiseKeyPressEvent(KeyCode keyCode);
    00137
    00142                 void raiseKeyRepeatEvent(KeyCode keyCode);
    00143
    00148                 void raiseKeyReleaseEvent(KeyCode keyCode);
    00149
    00153                 void raiseLidCloseEvent();
    00154
    00158                 void raiseLidOpenEvent();
    00159
    00163                 void raiseFocusEvent();
    00164
    00168                 void raiseBlurEvent();
    00169
    00173                 void raiseCloseEvent();
    00174
    00178                 void raiseHideEvent();
    00179
    00183                 void raiseShowEvent();
    00184
    00188                 void raiseShelveEvent();
    00189
    00193                 void raiseUnshelveEvent();
    00194
    00198                 void raiseEnableEvent();
    00199
    00203                 void raiseDisableEvent();
    00204
    00208                 void raiseValueChangeEvent();
    00209
    00215                 void raiseResizeEvent(u16 width, u16 height);
    00216
    00224                 void raiseMoveEvent(s16 x, s16 y, s16 vX, s16 vY);
    00225
    00230                 void raiseContextMenuSelectionEvent(const ListDataItem* contextMenuItem);
    00231
    00239                 void raiseActionEvent();
    00240
    00246                 void raiseScrollEvent(s16 vX, s16 vY);
    00247
    00248         protected:
    00249                 WoopsiArray<GadgetEventHandler*> _gadgetEventHandlers;
    00250                 Gadget* _gadget;
    00251                 bool _isEnabled;
    00252         };
    00253 }
    00254
    00255 #endif