octave-maintainers
[Top][All Lists]
Advanced

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

Overhaul FLTK toolkit resize/redraw functions


From: Andreas Weber
Subject: Overhaul FLTK toolkit resize/redraw functions
Date: Tue, 22 Jul 2014 19:01:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0

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

Attachment: fltk_overhaul.diff
Description: Text Data

Attachment: human_driven_fltk_test.m
Description: Text Data


reply via email to

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