GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
graphics-props.cc
Go to the documentation of this file.
1 // DO NOT EDIT! Generated automatically by genprops.awk.
2 
3 // ******** base ********
4 
5 base_properties::base_properties (const std::string& ty, const graphics_handle& mh, const graphics_handle& p)
6  : beingdeleted ("beingdeleted", mh, "off"),
7  busyaction ("busyaction", mh, "{queue}|cancel"),
8  buttondownfcn ("buttondownfcn", mh, Matrix ()),
9  children ("children", mh, Matrix ()),
10  clipping ("clipping", mh, "on"),
11  createfcn ("createfcn", mh, Matrix ()),
12  deletefcn ("deletefcn", mh, Matrix ()),
13  handlevisibility ("handlevisibility", mh, "{on}|callback|off"),
14  hittest ("hittest", mh, "on"),
15  interruptible ("interruptible", mh, "on"),
16  parent ("parent", mh, p),
17  selected ("selected", mh, "off"),
18  selectionhighlight ("selectionhighlight", mh, "on"),
19  tag ("tag", mh, ""),
20  type ("type", mh, ty),
21  uicontextmenu ("uicontextmenu", mh, graphics_handle ()),
22  userdata ("userdata", mh, Matrix ()),
23  visible ("visible", mh, "on"),
24  __modified__ ("__modified__", mh, "on"),
25  __myhandle__ (mh)
26 {
40  tag.set_id (ID_TAG);
46  init ();
47 }
48 
49 void
51 {
52  if (pname.compare ("beingdeleted"))
53  set_beingdeleted (val);
54  else if (pname.compare ("busyaction"))
55  set_busyaction (val);
56  else if (pname.compare ("buttondownfcn"))
57  set_buttondownfcn (val);
58  else if (pname.compare ("children"))
59  set_children (val);
60  else if (pname.compare ("clipping"))
61  set_clipping (val);
62  else if (pname.compare ("createfcn"))
63  set_createfcn (val);
64  else if (pname.compare ("deletefcn"))
65  set_deletefcn (val);
66  else if (pname.compare ("handlevisibility"))
68  else if (pname.compare ("hittest"))
69  set_hittest (val);
70  else if (pname.compare ("interruptible"))
71  set_interruptible (val);
72  else if (pname.compare ("parent"))
73  set_parent (val);
74  else if (pname.compare ("selected"))
75  set_selected (val);
76  else if (pname.compare ("selectionhighlight"))
78  else if (pname.compare ("tag"))
79  set_tag (val);
80  else if (pname.compare ("uicontextmenu"))
81  set_uicontextmenu (val);
82  else if (pname.compare ("userdata"))
83  set_userdata (val);
84  else if (pname.compare ("visible"))
85  set_visible (val);
86  else if (pname.compare ("__modified__"))
87  set___modified__ (val);
88  else
89  set_dynamic (pname, val);
90 }
91 
93 base_properties::get (bool all) const
94 {
95  octave_map m = get_dynamic (all).map_value ();
96 
97  m.assign ("beingdeleted", octave_value (get_beingdeleted ()));
98  m.assign ("busyaction", octave_value (get_busyaction ()));
99  m.assign ("buttondownfcn", octave_value (get_buttondownfcn ()));
100  m.assign ("children", octave_value (get_children ()));
101  m.assign ("clipping", octave_value (get_clipping ()));
102  m.assign ("createfcn", octave_value (get_createfcn ()));
103  m.assign ("deletefcn", octave_value (get_deletefcn ()));
104  m.assign ("handlevisibility", octave_value (get_handlevisibility ()));
105  m.assign ("hittest", octave_value (get_hittest ()));
106  m.assign ("interruptible", octave_value (get_interruptible ()));
107  m.assign ("parent", octave_value (get_parent ().as_octave_value ()));
108  m.assign ("selected", octave_value (get_selected ()));
109  m.assign ("selectionhighlight", octave_value (get_selectionhighlight ()));
110  m.assign ("tag", octave_value (get_tag ()));
111  m.assign ("type", octave_value (get_type ()));
112  m.assign ("uicontextmenu", octave_value (get_uicontextmenu ().as_octave_value ()));
113  m.assign ("userdata", octave_value (get_userdata ()));
114  m.assign ("visible", octave_value (get_visible ()));
115  m.assign ("__modified__", octave_value (get___modified__ ()));
116  if (all)
117  m.assign ("__myhandle__", octave_value (get___myhandle__ ().as_octave_value ()));
118 
119  return m;
120 }
121 
123 base_properties::get (const caseless_str& pname) const
124 {
125  octave_value retval;
126 
127  if (pname.compare ("beingdeleted"))
128  retval = get_beingdeleted ();
129  else if (pname.compare ("busyaction"))
130  retval = get_busyaction ();
131  else if (pname.compare ("buttondownfcn"))
132  retval = get_buttondownfcn ();
133  else if (pname.compare ("children"))
134  retval = get_children ();
135  else if (pname.compare ("clipping"))
136  retval = get_clipping ();
137  else if (pname.compare ("createfcn"))
138  retval = get_createfcn ();
139  else if (pname.compare ("deletefcn"))
140  retval = get_deletefcn ();
141  else if (pname.compare ("handlevisibility"))
142  retval = get_handlevisibility ();
143  else if (pname.compare ("hittest"))
144  retval = get_hittest ();
145  else if (pname.compare ("interruptible"))
146  retval = get_interruptible ();
147  else if (pname.compare ("parent"))
148  retval = get_parent ().as_octave_value ();
149  else if (pname.compare ("selected"))
150  retval = get_selected ();
151  else if (pname.compare ("selectionhighlight"))
152  retval = get_selectionhighlight ();
153  else if (pname.compare ("tag"))
154  retval = get_tag ();
155  else if (pname.compare ("type"))
156  retval = get_type ();
157  else if (pname.compare ("uicontextmenu"))
158  retval = get_uicontextmenu ().as_octave_value ();
159  else if (pname.compare ("userdata"))
160  retval = get_userdata ();
161  else if (pname.compare ("visible"))
162  retval = get_visible ();
163  else if (pname.compare ("__modified__"))
164  retval = get___modified__ ();
165  else if (pname.compare ("__myhandle__"))
166  retval = get___myhandle__ ().as_octave_value ();
167  else
168  retval = get_dynamic (pname);
169 
170  return retval;
171 }
172 
173 property
175 {
176  if (pname.compare ("beingdeleted"))
177  return property (&beingdeleted, true);
178  else if (pname.compare ("busyaction"))
179  return property (&busyaction, true);
180  else if (pname.compare ("buttondownfcn"))
181  return property (&buttondownfcn, true);
182  else if (pname.compare ("children"))
183  return property (&children, true);
184  else if (pname.compare ("clipping"))
185  return property (&clipping, true);
186  else if (pname.compare ("createfcn"))
187  return property (&createfcn, true);
188  else if (pname.compare ("deletefcn"))
189  return property (&deletefcn, true);
190  else if (pname.compare ("handlevisibility"))
191  return property (&handlevisibility, true);
192  else if (pname.compare ("hittest"))
193  return property (&hittest, true);
194  else if (pname.compare ("interruptible"))
195  return property (&interruptible, true);
196  else if (pname.compare ("parent"))
197  return property (&parent, true);
198  else if (pname.compare ("selected"))
199  return property (&selected, true);
200  else if (pname.compare ("selectionhighlight"))
201  return property (&selectionhighlight, true);
202  else if (pname.compare ("tag"))
203  return property (&tag, true);
204  else if (pname.compare ("type"))
205  return property (&type, true);
206  else if (pname.compare ("uicontextmenu"))
207  return property (&uicontextmenu, true);
208  else if (pname.compare ("userdata"))
209  return property (&userdata, true);
210  else if (pname.compare ("visible"))
211  return property (&visible, true);
212  else if (pname.compare ("__modified__"))
213  return property (&__modified__, true);
214  else
215  return get_property_dynamic (pname);
216 }
217 
220 {
222 
223  m["beingdeleted"] = "off";
224  m["busyaction"] = "queue";
225  m["buttondownfcn"] = Matrix ();
226  m["clipping"] = "on";
227  m["createfcn"] = Matrix ();
228  m["deletefcn"] = Matrix ();
229  m["handlevisibility"] = "on";
230  m["hittest"] = "on";
231  m["interruptible"] = "on";
232  m["selected"] = "off";
233  m["selectionhighlight"] = "on";
234  m["tag"] = "";
235  m["uicontextmenu"] = graphics_handle ().as_octave_value ();
236  m["userdata"] = Matrix ();
237  m["visible"] = "on";
238  m["__modified__"] = "on";
239 
240  return m;
241 }
242 
243 std::set<std::string>
245 {
246  static std::set<std::string> all_pnames;
247 
248  static bool initialized = false;
249 
250  if (! initialized)
251  {
252  all_pnames.insert ("beingdeleted");
253  all_pnames.insert ("busyaction");
254  all_pnames.insert ("buttondownfcn");
255  all_pnames.insert ("children");
256  all_pnames.insert ("clipping");
257  all_pnames.insert ("createfcn");
258  all_pnames.insert ("deletefcn");
259  all_pnames.insert ("handlevisibility");
260  all_pnames.insert ("hittest");
261  all_pnames.insert ("interruptible");
262  all_pnames.insert ("parent");
263  all_pnames.insert ("selected");
264  all_pnames.insert ("selectionhighlight");
265  all_pnames.insert ("tag");
266  all_pnames.insert ("type");
267  all_pnames.insert ("uicontextmenu");
268  all_pnames.insert ("userdata");
269  all_pnames.insert ("visible");
270  all_pnames.insert ("__modified__");
271  all_pnames.insert ("__myhandle__");
272 
273  initialized = true;
274  }
275 
276  return all_pnames;
277 }
278 
279 bool
281 {
282  std::set<std::string> pnames = core_property_names ();
283 
284  return pnames.find (pname) != pnames.end ();
285 }
286 
287 std::set<std::string>
289 {
290  static std::set<std::string> all_pnames = core_property_names ();
291 
292  std::set<std::string> retval = all_pnames;
293  std::set<std::string> dyn_props = dynamic_property_names ();
294  retval.insert (dyn_props.begin (), dyn_props.end ());
295  for (std::map<caseless_str, property, cmp_caseless_str>::const_iterator p = all_props.begin ();
296  p != all_props.end (); p++)
297  retval.insert (p->first);
298 
299  return retval;
300 }
301 
302 // ******** root_figure ********
303 
305  : base_properties (go_name, mh, p),
306  callbackobject ("callbackobject", mh, graphics_handle ()),
307  commandwindowsize ("commandwindowsize", mh, Matrix (1, 2, 0)),
308  currentfigure ("currentfigure", mh, graphics_handle ()),
309  diary ("diary", mh, "off"),
310  diaryfile ("diaryfile", mh, "diary"),
311  echo ("echo", mh, "off"),
312  errormessage ("errormessage", mh, ""),
313  fixedwidthfontname ("fixedwidthfontname", mh, "Courier"),
314  format ("format", mh, "+|bank|bit|hex|long|longe|longeng|longg|native-bit|native-hex|none|rational|{short}|shorte|shorteng|shortg"),
315  formatspacing ("formatspacing", mh, "compact|{loose}"),
316  language ("language", mh, "ascii"),
317  monitorpositions ("monitorpositions", mh, Matrix (1, 4, 0)),
318  pointerlocation ("pointerlocation", mh, Matrix (1, 2, 0)),
319  pointerwindow ("pointerwindow", mh, 0.0),
320  recursionlimit ("recursionlimit", mh, 256.0),
321  screendepth ("screendepth", mh, default_screendepth ()),
322  screenpixelsperinch ("screenpixelsperinch", mh, default_screenpixelsperinch ()),
323  screensize ("screensize", mh, default_screensize ()),
324  showhiddenhandles ("showhiddenhandles", mh, "off"),
325  units ("units", mh, "inches|centimeters|normalized|points|{pixels}")
326 {
332  echo.set_id (ID_ECHO);
347  init ();
348 }
349 
350 void
352 {
353  const std::set<std::string>& pnames = all_property_names ();
354 
355  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
356 
357  if (error_state)
358  return;
359 
360  if (pname.compare ("currentfigure"))
361  set_currentfigure (val);
362  else if (pname.compare ("diary"))
363  set_diary (val);
364  else if (pname.compare ("diaryfile"))
365  set_diaryfile (val);
366  else if (pname.compare ("echo"))
367  set_echo (val);
368  else if (pname.compare ("errormessage"))
369  set_errormessage (val);
370  else if (pname.compare ("fixedwidthfontname"))
371  set_fixedwidthfontname (val);
372  else if (pname.compare ("format"))
373  set_format (val);
374  else if (pname.compare ("formatspacing"))
375  set_formatspacing (val);
376  else if (pname.compare ("language"))
377  set_language (val);
378  else if (pname.compare ("monitorpositions"))
379  set_monitorpositions (val);
380  else if (pname.compare ("pointerlocation"))
381  set_pointerlocation (val);
382  else if (pname.compare ("recursionlimit"))
383  set_recursionlimit (val);
384  else if (pname.compare ("showhiddenhandles"))
385  set_showhiddenhandles (val);
386  else if (pname.compare ("units"))
387  set_units (val);
388  else
389  base_properties::set (pname, val);
390 }
391 
394 {
396 
397  m.assign ("callbackobject", octave_value (get_callbackobject ().as_octave_value ()));
398  m.assign ("commandwindowsize", octave_value (get_commandwindowsize ()));
399  m.assign ("currentfigure", octave_value (get_currentfigure ().as_octave_value ()));
400  m.assign ("diary", octave_value (get_diary ()));
401  m.assign ("diaryfile", octave_value (get_diaryfile ()));
402  m.assign ("echo", octave_value (get_echo ()));
403  m.assign ("errormessage", octave_value (get_errormessage ()));
404  m.assign ("fixedwidthfontname", octave_value (get_fixedwidthfontname ()));
405  m.assign ("format", octave_value (get_format ()));
406  m.assign ("formatspacing", octave_value (get_formatspacing ()));
407  m.assign ("language", octave_value (get_language ()));
408  m.assign ("monitorpositions", octave_value (get_monitorpositions ()));
409  m.assign ("pointerlocation", octave_value (get_pointerlocation ()));
410  m.assign ("pointerwindow", octave_value (get_pointerwindow ()));
411  m.assign ("recursionlimit", octave_value (get_recursionlimit ()));
412  m.assign ("screendepth", octave_value (get_screendepth ()));
413  m.assign ("screenpixelsperinch", octave_value (get_screenpixelsperinch ()));
414  m.assign ("screensize", octave_value (get_screensize ()));
415  m.assign ("showhiddenhandles", octave_value (get_showhiddenhandles ()));
416  m.assign ("units", octave_value (get_units ()));
417 
418  return m;
419 }
420 
423 {
424  octave_value retval;
425 
426  const std::set<std::string>& pnames = all_property_names ();
427 
428  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
429 
430  if (error_state)
431  return retval;
432 
433  if (pname.compare ("callbackobject"))
434  retval = get_callbackobject ().as_octave_value ();
435  else if (pname.compare ("commandwindowsize"))
436  retval = get_commandwindowsize ();
437  else if (pname.compare ("currentfigure"))
438  retval = get_currentfigure ().as_octave_value ();
439  else if (pname.compare ("diary"))
440  retval = get_diary ();
441  else if (pname.compare ("diaryfile"))
442  retval = get_diaryfile ();
443  else if (pname.compare ("echo"))
444  retval = get_echo ();
445  else if (pname.compare ("errormessage"))
446  retval = get_errormessage ();
447  else if (pname.compare ("fixedwidthfontname"))
448  retval = get_fixedwidthfontname ();
449  else if (pname.compare ("format"))
450  retval = get_format ();
451  else if (pname.compare ("formatspacing"))
452  retval = get_formatspacing ();
453  else if (pname.compare ("language"))
454  retval = get_language ();
455  else if (pname.compare ("monitorpositions"))
456  retval = get_monitorpositions ();
457  else if (pname.compare ("pointerlocation"))
458  retval = get_pointerlocation ();
459  else if (pname.compare ("pointerwindow"))
460  retval = get_pointerwindow ();
461  else if (pname.compare ("recursionlimit"))
462  retval = get_recursionlimit ();
463  else if (pname.compare ("screendepth"))
464  retval = get_screendepth ();
465  else if (pname.compare ("screenpixelsperinch"))
466  retval = get_screenpixelsperinch ();
467  else if (pname.compare ("screensize"))
468  retval = get_screensize ();
469  else if (pname.compare ("showhiddenhandles"))
470  retval = get_showhiddenhandles ();
471  else if (pname.compare ("units"))
472  retval = get_units ();
473  else
474  retval = base_properties::get (pname);
475 
476  return retval;
477 }
478 
479 property
481 {
482  const std::set<std::string>& pnames = all_property_names ();
483 
484  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
485 
486  if (error_state)
487  return property ();
488 
489  if (pname.compare ("callbackobject"))
490  return property (&callbackobject, true);
491  else if (pname.compare ("commandwindowsize"))
492  return property (&commandwindowsize, true);
493  else if (pname.compare ("currentfigure"))
494  return property (&currentfigure, true);
495  else if (pname.compare ("diary"))
496  return property (&diary, true);
497  else if (pname.compare ("diaryfile"))
498  return property (&diaryfile, true);
499  else if (pname.compare ("echo"))
500  return property (&echo, true);
501  else if (pname.compare ("errormessage"))
502  return property (&errormessage, true);
503  else if (pname.compare ("fixedwidthfontname"))
504  return property (&fixedwidthfontname, true);
505  else if (pname.compare ("format"))
506  return property (&format, true);
507  else if (pname.compare ("formatspacing"))
508  return property (&formatspacing, true);
509  else if (pname.compare ("language"))
510  return property (&language, true);
511  else if (pname.compare ("monitorpositions"))
512  return property (&monitorpositions, true);
513  else if (pname.compare ("pointerlocation"))
514  return property (&pointerlocation, true);
515  else if (pname.compare ("pointerwindow"))
516  return property (&pointerwindow, true);
517  else if (pname.compare ("recursionlimit"))
518  return property (&recursionlimit, true);
519  else if (pname.compare ("screendepth"))
520  return property (&screendepth, true);
521  else if (pname.compare ("screenpixelsperinch"))
522  return property (&screenpixelsperinch, true);
523  else if (pname.compare ("screensize"))
524  return property (&screensize, true);
525  else if (pname.compare ("showhiddenhandles"))
526  return property (&showhiddenhandles, true);
527  else if (pname.compare ("units"))
528  return property (&units, true);
529  else
530  return base_properties::get_property (pname);
531 }
532 
535 {
537 
538  m["callbackobject"] = graphics_handle ().as_octave_value ();
539  m["commandwindowsize"] = Matrix (1, 2, 0);
540  m["currentfigure"] = graphics_handle ().as_octave_value ();
541  m["diary"] = "off";
542  m["diaryfile"] = "diary";
543  m["echo"] = "off";
544  m["errormessage"] = "";
545  m["fixedwidthfontname"] = "Courier";
546  m["format"] = "short";
547  m["formatspacing"] = "loose";
548  m["language"] = "ascii";
549  m["monitorpositions"] = Matrix (1, 4, 0);
550  m["pointerlocation"] = Matrix (1, 2, 0);
551  m["pointerwindow"] = 0.0;
552  m["recursionlimit"] = 256.0;
553  m["screendepth"] = default_screendepth ();
554  m["screenpixelsperinch"] = default_screenpixelsperinch ();
555  m["screensize"] = default_screensize ();
556  m["showhiddenhandles"] = "off";
557  m["units"] = "pixels";
558 
559  return m;
560 }
561 
562 std::string root_figure::properties::go_name ("root");
563 
564 std::set<std::string>
566 {
567  static std::set<std::string> all_pnames;
568 
569  static bool initialized = false;
570 
571  if (! initialized)
572  {
573  all_pnames.insert ("callbackobject");
574  all_pnames.insert ("commandwindowsize");
575  all_pnames.insert ("currentfigure");
576  all_pnames.insert ("diary");
577  all_pnames.insert ("diaryfile");
578  all_pnames.insert ("echo");
579  all_pnames.insert ("errormessage");
580  all_pnames.insert ("fixedwidthfontname");
581  all_pnames.insert ("format");
582  all_pnames.insert ("formatspacing");
583  all_pnames.insert ("language");
584  all_pnames.insert ("monitorpositions");
585  all_pnames.insert ("pointerlocation");
586  all_pnames.insert ("pointerwindow");
587  all_pnames.insert ("recursionlimit");
588  all_pnames.insert ("screendepth");
589  all_pnames.insert ("screenpixelsperinch");
590  all_pnames.insert ("screensize");
591  all_pnames.insert ("showhiddenhandles");
592  all_pnames.insert ("units");
593 
594  std::set<std::string> base_pnames = base_properties::core_property_names ();
595  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
596 
597  initialized = true;
598  }
599 
600  return all_pnames;
601 }
602 
603 bool
605 {
606  std::set<std::string> pnames = core_property_names ();
607 
608  return pnames.find (pname) != pnames.end ();
609 }
610 
611 std::set<std::string>
613 {
614  static std::set<std::string> all_pnames = core_property_names ();
615 
616  std::set<std::string> retval = all_pnames;
617  std::set<std::string> base_props = base_properties::all_property_names ();
618  retval.insert (base_props.begin (), base_props.end ());
619 
620  return retval;
621 }
622 
623 bool
625 {
626  std::set<std::string> pnames = all_property_names ();
627 
628  return pnames.find (pname) != pnames.end ();
629 }
630 
631 // ******** figure ********
632 
634  : base_properties (go_name, mh, p),
635  alphamap ("alphamap", mh, Matrix (64, 1, 1)),
636  buttondownfcn ("buttondownfcn", mh, Matrix ()),
637  closerequestfcn ("closerequestfcn", mh, "closereq"),
638  color ("color", mh, color_property (color_values (1, 1, 1), radio_values ("none"))),
639  colormap ("colormap", mh, jet_colormap ()),
640  currentaxes ("currentaxes", mh, graphics_handle ()),
641  currentcharacter ("currentcharacter", mh, ""),
642  currentobject ("currentobject", mh, graphics_handle ()),
643  currentpoint ("currentpoint", mh, Matrix (2, 1, 0)),
644  dockcontrols ("dockcontrols", mh, "off"),
645  doublebuffer ("doublebuffer", mh, "on"),
646  filename ("filename", mh, ""),
647  integerhandle ("integerhandle", mh, "on"),
648  inverthardcopy ("inverthardcopy", mh, "off"),
649  keypressfcn ("keypressfcn", mh, Matrix ()),
650  keyreleasefcn ("keyreleasefcn", mh, Matrix ()),
651  menubar ("menubar", mh, "none|{figure}"),
652  mincolormap ("mincolormap", mh, 64),
653  name ("name", mh, ""),
654  nextplot ("nextplot", mh, "new|{add}|replacechildren|replace"),
655  numbertitle ("numbertitle", mh, "on"),
656  outerposition ("outerposition", mh, Matrix (1, 4, -1.0)),
657  paperorientation ("paperorientation", mh, "{portrait}|landscape|rotated"),
658  paperposition ("paperposition", mh, default_figure_paperposition ()),
659  paperpositionmode ("paperpositionmode", mh, "auto|{manual}"),
660  papersize ("papersize", mh, default_figure_papersize ()),
661  papertype ("papertype", mh, "{usletter}|uslegal|a0|a1|a2|a3|a4|a5|b0|b1|b2|b3|b4|b5|arch-a|arch-b|arch-c|arch-d|arch-e|a|b|c|d|e|tabloid|<custom>"),
662  paperunits ("paperunits", mh, "{inches}|centimeters|normalized|points"),
663  pointer ("pointer", mh, "crosshair|fullcrosshair|{arrow}|ibeam|watch|topl|topr|botl|botr|left|top|right|bottom|circle|cross|fleur|custom|hand"),
664  pointershapecdata ("pointershapecdata", mh, Matrix (16, 16, 0)),
665  pointershapehotspot ("pointershapehotspot", mh, Matrix (1, 2, 0)),
666  position ("position", mh, default_figure_position ()),
667  renderer ("renderer", mh, "{painters}|zbuffer|opengl|none"),
668  renderermode ("renderermode", mh, "{auto}|manual"),
669  resize ("resize", mh, "on"),
670  resizefcn ("resizefcn", mh, Matrix ()),
671  selectiontype ("selectiontype", mh, "{normal}|open|alt|extend"),
672  toolbar ("toolbar", mh, "none|{auto}|figure"),
673  units ("units", mh, "inches|centimeters|normalized|points|{pixels}|characters"),
674  windowbuttondownfcn ("windowbuttondownfcn", mh, Matrix ()),
675  windowbuttonmotionfcn ("windowbuttonmotionfcn", mh, Matrix ()),
676  windowbuttonupfcn ("windowbuttonupfcn", mh, Matrix ()),
677  windowkeypressfcn ("windowkeypressfcn", mh, Matrix ()),
678  windowkeyreleasefcn ("windowkeyreleasefcn", mh, Matrix ()),
679  windowscrollwheelfcn ("windowscrollwheelfcn", mh, Matrix ()),
680  windowstyle ("windowstyle", mh, "{normal}|modal|docked"),
681  wvisual ("wvisual", mh, ""),
682  wvisualmode ("wvisualmode", mh, "{auto}|manual"),
683  xdisplay ("xdisplay", mh, ""),
684  xvisual ("xvisual", mh, ""),
685  xvisualmode ("xvisualmode", mh, "{auto}|manual"),
686  __enhanced__ ("__enhanced__", mh, "on"),
687  __graphics_toolkit__ ("__graphics_toolkit__", mh, gtk_manager::default_toolkit ()),
688  __guidata__ ("__guidata__", mh, Matrix ()),
689  __plot_stream__ ("__plot_stream__", mh, Matrix ())
690 {
709  name.set_id (ID_NAME);
743  __enhanced__.set_hidden (true);
746  __guidata__.set_hidden (true);
749  init ();
750 }
751 
752 void
753 figure::properties::set (const caseless_str& pname_arg, const octave_value& val)
754 {
755  const std::set<std::string>& pnames = all_property_names ();
756 
757  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
758 
759  if (error_state)
760  return;
761 
762  if (pname.compare ("alphamap"))
763  set_alphamap (val);
764  else if (pname.compare ("buttondownfcn"))
765  set_buttondownfcn (val);
766  else if (pname.compare ("closerequestfcn"))
767  set_closerequestfcn (val);
768  else if (pname.compare ("color"))
769  set_color (val);
770  else if (pname.compare ("colormap"))
771  set_colormap (val);
772  else if (pname.compare ("currentaxes"))
773  set_currentaxes (val);
774  else if (pname.compare ("dockcontrols"))
775  set_dockcontrols (val);
776  else if (pname.compare ("doublebuffer"))
777  set_doublebuffer (val);
778  else if (pname.compare ("filename"))
779  set_filename (val);
780  else if (pname.compare ("integerhandle"))
781  set_integerhandle (val);
782  else if (pname.compare ("inverthardcopy"))
783  set_inverthardcopy (val);
784  else if (pname.compare ("keypressfcn"))
785  set_keypressfcn (val);
786  else if (pname.compare ("keyreleasefcn"))
787  set_keyreleasefcn (val);
788  else if (pname.compare ("menubar"))
789  set_menubar (val);
790  else if (pname.compare ("mincolormap"))
791  set_mincolormap (val);
792  else if (pname.compare ("name"))
793  set_name (val);
794  else if (pname.compare ("nextplot"))
795  set_nextplot (val);
796  else if (pname.compare ("numbertitle"))
797  set_numbertitle (val);
798  else if (pname.compare ("outerposition"))
799  set_outerposition (val);
800  else if (pname.compare ("paperorientation"))
801  set_paperorientation (val);
802  else if (pname.compare ("paperposition"))
803  set_paperposition (val);
804  else if (pname.compare ("paperpositionmode"))
805  set_paperpositionmode (val);
806  else if (pname.compare ("papersize"))
807  set_papersize (val);
808  else if (pname.compare ("papertype"))
809  set_papertype (val);
810  else if (pname.compare ("paperunits"))
811  set_paperunits (val);
812  else if (pname.compare ("pointer"))
813  set_pointer (val);
814  else if (pname.compare ("pointershapecdata"))
815  set_pointershapecdata (val);
816  else if (pname.compare ("pointershapehotspot"))
817  set_pointershapehotspot (val);
818  else if (pname.compare ("position"))
819  set_position (val);
820  else if (pname.compare ("renderer"))
821  set_renderer (val);
822  else if (pname.compare ("renderermode"))
823  set_renderermode (val);
824  else if (pname.compare ("resize"))
825  set_resize (val);
826  else if (pname.compare ("resizefcn"))
827  set_resizefcn (val);
828  else if (pname.compare ("selectiontype"))
829  set_selectiontype (val);
830  else if (pname.compare ("toolbar"))
831  set_toolbar (val);
832  else if (pname.compare ("units"))
833  set_units (val);
834  else if (pname.compare ("windowbuttondownfcn"))
835  set_windowbuttondownfcn (val);
836  else if (pname.compare ("windowbuttonmotionfcn"))
837  set_windowbuttonmotionfcn (val);
838  else if (pname.compare ("windowbuttonupfcn"))
839  set_windowbuttonupfcn (val);
840  else if (pname.compare ("windowkeypressfcn"))
841  set_windowkeypressfcn (val);
842  else if (pname.compare ("windowkeyreleasefcn"))
843  set_windowkeyreleasefcn (val);
844  else if (pname.compare ("windowscrollwheelfcn"))
845  set_windowscrollwheelfcn (val);
846  else if (pname.compare ("windowstyle"))
847  set_windowstyle (val);
848  else if (pname.compare ("wvisual"))
849  set_wvisual (val);
850  else if (pname.compare ("wvisualmode"))
851  set_wvisualmode (val);
852  else if (pname.compare ("xdisplay"))
853  set_xdisplay (val);
854  else if (pname.compare ("xvisual"))
855  set_xvisual (val);
856  else if (pname.compare ("xvisualmode"))
857  set_xvisualmode (val);
858  else if (pname.compare ("__enhanced__"))
859  set___enhanced__ (val);
860  else if (pname.compare ("__graphics_toolkit__"))
861  set___graphics_toolkit__ (val);
862  else if (pname.compare ("__guidata__"))
863  set___guidata__ (val);
864  else if (pname.compare ("__plot_stream__"))
865  set___plot_stream__ (val);
866  else
867  base_properties::set (pname, val);
868 }
869 
871 figure::properties::get (bool all) const
872 {
874 
875  m.assign ("alphamap", octave_value (get_alphamap ()));
876  m.assign ("buttondownfcn", octave_value (get_buttondownfcn ()));
877  m.assign ("closerequestfcn", octave_value (get_closerequestfcn ()));
878  m.assign ("color", octave_value (get_color ()));
879  m.assign ("colormap", octave_value (get_colormap ()));
880  m.assign ("currentaxes", octave_value (get_currentaxes ().as_octave_value ()));
881  m.assign ("currentcharacter", octave_value (get_currentcharacter ()));
882  m.assign ("currentobject", octave_value (get_currentobject ().as_octave_value ()));
883  m.assign ("currentpoint", octave_value (get_currentpoint ()));
884  m.assign ("dockcontrols", octave_value (get_dockcontrols ()));
885  m.assign ("doublebuffer", octave_value (get_doublebuffer ()));
886  m.assign ("filename", octave_value (get_filename ()));
887  m.assign ("integerhandle", octave_value (get_integerhandle ()));
888  m.assign ("inverthardcopy", octave_value (get_inverthardcopy ()));
889  m.assign ("keypressfcn", octave_value (get_keypressfcn ()));
890  m.assign ("keyreleasefcn", octave_value (get_keyreleasefcn ()));
891  m.assign ("menubar", octave_value (get_menubar ()));
892  m.assign ("mincolormap", octave_value (get_mincolormap ()));
893  m.assign ("name", octave_value (get_name ()));
894  m.assign ("nextplot", octave_value (get_nextplot ()));
895  m.assign ("numbertitle", octave_value (get_numbertitle ()));
896  m.assign ("outerposition", octave_value (get_outerposition ()));
897  m.assign ("paperorientation", octave_value (get_paperorientation ()));
898  m.assign ("paperposition", octave_value (get_paperposition ()));
899  m.assign ("paperpositionmode", octave_value (get_paperpositionmode ()));
900  m.assign ("papersize", octave_value (get_papersize ()));
901  m.assign ("papertype", octave_value (get_papertype ()));
902  m.assign ("paperunits", octave_value (get_paperunits ()));
903  m.assign ("pointer", octave_value (get_pointer ()));
904  m.assign ("pointershapecdata", octave_value (get_pointershapecdata ()));
905  m.assign ("pointershapehotspot", octave_value (get_pointershapehotspot ()));
906  m.assign ("position", octave_value (get_position ()));
907  m.assign ("renderer", octave_value (get_renderer ()));
908  m.assign ("renderermode", octave_value (get_renderermode ()));
909  m.assign ("resize", octave_value (get_resize ()));
910  m.assign ("resizefcn", octave_value (get_resizefcn ()));
911  m.assign ("selectiontype", octave_value (get_selectiontype ()));
912  m.assign ("toolbar", octave_value (get_toolbar ()));
913  m.assign ("units", octave_value (get_units ()));
914  m.assign ("windowbuttondownfcn", octave_value (get_windowbuttondownfcn ()));
915  m.assign ("windowbuttonmotionfcn", octave_value (get_windowbuttonmotionfcn ()));
916  m.assign ("windowbuttonupfcn", octave_value (get_windowbuttonupfcn ()));
917  m.assign ("windowkeypressfcn", octave_value (get_windowkeypressfcn ()));
918  m.assign ("windowkeyreleasefcn", octave_value (get_windowkeyreleasefcn ()));
919  m.assign ("windowscrollwheelfcn", octave_value (get_windowscrollwheelfcn ()));
920  m.assign ("windowstyle", octave_value (get_windowstyle ()));
921  m.assign ("wvisual", octave_value (get_wvisual ()));
922  m.assign ("wvisualmode", octave_value (get_wvisualmode ()));
923  m.assign ("xdisplay", octave_value (get_xdisplay ()));
924  m.assign ("xvisual", octave_value (get_xvisual ()));
925  m.assign ("xvisualmode", octave_value (get_xvisualmode ()));
926  if (all)
927  m.assign ("__enhanced__", octave_value (get___enhanced__ ()));
928  m.assign ("__graphics_toolkit__", octave_value (get___graphics_toolkit__ ()));
929  if (all)
930  m.assign ("__guidata__", octave_value (get___guidata__ ()));
931  if (all)
932  m.assign ("__plot_stream__", octave_value (get___plot_stream__ ()));
933 
934  return m;
935 }
936 
938 figure::properties::get (const caseless_str& pname_arg) const
939 {
940  octave_value retval;
941 
942  const std::set<std::string>& pnames = all_property_names ();
943 
944  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
945 
946  if (error_state)
947  return retval;
948 
949  if (pname.compare ("alphamap"))
950  retval = get_alphamap ();
951  else if (pname.compare ("buttondownfcn"))
952  retval = get_buttondownfcn ();
953  else if (pname.compare ("closerequestfcn"))
954  retval = get_closerequestfcn ();
955  else if (pname.compare ("color"))
956  retval = get_color ();
957  else if (pname.compare ("colormap"))
958  retval = get_colormap ();
959  else if (pname.compare ("currentaxes"))
960  retval = get_currentaxes ().as_octave_value ();
961  else if (pname.compare ("currentcharacter"))
962  retval = get_currentcharacter ();
963  else if (pname.compare ("currentobject"))
964  retval = get_currentobject ().as_octave_value ();
965  else if (pname.compare ("currentpoint"))
966  retval = get_currentpoint ();
967  else if (pname.compare ("dockcontrols"))
968  retval = get_dockcontrols ();
969  else if (pname.compare ("doublebuffer"))
970  retval = get_doublebuffer ();
971  else if (pname.compare ("filename"))
972  retval = get_filename ();
973  else if (pname.compare ("integerhandle"))
974  retval = get_integerhandle ();
975  else if (pname.compare ("inverthardcopy"))
976  retval = get_inverthardcopy ();
977  else if (pname.compare ("keypressfcn"))
978  retval = get_keypressfcn ();
979  else if (pname.compare ("keyreleasefcn"))
980  retval = get_keyreleasefcn ();
981  else if (pname.compare ("menubar"))
982  retval = get_menubar ();
983  else if (pname.compare ("mincolormap"))
984  retval = get_mincolormap ();
985  else if (pname.compare ("name"))
986  retval = get_name ();
987  else if (pname.compare ("nextplot"))
988  retval = get_nextplot ();
989  else if (pname.compare ("numbertitle"))
990  retval = get_numbertitle ();
991  else if (pname.compare ("outerposition"))
992  retval = get_outerposition ();
993  else if (pname.compare ("paperorientation"))
994  retval = get_paperorientation ();
995  else if (pname.compare ("paperposition"))
996  retval = get_paperposition ();
997  else if (pname.compare ("paperpositionmode"))
998  retval = get_paperpositionmode ();
999  else if (pname.compare ("papersize"))
1000  retval = get_papersize ();
1001  else if (pname.compare ("papertype"))
1002  retval = get_papertype ();
1003  else if (pname.compare ("paperunits"))
1004  retval = get_paperunits ();
1005  else if (pname.compare ("pointer"))
1006  retval = get_pointer ();
1007  else if (pname.compare ("pointershapecdata"))
1008  retval = get_pointershapecdata ();
1009  else if (pname.compare ("pointershapehotspot"))
1010  retval = get_pointershapehotspot ();
1011  else if (pname.compare ("position"))
1012  retval = get_position ();
1013  else if (pname.compare ("renderer"))
1014  retval = get_renderer ();
1015  else if (pname.compare ("renderermode"))
1016  retval = get_renderermode ();
1017  else if (pname.compare ("resize"))
1018  retval = get_resize ();
1019  else if (pname.compare ("resizefcn"))
1020  retval = get_resizefcn ();
1021  else if (pname.compare ("selectiontype"))
1022  retval = get_selectiontype ();
1023  else if (pname.compare ("toolbar"))
1024  retval = get_toolbar ();
1025  else if (pname.compare ("units"))
1026  retval = get_units ();
1027  else if (pname.compare ("windowbuttondownfcn"))
1028  retval = get_windowbuttondownfcn ();
1029  else if (pname.compare ("windowbuttonmotionfcn"))
1030  retval = get_windowbuttonmotionfcn ();
1031  else if (pname.compare ("windowbuttonupfcn"))
1032  retval = get_windowbuttonupfcn ();
1033  else if (pname.compare ("windowkeypressfcn"))
1034  retval = get_windowkeypressfcn ();
1035  else if (pname.compare ("windowkeyreleasefcn"))
1036  retval = get_windowkeyreleasefcn ();
1037  else if (pname.compare ("windowscrollwheelfcn"))
1038  retval = get_windowscrollwheelfcn ();
1039  else if (pname.compare ("windowstyle"))
1040  retval = get_windowstyle ();
1041  else if (pname.compare ("wvisual"))
1042  retval = get_wvisual ();
1043  else if (pname.compare ("wvisualmode"))
1044  retval = get_wvisualmode ();
1045  else if (pname.compare ("xdisplay"))
1046  retval = get_xdisplay ();
1047  else if (pname.compare ("xvisual"))
1048  retval = get_xvisual ();
1049  else if (pname.compare ("xvisualmode"))
1050  retval = get_xvisualmode ();
1051  else if (pname.compare ("__enhanced__"))
1052  retval = get___enhanced__ ();
1053  else if (pname.compare ("__graphics_toolkit__"))
1054  retval = get___graphics_toolkit__ ();
1055  else if (pname.compare ("__guidata__"))
1056  retval = get___guidata__ ();
1057  else if (pname.compare ("__plot_stream__"))
1058  retval = get___plot_stream__ ();
1059  else
1060  retval = base_properties::get (pname);
1061 
1062  return retval;
1063 }
1064 
1065 property
1067 {
1068  const std::set<std::string>& pnames = all_property_names ();
1069 
1070  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
1071 
1072  if (error_state)
1073  return property ();
1074 
1075  if (pname.compare ("alphamap"))
1076  return property (&alphamap, true);
1077  else if (pname.compare ("buttondownfcn"))
1078  return property (&buttondownfcn, true);
1079  else if (pname.compare ("closerequestfcn"))
1080  return property (&closerequestfcn, true);
1081  else if (pname.compare ("color"))
1082  return property (&color, true);
1083  else if (pname.compare ("colormap"))
1084  return property (&colormap, true);
1085  else if (pname.compare ("currentaxes"))
1086  return property (&currentaxes, true);
1087  else if (pname.compare ("currentcharacter"))
1088  return property (&currentcharacter, true);
1089  else if (pname.compare ("currentobject"))
1090  return property (&currentobject, true);
1091  else if (pname.compare ("currentpoint"))
1092  return property (&currentpoint, true);
1093  else if (pname.compare ("dockcontrols"))
1094  return property (&dockcontrols, true);
1095  else if (pname.compare ("doublebuffer"))
1096  return property (&doublebuffer, true);
1097  else if (pname.compare ("filename"))
1098  return property (&filename, true);
1099  else if (pname.compare ("integerhandle"))
1100  return property (&integerhandle, true);
1101  else if (pname.compare ("inverthardcopy"))
1102  return property (&inverthardcopy, true);
1103  else if (pname.compare ("keypressfcn"))
1104  return property (&keypressfcn, true);
1105  else if (pname.compare ("keyreleasefcn"))
1106  return property (&keyreleasefcn, true);
1107  else if (pname.compare ("menubar"))
1108  return property (&menubar, true);
1109  else if (pname.compare ("mincolormap"))
1110  return property (&mincolormap, true);
1111  else if (pname.compare ("name"))
1112  return property (&name, true);
1113  else if (pname.compare ("nextplot"))
1114  return property (&nextplot, true);
1115  else if (pname.compare ("numbertitle"))
1116  return property (&numbertitle, true);
1117  else if (pname.compare ("outerposition"))
1118  return property (&outerposition, true);
1119  else if (pname.compare ("paperorientation"))
1120  return property (&paperorientation, true);
1121  else if (pname.compare ("paperposition"))
1122  return property (&paperposition, true);
1123  else if (pname.compare ("paperpositionmode"))
1124  return property (&paperpositionmode, true);
1125  else if (pname.compare ("papersize"))
1126  return property (&papersize, true);
1127  else if (pname.compare ("papertype"))
1128  return property (&papertype, true);
1129  else if (pname.compare ("paperunits"))
1130  return property (&paperunits, true);
1131  else if (pname.compare ("pointer"))
1132  return property (&pointer, true);
1133  else if (pname.compare ("pointershapecdata"))
1134  return property (&pointershapecdata, true);
1135  else if (pname.compare ("pointershapehotspot"))
1136  return property (&pointershapehotspot, true);
1137  else if (pname.compare ("position"))
1138  return property (&position, true);
1139  else if (pname.compare ("renderer"))
1140  return property (&renderer, true);
1141  else if (pname.compare ("renderermode"))
1142  return property (&renderermode, true);
1143  else if (pname.compare ("resize"))
1144  return property (&resize, true);
1145  else if (pname.compare ("resizefcn"))
1146  return property (&resizefcn, true);
1147  else if (pname.compare ("selectiontype"))
1148  return property (&selectiontype, true);
1149  else if (pname.compare ("toolbar"))
1150  return property (&toolbar, true);
1151  else if (pname.compare ("units"))
1152  return property (&units, true);
1153  else if (pname.compare ("windowbuttondownfcn"))
1154  return property (&windowbuttondownfcn, true);
1155  else if (pname.compare ("windowbuttonmotionfcn"))
1156  return property (&windowbuttonmotionfcn, true);
1157  else if (pname.compare ("windowbuttonupfcn"))
1158  return property (&windowbuttonupfcn, true);
1159  else if (pname.compare ("windowkeypressfcn"))
1160  return property (&windowkeypressfcn, true);
1161  else if (pname.compare ("windowkeyreleasefcn"))
1162  return property (&windowkeyreleasefcn, true);
1163  else if (pname.compare ("windowscrollwheelfcn"))
1164  return property (&windowscrollwheelfcn, true);
1165  else if (pname.compare ("windowstyle"))
1166  return property (&windowstyle, true);
1167  else if (pname.compare ("wvisual"))
1168  return property (&wvisual, true);
1169  else if (pname.compare ("wvisualmode"))
1170  return property (&wvisualmode, true);
1171  else if (pname.compare ("xdisplay"))
1172  return property (&xdisplay, true);
1173  else if (pname.compare ("xvisual"))
1174  return property (&xvisual, true);
1175  else if (pname.compare ("xvisualmode"))
1176  return property (&xvisualmode, true);
1177  else if (pname.compare ("__enhanced__"))
1178  return property (&__enhanced__, true);
1179  else if (pname.compare ("__graphics_toolkit__"))
1180  return property (&__graphics_toolkit__, true);
1181  else if (pname.compare ("__guidata__"))
1182  return property (&__guidata__, true);
1183  else if (pname.compare ("__plot_stream__"))
1184  return property (&__plot_stream__, true);
1185  else
1186  return base_properties::get_property (pname);
1187 }
1188 
1191 {
1193 
1194  m["alphamap"] = Matrix (64, 1, 1);
1195  m["buttondownfcn"] = Matrix ();
1196  m["closerequestfcn"] = "closereq";
1197  m["color"] = color_property (color_values (1, 1, 1), radio_values ("none"));
1198  m["colormap"] = jet_colormap ();
1199  m["currentaxes"] = graphics_handle ().as_octave_value ();
1200  m["currentcharacter"] = "";
1201  m["currentobject"] = graphics_handle ().as_octave_value ();
1202  m["currentpoint"] = Matrix (2, 1, 0);
1203  m["dockcontrols"] = "off";
1204  m["doublebuffer"] = "on";
1205  m["filename"] = "";
1206  m["integerhandle"] = "on";
1207  m["inverthardcopy"] = "off";
1208  m["keypressfcn"] = Matrix ();
1209  m["keyreleasefcn"] = Matrix ();
1210  m["menubar"] = "figure";
1211  m["mincolormap"] = 64;
1212  m["name"] = "";
1213  m["nextplot"] = "add";
1214  m["numbertitle"] = "on";
1215  m["outerposition"] = Matrix (1, 4, -1.0);
1216  m["paperorientation"] = "portrait";
1217  m["paperposition"] = default_figure_paperposition ();
1218  m["paperpositionmode"] = "manual";
1219  m["papersize"] = default_figure_papersize ();
1220  m["papertype"] = "usletter";
1221  m["paperunits"] = "inches";
1222  m["pointer"] = "arrow";
1223  m["pointershapecdata"] = Matrix (16, 16, 0);
1224  m["pointershapehotspot"] = Matrix (1, 2, 0);
1225  m["position"] = default_figure_position ();
1226  m["renderer"] = "painters";
1227  m["renderermode"] = "auto";
1228  m["resize"] = "on";
1229  m["resizefcn"] = Matrix ();
1230  m["selectiontype"] = "normal";
1231  m["toolbar"] = "auto";
1232  m["units"] = "pixels";
1233  m["windowbuttondownfcn"] = Matrix ();
1234  m["windowbuttonmotionfcn"] = Matrix ();
1235  m["windowbuttonupfcn"] = Matrix ();
1236  m["windowkeypressfcn"] = Matrix ();
1237  m["windowkeyreleasefcn"] = Matrix ();
1238  m["windowscrollwheelfcn"] = Matrix ();
1239  m["windowstyle"] = "normal";
1240  m["wvisual"] = "";
1241  m["wvisualmode"] = "auto";
1242  m["xdisplay"] = "";
1243  m["xvisual"] = "";
1244  m["xvisualmode"] = "auto";
1245  m["__enhanced__"] = "on";
1246  m["__graphics_toolkit__"] = gtk_manager::default_toolkit ();
1247  m["__guidata__"] = Matrix ();
1248  m["__plot_stream__"] = Matrix ();
1249 
1250  return m;
1251 }
1252 
1253 std::string figure::properties::go_name ("figure");
1254 
1255 std::set<std::string>
1257 {
1258  static std::set<std::string> all_pnames;
1259 
1260  static bool initialized = false;
1261 
1262  if (! initialized)
1263  {
1264  all_pnames.insert ("alphamap");
1265  all_pnames.insert ("buttondownfcn");
1266  all_pnames.insert ("closerequestfcn");
1267  all_pnames.insert ("color");
1268  all_pnames.insert ("colormap");
1269  all_pnames.insert ("currentaxes");
1270  all_pnames.insert ("currentcharacter");
1271  all_pnames.insert ("currentobject");
1272  all_pnames.insert ("currentpoint");
1273  all_pnames.insert ("dockcontrols");
1274  all_pnames.insert ("doublebuffer");
1275  all_pnames.insert ("filename");
1276  all_pnames.insert ("integerhandle");
1277  all_pnames.insert ("inverthardcopy");
1278  all_pnames.insert ("keypressfcn");
1279  all_pnames.insert ("keyreleasefcn");
1280  all_pnames.insert ("menubar");
1281  all_pnames.insert ("mincolormap");
1282  all_pnames.insert ("name");
1283  all_pnames.insert ("nextplot");
1284  all_pnames.insert ("numbertitle");
1285  all_pnames.insert ("outerposition");
1286  all_pnames.insert ("paperorientation");
1287  all_pnames.insert ("paperposition");
1288  all_pnames.insert ("paperpositionmode");
1289  all_pnames.insert ("papersize");
1290  all_pnames.insert ("papertype");
1291  all_pnames.insert ("paperunits");
1292  all_pnames.insert ("pointer");
1293  all_pnames.insert ("pointershapecdata");
1294  all_pnames.insert ("pointershapehotspot");
1295  all_pnames.insert ("position");
1296  all_pnames.insert ("renderer");
1297  all_pnames.insert ("renderermode");
1298  all_pnames.insert ("resize");
1299  all_pnames.insert ("resizefcn");
1300  all_pnames.insert ("selectiontype");
1301  all_pnames.insert ("toolbar");
1302  all_pnames.insert ("units");
1303  all_pnames.insert ("windowbuttondownfcn");
1304  all_pnames.insert ("windowbuttonmotionfcn");
1305  all_pnames.insert ("windowbuttonupfcn");
1306  all_pnames.insert ("windowkeypressfcn");
1307  all_pnames.insert ("windowkeyreleasefcn");
1308  all_pnames.insert ("windowscrollwheelfcn");
1309  all_pnames.insert ("windowstyle");
1310  all_pnames.insert ("wvisual");
1311  all_pnames.insert ("wvisualmode");
1312  all_pnames.insert ("xdisplay");
1313  all_pnames.insert ("xvisual");
1314  all_pnames.insert ("xvisualmode");
1315  all_pnames.insert ("__enhanced__");
1316  all_pnames.insert ("__graphics_toolkit__");
1317  all_pnames.insert ("__guidata__");
1318  all_pnames.insert ("__plot_stream__");
1319 
1320  std::set<std::string> base_pnames = base_properties::core_property_names ();
1321  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
1322 
1323  initialized = true;
1324  }
1325 
1326  return all_pnames;
1327 }
1328 
1329 bool
1331 {
1332  std::set<std::string> pnames = core_property_names ();
1333 
1334  return pnames.find (pname) != pnames.end ();
1335 }
1336 
1337 std::set<std::string>
1339 {
1340  static std::set<std::string> all_pnames = core_property_names ();
1341 
1342  std::set<std::string> retval = all_pnames;
1343  std::set<std::string> base_props = base_properties::all_property_names ();
1344  retval.insert (base_props.begin (), base_props.end ());
1345 
1346  return retval;
1347 }
1348 
1349 bool
1351 {
1352  std::set<std::string> pnames = all_property_names ();
1353 
1354  return pnames.find (pname) != pnames.end ();
1355 }
1356 
1357 // ******** axes ********
1358 
1360  : base_properties (go_name, mh, p),
1361  activepositionproperty ("activepositionproperty", mh, "{outerposition}|position"),
1362  alim ("alim", mh, default_lim ()),
1363  alimmode ("alimmode", mh, "{auto}|manual"),
1364  ambientlightcolor ("ambientlightcolor", mh, color_values (1, 1, 1)),
1365  box ("box", mh, "on"),
1366  cameraposition ("cameraposition", mh, Matrix (1, 3, 0.0)),
1367  camerapositionmode ("camerapositionmode", mh, "{auto}|manual"),
1368  cameratarget ("cameratarget", mh, Matrix (1, 3, 0.0)),
1369  cameratargetmode ("cameratargetmode", mh, "{auto}|manual"),
1370  cameraupvector ("cameraupvector", mh, Matrix ()),
1371  cameraupvectormode ("cameraupvectormode", mh, "{auto}|manual"),
1372  cameraviewangle ("cameraviewangle", mh, 10.0),
1373  cameraviewanglemode ("cameraviewanglemode", mh, "{auto}|manual"),
1374  clim ("clim", mh, default_lim ()),
1375  climmode ("climmode", mh, "{auto}|manual"),
1376  color ("color", mh, color_property (color_values (1, 1, 1), radio_values ("none"))),
1377  colororder ("colororder", mh, default_colororder ()),
1378  currentpoint ("currentpoint", mh, Matrix (2, 3, 0.0)),
1379  dataaspectratio ("dataaspectratio", mh, Matrix (1, 3, 1.0)),
1380  dataaspectratiomode ("dataaspectratiomode", mh, "{auto}|manual"),
1381  drawmode ("drawmode", mh, "{normal}|fast"),
1382  fontangle ("fontangle", mh, "{normal}|italic|oblique"),
1383  fontname ("fontname", mh, OCTAVE_DEFAULT_FONTNAME),
1384  fontsize ("fontsize", mh, 10),
1385  fontunits ("fontunits", mh, "{points}|normalized|inches|centimeters|pixels"),
1386  fontweight ("fontweight", mh, "{normal}|light|demi|bold"),
1387  gridlinestyle ("gridlinestyle", mh, "-|--|{:}|-.|none"),
1388  interpreter ("interpreter", mh, "tex|{none}|latex"),
1389  layer ("layer", mh, "{bottom}|top"),
1390  linestyleorder ("linestyleorder", mh, "-"),
1391  linewidth ("linewidth", mh, 0.5),
1392  minorgridlinestyle ("minorgridlinestyle", mh, "-|--|{:}|-.|none"),
1393  nextplot ("nextplot", mh, "add|replacechildren|{replace}"),
1394  outerposition ("outerposition", mh, default_axes_outerposition ()),
1395  plotboxaspectratio ("plotboxaspectratio", mh, Matrix (1, 3, 1.0)),
1396  plotboxaspectratiomode ("plotboxaspectratiomode", mh, "{auto}|manual"),
1397  position ("position", mh, default_axes_position ()),
1398  projection ("projection", mh, "{orthographic}|perpective"),
1399  tickdir ("tickdir", mh, "{in}|out"),
1400  tickdirmode ("tickdirmode", mh, "{auto}|manual"),
1401  ticklength ("ticklength", mh, default_axes_ticklength ()),
1402  tightinset ("tightinset", mh, Matrix (1, 4, 0.0)),
1403  title ("title", mh, gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)),
1404  units ("units", mh, "{normalized}|inches|centimeters|points|pixels|characters"),
1405  view ("view", mh, Matrix ()),
1406  xaxislocation ("xaxislocation", mh, "{bottom}|top|zero"),
1407  xcolor ("xcolor", mh, color_values (0, 0, 0)),
1408  xdir ("xdir", mh, "{normal}|reverse"),
1409  xgrid ("xgrid", mh, "off"),
1410  xlabel ("xlabel", mh, gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)),
1411  xlim ("xlim", mh, default_lim ()),
1412  xlimmode ("xlimmode", mh, "{auto}|manual"),
1413  xminorgrid ("xminorgrid", mh, "off"),
1414  xminortick ("xminortick", mh, "off"),
1415  xscale ("xscale", mh, "{linear}|log"),
1416  xtick ("xtick", mh, default_axes_tick ()),
1417  xticklabel ("xticklabel", mh, ""),
1418  xticklabelmode ("xticklabelmode", mh, "{auto}|manual"),
1419  xtickmode ("xtickmode", mh, "{auto}|manual"),
1420  yaxislocation ("yaxislocation", mh, "{left}|right|zero"),
1421  ycolor ("ycolor", mh, color_values (0, 0, 0)),
1422  ydir ("ydir", mh, "{normal}|reverse"),
1423  ygrid ("ygrid", mh, "off"),
1424  ylabel ("ylabel", mh, gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)),
1425  ylim ("ylim", mh, default_lim ()),
1426  ylimmode ("ylimmode", mh, "{auto}|manual"),
1427  yminorgrid ("yminorgrid", mh, "off"),
1428  yminortick ("yminortick", mh, "off"),
1429  yscale ("yscale", mh, "{linear}|log"),
1430  ytick ("ytick", mh, default_axes_tick ()),
1431  yticklabel ("yticklabel", mh, ""),
1432  yticklabelmode ("yticklabelmode", mh, "{auto}|manual"),
1433  ytickmode ("ytickmode", mh, "{auto}|manual"),
1434  zcolor ("zcolor", mh, color_values (0, 0, 0)),
1435  zdir ("zdir", mh, "{normal}|reverse"),
1436  zgrid ("zgrid", mh, "off"),
1437  zlabel ("zlabel", mh, gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)),
1438  zlim ("zlim", mh, default_lim ()),
1439  zlimmode ("zlimmode", mh, "{auto}|manual"),
1440  zminorgrid ("zminorgrid", mh, "off"),
1441  zminortick ("zminortick", mh, "off"),
1442  zscale ("zscale", mh, "{linear}|log"),
1443  ztick ("ztick", mh, default_axes_tick ()),
1444  zticklabel ("zticklabel", mh, ""),
1445  zticklabelmode ("zticklabelmode", mh, "{auto}|manual"),
1446  ztickmode ("ztickmode", mh, "{auto}|manual"),
1447  __hold_all__ ("__hold_all__", mh, "off"),
1448  autopos_tag ("autopos_tag", mh, "{none}|subplot"),
1449  looseinset ("looseinset", mh, Matrix (1, 4, 0.0)),
1450  x_viewtransform ("x_viewtransform", mh, Matrix (4, 4, 0.0)),
1451  x_projectiontransform ("x_projectiontransform", mh, Matrix (4, 4, 0.0)),
1452  x_viewporttransform ("x_viewporttransform", mh, Matrix (4, 4, 0.0)),
1453  x_normrendertransform ("x_normrendertransform", mh, Matrix (4, 4, 0.0)),
1454  x_rendertransform ("x_rendertransform", mh, Matrix (4, 4, 0.0)),
1455  xmtick ("xmtick", mh, Matrix ()),
1456  ymtick ("ymtick", mh, Matrix ()),
1457  zmtick ("zmtick", mh, Matrix ())
1458 {
1460  alim.set_id (ID_ALIM);
1463  box.set_id (ID_BOX);
1472  clim.set_id (ID_CLIM);
1474  color.set_id (ID_COLOR);
1487  layer.set_id (ID_LAYER);
1501  title.set_id (ID_TITLE);
1502  units.set_id (ID_UNITS);
1503  view.set_id (ID_VIEW);
1506  xdir.set_id (ID_XDIR);
1507  xgrid.set_id (ID_XGRID);
1509  xlim.set_id (ID_XLIM);
1514  xtick.set_id (ID_XTICK);
1520  ydir.set_id (ID_YDIR);
1521  ygrid.set_id (ID_YGRID);
1523  ylim.set_id (ID_YLIM);
1528  ytick.set_id (ID_YTICK);
1533  zdir.set_id (ID_ZDIR);
1534  zgrid.set_id (ID_ZGRID);
1536  zlim.set_id (ID_ZLIM);
1541  ztick.set_id (ID_ZTICK);
1546  __hold_all__.set_hidden (true);
1548  autopos_tag.set_hidden (true);
1550  looseinset.set_hidden (true);
1552  x_viewtransform.set_hidden (true);
1562  xmtick.set_hidden (true);
1564  ymtick.set_hidden (true);
1566  zmtick.set_hidden (true);
1567  init ();
1568 }
1569 
1570 void
1571 axes::properties::set (const caseless_str& pname_arg, const octave_value& val)
1572 {
1573  const std::set<std::string>& pnames = all_property_names ();
1574 
1575  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
1576 
1577  if (error_state)
1578  return;
1579 
1580  if (pname.compare ("activepositionproperty"))
1581  set_activepositionproperty (val);
1582  else if (pname.compare ("alim"))
1583  set_alim (val);
1584  else if (pname.compare ("alimmode"))
1585  set_alimmode (val);
1586  else if (pname.compare ("ambientlightcolor"))
1587  set_ambientlightcolor (val);
1588  else if (pname.compare ("box"))
1589  set_box (val);
1590  else if (pname.compare ("cameraposition"))
1591  set_cameraposition (val);
1592  else if (pname.compare ("camerapositionmode"))
1593  set_camerapositionmode (val);
1594  else if (pname.compare ("cameratarget"))
1595  set_cameratarget (val);
1596  else if (pname.compare ("cameratargetmode"))
1597  set_cameratargetmode (val);
1598  else if (pname.compare ("cameraupvector"))
1599  set_cameraupvector (val);
1600  else if (pname.compare ("cameraupvectormode"))
1601  set_cameraupvectormode (val);
1602  else if (pname.compare ("cameraviewangle"))
1603  set_cameraviewangle (val);
1604  else if (pname.compare ("cameraviewanglemode"))
1605  set_cameraviewanglemode (val);
1606  else if (pname.compare ("clim"))
1607  set_clim (val);
1608  else if (pname.compare ("climmode"))
1609  set_climmode (val);
1610  else if (pname.compare ("color"))
1611  set_color (val);
1612  else if (pname.compare ("colororder"))
1613  set_colororder (val);
1614  else if (pname.compare ("currentpoint"))
1615  set_currentpoint (val);
1616  else if (pname.compare ("dataaspectratio"))
1617  set_dataaspectratio (val);
1618  else if (pname.compare ("dataaspectratiomode"))
1619  set_dataaspectratiomode (val);
1620  else if (pname.compare ("drawmode"))
1621  set_drawmode (val);
1622  else if (pname.compare ("fontangle"))
1623  set_fontangle (val);
1624  else if (pname.compare ("fontname"))
1625  set_fontname (val);
1626  else if (pname.compare ("fontsize"))
1627  set_fontsize (val);
1628  else if (pname.compare ("fontunits"))
1629  set_fontunits (val);
1630  else if (pname.compare ("fontweight"))
1631  set_fontweight (val);
1632  else if (pname.compare ("gridlinestyle"))
1633  set_gridlinestyle (val);
1634  else if (pname.compare ("interpreter"))
1635  set_interpreter (val);
1636  else if (pname.compare ("layer"))
1637  set_layer (val);
1638  else if (pname.compare ("linestyleorder"))
1639  set_linestyleorder (val);
1640  else if (pname.compare ("linewidth"))
1641  set_linewidth (val);
1642  else if (pname.compare ("minorgridlinestyle"))
1643  set_minorgridlinestyle (val);
1644  else if (pname.compare ("nextplot"))
1645  set_nextplot (val);
1646  else if (pname.compare ("outerposition"))
1647  set_outerposition (val);
1648  else if (pname.compare ("plotboxaspectratio"))
1649  set_plotboxaspectratio (val);
1650  else if (pname.compare ("plotboxaspectratiomode"))
1651  set_plotboxaspectratiomode (val);
1652  else if (pname.compare ("position"))
1653  set_position (val);
1654  else if (pname.compare ("projection"))
1655  set_projection (val);
1656  else if (pname.compare ("tickdir"))
1657  set_tickdir (val);
1658  else if (pname.compare ("tickdirmode"))
1659  set_tickdirmode (val);
1660  else if (pname.compare ("ticklength"))
1661  set_ticklength (val);
1662  else if (pname.compare ("title"))
1663  set_title (val);
1664  else if (pname.compare ("units"))
1665  set_units (val);
1666  else if (pname.compare ("view"))
1667  set_view (val);
1668  else if (pname.compare ("xaxislocation"))
1669  set_xaxislocation (val);
1670  else if (pname.compare ("xcolor"))
1671  set_xcolor (val);
1672  else if (pname.compare ("xdir"))
1673  set_xdir (val);
1674  else if (pname.compare ("xgrid"))
1675  set_xgrid (val);
1676  else if (pname.compare ("xlabel"))
1677  set_xlabel (val);
1678  else if (pname.compare ("xlim"))
1679  set_xlim (val);
1680  else if (pname.compare ("xlimmode"))
1681  set_xlimmode (val);
1682  else if (pname.compare ("xminorgrid"))
1683  set_xminorgrid (val);
1684  else if (pname.compare ("xminortick"))
1685  set_xminortick (val);
1686  else if (pname.compare ("xscale"))
1687  set_xscale (val);
1688  else if (pname.compare ("xtick"))
1689  set_xtick (val);
1690  else if (pname.compare ("xticklabel"))
1691  set_xticklabel (val);
1692  else if (pname.compare ("xticklabelmode"))
1693  set_xticklabelmode (val);
1694  else if (pname.compare ("xtickmode"))
1695  set_xtickmode (val);
1696  else if (pname.compare ("yaxislocation"))
1697  set_yaxislocation (val);
1698  else if (pname.compare ("ycolor"))
1699  set_ycolor (val);
1700  else if (pname.compare ("ydir"))
1701  set_ydir (val);
1702  else if (pname.compare ("ygrid"))
1703  set_ygrid (val);
1704  else if (pname.compare ("ylabel"))
1705  set_ylabel (val);
1706  else if (pname.compare ("ylim"))
1707  set_ylim (val);
1708  else if (pname.compare ("ylimmode"))
1709  set_ylimmode (val);
1710  else if (pname.compare ("yminorgrid"))
1711  set_yminorgrid (val);
1712  else if (pname.compare ("yminortick"))
1713  set_yminortick (val);
1714  else if (pname.compare ("yscale"))
1715  set_yscale (val);
1716  else if (pname.compare ("ytick"))
1717  set_ytick (val);
1718  else if (pname.compare ("yticklabel"))
1719  set_yticklabel (val);
1720  else if (pname.compare ("yticklabelmode"))
1721  set_yticklabelmode (val);
1722  else if (pname.compare ("ytickmode"))
1723  set_ytickmode (val);
1724  else if (pname.compare ("zcolor"))
1725  set_zcolor (val);
1726  else if (pname.compare ("zdir"))
1727  set_zdir (val);
1728  else if (pname.compare ("zgrid"))
1729  set_zgrid (val);
1730  else if (pname.compare ("zlabel"))
1731  set_zlabel (val);
1732  else if (pname.compare ("zlim"))
1733  set_zlim (val);
1734  else if (pname.compare ("zlimmode"))
1735  set_zlimmode (val);
1736  else if (pname.compare ("zminorgrid"))
1737  set_zminorgrid (val);
1738  else if (pname.compare ("zminortick"))
1739  set_zminortick (val);
1740  else if (pname.compare ("zscale"))
1741  set_zscale (val);
1742  else if (pname.compare ("ztick"))
1743  set_ztick (val);
1744  else if (pname.compare ("zticklabel"))
1745  set_zticklabel (val);
1746  else if (pname.compare ("zticklabelmode"))
1747  set_zticklabelmode (val);
1748  else if (pname.compare ("ztickmode"))
1749  set_ztickmode (val);
1750  else if (pname.compare ("__hold_all__"))
1751  set___hold_all__ (val);
1752  else if (pname.compare ("autopos_tag"))
1753  set_autopos_tag (val);
1754  else if (pname.compare ("looseinset"))
1755  set_looseinset (val);
1756  else if (pname.compare ("x_viewtransform"))
1757  set_x_viewtransform (val);
1758  else if (pname.compare ("x_projectiontransform"))
1759  set_x_projectiontransform (val);
1760  else if (pname.compare ("x_viewporttransform"))
1761  set_x_viewporttransform (val);
1762  else if (pname.compare ("x_normrendertransform"))
1763  set_x_normrendertransform (val);
1764  else if (pname.compare ("x_rendertransform"))
1765  set_x_rendertransform (val);
1766  else if (pname.compare ("xmtick"))
1767  set_xmtick (val);
1768  else if (pname.compare ("ymtick"))
1769  set_ymtick (val);
1770  else if (pname.compare ("zmtick"))
1771  set_zmtick (val);
1772  else
1773  base_properties::set (pname, val);
1774 }
1775 
1777 axes::properties::get (bool all) const
1778 {
1780 
1781  m.assign ("activepositionproperty", octave_value (get_activepositionproperty ()));
1782  m.assign ("alim", octave_value (get_alim ()));
1783  m.assign ("alimmode", octave_value (get_alimmode ()));
1784  m.assign ("ambientlightcolor", octave_value (get_ambientlightcolor ()));
1785  m.assign ("box", octave_value (get_box ()));
1786  m.assign ("cameraposition", octave_value (get_cameraposition ()));
1787  m.assign ("camerapositionmode", octave_value (get_camerapositionmode ()));
1788  m.assign ("cameratarget", octave_value (get_cameratarget ()));
1789  m.assign ("cameratargetmode", octave_value (get_cameratargetmode ()));
1790  m.assign ("cameraupvector", octave_value (get_cameraupvector ()));
1791  m.assign ("cameraupvectormode", octave_value (get_cameraupvectormode ()));
1792  m.assign ("cameraviewangle", octave_value (get_cameraviewangle ()));
1793  m.assign ("cameraviewanglemode", octave_value (get_cameraviewanglemode ()));
1794  m.assign ("clim", octave_value (get_clim ()));
1795  m.assign ("climmode", octave_value (get_climmode ()));
1796  m.assign ("color", octave_value (get_color ()));
1797  m.assign ("colororder", octave_value (get_colororder ()));
1798  m.assign ("currentpoint", octave_value (get_currentpoint ()));
1799  m.assign ("dataaspectratio", octave_value (get_dataaspectratio ()));
1800  m.assign ("dataaspectratiomode", octave_value (get_dataaspectratiomode ()));
1801  m.assign ("drawmode", octave_value (get_drawmode ()));
1802  m.assign ("fontangle", octave_value (get_fontangle ()));
1803  m.assign ("fontname", octave_value (get_fontname ()));
1804  m.assign ("fontsize", octave_value (get_fontsize ()));
1805  m.assign ("fontunits", octave_value (get_fontunits ()));
1806  m.assign ("fontweight", octave_value (get_fontweight ()));
1807  m.assign ("gridlinestyle", octave_value (get_gridlinestyle ()));
1808  m.assign ("interpreter", octave_value (get_interpreter ()));
1809  m.assign ("layer", octave_value (get_layer ()));
1810  m.assign ("linestyleorder", octave_value (get_linestyleorder ()));
1811  m.assign ("linewidth", octave_value (get_linewidth ()));
1812  m.assign ("minorgridlinestyle", octave_value (get_minorgridlinestyle ()));
1813  m.assign ("nextplot", octave_value (get_nextplot ()));
1814  m.assign ("outerposition", octave_value (get_outerposition ()));
1815  m.assign ("plotboxaspectratio", octave_value (get_plotboxaspectratio ()));
1816  m.assign ("plotboxaspectratiomode", octave_value (get_plotboxaspectratiomode ()));
1817  m.assign ("position", octave_value (get_position ()));
1818  m.assign ("projection", octave_value (get_projection ()));
1819  m.assign ("tickdir", octave_value (get_tickdir ()));
1820  m.assign ("tickdirmode", octave_value (get_tickdirmode ()));
1821  m.assign ("ticklength", octave_value (get_ticklength ()));
1822  m.assign ("tightinset", octave_value (get_tightinset ()));
1823  m.assign ("title", octave_value (get_title ().as_octave_value ()));
1824  m.assign ("units", octave_value (get_units ()));
1825  m.assign ("view", octave_value (get_view ()));
1826  m.assign ("xaxislocation", octave_value (get_xaxislocation ()));
1827  m.assign ("xcolor", octave_value (get_xcolor ()));
1828  m.assign ("xdir", octave_value (get_xdir ()));
1829  m.assign ("xgrid", octave_value (get_xgrid ()));
1830  m.assign ("xlabel", octave_value (get_xlabel ().as_octave_value ()));
1831  m.assign ("xlim", octave_value (get_xlim ()));
1832  m.assign ("xlimmode", octave_value (get_xlimmode ()));
1833  m.assign ("xminorgrid", octave_value (get_xminorgrid ()));
1834  m.assign ("xminortick", octave_value (get_xminortick ()));
1835  m.assign ("xscale", octave_value (get_xscale ()));
1836  m.assign ("xtick", octave_value (get_xtick ()));
1837  m.assign ("xticklabel", octave_value (get_xticklabel ()));
1838  m.assign ("xticklabelmode", octave_value (get_xticklabelmode ()));
1839  m.assign ("xtickmode", octave_value (get_xtickmode ()));
1840  m.assign ("yaxislocation", octave_value (get_yaxislocation ()));
1841  m.assign ("ycolor", octave_value (get_ycolor ()));
1842  m.assign ("ydir", octave_value (get_ydir ()));
1843  m.assign ("ygrid", octave_value (get_ygrid ()));
1844  m.assign ("ylabel", octave_value (get_ylabel ().as_octave_value ()));
1845  m.assign ("ylim", octave_value (get_ylim ()));
1846  m.assign ("ylimmode", octave_value (get_ylimmode ()));
1847  m.assign ("yminorgrid", octave_value (get_yminorgrid ()));
1848  m.assign ("yminortick", octave_value (get_yminortick ()));
1849  m.assign ("yscale", octave_value (get_yscale ()));
1850  m.assign ("ytick", octave_value (get_ytick ()));
1851  m.assign ("yticklabel", octave_value (get_yticklabel ()));
1852  m.assign ("yticklabelmode", octave_value (get_yticklabelmode ()));
1853  m.assign ("ytickmode", octave_value (get_ytickmode ()));
1854  m.assign ("zcolor", octave_value (get_zcolor ()));
1855  m.assign ("zdir", octave_value (get_zdir ()));
1856  m.assign ("zgrid", octave_value (get_zgrid ()));
1857  m.assign ("zlabel", octave_value (get_zlabel ().as_octave_value ()));
1858  m.assign ("zlim", octave_value (get_zlim ()));
1859  m.assign ("zlimmode", octave_value (get_zlimmode ()));
1860  m.assign ("zminorgrid", octave_value (get_zminorgrid ()));
1861  m.assign ("zminortick", octave_value (get_zminortick ()));
1862  m.assign ("zscale", octave_value (get_zscale ()));
1863  m.assign ("ztick", octave_value (get_ztick ()));
1864  m.assign ("zticklabel", octave_value (get_zticklabel ()));
1865  m.assign ("zticklabelmode", octave_value (get_zticklabelmode ()));
1866  m.assign ("ztickmode", octave_value (get_ztickmode ()));
1867  if (all)
1868  m.assign ("__hold_all__", octave_value (get___hold_all__ ()));
1869  if (all)
1870  m.assign ("autopos_tag", octave_value (get_autopos_tag ()));
1871  if (all)
1872  m.assign ("looseinset", octave_value (get_looseinset ()));
1873  if (all)
1874  m.assign ("x_viewtransform", octave_value (get_x_viewtransform ()));
1875  if (all)
1876  m.assign ("x_projectiontransform", octave_value (get_x_projectiontransform ()));
1877  if (all)
1878  m.assign ("x_viewporttransform", octave_value (get_x_viewporttransform ()));
1879  if (all)
1880  m.assign ("x_normrendertransform", octave_value (get_x_normrendertransform ()));
1881  if (all)
1882  m.assign ("x_rendertransform", octave_value (get_x_rendertransform ()));
1883  if (all)
1884  m.assign ("xmtick", octave_value (get_xmtick ()));
1885  if (all)
1886  m.assign ("ymtick", octave_value (get_ymtick ()));
1887  if (all)
1888  m.assign ("zmtick", octave_value (get_zmtick ()));
1889 
1890  return m;
1891 }
1892 
1894 axes::properties::get (const caseless_str& pname_arg) const
1895 {
1896  octave_value retval;
1897 
1898  const std::set<std::string>& pnames = all_property_names ();
1899 
1900  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
1901 
1902  if (error_state)
1903  return retval;
1904 
1905  if (pname.compare ("activepositionproperty"))
1906  retval = get_activepositionproperty ();
1907  else if (pname.compare ("alim"))
1908  retval = get_alim ();
1909  else if (pname.compare ("alimmode"))
1910  retval = get_alimmode ();
1911  else if (pname.compare ("ambientlightcolor"))
1912  retval = get_ambientlightcolor ();
1913  else if (pname.compare ("box"))
1914  retval = get_box ();
1915  else if (pname.compare ("cameraposition"))
1916  retval = get_cameraposition ();
1917  else if (pname.compare ("camerapositionmode"))
1918  retval = get_camerapositionmode ();
1919  else if (pname.compare ("cameratarget"))
1920  retval = get_cameratarget ();
1921  else if (pname.compare ("cameratargetmode"))
1922  retval = get_cameratargetmode ();
1923  else if (pname.compare ("cameraupvector"))
1924  retval = get_cameraupvector ();
1925  else if (pname.compare ("cameraupvectormode"))
1926  retval = get_cameraupvectormode ();
1927  else if (pname.compare ("cameraviewangle"))
1928  retval = get_cameraviewangle ();
1929  else if (pname.compare ("cameraviewanglemode"))
1930  retval = get_cameraviewanglemode ();
1931  else if (pname.compare ("clim"))
1932  retval = get_clim ();
1933  else if (pname.compare ("climmode"))
1934  retval = get_climmode ();
1935  else if (pname.compare ("color"))
1936  retval = get_color ();
1937  else if (pname.compare ("colororder"))
1938  retval = get_colororder ();
1939  else if (pname.compare ("currentpoint"))
1940  retval = get_currentpoint ();
1941  else if (pname.compare ("dataaspectratio"))
1942  retval = get_dataaspectratio ();
1943  else if (pname.compare ("dataaspectratiomode"))
1944  retval = get_dataaspectratiomode ();
1945  else if (pname.compare ("drawmode"))
1946  retval = get_drawmode ();
1947  else if (pname.compare ("fontangle"))
1948  retval = get_fontangle ();
1949  else if (pname.compare ("fontname"))
1950  retval = get_fontname ();
1951  else if (pname.compare ("fontsize"))
1952  retval = get_fontsize ();
1953  else if (pname.compare ("fontunits"))
1954  retval = get_fontunits ();
1955  else if (pname.compare ("fontweight"))
1956  retval = get_fontweight ();
1957  else if (pname.compare ("gridlinestyle"))
1958  retval = get_gridlinestyle ();
1959  else if (pname.compare ("interpreter"))
1960  retval = get_interpreter ();
1961  else if (pname.compare ("layer"))
1962  retval = get_layer ();
1963  else if (pname.compare ("linestyleorder"))
1964  retval = get_linestyleorder ();
1965  else if (pname.compare ("linewidth"))
1966  retval = get_linewidth ();
1967  else if (pname.compare ("minorgridlinestyle"))
1968  retval = get_minorgridlinestyle ();
1969  else if (pname.compare ("nextplot"))
1970  retval = get_nextplot ();
1971  else if (pname.compare ("outerposition"))
1972  retval = get_outerposition ();
1973  else if (pname.compare ("plotboxaspectratio"))
1974  retval = get_plotboxaspectratio ();
1975  else if (pname.compare ("plotboxaspectratiomode"))
1976  retval = get_plotboxaspectratiomode ();
1977  else if (pname.compare ("position"))
1978  retval = get_position ();
1979  else if (pname.compare ("projection"))
1980  retval = get_projection ();
1981  else if (pname.compare ("tickdir"))
1982  retval = get_tickdir ();
1983  else if (pname.compare ("tickdirmode"))
1984  retval = get_tickdirmode ();
1985  else if (pname.compare ("ticklength"))
1986  retval = get_ticklength ();
1987  else if (pname.compare ("tightinset"))
1988  retval = get_tightinset ();
1989  else if (pname.compare ("title"))
1990  retval = get_title ().as_octave_value ();
1991  else if (pname.compare ("units"))
1992  retval = get_units ();
1993  else if (pname.compare ("view"))
1994  retval = get_view ();
1995  else if (pname.compare ("xaxislocation"))
1996  retval = get_xaxislocation ();
1997  else if (pname.compare ("xcolor"))
1998  retval = get_xcolor ();
1999  else if (pname.compare ("xdir"))
2000  retval = get_xdir ();
2001  else if (pname.compare ("xgrid"))
2002  retval = get_xgrid ();
2003  else if (pname.compare ("xlabel"))
2004  retval = get_xlabel ().as_octave_value ();
2005  else if (pname.compare ("xlim"))
2006  retval = get_xlim ();
2007  else if (pname.compare ("xlimmode"))
2008  retval = get_xlimmode ();
2009  else if (pname.compare ("xminorgrid"))
2010  retval = get_xminorgrid ();
2011  else if (pname.compare ("xminortick"))
2012  retval = get_xminortick ();
2013  else if (pname.compare ("xscale"))
2014  retval = get_xscale ();
2015  else if (pname.compare ("xtick"))
2016  retval = get_xtick ();
2017  else if (pname.compare ("xticklabel"))
2018  retval = get_xticklabel ();
2019  else if (pname.compare ("xticklabelmode"))
2020  retval = get_xticklabelmode ();
2021  else if (pname.compare ("xtickmode"))
2022  retval = get_xtickmode ();
2023  else if (pname.compare ("yaxislocation"))
2024  retval = get_yaxislocation ();
2025  else if (pname.compare ("ycolor"))
2026  retval = get_ycolor ();
2027  else if (pname.compare ("ydir"))
2028  retval = get_ydir ();
2029  else if (pname.compare ("ygrid"))
2030  retval = get_ygrid ();
2031  else if (pname.compare ("ylabel"))
2032  retval = get_ylabel ().as_octave_value ();
2033  else if (pname.compare ("ylim"))
2034  retval = get_ylim ();
2035  else if (pname.compare ("ylimmode"))
2036  retval = get_ylimmode ();
2037  else if (pname.compare ("yminorgrid"))
2038  retval = get_yminorgrid ();
2039  else if (pname.compare ("yminortick"))
2040  retval = get_yminortick ();
2041  else if (pname.compare ("yscale"))
2042  retval = get_yscale ();
2043  else if (pname.compare ("ytick"))
2044  retval = get_ytick ();
2045  else if (pname.compare ("yticklabel"))
2046  retval = get_yticklabel ();
2047  else if (pname.compare ("yticklabelmode"))
2048  retval = get_yticklabelmode ();
2049  else if (pname.compare ("ytickmode"))
2050  retval = get_ytickmode ();
2051  else if (pname.compare ("zcolor"))
2052  retval = get_zcolor ();
2053  else if (pname.compare ("zdir"))
2054  retval = get_zdir ();
2055  else if (pname.compare ("zgrid"))
2056  retval = get_zgrid ();
2057  else if (pname.compare ("zlabel"))
2058  retval = get_zlabel ().as_octave_value ();
2059  else if (pname.compare ("zlim"))
2060  retval = get_zlim ();
2061  else if (pname.compare ("zlimmode"))
2062  retval = get_zlimmode ();
2063  else if (pname.compare ("zminorgrid"))
2064  retval = get_zminorgrid ();
2065  else if (pname.compare ("zminortick"))
2066  retval = get_zminortick ();
2067  else if (pname.compare ("zscale"))
2068  retval = get_zscale ();
2069  else if (pname.compare ("ztick"))
2070  retval = get_ztick ();
2071  else if (pname.compare ("zticklabel"))
2072  retval = get_zticklabel ();
2073  else if (pname.compare ("zticklabelmode"))
2074  retval = get_zticklabelmode ();
2075  else if (pname.compare ("ztickmode"))
2076  retval = get_ztickmode ();
2077  else if (pname.compare ("__hold_all__"))
2078  retval = get___hold_all__ ();
2079  else if (pname.compare ("autopos_tag"))
2080  retval = get_autopos_tag ();
2081  else if (pname.compare ("looseinset"))
2082  retval = get_looseinset ();
2083  else if (pname.compare ("x_viewtransform"))
2084  retval = get_x_viewtransform ();
2085  else if (pname.compare ("x_projectiontransform"))
2086  retval = get_x_projectiontransform ();
2087  else if (pname.compare ("x_viewporttransform"))
2088  retval = get_x_viewporttransform ();
2089  else if (pname.compare ("x_normrendertransform"))
2090  retval = get_x_normrendertransform ();
2091  else if (pname.compare ("x_rendertransform"))
2092  retval = get_x_rendertransform ();
2093  else if (pname.compare ("xmtick"))
2094  retval = get_xmtick ();
2095  else if (pname.compare ("ymtick"))
2096  retval = get_ymtick ();
2097  else if (pname.compare ("zmtick"))
2098  retval = get_zmtick ();
2099  else
2100  retval = base_properties::get (pname);
2101 
2102  return retval;
2103 }
2104 
2105 property
2107 {
2108  const std::set<std::string>& pnames = all_property_names ();
2109 
2110  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
2111 
2112  if (error_state)
2113  return property ();
2114 
2115  if (pname.compare ("activepositionproperty"))
2116  return property (&activepositionproperty, true);
2117  else if (pname.compare ("alim"))
2118  return property (&alim, true);
2119  else if (pname.compare ("alimmode"))
2120  return property (&alimmode, true);
2121  else if (pname.compare ("ambientlightcolor"))
2122  return property (&ambientlightcolor, true);
2123  else if (pname.compare ("box"))
2124  return property (&box, true);
2125  else if (pname.compare ("cameraposition"))
2126  return property (&cameraposition, true);
2127  else if (pname.compare ("camerapositionmode"))
2128  return property (&camerapositionmode, true);
2129  else if (pname.compare ("cameratarget"))
2130  return property (&cameratarget, true);
2131  else if (pname.compare ("cameratargetmode"))
2132  return property (&cameratargetmode, true);
2133  else if (pname.compare ("cameraupvector"))
2134  return property (&cameraupvector, true);
2135  else if (pname.compare ("cameraupvectormode"))
2136  return property (&cameraupvectormode, true);
2137  else if (pname.compare ("cameraviewangle"))
2138  return property (&cameraviewangle, true);
2139  else if (pname.compare ("cameraviewanglemode"))
2140  return property (&cameraviewanglemode, true);
2141  else if (pname.compare ("clim"))
2142  return property (&clim, true);
2143  else if (pname.compare ("climmode"))
2144  return property (&climmode, true);
2145  else if (pname.compare ("color"))
2146  return property (&color, true);
2147  else if (pname.compare ("colororder"))
2148  return property (&colororder, true);
2149  else if (pname.compare ("currentpoint"))
2150  return property (&currentpoint, true);
2151  else if (pname.compare ("dataaspectratio"))
2152  return property (&dataaspectratio, true);
2153  else if (pname.compare ("dataaspectratiomode"))
2154  return property (&dataaspectratiomode, true);
2155  else if (pname.compare ("drawmode"))
2156  return property (&drawmode, true);
2157  else if (pname.compare ("fontangle"))
2158  return property (&fontangle, true);
2159  else if (pname.compare ("fontname"))
2160  return property (&fontname, true);
2161  else if (pname.compare ("fontsize"))
2162  return property (&fontsize, true);
2163  else if (pname.compare ("fontunits"))
2164  return property (&fontunits, true);
2165  else if (pname.compare ("fontweight"))
2166  return property (&fontweight, true);
2167  else if (pname.compare ("gridlinestyle"))
2168  return property (&gridlinestyle, true);
2169  else if (pname.compare ("interpreter"))
2170  return property (&interpreter, true);
2171  else if (pname.compare ("layer"))
2172  return property (&layer, true);
2173  else if (pname.compare ("linestyleorder"))
2174  return property (&linestyleorder, true);
2175  else if (pname.compare ("linewidth"))
2176  return property (&linewidth, true);
2177  else if (pname.compare ("minorgridlinestyle"))
2178  return property (&minorgridlinestyle, true);
2179  else if (pname.compare ("nextplot"))
2180  return property (&nextplot, true);
2181  else if (pname.compare ("outerposition"))
2182  return property (&outerposition, true);
2183  else if (pname.compare ("plotboxaspectratio"))
2184  return property (&plotboxaspectratio, true);
2185  else if (pname.compare ("plotboxaspectratiomode"))
2186  return property (&plotboxaspectratiomode, true);
2187  else if (pname.compare ("position"))
2188  return property (&position, true);
2189  else if (pname.compare ("projection"))
2190  return property (&projection, true);
2191  else if (pname.compare ("tickdir"))
2192  return property (&tickdir, true);
2193  else if (pname.compare ("tickdirmode"))
2194  return property (&tickdirmode, true);
2195  else if (pname.compare ("ticklength"))
2196  return property (&ticklength, true);
2197  else if (pname.compare ("tightinset"))
2198  return property (&tightinset, true);
2199  else if (pname.compare ("title"))
2200  return property (&title, true);
2201  else if (pname.compare ("units"))
2202  return property (&units, true);
2203  else if (pname.compare ("view"))
2204  return property (&view, true);
2205  else if (pname.compare ("xaxislocation"))
2206  return property (&xaxislocation, true);
2207  else if (pname.compare ("xcolor"))
2208  return property (&xcolor, true);
2209  else if (pname.compare ("xdir"))
2210  return property (&xdir, true);
2211  else if (pname.compare ("xgrid"))
2212  return property (&xgrid, true);
2213  else if (pname.compare ("xlabel"))
2214  return property (&xlabel, true);
2215  else if (pname.compare ("xlim"))
2216  return property (&xlim, true);
2217  else if (pname.compare ("xlimmode"))
2218  return property (&xlimmode, true);
2219  else if (pname.compare ("xminorgrid"))
2220  return property (&xminorgrid, true);
2221  else if (pname.compare ("xminortick"))
2222  return property (&xminortick, true);
2223  else if (pname.compare ("xscale"))
2224  return property (&xscale, true);
2225  else if (pname.compare ("xtick"))
2226  return property (&xtick, true);
2227  else if (pname.compare ("xticklabel"))
2228  return property (&xticklabel, true);
2229  else if (pname.compare ("xticklabelmode"))
2230  return property (&xticklabelmode, true);
2231  else if (pname.compare ("xtickmode"))
2232  return property (&xtickmode, true);
2233  else if (pname.compare ("yaxislocation"))
2234  return property (&yaxislocation, true);
2235  else if (pname.compare ("ycolor"))
2236  return property (&ycolor, true);
2237  else if (pname.compare ("ydir"))
2238  return property (&ydir, true);
2239  else if (pname.compare ("ygrid"))
2240  return property (&ygrid, true);
2241  else if (pname.compare ("ylabel"))
2242  return property (&ylabel, true);
2243  else if (pname.compare ("ylim"))
2244  return property (&ylim, true);
2245  else if (pname.compare ("ylimmode"))
2246  return property (&ylimmode, true);
2247  else if (pname.compare ("yminorgrid"))
2248  return property (&yminorgrid, true);
2249  else if (pname.compare ("yminortick"))
2250  return property (&yminortick, true);
2251  else if (pname.compare ("yscale"))
2252  return property (&yscale, true);
2253  else if (pname.compare ("ytick"))
2254  return property (&ytick, true);
2255  else if (pname.compare ("yticklabel"))
2256  return property (&yticklabel, true);
2257  else if (pname.compare ("yticklabelmode"))
2258  return property (&yticklabelmode, true);
2259  else if (pname.compare ("ytickmode"))
2260  return property (&ytickmode, true);
2261  else if (pname.compare ("zcolor"))
2262  return property (&zcolor, true);
2263  else if (pname.compare ("zdir"))
2264  return property (&zdir, true);
2265  else if (pname.compare ("zgrid"))
2266  return property (&zgrid, true);
2267  else if (pname.compare ("zlabel"))
2268  return property (&zlabel, true);
2269  else if (pname.compare ("zlim"))
2270  return property (&zlim, true);
2271  else if (pname.compare ("zlimmode"))
2272  return property (&zlimmode, true);
2273  else if (pname.compare ("zminorgrid"))
2274  return property (&zminorgrid, true);
2275  else if (pname.compare ("zminortick"))
2276  return property (&zminortick, true);
2277  else if (pname.compare ("zscale"))
2278  return property (&zscale, true);
2279  else if (pname.compare ("ztick"))
2280  return property (&ztick, true);
2281  else if (pname.compare ("zticklabel"))
2282  return property (&zticklabel, true);
2283  else if (pname.compare ("zticklabelmode"))
2284  return property (&zticklabelmode, true);
2285  else if (pname.compare ("ztickmode"))
2286  return property (&ztickmode, true);
2287  else if (pname.compare ("__hold_all__"))
2288  return property (&__hold_all__, true);
2289  else if (pname.compare ("autopos_tag"))
2290  return property (&autopos_tag, true);
2291  else if (pname.compare ("looseinset"))
2292  return property (&looseinset, true);
2293  else if (pname.compare ("x_viewtransform"))
2294  return property (&x_viewtransform, true);
2295  else if (pname.compare ("x_projectiontransform"))
2296  return property (&x_projectiontransform, true);
2297  else if (pname.compare ("x_viewporttransform"))
2298  return property (&x_viewporttransform, true);
2299  else if (pname.compare ("x_normrendertransform"))
2300  return property (&x_normrendertransform, true);
2301  else if (pname.compare ("x_rendertransform"))
2302  return property (&x_rendertransform, true);
2303  else if (pname.compare ("xmtick"))
2304  return property (&xmtick, true);
2305  else if (pname.compare ("ymtick"))
2306  return property (&ymtick, true);
2307  else if (pname.compare ("zmtick"))
2308  return property (&zmtick, true);
2309  else
2310  return base_properties::get_property (pname);
2311 }
2312 
2315 {
2317 
2318  m["activepositionproperty"] = "outerposition";
2319  m["alim"] = default_lim ();
2320  m["alimmode"] = "auto";
2321  m["ambientlightcolor"] = color_values (1, 1, 1);
2322  m["box"] = "on";
2323  m["cameraposition"] = Matrix (1, 3, 0.0);
2324  m["camerapositionmode"] = "auto";
2325  m["cameratarget"] = Matrix (1, 3, 0.0);
2326  m["cameratargetmode"] = "auto";
2327  m["cameraupvector"] = Matrix ();
2328  m["cameraupvectormode"] = "auto";
2329  m["cameraviewangle"] = 10.0;
2330  m["cameraviewanglemode"] = "auto";
2331  m["clim"] = default_lim ();
2332  m["climmode"] = "auto";
2333  m["color"] = color_property (color_values (1, 1, 1), radio_values ("none"));
2334  m["colororder"] = default_colororder ();
2335  m["currentpoint"] = Matrix (2, 3, 0.0);
2336  m["dataaspectratio"] = Matrix (1, 3, 1.0);
2337  m["dataaspectratiomode"] = "auto";
2338  m["drawmode"] = "normal";
2339  m["fontangle"] = "normal";
2340  m["fontname"] = OCTAVE_DEFAULT_FONTNAME;
2341  m["fontsize"] = 10;
2342  m["fontunits"] = "points";
2343  m["fontweight"] = "normal";
2344  m["gridlinestyle"] = ":";
2345  m["interpreter"] = "none";
2346  m["layer"] = "bottom";
2347  m["linestyleorder"] = "-";
2348  m["linewidth"] = 0.5;
2349  m["minorgridlinestyle"] = ":";
2350  m["nextplot"] = "replace";
2351  m["outerposition"] = default_axes_outerposition ();
2352  m["plotboxaspectratio"] = Matrix (1, 3, 1.0);
2353  m["plotboxaspectratiomode"] = "auto";
2354  m["position"] = default_axes_position ();
2355  m["projection"] = "orthographic";
2356  m["tickdir"] = "in";
2357  m["tickdirmode"] = "auto";
2358  m["ticklength"] = default_axes_ticklength ();
2359  m["tightinset"] = Matrix (1, 4, 0.0);
2360  m["units"] = "normalized";
2361  m["view"] = Matrix ();
2362  m["xaxislocation"] = "bottom";
2363  m["xcolor"] = color_values (0, 0, 0);
2364  m["xdir"] = "normal";
2365  m["xgrid"] = "off";
2366  m["xlim"] = default_lim ();
2367  m["xlimmode"] = "auto";
2368  m["xminorgrid"] = "off";
2369  m["xminortick"] = "off";
2370  m["xscale"] = "linear";
2371  m["xtick"] = default_axes_tick ();
2372  m["xticklabel"] = "";
2373  m["xticklabelmode"] = "auto";
2374  m["xtickmode"] = "auto";
2375  m["yaxislocation"] = "left";
2376  m["ycolor"] = color_values (0, 0, 0);
2377  m["ydir"] = "normal";
2378  m["ygrid"] = "off";
2379  m["ylim"] = default_lim ();
2380  m["ylimmode"] = "auto";
2381  m["yminorgrid"] = "off";
2382  m["yminortick"] = "off";
2383  m["yscale"] = "linear";
2384  m["ytick"] = default_axes_tick ();
2385  m["yticklabel"] = "";
2386  m["yticklabelmode"] = "auto";
2387  m["ytickmode"] = "auto";
2388  m["zcolor"] = color_values (0, 0, 0);
2389  m["zdir"] = "normal";
2390  m["zgrid"] = "off";
2391  m["zlim"] = default_lim ();
2392  m["zlimmode"] = "auto";
2393  m["zminorgrid"] = "off";
2394  m["zminortick"] = "off";
2395  m["zscale"] = "linear";
2396  m["ztick"] = default_axes_tick ();
2397  m["zticklabel"] = "";
2398  m["zticklabelmode"] = "auto";
2399  m["ztickmode"] = "auto";
2400  m["__hold_all__"] = "off";
2401  m["autopos_tag"] = "none";
2402  m["looseinset"] = Matrix (1, 4, 0.0);
2403  m["x_viewtransform"] = Matrix (4, 4, 0.0);
2404  m["x_projectiontransform"] = Matrix (4, 4, 0.0);
2405  m["x_viewporttransform"] = Matrix (4, 4, 0.0);
2406  m["x_normrendertransform"] = Matrix (4, 4, 0.0);
2407  m["x_rendertransform"] = Matrix (4, 4, 0.0);
2408  m["xmtick"] = Matrix ();
2409  m["ymtick"] = Matrix ();
2410  m["zmtick"] = Matrix ();
2411 
2412  return m;
2413 }
2414 
2415 std::string axes::properties::go_name ("axes");
2416 
2417 std::set<std::string>
2419 {
2420  static std::set<std::string> all_pnames;
2421 
2422  static bool initialized = false;
2423 
2424  if (! initialized)
2425  {
2426  all_pnames.insert ("activepositionproperty");
2427  all_pnames.insert ("alim");
2428  all_pnames.insert ("alimmode");
2429  all_pnames.insert ("ambientlightcolor");
2430  all_pnames.insert ("box");
2431  all_pnames.insert ("cameraposition");
2432  all_pnames.insert ("camerapositionmode");
2433  all_pnames.insert ("cameratarget");
2434  all_pnames.insert ("cameratargetmode");
2435  all_pnames.insert ("cameraupvector");
2436  all_pnames.insert ("cameraupvectormode");
2437  all_pnames.insert ("cameraviewangle");
2438  all_pnames.insert ("cameraviewanglemode");
2439  all_pnames.insert ("clim");
2440  all_pnames.insert ("climmode");
2441  all_pnames.insert ("color");
2442  all_pnames.insert ("colororder");
2443  all_pnames.insert ("currentpoint");
2444  all_pnames.insert ("dataaspectratio");
2445  all_pnames.insert ("dataaspectratiomode");
2446  all_pnames.insert ("drawmode");
2447  all_pnames.insert ("fontangle");
2448  all_pnames.insert ("fontname");
2449  all_pnames.insert ("fontsize");
2450  all_pnames.insert ("fontunits");
2451  all_pnames.insert ("fontweight");
2452  all_pnames.insert ("gridlinestyle");
2453  all_pnames.insert ("interpreter");
2454  all_pnames.insert ("layer");
2455  all_pnames.insert ("linestyleorder");
2456  all_pnames.insert ("linewidth");
2457  all_pnames.insert ("minorgridlinestyle");
2458  all_pnames.insert ("nextplot");
2459  all_pnames.insert ("outerposition");
2460  all_pnames.insert ("plotboxaspectratio");
2461  all_pnames.insert ("plotboxaspectratiomode");
2462  all_pnames.insert ("position");
2463  all_pnames.insert ("projection");
2464  all_pnames.insert ("tickdir");
2465  all_pnames.insert ("tickdirmode");
2466  all_pnames.insert ("ticklength");
2467  all_pnames.insert ("tightinset");
2468  all_pnames.insert ("title");
2469  all_pnames.insert ("units");
2470  all_pnames.insert ("view");
2471  all_pnames.insert ("xaxislocation");
2472  all_pnames.insert ("xcolor");
2473  all_pnames.insert ("xdir");
2474  all_pnames.insert ("xgrid");
2475  all_pnames.insert ("xlabel");
2476  all_pnames.insert ("xlim");
2477  all_pnames.insert ("xlimmode");
2478  all_pnames.insert ("xminorgrid");
2479  all_pnames.insert ("xminortick");
2480  all_pnames.insert ("xscale");
2481  all_pnames.insert ("xtick");
2482  all_pnames.insert ("xticklabel");
2483  all_pnames.insert ("xticklabelmode");
2484  all_pnames.insert ("xtickmode");
2485  all_pnames.insert ("yaxislocation");
2486  all_pnames.insert ("ycolor");
2487  all_pnames.insert ("ydir");
2488  all_pnames.insert ("ygrid");
2489  all_pnames.insert ("ylabel");
2490  all_pnames.insert ("ylim");
2491  all_pnames.insert ("ylimmode");
2492  all_pnames.insert ("yminorgrid");
2493  all_pnames.insert ("yminortick");
2494  all_pnames.insert ("yscale");
2495  all_pnames.insert ("ytick");
2496  all_pnames.insert ("yticklabel");
2497  all_pnames.insert ("yticklabelmode");
2498  all_pnames.insert ("ytickmode");
2499  all_pnames.insert ("zcolor");
2500  all_pnames.insert ("zdir");
2501  all_pnames.insert ("zgrid");
2502  all_pnames.insert ("zlabel");
2503  all_pnames.insert ("zlim");
2504  all_pnames.insert ("zlimmode");
2505  all_pnames.insert ("zminorgrid");
2506  all_pnames.insert ("zminortick");
2507  all_pnames.insert ("zscale");
2508  all_pnames.insert ("ztick");
2509  all_pnames.insert ("zticklabel");
2510  all_pnames.insert ("zticklabelmode");
2511  all_pnames.insert ("ztickmode");
2512  all_pnames.insert ("__hold_all__");
2513  all_pnames.insert ("autopos_tag");
2514  all_pnames.insert ("looseinset");
2515  all_pnames.insert ("x_viewtransform");
2516  all_pnames.insert ("x_projectiontransform");
2517  all_pnames.insert ("x_viewporttransform");
2518  all_pnames.insert ("x_normrendertransform");
2519  all_pnames.insert ("x_rendertransform");
2520  all_pnames.insert ("xmtick");
2521  all_pnames.insert ("ymtick");
2522  all_pnames.insert ("zmtick");
2523 
2524  std::set<std::string> base_pnames = base_properties::core_property_names ();
2525  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
2526 
2527  initialized = true;
2528  }
2529 
2530  return all_pnames;
2531 }
2532 
2533 bool
2535 {
2536  std::set<std::string> pnames = core_property_names ();
2537 
2538  return pnames.find (pname) != pnames.end ();
2539 }
2540 
2541 std::set<std::string>
2543 {
2544  static std::set<std::string> all_pnames = core_property_names ();
2545 
2546  std::set<std::string> retval = all_pnames;
2547  std::set<std::string> base_props = base_properties::all_property_names ();
2548  retval.insert (base_props.begin (), base_props.end ());
2549 
2550  return retval;
2551 }
2552 
2553 bool
2555 {
2556  std::set<std::string> pnames = all_property_names ();
2557 
2558  return pnames.find (pname) != pnames.end ();
2559 }
2560 
2561 // ******** line ********
2562 
2564  : base_properties (go_name, mh, p),
2565  color ("color", mh, color_values (0, 0, 0)),
2566  displayname ("displayname", mh, ""),
2567  erasemode ("erasemode", mh, "{normal}|none|xor|background"),
2568  interpreter ("interpreter", mh, "{tex}|none|latex"),
2569  linestyle ("linestyle", mh, "{-}|--|:|-.|none"),
2570  linewidth ("linewidth", mh, 0.5),
2571  marker ("marker", mh, "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram"),
2572  markeredgecolor ("markeredgecolor", mh, color_property (radio_values ("{auto}|none"), color_values (0, 0, 0))),
2573  markerfacecolor ("markerfacecolor", mh, color_property (radio_values ("auto|{none}"), color_values (0, 0, 0))),
2574  markersize ("markersize", mh, 6),
2575  xdata ("xdata", mh, default_data ()),
2576  xdatasource ("xdatasource", mh, ""),
2577  ydata ("ydata", mh, default_data ()),
2578  ydatasource ("ydatasource", mh, ""),
2579  zdata ("zdata", mh, Matrix ()),
2580  zdatasource ("zdatasource", mh, ""),
2581  xlim ("xlim", mh, Matrix ()),
2582  ylim ("ylim", mh, Matrix ()),
2583  zlim ("zlim", mh, Matrix ()),
2584  xliminclude ("xliminclude", mh, "on"),
2585  yliminclude ("yliminclude", mh, "on"),
2586  zliminclude ("zliminclude", mh, "off")
2587 {
2588  color.set_id (ID_COLOR);
2598  xdata.set_id (ID_XDATA);
2600  ydata.set_id (ID_YDATA);
2602  zdata.set_id (ID_ZDATA);
2604  xlim.set_id (ID_XLIM);
2605  xlim.set_hidden (true);
2606  ylim.set_id (ID_YLIM);
2607  ylim.set_hidden (true);
2608  zlim.set_id (ID_ZLIM);
2609  zlim.set_hidden (true);
2611  xliminclude.set_hidden (true);
2613  yliminclude.set_hidden (true);
2615  zliminclude.set_hidden (true);
2616  init ();
2617 }
2618 
2619 void
2620 line::properties::set (const caseless_str& pname_arg, const octave_value& val)
2621 {
2622  const std::set<std::string>& pnames = all_property_names ();
2623 
2624  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
2625 
2626  if (error_state)
2627  return;
2628 
2629  if (pname.compare ("color"))
2630  set_color (val);
2631  else if (pname.compare ("displayname"))
2632  set_displayname (val);
2633  else if (pname.compare ("erasemode"))
2634  set_erasemode (val);
2635  else if (pname.compare ("interpreter"))
2636  set_interpreter (val);
2637  else if (pname.compare ("linestyle"))
2638  set_linestyle (val);
2639  else if (pname.compare ("linewidth"))
2640  set_linewidth (val);
2641  else if (pname.compare ("marker"))
2642  set_marker (val);
2643  else if (pname.compare ("markeredgecolor"))
2644  set_markeredgecolor (val);
2645  else if (pname.compare ("markerfacecolor"))
2646  set_markerfacecolor (val);
2647  else if (pname.compare ("markersize"))
2648  set_markersize (val);
2649  else if (pname.compare ("xdata"))
2650  set_xdata (val);
2651  else if (pname.compare ("xdatasource"))
2652  set_xdatasource (val);
2653  else if (pname.compare ("ydata"))
2654  set_ydata (val);
2655  else if (pname.compare ("ydatasource"))
2656  set_ydatasource (val);
2657  else if (pname.compare ("zdata"))
2658  set_zdata (val);
2659  else if (pname.compare ("zdatasource"))
2660  set_zdatasource (val);
2661  else if (pname.compare ("xliminclude"))
2662  set_xliminclude (val);
2663  else if (pname.compare ("yliminclude"))
2664  set_yliminclude (val);
2665  else if (pname.compare ("zliminclude"))
2666  set_zliminclude (val);
2667  else
2668  base_properties::set (pname, val);
2669 }
2670 
2672 line::properties::get (bool all) const
2673 {
2675 
2676  m.assign ("color", octave_value (get_color ()));
2677  m.assign ("displayname", octave_value (get_displayname ()));
2678  m.assign ("erasemode", octave_value (get_erasemode ()));
2679  m.assign ("interpreter", octave_value (get_interpreter ()));
2680  m.assign ("linestyle", octave_value (get_linestyle ()));
2681  m.assign ("linewidth", octave_value (get_linewidth ()));
2682  m.assign ("marker", octave_value (get_marker ()));
2683  m.assign ("markeredgecolor", octave_value (get_markeredgecolor ()));
2684  m.assign ("markerfacecolor", octave_value (get_markerfacecolor ()));
2685  m.assign ("markersize", octave_value (get_markersize ()));
2686  m.assign ("xdata", octave_value (get_xdata ()));
2687  m.assign ("xdatasource", octave_value (get_xdatasource ()));
2688  m.assign ("ydata", octave_value (get_ydata ()));
2689  m.assign ("ydatasource", octave_value (get_ydatasource ()));
2690  m.assign ("zdata", octave_value (get_zdata ()));
2691  m.assign ("zdatasource", octave_value (get_zdatasource ()));
2692  if (all)
2693  m.assign ("xlim", octave_value (get_xlim ()));
2694  if (all)
2695  m.assign ("ylim", octave_value (get_ylim ()));
2696  if (all)
2697  m.assign ("zlim", octave_value (get_zlim ()));
2698  if (all)
2699  m.assign ("xliminclude", octave_value (get_xliminclude ()));
2700  if (all)
2701  m.assign ("yliminclude", octave_value (get_yliminclude ()));
2702  if (all)
2703  m.assign ("zliminclude", octave_value (get_zliminclude ()));
2704 
2705  return m;
2706 }
2707 
2709 line::properties::get (const caseless_str& pname_arg) const
2710 {
2711  octave_value retval;
2712 
2713  const std::set<std::string>& pnames = all_property_names ();
2714 
2715  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
2716 
2717  if (error_state)
2718  return retval;
2719 
2720  if (pname.compare ("color"))
2721  retval = get_color ();
2722  else if (pname.compare ("displayname"))
2723  retval = get_displayname ();
2724  else if (pname.compare ("erasemode"))
2725  retval = get_erasemode ();
2726  else if (pname.compare ("interpreter"))
2727  retval = get_interpreter ();
2728  else if (pname.compare ("linestyle"))
2729  retval = get_linestyle ();
2730  else if (pname.compare ("linewidth"))
2731  retval = get_linewidth ();
2732  else if (pname.compare ("marker"))
2733  retval = get_marker ();
2734  else if (pname.compare ("markeredgecolor"))
2735  retval = get_markeredgecolor ();
2736  else if (pname.compare ("markerfacecolor"))
2737  retval = get_markerfacecolor ();
2738  else if (pname.compare ("markersize"))
2739  retval = get_markersize ();
2740  else if (pname.compare ("xdata"))
2741  retval = get_xdata ();
2742  else if (pname.compare ("xdatasource"))
2743  retval = get_xdatasource ();
2744  else if (pname.compare ("ydata"))
2745  retval = get_ydata ();
2746  else if (pname.compare ("ydatasource"))
2747  retval = get_ydatasource ();
2748  else if (pname.compare ("zdata"))
2749  retval = get_zdata ();
2750  else if (pname.compare ("zdatasource"))
2751  retval = get_zdatasource ();
2752  else if (pname.compare ("xlim"))
2753  retval = get_xlim ();
2754  else if (pname.compare ("ylim"))
2755  retval = get_ylim ();
2756  else if (pname.compare ("zlim"))
2757  retval = get_zlim ();
2758  else if (pname.compare ("xliminclude"))
2759  retval = get_xliminclude ();
2760  else if (pname.compare ("yliminclude"))
2761  retval = get_yliminclude ();
2762  else if (pname.compare ("zliminclude"))
2763  retval = get_zliminclude ();
2764  else
2765  retval = base_properties::get (pname);
2766 
2767  return retval;
2768 }
2769 
2770 property
2772 {
2773  const std::set<std::string>& pnames = all_property_names ();
2774 
2775  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
2776 
2777  if (error_state)
2778  return property ();
2779 
2780  if (pname.compare ("color"))
2781  return property (&color, true);
2782  else if (pname.compare ("displayname"))
2783  return property (&displayname, true);
2784  else if (pname.compare ("erasemode"))
2785  return property (&erasemode, true);
2786  else if (pname.compare ("interpreter"))
2787  return property (&interpreter, true);
2788  else if (pname.compare ("linestyle"))
2789  return property (&linestyle, true);
2790  else if (pname.compare ("linewidth"))
2791  return property (&linewidth, true);
2792  else if (pname.compare ("marker"))
2793  return property (&marker, true);
2794  else if (pname.compare ("markeredgecolor"))
2795  return property (&markeredgecolor, true);
2796  else if (pname.compare ("markerfacecolor"))
2797  return property (&markerfacecolor, true);
2798  else if (pname.compare ("markersize"))
2799  return property (&markersize, true);
2800  else if (pname.compare ("xdata"))
2801  return property (&xdata, true);
2802  else if (pname.compare ("xdatasource"))
2803  return property (&xdatasource, true);
2804  else if (pname.compare ("ydata"))
2805  return property (&ydata, true);
2806  else if (pname.compare ("ydatasource"))
2807  return property (&ydatasource, true);
2808  else if (pname.compare ("zdata"))
2809  return property (&zdata, true);
2810  else if (pname.compare ("zdatasource"))
2811  return property (&zdatasource, true);
2812  else if (pname.compare ("xlim"))
2813  return property (&xlim, true);
2814  else if (pname.compare ("ylim"))
2815  return property (&ylim, true);
2816  else if (pname.compare ("zlim"))
2817  return property (&zlim, true);
2818  else if (pname.compare ("xliminclude"))
2819  return property (&xliminclude, true);
2820  else if (pname.compare ("yliminclude"))
2821  return property (&yliminclude, true);
2822  else if (pname.compare ("zliminclude"))
2823  return property (&zliminclude, true);
2824  else
2825  return base_properties::get_property (pname);
2826 }
2827 
2830 {
2832 
2833  m["color"] = color_values (0, 0, 0);
2834  m["displayname"] = "";
2835  m["erasemode"] = "normal";
2836  m["interpreter"] = "tex";
2837  m["linestyle"] = "-";
2838  m["linewidth"] = 0.5;
2839  m["marker"] = "none";
2840  m["markeredgecolor"] = color_property (radio_values ("{auto}|none"), color_values (0, 0, 0));
2841  m["markerfacecolor"] = color_property (radio_values ("auto|{none}"), color_values (0, 0, 0));
2842  m["markersize"] = 6;
2843  m["xdata"] = default_data ();
2844  m["xdatasource"] = "";
2845  m["ydata"] = default_data ();
2846  m["ydatasource"] = "";
2847  m["zdata"] = Matrix ();
2848  m["zdatasource"] = "";
2849  m["xlim"] = Matrix ();
2850  m["ylim"] = Matrix ();
2851  m["zlim"] = Matrix ();
2852  m["xliminclude"] = "on";
2853  m["yliminclude"] = "on";
2854  m["zliminclude"] = "off";
2855 
2856  return m;
2857 }
2858 
2859 std::string line::properties::go_name ("line");
2860 
2861 std::set<std::string>
2863 {
2864  static std::set<std::string> all_pnames;
2865 
2866  static bool initialized = false;
2867 
2868  if (! initialized)
2869  {
2870  all_pnames.insert ("color");
2871  all_pnames.insert ("displayname");
2872  all_pnames.insert ("erasemode");
2873  all_pnames.insert ("interpreter");
2874  all_pnames.insert ("linestyle");
2875  all_pnames.insert ("linewidth");
2876  all_pnames.insert ("marker");
2877  all_pnames.insert ("markeredgecolor");
2878  all_pnames.insert ("markerfacecolor");
2879  all_pnames.insert ("markersize");
2880  all_pnames.insert ("xdata");
2881  all_pnames.insert ("xdatasource");
2882  all_pnames.insert ("ydata");
2883  all_pnames.insert ("ydatasource");
2884  all_pnames.insert ("zdata");
2885  all_pnames.insert ("zdatasource");
2886  all_pnames.insert ("xlim");
2887  all_pnames.insert ("ylim");
2888  all_pnames.insert ("zlim");
2889  all_pnames.insert ("xliminclude");
2890  all_pnames.insert ("yliminclude");
2891  all_pnames.insert ("zliminclude");
2892 
2893  std::set<std::string> base_pnames = base_properties::core_property_names ();
2894  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
2895 
2896  initialized = true;
2897  }
2898 
2899  return all_pnames;
2900 }
2901 
2902 bool
2904 {
2905  std::set<std::string> pnames = core_property_names ();
2906 
2907  return pnames.find (pname) != pnames.end ();
2908 }
2909 
2910 std::set<std::string>
2912 {
2913  static std::set<std::string> all_pnames = core_property_names ();
2914 
2915  std::set<std::string> retval = all_pnames;
2916  std::set<std::string> base_props = base_properties::all_property_names ();
2917  retval.insert (base_props.begin (), base_props.end ());
2918 
2919  return retval;
2920 }
2921 
2922 bool
2924 {
2925  std::set<std::string> pnames = all_property_names ();
2926 
2927  return pnames.find (pname) != pnames.end ();
2928 }
2929 
2930 // ******** text ********
2931 
2933  : base_properties (go_name, mh, p),
2934  backgroundcolor ("backgroundcolor", mh, color_property (radio_values ("{none}"), color_values (1, 1, 1))),
2935  color ("color", mh, color_values (0, 0, 0)),
2936  displayname ("displayname", mh, ""),
2937  edgecolor ("edgecolor", mh, color_property (radio_values ("{none}"), color_values (0, 0, 0))),
2938  editing ("editing", mh, "off"),
2939  erasemode ("erasemode", mh, "{normal}|none|xor|background"),
2940  extent ("extent", mh, Matrix (1, 4, 0.0)),
2941  fontangle ("fontangle", mh, "{normal}|italic|oblique"),
2942  fontname ("fontname", mh, OCTAVE_DEFAULT_FONTNAME),
2943  fontsize ("fontsize", mh, 10),
2944  fontunits ("fontunits", mh, "inches|centimeters|normalized|{points}|pixels"),
2945  fontweight ("fontweight", mh, "light|{normal}|demi|bold"),
2946  horizontalalignment ("horizontalalignment", mh, "{left}|center|right"),
2947  interpreter ("interpreter", mh, "{tex}|none|latex"),
2948  linestyle ("linestyle", mh, "{-}|--|:|-.|none"),
2949  linewidth ("linewidth", mh, 0.5),
2950  margin ("margin", mh, 1),
2951  position ("position", mh, Matrix (1, 3, 0.0)),
2952  rotation ("rotation", mh, 0),
2953  string ("string", mh, ""),
2954  units ("units", mh, "{data}|pixels|normalized|inches|centimeters|points"),
2955  verticalalignment ("verticalalignment", mh, "top|cap|{middle}|baseline|bottom"),
2956  xlim ("xlim", mh, Matrix ()),
2957  ylim ("ylim", mh, Matrix ()),
2958  zlim ("zlim", mh, Matrix ()),
2959  xliminclude ("xliminclude", mh, "off"),
2960  yliminclude ("yliminclude", mh, "off"),
2961  zliminclude ("zliminclude", mh, "off"),
2962  positionmode ("positionmode", mh, "{auto}|manual"),
2963  rotationmode ("rotationmode", mh, "{auto}|manual"),
2964  horizontalalignmentmode ("horizontalalignmentmode", mh, "{auto}|manual"),
2965  verticalalignmentmode ("verticalalignmentmode", mh, "{auto}|manual"),
2966  autopos_tag ("autopos_tag", mh, "{none}|xlabel|ylabel|zlabel|title")
2967 {
2969  color.set_id (ID_COLOR);
2987  string.set_id (ID_STRING);
2988  units.set_id (ID_UNITS);
2990  xlim.set_id (ID_XLIM);
2991  xlim.set_hidden (true);
2992  ylim.set_id (ID_YLIM);
2993  ylim.set_hidden (true);
2994  zlim.set_id (ID_ZLIM);
2995  zlim.set_hidden (true);
2997  xliminclude.set_hidden (true);
2999  yliminclude.set_hidden (true);
3001  zliminclude.set_hidden (true);
3003  positionmode.set_hidden (true);
3005  rotationmode.set_hidden (true);
3011  autopos_tag.set_hidden (true);
3012  init ();
3013 }
3014 
3015 void
3016 text::properties::set (const caseless_str& pname_arg, const octave_value& val)
3017 {
3018  const std::set<std::string>& pnames = all_property_names ();
3019 
3020  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3021 
3022  if (error_state)
3023  return;
3024 
3025  if (pname.compare ("backgroundcolor"))
3026  set_backgroundcolor (val);
3027  else if (pname.compare ("color"))
3028  set_color (val);
3029  else if (pname.compare ("displayname"))
3030  set_displayname (val);
3031  else if (pname.compare ("edgecolor"))
3032  set_edgecolor (val);
3033  else if (pname.compare ("editing"))
3034  set_editing (val);
3035  else if (pname.compare ("erasemode"))
3036  set_erasemode (val);
3037  else if (pname.compare ("fontangle"))
3038  set_fontangle (val);
3039  else if (pname.compare ("fontname"))
3040  set_fontname (val);
3041  else if (pname.compare ("fontsize"))
3042  set_fontsize (val);
3043  else if (pname.compare ("fontunits"))
3044  set_fontunits (val);
3045  else if (pname.compare ("fontweight"))
3046  set_fontweight (val);
3047  else if (pname.compare ("horizontalalignment"))
3048  set_horizontalalignment (val);
3049  else if (pname.compare ("interpreter"))
3050  set_interpreter (val);
3051  else if (pname.compare ("linestyle"))
3052  set_linestyle (val);
3053  else if (pname.compare ("linewidth"))
3054  set_linewidth (val);
3055  else if (pname.compare ("margin"))
3056  set_margin (val);
3057  else if (pname.compare ("position"))
3058  set_position (val);
3059  else if (pname.compare ("rotation"))
3060  set_rotation (val);
3061  else if (pname.compare ("string"))
3062  set_string (val);
3063  else if (pname.compare ("units"))
3064  set_units (val);
3065  else if (pname.compare ("verticalalignment"))
3066  set_verticalalignment (val);
3067  else if (pname.compare ("xliminclude"))
3068  set_xliminclude (val);
3069  else if (pname.compare ("yliminclude"))
3070  set_yliminclude (val);
3071  else if (pname.compare ("zliminclude"))
3072  set_zliminclude (val);
3073  else if (pname.compare ("positionmode"))
3074  set_positionmode (val);
3075  else if (pname.compare ("rotationmode"))
3076  set_rotationmode (val);
3077  else if (pname.compare ("horizontalalignmentmode"))
3078  set_horizontalalignmentmode (val);
3079  else if (pname.compare ("verticalalignmentmode"))
3080  set_verticalalignmentmode (val);
3081  else if (pname.compare ("autopos_tag"))
3082  set_autopos_tag (val);
3083  else
3084  base_properties::set (pname, val);
3085 }
3086 
3088 text::properties::get (bool all) const
3089 {
3091 
3092  m.assign ("backgroundcolor", octave_value (get_backgroundcolor ()));
3093  m.assign ("color", octave_value (get_color ()));
3094  m.assign ("displayname", octave_value (get_displayname ()));
3095  m.assign ("edgecolor", octave_value (get_edgecolor ()));
3096  m.assign ("editing", octave_value (get_editing ()));
3097  m.assign ("erasemode", octave_value (get_erasemode ()));
3098  m.assign ("extent", octave_value (get_extent ()));
3099  m.assign ("fontangle", octave_value (get_fontangle ()));
3100  m.assign ("fontname", octave_value (get_fontname ()));
3101  m.assign ("fontsize", octave_value (get_fontsize ()));
3102  m.assign ("fontunits", octave_value (get_fontunits ()));
3103  m.assign ("fontweight", octave_value (get_fontweight ()));
3104  m.assign ("horizontalalignment", octave_value (get_horizontalalignment ()));
3105  m.assign ("interpreter", octave_value (get_interpreter ()));
3106  m.assign ("linestyle", octave_value (get_linestyle ()));
3107  m.assign ("linewidth", octave_value (get_linewidth ()));
3108  m.assign ("margin", octave_value (get_margin ()));
3109  m.assign ("position", octave_value (get_position ()));
3110  m.assign ("rotation", octave_value (get_rotation ()));
3111  m.assign ("string", octave_value (get_string ()));
3112  m.assign ("units", octave_value (get_units ()));
3113  m.assign ("verticalalignment", octave_value (get_verticalalignment ()));
3114  if (all)
3115  m.assign ("xlim", octave_value (get_xlim ()));
3116  if (all)
3117  m.assign ("ylim", octave_value (get_ylim ()));
3118  if (all)
3119  m.assign ("zlim", octave_value (get_zlim ()));
3120  if (all)
3121  m.assign ("xliminclude", octave_value (get_xliminclude ()));
3122  if (all)
3123  m.assign ("yliminclude", octave_value (get_yliminclude ()));
3124  if (all)
3125  m.assign ("zliminclude", octave_value (get_zliminclude ()));
3126  if (all)
3127  m.assign ("positionmode", octave_value (get_positionmode ()));
3128  if (all)
3129  m.assign ("rotationmode", octave_value (get_rotationmode ()));
3130  if (all)
3131  m.assign ("horizontalalignmentmode", octave_value (get_horizontalalignmentmode ()));
3132  if (all)
3133  m.assign ("verticalalignmentmode", octave_value (get_verticalalignmentmode ()));
3134  if (all)
3135  m.assign ("autopos_tag", octave_value (get_autopos_tag ()));
3136 
3137  return m;
3138 }
3139 
3141 text::properties::get (const caseless_str& pname_arg) const
3142 {
3143  octave_value retval;
3144 
3145  const std::set<std::string>& pnames = all_property_names ();
3146 
3147  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3148 
3149  if (error_state)
3150  return retval;
3151 
3152  if (pname.compare ("backgroundcolor"))
3153  retval = get_backgroundcolor ();
3154  else if (pname.compare ("color"))
3155  retval = get_color ();
3156  else if (pname.compare ("displayname"))
3157  retval = get_displayname ();
3158  else if (pname.compare ("edgecolor"))
3159  retval = get_edgecolor ();
3160  else if (pname.compare ("editing"))
3161  retval = get_editing ();
3162  else if (pname.compare ("erasemode"))
3163  retval = get_erasemode ();
3164  else if (pname.compare ("extent"))
3165  retval = get_extent ();
3166  else if (pname.compare ("fontangle"))
3167  retval = get_fontangle ();
3168  else if (pname.compare ("fontname"))
3169  retval = get_fontname ();
3170  else if (pname.compare ("fontsize"))
3171  retval = get_fontsize ();
3172  else if (pname.compare ("fontunits"))
3173  retval = get_fontunits ();
3174  else if (pname.compare ("fontweight"))
3175  retval = get_fontweight ();
3176  else if (pname.compare ("horizontalalignment"))
3177  retval = get_horizontalalignment ();
3178  else if (pname.compare ("interpreter"))
3179  retval = get_interpreter ();
3180  else if (pname.compare ("linestyle"))
3181  retval = get_linestyle ();
3182  else if (pname.compare ("linewidth"))
3183  retval = get_linewidth ();
3184  else if (pname.compare ("margin"))
3185  retval = get_margin ();
3186  else if (pname.compare ("position"))
3187  retval = get_position ();
3188  else if (pname.compare ("rotation"))
3189  retval = get_rotation ();
3190  else if (pname.compare ("string"))
3191  retval = get_string ();
3192  else if (pname.compare ("units"))
3193  retval = get_units ();
3194  else if (pname.compare ("verticalalignment"))
3195  retval = get_verticalalignment ();
3196  else if (pname.compare ("xlim"))
3197  retval = get_xlim ();
3198  else if (pname.compare ("ylim"))
3199  retval = get_ylim ();
3200  else if (pname.compare ("zlim"))
3201  retval = get_zlim ();
3202  else if (pname.compare ("xliminclude"))
3203  retval = get_xliminclude ();
3204  else if (pname.compare ("yliminclude"))
3205  retval = get_yliminclude ();
3206  else if (pname.compare ("zliminclude"))
3207  retval = get_zliminclude ();
3208  else if (pname.compare ("positionmode"))
3209  retval = get_positionmode ();
3210  else if (pname.compare ("rotationmode"))
3211  retval = get_rotationmode ();
3212  else if (pname.compare ("horizontalalignmentmode"))
3213  retval = get_horizontalalignmentmode ();
3214  else if (pname.compare ("verticalalignmentmode"))
3215  retval = get_verticalalignmentmode ();
3216  else if (pname.compare ("autopos_tag"))
3217  retval = get_autopos_tag ();
3218  else
3219  retval = base_properties::get (pname);
3220 
3221  return retval;
3222 }
3223 
3224 property
3226 {
3227  const std::set<std::string>& pnames = all_property_names ();
3228 
3229  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3230 
3231  if (error_state)
3232  return property ();
3233 
3234  if (pname.compare ("backgroundcolor"))
3235  return property (&backgroundcolor, true);
3236  else if (pname.compare ("color"))
3237  return property (&color, true);
3238  else if (pname.compare ("displayname"))
3239  return property (&displayname, true);
3240  else if (pname.compare ("edgecolor"))
3241  return property (&edgecolor, true);
3242  else if (pname.compare ("editing"))
3243  return property (&editing, true);
3244  else if (pname.compare ("erasemode"))
3245  return property (&erasemode, true);
3246  else if (pname.compare ("extent"))
3247  return property (&extent, true);
3248  else if (pname.compare ("fontangle"))
3249  return property (&fontangle, true);
3250  else if (pname.compare ("fontname"))
3251  return property (&fontname, true);
3252  else if (pname.compare ("fontsize"))
3253  return property (&fontsize, true);
3254  else if (pname.compare ("fontunits"))
3255  return property (&fontunits, true);
3256  else if (pname.compare ("fontweight"))
3257  return property (&fontweight, true);
3258  else if (pname.compare ("horizontalalignment"))
3259  return property (&horizontalalignment, true);
3260  else if (pname.compare ("interpreter"))
3261  return property (&interpreter, true);
3262  else if (pname.compare ("linestyle"))
3263  return property (&linestyle, true);
3264  else if (pname.compare ("linewidth"))
3265  return property (&linewidth, true);
3266  else if (pname.compare ("margin"))
3267  return property (&margin, true);
3268  else if (pname.compare ("position"))
3269  return property (&position, true);
3270  else if (pname.compare ("rotation"))
3271  return property (&rotation, true);
3272  else if (pname.compare ("string"))
3273  return property (&string, true);
3274  else if (pname.compare ("units"))
3275  return property (&units, true);
3276  else if (pname.compare ("verticalalignment"))
3277  return property (&verticalalignment, true);
3278  else if (pname.compare ("xlim"))
3279  return property (&xlim, true);
3280  else if (pname.compare ("ylim"))
3281  return property (&ylim, true);
3282  else if (pname.compare ("zlim"))
3283  return property (&zlim, true);
3284  else if (pname.compare ("xliminclude"))
3285  return property (&xliminclude, true);
3286  else if (pname.compare ("yliminclude"))
3287  return property (&yliminclude, true);
3288  else if (pname.compare ("zliminclude"))
3289  return property (&zliminclude, true);
3290  else if (pname.compare ("positionmode"))
3291  return property (&positionmode, true);
3292  else if (pname.compare ("rotationmode"))
3293  return property (&rotationmode, true);
3294  else if (pname.compare ("horizontalalignmentmode"))
3295  return property (&horizontalalignmentmode, true);
3296  else if (pname.compare ("verticalalignmentmode"))
3297  return property (&verticalalignmentmode, true);
3298  else if (pname.compare ("autopos_tag"))
3299  return property (&autopos_tag, true);
3300  else
3301  return base_properties::get_property (pname);
3302 }
3303 
3306 {
3308 
3309  m["backgroundcolor"] = color_property (radio_values ("{none}"), color_values (1, 1, 1));
3310  m["color"] = color_values (0, 0, 0);
3311  m["displayname"] = "";
3312  m["edgecolor"] = color_property (radio_values ("{none}"), color_values (0, 0, 0));
3313  m["editing"] = "off";
3314  m["erasemode"] = "normal";
3315  m["extent"] = Matrix (1, 4, 0.0);
3316  m["fontangle"] = "normal";
3317  m["fontname"] = OCTAVE_DEFAULT_FONTNAME;
3318  m["fontsize"] = 10;
3319  m["fontunits"] = "points";
3320  m["fontweight"] = "normal";
3321  m["horizontalalignment"] = "left";
3322  m["interpreter"] = "tex";
3323  m["linestyle"] = "-";
3324  m["linewidth"] = 0.5;
3325  m["margin"] = 1;
3326  m["position"] = Matrix (1, 3, 0.0);
3327  m["rotation"] = 0;
3328  m["string"] = "";
3329  m["units"] = "data";
3330  m["verticalalignment"] = "middle";
3331  m["xlim"] = Matrix ();
3332  m["ylim"] = Matrix ();
3333  m["zlim"] = Matrix ();
3334  m["xliminclude"] = "off";
3335  m["yliminclude"] = "off";
3336  m["zliminclude"] = "off";
3337  m["positionmode"] = "auto";
3338  m["rotationmode"] = "auto";
3339  m["horizontalalignmentmode"] = "auto";
3340  m["verticalalignmentmode"] = "auto";
3341  m["autopos_tag"] = "none";
3342 
3343  return m;
3344 }
3345 
3346 std::string text::properties::go_name ("text");
3347 
3348 std::set<std::string>
3350 {
3351  static std::set<std::string> all_pnames;
3352 
3353  static bool initialized = false;
3354 
3355  if (! initialized)
3356  {
3357  all_pnames.insert ("backgroundcolor");
3358  all_pnames.insert ("color");
3359  all_pnames.insert ("displayname");
3360  all_pnames.insert ("edgecolor");
3361  all_pnames.insert ("editing");
3362  all_pnames.insert ("erasemode");
3363  all_pnames.insert ("extent");
3364  all_pnames.insert ("fontangle");
3365  all_pnames.insert ("fontname");
3366  all_pnames.insert ("fontsize");
3367  all_pnames.insert ("fontunits");
3368  all_pnames.insert ("fontweight");
3369  all_pnames.insert ("horizontalalignment");
3370  all_pnames.insert ("interpreter");
3371  all_pnames.insert ("linestyle");
3372  all_pnames.insert ("linewidth");
3373  all_pnames.insert ("margin");
3374  all_pnames.insert ("position");
3375  all_pnames.insert ("rotation");
3376  all_pnames.insert ("string");
3377  all_pnames.insert ("units");
3378  all_pnames.insert ("verticalalignment");
3379  all_pnames.insert ("xlim");
3380  all_pnames.insert ("ylim");
3381  all_pnames.insert ("zlim");
3382  all_pnames.insert ("xliminclude");
3383  all_pnames.insert ("yliminclude");
3384  all_pnames.insert ("zliminclude");
3385  all_pnames.insert ("positionmode");
3386  all_pnames.insert ("rotationmode");
3387  all_pnames.insert ("horizontalalignmentmode");
3388  all_pnames.insert ("verticalalignmentmode");
3389  all_pnames.insert ("autopos_tag");
3390 
3391  std::set<std::string> base_pnames = base_properties::core_property_names ();
3392  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
3393 
3394  initialized = true;
3395  }
3396 
3397  return all_pnames;
3398 }
3399 
3400 bool
3402 {
3403  std::set<std::string> pnames = core_property_names ();
3404 
3405  return pnames.find (pname) != pnames.end ();
3406 }
3407 
3408 std::set<std::string>
3410 {
3411  static std::set<std::string> all_pnames = core_property_names ();
3412 
3413  std::set<std::string> retval = all_pnames;
3414  std::set<std::string> base_props = base_properties::all_property_names ();
3415  retval.insert (base_props.begin (), base_props.end ());
3416 
3417  return retval;
3418 }
3419 
3420 bool
3422 {
3423  std::set<std::string> pnames = all_property_names ();
3424 
3425  return pnames.find (pname) != pnames.end ();
3426 }
3427 
3428 // ******** image ********
3429 
3431  : base_properties (go_name, mh, p),
3432  alphadata ("alphadata", mh, Matrix ()),
3433  alphadatamapping ("alphadatamapping", mh, "none|direct|{scaled}"),
3434  cdata ("cdata", mh, Matrix ()),
3435  cdatamapping ("cdatamapping", mh, "scaled|{direct}"),
3436  erasemode ("erasemode", mh, "{normal}|none|xor|background"),
3437  xdata ("xdata", mh, Matrix ()),
3438  ydata ("ydata", mh, Matrix ()),
3439  alim ("alim", mh, Matrix ()),
3440  clim ("clim", mh, Matrix ()),
3441  xlim ("xlim", mh, Matrix ()),
3442  ylim ("ylim", mh, Matrix ()),
3443  aliminclude ("aliminclude", mh, "on"),
3444  climinclude ("climinclude", mh, "on"),
3445  xliminclude ("xliminclude", mh, "on"),
3446  yliminclude ("yliminclude", mh, "on")
3447 {
3450  cdata.set_id (ID_CDATA);
3453  xdata.set_id (ID_XDATA);
3454  ydata.set_id (ID_YDATA);
3455  alim.set_id (ID_ALIM);
3456  alim.set_hidden (true);
3457  clim.set_id (ID_CLIM);
3458  clim.set_hidden (true);
3459  xlim.set_id (ID_XLIM);
3460  xlim.set_hidden (true);
3461  ylim.set_id (ID_YLIM);
3462  ylim.set_hidden (true);
3464  aliminclude.set_hidden (true);
3466  climinclude.set_hidden (true);
3468  xliminclude.set_hidden (true);
3470  yliminclude.set_hidden (true);
3471  init ();
3472 }
3473 
3474 void
3475 image::properties::set (const caseless_str& pname_arg, const octave_value& val)
3476 {
3477  const std::set<std::string>& pnames = all_property_names ();
3478 
3479  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3480 
3481  if (error_state)
3482  return;
3483 
3484  if (pname.compare ("alphadata"))
3485  set_alphadata (val);
3486  else if (pname.compare ("alphadatamapping"))
3487  set_alphadatamapping (val);
3488  else if (pname.compare ("cdata"))
3489  set_cdata (val);
3490  else if (pname.compare ("cdatamapping"))
3491  set_cdatamapping (val);
3492  else if (pname.compare ("erasemode"))
3493  set_erasemode (val);
3494  else if (pname.compare ("xdata"))
3495  set_xdata (val);
3496  else if (pname.compare ("ydata"))
3497  set_ydata (val);
3498  else if (pname.compare ("aliminclude"))
3499  set_aliminclude (val);
3500  else if (pname.compare ("climinclude"))
3501  set_climinclude (val);
3502  else if (pname.compare ("xliminclude"))
3503  set_xliminclude (val);
3504  else if (pname.compare ("yliminclude"))
3505  set_yliminclude (val);
3506  else
3507  base_properties::set (pname, val);
3508 }
3509 
3511 image::properties::get (bool all) const
3512 {
3514 
3515  m.assign ("alphadata", octave_value (get_alphadata ()));
3516  m.assign ("alphadatamapping", octave_value (get_alphadatamapping ()));
3517  m.assign ("cdata", octave_value (get_cdata ()));
3518  m.assign ("cdatamapping", octave_value (get_cdatamapping ()));
3519  m.assign ("erasemode", octave_value (get_erasemode ()));
3520  m.assign ("xdata", octave_value (get_xdata ()));
3521  m.assign ("ydata", octave_value (get_ydata ()));
3522  if (all)
3523  m.assign ("alim", octave_value (get_alim ()));
3524  if (all)
3525  m.assign ("clim", octave_value (get_clim ()));
3526  if (all)
3527  m.assign ("xlim", octave_value (get_xlim ()));
3528  if (all)
3529  m.assign ("ylim", octave_value (get_ylim ()));
3530  if (all)
3531  m.assign ("aliminclude", octave_value (get_aliminclude ()));
3532  if (all)
3533  m.assign ("climinclude", octave_value (get_climinclude ()));
3534  if (all)
3535  m.assign ("xliminclude", octave_value (get_xliminclude ()));
3536  if (all)
3537  m.assign ("yliminclude", octave_value (get_yliminclude ()));
3538 
3539  return m;
3540 }
3541 
3543 image::properties::get (const caseless_str& pname_arg) const
3544 {
3545  octave_value retval;
3546 
3547  const std::set<std::string>& pnames = all_property_names ();
3548 
3549  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3550 
3551  if (error_state)
3552  return retval;
3553 
3554  if (pname.compare ("alphadata"))
3555  retval = get_alphadata ();
3556  else if (pname.compare ("alphadatamapping"))
3557  retval = get_alphadatamapping ();
3558  else if (pname.compare ("cdata"))
3559  retval = get_cdata ();
3560  else if (pname.compare ("cdatamapping"))
3561  retval = get_cdatamapping ();
3562  else if (pname.compare ("erasemode"))
3563  retval = get_erasemode ();
3564  else if (pname.compare ("xdata"))
3565  retval = get_xdata ();
3566  else if (pname.compare ("ydata"))
3567  retval = get_ydata ();
3568  else if (pname.compare ("alim"))
3569  retval = get_alim ();
3570  else if (pname.compare ("clim"))
3571  retval = get_clim ();
3572  else if (pname.compare ("xlim"))
3573  retval = get_xlim ();
3574  else if (pname.compare ("ylim"))
3575  retval = get_ylim ();
3576  else if (pname.compare ("aliminclude"))
3577  retval = get_aliminclude ();
3578  else if (pname.compare ("climinclude"))
3579  retval = get_climinclude ();
3580  else if (pname.compare ("xliminclude"))
3581  retval = get_xliminclude ();
3582  else if (pname.compare ("yliminclude"))
3583  retval = get_yliminclude ();
3584  else
3585  retval = base_properties::get (pname);
3586 
3587  return retval;
3588 }
3589 
3590 property
3592 {
3593  const std::set<std::string>& pnames = all_property_names ();
3594 
3595  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3596 
3597  if (error_state)
3598  return property ();
3599 
3600  if (pname.compare ("alphadata"))
3601  return property (&alphadata, true);
3602  else if (pname.compare ("alphadatamapping"))
3603  return property (&alphadatamapping, true);
3604  else if (pname.compare ("cdata"))
3605  return property (&cdata, true);
3606  else if (pname.compare ("cdatamapping"))
3607  return property (&cdatamapping, true);
3608  else if (pname.compare ("erasemode"))
3609  return property (&erasemode, true);
3610  else if (pname.compare ("xdata"))
3611  return property (&xdata, true);
3612  else if (pname.compare ("ydata"))
3613  return property (&ydata, true);
3614  else if (pname.compare ("alim"))
3615  return property (&alim, true);
3616  else if (pname.compare ("clim"))
3617  return property (&clim, true);
3618  else if (pname.compare ("xlim"))
3619  return property (&xlim, true);
3620  else if (pname.compare ("ylim"))
3621  return property (&ylim, true);
3622  else if (pname.compare ("aliminclude"))
3623  return property (&aliminclude, true);
3624  else if (pname.compare ("climinclude"))
3625  return property (&climinclude, true);
3626  else if (pname.compare ("xliminclude"))
3627  return property (&xliminclude, true);
3628  else if (pname.compare ("yliminclude"))
3629  return property (&yliminclude, true);
3630  else
3631  return base_properties::get_property (pname);
3632 }
3633 
3636 {
3638 
3639  m["alphadata"] = Matrix ();
3640  m["alphadatamapping"] = "scaled";
3641  m["cdata"] = Matrix ();
3642  m["cdatamapping"] = "direct";
3643  m["erasemode"] = "normal";
3644  m["xdata"] = Matrix ();
3645  m["ydata"] = Matrix ();
3646  m["alim"] = Matrix ();
3647  m["clim"] = Matrix ();
3648  m["xlim"] = Matrix ();
3649  m["ylim"] = Matrix ();
3650  m["aliminclude"] = "on";
3651  m["climinclude"] = "on";
3652  m["xliminclude"] = "on";
3653  m["yliminclude"] = "on";
3654 
3655  return m;
3656 }
3657 
3658 std::string image::properties::go_name ("image");
3659 
3660 std::set<std::string>
3662 {
3663  static std::set<std::string> all_pnames;
3664 
3665  static bool initialized = false;
3666 
3667  if (! initialized)
3668  {
3669  all_pnames.insert ("alphadata");
3670  all_pnames.insert ("alphadatamapping");
3671  all_pnames.insert ("cdata");
3672  all_pnames.insert ("cdatamapping");
3673  all_pnames.insert ("erasemode");
3674  all_pnames.insert ("xdata");
3675  all_pnames.insert ("ydata");
3676  all_pnames.insert ("alim");
3677  all_pnames.insert ("clim");
3678  all_pnames.insert ("xlim");
3679  all_pnames.insert ("ylim");
3680  all_pnames.insert ("aliminclude");
3681  all_pnames.insert ("climinclude");
3682  all_pnames.insert ("xliminclude");
3683  all_pnames.insert ("yliminclude");
3684 
3685  std::set<std::string> base_pnames = base_properties::core_property_names ();
3686  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
3687 
3688  initialized = true;
3689  }
3690 
3691  return all_pnames;
3692 }
3693 
3694 bool
3696 {
3697  std::set<std::string> pnames = core_property_names ();
3698 
3699  return pnames.find (pname) != pnames.end ();
3700 }
3701 
3702 std::set<std::string>
3704 {
3705  static std::set<std::string> all_pnames = core_property_names ();
3706 
3707  std::set<std::string> retval = all_pnames;
3708  std::set<std::string> base_props = base_properties::all_property_names ();
3709  retval.insert (base_props.begin (), base_props.end ());
3710 
3711  return retval;
3712 }
3713 
3714 bool
3716 {
3717  std::set<std::string> pnames = all_property_names ();
3718 
3719  return pnames.find (pname) != pnames.end ();
3720 }
3721 
3722 // ******** patch ********
3723 
3725  : base_properties (go_name, mh, p),
3726  alphadatamapping ("alphadatamapping", mh, "none|{scaled}|direct"),
3727  ambientstrength ("ambientstrength", mh, 0.3),
3728  backfacelighting ("backfacelighting", mh, "unlit|lit|{reverselit}"),
3729  cdata ("cdata", mh, Matrix ()),
3730  cdatamapping ("cdatamapping", mh, "{scaled}|direct"),
3731  diffusestrength ("diffusestrength", mh, 0.6),
3732  displayname ("displayname", mh, ""),
3733  edgealpha ("edgealpha", mh, double_radio_property (1.0, radio_values ("flat|interp"))),
3734  edgecolor ("edgecolor", mh, color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"))),
3735  edgelighting ("edgelighting", mh, "{none}|flat|gouraud|phong"),
3736  erasemode ("erasemode", mh, "{normal}|background|xor|none"),
3737  facealpha ("facealpha", mh, double_radio_property (1.0, radio_values ("flat|interp"))),
3738  facecolor ("facecolor", mh, color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"))),
3739  facelighting ("facelighting", mh, "{none}|flat|gouraud|phong"),
3740  faces ("faces", mh, Matrix ()),
3741  facevertexalphadata ("facevertexalphadata", mh, Matrix ()),
3742  facevertexcdata ("facevertexcdata", mh, Matrix ()),
3743  interpreter ("interpreter", mh, "{tex}|none|latex"),
3744  linestyle ("linestyle", mh, "{-}|--|:|-.|none"),
3745  linewidth ("linewidth", mh, 0.5),
3746  marker ("marker", mh, "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram"),
3747  markeredgecolor ("markeredgecolor", mh, color_property (radio_values ("none|{auto}|flat"), color_values (0, 0, 0))),
3748  markerfacecolor ("markerfacecolor", mh, color_property (radio_values ("{none}|auto|flat"), color_values (0, 0, 0))),
3749  markersize ("markersize", mh, 6),
3750  normalmode ("normalmode", mh, "{auto}|manual"),
3751  specularcolorreflectance ("specularcolorreflectance", mh, 1.0),
3752  specularexponent ("specularexponent", mh, 10.0),
3753  specularstrength ("specularstrength", mh, 0.6),
3754  vertexnormals ("vertexnormals", mh, Matrix ()),
3755  vertices ("vertices", mh, Matrix ()),
3756  xdata ("xdata", mh, Matrix ()),
3757  ydata ("ydata", mh, Matrix ()),
3758  zdata ("zdata", mh, Matrix ()),
3759  alim ("alim", mh, Matrix ()),
3760  clim ("clim", mh, Matrix ()),
3761  xlim ("xlim", mh, Matrix ()),
3762  ylim ("ylim", mh, Matrix ()),
3763  zlim ("zlim", mh, Matrix ()),
3764  aliminclude ("aliminclude", mh, "on"),
3765  climinclude ("climinclude", mh, "on"),
3766  xliminclude ("xliminclude", mh, "on"),
3767  yliminclude ("yliminclude", mh, "on"),
3768  zliminclude ("zliminclude", mh, "on")
3769 {
3773  cdata.set_id (ID_CDATA);
3784  faces.set_id (ID_FACES);
3800  xdata.set_id (ID_XDATA);
3801  ydata.set_id (ID_YDATA);
3802  zdata.set_id (ID_ZDATA);
3803  alim.set_id (ID_ALIM);
3804  alim.set_hidden (true);
3805  clim.set_id (ID_CLIM);
3806  clim.set_hidden (true);
3807  xlim.set_id (ID_XLIM);
3808  xlim.set_hidden (true);
3809  ylim.set_id (ID_YLIM);
3810  ylim.set_hidden (true);
3811  zlim.set_id (ID_ZLIM);
3812  zlim.set_hidden (true);
3814  aliminclude.set_hidden (true);
3816  climinclude.set_hidden (true);
3818  xliminclude.set_hidden (true);
3820  yliminclude.set_hidden (true);
3822  zliminclude.set_hidden (true);
3823  init ();
3824 }
3825 
3826 void
3827 patch::properties::set (const caseless_str& pname_arg, const octave_value& val)
3828 {
3829  const std::set<std::string>& pnames = all_property_names ();
3830 
3831  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3832 
3833  if (error_state)
3834  return;
3835 
3836  if (pname.compare ("alphadatamapping"))
3837  set_alphadatamapping (val);
3838  else if (pname.compare ("ambientstrength"))
3839  set_ambientstrength (val);
3840  else if (pname.compare ("backfacelighting"))
3841  set_backfacelighting (val);
3842  else if (pname.compare ("cdata"))
3843  set_cdata (val);
3844  else if (pname.compare ("cdatamapping"))
3845  set_cdatamapping (val);
3846  else if (pname.compare ("diffusestrength"))
3847  set_diffusestrength (val);
3848  else if (pname.compare ("displayname"))
3849  set_displayname (val);
3850  else if (pname.compare ("edgealpha"))
3851  set_edgealpha (val);
3852  else if (pname.compare ("edgecolor"))
3853  set_edgecolor (val);
3854  else if (pname.compare ("edgelighting"))
3855  set_edgelighting (val);
3856  else if (pname.compare ("erasemode"))
3857  set_erasemode (val);
3858  else if (pname.compare ("facealpha"))
3859  set_facealpha (val);
3860  else if (pname.compare ("facecolor"))
3861  set_facecolor (val);
3862  else if (pname.compare ("facelighting"))
3863  set_facelighting (val);
3864  else if (pname.compare ("faces"))
3865  set_faces (val);
3866  else if (pname.compare ("facevertexalphadata"))
3867  set_facevertexalphadata (val);
3868  else if (pname.compare ("facevertexcdata"))
3869  set_facevertexcdata (val);
3870  else if (pname.compare ("interpreter"))
3871  set_interpreter (val);
3872  else if (pname.compare ("linestyle"))
3873  set_linestyle (val);
3874  else if (pname.compare ("linewidth"))
3875  set_linewidth (val);
3876  else if (pname.compare ("marker"))
3877  set_marker (val);
3878  else if (pname.compare ("markeredgecolor"))
3879  set_markeredgecolor (val);
3880  else if (pname.compare ("markerfacecolor"))
3881  set_markerfacecolor (val);
3882  else if (pname.compare ("markersize"))
3883  set_markersize (val);
3884  else if (pname.compare ("normalmode"))
3885  set_normalmode (val);
3886  else if (pname.compare ("specularcolorreflectance"))
3887  set_specularcolorreflectance (val);
3888  else if (pname.compare ("specularexponent"))
3889  set_specularexponent (val);
3890  else if (pname.compare ("specularstrength"))
3891  set_specularstrength (val);
3892  else if (pname.compare ("vertexnormals"))
3893  set_vertexnormals (val);
3894  else if (pname.compare ("vertices"))
3895  set_vertices (val);
3896  else if (pname.compare ("xdata"))
3897  set_xdata (val);
3898  else if (pname.compare ("ydata"))
3899  set_ydata (val);
3900  else if (pname.compare ("zdata"))
3901  set_zdata (val);
3902  else if (pname.compare ("aliminclude"))
3903  set_aliminclude (val);
3904  else if (pname.compare ("climinclude"))
3905  set_climinclude (val);
3906  else if (pname.compare ("xliminclude"))
3907  set_xliminclude (val);
3908  else if (pname.compare ("yliminclude"))
3909  set_yliminclude (val);
3910  else if (pname.compare ("zliminclude"))
3911  set_zliminclude (val);
3912  else
3913  base_properties::set (pname, val);
3914 }
3915 
3917 patch::properties::get (bool all) const
3918 {
3920 
3921  m.assign ("alphadatamapping", octave_value (get_alphadatamapping ()));
3922  m.assign ("ambientstrength", octave_value (get_ambientstrength ()));
3923  m.assign ("backfacelighting", octave_value (get_backfacelighting ()));
3924  m.assign ("cdata", octave_value (get_cdata ()));
3925  m.assign ("cdatamapping", octave_value (get_cdatamapping ()));
3926  m.assign ("diffusestrength", octave_value (get_diffusestrength ()));
3927  m.assign ("displayname", octave_value (get_displayname ()));
3928  m.assign ("edgealpha", octave_value (get_edgealpha ()));
3929  m.assign ("edgecolor", octave_value (get_edgecolor ()));
3930  m.assign ("edgelighting", octave_value (get_edgelighting ()));
3931  m.assign ("erasemode", octave_value (get_erasemode ()));
3932  m.assign ("facealpha", octave_value (get_facealpha ()));
3933  m.assign ("facecolor", octave_value (get_facecolor ()));
3934  m.assign ("facelighting", octave_value (get_facelighting ()));
3935  m.assign ("faces", octave_value (get_faces ()));
3936  m.assign ("facevertexalphadata", octave_value (get_facevertexalphadata ()));
3937  m.assign ("facevertexcdata", octave_value (get_facevertexcdata ()));
3938  m.assign ("interpreter", octave_value (get_interpreter ()));
3939  m.assign ("linestyle", octave_value (get_linestyle ()));
3940  m.assign ("linewidth", octave_value (get_linewidth ()));
3941  m.assign ("marker", octave_value (get_marker ()));
3942  m.assign ("markeredgecolor", octave_value (get_markeredgecolor ()));
3943  m.assign ("markerfacecolor", octave_value (get_markerfacecolor ()));
3944  m.assign ("markersize", octave_value (get_markersize ()));
3945  m.assign ("normalmode", octave_value (get_normalmode ()));
3946  m.assign ("specularcolorreflectance", octave_value (get_specularcolorreflectance ()));
3947  m.assign ("specularexponent", octave_value (get_specularexponent ()));
3948  m.assign ("specularstrength", octave_value (get_specularstrength ()));
3949  m.assign ("vertexnormals", octave_value (get_vertexnormals ()));
3950  m.assign ("vertices", octave_value (get_vertices ()));
3951  m.assign ("xdata", octave_value (get_xdata ()));
3952  m.assign ("ydata", octave_value (get_ydata ()));
3953  m.assign ("zdata", octave_value (get_zdata ()));
3954  if (all)
3955  m.assign ("alim", octave_value (get_alim ()));
3956  if (all)
3957  m.assign ("clim", octave_value (get_clim ()));
3958  if (all)
3959  m.assign ("xlim", octave_value (get_xlim ()));
3960  if (all)
3961  m.assign ("ylim", octave_value (get_ylim ()));
3962  if (all)
3963  m.assign ("zlim", octave_value (get_zlim ()));
3964  if (all)
3965  m.assign ("aliminclude", octave_value (get_aliminclude ()));
3966  if (all)
3967  m.assign ("climinclude", octave_value (get_climinclude ()));
3968  if (all)
3969  m.assign ("xliminclude", octave_value (get_xliminclude ()));
3970  if (all)
3971  m.assign ("yliminclude", octave_value (get_yliminclude ()));
3972  if (all)
3973  m.assign ("zliminclude", octave_value (get_zliminclude ()));
3974 
3975  return m;
3976 }
3977 
3979 patch::properties::get (const caseless_str& pname_arg) const
3980 {
3981  octave_value retval;
3982 
3983  const std::set<std::string>& pnames = all_property_names ();
3984 
3985  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3986 
3987  if (error_state)
3988  return retval;
3989 
3990  if (pname.compare ("alphadatamapping"))
3991  retval = get_alphadatamapping ();
3992  else if (pname.compare ("ambientstrength"))
3993  retval = get_ambientstrength ();
3994  else if (pname.compare ("backfacelighting"))
3995  retval = get_backfacelighting ();
3996  else if (pname.compare ("cdata"))
3997  retval = get_cdata ();
3998  else if (pname.compare ("cdatamapping"))
3999  retval = get_cdatamapping ();
4000  else if (pname.compare ("diffusestrength"))
4001  retval = get_diffusestrength ();
4002  else if (pname.compare ("displayname"))
4003  retval = get_displayname ();
4004  else if (pname.compare ("edgealpha"))
4005  retval = get_edgealpha ();
4006  else if (pname.compare ("edgecolor"))
4007  retval = get_edgecolor ();
4008  else if (pname.compare ("edgelighting"))
4009  retval = get_edgelighting ();
4010  else if (pname.compare ("erasemode"))
4011  retval = get_erasemode ();
4012  else if (pname.compare ("facealpha"))
4013  retval = get_facealpha ();
4014  else if (pname.compare ("facecolor"))
4015  retval = get_facecolor ();
4016  else if (pname.compare ("facelighting"))
4017  retval = get_facelighting ();
4018  else if (pname.compare ("faces"))
4019  retval = get_faces ();
4020  else if (pname.compare ("facevertexalphadata"))
4021  retval = get_facevertexalphadata ();
4022  else if (pname.compare ("facevertexcdata"))
4023  retval = get_facevertexcdata ();
4024  else if (pname.compare ("interpreter"))
4025  retval = get_interpreter ();
4026  else if (pname.compare ("linestyle"))
4027  retval = get_linestyle ();
4028  else if (pname.compare ("linewidth"))
4029  retval = get_linewidth ();
4030  else if (pname.compare ("marker"))
4031  retval = get_marker ();
4032  else if (pname.compare ("markeredgecolor"))
4033  retval = get_markeredgecolor ();
4034  else if (pname.compare ("markerfacecolor"))
4035  retval = get_markerfacecolor ();
4036  else if (pname.compare ("markersize"))
4037  retval = get_markersize ();
4038  else if (pname.compare ("normalmode"))
4039  retval = get_normalmode ();
4040  else if (pname.compare ("specularcolorreflectance"))
4041  retval = get_specularcolorreflectance ();
4042  else if (pname.compare ("specularexponent"))
4043  retval = get_specularexponent ();
4044  else if (pname.compare ("specularstrength"))
4045  retval = get_specularstrength ();
4046  else if (pname.compare ("vertexnormals"))
4047  retval = get_vertexnormals ();
4048  else if (pname.compare ("vertices"))
4049  retval = get_vertices ();
4050  else if (pname.compare ("xdata"))
4051  retval = get_xdata ();
4052  else if (pname.compare ("ydata"))
4053  retval = get_ydata ();
4054  else if (pname.compare ("zdata"))
4055  retval = get_zdata ();
4056  else if (pname.compare ("alim"))
4057  retval = get_alim ();
4058  else if (pname.compare ("clim"))
4059  retval = get_clim ();
4060  else if (pname.compare ("xlim"))
4061  retval = get_xlim ();
4062  else if (pname.compare ("ylim"))
4063  retval = get_ylim ();
4064  else if (pname.compare ("zlim"))
4065  retval = get_zlim ();
4066  else if (pname.compare ("aliminclude"))
4067  retval = get_aliminclude ();
4068  else if (pname.compare ("climinclude"))
4069  retval = get_climinclude ();
4070  else if (pname.compare ("xliminclude"))
4071  retval = get_xliminclude ();
4072  else if (pname.compare ("yliminclude"))
4073  retval = get_yliminclude ();
4074  else if (pname.compare ("zliminclude"))
4075  retval = get_zliminclude ();
4076  else
4077  retval = base_properties::get (pname);
4078 
4079  return retval;
4080 }
4081 
4082 property
4084 {
4085  const std::set<std::string>& pnames = all_property_names ();
4086 
4087  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
4088 
4089  if (error_state)
4090  return property ();
4091 
4092  if (pname.compare ("alphadatamapping"))
4093  return property (&alphadatamapping, true);
4094  else if (pname.compare ("ambientstrength"))
4095  return property (&ambientstrength, true);
4096  else if (pname.compare ("backfacelighting"))
4097  return property (&backfacelighting, true);
4098  else if (pname.compare ("cdata"))
4099  return property (&cdata, true);
4100  else if (pname.compare ("cdatamapping"))
4101  return property (&cdatamapping, true);
4102  else if (pname.compare ("diffusestrength"))
4103  return property (&diffusestrength, true);
4104  else if (pname.compare ("displayname"))
4105  return property (&displayname, true);
4106  else if (pname.compare ("edgealpha"))
4107  return property (&edgealpha, true);
4108  else if (pname.compare ("edgecolor"))
4109  return property (&edgecolor, true);
4110  else if (pname.compare ("edgelighting"))
4111  return property (&edgelighting, true);
4112  else if (pname.compare ("erasemode"))
4113  return property (&erasemode, true);
4114  else if (pname.compare ("facealpha"))
4115  return property (&facealpha, true);
4116  else if (pname.compare ("facecolor"))
4117  return property (&facecolor, true);
4118  else if (pname.compare ("facelighting"))
4119  return property (&facelighting, true);
4120  else if (pname.compare ("faces"))
4121  return property (&faces, true);
4122  else if (pname.compare ("facevertexalphadata"))
4123  return property (&facevertexalphadata, true);
4124  else if (pname.compare ("facevertexcdata"))
4125  return property (&facevertexcdata, true);
4126  else if (pname.compare ("interpreter"))
4127  return property (&interpreter, true);
4128  else if (pname.compare ("linestyle"))
4129  return property (&linestyle, true);
4130  else if (pname.compare ("linewidth"))
4131  return property (&linewidth, true);
4132  else if (pname.compare ("marker"))
4133  return property (&marker, true);
4134  else if (pname.compare ("markeredgecolor"))
4135  return property (&markeredgecolor, true);
4136  else if (pname.compare ("markerfacecolor"))
4137  return property (&markerfacecolor, true);
4138  else if (pname.compare ("markersize"))
4139  return property (&markersize, true);
4140  else if (pname.compare ("normalmode"))
4141  return property (&normalmode, true);
4142  else if (pname.compare ("specularcolorreflectance"))
4143  return property (&specularcolorreflectance, true);
4144  else if (pname.compare ("specularexponent"))
4145  return property (&specularexponent, true);
4146  else if (pname.compare ("specularstrength"))
4147  return property (&specularstrength, true);
4148  else if (pname.compare ("vertexnormals"))
4149  return property (&vertexnormals, true);
4150  else if (pname.compare ("vertices"))
4151  return property (&vertices, true);
4152  else if (pname.compare ("xdata"))
4153  return property (&xdata, true);
4154  else if (pname.compare ("ydata"))
4155  return property (&ydata, true);
4156  else if (pname.compare ("zdata"))
4157  return property (&zdata, true);
4158  else if (pname.compare ("alim"))
4159  return property (&alim, true);
4160  else if (pname.compare ("clim"))
4161  return property (&clim, true);
4162  else if (pname.compare ("xlim"))
4163  return property (&xlim, true);
4164  else if (pname.compare ("ylim"))
4165  return property (&ylim, true);
4166  else if (pname.compare ("zlim"))
4167  return property (&zlim, true);
4168  else if (pname.compare ("aliminclude"))
4169  return property (&aliminclude, true);
4170  else if (pname.compare ("climinclude"))
4171  return property (&climinclude, true);
4172  else if (pname.compare ("xliminclude"))
4173  return property (&xliminclude, true);
4174  else if (pname.compare ("yliminclude"))
4175  return property (&yliminclude, true);
4176  else if (pname.compare ("zliminclude"))
4177  return property (&zliminclude, true);
4178  else
4179  return base_properties::get_property (pname);
4180 }
4181 
4184 {
4186 
4187  m["alphadatamapping"] = "scaled";
4188  m["ambientstrength"] = 0.3;
4189  m["backfacelighting"] = "reverselit";
4190  m["cdata"] = Matrix ();
4191  m["cdatamapping"] = "scaled";
4192  m["diffusestrength"] = 0.6;
4193  m["displayname"] = "";
4194  m["edgealpha"] = double_radio_property (1.0, radio_values ("flat|interp"));
4195  m["edgecolor"] = color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"));
4196  m["edgelighting"] = "none";
4197  m["erasemode"] = "normal";
4198  m["facealpha"] = double_radio_property (1.0, radio_values ("flat|interp"));
4199  m["facecolor"] = color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"));
4200  m["facelighting"] = "none";
4201  m["faces"] = Matrix ();
4202  m["facevertexalphadata"] = Matrix ();
4203  m["facevertexcdata"] = Matrix ();
4204  m["interpreter"] = "tex";
4205  m["linestyle"] = "-";
4206  m["linewidth"] = 0.5;
4207  m["marker"] = "none";
4208  m["markeredgecolor"] = color_property (radio_values ("none|{auto}|flat"), color_values (0, 0, 0));
4209  m["markerfacecolor"] = color_property (radio_values ("{none}|auto|flat"), color_values (0, 0, 0));
4210  m["markersize"] = 6;
4211  m["normalmode"] = "auto";
4212  m["specularcolorreflectance"] = 1.0;
4213  m["specularexponent"] = 10.0;
4214  m["specularstrength"] = 0.6;
4215  m[&quo