GNU Octave  4.0.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;
291 
292  static bool initialized = false;
293 
294  if (! initialized)
295  {
296  all_pnames.insert ("type");
297  all_pnames.insert ("__myhandle__");
298 
299  initialized = true;
300  }
301 
302  return all_pnames;
303 }
304 
305 bool
307 {
308  std::set<std::string> pnames = readonly_property_names ();
309 
310  return pnames.find (pname) != pnames.end ();
311 }
312 
313 std::set<std::string>
315 {
316  static std::set<std::string> all_pnames = core_property_names ();
317 
318  std::set<std::string> retval = all_pnames;
319  std::set<std::string> dyn_props = dynamic_property_names ();
320  retval.insert (dyn_props.begin (), dyn_props.end ());
321  for (std::map<caseless_str, property, cmp_caseless_str>::const_iterator p = all_props.begin ();
322  p != all_props.end (); p++)
323  retval.insert (p->first);
324 
325  return retval;
326 }
327 
328 // ******** root_figure ********
329 
331  : base_properties (go_name, mh, p),
332  callbackobject ("callbackobject", mh, graphics_handle ()),
333  commandwindowsize ("commandwindowsize", mh, Matrix (1, 2, 0)),
334  currentfigure ("currentfigure", mh, graphics_handle ()),
335  diary ("diary", mh, "off"),
336  diaryfile ("diaryfile", mh, "diary"),
337  echo ("echo", mh, "off"),
338  errormessage ("errormessage", mh, ""),
339  fixedwidthfontname ("fixedwidthfontname", mh, "Courier"),
340  format ("format", mh, "+|bank|bit|hex|long|longe|longeng|longg|native-bit|native-hex|none|rat|{short}|shorte|shorteng|shortg"),
341  formatspacing ("formatspacing", mh, "compact|{loose}"),
342  language ("language", mh, "ascii"),
343  monitorpositions ("monitorpositions", mh, Matrix (1, 4, 0)),
344  pointerlocation ("pointerlocation", mh, Matrix (1, 2, 0)),
345  pointerwindow ("pointerwindow", mh, 0.0),
346  recursionlimit ("recursionlimit", mh, 256.0),
347  screendepth ("screendepth", mh, default_screendepth ()),
348  screenpixelsperinch ("screenpixelsperinch", mh, default_screenpixelsperinch ()),
349  screensize ("screensize", mh, default_screensize ()),
350  showhiddenhandles ("showhiddenhandles", mh, "off"),
351  units ("units", mh, "inches|centimeters|normalized|points|{pixels}")
352 {
358  echo.set_id (ID_ECHO);
373  init ();
374 }
375 
376 void
378 {
379  const std::set<std::string>& pnames = all_property_names ();
380 
381  caseless_str pname = validate_property_name ("set", go_name, pnames, pname_arg);
382 
383  if (error_state)
384  return;
385  else if (has_readonly_property (pname))
386  {
387  error ("set: \"%s\" is read-only", pname.c_str ());
388  return;
389  }
390 
391  if (pname.compare ("currentfigure"))
392  set_currentfigure (val);
393  else if (pname.compare ("diary"))
394  set_diary (val);
395  else if (pname.compare ("diaryfile"))
396  set_diaryfile (val);
397  else if (pname.compare ("echo"))
398  set_echo (val);
399  else if (pname.compare ("fixedwidthfontname"))
400  set_fixedwidthfontname (val);
401  else if (pname.compare ("format"))
402  set_format (val);
403  else if (pname.compare ("formatspacing"))
404  set_formatspacing (val);
405  else if (pname.compare ("language"))
406  set_language (val);
407  else if (pname.compare ("monitorpositions"))
408  set_monitorpositions (val);
409  else if (pname.compare ("pointerlocation"))
410  set_pointerlocation (val);
411  else if (pname.compare ("recursionlimit"))
412  set_recursionlimit (val);
413  else if (pname.compare ("showhiddenhandles"))
414  set_showhiddenhandles (val);
415  else if (pname.compare ("units"))
416  set_units (val);
417  else
418  base_properties::set (pname, val);
419 }
420 
423 {
425 
426  m.assign ("callbackobject", octave_value (get_callbackobject ().as_octave_value ()));
427  m.assign ("commandwindowsize", octave_value (get_commandwindowsize ()));
428  m.assign ("currentfigure", octave_value (get_currentfigure ().as_octave_value ()));
429  m.assign ("diary", octave_value (get_diary ()));
430  m.assign ("diaryfile", octave_value (get_diaryfile ()));
431  m.assign ("echo", octave_value (get_echo ()));
432  m.assign ("errormessage", octave_value (get_errormessage ()));
433  m.assign ("fixedwidthfontname", octave_value (get_fixedwidthfontname ()));
434  m.assign ("format", octave_value (get_format ()));
435  m.assign ("formatspacing", octave_value (get_formatspacing ()));
436  m.assign ("language", octave_value (get_language ()));
437  m.assign ("monitorpositions", octave_value (get_monitorpositions ()));
438  m.assign ("pointerlocation", octave_value (get_pointerlocation ()));
439  m.assign ("pointerwindow", octave_value (get_pointerwindow ()));
440  m.assign ("recursionlimit", octave_value (get_recursionlimit ()));
441  m.assign ("screendepth", octave_value (get_screendepth ()));
442  m.assign ("screenpixelsperinch", octave_value (get_screenpixelsperinch ()));
443  m.assign ("screensize", octave_value (get_screensize ()));
444  m.assign ("showhiddenhandles", octave_value (get_showhiddenhandles ()));
445  m.assign ("units", octave_value (get_units ()));
446 
447  return m;
448 }
449 
452 {
453  octave_value retval;
454 
455  const std::set<std::string>& pnames = all_property_names ();
456 
457  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
458 
459  if (error_state)
460  return retval;
461 
462  if (pname.compare ("callbackobject"))
463  retval = get_callbackobject ().as_octave_value ();
464  else if (pname.compare ("commandwindowsize"))
465  retval = get_commandwindowsize ();
466  else if (pname.compare ("currentfigure"))
467  retval = get_currentfigure ().as_octave_value ();
468  else if (pname.compare ("diary"))
469  retval = get_diary ();
470  else if (pname.compare ("diaryfile"))
471  retval = get_diaryfile ();
472  else if (pname.compare ("echo"))
473  retval = get_echo ();
474  else if (pname.compare ("errormessage"))
475  retval = get_errormessage ();
476  else if (pname.compare ("fixedwidthfontname"))
477  retval = get_fixedwidthfontname ();
478  else if (pname.compare ("format"))
479  retval = get_format ();
480  else if (pname.compare ("formatspacing"))
481  retval = get_formatspacing ();
482  else if (pname.compare ("language"))
483  retval = get_language ();
484  else if (pname.compare ("monitorpositions"))
485  retval = get_monitorpositions ();
486  else if (pname.compare ("pointerlocation"))
487  retval = get_pointerlocation ();
488  else if (pname.compare ("pointerwindow"))
489  retval = get_pointerwindow ();
490  else if (pname.compare ("recursionlimit"))
491  retval = get_recursionlimit ();
492  else if (pname.compare ("screendepth"))
493  retval = get_screendepth ();
494  else if (pname.compare ("screenpixelsperinch"))
495  retval = get_screenpixelsperinch ();
496  else if (pname.compare ("screensize"))
497  retval = get_screensize ();
498  else if (pname.compare ("showhiddenhandles"))
499  retval = get_showhiddenhandles ();
500  else if (pname.compare ("units"))
501  retval = get_units ();
502  else
503  retval = base_properties::get (pname);
504 
505  return retval;
506 }
507 
508 property
510 {
511  const std::set<std::string>& pnames = all_property_names ();
512 
513  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
514 
515  if (error_state)
516  return property ();
517 
518  if (pname.compare ("callbackobject"))
519  return property (&callbackobject, true);
520  else if (pname.compare ("commandwindowsize"))
521  return property (&commandwindowsize, true);
522  else if (pname.compare ("currentfigure"))
523  return property (&currentfigure, true);
524  else if (pname.compare ("diary"))
525  return property (&diary, true);
526  else if (pname.compare ("diaryfile"))
527  return property (&diaryfile, true);
528  else if (pname.compare ("echo"))
529  return property (&echo, true);
530  else if (pname.compare ("errormessage"))
531  return property (&errormessage, true);
532  else if (pname.compare ("fixedwidthfontname"))
533  return property (&fixedwidthfontname, true);
534  else if (pname.compare ("format"))
535  return property (&format, true);
536  else if (pname.compare ("formatspacing"))
537  return property (&formatspacing, true);
538  else if (pname.compare ("language"))
539  return property (&language, true);
540  else if (pname.compare ("monitorpositions"))
541  return property (&monitorpositions, true);
542  else if (pname.compare ("pointerlocation"))
543  return property (&pointerlocation, true);
544  else if (pname.compare ("pointerwindow"))
545  return property (&pointerwindow, true);
546  else if (pname.compare ("recursionlimit"))
547  return property (&recursionlimit, true);
548  else if (pname.compare ("screendepth"))
549  return property (&screendepth, true);
550  else if (pname.compare ("screenpixelsperinch"))
551  return property (&screenpixelsperinch, true);
552  else if (pname.compare ("screensize"))
553  return property (&screensize, true);
554  else if (pname.compare ("showhiddenhandles"))
555  return property (&showhiddenhandles, true);
556  else if (pname.compare ("units"))
557  return property (&units, true);
558  else
559  return base_properties::get_property (pname);
560 }
561 
564 {
566 
567  m["callbackobject"] = graphics_handle ().as_octave_value ();
568  m["commandwindowsize"] = Matrix (1, 2, 0);
569  m["currentfigure"] = graphics_handle ().as_octave_value ();
570  m["diary"] = "off";
571  m["diaryfile"] = "diary";
572  m["echo"] = "off";
573  m["errormessage"] = "";
574  m["fixedwidthfontname"] = "Courier";
575  m["format"] = "short";
576  m["formatspacing"] = "loose";
577  m["language"] = "ascii";
578  m["monitorpositions"] = Matrix (1, 4, 0);
579  m["pointerlocation"] = Matrix (1, 2, 0);
580  m["pointerwindow"] = 0.0;
581  m["recursionlimit"] = 256.0;
582  m["screendepth"] = default_screendepth ();
583  m["screenpixelsperinch"] = default_screenpixelsperinch ();
584  m["screensize"] = default_screensize ();
585  m["showhiddenhandles"] = "off";
586  m["units"] = "pixels";
587 
588  return m;
589 }
590 
591 std::string root_figure::properties::go_name ("root");
592 
593 std::set<std::string>
595 {
596  static std::set<std::string> all_pnames;
597 
598  static bool initialized = false;
599 
600  if (! initialized)
601  {
602  all_pnames.insert ("callbackobject");
603  all_pnames.insert ("commandwindowsize");
604  all_pnames.insert ("currentfigure");
605  all_pnames.insert ("diary");
606  all_pnames.insert ("diaryfile");
607  all_pnames.insert ("echo");
608  all_pnames.insert ("errormessage");
609  all_pnames.insert ("fixedwidthfontname");
610  all_pnames.insert ("format");
611  all_pnames.insert ("formatspacing");
612  all_pnames.insert ("language");
613  all_pnames.insert ("monitorpositions");
614  all_pnames.insert ("pointerlocation");
615  all_pnames.insert ("pointerwindow");
616  all_pnames.insert ("recursionlimit");
617  all_pnames.insert ("screendepth");
618  all_pnames.insert ("screenpixelsperinch");
619  all_pnames.insert ("screensize");
620  all_pnames.insert ("showhiddenhandles");
621  all_pnames.insert ("units");
622 
623  std::set<std::string> base_pnames = base_properties::core_property_names ();
624  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
625 
626  initialized = true;
627  }
628 
629  return all_pnames;
630 }
631 
632 bool
634 {
635  std::set<std::string> pnames = core_property_names ();
636 
637  return pnames.find (pname) != pnames.end ();
638 }
639 
640 std::set<std::string>
642 {
643  static std::set<std::string> all_pnames;
644 
645  static bool initialized = false;
646 
647  if (! initialized)
648  {
649  all_pnames.insert ("callbackobject");
650  all_pnames.insert ("commandwindowsize");
651  all_pnames.insert ("errormessage");
652  all_pnames.insert ("pointerwindow");
653  all_pnames.insert ("screendepth");
654  all_pnames.insert ("screenpixelsperinch");
655  all_pnames.insert ("screensize");
656 
657  std::set<std::string> base_pnames = base_properties::readonly_property_names ();
658  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
659 
660  initialized = true;
661  }
662 
663  return all_pnames;
664 }
665 
666 bool
668 {
669  std::set<std::string> pnames = readonly_property_names ();
670 
671  return pnames.find (pname) != pnames.end ();
672 }
673 
674 std::set<std::string>
676 {
677  static std::set<std::string> all_pnames = core_property_names ();
678 
679  std::set<std::string> retval = all_pnames;
680  std::set<std::string> base_props = base_properties::all_property_names ();
681  retval.insert (base_props.begin (), base_props.end ());
682 
683  return retval;
684 }
685 
686 bool
688 {
689  std::set<std::string> pnames = all_property_names ();
690 
691  return pnames.find (pname) != pnames.end ();
692 }
693 
694 // ******** figure ********
695 
697  : base_properties (go_name, mh, p),
698  alphamap ("alphamap", mh, Matrix (64, 1, 1)),
699  buttondownfcn ("buttondownfcn", mh, Matrix ()),
700  closerequestfcn ("closerequestfcn", mh, "closereq"),
701  color ("color", mh, color_property (color_values (1, 1, 1), radio_values ("none"))),
702  colormap ("colormap", mh, jet_colormap ()),
703  currentaxes ("currentaxes", mh, graphics_handle ()),
704  currentcharacter ("currentcharacter", mh, ""),
705  currentobject ("currentobject", mh, graphics_handle ()),
706  currentpoint ("currentpoint", mh, Matrix (2, 1, 0)),
707  dockcontrols ("dockcontrols", mh, "off"),
708  doublebuffer ("doublebuffer", mh, "on"),
709  filename ("filename", mh, ""),
710  integerhandle ("integerhandle", mh, "on"),
711  inverthardcopy ("inverthardcopy", mh, "off"),
712  keypressfcn ("keypressfcn", mh, Matrix ()),
713  keyreleasefcn ("keyreleasefcn", mh, Matrix ()),
714  menubar ("menubar", mh, "none|{figure}"),
715  mincolormap ("mincolormap", mh, 64),
716  name ("name", mh, ""),
717  nextplot ("nextplot", mh, "new|{add}|replacechildren|replace"),
718  numbertitle ("numbertitle", mh, "on"),
719  outerposition ("outerposition", mh, Matrix (1, 4, -1.0)),
720  paperorientation ("paperorientation", mh, "{portrait}|landscape|rotated"),
721  paperposition ("paperposition", mh, default_figure_paperposition ()),
722  paperpositionmode ("paperpositionmode", mh, "auto|{manual}"),
723  papersize ("papersize", mh, default_figure_papersize ()),
724  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>"),
725  paperunits ("paperunits", mh, "{inches}|centimeters|normalized|points"),
726  pointer ("pointer", mh, "crosshair|fullcrosshair|{arrow}|ibeam|watch|topl|topr|botl|botr|left|top|right|bottom|circle|cross|fleur|custom|hand"),
727  pointershapecdata ("pointershapecdata", mh, Matrix (16, 16, 0)),
728  pointershapehotspot ("pointershapehotspot", mh, Matrix (1, 2, 0)),
729  position ("position", mh, default_figure_position ()),
730  renderer ("renderer", mh, "{painters}|zbuffer|opengl|none"),
731  renderermode ("renderermode", mh, "{auto}|manual"),
732  resize ("resize", mh, "on"),
733  resizefcn ("resizefcn", mh, Matrix ()),
734  selectiontype ("selectiontype", mh, "{normal}|open|alt|extend"),
735  toolbar ("toolbar", mh, "none|{auto}|figure"),
736  units ("units", mh, "inches|centimeters|normalized|points|{pixels}|characters"),
737  windowbuttondownfcn ("windowbuttondownfcn", mh, Matrix ()),
738  windowbuttonmotionfcn ("windowbuttonmotionfcn", mh, Matrix ()),
739  windowbuttonupfcn ("windowbuttonupfcn", mh, Matrix ()),
740  windowkeypressfcn ("windowkeypressfcn", mh, Matrix ()),
741  windowkeyreleasefcn ("windowkeyreleasefcn", mh, Matrix ()),
742  windowscrollwheelfcn ("windowscrollwheelfcn", mh, Matrix ()),
743  windowstyle ("windowstyle", mh, "{normal}|modal|docked"),
744  wvisual ("wvisual", mh, ""),
745  wvisualmode ("wvisualmode", mh, "{auto}|manual"),
746  xdisplay ("xdisplay", mh, ""),
747  xvisual ("xvisual", mh, ""),
748  xvisualmode ("xvisualmode", mh, "{auto}|manual"),
749  __mouse_mode__ ("__mouse_mode__", mh, "{none}|pan|rotate|select|text|zoom"),
750  __pan_mode__ ("__pan_mode__", mh, Matrix ()),
751  __rotate_mode__ ("__rotate_mode__", mh, Matrix ()),
752  __zoom_mode__ ("__zoom_mode__", mh, Matrix ()),
753  __enhanced__ ("__enhanced__", mh, "on"),
754  __graphics_toolkit__ ("__graphics_toolkit__", mh, gtk_manager::default_toolkit ()),
755  __guidata__ ("__guidata__", mh, Matrix ()),
756  __plot_stream__ ("__plot_stream__", mh, Matrix ())
757 {
776  name.set_id (ID_NAME);
810  __mouse_mode__.set_hidden (true);
812  __pan_mode__.set_hidden (true);
816  __zoom_mode__.set_hidden (true);
818  __enhanced__.set_hidden (true);
822  __guidata__.set_hidden (true);
825  init ();
826 }
827 
828 void
829 figure::properties::set (const caseless_str& pname_arg, const octave_value& val)
830 {
831  const std::set<std::string>& pnames = all_property_names ();
832 
833  caseless_str pname = validate_property_name ("set", go_name, pnames, pname_arg);
834 
835  if (error_state)
836  return;
837  else if (has_readonly_property (pname))
838  {
839  error ("set: \"%s\" is read-only", pname.c_str ());
840  return;
841  }
842 
843  if (pname.compare ("alphamap"))
844  set_alphamap (val);
845  else if (pname.compare ("buttondownfcn"))
846  set_buttondownfcn (val);
847  else if (pname.compare ("closerequestfcn"))
848  set_closerequestfcn (val);
849  else if (pname.compare ("color"))
850  set_color (val);
851  else if (pname.compare ("colormap"))
852  set_colormap (val);
853  else if (pname.compare ("currentaxes"))
854  set_currentaxes (val);
855  else if (pname.compare ("dockcontrols"))
856  set_dockcontrols (val);
857  else if (pname.compare ("doublebuffer"))
858  set_doublebuffer (val);
859  else if (pname.compare ("filename"))
860  set_filename (val);
861  else if (pname.compare ("integerhandle"))
862  set_integerhandle (val);
863  else if (pname.compare ("inverthardcopy"))
864  set_inverthardcopy (val);
865  else if (pname.compare ("keypressfcn"))
866  set_keypressfcn (val);
867  else if (pname.compare ("keyreleasefcn"))
868  set_keyreleasefcn (val);
869  else if (pname.compare ("menubar"))
870  set_menubar (val);
871  else if (pname.compare ("mincolormap"))
872  set_mincolormap (val);
873  else if (pname.compare ("name"))
874  set_name (val);
875  else if (pname.compare ("nextplot"))
876  set_nextplot (val);
877  else if (pname.compare ("numbertitle"))
878  set_numbertitle (val);
879  else if (pname.compare ("outerposition"))
880  set_outerposition (val);
881  else if (pname.compare ("paperorientation"))
882  set_paperorientation (val);
883  else if (pname.compare ("paperposition"))
884  set_paperposition (val);
885  else if (pname.compare ("paperpositionmode"))
886  set_paperpositionmode (val);
887  else if (pname.compare ("papersize"))
888  set_papersize (val);
889  else if (pname.compare ("papertype"))
890  set_papertype (val);
891  else if (pname.compare ("paperunits"))
892  set_paperunits (val);
893  else if (pname.compare ("pointer"))
894  set_pointer (val);
895  else if (pname.compare ("pointershapecdata"))
896  set_pointershapecdata (val);
897  else if (pname.compare ("pointershapehotspot"))
898  set_pointershapehotspot (val);
899  else if (pname.compare ("position"))
900  set_position (val);
901  else if (pname.compare ("renderer"))
902  set_renderer (val);
903  else if (pname.compare ("renderermode"))
904  set_renderermode (val);
905  else if (pname.compare ("resize"))
906  set_resize (val);
907  else if (pname.compare ("resizefcn"))
908  set_resizefcn (val);
909  else if (pname.compare ("selectiontype"))
910  set_selectiontype (val);
911  else if (pname.compare ("toolbar"))
912  set_toolbar (val);
913  else if (pname.compare ("units"))
914  set_units (val);
915  else if (pname.compare ("windowbuttondownfcn"))
916  set_windowbuttondownfcn (val);
917  else if (pname.compare ("windowbuttonmotionfcn"))
918  set_windowbuttonmotionfcn (val);
919  else if (pname.compare ("windowbuttonupfcn"))
920  set_windowbuttonupfcn (val);
921  else if (pname.compare ("windowkeypressfcn"))
922  set_windowkeypressfcn (val);
923  else if (pname.compare ("windowkeyreleasefcn"))
924  set_windowkeyreleasefcn (val);
925  else if (pname.compare ("windowscrollwheelfcn"))
926  set_windowscrollwheelfcn (val);
927  else if (pname.compare ("windowstyle"))
928  set_windowstyle (val);
929  else if (pname.compare ("wvisual"))
930  set_wvisual (val);
931  else if (pname.compare ("wvisualmode"))
932  set_wvisualmode (val);
933  else if (pname.compare ("xdisplay"))
934  set_xdisplay (val);
935  else if (pname.compare ("xvisual"))
936  set_xvisual (val);
937  else if (pname.compare ("xvisualmode"))
938  set_xvisualmode (val);
939  else if (pname.compare ("__mouse_mode__"))
940  set___mouse_mode__ (val);
941  else if (pname.compare ("__pan_mode__"))
942  set___pan_mode__ (val);
943  else if (pname.compare ("__rotate_mode__"))
944  set___rotate_mode__ (val);
945  else if (pname.compare ("__zoom_mode__"))
946  set___zoom_mode__ (val);
947  else if (pname.compare ("__enhanced__"))
948  set___enhanced__ (val);
949  else if (pname.compare ("__graphics_toolkit__"))
950  set___graphics_toolkit__ (val);
951  else if (pname.compare ("__guidata__"))
952  set___guidata__ (val);
953  else if (pname.compare ("__plot_stream__"))
954  set___plot_stream__ (val);
955  else
956  base_properties::set (pname, val);
957 }
958 
960 figure::properties::get (bool all) const
961 {
963 
964  m.assign ("alphamap", octave_value (get_alphamap ()));
965  m.assign ("buttondownfcn", octave_value (get_buttondownfcn ()));
966  m.assign ("closerequestfcn", octave_value (get_closerequestfcn ()));
967  m.assign ("color", octave_value (get_color ()));
968  m.assign ("colormap", octave_value (get_colormap ()));
969  m.assign ("currentaxes", octave_value (get_currentaxes ().as_octave_value ()));
970  m.assign ("currentcharacter", octave_value (get_currentcharacter ()));
971  m.assign ("currentobject", octave_value (get_currentobject ().as_octave_value ()));
972  m.assign ("currentpoint", octave_value (get_currentpoint ()));
973  m.assign ("dockcontrols", octave_value (get_dockcontrols ()));
974  m.assign ("doublebuffer", octave_value (get_doublebuffer ()));
975  m.assign ("filename", octave_value (get_filename ()));
976  m.assign ("integerhandle", octave_value (get_integerhandle ()));
977  m.assign ("inverthardcopy", octave_value (get_inverthardcopy ()));
978  m.assign ("keypressfcn", octave_value (get_keypressfcn ()));
979  m.assign ("keyreleasefcn", octave_value (get_keyreleasefcn ()));
980  m.assign ("menubar", octave_value (get_menubar ()));
981  m.assign ("mincolormap", octave_value (get_mincolormap ()));
982  m.assign ("name", octave_value (get_name ()));
983  m.assign ("nextplot", octave_value (get_nextplot ()));
984  m.assign ("numbertitle", octave_value (get_numbertitle ()));
985  m.assign ("outerposition", octave_value (get_outerposition ()));
986  m.assign ("paperorientation", octave_value (get_paperorientation ()));
987  m.assign ("paperposition", octave_value (get_paperposition ()));
988  m.assign ("paperpositionmode", octave_value (get_paperpositionmode ()));
989  m.assign ("papersize", octave_value (get_papersize ()));
990  m.assign ("papertype", octave_value (get_papertype ()));
991  m.assign ("paperunits", octave_value (get_paperunits ()));
992  m.assign ("pointer", octave_value (get_pointer ()));
993  m.assign ("pointershapecdata", octave_value (get_pointershapecdata ()));
994  m.assign ("pointershapehotspot", octave_value (get_pointershapehotspot ()));
995  m.assign ("position", octave_value (get_position ()));
996  m.assign ("renderer", octave_value (get_renderer ()));
997  m.assign ("renderermode", octave_value (get_renderermode ()));
998  m.assign ("resize", octave_value (get_resize ()));
999  m.assign ("resizefcn", octave_value (get_resizefcn ()));
1000  m.assign ("selectiontype", octave_value (get_selectiontype ()));
1001  m.assign ("toolbar", octave_value (get_toolbar ()));
1002  m.assign ("units", octave_value (get_units ()));
1003  m.assign ("windowbuttondownfcn", octave_value (get_windowbuttondownfcn ()));
1004  m.assign ("windowbuttonmotionfcn", octave_value (get_windowbuttonmotionfcn ()));
1005  m.assign ("windowbuttonupfcn", octave_value (get_windowbuttonupfcn ()));
1006  m.assign ("windowkeypressfcn", octave_value (get_windowkeypressfcn ()));
1007  m.assign ("windowkeyreleasefcn", octave_value (get_windowkeyreleasefcn ()));
1008  m.assign ("windowscrollwheelfcn", octave_value (get_windowscrollwheelfcn ()));
1009  m.assign ("windowstyle", octave_value (get_windowstyle ()));
1010  m.assign ("wvisual", octave_value (get_wvisual ()));
1011  m.assign ("wvisualmode", octave_value (get_wvisualmode ()));
1012  m.assign ("xdisplay", octave_value (get_xdisplay ()));
1013  m.assign ("xvisual", octave_value (get_xvisual ()));
1014  m.assign ("xvisualmode", octave_value (get_xvisualmode ()));
1015  if (all)
1016  m.assign ("__mouse_mode__", octave_value (get___mouse_mode__ ()));
1017  if (all)
1018  m.assign ("__pan_mode__", octave_value (get___pan_mode__ ()));
1019  if (all)
1020  m.assign ("__rotate_mode__", octave_value (get___rotate_mode__ ()));
1021  if (all)
1022  m.assign ("__zoom_mode__", octave_value (get___zoom_mode__ ()));
1023  if (all)
1024  m.assign ("__enhanced__", octave_value (get___enhanced__ ()));
1025  if (all)
1026  m.assign ("__graphics_toolkit__", octave_value (get___graphics_toolkit__ ()));
1027  if (all)
1028  m.assign ("__guidata__", octave_value (get___guidata__ ()));
1029  if (all)
1030  m.assign ("__plot_stream__", octave_value (get___plot_stream__ ()));
1031 
1032  return m;
1033 }
1034 
1036 figure::properties::get (const caseless_str& pname_arg) const
1037 {
1038  octave_value retval;
1039 
1040  const std::set<std::string>& pnames = all_property_names ();
1041 
1042  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
1043 
1044  if (error_state)
1045  return retval;
1046 
1047  if (pname.compare ("alphamap"))
1048  retval = get_alphamap ();
1049  else if (pname.compare ("buttondownfcn"))
1050  retval = get_buttondownfcn ();
1051  else if (pname.compare ("closerequestfcn"))
1052  retval = get_closerequestfcn ();
1053  else if (pname.compare ("color"))
1054  retval = get_color ();
1055  else if (pname.compare ("colormap"))
1056  retval = get_colormap ();
1057  else if (pname.compare ("currentaxes"))
1058  retval = get_currentaxes ().as_octave_value ();
1059  else if (pname.compare ("currentcharacter"))
1060  retval = get_currentcharacter ();
1061  else if (pname.compare ("currentobject"))
1062  retval = get_currentobject ().as_octave_value ();
1063  else if (pname.compare ("currentpoint"))
1064  retval = get_currentpoint ();
1065  else if (pname.compare ("dockcontrols"))
1066  retval = get_dockcontrols ();
1067  else if (pname.compare ("doublebuffer"))
1068  retval = get_doublebuffer ();
1069  else if (pname.compare ("filename"))
1070  retval = get_filename ();
1071  else if (pname.compare ("integerhandle"))
1072  retval = get_integerhandle ();
1073  else if (pname.compare ("inverthardcopy"))
1074  retval = get_inverthardcopy ();
1075  else if (pname.compare ("keypressfcn"))
1076  retval = get_keypressfcn ();
1077  else if (pname.compare ("keyreleasefcn"))
1078  retval = get_keyreleasefcn ();
1079  else if (pname.compare ("menubar"))
1080  retval = get_menubar ();
1081  else if (pname.compare ("mincolormap"))
1082  retval = get_mincolormap ();
1083  else if (pname.compare ("name"))
1084  retval = get_name ();
1085  else if (pname.compare ("nextplot"))
1086  retval = get_nextplot ();
1087  else if (pname.compare ("numbertitle"))
1088  retval = get_numbertitle ();
1089  else if (pname.compare ("outerposition"))
1090  retval = get_outerposition ();
1091  else if (pname.compare ("paperorientation"))
1092  retval = get_paperorientation ();
1093  else if (pname.compare ("paperposition"))
1094  retval = get_paperposition ();
1095  else if (pname.compare ("paperpositionmode"))
1096  retval = get_paperpositionmode ();
1097  else if (pname.compare ("papersize"))
1098  retval = get_papersize ();
1099  else if (pname.compare ("papertype"))
1100  retval = get_papertype ();
1101  else if (pname.compare ("paperunits"))
1102  retval = get_paperunits ();
1103  else if (pname.compare ("pointer"))
1104  retval = get_pointer ();
1105  else if (pname.compare ("pointershapecdata"))
1106  retval = get_pointershapecdata ();
1107  else if (pname.compare ("pointershapehotspot"))
1108  retval = get_pointershapehotspot ();
1109  else if (pname.compare ("position"))
1110  retval = get_position ();
1111  else if (pname.compare ("renderer"))
1112  retval = get_renderer ();
1113  else if (pname.compare ("renderermode"))
1114  retval = get_renderermode ();
1115  else if (pname.compare ("resize"))
1116  retval = get_resize ();
1117  else if (pname.compare ("resizefcn"))
1118  retval = get_resizefcn ();
1119  else if (pname.compare ("selectiontype"))
1120  retval = get_selectiontype ();
1121  else if (pname.compare ("toolbar"))
1122  retval = get_toolbar ();
1123  else if (pname.compare ("units"))
1124  retval = get_units ();
1125  else if (pname.compare ("windowbuttondownfcn"))
1126  retval = get_windowbuttondownfcn ();
1127  else if (pname.compare ("windowbuttonmotionfcn"))
1128  retval = get_windowbuttonmotionfcn ();
1129  else if (pname.compare ("windowbuttonupfcn"))
1130  retval = get_windowbuttonupfcn ();
1131  else if (pname.compare ("windowkeypressfcn"))
1132  retval = get_windowkeypressfcn ();
1133  else if (pname.compare ("windowkeyreleasefcn"))
1134  retval = get_windowkeyreleasefcn ();
1135  else if (pname.compare ("windowscrollwheelfcn"))
1136  retval = get_windowscrollwheelfcn ();
1137  else if (pname.compare ("windowstyle"))
1138  retval = get_windowstyle ();
1139  else if (pname.compare ("wvisual"))
1140  retval = get_wvisual ();
1141  else if (pname.compare ("wvisualmode"))
1142  retval = get_wvisualmode ();
1143  else if (pname.compare ("xdisplay"))
1144  retval = get_xdisplay ();
1145  else if (pname.compare ("xvisual"))
1146  retval = get_xvisual ();
1147  else if (pname.compare ("xvisualmode"))
1148  retval = get_xvisualmode ();
1149  else if (pname.compare ("__mouse_mode__"))
1150  retval = get___mouse_mode__ ();
1151  else if (pname.compare ("__pan_mode__"))
1152  retval = get___pan_mode__ ();
1153  else if (pname.compare ("__rotate_mode__"))
1154  retval = get___rotate_mode__ ();
1155  else if (pname.compare ("__zoom_mode__"))
1156  retval = get___zoom_mode__ ();
1157  else if (pname.compare ("__enhanced__"))
1158  retval = get___enhanced__ ();
1159  else if (pname.compare ("__graphics_toolkit__"))
1160  retval = get___graphics_toolkit__ ();
1161  else if (pname.compare ("__guidata__"))
1162  retval = get___guidata__ ();
1163  else if (pname.compare ("__plot_stream__"))
1164  retval = get___plot_stream__ ();
1165  else
1166  retval = base_properties::get (pname);
1167 
1168  return retval;
1169 }
1170 
1171 property
1173 {
1174  const std::set<std::string>& pnames = all_property_names ();
1175 
1176  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
1177 
1178  if (error_state)
1179  return property ();
1180 
1181  if (pname.compare ("alphamap"))
1182  return property (&alphamap, true);
1183  else if (pname.compare ("buttondownfcn"))
1184  return property (&buttondownfcn, true);
1185  else if (pname.compare ("closerequestfcn"))
1186  return property (&closerequestfcn, true);
1187  else if (pname.compare ("color"))
1188  return property (&color, true);
1189  else if (pname.compare ("colormap"))
1190  return property (&colormap, true);
1191  else if (pname.compare ("currentaxes"))
1192  return property (&currentaxes, true);
1193  else if (pname.compare ("currentcharacter"))
1194  return property (&currentcharacter, true);
1195  else if (pname.compare ("currentobject"))
1196  return property (&currentobject, true);
1197  else if (pname.compare ("currentpoint"))
1198  return property (&currentpoint, true);
1199  else if (pname.compare ("dockcontrols"))
1200  return property (&dockcontrols, true);
1201  else if (pname.compare ("doublebuffer"))
1202  return property (&doublebuffer, true);
1203  else if (pname.compare ("filename"))
1204  return property (&filename, true);
1205  else if (pname.compare ("integerhandle"))
1206  return property (&integerhandle, true);
1207  else if (pname.compare ("inverthardcopy"))
1208  return property (&inverthardcopy, true);
1209  else if (pname.compare ("keypressfcn"))
1210  return property (&keypressfcn, true);
1211  else if (pname.compare ("keyreleasefcn"))
1212  return property (&keyreleasefcn, true);
1213  else if (pname.compare ("menubar"))
1214  return property (&menubar, true);
1215  else if (pname.compare ("mincolormap"))
1216  return property (&mincolormap, true);
1217  else if (pname.compare ("name"))
1218  return property (&name, true);
1219  else if (pname.compare ("nextplot"))
1220  return property (&nextplot, true);
1221  else if (pname.compare ("numbertitle"))
1222  return property (&numbertitle, true);
1223  else if (pname.compare ("outerposition"))
1224  return property (&outerposition, true);
1225  else if (pname.compare ("paperorientation"))
1226  return property (&paperorientation, true);
1227  else if (pname.compare ("paperposition"))
1228  return property (&paperposition, true);
1229  else if (pname.compare ("paperpositionmode"))
1230  return property (&paperpositionmode, true);
1231  else if (pname.compare ("papersize"))
1232  return property (&papersize, true);
1233  else if (pname.compare ("papertype"))
1234  return property (&papertype, true);
1235  else if (pname.compare ("paperunits"))
1236  return property (&paperunits, true);
1237  else if (pname.compare ("pointer"))
1238  return property (&pointer, true);
1239  else if (pname.compare ("pointershapecdata"))
1240  return property (&pointershapecdata, true);
1241  else if (pname.compare ("pointershapehotspot"))
1242  return property (&pointershapehotspot, true);
1243  else if (pname.compare ("position"))
1244  return property (&position, true);
1245  else if (pname.compare ("renderer"))
1246  return property (&renderer, true);
1247  else if (pname.compare ("renderermode"))
1248  return property (&renderermode, true);
1249  else if (pname.compare ("resize"))
1250  return property (&resize, true);
1251  else if (pname.compare ("resizefcn"))
1252  return property (&resizefcn, true);
1253  else if (pname.compare ("selectiontype"))
1254  return property (&selectiontype, true);
1255  else if (pname.compare ("toolbar"))
1256  return property (&toolbar, true);
1257  else if (pname.compare ("units"))
1258  return property (&units, true);
1259  else if (pname.compare ("windowbuttondownfcn"))
1260  return property (&windowbuttondownfcn, true);
1261  else if (pname.compare ("windowbuttonmotionfcn"))
1262  return property (&windowbuttonmotionfcn, true);
1263  else if (pname.compare ("windowbuttonupfcn"))
1264  return property (&windowbuttonupfcn, true);
1265  else if (pname.compare ("windowkeypressfcn"))
1266  return property (&windowkeypressfcn, true);
1267  else if (pname.compare ("windowkeyreleasefcn"))
1268  return property (&windowkeyreleasefcn, true);
1269  else if (pname.compare ("windowscrollwheelfcn"))
1270  return property (&windowscrollwheelfcn, true);
1271  else if (pname.compare ("windowstyle"))
1272  return property (&windowstyle, true);
1273  else if (pname.compare ("wvisual"))
1274  return property (&wvisual, true);
1275  else if (pname.compare ("wvisualmode"))
1276  return property (&wvisualmode, true);
1277  else if (pname.compare ("xdisplay"))
1278  return property (&xdisplay, true);
1279  else if (pname.compare ("xvisual"))
1280  return property (&xvisual, true);
1281  else if (pname.compare ("xvisualmode"))
1282  return property (&xvisualmode, true);
1283  else if (pname.compare ("__mouse_mode__"))
1284  return property (&__mouse_mode__, true);
1285  else if (pname.compare ("__pan_mode__"))
1286  return property (&__pan_mode__, true);
1287  else if (pname.compare ("__rotate_mode__"))
1288  return property (&__rotate_mode__, true);
1289  else if (pname.compare ("__zoom_mode__"))
1290  return property (&__zoom_mode__, true);
1291  else if (pname.compare ("__enhanced__"))
1292  return property (&__enhanced__, true);
1293  else if (pname.compare ("__graphics_toolkit__"))
1294  return property (&__graphics_toolkit__, true);
1295  else if (pname.compare ("__guidata__"))
1296  return property (&__guidata__, true);
1297  else if (pname.compare ("__plot_stream__"))
1298  return property (&__plot_stream__, true);
1299  else
1300  return base_properties::get_property (pname);
1301 }
1302 
1305 {
1307 
1308  m["alphamap"] = Matrix (64, 1, 1);
1309  m["buttondownfcn"] = Matrix ();
1310  m["closerequestfcn"] = "closereq";
1311  m["color"] = color_property (color_values (1, 1, 1), radio_values ("none"));
1312  m["colormap"] = jet_colormap ();
1313  m["currentaxes"] = graphics_handle ().as_octave_value ();
1314  m["currentcharacter"] = "";
1315  m["currentobject"] = graphics_handle ().as_octave_value ();
1316  m["currentpoint"] = Matrix (2, 1, 0);
1317  m["dockcontrols"] = "off";
1318  m["doublebuffer"] = "on";
1319  m["filename"] = "";
1320  m["integerhandle"] = "on";
1321  m["inverthardcopy"] = "off";
1322  m["keypressfcn"] = Matrix ();
1323  m["keyreleasefcn"] = Matrix ();
1324  m["menubar"] = "figure";
1325  m["mincolormap"] = 64;
1326  m["name"] = "";
1327  m["nextplot"] = "add";
1328  m["numbertitle"] = "on";
1329  m["outerposition"] = Matrix (1, 4, -1.0);
1330  m["paperorientation"] = "portrait";
1331  m["paperposition"] = default_figure_paperposition ();
1332  m["paperpositionmode"] = "manual";
1333  m["papersize"] = default_figure_papersize ();
1334  m["papertype"] = "usletter";
1335  m["paperunits"] = "inches";
1336  m["pointer"] = "arrow";
1337  m["pointershapecdata"] = Matrix (16, 16, 0);
1338  m["pointershapehotspot"] = Matrix (1, 2, 0);
1339  m["position"] = default_figure_position ();
1340  m["renderer"] = "painters";
1341  m["renderermode"] = "auto";
1342  m["resize"] = "on";
1343  m["resizefcn"] = Matrix ();
1344  m["selectiontype"] = "normal";
1345  m["toolbar"] = "auto";
1346  m["units"] = "pixels";
1347  m["windowbuttondownfcn"] = Matrix ();
1348  m["windowbuttonmotionfcn"] = Matrix ();
1349  m["windowbuttonupfcn"] = Matrix ();
1350  m["windowkeypressfcn"] = Matrix ();
1351  m["windowkeyreleasefcn"] = Matrix ();
1352  m["windowscrollwheelfcn"] = Matrix ();
1353  m["windowstyle"] = "normal";
1354  m["wvisual"] = "";
1355  m["wvisualmode"] = "auto";
1356  m["xdisplay"] = "";
1357  m["xvisual"] = "";
1358  m["xvisualmode"] = "auto";
1359  m["__mouse_mode__"] = "none";
1360  m["__pan_mode__"] = Matrix ();
1361  m["__rotate_mode__"] = Matrix ();
1362  m["__zoom_mode__"] = Matrix ();
1363  m["__enhanced__"] = "on";
1364  m["__graphics_toolkit__"] = gtk_manager::default_toolkit ();
1365  m["__guidata__"] = Matrix ();
1366  m["__plot_stream__"] = Matrix ();
1367 
1368  return m;
1369 }
1370 
1371 std::string figure::properties::go_name ("figure");
1372 
1373 std::set<std::string>
1375 {
1376  static std::set<std::string> all_pnames;
1377 
1378  static bool initialized = false;
1379 
1380  if (! initialized)
1381  {
1382  all_pnames.insert ("alphamap");
1383  all_pnames.insert ("buttondownfcn");
1384  all_pnames.insert ("closerequestfcn");
1385  all_pnames.insert ("color");
1386  all_pnames.insert ("colormap");
1387  all_pnames.insert ("currentaxes");
1388  all_pnames.insert ("currentcharacter");
1389  all_pnames.insert ("currentobject");
1390  all_pnames.insert ("currentpoint");
1391  all_pnames.insert ("dockcontrols");
1392  all_pnames.insert ("doublebuffer");
1393  all_pnames.insert ("filename");
1394  all_pnames.insert ("integerhandle");
1395  all_pnames.insert ("inverthardcopy");
1396  all_pnames.insert ("keypressfcn");
1397  all_pnames.insert ("keyreleasefcn");
1398  all_pnames.insert ("menubar");
1399  all_pnames.insert ("mincolormap");
1400  all_pnames.insert ("name");
1401  all_pnames.insert ("nextplot");
1402  all_pnames.insert ("numbertitle");
1403  all_pnames.insert ("outerposition");
1404  all_pnames.insert ("paperorientation");
1405  all_pnames.insert ("paperposition");
1406  all_pnames.insert ("paperpositionmode");
1407  all_pnames.insert ("papersize");
1408  all_pnames.insert ("papertype");
1409  all_pnames.insert ("paperunits");
1410  all_pnames.insert ("pointer");
1411  all_pnames.insert ("pointershapecdata");
1412  all_pnames.insert ("pointershapehotspot");
1413  all_pnames.insert ("position");
1414  all_pnames.insert ("renderer");
1415  all_pnames.insert ("renderermode");
1416  all_pnames.insert ("resize");
1417  all_pnames.insert ("resizefcn");
1418  all_pnames.insert ("selectiontype");
1419  all_pnames.insert ("toolbar");
1420  all_pnames.insert ("units");
1421  all_pnames.insert ("windowbuttondownfcn");
1422  all_pnames.insert ("windowbuttonmotionfcn");
1423  all_pnames.insert ("windowbuttonupfcn");
1424  all_pnames.insert ("windowkeypressfcn");
1425  all_pnames.insert ("windowkeyreleasefcn");
1426  all_pnames.insert ("windowscrollwheelfcn");
1427  all_pnames.insert ("windowstyle");
1428  all_pnames.insert ("wvisual");
1429  all_pnames.insert ("wvisualmode");
1430  all_pnames.insert ("xdisplay");
1431  all_pnames.insert ("xvisual");
1432  all_pnames.insert ("xvisualmode");
1433  all_pnames.insert ("__mouse_mode__");
1434  all_pnames.insert ("__pan_mode__");
1435  all_pnames.insert ("__rotate_mode__");
1436  all_pnames.insert ("__zoom_mode__");
1437  all_pnames.insert ("__enhanced__");
1438  all_pnames.insert ("__graphics_toolkit__");
1439  all_pnames.insert ("__guidata__");
1440  all_pnames.insert ("__plot_stream__");
1441 
1442  std::set<std::string> base_pnames = base_properties::core_property_names ();
1443  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
1444 
1445  initialized = true;
1446  }
1447 
1448  return all_pnames;
1449 }
1450 
1451 bool
1453 {
1454  std::set<std::string> pnames = core_property_names ();
1455 
1456  return pnames.find (pname) != pnames.end ();
1457 }
1458 
1459 std::set<std::string>
1461 {
1462  static std::set<std::string> all_pnames;
1463 
1464  static bool initialized = false;
1465 
1466  if (! initialized)
1467  {
1468  all_pnames.insert ("currentcharacter");
1469  all_pnames.insert ("currentobject");
1470  all_pnames.insert ("currentpoint");
1471 
1472  std::set<std::string> base_pnames = base_properties::readonly_property_names ();
1473  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
1474 
1475  initialized = true;
1476  }
1477 
1478  return all_pnames;
1479 }
1480 
1481 bool
1483 {
1484  std::set<std::string> pnames = readonly_property_names ();
1485 
1486  return pnames.find (pname) != pnames.end ();
1487 }
1488 
1489 std::set<std::string>
1491 {
1492  static std::set<std::string> all_pnames = core_property_names ();
1493 
1494  std::set<std::string> retval = all_pnames;
1495  std::set<std::string> base_props = base_properties::all_property_names ();
1496  retval.insert (base_props.begin (), base_props.end ());
1497 
1498  return retval;
1499 }
1500 
1501 bool
1503 {
1504  std::set<std::string> pnames = all_property_names ();
1505 
1506  return pnames.find (pname) != pnames.end ();
1507 }
1508 
1509 // ******** axes ********
1510 
1512  : base_properties (go_name, mh, p),
1513  activepositionproperty ("activepositionproperty", mh, "{outerposition}|position"),
1514  alim ("alim", mh, default_lim ()),
1515  alimmode ("alimmode", mh, "{auto}|manual"),
1516  ambientlightcolor ("ambientlightcolor", mh, color_values (1, 1, 1)),
1517  box ("box", mh, "on"),
1518  cameraposition ("cameraposition", mh, Matrix (1, 3, 0.0)),
1519  camerapositionmode ("camerapositionmode", mh, "{auto}|manual"),
1520  cameratarget ("cameratarget", mh, Matrix (1, 3, 0.0)),
1521  cameratargetmode ("cameratargetmode", mh, "{auto}|manual"),
1522  cameraupvector ("cameraupvector", mh, Matrix (1, 3, 0.0)),
1523  cameraupvectormode ("cameraupvectormode", mh, "{auto}|manual"),
1524  cameraviewangle ("cameraviewangle", mh, 10.0),
1525  cameraviewanglemode ("cameraviewanglemode", mh, "{auto}|manual"),
1526  clim ("clim", mh, default_lim ()),
1527  climmode ("climmode", mh, "{auto}|manual"),
1528  color ("color", mh, color_property (color_values (1, 1, 1), radio_values ("none"))),
1529  colororder ("colororder", mh, default_colororder ()),
1530  currentpoint ("currentpoint", mh, Matrix (2, 3, 0.0)),
1531  dataaspectratio ("dataaspectratio", mh, Matrix (1, 3, 1.0)),
1532  dataaspectratiomode ("dataaspectratiomode", mh, "{auto}|manual"),
1533  drawmode ("drawmode", mh, "{normal}|fast"),
1534  fontangle ("fontangle", mh, "{normal}|italic|oblique"),
1535  fontname ("fontname", mh, OCTAVE_DEFAULT_FONTNAME),
1536  fontsize ("fontsize", mh, 10),
1537  fontunits ("fontunits", mh, "{points}|normalized|inches|centimeters|pixels"),
1538  fontweight ("fontweight", mh, "{normal}|light|demi|bold"),
1539  gridlinestyle ("gridlinestyle", mh, "-|--|{:}|-.|none"),
1540  interpreter ("interpreter", mh, "tex|{none}|latex"),
1541  layer ("layer", mh, "{bottom}|top"),
1542  linestyleorder ("linestyleorder", mh, "-"),
1543  linewidth ("linewidth", mh, 0.5),
1544  minorgridlinestyle ("minorgridlinestyle", mh, "-|--|{:}|-.|none"),
1545  mousewheelzoom ("mousewheelzoom", mh, 0.5),
1546  nextplot ("nextplot", mh, "add|replacechildren|{replace}"),
1547  outerposition ("outerposition", mh, default_axes_outerposition ()),
1548  plotboxaspectratio ("plotboxaspectratio", mh, Matrix (1, 3, 1.0)),
1549  plotboxaspectratiomode ("plotboxaspectratiomode", mh, "{auto}|manual"),
1550  position ("position", mh, default_axes_position ()),
1551  projection ("projection", mh, "{orthographic}|perspective"),
1552  tickdir ("tickdir", mh, "{in}|out"),
1553  tickdirmode ("tickdirmode", mh, "{auto}|manual"),
1554  ticklength ("ticklength", mh, default_axes_ticklength ()),
1555  tightinset ("tightinset", mh, Matrix (1, 4, 0.0)),
1556  title ("title", mh, gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)),
1557  units ("units", mh, "{normalized}|inches|centimeters|points|pixels|characters"),
1558  view ("view", mh, default_axes_view ()),
1559  xaxislocation ("xaxislocation", mh, "{bottom}|top|zero"),
1560  xcolor ("xcolor", mh, color_values (0, 0, 0)),
1561  xdir ("xdir", mh, "{normal}|reverse"),
1562  xgrid ("xgrid", mh, "off"),
1563  xlabel ("xlabel", mh, gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)),
1564  xlim ("xlim", mh, default_lim ()),
1565  xlimmode ("xlimmode", mh, "{auto}|manual"),
1566  xminorgrid ("xminorgrid", mh, "off"),
1567  xminortick ("xminortick", mh, "off"),
1568  xscale ("xscale", mh, "{linear}|log"),
1569  xtick ("xtick", mh, default_axes_tick ()),
1570  xticklabel ("xticklabel", mh, ""),
1571  xticklabelmode ("xticklabelmode", mh, "{auto}|manual"),
1572  xtickmode ("xtickmode", mh, "{auto}|manual"),
1573  yaxislocation ("yaxislocation", mh, "{left}|right|zero"),
1574  ycolor ("ycolor", mh, color_values (0, 0, 0)),
1575  ydir ("ydir", mh, "{normal}|reverse"),
1576  ygrid ("ygrid", mh, "off"),
1577  ylabel ("ylabel", mh, gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)),
1578  ylim ("ylim", mh, default_lim ()),
1579  ylimmode ("ylimmode", mh, "{auto}|manual"),
1580  yminorgrid ("yminorgrid", mh, "off"),
1581  yminortick ("yminortick", mh, "off"),
1582  yscale ("yscale", mh, "{linear}|log"),
1583  ytick ("ytick", mh, default_axes_tick ()),
1584  yticklabel ("yticklabel", mh, ""),
1585  yticklabelmode ("yticklabelmode", mh, "{auto}|manual"),
1586  ytickmode ("ytickmode", mh, "{auto}|manual"),
1587  zcolor ("zcolor", mh, color_values (0, 0, 0)),
1588  zdir ("zdir", mh, "{normal}|reverse"),
1589  zgrid ("zgrid", mh, "off"),
1590  zlabel ("zlabel", mh, gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)),
1591  zlim ("zlim", mh, default_lim ()),
1592  zlimmode ("zlimmode", mh, "{auto}|manual"),
1593  zminorgrid ("zminorgrid", mh, "off"),
1594  zminortick ("zminortick", mh, "off"),
1595  zscale ("zscale", mh, "{linear}|log"),
1596  ztick ("ztick", mh, default_axes_tick ()),
1597  zticklabel ("zticklabel", mh, ""),
1598  zticklabelmode ("zticklabelmode", mh, "{auto}|manual"),
1599  ztickmode ("ztickmode", mh, "{auto}|manual"),
1600  __hold_all__ ("__hold_all__", mh, "off"),
1601  autopos_tag ("autopos_tag", mh, "{none}|subplot"),
1602  looseinset ("looseinset", mh, Matrix (1, 4, 0.0)),
1603  x_viewtransform ("x_viewtransform", mh, Matrix (4, 4, 0.0)),
1604  x_projectiontransform ("x_projectiontransform", mh, Matrix (4, 4, 0.0)),
1605  x_viewporttransform ("x_viewporttransform", mh, Matrix (4, 4, 0.0)),
1606  x_normrendertransform ("x_normrendertransform", mh, Matrix (4, 4, 0.0)),
1607  x_rendertransform ("x_rendertransform", mh, Matrix (4, 4, 0.0)),
1608  xmtick ("xmtick", mh, Matrix ()),
1609  ymtick ("ymtick", mh, Matrix ()),
1610  zmtick ("zmtick", mh, Matrix ()),
1611  fontsize_points ("fontsize_points", mh, 0)
1612 {
1614  alim.set_id (ID_ALIM);
1617  box.set_id (ID_BOX);
1626  clim.set_id (ID_CLIM);
1628  color.set_id (ID_COLOR);
1641  layer.set_id (ID_LAYER);
1656  title.set_id (ID_TITLE);
1657  units.set_id (ID_UNITS);
1658  view.set_id (ID_VIEW);
1661  xdir.set_id (ID_XDIR);
1662  xgrid.set_id (ID_XGRID);
1664  xlim.set_id (ID_XLIM);
1669  xtick.set_id (ID_XTICK);
1675  ydir.set_id (ID_YDIR);
1676  ygrid.set_id (ID_YGRID);
1678  ylim.set_id (ID_YLIM);
1683  ytick.set_id (ID_YTICK);
1688  zdir.set_id (ID_ZDIR);
1689  zgrid.set_id (ID_ZGRID);
1691  zlim.set_id (ID_ZLIM);
1696  ztick.set_id (ID_ZTICK);
1701  __hold_all__.set_hidden (true);
1703  autopos_tag.set_hidden (true);
1705  looseinset.set_hidden (true);
1707  x_viewtransform.set_hidden (true);
1717  xmtick.set_hidden (true);
1719  ymtick.set_hidden (true);
1721  zmtick.set_hidden (true);
1723  fontsize_points.set_hidden (true);
1724  init ();
1725 }
1726 
1727 void
1728 axes::properties::set (const caseless_str& pname_arg, const octave_value& val)
1729 {
1730  const std::set<std::string>& pnames = all_property_names ();
1731 
1732  caseless_str pname = validate_property_name ("set", go_name, pnames, pname_arg);
1733 
1734  if (error_state)
1735  return;
1736  else if (has_readonly_property (pname))
1737  {
1738  error ("set: \"%s\" is read-only", pname.c_str ());
1739  return;
1740  }
1741 
1742  if (pname.compare ("activepositionproperty"))
1743  set_activepositionproperty (val);
1744  else if (pname.compare ("alim"))
1745  set_alim (val);
1746  else if (pname.compare ("alimmode"))
1747  set_alimmode (val);
1748  else if (pname.compare ("ambientlightcolor"))
1749  set_ambientlightcolor (val);
1750  else if (pname.compare ("box"))
1751  set_box (val);
1752  else if (pname.compare ("cameraposition"))
1753  set_cameraposition (val);
1754  else if (pname.compare ("camerapositionmode"))
1755  set_camerapositionmode (val);
1756  else if (pname.compare ("cameratarget"))
1757  set_cameratarget (val);
1758  else if (pname.compare ("cameratargetmode"))
1759  set_cameratargetmode (val);
1760  else if (pname.compare ("cameraupvector"))
1761  set_cameraupvector (val);
1762  else if (pname.compare ("cameraupvectormode"))
1763  set_cameraupvectormode (val);
1764  else if (pname.compare ("cameraviewangle"))
1765  set_cameraviewangle (val);
1766  else if (pname.compare ("cameraviewanglemode"))
1767  set_cameraviewanglemode (val);
1768  else if (pname.compare ("clim"))
1769  set_clim (val);
1770  else if (pname.compare ("climmode"))
1771  set_climmode (val);
1772  else if (pname.compare ("color"))
1773  set_color (val);
1774  else if (pname.compare ("colororder"))
1775  set_colororder (val);
1776  else if (pname.compare ("currentpoint"))
1777  set_currentpoint (val);
1778  else if (pname.compare ("dataaspectratio"))
1779  set_dataaspectratio (val);
1780  else if (pname.compare ("dataaspectratiomode"))
1781  set_dataaspectratiomode (val);
1782  else if (pname.compare ("drawmode"))
1783  set_drawmode (val);
1784  else if (pname.compare ("fontangle"))
1785  set_fontangle (val);
1786  else if (pname.compare ("fontname"))
1787  set_fontname (val);
1788  else if (pname.compare ("fontsize"))
1789  set_fontsize (val);
1790  else if (pname.compare ("fontunits"))
1791  set_fontunits (val);
1792  else if (pname.compare ("fontweight"))
1793  set_fontweight (val);
1794  else if (pname.compare ("gridlinestyle"))
1795  set_gridlinestyle (val);
1796  else if (pname.compare ("interpreter"))
1797  set_interpreter (val);
1798  else if (pname.compare ("layer"))
1799  set_layer (val);
1800  else if (pname.compare ("linestyleorder"))
1801  set_linestyleorder (val);
1802  else if (pname.compare ("linewidth"))
1803  set_linewidth (val);
1804  else if (pname.compare ("minorgridlinestyle"))
1805  set_minorgridlinestyle (val);
1806  else if (pname.compare ("mousewheelzoom"))
1807  set_mousewheelzoom (val);
1808  else if (pname.compare ("nextplot"))
1809  set_nextplot (val);
1810  else if (pname.compare ("outerposition"))
1811  set_outerposition (val);
1812  else if (pname.compare ("plotboxaspectratio"))
1813  set_plotboxaspectratio (val);
1814  else if (pname.compare ("plotboxaspectratiomode"))
1815  set_plotboxaspectratiomode (val);
1816  else if (pname.compare ("position"))
1817  set_position (val);
1818  else if (pname.compare ("projection"))
1819  set_projection (val);
1820  else if (pname.compare ("tickdir"))
1821  set_tickdir (val);
1822  else if (pname.compare ("tickdirmode"))
1823  set_tickdirmode (val);
1824  else if (pname.compare ("ticklength"))
1825  set_ticklength (val);
1826  else if (pname.compare ("title"))
1827  set_title (val);
1828  else if (pname.compare ("units"))
1829  set_units (val);
1830  else if (pname.compare ("view"))
1831  set_view (val);
1832  else if (pname.compare ("xaxislocation"))
1833  set_xaxislocation (val);
1834  else if (pname.compare ("xcolor"))
1835  set_xcolor (val);
1836  else if (pname.compare ("xdir"))
1837  set_xdir (val);
1838  else if (pname.compare ("xgrid"))
1839  set_xgrid (val);
1840  else if (pname.compare ("xlabel"))
1841  set_xlabel (val);
1842  else if (pname.compare ("xlim"))
1843  set_xlim (val);
1844  else if (pname.compare ("xlimmode"))
1845  set_xlimmode (val);
1846  else if (pname.compare ("xminorgrid"))
1847  set_xminorgrid (val);
1848  else if (pname.compare ("xminortick"))
1849  set_xminortick (val);
1850  else if (pname.compare ("xscale"))
1851  set_xscale (val);
1852  else if (pname.compare ("xtick"))
1853  set_xtick (val);
1854  else if (pname.compare ("xticklabel"))
1855  set_xticklabel (val);
1856  else if (pname.compare ("xticklabelmode"))
1857  set_xticklabelmode (val);
1858  else if (pname.compare ("xtickmode"))
1859  set_xtickmode (val);
1860  else if (pname.compare ("yaxislocation"))
1861  set_yaxislocation (val);
1862  else if (pname.compare ("ycolor"))
1863  set_ycolor (val);
1864  else if (pname.compare ("ydir"))
1865  set_ydir (val);
1866  else if (pname.compare ("ygrid"))
1867  set_ygrid (val);
1868  else if (pname.compare ("ylabel"))
1869  set_ylabel (val);
1870  else if (pname.compare ("ylim"))
1871  set_ylim (val);
1872  else if (pname.compare ("ylimmode"))
1873  set_ylimmode (val);
1874  else if (pname.compare ("yminorgrid"))
1875  set_yminorgrid (val);
1876  else if (pname.compare ("yminortick"))
1877  set_yminortick (val);
1878  else if (pname.compare ("yscale"))
1879  set_yscale (val);
1880  else if (pname.compare ("ytick"))
1881  set_ytick (val);
1882  else if (pname.compare ("yticklabel"))
1883  set_yticklabel (val);
1884  else if (pname.compare ("yticklabelmode"))
1885  set_yticklabelmode (val);
1886  else if (pname.compare ("ytickmode"))
1887  set_ytickmode (val);
1888  else if (pname.compare ("zcolor"))
1889  set_zcolor (val);
1890  else if (pname.compare ("zdir"))
1891  set_zdir (val);
1892  else if (pname.compare ("zgrid"))
1893  set_zgrid (val);
1894  else if (pname.compare ("zlabel"))
1895  set_zlabel (val);
1896  else if (pname.compare ("zlim"))
1897  set_zlim (val);
1898  else if (pname.compare ("zlimmode"))
1899  set_zlimmode (val);
1900  else if (pname.compare ("zminorgrid"))
1901  set_zminorgrid (val);
1902  else if (pname.compare ("zminortick"))
1903  set_zminortick (val);
1904  else if (pname.compare ("zscale"))
1905  set_zscale (val);
1906  else if (pname.compare ("ztick"))
1907  set_ztick (val);
1908  else if (pname.compare ("zticklabel"))
1909  set_zticklabel (val);
1910  else if (pname.compare ("zticklabelmode"))
1911  set_zticklabelmode (val);
1912  else if (pname.compare ("ztickmode"))
1913  set_ztickmode (val);
1914  else if (pname.compare ("__hold_all__"))
1915  set___hold_all__ (val);
1916  else if (pname.compare ("autopos_tag"))
1917  set_autopos_tag (val);
1918  else if (pname.compare ("looseinset"))
1919  set_looseinset (val);
1920  else if (pname.compare ("x_viewtransform"))
1921  set_x_viewtransform (val);
1922  else if (pname.compare ("x_projectiontransform"))
1923  set_x_projectiontransform (val);
1924  else if (pname.compare ("x_viewporttransform"))
1925  set_x_viewporttransform (val);
1926  else if (pname.compare ("x_normrendertransform"))
1927  set_x_normrendertransform (val);
1928  else if (pname.compare ("x_rendertransform"))
1929  set_x_rendertransform (val);
1930  else if (pname.compare ("xmtick"))
1931  set_xmtick (val);
1932  else if (pname.compare ("ymtick"))
1933  set_ymtick (val);
1934  else if (pname.compare ("zmtick"))
1935  set_zmtick (val);
1936  else
1937  base_properties::set (pname, val);
1938 }
1939 
1941 axes::properties::get (bool all) const
1942 {
1944 
1945  m.assign ("activepositionproperty", octave_value (get_activepositionproperty ()));
1946  m.assign ("alim", octave_value (get_alim ()));
1947  m.assign ("alimmode", octave_value (get_alimmode ()));
1948  m.assign ("ambientlightcolor", octave_value (get_ambientlightcolor ()));
1949  m.assign ("box", octave_value (get_box ()));
1950  m.assign ("cameraposition", octave_value (get_cameraposition ()));
1951  m.assign ("camerapositionmode", octave_value (get_camerapositionmode ()));
1952  m.assign ("cameratarget", octave_value (get_cameratarget ()));
1953  m.assign ("cameratargetmode", octave_value (get_cameratargetmode ()));
1954  m.assign ("cameraupvector", octave_value (get_cameraupvector ()));
1955  m.assign ("cameraupvectormode", octave_value (get_cameraupvectormode ()));
1956  m.assign ("cameraviewangle", octave_value (get_cameraviewangle ()));
1957  m.assign ("cameraviewanglemode", octave_value (get_cameraviewanglemode ()));
1958  m.assign ("clim", octave_value (get_clim ()));
1959  m.assign ("climmode", octave_value (get_climmode ()));
1960  m.assign ("color", octave_value (get_color ()));
1961  m.assign ("colororder", octave_value (get_colororder ()));
1962  m.assign ("currentpoint", octave_value (get_currentpoint ()));
1963  m.assign ("dataaspectratio", octave_value (get_dataaspectratio ()));
1964  m.assign ("dataaspectratiomode", octave_value (get_dataaspectratiomode ()));
1965  m.assign ("drawmode", octave_value (get_drawmode ()));
1966  m.assign ("fontangle", octave_value (get_fontangle ()));
1967  m.assign ("fontname", octave_value (get_fontname ()));
1968  m.assign ("fontsize", octave_value (get_fontsize ()));
1969  m.assign ("fontunits", octave_value (get_fontunits ()));
1970  m.assign ("fontweight", octave_value (get_fontweight ()));
1971  m.assign ("gridlinestyle", octave_value (get_gridlinestyle ()));
1972  m.assign ("interpreter", octave_value (get_interpreter ()));
1973  m.assign ("layer", octave_value (get_layer ()));
1974  m.assign ("linestyleorder", octave_value (get_linestyleorder ()));
1975  m.assign ("linewidth", octave_value (get_linewidth ()));
1976  m.assign ("minorgridlinestyle", octave_value (get_minorgridlinestyle ()));
1977  m.assign ("mousewheelzoom", octave_value (get_mousewheelzoom ()));
1978  m.assign ("nextplot", octave_value (get_nextplot ()));
1979  m.assign ("outerposition", octave_value (get_outerposition ()));
1980  m.assign ("plotboxaspectratio", octave_value (get_plotboxaspectratio ()));
1981  m.assign ("plotboxaspectratiomode", octave_value (get_plotboxaspectratiomode ()));
1982  m.assign ("position", octave_value (get_position ()));
1983  m.assign ("projection", octave_value (get_projection ()));
1984  m.assign ("tickdir", octave_value (get_tickdir ()));
1985  m.assign ("tickdirmode", octave_value (get_tickdirmode ()));
1986  m.assign ("ticklength", octave_value (get_ticklength ()));
1987  m.assign ("tightinset", octave_value (get_tightinset ()));
1988  m.assign ("title", octave_value (get_title ().as_octave_value ()));
1989  m.assign ("units", octave_value (get_units ()));
1990  m.assign ("view", octave_value (get_view ()));
1991  m.assign ("xaxislocation", octave_value (get_xaxislocation ()));
1992  m.assign ("xcolor", octave_value (get_xcolor ()));
1993  m.assign ("xdir", octave_value (get_xdir ()));
1994  m.assign ("xgrid", octave_value (get_xgrid ()));
1995  m.assign ("xlabel", octave_value (get_xlabel ().as_octave_value ()));
1996  m.assign ("xlim", octave_value (get_xlim ()));
1997  m.assign ("xlimmode", octave_value (get_xlimmode ()));
1998  m.assign ("xminorgrid", octave_value (get_xminorgrid ()));
1999  m.assign ("xminortick", octave_value (get_xminortick ()));
2000  m.assign ("xscale", octave_value (get_xscale ()));
2001  m.assign ("xtick", octave_value (get_xtick ()));
2002  m.assign ("xticklabel", octave_value (get_xticklabel ()));
2003  m.assign ("xticklabelmode", octave_value (get_xticklabelmode ()));
2004  m.assign ("xtickmode", octave_value (get_xtickmode ()));
2005  m.assign ("yaxislocation", octave_value (get_yaxislocation ()));
2006  m.assign ("ycolor", octave_value (get_ycolor ()));
2007  m.assign ("ydir", octave_value (get_ydir ()));
2008  m.assign ("ygrid", octave_value (get_ygrid ()));
2009  m.assign ("ylabel", octave_value (get_ylabel ().as_octave_value ()));
2010  m.assign ("ylim", octave_value (get_ylim ()));
2011  m.assign ("ylimmode", octave_value (get_ylimmode ()));
2012  m.assign ("yminorgrid", octave_value (get_yminorgrid ()));
2013  m.assign ("yminortick", octave_value (get_yminortick ()));
2014  m.assign ("yscale", octave_value (get_yscale ()));
2015  m.assign ("ytick", octave_value (get_ytick ()));
2016  m.assign ("yticklabel", octave_value (get_yticklabel ()));
2017  m.assign ("yticklabelmode", octave_value (get_yticklabelmode ()));
2018  m.assign ("ytickmode", octave_value (get_ytickmode ()));
2019  m.assign ("zcolor", octave_value (get_zcolor ()));
2020  m.assign ("zdir", octave_value (get_zdir ()));
2021  m.assign ("zgrid", octave_value (get_zgrid ()));
2022  m.assign ("zlabel", octave_value (get_zlabel ().as_octave_value ()));
2023  m.assign ("zlim", octave_value (get_zlim ()));
2024  m.assign ("zlimmode", octave_value (get_zlimmode ()));
2025  m.assign ("zminorgrid", octave_value (get_zminorgrid ()));
2026  m.assign ("zminortick", octave_value (get_zminortick ()));
2027  m.assign ("zscale", octave_value (get_zscale ()));
2028  m.assign ("ztick", octave_value (get_ztick ()));
2029  m.assign ("zticklabel", octave_value (get_zticklabel ()));
2030  m.assign ("zticklabelmode", octave_value (get_zticklabelmode ()));
2031  m.assign ("ztickmode", octave_value (get_ztickmode ()));
2032  if (all)
2033  m.assign ("__hold_all__", octave_value (get___hold_all__ ()));
2034  if (all)
2035  m.assign ("autopos_tag", octave_value (get_autopos_tag ()));
2036  if (all)
2037  m.assign ("looseinset", octave_value (get_looseinset ()));
2038  if (all)
2039  m.assign ("x_viewtransform", octave_value (get_x_viewtransform ()));
2040  if (all)
2041  m.assign ("x_projectiontransform", octave_value (get_x_projectiontransform ()));
2042  if (all)
2043  m.assign ("x_viewporttransform", octave_value (get_x_viewporttransform ()));
2044  if (all)
2045  m.assign ("x_normrendertransform", octave_value (get_x_normrendertransform ()));
2046  if (all)
2047  m.assign ("x_rendertransform", octave_value (get_x_rendertransform ()));
2048  if (all)
2049  m.assign ("xmtick", octave_value (get_xmtick ()));
2050  if (all)
2051  m.assign ("ymtick", octave_value (get_ymtick ()));
2052  if (all)
2053  m.assign ("zmtick", octave_value (get_zmtick ()));
2054  if (all)
2055  m.assign ("fontsize_points", octave_value (get_fontsize_points ()));
2056 
2057  return m;
2058 }
2059 
2061 axes::properties::get (const caseless_str& pname_arg) const
2062 {
2063  octave_value retval;
2064 
2065  const std::set<std::string>& pnames = all_property_names ();
2066 
2067  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
2068 
2069  if (error_state)
2070  return retval;
2071 
2072  if (pname.compare ("activepositionproperty"))
2073  retval = get_activepositionproperty ();
2074  else if (pname.compare ("alim"))
2075  retval = get_alim ();
2076  else if (pname.compare ("alimmode"))
2077  retval = get_alimmode ();
2078  else if (pname.compare ("ambientlightcolor"))
2079  retval = get_ambientlightcolor ();
2080  else if (pname.compare ("box"))
2081  retval = get_box ();
2082  else if (pname.compare ("cameraposition"))
2083  retval = get_cameraposition ();
2084  else if (pname.compare ("camerapositionmode"))
2085  retval = get_camerapositionmode ();
2086  else if (pname.compare ("cameratarget"))
2087  retval = get_cameratarget ();
2088  else if (pname.compare ("cameratargetmode"))
2089  retval = get_cameratargetmode ();
2090  else if (pname.compare ("cameraupvector"))
2091  retval = get_cameraupvector ();
2092  else if (pname.compare ("cameraupvectormode"))
2093  retval = get_cameraupvectormode ();
2094  else if (pname.compare ("cameraviewangle"))
2095  retval = get_cameraviewangle ();
2096  else if (pname.compare ("cameraviewanglemode"))
2097  retval = get_cameraviewanglemode ();
2098  else if (pname.compare ("clim"))
2099  retval = get_clim ();
2100  else if (pname.compare ("climmode"))
2101  retval = get_climmode ();
2102  else if (pname.compare ("color"))
2103  retval = get_color ();
2104  else if (pname.compare ("colororder"))
2105  retval = get_colororder ();
2106  else if (pname.compare ("currentpoint"))
2107  retval = get_currentpoint ();
2108  else if (pname.compare ("dataaspectratio"))
2109  retval = get_dataaspectratio ();
2110  else if (pname.compare ("dataaspectratiomode"))
2111  retval = get_dataaspectratiomode ();
2112  else if (pname.compare ("drawmode"))
2113  retval = get_drawmode ();
2114  else if (pname.compare ("fontangle"))
2115  retval = get_fontangle ();
2116  else if (pname.compare ("fontname"))
2117  retval = get_fontname ();
2118  else if (pname.compare ("fontsize"))
2119  retval = get_fontsize ();
2120  else if (pname.compare ("fontunits"))
2121  retval = get_fontunits ();
2122  else if (pname.compare ("fontweight"))
2123  retval = get_fontweight ();
2124  else if (pname.compare ("gridlinestyle"))
2125  retval = get_gridlinestyle ();
2126  else if (pname.compare ("interpreter"))
2127  retval = get_interpreter ();
2128  else if (pname.compare ("layer"))
2129  retval = get_layer ();
2130  else if (pname.compare ("linestyleorder"))
2131  retval = get_linestyleorder ();
2132  else if (pname.compare ("linewidth"))
2133  retval = get_linewidth ();
2134  else if (pname.compare ("minorgridlinestyle"))
2135  retval = get_minorgridlinestyle ();
2136  else if (pname.compare ("mousewheelzoom"))
2137  retval = get_mousewheelzoom ();
2138  else if (pname.compare ("nextplot"))
2139  retval = get_nextplot ();
2140  else if (pname.compare ("outerposition"))
2141  retval = get_outerposition ();
2142  else if (pname.compare ("plotboxaspectratio"))
2143  retval = get_plotboxaspectratio ();
2144  else if (pname.compare ("plotboxaspectratiomode"))
2145  retval = get_plotboxaspectratiomode ();
2146  else if (pname.compare ("position"))
2147  retval = get_position ();
2148  else if (pname.compare ("projection"))
2149  retval = get_projection ();
2150  else if (pname.compare ("tickdir"))
2151  retval = get_tickdir ();
2152  else if (pname.compare ("tickdirmode"))
2153  retval = get_tickdirmode ();
2154  else if (pname.compare ("ticklength"))
2155  retval = get_ticklength ();
2156  else if (pname.compare ("tightinset"))
2157  retval = get_tightinset ();
2158  else if (pname.compare ("title"))
2159  retval = get_title ().as_octave_value ();
2160  else if (pname.compare ("units"))
2161  retval = get_units ();
2162  else if (pname.compare ("view"))
2163  retval = get_view ();
2164  else if (pname.compare ("xaxislocation"))
2165  retval = get_xaxislocation ();
2166  else if (pname.compare ("xcolor"))
2167  retval = get_xcolor ();
2168  else if (pname.compare ("xdir"))
2169  retval = get_xdir ();
2170  else if (pname.compare ("xgrid"))
2171  retval = get_xgrid ();
2172  else if (pname.compare ("xlabel"))
2173  retval = get_xlabel ().as_octave_value ();
2174  else if (pname.compare ("xlim"))
2175  retval = get_xlim ();
2176  else if (pname.compare ("xlimmode"))
2177  retval = get_xlimmode ();
2178  else if (pname.compare ("xminorgrid"))
2179  retval = get_xminorgrid ();
2180  else if (pname.compare ("xminortick"))
2181  retval = get_xminortick ();
2182  else if (pname.compare ("xscale"))
2183  retval = get_xscale ();
2184  else if (pname.compare ("xtick"))
2185  retval = get_xtick ();
2186  else if (pname.compare ("xticklabel"))
2187  retval = get_xticklabel ();
2188  else if (pname.compare ("xticklabelmode"))
2189  retval = get_xticklabelmode ();
2190  else if (pname.compare ("xtickmode"))
2191  retval = get_xtickmode ();
2192  else if (pname.compare ("yaxislocation"))
2193  retval = get_yaxislocation ();
2194  else if (pname.compare ("ycolor"))
2195  retval = get_ycolor ();
2196  else if (pname.compare ("ydir"))
2197  retval = get_ydir ();
2198  else if (pname.compare ("ygrid"))
2199  retval = get_ygrid ();
2200  else if (pname.compare ("ylabel"))
2201  retval = get_ylabel ().as_octave_value ();
2202  else if (pname.compare ("ylim"))
2203  retval = get_ylim ();
2204  else if (pname.compare ("ylimmode"))
2205  retval = get_ylimmode ();
2206  else if (pname.compare ("yminorgrid"))
2207  retval = get_yminorgrid ();
2208  else if (pname.compare ("yminortick"))
2209  retval = get_yminortick ();
2210  else if (pname.compare ("yscale"))
2211  retval = get_yscale ();
2212  else if (pname.compare ("ytick"))
2213  retval = get_ytick ();
2214  else if (pname.compare ("yticklabel"))
2215  retval = get_yticklabel ();
2216  else if (pname.compare ("yticklabelmode"))
2217  retval = get_yticklabelmode ();
2218  else if (pname.compare ("ytickmode"))
2219  retval = get_ytickmode ();
2220  else if (pname.compare ("zcolor"))
2221  retval = get_zcolor ();
2222  else if (pname.compare ("zdir"))
2223  retval = get_zdir ();
2224  else if (pname.compare ("zgrid"))
2225  retval = get_zgrid ();
2226  else if (pname.compare ("zlabel"))
2227  retval = get_zlabel ().as_octave_value ();
2228  else if (pname.compare ("zlim"))
2229  retval = get_zlim ();
2230  else if (pname.compare ("zlimmode"))
2231  retval = get_zlimmode ();
2232  else if (pname.compare ("zminorgrid"))
2233  retval = get_zminorgrid ();
2234  else if (pname.compare ("zminortick"))
2235  retval = get_zminortick ();
2236  else if (pname.compare ("zscale"))
2237  retval = get_zscale ();
2238  else if (pname.compare ("ztick"))
2239  retval = get_ztick ();
2240  else if (pname.compare ("zticklabel"))
2241  retval = get_zticklabel ();
2242  else if (pname.compare ("zticklabelmode"))
2243  retval = get_zticklabelmode ();
2244  else if (pname.compare ("ztickmode"))
2245  retval = get_ztickmode ();
2246  else if (pname.compare ("__hold_all__"))
2247  retval = get___hold_all__ ();
2248  else if (pname.compare ("autopos_tag"))
2249  retval = get_autopos_tag ();
2250  else if (pname.compare ("looseinset"))
2251  retval = get_looseinset ();
2252  else if (pname.compare ("x_viewtransform"))
2253  retval = get_x_viewtransform ();
2254  else if (pname.compare ("x_projectiontransform"))
2255  retval = get_x_projectiontransform ();
2256  else if (pname.compare ("x_viewporttransform"))
2257  retval = get_x_viewporttransform ();
2258  else if (pname.compare ("x_normrendertransform"))
2259  retval = get_x_normrendertransform ();
2260  else if (pname.compare ("x_rendertransform"))
2261  retval = get_x_rendertransform ();
2262  else if (pname.compare ("xmtick"))
2263  retval = get_xmtick ();
2264  else if (pname.compare ("ymtick"))
2265  retval = get_ymtick ();
2266  else if (pname.compare ("zmtick"))
2267  retval = get_zmtick ();
2268  else if (pname.compare ("fontsize_points"))
2269  retval = get_fontsize_points ();
2270  else
2271  retval = base_properties::get (pname);
2272 
2273  return retval;
2274 }
2275 
2276 property
2278 {
2279  const std::set<std::string>& pnames = all_property_names ();
2280 
2281  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
2282 
2283  if (error_state)
2284  return property ();
2285 
2286  if (pname.compare ("activepositionproperty"))
2287  return property (&activepositionproperty, true);
2288  else if (pname.compare ("alim"))
2289  return property (&alim, true);
2290  else if (pname.compare ("alimmode"))
2291  return property (&alimmode, true);
2292  else if (pname.compare ("ambientlightcolor"))
2293  return property (&ambientlightcolor, true);
2294  else if (pname.compare ("box"))
2295  return property (&box, true);
2296  else if (pname.compare ("cameraposition"))
2297  return property (&cameraposition, true);
2298  else if (pname.compare ("camerapositionmode"))
2299  return property (&camerapositionmode, true);
2300  else if (pname.compare ("cameratarget"))
2301  return property (&cameratarget, true);
2302  else if (pname.compare ("cameratargetmode"))
2303  return property (&cameratargetmode, true);
2304  else if (pname.compare ("cameraupvector"))
2305  return property (&cameraupvector, true);
2306  else if (pname.compare ("cameraupvectormode"))
2307  return property (&cameraupvectormode, true);
2308  else if (pname.compare ("cameraviewangle"))
2309  return property (&cameraviewangle, true);
2310  else if (pname.compare ("cameraviewanglemode"))
2311  return property (&cameraviewanglemode, true);
2312  else if (pname.compare ("clim"))
2313  return property (&clim, true);
2314  else if (pname.compare ("climmode"))
2315  return property (&climmode, true);
2316  else if (pname.compare ("color"))
2317  return property (&color, true);
2318  else if (pname.compare ("colororder"))
2319  return property (&colororder, true);
2320  else if (pname.compare ("currentpoint"))
2321  return property (&currentpoint, true);
2322  else if (pname.compare ("dataaspectratio"))
2323  return property (&dataaspectratio, true);
2324  else if (pname.compare ("dataaspectratiomode"))
2325  return property (&dataaspectratiomode, true);
2326  else if (pname.compare ("drawmode"))
2327  return property (&drawmode, true);
2328  else if (pname.compare ("fontangle"))
2329  return property (&fontangle, true);
2330  else if (pname.compare ("fontname"))
2331  return property (&fontname, true);
2332  else if (pname.compare ("fontsize"))
2333  return property (&fontsize, true);
2334  else if (pname.compare ("fontunits"))
2335  return property (&fontunits, true);
2336  else if (pname.compare ("fontweight"))
2337  return property (&fontweight, true);
2338  else if (pname.compare ("gridlinestyle"))
2339  return property (&gridlinestyle, true);
2340  else if (pname.compare ("interpreter"))
2341  return property (&interpreter, true);
2342  else if (pname.compare ("layer"))
2343  return property (&layer, true);
2344  else if (pname.compare ("linestyleorder"))
2345  return property (&linestyleorder, true);
2346  else if (pname.compare ("linewidth"))
2347  return property (&linewidth, true);
2348  else if (pname.compare ("minorgridlinestyle"))
2349  return property (&minorgridlinestyle, true);
2350  else if (pname.compare ("mousewheelzoom"))
2351  return property (&mousewheelzoom, true);
2352  else if (pname.compare ("nextplot"))
2353  return property (&nextplot, true);
2354  else if (pname.compare ("outerposition"))
2355  return property (&outerposition, true);
2356  else if (pname.compare ("plotboxaspectratio"))
2357  return property (&plotboxaspectratio, true);
2358  else if (pname.compare ("plotboxaspectratiomode"))
2359  return property (&plotboxaspectratiomode, true);
2360  else if (pname.compare ("position"))
2361  return property (&position, true);
2362  else if (pname.compare ("projection"))
2363  return property (&projection, true);
2364  else if (pname.compare ("tickdir"))
2365  return property (&tickdir, true);
2366  else if (pname.compare ("tickdirmode"))
2367  return property (&tickdirmode, true);
2368  else if (pname.compare ("ticklength"))
2369  return property (&ticklength, true);
2370  else if (pname.compare ("tightinset"))
2371  return property (&tightinset, true);
2372  else if (pname.compare ("title"))
2373  return property (&title, true);
2374  else if (pname.compare ("units"))
2375  return property (&units, true);
2376  else if (pname.compare ("view"))
2377  return property (&view, true);
2378  else if (pname.compare ("xaxislocation"))
2379  return property (&xaxislocation, true);
2380  else if (pname.compare ("xcolor"))
2381  return property (&xcolor, true);
2382  else if (pname.compare ("xdir"))
2383  return property (&xdir, true);
2384  else if (pname.compare ("xgrid"))
2385  return property (&xgrid, true);
2386  else if (pname.compare ("xlabel"))
2387  return property (&xlabel, true);
2388  else if (pname.compare ("xlim"))
2389  return property (&xlim, true);
2390  else if (pname.compare ("xlimmode"))
2391  return property (&xlimmode, true);
2392  else if (pname.compare ("xminorgrid"))
2393  return property (&xminorgrid, true);
2394  else if (pname.compare ("xminortick"))
2395  return property (&xminortick, true);
2396  else if (pname.compare ("xscale"))
2397  return property (&xscale, true);
2398  else if (pname.compare ("xtick"))
2399  return property (&xtick, true);
2400  else if (pname.compare ("xticklabel"))
2401  return property (&xticklabel, true);
2402  else if (pname.compare ("xticklabelmode"))
2403  return property (&xticklabelmode, true);
2404  else if (pname.compare ("xtickmode"))
2405  return property (&xtickmode, true);
2406  else if (pname.compare ("yaxislocation"))
2407  return property (&yaxislocation, true);
2408  else if (pname.compare ("ycolor"))
2409  return property (&ycolor, true);
2410  else if (pname.compare ("ydir"))
2411  return property (&ydir, true);
2412  else if (pname.compare ("ygrid"))
2413  return property (&ygrid, true);
2414  else if (pname.compare ("ylabel"))
2415  return property (&ylabel, true);
2416  else if (pname.compare ("ylim"))
2417  return property (&ylim, true);
2418  else if (pname.compare ("ylimmode"))
2419  return property (&ylimmode, true);
2420  else if (pname.compare ("yminorgrid"))
2421  return property (&yminorgrid, true);
2422  else if (pname.compare ("yminortick"))
2423  return property (&yminortick, true);
2424  else if (pname.compare ("yscale"))
2425  return property (&yscale, true);
2426  else if (pname.compare ("ytick"))
2427  return property (&ytick, true);
2428  else if (pname.compare ("yticklabel"))
2429  return property (&yticklabel, true);
2430  else if (pname.compare ("yticklabelmode"))
2431  return property (&yticklabelmode, true);
2432  else if (pname.compare ("ytickmode"))
2433  return property (&ytickmode, true);
2434  else if (pname.compare ("zcolor"))
2435  return property (&zcolor, true);
2436  else if (pname.compare ("zdir"))
2437  return property (&zdir, true);
2438  else if (pname.compare ("zgrid"))
2439  return property (&zgrid, true);
2440  else if (pname.compare ("zlabel"))
2441  return property (&zlabel, true);
2442  else if (pname.compare ("zlim"))
2443  return property (&zlim, true);
2444  else if (pname.compare ("zlimmode"))
2445  return property (&zlimmode, true);
2446  else if (pname.compare ("zminorgrid"))
2447  return property (&zminorgrid, true);
2448  else if (pname.compare ("zminortick"))
2449  return property (&zminortick, true);
2450  else if (pname.compare ("zscale"))
2451  return property (&zscale, true);
2452  else if (pname.compare ("ztick"))
2453  return property (&ztick, true);
2454  else if (pname.compare ("zticklabel"))
2455  return property (&zticklabel, true);
2456  else if (pname.compare ("zticklabelmode"))
2457  return property (&zticklabelmode, true);
2458  else if (pname.compare ("ztickmode"))
2459  return property (&ztickmode, true);
2460  else if (pname.compare ("__hold_all__"))
2461  return property (&__hold_all__, true);
2462  else if (pname.compare ("autopos_tag"))
2463  return property (&autopos_tag, true);
2464  else if (pname.compare ("looseinset"))
2465  return property (&looseinset, true);
2466  else if (pname.compare ("x_viewtransform"))
2467  return property (&x_viewtransform, true);
2468  else if (pname.compare ("x_projectiontransform"))
2469  return property (&x_projectiontransform, true);
2470  else if (pname.compare ("x_viewporttransform"))
2471  return property (&x_viewporttransform, true);
2472  else if (pname.compare ("x_normrendertransform"))
2473  return property (&x_normrendertransform, true);
2474  else if (pname.compare ("x_rendertransform"))
2475  return property (&x_rendertransform, true);
2476  else if (pname.compare ("xmtick"))
2477  return property (&xmtick, true);
2478  else if (pname.compare ("ymtick"))
2479  return property (&ymtick, true);
2480  else if (pname.compare ("zmtick"))
2481  return property (&zmtick, true);
2482  else if (pname.compare ("fontsize_points"))
2483  return property (&fontsize_points, true);
2484  else
2485  return base_properties::get_property (pname);
2486 }
2487 
2490 {
2492 
2493  m["activepositionproperty"] = "outerposition";
2494  m["alim"] = default_lim ();
2495  m["alimmode"] = "auto";
2496  m["ambientlightcolor"] = color_values (1, 1, 1);
2497  m["box"] = "on";
2498  m["cameraposition"] = Matrix (1, 3, 0.0);
2499  m["camerapositionmode"] = "auto";
2500  m["cameratarget"] = Matrix (1, 3, 0.0);
2501  m["cameratargetmode"] = "auto";
2502  m["cameraupvector"] = Matrix (1, 3, 0.0);
2503  m["cameraupvectormode"] = "auto";
2504  m["cameraviewangle"] = 10.0;
2505  m["cameraviewanglemode"] = "auto";
2506  m["clim"] = default_lim ();
2507  m["climmode"] = "auto";
2508  m["color"] = color_property (color_values (1, 1, 1), radio_values ("none"));
2509  m["colororder"] = default_colororder ();
2510  m["currentpoint"] = Matrix (2, 3, 0.0);
2511  m["dataaspectratio"] = Matrix (1, 3, 1.0);
2512  m["dataaspectratiomode"] = "auto";
2513  m["drawmode"] = "normal";
2514  m["fontangle"] = "normal";
2515  m["fontname"] = OCTAVE_DEFAULT_FONTNAME;
2516  m["fontsize"] = 10;
2517  m["fontunits"] = "points";
2518  m["fontweight"] = "normal";
2519  m["gridlinestyle"] = ":";
2520  m["interpreter"] = "none";
2521  m["layer"] = "bottom";
2522  m["linestyleorder"] = "-";
2523  m["linewidth"] = 0.5;
2524  m["minorgridlinestyle"] = ":";
2525  m["mousewheelzoom"] = 0.5;
2526  m["nextplot"] = "replace";
2527  m["outerposition"] = default_axes_outerposition ();
2528  m["plotboxaspectratio"] = Matrix (1, 3, 1.0);
2529  m["plotboxaspectratiomode"] = "auto";
2530  m["position"] = default_axes_position ();
2531  m["projection"] = "orthographic";
2532  m["tickdir"] = "in";
2533  m["tickdirmode"] = "auto";
2534  m["ticklength"] = default_axes_ticklength ();
2535  m["tightinset"] = Matrix (1, 4, 0.0);
2536  m["units"] = "normalized";
2537  m["view"] = default_axes_view ();
2538  m["xaxislocation"] = "bottom";
2539  m["xcolor"] = color_values (0, 0, 0);
2540  m["xdir"] = "normal";
2541  m["xgrid"] = "off";
2542  m["xlim"] = default_lim ();
2543  m["xlimmode"] = "auto";
2544  m["xminorgrid"] = "off";
2545  m["xminortick"] = "off";
2546  m["xscale"] = "linear";
2547  m["xtick"] = default_axes_tick ();
2548  m["xticklabel"] = "";
2549  m["xticklabelmode"] = "auto";
2550  m["xtickmode"] = "auto";
2551  m["yaxislocation"] = "left";
2552  m["ycolor"] = color_values (0, 0, 0);
2553  m["ydir"] = "normal";
2554  m["ygrid"] = "off";
2555  m["ylim"] = default_lim ();
2556  m["ylimmode"] = "auto";
2557  m["yminorgrid"] = "off";
2558  m["yminortick"] = "off";
2559  m["yscale"] = "linear";
2560  m["ytick"] = default_axes_tick ();
2561  m["yticklabel"] = "";
2562  m["yticklabelmode"] = "auto";
2563  m["ytickmode"] = "auto";
2564  m["zcolor"] = color_values (0, 0, 0);
2565  m["zdir"] = "normal";
2566  m["zgrid"] = "off";
2567  m["zlim"] = default_lim ();
2568  m["zlimmode"] = "auto";
2569  m["zminorgrid"] = "off";
2570  m["zminortick"] = "off";
2571  m["zscale"] = "linear";
2572  m["ztick"] = default_axes_tick ();
2573  m["zticklabel"] = "";
2574  m["zticklabelmode"] = "auto";
2575  m["ztickmode"] = "auto";
2576  m["__hold_all__"] = "off";
2577  m["autopos_tag"] = "none";
2578  m["looseinset"] = Matrix (1, 4, 0.0);
2579  m["x_viewtransform"] = Matrix (4, 4, 0.0);
2580  m["x_projectiontransform"] = Matrix (4, 4, 0.0);
2581  m["x_viewporttransform"] = Matrix (4, 4, 0.0);
2582  m["x_normrendertransform"] = Matrix (4, 4, 0.0);
2583  m["x_rendertransform"] = Matrix (4, 4, 0.0);
2584  m["xmtick"] = Matrix ();
2585  m["ymtick"] = Matrix ();
2586  m["zmtick"] = Matrix ();
2587  m["fontsize_points"] = 0;
2588 
2589  return m;
2590 }
2591 
2592 std::string axes::properties::go_name ("axes");
2593 
2594 std::set<std::string>
2596 {
2597  static std::set<std::string> all_pnames;
2598 
2599  static bool initialized = false;
2600 
2601  if (! initialized)
2602  {
2603  all_pnames.insert ("activepositionproperty");
2604  all_pnames.insert ("alim");
2605  all_pnames.insert ("alimmode");
2606  all_pnames.insert ("ambientlightcolor");
2607  all_pnames.insert ("box");
2608  all_pnames.insert ("cameraposition");
2609  all_pnames.insert ("camerapositionmode");
2610  all_pnames.insert ("cameratarget");
2611  all_pnames.insert ("cameratargetmode");
2612  all_pnames.insert ("cameraupvector");
2613  all_pnames.insert ("cameraupvectormode");
2614  all_pnames.insert ("cameraviewangle");
2615  all_pnames.insert ("cameraviewanglemode");
2616  all_pnames.insert ("clim");
2617  all_pnames.insert ("climmode");
2618  all_pnames.insert ("color");
2619  all_pnames.insert ("colororder");
2620  all_pnames.insert ("currentpoint");
2621  all_pnames.insert ("dataaspectratio");
2622  all_pnames.insert ("dataaspectratiomode");
2623  all_pnames.insert ("drawmode");
2624  all_pnames.insert ("fontangle");
2625  all_pnames.insert ("fontname");
2626  all_pnames.insert ("fontsize");
2627  all_pnames.insert ("fontunits");
2628  all_pnames.insert ("fontweight");
2629  all_pnames.insert ("gridlinestyle");
2630  all_pnames.insert ("interpreter");
2631  all_pnames.insert ("layer");
2632  all_pnames.insert ("linestyleorder");
2633  all_pnames.insert ("linewidth");
2634  all_pnames.insert ("minorgridlinestyle");
2635  all_pnames.insert ("mousewheelzoom");
2636  all_pnames.insert ("nextplot");
2637  all_pnames.insert ("outerposition");
2638  all_pnames.insert ("plotboxaspectratio");
2639  all_pnames.insert ("plotboxaspectratiomode");
2640  all_pnames.insert ("position");
2641  all_pnames.insert ("projection");
2642  all_pnames.insert ("tickdir");
2643  all_pnames.insert ("tickdirmode");
2644  all_pnames.insert ("ticklength");
2645  all_pnames.insert ("tightinset");
2646  all_pnames.insert ("title");
2647  all_pnames.insert ("units");
2648  all_pnames.insert ("view");
2649  all_pnames.insert ("xaxislocation");
2650  all_pnames.insert ("xcolor");
2651  all_pnames.insert ("xdir");
2652  all_pnames.insert ("xgrid");
2653  all_pnames.insert ("xlabel");
2654  all_pnames.insert ("xlim");
2655  all_pnames.insert ("xlimmode");
2656  all_pnames.insert ("xminorgrid");
2657  all_pnames.insert ("xminortick");
2658  all_pnames.insert ("xscale");
2659  all_pnames.insert ("xtick");
2660  all_pnames.insert ("xticklabel");
2661  all_pnames.insert ("xticklabelmode");
2662  all_pnames.insert ("xtickmode");
2663  all_pnames.insert ("yaxislocation");
2664  all_pnames.insert ("ycolor");
2665  all_pnames.insert ("ydir");
2666  all_pnames.insert ("ygrid");
2667  all_pnames.insert ("ylabel");
2668  all_pnames.insert ("ylim");
2669  all_pnames.insert ("ylimmode");
2670  all_pnames.insert ("yminorgrid");
2671  all_pnames.insert ("yminortick");
2672  all_pnames.insert ("yscale");
2673  all_pnames.insert ("ytick");
2674  all_pnames.insert ("yticklabel");
2675  all_pnames.insert ("yticklabelmode");
2676  all_pnames.insert ("ytickmode");
2677  all_pnames.insert ("zcolor");
2678  all_pnames.insert ("zdir");
2679  all_pnames.insert ("zgrid");
2680  all_pnames.insert ("zlabel");
2681  all_pnames.insert ("zlim");
2682  all_pnames.insert ("zlimmode");
2683  all_pnames.insert ("zminorgrid");
2684  all_pnames.insert ("zminortick");
2685  all_pnames.insert ("zscale");
2686  all_pnames.insert ("ztick");
2687  all_pnames.insert ("zticklabel");
2688  all_pnames.insert ("zticklabelmode");
2689  all_pnames.insert ("ztickmode");
2690  all_pnames.insert ("__hold_all__");
2691  all_pnames.insert ("autopos_tag");
2692  all_pnames.insert ("looseinset");
2693  all_pnames.insert ("x_viewtransform");
2694  all_pnames.insert ("x_projectiontransform");
2695  all_pnames.insert ("x_viewporttransform");
2696  all_pnames.insert ("x_normrendertransform");
2697  all_pnames.insert ("x_rendertransform");
2698  all_pnames.insert ("xmtick");
2699  all_pnames.insert ("ymtick");
2700  all_pnames.insert ("zmtick");
2701  all_pnames.insert ("fontsize_points");
2702 
2703  std::set<std::string> base_pnames = base_properties::core_property_names ();
2704  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
2705 
2706  initialized = true;
2707  }
2708 
2709  return all_pnames;
2710 }
2711 
2712 bool
2714 {
2715  std::set<std::string> pnames = core_property_names ();
2716 
2717  return pnames.find (pname) != pnames.end ();
2718 }
2719 
2720 std::set<std::string>
2722 {
2723  static std::set<std::string> all_pnames;
2724 
2725  static bool initialized = false;
2726 
2727  if (! initialized)
2728  {
2729  all_pnames.insert ("tightinset");
2730  all_pnames.insert ("fontsize_points");
2731 
2732  std::set<std::string> base_pnames = base_properties::readonly_property_names ();
2733  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
2734 
2735  initialized = true;
2736  }
2737 
2738  return all_pnames;
2739 }
2740 
2741 bool
2743 {
2744  std::set<std::string> pnames = readonly_property_names ();
2745 
2746  return pnames.find (pname) != pnames.end ();
2747 }
2748 
2749 std::set<std::string>
2751 {
2752  static std::set<std::string> all_pnames = core_property_names ();
2753 
2754  std::set<std::string> retval = all_pnames;
2755  std::set<std::string> base_props = base_properties::all_property_names ();
2756  retval.insert (base_props.begin (), base_props.end ());
2757 
2758  return retval;
2759 }
2760 
2761 bool
2763 {
2764  std::set<std::string> pnames = all_property_names ();
2765 
2766  return pnames.find (pname) != pnames.end ();
2767 }
2768 
2769 // ******** line ********
2770 
2772  : base_properties (go_name, mh, p),
2773  color ("color", mh, color_values (0, 0, 0)),
2774  displayname ("displayname", mh, ""),
2775  erasemode ("erasemode", mh, "{normal}|none|xor|background"),
2776  interpreter ("interpreter", mh, "{tex}|none|latex"),
2777  linestyle ("linestyle", mh, "{-}|--|:|-.|none"),
2778  linewidth ("linewidth", mh, 0.5),
2779  marker ("marker", mh, "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram"),
2780  markeredgecolor ("markeredgecolor", mh, color_property (radio_values ("{auto}|none"), color_values (0, 0, 0))),
2781  markerfacecolor ("markerfacecolor", mh, color_property (radio_values ("auto|{none}"), color_values (0, 0, 0))),
2782  markersize ("markersize", mh, 6),
2783  xdata ("xdata", mh, default_data ()),
2784  xdatasource ("xdatasource", mh, ""),
2785  ydata ("ydata", mh, default_data ()),
2786  ydatasource ("ydatasource", mh, ""),
2787  zdata ("zdata", mh, Matrix ()),
2788  zdatasource ("zdatasource", mh, ""),
2789  xlim ("xlim", mh, Matrix ()),
2790  ylim ("ylim", mh, Matrix ()),
2791  zlim ("zlim", mh, Matrix ()),
2792  xliminclude ("xliminclude", mh, "on"),
2793  yliminclude ("yliminclude", mh, "on"),
2794  zliminclude ("zliminclude", mh, "off")
2795 {
2796  color.set_id (ID_COLOR);
2806  xdata.set_id (ID_XDATA);
2808  ydata.set_id (ID_YDATA);
2810  zdata.set_id (ID_ZDATA);
2812  xlim.set_id (ID_XLIM);
2813  xlim.set_hidden (true);
2814  ylim.set_id (ID_YLIM);
2815  ylim.set_hidden (true);
2816  zlim.set_id (ID_ZLIM);
2817  zlim.set_hidden (true);
2819  xliminclude.set_hidden (true);
2821  yliminclude.set_hidden (true);
2823  zliminclude.set_hidden (true);
2824  init ();
2825 }
2826 
2827 void
2828 line::properties::set (const caseless_str& pname_arg, const octave_value& val)
2829 {
2830  const std::set<std::string>& pnames = all_property_names ();
2831 
2832  caseless_str pname = validate_property_name ("set", go_name, pnames, pname_arg);
2833 
2834  if (error_state)
2835  return;
2836  else if (has_readonly_property (pname))
2837  {
2838  error ("set: \"%s\" is read-only", pname.c_str ());
2839  return;
2840  }
2841 
2842  if (pname.compare ("color"))
2843  set_color (val);
2844  else if (pname.compare ("displayname"))
2845  set_displayname (val);
2846  else if (pname.compare ("erasemode"))
2847  set_erasemode (val);
2848  else if (pname.compare ("interpreter"))
2849  set_interpreter (val);
2850  else if (pname.compare ("linestyle"))
2851  set_linestyle (val);
2852  else if (pname.compare ("linewidth"))
2853  set_linewidth (val);
2854  else if (pname.compare ("marker"))
2855  set_marker (val);
2856  else if (pname.compare ("markeredgecolor"))
2857  set_markeredgecolor (val);
2858  else if (pname.compare ("markerfacecolor"))
2859  set_markerfacecolor (val);
2860  else if (pname.compare ("markersize"))
2861  set_markersize (val);
2862  else if (pname.compare ("xdata"))
2863  set_xdata (val);
2864  else if (pname.compare ("xdatasource"))
2865  set_xdatasource (val);
2866  else if (pname.compare ("ydata"))
2867  set_ydata (val);
2868  else if (pname.compare ("ydatasource"))
2869  set_ydatasource (val);
2870  else if (pname.compare ("zdata"))
2871  set_zdata (val);
2872  else if (pname.compare ("zdatasource"))
2873  set_zdatasource (val);
2874  else if (pname.compare ("xliminclude"))
2875  set_xliminclude (val);
2876  else if (pname.compare ("yliminclude"))
2877  set_yliminclude (val);
2878  else if (pname.compare ("zliminclude"))
2879  set_zliminclude (val);
2880  else
2881  base_properties::set (pname, val);
2882 }
2883 
2885 line::properties::get (bool all) const
2886 {
2888 
2889  m.assign ("color", octave_value (get_color ()));
2890  m.assign ("displayname", octave_value (get_displayname ()));
2891  m.assign ("erasemode", octave_value (get_erasemode ()));
2892  m.assign ("interpreter", octave_value (get_interpreter ()));
2893  m.assign ("linestyle", octave_value (get_linestyle ()));
2894  m.assign ("linewidth", octave_value (get_linewidth ()));
2895  m.assign ("marker", octave_value (get_marker ()));
2896  m.assign ("markeredgecolor", octave_value (get_markeredgecolor ()));
2897  m.assign ("markerfacecolor", octave_value (get_markerfacecolor ()));
2898  m.assign ("markersize", octave_value (get_markersize ()));
2899  m.assign ("xdata", octave_value (get_xdata ()));
2900  m.assign ("xdatasource", octave_value (get_xdatasource ()));
2901  m.assign ("ydata", octave_value (get_ydata ()));
2902  m.assign ("ydatasource", octave_value (get_ydatasource ()));
2903  m.assign ("zdata", octave_value (get_zdata ()));
2904  m.assign ("zdatasource", octave_value (get_zdatasource ()));
2905  if (all)
2906  m.assign ("xlim", octave_value (get_xlim ()));
2907  if (all)
2908  m.assign ("ylim", octave_value (get_ylim ()));
2909  if (all)
2910  m.assign ("zlim", octave_value (get_zlim ()));
2911  if (all)
2912  m.assign ("xliminclude", octave_value (get_xliminclude ()));
2913  if (all)
2914  m.assign ("yliminclude", octave_value (get_yliminclude ()));
2915  if (all)
2916  m.assign ("zliminclude", octave_value (get_zliminclude ()));
2917 
2918  return m;
2919 }
2920 
2922 line::properties::get (const caseless_str& pname_arg) const
2923 {
2924  octave_value retval;
2925 
2926  const std::set<std::string>& pnames = all_property_names ();
2927 
2928  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
2929 
2930  if (error_state)
2931  return retval;
2932 
2933  if (pname.compare ("color"))
2934  retval = get_color ();
2935  else if (pname.compare ("displayname"))
2936  retval = get_displayname ();
2937  else if (pname.compare ("erasemode"))
2938  retval = get_erasemode ();
2939  else if (pname.compare ("interpreter"))
2940  retval = get_interpreter ();
2941  else if (pname.compare ("linestyle"))
2942  retval = get_linestyle ();
2943  else if (pname.compare ("linewidth"))
2944  retval = get_linewidth ();
2945  else if (pname.compare ("marker"))
2946  retval = get_marker ();
2947  else if (pname.compare ("markeredgecolor"))
2948  retval = get_markeredgecolor ();
2949  else if (pname.compare ("markerfacecolor"))
2950  retval = get_markerfacecolor ();
2951  else if (pname.compare ("markersize"))
2952  retval = get_markersize ();
2953  else if (pname.compare ("xdata"))
2954  retval = get_xdata ();
2955  else if (pname.compare ("xdatasource"))
2956  retval = get_xdatasource ();
2957  else if (pname.compare ("ydata"))
2958  retval = get_ydata ();
2959  else if (pname.compare ("ydatasource"))
2960  retval = get_ydatasource ();
2961  else if (pname.compare ("zdata"))
2962  retval = get_zdata ();
2963  else if (pname.compare ("zdatasource"))
2964  retval = get_zdatasource ();
2965  else if (pname.compare ("xlim"))
2966  retval = get_xlim ();
2967  else if (pname.compare ("ylim"))
2968  retval = get_ylim ();
2969  else if (pname.compare ("zlim"))
2970  retval = get_zlim ();
2971  else if (pname.compare ("xliminclude"))
2972  retval = get_xliminclude ();
2973  else if (pname.compare ("yliminclude"))
2974  retval = get_yliminclude ();
2975  else if (pname.compare ("zliminclude"))
2976  retval = get_zliminclude ();
2977  else
2978  retval = base_properties::get (pname);
2979 
2980  return retval;
2981 }
2982 
2983 property
2985 {
2986  const std::set<std::string>& pnames = all_property_names ();
2987 
2988  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
2989 
2990  if (error_state)
2991  return property ();
2992 
2993  if (pname.compare ("color"))
2994  return property (&color, true);
2995  else if (pname.compare ("displayname"))
2996  return property (&displayname, true);
2997  else if (pname.compare ("erasemode"))
2998  return property (&erasemode, true);
2999  else if (pname.compare ("interpreter"))
3000  return property (&interpreter, true);
3001  else if (pname.compare ("linestyle"))
3002  return property (&linestyle, true);
3003  else if (pname.compare ("linewidth"))
3004  return property (&linewidth, true);
3005  else if (pname.compare ("marker"))
3006  return property (&marker, true);
3007  else if (pname.compare ("markeredgecolor"))
3008  return property (&markeredgecolor, true);
3009  else if (pname.compare ("markerfacecolor"))
3010  return property (&markerfacecolor, true);
3011  else if (pname.compare ("markersize"))
3012  return property (&markersize, true);
3013  else if (pname.compare ("xdata"))
3014  return property (&xdata, true);
3015  else if (pname.compare ("xdatasource"))
3016  return property (&xdatasource, true);
3017  else if (pname.compare ("ydata"))
3018  return property (&ydata, true);
3019  else if (pname.compare ("ydatasource"))
3020  return property (&ydatasource, true);
3021  else if (pname.compare ("zdata"))
3022  return property (&zdata, true);
3023  else if (pname.compare ("zdatasource"))
3024  return property (&zdatasource, true);
3025  else if (pname.compare ("xlim"))
3026  return property (&xlim, true);
3027  else if (pname.compare ("ylim"))
3028  return property (&ylim, true);
3029  else if (pname.compare ("zlim"))
3030  return property (&zlim, true);
3031  else if (pname.compare ("xliminclude"))
3032  return property (&xliminclude, true);
3033  else if (pname.compare ("yliminclude"))
3034  return property (&yliminclude, true);
3035  else if (pname.compare ("zliminclude"))
3036  return property (&zliminclude, true);
3037  else
3038  return base_properties::get_property (pname);
3039 }
3040 
3043 {
3045 
3046  m["color"] = color_values (0, 0, 0);
3047  m["displayname"] = "";
3048  m["erasemode"] = "normal";
3049  m["interpreter"] = "tex";
3050  m["linestyle"] = "-";
3051  m["linewidth"] = 0.5;
3052  m["marker"] = "none";
3053  m["markeredgecolor"] = color_property (radio_values ("{auto}|none"), color_values (0, 0, 0));
3054  m["markerfacecolor"] = color_property (radio_values ("auto|{none}"), color_values (0, 0, 0));
3055  m["markersize"] = 6;
3056  m["xdata"] = default_data ();
3057  m["xdatasource"] = "";
3058  m["ydata"] = default_data ();
3059  m["ydatasource"] = "";
3060  m["zdata"] = Matrix ();
3061  m["zdatasource"] = "";
3062  m["xlim"] = Matrix ();
3063  m["ylim"] = Matrix ();
3064  m["zlim"] = Matrix ();
3065  m["xliminclude"] = "on";
3066  m["yliminclude"] = "on";
3067  m["zliminclude"] = "off";
3068 
3069  return m;
3070 }
3071 
3072 std::string line::properties::go_name ("line");
3073 
3074 std::set<std::string>
3076 {
3077  static std::set<std::string> all_pnames;
3078 
3079  static bool initialized = false;
3080 
3081  if (! initialized)
3082  {
3083  all_pnames.insert ("color");
3084  all_pnames.insert ("displayname");
3085  all_pnames.insert ("erasemode");
3086  all_pnames.insert ("interpreter");
3087  all_pnames.insert ("linestyle");
3088  all_pnames.insert ("linewidth");
3089  all_pnames.insert ("marker");
3090  all_pnames.insert ("markeredgecolor");
3091  all_pnames.insert ("markerfacecolor");
3092  all_pnames.insert ("markersize");
3093  all_pnames.insert ("xdata");
3094  all_pnames.insert ("xdatasource");
3095  all_pnames.insert ("ydata");
3096  all_pnames.insert ("ydatasource");
3097  all_pnames.insert ("zdata");
3098  all_pnames.insert ("zdatasource");
3099  all_pnames.insert ("xlim");
3100  all_pnames.insert ("ylim");
3101  all_pnames.insert ("zlim");
3102  all_pnames.insert ("xliminclude");
3103  all_pnames.insert ("yliminclude");
3104  all_pnames.insert ("zliminclude");
3105 
3106  std::set<std::string> base_pnames = base_properties::core_property_names ();
3107  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
3108 
3109  initialized = true;
3110  }
3111 
3112  return all_pnames;
3113 }
3114 
3115 bool
3117 {
3118  std::set<std::string> pnames = core_property_names ();
3119 
3120  return pnames.find (pname) != pnames.end ();
3121 }
3122 
3123 std::set<std::string>
3125 {
3126  static std::set<std::string> all_pnames;
3127 
3128  static bool initialized = false;
3129 
3130  if (! initialized)
3131  {
3132  all_pnames.insert ("xlim");
3133  all_pnames.insert ("ylim");
3134  all_pnames.insert ("zlim");
3135 
3136  std::set<std::string> base_pnames = base_properties::readonly_property_names ();
3137  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
3138 
3139  initialized = true;
3140  }
3141 
3142  return all_pnames;
3143 }
3144 
3145 bool
3147 {
3148  std::set<std::string> pnames = readonly_property_names ();
3149 
3150  return pnames.find (pname) != pnames.end ();
3151 }
3152 
3153 std::set<std::string>
3155 {
3156  static std::set<std::string> all_pnames = core_property_names ();
3157 
3158  std::set<std::string> retval = all_pnames;
3159  std::set<std::string> base_props = base_properties::all_property_names ();
3160  retval.insert (base_props.begin (), base_props.end ());
3161 
3162  return retval;
3163 }
3164 
3165 bool
3167 {
3168  std::set<std::string> pnames = all_property_names ();
3169 
3170  return pnames.find (pname) != pnames.end ();
3171 }
3172 
3173 // ******** text ********
3174 
3176  : base_properties (go_name, mh, p),
3177  backgroundcolor ("backgroundcolor", mh, color_property (radio_values ("{none}"), color_values (1, 1, 1))),
3178  color ("color", mh, color_values (0, 0, 0)),
3179  displayname ("displayname", mh, ""),
3180  edgecolor ("edgecolor", mh, color_property (radio_values ("{none}"), color_values (0, 0, 0))),
3181  editing ("editing", mh, "off"),
3182  erasemode ("erasemode", mh, "{normal}|none|xor|background"),
3183  extent ("extent", mh, Matrix (1, 4, 0.0)),
3184  fontangle ("fontangle", mh, "{normal}|italic|oblique"),
3185  fontname ("fontname", mh, OCTAVE_DEFAULT_FONTNAME),
3186  fontsize ("fontsize", mh, 10),
3187  fontunits ("fontunits", mh, "inches|centimeters|normalized|{points}|pixels"),
3188  fontweight ("fontweight", mh, "light|{normal}|demi|bold"),
3189  horizontalalignment ("horizontalalignment", mh, "{left}|center|right"),
3190  interpreter ("interpreter", mh, "{tex}|none|latex"),
3191  linestyle ("linestyle", mh, "{-}|--|:|-.|none"),
3192  linewidth ("linewidth", mh, 0.5),
3193  margin ("margin", mh, 2),
3194  position ("position", mh, Matrix (1, 3, 0.0)),
3195  rotation ("rotation", mh, 0),
3196  string ("string", mh, ""),
3197  units ("units", mh, "{data}|pixels|normalized|inches|centimeters|points"),
3198  verticalalignment ("verticalalignment", mh, "top|cap|{middle}|baseline|bottom"),
3199  xlim ("xlim", mh, Matrix ()),
3200  ylim ("ylim", mh, Matrix ()),
3201  zlim ("zlim", mh, Matrix ()),
3202  xliminclude ("xliminclude", mh, "off"),
3203  yliminclude ("yliminclude", mh, "off"),
3204  zliminclude ("zliminclude", mh, "off"),
3205  positionmode ("positionmode", mh, "{auto}|manual"),
3206  rotationmode ("rotationmode", mh, "{auto}|manual"),
3207  horizontalalignmentmode ("horizontalalignmentmode", mh, "{auto}|manual"),
3208  verticalalignmentmode ("verticalalignmentmode", mh, "{auto}|manual"),
3209  autopos_tag ("autopos_tag", mh, "{none}|xlabel|ylabel|zlabel|title"),
3210  fontsize_points ("fontsize_points", mh, 0)
3211 {
3213  color.set_id (ID_COLOR);
3231  string.set_id (ID_STRING);
3232  units.set_id (ID_UNITS);
3234  xlim.set_id (ID_XLIM);
3235  xlim.set_hidden (true);
3236  ylim.set_id (ID_YLIM);
3237  ylim.set_hidden (true);
3238  zlim.set_id (ID_ZLIM);
3239  zlim.set_hidden (true);
3241  xliminclude.set_hidden (true);
3243  yliminclude.set_hidden (true);
3245  zliminclude.set_hidden (true);
3247  positionmode.set_hidden (true);
3249  rotationmode.set_hidden (true);
3255  autopos_tag.set_hidden (true);
3257  fontsize_points.set_hidden (true);
3258  init ();
3259 }
3260 
3261 void
3262 text::properties::set (const caseless_str& pname_arg, const octave_value& val)
3263 {
3264  const std::set<std::string>& pnames = all_property_names ();
3265 
3266  caseless_str pname = validate_property_name ("set", go_name, pnames, pname_arg);
3267 
3268  if (error_state)
3269  return;
3270  else if (has_readonly_property (pname))
3271  {
3272  error ("set: \"%s\" is read-only", pname.c_str ());
3273  return;
3274  }
3275 
3276  if (pname.compare ("backgroundcolor"))
3277  set_backgroundcolor (val);
3278  else if (pname.compare ("color"))
3279  set_color (val);
3280  else if (pname.compare ("displayname"))
3281  set_displayname (val);
3282  else if (pname.compare ("edgecolor"))
3283  set_edgecolor (val);
3284  else if (pname.compare ("editing"))
3285  set_editing (val);
3286  else if (pname.compare ("erasemode"))
3287  set_erasemode (val);
3288  else if (pname.compare ("fontangle"))
3289  set_fontangle (val);
3290  else if (pname.compare ("fontname"))
3291  set_fontname (val);
3292  else if (pname.compare ("fontsize"))
3293  set_fontsize (val);
3294  else if (pname.compare ("fontunits"))
3295  set_fontunits (val);
3296  else if (pname.compare ("fontweight"))
3297  set_fontweight (val);
3298  else if (pname.compare ("horizontalalignment"))
3299  set_horizontalalignment (val);
3300  else if (pname.compare ("interpreter"))
3301  set_interpreter (val);
3302  else if (pname.compare ("linestyle"))
3303  set_linestyle (val);
3304  else if (pname.compare ("linewidth"))
3305  set_linewidth (val);
3306  else if (pname.compare ("margin"))
3307  set_margin (val);
3308  else if (pname.compare ("position"))
3309  set_position (val);
3310  else if (pname.compare ("rotation"))
3311  set_rotation (val);
3312  else if (pname.compare ("string"))
3313  set_string (val);
3314  else if (pname.compare ("units"))
3315  set_units (val);
3316  else if (pname.compare ("verticalalignment"))
3317  set_verticalalignment (val);
3318  else if (pname.compare ("xliminclude"))
3319  set_xliminclude (val);
3320  else if (pname.compare ("yliminclude"))
3321  set_yliminclude (val);
3322  else if (pname.compare ("zliminclude"))
3323  set_zliminclude (val);
3324  else if (pname.compare ("positionmode"))
3325  set_positionmode (val);
3326  else if (pname.compare ("rotationmode"))
3327  set_rotationmode (val);
3328  else if (pname.compare ("horizontalalignmentmode"))
3329  set_horizontalalignmentmode (val);
3330  else if (pname.compare ("verticalalignmentmode"))
3331  set_verticalalignmentmode (val);
3332  else if (pname.compare ("autopos_tag"))
3333  set_autopos_tag (val);
3334  else
3335  base_properties::set (pname, val);
3336 }
3337 
3339 text::properties::get (bool all) const
3340 {
3342 
3343  m.assign ("backgroundcolor", octave_value (get_backgroundcolor ()));
3344  m.assign ("color", octave_value (get_color ()));
3345  m.assign ("displayname", octave_value (get_displayname ()));
3346  m.assign ("edgecolor", octave_value (get_edgecolor ()));
3347  m.assign ("editing", octave_value (get_editing ()));
3348  m.assign ("erasemode", octave_value (get_erasemode ()));
3349  m.assign ("extent", octave_value (get_extent ()));
3350  m.assign ("fontangle", octave_value (get_fontangle ()));
3351  m.assign ("fontname", octave_value (get_fontname ()));
3352  m.assign ("fontsize", octave_value (get_fontsize ()));
3353  m.assign ("fontunits", octave_value (get_fontunits ()));
3354  m.assign ("fontweight", octave_value (get_fontweight ()));
3355  m.assign ("horizontalalignment", octave_value (get_horizontalalignment ()));
3356  m.assign ("interpreter", octave_value (get_interpreter ()));
3357  m.assign ("linestyle", octave_value (get_linestyle ()));
3358  m.assign ("linewidth", octave_value (get_linewidth ()));
3359  m.assign ("margin", octave_value (get_margin ()));
3360  m.assign ("position", octave_value (get_position ()));
3361  m.assign ("rotation", octave_value (get_rotation ()));
3362  m.assign ("string", octave_value (get_string ()));
3363  m.assign ("units", octave_value (get_units ()));
3364  m.assign ("verticalalignment", octave_value (get_verticalalignment ()));
3365  if (all)
3366  m.assign ("xlim", octave_value (get_xlim ()));
3367  if (all)
3368  m.assign ("ylim", octave_value (get_ylim ()));
3369  if (all)
3370  m.assign ("zlim", octave_value (get_zlim ()));
3371  if (all)
3372  m.assign ("xliminclude", octave_value (get_xliminclude ()));
3373  if (all)
3374  m.assign ("yliminclude", octave_value (get_yliminclude ()));
3375  if (all)
3376  m.assign ("zliminclude", octave_value (get_zliminclude ()));
3377  if (all)
3378  m.assign ("positionmode", octave_value (get_positionmode ()));
3379  if (all)
3380  m.assign ("rotationmode", octave_value (get_rotationmode ()));
3381  if (all)
3382  m.assign ("horizontalalignmentmode", octave_value (get_horizontalalignmentmode ()));
3383  if (all)
3384  m.assign ("verticalalignmentmode", octave_value (get_verticalalignmentmode ()));
3385  if (all)
3386  m.assign ("autopos_tag", octave_value (get_autopos_tag ()));
3387  if (all)
3388  m.assign ("fontsize_points", octave_value (get_fontsize_points ()));
3389 
3390  return m;
3391 }
3392 
3394 text::properties::get (const caseless_str& pname_arg) const
3395 {
3396  octave_value retval;
3397 
3398  const std::set<std::string>& pnames = all_property_names ();
3399 
3400  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3401 
3402  if (error_state)
3403  return retval;
3404 
3405  if (pname.compare ("backgroundcolor"))
3406  retval = get_backgroundcolor ();
3407  else if (pname.compare ("color"))
3408  retval = get_color ();
3409  else if (pname.compare ("displayname"))
3410  retval = get_displayname ();
3411  else if (pname.compare ("edgecolor"))
3412  retval = get_edgecolor ();
3413  else if (pname.compare ("editing"))
3414  retval = get_editing ();
3415  else if (pname.compare ("erasemode"))
3416  retval = get_erasemode ();
3417  else if (pname.compare ("extent"))
3418  retval = get_extent ();
3419  else if (pname.compare ("fontangle"))
3420  retval = get_fontangle ();
3421  else if (pname.compare ("fontname"))
3422  retval = get_fontname ();
3423  else if (pname.compare ("fontsize"))
3424  retval = get_fontsize ();
3425  else if (pname.compare ("fontunits"))
3426  retval = get_fontunits ();
3427  else if (pname.compare ("fontweight"))
3428  retval = get_fontweight ();
3429  else if (pname.compare ("horizontalalignment"))
3430  retval = get_horizontalalignment ();
3431  else if (pname.compare ("interpreter"))
3432  retval = get_interpreter ();
3433  else if (pname.compare ("linestyle"))
3434  retval = get_linestyle ();
3435  else if (pname.compare ("linewidth"))
3436  retval = get_linewidth ();
3437  else if (pname.compare ("margin"))
3438  retval = get_margin ();
3439  else if (pname.compare ("position"))
3440  retval = get_position ();
3441  else if (pname.compare ("rotation"))
3442  retval = get_rotation ();
3443  else if (pname.compare ("string"))
3444  retval = get_string ();
3445  else if (pname.compare ("units"))
3446  retval = get_units ();
3447  else if (pname.compare ("verticalalignment"))
3448  retval = get_verticalalignment ();
3449  else if (pname.compare ("xlim"))
3450  retval = get_xlim ();
3451  else if (pname.compare ("ylim"))
3452  retval = get_ylim ();
3453  else if (pname.compare ("zlim"))
3454  retval = get_zlim ();
3455  else if (pname.compare ("xliminclude"))
3456  retval = get_xliminclude ();
3457  else if (pname.compare ("yliminclude"))
3458  retval = get_yliminclude ();
3459  else if (pname.compare ("zliminclude"))
3460  retval = get_zliminclude ();
3461  else if (pname.compare ("positionmode"))
3462  retval = get_positionmode ();
3463  else if (pname.compare ("rotationmode"))
3464  retval = get_rotationmode ();
3465  else if (pname.compare ("horizontalalignmentmode"))
3466  retval = get_horizontalalignmentmode ();
3467  else if (pname.compare ("verticalalignmentmode"))
3468  retval = get_verticalalignmentmode ();
3469  else if (pname.compare ("autopos_tag"))
3470  retval = get_autopos_tag ();
3471  else if (pname.compare ("fontsize_points"))
3472  retval = get_fontsize_points ();
3473  else
3474  retval = base_properties::get (pname);
3475 
3476  return retval;
3477 }
3478 
3479 property
3481 {
3482  const std::set<std::string>& pnames = all_property_names ();
3483 
3484  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3485 
3486  if (error_state)
3487  return property ();
3488 
3489  if (pname.compare ("backgroundcolor"))
3490  return property (&backgroundcolor, true);
3491  else if (pname.compare ("color"))
3492  return property (&color, true);
3493  else if (pname.compare ("displayname"))
3494  return property (&displayname, true);
3495  else if (pname.compare ("edgecolor"))
3496  return property (&edgecolor, true);
3497  else if (pname.compare ("editing"))
3498  return property (&editing, true);
3499  else if (pname.compare ("erasemode"))
3500  return property (&erasemode, true);
3501  else if (pname.compare ("extent"))
3502  return property (&extent, true);
3503  else if (pname.compare ("fontangle"))
3504  return property (&fontangle, true);
3505  else if (pname.compare ("fontname"))
3506  return property (&fontname, true);
3507  else if (pname.compare ("fontsize"))
3508  return property (&fontsize, true);
3509  else if (pname.compare ("fontunits"))
3510  return property (&fontunits, true);
3511  else if (pname.compare ("fontweight"))
3512  return property (&fontweight, true);
3513  else if (pname.compare ("horizontalalignment"))
3514  return property (&horizontalalignment, true);
3515  else if (pname.compare ("interpreter"))
3516  return property (&interpreter, true);
3517  else if (pname.compare ("linestyle"))
3518  return property (&linestyle, true);
3519  else if (pname.compare ("linewidth"))
3520  return property (&linewidth, true);
3521  else if (pname.compare ("margin"))
3522  return property (&margin, true);
3523  else if (pname.compare ("position"))
3524  return property (&position, true);
3525  else if (pname.compare ("rotation"))
3526  return property (&rotation, true);
3527  else if (pname.compare ("string"))
3528  return property (&string, true);
3529  else if (pname.compare ("units"))
3530  return property (&units, true);
3531  else if (pname.compare ("verticalalignment"))
3532  return property (&verticalalignment, true);
3533  else if (pname.compare ("xlim"))
3534  return property (&xlim, true);
3535  else if (pname.compare ("ylim"))
3536  return property (&ylim, true);
3537  else if (pname.compare ("zlim"))
3538  return property (&zlim, true);
3539  else if (pname.compare ("xliminclude"))
3540  return property (&xliminclude, true);
3541  else if (pname.compare ("yliminclude"))
3542  return property (&yliminclude, true);
3543  else if (pname.compare ("zliminclude"))
3544  return property (&zliminclude, true);
3545  else if (pname.compare ("positionmode"))
3546  return property (&positionmode, true);
3547  else if (pname.compare ("rotationmode"))
3548  return property (&rotationmode, true);
3549  else if (pname.compare ("horizontalalignmentmode"))
3550  return property (&horizontalalignmentmode, true);
3551  else if (pname.compare ("verticalalignmentmode"))
3552  return property (&verticalalignmentmode, true);
3553  else if (pname.compare ("autopos_tag"))
3554  return property (&autopos_tag, true);
3555  else if (pname.compare ("fontsize_points"))
3556  return property (&fontsize_points, true);
3557  else
3558  return base_properties::get_property (pname);
3559 }
3560 
3563 {
3565 
3566  m["backgroundcolor"] = color_property (radio_values ("{none}"), color_values (1, 1, 1));
3567  m["color"] = color_values (0, 0, 0);
3568  m["displayname"] = "";
3569  m["edgecolor"] = color_property (radio_values ("{none}"), color_values (0, 0, 0));
3570  m["editing"] = "off";
3571  m["erasemode"] = "normal";
3572  m["extent"] = Matrix (1, 4, 0.0);
3573  m["fontangle"] = "normal";
3574  m["fontname"] = OCTAVE_DEFAULT_FONTNAME;
3575  m["fontsize"] = 10;
3576  m["fontunits"] = "points";
3577  m["fontweight"] = "normal";
3578  m["horizontalalignment"] = "left";
3579  m["interpreter"] = "tex";
3580  m["linestyle"] = "-";
3581  m["linewidth"] = 0.5;
3582  m["margin"] = 2;
3583  m["position"] = Matrix (1, 3, 0.0);
3584  m["rotation"] = 0;
3585  m["string"] = "";
3586  m["units"] = "data";
3587  m["verticalalignment"] = "middle";
3588  m["xlim"] = Matrix ();
3589  m["ylim"] = Matrix ();
3590  m["zlim"] = Matrix ();
3591  m["xliminclude"] = "off";
3592  m["yliminclude"] = "off";
3593  m["zliminclude"] = "off";
3594  m["positionmode"] = "auto";
3595  m["rotationmode"] = "auto";
3596  m["horizontalalignmentmode"] = "auto";
3597  m["verticalalignmentmode"] = "auto";
3598  m["autopos_tag"] = "none";
3599  m["fontsize_points"] = 0;
3600 
3601  return m;
3602 }
3603 
3604 std::string text::properties::go_name ("text");
3605 
3606 std::set<std::string>
3608 {
3609  static std::set<std::string> all_pnames;
3610 
3611  static bool initialized = false;
3612 
3613  if (! initialized)
3614  {
3615  all_pnames.insert ("backgroundcolor");
3616  all_pnames.insert ("color");
3617  all_pnames.insert ("displayname");
3618  all_pnames.insert ("edgecolor");
3619  all_pnames.insert ("editing");
3620  all_pnames.insert ("erasemode");
3621  all_pnames.insert ("extent");
3622  all_pnames.insert ("fontangle");
3623  all_pnames.insert ("fontname");
3624  all_pnames.insert ("fontsize");
3625  all_pnames.insert ("fontunits");
3626  all_pnames.insert ("fontweight");
3627  all_pnames.insert ("horizontalalignment");
3628  all_pnames.insert ("interpreter");
3629  all_pnames.insert ("linestyle");
3630  all_pnames.insert ("linewidth");
3631  all_pnames.insert ("margin");
3632  all_pnames.insert ("position");
3633  all_pnames.insert ("rotation");
3634  all_pnames.insert ("string");
3635  all_pnames.insert ("units");
3636  all_pnames.insert ("verticalalignment");
3637  all_pnames.insert ("xlim");
3638  all_pnames.insert ("ylim");
3639  all_pnames.insert ("zlim");
3640  all_pnames.insert ("xliminclude");
3641  all_pnames.insert ("yliminclude");
3642  all_pnames.insert ("zliminclude");
3643  all_pnames.insert ("positionmode");
3644  all_pnames.insert ("rotationmode");
3645  all_pnames.insert ("horizontalalignmentmode");
3646  all_pnames.insert ("verticalalignmentmode");
3647  all_pnames.insert ("autopos_tag");
3648  all_pnames.insert ("fontsize_points");
3649 
3650  std::set<std::string> base_pnames = base_properties::core_property_names ();
3651  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
3652 
3653  initialized = true;
3654  }
3655 
3656  return all_pnames;
3657 }
3658 
3659 bool
3661 {
3662  std::set<std::string> pnames = core_property_names ();
3663 
3664  return pnames.find (pname) != pnames.end ();
3665 }
3666 
3667 std::set<std::string>
3669 {
3670  static std::set<std::string> all_pnames;
3671 
3672  static bool initialized = false;
3673 
3674  if (! initialized)
3675  {
3676  all_pnames.insert ("extent");
3677  all_pnames.insert ("xlim");
3678  all_pnames.insert ("ylim");
3679  all_pnames.insert ("zlim");
3680  all_pnames.insert ("fontsize_points");
3681 
3682  std::set<std::string> base_pnames = base_properties::readonly_property_names ();
3683  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
3684 
3685  initialized = true;
3686  }
3687 
3688  return all_pnames;
3689 }
3690 
3691 bool
3693 {
3694  std::set<std::string> pnames = readonly_property_names ();
3695 
3696  return pnames.find (pname) != pnames.end ();
3697 }
3698 
3699 std::set<std::string>
3701 {
3702  static std::set<std::string> all_pnames = core_property_names ();
3703 
3704  std::set<std::string> retval = all_pnames;
3705  std::set<std::string> base_props = base_properties::all_property_names ();
3706  retval.insert (base_props.begin (), base_props.end ());
3707 
3708  return retval;
3709 }
3710 
3711 bool
3713 {
3714  std::set<std::string> pnames = all_property_names ();
3715 
3716  return pnames.find (pname) != pnames.end ();
3717 }
3718 
3719 // ******** image ********
3720 
3722  : base_properties (go_name, mh, p),
3723  alphadata ("alphadata", mh, Matrix (1, 1, 1.0)),
3724  alphadatamapping ("alphadatamapping", mh, "{none}|direct|scaled"),
3725  cdata ("cdata", mh, default_image_cdata ()),
3726  cdatamapping ("cdatamapping", mh, "scaled|{direct}"),
3727  displayname ("displayname", mh, ""),
3728  erasemode ("erasemode", mh, "{normal}|none|xor|background"),
3729  xdata ("xdata", mh, Matrix ()),
3730  ydata ("ydata", mh, Matrix ()),
3731  alim ("alim", mh, Matrix ()),
3732  clim ("clim", mh, Matrix ()),
3733  xlim ("xlim", mh, Matrix ()),
3734  ylim ("ylim", mh, Matrix ()),
3735  aliminclude ("aliminclude", mh, "on"),
3736  climinclude ("climinclude", mh, "on"),
3737  xliminclude ("xliminclude", mh, "on"),
3738  yliminclude ("yliminclude", mh, "on"),
3739  xdatamode ("xdatamode", mh, "{auto}|manual"),
3740  ydatamode ("ydatamode", mh, "{auto}|manual")
3741 {
3744  cdata.set_id (ID_CDATA);
3748  xdata.set_id (ID_XDATA);
3749  ydata.set_id (ID_YDATA);
3750  alim.set_id (ID_ALIM);
3751  alim.set_hidden (true);
3752  clim.set_id (ID_CLIM);
3753  clim.set_hidden (true);
3754  xlim.set_id (ID_XLIM);
3755  xlim.set_hidden (true);
3756  ylim.set_id (ID_YLIM);
3757  ylim.set_hidden (true);
3759  aliminclude.set_hidden (true);
3761  climinclude.set_hidden (true);
3763  xliminclude.set_hidden (true);
3765  yliminclude.set_hidden (true);
3767  xdatamode.set_hidden (true);
3769  ydatamode.set_hidden (true);
3770  init ();
3771 }
3772 
3773 void
3774 image::properties::set (const caseless_str& pname_arg, const octave_value& val)
3775 {
3776  const std::set<std::string>& pnames = all_property_names ();
3777 
3778  caseless_str pname = validate_property_name ("set", go_name, pnames, pname_arg);
3779 
3780  if (error_state)
3781  return;
3782  else if (has_readonly_property (pname))
3783  {
3784  error ("set: \"%s\" is read-only", pname.c_str ());
3785  return;
3786  }
3787 
3788  if (pname.compare ("alphadata"))
3789  set_alphadata (val);
3790  else if (pname.compare ("alphadatamapping"))
3791  set_alphadatamapping (val);
3792  else if (pname.compare ("cdata"))
3793  set_cdata (val);
3794  else if (pname.compare ("cdatamapping"))
3795  set_cdatamapping (val);
3796  else if (pname.compare ("displayname"))
3797  set_displayname (val);
3798  else if (pname.compare ("erasemode"))
3799  set_erasemode (val);
3800  else if (pname.compare ("xdata"))
3801  set_xdata (val);
3802  else if (pname.compare ("ydata"))
3803  set_ydata (val);
3804  else if (pname.compare ("aliminclude"))
3805  set_aliminclude (val);
3806  else if (pname.compare ("climinclude"))
3807  set_climinclude (val);
3808  else if (pname.compare ("xliminclude"))
3809  set_xliminclude (val);
3810  else if (pname.compare ("yliminclude"))
3811  set_yliminclude (val);
3812  else if (pname.compare ("xdatamode"))
3813  set_xdatamode (val);
3814  else if (pname.compare ("ydatamode"))
3815  set_ydatamode (val);
3816  else
3817  base_properties::set (pname, val);
3818 }
3819 
3821 image::properties::get (bool all) const
3822 {
3824 
3825  m.assign ("alphadata", octave_value (get_alphadata ()));
3826  m.assign ("alphadatamapping", octave_value (get_alphadatamapping ()));
3827  m.assign ("cdata", octave_value (get_cdata ()));
3828  m.assign ("cdatamapping", octave_value (get_cdatamapping ()));
3829  m.assign ("displayname", octave_value (get_displayname ()));
3830  m.assign ("erasemode", octave_value (get_erasemode ()));
3831  m.assign ("xdata", octave_value (get_xdata ()));
3832  m.assign ("ydata", octave_value (get_ydata ()));
3833  if (all)
3834  m.assign ("alim", octave_value (get_alim ()));
3835  if (all)
3836  m.assign ("clim", octave_value (get_clim ()));
3837  if (all)
3838  m.assign ("xlim", octave_value (get_xlim ()));
3839  if (all)
3840  m.assign ("ylim", octave_value (get_ylim ()));
3841  if (all)
3842  m.assign ("aliminclude", octave_value (get_aliminclude ()));
3843  if (all)
3844  m.assign ("climinclude", octave_value (get_climinclude ()));
3845  if (all)
3846  m.assign ("xliminclude", octave_value (get_xliminclude ()));
3847  if (all)
3848  m.assign ("yliminclude", octave_value (get_yliminclude ()));
3849  if (all)
3850  m.assign ("xdatamode", octave_value (get_xdatamode ()));
3851  if (all)
3852  m.assign ("ydatamode", octave_value (get_ydatamode ()));
3853 
3854  return m;
3855 }
3856 
3858 image::properties::get (const caseless_str& pname_arg) const
3859 {
3860  octave_value retval;
3861 
3862  const std::set<std::string>& pnames = all_property_names ();
3863 
3864  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3865 
3866  if (error_state)
3867  return retval;
3868 
3869  if (pname.compare ("alphadata"))
3870  retval = get_alphadata ();
3871  else if (pname.compare ("alphadatamapping"))
3872  retval = get_alphadatamapping ();
3873  else if (pname.compare ("cdata"))
3874  retval = get_cdata ();
3875  else if (pname.compare ("cdatamapping"))
3876  retval = get_cdatamapping ();
3877  else if (pname.compare ("displayname"))
3878  retval = get_displayname ();
3879  else if (pname.compare ("erasemode"))
3880  retval = get_erasemode ();
3881  else if (pname.compare ("xdata"))
3882  retval = get_xdata ();
3883  else if (pname.compare ("ydata"))
3884  retval = get_ydata ();
3885  else if (pname.compare ("alim"))
3886  retval = get_alim ();
3887  else if (pname.compare ("clim"))
3888  retval = get_clim ();
3889  else if (pname.compare ("xlim"))
3890  retval = get_xlim ();
3891  else if (pname.compare ("ylim"))
3892  retval = get_ylim ();
3893  else if (pname.compare ("aliminclude"))
3894  retval = get_aliminclude ();
3895  else if (pname.compare ("climinclude"))
3896  retval = get_climinclude ();
3897  else if (pname.compare ("xliminclude"))
3898  retval = get_xliminclude ();
3899  else if (pname.compare ("yliminclude"))
3900  retval = get_yliminclude ();
3901  else if (pname.compare ("xdatamode"))
3902  retval = get_xdatamode ();
3903  else if (pname.compare ("ydatamode"))
3904  retval = get_ydatamode ();
3905  else
3906  retval = base_properties::get (pname);
3907 
3908  return retval;
3909 }
3910 
3911 property
3913 {
3914  const std::set<std::string>& pnames = all_property_names ();
3915 
3916  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3917 
3918  if (error_state)
3919  return property ();
3920 
3921  if (pname.compare ("alphadata"))
3922  return property (&alphadata, true);
3923  else if (pname.compare ("alphadatamapping"))
3924  return property (&alphadatamapping, true);
3925  else if (pname.compare ("cdata"))
3926  return property (&cdata, true);
3927  else if (pname.compare ("cdatamapping"))
3928  return property (&cdatamapping, true);
3929  else if (pname.compare ("displayname"))
3930  return property (&displayname, true);
3931  else if (pname.compare ("erasemode"))
3932  return property (&erasemode, true);
3933  else if (pname.compare ("xdata"))
3934  return property (&xdata, true);
3935  else if (pname.compare ("ydata"))
3936  return property (&ydata, true);
3937  else if (pname.compare ("alim"))
3938  return property (&alim, true);
3939  else if (pname.compare ("clim"))
3940  return property (&clim, true);
3941  else if (pname.compare ("xlim"))
3942  return property (&xlim, true);
3943  else if (pname.compare ("ylim"))
3944  return property (&ylim, true);
3945  else if (pname.compare ("aliminclude"))
3946  return property (&aliminclude, true);
3947  else if (pname.compare ("climinclude"))
3948  return property (&climinclude, true);
3949  else if (pname.compare ("xliminclude"))
3950  return property (&xliminclude, true);
3951  else if (pname.compare ("yliminclude"))
3952  return property (&yliminclude, true);
3953  else if (pname.compare ("xdatamode"))
3954  return property (&xdatamode, true);
3955  else if (pname.compare ("ydatamode"))
3956  return property (&ydatamode, true);
3957  else
3958  return base_properties::get_property (pname);
3959 }
3960 
3963 {
3965 
3966  m["alphadata"] = Matrix (1, 1, 1.0);
3967  m["alphadatamapping"] = "none";
3968  m["cdata"] = default_image_cdata ();
3969  m["cdatamapping"] = "direct";
3970  m["displayname"] = "";
3971  m["erasemode"] = "normal";
3972  m["xdata"] = Matrix ();
3973  m["ydata"] = Matrix ();
3974  m["alim"] = Matrix ();
3975  m["clim"] = Matrix ();
3976  m["xlim"] = Matrix ();
3977  m["ylim"] = Matrix ();
3978  m["aliminclude"] = "on";
3979  m["climinclude"] = "on";
3980  m["xliminclude"] = "on";
3981  m["yliminclude"] = "on";
3982  m["xdatamode"] = "auto";
3983  m["ydatamode"] = "auto";
3984 
3985  return m;
3986 }
3987 
3988 std::string image::properties::go_name ("image");
3989 
3990 std::set<std::string>
3992 {
3993  static std::set<std::string> all_pnames;
3994 
3995  static bool initialized = false;
3996 
3997  if (! initialized)
3998  {
3999  all_pnames.insert ("alphadata");
4000  all_pnames.insert ("alphadatamapping");
4001  all_pnames.insert ("cdata");
4002  all_pnames.insert ("cdatamapping");
4003  all_pnames.insert ("displayname");
4004  all_pnames.insert ("erasemode");
4005  all_pnames.insert ("xdata");
4006  all_pnames.insert ("ydata");
4007  all_pnames.insert ("alim");
4008  all_pnames.insert ("clim");
4009  all_pnames.insert ("xlim");
4010  all_pnames.insert ("ylim");
4011  all_pnames.insert ("aliminclude");
4012  all_pnames.insert ("climinclude");
4013  all_pnames.insert ("xliminclude");
4014  all_pnames.insert ("yliminclude");
4015  all_pnames.insert ("xdatamode");
4016  all_pnames.insert ("ydatamode");
4017 
4018  std::set<std::string> base_pnames = base_properties::core_property_names ();
4019  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
4020 
4021  initialized = true;
4022  }
4023 
4024  return all_pnames;
4025 }
4026 
4027 bool
4029 {
4030  std::set<std::string> pnames = core_property_names ();
4031 
4032  return pnames.find (pname) != pnames.end ();
4033 }
4034 
4035 std::set<std::string>
4037 {
4038  static std::set<std::string> all_pnames;
4039 
4040  static bool initialized = false;
4041 
4042  if (! initialized)
4043  {
4044  all_pnames.insert ("alim");
4045  all_pnames.insert ("clim");
4046  all_pnames.insert ("xlim");
4047  all_pnames.insert ("ylim");
4048 
4049  std::set<std::string> base_pnames = base_properties::readonly_property_names ();
4050  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
4051 
4052  initialized = true;
4053  }
4054 
4055  return all_pnames;
4056 }
4057 
4058 bool
4060 {
4061  std::set<std::string> pnames = readonly_property_names ();
4062 
4063  return pnames.find (pname) != pnames.end ();
4064 }
4065 
4066 std::set<std::string>
4068 {
4069  static std::set<std::string> all_pnames = core_property_names ();
4070 
4071  std::set<std::string> retval = all_pnames;
4072  std::set<std::string> base_props = base_properties::all_property_names ();
4073  retval.insert (base_props.begin (), base_props.end ());
4074 
4075  return retval;
4076 }
4077 
4078 bool
4080 {
4081  std::set<std::string> pnames = all_property_names ();
4082 
4083  return pnames.find (pname) != pnames.end ();
4084 }
4085 
4086 // ******** patch ********
4087 
4089  : base_properties (go_name, mh, p),
4090  alphadatamapping ("alphadatamapping", mh, "none|{scaled}|direct"),
4091  ambientstrength ("ambientstrength", mh, 0.3),
4092  backfacelighting ("backfacelighting", mh, "unlit|lit|{reverselit}"),
4093  cdata ("cdata", mh, Matrix ()),
4094  cdatamapping ("cdatamapping", mh, "{scaled}|direct"),
4095  diffusestrength ("diffusestrength", mh, 0.6),
4096  displayname ("displayname", mh, ""),
4097  edgealpha ("edgealpha", mh, double_radio_property (1.0, radio_values ("flat|interp"))),
4098  edgecolor ("edgecolor", mh, color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"))),
4099  edgelighting ("edgelighting", mh, "{none}|flat|gouraud|phong"),
4100  erasemode ("erasemode", mh, "{normal}|background|xor|none"),
4101  facealpha ("facealpha", mh, double_radio_property (1.0, radio_values ("flat|interp"))),
4102  facecolor ("facecolor", mh, color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"))),
4103  facelighting ("facelighting", mh, "{none}|flat|gouraud|phong"),
4104  faces ("faces", mh, default_patch_faces ()),
4105  facevertexalphadata ("facevertexalphadata", mh, Matrix ()),
4106  facevertexcdata ("facevertexcdata", mh, Matrix ()),
4107  interpreter ("interpreter", mh, "{tex}|none|latex"),
4108  linestyle ("linestyle", mh, "{-}|--|:|-.|none"),
4109  linewidth ("linewidth", mh, 0.5),
4110  marker ("marker", mh, "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram"),
4111  markeredgecolor ("markeredgecolor", mh, color_property (radio_values ("none|{auto}|flat"), color_values (0, 0, 0))),
4112  markerfacecolor ("markerfacecolor", mh, color_property (radio_values ("{none}|auto|flat"), color_values (0, 0, 0))),
4113  markersize ("markersize", mh, 6),
4114  normalmode ("normalmode", mh, "{auto}|manual"),
4115  specularcolorreflectance ("specularcolorreflectance", mh, 1.0),
4116  specularexponent ("specularexponent", mh, 10.0),
4117  specularstrength ("specularstrength", mh, 0.9),
4118  vertexnormals ("vertexnormals", mh, Matrix ()),
4119  vertices ("vertices", mh, default_patch_vertices ()),
4120  xdata ("xdata", mh, default_patch_xdata ()),
4121  ydata ("ydata", mh, default_patch_ydata ()),
4122  zdata ("zdata", mh, Matrix ()),
4123  alim ("alim", mh, Matrix ()),
4124  clim ("clim", mh, Matrix ()),
4125  xlim ("xlim", mh, Matrix ()),
4126  ylim ("ylim", mh, Matrix ()),
4127  zlim ("zlim", mh, Matrix ()),
4128  aliminclude ("aliminclude", mh, "on"),
4129  climinclude ("climinclude", mh, "on"),
4130  xliminclude ("xliminclude", mh, "on"),
4131  yliminclude ("yliminclude", mh, "on"),
4132  zliminclude ("zliminclude", mh, "on")
4133 {
4137  cdata.set_id (ID_CDATA);
4148  faces.set_id (ID_FACES);
4164  xdata.set_id (ID_XDATA);
4165  ydata.set_id (ID_YDATA);
4166  zdata.set_id (ID_ZDATA);
4167  alim.set_id (ID_ALIM);
4168  alim.set_hidden (true);
4169  clim.set_id (ID_CLIM);
4170  clim.set_hidden (true);
4171  xlim.set_id (ID_XLIM);
4172  xlim.set_hidden (true);
4173  ylim.set_id (ID_YLIM);
4174  ylim.set_hidden (true);
4175  zlim.set_id (ID_ZLIM);
4176  zlim.set_hidden (true);
4178  aliminclude.set_hidden (true);
4180  climinclude.set_hidden (true);
4182  xliminclude.set_hidden (true);
4184  yliminclude.set_hidden (true);
4186  zliminclude.set_hidden (true);
4187  init ();
4188 }
4189 
4190 void
4191 patch::properties::set (const caseless_str& pname_arg, const octave_value& val)
4192 {
4193  const std::set<std::string>& pnames = all_property_names ();
4194 
4195  caseless_str pname = validate_property_name ("set", go_name, pnames, pname_arg);
4196 
4197  if (error_state)
4198  return;
4199  else if (has_readonly_property (pname))
4200  {
4201  error ("set: \"%s\" is read-only", pname.c_str ());
4202  return;
4203  }
4204 
4205  if (pname.compare ("alphadatamapping"))
4206  set_alphadatamapping (val);
4207  else if (pname.compare ("ambientstrength"))
4208  set_ambientstrength (val);
4209  else if (pname.compare ("backfacelighting"))
4210  set_backfacelighting (val);
4211  else if (pname.compare ("cdata"))
4212  set_cdata (val);
4213  else if (pname.compare ("cdatamapping"))
4214  set_cdatamapping (val);
4215  else if (pname.compare ("diffusestrength"))
4216  set_diffusestrength (val);
4217  else if (pname.compare ("displayname"))
4218  set_displayname (val);
4219  else if (pname.compare ("edgealpha"))
4220  set_edgealpha (val);
4221  else if (pname.compare ("edgecolor"))
4222  set_edgecolor (val);
4223  else if (pname.compare ("edgelighting"))
4224  set_edgelighting (val);
4225  else if (pname.compare ("erasemode"))
4226  set_erasemode (val);
4227  else if (pname.compare ("facealpha"))
4228  set_facealpha (val);
4229  else if (pname.compare ("facecolor"))
4230  set_facecolor (val);
4231  else if (pname.compare ("facelighting"))
4232  set_facelighting (val);
4233  else if (pname.compare ("faces"))
4234  set_faces (val);
4235  else if (pname.compare ("facevertexalphadata"))
4236  set_facevertexalphadata (val);
4237  else if (pname.compare ("facevertexcdata"))
4238  set_facevertexcdata (val);
4239  else if (pname.compare ("interpreter"))
4240  set_interpreter (val);
4241  else if (pname.compare ("linestyle"))
4242  set_linestyle (val);
4243  else if (pname.compare ("linewidth"))
4244  set_linewidth (val);
4245  else if (pname.compare ("marker"))
4246  set_marker (val);
4247  else if (pname.compare ("markeredgecolor"))
4248  set_markeredgecolor (val);
4249  else if (pname.compare ("markerfacecolor"))
4250  set_markerfacecolor (val);
4251  else if (pname.compare ("markersize"))
4252  set_markersize (val);
4253  else if (pname.compare ("normalmode"))
4254  set_normalmode (val);
4255  else if (pname.compare ("specularcolorreflectance"))
4256  set_specularcolorreflectance (val);
4257  else if (pname.compare ("specularexponent"))
4258  set_specularexponent (val);
4259  else if (pname.compare ("specularstrength"))
4260  set_specularstrength (val);
4261  else if (pname.compare ("vertexnormals"))
4262  set_vertexnormals (val);
4263  else if (pname.compare ("vertices"))
4264  set_vertices (val);
4265  else if (pname.compare ("xdata"))
4266  set_xdata (val);
4267  else if (pname.compare ("ydata"))
4268  set_ydata (val);
4269  else if (pname.compare ("zdata"))
4270  set_zdata (val);
4271  else if (pname.compare ("aliminclude"))
4272  set_aliminclude (val);
4273  else if (pname.compare ("climinclude"))
4274  set_climinclude (val);
4275  else if (pname.compare ("xliminclude"))
4276  set_xliminclude (val);
4277  else if (pname.compare ("yliminclude"))
4278  set_yliminclude (val);
4279  else if (pname.compare ("zliminclude"))
4280  set_zliminclude (val);
4281  else
4282  base_properties::set (pname, val);
4283 }
4284 
4286 patch::properties::get (bool all) const
4287 {
4289 
4290  m.assign ("alphadatamapping", octave_value (get_alphadatamapping ()));
4291  m.assign ("ambientstrength", octave_value (get_ambientstrength ()));
4292  m.assign ("backfacelighting", octave_value (get_backfacelighting ()));
4293  m.assign ("cdata", octave_value (get_cdata ()));
4294  m.assign ("cdatamapping", octave_value (get_cdatamapping ()));
4295  m.assign ("diffusestrength", octave_value (get_diffusestrength ()));
4296  m.assign ("displayname", octave_value (get_displayname ()));
4297  m.assign ("edgealpha", octave_value (get_edgealpha ()));
4298  m.assign ("edgecolor", octave_value (get_edgecolor ()));
4299  m.assign ("edgelighting", octave_value (get_edgelighting ()));
4300  m.assign ("erasemode", octave_value (get_erasemode ()));
4301  m.assign ("facealpha", octave_value (get_facealpha ()));
4302  m.assign ("facecolor", octave_value (get_facecolor ()));
4303  m.assign ("facelighting", octave_value (get_facelighting ()));
4304  m.assign ("faces", octave_value (get_faces ()));
4305  m.assign ("facevertexalphadata", octave_value (get_facevertexalphadata ()));
4306  m.assign ("facevertexcdata", octave_value (get_facevertexcdata ()));
4307  m.assign ("interpreter", octave_value (get_interpreter ()));
4308  m.assign ("linestyle", octave_value (get_linestyle ()));