00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef AEDBUTTON_H
00024 #define AEDBUTTON_H
00025
00026 #include "dllmacros.h"
00027 #include "aedWidget.h"
00028 #include "aedImage.h"
00029 #include "aedStaticText.h"
00030
00031 enum aedButtonType
00032 {
00033 ROUND,
00034 SQUARE,
00035 BUTTON_ARROW_UP,
00036 BUTTON_ARROW_DOWN,
00037 BUTTON_ARROW_LEFT,
00038 BUTTON_ARROW_RIGHT
00039 };
00040
00043 class DLLEXPORT aedButton:public aedWidget
00044 {
00045 public:
00046
00050 aedButton(aedButtonType type = ROUND);
00051 virtual ~ aedButton();
00052 virtual void render(void);
00053 virtual int wm_update(Uint32 msdelta);
00054 virtual int wm_lbuttondown(Uint16 x, Uint16 y);
00055 virtual int wm_lbuttonup(Uint16 x, Uint16 y);
00056 virtual int wm_keydown(aedKeyEvent & event);
00057 virtual int wm_mouseenter();
00058 virtual int wm_mouseleave();
00059
00061 void setCaption(const std::string & caption);
00062
00064 void setImage(aedImage image);
00065
00067 bool getButtonState(void)
00068 {
00069 return m_ButtonDown;
00070 }
00071
00073 void setButtonState(bool s);
00074
00076 void setButtonType(aedButtonType type)
00077 {
00078 m_ButtonType = type;
00079 }
00080
00082 void setToggleMode(bool mode);
00083
00085 void click();
00086
00087 protected:
00088 bool m_ButtonDown;
00089 bool m_ToggleMode;
00090 aedButtonType m_ButtonType;
00091 aedImage *m_Image;
00092 aedStaticText m_Label;
00093 };
00094
00095 #if defined(_MSC_VER)
00096 DLLEXTERN template DLLEXPORT aedFunctor1Arg < stub, aedButton >;
00097 #endif
00098
00099 #endif