[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overhaul FLTK toolkit resize/redraw functions
From: |
Ben Abbott |
Subject: |
Re: Overhaul FLTK toolkit resize/redraw functions |
Date: |
Tue, 22 Jul 2014 20:27:56 -0400 |
On Jul 22, 2014, at 8:06 PM, Rik <address@hidden> wrote:
> On 07/22/2014 10:01 AM, address@hidden wrote:
>> Subject: Overhaul FLTK toolkit resize/redraw functions
>> From: Andreas Weber <address@hidden>
>> Date: 07/22/2014 10:01 AM
>> To: address@hidden
>> List-Post: <mailto:address@hidden>
>> Precedence: list
>> MIME-Version: 1.0
>> Message-ID: <address@hidden>
>> Content-Type: multipart/mixed;
>> boundary="------------070305070909080306000007"
>> Message: 2
>> Dear maintainers,
>>
>> I tried to overhaul the FLTK resize and redraw functions and want to ask
>> for your optinion and if you could apply the patch and test it a little
>> bit. There are many "std::cout <<" debugging ouputs commented which are
>> of course removed before commit. My aim was:
>>
>> * Avoid redraw of the OpenGL and the plot window if not needed.
>> Moving the mouse priviously caused a redraw of the OpenGL window.
>>
>> * Let FLTK do the resize of the canvas, the menubar and statusbar.
>> This was done by creating a resize_dummy and set this as resizable
>> for the plot_window group. Previously this was done inside draw().
>>
>> * Avoid timing issues with fltk_maxtime (removed) and other hacks.
>> You can use flush is you really need to force a immediate redraw.
>>
>> * Add debug_file output for graphics_toolkit fltk so that
>> drawnow("eps", "gs", false, "sombrero.eps") is possible.
>> This is redundant with "print -color out.eps" and will be removed.
>>
>> * Manually placement of the toolbar is only done once when hiding or
>> showing the menubar. (update_toolbar_position)
>>
>> * set(gcf, "position", [x, y, w, h]) is now handled by
>> figure::properties::ID_POSITION which calls
>> figure_manager::update_position;
>>
>>
>> I want to also list some problems I noticed while testing the changes
>> for the records. (Output of compare_plot_demos is fine so far)
>>
>> * I don't like the "gui_mode" which is the same for all figures.
>> Switching to pan/rotate therefore influences the other figures.
>> I suggest adding a figure property for this. What does ML do?
>> The current approach also makes it difficult to check in
>> DEFUN_DLD (gui_mode..) if the requested rotate+zoom mode is
>> valid (it's not for ndims==2). Until now you could switch to
>> rotate+zoom using the uimenu even for 2D plots.
>>
>> * Save As from the uimenu doesn't work because __uiputfile_fltk__ was
>> moved to private and the path is missing (easy to fix)
>>
>> * The new "legend" can be moved while panning. Try
>> t=linspace(0,6*pi); plot(t, sin(t), ";sin;", t, cos(t), ";cos;")
>> and drag the legend with the mouse.
>>
>>
>> Another idea (independent of the above) was to make a script for testing
>> the FLTK toolkit functions which needs human interaction or judgment.
>> I've attached human_driven_fltk_test.m to give you a rough idea what I
>> was trying to address. But soon I lost my enthusiasm because it creates
>> doubt who will run it. The normal users shouldn't be bothered with this
>> and the core devs know how the toolkit should behave.
>>
>>
>> Any feedback appreciated
>> :-D
> Andy,
>
> Overall I like it. I've been concerned for a while about the performance
> implications of all the refreshes.
>
> Another difference I notice, which should be easy to fix, is that actions
> from the Edit menu do not take effect immediately. One way to get it to take
> effect is to go back to the command line and hit return. The keyboard
> shortcut 'g' and the toolbar at the bottom of the figure both work
> immediately so you could probably just copy whatever strategy was used there.
>
> The legend can be panned separately from rest of the figure because it is
> also implemented as an axes object. However, all axes have the graphics
> property 'tag' set to 'legend'. It should be easy to check if the current
> object is a legend and skip panning.
>
> --Rik
In order to allow objects to be selected, is there a way to turn panning off?
Ben
- Re: Overhaul FLTK toolkit resize/redraw functions, (continued)
Re: Overhaul FLTK toolkit resize/redraw functions, Andreas Weber, 2014/07/26
Re: Overhaul FLTK toolkit resize/redraw functions, Rik, 2014/07/22
- Re: Overhaul FLTK toolkit resize/redraw functions,
Ben Abbott <=