00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __BUTTON_H
00019 #define __BUTTON_H
00020
00021 #ifdef __cplusplus
00022 extern "C"
00023 {
00024 #include "common/ktypes.h"
00025 #include "common/stdlib.h"
00026 #include "gui/graphics.h"
00027 #include "common/string.h"
00028 }
00029 #else
00030 #include "common/ktypes.h"
00031 #include "common/stdlib.h"
00032 #include "gui/graphics.h"
00033 #include "common/string.h"
00034 #endif
00035
00036 #include "gui/components/component.h"
00037 #include "gui/components/window.h"
00038 #include "gui/components/frame.h"
00039
00040 #define MIN_BUT_WIDTH 20
00041 #define MIN_BUT_HEIGHT 10
00042 #define BUTTON_COLOR 0xDE99 //0x8BF1 //0xB577 //0xD5F7
00043
00044 class button:public component
00045 {
00046 public :
00047 char label[15];
00048 bool state;
00049
00050 void but_init(DW _id,DW _parent_id,DW _cnt_type,void *_cnt_ptr,DW _alias_id,DW _x,DW _y,DW _width,DW _height,DD _style,char *_label);
00051 void paint();
00052 void react();
00053 };
00054
00055
00056
00057 #endif