GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
graphics-props.cc
Go to the documentation of this file.
1 // DO NOT EDIT! Generated automatically by genprops.awk.
2 
3 // ******** base ********
4 
5 base_properties::base_properties (const std::string& ty, const graphics_handle& mh, const graphics_handle& p)
6  : beingdeleted ("beingdeleted", mh, "off"),
7  busyaction ("busyaction", mh, "{queue}|cancel"),
8  buttondownfcn ("buttondownfcn", mh, Matrix ()),
9  children ("children", mh, Matrix ()),
10  clipping ("clipping", mh, "on"),
11  createfcn ("createfcn", mh, Matrix ()),
12  deletefcn ("deletefcn", mh, Matrix ()),
13  handlevisibility ("handlevisibility", mh, "{on}|callback|off"),
14  hittest ("hittest", mh, "on"),
15  interruptible ("interruptible", mh, "on"),
16  parent ("parent", mh, p),
17  selected ("selected", mh, "off"),
18  selectionhighlight ("selectionhighlight", mh, "on"),
19  tag ("tag", mh, ""),
20  type ("type", mh, ty),
21  uicontextmenu ("uicontextmenu", mh, graphics_handle ()),
22  userdata ("userdata", mh, Matrix ()),
23  visible ("visible", mh, "on"),
24  __modified__ ("__modified__", mh, "on"),
25  __myhandle__ (mh)
26 {
40  tag.set_id (ID_TAG);
46  init ();
47 }
48 
49 void
51 {
52  if (pname.compare ("beingdeleted"))
53  set_beingdeleted (val);
54  else if (pname.compare ("busyaction"))
55  set_busyaction (val);
56  else if (pname.compare ("buttondownfcn"))
57  set_buttondownfcn (val);
58  else if (pname.compare ("children"))
59  set_children (val);
60  else if (pname.compare ("clipping"))
61  set_clipping (val);
62  else if (pname.compare ("createfcn"))
63  set_createfcn (val);
64  else if (pname.compare ("deletefcn"))
65  set_deletefcn (val);
66  else if (pname.compare ("handlevisibility"))
68  else if (pname.compare ("hittest"))
69  set_hittest (val);
70  else if (pname.compare ("interruptible"))
71  set_interruptible (val);
72  else if (pname.compare ("parent"))
73  set_parent (val);
74  else if (pname.compare ("selected"))
75  set_selected (val);
76  else if (pname.compare ("selectionhighlight"))
78  else if (pname.compare ("tag"))
79  set_tag (val);
80  else if (pname.compare ("uicontextmenu"))
81  set_uicontextmenu (val);
82  else if (pname.compare ("userdata"))
83  set_userdata (val);
84  else if (pname.compare ("visible"))
85  set_visible (val);
86  else if (pname.compare ("__modified__"))
87  set___modified__ (val);
88  else
89  set_dynamic (pname, val);
90 }
91 
93 base_properties::get (bool all) const
94 {
95  octave_map m = get_dynamic (all).map_value ();
96 
97  m.assign ("beingdeleted", octave_value (get_beingdeleted ()));
98  m.assign ("busyaction", octave_value (get_busyaction ()));
99  m.assign ("buttondownfcn", octave_value (get_buttondownfcn ()));
100  m.assign ("children", octave_value (get_children ()));
101  m.assign ("clipping", octave_value (get_clipping ()));
102  m.assign ("createfcn", octave_value (get_createfcn ()));
103  m.assign ("deletefcn", octave_value (get_deletefcn ()));
104  m.assign ("handlevisibility", octave_value (get_handlevisibility ()));
105  m.assign ("hittest", octave_value (get_hittest ()));
106  m.assign ("interruptible", octave_value (get_interruptible ()));
107  m.assign ("parent", octave_value (get_parent ().as_octave_value ()));
108  m.assign ("selected", octave_value (get_selected ()));
109  m.assign ("selectionhighlight", octave_value (get_selectionhighlight ()));
110  m.assign ("tag", octave_value (get_tag ()));
111  m.assign ("type", octave_value (get_type ()));
112  m.assign ("uicontextmenu", octave_value (get_uicontextmenu ().as_octave_value ()));
113  m.assign ("userdata", octave_value (get_userdata ()));
114  m.assign ("visible", octave_value (get_visible ()));
115  m.assign ("__modified__", octave_value (get___modified__ ()));
116  if (all)
117  m.assign ("__myhandle__", octave_value (get___myhandle__ ().as_octave_value ()));
118 
119  return m;
120 }
121 
123 base_properties::get (const caseless_str& pname) const
124 {
125  octave_value retval;
126 
127  if (pname.compare ("beingdeleted"))
128  retval = get_beingdeleted ();
129  else if (pname.compare ("busyaction"))
130  retval = get_busyaction ();
131  else if (pname.compare ("buttondownfcn"))
132  retval = get_buttondownfcn ();
133  else if (pname.compare ("children"))
134  retval = get_children ();
135  else if (pname.compare ("clipping"))
136  retval = get_clipping ();
137  else if (pname.compare ("createfcn"))
138  retval = get_createfcn ();
139  else if (pname.compare ("deletefcn"))
140  retval = get_deletefcn ();
141  else if (pname.compare ("handlevisibility"))
142  retval = get_handlevisibility ();
143  else if (pname.compare ("hittest"))
144  retval = get_hittest ();
145  else if (pname.compare ("interruptible"))
146  retval = get_interruptible ();
147  else if (pname.compare ("parent"))
148  retval = get_parent ().as_octave_value ();
149  else if (pname.compare ("selected"))
150  retval = get_selected ();
151  else if (pname.compare ("selectionhighlight"))
152  retval = get_selectionhighlight ();
153  else if (pname.compare ("tag"))
154  retval = get_tag ();
155  else if (pname.compare ("type"))
156  retval = get_type ();
157  else if (pname.compare ("uicontextmenu"))
158  retval = get_uicontextmenu ().as_octave_value ();
159  else if (pname.compare ("userdata"))
160  retval = get_userdata ();
161  else if (pname.compare ("visible"))
162  retval = get_visible ();
163  else if (pname.compare ("__modified__"))
164  retval = get___modified__ ();
165  else if (pname.compare ("__myhandle__"))
166  retval = get___myhandle__ ().as_octave_value ();
167  else
168  retval = get_dynamic (pname);
169 
170  return retval;
171 }
172 
173 property
175 {
176  if (pname.compare ("beingdeleted"))
177  return property (&beingdeleted, true);
178  else if (pname.compare ("busyaction"))
179  return property (&busyaction, true);
180  else if (pname.compare ("buttondownfcn"))
181  return property (&buttondownfcn, true);
182  else if (pname.compare ("children"))
183  return property (&children, true);
184  else if (pname.compare ("clipping"))
185  return property (&clipping, true);
186  else if (pname.compare ("createfcn"))
187  return property (&createfcn, true);
188  else if (pname.compare ("deletefcn"))
189  return property (&deletefcn, true);
190  else if (pname.compare ("handlevisibility"))
191  return property (&handlevisibility, true);
192  else if (pname.compare ("hittest"))
193  return property (&hittest, true);
194  else if (pname.compare ("interruptible"))
195  return property (&interruptible, true);
196  else if (pname.compare ("parent"))
197  return property (&parent, true);
198  else if (pname.compare ("selected"))
199  return property (&selected, true);
200  else if (pname.compare ("selectionhighlight"))
201  return property (&selectionhighlight, true);
202  else if (pname.compare ("tag"))
203  return property (&tag, true);
204  else if (pname.compare ("type"))
205  return property (&type, true);
206  else if (pname.compare ("uicontextmenu"))
207  return property (&uicontextmenu, true);
208  else if (pname.compare ("userdata"))
209  return property (&userdata, true);
210  else if (pname.compare ("visible"))
211  return property (&visible, true);
212  else if (pname.compare ("__modified__"))
213  return property (&__modified__, true);
214  else
215  return get_property_dynamic (pname);
216 }
217 
220 {
222 
223  m["beingdeleted"] = "off";
224  m["busyaction"] = "queue";
225  m["buttondownfcn"] = Matrix ();
226  m["clipping"] = "on";
227  m["createfcn"] = Matrix ();
228  m["deletefcn"] = Matrix ();
229  m["handlevisibility"] = "on";
230  m["hittest"] = "on";
231  m["interruptible"] = "on";
232  m["selected"] = "off";
233  m["selectionhighlight"] = "on";
234  m["tag"] = "";
235  m["uicontextmenu"] = graphics_handle ().as_octave_value ();
236  m["userdata"] = Matrix ();
237  m["visible"] = "on";
238  m["__modified__"] = "on";
239 
240  return m;
241 }
242 
243 std::set<std::string>
245 {
246  static std::set<std::string> all_pnames;
247 
248  static bool initialized = false;
249 
250  if (! initialized)
251  {
252  all_pnames.insert ("beingdeleted");
253  all_pnames.insert ("busyaction");
254  all_pnames.insert ("buttondownfcn");
255  all_pnames.insert ("children");
256  all_pnames.insert ("clipping");
257  all_pnames.insert ("createfcn");
258  all_pnames.insert ("deletefcn");
259  all_pnames.insert ("handlevisibility");
260  all_pnames.insert ("hittest");
261  all_pnames.insert ("interruptible");
262  all_pnames.insert ("parent");
263  all_pnames.insert ("selected");
264  all_pnames.insert ("selectionhighlight");
265  all_pnames.insert ("tag");
266  all_pnames.insert ("type");
267  all_pnames.insert ("uicontextmenu");
268  all_pnames.insert ("userdata");
269  all_pnames.insert ("visible");
270  all_pnames.insert ("__modified__");
271  all_pnames.insert ("__myhandle__");
272 
273  initialized = true;
274  }
275 
276  return all_pnames;
277 }
278 
279 bool
281 {
282  std::set<std::string> pnames = core_property_names ();
283 
284  return pnames.find (pname) != pnames.end ();
285 }
286 
287 std::set<std::string>
289 {
290  static std::set<std::string> all_pnames = core_property_names ();
291 
292  std::set<std::string> retval = all_pnames;
293  std::set<std::string> dyn_props = dynamic_property_names ();
294  retval.insert (dyn_props.begin (), dyn_props.end ());
295  for (std::map<caseless_str, property, cmp_caseless_str>::const_iterator p = all_props.begin ();
296  p != all_props.end (); p++)
297  retval.insert (p->first);
298 
299  return retval;
300 }
301 
302 // ******** root_figure ********
303 
305  : base_properties (go_name, mh, p),
306  callbackobject ("callbackobject", mh, graphics_handle ()),
307  commandwindowsize ("commandwindowsize", mh, Matrix (1, 2, 0)),
308  currentfigure ("currentfigure", mh, graphics_handle ()),
309  diary ("diary", mh, "off"),
310  diaryfile ("diaryfile", mh, "diary"),
311  echo ("echo", mh, "off"),
312  errormessage ("errormessage", mh, ""),
313  fixedwidthfontname ("fixedwidthfontname", mh, "Courier"),
314  format ("format", mh, "+|bank|bit|hex|long|longe|longeng|longg|native-bit|native-hex|none|rational|{short}|shorte|shorteng|shortg"),
315  formatspacing ("formatspacing", mh, "compact|{loose}"),
316  language ("language", mh, "ascii"),
317  monitorpositions ("monitorpositions", mh, Matrix (1, 4, 0)),
318  pointerlocation ("pointerlocation", mh, Matrix (1, 2, 0)),
319  pointerwindow ("pointerwindow", mh, 0.0),
320  recursionlimit ("recursionlimit", mh, 256.0),
321  screendepth ("screendepth", mh, default_screendepth ()),
322  screenpixelsperinch ("screenpixelsperinch", mh, default_screenpixelsperinch ()),
323  screensize ("screensize", mh, default_screensize ()),
324  showhiddenhandles ("showhiddenhandles", mh, "off"),
325  units ("units", mh, "inches|centimeters|normalized|points|{pixels}")
326 {
332  echo.set_id (ID_ECHO);
347  init ();
348 }
349 
350 void
352 {
353  const std::set<std::string>& pnames = all_property_names ();
354 
355  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
356 
357  if (error_state)
358  return;
359 
360  if (pname.compare ("currentfigure"))
361  set_currentfigure (val);
362  else if (pname.compare ("diary"))
363  set_diary (val);
364  else if (pname.compare ("diaryfile"))
365  set_diaryfile (val);
366  else if (pname.compare ("echo"))
367  set_echo (val);
368  else if (pname.compare ("errormessage"))
369  set_errormessage (val);
370  else if (pname.compare ("fixedwidthfontname"))
371  set_fixedwidthfontname (val);
372  else if (pname.compare ("format"))
373  set_format (val);
374  else if (pname.compare ("formatspacing"))
375  set_formatspacing (val);
376  else if (pname.compare ("language"))
377  set_language (val);
378  else if (pname.compare ("monitorpositions"))
379  set_monitorpositions (val);
380  else if (pname.compare ("pointerlocation"))
381  set_pointerlocation (val);
382  else if (pname.compare ("recursionlimit"))
383  set_recursionlimit (val);
384  else if (pname.compare ("showhiddenhandles"))
385  set_showhiddenhandles (val);
386  else if (pname.compare ("units"))
387  set_units (val);
388  else
389  base_properties::set (pname, val);
390 }
391 
394 {
396 
397  m.assign ("callbackobject", octave_value (get_callbackobject ().as_octave_value ()));
398  m.assign ("commandwindowsize", octave_value (get_commandwindowsize ()));
399  m.assign ("currentfigure", octave_value (get_currentfigure ().as_octave_value ()));
400  m.assign ("diary", octave_value (get_diary ()));
401  m.assign ("diaryfile", octave_value (get_diaryfile ()));
402  m.assign ("echo", octave_value (get_echo ()));
403  m.assign ("errormessage", octave_value (get_errormessage ()));
404  m.assign ("fixedwidthfontname", octave_value (get_fixedwidthfontname ()));
405  m.assign ("format", octave_value (get_format ()));
406  m.assign ("formatspacing", octave_value (get_formatspacing ()));
407  m.assign ("language", octave_value (get_language ()));
408  m.assign ("monitorpositions", octave_value (get_monitorpositions ()));
409  m.assign ("pointerlocation", octave_value (get_pointerlocation ()));
410  m.assign ("pointerwindow", octave_value (get_pointerwindow ()));
411  m.assign ("recursionlimit", octave_value (get_recursionlimit ()));
412  m.assign ("screendepth", octave_value (get_screendepth ()));
413  m.assign ("screenpixelsperinch", octave_value (get_screenpixelsperinch ()));
414  m.assign ("screensize", octave_value (get_screensize ()));
415  m.assign ("showhiddenhandles", octave_value (get_showhiddenhandles ()));
416  m.assign ("units", octave_value (get_units ()));
417 
418  return m;
419 }
420 
423 {
424  octave_value retval;
425 
426  const std::set<std::string>& pnames = all_property_names ();
427 
428  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
429 
430  if (error_state)
431  return retval;
432 
433  if (pname.compare ("callbackobject"))
434  retval = get_callbackobject ().as_octave_value ();
435  else if (pname.compare ("commandwindowsize"))
436  retval = get_commandwindowsize ();
437  else if (pname.compare ("currentfigure"))
438  retval = get_currentfigure ().as_octave_value ();
439  else if (pname.compare ("diary"))
440  retval = get_diary ();
441  else if (pname.compare ("diaryfile"))
442  retval = get_diaryfile ();
443  else if (pname.compare ("echo"))
444  retval = get_echo ();
445  else if (pname.compare ("errormessage"))
446  retval = get_errormessage ();
447  else if (pname.compare ("fixedwidthfontname"))
448  retval = get_fixedwidthfontname ();
449  else if (pname.compare ("format"))
450  retval = get_format ();
451  else if (pname.compare ("formatspacing"))
452  retval = get_formatspacing ();
453  else if (pname.compare ("language"))
454  retval = get_language ();
455  else if (pname.compare ("monitorpositions"))
456  retval = get_monitorpositions ();
457  else if (pname.compare ("pointerlocation"))
458  retval = get_pointerlocation ();
459  else if (pname.compare ("pointerwindow"))
460  retval = get_pointerwindow ();
461  else if (pname.compare ("recursionlimit"))
462  retval = get_recursionlimit ();
463  else if (pname.compare ("screendepth"))
464  retval = get_screendepth ();
465  else if (pname.compare ("screenpixelsperinch"))
466  retval = get_screenpixelsperinch ();
467  else if (pname.compare ("screensize"))
468  retval = get_screensize ();
469  else if (pname.compare ("showhiddenhandles"))
470  retval = get_showhiddenhandles ();
471  else if (pname.compare ("units"))
472  retval = get_units ();
473  else
474  retval = base_properties::get (pname);
475 
476  return retval;
477 }
478 
479 property
481 {
482  const std::set<std::string>& pnames = all_property_names ();
483 
484  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
485 
486  if (error_state)
487  return property ();
488 
489  if (pname.compare ("callbackobject"))
490  return property (&callbackobject, true);
491  else if (pname.compare ("commandwindowsize"))
492  return property (&commandwindowsize, true);
493  else if (pname.compare ("currentfigure"))
494  return property (&currentfigure, true);
495  else if (pname.compare ("diary"))
496  return property (&diary, true);
497  else if (pname.compare ("diaryfile"))
498  return property (&diaryfile, true);
499  else if (pname.compare ("echo"))
500  return property (&echo, true);
501  else if (pname.compare ("errormessage"))
502  return property (&errormessage, true);
503  else if (pname.compare ("fixedwidthfontname"))
504  return property (&fixedwidthfontname, true);
505  else if (pname.compare ("format"))
506  return property (&format, true);
507  else if (pname.compare ("formatspacing"))
508  return property (&formatspacing, true);
509  else if (pname.compare ("language"))
510  return property (&language, true);
511  else if (pname.compare ("monitorpositions"))
512  return property (&monitorpositions, true);
513  else if (pname.compare ("pointerlocation"))
514  return property (&pointerlocation, true);
515  else if (pname.compare ("pointerwindow"))
516  return property (&pointerwindow, true);
517  else if (pname.compare ("recursionlimit"))
518  return property (&recursionlimit, true);
519  else if (pname.compare ("screendepth"))
520  return property (&screendepth, true);
521  else if (pname.compare ("screenpixelsperinch"))
522  return property (&screenpixelsperinch, true);
523  else if (pname.compare ("screensize"))
524  return property (&screensize, true);
525  else if (pname.compare ("showhiddenhandles"))
526  return property (&showhiddenhandles, true);
527  else if (pname.compare ("units"))
528  return property (&units, true);
529  else
530  return base_properties::get_property (pname);
531 }
532 
535 {
537 
538  m["callbackobject"] = graphics_handle ().as_octave_value ();
539  m["commandwindowsize"] = Matrix (1, 2, 0);
540  m["currentfigure"] = graphics_handle ().as_octave_value ();
541  m["diary"] = "off";
542  m["diaryfile"] = "diary";
543  m["echo"] = "off";
544  m["errormessage"] = "";
545  m["fixedwidthfontname"] = "Courier";
546  m["format"] = "short";
547  m["formatspacing"] = "loose";
548  m["language"] = "ascii";
549  m["monitorpositions"] = Matrix (1, 4, 0);
550  m["pointerlocation"] = Matrix (1, 2, 0);
551  m["pointerwindow"] = 0.0;
552  m["recursionlimit"] = 256.0;
553  m["screendepth"] = default_screendepth ();
554  m["screenpixelsperinch"] = default_screenpixelsperinch ();
555  m["screensize"] = default_screensize ();
556  m["showhiddenhandles"] = "off";
557  m["units"] = "pixels";
558 
559  return m;
560 }
561 
562 std::string root_figure::properties::go_name ("root");
563 
564 std::set<std::string>
566 {
567  static std::set<std::string> all_pnames;
568 
569  static bool initialized = false;
570 
571  if (! initialized)
572  {
573  all_pnames.insert ("callbackobject");
574  all_pnames.insert ("commandwindowsize");
575  all_pnames.insert ("currentfigure");
576  all_pnames.insert ("diary");
577  all_pnames.insert ("diaryfile");
578  all_pnames.insert ("echo");
579  all_pnames.insert ("errormessage");
580  all_pnames.insert ("fixedwidthfontname");
581  all_pnames.insert ("format");
582  all_pnames.insert ("formatspacing");
583  all_pnames.insert ("language");
584  all_pnames.insert ("monitorpositions");
585  all_pnames.insert ("pointerlocation");
586  all_pnames.insert ("pointerwindow");
587  all_pnames.insert ("recursionlimit");
588  all_pnames.insert ("screendepth");
589  all_pnames.insert ("screenpixelsperinch");
590  all_pnames.insert ("screensize");
591  all_pnames.insert ("showhiddenhandles");
592  all_pnames.insert ("units");
593 
594  std::set<std::string> base_pnames = base_properties::core_property_names ();
595  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
596 
597  initialized = true;
598  }
599 
600  return all_pnames;
601 }
602 
603 bool
605 {
606  std::set<std::string> pnames = core_property_names ();
607 
608  return pnames.find (pname) != pnames.end ();
609 }
610 
611 std::set<std::string>
613 {
614  static std::set<std::string> all_pnames = core_property_names ();
615 
616  std::set<std::string> retval = all_pnames;
617  std::set<std::string> base_props = base_properties::all_property_names ();
618  retval.insert (base_props.begin (), base_props.end ());
619 
620  return retval;
621 }
622 
623 bool
625 {
626  std::set<std::string> pnames = all_property_names ();
627 
628  return pnames.find (pname) != pnames.end ();
629 }
630 
631 // ******** figure ********
632 
634  : base_properties (go_name, mh, p),
635  alphamap ("alphamap", mh, Matrix (64, 1, 1)),
636  buttondownfcn ("buttondownfcn", mh, Matrix ()),
637  closerequestfcn ("closerequestfcn", mh, "closereq"),
638  color ("color", mh, color_property (color_values (1, 1, 1), radio_values ("none"))),
639  colormap ("colormap", mh, jet_colormap ()),
640  currentaxes ("currentaxes", mh, graphics_handle ()),
641  currentcharacter ("currentcharacter", mh, ""),
642  currentobject ("currentobject", mh, graphics_handle ()),
643  currentpoint ("currentpoint", mh, Matrix (2, 1, 0)),
644  dockcontrols ("dockcontrols", mh, "off"),
645  doublebuffer ("doublebuffer", mh, "on"),
646  filename ("filename", mh, ""),
647  integerhandle ("integerhandle", mh, "on"),
648  inverthardcopy ("inverthardcopy", mh, "off"),
649  keypressfcn ("keypressfcn", mh, Matrix ()),
650  keyreleasefcn ("keyreleasefcn", mh, Matrix ()),
651  menubar ("menubar", mh, "none|{figure}"),
652  mincolormap ("mincolormap", mh, 64),
653  name ("name", mh, ""),
654  nextplot ("nextplot", mh, "new|{add}|replacechildren|replace"),
655  numbertitle ("numbertitle", mh, "on"),
656  outerposition ("outerposition", mh, Matrix (1, 4, -1.0)),
657  paperorientation ("paperorientation", mh, "{portrait}|landscape|rotated"),
658  paperposition ("paperposition", mh, default_figure_paperposition ()),
659  paperpositionmode ("paperpositionmode", mh, "auto|{manual}"),
660  papersize ("papersize", mh, default_figure_papersize ()),
661  papertype ("papertype", mh, "{usletter}|uslegal|a0|a1|a2|a3|a4|a5|b0|b1|b2|b3|b4|b5|arch-a|arch-b|arch-c|arch-d|arch-e|a|b|c|d|e|tabloid|<custom>"),
662  paperunits ("paperunits", mh, "{inches}|centimeters|normalized|points"),
663  pointer ("pointer", mh, "crosshair|fullcrosshair|{arrow}|ibeam|watch|topl|topr|botl|botr|left|top|right|bottom|circle|cross|fleur|custom|hand"),
664  pointershapecdata ("pointershapecdata", mh, Matrix (16, 16, 0)),
665  pointershapehotspot ("pointershapehotspot", mh, Matrix (1, 2, 0)),
666  position ("position", mh, default_figure_position ()),
667  renderer ("renderer", mh, "{painters}|zbuffer|opengl|none"),
668  renderermode ("renderermode", mh, "{auto}|manual"),
669  resize ("resize", mh, "on"),
670  resizefcn ("resizefcn", mh, Matrix ()),
671  selectiontype ("selectiontype", mh, "{normal}|open|alt|extend"),
672  toolbar ("toolbar", mh, "none|{auto}|figure"),
673  units ("units", mh, "inches|centimeters|normalized|points|{pixels}|characters"),
674  windowbuttondownfcn ("windowbuttondownfcn", mh, Matrix ()),
675  windowbuttonmotionfcn ("windowbuttonmotionfcn", mh, Matrix ()),
676  windowbuttonupfcn ("windowbuttonupfcn", mh, Matrix ()),
677  windowkeypressfcn ("windowkeypressfcn", mh, Matrix ()),
678  windowkeyreleasefcn ("windowkeyreleasefcn", mh, Matrix ()),
679  windowscrollwheelfcn ("windowscrollwheelfcn", mh, Matrix ()),
680  windowstyle ("windowstyle", mh, "{normal}|modal|docked"),
681  wvisual ("wvisual", mh, ""),
682  wvisualmode ("wvisualmode", mh, "{auto}|manual"),
683  xdisplay ("xdisplay", mh, ""),
684  xvisual ("xvisual", mh, ""),
685  xvisualmode ("xvisualmode", mh, "{auto}|manual"),
686  __enhanced__ ("__enhanced__", mh, "on"),
687  __graphics_toolkit__ ("__graphics_toolkit__", mh, gtk_manager::default_toolkit ()),
688  __guidata__ ("__guidata__", mh, Matrix ()),
689  __plot_stream__ ("__plot_stream__", mh, Matrix ())
690 {
709  name.set_id (ID_NAME);
743  __enhanced__.set_hidden (true);
746  __guidata__.set_hidden (true);
749  init ();
750 }
751 
752 void
753 figure::properties::set (const caseless_str& pname_arg, const octave_value& val)
754 {
755  const std::set<std::string>& pnames = all_property_names ();
756 
757  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
758 
759  if (error_state)
760  return;
761 
762  if (pname.compare ("alphamap"))
763  set_alphamap (val);
764  else if (pname.compare ("buttondownfcn"))
765  set_buttondownfcn (val);
766  else if (pname.compare ("closerequestfcn"))
767  set_closerequestfcn (val);
768  else if (pname.compare ("color"))
769  set_color (val);
770  else if (pname.compare ("colormap"))
771  set_colormap (val);
772  else if (pname.compare ("currentaxes"))
773  set_currentaxes (val);
774  else if (pname.compare ("dockcontrols"))
775  set_dockcontrols (val);
776  else if (pname.compare ("doublebuffer"))
777  set_doublebuffer (val);
778  else if (pname.compare ("filename"))
779  set_filename (val);
780  else if (pname.compare ("integerhandle"))
781  set_integerhandle (val);
782  else if (pname.compare ("inverthardcopy"))
783  set_inverthardcopy (val);
784  else if (pname.compare ("keypressfcn"))
785  set_keypressfcn (val);
786  else if (pname.compare ("keyreleasefcn"))
787  set_keyreleasefcn (val);
788  else if (pname.compare ("menubar"))
789  set_menubar (val);
790  else if (pname.compare ("mincolormap"))
791  set_mincolormap (val);
792  else if (pname.compare ("name"))
793  set_name (val);
794  else if (pname.compare ("nextplot"))
795  set_nextplot (val);
796  else if (pname.compare ("numbertitle"))
797  set_numbertitle (val);
798  else if (pname.compare ("outerposition"))
799  set_outerposition (val);
800  else if (pname.compare ("paperorientation"))
801  set_paperorientation (val);
802  else if (pname.compare ("paperposition"))
803  set_paperposition (val);
804  else if (pname.compare ("paperpositionmode"))
805  set_paperpositionmode (val);
806  else if (pname.compare ("papersize"))
807  set_papersize (val);
808  else if (pname.compare ("papertype"))
809  set_papertype (val);
810  else if (pname.compare ("paperunits"))
811  set_paperunits (val);
812  else if (pname.compare ("pointer"))
813  set_pointer (val);
814  else if (pname.compare ("pointershapecdata"))
815  set_pointershapecdata (val);
816  else if (pname.compare ("pointershapehotspot"))
817  set_pointershapehotspot (val);
818  else if (pname.compare ("position"))
819  set_position (val);
820  else if (pname.compare ("renderer"))
821  set_renderer (val);
822  else if (pname.compare ("renderermode"))
823  set_renderermode (val);
824  else if (pname.compare ("resize"))
825  set_resize (val);
826  else if (pname.compare ("resizefcn"))
827  set_resizefcn (val);
828  else if (pname.compare ("selectiontype"))
829  set_selectiontype (val);
830  else if (pname.compare ("toolbar"))
831  set_toolbar (val);
832  else if (pname.compare ("units"))
833  set_units (val);
834  else if (pname.compare ("windowbuttondownfcn"))
835  set_windowbuttondownfcn (val);
836  else if (pname.compare ("windowbuttonmotionfcn"))
837  set_windowbuttonmotionfcn (val);
838  else if (pname.compare ("windowbuttonupfcn"))
839  set_windowbuttonupfcn (val);
840  else if (pname.compare ("windowkeypressfcn"))
841  set_windowkeypressfcn (val);
842  else if (pname.compare ("windowkeyreleasefcn"))
843  set_windowkeyreleasefcn (val);
844  else if (pname.compare ("windowscrollwheelfcn"))
845  set_windowscrollwheelfcn (val);
846  else if (pname.compare ("windowstyle"))
847  set_windowstyle (val);
848  else if (pname.compare ("wvisual"))
849  set_wvisual (val);
850  else if (pname.compare ("wvisualmode"))
851  set_wvisualmode (val);
852  else if (pname.compare ("xdisplay"))
853  set_xdisplay (val);
854  else if (pname.compare ("xvisual"))
855  set_xvisual (val);
856  else if (pname.compare ("xvisualmode"))
857  set_xvisualmode (val);
858  else if (pname.compare ("__enhanced__"))
859  set___enhanced__ (val);
860  else if (pname.compare ("__graphics_toolkit__"))
861  set___graphics_toolkit__ (val);
862  else if (pname.compare ("__guidata__"))
863  set___guidata__ (val);
864  else if (pname.compare ("__plot_stream__"))
865  set___plot_stream__ (val);
866  else
867  base_properties::set (pname, val);
868 }
869 
871 figure::properties::get (bool all) const
872 {
874 
875  m.assign ("alphamap", octave_value (get_alphamap ()));
876  m.assign ("buttondownfcn", octave_value (get_buttondownfcn ()));
877  m.assign ("closerequestfcn", octave_value (get_closerequestfcn ()));
878  m.assign ("color", octave_value (get_color ()));
879  m.assign ("colormap", octave_value (get_colormap ()));
880  m.assign ("currentaxes", octave_value (get_currentaxes ().as_octave_value ()));
881  m.assign ("currentcharacter", octave_value (get_currentcharacter ()));
882  m.assign ("currentobject", octave_value (get_currentobject ().as_octave_value ()));
883  m.assign ("currentpoint", octave_value (get_currentpoint ()));
884  m.assign ("dockcontrols", octave_value (get_dockcontrols ()));
885  m.assign ("doublebuffer", octave_value (get_doublebuffer ()));
886  m.assign ("filename", octave_value (get_filename ()));
887  m.assign ("integerhandle", octave_value (get_integerhandle ()));
888  m.assign ("inverthardcopy", octave_value (get_inverthardcopy ()));
889  m.assign ("keypressfcn", octave_value (get_keypressfcn ()));
890  m.assign ("keyreleasefcn", octave_value (get_keyreleasefcn ()));
891  m.assign ("menubar", octave_value (get_menubar ()));
892  m.assign ("mincolormap", octave_value (get_mincolormap ()));
893  m.assign ("name", octave_value (get_name ()));
894  m.assign ("nextplot", octave_value (get_nextplot ()));
895  m.assign ("numbertitle", octave_value (get_numbertitle ()));
896  m.assign ("outerposition", octave_value (get_outerposition ()));
897  m.assign ("paperorientation", octave_value (get_paperorientation ()));
898  m.assign ("paperposition", octave_value (get_paperposition ()));
899  m.assign ("paperpositionmode", octave_value (get_paperpositionmode ()));
900  m.assign ("papersize", octave_value (get_papersize ()));
901  m.assign ("papertype", octave_value (get_papertype ()));
902  m.assign ("paperunits", octave_value (get_paperunits ()));
903  m.assign ("pointer", octave_value (get_pointer ()));
904  m.assign ("pointershapecdata", octave_value (get_pointershapecdata ()));
905  m.assign ("pointershapehotspot", octave_value (get_pointershapehotspot ()));
906  m.assign ("position", octave_value (get_position ()));
907  m.assign ("renderer", octave_value (get_renderer ()));
908  m.assign ("renderermode", octave_value (get_renderermode ()));
909  m.assign ("resize", octave_value (get_resize ()));
910  m.assign ("resizefcn", octave_value (get_resizefcn ()));
911  m.assign ("selectiontype", octave_value (get_selectiontype ()));
912  m.assign ("toolbar", octave_value (get_toolbar ()));
913  m.assign ("units", octave_value (get_units ()));
914  m.assign ("windowbuttondownfcn", octave_value (get_windowbuttondownfcn ()));
915  m.assign ("windowbuttonmotionfcn", octave_value (get_windowbuttonmotionfcn ()));
916  m.assign ("windowbuttonupfcn", octave_value (get_windowbuttonupfcn ()));
917  m.assign ("windowkeypressfcn", octave_value (get_windowkeypressfcn ()));
918  m.assign ("windowkeyreleasefcn", octave_value (get_windowkeyreleasefcn ()));
919  m.assign ("windowscrollwheelfcn", octave_value (get_windowscrollwheelfcn ()));
920  m.assign ("windowstyle", octave_value (get_windowstyle ()));
921  m.assign ("wvisual", octave_value (get_wvisual ()));
922  m.assign ("wvisualmode", octave_value (get_wvisualmode ()));
923  m.assign ("xdisplay", octave_value (get_xdisplay ()));
924  m.assign ("xvisual", octave_value (get_xvisual ()));
925  m.assign ("xvisualmode", octave_value (get_xvisualmode ()));
926  if (all)
927  m.assign ("__enhanced__", octave_value (get___enhanced__ ()));
928  m.assign ("__graphics_toolkit__", octave_value (get___graphics_toolkit__ ()));
929  if (all)
930  m.assign ("__guidata__", octave_value (get___guidata__ ()));
931  if (all)
932  m.assign ("__plot_stream__", octave_value (get___plot_stream__ ()));
933 
934  return m;
935 }
936 
938 figure::properties::get (const caseless_str& pname_arg) const
939 {
940  octave_value retval;
941 
942  const std::set<std::string>& pnames = all_property_names ();
943 
944  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
945 
946  if (error_state)
947  return retval;
948 
949  if (pname.compare ("alphamap"))
950  retval = get_alphamap ();
951  else if (pname.compare ("buttondownfcn"))
952  retval = get_buttondownfcn ();
953  else if (pname.compare ("closerequestfcn"))
954  retval = get_closerequestfcn ();
955  else if (pname.compare ("color"))
956  retval = get_color ();
957  else if (pname.compare ("colormap"))
958  retval = get_colormap ();
959  else if (pname.compare ("currentaxes"))
960  retval = get_currentaxes ().as_octave_value ();
961  else if (pname.compare ("currentcharacter"))
962  retval = get_currentcharacter ();
963  else if (pname.compare ("currentobject"))
964  retval = get_currentobject ().as_octave_value ();
965  else if (pname.compare ("currentpoint"))
966  retval = get_currentpoint ();
967  else if (pname.compare ("dockcontrols"))
968  retval = get_dockcontrols ();
969  else if (pname.compare ("doublebuffer"))
970  retval = get_doublebuffer ();
971  else if (pname.compare ("filename"))
972  retval = get_filename ();
973  else if (pname.compare ("integerhandle"))
974  retval = get_integerhandle ();
975  else if (pname.compare ("inverthardcopy"))
976  retval = get_inverthardcopy ();
977  else if (pname.compare ("keypressfcn"))
978  retval = get_keypressfcn ();
979  else if (pname.compare ("keyreleasefcn"))
980  retval = get_keyreleasefcn ();
981  else if (pname.compare ("menubar"))
982  retval = get_menubar ();
983  else if (pname.compare ("mincolormap"))
984  retval = get_mincolormap ();
985  else if (pname.compare ("name"))
986  retval = get_name ();
987  else if (pname.compare ("nextplot"))
988  retval = get_nextplot ();
989  else if (pname.compare ("numbertitle"))
990  retval = get_numbertitle ();
991  else if (pname.compare ("outerposition"))
992  retval = get_outerposition ();
993  else if (pname.compare ("paperorientation"))
994  retval = get_paperorientation ();
995  else if (pname.compare ("paperposition"))
996  retval = get_paperposition ();
997  else if (pname.compare ("paperpositionmode"))
998  retval = get_paperpositionmode ();
999  else if (pname.compare ("papersize"))
1000  retval = get_papersize ();
1001  else if (pname.compare ("papertype"))
1002  retval = get_papertype ();
1003  else if (pname.compare ("paperunits"))
1004  retval = get_paperunits ();
1005  else if (pname.compare ("pointer"))
1006  retval = get_pointer ();
1007  else if (pname.compare ("pointershapecdata"))
1008  retval = get_pointershapecdata ();
1009  else if (pname.compare ("pointershapehotspot"))
1010  retval = get_pointershapehotspot ();
1011  else if (pname.compare ("position"))
1012  retval = get_position ();
1013  else if (pname.compare ("renderer"))
1014  retval = get_renderer ();
1015  else if (pname.compare ("renderermode"))
1016  retval = get_renderermode ();
1017  else if (pname.compare ("resize"))
1018  retval = get_resize ();
1019  else if (pname.compare ("resizefcn"))
1020  retval = get_resizefcn ();
1021  else if (pname.compare ("selectiontype"))
1022  retval = get_selectiontype ();
1023  else if (pname.compare ("toolbar"))
1024  retval = get_toolbar ();
1025  else if (pname.compare ("units"))
1026  retval = get_units ();
1027  else if (pname.compare ("windowbuttondownfcn"))
1028  retval = get_windowbuttondownfcn ();
1029  else if (pname.compare ("windowbuttonmotionfcn"))
1030  retval = get_windowbuttonmotionfcn ();
1031  else if (pname.compare ("windowbuttonupfcn"))
1032  retval = get_windowbuttonupfcn ();
1033  else if (pname.compare ("windowkeypressfcn"))
1034  retval = get_windowkeypressfcn ();
1035  else if (pname.compare ("windowkeyreleasefcn"))
1036  retval = get_windowkeyreleasefcn ();
1037  else if (pname.compare ("windowscrollwheelfcn"))
1038  retval = get_windowscrollwheelfcn ();
1039  else if (pname.compare ("windowstyle"))
1040  retval = get_windowstyle ();
1041  else if (pname.compare ("wvisual"))
1042  retval = get_wvisual ();
1043  else if (pname.compare ("wvisualmode"))
1044  retval = get_wvisualmode ();
1045  else if (pname.compare ("xdisplay"))
1046  retval = get_xdisplay ();
1047  else if (pname.compare ("xvisual"))
1048  retval = get_xvisual ();
1049  else if (pname.compare ("xvisualmode"))
1050  retval = get_xvisualmode ();
1051  else if (pname.compare ("__enhanced__"))
1052  retval = get___enhanced__ ();
1053  else if (pname.compare ("__graphics_toolkit__"))
1054  retval = get___graphics_toolkit__ ();
1055  else if (pname.compare ("__guidata__"))
1056  retval = get___guidata__ ();
1057  else if (pname.compare ("__plot_stream__"))
1058  retval = get___plot_stream__ ();
1059  else
1060  retval = base_properties::get (pname);
1061 
1062  return retval;
1063 }
1064 
1065 property
1067 {
1068  const std::set<std::string>& pnames = all_property_names ();
1069 
1070  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
1071 
1072  if (error_state)
1073  return property ();
1074 
1075  if (pname.compare ("alphamap"))
1076  return property (&alphamap, true);
1077  else if (pname.compare ("buttondownfcn"))
1078  return property (&buttondownfcn, true);
1079  else if (pname.compare ("closerequestfcn"))
1080  return property (&closerequestfcn, true);
1081  else if (pname.compare ("color"))
1082  return property (&color, true);
1083  else if (pname.compare ("colormap"))
1084  return property (&colormap, true);
1085  else if (pname.compare ("currentaxes"))
1086  return property (&currentaxes, true);
1087  else if (pname.compare ("currentcharacter"))
1088  return property (&currentcharacter, true);
1089  else if (pname.compare ("currentobject"))
1090  return property (&currentobject, true);
1091  else if (pname.compare ("currentpoint"))
1092  return property (&currentpoint, true);
1093  else if (pname.compare ("dockcontrols"))
1094  return property (&dockcontrols, true);
1095  else if (pname.compare ("doublebuffer"))
1096  return property (&doublebuffer, true);
1097  else if (pname.compare ("filename"))
1098  return property (&filename, true);
1099  else if (pname.compare ("integerhandle"))
1100  return property (&integerhandle, true);
1101  else if (pname.compare ("inverthardcopy"))
1102  return property (&inverthardcopy, true);
1103  else if (pname.compare ("keypressfcn"))
1104  return property (&keypressfcn, true);
1105  else if (pname.compare ("keyreleasefcn"))
1106  return property (&keyreleasefcn, true);
1107  else if (pname.compare ("menubar"))
1108  return property (&menubar, true);
1109  else if (pname.compare ("mincolormap"))
1110  return property (&mincolormap, true);
1111  else if (pname.compare ("name"))
1112  return property (&name, true);
1113  else if (pname.compare ("nextplot"))
1114  return property (&nextplot, true);
1115  else if (pname.compare ("numbertitle"))
1116  return property (&numbertitle, true);
1117  else if (pname.compare ("outerposition"))
1118  return property (&outerposition, true);
1119  else if (pname.compare ("paperorientation"))
1120  return property (&paperorientation, true);
1121  else if (pname.compare ("paperposition"))
1122  return property (&paperposition, true);
1123  else if (pname.compare ("paperpositionmode"))
1124  return property (&paperpositionmode, true);
1125  else if (pname.compare ("papersize"))
1126  return property (&papersize, true);
1127  else if (pname.compare ("papertype"))
1128  return property (&papertype, true);
1129  else if (pname.compare ("paperunits"))
1130  return property (&paperunits, true);
1131  else if (pname.compare ("pointer"))
1132  return property (&pointer, true);
1133  else if (pname.compare ("pointershapecdata"))
1134  return property (&pointershapecdata, true);
1135  else if (pname.compare ("pointershapehotspot"))
1136  return property (&pointershapehotspot, true);
1137  else if (pname.compare ("position"))
1138  return property (&position, true);
1139  else if (pname.compare ("renderer"))
1140  return property (&renderer, true);
1141  else if (pname.compare ("renderermode"))
1142  return property (&renderermode, true);
1143  else if (pname.compare ("resize"))
1144  return property (&resize, true);
1145  else if (pname.compare ("resizefcn"))
1146  return property (&resizefcn, true);
1147  else if (pname.compare ("selectiontype"))
1148  return property (&selectiontype, true);
1149  else if (pname.compare ("toolbar"))
1150  return property (&toolbar, true);
1151  else if (pname.compare ("units"))
1152  return property (&units, true);
1153  else if (pname.compare ("windowbuttondownfcn"))
1154  return property (&windowbuttondownfcn, true);
1155  else if (pname.compare ("windowbuttonmotionfcn"))
1156  return property (&windowbuttonmotionfcn, true);
1157  else if (pname.compare ("windowbuttonupfcn"))
1158  return property (&windowbuttonupfcn, true);
1159  else if (pname.compare ("windowkeypressfcn"))
1160  return property (&windowkeypressfcn, true);
1161  else if (pname.compare ("windowkeyreleasefcn"))
1162  return property (&windowkeyreleasefcn, true);
1163  else if (pname.compare ("windowscrollwheelfcn"))
1164  return property (&windowscrollwheelfcn, true);
1165  else if (pname.compare ("windowstyle"))
1166  return property (&windowstyle, true);
1167  else if (pname.compare ("wvisual"))
1168  return property (&wvisual, true);
1169  else if (pname.compare ("wvisualmode"))
1170  return property (&wvisualmode, true);
1171  else if (pname.compare ("xdisplay"))
1172  return property (&xdisplay, true);
1173  else if (pname.compare ("xvisual"))
1174  return property (&xvisual, true);
1175  else if (pname.compare ("xvisualmode"))
1176  return property (&xvisualmode, true);
1177  else if (pname.compare ("__enhanced__"))
1178  return property (&__enhanced__, true);
1179  else if (pname.compare ("__graphics_toolkit__"))
1180  return property (&__graphics_toolkit__, true);
1181  else if (pname.compare ("__guidata__"))
1182  return property (&__guidata__, true);
1183  else if (pname.compare ("__plot_stream__"))
1184  return property (&__plot_stream__, true);
1185  else
1186  return base_properties::get_property (pname);
1187 }
1188 
1191 {
1193 
1194  m["alphamap"] = Matrix (64, 1, 1);
1195  m["buttondownfcn"] = Matrix ();
1196  m["closerequestfcn"] = "closereq";
1197  m["color"] = color_property (color_values (1, 1, 1), radio_values ("none"));
1198  m["colormap"] = jet_colormap ();
1199  m["currentaxes"] = graphics_handle ().as_octave_value ();
1200  m["currentcharacter"] = "";
1201  m["currentobject"] = graphics_handle ().as_octave_value ();
1202  m["currentpoint"] = Matrix (2, 1, 0);
1203  m["dockcontrols"] = "off";
1204  m["doublebuffer"] = "on";
1205  m["filename"] = "";
1206  m["integerhandle"] = "on";
1207  m["inverthardcopy"] = "off";
1208  m["keypressfcn"] = Matrix ();
1209  m["keyreleasefcn"] = Matrix ();
1210  m["menubar"] = "figure";
1211  m["mincolormap"] = 64;
1212  m["name"] = "";
1213  m["nextplot"] = "add";
1214  m["numbertitle"] = "on";
1215  m["outerposition"] = Matrix (1, 4, -1.0);
1216  m["paperorientation"] = "portrait";
1217  m["paperposition"] = default_figure_paperposition ();
1218  m["paperpositionmode"] = "manual";
1219  m["papersize"] = default_figure_papersize ();
1220  m["papertype"] = "usletter";
1221  m["paperunits"] = "inches";
1222  m["pointer"] = "arrow";
1223  m["pointershapecdata"] = Matrix (16, 16, 0);
1224  m["pointershapehotspot"] = Matrix (1, 2, 0);
1225  m["position"] = default_figure_position ();
1226  m["renderer"] = "painters";
1227  m["renderermode"] = "auto";
1228  m["resize"] = "on";
1229  m["resizefcn"] = Matrix ();
1230  m["selectiontype"] = "normal";
1231  m["toolbar"] = "auto";
1232  m["units"] = "pixels";
1233  m["windowbuttondownfcn"] = Matrix ();
1234  m["windowbuttonmotionfcn"] = Matrix ();
1235  m["windowbuttonupfcn"] = Matrix ();
1236  m["windowkeypressfcn"] = Matrix ();
1237  m["windowkeyreleasefcn"] = Matrix ();
1238  m["windowscrollwheelfcn"] = Matrix ();
1239  m["windowstyle"] = "normal";
1240  m["wvisual"] = "";
1241  m["wvisualmode"] = "auto";
1242  m["xdisplay"] = "";
1243  m["xvisual"] = "";
1244  m["xvisualmode"] = "auto";
1245  m["__enhanced__"] = "on";
1246  m["__graphics_toolkit__"] = gtk_manager::default_toolkit ();
1247  m["__guidata__"] = Matrix ();
1248  m["__plot_stream__"] = Matrix ();
1249 
1250  return m;
1251 }
1252 
1253 std::string figure::properties::go_name ("figure");
1254 
1255 std::set<std::string>
1257 {
1258  static std::set<std::string> all_pnames;
1259 
1260  static bool initialized = false;
1261 
1262  if (! initialized)
1263  {
1264  all_pnames.insert ("alphamap");
1265  all_pnames.insert ("buttondownfcn");
1266  all_pnames.insert ("closerequestfcn");
1267  all_pnames.insert ("color");
1268  all_pnames.insert ("colormap");
1269  all_pnames.insert ("currentaxes");
1270  all_pnames.insert ("currentcharacter");
1271  all_pnames.insert ("currentobject");
1272  all_pnames.insert ("currentpoint");
1273  all_pnames.insert ("dockcontrols");
1274  all_pnames.insert ("doublebuffer");
1275  all_pnames.insert ("filename");
1276  all_pnames.insert ("integerhandle");
1277  all_pnames.insert ("inverthardcopy");
1278  all_pnames.insert ("keypressfcn");
1279  all_pnames.insert ("keyreleasefcn");
1280  all_pnames.insert ("menubar");
1281  all_pnames.insert ("mincolormap");
1282  all_pnames.insert ("name");
1283  all_pnames.insert ("nextplot");
1284  all_pnames.insert ("numbertitle");
1285  all_pnames.insert ("outerposition");
1286  all_pnames.insert ("paperorientation");
1287  all_pnames.insert ("paperposition");
1288  all_pnames.insert ("paperpositionmode");
1289  all_pnames.insert ("papersize");
1290  all_pnames.insert ("papertype");
1291  all_pnames.insert ("paperunits");
1292  all_pnames.insert ("pointer");
1293  all_pnames.insert ("pointershapecdata");
1294  all_pnames.insert ("pointershapehotspot");
1295  all_pnames.insert ("position");
1296  all_pnames.insert ("renderer");
1297  all_pnames.insert ("renderermode");
1298  all_pnames.insert ("resize");
1299  all_pnames.insert ("resizefcn");
1300  all_pnames.insert ("selectiontype");
1301  all_pnames.insert ("toolbar");
1302  all_pnames.insert ("units");
1303  all_pnames.insert ("windowbuttondownfcn");
1304  all_pnames.insert ("windowbuttonmotionfcn");
1305  all_pnames.insert ("windowbuttonupfcn");
1306  all_pnames.insert ("windowkeypressfcn");
1307  all_pnames.insert ("windowkeyreleasefcn");
1308  all_pnames.insert ("windowscrollwheelfcn");
1309  all_pnames.insert ("windowstyle");
1310  all_pnames.insert ("wvisual");
1311  all_pnames.insert ("wvisualmode");
1312  all_pnames.insert ("xdisplay");
1313  all_pnames.insert ("xvisual");
1314  all_pnames.insert ("xvisualmode");
1315  all_pnames.insert ("__enhanced__");
1316  all_pnames.insert ("__graphics_toolkit__");
1317  all_pnames.insert ("__guidata__");
1318  all_pnames.insert ("__plot_stream__");
1319 
1320  std::set<std::string> base_pnames = base_properties::core_property_names ();
1321  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
1322 
1323  initialized = true;
1324  }
1325 
1326  return all_pnames;
1327 }
1328 
1329 bool
1331 {
1332  std::set<std::string> pnames = core_property_names ();
1333 
1334  return pnames.find (pname) != pnames.end ();
1335 }
1336 
1337 std::set<std::string>
1339 {
1340  static std::set<std::string> all_pnames = core_property_names ();
1341 
1342  std::set<std::string> retval = all_pnames;
1343  std::set<std::string> base_props = base_properties::all_property_names ();
1344  retval.insert (base_props.begin (), base_props.end ());
1345 
1346  return retval;
1347 }
1348 
1349 bool
1351 {
1352  std::set<std::string> pnames = all_property_names ();
1353 
1354  return pnames.find (pname) != pnames.end ();
1355 }
1356 
1357 // ******** axes ********
1358 
1360  : base_properties (go_name, mh, p),
1361  activepositionproperty ("activepositionproperty", mh, "{outerposition}|position"),
1362  alim ("alim", mh, default_lim ()),
1363  alimmode ("alimmode", mh, "{auto}|manual"),
1364  ambientlightcolor ("ambientlightcolor", mh, color_values (1, 1, 1)),
1365  box ("box", mh, "on"),
1366  cameraposition ("cameraposition", mh, Matrix (1, 3, 0.0)),
1367  camerapositionmode ("camerapositionmode", mh, "{auto}|manual"),
1368  cameratarget ("cameratarget", mh, Matrix (1, 3, 0.0)),
1369  cameratargetmode ("cameratargetmode", mh, "{auto}|manual"),
1370  cameraupvector ("cameraupvector", mh, Matrix ()),
1371  cameraupvectormode ("cameraupvectormode", mh, "{auto}|manual"),
1372  cameraviewangle ("cameraviewangle", mh, 10.0),
1373  cameraviewanglemode ("cameraviewanglemode", mh, "{auto}|manual"),
1374  clim ("clim", mh, default_lim ()),
1375  climmode ("climmode", mh, "{auto}|manual"),
1376  color ("color", mh, color_property (color_values (1, 1, 1), radio_values ("none"))),
1377  colororder ("colororder", mh, default_colororder ()),
1378  currentpoint ("currentpoint", mh, Matrix (2, 3, 0.0)),
1379  dataaspectratio ("dataaspectratio", mh, Matrix (1, 3, 1.0)),
1380  dataaspectratiomode ("dataaspectratiomode", mh, "{auto}|manual"),
1381  drawmode ("drawmode", mh, "{normal}|fast"),
1382  fontangle ("fontangle", mh, "{normal}|italic|oblique"),
1383  fontname ("fontname", mh, OCTAVE_DEFAULT_FONTNAME),
1384  fontsize ("fontsize", mh, 10),
1385  fontunits ("fontunits", mh, "{points}|normalized|inches|centimeters|pixels"),
1386  fontweight ("fontweight", mh, "{normal}|light|demi|bold"),
1387  gridlinestyle ("gridlinestyle", mh, "-|--|{:}|-.|none"),
1388  interpreter ("interpreter", mh, "tex|{none}|latex"),
1389  layer ("layer", mh, "{bottom}|top"),
1390  linestyleorder ("linestyleorder", mh, "-"),
1391  linewidth ("linewidth", mh, 0.5),
1392  minorgridlinestyle ("minorgridlinestyle", mh, "-|--|{:}|-.|none"),
1393  nextplot ("nextplot", mh, "add|replacechildren|{replace}"),
1394  outerposition ("outerposition", mh, default_axes_outerposition ()),
1395  plotboxaspectratio ("plotboxaspectratio", mh, Matrix (1, 3, 1.0)),
1396  plotboxaspectratiomode ("plotboxaspectratiomode", mh, "{auto}|manual"),
1397  position ("position", mh, default_axes_position ()),
1398  projection ("projection", mh, "{orthographic}|perpective"),
1399  tickdir ("tickdir", mh, "{in}|out"),
1400  tickdirmode ("tickdirmode", mh, "{auto}|manual"),
1401  ticklength ("ticklength", mh, default_axes_ticklength ()),
1402  tightinset ("tightinset", mh, Matrix (1, 4, 0.0)),
1403  title ("title", mh, gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)),
1404  units ("units", mh, "{normalized}|inches|centimeters|points|pixels|characters"),
1405  view ("view", mh, Matrix ()),
1406  xaxislocation ("xaxislocation", mh, "{bottom}|top|zero"),
1407  xcolor ("xcolor", mh, color_values (0, 0, 0)),
1408  xdir ("xdir", mh, "{normal}|reverse"),
1409  xgrid ("xgrid", mh, "off"),
1410  xlabel ("xlabel", mh, gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)),
1411  xlim ("xlim", mh, default_lim ()),
1412  xlimmode ("xlimmode", mh, "{auto}|manual"),
1413  xminorgrid ("xminorgrid", mh, "off"),
1414  xminortick ("xminortick", mh, "off"),
1415  xscale ("xscale", mh, "{linear}|log"),
1416  xtick ("xtick", mh, default_axes_tick ()),
1417  xticklabel ("xticklabel", mh, ""),
1418  xticklabelmode ("xticklabelmode", mh, "{auto}|manual"),
1419  xtickmode ("xtickmode", mh, "{auto}|manual"),
1420  yaxislocation ("yaxislocation", mh, "{left}|right|zero"),
1421  ycolor ("ycolor", mh, color_values (0, 0, 0)),
1422  ydir ("ydir", mh, "{normal}|reverse"),
1423  ygrid ("ygrid", mh, "off"),
1424  ylabel ("ylabel", mh, gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)),
1425  ylim ("ylim", mh, default_lim ()),
1426  ylimmode ("ylimmode", mh, "{auto}|manual"),
1427  yminorgrid ("yminorgrid", mh, "off"),
1428  yminortick ("yminortick", mh, "off"),
1429  yscale ("yscale", mh, "{linear}|log"),
1430  ytick ("ytick", mh, default_axes_tick ()),
1431  yticklabel ("yticklabel", mh, ""),
1432  yticklabelmode ("yticklabelmode", mh, "{auto}|manual"),
1433  ytickmode ("ytickmode", mh, "{auto}|manual"),
1434  zcolor ("zcolor", mh, color_values (0, 0, 0)),
1435  zdir ("zdir", mh, "{normal}|reverse"),
1436  zgrid ("zgrid", mh, "off"),
1437  zlabel ("zlabel", mh, gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)),
1438  zlim ("zlim", mh, default_lim ()),
1439  zlimmode ("zlimmode", mh, "{auto}|manual"),
1440  zminorgrid ("zminorgrid", mh, "off"),
1441  zminortick ("zminortick", mh, "off"),
1442  zscale ("zscale", mh, "{linear}|log"),
1443  ztick ("ztick", mh, default_axes_tick ()),
1444  zticklabel ("zticklabel", mh, ""),
1445  zticklabelmode ("zticklabelmode", mh, "{auto}|manual"),
1446  ztickmode ("ztickmode", mh, "{auto}|manual"),
1447  __hold_all__ ("__hold_all__", mh, "off"),
1448  autopos_tag ("autopos_tag", mh, "{none}|subplot"),
1449  looseinset ("looseinset", mh, Matrix (1, 4, 0.0)),
1450  x_viewtransform ("x_viewtransform", mh, Matrix (4, 4, 0.0)),
1451  x_projectiontransform ("x_projectiontransform", mh, Matrix (4, 4, 0.0)),
1452  x_viewporttransform ("x_viewporttransform", mh, Matrix (4, 4, 0.0)),
1453  x_normrendertransform ("x_normrendertransform", mh, Matrix (4, 4, 0.0)),
1454  x_rendertransform ("x_rendertransform", mh, Matrix (4, 4, 0.0)),
1455  xmtick ("xmtick", mh, Matrix ()),
1456  ymtick ("ymtick", mh, Matrix ()),
1457  zmtick ("zmtick", mh, Matrix ())
1458 {
1460  alim.set_id (ID_ALIM);
1463  box.set_id (ID_BOX);
1472  clim.set_id (ID_CLIM);
1474  color.set_id (ID_COLOR);
1487  layer.set_id (ID_LAYER);
1501  title.set_id (ID_TITLE);
1502  units.set_id (ID_UNITS);
1503  view.set_id (ID_VIEW);
1506  xdir.set_id (ID_XDIR);
1507  xgrid.set_id (ID_XGRID);
1509  xlim.set_id (ID_XLIM);
1514  xtick.set_id (ID_XTICK);
1520  ydir.set_id (ID_YDIR);
1521  ygrid.set_id (ID_YGRID);
1523  ylim.set_id (ID_YLIM);
1528  ytick.set_id (ID_YTICK);
1533  zdir.set_id (ID_ZDIR);
1534  zgrid.set_id (ID_ZGRID);
1536  zlim.set_id (ID_ZLIM);
1541  ztick.set_id (ID_ZTICK);
1546  __hold_all__.set_hidden (true);
1548  autopos_tag.set_hidden (true);
1550  looseinset.set_hidden (true);
1552  x_viewtransform.set_hidden (true);
1562  xmtick.set_hidden (true);
1564  ymtick.set_hidden (true);
1566  zmtick.set_hidden (true);
1567  init ();
1568 }
1569 
1570 void
1571 axes::properties::set (const caseless_str& pname_arg, const octave_value& val)
1572 {
1573  const std::set<std::string>& pnames = all_property_names ();
1574 
1575  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
1576 
1577  if (error_state)
1578  return;
1579 
1580  if (pname.compare ("activepositionproperty"))
1581  set_activepositionproperty (val);
1582  else if (pname.compare ("alim"))
1583  set_alim (val);
1584  else if (pname.compare ("alimmode"))
1585  set_alimmode (val);
1586  else if (pname.compare ("ambientlightcolor"))
1587  set_ambientlightcolor (val);
1588  else if (pname.compare ("box"))
1589  set_box (val);
1590  else if (pname.compare ("cameraposition"))
1591  set_cameraposition (val);
1592  else if (pname.compare ("camerapositionmode"))
1593  set_camerapositionmode (val);
1594  else if (pname.compare ("cameratarget"))
1595  set_cameratarget (val);
1596  else if (pname.compare ("cameratargetmode"))
1597  set_cameratargetmode (val);
1598  else if (pname.compare ("cameraupvector"))
1599  set_cameraupvector (val);
1600  else if (pname.compare ("cameraupvectormode"))
1601  set_cameraupvectormode (val);
1602  else if (pname.compare ("cameraviewangle"))
1603  set_cameraviewangle (val);
1604  else if (pname.compare ("cameraviewanglemode"))
1605  set_cameraviewanglemode (val);
1606  else if (pname.compare ("clim"))
1607  set_clim (val);
1608  else if (pname.compare ("climmode"))
1609  set_climmode (val);
1610  else if (pname.compare ("color"))
1611  set_color (val);
1612  else if (pname.compare ("colororder"))
1613  set_colororder (val);
1614  else if (pname.compare ("currentpoint"))
1615  set_currentpoint (val);
1616  else if (pname.compare ("dataaspectratio"))
1617  set_dataaspectratio (val);
1618  else if (pname.compare ("dataaspectratiomode"))
1619  set_dataaspectratiomode (val);
1620  else if (pname.compare ("drawmode"))
1621  set_drawmode (val);
1622  else if (pname.compare ("fontangle"))
1623  set_fontangle (val);
1624  else if (pname.compare ("fontname"))
1625  set_fontname (val);
1626  else if (pname.compare ("fontsize"))
1627  set_fontsize (val);
1628  else if (pname.compare ("fontunits"))
1629  set_fontunits (val);
1630  else if (pname.compare ("fontweight"))
1631  set_fontweight (val);
1632  else if (pname.compare ("gridlinestyle"))
1633  set_gridlinestyle (val);
1634  else if (pname.compare ("interpreter"))
1635  set_interpreter (val);
1636  else if (pname.compare ("layer"))
1637  set_layer (val);
1638  else if (pname.compare ("linestyleorder"))
1639  set_linestyleorder (val);
1640  else if (pname.compare ("linewidth"))
1641  set_linewidth (val);
1642  else if (pname.compare ("minorgridlinestyle"))
1643  set_minorgridlinestyle (val);
1644  else if (pname.compare ("nextplot"))
1645  set_nextplot (val);
1646  else if (pname.compare ("outerposition"))
1647  set_outerposition (val);
1648  else if (pname.compare ("plotboxaspectratio"))
1649  set_plotboxaspectratio (val);
1650  else if (pname.compare ("plotboxaspectratiomode"))
1651  set_plotboxaspectratiomode (val);
1652  else if (pname.compare ("position"))
1653  set_position (val);
1654  else if (pname.compare ("projection"))
1655  set_projection (val);
1656  else if (pname.compare ("tickdir"))
1657  set_tickdir (val);
1658  else if (pname.compare ("tickdirmode"))
1659  set_tickdirmode (val);
1660  else if (pname.compare ("ticklength"))
1661  set_ticklength (val);
1662  else if (pname.compare ("title"))
1663  set_title (val);
1664  else if (pname.compare ("units"))
1665  set_units (val);
1666  else if (pname.compare ("view"))
1667  set_view (val);
1668  else if (pname.compare ("xaxislocation"))
1669  set_xaxislocation (val);
1670  else if (pname.compare ("xcolor"))
1671  set_xcolor (val);
1672  else if (pname.compare ("xdir"))
1673  set_xdir (val);
1674  else if (pname.compare ("xgrid"))
1675  set_xgrid (val);
1676  else if (pname.compare ("xlabel"))
1677  set_xlabel (val);
1678  else if (pname.compare ("xlim"))
1679  set_xlim (val);
1680  else if (pname.compare ("xlimmode"))
1681  set_xlimmode (val);
1682  else if (pname.compare ("xminorgrid"))
1683  set_xminorgrid (val);
1684  else if (pname.compare ("xminortick"))
1685  set_xminortick (val);
1686  else if (pname.compare ("xscale"))
1687  set_xscale (val);
1688  else if (pname.compare ("xtick"))
1689  set_xtick (val);
1690  else if (pname.compare ("xticklabel"))
1691  set_xticklabel (val);
1692  else if (pname.compare ("xticklabelmode"))
1693  set_xticklabelmode (val);
1694  else if (pname.compare ("xtickmode"))
1695  set_xtickmode (val);
1696  else if (pname.compare ("yaxislocation"))
1697  set_yaxislocation (val);
1698  else if (pname.compare ("ycolor"))
1699  set_ycolor (val);
1700  else if (pname.compare ("ydir"))
1701  set_ydir (val);
1702  else if (pname.compare ("ygrid"))
1703  set_ygrid (val);
1704  else if (pname.compare ("ylabel"))
1705  set_ylabel (val);
1706  else if (pname.compare ("ylim"))
1707  set_ylim (val);
1708  else if (pname.compare ("ylimmode"))
1709  set_ylimmode (val);
1710  else if (pname.compare ("yminorgrid"))
1711  set_yminorgrid (val);
1712  else if (pname.compare ("yminortick"))
1713  set_yminortick (val);
1714  else if (pname.compare ("yscale"))
1715  set_yscale (val);
1716  else if (pname.compare ("ytick"))
1717  set_ytick (val);
1718  else if (pname.compare ("yticklabel"))
1719  set_yticklabel (val);
1720  else if (pname.compare ("yticklabelmode"))
1721  set_yticklabelmode (val);
1722  else if (pname.compare ("ytickmode"))
1723  set_ytickmode (val);
1724  else if (pname.compare ("zcolor"))
1725  set_zcolor (val);
1726  else if (pname.compare ("zdir"))
1727  set_zdir (val);
1728  else if (pname.compare ("zgrid"))
1729  set_zgrid (val);
1730  else if (pname.compare ("zlabel"))
1731  set_zlabel (val);
1732  else if (pname.compare ("zlim"))
1733  set_zlim (val);
1734  else if (pname.compare ("zlimmode"))
1735  set_zlimmode (val);
1736  else if (pname.compare ("zminorgrid"))
1737  set_zminorgrid (val);
1738  else if (pname.compare ("zminortick"))
1739  set_zminortick (val);
1740  else if (pname.compare ("zscale"))
1741  set_zscale (val);
1742  else if (pname.compare ("ztick"))
1743  set_ztick (val);
1744  else if (pname.compare ("zticklabel"))
1745  set_zticklabel (val);
1746  else if (pname.compare ("zticklabelmode"))
1747  set_zticklabelmode (val);
1748  else if (pname.compare ("ztickmode"))
1749  set_ztickmode (val);
1750  else if (pname.compare ("__hold_all__"))
1751  set___hold_all__ (val);
1752  else if (pname.compare ("autopos_tag"))
1753  set_autopos_tag (val);
1754  else if (pname.compare ("looseinset"))
1755  set_looseinset (val);
1756  else if (pname.compare ("x_viewtransform"))
1757  set_x_viewtransform (val);
1758  else if (pname.compare ("x_projectiontransform"))
1759  set_x_projectiontransform (val);
1760  else if (pname.compare ("x_viewporttransform"))
1761  set_x_viewporttransform (val);
1762  else if (pname.compare ("x_normrendertransform"))
1763  set_x_normrendertransform (val);
1764  else if (pname.compare ("x_rendertransform"))
1765  set_x_rendertransform (val);
1766  else if (pname.compare ("xmtick"))
1767  set_xmtick (val);
1768  else if (pname.compare ("ymtick"))
1769  set_ymtick (val);
1770  else if (pname.compare ("zmtick"))
1771  set_zmtick (val);
1772  else
1773  base_properties::set (pname, val);
1774 }
1775 
1777 axes::properties::get (bool all) const
1778 {
1780 
1781  m.assign ("activepositionproperty", octave_value (get_activepositionproperty ()));
1782  m.assign ("alim", octave_value (get_alim ()));
1783  m.assign ("alimmode", octave_value (get_alimmode ()));
1784  m.assign ("ambientlightcolor", octave_value (get_ambientlightcolor ()));
1785  m.assign ("box", octave_value (get_box ()));
1786  m.assign ("cameraposition", octave_value (get_cameraposition ()));
1787  m.assign ("camerapositionmode", octave_value (get_camerapositionmode ()));
1788  m.assign ("cameratarget", octave_value (get_cameratarget ()));
1789  m.assign ("cameratargetmode", octave_value (get_cameratargetmode ()));
1790  m.assign ("cameraupvector", octave_value (get_cameraupvector ()));
1791  m.assign ("cameraupvectormode", octave_value (get_cameraupvectormode ()));
1792  m.assign ("cameraviewangle", octave_value (get_cameraviewangle ()));
1793  m.assign ("cameraviewanglemode", octave_value (get_cameraviewanglemode ()));
1794  m.assign ("clim", octave_value (get_clim ()));
1795  m.assign ("climmode", octave_value (get_climmode ()));
1796  m.assign ("color", octave_value (get_color ()));
1797  m.assign ("colororder", octave_value (get_colororder ()));
1798  m.assign ("currentpoint", octave_value (get_currentpoint ()));
1799  m.assign ("dataaspectratio", octave_value (get_dataaspectratio ()));
1800  m.assign ("dataaspectratiomode", octave_value (get_dataaspectratiomode ()));
1801  m.assign ("drawmode", octave_value (get_drawmode ()));
1802  m.assign ("fontangle", octave_value (get_fontangle ()));
1803  m.assign ("fontname", octave_value (get_fontname ()));
1804  m.assign ("fontsize", octave_value (get_fontsize ()));
1805  m.assign ("fontunits", octave_value (get_fontunits ()));
1806  m.assign ("fontweight", octave_value (get_fontweight ()));
1807  m.assign ("gridlinestyle", octave_value (get_gridlinestyle ()));
1808  m.assign ("interpreter", octave_value (get_interpreter ()));
1809  m.assign ("layer", octave_value (get_layer ()));
1810  m.assign ("linestyleorder", octave_value (get_linestyleorder ()));
1811  m.assign ("linewidth", octave_value (get_linewidth ()));
1812  m.assign ("minorgridlinestyle", octave_value (get_minorgridlinestyle ()));
1813  m.assign ("nextplot", octave_value (get_nextplot ()));
1814  m.assign ("outerposition", octave_value (get_outerposition ()));
1815  m.assign ("plotboxaspectratio", octave_value (get_plotboxaspectratio ()));
1816  m.assign ("plotboxaspectratiomode", octave_value (get_plotboxaspectratiomode ()));
1817  m.assign ("position", octave_value (get_position ()));
1818  m.assign ("projection", octave_value (get_projection ()));
1819  m.assign ("tickdir", octave_value (get_tickdir ()));
1820  m.assign ("tickdirmode", octave_value (get_tickdirmode ()));
1821  m.assign ("ticklength", octave_value (get_ticklength ()));
1822  m.assign ("tightinset", octave_value (get_tightinset ()));
1823  m.assign ("title", octave_value (get_title ().as_octave_value ()));
1824  m.assign ("units", octave_value (get_units ()));
1825  m.assign ("view", octave_value (get_view ()));
1826  m.assign ("xaxislocation", octave_value (get_xaxislocation ()));
1827  m.assign ("xcolor", octave_value (get_xcolor ()));
1828  m.assign ("xdir", octave_value (get_xdir ()));
1829  m.assign ("xgrid", octave_value (get_xgrid ()));
1830  m.assign ("xlabel", octave_value (get_xlabel ().as_octave_value ()));
1831  m.assign ("xlim", octave_value (get_xlim ()));
1832  m.assign ("xlimmode", octave_value (get_xlimmode ()));
1833  m.assign ("xminorgrid", octave_value (get_xminorgrid ()));
1834  m.assign ("xminortick", octave_value (get_xminortick ()));
1835  m.assign ("xscale", octave_value (get_xscale ()));
1836  m.assign ("xtick", octave_value (get_xtick ()));
1837  m.assign ("xticklabel", octave_value (get_xticklabel ()));
1838  m.assign ("xticklabelmode", octave_value (get_xticklabelmode ()));
1839  m.assign ("xtickmode", octave_value (get_xtickmode ()));
1840  m.assign ("yaxislocation", octave_value (get_yaxislocation ()));
1841  m.assign ("ycolor", octave_value (get_ycolor ()));
1842  m.assign ("ydir", octave_value (get_ydir ()));
1843  m.assign ("ygrid", octave_value (get_ygrid ()));
1844  m.assign ("ylabel", octave_value (get_ylabel ().as_octave_value ()));
1845  m.assign ("ylim", octave_value (get_ylim ()));
1846  m.assign ("ylimmode", octave_value (get_ylimmode ()));
1847  m.assign ("yminorgrid", octave_value (get_yminorgrid ()));
1848  m.assign ("yminortick", octave_value (get_yminortick ()));
1849  m.assign ("yscale", octave_value (get_yscale ()));
1850  m.assign ("ytick", octave_value (get_ytick ()));
1851  m.assign ("yticklabel", octave_value (get_yticklabel ()));
1852  m.assign ("yticklabelmode", octave_value (get_yticklabelmode ()));
1853  m.assign ("ytickmode", octave_value (get_ytickmode ()));
1854  m.assign ("zcolor", octave_value (get_zcolor ()));
1855  m.assign ("zdir", octave_value (get_zdir ()));
1856  m.assign ("zgrid", octave_value (get_zgrid ()));
1857  m.assign ("zlabel", octave_value (get_zlabel ().as_octave_value ()));
1858  m.assign ("zlim", octave_value (get_zlim ()));
1859  m.assign ("zlimmode", octave_value (get_zlimmode ()));
1860  m.assign ("zminorgrid", octave_value (get_zminorgrid ()));
1861  m.assign ("zminortick", octave_value (get_zminortick ()));
1862  m.assign ("zscale", octave_value (get_zscale ()));
1863  m.assign ("ztick", octave_value (get_ztick ()));
1864  m.assign ("zticklabel", octave_value (get_zticklabel ()));
1865  m.assign ("zticklabelmode", octave_value (get_zticklabelmode ()));
1866  m.assign ("ztickmode", octave_value (get_ztickmode ()));
1867  if (all)
1868  m.assign ("__hold_all__", octave_value (get___hold_all__ ()));
1869  if (all)
1870  m.assign ("autopos_tag", octave_value (get_autopos_tag ()));
1871  if (all)
1872  m.assign ("looseinset", octave_value (get_looseinset ()));
1873  if (all)
1874  m.assign ("x_viewtransform", octave_value (get_x_viewtransform ()));
1875  if (all)
1876  m.assign ("x_projectiontransform", octave_value (get_x_projectiontransform ()));
1877  if (all)
1878  m.assign ("x_viewporttransform", octave_value (get_x_viewporttransform ()));
1879  if (all)
1880  m.assign ("x_normrendertransform", octave_value (get_x_normrendertransform ()));
1881  if (all)
1882  m.assign ("x_rendertransform", octave_value (get_x_rendertransform ()));
1883  if (all)
1884  m.assign ("xmtick", octave_value (get_xmtick ()));
1885  if (all)
1886  m.assign ("ymtick", octave_value (get_ymtick ()));
1887  if (all)
1888  m.assign ("zmtick", octave_value (get_zmtick ()));
1889 
1890  return m;
1891 }
1892 
1894 axes::properties::get (const caseless_str& pname_arg) const
1895 {
1896  octave_value retval;
1897 
1898  const std::set<std::string>& pnames = all_property_names ();
1899 
1900  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
1901 
1902  if (error_state)
1903  return retval;
1904 
1905  if (pname.compare ("activepositionproperty"))
1906  retval = get_activepositionproperty ();
1907  else if (pname.compare ("alim"))
1908  retval = get_alim ();
1909  else if (pname.compare ("alimmode"))
1910  retval = get_alimmode ();
1911  else if (pname.compare ("ambientlightcolor"))
1912  retval = get_ambientlightcolor ();
1913  else if (pname.compare ("box"))
1914  retval = get_box ();
1915  else if (pname.compare ("cameraposition"))
1916  retval = get_cameraposition ();
1917  else if (pname.compare ("camerapositionmode"))
1918  retval = get_camerapositionmode ();
1919  else if (pname.compare ("cameratarget"))
1920  retval = get_cameratarget ();
1921  else if (pname.compare ("cameratargetmode"))
1922  retval = get_cameratargetmode ();
1923  else if (pname.compare ("cameraupvector"))
1924  retval = get_cameraupvector ();
1925  else if (pname.compare ("cameraupvectormode"))
1926  retval = get_cameraupvectormode ();
1927  else if (pname.compare ("cameraviewangle"))
1928  retval = get_cameraviewangle ();
1929  else if (pname.compare ("cameraviewanglemode"))
1930  retval = get_cameraviewanglemode ();
1931  else if (pname.compare ("clim"))
1932  retval = get_clim ();
1933  else if (pname.compare ("climmode"))
1934  retval = get_climmode ();
1935  else if (pname.compare ("color"))
1936  retval = get_color ();
1937  else if (pname.compare ("colororder"))
1938  retval = get_colororder ();
1939  else if (pname.compare ("currentpoint"))
1940  retval = get_currentpoint ();
1941  else if (pname.compare ("dataaspectratio"))
1942  retval = get_dataaspectratio ();
1943  else if (pname.compare ("dataaspectratiomode"))
1944  retval = get_dataaspectratiomode ();
1945  else if (pname.compare ("drawmode"))
1946  retval = get_drawmode ();
1947  else if (pname.compare ("fontangle"))
1948  retval = get_fontangle ();
1949  else if (pname.compare ("fontname"))
1950  retval = get_fontname ();
1951  else if (pname.compare ("fontsize"))
1952  retval = get_fontsize ();
1953  else if (pname.compare ("fontunits"))
1954  retval = get_fontunits ();
1955  else if (pname.compare ("fontweight"))
1956  retval = get_fontweight ();
1957  else if (pname.compare ("gridlinestyle"))
1958  retval = get_gridlinestyle ();
1959  else if (pname.compare ("interpreter"))
1960  retval = get_interpreter ();
1961  else if (pname.compare ("layer"))
1962  retval = get_layer ();
1963  else if (pname.compare ("linestyleorder"))
1964  retval = get_linestyleorder ();
1965  else if (pname.compare ("linewidth"))
1966  retval = get_linewidth ();
1967  else if (pname.compare ("minorgridlinestyle"))
1968  retval = get_minorgridlinestyle ();
1969  else if (pname.compare ("nextplot"))
1970  retval = get_nextplot ();
1971  else if (pname.compare ("outerposition"))
1972  retval = get_outerposition ();
1973  else if (pname.compare ("plotboxaspectratio"))
1974  retval = get_plotboxaspectratio ();
1975  else if (pname.compare ("plotboxaspectratiomode"))
1976  retval = get_plotboxaspectratiomode ();
1977  else if (pname.compare ("position"))
1978  retval = get_position ();
1979  else if (pname.compare ("projection"))
1980  retval = get_projection ();
1981  else if (pname.compare ("tickdir"))
1982  retval = get_tickdir ();
1983  else if (pname.compare ("tickdirmode"))
1984  retval = get_tickdirmode ();
1985  else if (pname.compare ("ticklength"))
1986  retval = get_ticklength ();
1987  else if (pname.compare ("tightinset"))
1988  retval = get_tightinset ();
1989  else if (pname.compare ("title"))
1990  retval = get_title ().as_octave_value ();
1991  else if (pname.compare ("units"))
1992  retval = get_units ();
1993  else if (pname.compare ("view"))
1994  retval = get_view ();
1995  else if (pname.compare ("xaxislocation"))
1996  retval = get_xaxislocation ();
1997  else if (pname.compare ("xcolor"))
1998  retval = get_xcolor ();
1999  else if (pname.compare ("xdir"))
2000  retval = get_xdir ();
2001  else if (pname.compare ("xgrid"))
2002  retval = get_xgrid ();
2003  else if (pname.compare ("xlabel"))
2004  retval = get_xlabel ().as_octave_value ();
2005  else if (pname.compare ("xlim"))
2006  retval = get_xlim ();
2007  else if (pname.compare ("xlimmode"))
2008  retval = get_xlimmode ();
2009  else if (pname.compare ("xminorgrid"))
2010  retval = get_xminorgrid ();
2011  else if (pname.compare ("xminortick"))
2012  retval = get_xminortick ();
2013  else if (pname.compare ("xscale"))
2014  retval = get_xscale ();
2015  else if (pname.compare ("xtick"))
2016  retval = get_xtick ();
2017  else if (pname.compare ("xticklabel"))
2018  retval = get_xticklabel ();
2019  else if (pname.compare ("xticklabelmode"))
2020  retval = get_xticklabelmode ();
2021  else if (pname.compare ("xtickmode"))
2022  retval = get_xtickmode ();
2023  else if (pname.compare ("yaxislocation"))
2024  retval = get_yaxislocation ();
2025  else if (pname.compare ("ycolor"))
2026  retval = get_ycolor ();
2027  else if (pname.compare ("ydir"))
2028  retval = get_ydir ();
2029  else if (pname.compare ("ygrid"))
2030  retval = get_ygrid ();
2031  else if (pname.compare ("ylabel"))
2032  retval = get_ylabel ().as_octave_value ();
2033  else if (pname.compare ("ylim"))
2034  retval = get_ylim ();
2035  else if (pname.compare ("ylimmode"))
2036  retval = get_ylimmode ();
2037  else if (pname.compare ("yminorgrid"))
2038  retval = get_yminorgrid ();
2039  else if (pname.compare ("yminortick"))
2040  retval = get_yminortick ();
2041  else if (pname.compare ("yscale"))
2042  retval = get_yscale ();
2043  else if (pname.compare ("ytick"))
2044  retval = get_ytick ();
2045  else if (pname.compare ("yticklabel"))
2046  retval = get_yticklabel ();
2047  else if (pname.compare ("yticklabelmode"))
2048  retval = get_yticklabelmode ();
2049  else if (pname.compare ("ytickmode"))
2050  retval = get_ytickmode ();
2051  else if (pname.compare ("zcolor"))
2052  retval = get_zcolor ();
2053  else if (pname.compare ("zdir"))
2054  retval = get_zdir ();
2055  else if (pname.compare ("zgrid"))
2056  retval = get_zgrid ();
2057  else if (pname.compare ("zlabel"))
2058  retval = get_zlabel ().as_octave_value ();
2059  else if (pname.compare ("zlim"))
2060  retval = get_zlim ();
2061  else if (pname.compare ("zlimmode"))
2062  retval = get_zlimmode ();
2063  else if (pname.compare ("zminorgrid"))
2064  retval = get_zminorgrid ();
2065  else if (pname.compare ("zminortick"))
2066  retval = get_zminortick ();
2067  else if (pname.compare ("zscale"))
2068  retval = get_zscale ();
2069  else if (pname.compare ("ztick"))
2070  retval = get_ztick ();
2071  else if (pname.compare ("zticklabel"))
2072  retval = get_zticklabel ();
2073  else if (pname.compare ("zticklabelmode"))
2074  retval = get_zticklabelmode ();
2075  else if (pname.compare ("ztickmode"))
2076  retval = get_ztickmode ();
2077  else if (pname.compare ("__hold_all__"))
2078  retval = get___hold_all__ ();
2079  else if (pname.compare ("autopos_tag"))
2080  retval = get_autopos_tag ();
2081  else if (pname.compare ("looseinset"))
2082  retval = get_looseinset ();
2083  else if (pname.compare ("x_viewtransform"))
2084  retval = get_x_viewtransform ();
2085  else if (pname.compare ("x_projectiontransform"))
2086  retval = get_x_projectiontransform ();
2087  else if (pname.compare ("x_viewporttransform"))
2088  retval = get_x_viewporttransform ();
2089  else if (pname.compare ("x_normrendertransform"))
2090  retval = get_x_normrendertransform ();
2091  else if (pname.compare ("x_rendertransform"))
2092  retval = get_x_rendertransform ();
2093  else if (pname.compare ("xmtick"))
2094  retval = get_xmtick ();
2095  else if (pname.compare ("ymtick"))
2096  retval = get_ymtick ();
2097  else if (pname.compare ("zmtick"))
2098  retval = get_zmtick ();
2099  else
2100  retval = base_properties::get (pname);
2101 
2102  return retval;
2103 }
2104 
2105 property
2107 {
2108  const std::set<std::string>& pnames = all_property_names ();
2109 
2110  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
2111 
2112  if (error_state)
2113  return property ();
2114 
2115  if (pname.compare ("activepositionproperty"))
2116  return property (&activepositionproperty, true);
2117  else if (pname.compare ("alim"))
2118  return property (&alim, true);
2119  else if (pname.compare ("alimmode"))
2120  return property (&alimmode, true);
2121  else if (pname.compare ("ambientlightcolor"))
2122  return property (&ambientlightcolor, true);
2123  else if (pname.compare ("box"))
2124  return property (&box, true);
2125  else if (pname.compare ("cameraposition"))
2126  return property (&cameraposition, true);
2127  else if (pname.compare ("camerapositionmode"))
2128  return property (&camerapositionmode, true);
2129  else if (pname.compare ("cameratarget"))
2130  return property (&cameratarget, true);
2131  else if (pname.compare ("cameratargetmode"))
2132  return property (&cameratargetmode, true);
2133  else if (pname.compare ("cameraupvector"))
2134  return property (&cameraupvector, true);
2135  else if (pname.compare ("cameraupvectormode"))
2136  return property (&cameraupvectormode, true);
2137  else if (pname.compare ("cameraviewangle"))
2138  return property (&cameraviewangle, true);
2139  else if (pname.compare ("cameraviewanglemode"))
2140  return property (&cameraviewanglemode, true);
2141  else if (pname.compare ("clim"))
2142  return property (&clim, true);
2143  else if (pname.compare ("climmode"))
2144  return property (&climmode, true);
2145  else if (pname.compare ("color"))
2146  return property (&color, true);
2147  else if (pname.compare ("colororder"))
2148  return property (&colororder, true);
2149  else if (pname.compare ("currentpoint"))
2150  return property (&currentpoint, true);
2151  else if (pname.compare ("dataaspectratio"))
2152  return property (&dataaspectratio, true);
2153  else if (pname.compare ("dataaspectratiomode"))
2154  return property (&dataaspectratiomode, true);
2155  else if (pname.compare ("drawmode"))
2156  return property (&drawmode, true);
2157  else if (pname.compare ("fontangle"))
2158  return property (&fontangle, true);
2159  else if (pname.compare ("fontname"))
2160  return property (&fontname, true);
2161  else if (pname.compare ("fontsize"))
2162  return property (&fontsize, true);
2163  else if (pname.compare ("fontunits"))
2164  return property (&fontunits, true);
2165  else if (pname.compare ("fontweight"))
2166  return property (&fontweight, true);
2167  else if (pname.compare ("gridlinestyle"))
2168  return property (&gridlinestyle, true);
2169  else if (pname.compare ("interpreter"))
2170  return property (&interpreter, true);
2171  else if (pname.compare ("layer"))
2172  return property (&layer, true);
2173  else if (pname.compare ("linestyleorder"))
2174  return property (&linestyleorder, true);
2175  else if (pname.compare ("linewidth"))
2176  return property (&linewidth, true);
2177  else if (pname.compare ("minorgridlinestyle"))
2178  return property (&minorgridlinestyle, true);
2179  else if (pname.compare ("nextplot"))
2180  return property (&nextplot, true);
2181  else if (pname.compare ("outerposition"))
2182  return property (&outerposition, true);
2183  else if (pname.compare ("plotboxaspectratio"))
2184  return property (&plotboxaspectratio, true);
2185  else if (pname.compare ("plotboxaspectratiomode"))
2186  return property (&plotboxaspectratiomode, true);
2187  else if (pname.compare ("position"))
2188  return property (&position, true);
2189  else if (pname.compare ("projection"))
2190  return property (&projection, true);
2191  else if (pname.compare ("tickdir"))
2192  return property (&tickdir, true);
2193  else if (pname.compare ("tickdirmode"))
2194  return property (&tickdirmode, true);
2195  else if (pname.compare ("ticklength"))
2196  return property (&ticklength, true);
2197  else if (pname.compare ("tightinset"))
2198  return property (&tightinset, true);
2199  else if (pname.compare ("title"))
2200  return property (&title, true);
2201  else if (pname.compare ("units"))
2202  return property (&units, true);
2203  else if (pname.compare ("view"))
2204  return property (&view, true);
2205  else if (pname.compare ("xaxislocation"))
2206  return property (&xaxislocation, true);
2207  else if (pname.compare ("xcolor"))
2208  return property (&xcolor, true);
2209  else if (pname.compare ("xdir"))
2210  return property (&xdir, true);
2211  else if (pname.compare ("xgrid"))
2212  return property (&xgrid, true);
2213  else if (pname.compare ("xlabel"))
2214  return property (&xlabel, true);
2215  else if (pname.compare ("xlim"))
2216  return property (&xlim, true);
2217  else if (pname.compare ("xlimmode"))
2218  return property (&xlimmode, true);
2219  else if (pname.compare ("xminorgrid"))
2220  return property (&xminorgrid, true);
2221  else if (pname.compare ("xminortick"))
2222  return property (&xminortick, true);
2223  else if (pname.compare ("xscale"))
2224  return property (&xscale, true);
2225  else if (pname.compare ("xtick"))
2226  return property (&xtick, true);
2227  else if (pname.compare ("xticklabel"))
2228  return property (&xticklabel, true);
2229  else if (pname.compare ("xticklabelmode"))
2230  return property (&xticklabelmode, true);
2231  else if (pname.compare ("xtickmode"))
2232  return property (&xtickmode, true);
2233  else if (pname.compare ("yaxislocation"))
2234  return property (&yaxislocation, true);
2235  else if (pname.compare ("ycolor"))
2236  return property (&ycolor, true);
2237  else if (pname.compare ("ydir"))
2238  return property (&ydir, true);
2239  else if (pname.compare ("ygrid"))
2240  return property (&ygrid, true);
2241  else if (pname.compare ("ylabel"))
2242  return property (&ylabel, true);
2243  else if (pname.compare ("ylim"))
2244  return property (&ylim, true);
2245  else if (pname.compare ("ylimmode"))
2246  return property (&ylimmode, true);
2247  else if (pname.compare ("yminorgrid"))
2248  return property (&yminorgrid, true);
2249  else if (pname.compare ("yminortick"))
2250  return property (&yminortick, true);
2251  else if (pname.compare ("yscale"))
2252  return property (&yscale, true);
2253  else if (pname.compare ("ytick"))
2254  return property (&ytick, true);
2255  else if (pname.compare ("yticklabel"))
2256  return property (&yticklabel, true);
2257  else if (pname.compare ("yticklabelmode"))
2258  return property (&yticklabelmode, true);
2259  else if (pname.compare ("ytickmode"))
2260  return property (&ytickmode, true);
2261  else if (pname.compare ("zcolor"))
2262  return property (&zcolor, true);
2263  else if (pname.compare ("zdir"))
2264  return property (&zdir, true);
2265  else if (pname.compare ("zgrid"))
2266  return property (&zgrid, true);
2267  else if (pname.compare ("zlabel"))
2268  return property (&zlabel, true);
2269  else if (pname.compare ("zlim"))
2270  return property (&zlim, true);
2271  else if (pname.compare ("zlimmode"))
2272  return property (&zlimmode, true);
2273  else if (pname.compare ("zminorgrid"))
2274  return property (&zminorgrid, true);
2275  else if (pname.compare ("zminortick"))
2276  return property (&zminortick, true);
2277  else if (pname.compare ("zscale"))
2278  return property (&zscale, true);
2279  else if (pname.compare ("ztick"))
2280  return property (&ztick, true);
2281  else if (pname.compare ("zticklabel"))
2282  return property (&zticklabel, true);
2283  else if (pname.compare ("zticklabelmode"))
2284  return property (&zticklabelmode, true);
2285  else if (pname.compare ("ztickmode"))
2286  return property (&ztickmode, true);
2287  else if (pname.compare ("__hold_all__"))
2288  return property (&__hold_all__, true);
2289  else if (pname.compare ("autopos_tag"))
2290  return property (&autopos_tag, true);
2291  else if (pname.compare ("looseinset"))
2292  return property (&looseinset, true);
2293  else if (pname.compare ("x_viewtransform"))
2294  return property (&x_viewtransform, true);
2295  else if (pname.compare ("x_projectiontransform"))
2296  return property (&x_projectiontransform, true);
2297  else if (pname.compare ("x_viewporttransform"))
2298  return property (&x_viewporttransform, true);
2299  else if (pname.compare ("x_normrendertransform"))
2300  return property (&x_normrendertransform, true);
2301  else if (pname.compare ("x_rendertransform"))
2302  return property (&x_rendertransform, true);
2303  else if (pname.compare ("xmtick"))
2304  return property (&xmtick, true);
2305  else if (pname.compare ("ymtick"))
2306  return property (&ymtick, true);
2307  else if (pname.compare ("zmtick"))
2308  return property (&zmtick, true);
2309  else
2310  return base_properties::get_property (pname);
2311 }
2312 
2315 {
2317 
2318  m["activepositionproperty"] = "outerposition";
2319  m["alim"] = default_lim ();
2320  m["alimmode"] = "auto";
2321  m["ambientlightcolor"] = color_values (1, 1, 1);
2322  m["box"] = "on";
2323  m["cameraposition"] = Matrix (1, 3, 0.0);
2324  m["camerapositionmode"] = "auto";
2325  m["cameratarget"] = Matrix (1, 3, 0.0);
2326  m["cameratargetmode"] = "auto";
2327  m["cameraupvector"] = Matrix ();
2328  m["cameraupvectormode"] = "auto";
2329  m["cameraviewangle"] = 10.0;
2330  m["cameraviewanglemode"] = "auto";
2331  m["clim"] = default_lim ();
2332  m["climmode"] = "auto";
2333  m["color"] = color_property (color_values (1, 1, 1), radio_values ("none"));
2334  m["colororder"] = default_colororder ();
2335  m["currentpoint"] = Matrix (2, 3, 0.0);
2336  m["dataaspectratio"] = Matrix (1, 3, 1.0);
2337  m["dataaspectratiomode"] = "auto";
2338  m["drawmode"] = "normal";
2339  m["fontangle"] = "normal";
2340  m["fontname"] = OCTAVE_DEFAULT_FONTNAME;
2341  m["fontsize"] = 10;
2342  m["fontunits"] = "points";
2343  m["fontweight"] = "normal";
2344  m["gridlinestyle"] = ":";
2345  m["interpreter"] = "none";
2346  m["layer"] = "bottom";
2347  m["linestyleorder"] = "-";
2348  m["linewidth"] = 0.5;
2349  m["minorgridlinestyle"] = ":";
2350  m["nextplot"] = "replace";
2351  m["outerposition"] = default_axes_outerposition ();
2352  m["plotboxaspectratio"] = Matrix (1, 3, 1.0);
2353  m["plotboxaspectratiomode"] = "auto";
2354  m["position"] = default_axes_position ();
2355  m["projection"] = "orthographic";
2356  m["tickdir"] = "in";
2357  m["tickdirmode"] = "auto";
2358  m["ticklength"] = default_axes_ticklength ();
2359  m["tightinset"] = Matrix (1, 4, 0.0);
2360  m["units"] = "normalized";
2361  m["view"] = Matrix ();
2362  m["xaxislocation"] = "bottom";
2363  m["xcolor"] = color_values (0, 0, 0);
2364  m["xdir"] = "normal";
2365  m["xgrid"] = "off";
2366  m["xlim"] = default_lim ();
2367  m["xlimmode"] = "auto";
2368  m["xminorgrid"] = "off";
2369  m["xminortick"] = "off";
2370  m["xscale"] = "linear";
2371  m["xtick"] = default_axes_tick ();
2372  m["xticklabel"] = "";
2373  m["xticklabelmode"] = "auto";
2374  m["xtickmode"] = "auto";
2375  m["yaxislocation"] = "left";
2376  m["ycolor"] = color_values (0, 0, 0);
2377  m["ydir"] = "normal";
2378  m["ygrid"] = "off";
2379  m["ylim"] = default_lim ();
2380  m["ylimmode"] = "auto";
2381  m["yminorgrid"] = "off";
2382  m["yminortick"] = "off";
2383  m["yscale"] = "linear";
2384  m["ytick"] = default_axes_tick ();
2385  m["yticklabel"] = "";
2386  m["yticklabelmode"] = "auto";
2387  m["ytickmode"] = "auto";
2388  m["zcolor"] = color_values (0, 0, 0);
2389  m["zdir"] = "normal";
2390  m["zgrid"] = "off";
2391  m["zlim"] = default_lim ();
2392  m["zlimmode"] = "auto";
2393  m["zminorgrid"] = "off";
2394  m["zminortick"] = "off";
2395  m["zscale"] = "linear";
2396  m["ztick"] = default_axes_tick ();
2397  m["zticklabel"] = "";
2398  m["zticklabelmode"] = "auto";
2399  m["ztickmode"] = "auto";
2400  m["__hold_all__"] = "off";
2401  m["autopos_tag"] = "none";
2402  m["looseinset"] = Matrix (1, 4, 0.0);
2403  m["x_viewtransform"] = Matrix (4, 4, 0.0);
2404  m["x_projectiontransform"] = Matrix (4, 4, 0.0);
2405  m["x_viewporttransform"] = Matrix (4, 4, 0.0);
2406  m["x_normrendertransform"] = Matrix (4, 4, 0.0);
2407  m["x_rendertransform"] = Matrix (4, 4, 0.0);
2408  m["xmtick"] = Matrix ();
2409  m["ymtick"] = Matrix ();
2410  m["zmtick"] = Matrix ();
2411 
2412  return m;
2413 }
2414 
2415 std::string axes::properties::go_name ("axes");
2416 
2417 std::set<std::string>
2419 {
2420  static std::set<std::string> all_pnames;
2421 
2422  static bool initialized = false;
2423 
2424  if (! initialized)
2425  {
2426  all_pnames.insert ("activepositionproperty");
2427  all_pnames.insert ("alim");
2428  all_pnames.insert ("alimmode");
2429  all_pnames.insert ("ambientlightcolor");
2430  all_pnames.insert ("box");
2431  all_pnames.insert ("cameraposition");
2432  all_pnames.insert ("camerapositionmode");
2433  all_pnames.insert ("cameratarget");
2434  all_pnames.insert ("cameratargetmode");
2435  all_pnames.insert ("cameraupvector");
2436  all_pnames.insert ("cameraupvectormode");
2437  all_pnames.insert ("cameraviewangle");
2438  all_pnames.insert ("cameraviewanglemode");
2439  all_pnames.insert ("clim");
2440  all_pnames.insert ("climmode");
2441  all_pnames.insert ("color");
2442  all_pnames.insert ("colororder");
2443  all_pnames.insert ("currentpoint");
2444  all_pnames.insert ("dataaspectratio");
2445  all_pnames.insert ("dataaspectratiomode");
2446  all_pnames.insert ("drawmode");
2447  all_pnames.insert ("fontangle");
2448  all_pnames.insert ("fontname");
2449  all_pnames.insert ("fontsize");
2450  all_pnames.insert ("fontunits");
2451  all_pnames.insert ("fontweight");
2452  all_pnames.insert ("gridlinestyle");
2453  all_pnames.insert ("interpreter");
2454  all_pnames.insert ("layer");
2455  all_pnames.insert ("linestyleorder");
2456  all_pnames.insert ("linewidth");
2457  all_pnames.insert ("minorgridlinestyle");
2458  all_pnames.insert ("nextplot");
2459  all_pnames.insert ("outerposition");
2460  all_pnames.insert ("plotboxaspectratio");
2461  all_pnames.insert ("plotboxaspectratiomode");
2462  all_pnames.insert ("position");
2463  all_pnames.insert ("projection");
2464  all_pnames.insert ("tickdir");
2465  all_pnames.insert ("tickdirmode");
2466  all_pnames.insert ("ticklength");
2467  all_pnames.insert ("tightinset");
2468  all_pnames.insert ("title");
2469  all_pnames.insert ("units");
2470  all_pnames.insert ("view");
2471  all_pnames.insert ("xaxislocation");
2472  all_pnames.insert ("xcolor");
2473  all_pnames.insert ("xdir");
2474  all_pnames.insert ("xgrid");
2475  all_pnames.insert ("xlabel");
2476  all_pnames.insert ("xlim");
2477  all_pnames.insert ("xlimmode");
2478  all_pnames.insert ("xminorgrid");
2479  all_pnames.insert ("xminortick");
2480  all_pnames.insert ("xscale");
2481  all_pnames.insert ("xtick");
2482  all_pnames.insert ("xticklabel");
2483  all_pnames.insert ("xticklabelmode");
2484  all_pnames.insert ("xtickmode");
2485  all_pnames.insert ("yaxislocation");
2486  all_pnames.insert ("ycolor");
2487  all_pnames.insert ("ydir");
2488  all_pnames.insert ("ygrid");
2489  all_pnames.insert ("ylabel");
2490  all_pnames.insert ("ylim");
2491  all_pnames.insert ("ylimmode");
2492  all_pnames.insert ("yminorgrid");
2493  all_pnames.insert ("yminortick");
2494  all_pnames.insert ("yscale");
2495  all_pnames.insert ("ytick");
2496  all_pnames.insert ("yticklabel");
2497  all_pnames.insert ("yticklabelmode");
2498  all_pnames.insert ("ytickmode");
2499  all_pnames.insert ("zcolor");
2500  all_pnames.insert ("zdir");
2501  all_pnames.insert ("zgrid");
2502  all_pnames.insert ("zlabel");
2503  all_pnames.insert ("zlim");
2504  all_pnames.insert ("zlimmode");
2505  all_pnames.insert ("zminorgrid");
2506  all_pnames.insert ("zminortick");
2507  all_pnames.insert ("zscale");
2508  all_pnames.insert ("ztick");
2509  all_pnames.insert ("zticklabel");
2510  all_pnames.insert ("zticklabelmode");
2511  all_pnames.insert ("ztickmode");
2512  all_pnames.insert ("__hold_all__");
2513  all_pnames.insert ("autopos_tag");
2514  all_pnames.insert ("looseinset");
2515  all_pnames.insert ("x_viewtransform");
2516  all_pnames.insert ("x_projectiontransform");
2517  all_pnames.insert ("x_viewporttransform");
2518  all_pnames.insert ("x_normrendertransform");
2519  all_pnames.insert ("x_rendertransform");
2520  all_pnames.insert ("xmtick");
2521  all_pnames.insert ("ymtick");
2522  all_pnames.insert ("zmtick");
2523 
2524  std::set<std::string> base_pnames = base_properties::core_property_names ();
2525  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
2526 
2527  initialized = true;
2528  }
2529 
2530  return all_pnames;
2531 }
2532 
2533 bool
2535 {
2536  std::set<std::string> pnames = core_property_names ();
2537 
2538  return pnames.find (pname) != pnames.end ();
2539 }
2540 
2541 std::set<std::string>
2543 {
2544  static std::set<std::string> all_pnames = core_property_names ();
2545 
2546  std::set<std::string> retval = all_pnames;
2547  std::set<std::string> base_props = base_properties::all_property_names ();
2548  retval.insert (base_props.begin (), base_props.end ());
2549 
2550  return retval;
2551 }
2552 
2553 bool
2555 {
2556  std::set<std::string> pnames = all_property_names ();
2557 
2558  return pnames.find (pname) != pnames.end ();
2559 }
2560 
2561 // ******** line ********
2562 
2564  : base_properties (go_name, mh, p),
2565  color ("color", mh, color_values (0, 0, 0)),
2566  displayname ("displayname", mh, ""),
2567  erasemode ("erasemode", mh, "{normal}|none|xor|background"),
2568  interpreter ("interpreter", mh, "{tex}|none|latex"),
2569  linestyle ("linestyle", mh, "{-}|--|:|-.|none"),
2570  linewidth ("linewidth", mh, 0.5),
2571  marker ("marker", mh, "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram"),
2572  markeredgecolor ("markeredgecolor", mh, color_property (radio_values ("{auto}|none"), color_values (0, 0, 0))),
2573  markerfacecolor ("markerfacecolor", mh, color_property (radio_values ("auto|{none}"), color_values (0, 0, 0))),
2574  markersize ("markersize", mh, 6),
2575  xdata ("xdata", mh, default_data ()),
2576  xdatasource ("xdatasource", mh, ""),
2577  ydata ("ydata", mh, default_data ()),
2578  ydatasource ("ydatasource", mh, ""),
2579  zdata ("zdata", mh, Matrix ()),
2580  zdatasource ("zdatasource", mh, ""),
2581  xlim ("xlim", mh, Matrix ()),
2582  ylim ("ylim", mh, Matrix ()),
2583  zlim ("zlim", mh, Matrix ()),
2584  xliminclude ("xliminclude", mh, "on"),
2585  yliminclude ("yliminclude", mh, "on"),
2586  zliminclude ("zliminclude", mh, "off")
2587 {
2588  color.set_id (ID_COLOR);
2598  xdata.set_id (ID_XDATA);
2600  ydata.set_id (ID_YDATA);
2602  zdata.set_id (ID_ZDATA);
2604  xlim.set_id (ID_XLIM);
2605  xlim.set_hidden (true);
2606  ylim.set_id (ID_YLIM);
2607  ylim.set_hidden (true);
2608  zlim.set_id (ID_ZLIM);
2609  zlim.set_hidden (true);
2611  xliminclude.set_hidden (true);
2613  yliminclude.set_hidden (true);
2615  zliminclude.set_hidden (true);
2616  init ();
2617 }
2618 
2619 void
2620 line::properties::set (const caseless_str& pname_arg, const octave_value& val)
2621 {
2622  const std::set<std::string>& pnames = all_property_names ();
2623 
2624  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
2625 
2626  if (error_state)
2627  return;
2628 
2629  if (pname.compare ("color"))
2630  set_color (val);
2631  else if (pname.compare ("displayname"))
2632  set_displayname (val);
2633  else if (pname.compare ("erasemode"))
2634  set_erasemode (val);
2635  else if (pname.compare ("interpreter"))
2636  set_interpreter (val);
2637  else if (pname.compare ("linestyle"))
2638  set_linestyle (val);
2639  else if (pname.compare ("linewidth"))
2640  set_linewidth (val);
2641  else if (pname.compare ("marker"))
2642  set_marker (val);
2643  else if (pname.compare ("markeredgecolor"))
2644  set_markeredgecolor (val);
2645  else if (pname.compare ("markerfacecolor"))
2646  set_markerfacecolor (val);
2647  else if (pname.compare ("markersize"))
2648  set_markersize (val);
2649  else if (pname.compare ("xdata"))
2650  set_xdata (val);
2651  else if (pname.compare ("xdatasource"))
2652  set_xdatasource (val);
2653  else if (pname.compare ("ydata"))
2654  set_ydata (val);
2655  else if (pname.compare ("ydatasource"))
2656  set_ydatasource (val);
2657  else if (pname.compare ("zdata"))
2658  set_zdata (val);
2659  else if (pname.compare ("zdatasource"))
2660  set_zdatasource (val);
2661  else if (pname.compare ("xliminclude"))
2662  set_xliminclude (val);
2663  else if (pname.compare ("yliminclude"))
2664  set_yliminclude (val);
2665  else if (pname.compare ("zliminclude"))
2666  set_zliminclude (val);
2667  else
2668  base_properties::set (pname, val);
2669 }
2670 
2672 line::properties::get (bool all) const
2673 {
2675 
2676  m.assign ("color", octave_value (get_color ()));
2677  m.assign ("displayname", octave_value (get_displayname ()));
2678  m.assign ("erasemode", octave_value (get_erasemode ()));
2679  m.assign ("interpreter", octave_value (get_interpreter ()));
2680  m.assign ("linestyle", octave_value (get_linestyle ()));
2681  m.assign ("linewidth", octave_value (get_linewidth ()));
2682  m.assign ("marker", octave_value (get_marker ()));
2683  m.assign ("markeredgecolor", octave_value (get_markeredgecolor ()));
2684  m.assign ("markerfacecolor", octave_value (get_markerfacecolor ()));
2685  m.assign ("markersize", octave_value (get_markersize ()));
2686  m.assign ("xdata", octave_value (get_xdata ()));
2687  m.assign ("xdatasource", octave_value (get_xdatasource ()));
2688  m.assign ("ydata", octave_value (get_ydata ()));
2689  m.assign ("ydatasource", octave_value (get_ydatasource ()));
2690  m.assign ("zdata", octave_value (get_zdata ()));
2691  m.assign ("zdatasource", octave_value (get_zdatasource ()));
2692  if (all)
2693  m.assign ("xlim", octave_value (get_xlim ()));
2694  if (all)
2695  m.assign ("ylim", octave_value (get_ylim ()));
2696  if (all)
2697  m.assign ("zlim", octave_value (get_zlim ()));
2698  if (all)
2699  m.assign ("xliminclude", octave_value (get_xliminclude ()));
2700  if (all)
2701  m.assign ("yliminclude", octave_value (get_yliminclude ()));
2702  if (all)
2703  m.assign ("zliminclude", octave_value (get_zliminclude ()));
2704 
2705  return m;
2706 }
2707 
2709 line::properties::get (const caseless_str& pname_arg) const
2710 {
2711  octave_value retval;
2712 
2713  const std::set<std::string>& pnames = all_property_names ();
2714 
2715  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
2716 
2717  if (error_state)
2718  return retval;
2719 
2720  if (pname.compare ("color"))
2721  retval = get_color ();
2722  else if (pname.compare ("displayname"))
2723  retval = get_displayname ();
2724  else if (pname.compare ("erasemode"))
2725  retval = get_erasemode ();
2726  else if (pname.compare ("interpreter"))
2727  retval = get_interpreter ();
2728  else if (pname.compare ("linestyle"))
2729  retval = get_linestyle ();
2730  else if (pname.compare ("linewidth"))
2731  retval = get_linewidth ();
2732  else if (pname.compare ("marker"))
2733  retval = get_marker ();
2734  else if (pname.compare ("markeredgecolor"))
2735  retval = get_markeredgecolor ();
2736  else if (pname.compare ("markerfacecolor"))
2737  retval = get_markerfacecolor ();
2738  else if (pname.compare ("markersize"))
2739  retval = get_markersize ();
2740  else if (pname.compare ("xdata"))
2741  retval = get_xdata ();
2742  else if (pname.compare ("xdatasource"))
2743  retval = get_xdatasource ();
2744  else if (pname.compare ("ydata"))
2745  retval = get_ydata ();
2746  else if (pname.compare ("ydatasource"))
2747  retval = get_ydatasource ();
2748  else if (pname.compare ("zdata"))
2749  retval = get_zdata ();
2750  else if (pname.compare ("zdatasource"))
2751  retval = get_zdatasource ();
2752  else if (pname.compare ("xlim"))
2753  retval = get_xlim ();
2754  else if (pname.compare ("ylim"))
2755  retval = get_ylim ();
2756  else if (pname.compare ("zlim"))
2757  retval = get_zlim ();
2758  else if (pname.compare ("xliminclude"))
2759  retval = get_xliminclude ();
2760  else if (pname.compare ("yliminclude"))
2761  retval = get_yliminclude ();
2762  else if (pname.compare ("zliminclude"))
2763  retval = get_zliminclude ();
2764  else
2765  retval = base_properties::get (pname);
2766 
2767  return retval;
2768 }
2769 
2770 property
2772 {
2773  const std::set<std::string>& pnames = all_property_names ();
2774 
2775  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
2776 
2777  if (error_state)
2778  return property ();
2779 
2780  if (pname.compare ("color"))
2781  return property (&color, true);
2782  else if (pname.compare ("displayname"))
2783  return property (&displayname, true);
2784  else if (pname.compare ("erasemode"))
2785  return property (&erasemode, true);
2786  else if (pname.compare ("interpreter"))
2787  return property (&interpreter, true);
2788  else if (pname.compare ("linestyle"))
2789  return property (&linestyle, true);
2790  else if (pname.compare ("linewidth"))
2791  return property (&linewidth, true);
2792  else if (pname.compare ("marker"))
2793  return property (&marker, true);
2794  else if (pname.compare ("markeredgecolor"))
2795  return property (&markeredgecolor, true);
2796  else if (pname.compare ("markerfacecolor"))
2797  return property (&markerfacecolor, true);
2798  else if (pname.compare ("markersize"))
2799  return property (&markersize, true);
2800  else if (pname.compare ("xdata"))
2801  return property (&xdata, true);
2802  else if (pname.compare ("xdatasource"))
2803  return property (&xdatasource, true);
2804  else if (pname.compare ("ydata"))
2805  return property (&ydata, true);
2806  else if (pname.compare ("ydatasource"))
2807  return property (&ydatasource, true);
2808  else if (pname.compare ("zdata"))
2809  return property (&zdata, true);
2810  else if (pname.compare ("zdatasource"))
2811  return property (&zdatasource, true);
2812  else if (pname.compare ("xlim"))
2813  return property (&xlim, true);
2814  else if (pname.compare ("ylim"))
2815  return property (&ylim, true);
2816  else if (pname.compare ("zlim"))
2817  return property (&zlim, true);
2818  else if (pname.compare ("xliminclude"))
2819  return property (&xliminclude, true);
2820  else if (pname.compare ("yliminclude"))
2821  return property (&yliminclude, true);
2822  else if (pname.compare ("zliminclude"))
2823  return property (&zliminclude, true);
2824  else
2825  return base_properties::get_property (pname);
2826 }
2827 
2830 {
2832 
2833  m["color"] = color_values (0, 0, 0);
2834  m["displayname"] = "";
2835  m["erasemode"] = "normal";
2836  m["interpreter"] = "tex";
2837  m["linestyle"] = "-";
2838  m["linewidth"] = 0.5;
2839  m["marker"] = "none";
2840  m["markeredgecolor"] = color_property (radio_values ("{auto}|none"), color_values (0, 0, 0));
2841  m["markerfacecolor"] = color_property (radio_values ("auto|{none}"), color_values (0, 0, 0));
2842  m["markersize"] = 6;
2843  m["xdata"] = default_data ();
2844  m["xdatasource"] = "";
2845  m["ydata"] = default_data ();
2846  m["ydatasource"] = "";
2847  m["zdata"] = Matrix ();
2848  m["zdatasource"] = "";
2849  m["xlim"] = Matrix ();
2850  m["ylim"] = Matrix ();
2851  m["zlim"] = Matrix ();
2852  m["xliminclude"] = "on";
2853  m["yliminclude"] = "on";
2854  m["zliminclude"] = "off";
2855 
2856  return m;
2857 }
2858 
2859 std::string line::properties::go_name ("line");
2860 
2861 std::set<std::string>
2863 {
2864  static std::set<std::string> all_pnames;
2865 
2866  static bool initialized = false;
2867 
2868  if (! initialized)
2869  {
2870  all_pnames.insert ("color");
2871  all_pnames.insert ("displayname");
2872  all_pnames.insert ("erasemode");
2873  all_pnames.insert ("interpreter");
2874  all_pnames.insert ("linestyle");
2875  all_pnames.insert ("linewidth");
2876  all_pnames.insert ("marker");
2877  all_pnames.insert ("markeredgecolor");
2878  all_pnames.insert ("markerfacecolor");
2879  all_pnames.insert ("markersize");
2880  all_pnames.insert ("xdata");
2881  all_pnames.insert ("xdatasource");
2882  all_pnames.insert ("ydata");
2883  all_pnames.insert ("ydatasource");
2884  all_pnames.insert ("zdata");
2885  all_pnames.insert ("zdatasource");
2886  all_pnames.insert ("xlim");
2887  all_pnames.insert ("ylim");
2888  all_pnames.insert ("zlim");
2889  all_pnames.insert ("xliminclude");
2890  all_pnames.insert ("yliminclude");
2891  all_pnames.insert ("zliminclude");
2892 
2893  std::set<std::string> base_pnames = base_properties::core_property_names ();
2894  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
2895 
2896  initialized = true;
2897  }
2898 
2899  return all_pnames;
2900 }
2901 
2902 bool
2904 {
2905  std::set<std::string> pnames = core_property_names ();
2906 
2907  return pnames.find (pname) != pnames.end ();
2908 }
2909 
2910 std::set<std::string>
2912 {
2913  static std::set<std::string> all_pnames = core_property_names ();
2914 
2915  std::set<std::string> retval = all_pnames;
2916  std::set<std::string> base_props = base_properties::all_property_names ();
2917  retval.insert (base_props.begin (), base_props.end ());
2918 
2919  return retval;
2920 }
2921 
2922 bool
2924 {
2925  std::set<std::string> pnames = all_property_names ();
2926 
2927  return pnames.find (pname) != pnames.end ();
2928 }
2929 
2930 // ******** text ********
2931 
2933  : base_properties (go_name, mh, p),
2934  backgroundcolor ("backgroundcolor", mh, color_property (radio_values ("{none}"), color_values (1, 1, 1))),
2935  color ("color", mh, color_values (0, 0, 0)),
2936  displayname ("displayname", mh, ""),
2937  edgecolor ("edgecolor", mh, color_property (radio_values ("{none}"), color_values (0, 0, 0))),
2938  editing ("editing", mh, "off"),
2939  erasemode ("erasemode", mh, "{normal}|none|xor|background"),
2940  extent ("extent", mh, Matrix (1, 4, 0.0)),
2941  fontangle ("fontangle", mh, "{normal}|italic|oblique"),
2942  fontname ("fontname", mh, OCTAVE_DEFAULT_FONTNAME),
2943  fontsize ("fontsize", mh, 10),
2944  fontunits ("fontunits", mh, "inches|centimeters|normalized|{points}|pixels"),
2945  fontweight ("fontweight", mh, "light|{normal}|demi|bold"),
2946  horizontalalignment ("horizontalalignment", mh, "{left}|center|right"),
2947  interpreter ("interpreter", mh, "{tex}|none|latex"),
2948  linestyle ("linestyle", mh, "{-}|--|:|-.|none"),
2949  linewidth ("linewidth", mh, 0.5),
2950  margin ("margin", mh, 1),
2951  position ("position", mh, Matrix (1, 3, 0.0)),
2952  rotation ("rotation", mh, 0),
2953  string ("string", mh, ""),
2954  units ("units", mh, "{data}|pixels|normalized|inches|centimeters|points"),
2955  verticalalignment ("verticalalignment", mh, "top|cap|{middle}|baseline|bottom"),
2956  xlim ("xlim", mh, Matrix ()),
2957  ylim ("ylim", mh, Matrix ()),
2958  zlim ("zlim", mh, Matrix ()),
2959  xliminclude ("xliminclude", mh, "off"),
2960  yliminclude ("yliminclude", mh, "off"),
2961  zliminclude ("zliminclude", mh, "off"),
2962  positionmode ("positionmode", mh, "{auto}|manual"),
2963  rotationmode ("rotationmode", mh, "{auto}|manual"),
2964  horizontalalignmentmode ("horizontalalignmentmode", mh, "{auto}|manual"),
2965  verticalalignmentmode ("verticalalignmentmode", mh, "{auto}|manual"),
2966  autopos_tag ("autopos_tag", mh, "{none}|xlabel|ylabel|zlabel|title")
2967 {
2969  color.set_id (ID_COLOR);
2987  string.set_id (ID_STRING);
2988  units.set_id (ID_UNITS);
2990  xlim.set_id (ID_XLIM);
2991  xlim.set_hidden (true);
2992  ylim.set_id (ID_YLIM);
2993  ylim.set_hidden (true);
2994  zlim.set_id (ID_ZLIM);
2995  zlim.set_hidden (true);
2997  xliminclude.set_hidden (true);
2999  yliminclude.set_hidden (true);
3001  zliminclude.set_hidden (true);
3003  positionmode.set_hidden (true);
3005  rotationmode.set_hidden (true);
3011  autopos_tag.set_hidden (true);
3012  init ();
3013 }
3014 
3015 void
3016 text::properties::set (const caseless_str& pname_arg, const octave_value& val)
3017 {
3018  const std::set<std::string>& pnames = all_property_names ();
3019 
3020  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3021 
3022  if (error_state)
3023  return;
3024 
3025  if (pname.compare ("backgroundcolor"))
3026  set_backgroundcolor (val);
3027  else if (pname.compare ("color"))
3028  set_color (val);
3029  else if (pname.compare ("displayname"))
3030  set_displayname (val);
3031  else if (pname.compare ("edgecolor"))
3032  set_edgecolor (val);
3033  else if (pname.compare ("editing"))
3034  set_editing (val);
3035  else if (pname.compare ("erasemode"))
3036  set_erasemode (val);
3037  else if (pname.compare ("fontangle"))
3038  set_fontangle (val);
3039  else if (pname.compare ("fontname"))
3040  set_fontname (val);
3041  else if (pname.compare ("fontsize"))
3042  set_fontsize (val);
3043  else if (pname.compare ("fontunits"))
3044  set_fontunits (val);
3045  else if (pname.compare ("fontweight"))
3046  set_fontweight (val);
3047  else if (pname.compare ("horizontalalignment"))
3048  set_horizontalalignment (val);
3049  else if (pname.compare ("interpreter"))
3050  set_interpreter (val);
3051  else if (pname.compare ("linestyle"))
3052  set_linestyle (val);
3053  else if (pname.compare ("linewidth"))
3054  set_linewidth (val);
3055  else if (pname.compare ("margin"))
3056  set_margin (val);
3057  else if (pname.compare ("position"))
3058  set_position (val);
3059  else if (pname.compare ("rotation"))
3060  set_rotation (val);
3061  else if (pname.compare ("string"))
3062  set_string (val);
3063  else if (pname.compare ("units"))
3064  set_units (val);
3065  else if (pname.compare ("verticalalignment"))
3066  set_verticalalignment (val);
3067  else if (pname.compare ("xliminclude"))
3068  set_xliminclude (val);
3069  else if (pname.compare ("yliminclude"))
3070  set_yliminclude (val);
3071  else if (pname.compare ("zliminclude"))
3072  set_zliminclude (val);
3073  else if (pname.compare ("positionmode"))
3074  set_positionmode (val);
3075  else if (pname.compare ("rotationmode"))
3076  set_rotationmode (val);
3077  else if (pname.compare ("horizontalalignmentmode"))
3078  set_horizontalalignmentmode (val);
3079  else if (pname.compare ("verticalalignmentmode"))
3080  set_verticalalignmentmode (val);
3081  else if (pname.compare ("autopos_tag"))
3082  set_autopos_tag (val);
3083  else
3084  base_properties::set (pname, val);
3085 }
3086 
3088 text::properties::get (bool all) const
3089 {
3091 
3092  m.assign ("backgroundcolor", octave_value (get_backgroundcolor ()));
3093  m.assign ("color", octave_value (get_color ()));
3094  m.assign ("displayname", octave_value (get_displayname ()));
3095  m.assign ("edgecolor", octave_value (get_edgecolor ()));
3096  m.assign ("editing", octave_value (get_editing ()));
3097  m.assign ("erasemode", octave_value (get_erasemode ()));
3098  m.assign ("extent", octave_value (get_extent ()));
3099  m.assign ("fontangle", octave_value (get_fontangle ()));
3100  m.assign ("fontname", octave_value (get_fontname ()));
3101  m.assign ("fontsize", octave_value (get_fontsize ()));
3102  m.assign ("fontunits", octave_value (get_fontunits ()));
3103  m.assign ("fontweight", octave_value (get_fontweight ()));
3104  m.assign ("horizontalalignment", octave_value (get_horizontalalignment ()));
3105  m.assign ("interpreter", octave_value (get_interpreter ()));
3106  m.assign ("linestyle", octave_value (get_linestyle ()));
3107  m.assign ("linewidth", octave_value (get_linewidth ()));
3108  m.assign ("margin", octave_value (get_margin ()));
3109  m.assign ("position", octave_value (get_position ()));
3110  m.assign ("rotation", octave_value (get_rotation ()));
3111  m.assign ("string", octave_value (get_string ()));
3112  m.assign ("units", octave_value (get_units ()));
3113  m.assign ("verticalalignment", octave_value (get_verticalalignment ()));
3114  if (all)
3115  m.assign ("xlim", octave_value (get_xlim ()));
3116  if (all)
3117  m.assign ("ylim", octave_value (get_ylim ()));
3118  if (all)
3119  m.assign ("zlim", octave_value (get_zlim ()));
3120  if (all)
3121  m.assign ("xliminclude", octave_value (get_xliminclude ()));
3122  if (all)
3123  m.assign ("yliminclude", octave_value (get_yliminclude ()));
3124  if (all)
3125  m.assign ("zliminclude", octave_value (get_zliminclude ()));
3126  if (all)
3127  m.assign ("positionmode", octave_value (get_positionmode ()));
3128  if (all)
3129  m.assign ("rotationmode", octave_value (get_rotationmode ()));
3130  if (all)
3131  m.assign ("horizontalalignmentmode", octave_value (get_horizontalalignmentmode ()));
3132  if (all)
3133  m.assign ("verticalalignmentmode", octave_value (get_verticalalignmentmode ()));
3134  if (all)
3135  m.assign ("autopos_tag", octave_value (get_autopos_tag ()));
3136 
3137  return m;
3138 }
3139 
3141 text::properties::get (const caseless_str& pname_arg) const
3142 {
3143  octave_value retval;
3144 
3145  const std::set<std::string>& pnames = all_property_names ();
3146 
3147  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3148 
3149  if (error_state)
3150  return retval;
3151 
3152  if (pname.compare ("backgroundcolor"))
3153  retval = get_backgroundcolor ();
3154  else if (pname.compare ("color"))
3155  retval = get_color ();
3156  else if (pname.compare ("displayname"))
3157  retval = get_displayname ();
3158  else if (pname.compare ("edgecolor"))
3159  retval = get_edgecolor ();
3160  else if (pname.compare ("editing"))
3161  retval = get_editing ();
3162  else if (pname.compare ("erasemode"))
3163  retval = get_erasemode ();
3164  else if (pname.compare ("extent"))
3165  retval = get_extent ();
3166  else if (pname.compare ("fontangle"))
3167  retval = get_fontangle ();
3168  else if (pname.compare ("fontname"))
3169  retval = get_fontname ();
3170  else if (pname.compare ("fontsize"))
3171  retval = get_fontsize ();
3172  else if (pname.compare ("fontunits"))
3173  retval = get_fontunits ();
3174  else if (pname.compare ("fontweight"))
3175  retval = get_fontweight ();
3176  else if (pname.compare ("horizontalalignment"))
3177  retval = get_horizontalalignment ();
3178  else if (pname.compare ("interpreter"))
3179  retval = get_interpreter ();
3180  else if (pname.compare ("linestyle"))
3181  retval = get_linestyle ();
3182  else if (pname.compare ("linewidth"))
3183  retval = get_linewidth ();
3184  else if (pname.compare ("margin"))
3185  retval = get_margin ();
3186  else if (pname.compare ("position"))
3187  retval = get_position ();
3188  else if (pname.compare ("rotation"))
3189  retval = get_rotation ();
3190  else if (pname.compare ("string"))
3191  retval = get_string ();
3192  else if (pname.compare ("units"))
3193  retval = get_units ();
3194  else if (pname.compare ("verticalalignment"))
3195  retval = get_verticalalignment ();
3196  else if (pname.compare ("xlim"))
3197  retval = get_xlim ();
3198  else if (pname.compare ("ylim"))
3199  retval = get_ylim ();
3200  else if (pname.compare ("zlim"))
3201  retval = get_zlim ();
3202  else if (pname.compare ("xliminclude"))
3203  retval = get_xliminclude ();
3204  else if (pname.compare ("yliminclude"))
3205  retval = get_yliminclude ();
3206  else if (pname.compare ("zliminclude"))
3207  retval = get_zliminclude ();
3208  else if (pname.compare ("positionmode"))
3209  retval = get_positionmode ();
3210  else if (pname.compare ("rotationmode"))
3211  retval = get_rotationmode ();
3212  else if (pname.compare ("horizontalalignmentmode"))
3213  retval = get_horizontalalignmentmode ();
3214  else if (pname.compare ("verticalalignmentmode"))
3215  retval = get_verticalalignmentmode ();
3216  else if (pname.compare ("autopos_tag"))
3217  retval = get_autopos_tag ();
3218  else
3219  retval = base_properties::get (pname);
3220 
3221  return retval;
3222 }
3223 
3224 property
3226 {
3227  const std::set<std::string>& pnames = all_property_names ();
3228 
3229  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3230 
3231  if (error_state)
3232  return property ();
3233 
3234  if (pname.compare ("backgroundcolor"))
3235  return property (&backgroundcolor, true);
3236  else if (pname.compare ("color"))
3237  return property (&color, true);
3238  else if (pname.compare ("displayname"))
3239  return property (&displayname, true);
3240  else if (pname.compare ("edgecolor"))
3241  return property (&edgecolor, true);
3242  else if (pname.compare ("editing"))
3243  return property (&editing, true);
3244  else if (pname.compare ("erasemode"))
3245  return property (&erasemode, true);
3246  else if (pname.compare ("extent"))
3247  return property (&extent, true);
3248  else if (pname.compare ("fontangle"))
3249  return property (&fontangle, true);
3250  else if (pname.compare ("fontname"))
3251  return property (&fontname, true);
3252  else if (pname.compare ("fontsize"))
3253  return property (&fontsize, true);
3254  else if (pname.compare ("fontunits"))
3255  return property (&fontunits, true);
3256  else if (pname.compare ("fontweight"))
3257  return property (&fontweight, true);
3258  else if (pname.compare ("horizontalalignment"))
3259  return property (&horizontalalignment, true);
3260  else if (pname.compare ("interpreter"))
3261  return property (&interpreter, true);
3262  else if (pname.compare ("linestyle"))
3263  return property (&linestyle, true);
3264  else if (pname.compare ("linewidth"))
3265  return property (&linewidth, true);
3266  else if (pname.compare ("margin"))
3267  return property (&margin, true);
3268  else if (pname.compare ("position"))
3269  return property (&position, true);
3270  else if (pname.compare ("rotation"))
3271  return property (&rotation, true);
3272  else if (pname.compare ("string"))
3273  return property (&string, true);
3274  else if (pname.compare ("units"))
3275  return property (&units, true);
3276  else if (pname.compare ("verticalalignment"))
3277  return property (&verticalalignment, true);
3278  else if (pname.compare ("xlim"))
3279  return property (&xlim, true);
3280  else if (pname.compare ("ylim"))
3281  return property (&ylim, true);
3282  else if (pname.compare ("zlim"))
3283  return property (&zlim, true);
3284  else if (pname.compare ("xliminclude"))
3285  return property (&xliminclude, true);
3286  else if (pname.compare ("yliminclude"))
3287  return property (&yliminclude, true);
3288  else if (pname.compare ("zliminclude"))
3289  return property (&zliminclude, true);
3290  else if (pname.compare ("positionmode"))
3291  return property (&positionmode, true);
3292  else if (pname.compare ("rotationmode"))
3293  return property (&rotationmode, true);
3294  else if (pname.compare ("horizontalalignmentmode"))
3295  return property (&horizontalalignmentmode, true);
3296  else if (pname.compare ("verticalalignmentmode"))
3297  return property (&verticalalignmentmode, true);
3298  else if (pname.compare ("autopos_tag"))
3299  return property (&autopos_tag, true);
3300  else
3301  return base_properties::get_property (pname);
3302 }
3303 
3306 {
3308 
3309  m["backgroundcolor"] = color_property (radio_values ("{none}"), color_values (1, 1, 1));
3310  m["color"] = color_values (0, 0, 0);
3311  m["displayname"] = "";
3312  m["edgecolor"] = color_property (radio_values ("{none}"), color_values (0, 0, 0));
3313  m["editing"] = "off";
3314  m["erasemode"] = "normal";
3315  m["extent"] = Matrix (1, 4, 0.0);
3316  m["fontangle"] = "normal";
3317  m["fontname"] = OCTAVE_DEFAULT_FONTNAME;
3318  m["fontsize"] = 10;
3319  m["fontunits"] = "points";
3320  m["fontweight"] = "normal";
3321  m["horizontalalignment"] = "left";
3322  m["interpreter"] = "tex";
3323  m["linestyle"] = "-";
3324  m["linewidth"] = 0.5;
3325  m["margin"] = 1;
3326  m["position"] = Matrix (1, 3, 0.0);
3327  m["rotation"] = 0;
3328  m["string"] = "";
3329  m["units"] = "data";
3330  m["verticalalignment"] = "middle";
3331  m["xlim"] = Matrix ();
3332  m["ylim"] = Matrix ();
3333  m["zlim"] = Matrix ();
3334  m["xliminclude"] = "off";
3335  m["yliminclude"] = "off";
3336  m["zliminclude"] = "off";
3337  m["positionmode"] = "auto";
3338  m["rotationmode"] = "auto";
3339  m["horizontalalignmentmode"] = "auto";
3340  m["verticalalignmentmode"] = "auto";
3341  m["autopos_tag"] = "none";
3342 
3343  return m;
3344 }
3345 
3346 std::string text::properties::go_name ("text");
3347 
3348 std::set<std::string>
3350 {
3351  static std::set<std::string> all_pnames;
3352 
3353  static bool initialized = false;
3354 
3355  if (! initialized)
3356  {
3357  all_pnames.insert ("backgroundcolor");
3358  all_pnames.insert ("color");
3359  all_pnames.insert ("displayname");
3360  all_pnames.insert ("edgecolor");
3361  all_pnames.insert ("editing");
3362  all_pnames.insert ("erasemode");
3363  all_pnames.insert ("extent");
3364  all_pnames.insert ("fontangle");
3365  all_pnames.insert ("fontname");
3366  all_pnames.insert ("fontsize");
3367  all_pnames.insert ("fontunits");
3368  all_pnames.insert ("fontweight");
3369  all_pnames.insert ("horizontalalignment");
3370  all_pnames.insert ("interpreter");
3371  all_pnames.insert ("linestyle");
3372  all_pnames.insert ("linewidth");
3373  all_pnames.insert ("margin");
3374  all_pnames.insert ("position");
3375  all_pnames.insert ("rotation");
3376  all_pnames.insert ("string");
3377  all_pnames.insert ("units");
3378  all_pnames.insert ("verticalalignment");
3379  all_pnames.insert ("xlim");
3380  all_pnames.insert ("ylim");
3381  all_pnames.insert ("zlim");
3382  all_pnames.insert ("xliminclude");
3383  all_pnames.insert ("yliminclude");
3384  all_pnames.insert ("zliminclude");
3385  all_pnames.insert ("positionmode");
3386  all_pnames.insert ("rotationmode");
3387  all_pnames.insert ("horizontalalignmentmode");
3388  all_pnames.insert ("verticalalignmentmode");
3389  all_pnames.insert ("autopos_tag");
3390 
3391  std::set<std::string> base_pnames = base_properties::core_property_names ();
3392  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
3393 
3394  initialized = true;
3395  }
3396 
3397  return all_pnames;
3398 }
3399 
3400 bool
3402 {
3403  std::set<std::string> pnames = core_property_names ();
3404 
3405  return pnames.find (pname) != pnames.end ();
3406 }
3407 
3408 std::set<std::string>
3410 {
3411  static std::set<std::string> all_pnames = core_property_names ();
3412 
3413  std::set<std::string> retval = all_pnames;
3414  std::set<std::string> base_props = base_properties::all_property_names ();
3415  retval.insert (base_props.begin (), base_props.end ());
3416 
3417  return retval;
3418 }
3419 
3420 bool
3422 {
3423  std::set<std::string> pnames = all_property_names ();
3424 
3425  return pnames.find (pname) != pnames.end ();
3426 }
3427 
3428 // ******** image ********
3429 
3431  : base_properties (go_name, mh, p),
3432  alphadata ("alphadata", mh, Matrix ()),
3433  alphadatamapping ("alphadatamapping", mh, "none|direct|{scaled}"),
3434  cdata ("cdata", mh, Matrix ()),
3435  cdatamapping ("cdatamapping", mh, "scaled|{direct}"),
3436  erasemode ("erasemode", mh, "{normal}|none|xor|background"),
3437  xdata ("xdata", mh, Matrix ()),
3438  ydata ("ydata", mh, Matrix ()),
3439  alim ("alim", mh, Matrix ()),
3440  clim ("clim", mh, Matrix ()),
3441  xlim ("xlim", mh, Matrix ()),
3442  ylim ("ylim", mh, Matrix ()),
3443  aliminclude ("aliminclude", mh, "on"),
3444  climinclude ("climinclude", mh, "on"),
3445  xliminclude ("xliminclude", mh, "on"),
3446  yliminclude ("yliminclude", mh, "on")
3447 {
3450  cdata.set_id (ID_CDATA);
3453  xdata.set_id (ID_XDATA);
3454  ydata.set_id (ID_YDATA);
3455  alim.set_id (ID_ALIM);
3456  alim.set_hidden (true);
3457  clim.set_id (ID_CLIM);
3458  clim.set_hidden (true);
3459  xlim.set_id (ID_XLIM);
3460  xlim.set_hidden (true);
3461  ylim.set_id (ID_YLIM);
3462  ylim.set_hidden (true);
3464  aliminclude.set_hidden (true);
3466  climinclude.set_hidden (true);
3468  xliminclude.set_hidden (true);
3470  yliminclude.set_hidden (true);
3471  init ();
3472 }
3473 
3474 void
3475 image::properties::set (const caseless_str& pname_arg, const octave_value& val)
3476 {
3477  const std::set<std::string>& pnames = all_property_names ();
3478 
3479  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3480 
3481  if (error_state)
3482  return;
3483 
3484  if (pname.compare ("alphadata"))
3485  set_alphadata (val);
3486  else if (pname.compare ("alphadatamapping"))
3487  set_alphadatamapping (val);
3488  else if (pname.compare ("cdata"))
3489  set_cdata (val);
3490  else if (pname.compare ("cdatamapping"))
3491  set_cdatamapping (val);
3492  else if (pname.compare ("erasemode"))
3493  set_erasemode (val);
3494  else if (pname.compare ("xdata"))
3495  set_xdata (val);
3496  else if (pname.compare ("ydata"))
3497  set_ydata (val);
3498  else if (pname.compare ("aliminclude"))
3499  set_aliminclude (val);
3500  else if (pname.compare ("climinclude"))
3501  set_climinclude (val);
3502  else if (pname.compare ("xliminclude"))
3503  set_xliminclude (val);
3504  else if (pname.compare ("yliminclude"))
3505  set_yliminclude (val);
3506  else
3507  base_properties::set (pname, val);
3508 }
3509 
3511 image::properties::get (bool all) const
3512 {
3514 
3515  m.assign ("alphadata", octave_value (get_alphadata ()));
3516  m.assign ("alphadatamapping", octave_value (get_alphadatamapping ()));
3517  m.assign ("cdata", octave_value (get_cdata ()));
3518  m.assign ("cdatamapping", octave_value (get_cdatamapping ()));
3519  m.assign ("erasemode", octave_value (get_erasemode ()));
3520  m.assign ("xdata", octave_value (get_xdata ()));
3521  m.assign ("ydata", octave_value (get_ydata ()));
3522  if (all)
3523  m.assign ("alim", octave_value (get_alim ()));
3524  if (all)
3525  m.assign ("clim", octave_value (get_clim ()));
3526  if (all)
3527  m.assign ("xlim", octave_value (get_xlim ()));
3528  if (all)
3529  m.assign ("ylim", octave_value (get_ylim ()));
3530  if (all)
3531  m.assign ("aliminclude", octave_value (get_aliminclude ()));
3532  if (all)
3533  m.assign ("climinclude", octave_value (get_climinclude ()));
3534  if (all)
3535  m.assign ("xliminclude", octave_value (get_xliminclude ()));
3536  if (all)
3537  m.assign ("yliminclude", octave_value (get_yliminclude ()));
3538 
3539  return m;
3540 }
3541 
3543 image::properties::get (const caseless_str& pname_arg) const
3544 {
3545  octave_value retval;
3546 
3547  const std::set<std::string>& pnames = all_property_names ();
3548 
3549  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3550 
3551  if (error_state)
3552  return retval;
3553 
3554  if (pname.compare ("alphadata"))
3555  retval = get_alphadata ();
3556  else if (pname.compare ("alphadatamapping"))
3557  retval = get_alphadatamapping ();
3558  else if (pname.compare ("cdata"))
3559  retval = get_cdata ();
3560  else if (pname.compare ("cdatamapping"))
3561  retval = get_cdatamapping ();
3562  else if (pname.compare ("erasemode"))
3563  retval = get_erasemode ();
3564  else if (pname.compare ("xdata"))
3565  retval = get_xdata ();
3566  else if (pname.compare ("ydata"))
3567  retval = get_ydata ();
3568  else if (pname.compare ("alim"))
3569  retval = get_alim ();
3570  else if (pname.compare ("clim"))
3571  retval = get_clim ();
3572  else if (pname.compare ("xlim"))
3573  retval = get_xlim ();
3574  else if (pname.compare ("ylim"))
3575  retval = get_ylim ();
3576  else if (pname.compare ("aliminclude"))
3577  retval = get_aliminclude ();
3578  else if (pname.compare ("climinclude"))
3579  retval = get_climinclude ();
3580  else if (pname.compare ("xliminclude"))
3581  retval = get_xliminclude ();
3582  else if (pname.compare ("yliminclude"))
3583  retval = get_yliminclude ();
3584  else
3585  retval = base_properties::get (pname);
3586 
3587  return retval;
3588 }
3589 
3590 property
3592 {
3593  const std::set<std::string>& pnames = all_property_names ();
3594 
3595  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3596 
3597  if (error_state)
3598  return property ();
3599 
3600  if (pname.compare ("alphadata"))
3601  return property (&alphadata, true);
3602  else if (pname.compare ("alphadatamapping"))
3603  return property (&alphadatamapping, true);
3604  else if (pname.compare ("cdata"))
3605  return property (&cdata, true);
3606  else if (pname.compare ("cdatamapping"))
3607  return property (&cdatamapping, true);
3608  else if (pname.compare ("erasemode"))
3609  return property (&erasemode, true);
3610  else if (pname.compare ("xdata"))
3611  return property (&xdata, true);
3612  else if (pname.compare ("ydata"))
3613  return property (&ydata, true);
3614  else if (pname.compare ("alim"))
3615  return property (&alim, true);
3616  else if (pname.compare ("clim"))
3617  return property (&clim, true);
3618  else if (pname.compare ("xlim"))
3619  return property (&xlim, true);
3620  else if (pname.compare ("ylim"))
3621  return property (&ylim, true);
3622  else if (pname.compare ("aliminclude"))
3623  return property (&aliminclude, true);
3624  else if (pname.compare ("climinclude"))
3625  return property (&climinclude, true);
3626  else if (pname.compare ("xliminclude"))
3627  return property (&xliminclude, true);
3628  else if (pname.compare ("yliminclude"))
3629  return property (&yliminclude, true);
3630  else
3631  return base_properties::get_property (pname);
3632 }
3633 
3636 {
3638 
3639  m["alphadata"] = Matrix ();
3640  m["alphadatamapping"] = "scaled";
3641  m["cdata"] = Matrix ();
3642  m["cdatamapping"] = "direct";
3643  m["erasemode"] = "normal";
3644  m["xdata"] = Matrix ();
3645  m["ydata"] = Matrix ();
3646  m["alim"] = Matrix ();
3647  m["clim"] = Matrix ();
3648  m["xlim"] = Matrix ();
3649  m["ylim"] = Matrix ();
3650  m["aliminclude"] = "on";
3651  m["climinclude"] = "on";
3652  m["xliminclude"] = "on";
3653  m["yliminclude"] = "on";
3654 
3655  return m;
3656 }
3657 
3658 std::string image::properties::go_name ("image");
3659 
3660 std::set<std::string>
3662 {
3663  static std::set<std::string> all_pnames;
3664 
3665  static bool initialized = false;
3666 
3667  if (! initialized)
3668  {
3669  all_pnames.insert ("alphadata");
3670  all_pnames.insert ("alphadatamapping");
3671  all_pnames.insert ("cdata");
3672  all_pnames.insert ("cdatamapping");
3673  all_pnames.insert ("erasemode");
3674  all_pnames.insert ("xdata");
3675  all_pnames.insert ("ydata");
3676  all_pnames.insert ("alim");
3677  all_pnames.insert ("clim");
3678  all_pnames.insert ("xlim");
3679  all_pnames.insert ("ylim");
3680  all_pnames.insert ("aliminclude");
3681  all_pnames.insert ("climinclude");
3682  all_pnames.insert ("xliminclude");
3683  all_pnames.insert ("yliminclude");
3684 
3685  std::set<std::string> base_pnames = base_properties::core_property_names ();
3686  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
3687 
3688  initialized = true;
3689  }
3690 
3691  return all_pnames;
3692 }
3693 
3694 bool
3696 {
3697  std::set<std::string> pnames = core_property_names ();
3698 
3699  return pnames.find (pname) != pnames.end ();
3700 }
3701 
3702 std::set<std::string>
3704 {
3705  static std::set<std::string> all_pnames = core_property_names ();
3706 
3707  std::set<std::string> retval = all_pnames;
3708  std::set<std::string> base_props = base_properties::all_property_names ();
3709  retval.insert (base_props.begin (), base_props.end ());
3710 
3711  return retval;
3712 }
3713 
3714 bool
3716 {
3717  std::set<std::string> pnames = all_property_names ();
3718 
3719  return pnames.find (pname) != pnames.end ();
3720 }
3721 
3722 // ******** patch ********
3723 
3725  : base_properties (go_name, mh, p),
3726  alphadatamapping ("alphadatamapping", mh, "none|{scaled}|direct"),
3727  ambientstrength ("ambientstrength", mh, 0.3),
3728  backfacelighting ("backfacelighting", mh, "unlit|lit|{reverselit}"),
3729  cdata ("cdata", mh, Matrix ()),
3730  cdatamapping ("cdatamapping", mh, "{scaled}|direct"),
3731  diffusestrength ("diffusestrength", mh, 0.6),
3732  displayname ("displayname", mh, ""),
3733  edgealpha ("edgealpha", mh, double_radio_property (1.0, radio_values ("flat|interp"))),
3734  edgecolor ("edgecolor", mh, color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"))),
3735  edgelighting ("edgelighting", mh, "{none}|flat|gouraud|phong"),
3736  erasemode ("erasemode", mh, "{normal}|background|xor|none"),
3737  facealpha ("facealpha", mh, double_radio_property (1.0, radio_values ("flat|interp"))),
3738  facecolor ("facecolor", mh, color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"))),
3739  facelighting ("facelighting", mh, "{none}|flat|gouraud|phong"),
3740  faces ("faces", mh, Matrix ()),
3741  facevertexalphadata ("facevertexalphadata", mh, Matrix ()),
3742  facevertexcdata ("facevertexcdata", mh, Matrix ()),
3743  interpreter ("interpreter", mh, "{tex}|none|latex"),
3744  linestyle ("linestyle", mh, "{-}|--|:|-.|none"),
3745  linewidth ("linewidth", mh, 0.5),
3746  marker ("marker", mh, "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram"),
3747  markeredgecolor ("markeredgecolor", mh, color_property (radio_values ("none|{auto}|flat"), color_values (0, 0, 0))),
3748  markerfacecolor ("markerfacecolor", mh, color_property (radio_values ("{none}|auto|flat"), color_values (0, 0, 0))),
3749  markersize ("markersize", mh, 6),
3750  normalmode ("normalmode", mh, "{auto}|manual"),
3751  specularcolorreflectance ("specularcolorreflectance", mh, 1.0),
3752  specularexponent ("specularexponent", mh, 10.0),
3753  specularstrength ("specularstrength", mh, 0.6),
3754  vertexnormals ("vertexnormals", mh, Matrix ()),
3755  vertices ("vertices", mh, Matrix ()),
3756  xdata ("xdata", mh, Matrix ()),
3757  ydata ("ydata", mh, Matrix ()),
3758  zdata ("zdata", mh, Matrix ()),
3759  alim ("alim", mh, Matrix ()),
3760  clim ("clim", mh, Matrix ()),
3761  xlim ("xlim", mh, Matrix ()),
3762  ylim ("ylim", mh, Matrix ()),
3763  zlim ("zlim", mh, Matrix ()),
3764  aliminclude ("aliminclude", mh, "on"),
3765  climinclude ("climinclude", mh, "on"),
3766  xliminclude ("xliminclude", mh, "on"),
3767  yliminclude ("yliminclude", mh, "on"),
3768  zliminclude ("zliminclude", mh, "on")
3769 {
3773  cdata.set_id (ID_CDATA);
3784  faces.set_id (ID_FACES);
3800  xdata.set_id (ID_XDATA);
3801  ydata.set_id (ID_YDATA);
3802  zdata.set_id (ID_ZDATA);
3803  alim.set_id (ID_ALIM);
3804  alim.set_hidden (true);
3805  clim.set_id (ID_CLIM);
3806  clim.set_hidden (true);
3807  xlim.set_id (ID_XLIM);
3808  xlim.set_hidden (true);
3809  ylim.set_id (ID_YLIM);
3810  ylim.set_hidden (true);
3811  zlim.set_id (ID_ZLIM);
3812  zlim.set_hidden (true);
3814  aliminclude.set_hidden (true);
3816  climinclude.set_hidden (true);
3818  xliminclude.set_hidden (true);
3820  yliminclude.set_hidden (true);
3822  zliminclude.set_hidden (true);
3823  init ();
3824 }
3825 
3826 void
3827 patch::properties::set (const caseless_str& pname_arg, const octave_value& val)
3828 {
3829  const std::set<std::string>& pnames = all_property_names ();
3830 
3831  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3832 
3833  if (error_state)
3834  return;
3835 
3836  if (pname.compare ("alphadatamapping"))
3837  set_alphadatamapping (val);
3838  else if (pname.compare ("ambientstrength"))
3839  set_ambientstrength (val);
3840  else if (pname.compare ("backfacelighting"))
3841  set_backfacelighting (val);
3842  else if (pname.compare ("cdata"))
3843  set_cdata (val);
3844  else if (pname.compare ("cdatamapping"))
3845  set_cdatamapping (val);
3846  else if (pname.compare ("diffusestrength"))
3847  set_diffusestrength (val);
3848  else if (pname.compare ("displayname"))
3849  set_displayname (val);
3850  else if (pname.compare ("edgealpha"))
3851  set_edgealpha (val);
3852  else if (pname.compare ("edgecolor"))
3853  set_edgecolor (val);
3854  else if (pname.compare ("edgelighting"))
3855  set_edgelighting (val);
3856  else if (pname.compare ("erasemode"))
3857  set_erasemode (val);
3858  else if (pname.compare ("facealpha"))
3859  set_facealpha (val);
3860  else if (pname.compare ("facecolor"))
3861  set_facecolor (val);
3862  else if (pname.compare ("facelighting"))
3863  set_facelighting (val);
3864  else if (pname.compare ("faces"))
3865  set_faces (val);
3866  else if (pname.compare ("facevertexalphadata"))
3867  set_facevertexalphadata (val);
3868  else if (pname.compare ("facevertexcdata"))
3869  set_facevertexcdata (val);
3870  else if (pname.compare ("interpreter"))
3871  set_interpreter (val);
3872  else if (pname.compare ("linestyle"))
3873  set_linestyle (val);
3874  else if (pname.compare ("linewidth"))
3875  set_linewidth (val);
3876  else if (pname.compare ("marker"))
3877  set_marker (val);
3878  else if (pname.compare ("markeredgecolor"))
3879  set_markeredgecolor (val);
3880  else if (pname.compare ("markerfacecolor"))
3881  set_markerfacecolor (val);
3882  else if (pname.compare ("markersize"))
3883  set_markersize (val);
3884  else if (pname.compare ("normalmode"))
3885  set_normalmode (val);
3886  else if (pname.compare ("specularcolorreflectance"))
3887  set_specularcolorreflectance (val);
3888  else if (pname.compare ("specularexponent"))
3889  set_specularexponent (val);
3890  else if (pname.compare ("specularstrength"))
3891  set_specularstrength (val);
3892  else if (pname.compare ("vertexnormals"))
3893  set_vertexnormals (val);
3894  else if (pname.compare ("vertices"))
3895  set_vertices (val);
3896  else if (pname.compare ("xdata"))
3897  set_xdata (val);
3898  else if (pname.compare ("ydata"))
3899  set_ydata (val);
3900  else if (pname.compare ("zdata"))
3901  set_zdata (val);
3902  else if (pname.compare ("aliminclude"))
3903  set_aliminclude (val);
3904  else if (pname.compare ("climinclude"))
3905  set_climinclude (val);
3906  else if (pname.compare ("xliminclude"))
3907  set_xliminclude (val);
3908  else if (pname.compare ("yliminclude"))
3909  set_yliminclude (val);
3910  else if (pname.compare ("zliminclude"))
3911  set_zliminclude (val);
3912  else
3913  base_properties::set (pname, val);
3914 }
3915 
3917 patch::properties::get (bool all) const
3918 {
3920 
3921  m.assign ("alphadatamapping", octave_value (get_alphadatamapping ()));
3922  m.assign ("ambientstrength", octave_value (get_ambientstrength ()));
3923  m.assign ("backfacelighting", octave_value (get_backfacelighting ()));
3924  m.assign ("cdata", octave_value (get_cdata ()));
3925  m.assign ("cdatamapping", octave_value (get_cdatamapping ()));
3926  m.assign ("diffusestrength", octave_value (get_diffusestrength ()));
3927  m.assign ("displayname", octave_value (get_displayname ()));
3928  m.assign ("edgealpha", octave_value (get_edgealpha ()));
3929  m.assign ("edgecolor", octave_value (get_edgecolor ()));
3930  m.assign ("edgelighting", octave_value (get_edgelighting ()));
3931  m.assign ("erasemode", octave_value (get_erasemode ()));
3932  m.assign ("facealpha", octave_value (get_facealpha ()));
3933  m.assign ("facecolor", octave_value (get_facecolor ()));
3934  m.assign ("facelighting", octave_value (get_facelighting ()));
3935  m.assign ("faces", octave_value (get_faces ()));
3936  m.assign ("facevertexalphadata", octave_value (get_facevertexalphadata ()));
3937  m.assign ("facevertexcdata", octave_value (get_facevertexcdata ()));
3938  m.assign ("interpreter", octave_value (get_interpreter ()));
3939  m.assign ("linestyle", octave_value (get_linestyle ()));
3940  m.assign ("linewidth", octave_value (get_linewidth ()));
3941  m.assign ("marker", octave_value (get_marker ()));
3942  m.assign ("markeredgecolor", octave_value (get_markeredgecolor ()));
3943  m.assign ("markerfacecolor", octave_value (get_markerfacecolor ()));
3944  m.assign ("markersize", octave_value (get_markersize ()));
3945  m.assign ("normalmode", octave_value (get_normalmode ()));
3946  m.assign ("specularcolorreflectance", octave_value (get_specularcolorreflectance ()));
3947  m.assign ("specularexponent", octave_value (get_specularexponent ()));
3948  m.assign ("specularstrength", octave_value (get_specularstrength ()));
3949  m.assign ("vertexnormals", octave_value (get_vertexnormals ()));
3950  m.assign ("vertices", octave_value (get_vertices ()));
3951  m.assign ("xdata", octave_value (get_xdata ()));
3952  m.assign ("ydata", octave_value (get_ydata ()));
3953  m.assign ("zdata", octave_value (get_zdata ()));
3954  if (all)
3955  m.assign ("alim", octave_value (get_alim ()));
3956  if (all)
3957  m.assign ("clim", octave_value (get_clim ()));
3958  if (all)
3959  m.assign ("xlim", octave_value (get_xlim ()));
3960  if (all)
3961  m.assign ("ylim", octave_value (get_ylim ()));
3962  if (all)
3963  m.assign ("zlim", octave_value (get_zlim ()));
3964  if (all)
3965  m.assign ("aliminclude", octave_value (get_aliminclude ()));
3966  if (all)
3967  m.assign ("climinclude", octave_value (get_climinclude ()));
3968  if (all)
3969  m.assign ("xliminclude", octave_value (get_xliminclude ()));
3970  if (all)
3971  m.assign ("yliminclude", octave_value (get_yliminclude ()));
3972  if (all)
3973  m.assign ("zliminclude", octave_value (get_zliminclude ()));
3974 
3975  return m;
3976 }
3977 
3979 patch::properties::get (const caseless_str& pname_arg) const
3980 {
3981  octave_value retval;
3982 
3983  const std::set<std::string>& pnames = all_property_names ();
3984 
3985  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
3986 
3987  if (error_state)
3988  return retval;
3989 
3990  if (pname.compare ("alphadatamapping"))
3991  retval = get_alphadatamapping ();
3992  else if (pname.compare ("ambientstrength"))
3993  retval = get_ambientstrength ();
3994  else if (pname.compare ("backfacelighting"))
3995  retval = get_backfacelighting ();
3996  else if (pname.compare ("cdata"))
3997  retval = get_cdata ();
3998  else if (pname.compare ("cdatamapping"))
3999  retval = get_cdatamapping ();
4000  else if (pname.compare ("diffusestrength"))
4001  retval = get_diffusestrength ();
4002  else if (pname.compare ("displayname"))
4003  retval = get_displayname ();
4004  else if (pname.compare ("edgealpha"))
4005  retval = get_edgealpha ();
4006  else if (pname.compare ("edgecolor"))
4007  retval = get_edgecolor ();
4008  else if (pname.compare ("edgelighting"))
4009  retval = get_edgelighting ();
4010  else if (pname.compare ("erasemode"))
4011  retval = get_erasemode ();
4012  else if (pname.compare ("facealpha"))
4013  retval = get_facealpha ();
4014  else if (pname.compare ("facecolor"))
4015  retval = get_facecolor ();
4016  else if (pname.compare ("facelighting"))
4017  retval = get_facelighting ();
4018  else if (pname.compare ("faces"))
4019  retval = get_faces ();
4020  else if (pname.compare ("facevertexalphadata"))
4021  retval = get_facevertexalphadata ();
4022  else if (pname.compare ("facevertexcdata"))
4023  retval = get_facevertexcdata ();
4024  else if (pname.compare ("interpreter"))
4025  retval = get_interpreter ();
4026  else if (pname.compare ("linestyle"))
4027  retval = get_linestyle ();
4028  else if (pname.compare ("linewidth"))
4029  retval = get_linewidth ();
4030  else if (pname.compare ("marker"))
4031  retval = get_marker ();
4032  else if (pname.compare ("markeredgecolor"))
4033  retval = get_markeredgecolor ();
4034  else if (pname.compare ("markerfacecolor"))
4035  retval = get_markerfacecolor ();
4036  else if (pname.compare ("markersize"))
4037  retval = get_markersize ();
4038  else if (pname.compare ("normalmode"))
4039  retval = get_normalmode ();
4040  else if (pname.compare ("specularcolorreflectance"))
4041  retval = get_specularcolorreflectance ();
4042  else if (pname.compare ("specularexponent"))
4043  retval = get_specularexponent ();
4044  else if (pname.compare ("specularstrength"))
4045  retval = get_specularstrength ();
4046  else if (pname.compare ("vertexnormals"))
4047  retval = get_vertexnormals ();
4048  else if (pname.compare ("vertices"))
4049  retval = get_vertices ();
4050  else if (pname.compare ("xdata"))
4051  retval = get_xdata ();
4052  else if (pname.compare ("ydata"))
4053  retval = get_ydata ();
4054  else if (pname.compare ("zdata"))
4055  retval = get_zdata ();
4056  else if (pname.compare ("alim"))
4057  retval = get_alim ();
4058  else if (pname.compare ("clim"))
4059  retval = get_clim ();
4060  else if (pname.compare ("xlim"))
4061  retval = get_xlim ();
4062  else if (pname.compare ("ylim"))
4063  retval = get_ylim ();
4064  else if (pname.compare ("zlim"))
4065  retval = get_zlim ();
4066  else if (pname.compare ("aliminclude"))
4067  retval = get_aliminclude ();
4068  else if (pname.compare ("climinclude"))
4069  retval = get_climinclude ();
4070  else if (pname.compare ("xliminclude"))
4071  retval = get_xliminclude ();
4072  else if (pname.compare ("yliminclude"))
4073  retval = get_yliminclude ();
4074  else if (pname.compare ("zliminclude"))
4075  retval = get_zliminclude ();
4076  else
4077  retval = base_properties::get (pname);
4078 
4079  return retval;
4080 }
4081 
4082 property
4084 {
4085  const std::set<std::string>& pnames = all_property_names ();
4086 
4087  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
4088 
4089  if (error_state)
4090  return property ();
4091 
4092  if (pname.compare ("alphadatamapping"))
4093  return property (&alphadatamapping, true);
4094  else if (pname.compare ("ambientstrength"))
4095  return property (&ambientstrength, true);
4096  else if (pname.compare ("backfacelighting"))
4097  return property (&backfacelighting, true);
4098  else if (pname.compare ("cdata"))
4099  return property (&cdata, true);
4100  else if (pname.compare ("cdatamapping"))
4101  return property (&cdatamapping, true);
4102  else if (pname.compare ("diffusestrength"))
4103  return property (&diffusestrength, true);
4104  else if (pname.compare ("displayname"))
4105  return property (&displayname, true);
4106  else if (pname.compare ("edgealpha"))
4107  return property (&edgealpha, true);
4108  else if (pname.compare ("edgecolor"))
4109  return property (&edgecolor, true);
4110  else if (pname.compare ("edgelighting"))
4111  return property (&edgelighting, true);
4112  else if (pname.compare ("erasemode"))
4113  return property (&erasemode, true);
4114  else if (pname.compare ("facealpha"))
4115  return property (&facealpha, true);
4116  else if (pname.compare ("facecolor"))
4117  return property (&facecolor, true);
4118  else if (pname.compare ("facelighting"))
4119  return property (&facelighting, true);
4120  else if (pname.compare ("faces"))
4121  return property (&faces, true);
4122  else if (pname.compare ("facevertexalphadata"))
4123  return property (&facevertexalphadata, true);
4124  else if (pname.compare ("facevertexcdata"))
4125  return property (&facevertexcdata, true);
4126  else if (pname.compare ("interpreter"))
4127  return property (&interpreter, true);
4128  else if (pname.compare ("linestyle"))
4129  return property (&linestyle, true);
4130  else if (pname.compare ("linewidth"))
4131  return property (&linewidth, true);
4132  else if (pname.compare ("marker"))
4133  return property (&marker, true);
4134  else if (pname.compare ("markeredgecolor"))
4135  return property (&markeredgecolor, true);
4136  else if (pname.compare ("markerfacecolor"))
4137  return property (&markerfacecolor, true);
4138  else if (pname.compare ("markersize"))
4139  return property (&markersize, true);
4140  else if (pname.compare ("normalmode"))
4141  return property (&normalmode, true);
4142  else if (pname.compare ("specularcolorreflectance"))
4143  return property (&specularcolorreflectance, true);
4144  else if (pname.compare ("specularexponent"))
4145  return property (&specularexponent, true);
4146  else if (pname.compare ("specularstrength"))
4147  return property (&specularstrength, true);
4148  else if (pname.compare ("vertexnormals"))
4149  return property (&vertexnormals, true);
4150  else if (pname.compare ("vertices"))
4151  return property (&vertices, true);
4152  else if (pname.compare ("xdata"))
4153  return property (&xdata, true);
4154  else if (pname.compare ("ydata"))
4155  return property (&ydata, true);
4156  else if (pname.compare ("zdata"))
4157  return property (&zdata, true);
4158  else if (pname.compare ("alim"))
4159  return property (&alim, true);
4160  else if (pname.compare ("clim"))
4161  return property (&clim, true);
4162  else if (pname.compare ("xlim"))
4163  return property (&xlim, true);
4164  else if (pname.compare ("ylim"))
4165  return property (&ylim, true);
4166  else if (pname.compare ("zlim"))
4167  return property (&zlim, true);
4168  else if (pname.compare ("aliminclude"))
4169  return property (&aliminclude, true);
4170  else if (pname.compare ("climinclude"))
4171  return property (&climinclude, true);
4172  else if (pname.compare ("xliminclude"))
4173  return property (&xliminclude, true);
4174  else if (pname.compare ("yliminclude"))
4175  return property (&yliminclude, true);
4176  else if (pname.compare ("zliminclude"))
4177  return property (&zliminclude, true);
4178  else
4179  return base_properties::get_property (pname);
4180 }
4181 
4184 {
4186 
4187  m["alphadatamapping"] = "scaled";
4188  m["ambientstrength"] = 0.3;
4189  m["backfacelighting"] = "reverselit";
4190  m["cdata"] = Matrix ();
4191  m["cdatamapping"] = "scaled";
4192  m["diffusestrength"] = 0.6;
4193  m["displayname"] = "";
4194  m["edgealpha"] = double_radio_property (1.0, radio_values ("flat|interp"));
4195  m["edgecolor"] = color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"));
4196  m["edgelighting"] = "none";
4197  m["erasemode"] = "normal";
4198  m["facealpha"] = double_radio_property (1.0, radio_values ("flat|interp"));
4199  m["facecolor"] = color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"));
4200  m["facelighting"] = "none";
4201  m["faces"] = Matrix ();
4202  m["facevertexalphadata"] = Matrix ();
4203  m["facevertexcdata"] = Matrix ();
4204  m["interpreter"] = "tex";
4205  m["linestyle"] = "-";
4206  m["linewidth"] = 0.5;
4207  m["marker"] = "none";
4208  m["markeredgecolor"] = color_property (radio_values ("none|{auto}|flat"), color_values (0, 0, 0));
4209  m["markerfacecolor"] = color_property (radio_values ("{none}|auto|flat"), color_values (0, 0, 0));
4210  m["markersize"] = 6;
4211  m["normalmode"] = "auto";
4212  m["specularcolorreflectance"] = 1.0;
4213  m["specularexponent"] = 10.0;
4214  m["specularstrength"] = 0.6;
4215  m["vertexnormals"] = Matrix ();
4216  m["vertices"] = Matrix ();
4217  m["xdata"] = Matrix ();
4218  m["ydata"] = Matrix ();
4219  m["zdata"] = Matrix ();
4220  m["alim"] = Matrix ();
4221  m["clim"] = Matrix ();
4222  m["xlim"] = Matrix ();
4223  m["ylim"] = Matrix ();
4224  m["zlim"] = Matrix ();
4225  m["aliminclude"] = "on";
4226  m["climinclude"] = "on";
4227  m["xliminclude"] = "on";
4228  m["yliminclude"] = "on";
4229  m["zliminclude"] = "on";
4230 
4231  return m;
4232 }
4233 
4234 std::string patch::properties::go_name ("patch");
4235 
4236 std::set<std::string>
4238 {
4239  static std::set<std::string> all_pnames;
4240 
4241  static bool initialized = false;
4242 
4243  if (! initialized)
4244  {
4245  all_pnames.insert ("alphadatamapping");
4246  all_pnames.insert ("ambientstrength");
4247  all_pnames.insert ("backfacelighting");
4248  all_pnames.insert ("cdata");
4249  all_pnames.insert ("cdatamapping");
4250  all_pnames.insert ("diffusestrength");
4251  all_pnames.insert ("displayname");
4252  all_pnames.insert ("edgealpha");
4253  all_pnames.insert ("edgecolor");
4254  all_pnames.insert ("edgelighting");
4255  all_pnames.insert ("erasemode");
4256  all_pnames.insert ("facealpha");
4257  all_pnames.insert ("facecolor");
4258  all_pnames.insert ("facelighting");
4259  all_pnames.insert ("faces");
4260  all_pnames.insert ("facevertexalphadata");
4261  all_pnames.insert ("facevertexcdata");
4262  all_pnames.insert ("interpreter");
4263  all_pnames.insert ("linestyle");
4264  all_pnames.insert ("linewidth");
4265  all_pnames.insert ("marker");
4266  all_pnames.insert ("markeredgecolor");
4267  all_pnames.insert ("markerfacecolor");
4268  all_pnames.insert ("markersize");
4269  all_pnames.insert ("normalmode");
4270  all_pnames.insert ("specularcolorreflectance");
4271  all_pnames.insert ("specularexponent");
4272  all_pnames.insert ("specularstrength");
4273  all_pnames.insert ("vertexnormals");
4274  all_pnames.insert ("vertices");
4275  all_pnames.insert ("xdata");
4276  all_pnames.insert ("ydata");
4277  all_pnames.insert ("zdata");
4278  all_pnames.insert ("alim");
4279  all_pnames.insert ("clim");
4280  all_pnames.insert ("xlim");
4281  all_pnames.insert ("ylim");
4282  all_pnames.insert ("zlim");
4283  all_pnames.insert ("aliminclude");
4284  all_pnames.insert ("climinclude");
4285  all_pnames.insert ("xliminclude");
4286  all_pnames.insert ("yliminclude");
4287  all_pnames.insert ("zliminclude");
4288 
4289  std::set<std::string> base_pnames = base_properties::core_property_names ();
4290  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
4291 
4292  initialized = true;
4293  }
4294 
4295  return all_pnames;
4296 }
4297 
4298 bool
4300 {
4301  std::set<std::string> pnames = core_property_names ();
4302 
4303  return pnames.find (pname) != pnames.end ();
4304 }
4305 
4306 std::set<std::string>
4308 {
4309  static std::set<std::string> all_pnames = core_property_names ();
4310 
4311  std::set<std::string> retval = all_pnames;
4312  std::set<std::string> base_props = base_properties::all_property_names ();
4313  retval.insert (base_props.begin (), base_props.end ());
4314 
4315  return retval;
4316 }
4317 
4318 bool
4320 {
4321  std::set<std::string> pnames = all_property_names ();
4322 
4323  return pnames.find (pname) != pnames.end ();
4324 }
4325 
4326 // ******** surface ********
4327 
4329  : base_properties (go_name, mh, p),
4330  alphadata ("alphadata", mh, Matrix ()),
4331  alphadatamapping ("alphadatamapping", mh, "none|direct|{scaled}"),
4332  ambientstrength ("ambientstrength", mh, 0.3),
4333  backfacelighting ("backfacelighting", mh, "unlit|lit|{reverselit}"),
4334  cdata ("cdata", mh, Matrix ()),
4335  cdatamapping ("cdatamapping", mh, "{scaled}|direct"),
4336  cdatasource ("cdatasource", mh, ""),
4337  diffusestrength ("diffusestrength", mh, 0.6),
4338  displayname ("displayname", mh, ""),
4339  edgealpha ("edgealpha", mh, double_radio_property (1.0, radio_values ("flat|interp"))),
4340  edgecolor ("edgecolor", mh, color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"))),
4341  edgelighting ("edgelighting", mh, "{none}|flat|gouraud|phong"),
4342  erasemode ("erasemode", mh, "{normal}|none|xor|background"),
4343  facealpha ("facealpha", mh, double_radio_property (1.0, radio_values ("flat|interp|texturemap"))),
4344  facecolor ("facecolor", mh, color_property (radio_values ("none|{flat}|interp|texturemap"), color_values (0, 0, 0))),
4345  facelighting ("facelighting", mh, "{none}|flat|gouraud|phong"),
4346  interpreter ("interpreter", mh, "{tex}|none|latex"),
4347  linestyle ("linestyle", mh, "{-}|--|:|-.|none"),
4348  linewidth ("linewidth", mh, 0.5),
4349  marker ("marker", mh, "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram"),
4350  markeredgecolor ("markeredgecolor", mh, color_property (radio_values ("none|{auto}|flat"), color_values (0, 0, 0))),
4351  markerfacecolor ("markerfacecolor", mh, color_property (radio_values ("{none}|auto|flat"), color_values (0, 0, 0))),
4352  markersize ("markersize", mh, 6),
4353  meshstyle ("meshstyle", mh, "{both}|row|column"),
4354  normalmode ("normalmode", mh, "{auto}|manual"),
4355  specularcolorreflectance ("specularcolorreflectance", mh, 1),
4356  specularexponent ("specularexponent", mh, 10),
4357  specularstrength ("specularstrength", mh, 0.9),
4358  vertexnormals ("vertexnormals", mh, Matrix ()),
4359  xdata ("xdata", mh, Matrix ()),
4360  xdatasource ("xdatasource", mh, ""),
4361  ydata ("ydata", mh, Matrix ()),
4362  ydatasource ("ydatasource", mh, ""),
4363  zdata ("zdata", mh, Matrix ()),
4364  zdatasource ("zdatasource", mh, ""),
4365  alim ("alim", mh, Matrix ()),
4366  clim ("clim", mh, Matrix ()),
4367  xlim ("xlim", mh, Matrix ()),
4368  ylim ("ylim", mh, Matrix ()),
4369  zlim ("zlim", mh, Matrix ()),
4370  aliminclude ("aliminclude", mh, "on"),
4371  climinclude ("climinclude", mh, "on"),
4372  xliminclude ("xliminclude", mh, "on"),
4373  yliminclude ("yliminclude", mh, "on"),
4374  zliminclude ("zliminclude", mh, "on")
4375 {
4380  cdata.set_id (ID_CDATA);
4405  xdata.set_id (ID_XDATA);
4407  ydata.set_id (ID_YDATA);
4409  zdata.set_id (ID_ZDATA);
4411  alim.set_id (ID_ALIM);
4412  alim.set_hidden (true);
4413  clim.set_id (ID_CLIM);
4414  clim.set_hidden (true);
4415  xlim.set_id (ID_XLIM);
4416  xlim.set_hidden (true);
4417  ylim.set_id (ID_YLIM);
4418  ylim.set_hidden (true);
4419  zlim.set_id (ID_ZLIM);
4420  zlim.set_hidden (true);
4422  aliminclude.set_hidden (true);
4424  climinclude.set_hidden (true);
4426  xliminclude.set_hidden (true);
4428  yliminclude.set_hidden (true);
4430  zliminclude.set_hidden (true);
4431  init ();
4432 }
4433 
4434 void
4436 {
4437  const std::set<std::string>& pnames = all_property_names ();
4438 
4439  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
4440 
4441  if (error_state)
4442  return;
4443 
4444  if (pname.compare ("alphadata"))
4445  set_alphadata (val);
4446  else if (pname.compare ("alphadatamapping"))
4447  set_alphadatamapping (val);
4448  else if (pname.compare ("ambientstrength"))
4449  set_ambientstrength (val);
4450  else if (pname.compare ("backfacelighting"))
4451  set_backfacelighting (val);
4452  else if (pname.compare ("cdata"))
4453  set_cdata (val);
4454  else if (pname.compare ("cdatamapping"))
4455  set_cdatamapping (val);
4456  else if (pname.compare ("cdatasource"))
4457  set_cdatasource (val);
4458  else if (pname.compare ("diffusestrength"))
4459  set_diffusestrength (val);
4460  else if (pname.compare ("displayname"))
4461  set_displayname (val);
4462  else if (pname.compare ("edgealpha"))
4463  set_edgealpha (val);
4464  else if (pname.compare ("edgecolor"))
4465  set_edgecolor (val);
4466  else if (pname.compare ("edgelighting"))
4467  set_edgelighting (val);
4468  else if (pname.compare ("erasemode"))
4469  set_erasemode (val);
4470  else if (pname.compare ("facealpha"))
4471  set_facealpha (val);
4472  else if (pname.compare ("facecolor"))
4473  set_facecolor (val);
4474  else if (pname.compare ("facelighting"))
4475  set_facelighting (val);
4476  else if (pname.compare ("interpreter"))
4477  set_interpreter (val);
4478  else if (pname.compare ("linestyle"))
4479  set_linestyle (val);
4480  else if (pname.compare ("linewidth"))
4481  set_linewidth (val);
4482  else if (pname.compare ("marker"))
4483  set_marker (val);
4484  else if (pname.compare ("markeredgecolor"))
4485  set_markeredgecolor (val);
4486  else if (pname.compare ("markerfacecolor"))
4487  set_markerfacecolor (val);
4488  else if (pname.compare ("markersize"))
4489  set_markersize (val);
4490  else if (pname.compare ("meshstyle"))
4491  set_meshstyle (val);
4492  else if (pname.compare ("normalmode"))
4493  set_normalmode (val);
4494  else if (pname.compare ("specularcolorreflectance"))
4495  set_specularcolorreflectance (val);
4496  else if (pname.compare ("specularexponent"))
4497  set_specularexponent (val);
4498  else if (pname.compare ("specularstrength"))
4499  set_specularstrength (val);
4500  else if (pname.compare ("vertexnormals"))
4501  set_vertexnormals (val);
4502  else if (pname.compare ("xdata"))
4503  set_xdata (val);
4504  else if (pname.compare ("xdatasource"))
4505  set_xdatasource (val);
4506  else if (pname.compare ("ydata"))
4507  set_ydata (val);
4508  else if (pname.compare ("ydatasource"))
4509  set_ydatasource (val);
4510  else if (pname.compare ("zdata"))
4511  set_zdata (val);
4512  else if (pname.compare ("zdatasource"))
4513  set_zdatasource (val);
4514  else if (pname.compare ("aliminclude"))
4515  set_aliminclude (val);
4516  else if (pname.compare ("climinclude"))
4517  set_climinclude (val);
4518  else if (pname.compare ("xliminclude"))
4519  set_xliminclude (val);
4520  else if (pname.compare ("yliminclude"))
4521  set_yliminclude (val);
4522  else if (pname.compare ("zliminclude"))
4523  set_zliminclude (val);
4524  else
4525  base_properties::set (pname, val);
4526 }
4527 
4530 {
4532 
4533  m.assign ("alphadata", octave_value (get_alphadata ()));
4534  m.assign ("alphadatamapping", octave_value (get_alphadatamapping ()));
4535  m.assign ("ambientstrength", octave_value (get_ambientstrength ()));
4536  m.assign ("backfacelighting", octave_value (get_backfacelighting ()));
4537  m.assign ("cdata", octave_value (get_cdata ()));
4538  m.assign ("cdatamapping", octave_value (get_cdatamapping ()));
4539  m.assign ("cdatasource", octave_value (get_cdatasource ()));
4540  m.assign ("diffusestrength", octave_value (get_diffusestrength ()));
4541  m.assign ("displayname", octave_value (get_displayname ()));
4542  m.assign ("edgealpha", octave_value (get_edgealpha ()));
4543  m.assign ("edgecolor", octave_value (get_edgecolor ()));
4544  m.assign ("edgelighting", octave_value (get_edgelighting ()));
4545  m.assign ("erasemode", octave_value (get_erasemode ()));
4546  m.assign ("facealpha", octave_value (get_facealpha ()));
4547  m.assign ("facecolor", octave_value (get_facecolor ()));
4548  m.assign ("facelighting", octave_value (get_facelighting ()));
4549  m.assign ("interpreter", octave_value (get_interpreter ()));
4550  m.assign ("linestyle", octave_value (get_linestyle ()));
4551  m.assign ("linewidth", octave_value (get_linewidth ()));
4552  m.assign ("marker", octave_value (get_marker ()));
4553  m.assign ("markeredgecolor", octave_value (get_markeredgecolor ()));
4554  m.assign ("markerfacecolor", octave_value (get_markerfacecolor ()));
4555  m.assign ("markersize", octave_value (get_markersize ()));
4556  m.assign ("meshstyle", octave_value (get_meshstyle ()));
4557  m.assign ("normalmode", octave_value (get_normalmode ()));
4558  m.assign ("specularcolorreflectance", octave_value (get_specularcolorreflectance ()));
4559  m.assign ("specularexponent", octave_value (get_specularexponent ()));
4560  m.assign ("specularstrength", octave_value (get_specularstrength ()));
4561  m.assign ("vertexnormals", octave_value (get_vertexnormals ()));
4562  m.assign ("xdata", octave_value (get_xdata ()));
4563  m.assign ("xdatasource", octave_value (get_xdatasource ()));
4564  m.assign ("ydata", octave_value (get_ydata ()));
4565  m.assign ("ydatasource", octave_value (get_ydatasource ()));
4566  m.assign ("zdata", octave_value (get_zdata ()));
4567  m.assign ("zdatasource", octave_value (get_zdatasource ()));
4568  if (all)
4569  m.assign ("alim", octave_value (get_alim ()));
4570  if (all)
4571  m.assign ("clim", octave_value (get_clim ()));
4572  if (all)
4573  m.assign ("xlim", octave_value (get_xlim ()));
4574  if (all)
4575  m.assign ("ylim", octave_value (get_ylim ()));
4576  if (all)
4577  m.assign ("zlim", octave_value (get_zlim ()));
4578  if (all)
4579  m.assign ("aliminclude", octave_value (get_aliminclude ()));
4580  if (all)
4581  m.assign ("climinclude", octave_value (get_climinclude ()));
4582  if (all)
4583  m.assign ("xliminclude", octave_value (get_xliminclude ()));
4584  if (all)
4585  m.assign ("yliminclude", octave_value (get_yliminclude ()));
4586  if (all)
4587  m.assign ("zliminclude", octave_value (get_zliminclude ()));
4588 
4589  return m;
4590 }
4591 
4593 surface::properties::get (const caseless_str& pname_arg) const
4594 {
4595  octave_value retval;
4596 
4597  const std::set<std::string>& pnames = all_property_names ();
4598 
4599  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
4600 
4601  if (error_state)
4602  return retval;
4603 
4604  if (pname.compare ("alphadata"))
4605  retval = get_alphadata ();
4606  else if (pname.compare ("alphadatamapping"))
4607  retval = get_alphadatamapping ();
4608  else if (pname.compare ("ambientstrength"))
4609  retval = get_ambientstrength ();
4610  else if (pname.compare ("backfacelighting"))
4611  retval = get_backfacelighting ();
4612  else if (pname.compare ("cdata"))
4613  retval = get_cdata ();
4614  else if (pname.compare ("cdatamapping"))
4615  retval = get_cdatamapping ();
4616  else if (pname.compare ("cdatasource"))
4617  retval = get_cdatasource ();
4618  else if (pname.compare ("diffusestrength"))
4619  retval = get_diffusestrength ();
4620  else if (pname.compare ("displayname"))
4621  retval = get_displayname ();
4622  else if (pname.compare ("edgealpha"))
4623  retval = get_edgealpha ();
4624  else if (pname.compare ("edgecolor"))
4625  retval = get_edgecolor ();
4626  else if (pname.compare ("edgelighting"))
4627  retval = get_edgelighting ();
4628  else if (pname.compare ("erasemode"))
4629  retval = get_erasemode ();
4630  else if (pname.compare ("facealpha"))
4631  retval = get_facealpha ();
4632  else if (pname.compare ("facecolor"))
4633  retval = get_facecolor ();
4634  else if (pname.compare ("facelighting"))
4635  retval = get_facelighting ();
4636  else if (pname.compare ("interpreter"))
4637  retval = get_interpreter ();
4638  else if (pname.compare ("linestyle"))
4639  retval = get_linestyle ();
4640  else if (pname.compare ("linewidth"))
4641  retval = get_linewidth ();
4642  else if (pname.compare ("marker"))
4643  retval = get_marker ();
4644  else if (pname.compare ("markeredgecolor"))
4645  retval = get_markeredgecolor ();
4646  else if (pname.compare ("markerfacecolor"))
4647  retval = get_markerfacecolor ();
4648  else if (pname.compare ("markersize"))
4649  retval = get_markersize ();
4650  else if (pname.compare ("meshstyle"))
4651  retval = get_meshstyle ();
4652  else if (pname.compare ("normalmode"))
4653  retval = get_normalmode ();
4654  else if (pname.compare ("specularcolorreflectance"))
4655  retval = get_specularcolorreflectance ();
4656  else if (pname.compare ("specularexponent"))
4657  retval = get_specularexponent ();
4658  else if (pname.compare ("specularstrength"))
4659  retval = get_specularstrength ();
4660  else if (pname.compare ("vertexnormals"))
4661  retval = get_vertexnormals ();
4662  else if (pname.compare ("xdata"))
4663  retval = get_xdata ();
4664  else if (pname.compare ("xdatasource"))
4665  retval = get_xdatasource ();
4666  else if (pname.compare ("ydata"))
4667  retval = get_ydata ();
4668  else if (pname.compare ("ydatasource"))
4669  retval = get_ydatasource ();
4670  else if (pname.compare ("zdata"))
4671  retval = get_zdata ();
4672  else if (pname.compare ("zdatasource"))
4673  retval = get_zdatasource ();
4674  else if (pname.compare ("alim"))
4675  retval = get_alim ();
4676  else if (pname.compare ("clim"))
4677  retval = get_clim ();
4678  else if (pname.compare ("xlim"))
4679  retval = get_xlim ();
4680  else if (pname.compare ("ylim"))
4681  retval = get_ylim ();
4682  else if (pname.compare ("zlim"))
4683  retval = get_zlim ();
4684  else if (pname.compare ("aliminclude"))
4685  retval = get_aliminclude ();
4686  else if (pname.compare ("climinclude"))
4687  retval = get_climinclude ();
4688  else if (pname.compare ("xliminclude"))
4689  retval = get_xliminclude ();
4690  else if (pname.compare ("yliminclude"))
4691  retval = get_yliminclude ();
4692  else if (pname.compare ("zliminclude"))
4693  retval = get_zliminclude ();
4694  else
4695  retval = base_properties::get (pname);
4696 
4697  return retval;
4698 }
4699 
4700 property
4702 {
4703  const std::set<std::string>& pnames = all_property_names ();
4704 
4705  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
4706 
4707  if (error_state)
4708  return property ();
4709 
4710  if (pname.compare ("alphadata"))
4711  return property (&alphadata, true);
4712  else if (pname.compare ("alphadatamapping"))
4713  return property (&alphadatamapping, true);
4714  else if (pname.compare ("ambientstrength"))
4715  return property (&ambientstrength, true);
4716  else if (pname.compare ("backfacelighting"))
4717  return property (&backfacelighting, true);
4718  else if (pname.compare ("cdata"))
4719  return property (&cdata, true);
4720  else if (pname.compare ("cdatamapping"))
4721  return property (&cdatamapping, true);
4722  else if (pname.compare ("cdatasource"))
4723  return property (&cdatasource, true);
4724  else if (pname.compare ("diffusestrength"))
4725  return property (&diffusestrength, true);
4726  else if (pname.compare ("displayname"))
4727  return property (&displayname, true);
4728  else if (pname.compare ("edgealpha"))
4729  return property (&edgealpha, true);
4730  else if (pname.compare ("edgecolor"))
4731  return property (&edgecolor, true);
4732  else if (pname.compare ("edgelighting"))
4733  return property (&edgelighting, true);
4734  else if (pname.compare ("erasemode"))
4735  return property (&erasemode, true);
4736  else if (pname.compare ("facealpha"))
4737  return property (&facealpha, true);
4738  else if (pname.compare ("facecolor"))
4739  return property (&facecolor, true);
4740  else if (pname.compare ("facelighting"))
4741  return property (&facelighting, true);
4742  else if (pname.compare ("interpreter"))
4743  return property (&interpreter, true);
4744  else if (pname.compare ("linestyle"))
4745  return property (&linestyle, true);
4746  else if (pname.compare ("linewidth"))
4747  return property (&linewidth, true);
4748  else if (pname.compare ("marker"))
4749  return property (&marker, true);
4750  else if (pname.compare ("markeredgecolor"))
4751  return property (&markeredgecolor, true);
4752  else if (pname.compare ("markerfacecolor"))
4753  return property (&markerfacecolor, true);
4754  else if (pname.compare ("markersize"))
4755  return property (&markersize, true);
4756  else if (pname.compare ("meshstyle"))
4757  return property (&meshstyle, true);
4758  else if (pname.compare ("normalmode"))
4759  return property (&normalmode, true);
4760  else if (pname.compare ("specularcolorreflectance"))
4761  return property (&specularcolorreflectance, true);
4762  else if (pname.compare ("specularexponent"))
4763  return property (&specularexponent, true);
4764  else if (pname.compare ("specularstrength"))
4765  return property (&specularstrength, true);
4766  else if (pname.compare ("vertexnormals"))
4767  return property (&vertexnormals, true);
4768  else if (pname.compare ("xdata"))
4769  return property (&xdata, true);
4770  else if (pname.compare ("xdatasource"))
4771  return property (&xdatasource, true);
4772  else if (pname.compare ("ydata"))
4773  return property (&ydata, true);
4774  else if (pname.compare ("ydatasource"))
4775  return property (&ydatasource, true);
4776  else if (pname.compare ("zdata"))
4777  return property (&zdata, true);
4778  else if (pname.compare ("zdatasource"))
4779  return property (&zdatasource, true);
4780  else if (pname.compare ("alim"))
4781  return property (&alim, true);
4782  else if (pname.compare ("clim"))
4783  return property (&clim, true);
4784  else if (pname.compare ("xlim"))
4785  return property (&xlim, true);
4786  else if (pname.compare ("ylim"))
4787  return property (&ylim, true);
4788  else if (pname.compare ("zlim"))
4789  return property (&zlim, true);
4790  else if (pname.compare ("aliminclude"))
4791  return property (&aliminclude, true);
4792  else if (pname.compare ("climinclude"))
4793  return property (&climinclude, true);
4794  else if (pname.compare ("xliminclude"))
4795  return property (&xliminclude, true);
4796  else if (pname.compare ("yliminclude"))
4797  return property (&yliminclude, true);
4798  else if (pname.compare ("zliminclude"))
4799  return property (&zliminclude, true);
4800  else
4801  return base_properties::get_property (pname);
4802 }
4803 
4806 {
4808 
4809  m["alphadata"] = Matrix ();
4810  m["alphadatamapping"] = "scaled";
4811  m["ambientstrength"] = 0.3;
4812  m["backfacelighting"] = "reverselit";
4813  m["cdata"] = Matrix ();
4814  m["cdatamapping"] = "scaled";
4815  m["cdatasource"] = "";
4816  m["diffusestrength"] = 0.6;
4817  m["displayname"] = "";
4818  m["edgealpha"] = double_radio_property (1.0, radio_values ("flat|interp"));
4819  m["edgecolor"] = color_property (color_values (0, 0, 0), radio_values ("none|flat|interp"));
4820  m["edgelighting"] = "none";
4821  m["erasemode"] = "normal";
4822  m["facealpha"] = double_radio_property (1.0, radio_values ("flat|interp|texturemap"));
4823  m["facecolor"] = color_property (radio_values ("none|{flat}|interp|texturemap"), color_values (0, 0, 0));
4824  m["facelighting"] = "none";
4825  m["interpreter"] = "tex";
4826  m["linestyle"] = "-";
4827  m["linewidth"] = 0.5;
4828  m["marker"] = "none";
4829  m["markeredgecolor"] = color_property (radio_values ("none|{auto}|flat"), color_values (0, 0, 0));
4830  m["markerfacecolor"] = color_property (radio_values ("{none}|auto|flat"), color_values (0, 0, 0));
4831  m["markersize"] = 6;
4832  m["meshstyle"] = "both";
4833  m["normalmode"] = "auto";
4834  m["specularcolorreflectance"] = 1;
4835  m["specularexponent"] = 10;
4836  m["specularstrength"] = 0.9;
4837  m["vertexnormals"] = Matrix ();
4838  m["xdata"] = Matrix ();
4839  m["xdatasource"] = "";
4840  m["ydata"] = Matrix ();
4841  m["ydatasource"] = "";
4842  m["zdata"] = Matrix ();
4843  m["zdatasource"] = "";
4844  m["alim"] = Matrix ();
4845  m["clim"] = Matrix ();
4846  m["xlim"] = Matrix ();
4847  m["ylim"] = Matrix ();
4848  m["zlim"] = Matrix ();
4849  m["aliminclude"] = "on";
4850  m["climinclude"] = "on";
4851  m["xliminclude"] = "on";
4852  m["yliminclude"] = "on";
4853  m["zliminclude"] = "on";
4854 
4855  return m;
4856 }
4857 
4858 std::string surface::properties::go_name ("surface");
4859 
4860 std::set<std::string>
4862 {
4863  static std::set<std::string> all_pnames;
4864 
4865  static bool initialized = false;
4866 
4867  if (! initialized)
4868  {
4869  all_pnames.insert ("alphadata");
4870  all_pnames.insert ("alphadatamapping");
4871  all_pnames.insert ("ambientstrength");
4872  all_pnames.insert ("backfacelighting");
4873  all_pnames.insert ("cdata");
4874  all_pnames.insert ("cdatamapping");
4875  all_pnames.insert ("cdatasource");
4876  all_pnames.insert ("diffusestrength");
4877  all_pnames.insert ("displayname");
4878  all_pnames.insert ("edgealpha");
4879  all_pnames.insert ("edgecolor");
4880  all_pnames.insert ("edgelighting");
4881  all_pnames.insert ("erasemode");
4882  all_pnames.insert ("facealpha");
4883  all_pnames.insert ("facecolor");
4884  all_pnames.insert ("facelighting");
4885  all_pnames.insert ("interpreter");
4886  all_pnames.insert ("linestyle");
4887  all_pnames.insert ("linewidth");
4888  all_pnames.insert ("marker");
4889  all_pnames.insert ("markeredgecolor");
4890  all_pnames.insert ("markerfacecolor");
4891  all_pnames.insert ("markersize");
4892  all_pnames.insert ("meshstyle");
4893  all_pnames.insert ("normalmode");
4894  all_pnames.insert ("specularcolorreflectance");
4895  all_pnames.insert ("specularexponent");
4896  all_pnames.insert ("specularstrength");
4897  all_pnames.insert ("vertexnormals");
4898  all_pnames.insert ("xdata");
4899  all_pnames.insert ("xdatasource");
4900  all_pnames.insert ("ydata");
4901  all_pnames.insert ("ydatasource");
4902  all_pnames.insert ("zdata");
4903  all_pnames.insert ("zdatasource");
4904  all_pnames.insert ("alim");
4905  all_pnames.insert ("clim");
4906  all_pnames.insert ("xlim");
4907  all_pnames.insert ("ylim");
4908  all_pnames.insert ("zlim");
4909  all_pnames.insert ("aliminclude");
4910  all_pnames.insert ("climinclude");
4911  all_pnames.insert ("xliminclude");
4912  all_pnames.insert ("yliminclude");
4913  all_pnames.insert ("zliminclude");
4914 
4915  std::set<std::string> base_pnames = base_properties::core_property_names ();
4916  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
4917 
4918  initialized = true;
4919  }
4920 
4921  return all_pnames;
4922 }
4923 
4924 bool
4926 {
4927  std::set<std::string> pnames = core_property_names ();
4928 
4929  return pnames.find (pname) != pnames.end ();
4930 }
4931 
4932 std::set<std::string>
4934 {
4935  static std::set<std::string> all_pnames = core_property_names ();
4936 
4937  std::set<std::string> retval = all_pnames;
4938  std::set<std::string> base_props = base_properties::all_property_names ();
4939  retval.insert (base_props.begin (), base_props.end ());
4940 
4941  return retval;
4942 }
4943 
4944 bool
4946 {
4947  std::set<std::string> pnames = all_property_names ();
4948 
4949  return pnames.find (pname) != pnames.end ();
4950 }
4951 
4952 // ******** hggroup ********
4953 
4955  : base_properties (go_name, mh, p),
4956  displayname ("displayname", mh, ""),
4957  erasemode ("erasemode", mh, "{normal}|none|xor|background"),
4958  alim ("alim", mh, Matrix ()),
4959  clim ("clim", mh, Matrix ()),
4960  xlim ("xlim", mh, Matrix ()),
4961  ylim ("ylim", mh, Matrix ()),
4962  zlim ("zlim", mh, Matrix ()),
4963  aliminclude ("aliminclude", mh, "on"),
4964  climinclude ("climinclude", mh, "on"),
4965  xliminclude ("xliminclude", mh, "on"),
4966  yliminclude ("yliminclude", mh, "on"),
4967  zliminclude ("zliminclude", mh, "on")
4968 {
4971  alim.set_id (ID_ALIM);
4972  alim.set_hidden (true);
4973  clim.set_id (ID_CLIM);
4974  clim.set_hidden (true);
4975  xlim.set_id (ID_XLIM);
4976  xlim.set_hidden (true);
4977  ylim.set_id (ID_YLIM);
4978  ylim.set_hidden (true);
4979  zlim.set_id (ID_ZLIM);
4980  zlim.set_hidden (true);
4982  aliminclude.set_hidden (true);
4984  climinclude.set_hidden (true);
4986  xliminclude.set_hidden (true);
4988  yliminclude.set_hidden (true);
4990  zliminclude.set_hidden (true);
4991  init ();
4992 }
4993 
4994 void
4996 {
4997  const std::set<std::string>& pnames = all_property_names ();
4998 
4999  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
5000 
5001  if (error_state)
5002  return;
5003 
5004  if (pname.compare ("displayname"))
5005  set_displayname (val);
5006  else if (pname.compare ("erasemode"))
5007  set_erasemode (val);
5008  else if (pname.compare ("aliminclude"))
5009  set_aliminclude (val);
5010  else if (pname.compare ("climinclude"))
5011  set_climinclude (val);
5012  else if (pname.compare ("xliminclude"))
5013  set_xliminclude (val);
5014  else if (pname.compare ("yliminclude"))
5015  set_yliminclude (val);
5016  else if (pname.compare ("zliminclude"))
5017  set_zliminclude (val);
5018  else
5019  base_properties::set (pname, val);
5020 }
5021 
5024 {
5026 
5027  m.assign ("displayname", octave_value (get_displayname ()));
5028  m.assign ("erasemode", octave_value (get_erasemode ()));
5029  if (all)
5030  m.assign ("alim", octave_value (get_alim ()));
5031  if (all)
5032  m.assign ("clim", octave_value (get_clim ()));
5033  if (all)
5034  m.assign ("xlim", octave_value (get_xlim ()));
5035  if (all)
5036  m.assign ("ylim", octave_value (get_ylim ()));
5037  if (all)
5038  m.assign ("zlim", octave_value (get_zlim ()));
5039  if (all)
5040  m.assign ("aliminclude", octave_value (get_aliminclude ()));
5041  if (all)
5042  m.assign ("climinclude", octave_value (get_climinclude ()));
5043  if (all)
5044  m.assign ("xliminclude", octave_value (get_xliminclude ()));
5045  if (all)
5046  m.assign ("yliminclude", octave_value (get_yliminclude ()));
5047  if (all)
5048  m.assign ("zliminclude", octave_value (get_zliminclude ()));
5049 
5050  return m;
5051 }
5052 
5054 hggroup::properties::get (const caseless_str& pname_arg) const
5055 {
5056  octave_value retval;
5057 
5058  const std::set<std::string>& pnames = all_property_names ();
5059 
5060  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
5061 
5062  if (error_state)
5063  return retval;
5064 
5065  if (pname.compare ("displayname"))
5066  retval = get_displayname ();
5067  else if (pname.compare ("erasemode"))
5068  retval = get_erasemode ();
5069  else if (pname.compare ("alim"))
5070  retval = get_alim ();
5071  else if (pname.compare ("clim"))
5072  retval = get_clim ();
5073  else if (pname.compare ("xlim"))
5074  retval = get_xlim ();
5075  else if (pname.compare ("ylim"))
5076  retval = get_ylim ();
5077  else if (pname.compare ("zlim"))
5078  retval = get_zlim ();
5079  else if (pname.compare ("aliminclude"))
5080  retval = get_aliminclude ();
5081  else if (pname.compare ("climinclude"))
5082  retval = get_climinclude ();
5083  else if (pname.compare ("xliminclude"))
5084  retval = get_xliminclude ();
5085  else if (pname.compare ("yliminclude"))
5086  retval = get_yliminclude ();
5087  else if (pname.compare ("zliminclude"))
5088  retval = get_zliminclude ();
5089  else
5090  retval = base_properties::get (pname);
5091 
5092  return retval;
5093 }
5094 
5095 property
5097 {
5098  const std::set<std::string>& pnames = all_property_names ();
5099 
5100  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
5101 
5102  if (error_state)
5103  return property ();
5104 
5105  if (pname.compare ("displayname"))
5106  return property (&displayname, true);
5107  else if (pname.compare ("erasemode"))
5108  return property (&erasemode, true);
5109  else if (pname.compare ("alim"))
5110  return property (&alim, true);
5111  else if (pname.compare ("clim"))
5112  return property (&clim, true);
5113  else if (pname.compare ("xlim"))
5114  return property (&xlim, true);
5115  else if (pname.compare ("ylim"))
5116  return property (&ylim, true);
5117  else if (pname.compare ("zlim"))
5118  return property (&zlim, true);
5119  else if (pname.compare ("aliminclude"))
5120  return property (&aliminclude, true);
5121  else if (pname.compare ("climinclude"))
5122  return property (&climinclude, true);
5123  else if (pname.compare ("xliminclude"))
5124  return property (&xliminclude, true);
5125  else if (pname.compare ("yliminclude"))
5126  return property (&yliminclude, true);
5127  else if (pname.compare ("zliminclude"))
5128  return property (&zliminclude, true);
5129  else
5130  return base_properties::get_property (pname);
5131 }
5132 
5135 {
5137 
5138  m["displayname"] = "";
5139  m["erasemode"] = "normal";
5140  m["alim"] = Matrix ();
5141  m["clim"] = Matrix ();
5142  m["xlim"] = Matrix ();
5143  m["ylim"] = Matrix ();
5144  m["zlim"] = Matrix ();
5145  m["aliminclude"] = "on";
5146  m["climinclude"] = "on";
5147  m["xliminclude"] = "on";
5148  m["yliminclude"] = "on";
5149  m["zliminclude"] = "on";
5150 
5151  return m;
5152 }
5153 
5154 std::string hggroup::properties::go_name ("hggroup");
5155 
5156 std::set<std::string>
5158 {
5159  static std::set<std::string> all_pnames;
5160 
5161  static bool initialized = false;
5162 
5163  if (! initialized)
5164  {
5165  all_pnames.insert ("displayname");
5166  all_pnames.insert ("erasemode");
5167  all_pnames.insert ("alim");
5168  all_pnames.insert ("clim");
5169  all_pnames.insert ("xlim");
5170  all_pnames.insert ("ylim");
5171  all_pnames.insert ("zlim");
5172  all_pnames.insert ("aliminclude");
5173  all_pnames.insert ("climinclude");
5174  all_pnames.insert ("xliminclude");
5175  all_pnames.insert ("yliminclude");
5176  all_pnames.insert ("zliminclude");
5177 
5178  std::set<std::string> base_pnames = base_properties::core_property_names ();
5179  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
5180 
5181  initialized = true;
5182  }
5183 
5184  return all_pnames;
5185 }
5186 
5187 bool
5189 {
5190  std::set<std::string> pnames = core_property_names ();
5191 
5192  return pnames.find (pname) != pnames.end ();
5193 }
5194 
5195 std::set<std::string>
5197 {
5198  static std::set<std::string> all_pnames = core_property_names ();
5199 
5200  std::set<std::string> retval = all_pnames;
5201  std::set<std::string> base_props = base_properties::all_property_names ();
5202  retval.insert (base_props.begin (), base_props.end ());
5203 
5204  return retval;
5205 }
5206 
5207 bool
5209 {
5210  std::set<std::string> pnames = all_property_names ();
5211 
5212  return pnames.find (pname) != pnames.end ();
5213 }
5214 
5215 // ******** uimenu ********
5216 
5218  : base_properties (go_name, mh, p),
5219  __object__ ("__object__", mh, Matrix ()),
5220  accelerator ("accelerator", mh, ""),
5221  callback ("callback", mh, Matrix ()),
5222  checked ("checked", mh, "off"),
5223  enable ("enable", mh, "on"),
5224  foregroundcolor ("foregroundcolor", mh, color_values (0, 0, 0)),
5225  label ("label", mh, ""),
5226  position ("position", mh, 9),
5227  separator ("separator", mh, "off"),
5228  fltk_label ("fltk_label", mh, "")
5229 {
5236  label.set_id (ID_LABEL);
5240  fltk_label.set_hidden (true);
5241  init ();
5242 }
5243 
5244 void
5245 uimenu::properties::set (const caseless_str& pname_arg, const octave_value& val)
5246 {
5247  const std::set<std::string>& pnames = all_property_names ();
5248 
5249  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
5250 
5251  if (error_state)
5252  return;
5253 
5254  if (pname.compare ("__object__"))
5255  set___object__ (val);
5256  else if (pname.compare ("accelerator"))
5257  set_accelerator (val);
5258  else if (pname.compare ("callback"))
5259  set_callback (val);
5260  else if (pname.compare ("checked"))
5261  set_checked (val);
5262  else if (pname.compare ("enable"))
5263  set_enable (val);
5264  else if (pname.compare ("foregroundcolor"))
5265  set_foregroundcolor (val);
5266  else if (pname.compare ("label"))
5267  set_label (val);
5268  else if (pname.compare ("position"))
5269  set_position (val);
5270  else if (pname.compare ("separator"))
5271  set_separator (val);
5272  else if (pname.compare ("fltk_label"))
5273  set_fltk_label (val);
5274  else
5275  base_properties::set (pname, val);
5276 }
5277 
5279 uimenu::properties::get (bool all) const
5280 {
5282 
5283  m.assign ("__object__", octave_value (get___object__ ()));
5284  m.assign ("accelerator", octave_value (get_accelerator ()));
5285  m.assign ("callback", octave_value (get_callback ()));
5286  m.assign ("checked", octave_value (get_checked ()));
5287  m.assign ("enable", octave_value (get_enable ()));
5288  m.assign ("foregroundcolor", octave_value (get_foregroundcolor ()));
5289  m.assign ("label", octave_value (get_label ()));
5290  m.assign ("position", octave_value (get_position ()));
5291  m.assign ("separator", octave_value (get_separator ()));
5292  if (all)
5293  m.assign ("fltk_label", octave_value (get_fltk_label ()));
5294 
5295  return m;
5296 }
5297 
5299 uimenu::properties::get (const caseless_str& pname_arg) const
5300 {
5301  octave_value retval;
5302 
5303  const std::set<std::string>& pnames = all_property_names ();
5304 
5305  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
5306 
5307  if (error_state)
5308  return retval;
5309 
5310  if (pname.compare ("__object__"))
5311  retval = get___object__ ();
5312  else if (pname.compare ("accelerator"))
5313  retval = get_accelerator ();
5314  else if (pname.compare ("callback"))
5315  retval = get_callback ();
5316  else if (pname.compare ("checked"))
5317  retval = get_checked ();
5318  else if (pname.compare ("enable"))
5319  retval = get_enable ();
5320  else if (pname.compare ("foregroundcolor"))
5321  retval = get_foregroundcolor ();
5322  else if (pname.compare ("label"))
5323  retval = get_label ();
5324  else if (pname.compare ("position"))
5325  retval = get_position ();
5326  else if (pname.compare ("separator"))
5327  retval = get_separator ();
5328  else if (pname.compare ("fltk_label"))
5329  retval = get_fltk_label ();
5330  else
5331  retval = base_properties::get (pname);
5332 
5333  return retval;
5334 }
5335 
5336 property
5338 {
5339  const std::set<std::string>& pnames = all_property_names ();
5340 
5341  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
5342 
5343  if (error_state)
5344  return property ();
5345 
5346  if (pname.compare ("__object__"))
5347  return property (&__object__, true);
5348  else if (pname.compare ("accelerator"))
5349  return property (&accelerator, true);
5350  else if (pname.compare ("callback"))
5351  return property (&callback, true);
5352  else if (pname.compare ("checked"))
5353  return property (&checked, true);
5354  else if (pname.compare ("enable"))
5355  return property (&enable, true);
5356  else if (pname.compare ("foregroundcolor"))
5357  return property (&foregroundcolor, true);
5358  else if (pname.compare ("label"))
5359  return property (&label, true);
5360  else if (pname.compare ("position"))
5361  return property (&position, true);
5362  else if (pname.compare ("separator"))
5363  return property (&separator, true);
5364  else if (pname.compare ("fltk_label"))
5365  return property (&fltk_label, true);
5366  else
5367  return base_properties::get_property (pname);
5368 }
5369 
5372 {
5374 
5375  m["__object__"] = Matrix ();
5376  m["accelerator"] = "";
5377  m["callback"] = Matrix ();
5378  m["checked"] = "off";
5379  m["enable"] = "on";
5380  m["foregroundcolor"] = color_values (0, 0, 0);
5381  m["label"] = "";
5382  m["position"] = 9;
5383  m["separator"] = "off";
5384  m["fltk_label"] = "";
5385 
5386  return m;
5387 }
5388 
5389 std::string uimenu::properties::go_name ("uimenu");
5390 
5391 std::set<std::string>
5393 {
5394  static std::set<std::string> all_pnames;
5395 
5396  static bool initialized = false;
5397 
5398  if (! initialized)
5399  {
5400  all_pnames.insert ("__object__");
5401  all_pnames.insert ("accelerator");
5402  all_pnames.insert ("callback");
5403  all_pnames.insert ("checked");
5404  all_pnames.insert ("enable");
5405  all_pnames.insert ("foregroundcolor");
5406  all_pnames.insert ("label");
5407  all_pnames.insert ("position");
5408  all_pnames.insert ("separator");
5409  all_pnames.insert ("fltk_label");
5410 
5411  std::set<std::string> base_pnames = base_properties::core_property_names ();
5412  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
5413 
5414  initialized = true;
5415  }
5416 
5417  return all_pnames;
5418 }
5419 
5420 bool
5422 {
5423  std::set<std::string> pnames = core_property_names ();
5424 
5425  return pnames.find (pname) != pnames.end ();
5426 }
5427 
5428 std::set<std::string>
5430 {
5431  static std::set<std::string> all_pnames = core_property_names ();
5432 
5433  std::set<std::string> retval = all_pnames;
5434  std::set<std::string> base_props = base_properties::all_property_names ();
5435  retval.insert (base_props.begin (), base_props.end ());
5436 
5437  return retval;
5438 }
5439 
5440 bool
5442 {
5443  std::set<std::string> pnames = all_property_names ();
5444 
5445  return pnames.find (pname) != pnames.end ();
5446 }
5447 
5448 // ******** uicontextmenu ********
5449 
5451  : base_properties (go_name, mh, p),
5452  __object__ ("__object__", mh, Matrix ()),
5453  callback ("callback", mh, Matrix ()),
5454  position ("position", mh, Matrix (1, 2, 0.0))
5455 {
5459  init ();
5460 }
5461 
5462 void
5464 {
5465  const std::set<std::string>& pnames = all_property_names ();
5466 
5467  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
5468 
5469  if (error_state)
5470  return;
5471 
5472  if (pname.compare ("__object__"))
5473  set___object__ (val);
5474  else if (pname.compare ("callback"))
5475  set_callback (val);
5476  else if (pname.compare ("position"))
5477  set_position (val);
5478  else
5479  base_properties::set (pname, val);
5480 }
5481 
5484 {
5486 
5487  m.assign ("__object__", octave_value (get___object__ ()));
5488  m.assign ("callback", octave_value (get_callback ()));
5489  m.assign ("position", octave_value (get_position ()));
5490 
5491  return m;
5492 }
5493 
5496 {
5497  octave_value retval;
5498 
5499  const std::set<std::string>& pnames = all_property_names ();
5500 
5501  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
5502 
5503  if (error_state)
5504  return retval;
5505 
5506  if (pname.compare ("__object__"))
5507  retval = get___object__ ();
5508  else if (pname.compare ("callback"))
5509  retval = get_callback ();
5510  else if (pname.compare ("position"))
5511  retval = get_position ();
5512  else
5513  retval = base_properties::get (pname);
5514 
5515  return retval;
5516 }
5517 
5518 property
5520 {
5521  const std::set<std::string>& pnames = all_property_names ();
5522 
5523  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
5524 
5525  if (error_state)
5526  return property ();
5527 
5528  if (pname.compare ("__object__"))
5529  return property (&__object__, true);
5530  else if (pname.compare ("callback"))
5531  return property (&callback, true);
5532  else if (pname.compare ("position"))
5533  return property (&position, true);
5534  else
5535  return base_properties::get_property (pname);
5536 }
5537 
5540 {
5542 
5543  m["__object__"] = Matrix ();
5544  m["callback"] = Matrix ();
5545  m["position"] = Matrix (1, 2, 0.0);
5546 
5547  return m;
5548 }
5549 
5550 std::string uicontextmenu::properties::go_name ("uicontextmenu");
5551 
5552 std::set<std::string>
5554 {
5555  static std::set<std::string> all_pnames;
5556 
5557  static bool initialized = false;
5558 
5559  if (! initialized)
5560  {
5561  all_pnames.insert ("__object__");
5562  all_pnames.insert ("callback");
5563  all_pnames.insert ("position");
5564 
5565  std::set<std::string> base_pnames = base_properties::core_property_names ();
5566  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
5567 
5568  initialized = true;
5569  }
5570 
5571  return all_pnames;
5572 }
5573 
5574 bool
5576 {
5577  std::set<std::string> pnames = core_property_names ();
5578 
5579  return pnames.find (pname) != pnames.end ();
5580 }
5581 
5582 std::set<std::string>
5584 {
5585  static std::set<std::string> all_pnames = core_property_names ();
5586 
5587  std::set<std::string> retval = all_pnames;
5588  std::set<std::string> base_props = base_properties::all_property_names ();
5589  retval.insert (base_props.begin (), base_props.end ());
5590 
5591  return retval;
5592 }
5593 
5594 bool
5596 {
5597  std::set<std::string> pnames = all_property_names ();
5598 
5599  return pnames.find (pname) != pnames.end ();
5600 }
5601 
5602 // ******** uicontrol ********
5603 
5605  : base_properties (go_name, mh, p),
5606  __object__ ("__object__", mh, Matrix ()),
5607  backgroundcolor ("backgroundcolor", mh, color_values (1, 1, 1)),
5608  callback ("callback", mh, Matrix ()),
5609  cdata ("cdata", mh, Matrix ()),
5610  clipping ("clipping", mh, "on"),
5611  enable ("enable", mh, "{on}|inactive|off"),
5612  extent ("extent", mh, Matrix (1, 4, 0.0)),
5613  fontangle ("fontangle", mh, "{normal}|italic|oblique"),
5614  fontname ("fontname", mh, OCTAVE_DEFAULT_FONTNAME),
5615  fontsize ("fontsize", mh, 10),
5616  fontunits ("fontunits", mh, "inches|centimeters|normalized|{points}|pixels"),
5617  fontweight ("fontweight", mh, "light|{normal}|demi|bold"),
5618  foregroundcolor ("foregroundcolor", mh, color_values (0, 0, 0)),
5619  horizontalalignment ("horizontalalignment", mh, "left|{center}|right"),
5620  keypressfcn ("keypressfcn", mh, Matrix ()),
5621  listboxtop ("listboxtop", mh, 1),
5622  max ("max", mh, 1),
5623  min ("min", mh, 0),
5624  position ("position", mh, default_control_position ()),
5625  sliderstep ("sliderstep", mh, default_control_sliderstep ()),
5626  string ("string", mh, ""),
5627  style ("style", mh, "{pushbutton}|togglebutton|radiobutton|checkbox|edit|text|slider|frame|listbox|popupmenu"),
5628  tooltipstring ("tooltipstring", mh, ""),
5629  units ("units", mh, "normalized|inches|centimeters|points|{pixels}|characters"),
5630  value ("value", mh, Matrix (1, 1, 1.0)),
5631  verticalalignment ("verticalalignment", mh, "top|{middle}|bottom")
5632 {
5636  cdata.set_id (ID_CDATA);
5649  max.set_id (ID_MAX);
5650  min.set_id (ID_MIN);
5653  string.set_id (ID_STRING);
5654  style.set_id (ID_STYLE);
5656  units.set_id (ID_UNITS);
5657  value.set_id (ID_VALUE);
5659  init ();
5660 }
5661 
5662 void
5664 {
5665  const std::set<std::string>& pnames = all_property_names ();
5666 
5667  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
5668 
5669  if (error_state)
5670  return;
5671 
5672  if (pname.compare ("__object__"))
5673  set___object__ (val);
5674  else if (pname.compare ("backgroundcolor"))
5675  set_backgroundcolor (val);
5676  else if (pname.compare ("callback"))
5677  set_callback (val);
5678  else if (pname.compare ("cdata"))
5679  set_cdata (val);
5680  else if (pname.compare ("clipping"))
5681  set_clipping (val);
5682  else if (pname.compare ("enable"))
5683  set_enable (val);
5684  else if (pname.compare ("fontangle"))
5685  set_fontangle (val);
5686  else if (pname.compare ("fontname"))
5687  set_fontname (val);
5688  else if (pname.compare ("fontsize"))
5689  set_fontsize (val);
5690  else if (pname.compare ("fontunits"))
5691  set_fontunits (val);
5692  else if (pname.compare ("fontweight"))
5693  set_fontweight (val);
5694  else if (pname.compare ("foregroundcolor"))
5695  set_foregroundcolor (val);
5696  else if (pname.compare ("horizontalalignment"))
5697  set_horizontalalignment (val);
5698  else if (pname.compare ("keypressfcn"))
5699  set_keypressfcn (val);
5700  else if (pname.compare ("listboxtop"))
5701  set_listboxtop (val);
5702  else if (pname.compare ("max"))
5703  set_max (val);
5704  else if (pname.compare ("min"))
5705  set_min (val);
5706  else if (pname.compare ("position"))
5707  set_position (val);
5708  else if (pname.compare ("sliderstep"))
5709  set_sliderstep (val);
5710  else if (pname.compare ("string"))
5711  set_string (val);
5712  else if (pname.compare ("style"))
5713  set_style (val);
5714  else if (pname.compare ("tooltipstring"))
5715  set_tooltipstring (val);
5716  else if (pname.compare ("units"))
5717  set_units (val);
5718  else if (pname.compare ("value"))
5719  set_value (val);
5720  else if (pname.compare ("verticalalignment"))
5721  set_verticalalignment (val);
5722  else
5723  base_properties::set (pname, val);
5724 }
5725 
5728 {
5730 
5731  m.assign ("__object__", octave_value (get___object__ ()));
5732  m.assign ("backgroundcolor", octave_value (get_backgroundcolor ()));
5733  m.assign ("callback", octave_value (get_callback ()));
5734  m.assign ("cdata", octave_value (get_cdata ()));
5735  m.assign ("clipping", octave_value (get_clipping ()));
5736  m.assign ("enable", octave_value (get_enable ()));
5737  m.assign ("extent", octave_value (get_extent ()));
5738  m.assign ("fontangle", octave_value (get_fontangle ()));
5739  m.assign ("fontname", octave_value (get_fontname ()));
5740  m.assign ("fontsize", octave_value (get_fontsize ()));
5741  m.assign ("fontunits", octave_value (get_fontunits ()));
5742  m.assign ("fontweight", octave_value (get_fontweight ()));
5743  m.assign ("foregroundcolor", octave_value (get_foregroundcolor ()));
5744  m.assign ("horizontalalignment", octave_value (get_horizontalalignment ()));
5745  m.assign ("keypressfcn", octave_value (get_keypressfcn ()));
5746  m.assign ("listboxtop", octave_value (get_listboxtop ()));
5747  m.assign ("max", octave_value (get_max ()));
5748  m.assign ("min", octave_value (get_min ()));
5749  m.assign ("position", octave_value (get_position ()));
5750  m.assign ("sliderstep", octave_value (get_sliderstep ()));
5751  m.assign ("string", octave_value (get_string ()));
5752  m.assign ("style", octave_value (get_style ()));
5753  m.assign ("tooltipstring", octave_value (get_tooltipstring ()));
5754  m.assign ("units", octave_value (get_units ()));
5755  m.assign ("value", octave_value (get_value ()));
5756  m.assign ("verticalalignment", octave_value (get_verticalalignment ()));
5757 
5758  return m;
5759 }
5760 
5763 {
5764  octave_value retval;
5765 
5766  const std::set<std::string>& pnames = all_property_names ();
5767 
5768  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
5769 
5770  if (error_state)
5771  return retval;
5772 
5773  if (pname.compare ("__object__"))
5774  retval = get___object__ ();
5775  else if (pname.compare ("backgroundcolor"))
5776  retval = get_backgroundcolor ();
5777  else if (pname.compare ("callback"))
5778  retval = get_callback ();
5779  else if (pname.compare ("cdata"))
5780  retval = get_cdata ();
5781  else if (pname.compare ("clipping"))
5782  retval = get_clipping ();
5783  else if (pname.compare ("enable"))
5784  retval = get_enable ();
5785  else if (pname.compare ("extent"))
5786  retval = get_extent ();
5787  else if (pname.compare ("fontangle"))
5788  retval = get_fontangle ();
5789  else if (pname.compare ("fontname"))
5790  retval = get_fontname ();
5791  else if (pname.compare ("fontsize"))
5792  retval = get_fontsize ();
5793  else if (pname.compare ("fontunits"))
5794  retval = get_fontunits ();
5795  else if (pname.compare ("fontweight"))
5796  retval = get_fontweight ();
5797  else if (pname.compare ("foregroundcolor"))
5798  retval = get_foregroundcolor ();
5799  else if (pname.compare ("horizontalalignment"))
5800  retval = get_horizontalalignment ();
5801  else if (pname.compare ("keypressfcn"))
5802  retval = get_keypressfcn ();
5803  else if (pname.compare ("listboxtop"))
5804  retval = get_listboxtop ();
5805  else if (pname.compare ("max"))
5806  retval = get_max ();
5807  else if (pname.compare ("min"))
5808  retval = get_min ();
5809  else if (pname.compare ("position"))
5810  retval = get_position ();
5811  else if (pname.compare ("sliderstep"))
5812  retval = get_sliderstep ();
5813  else if (pname.compare ("string"))
5814  retval = get_string ();
5815  else if (pname.compare ("style"))
5816  retval = get_style ();
5817  else if (pname.compare ("tooltipstring"))
5818  retval = get_tooltipstring ();
5819  else if (pname.compare ("units"))
5820  retval = get_units ();
5821  else if (pname.compare ("value"))
5822  retval = get_value ();
5823  else if (pname.compare ("verticalalignment"))
5824  retval = get_verticalalignment ();
5825  else
5826  retval = base_properties::get (pname);
5827 
5828  return retval;
5829 }
5830 
5831 property
5833 {
5834  const std::set<std::string>& pnames = all_property_names ();
5835 
5836  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
5837 
5838  if (error_state)
5839  return property ();
5840 
5841  if (pname.compare ("__object__"))
5842  return property (&__object__, true);
5843  else if (pname.compare ("backgroundcolor"))
5844  return property (&backgroundcolor, true);
5845  else if (pname.compare ("callback"))
5846  return property (&callback, true);
5847  else if (pname.compare ("cdata"))
5848  return property (&cdata, true);
5849  else if (pname.compare ("clipping"))
5850  return property (&clipping, true);
5851  else if (pname.compare ("enable"))
5852  return property (&enable, true);
5853  else if (pname.compare ("extent"))
5854  return property (&extent, true);
5855  else if (pname.compare ("fontangle"))
5856  return property (&fontangle, true);
5857  else if (pname.compare ("fontname"))
5858  return property (&fontname, true);
5859  else if (pname.compare ("fontsize"))
5860  return property (&fontsize, true);
5861  else if (pname.compare ("fontunits"))
5862  return property (&fontunits, true);
5863  else if (pname.compare ("fontweight"))
5864  return property (&fontweight, true);
5865  else if (pname.compare ("foregroundcolor"))
5866  return property (&foregroundcolor, true);
5867  else if (pname.compare ("horizontalalignment"))
5868  return property (&horizontalalignment, true);
5869  else if (pname.compare ("keypressfcn"))
5870  return property (&keypressfcn, true);
5871  else if (pname.compare ("listboxtop"))
5872  return property (&listboxtop, true);
5873  else if (pname.compare ("max"))
5874  return property (&max, true);
5875  else if (pname.compare ("min"))
5876  return property (&min, true);
5877  else if (pname.compare ("position"))
5878  return property (&position, true);
5879  else if (pname.compare ("sliderstep"))
5880  return property (&sliderstep, true);
5881  else if (pname.compare ("string"))
5882  return property (&string, true);
5883  else if (pname.compare ("style"))
5884  return property (&style, true);
5885  else if (pname.compare ("tooltipstring"))
5886  return property (&tooltipstring, true);
5887  else if (pname.compare ("units"))
5888  return property (&units, true);
5889  else if (pname.compare ("value"))
5890  return property (&value, true);
5891  else if (pname.compare ("verticalalignment"))
5892  return property (&verticalalignment, true);
5893  else
5894  return base_properties::get_property (pname);
5895 }
5896 
5899 {
5901 
5902  m["__object__"] = Matrix ();
5903  m["backgroundcolor"] = color_values (1, 1, 1);
5904  m["callback"] = Matrix ();
5905  m["cdata"] = Matrix ();
5906  m["clipping"] = "on";
5907  m["enable"] = "on";
5908  m["extent"] = Matrix (1, 4, 0.0);
5909  m["fontangle"] = "normal";
5910  m["fontname"] = OCTAVE_DEFAULT_FONTNAME;
5911  m["fontsize"] = 10;
5912  m["fontunits"] = "points";
5913  m["fontweight"] = "normal";
5914  m["foregroundcolor"] = color_values (0, 0, 0);
5915  m["horizontalalignment"] = "center";
5916  m["keypressfcn"] = Matrix ();
5917  m["listboxtop"] = 1;
5918  m["max"] = 1;
5919  m["min"] = 0;
5920  m["position"] = default_control_position ();
5921  m["sliderstep"] = default_control_sliderstep ();
5922  m["string"] = "";
5923  m["style"] = "pushbutton";
5924  m["tooltipstring"] = "";
5925  m["units"] = "pixels";
5926  m["value"] = Matrix (1, 1, 1.0);
5927  m["verticalalignment"] = "middle";
5928 
5929  return m;
5930 }
5931 
5932 std::string uicontrol::properties::go_name ("uicontrol");
5933 
5934 std::set<std::string>
5936 {
5937  static std::set<std::string> all_pnames;
5938 
5939  static bool initialized = false;
5940 
5941  if (! initialized)
5942  {
5943  all_pnames.insert ("__object__");
5944  all_pnames.insert ("backgroundcolor");
5945  all_pnames.insert ("callback");
5946  all_pnames.insert ("cdata");
5947  all_pnames.insert ("clipping");
5948  all_pnames.insert ("enable");
5949  all_pnames.insert ("extent");
5950  all_pnames.insert ("fontangle");
5951  all_pnames.insert ("fontname");
5952  all_pnames.insert ("fontsize");
5953  all_pnames.insert ("fontunits");
5954  all_pnames.insert ("fontweight");
5955  all_pnames.insert ("foregroundcolor");
5956  all_pnames.insert ("horizontalalignment");
5957  all_pnames.insert ("keypressfcn");
5958  all_pnames.insert ("listboxtop");
5959  all_pnames.insert ("max");
5960  all_pnames.insert ("min");
5961  all_pnames.insert ("position");
5962  all_pnames.insert ("sliderstep");
5963  all_pnames.insert ("string");
5964  all_pnames.insert ("style");
5965  all_pnames.insert ("tooltipstring");
5966  all_pnames.insert ("units");
5967  all_pnames.insert ("value");
5968  all_pnames.insert ("verticalalignment");
5969 
5970  std::set<std::string> base_pnames = base_properties::core_property_names ();
5971  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
5972 
5973  initialized = true;
5974  }
5975 
5976  return all_pnames;
5977 }
5978 
5979 bool
5981 {
5982  std::set<std::string> pnames = core_property_names ();
5983 
5984  return pnames.find (pname) != pnames.end ();
5985 }
5986 
5987 std::set<std::string>
5989 {
5990  static std::set<std::string> all_pnames = core_property_names ();
5991 
5992  std::set<std::string> retval = all_pnames;
5993  std::set<std::string> base_props = base_properties::all_property_names ();
5994  retval.insert (base_props.begin (), base_props.end ());
5995 
5996  return retval;
5997 }
5998 
5999 bool
6001 {
6002  std::set<std::string> pnames = all_property_names ();
6003 
6004  return pnames.find (pname) != pnames.end ();
6005 }
6006 
6007 // ******** uipanel ********
6008 
6010  : base_properties (go_name, mh, p),
6011  __object__ ("__object__", mh, Matrix ()),
6012  backgroundcolor ("backgroundcolor", mh, color_values (1, 1, 1)),
6013  bordertype ("bordertype", mh, "none|{etchedin}|etchedout|beveledin|beveledout|line"),
6014  borderwidth ("borderwidth", mh, 1),
6015  fontangle ("fontangle", mh, "{normal}|italic|oblique"),
6016  fontname ("fontname", mh, OCTAVE_DEFAULT_FONTNAME),
6017  fontsize ("fontsize", mh, 10),
6018  fontunits ("fontunits", mh, "inches|centimeters|normalized|{points}|pixels"),
6019  fontweight ("fontweight", mh, "light|{normal}|demi|bold"),
6020  foregroundcolor ("foregroundcolor", mh, color_values (0, 0, 0)),
6021  highlightcolor ("highlightcolor", mh, color_values (1, 1, 1)),
6022  position ("position", mh, default_panel_position ()),
6023  resizefcn ("resizefcn", mh, Matrix ()),
6024  shadowcolor ("shadowcolor", mh, color_values (0, 0, 0)),
6025  title ("title", mh, ""),
6026  titleposition ("titleposition", mh, "{lefttop}|centertop|righttop|leftbottom|centerbottom|rightbottom"),
6027  units ("units", mh, "{normalized}|inches|centimeters|points|pixels|characters")
6028 {
6043  title.set_id (ID_TITLE);
6045  units.set_id (ID_UNITS);
6046  init ();
6047 }
6048 
6049 void
6051 {
6052  const std::set<std::string>& pnames = all_property_names ();
6053 
6054  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
6055 
6056  if (error_state)
6057  return;
6058 
6059  if (pname.compare ("__object__"))
6060  set___object__ (val);
6061  else if (pname.compare ("backgroundcolor"))
6062  set_backgroundcolor (val);
6063  else if (pname.compare ("bordertype"))
6064  set_bordertype (val);
6065  else if (pname.compare ("borderwidth"))
6066  set_borderwidth (val);
6067  else if (pname.compare ("fontangle"))
6068  set_fontangle (val);
6069  else if (pname.compare ("fontname"))
6070  set_fontname (val);
6071  else if (pname.compare ("fontsize"))
6072  set_fontsize (val);
6073  else if (pname.compare ("fontunits"))
6074  set_fontunits (val);
6075  else if (pname.compare ("fontweight"))
6076  set_fontweight (val);
6077  else if (pname.compare ("foregroundcolor"))
6078  set_foregroundcolor (val);
6079  else if (pname.compare ("highlightcolor"))
6080  set_highlightcolor (val);
6081  else if (pname.compare ("position"))
6082  set_position (val);
6083  else if (pname.compare ("resizefcn"))
6084  set_resizefcn (val);
6085  else if (pname.compare ("shadowcolor"))
6086  set_shadowcolor (val);
6087  else if (pname.compare ("title"))
6088  set_title (val);
6089  else if (pname.compare ("titleposition"))
6090  set_titleposition (val);
6091  else if (pname.compare ("units"))
6092  set_units (val);
6093  else
6094  base_properties::set (pname, val);
6095 }
6096 
6099 {
6101 
6102  m.assign ("__object__", octave_value (get___object__ ()));
6103  m.assign ("backgroundcolor", octave_value (get_backgroundcolor ()));
6104  m.assign ("bordertype", octave_value (get_bordertype ()));
6105  m.assign ("borderwidth", octave_value (get_borderwidth ()));
6106  m.assign ("fontangle", octave_value (get_fontangle ()));
6107  m.assign ("fontname", octave_value (get_fontname ()));
6108  m.assign ("fontsize", octave_value (get_fontsize ()));
6109  m.assign ("fontunits", octave_value (get_fontunits ()));
6110  m.assign ("fontweight", octave_value (get_fontweight ()));
6111  m.assign ("foregroundcolor", octave_value (get_foregroundcolor ()));
6112  m.assign ("highlightcolor", octave_value (get_highlightcolor ()));
6113  m.assign ("position", octave_value (get_position ()));
6114  m.assign ("resizefcn", octave_value (get_resizefcn ()));
6115  m.assign ("shadowcolor", octave_value (get_shadowcolor ()));
6116  m.assign ("title", octave_value (get_title ()));
6117  m.assign ("titleposition", octave_value (get_titleposition ()));
6118  m.assign ("units", octave_value (get_units ()));
6119 
6120  return m;
6121 }
6122 
6124 uipanel::properties::get (const caseless_str& pname_arg) const
6125 {
6126  octave_value retval;
6127 
6128  const std::set<std::string>& pnames = all_property_names ();
6129 
6130  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
6131 
6132  if (error_state)
6133  return retval;
6134 
6135  if (pname.compare ("__object__"))
6136  retval = get___object__ ();
6137  else if (pname.compare ("backgroundcolor"))
6138  retval = get_backgroundcolor ();
6139  else if (pname.compare ("bordertype"))
6140  retval = get_bordertype ();
6141  else if (pname.compare ("borderwidth"))
6142  retval = get_borderwidth ();
6143  else if (pname.compare ("fontangle"))
6144  retval = get_fontangle ();
6145  else if (pname.compare ("fontname"))
6146  retval = get_fontname ();
6147  else if (pname.compare ("fontsize"))
6148  retval = get_fontsize ();
6149  else if (pname.compare ("fontunits"))
6150  retval = get_fontunits ();
6151  else if (pname.compare ("fontweight"))
6152  retval = get_fontweight ();
6153  else if (pname.compare ("foregroundcolor"))
6154  retval = get_foregroundcolor ();
6155  else if (pname.compare ("highlightcolor"))
6156  retval = get_highlightcolor ();
6157  else if (pname.compare ("position"))
6158  retval = get_position ();
6159  else if (pname.compare ("resizefcn"))
6160  retval = get_resizefcn ();
6161  else if (pname.compare ("shadowcolor"))
6162  retval = get_shadowcolor ();
6163  else if (pname.compare ("title"))
6164  retval = get_title ();
6165  else if (pname.compare ("titleposition"))
6166  retval = get_titleposition ();
6167  else if (pname.compare ("units"))
6168  retval = get_units ();
6169  else
6170  retval = base_properties::get (pname);
6171 
6172  return retval;
6173 }
6174 
6175 property
6177 {
6178  const std::set<std::string>& pnames = all_property_names ();
6179 
6180  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
6181 
6182  if (error_state)
6183  return property ();
6184 
6185  if (pname.compare ("__object__"))
6186  return property (&__object__, true);
6187  else if (pname.compare ("backgroundcolor"))
6188  return property (&backgroundcolor, true);
6189  else if (pname.compare ("bordertype"))
6190  return property (&bordertype, true);
6191  else if (pname.compare ("borderwidth"))
6192  return property (&borderwidth, true);
6193  else if (pname.compare ("fontangle"))
6194  return property (&fontangle, true);
6195  else if (pname.compare ("fontname"))
6196  return property (&fontname, true);
6197  else if (pname.compare ("fontsize"))
6198  return property (&fontsize, true);
6199  else if (pname.compare ("fontunits"))
6200  return property (&fontunits, true);
6201  else if (pname.compare ("fontweight"))
6202  return property (&fontweight, true);
6203  else if (pname.compare ("foregroundcolor"))
6204  return property (&foregroundcolor, true);
6205  else if (pname.compare ("highlightcolor"))
6206  return property (&highlightcolor, true);
6207  else if (pname.compare ("position"))
6208  return property (&position, true);
6209  else if (pname.compare ("resizefcn"))
6210  return property (&resizefcn, true);
6211  else if (pname.compare ("shadowcolor"))
6212  return property (&shadowcolor, true);
6213  else if (pname.compare ("title"))
6214  return property (&title, true);
6215  else if (pname.compare ("titleposition"))
6216  return property (&titleposition, true);
6217  else if (pname.compare ("units"))
6218  return property (&units, true);
6219  else
6220  return base_properties::get_property (pname);
6221 }
6222 
6225 {
6227 
6228  m["__object__"] = Matrix ();
6229  m["backgroundcolor"] = color_values (1, 1, 1);
6230  m["bordertype"] = "etchedin";
6231  m["borderwidth"] = 1;
6232  m["fontangle"] = "normal";
6233  m["fontname"] = OCTAVE_DEFAULT_FONTNAME;
6234  m["fontsize"] = 10;
6235  m["fontunits"] = "points";
6236  m["fontweight"] = "normal";
6237  m["foregroundcolor"] = color_values (0, 0, 0);
6238  m["highlightcolor"] = color_values (1, 1, 1);
6239  m["position"] = default_panel_position ();
6240  m["resizefcn"] = Matrix ();
6241  m["shadowcolor"] = color_values (0, 0, 0);
6242  m["title"] = "";
6243  m["titleposition"] = "lefttop";
6244  m["units"] = "normalized";
6245 
6246  return m;
6247 }
6248 
6249 std::string uipanel::properties::go_name ("uipanel");
6250 
6251 std::set<std::string>
6253 {
6254  static std::set<std::string> all_pnames;
6255 
6256  static bool initialized = false;
6257 
6258  if (! initialized)
6259  {
6260  all_pnames.insert ("__object__");
6261  all_pnames.insert ("backgroundcolor");
6262  all_pnames.insert ("bordertype");
6263  all_pnames.insert ("borderwidth");
6264  all_pnames.insert ("fontangle");
6265  all_pnames.insert ("fontname");
6266  all_pnames.insert ("fontsize");
6267  all_pnames.insert ("fontunits");
6268  all_pnames.insert ("fontweight");
6269  all_pnames.insert ("foregroundcolor");
6270  all_pnames.insert ("highlightcolor");
6271  all_pnames.insert ("position");
6272  all_pnames.insert ("resizefcn");
6273  all_pnames.insert ("shadowcolor");
6274  all_pnames.insert ("title");
6275  all_pnames.insert ("titleposition");
6276  all_pnames.insert ("units");
6277 
6278  std::set<std::string> base_pnames = base_properties::core_property_names ();
6279  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
6280 
6281  initialized = true;
6282  }
6283 
6284  return all_pnames;
6285 }
6286 
6287 bool
6289 {
6290  std::set<std::string> pnames = core_property_names ();
6291 
6292  return pnames.find (pname) != pnames.end ();
6293 }
6294 
6295 std::set<std::string>
6297 {
6298  static std::set<std::string> all_pnames = core_property_names ();
6299 
6300  std::set<std::string> retval = all_pnames;
6301  std::set<std::string> base_props = base_properties::all_property_names ();
6302  retval.insert (base_props.begin (), base_props.end ());
6303 
6304  return retval;
6305 }
6306 
6307 bool
6309 {
6310  std::set<std::string> pnames = all_property_names ();
6311 
6312  return pnames.find (pname) != pnames.end ();
6313 }
6314 
6315 // ******** uitoolbar ********
6316 
6318  : base_properties (go_name, mh, p),
6319  __object__ ("__object__", mh, Matrix ())
6320 {
6322  init ();
6323 }
6324 
6325 void
6327 {
6328  const std::set<std::string>& pnames = all_property_names ();
6329 
6330  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
6331 
6332  if (error_state)
6333  return;
6334 
6335  if (pname.compare ("__object__"))
6336  set___object__ (val);
6337  else
6338  base_properties::set (pname, val);
6339 }
6340 
6343 {
6345 
6346  m.assign ("__object__", octave_value (get___object__ ()));
6347 
6348  return m;
6349 }
6350 
6353 {
6354  octave_value retval;
6355 
6356  const std::set<std::string>& pnames = all_property_names ();
6357 
6358  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
6359 
6360  if (error_state)
6361  return retval;
6362 
6363  if (pname.compare ("__object__"))
6364  retval = get___object__ ();
6365  else
6366  retval = base_properties::get (pname);
6367 
6368  return retval;
6369 }
6370 
6371 property
6373 {
6374  const std::set<std::string>& pnames = all_property_names ();
6375 
6376  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
6377 
6378  if (error_state)
6379  return property ();
6380 
6381  if (pname.compare ("__object__"))
6382  return property (&__object__, true);
6383  else
6384  return base_properties::get_property (pname);
6385 }
6386 
6389 {
6391 
6392  m["__object__"] = Matrix ();
6393 
6394  return m;
6395 }
6396 
6397 std::string uitoolbar::properties::go_name ("uitoolbar");
6398 
6399 std::set<std::string>
6401 {
6402  static std::set<std::string> all_pnames;
6403 
6404  static bool initialized = false;
6405 
6406  if (! initialized)
6407  {
6408  all_pnames.insert ("__object__");
6409 
6410  std::set<std::string> base_pnames = base_properties::core_property_names ();
6411  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
6412 
6413  initialized = true;
6414  }
6415 
6416  return all_pnames;
6417 }
6418 
6419 bool
6421 {
6422  std::set<std::string> pnames = core_property_names ();
6423 
6424  return pnames.find (pname) != pnames.end ();
6425 }
6426 
6427 std::set<std::string>
6429 {
6430  static std::set<std::string> all_pnames = core_property_names ();
6431 
6432  std::set<std::string> retval = all_pnames;
6433  std::set<std::string> base_props = base_properties::all_property_names ();
6434  retval.insert (base_props.begin (), base_props.end ());
6435 
6436  return retval;
6437 }
6438 
6439 bool
6441 {
6442  std::set<std::string> pnames = all_property_names ();
6443 
6444  return pnames.find (pname) != pnames.end ();
6445 }
6446 
6447 // ******** uipushtool ********
6448 
6450  : base_properties (go_name, mh, p),
6451  __object__ ("__object__", mh, Matrix ()),
6452  cdata ("cdata", mh, Matrix ()),
6453  clickedcallback ("clickedcallback", mh, Matrix ()),
6454  enable ("enable", mh, "on"),
6455  separator ("separator", mh, "off"),
6456  tooltipstring ("tooltipstring", mh, "")
6457 {
6459  cdata.set_id (ID_CDATA);
6464  init ();
6465 }
6466 
6467 void
6469 {
6470  const std::set<std::string>& pnames = all_property_names ();
6471 
6472  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
6473 
6474  if (error_state)
6475  return;
6476 
6477  if (pname.compare ("__object__"))
6478  set___object__ (val);
6479  else if (pname.compare ("cdata"))
6480  set_cdata (val);
6481  else if (pname.compare ("clickedcallback"))
6482  set_clickedcallback (val);
6483  else if (pname.compare ("enable"))
6484  set_enable (val);
6485  else if (pname.compare ("separator"))
6486  set_separator (val);
6487  else if (pname.compare ("tooltipstring"))
6488  set_tooltipstring (val);
6489  else
6490  base_properties::set (pname, val);
6491 }
6492 
6495 {
6497 
6498  m.assign ("__object__", octave_value (get___object__ ()));
6499  m.assign ("cdata", octave_value (get_cdata ()));
6500  m.assign ("clickedcallback", octave_value (get_clickedcallback ()));
6501  m.assign ("enable", octave_value (get_enable ()));
6502  m.assign ("separator", octave_value (get_separator ()));
6503  m.assign ("tooltipstring", octave_value (get_tooltipstring ()));
6504 
6505  return m;
6506 }
6507 
6510 {
6511  octave_value retval;
6512 
6513  const std::set<std::string>& pnames = all_property_names ();
6514 
6515  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
6516 
6517  if (error_state)
6518  return retval;
6519 
6520  if (pname.compare ("__object__"))
6521  retval = get___object__ ();
6522  else if (pname.compare ("cdata"))
6523  retval = get_cdata ();
6524  else if (pname.compare ("clickedcallback"))
6525  retval = get_clickedcallback ();
6526  else if (pname.compare ("enable"))
6527  retval = get_enable ();
6528  else if (pname.compare ("separator"))
6529  retval = get_separator ();
6530  else if (pname.compare ("tooltipstring"))
6531  retval = get_tooltipstring ();
6532  else
6533  retval = base_properties::get (pname);
6534 
6535  return retval;
6536 }
6537 
6538 property
6540 {
6541  const std::set<std::string>& pnames = all_property_names ();
6542 
6543  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
6544 
6545  if (error_state)
6546  return property ();
6547 
6548  if (pname.compare ("__object__"))
6549  return property (&__object__, true);
6550  else if (pname.compare ("cdata"))
6551  return property (&cdata, true);
6552  else if (pname.compare ("clickedcallback"))
6553  return property (&clickedcallback, true);
6554  else if (pname.compare ("enable"))
6555  return property (&enable, true);
6556  else if (pname.compare ("separator"))
6557  return property (&separator, true);
6558  else if (pname.compare ("tooltipstring"))
6559  return property (&tooltipstring, true);
6560  else
6561  return base_properties::get_property (pname);
6562 }
6563 
6566 {
6568 
6569  m["__object__"] = Matrix ();
6570  m["cdata"] = Matrix ();
6571  m["clickedcallback"] = Matrix ();
6572  m["enable"] = "on";
6573  m["separator"] = "off";
6574  m["tooltipstring"] = "";
6575 
6576  return m;
6577 }
6578 
6579 std::string uipushtool::properties::go_name ("uipushtool");
6580 
6581 std::set<std::string>
6583 {
6584  static std::set<std::string> all_pnames;
6585 
6586  static bool initialized = false;
6587 
6588  if (! initialized)
6589  {
6590  all_pnames.insert ("__object__");
6591  all_pnames.insert ("cdata");
6592  all_pnames.insert ("clickedcallback");
6593  all_pnames.insert ("enable");
6594  all_pnames.insert ("separator");
6595  all_pnames.insert ("tooltipstring");
6596 
6597  std::set<std::string> base_pnames = base_properties::core_property_names ();
6598  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
6599 
6600  initialized = true;
6601  }
6602 
6603  return all_pnames;
6604 }
6605 
6606 bool
6608 {
6609  std::set<std::string> pnames = core_property_names ();
6610 
6611  return pnames.find (pname) != pnames.end ();
6612 }
6613 
6614 std::set<std::string>
6616 {
6617  static std::set<std::string> all_pnames = core_property_names ();
6618 
6619  std::set<std::string> retval = all_pnames;
6620  std::set<std::string> base_props = base_properties::all_property_names ();
6621  retval.insert (base_props.begin (), base_props.end ());
6622 
6623  return retval;
6624 }
6625 
6626 bool
6628 {
6629  std::set<std::string> pnames = all_property_names ();
6630 
6631  return pnames.find (pname) != pnames.end ();
6632 }
6633 
6634 // ******** uitoggletool ********
6635 
6637  : base_properties (go_name, mh, p),
6638  __object__ ("__object__", mh, Matrix ()),
6639  cdata ("cdata", mh, Matrix ()),
6640  clickedcallback ("clickedcallback", mh, Matrix ()),
6641  enable ("enable", mh, "on"),
6642  offcallback ("offcallback", mh, Matrix ()),
6643  oncallback ("oncallback", mh, Matrix ()),
6644  separator ("separator", mh, "off"),
6645  state ("state", mh, "off"),
6646  tooltipstring ("tooltipstring", mh, "")
6647 {
6649  cdata.set_id (ID_CDATA);
6655  state.set_id (ID_STATE);
6657  init ();
6658 }
6659 
6660 void
6662 {
6663  const std::set<std::string>& pnames = all_property_names ();
6664 
6665  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
6666 
6667  if (error_state)
6668  return;
6669 
6670  if (pname.compare ("__object__"))
6671  set___object__ (val);
6672  else if (pname.compare ("cdata"))
6673  set_cdata (val);
6674  else if (pname.compare ("clickedcallback"))
6675  set_clickedcallback (val);
6676  else if (pname.compare ("enable"))
6677  set_enable (val);
6678  else if (pname.compare ("offcallback"))
6679  set_offcallback (val);
6680  else if (pname.compare ("oncallback"))
6681  set_oncallback (val);
6682  else if (pname.compare ("separator"))
6683  set_separator (val);
6684  else if (pname.compare ("state"))
6685  set_state (val);
6686  else if (pname.compare ("tooltipstring"))
6687  set_tooltipstring (val);
6688  else
6689  base_properties::set (pname, val);
6690 }
6691 
6694 {
6696 
6697  m.assign ("__object__", octave_value (get___object__ ()));
6698  m.assign ("cdata", octave_value (get_cdata ()));
6699  m.assign ("clickedcallback", octave_value (get_clickedcallback ()));
6700  m.assign ("enable", octave_value (get_enable ()));
6701  m.assign ("offcallback", octave_value (get_offcallback ()));
6702  m.assign ("oncallback", octave_value (get_oncallback ()));
6703  m.assign ("separator", octave_value (get_separator ()));
6704  m.assign ("state", octave_value (get_state ()));
6705  m.assign ("tooltipstring", octave_value (get_tooltipstring ()));
6706 
6707  return m;
6708 }
6709 
6712 {
6713  octave_value retval;
6714 
6715  const std::set<std::string>& pnames = all_property_names ();
6716 
6717  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
6718 
6719  if (error_state)
6720  return retval;
6721 
6722  if (pname.compare ("__object__"))
6723  retval = get___object__ ();
6724  else if (pname.compare ("cdata"))
6725  retval = get_cdata ();
6726  else if (pname.compare ("clickedcallback"))
6727  retval = get_clickedcallback ();
6728  else if (pname.compare ("enable"))
6729  retval = get_enable ();
6730  else if (pname.compare ("offcallback"))
6731  retval = get_offcallback ();
6732  else if (pname.compare ("oncallback"))
6733  retval = get_oncallback ();
6734  else if (pname.compare ("separator"))
6735  retval = get_separator ();
6736  else if (pname.compare ("state"))
6737  retval = get_state ();
6738  else if (pname.compare ("tooltipstring"))
6739  retval = get_tooltipstring ();
6740  else
6741  retval = base_properties::get (pname);
6742 
6743  return retval;
6744 }
6745 
6746 property
6748 {
6749  const std::set<std::string>& pnames = all_property_names ();
6750 
6751  caseless_str pname = validate_property_name ("get", go_name, pnames, pname_arg);
6752 
6753  if (error_state)
6754  return property ();
6755 
6756  if (pname.compare ("__object__"))
6757  return property (&__object__, true);
6758  else if (pname.compare ("cdata"))
6759  return property (&cdata, true);
6760  else if (pname.compare ("clickedcallback"))
6761  return property (&clickedcallback, true);
6762  else if (pname.compare ("enable"))
6763  return property (&enable, true);
6764  else if (pname.compare ("offcallback"))
6765  return property (&offcallback, true);
6766  else if (pname.compare ("oncallback"))
6767  return property (&oncallback, true);
6768  else if (pname.compare ("separator"))
6769  return property (&separator, true);
6770  else if (pname.compare ("state"))
6771  return property (&state, true);
6772  else if (pname.compare ("tooltipstring"))
6773  return property (&tooltipstring, true);
6774  else
6775  return base_properties::get_property (pname);
6776 }
6777 
6780 {
6782 
6783  m["__object__"] = Matrix ();
6784  m["cdata"] = Matrix ();
6785  m["clickedcallback"] = Matrix ();
6786  m["enable"] = "on";
6787  m["offcallback"] = Matrix ();
6788  m["oncallback"] = Matrix ();
6789  m["separator"] = "off";
6790  m["state"] = "off";
6791  m["tooltipstring"] = "";
6792 
6793  return m;
6794 }
6795 
6796 std::string uitoggletool::properties::go_name ("uitoggletool");
6797 
6798 std::set<std::string>
6800 {
6801  static std::set<std::string> all_pnames;
6802 
6803  static bool initialized = false;
6804 
6805  if (! initialized)
6806  {
6807  all_pnames.insert ("__object__");
6808  all_pnames.insert ("cdata");
6809  all_pnames.insert ("clickedcallback");
6810  all_pnames.insert ("enable");
6811  all_pnames.insert ("offcallback");
6812  all_pnames.insert ("oncallback");
6813  all_pnames.insert ("separator");
6814  all_pnames.insert ("state");
6815  all_pnames.insert ("tooltipstring");
6816 
6817  std::set<std::string> base_pnames = base_properties::core_property_names ();
6818  all_pnames.insert (base_pnames.begin (), base_pnames.end ());
6819 
6820  initialized = true;
6821  }
6822 
6823  return all_pnames;
6824 }
6825 
6826 bool
6828 {
6829  std::set<std::string> pnames = core_property_names ();
6830 
6831  return pnames.find (pname) != pnames.end ();
6832 }
6833 
6834 std::set<std::string>
6836 {
6837  static std::set<std::string> all_pnames = core_property_names ();
6838 
6839  std::set<std::string> retval = all_pnames;
6840  std::set<std::string> base_props = base_properties::all_property_names ();
6841  retval.insert (base_props.begin (), base_props.end ());
6842 
6843  return retval;
6844 }
6845 
6846 bool
6848 {
6849  std::set<std::string> pnames = all_property_names ();
6850 
6851  return pnames.find (pname) != pnames.end ();
6852 }
6853