comparison libinterp/corefcn/graphics.in.h @ 19153:52e01aa1fe8b

Overhaul FLTK pan, rotate, zoom * graphics.in.h: add axes properties pan, rotate3d, mouse_wheel_zoom and custom set_pan which disables rotate3d. * graphics.cc: add custom set_rotate3d and link with pan property. Disable rotate3d for 2D plots. * __init_fltk__.cc: replace gui_mode and mouse_wheel_zoom with axes properties pan, rotate3d and mouse_wheel_zoom. Disable pan for legends, move them instead. * __add_default_menu__.m: Add new menu entries for new pan and zoom modes. * findall.m: Update test for added uimenus. Each axes now has its own properties for interactive GUI control of pan, rotate3d and mouse_wheel_zoom. Now it's possible to have several figures and set pan for the 2D plot in figure x and rotate3d for the 3D plot in figure y. There are two new pan modes: "Pan x only" and "Pan y only". The toolbar buttons "P" and "R" set pan and rotate3d for the last clicked axes object or the object below the center of the canvas if none was clicked yet. The legend can now be moved with the mouse.
author Andreas Weber <andy.weber.aw@gmail.com>
date Sun, 27 Jul 2014 22:31:14 +0200
parents df972b9d080a
children a30e1d20fd3c
comparison
equal deleted inserted replaced
19151:4c45986a278e 19153:52e01aa1fe8b
3715 void set_text_child (handle_property& h, const std::string& who, 3715 void set_text_child (handle_property& h, const std::string& who,
3716 const octave_value& v); 3716 const octave_value& v);
3717 3717
3718 void delete_text_child (handle_property& h); 3718 void delete_text_child (handle_property& h);
3719 3719
3720 void set_pan (const octave_value& val)
3721 {
3722 pan.set (val, false, false);
3723 if (pan_is ("on") || pan_is ("xon") || pan_is ("yon"))
3724 rotate3d.set ("off", false, false);
3725 }
3726
3720 // See the genprops.awk script for an explanation of the 3727 // See the genprops.awk script for an explanation of the
3721 // properties declarations. 3728 // properties declarations.
3722 // Programming note: Keep property list sorted if new ones are added. 3729 // Programming note: Keep property list sorted if new ones are added.
3723 3730
3724 BEGIN_PROPERTIES (axes) 3731 BEGIN_PROPERTIES (axes)
3755 radio_property layer u , "{bottom}|top" 3762 radio_property layer u , "{bottom}|top"
3756 // FIXME: should be kind of string array. 3763 // FIXME: should be kind of string array.
3757 any_property linestyleorder S , "-" 3764 any_property linestyleorder S , "-"
3758 double_property linewidth , 0.5 3765 double_property linewidth , 0.5
3759 radio_property minorgridlinestyle , "-|--|{:}|-.|none" 3766 radio_property minorgridlinestyle , "-|--|{:}|-.|none"
3767 double_property mouse_wheel_zoom , 0.05
3760 radio_property nextplot , "add|replacechildren|{replace}" 3768 radio_property nextplot , "add|replacechildren|{replace}"
3761 array_property outerposition u , default_axes_outerposition () 3769 array_property outerposition u , default_axes_outerposition ()
3770 radio_property pan s , "{on}|xon|yon|off"
3762 array_property plotboxaspectratio mu , Matrix (1, 3, 1.0) 3771 array_property plotboxaspectratio mu , Matrix (1, 3, 1.0)
3763 radio_property plotboxaspectratiomode u , "{auto}|manual" 3772 radio_property plotboxaspectratiomode u , "{auto}|manual"
3764 array_property position u , default_axes_position () 3773 array_property position u , default_axes_position ()
3765 radio_property projection , "{orthographic}|perspective" 3774 radio_property projection , "{orthographic}|perspective"
3775 radio_property rotate3d S , "{off}|on"
3766 radio_property tickdir mu , "{in}|out" 3776 radio_property tickdir mu , "{in}|out"
3767 radio_property tickdirmode u , "{auto}|manual" 3777 radio_property tickdirmode u , "{auto}|manual"
3768 array_property ticklength u , default_axes_ticklength () 3778 array_property ticklength u , default_axes_ticklength ()
3769 array_property tightinset r , Matrix (1, 4, 0.0) 3779 array_property tightinset r , Matrix (1, 4, 0.0)
3770 handle_property title SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false) 3780 handle_property title SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)