# HG changeset patch # User John W. Eaton # Date 1320298254 14400 # Node ID 718f78b01de17b46076709ae89b0fff225674192 # Parent 53674ceb913337e03ff3a4610d7f8ee47821e641 allow initial position to be set for fltk windows * __init_fltk__.cc (figure_manager::default_size): Delete. (figure_manager::do_new_window): Get figure position from properties. diff --git a/src/DLD-FUNCTIONS/__init_fltk__.cc b/src/DLD-FUNCTIONS/__init_fltk__.cc --- a/src/DLD-FUNCTIONS/__init_fltk__.cc +++ b/src/DLD-FUNCTIONS/__init_fltk__.cc @@ -1568,13 +1568,19 @@ void do_new_window (figure::properties& fp) { - int x, y, w, h; + int idx = figprops2idx (fp); - int idx = figprops2idx (fp); if (idx >= 0 && windows.find (idx) == windows.end ()) { - default_size (x, y, w, h); + Matrix pos = fp.get_position ().matrix_value (); + + int x = pos(0); + int y = pos(1); + int w = pos(2); + int h = pos(3); + idx2figprops (curr_index , fp); + windows[curr_index++] = new plot_window (x, y, w, h, fp); } } @@ -1679,16 +1685,6 @@ } } - - // FIXME -- default size should be configurable. - void default_size (int& x, int& y, int& w, int& h) - { - x = 0; - y = 0; - w = 640; - h = 480; - } - static int str2idx (const caseless_str clstr) { int ind;