widget texmacs_window_widget (widget wid, tree geom) { int W, H; int w= geometry_w, h= geometry_h; int x= geometry_x, y= geometry_y; bool custom= is_tuple (geom) && N (geom) >= 2; #ifndef QTTEXMACS if (use_side_tools) { w += 200; h += 100; } #endif if (custom) { w= as_int (geom[0]); h= as_int (geom[1]); } gui_root_extents (W, H); W /= PIXEL; H /= PIXEL; if (x < 0) x= W + x + 1 - w; if (y < 0) y= H + y + 1 - h; string name= "TeXmacs"; name= unique_window_name (name); widget win= plain_window_widget (wid, name); SI xx= x * PIXEL, yy= -y * PIXEL; SI ww= w * PIXEL, hh= h * PIXEL; if (!custom) { get_preferred_position (name, xx, yy); get_preferred_size (name, ww, hh); } set_size (win, ww, hh); set_position (win, xx, yy); return win; }
int CL_GUIComponent::get_preferred_height() const { return get_preferred_size().height; }
int CL_GUIThemePart::get_preferred_height() const { return get_preferred_size().height; }
int CL_GUIComponent::get_preferred_width() const { return get_preferred_size().width; }
int CL_GUIThemePart::get_preferred_width() const { return get_preferred_size().width; }