25 #if !defined (octave_graphics_h)
26 #define octave_graphics_h 1
54 #if !defined (OCTAVE_DEFAULT_FONTNAME)
55 #define OCTAVE_DEFAULT_FONTNAME "*"
71 error (
"invalid axis scale");
77 error (
"invalid axis scale");
81 virtual double scale (
double d)
const
83 error (
"invalid axis scale");
89 error (
"invalid axis scale");
142 {
return log10 (d); }
145 {
return pow (10.0, d); }
151 void do_scale (
const double *src,
double *dest,
int n)
const
153 for (
int i = 0; i < n; i++)
154 dest[i] = log10 (src[i]);
182 {
return -log10 (-d); }
185 {
return -
pow (10.0, -d); }
191 void do_scale (
const double *src,
double *dest,
int n)
const
193 for (
int i = 0; i < n; i++)
194 dest[i] = -log10 (-src[i]);
252 else if (s ==
"neglog")
254 else if (s ==
"linear")
307 virtual bool is_radio (
void)
const {
return false; }
316 bool do_notify_toolkit =
true);
320 error (
"get: invalid property \"%s\"",
name.c_str ());
327 error (
"values_as_string: invalid property \"%s\"",
name.c_str ());
328 return std::string ();
333 error (
"values_as_cell: invalid property \"%s\"",
name.c_str ());
359 for (i = 0; i < l.
length (); i++)
361 if (v.internal_rep () == l(i).internal_rep ())
369 for (
int j = i; j < l.
length () - 1; j++)
383 for (
int i = l.
length () - 1; i >= 0 ; i--)
385 for (
int j = 0; j < lp.
length (); j++)
387 if (l(i).internal_rep () == lp(j).internal_rep ())
408 error (
"set: invalid property \"%s\"",
name.c_str ());
414 typedef std::map<listener_mode, octave_value_list>::iterator
416 typedef std::map<listener_mode, octave_value_list>::const_iterator
434 const std::string& val =
"")
467 error (
"set: invalid string property value for \"%s\"",
484 const std::string& val =
"",
const char& sep =
'|',
492 size_t new_pos = val.find_first_of (
separator, pos);
494 if (new_pos == std::string::npos)
500 str.
append (val.substr (pos, new_pos - pos));
507 const Cell& c,
const char& sep =
'|',
516 strings[i] = c(i).string_value ();
521 error (
"set: invalid order property value for \"%s\"",
575 while (pos != std::string::npos)
577 size_t new_pos = new_str.find_first_of (
separator, pos);
579 if (new_pos == std::string::npos)
581 strings.
append (new_str.substr (pos));
585 strings.
append (new_str.substr (pos, new_pos - pos));
593 if (strings[i] !=
str[i])
622 if (!replace && strings[i] !=
str[i])
649 if (strings[i] !=
str[i])
666 error (
"set: invalid string property value for \"%s\"",
685 const std::string& val =
"")
699 std::ostringstream buf;
701 value[i] = buf.str ();
718 value[i] = c(i).string_value ();
721 double d = c(i).double_value ();
725 std::ostringstream buf;
727 value[i] = buf.str ();
795 value[i] = c(i).string_value ();
798 double d = c(i).double_value ();
802 std::ostringstream buf;
804 value[i] = buf.str ();
825 std::ostringstream buf;
827 value[i] = buf.str ();
834 error (
"set: invalid string property value for \"%s\"",
878 error (
"invalid value = %s", val.c_str ());
889 size_t len = val.length ();
891 std::string first_match;
893 for (std::set<caseless_str>::const_iterator p =
possible_vals.begin ();
896 if (p->compare (val, len))
898 if (len == p->length ())
948 const std::string& v)
994 if (s.length () != match.length ())
996 "%s: allowing %s to match %s value %s",
997 "set", s.c_str (),
get_name ().c_str (),
1004 error (
"set: invalid value for radio property \"%s\" (value = %s)",
1008 error (
"set: invalid value for radio property \"%s\"",
1037 error (
"invalid color specification: %s", str.c_str ());
1060 {
return ! (*
this == c); }
1068 for (
int i = 0; i < 3; i++)
1072 error (
"invalid RGB color specification");
1115 const std::string& v)
1145 bool is (
const std::string& v)
const
1151 error (
"color has no rgb value");
1159 error (
"color has no radio value");
1228 error (
"set: invalid value for double property \"%s\"",
1249 const std::string& v)
1279 bool is (
const std::string& v)
const
1293 error (
"%s: property has no radio value");
1409 error (
"invalid value for array property \"%s\"",
1496 if (dv(0) > 1 && dv(1) == 1)
1698 *p = new_gh.
value ();
1703 error (
"children_list::renumber: child not found!");
1726 if (visible_kids.
numel () == new_kids.
numel ())
1738 error (
"set: new children must be a permutation of existing children");
1743 error (
"set: expecting children to be array of graphics handles");
1853 error (
"invalid value for callback property \"%s\"",
1891 {
return rep->
ok (); }
1924 bool do_notify_toolkit =
true)
1925 {
return rep->
set (val, do_run, do_notify_toolkit); }
2061 const std::string&,
bool,
2062 const std::string& =
"")
const
2068 return Matrix (1, 2, 0.0);
2080 return Matrix (1, 2, 0.0);
2095 {
gripe_invalid (
"base_graphics_toolkit::initialize");
return false; }
2119 error (
"%s: invalid graphics toolkit", fname.c_str ());
2172 const std::string& file,
bool mono,
2173 const std::string& debug_file =
"")
const
2293 ::error (
"unable to create gh_manager!");
2316 typedef std::set<std::string>::const_iterator
2319 typedef std::map<std::string, graphics_toolkit>::iterator
2322 typedef std::map<std::string, graphics_toolkit>::const_iterator
2387 std::string name = p->first;
2417 void mark_modified (
void);
2431 void insert_property (
const std::string& name,
property p)
2435 all_props[name] = p;
2454 virtual property get_property (
const caseless_str& pname);
2466 if (children.remove_child (h.
value ()))
2472 children.adopt (h.
value ());
2479 get_boundingbox (
bool =
false,
2481 {
return Matrix (1, 4, 0.0); }
2483 virtual void update_boundingbox (
void);
2485 virtual void update_autopos (
const std::string& elem_type);
2499 return children.get_children ();
2504 return children.get_all ();
2509 return children.get_hidden ();
2521 virtual void update_axis_limits (
const std::string& axis_type)
const;
2523 virtual void update_axis_limits (
const std::string& axis_type,
2526 virtual void delete_children (
bool clear =
false)
2528 children.delete_children (
clear);
2533 children.renumber (old_gh, new_gh);
2562 std::set<std::string> dynamic_property_names (
void)
const;
2564 bool has_dynamic_property (
const std::string& pname);
2575 property get_property_dynamic (
const caseless_str& pname);
2580 static std::set<std::string> core_property_names (
void);
2582 static bool has_core_property (
const caseless_str& pname);
2584 std::set<std::string> all_property_names (
void)
const;
2613 ID_BEINGDELETED = 0,
2615 ID_BUTTONDOWNFCN = 2,
2620 ID_HANDLEVISIBILITY = 7,
2622 ID_INTERRUPTIBLE = 9,
2625 ID_SELECTIONHIGHLIGHT = 12,
2628 ID_UICONTEXTMENU = 15,
2631 ID___MODIFIED__ = 18,
2632 ID___MYHANDLE__ = 19
2645 std::string
get_clipping (
void)
const {
return clipping.current_value (); }
2657 std::string
get_hittest (
void)
const {
return hittest.current_value (); }
2665 std::string
get_selected (
void)
const {
return selected.current_value (); }
2670 std::string
get_tag (
void)
const {
return tag.string_value (); }
2679 std::string
get_visible (
void)
const {
return visible.current_value (); }
2691 if (beingdeleted.set (val,
true))
2702 if (busyaction.set (val,
true))
2713 if (buttondownfcn.set (val,
true))
2724 if (children.set (val,
true))
2735 if (clipping.set (val,
true))
2746 if (createfcn.set (val,
true))
2757 if (deletefcn.set (val,
true))
2768 if (handlevisibility.set (val,
true))
2779 if (hittest.set (val,
true))
2790 if (interruptible.set (val,
true))
2801 if (selected.set (val,
true))
2812 if (selectionhighlight.set (val,
true))
2834 if (userdata.set (val,
true))
2845 if (visible.set (val,
true))
2867 std::map<caseless_str, property, cmp_caseless_str>
all_props;
2871 { insert_property (name,
property (&p,
true)); }
2890 error (
"base_graphics_object::mark_modified: invalid graphics object");
2898 error (
"base_graphics_object::override_defaults: invalid graphics object");
2906 error (
"base_graphics_object::set_from_list: invalid graphics object");
2914 error (
"base_graphics_object::set: invalid graphics object");
2919 error (
"base_graphics_object::set_defaults: invalid graphics object");
2928 error (
"base_graphics_object::get: invalid graphics object");
2939 error (
"base_graphics_object::get: invalid graphics object");
2950 error (
"base_graphics_object::get_defaults: invalid graphics object");
2956 error (
"base_graphics_object::get_factory_defaults: invalid graphics object");
2970 error (
"base_graphics_object::get_parent: invalid graphics object");
2981 error (
"base_graphics_object::get_handle: invalid graphics object");
2991 error (
"base_graphics_object::remove_child: invalid graphics object");
2999 error (
"base_graphics_object::adopt: invalid graphics object");
3007 error (
"base_graphics_object::reparent: invalid graphics object");
3014 std::string msg = (
type () +
"::defaults");
3018 error (
"base_graphics_object::default: invalid graphics object");
3024 error (
"base_graphics_object::get_properties: invalid graphics object");
3031 error (
"base_graphics_object::get_properties: invalid graphics object");
3044 virtual std::string
type (
void)
const
3050 bool isa (
const std::string& go_name)
const
3052 return type () == go_name;
3061 error (
"base_graphics_object::get_toolkit: invalid graphics object");
3082 virtual void remove_all_listeners (
void);
3088 std::string msg = (
type () +
"::reset_default_properties");
3092 error (
"base_graphics_object::default: invalid graphics object");
3107 toolkit_flag =
false;
3152 if (--rep->count == 0)
3164 if (--rep->count == 0)
3172 rep->override_defaults (obj);
3179 rep->set (name, val);
3198 return name.compare (
"default")
3200 : (name.compare (
"factory")
3201 ? get_factory_defaults () : rep->get (name));
3216 return rep->get_default (name);
3221 return rep->get_factory_default (name);
3228 return rep->get_factory_defaults ();
3249 bool isa (
const std::string& go_name)
const {
return rep->isa (go_name); }
3255 return rep->get_properties ();
3258 void update_axis_limits (
const std::string& axis_type)
3263 void update_axis_limits (
const std::string& axis_type,
3266 rep->update_axis_limits (axis_type, h);
3271 std::string
type (
void)
const {
return rep->type (); }
3273 operator bool (
void)
const {
return rep->valid_object (); }
3281 {
return get_properties ().get_alim (); }
3284 {
return get_properties ().get_clim (); }
3287 {
return get_properties ().get_xlim (); }
3290 {
return get_properties ().get_ylim (); }
3293 {
return get_properties ().get_zlim (); }
3295 bool is_aliminclude (
void)
const
3296 {
return get_properties ().is_aliminclude (); }
3298 bool is_climinclude (
void)
const
3299 {
return get_properties ().is_climinclude (); }
3301 bool is_xliminclude (
void)
const
3302 {
return get_properties ().is_xliminclude (); }
3304 bool is_yliminclude (
void)
const
3305 {
return get_properties ().is_yliminclude (); }
3307 bool is_zliminclude (
void)
const
3308 {
return get_properties ().is_zliminclude (); }
3311 {
return get_properties ().is_handle_visible (); }
3317 { rep->add_property_listener (nm, v, mode); }
3319 void delete_property_listener (
const std::string& nm,
const octave_value& v,
3321 { rep->delete_property_listener (nm, v, mode); }
3327 void update (
int id) { rep->update (*
this,
id); }
3330 { rep->reset_default_properties (); }
3346 Matrix get_boundingbox (
bool internal =
false,
3402 static std::set<std::string> core_property_names (
void);
3404 static bool has_core_property (
const caseless_str& pname);
3406 std::set<std::string> all_property_names (
void)
const;
3437 ID_CALLBACKOBJECT = 1000,
3438 ID_COMMANDWINDOWSIZE = 1001,
3439 ID_CURRENTFIGURE = 1002,
3441 ID_DIARYFILE = 1004,
3443 ID_ERRORMESSAGE = 1006,
3444 ID_FIXEDWIDTHFONTNAME = 1007,
3446 ID_FORMATSPACING = 1009,
3448 ID_MONITORPOSITIONS = 1011,
3449 ID_POINTERLOCATION = 1012,
3450 ID_POINTERWINDOW = 1013,
3451 ID_RECURSIONLIMIT = 1014,
3452 ID_SCREENDEPTH = 1015,
3453 ID_SCREENPIXELSPERINCH = 1016,
3454 ID_SCREENSIZE = 1017,
3455 ID_SHOWHIDDENHANDLES = 1018,
3466 std::string
get_diary (
void)
const {
return diary.current_value (); }
3470 bool is_echo (
void)
const {
return echo.is_on (); }
3471 std::string
get_echo (
void)
const {
return echo.current_value (); }
3477 bool format_is (
const std::string& v)
const {
return format.is (v); }
3478 std::string
get_format (
void)
const {
return format.current_value (); }
3502 bool units_is (
const std::string& v)
const {
return units.is (v); }
3503 std::string
get_units (
void)
const {
return units.current_value (); }
3512 if (commandwindowsize.set (val,
true))
3525 if (diary.set (val,
true))
3536 if (diaryfile.set (val,
true))
3547 if (echo.set (val,
true))
3558 if (errormessage.set (val,
true))
3569 if (fixedwidthfontname.set (val,
true))
3580 if (format.set (val,
true))
3591 if (formatspacing.set (val,
true))
3602 if (language.set (val,
true))
3613 if (monitorpositions.set (val,
true))
3624 if (pointerlocation.set (val,
true))
3635 if (pointerwindow.set (val,
true))
3646 if (recursionlimit.set (val,
true))
3657 if (screendepth.set (val,
true))
3668 if (screenpixelsperinch.set (val,
true))
3679 if (screensize.set (val,
true))
3690 if (showhiddenhandles.set (val,
true))
3701 if (units.set (val,
true))
3709 void update_units (
void);
3740 if (name.compare (
"default", 7))
3744 default_properties.set (name.substr (7), value);
3746 xproperties.set (name, value);
3753 if (name.compare (
"default", 7))
3754 return get_default (name.substr (7));
3755 else if (name.compare (
"factory", 7))
3756 return get_factory_default (name.substr (7));
3758 retval = xproperties.get (name);
3765 octave_value retval = default_properties.lookup (name);
3770 retval = factory_properties.lookup (name);
3773 error (
"get: invalid default property '%s'", name.c_str ());
3781 octave_value retval = factory_properties.lookup (name);
3784 error (
"get: invalid factory default property '%s'", name.c_str ());
3791 return default_properties.as_struct (
"default");
3796 return factory_properties.as_struct (
"factory");
3825 integerhandle = val;
3852 error (
"set___graphics_toolkit__: invalid graphics toolkit");
3861 error (
"set___graphics_toolkit__ must be a string");
3866 bool do_notify_toolkit =
true);
3869 bool do_notify_toolkit =
true);
3871 Matrix get_boundingbox (
bool internal =
false,
3874 void set_boundingbox (
const Matrix& bb,
bool internal =
false,
3875 bool do_notify_toolkit =
true);
3877 Matrix map_from_boundingbox (
double x,
double y)
const;
3879 Matrix map_to_boundingbox (
double x,
double y)
const;
3883 void update_paperunits (
const caseless_str& old_paperunits);
3885 std::string get_title (
void)
const;
3924 static std::set<std::string> core_property_names (
void);
3926 static bool has_core_property (
const caseless_str& pname);
3928 std::set<std::string> all_property_names (
void)
const;
3995 ID_BUTTONDOWNFCN = 2001,
3996 ID_CLOSEREQUESTFCN = 2002,
3999 ID_CURRENTAXES = 2005,
4000 ID_CURRENTCHARACTER = 2006,
4001 ID_CURRENTOBJECT = 2007,
4002 ID_CURRENTPOINT = 2008,
4003 ID_DOCKCONTROLS = 2009,
4004 ID_DOUBLEBUFFER = 2010,
4006 ID_INTEGERHANDLE = 2012,
4007 ID_INVERTHARDCOPY = 2013,
4008 ID_KEYPRESSFCN = 2014,
4009 ID_KEYRELEASEFCN = 2015,
4011 ID_MINCOLORMAP = 2017,
4014 ID_NUMBERTITLE = 2020,
4015 ID_OUTERPOSITION = 2021,
4016 ID_PAPERORIENTATION = 2022,
4017 ID_PAPERPOSITION = 2023,
4018 ID_PAPERPOSITIONMODE = 2024,
4019 ID_PAPERSIZE = 2025,
4020 ID_PAPERTYPE = 2026,
4021 ID_PAPERUNITS = 2027,
4023 ID_POINTERSHAPECDATA = 2029,
4024 ID_POINTERSHAPEHOTSPOT = 2030,
4027 ID_RENDERERMODE = 2033,
4029 ID_RESIZEFCN = 2035,
4030 ID_SELECTIONTYPE = 2036,
4033 ID_WINDOWBUTTONDOWNFCN = 2039,
4034 ID_WINDOWBUTTONMOTIONFCN = 2040,
4035 ID_WINDOWBUTTONUPFCN = 2041,
4036 ID_WINDOWKEYPRESSFCN = 2042,
4037 ID_WINDOWKEYRELEASEFCN = 2043,
4038 ID_WINDOWSCROLLWHEELFCN = 2044,
4039 ID_WINDOWSTYLE = 2045,
4041 ID_WVISUALMODE = 2047,
4044 ID_XVISUALMODE = 2050,
4045 ID___ENHANCED__ = 2051,
4046 ID___GRAPHICS_TOOLKIT__ = 2052,
4047 ID___GUIDATA__ = 2053,
4048 ID___PLOT_STREAM__ = 2054
4060 bool color_is (
const std::string& v)
const {
return color.is (v); }
4094 bool menubar_is (
const std::string& v)
const {
return menubar.is (v); }
4095 std::string
get_menubar (
void)
const {
return menubar.current_value (); }
4099 std::string
get_name (
void)
const {
return name.string_value (); }
4101 bool nextplot_is (
const std::string& v)
const {
return nextplot.is (v); }
4102 std::string
get_nextplot (
void)
const {
return nextplot.current_value (); }
4119 bool papertype_is (
const std::string& v)
const {
return papertype.is (v); }
4125 bool pointer_is (
const std::string& v)
const {
return pointer.is (v); }
4126 std::string
get_pointer (
void)
const {
return pointer.current_value (); }
4134 bool renderer_is (
const std::string& v)
const {
return renderer.is (v); }
4135 std::string
get_renderer (
void)
const {
return renderer.current_value (); }
4141 std::string
get_resize (
void)
const {
return resize.current_value (); }
4149 bool toolbar_is (
const std::string& v)
const {
return toolbar.is (v); }
4150 std::string
get_toolbar (
void)
const {
return toolbar.current_value (); }
4152 bool units_is (
const std::string& v)
const {
return units.is (v); }
4153 std::string
get_units (
void)
const {
return units.current_value (); }
4176 std::string
get_wvisual (
void)
const {
return wvisual.string_value (); }
4183 std::string
get_xvisual (
void)
const {
return xvisual.string_value (); }
4202 if (alphamap.set (val,
true))
4213 if (buttondownfcn.set (val,
true))
4224 if (closerequestfcn.set (val,
true))
4235 if (color.set (val,
true))
4246 if (colormap.set (val,
true))
4259 if (currentcharacter.set (val,
true))
4270 if (currentobject.set (val,
true))
4281 if (currentpoint.set (val,
true))
4292 if (dockcontrols.set (val,
true))
4303 if (doublebuffer.set (val,
true))
4314 if (filename.set (val,
true))
4327 if (inverthardcopy.set (val,
true))
4338 if (keypressfcn.set (val,
true))
4349 if (keyreleasefcn.set (val,
true))
4360 if (menubar.set (val,
true))
4371 if (mincolormap.set (val,
true))
4382 if (name.set (val,
true))
4393 if (nextplot.set (val,
true))
4404 if (numbertitle.set (val,
true))
4415 if (paperorientation.set (val,
true))
4417 update_paperorientation ();
4423 void update_paperorientation (
void);
4429 if (paperposition.set (val,
true))
4440 if (paperpositionmode.set (val,
true))
4451 if (papersize.set (val,
true))
4453 update_papersize ();
4459 void update_papersize (
void);
4463 void update_papertype (
void);
4471 if (pointer.set (val,
true))
4482 if (pointershapecdata.set (val,
true))
4493 if (pointershapehotspot.set (val,
true))
4504 if (renderer.set (val,
true))
4515 if (renderermode.set (val,
true))
4526 if (resize.set (val,
true))
4537 if (resizefcn.set (val,
true))
4548 if (selectiontype.set (val,
true))
4559 if (toolbar.set (val,
true))
4572 if (windowbuttondownfcn.set (val,
true))
4583 if (windowbuttonmotionfcn.set (val,
true))
4594 if (windowbuttonupfcn.set (val,
true))
4605 if (windowkeypressfcn.set (val,
true))
4616 if (windowkeyreleasefcn.set (val,
true))
4627 if (windowscrollwheelfcn.set (val,
true))
4638 if (windowstyle.set (val,
true))
4649 if (wvisual.set (val,
true))
4660 if (wvisualmode.set (val,
true))
4671 if (xdisplay.set (val,
true))
4682 if (xvisual.set (val,
true))
4693 if (xvisualmode.set (val,
true))
4704 if (__enhanced__.set (val,
true))
4715 if (__guidata__.set (val,
true))
4726 if (__plot_stream__.set (val,
true))
4737 alphamap.add_constraint (
dim_vector (-1, 1));
4738 colormap.add_constraint (
dim_vector (-1, 3));
4739 outerposition.add_constraint (
dim_vector (1, 4));
4740 paperposition.add_constraint (
dim_vector (1, 4));
4741 papersize.add_constraint (
dim_vector (1, 2));
4742 pointershapecdata.add_constraint (
dim_vector (16, 16));
4743 pointershapehotspot.add_constraint (
dim_vector (1, 2));
4767 xproperties.override_defaults (obj);
4779 if (name.compare (
"default", 7))
4783 default_properties.set (name.substr (7), value);
4785 xproperties.set (name, value);
4792 if (name.compare (
"default", 7))
4793 retval = get_default (name.substr (7));
4795 retval = xproperties.get (name);
4804 return default_properties.as_struct (
"default");
4825 :
xform (xform_eye ()), xform_inv (xform_eye ()),
4826 sx (
"linear"), sy (
"linear"), sz (
"linear"), zlim (1, 2, 0.0)
4834 :
xform (xm), xform_inv (xim), sx (x), sy (y), sz (z), zlim (zl) { }
4837 :
xform (g.
xform), xform_inv (g.xform_inv), sx (g.sx),
4838 sy (g.sy), sz (g.sz), zlim (g.zlim) { }
4856 static Matrix xform_eye (
void);
4859 bool use_scale =
true)
const;
4862 bool use_scale =
true)
const;
4865 {
return untransform (x, y, (zlim(0)+zlim(1))/2, use_scale); }
4873 bool has_z = (m.
columns () > 2);
4875 if (sx.is_linear () && sy.is_linear ()
4876 && (! has_z || sz.is_linear ()))
4883 for (
int i = 0; i < r; i++)
4885 retval(i,0) = sx.scale (m(i,0));
4886 retval(i,1) = sy.scale (m(i,1));
4888 retval(i,2) = sz.scale (m(i,2));
4923 Matrix get_boundingbox (
bool internal =
false,
4925 Matrix get_extent (
bool with_text =
false,
4926 bool only_text_height=
false)
const;
4928 double get_fontsize_points (
double box_pix_height = 0)
const;
4930 void update_boundingbox (
void)
4932 if (units_is (
"normalized"))
4939 void update_camera (
void);
4940 void update_axes_layout (
void);
4941 void update_aspectratios (
void);
4942 void update_transform (
void)
4944 update_aspectratios ();
4946 update_axes_layout ();
4949 void sync_positions (
void);
4951 void update_autopos (
const std::string& elem_type);
4952 void update_xlabel_position (
void);
4953 void update_ylabel_position (
void);
4954 void update_zlabel_position (
void);
4955 void update_title_position (
void);
4958 {
return graphics_xform (x_render, x_render_inv, sx, sy, sz, x_zlim); }
5005 {
return get_transform ().untransform (px, py, (x_zlim(0)+x_zlim(1))/2); }
5008 {
return get_transform ().transform (x, y, z); }
5010 void zoom_about_point (
double x,
double y,
double factor,
5011 bool push_to_zoom_stack =
true);
5013 bool push_to_zoom_stack =
true);
5014 void translate_view (
double x0,
double x1,
double y0,
double y1);
5015 void rotate_view (
double delta_az,
double delta_el);
5017 void clear_zoom_stack (
void);
5021 void update_fontunits (
const caseless_str& old_fontunits);
5032 double xPlane, xPlaneN, yPlane, yPlaneN, zPlane,
zPlaneN;
5033 double xpTick, xpTickN, ypTick, ypTickN, zpTick,
zpTickN;
5087 static std::set<std::string> core_property_names (
void);
5089 static bool has_core_property (
const caseless_str& pname);
5091 std::set<std::string> all_property_names (
void)
const;
5199 ID_ACTIVEPOSITIONPROPERTY = 3000,
5202 ID_AMBIENTLIGHTCOLOR = 3003,
5204 ID_CAMERAPOSITION = 3005,
5205 ID_CAMERAPOSITIONMODE = 3006,
5206 ID_CAMERATARGET = 3007,
5207 ID_CAMERATARGETMODE = 3008,
5208 ID_CAMERAUPVECTOR = 3009,
5209 ID_CAMERAUPVECTORMODE = 3010,
5210 ID_CAMERAVIEWANGLE = 3011,
5211 ID_CAMERAVIEWANGLEMODE = 3012,
5215 ID_COLORORDER = 3016,
5216 ID_CURRENTPOINT = 3017,
5217 ID_DATAASPECTRATIO = 3018,
5218 ID_DATAASPECTRATIOMODE = 3019,
5220 ID_FONTANGLE = 3021,
5223 ID_FONTUNITS = 3024,
5224 ID_FONTWEIGHT = 3025,
5225 ID_GRIDLINESTYLE = 3026,
5226 ID_INTERPRETER = 3027,
5228 ID_LINESTYLEORDER = 3029,
5229 ID_LINEWIDTH = 3030,
5230 ID_MINORGRIDLINESTYLE = 3031,
5232 ID_OUTERPOSITION = 3033,
5233 ID_PLOTBOXASPECTRATIO = 3034,
5234 ID_PLOTBOXASPECTRATIOMODE = 3035,
5236 ID_PROJECTION = 3037,
5238 ID_TICKDIRMODE = 3039,
5239 ID_TICKLENGTH = 3040,
5240 ID_TIGHTINSET = 3041,
5244 ID_XAXISLOCATION = 3045,
5251 ID_XMINORGRID = 3052,
5252 ID_XMINORTICK = 3053,
5255 ID_XTICKLABEL = 3056,
5256 ID_XTICKLABELMODE = 3057,
5257 ID_XTICKMODE = 3058,
5258 ID_YAXISLOCATION = 3059,
5265 ID_YMINORGRID = 3066,
5266 ID_YMINORTICK = 3067,
5269 ID_YTICKLABEL = 3070,
5270 ID_YTICKLABELMODE = 3071,
5271 ID_YTICKMODE = 3072,
5278 ID_ZMINORGRID = 3079,
5279 ID_ZMINORTICK = 3080,
5282 ID_ZTICKLABEL = 3083,
5283 ID_ZTICKLABELMODE = 3084,
5284 ID_ZTICKMODE = 3085,
5285 ID___HOLD_ALL__ = 3086,
5286 ID_AUTOPOS_TAG = 3087,
5287 ID_LOOSEINSET = 3088,
5288 ID_X_VIEWTRANSFORM = 3089,
5289 ID_X_PROJECTIONTRANSFORM = 3090,
5290 ID_X_VIEWPORTTRANSFORM = 3091,
5291 ID_X_NORMRENDERTRANSFORM = 3092,
5292 ID_X_RENDERTRANSFORM = 3093,
5303 bool alimmode_is (
const std::string& v)
const {
return alimmode.is (v); }
5304 std::string
get_alimmode (
void)
const {
return alimmode.current_value (); }
5312 std::string
get_box (
void)
const {
return box.current_value (); }
5336 bool climmode_is (
const std::string& v)
const {
return climmode.is (v); }
5337 std::string
get_climmode (
void)
const {
return climmode.current_value (); }
5340 bool color_is (
const std::string& v)
const {
return color.is (v); }
5353 bool drawmode_is (
const std::string& v)
const {
return drawmode.is (v); }
5354 std::string
get_drawmode (
void)
const {
return drawmode.current_value (); }
5356 bool fontangle_is (
const std::string& v)
const {
return fontangle.is (v); }
5363 bool fontunits_is (
const std::string& v)
const {
return fontunits.is (v); }
5375 bool layer_is (
const std::string& v)
const {
return layer.is (v); }
5376 std::string
get_layer (
void)
const {
return layer.current_value (); }
5385 bool nextplot_is (
const std::string& v)
const {
return nextplot.is (v); }
5386 std::string
get_nextplot (
void)
const {
return nextplot.current_value (); }
5400 bool tickdir_is (
const std::string& v)
const {
return tickdir.is (v); }
5401 std::string
get_tickdir (
void)
const {
return tickdir.current_value (); }
5412 bool units_is (
const std::string& v)
const {
return units.is (v); }
5413 std::string
get_units (
void)
const {
return units.current_value (); }
5421 bool xcolor_is (
const std::string& v)
const {
return xcolor.is (v); }
5425 bool xdir_is (
const std::string& v)
const {
return xdir.is (v); }
5426 std::string
get_xdir (
void)
const {
return xdir.current_value (); }
5429 std::string
get_xgrid (
void)
const {
return xgrid.current_value (); }
5435 bool xlimmode_is (
const std::string& v)
const {
return xlimmode.is (v); }
5436 std::string
get_xlimmode (
void)
const {
return xlimmode.current_value (); }
5444 bool xscale_is (
const std::string& v)
const {
return xscale.is (v); }
5445 std::string
get_xscale (
void)
const {
return xscale.current_value (); }
5454 bool xtickmode_is (
const std::string& v)
const {
return xtickmode.is (v); }
5461 bool ycolor_is (
const std::string& v)
const {
return ycolor.is (v); }
5465 bool ydir_is (
const std::string& v)
const {
return ydir.is (v); }
5466 std::string
get_ydir (
void)
const {
return ydir.current_value (); }
5469 std::string
get_ygrid (
void)
const {
return ygrid.current_value (); }
5475 bool ylimmode_is (
const std::string& v)
const {
return ylimmode.is (v); }
5476 std::string
get_ylimmode (
void)
const {
return ylimmode.current_value (); }
5484 bool yscale_is (
const std::string& v)
const {
return yscale.is (v); }
5485 std::string
get_yscale (
void)
const {
return yscale.current_value (); }
5494 bool ytickmode_is (
const std::string& v)
const {
return ytickmode.is (v); }
5498 bool zcolor_is (
const std::string& v)
const {
return zcolor.is (v); }
5502 bool zdir_is (
const std::string& v)
const {
return zdir.is (v); }
5503 std::string
get_zdir (
void)
const {
return zdir.current_value (); }
5506 std::string
get_zgrid (
void)
const {
return zgrid.current_value (); }
5512 bool zlimmode_is (
const std::string& v)
const {
return zlimmode.is (v); }
5513 std::string
get_zlimmode (
void)
const {
return zlimmode.current_value (); }
5521 bool zscale_is (
const std::string& v)
const {
return zscale.is (v); }
5522 std::string
get_zscale (
void)
const {
return zscale.current_value (); }
5531 bool ztickmode_is (
const std::string& v)
const {
return ztickmode.is (v); }
5563 if (activepositionproperty.set (val,
true))
5574 if (alim.set (val,
false))
5576 set_alimmode (
"manual");
5581 set_alimmode (
"manual");
5589 if (alimmode.set (val,
true))
5600 if (ambientlightcolor.set (val,
true))
5611 if (
box.set (val,
true))
5622 if (cameraposition.set (val,
false))
5624 set_camerapositionmode (
"manual");
5625 cameraposition.run_listeners (
POSTSET);
5629 set_camerapositionmode (
"manual");
5637 if (camerapositionmode.set (val,
true))
5648 if (cameratarget.set (val,
false))
5650 set_cameratargetmode (
"manual");
5651 cameratarget.run_listeners (
POSTSET);
5655 set_cameratargetmode (
"manual");
5663 if (cameratargetmode.set (val,
true))
5674 if (cameraupvector.set (val,
false))
5676 set_cameraupvectormode (
"manual");
5677 cameraupvector.run_listeners (
POSTSET);
5681 set_cameraupvectormode (
"manual");
5689 if (cameraupvectormode.set (val,
true))
5700 if (cameraviewangle.set (val,
false))
5702 set_cameraviewanglemode (
"manual");
5703 cameraviewangle.run_listeners (
POSTSET);
5707 set_cameraviewanglemode (
"manual");
5715 if (cameraviewanglemode.set (val,
true))
5726 if (clim.set (val,
false))
5728 set_climmode (
"manual");
5733 set_climmode (
"manual");
5741 if (climmode.set (val,
false))
5743 update_axis_limits (
"climmode");
5744 climmode.run_listeners (
POSTSET);
5754 if (color.set (val,
true))
5765 if (colororder.set (val,
true))
5776 if (currentpoint.set (val,
true))
5787 if (dataaspectratio.set (val,
false))
5789 set_dataaspectratiomode (
"manual");
5790 update_dataaspectratio ();
5791 dataaspectratio.run_listeners (
POSTSET);
5795 set_dataaspectratiomode (
"manual");
5803 if (dataaspectratiomode.set (val,
true))
5805 update_dataaspectratiomode ();
5815 if (drawmode.set (val,
true))
5826 if (fontangle.set (val,
true))
5828 update_fontangle ();
5838 if (fontname.set (val,
true))
5850 if (fontsize.set (val,
true))
5860 void update_fontunits (
void);
5866 if (fontweight.set (val,
true))
5868 update_fontweight ();
5878 if (gridlinestyle.set (val,
true))
5889 if (interpreter.set (val,
true))
5900 if (layer.set (val,
true))
5914 if (linewidth.set (val,
true))
5925 if (minorgridlinestyle.set (val,
true))
5936 if (nextplot.set (val,
true))
5947 if (outerposition.set (val,
true))
5949 update_outerposition ();
5959 if (plotboxaspectratio.set (val,
false))
5961 set_plotboxaspectratiomode (
"manual");
5962 update_plotboxaspectratio ();
5963 plotboxaspectratio.run_listeners (
POSTSET);
5967 set_plotboxaspectratiomode (
"manual");
5975 if (plotboxaspectratiomode.set (val,
true))
5977 update_plotboxaspectratiomode ();
5987 if (position.set (val,
true))
5999 if (projection.set (val,
true))
6010 if (tickdir.set (val,
false))
6012 set_tickdirmode (
"manual");
6014 tickdir.run_listeners (
POSTSET);
6018 set_tickdirmode (
"manual");
6026 if (tickdirmode.set (val,
true))
6028 update_tickdirmode ();
6038 if (ticklength.set (val,
true))
6040 update_ticklength ();
6050 if (tightinset.set (val,
true))
6061 void update_units (
void);
6067 if (view.set (val,
true))
6079 if (xaxislocation.set (val,
true))
6081 update_xaxislocation ();
6091 if (xcolor.set (val,
true))
6102 if (xdir.set (val,
true))
6114 if (xgrid.set (val,
true))
6127 if (xlim.set (val,
false))
6129 set_xlimmode (
"manual");
6135 set_xlimmode (
"manual");
6143 if (xlimmode.set (val,
false))
6145 update_axis_limits (
"xlimmode");
6146 xlimmode.run_listeners (
POSTSET);
6156 if (xminorgrid.set (val,
true))
6167 if (xminortick.set (val,
true))
6178 if (xscale.set (val,
false))
6181 update_axis_limits (
"xscale");
6182 xscale.run_listeners (
POSTSET);
6192 if (xtick.set (val,
false))
6194 set_xtickmode (
"manual");
6196 xtick.run_listeners (
POSTSET);
6200 set_xtickmode (
"manual");
6210 if (xticklabelmode.set (val,
true))
6212 update_xticklabelmode ();
6222 if (xtickmode.set (val,
true))
6224 update_xtickmode ();
6234 if (yaxislocation.set (val,
true))
6236 update_yaxislocation ();
6246 if (ycolor.set (val,
true))
6257 if (ydir.set (val,
true))
6269 if (ygrid.set (val,
true))
6282 if (ylim.set (val,
false))
6284 set_ylimmode (
"manual");
6290 set_ylimmode (
"manual");
6298 if (ylimmode.set (val,
false))
6300 update_axis_limits (
"ylimmode");
6301 ylimmode.run_listeners (
POSTSET);
6311 if (yminorgrid.set (val,
true))
6322 if (yminortick.set (val,
true))
6333 if (yscale.set (val,
false))
6336 update_axis_limits (
"yscale");
6337 yscale.run_listeners (
POSTSET);
6347 if (ytick.set (val,
false))
6349 set_ytickmode (
"manual");
6351 ytick.run_listeners (
POSTSET);
6355 set_ytickmode (
"manual");
6365 if (yticklabelmode.set (val,
true))
6367 update_yticklabelmode ();
6377 if (ytickmode.set (val,
true))
6379 update_ytickmode ();
6389 if (zcolor.set (val,
true))
6400 if (zdir.set (val,
true))
6412 if (zgrid.set (val,
true))
6425 if (zlim.set (val,
false))
6427 set_zlimmode (
"manual");
6433 set_zlimmode (
"manual");
6441 if (zlimmode.set (val,
false))
6443 update_axis_limits (
"zlimmode");
6444 zlimmode.run_listeners (
POSTSET);
6454 if (zminorgrid.set (val,
true))
6465 if (zminortick.set (val,
true))
6476 if (zscale.set (val,
false))
6479 update_axis_limits (
"zscale");
6480 zscale.run_listeners (
POSTSET);
6490 if (ztick.set (val,
false))
6492 set_ztickmode (
"manual");
6494 ztick.run_listeners (
POSTSET);
6498 set_ztickmode (
"manual");
6508 if (zticklabelmode.set (val,
true))
6510 update_zticklabelmode ();
6520 if (ztickmode.set (val,
true))
6522 update_ztickmode ();
6532 if (__hold_all__.set (val,
true))
6543 if (autopos_tag.set (val,
true))
6554 if (looseinset.set (val,
true))
6556 update_looseinset ();
6566 if (x_viewtransform.set (val,
true))
6577 if (x_projectiontransform.set (val,
true))
6588 if (x_viewporttransform.set (val,
true))
6599 if (x_normrendertransform.set (val,
true))
6610 if (x_rendertransform.set (val,
true))
6621 if (xmtick.set (val,
true))
6632 if (ymtick.set (val,
true))
6643 if (zmtick.set (val,
true))
6659 std::string retval =
scale;
6661 if (scale ==
"log" && lims.
numel () > 1 && lims(0) < 0 && lims(1) < 0)
6667 void update_xscale (
void)
6669 sx = get_scale (get_xscale (), xlim.get ().matrix_value ());
6672 void update_yscale (
void)
6674 sy = get_scale (get_yscale (), ylim.get ().matrix_value ());
6677 void update_zscale (
void)
6679 sz = get_scale (get_zscale (), zlim.get ().matrix_value ());
6689 void update_yaxislocation (
void)
6691 update_axes_layout ();
6692 update_ylabel_position ();
6694 void update_xaxislocation (
void)
6696 update_axes_layout ();
6697 update_xlabel_position ();
6704 void update_ticklength (
void);
6708 void update_xtick (
void)
6710 if (xticklabelmode.is (
"auto"))
6711 calc_ticklabels (xtick, xticklabel, xscale.is (
"log"));
6713 void update_ytick (
void)
6715 if (yticklabelmode.is (
"auto"))
6716 calc_ticklabels (ytick, yticklabel, yscale.is (
"log"));
6718 void update_ztick (
void)
6720 if (zticklabelmode.is (
"auto"))
6721 calc_ticklabels (ztick, zticklabel, zscale.is (
"log"));
6724 void update_xtickmode (
void)
6726 if (xtickmode.is (
"auto"))
6728 calc_ticks_and_lims (xlim, xtick, xmtick, xlimmode.is (
"auto"),
6733 void update_ytickmode (
void)
6735 if (ytickmode.is (
"auto"))
6737 calc_ticks_and_lims (ylim, ytick, ymtick, ylimmode.is (
"auto"),
6742 void update_ztickmode (
void)
6744 if (ztickmode.is (
"auto"))
6746 calc_ticks_and_lims (zlim, ztick, zmtick, zlimmode.is (
"auto"),
6752 void update_xticklabelmode (
void)
6754 if (xticklabelmode.is (
"auto"))
6755 calc_ticklabels (xtick, xticklabel, xscale.is (
"log"));
6757 void update_yticklabelmode (
void)
6759 if (yticklabelmode.is (
"auto"))
6760 calc_ticklabels (ytick, yticklabel, yscale.is (
"log"));
6762 void update_zticklabelmode (
void)
6764 if (zticklabelmode.is (
"auto"))
6765 calc_ticklabels (ztick, zticklabel, zscale.is (
"log"));
6768 void update_font (
void);
6774 void update_outerposition (
void)
6776 set_activepositionproperty (
"outerposition");
6778 set_units (
"normalized");
6779 Matrix outerbox = outerposition.get ().matrix_value ();
6780 Matrix innerbox = position.get ().matrix_value ();
6781 Matrix linset = looseinset.get ().matrix_value ();
6782 Matrix tinset = tightinset.get ().matrix_value ();
6783 outerbox(2) = outerbox(2) + outerbox(0);
6784 outerbox(3) = outerbox(3) + outerbox(1);
6785 innerbox(0) = outerbox(0) +
std::max (linset(0), tinset(0));
6786 innerbox(1) = outerbox(1) +
std::max (linset(1), tinset(1));
6787 innerbox(2) = outerbox(2) -
std::max (linset(2), tinset(2));
6788 innerbox(3) = outerbox(3) -
std::max (linset(3), tinset(3));
6789 innerbox(2) = innerbox(2) - innerbox(0);
6790 innerbox(3) = innerbox(3) - innerbox(1);
6791 position = innerbox;
6792 set_units (old_units);
6793 update_transform ();
6796 void update_position (
void)
6798 set_activepositionproperty (
"position");
6800 set_units (
"normalized");
6801 Matrix outerbox = outerposition.get ().matrix_value ();
6802 Matrix innerbox = position.get ().matrix_value ();
6803 Matrix linset = looseinset.get ().matrix_value ();
6804 Matrix tinset = tightinset.get ().matrix_value ();
6805 innerbox(2) = innerbox(2) + innerbox(0);
6806 innerbox(3) = innerbox(3) + innerbox(1);
6807 outerbox(0) = innerbox(0) -
std::max (linset(0), tinset(0));
6808 outerbox(1) = innerbox(1) -
std::max (linset(1), tinset(1));
6809 outerbox(2) = innerbox(2) +
std::max (linset(2), tinset(2));
6810 outerbox(3) = innerbox(3) +
std::max (linset(3), tinset(3));
6811 outerbox(2) = outerbox(2) - outerbox(0);
6812 outerbox(3) = outerbox(3) - outerbox(1);
6813 outerposition = outerbox;
6814 set_units (old_units);
6815 update_transform ();
6818 void update_looseinset (
void)
6821 set_units (
"normalized");
6822 Matrix innerbox = position.get ().matrix_value ();
6823 innerbox(2) = innerbox(2) + innerbox(0);
6824 innerbox(3) = innerbox(3) + innerbox(1);
6825 Matrix outerbox = outerposition.get ().matrix_value ();
6826 outerbox(2) = outerbox(2) + outerbox(0);
6827 outerbox(3) = outerbox(3) + outerbox(1);
6828 Matrix linset = looseinset.get ().matrix_value ();
6829 Matrix tinset = tightinset.get ().matrix_value ();
6830 if (activepositionproperty.is (
"position"))
6832 outerbox(0) = innerbox(0) -
std::max (linset(0), tinset(0));
6833 outerbox(1) = innerbox(1) -
std::max (linset(1), tinset(1));
6834 outerbox(2) = innerbox(2) +
std::max (linset(2), tinset(2));
6835 outerbox(3) = innerbox(3) +
std::max (linset(3), tinset(3));
6836 outerbox(2) = outerbox(2) - outerbox(0);
6837 outerbox(3) = outerbox(3) - outerbox(1);
6838 outerposition = outerbox;
6842 innerbox(0) = outerbox(0) +
std::max (linset(0), tinset(0));
6843 innerbox(1) = outerbox(1) +
std::max (linset(1), tinset(1));
6844 innerbox(2) = outerbox(2) -
std::max (linset(2), tinset(2));
6845 innerbox(3) = outerbox(3) -
std::max (linset(3), tinset(3));
6846 innerbox(2) = innerbox(2) - innerbox(0);
6847 innerbox(3) = innerbox(3) - innerbox(1);
6848 position = innerbox;
6850 set_units (old_units);
6851 update_transform ();
6854 double calc_tick_sep (
double minval,
double maxval);
6857 bool limmode_is_auto,
bool is_logscale);
6876 else if (l(0) == l(1))
6888 double min_pos,
double max_neg,
6891 void update_xlim (
bool do_clr_zoom =
true)
6893 if (xtickmode.is (
"auto"))
6894 calc_ticks_and_lims (xlim, xtick, xmtick, xlimmode.is (
"auto"),
6896 if (xticklabelmode.is (
"auto"))
6897 calc_ticklabels (xtick, xticklabel, xscale.is (
"log"));
6904 zoom_stack.clear ();
6906 update_axes_layout ();
6909 void update_ylim (
bool do_clr_zoom =
true)
6911 if (ytickmode.is (
"auto"))
6912 calc_ticks_and_lims (ylim, ytick, ymtick, ylimmode.is (
"auto"),
6914 if (yticklabelmode.is (
"auto"))
6915 calc_ticklabels (ytick, yticklabel, yscale.is (
"log"));
6922 zoom_stack.clear ();
6924 update_axes_layout ();
6927 void update_zlim (
void)
6929 if (ztickmode.is (
"auto"))
6930 calc_ticks_and_lims (zlim, ztick, zmtick, zlimmode.is (
"auto"),
6932 if (zticklabelmode.is (
"auto"))
6933 calc_ticklabels (ztick, zticklabel, zscale.is (
"log"));
6939 zoom_stack.clear ();
6941 update_axes_layout ();
6954 xproperties.update_transform ();
6963 xproperties.override_defaults (obj);
6975 if (name.compare (
"default", 7))
6979 default_properties.set (name.substr (7), value);
6981 xproperties.set (name, value);
6984 void set_defaults (
const std::string& mode)
6986 remove_all_listeners ();
6987 xproperties.set_defaults (*
this, mode);
6995 if (name.compare (
"default", 7))
6996 retval = get_default (name.substr (7));
6998 retval = xproperties.get (name);
7007 return default_properties.as_struct (
"default");
7075 static std::set<std::string> core_property_names (
void);
7077 static bool has_core_property (
const caseless_str& pname);
7079 std::set<std::string> all_property_names (
void)
const;
7113 ID_DISPLAYNAME = 4001,
7114 ID_ERASEMODE = 4002,
7115 ID_INTERPRETER = 4003,
7116 ID_LINESTYLE = 4004,
7117 ID_LINEWIDTH = 4005,
7119 ID_MARKEREDGECOLOR = 4007,
7120 ID_MARKERFACECOLOR = 4008,
7121 ID_MARKERSIZE = 4009,
7123 ID_XDATASOURCE = 4011,
7125 ID_YDATASOURCE = 4013,
7127 ID_ZDATASOURCE = 4015,
7131 ID_XLIMINCLUDE = 4019,
7132 ID_YLIMINCLUDE = 4020,
7133 ID_ZLIMINCLUDE = 4021
7137 bool color_is (
const std::string& v)
const {
return color.is (v); }
7143 bool erasemode_is (
const std::string& v)
const {
return erasemode.is (v); }
7149 bool linestyle_is (
const std::string& v)
const {
return linestyle.is (v); }
7154 bool marker_is (
const std::string& v)
const {
return marker.is (v); }
7155 std::string
get_marker (
void)
const {
return marker.current_value (); }
7201 if (color.set (val,
true))
7212 if (displayname.set (val,
true))
7223 if (erasemode.set (val,
true))
7234 if (interpreter.set (val,
true))
7245 if (linestyle.set (val,
true))
7256 if (linewidth.set (val,
true))
7267 if (marker.set (val,
true))
7278 if (markeredgecolor.set (val,
true))
7289 if (markerfacecolor.set (val,
true))
7300 if (markersize.set (val,
true))
7311 if (xdata.set (val,
true))
7323 if (xdatasource.set (val,
true))
7334 if (ydata.set (val,
true))
7346 if (ydatasource.set (val,
true))
7357 if (zdata.set (val,
true))
7369 if (zdatasource.set (val,
true))
7380 if (xlim.set (val,
false))
7382 update_axis_limits (
"xlim");
7393 if (ylim.set (val,
false))
7395 update_axis_limits (
"ylim");
7406 if (zlim.set (val,
false))
7408 update_axis_limits (
"zlim");
7419 if (xliminclude.set (val,
false))
7421 update_axis_limits (
"xliminclude");
7422 xliminclude.run_listeners (
POSTSET);
7432 if (yliminclude.set (val,
false))
7434 update_axis_limits (
"yliminclude");
7435 yliminclude.run_listeners (
POSTSET);
7445 if (zliminclude.set (val,
false))
7447 update_axis_limits (
"zliminclude");
7448 zliminclude.run_listeners (
POSTSET);
7456 Matrix compute_xlim (
void)
const;
7457 Matrix compute_ylim (
void)
const;
7463 void update_zdata (
void)
7465 set_zlim (zdata.get_limits ());
7466 set_zliminclude (get_zdata ().numel () > 0);
7497 double get_fontsize_points (
double box_pix_height = 0)
const;
7505 if (new_val.
numel () == 2)
7509 new_val = new_val.
resize (dv,
true);
7512 if (position.set (new_val,
false))
7514 set_positionmode (
"manual");
7516 position.run_listeners (
POSTSET);
7520 set_positionmode (
"manual");
7560 static std::set<std::string> core_property_names (
void);
7562 static bool has_core_property (
const caseless_str& pname);
7564 std::set<std::string> all_property_names (
void)
const;
7608 ID_BACKGROUNDCOLOR = 5000,
7610 ID_DISPLAYNAME = 5002,
7611 ID_EDGECOLOR = 5003,
7613 ID_ERASEMODE = 5005,
7615 ID_FONTANGLE = 5007,
7618 ID_FONTUNITS = 5010,
7619 ID_FONTWEIGHT = 5011,
7620 ID_HORIZONTALALIGNMENT = 5012,
7621 ID_INTERPRETER = 5013,
7622 ID_LINESTYLE = 5014,
7623 ID_LINEWIDTH = 5015,
7629 ID_VERTICALALIGNMENT = 5021,
7633 ID_XLIMINCLUDE = 5025,
7634 ID_YLIMINCLUDE = 5026,
7635 ID_ZLIMINCLUDE = 5027,
7636 ID_POSITIONMODE = 5028,
7637 ID_ROTATIONMODE = 5029,
7638 ID_HORIZONTALALIGNMENTMODE = 5030,
7639 ID_VERTICALALIGNMENTMODE = 5031,
7640 ID_AUTOPOS_TAG = 5032
7649 bool color_is (
const std::string& v)
const {
return color.is (v); }
7656 bool edgecolor_is (
const std::string& v)
const {
return edgecolor.is (v); }
7661 std::string
get_editing (
void)
const {
return editing.current_value (); }
7663 bool erasemode_is (
const std::string& v)
const {
return erasemode.is (v); }
7668 bool fontangle_is (
const std::string& v)
const {
return fontangle.is (v); }
7675 bool fontunits_is (
const std::string& v)
const {
return fontunits.is (v); }
7687 bool linestyle_is (
const std::string& v)
const {
return linestyle.is (v); }
7692 double get_margin (
void)
const {
return margin.double_value (); }
7700 bool units_is (
const std::string& v)
const {
return units.is (v); }
7701 std::string
get_units (
void)
const {
return units.current_value (); }
7741 if (backgroundcolor.set (val,
true))
7752 if (color.set (val,
true))
7764 if (displayname.set (val,
true))
7775 if (edgecolor.set (val,
true))
7786 if (editing.set (val,
true))
7797 if (erasemode.set (val,
true))
7808 if (extent.set (val,
true))
7819 if (fontangle.set (val,
true))
7821 update_fontangle ();
7831 if (fontname.set (val,
true))
7843 if (fontsize.set (val,
true))
7855 if (fontunits.set (val,
true))
7866 if (fontweight.set (val,
true))
7868 update_fontweight ();
7878 if (horizontalalignment.set (val,
false))
7880 set_horizontalalignmentmode (
"manual");
7881 update_horizontalalignment ();
7882 horizontalalignment.run_listeners (
POSTSET);
7886 set_horizontalalignmentmode (
"manual");
7894 if (interpreter.set (val,
true))
7896 update_interpreter ();
7906 if (linestyle.set (val,
true))
7917 if (linewidth.set (val,
true))
7928 if (margin.set (val,
true))
7939 if (rotation.set (val,
false))
7941 set_rotationmode (
"manual");
7943 rotation.run_listeners (
POSTSET);
7947 set_rotationmode (
"manual");
7955 if (
string.
set (val,
true))
7967 if (units.set (val,
true))
7979 if (verticalalignment.set (val,
false))
7981 set_verticalalignmentmode (
"manual");
7982 update_verticalalignment ();
7983 verticalalignment.run_listeners (
POSTSET);
7987 set_verticalalignmentmode (
"manual");
7995 if (xlim.set (val,
false))
7997 update_axis_limits (
"xlim");
8008 if (ylim.set (val,
false))
8010 update_axis_limits (
"ylim");
8021 if (zlim.set (val,
false))
8023 update_axis_limits (
"zlim");
8034 if (xliminclude.set (val,
false))
8036 update_axis_limits (
"xliminclude");
8037 xliminclude.run_listeners (
POSTSET);
8047 if (yliminclude.set (val,
false))
8049 update_axis_limits (
"yliminclude");
8050 yliminclude.run_listeners (
POSTSET);
8060 if (zliminclude.set (val,
false))
8062 update_axis_limits (
"zliminclude");
8063 zliminclude.run_listeners (
POSTSET);
8073 if (positionmode.set (val,
true))
8075 update_positionmode ();
8085 if (rotationmode.set (val,
true))
8087 update_rotationmode ();
8097 if (horizontalalignmentmode.set (val,
true))
8099 update_horizontalalignmentmode ();
8109 if (verticalalignmentmode.set (val,
true))
8111 update_verticalalignmentmode ();
8121 if (autopos_tag.set (val,
true))
8129 Matrix get_data_position (
void)
const;
8130 Matrix get_extent_matrix (
void)
const;
8141 cached_units = get_units ();
8146 void update_position (
void)
8148 Matrix pos = get_data_position ();
8151 lim =
Matrix (1, 3, pos(0));
8152 lim(2) = (lim(2) <= 0 ?
octave_Inf : lim(2));
8155 lim =
Matrix (1, 3, pos(1));
8156 lim(2) = (lim(2) <= 0 ?
octave_Inf : lim(2));
8159 if (pos.
numel () == 3)
8161 lim =
Matrix (1, 3, pos(2));
8162 lim(2) = (lim(2) <= 0 ?
octave_Inf : lim(2));
8163 set_zliminclude (
"on");
8167 set_zliminclude (
"off");
8170 void update_text_extent (
void);
8172 void request_autopos (
void);
8178 void update_font (
void);
8190 void update_units (
void);
8204 xproperties.set_clipping (
"off");
8225 bool is_aliminclude (
void)
const
8226 {
return (aliminclude.is_on () && alphadatamapping.is (
"scaled")); }
8227 std::string get_aliminclude (
void)
const
8228 {
return aliminclude.current_value (); }
8230 bool is_climinclude (
void)
const
8231 {
return (climinclude.is_on () && cdatamapping.is (
"scaled")); }
8232 std::string get_climinclude (
void)
const
8233 {
return climinclude.current_value (); }
8274 static std::set<std::string> core_property_names (
void);
8276 static bool has_core_property (
const caseless_str& pname);
8278 std::set<std::string> all_property_names (
void)
const;
8304 ID_ALPHADATA = 6000,
8305 ID_ALPHADATAMAPPING = 6001,
8307 ID_CDATAMAPPING = 6003,
8308 ID_ERASEMODE = 6004,
8315 ID_ALIMINCLUDE = 6011,
8316 ID_CLIMINCLUDE = 6012,
8317 ID_XLIMINCLUDE = 6013,
8318 ID_YLIMINCLUDE = 6014
8331 bool erasemode_is (
const std::string& v)
const {
return erasemode.is (v); }
8357 if (alphadata.set (val,
true))
8359 update_alphadata ();
8369 if (alphadatamapping.set (val,
false))
8371 update_axis_limits (
"alphadatamapping");
8372 alphadatamapping.run_listeners (
POSTSET);
8382 if (cdata.set (val,
true))
8394 if (cdatamapping.set (val,
false))
8396 update_axis_limits (
"cdatamapping");
8397 cdatamapping.run_listeners (
POSTSET);
8407 if (erasemode.set (val,
true))
8418 if (xdata.set (val,
true))
8430 if (ydata.set (val,
true))
8442 if (alim.set (val,
false))
8444 update_axis_limits (
"alim");
8455 if (clim.set (val,
false))
8457 update_axis_limits (
"clim");
8468 if (xlim.set (val,
false))
8470 update_axis_limits (
"xlim");
8481 if (ylim.set (val,
false))
8483 update_axis_limits (
"ylim");
8494 if (aliminclude.set (val,
false))
8496 update_axis_limits (
"aliminclude");
8497 aliminclude.run_listeners (
POSTSET);
8507 if (climinclude.set (val,
false))
8509 update_axis_limits (
"climinclude");
8510 climinclude.run_listeners (
POSTSET);
8520 if (xliminclude.set (val,
false))
8522 update_axis_limits (
"xliminclude");
8523 xliminclude.run_listeners (
POSTSET);
8533 if (yliminclude.set (val,
false))
8535 update_axis_limits (
"yliminclude");
8536 yliminclude.run_listeners (
POSTSET);
8546 xdata.add_constraint (2);
8547 ydata.add_constraint (2);
8548 cdata.add_constraint (
"double");
8549 cdata.add_constraint (
"single");
8550 cdata.add_constraint (
"logical");
8551 cdata.add_constraint (
"uint8");
8552 cdata.add_constraint (
"uint16");
8553 cdata.add_constraint (
"int16");
8554 cdata.add_constraint (
"real");
8556 cdata.add_constraint (
dim_vector (-1, -1, 3));
8557 alphadata.add_constraint (
dim_vector (-1, -1));
8558 alphadata.add_constraint (
"double");
8559 alphadata.add_constraint (
"uint8");
8563 void update_alphadata (
void)
8565 if (alphadatamapping_is (
"scaled"))
8566 set_alim (alphadata.get_limits ());
8568 alim = alphadata.get_limits ();
8571 void update_cdata (
void)
8573 if (cdatamapping_is (
"scaled"))
8574 set_clim (cdata.get_limits ());
8576 clim = cdata.get_limits ();
8579 void update_xdata (
void)
8581 Matrix limits = xdata.get_limits ();
8582 float dp = pixel_xsize ();
8584 limits(0) = limits(0) - dp;
8585 limits(1) = limits(1) + dp;
8589 void update_ydata (
void)
8591 Matrix limits = ydata.get_limits ();
8592 float dp = pixel_ysize ();
8594 limits(0) = limits(0) - dp;
8595 limits(1) = limits(1) + dp;
8604 if (l > 0 && limits(0) != limits(1))
8605 dp = (limits(1) - limits(0))/(2*l);
8608 if (limits(1) == limits(2))
8611 dp = (limits(1) - limits(0))/2;
8617 float pixel_xsize (
void)
8619 return pixel_size ((get_cdata ().dims ())(1), xdata.get_limits ());
8622 float pixel_ysize (
void)
8624 return pixel_size ((get_cdata ().dims ())(0), ydata.get_limits ());
8657 bool is_aliminclude (
void)
const
8658 {
return (aliminclude.is_on () && alphadatamapping.is (
"scaled")); }
8659 std::string get_aliminclude (
void)
const
8660 {
return aliminclude.current_value (); }
8662 bool is_climinclude (
void)
const
8663 {
return (climinclude.is_on () && cdatamapping.is (
"scaled")); }
8664 std::string get_climinclude (
void)
const
8665 {
return climinclude.current_value (); }
8704 static std::set<std::string> core_property_names (
void);
8706 static bool has_core_property (
const caseless_str& pname);
8708 std::set<std::string> all_property_names (
void)
const;
8762 ID_ALPHADATAMAPPING = 7000,
8763 ID_AMBIENTSTRENGTH = 7001,
8764 ID_BACKFACELIGHTING = 7002,
8766 ID_CDATAMAPPING = 7004,
8767 ID_DIFFUSESTRENGTH = 7005,
8768 ID_DISPLAYNAME = 7006,
8769 ID_EDGEALPHA = 7007,
8770 ID_EDGECOLOR = 7008,
8771 ID_EDGELIGHTING = 7009,
8772 ID_ERASEMODE = 7010,
8773 ID_FACEALPHA = 7011,
8774 ID_FACECOLOR = 7012,
8775 ID_FACELIGHTING = 7013,
8777 ID_FACEVERTEXALPHADATA = 7015,
8778 ID_FACEVERTEXCDATA = 7016,
8779 ID_INTERPRETER = 7017,
8780 ID_LINESTYLE = 7018,
8781 ID_LINEWIDTH = 7019,
8783 ID_MARKEREDGECOLOR = 7021,
8784 ID_MARKERFACECOLOR = 7022,
8785 ID_MARKERSIZE = 7023,
8786 ID_NORMALMODE = 7024,
8787 ID_SPECULARCOLORREFLECTANCE = 7025,
8788 ID_SPECULAREXPONENT = 7026,
8789 ID_SPECULARSTRENGTH = 7027,
8790 ID_VERTEXNORMALS = 7028,
8800 ID_ALIMINCLUDE = 7038,
8801 ID_CLIMINCLUDE = 7039,
8802 ID_XLIMINCLUDE = 7040,
8803 ID_YLIMINCLUDE = 7041,
8804 ID_ZLIMINCLUDE = 7042
8825 bool edgealpha_is (
const std::string& v)
const {
return edgealpha.is (v); }
8830 bool edgecolor_is (
const std::string& v)
const {
return edgecolor.is (v); }
8837 bool erasemode_is (
const std::string& v)
const {
return erasemode.is (v); }
8841 bool facealpha_is (
const std::string& v)
const {
return facealpha.is (v); }
8846 bool facecolor_is (
const std::string& v)
const {
return facecolor.is (v); }
8862 bool linestyle_is (
const std::string& v)
const {
return linestyle.is (v); }
8867 bool marker_is (
const std::string& v)
const {
return marker.is (v); }
8868 std::string
get_marker (
void)
const {
return marker.current_value (); }
8925 if (alphadatamapping.set (val,
false))
8927 update_axis_limits (
"alphadatamapping");
8928 alphadatamapping.run_listeners (
POSTSET);
8938 if (ambientstrength.set (val,
true))
8949 if (backfacelighting.set (val,
true))
8960 if (cdata.set (val,
true))
8972 if (cdatamapping.set (val,
false))
8974 update_axis_limits (
"cdatamapping");
8975 cdatamapping.run_listeners (
POSTSET);
8985 if (diffusestrength.set (val,
true))
8996 if (displayname.set (val,
true))
9007 if (edgealpha.set (val,
true))
9018 if (edgecolor.set (val,
true))
9029 if (edgelighting.set (val,
true))
9040 if (erasemode.set (val,
true))
9051 if (facealpha.set (val,
true))
9062 if (facecolor.set (val,
true))
9073 if (facelighting.set (val,
true))
9084 if (faces.set (val,
true))
9095 if (facevertexalphadata.set (val,
true))
9106 if (facevertexcdata.set (val,
true))
9117 if (interpreter.set (val,
true))
9128 if (linestyle.set (val,
true))
9139 if (linewidth.set (val,
true))
9150 if (marker.set (val,
true))
9161 if (markeredgecolor.set (val,
true))
9172 if (markerfacecolor.set (val,
true))
9183 if (markersize.set (val,
true))
9194 if (normalmode.set (val,
true))
9205 if (specularcolorreflectance.set (val,
true))
9216 if (specularexponent.set (val,
true))
9227 if (specularstrength.set (val,
true))
9238 if (vertexnormals.set (val,
true))
9249 if (vertices.set (val,
true))
9260 if (xdata.set (val,
true))
9272 if (ydata.set (val,
true))
9284 if (zdata.set (val,
true))
9296 if (alim.set (val,
false))
9298 update_axis_limits (
"alim");
9309 if (clim.set (val,
false))
9311 update_axis_limits (
"clim");
9322 if (xlim.set (val,
false))
9324 update_axis_limits (
"xlim");
9335 if (ylim.set (val,
false))
9337 update_axis_limits (
"ylim");
9348 if (zlim.set (val,
false))
9350 update_axis_limits (
"zlim");
9361 if (aliminclude.set (val,
false))
9363 update_axis_limits (
"aliminclude");
9364 aliminclude.run_listeners (
POSTSET);
9374 if (climinclude.set (val,
false))
9376 update_axis_limits (
"climinclude");
9377 climinclude.run_listeners (
POSTSET);
9387 if (xliminclude.set (val,
false))
9389 update_axis_limits (
"xliminclude");
9390 xliminclude.run_listeners (
POSTSET);
9400 if (yliminclude.set (val,
false))
9402 update_axis_limits (
"yliminclude");
9403 yliminclude.run_listeners (
POSTSET);
9413 if (zliminclude.set (val,
false))
9415 update_axis_limits (
"zliminclude");
9416 zliminclude.run_listeners (
POSTSET);
9430 vertices.add_constraint (
dim_vector (-1, 2));
9431 vertices.add_constraint (
dim_vector (-1, 3));
9433 cdata.add_constraint (
dim_vector (-1, -1, 3));
9434 facevertexcdata.add_constraint (
dim_vector (-1, 1));
9435 facevertexcdata.add_constraint (
dim_vector (-1, 3));
9436 facevertexalphadata.add_constraint (
dim_vector (-1, 1));
9437 vertexnormals.add_constraint (
dim_vector (-1, -1));
9445 void update_cdata (
void)
9447 if (cdatamapping_is (
"scaled"))
9448 set_clim (cdata.get_limits ());
9450 clim = cdata.get_limits ();
9483 bool is_aliminclude (
void)
const
9484 {
return (aliminclude.is_on () && alphadatamapping.is (
"scaled")); }
9485 std::string get_aliminclude (
void)
const
9486 {
return aliminclude.current_value (); }
9488 bool is_climinclude (
void)
const
9489 {
return (climinclude.is_on () && cdatamapping.is (
"scaled")); }
9490 std::string get_climinclude (
void)
const
9491 {
return climinclude.current_value (); }
9530 static std::set<std::string> core_property_names (
void);
9532 static bool has_core_property (
const caseless_str& pname);
9534 std::set<std::string> all_property_names (
void)
const;
9590 ID_ALPHADATA = 8000,
9591 ID_ALPHADATAMAPPING = 8001,
9592 ID_AMBIENTSTRENGTH = 8002,
9593 ID_BACKFACELIGHTING = 8003,
9595 ID_CDATAMAPPING = 8005,
9596 ID_CDATASOURCE = 8006,
9597 ID_DIFFUSESTRENGTH = 8007,
9598 ID_DISPLAYNAME = 8008,
9599 ID_EDGEALPHA = 8009,
9600 ID_EDGECOLOR = 8010,
9601 ID_EDGELIGHTING = 8011,
9602 ID_ERASEMODE = 8012,
9603 ID_FACEALPHA = 8013,
9604 ID_FACECOLOR = 8014,
9605 ID_FACELIGHTING = 8015,
9606 ID_INTERPRETER = 8016,
9607 ID_LINESTYLE = 8017,
9608 ID_LINEWIDTH = 8018,
9610 ID_MARKEREDGECOLOR = 8020,
9611 ID_MARKERFACECOLOR = 8021,
9612 ID_MARKERSIZE = 8022,
9613 ID_MESHSTYLE = 8023,
9614 ID_NORMALMODE = 8024,
9615 ID_SPECULARCOLORREFLECTANCE = 8025,
9616 ID_SPECULAREXPONENT = 8026,
9617 ID_SPECULARSTRENGTH = 8027,
9618 ID_VERTEXNORMALS = 8028,
9620 ID_XDATASOURCE = 8030,
9622 ID_YDATASOURCE = 8032,
9624 ID_ZDATASOURCE = 8034,
9630 ID_ALIMINCLUDE = 8040,
9631 ID_CLIMINCLUDE = 8041,
9632 ID_XLIMINCLUDE = 8042,
9633 ID_YLIMINCLUDE = 8043,
9634 ID_ZLIMINCLUDE = 8044
9659 bool edgealpha_is (
const std::string& v)
const {
return edgealpha.is (v); }
9664 bool edgecolor_is (
const std::string& v)
const {
return edgecolor.is (v); }
9671 bool erasemode_is (
const std::string& v)
const {
return erasemode.is (v); }
9675 bool facealpha_is (
const std::string& v)
const {
return facealpha.is (v); }
9680 bool facecolor_is (
const std::string& v)
const {
return facecolor.is (v); }
9690 bool linestyle_is (
const std::string& v)
const {
return linestyle.is (v); }
9695 bool marker_is (
const std::string& v)
const {
return marker.is (v); }
9696 std::string
get_marker (
void)
const {
return marker.current_value (); }
9710 bool meshstyle_is (
const std::string& v)
const {
return meshstyle.is (v); }
9760 if (alphadata.set (val,
true))
9762 update_alphadata ();
9772 if (alphadatamapping.set (val,
false))
9774 update_axis_limits (
"alphadatamapping");
9775 alphadatamapping.run_listeners (
POSTSET);
9785 if (ambientstrength.set (val,
true))
9796 if (backfacelighting.set (val,
true))
9807 if (cdata.set (val,
true))
9819 if (cdatamapping.set (val,
false))
9821 update_axis_limits (
"cdatamapping");
9822 cdatamapping.run_listeners (
POSTSET);
9832 if (cdatasource.set (val,
true))
9843 if (diffusestrength.set (val,
true))
9854 if (displayname.set (val,
true))
9865 if (edgealpha.set (val,
true))
9876 if (edgecolor.set (val,
true))
9887 if (edgelighting.set (val,
true))
9898 if (erasemode.set (val,
true))
9909 if (facealpha.set (val,
true))
9920 if (facecolor.set (val,
true))
9931 if (facelighting.set (val,
true))
9942 if (interpreter.set (val,
true))
9953 if (linestyle.set (val,
true))
9964 if (linewidth.set (val,
true))
9975 if (marker.set (val,
true))
9986 if (markeredgecolor.set (val,
true))
9997 if (markerfacecolor.set (val,
true))
10008 if (markersize.set (val,
true))
10019 if (meshstyle.set (val,
true))
10030 if (normalmode.set (val,
true))
10032 update_normalmode ();
10042 if (specularcolorreflectance.set (val,
true))
10053 if (specularexponent.set (val,
true))
10064 if (specularstrength.set (val,
true))
10075 if (vertexnormals.set (val,
true))
10077 update_vertexnormals ();
10087 if (xdata.set (val,
true))
10099 if (xdatasource.set (val,
true))
10110 if (ydata.set (val,
true))
10122 if (ydatasource.set (val,
true))
10133 if (zdata.set (val,
true))
10145 if (zdatasource.set (val,
true))
10156 if (alim.set (val,
false))
10158 update_axis_limits (
"alim");
10159 alim.run_listeners (
POSTSET);
10169 if (clim.set (val,
false))
10171 update_axis_limits (
"clim");
10172 clim.run_listeners (
POSTSET);
10182 if (xlim.set (val,
false))
10184 update_axis_limits (
"xlim");
10185 xlim.run_listeners (
POSTSET);
10195 if (ylim.set (val,
false))
10197 update_axis_limits (
"ylim");
10198 ylim.run_listeners (
POSTSET);
10208 if (zlim.set (val,
false))
10210 update_axis_limits (
"zlim");
10211 zlim.run_listeners (
POSTSET);
10221 if (aliminclude.set (val,
false))
10223 update_axis_limits (
"aliminclude");
10224 aliminclude.run_listeners (
POSTSET);
10234 if (climinclude.set (val,
false))
10236 update_axis_limits (
"climinclude");
10237 climinclude.run_listeners (
POSTSET);
10247 if (xliminclude.set (val,
false))
10249 update_axis_limits (
"xliminclude");
10250 xliminclude.run_listeners (
POSTSET);
10260 if (yliminclude.set (val,
false))
10262 update_axis_limits (
"yliminclude");
10263 yliminclude.run_listeners (
POSTSET);
10273 if (zliminclude.set (val,
false))
10275 update_axis_limits (
"zliminclude");
10276 zliminclude.run_listeners (
POSTSET);
10289 cdata.add_constraint (
"double");
10290 cdata.add_constraint (
"single");
10292 cdata.add_constraint (
dim_vector (-1, -1, 3));
10293 alphadata.add_constraint (
"double");
10294 alphadata.add_constraint (
"uint8");
10295 alphadata.add_constraint (
dim_vector (-1, -1));
10296 vertexnormals.add_constraint (
dim_vector (-1, -1, 3));
10300 void update_alphadata (
void)
10302 if (alphadatamapping_is (
"scaled"))
10303 set_alim (alphadata.get_limits ());
10305 alim = alphadata.get_limits ();
10308 void update_cdata (
void)
10310 if (cdatamapping_is (
"scaled"))
10311 set_clim (cdata.get_limits ());
10313 clim = cdata.get_limits ();
10316 void update_xdata (
void)
10319 set_xlim (xdata.get_limits ());
10322 void update_ydata (
void)
10325 set_ylim (ydata.get_limits ());
10328 void update_zdata (
void)
10331 set_zlim (zdata.get_limits ());
10334 void update_normals (
void);
10336 void update_normalmode (
void)
10337 { update_normals (); }
10339 void update_vertexnormals (
void)
10340 { set_normalmode (
"manual"); }
10420 static std::set<std::string> core_property_names (
void);
10422 static bool has_core_property (
const caseless_str& pname);
10424 std::set<std::string> all_property_names (
void)
const;
10447 ID_DISPLAYNAME = 9000,
10448 ID_ERASEMODE = 9001,
10454 ID_ALIMINCLUDE = 9007,
10455 ID_CLIMINCLUDE = 9008,
10456 ID_XLIMINCLUDE = 9009,
10457 ID_YLIMINCLUDE = 9010,
10458 ID_ZLIMINCLUDE = 9011
10496 if (displayname.set (val,
true))
10507 if (erasemode.set (val,
true))
10518 if (alim.set (val,
true))
10529 if (clim.set (val,
true))
10540 if (xlim.set (val,
true))
10551 if (ylim.set (val,
true))
10562 if (zlim.set (val,
true))
10573 if (aliminclude.set (val,
true))
10584 if (climinclude.set (val,
true))
10595 if (xliminclude.set (val,
true))
10606 if (yliminclude.set (val,
true))
10617 if (zliminclude.set (val,
true))
10626 void update_limits (
void)
const;
10716 static std::set<std::string> core_property_names (
void);
10718 static bool has_core_property (
const caseless_str& pname);
10720 std::set<std::string> all_property_names (
void)
const;
10741 ID___OBJECT__ = 10000,
10742 ID_ACCELERATOR = 10001,
10743 ID_CALLBACK = 10002,
10744 ID_CHECKED = 10003,
10746 ID_FOREGROUNDCOLOR = 10005,
10748 ID_POSITION = 10007,
10749 ID_SEPARATOR = 10008,
10750 ID_FLTK_LABEL = 10009
10764 std::string
get_enable (
void)
const {
return enable.current_value (); }
10771 std::string
get_label (
void)
const {
return label.string_value (); }
10785 if (__object__.set (val,
true))
10796 if (accelerator.set (val,
true))
10807 if (callback.set (val,
true))
10818 if (checked.set (val,
true))
10829 if (enable.set (val,
true))
10840 if (foregroundcolor.set (val,
true))
10851 if (label.set (val,
true))
10862 if (position.set (val,
true))
10873 if (separator.set (val,
true))
10884 if (fltk_label.set (val,
true))
10962 static std::set<std::string> core_property_names (
void);
10964 static bool has_core_property (
const caseless_str& pname);
10966 std::set<std::string> all_property_names (
void)
const;
10980 ID___OBJECT__ = 11000,
10981 ID_CALLBACK = 11001,
10982 ID_POSITION = 11002
10997 if (__object__.set (val,
true))
11008 if (callback.set (val,
true))
11019 if (position.set (val,
true))
11030 position.add_constraint (
dim_vector (1, 2));
11031 position.add_constraint (
dim_vector (2, 1));
11064 Matrix get_boundingbox (
bool internal =
false,
11067 double get_fontsize_points (
double box_pix_height = 0)
const;
11106 static std::set<std::string> core_property_names (
void);
11108 static bool has_core_property (
const caseless_str& pname);
11110 std::set<std::string> all_property_names (
void)
const;
11147 ID___OBJECT__ = 12000,
11148 ID_BACKGROUNDCOLOR = 12001,
11149 ID_CALLBACK = 12002,
11151 ID_CLIPPING = 12004,
11154 ID_FONTANGLE = 12007,
11155 ID_FONTNAME = 12008,
11156 ID_FONTSIZE = 12009,
11157 ID_FONTUNITS = 12010,
11158 ID_FONTWEIGHT = 12011,
11159 ID_FOREGROUNDCOLOR = 12012,
11160 ID_HORIZONTALALIGNMENT = 12013,
11161 ID_KEYPRESSFCN = 12014,
11162 ID_LISTBOXTOP = 12015,
11165 ID_POSITION = 12018,
11166 ID_SLIDERSTEP = 12019,
11169 ID_TOOLTIPSTRING = 12022,
11172 ID_VERTICALALIGNMENT = 12025
11190 bool enable_is (
const std::string& v)
const {
return enable.is (v); }
11191 std::string
get_enable (
void)
const {
return enable.current_value (); }
11233 bool style_is (
const std::string& v)
const {
return style.is (v); }
11234 std::string
get_style (
void)
const {
return style.current_value (); }
11238 bool units_is (
const std::string& v)
const {
return units.is (v); }
11239 std::string
get_units (
void)
const {
return units.current_value (); }
11251 if (__object__.set (val,
true))
11262 if (backgroundcolor.set (val,
true))
11273 if (callback.set (val,
true))
11284 if (cdata.set (val,
true))
11295 if (clipping.set (val,
true))
11306 if (enable.set (val,
true))
11317 if (extent.set (val,
true))
11328 if (fontangle.set (val,
true))
11330 update_fontangle ();
11340 if (fontname.set (val,
true))
11342 update_fontname ();
11352 if (fontsize.set (val,
true))
11354 update_fontsize ();
11366 if (fontweight.set (val,
true))
11368 update_fontweight ();
11378 if (foregroundcolor.set (val,
true))
11389 if (horizontalalignment.set (val,
true))
11400 if (keypressfcn.set (val,
true))
11411 if (listboxtop.set (val,
true))
11422 if (
max.set (val,
true))
11433 if (
min.set (val,
true))
11444 if (position.set (val,
true))
11455 if (sliderstep.set (val,
true))
11466 if (
string.
set (val,
true))
11480 if (tooltipstring.set (val,
true))
11491 if (units.set (val,
true))
11503 if (value.set (val,
true))
11514 if (verticalalignment.set (val,
true))
11528 cdata.add_constraint (
"double");
11529 cdata.add_constraint (
"single");
11530 cdata.add_constraint (
dim_vector (-1, -1, 3));
11531 position.add_constraint (
dim_vector (1, 4));
11532 sliderstep.add_constraint (
dim_vector (1, 2));
11533 cached_units = get_units ();
11536 void update_text_extent (
void);
11543 void update_fontunits (
const caseless_str& old_units);
11545 void update_units (
void);
11576 Matrix get_boundingbox (
bool internal =
false,
11579 double get_fontsize_points (
double box_pix_height = 0)
const;
11618 static std::set<std::string> core_property_names (
void);
11620 static bool has_core_property (
const caseless_str& pname);
11622 std::set<std::string> all_property_names (
void)
const;
11650 ID___OBJECT__ = 13000,
11651 ID_BACKGROUNDCOLOR = 13001,
11652 ID_BORDERTYPE = 13002,
11653 ID_BORDERWIDTH = 13003,
11654 ID_FONTANGLE = 13004,
11655 ID_FONTNAME = 13005,
11656 ID_FONTSIZE = 13006,
11657 ID_FONTUNITS = 13007,
11658 ID_FONTWEIGHT = 13008,
11659 ID_FOREGROUNDCOLOR = 13009,
11660 ID_HIGHLIGHTCOLOR = 13010,
11661 ID_POSITION = 13011,
11662 ID_RESIZEFCN = 13012,
11663 ID_SHADOWCOLOR = 13013,
11665 ID_TITLEPOSITION = 13015,
11714 std::string
get_title (
void)
const {
return title.string_value (); }
11719 bool units_is (
const std::string& v)
const {
return units.is (v); }
11720 std::string
get_units (
void)
const {
return units.current_value (); }
11727 if (__object__.set (val,
true))
11738 if (backgroundcolor.set (val,
true))
11749 if (bordertype.set (val,
true))
11760 if (borderwidth.set (val,
true))
11771 if (fontangle.set (val,
true))
11782 if (fontname.set (val,
true))
11793 if (fontsize.set (val,
true))
11806 if (fontweight.set (val,
true))
11817 if (foregroundcolor.set (val,
true))
11828 if (highlightcolor.set (val,
true))
11839 if (position.set (val,
true))
11850 if (resizefcn.set (val,
true))
11861 if (shadowcolor.set (val,
true))
11872 if (title.set (val,
true))
11883 if (titleposition.set (val,
true))
11896 position.add_constraint (
dim_vector (1, 4));
11900 void update_fontunits (
const caseless_str& old_units);
11968 static std::set<std::string> core_property_names (
void);
11970 static bool has_core_property (
const caseless_str& pname);
11972 std::set<std::string> all_property_names (
void)
const;
11984 ID___OBJECT__ = 14000
11994 if (__object__.set (val,
true))
12023 xproperties.override_defaults (obj);
12035 if (name.compare (
"default", 7))
12039 default_properties.set (name.substr (7), value);
12041 xproperties.set (name, value);
12048 if (name.compare (
"default", 7))
12049 retval = get_default (name.substr (7));
12051 retval = xproperties.get (name);
12060 return default_properties.as_struct (
"default");
12120 static std::set<std::string> core_property_names (
void);
12122 static bool has_core_property (
const caseless_str& pname);
12124 std::set<std::string> all_property_names (
void)
const;
12141 ID___OBJECT__ = 15000,
12143 ID_CLICKEDCALLBACK = 15002,
12145 ID_SEPARATOR = 15004,
12146 ID_TOOLTIPSTRING = 15005
12157 std::string
get_enable (
void)
const {
return enable.current_value (); }
12169 if (__object__.set (val,
true))
12180 if (cdata.set (val,
true))
12191 if (clickedcallback.set (val,
true))
12202 if (enable.set (val,
true))
12213 if (separator.set (val,
true))
12224 if (tooltipstring.set (val,
true))
12235 cdata.add_constraint (
"double");
12236 cdata.add_constraint (
"single");
12237 cdata.add_constraint (
dim_vector (-1, -1, 3));
12306 static std::set<std::string> core_property_names (
void);
12308 static bool has_core_property (
const caseless_str& pname);
12310 std::set<std::string> all_property_names (
void)
const;
12330 ID___OBJECT__ = 16000,
12332 ID_CLICKEDCALLBACK = 16002,
12334 ID_OFFCALLBACK = 16004,
12335 ID_ONCALLBACK = 16005,
12336 ID_SEPARATOR = 16006,
12338 ID_TOOLTIPSTRING = 16008
12349 std::string
get_enable (
void)
const {
return enable.current_value (); }
12370 if (__object__.set (val,
true))
12381 if (cdata.set (val,
true))
12392 if (clickedcallback.set (val,
true))
12403 if (enable.set (val,
true))
12414 if (offcallback.set (val,
true))
12425 if (oncallback.set (val,
true))
12436 if (separator.set (val,
true))
12447 if (
state.set (val,
true))
12458 if (tooltipstring.set (val,
true))
12469 cdata.add_constraint (
"double");
12470 cdata.add_constraint (
"single");
12471 cdata.add_constraint (
dim_vector (-1, -1, 3));
12499 const std::string &func);
12518 virtual void execute (
void) = 0;
12562 {
return (
rep != 0); }
12566 const std::string& name,
12580 bool notify_toolkit =
true);
12593 static void create_instance (
void);
12595 static bool instance_ok (
void)
12597 bool retval =
true;
12600 create_instance ();
12604 ::error (
"unable to create gh_manager!");
12616 return instance_ok ()
12617 ? instance->do_get_handle (integer_figure_handle)
12623 if (instance_ok ())
12624 instance->do_free (h);
12630 if (instance_ok ())
12631 instance->do_renumber_figure (old_gh, new_gh);
12636 return instance_ok () ? instance->do_lookup (val) :
graphics_handle ();
12647 return get_object (
lookup (val));
12652 return instance_ok () ? instance->do_get_object (h) :
graphics_object ();
12656 make_graphics_handle (
const std::string& go_name,
12658 bool integer_figure_handle =
false,
12659 bool do_createfcn =
true,
12660 bool do_notify_toolkit =
true)
12662 return instance_ok ()
12663 ? instance->do_make_graphics_handle (go_name, parent,
12664 integer_figure_handle,
12665 do_createfcn, do_notify_toolkit)
12670 bool do_notify_toolkit =
true)
12672 return instance_ok ()
12673 ? instance->do_make_figure_handle (val, do_notify_toolkit)
12679 if (instance_ok ())
12680 instance->do_push_figure (h);
12685 if (instance_ok ())
12686 instance->do_pop_figure (h);
12691 return instance_ok ()
12695 static Matrix handle_list (
bool show_hidden =
false)
12697 return instance_ok ()
12698 ? instance->do_handle_list (show_hidden) :
Matrix ();
12701 static void lock (
void)
12703 if (instance_ok ())
12704 instance->do_lock ();
12707 static bool try_lock (
void)
12709 if (instance_ok ())
12710 return instance->do_try_lock ();
12715 static void unlock (
void)
12717 if (instance_ok ())
12718 instance->do_unlock ();
12721 static Matrix figure_handle_list (
bool show_hidden =
false)
12723 return instance_ok ()
12724 ? instance->do_figure_handle_list (show_hidden) :
Matrix ();
12730 if (instance_ok ())
12731 instance->do_execute_listener (h, l);
12735 const std::string& name,
12747 cb = go.
get (name);
12751 execute_callback (h, cb, data);
12758 if (instance_ok ())
12759 instance->do_execute_callback (h, cb, data);
12763 const std::string& name,
12766 if (instance_ok ())
12767 instance->do_post_callback (h, name, data);
12772 if (instance_ok ())
12773 instance->do_post_function (fcn, data);
12777 const octave_value& value,
bool notify_toolkit =
true)
12779 if (instance_ok ())
12780 instance->do_post_set (h, name, value, notify_toolkit);
12783 static int process_events (
void)
12785 return (instance_ok () ? instance->do_process_events () : 0);
12788 static int flush_events (
void)
12790 return (instance_ok () ? instance->do_process_events (
true) : 0);
12793 static void enable_event_processing (
bool enable =
true)
12795 if (instance_ok ())
12796 instance->do_enable_event_processing (enable);
12801 bool retval =
false;
12813 if (instance_ok ())
12814 instance->do_close_all_figures ();
12823 ? instance->graphics_lock
12839 typedef std::map<graphics_handle, graphics_object>::iterator
iterator;
12840 typedef std::map<graphics_handle, graphics_object>::const_iterator
12883 iterator p = (
xisnan (val) ? handle_map.end () : handle_map.find (val));
12890 iterator p = (h.
ok () ? handle_map.find (h) : handle_map.end ());
12897 bool integer_figure_handle,
12899 bool do_notify_toolkit);
12901 graphics_handle do_make_figure_handle (
double val,
bool do_notify_toolkit);
12905 Matrix retval (1, handle_map.size ());
12908 for (
const_iterator p = handle_map.begin (); p != handle_map.end (); p++)
12913 retval(i++) = h.
value ();
12916 retval.resize (1, i);
12923 Matrix retval (1, figure_list.size ());
12927 p != figure_list.end ();
12933 retval(i++) = h.
value ();
12936 retval.resize (1, i);
12950 p != figure_list.end ();
12973 void do_post_callback (
const graphics_handle& h,
const std::string name,
12979 const octave_value& value,
bool notify_toolkit =
true);
12981 int do_process_events (
bool force =
false);
12983 void do_close_all_figures (
void);
12985 static void restore_gcbo (
void)
12987 if (instance_ok ())
12988 instance->do_restore_gcbo ();
12991 void do_restore_gcbo (
void);
12995 void do_enable_event_processing (
bool enable =
true);
12999 double& min_pos,
double& max_neg,
13000 const Matrix& kids,
char limit_type);