On 27 Nov 2009, at 9:56, Ronald Vink wrote:
> In fluid I can position the mainwindow. The coordinates are in
> the .fl file.
> Code snippet:
> Fl_Window mainWindow {
> label {hello world} open selected
> xywh {111 150 985 690} type Double box UP_BOX labelsize 12
> hotspot
>
> In the generated .cpp file the x and y position coordinates are
> removed.
> Code snippet:
> ReloaderGui::ReloaderGui(int argc, char **argv) {
> { mainWindow = new Fl_Double_Window(985, 690, "hello world");
> mainWindow->box(FL_UP_BOX);
> mainWindow->labelsize(12);
I'd never noticed that before. At a guess, I'd say that it is maybe
doe that way because some WM's will not honour position requests in
the window construction, perhaps?
>
> How can I tell fluid to use the FL_Double_Window constructor with
> x,y,w and h params ?
I'm not sure that you can.
What I do is use the "Extra Code" fields on the C++ tab of the fluid
widget properties, and set "o->position(x1, y1);" to tell fluid to
add an explicit "position" call for this object after it is created
(in fluid "o" always refers to the object itself.)
I guess that'll be what you need to do?
--
Ian
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk