43 :
Window(screen, ax, ay, aw, ah), id(aid), style(s), focus(false), enabled(true),
44 text_align(DT_CENTER), single_line(false), alpha(1),
45 texture(0), back_color(sys_back_color), fore_color(sys_fore_color),
46 parent(pParent), form(0), transparent(false), topmost(true),
47 layout(0), rows(1), cols(1), polys(0), vset(0), mtl(0),
48 fixed_width(0), fixed_height(0), hide_partial(true)
50 ZeroMemory(
tab,
sizeof(
tab));
65 sprintf_s(buf,
"ActiveWindow %d",
id);
179 const std::vector<DWORD>& min_y,
180 const std::vector<float>& weight_x,
181 const std::vector<float>& weight_y)
192 const std::vector<float>& min_y,
193 const std::vector<float>& weight_x,
194 const std::vector<float>& weight_y)
243 if (w < 1 || h < 1 || !
shown)
246 float old_alpha =
alpha;
303 int nverts = (
rows+1) * (cols+1);
318 x_offsets[3] =
rect.
w;
323 y_offsets[3] =
rect.
h;
333 u_offsets[2] = cols==2 ? tex_w : tex_w - (
float)
margins.
right;
334 u_offsets[3] = tex_w;
339 v_offsets[3] = tex_h;
353 for (i = 0; i <=
rows; i++) {
354 for (j = 0; j <=
cols; j++) {
362 vset->
tu[v] = u_offsets[j] / tex_w;
363 vset->
tv[v] = v_offsets[i] / tex_h;
372 polys =
new(__FILE__,__LINE__)
Poly[npolys];
378 for (i = 0; i <
rows; i++) {
379 for (j = 0; j <
cols; j++) {
381 if (i == 1 && j == 1)
389 p->
verts[0] = (i+0)*(cols+1) + j;
390 p->
verts[1] = (i+0)*(cols+1) + j + 1;
391 p->
verts[2] = (i+1)*(cols+1) + j + 1;
392 p->
verts[3] = (i+1)*(cols+1) + j;
467 else if (style & WIN_RAISED_FRAME) {
485 else if (style & WIN_SUNK_FRAME) {
532 label_rect.
x = border_size;
533 label_rect.
y = border_size;
534 label_rect.
w =
rect.
w - border_size * 2;
535 label_rect.
h =
rect.
h - border_size * 2;
545 text_flags = text_flags | DT_SINGLELINE;
584 if (n >= 0 && n < 10)
591 if (n >= 0 && n < 10)
602 if (t &&
text != t) {
606 char* buf =
new(__FILE__,__LINE__)
char[2*len];
620 case 'n': *dst++ =
'\n';
break;
621 case 't': *dst++ =
'\t';
break;
622 default: *dst++ = *src;
break;
647 if (t &&
text != t) {
651 char* buf =
new(__FILE__,__LINE__)
char[2*len];
665 case 'n': *dst++ =
'\n';
break;
666 case 't': *dst++ =
'\t';
break;
667 default: *dst++ = *src;
break;
710 if (a == DT_LEFT || a == DT_RIGHT || a == DT_CENTER)
781 AWMap* map =
new(__FILE__,__LINE__)
AWMap(eid, client, callback);
790 AWMap test(eid, client, 0);