00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __WINDOW_H
00018 #define __WINDOW_H
00019
00020 #ifdef __cplusplus
00021 extern "C"
00022 {
00023 #include "common/stdlib.h"
00024 #include "gui/graphics.h"
00025 #include "common/string.h"
00026 }
00027 #else
00028 #include "common/stdlib.h"
00029 #include "gui/graphics.h"
00030 #include "common/string.h"
00031 #endif
00032
00033 #include "gui/gui_common.h"
00034 #include "gui/components/container.h"
00035 #include "gui/server/paintcomp.h"
00036 #include "gui/components/menubar.h"
00037
00038 #define FILL_COLOR 0xBE19
00039
00040 #define BORDER_COLOR 0xBAF7 //0x9A73 //0x79EF //0x1863 //0x07E0
00041 #define BORDER_WIDTH 2
00042 #define BORDER_HEIGHT 2
00043
00044 #define TITLE_HEIGHT 20
00045 #define TITLE_COLOR 0xC599 //0xA4D5 //0xF52D //0x4
00046 #define SUMMA_HEIGHT 10
00047 #define SUMMA_WIDTH 10
00048 #define MIN_WIDTH 100
00049 #define MIN_HEIGHT 50
00050
00051
00052
00053 class window: public container
00054 {
00055 public:
00056 DD style;
00057 char title[50];
00058 bool hasMenu;
00059 menubar *MenuBar;
00060 COLOR *buf;
00061 window *diag;
00062 DB is_diag;
00063
00064 void win_init(DW _id, DW _parent_id, DW _x, DW _y, DW _width, DW _height, DD _style,DW _is_diag, char * _title);
00065 void paint_win();
00066 void freeAll();
00067 ENTITY findEntity(DW x,DW y);
00068
00069 void activate();
00070 void deactivate();
00071 void keyPress(DW state, DW ch);
00072 void menuInit(DD _user_menu_addr, DW _pid);
00073 SDB processMenu(DW x,DW y);
00074 void move(SDW del_x, SDW del_y);
00075 void attachDialog(window *diag_ptr);
00076 void detachDialog();
00077 };
00078
00079
00080
00081 #endif