octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FLTK refresh required


From: Michael Goffioul
Subject: Re: FLTK refresh required
Date: Thu, 25 Jul 2013 14:39:19 -0400

On Thu, Jul 25, 2013 at 2:01 PM, Ben Abbott <address@hidden> wrote:

On Jul 25, 2013, at 7:18 PM, Dmitri A. Sergatskov wrote:

> On Thu, Jul 25, 2013 at 10:35 AM, Ben Abbott <address@hidden> wrote:
>
> On Jul 25, 2013, at 3:49 PM, Rik wrote:
>
>
> > octave:2> figure;
> > octave:3> axes
> > octave:4> get (gcf, 'position')
> > ans =
> >
> >   304   215   560   380
> >
> > octave:5> get (0, "defaultfigureposition")
> > ans =
> >
> >   300   200   560   420
> >
> > --Rik
>
> Thanks Rik
>
> On Mac OSX, the width and height are "560 420" in both cases.  I don't know why your height is 380, but as far as I know, it should be 420.
>
> Ben
>
> I just want to confirm that I have essentially the same results as Rik
> (notice differences in x and y position -- not sure if that is of any importance).
> octave:1> graphics_toolkit fltk
> octave:2> figure;
> octave:3> axes
> octave:4> get (gcf, 'position')
> ans =
>
>    300   240   560   380
>
> octave:5> get (0, "defaultfigureposition")
> ans =
>
>    300   200   560   420
>
> Dmitri.

Ok. Thanks.

Can anyone explain why the figure "position" is not equal to the defaultfigureposition under Linux?

This is just a guess, but this might be happening happen:
- octave creates a figure object with the default position
- FLTK backend creates the corresponding window and size it to the figure position
- FLTK backend puts the OpenGL widget *and* the menubar and the statusbar within the allocated window
- because of the height of the menubar and statusbar, the OpenGL widget height is less than the default height from the "position" property
- FLTK event loop processes the move/resize event that is (always) occurring when a window is initially shown
- FLTK backend updates the position property with the real OpenGL widget size

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]