#ifndef SIRIEL_INCLUDE_WIDGET #define SIRIEL_INCLUDE_WIDGET #include #include #include #include #include "cl_anim.h" #include "si_system.h" #include "ex_drs.h" using namespace std; class WIDGET { private: ANIM *border; BITMAP *scr; string title_str; string content_str; int visible_val; int text_w, text_h; deque lines; map prop_int; public: void init(); void canvas(BITMAP *bmp); void borders(ANIM *a); //sets borders void print_content(int x, int y); void content(string s); void compute_size(); //compute size of content void draw(int x, int y, int sx, int sy); void draw(); void draw_visible(); void title(string t); void show(); void hide(); int visible(); void property(string name, int val); //sets widget property }; //ANIM = 9 sectors // 0 1 2 -> window // 3 4 5 // 6 7 8 #endif