25 : width(10), align(0), sort(0), color(
Color::White), use_color(false)
29 : title(t), width(w), align(a), sort(s),
30 color(
Color::White), use_color(false)
36 : id(a_id), pid(0), type(a_type), text(a_text), style(a_style)
76 #define CTRL_DEF_ANIMATED 0x0001
77 #define CTRL_DEF_BORDER 0x0002
78 #define CTRL_DEF_DROP_SHADOW 0x0004
79 #define CTRL_DEF_INDENT 0x0008
80 #define CTRL_DEF_INVERT_LABEL 0x0010
81 #define CTRL_DEF_GLOW 0x0020
82 #define CTRL_DEF_SIMPLE 0x0040
83 #define CTRL_DEF_STICKY 0x0080
86 :
WinDef(a_id, a_type, a_text, a_style)
336 result = *(
items[i]);
373 if (i >= 0 && i <
ntabs)
380 if (i >= 0 && i < 10) {
562 static char filename[64];
563 static char path_name[64];
568 sprintf_s(filename,
"%s.frm", fname);
570 Print(
"Loading Form '%s'\n", fname);
572 sprintf_s(path_name,
"Screens/");
579 int blocklen = loader->
LoadBuffer(filename, block,
true);
581 if (!block || blocklen < 4)
584 Parser parser(
new(__FILE__,__LINE__)
BlockReader((
const char*) block, blocklen));
588 Print(
"ERROR: could not parse '%s'\n", filename);
593 if (!file_type || file_type->
value() !=
"FORM") {
594 Print(
"ERROR: invalid form file '%s'\n", filename);
610 Print(
"WARNING: form structure missing in '%s'\n", filename);
628 else if (pdef->
name()->
value() ==
"id") {
634 else if (pdef->
name()->
value() ==
"pid") {
640 else if (pdef->
name()->
value() ==
"rect") {
646 else if (pdef->
name()->
value() ==
"font") {
651 else if (pdef->
name()->
value() ==
"back_color") {
657 else if (pdef->
name()->
value() ==
"base_color") {
663 else if (pdef->
name()->
value() ==
"fore_color") {
669 else if (pdef->
name()->
value() ==
"margins") {
673 else if (pdef->
name()->
value() ==
"text_insets") {
677 else if (pdef->
name()->
value() ==
"cell_insets") {
681 else if (pdef->
name()->
value() ==
"cells") {
685 else if (pdef->
name()->
value() ==
"texture") {
688 if (*buf && !strchr(buf,
'.'))
689 strcat_s(buf,
".pcx");
694 else if (pdef->
name()->
value() ==
"transparent") {
700 else if (pdef->
name()->
value() ==
"style") {
706 else if (pdef->
name()->
value() ==
"align" ||
711 if (!_stricmp(buf,
"left"))
713 else if (!_stricmp(buf,
"right"))
715 else if (!_stricmp(buf,
"center"))
728 else if (pdef->
name()->
value() ==
"layout") {
731 Print(
"WARNING: layout structure missing in '%s'\n", filename);
741 else if (pdef->
name()->
value() ==
"defctrl") {
744 Print(
"WARNING: defctrl structure missing in '%s'\n", filename);
752 else if (pdef->
name()->
value() ==
"ctrl") {
755 Print(
"WARNING: ctrl structure missing in '%s'\n", filename);
775 Print(
"WARNING: unknown object '%s' in '%s'\n",
779 Print(
"WARNING: term ignored in '%s'\n", filename);
805 else if (pdef->
name()->
value() ==
"id") {
811 else if (pdef->
name()->
value() ==
"pid") {
817 else if (pdef->
name()->
value() ==
"alt") {
822 else if (pdef->
name()->
value() ==
"type") {
828 if (type_name ==
"button")
831 else if (type_name ==
"combo")
834 else if (type_name ==
"edit")
837 else if (type_name ==
"image")
840 else if (type_name ==
"slider")
843 else if (type_name ==
"list")
846 else if (type_name ==
"rich" || type_name ==
"text" || type_name ==
"rich_text")
852 else if (pdef->
name()->
value() ==
"rect") {
858 else if (pdef->
name()->
value() ==
"font") {
863 else if (pdef->
name()->
value() ==
"active_color") {
869 else if (pdef->
name()->
value() ==
"back_color") {
875 else if (pdef->
name()->
value() ==
"base_color") {
881 else if (pdef->
name()->
value() ==
"border_color") {
887 else if (pdef->
name()->
value() ==
"fore_color") {
893 else if (pdef->
name()->
value() ==
"texture") {
902 else if (pdef->
name()->
value() ==
"margins") {
906 else if (pdef->
name()->
value() ==
"text_insets") {
910 else if (pdef->
name()->
value() ==
"cell_insets") {
914 else if (pdef->
name()->
value() ==
"cells") {
918 else if (pdef->
name()->
value() ==
"fixed_width") {
922 else if (pdef->
name()->
value() ==
"fixed_height") {
926 else if (pdef->
name()->
value() ==
"standard_image") {
935 else if (pdef->
name()->
value() ==
"activated_image") {
944 else if (pdef->
name()->
value() ==
"transition_image") {
953 else if (pdef->
name()->
value() ==
"picture") {
962 else if (pdef->
name()->
value() ==
"enabled") {
968 else if (pdef->
name()->
value() ==
"item") {
973 else if (pdef->
name()->
value() ==
"tab") {
979 else if (pdef->
name()->
value() ==
"column") {
982 Print(
"WARNING: column structure missing in '%s'\n", filename);
990 else if (pdef->
name()->
value() ==
"orientation") {
996 else if (pdef->
name()->
value() ==
"leading") {
1002 else if (pdef->
name()->
value() ==
"line_height") {
1008 else if (pdef->
name()->
value() ==
"multiselect") {
1014 else if (pdef->
name()->
value() ==
"dragdrop") {
1020 else if (pdef->
name()->
value() ==
"scroll_bar") {
1026 else if (pdef->
name()->
value() ==
"smooth_scroll") {
1032 else if (pdef->
name()->
value() ==
"picture_loc") {
1038 else if (pdef->
name()->
value() ==
"picture_type") {
1044 else if (pdef->
name()->
value() ==
"style") {
1050 else if (pdef->
name()->
value() ==
"align" ||
1051 pdef->
name()->
value() ==
"text_align") {
1055 if (!_stricmp(buf,
"left"))
1057 else if (!_stricmp(buf,
"right"))
1059 else if (!_stricmp(buf,
"center"))
1070 else if (pdef->
name()->
value() ==
"single_line") {
1071 bool single =
false;
1076 else if (pdef->
name()->
value() ==
"bevel_width") {
1082 else if (pdef->
name()->
value() ==
"active") {
1088 else if (pdef->
name()->
value() ==
"animated") {
1094 else if (pdef->
name()->
value() ==
"border") {
1100 else if (pdef->
name()->
value() ==
"drop_shadow") {
1106 else if (pdef->
name()->
value() ==
"show_headings") {
1112 else if (pdef->
name()->
value() ==
"sticky") {
1118 else if (pdef->
name()->
value() ==
"transparent") {
1124 else if (pdef->
name()->
value() ==
"hide_partial") {
1130 else if (pdef->
name()->
value() ==
"num_leds") {
1136 else if (pdef->
name()->
value() ==
"item_style") {
1142 else if (pdef->
name()->
value() ==
"selected_style") {
1148 else if (pdef->
name()->
value() ==
"password") {
1156 else if (pdef->
name()->
value() ==
"layout") {
1159 Print(
"WARNING: layout structure missing in '%s'\n", filename);
1178 bool use_color =
false;
1189 else if (pdef->
name()->
value() ==
"width") {
1193 else if (pdef->
name()->
value() ==
"align") {
1197 if (!_stricmp(buf,
"left"))
1199 else if (!_stricmp(buf,
"right"))
1201 else if (!_stricmp(buf,
"center"))
1210 else if (pdef->
name()->
value() ==
"sort") {
1214 else if (pdef->
name()->
value() ==
"color") {
1221 ctrl->
AddColumn(text, width, align, sort);
1242 if (pdef->
name()->
value() ==
"x_mins" ||
1248 if (pdef->
name()->
value() ==
"y_mins" ||
1254 if (pdef->
name()->
value() ==
"x_weights" ||
1260 if (pdef->
name()->
value() ==
"y_weights" ||