- Main Page
- Classes
- Files

- File List

# bitmapbutton.h

    00001 #ifndef _BITMAP_BUTTON_H_
    00002 #define _BITMAP_BUTTON_H_
    00003
    00004 #include <nds.h>
    00005 #include "gadget.h"
    00006
    00007 namespace WoopsiUI {
    00008
    00009         class BitmapBase;
    00010
    00016         class BitmapButton : public Gadget {
    00017
    00018         public:
    00030                 BitmapButton(s16 x, s16 y, u16 width, u16 height, u16 bitmapX, u16 bitmapY, const BitmapBase* bitmapNormal, const BitmapBase* bitmapClicked);
    00031
    00038                 virtual void getPreferredDimensions(Rect& rect) const;
    00039
    00040         protected:
    00041                 const BitmapBase* _bitmapNormal;
    00042                 const BitmapBase* _bitmapClicked;
    00043                 u16 _bitmapX;
    00044                 u16 _bitmapY;
    00052                 virtual void drawContents(GraphicsPort* port);
    00053
    00060                 virtual void drawBorder(GraphicsPort* port);
    00061
    00066                 virtual void drawOutline(GraphicsPort* port);
    00067
    00073                 virtual void onClick(s16 x, s16 y);
    00074
    00080                 virtual void onRelease(s16 x, s16 y);
    00081
    00087                 virtual void onReleaseOutside(s16 x, s16 y);
    00088
    00092                 virtual inline ~BitmapButton() { };
    00093
    00097                 inline BitmapButton(const BitmapButton& bitmapButton) : Gadget(bitmapButton) { };
    00098         };
    00099 }
    00100
    00101 #endif