GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
graphics.h
Go to the documentation of this file.
1 // DO NOT EDIT! Generated automatically by genprops.awk.
2 
3 ////////////////////////////////////////////////////////////////////////
4 //
5 // Copyright (C) 2007-2024 The Octave Project Developers
6 //
7 // See the file COPYRIGHT.md in the top-level directory of this
8 // distribution or <https://octave.org/copyright/>.
9 //
10 // This file is part of Octave.
11 //
12 // Octave is free software: you can redistribute it and/or modify it
13 // under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // Octave is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with Octave; see the file COPYING. If not, see
24 // <https://www.gnu.org/licenses/>.
25 //
26 ////////////////////////////////////////////////////////////////////////
27 
28 #if ! defined (octave_graphics_h)
29 #define octave_graphics_h 1
30 
31 #include "octave-config.h"
32 
33 #include <cctype>
34 #include <cmath>
35 
36 #include <algorithm>
37 #include <list>
38 #include <map>
39 #include <memory>
40 #include <set>
41 #include <sstream>
42 #include <string>
43 #include <unordered_map>
44 #include <vector>
45 
46 #include "caseless-str.h"
47 
48 #include "errwarn.h"
49 #include "graphics-handle.h"
50 #include "graphics-toolkit.h"
51 #include "oct-map.h"
52 #include "oct-mutex.h"
53 #include "oct-refcount.h"
54 #include "ov.h"
55 #include "text-renderer.h"
56 
58 
59 // FIXME: maybe this should be a configure option?
60 // Matlab defaults to "Helvetica", but that causes problems for many
61 // gnuplot users.
62 #if ! defined (OCTAVE_DEFAULT_FONTNAME)
63 #define OCTAVE_DEFAULT_FONTNAME "*"
64 #endif
65 
66 // ---------------------------------------------------------------------
67 
68 class OCTINTERP_API base_scaler
69 {
70 public:
71 
72  OCTAVE_DEFAULT_CONSTRUCT_COPY_MOVE (base_scaler)
73 
74  virtual ~base_scaler () = default;
75 
76  virtual Matrix scale (const Matrix&) const
77  {
78  error ("invalid axis scale");
79  }
80 
81  virtual NDArray scale (const NDArray&) const
82  {
83  error ("invalid axis scale");
84  }
85 
86  virtual double scale (double) const
87  {
88  error ("invalid axis scale");
89  }
90 
91  virtual double unscale (double) const
92  {
93  error ("invalid axis scale");
94  }
95 
96  virtual base_scaler * clone () const
97  { return new base_scaler (); }
98 
99  virtual bool is_linear () const
100  { return false; }
101 };
102 
103 class lin_scaler : public base_scaler
104 {
105 public:
106 
107  OCTAVE_DEFAULT_CONSTRUCT_COPY_MOVE_DELETE (lin_scaler)
108 
109  Matrix scale (const Matrix& m) const { return m; }
110 
111  NDArray scale (const NDArray& m) const { return m; }
112 
113  double scale (double d) const { return d; }
114 
115  double unscale (double d) const { return d; }
116 
117  base_scaler * clone () const { return new lin_scaler (); }
118 
119  bool is_linear () const { return true; }
120 };
121 
122 class log_scaler : public base_scaler
123 {
124 public:
125 
126  OCTAVE_DEFAULT_CONSTRUCT_COPY_MOVE_DELETE (log_scaler)
127 
128  Matrix scale (const Matrix& m) const
129  {
130  Matrix retval (m.rows (), m.cols ());
131 
132  do_scale (m.data (), retval.fortran_vec (), m.numel ());
133 
134  return retval;
135  }
136 
137  NDArray scale (const NDArray& m) const
138  {
139  NDArray retval (m.dims ());
140 
141  do_scale (m.data (), retval.fortran_vec (), m.numel ());
142 
143  return retval;
144  }
145 
146  double scale (double d) const
147  { return log10 (d); }
148 
149  double unscale (double d) const
150  { return std::pow (10.0, d); }
151 
152  base_scaler * clone () const
153  { return new log_scaler (); }
154 
155 private:
156  void do_scale (const double *src, double *dest, int n) const
157  {
158  for (int i = 0; i < n; i++)
159  dest[i] = log10 (src[i]);
160  }
161 };
162 
163 class OCTINTERP_API neg_log_scaler : public base_scaler
164 {
165 public:
166 
167  OCTAVE_DEFAULT_CONSTRUCT_COPY_MOVE_DELETE (neg_log_scaler)
168 
169  Matrix scale (const Matrix& m) const
170  {
171  Matrix retval (m.rows (), m.cols ());
172 
173  do_scale (m.data (), retval.fortran_vec (), m.numel ());
174 
175  return retval;
176  }
177 
178  NDArray scale (const NDArray& m) const
179  {
180  NDArray retval (m.dims ());
181 
182  do_scale (m.data (), retval.fortran_vec (), m.numel ());
183 
184  return retval;
185  }
186 
187  double scale (double d) const
188  { return -log10 (-d); }
189 
190  double unscale (double d) const
191  { return -std::pow (10.0, -d); }
192 
193  base_scaler * clone () const
194  { return new neg_log_scaler (); }
195 
196 private:
197  void do_scale (const double *src, double *dest, int n) const
198  {
199  for (int i = 0; i < n; i++)
200  dest[i] = -log10 (-src[i]);
201  }
202 };
203 
204 class OCTINTERP_API scaler
205 {
206 public:
207 
208  scaler () : m_rep (new base_scaler ()) { }
209 
210  scaler (const scaler& s) : m_rep (s.m_rep->clone ()) { }
211 
212  scaler (const std::string& s)
213  : m_rep (s == "log"
214  ? new log_scaler ()
215  : (s == "neglog"
216  ? new neg_log_scaler ()
217  : (s == "linear"
218  ? new lin_scaler ()
219  : new base_scaler ())))
220  { }
221 
222  ~scaler () { delete m_rep; }
223 
224  Matrix scale (const Matrix& m) const
225  { return m_rep->scale (m); }
226 
227  NDArray scale (const NDArray& m) const
228  { return m_rep->scale (m); }
229 
230  double scale (double d) const
231  { return m_rep->scale (d); }
232 
233  double unscale (double d) const
234  { return m_rep->unscale (d); }
235 
236  bool is_linear () const
237  { return m_rep->is_linear (); }
238 
239  scaler& operator = (const scaler& s)
240  {
241  if (&s != this)
242  {
243  delete m_rep;
244 
245  m_rep = s.m_rep->clone ();
246  }
247 
248  return *this;
249  }
250 
251  scaler& operator = (const std::string& s)
252  {
253  delete m_rep;
254 
255  if (s == "log")
256  m_rep = new log_scaler ();
257  else if (s == "neglog")
258  m_rep = new neg_log_scaler ();
259  else if (s == "linear")
260  m_rep = new lin_scaler ();
261  else
262  m_rep = new base_scaler ();
263 
264  return *this;
265  }
266 
267 private:
268  base_scaler *m_rep;
269 };
270 
271 // ---------------------------------------------------------------------
272 
273 class OCTINTERP_API property;
274 
275 // FIXME: These values should probably be defined inside a namespace or
276 // class, but which one is most appropriate? For now, prefix with
277 // "GCB_" to avoid conflict with PERSISTENT token ID used in the lexer.
278 // The lexer token IDs should probably also be fixed...
279 
281 
282 class OCTINTERP_API base_property
283 {
284 public:
285  friend class property;
286 
287 public:
289  : m_id (-1), m_count (1), m_name (), m_parent (), m_hidden (),
290  m_listeners ()
291  { }
292 
293  base_property (const std::string& s, const graphics_handle& h)
294  : m_id (-1), m_count (1), m_name (s), m_parent (h), m_hidden (false),
295  m_listeners ()
296  { }
297 
299  : m_id (-1), m_count (1), m_name (p.m_name), m_parent (p.m_parent),
300  m_hidden (p.m_hidden), m_listeners ()
301  { }
302 
303  // FIXME: should we define assignment?
305 
306  virtual ~base_property () = default;
307 
308  bool ok () const { return m_parent.ok (); }
309 
310  std::string get_name () const { return m_name; }
311 
312  void set_name (const std::string& s) { m_name = s; }
313 
314  graphics_handle get_parent () const { return m_parent; }
315 
316  void set_parent (const graphics_handle& h) { m_parent = h; }
317 
318  bool is_hidden () const { return m_hidden; }
319 
320  void set_hidden (bool flag) { m_hidden = flag; }
321 
322  virtual bool is_radio () const { return false; }
323 
324  int get_id () const { return m_id; }
325 
326  void set_id (int d) { m_id = d; }
327 
328  // Sets property value, notifies graphics toolkit.
329  // If do_run is true, runs associated listeners.
330  OCTINTERP_API bool set (const octave_value& v, bool do_run = true,
331  bool do_notify_toolkit = true);
332 
333  virtual octave_value get () const
334  {
335  error (R"(get: invalid property "%s")", m_name.c_str ());
336  }
337 
338  virtual std::string values_as_string () const
339  {
340  error (R"(values_as_string: invalid property "%s")", m_name.c_str ());
341  }
342 
343  virtual Cell values_as_cell () const
344  {
345  error (R"(values_as_cell: invalid property "%s")", m_name.c_str ());
346  }
347 
349  {
350  set (val);
351  return *this;
352  }
353 
355  {
356  octave_value_list& l = m_listeners[mode];
357  l.resize (l.length () + 1, v);
358  }
359 
361  listener_mode mode = GCB_POSTSET)
362  {
363  octave_value_list& l = m_listeners[mode];
364 
365  if (v.is_defined ())
366  {
367  bool found = false;
368  int i;
369 
370  for (i = 0; i < l.length (); i++)
371  {
372  if (v.internal_rep () == l(i).internal_rep ())
373  {
374  found = true;
375  break;
376  }
377  }
378  if (found)
379  {
380  for (int j = i; j < l.length () - 1; j++)
381  l(j) = l(j + 1);
382 
383  l.resize (l.length () - 1);
384  }
385  }
386  else
387  {
388  if (mode == GCB_PERSISTENT)
389  l.resize (0);
390  else
391  {
392  octave_value_list lnew (0);
393  octave_value_list& lp = m_listeners[GCB_PERSISTENT];
394  for (int i = l.length () - 1; i >= 0 ; i--)
395  {
396  for (int j = 0; j < lp.length (); j++)
397  {
398  if (l(i).internal_rep () == lp(j).internal_rep ())
399  {
400  lnew.resize (lnew.length () + 1, l(i));
401  break;
402  }
403  }
404  }
405  l = lnew;
406  }
407  }
408 
409  }
410 
411  OCTINTERP_API void run_listeners (listener_mode mode = GCB_POSTSET);
412 
413  virtual base_property * clone () const
414  { return new base_property (*this); }
415 
416 protected:
417  virtual bool do_set (const octave_value&)
418  {
419  error (R"(set: invalid property "%s")", m_name.c_str ());
420  }
421 
422 private:
423  typedef std::map<listener_mode, octave_value_list> listener_map;
424  typedef std::map<listener_mode, octave_value_list>::iterator
425  listener_map_iterator;
426  typedef std::map<listener_mode, octave_value_list>::const_iterator
427  listener_map_const_iterator;
428 
429 private:
430  int m_id;
431  octave::refcount<octave_idx_type> m_count;
432  std::string m_name;
433  graphics_handle m_parent;
434  bool m_hidden;
435  listener_map m_listeners;
436 };
437 
438 // ---------------------------------------------------------------------
439 
440 class OCTINTERP_API string_property : public base_property
441 {
442 public:
443 
444  string_property () = delete;
445 
446  string_property (const std::string& s, const graphics_handle& h,
447  const std::string& val = "")
448  : base_property (s, h), m_str (val) { }
449 
450  string_property (const string_property&) = default;
451 
452  // FIXME: should we define assignment?
453  string_property& operator = (const string_property&) = delete;
454 
455  ~string_property () = default;
456 
457  octave_value get () const
458  { return octave_value (m_str); }
459 
460  std::string string_value () const { return m_str; }
461 
462  string_property& operator = (const octave_value& val)
463  {
464  set (val);
465  return *this;
466  }
467 
468  base_property * clone () const { return new string_property (*this); }
469 
470 protected:
471  bool do_set (const octave_value& val)
472  {
473  if (! val.is_string ())
474  error (R"(set: invalid string property value for "%s")",
475  get_name ().c_str ());
476 
477  std::string new_str = val.string_value ();
478 
479  if (new_str != m_str)
480  {
481  m_str = new_str;
482  return true;
483  }
484  return false;
485  }
486 
487 private:
488  std::string m_str;
489 };
490 
491 // ---------------------------------------------------------------------
492 
493 class OCTINTERP_API string_array_property : public base_property
494 {
495 public:
496  enum desired_enum { string_t, cell_t };
497 
499 
500  string_array_property (const std::string& s, const graphics_handle& h,
501  const std::string& val = "", const char& sep = '|',
502  const desired_enum& typ = string_t)
503  : base_property (s, h), m_desired_type (typ), m_separator (sep), m_str ()
504  {
505  std::size_t pos = 0;
506 
507  while (true)
508  {
509  std::size_t new_pos = val.find_first_of (m_separator, pos);
510 
511  if (new_pos == std::string::npos)
512  {
513  m_str.append (val.substr (pos));
514  break;
515  }
516  else
517  m_str.append (val.substr (pos, new_pos - pos));
518 
519  pos = new_pos + 1;
520  }
521  }
522 
523  string_array_property (const std::string& s, const graphics_handle& h,
524  const Cell& c, const char& sep = '|',
525  const desired_enum& typ = string_t)
526  : base_property (s, h), m_desired_type (typ), m_separator (sep), m_str ()
527  {
528  if (! c.iscellstr ())
529  error (R"(set: invalid order property value for "%s")",
530  get_name ().c_str ());
531 
532  string_vector strings (c.numel ());
533 
534  for (octave_idx_type i = 0; i < c.numel (); i++)
535  strings[i] = c(i).string_value ();
536 
537  m_str = strings;
538  }
539 
541 
542  // FIXME: should we define assignment?
543  string_array_property& operator = (const string_array_property&) = delete;
544 
546 
547  octave_value get () const
548  {
549  if (m_desired_type == string_t)
550  return octave_value (string_value ());
551  else
552  return octave_value (cell_value ());
553  }
554 
555  std::string string_value () const
556  {
557  std::string s;
558 
559  for (octave_idx_type i = 0; i < m_str.numel (); i++)
560  {
561  s += m_str[i];
562  if (i != m_str.numel () - 1)
563  s += m_separator;
564  }
565 
566  return s;
567  }
568 
569  Cell cell_value () const {return Cell (m_str);}
570 
571  string_vector string_vector_value () const { return m_str; }
572 
573  string_array_property& operator = (const octave_value& val)
574  {
575  set (val);
576  return *this;
577  }
578 
579  base_property * clone () const
580  { return new string_array_property (*this); }
581 
582 protected:
583  bool do_set (const octave_value& val)
584  {
585  if (val.is_string () && val.rows () == 1)
586  {
587  bool replace = false;
588  std::string new_str = val.string_value ();
589  string_vector strings;
590  std::size_t pos = 0;
591 
592  // Split single string on delimiter (usually '|')
593  while (pos != std::string::npos)
594  {
595  std::size_t new_pos = new_str.find_first_of (m_separator, pos);
596 
597  if (new_pos == std::string::npos)
598  {
599  strings.append (new_str.substr (pos));
600  break;
601  }
602  else
603  strings.append (new_str.substr (pos, new_pos - pos));
604 
605  pos = new_pos + 1;
606  }
607 
608  if (m_str.numel () == strings.numel ())
609  {
610  for (octave_idx_type i = 0; i < m_str.numel (); i++)
611  if (strings[i] != m_str[i])
612  {
613  replace = true;
614  break;
615  }
616  }
617  else
618  replace = true;
619 
620  m_desired_type = string_t;
621 
622  if (replace)
623  {
624  m_str = strings;
625  return true;
626  }
627  }
628  else if (val.is_string ()) // multi-row character matrix
629  {
630  bool replace = false;
631  charMatrix chm = val.char_matrix_value ();
632  octave_idx_type nel = chm.rows ();
633  string_vector strings (nel);
634 
635  if (nel != m_str.numel ())
636  replace = true;
637  for (octave_idx_type i = 0; i < nel; i++)
638  {
639  strings[i] = chm.row_as_string (i);
640  if (! replace && strings[i] != m_str[i])
641  replace = true;
642  }
643 
644  m_desired_type = string_t;
645 
646  if (replace)
647  {
648  m_str = strings;
649  return true;
650  }
651  }
652  else if (val.iscellstr ())
653  {
654  bool replace = false;
655  Cell new_cell = val.cell_value ();
656 
657  string_vector strings = new_cell.cellstr_value ();
658 
659  octave_idx_type nel = strings.numel ();
660 
661  if (nel != m_str.numel ())
662  replace = true;
663  else
664  {
665  for (octave_idx_type i = 0; i < nel; i++)
666  {
667  if (strings[i] != m_str[i])
668  {
669  replace = true;
670  break;
671  }
672  }
673  }
674 
675  m_desired_type = cell_t;
676 
677  if (replace)
678  {
679  m_str = strings;
680  return true;
681  }
682  }
683  else
684  error (R"(set: invalid string property value for "%s")",
685  get_name ().c_str ());
686 
687  return false;
688  }
689 
690 private:
691  desired_enum m_desired_type;
692  char m_separator;
693  string_vector m_str;
694 };
695 
696 // ---------------------------------------------------------------------
697 
698 class OCTINTERP_API text_label_property : public base_property
699 {
700 public:
701  enum type { char_t, cellstr_t };
702 
703  text_label_property () = delete;
704 
705  text_label_property (const std::string& s, const graphics_handle& h,
706  const std::string& val = "")
707  : base_property (s, h), m_value (val), m_stored_type (char_t)
708  { }
709 
710  text_label_property (const std::string& s, const graphics_handle& h,
711  const NDArray& nda)
712  : base_property (s, h), m_stored_type (char_t)
713  {
714  octave_idx_type nel = nda.numel ();
715 
716  m_value.resize (nel);
717 
718  for (octave_idx_type i = 0; i < nel; i++)
719  {
720  std::ostringstream buf;
721  buf << nda(i);
722  m_value[i] = buf.str ();
723  }
724  }
725 
726  text_label_property (const std::string& s, const graphics_handle& h,
727  const Cell& c)
728  : base_property (s, h), m_stored_type (cellstr_t)
729  {
730  octave_idx_type nel = c.numel ();
731 
732  m_value.resize (nel);
733 
734  for (octave_idx_type i = 0; i < nel; i++)
735  {
736  octave_value tmp = c(i);
737 
738  if (tmp.is_string ())
739  m_value[i] = c(i).string_value ();
740  else
741  {
742  double d = c(i).double_value ();
743 
744  std::ostringstream buf;
745  buf << d;
746  m_value[i] = buf.str ();
747  }
748  }
749  }
750 
752 
753  // FIXME: should we define assignment?
754  text_label_property& operator = (const text_label_property&) = delete;
755 
756  ~text_label_property () = default;
757 
758  bool empty () const
759  {
760  octave_value tmp = get ();
761  return tmp.isempty ();
762  }
763 
764  octave_value get () const
765  {
766  if (m_stored_type == char_t)
767  return octave_value (char_value ());
768  else
769  return octave_value (cell_value ());
770  }
771 
772  std::string string_value () const
773  {
774  return m_value.empty () ? "" : m_value[0];
775  }
776 
777  string_vector string_vector_value () const { return m_value; }
778 
779  charMatrix char_value () const { return charMatrix (m_value, ' '); }
780 
781  Cell cell_value () const {return Cell (m_value); }
782 
783  text_label_property& operator = (const octave_value& val)
784  {
785  set (val);
786  return *this;
787  }
788 
789  base_property * clone () const { return new text_label_property (*this); }
790 
791 protected:
792 
793  bool do_set (const octave_value& val)
794  {
795  if (val.is_string ())
796  {
797  m_value = val.string_vector_value ();
798 
799  m_stored_type = char_t;
800  }
801  else if (val.iscell ())
802  {
803  Cell c = val.cell_value ();
804 
805  octave_idx_type nel = c.numel ();
806 
807  m_value.resize (nel);
808 
809  for (octave_idx_type i = 0; i < nel; i++)
810  {
811  octave_value tmp = c(i);
812 
813  if (tmp.is_string ())
814  m_value[i] = c(i).string_value ();
815  else
816  {
817  double d = c(i).double_value ();
818 
819  std::ostringstream buf;
820  buf << d;
821  m_value[i] = buf.str ();
822  }
823  }
824 
825  m_stored_type = cellstr_t;
826  }
827  else
828  {
829  NDArray nda;
830 
831  try
832  {
833  nda = val.array_value ();
834  }
835  catch (octave::execution_exception& ee)
836  {
837  error (ee, R"(set: invalid string property value for "%s")",
838  get_name ().c_str ());
839  }
840 
841  octave_idx_type nel = nda.numel ();
842 
843  m_value.resize (nel);
844 
845  for (octave_idx_type i = 0; i < nel; i++)
846  {
847  std::ostringstream buf;
848  buf << nda(i);
849  m_value[i] = buf.str ();
850  }
851 
852  m_stored_type = char_t;
853  }
854 
855  return true;
856  }
857 
858 private:
859  string_vector m_value;
860  type m_stored_type;
861 };
862 
863 // ---------------------------------------------------------------------
864 
865 class OCTINTERP_API radio_values
866 {
867 public:
868  OCTINTERP_API radio_values (const std::string& opt_string = "");
869 
870  OCTAVE_DEFAULT_COPY_MOVE_DELETE (radio_values)
871 
872  std::string default_value () const { return m_default_val; }
873 
874  bool validate (const std::string& val, std::string& match)
875  {
876  bool retval = true;
877 
878  if (! contains (val, match))
879  error ("invalid value = %s", val.c_str ());
880 
881  return retval;
882  }
883 
884  bool contains (const std::string& val, std::string& match)
885  {
886  std::size_t k = 0;
887 
888  std::size_t len = val.length ();
889 
890  std::string first_match;
891 
892  for (const auto& possible_val : m_possible_vals)
893  {
894  if (possible_val.compare (val, len))
895  {
896  if (len == possible_val.length ())
897  {
898  // We found a full match (consider the case of val == "replace"
899  // with possible values "replace" and "replacechildren"). Any
900  // other matches are irrelevant, so set match and return now.
901  match = possible_val;
902  return true;
903  }
904  else
905  {
906  if (k == 0)
907  first_match = possible_val;
908 
909  k++;
910  }
911  }
912  }
913 
914  if (k == 1)
915  {
916  match = first_match;
917  return true;
918  }
919  else
920  return false;
921  }
922 
923  OCTINTERP_API std::string values_as_string () const;
924 
925  OCTINTERP_API Cell values_as_cell () const;
926 
927  octave_idx_type nelem () const { return m_possible_vals.size (); }
928 
929 private:
930  // Might also want to cache
931  std::string m_default_val;
932  std::set<caseless_str> m_possible_vals;
933 };
934 
935 class OCTINTERP_API radio_property : public base_property
936 {
937 public:
938 
939  radio_property () = delete;
940 
941  radio_property (const std::string& nm, const graphics_handle& h,
942  const radio_values& v = radio_values ())
943  : base_property (nm, h),
944  m_vals (v), m_current_val (v.default_value ()) { }
945 
946  radio_property (const std::string& nm, const graphics_handle& h,
947  const std::string& v)
948  : base_property (nm, h),
949  m_vals (v), m_current_val (m_vals.default_value ()) { }
950 
951  radio_property (const std::string& nm, const graphics_handle& h,
952  const radio_values& v, const std::string& def)
953  : base_property (nm, h),
954  m_vals (v), m_current_val (def) { }
955 
956  OCTAVE_DEFAULT_COPY_MOVE_CTOR (radio_property)
957  OCTAVE_DISABLE_COPY_MOVE_ASGN (radio_property)
958 
959  ~radio_property () = default;
960 
961  octave_value get () const { return octave_value (m_current_val); }
962 
963  const std::string& current_value () const { return m_current_val; }
964 
965  std::string values_as_string () const
966  { return m_vals.values_as_string (); }
967 
968  Cell values_as_cell () const { return m_vals.values_as_cell (); }
969 
970  bool is (const caseless_str& v) const
971  { return v.compare (m_current_val); }
972 
973  bool is_radio () const { return true; }
974 
975  radio_property& operator = (const octave_value& val)
976  {
977  set (val);
978  return *this;
979  }
980 
981  base_property * clone () const { return new radio_property (*this); }
982 
983 protected:
984  bool do_set (const octave_value& newval)
985  {
986  if (! newval.is_string ())
987  error (R"(set: invalid value for radio property "%s")",
988  get_name ().c_str ());
989 
990  std::string s = newval.string_value ();
991 
992  std::string match;
993 
994  if (! m_vals.validate (s, match))
995  error (R"(set: invalid value for radio property "%s" (value = %s))",
996  get_name ().c_str (), s.c_str ());
997 
998  if (match != m_current_val)
999  {
1000  if (s.length () != match.length ())
1001  warning_with_id ("Octave:abbreviated-property-match",
1002  "%s: allowing %s to match %s value %s",
1003  "set", s.c_str (), get_name ().c_str (),
1004  match.c_str ());
1005  m_current_val = match;
1006  return true;
1007  }
1008  return false;
1009  }
1010 
1011 private:
1012  radio_values m_vals;
1013  std::string m_current_val;
1014 };
1015 
1016 // ---------------------------------------------------------------------
1017 
1018 class OCTINTERP_API color_values
1019 {
1020 public:
1021  color_values (double r = 0, double g = 0, double b = 1)
1022  : m_rgb (1, 3)
1023  {
1024  m_rgb(0) = r;
1025  m_rgb(1) = g;
1026  m_rgb(2) = b;
1027 
1028  validate ();
1029  }
1030 
1031  color_values (const std::string& str)
1032  : m_rgb (1, 3)
1033  {
1034  if (! str2rgb (str))
1035  error ("invalid color specification: %s", str.c_str ());
1036  }
1037 
1038  OCTAVE_DEFAULT_COPY_MOVE_DELETE (color_values)
1039 
1040  bool operator == (const color_values& c) const
1041  {
1042  return (m_rgb(0) == c.m_rgb(0)
1043  && m_rgb(1) == c.m_rgb(1)
1044  && m_rgb(2) == c.m_rgb(2));
1045  }
1046 
1047  bool operator != (const color_values& c) const
1048  { return ! (*this == c); }
1049 
1050  Matrix rgb () const { return m_rgb; }
1051 
1052  operator octave_value () const { return m_rgb; }
1053 
1054  void validate () const
1055  {
1056  for (int i = 0; i < 3; i++)
1057  {
1058  if (m_rgb(i) < 0 || m_rgb(i) > 1)
1059  error ("invalid RGB color specification");
1060  }
1061  }
1062 
1063 private:
1064  Matrix m_rgb;
1065 
1066  OCTINTERP_API bool str2rgb (const std::string& str);
1067 };
1068 
1069 class OCTINTERP_API color_property : public base_property
1070 {
1071 public:
1072 
1073  color_property () = delete;
1074 
1076  : base_property ("", graphics_handle ()),
1077  m_current_type (color_t), m_color_val (c), m_radio_val (v),
1078  m_current_val (v.default_value ())
1079  { }
1080 
1082  : base_property ("", graphics_handle ()),
1083  m_current_type (radio_t), m_color_val (c), m_radio_val (v),
1084  m_current_val (v.default_value ())
1085  { }
1086 
1087  color_property (const std::string& nm, const graphics_handle& h,
1088  const color_values& c = color_values (),
1089  const radio_values& v = radio_values ())
1090  : base_property (nm, h),
1091  m_current_type (color_t), m_color_val (c), m_radio_val (v),
1092  m_current_val (v.default_value ())
1093  { }
1094 
1095  color_property (const std::string& nm, const graphics_handle& h,
1096  const radio_values& v)
1097  : base_property (nm, h),
1098  m_current_type (radio_t), m_color_val (color_values ()), m_radio_val (v),
1099  m_current_val (v.default_value ())
1100  { }
1101 
1102  color_property (const std::string& nm, const graphics_handle& h,
1103  const std::string& v)
1104  : base_property (nm, h),
1105  m_current_type (radio_t), m_color_val (color_values ()), m_radio_val (v),
1106  m_current_val (m_radio_val.default_value ())
1107  { }
1108 
1109  color_property (const std::string& nm, const graphics_handle& h,
1110  const color_property& v)
1111  : base_property (nm, h),
1112  m_current_type (v.m_current_type), m_color_val (v.m_color_val),
1113  m_radio_val (v.m_radio_val), m_current_val (v.m_current_val)
1114  { }
1115 
1116  OCTAVE_DEFAULT_COPY_MOVE_CTOR (color_property)
1117  OCTAVE_DISABLE_COPY_MOVE_ASGN (color_property)
1118 
1119  ~color_property () = default;
1120 
1122  {
1123  if (m_current_type == color_t)
1124  return m_color_val.rgb ();
1125 
1126  return m_current_val;
1127  }
1128 
1129  bool is_rgb () const { return (m_current_type == color_t); }
1130 
1131  bool is_radio () const { return (m_current_type == radio_t); }
1132 
1133  bool is (const std::string& v) const
1134  { return (is_radio () && m_current_val == v); }
1135 
1136  Matrix rgb () const
1137  {
1138  if (m_current_type != color_t)
1139  error ("color has no RGB value");
1140 
1141  return m_color_val.rgb ();
1142  }
1143 
1144  const std::string& current_value () const
1145  {
1146  if (m_current_type != radio_t)
1147  error ("color has no radio value");
1148 
1149  return m_current_val;
1150  }
1151 
1152  color_property& operator = (const octave_value& val)
1153  {
1154  set (val);
1155  return *this;
1156  }
1157 
1158  operator octave_value () const { return get (); }
1159 
1160  base_property * clone () const { return new color_property (*this); }
1161 
1162  std::string values_as_string () const
1163  { return m_radio_val.values_as_string (); }
1164 
1165  Cell values_as_cell () const { return m_radio_val.values_as_cell (); }
1166 
1167 protected:
1168  OCTINTERP_API bool do_set (const octave_value& newval);
1169 
1170 private:
1171  enum current_enum { color_t, radio_t } m_current_type;
1172  color_values m_color_val;
1173  radio_values m_radio_val;
1174  std::string m_current_val;
1175 };
1176 
1177 // ---------------------------------------------------------------------
1178 
1180 {
1184  NOT_INF
1185 };
1186 
1187 class OCTINTERP_API double_property : public base_property
1188 {
1189 public:
1190 
1191  double_property () = delete;
1192 
1193  double_property (const std::string& nm, const graphics_handle& h,
1194  double d = 0)
1195  : base_property (nm, h),
1196  m_current_val (d), m_finite_constraint (NO_CHECK),
1197  m_minval (std::pair<double, bool> (octave_NaN, true)),
1198  m_maxval (std::pair<double, bool> (octave_NaN, true)) { }
1199 
1201  : base_property (p), m_current_val (p.m_current_val),
1202  m_finite_constraint (NO_CHECK),
1203  m_minval (std::pair<double, bool> (octave_NaN, true)),
1204  m_maxval (std::pair<double, bool> (octave_NaN, true)) { }
1205 
1206  // FIXME: should we define assignment?
1207  double_property& operator = (const double_property&) = delete;
1208 
1209  ~double_property () = default;
1210 
1211  octave_value get () const { return octave_value (m_current_val); }
1212 
1213  double double_value () const { return m_current_val; }
1214 
1215  double_property& operator = (const octave_value& val)
1216  {
1217  set (val);
1218  return *this;
1219  }
1220 
1222  {
1223  double_property *p = new double_property (*this);
1224 
1225  p->m_finite_constraint = m_finite_constraint;
1226  p->m_minval = m_minval;
1227  p->m_maxval = m_maxval;
1228 
1229  return p;
1230  }
1231 
1232  void add_constraint (const std::string& type, double val, bool inclusive)
1233  {
1234  if (type == "min")
1235  m_minval = std::pair<double, bool> (val, inclusive);
1236  else if (type == "max")
1237  m_maxval = std::pair<double, bool> (val, inclusive);
1238  }
1239 
1240  void add_constraint (const finite_type finite)
1241  { m_finite_constraint = finite; }
1242 
1243 protected:
1244  bool do_set (const octave_value& v)
1245  {
1246  if (! v.is_scalar_type () || ! v.isreal ())
1247  error (R"(set: invalid value for double property "%s")",
1248  get_name ().c_str ());
1249 
1250  double new_val = v.double_value ();
1251 
1252  // Check min and max
1253  if (! octave::math::isnan (m_minval.first))
1254  {
1255  if (m_minval.second && m_minval.first > new_val)
1256  error (R"(set: "%s" must be greater than or equal to %g)",
1257  get_name ().c_str (), m_minval.first);
1258  else if (! m_minval.second && m_minval.first >= new_val)
1259  error (R"(set: "%s" must be greater than %g)",
1260  get_name ().c_str (), m_minval.first);
1261  }
1262 
1263  if (! octave::math::isnan (m_maxval.first))
1264  {
1265  if (m_maxval.second && m_maxval.first < new_val)
1266  error (R"(set: "%s" must be less than or equal to %g)",
1267  get_name ().c_str (), m_maxval.first);
1268  else if (! m_maxval.second && m_maxval.first <= new_val)
1269  error (R"(set: "%s" must be less than %g)",
1270  get_name ().c_str (), m_maxval.first);
1271  }
1272 
1273  if (m_finite_constraint == NO_CHECK) { /* do nothing */ }
1274  else if (m_finite_constraint == FINITE)
1275  {
1276  if (! octave::math::isfinite (new_val))
1277  error (R"(set: "%s" must be finite)", get_name ().c_str ());
1278  }
1279  else if (m_finite_constraint == NOT_NAN)
1280  {
1281  if (octave::math::isnan (new_val))
1282  error (R"(set: "%s" must not be nan)", get_name ().c_str ());
1283  }
1284  else if (m_finite_constraint == NOT_INF)
1285  {
1286  if (octave::math::isinf (new_val))
1287  error (R"(set: "%s" must not be infinite)", get_name ().c_str ());
1288  }
1289 
1290  if (new_val != m_current_val)
1291  {
1292  m_current_val = new_val;
1293  return true;
1294  }
1295 
1296  return false;
1297  }
1298 
1299 private:
1300  double m_current_val;
1301  finite_type m_finite_constraint;
1302  std::pair<double, bool> m_minval, m_maxval;
1303 };
1304 
1305 // ---------------------------------------------------------------------
1306 
1307 class OCTINTERP_API double_radio_property : public base_property
1308 {
1309 public:
1310 
1312 
1314  : base_property ("", graphics_handle ()),
1315  m_current_type (double_t), m_dval (d), m_radio_val (v),
1316  m_current_val (v.default_value ())
1317  { }
1318 
1319  double_radio_property (const std::string& nm, const graphics_handle& h,
1320  const std::string& v)
1321  : base_property (nm, h),
1322  m_current_type (radio_t), m_dval (0), m_radio_val (v),
1323  m_current_val (m_radio_val.default_value ())
1324  { }
1325 
1326  double_radio_property (const std::string& nm, const graphics_handle& h,
1327  const double_radio_property& v)
1328  : base_property (nm, h),
1329  m_current_type (v.m_current_type), m_dval (v.m_dval),
1330  m_radio_val (v.m_radio_val), m_current_val (v.m_current_val)
1331  { }
1332 
1333  OCTAVE_DEFAULT_COPY_MOVE_CTOR (double_radio_property)
1334  OCTAVE_DISABLE_COPY_MOVE_ASGN (double_radio_property)
1335 
1337 
1339  {
1340  if (m_current_type == double_t)
1341  return m_dval;
1342 
1343  return m_current_val;
1344  }
1345 
1346  bool is_double () const { return (m_current_type == double_t); }
1347 
1348  bool is_radio () const { return (m_current_type == radio_t); }
1349 
1350  bool is (const std::string& v) const
1351  { return (is_radio () && m_current_val == v); }
1352 
1353  double double_value () const
1354  {
1355  if (m_current_type != double_t)
1356  error ("%s: property has no double", get_name ().c_str ());
1357 
1358  return m_dval;
1359  }
1360 
1361  const std::string& current_value () const
1362  {
1363  if (m_current_type != radio_t)
1364  error ("%s: property has no radio value", get_name ().c_str ());
1365 
1366  return m_current_val;
1367  }
1368 
1369  double_radio_property& operator = (const octave_value& val)
1370  {
1371  set (val);
1372  return *this;
1373  }
1374 
1375  operator octave_value () const { return get (); }
1376 
1378  { return new double_radio_property (*this); }
1379 
1380 protected:
1381  OCTINTERP_API bool do_set (const octave_value& v);
1382 
1383 private:
1384  enum current_enum { double_t, radio_t } m_current_type;
1385  double m_dval;
1386  radio_values m_radio_val;
1387  std::string m_current_val;
1388 };
1389 
1390 // ---------------------------------------------------------------------
1391 
1392 class OCTINTERP_API array_property : public base_property
1393 {
1394 public:
1396  : base_property ("", graphics_handle ()), m_data (Matrix ()),
1397  m_min_val (), m_max_val (), m_min_pos (), m_max_neg (),
1398  m_type_constraints (), m_size_constraints (),
1399  m_finite_constraint (NO_CHECK),
1400  m_minval (std::pair<double, bool> (octave_NaN, true)),
1401  m_maxval (std::pair<double, bool> (octave_NaN, true))
1402  {
1403  get_data_limits ();
1404  }
1405 
1406  array_property (const std::string& nm, const graphics_handle& h,
1407  const octave_value& m)
1408  : base_property (nm, h), m_data (m.issparse () ? m.full_value () : m),
1409  m_min_val (), m_max_val (), m_min_pos (), m_max_neg (),
1410  m_type_constraints (), m_size_constraints (),
1411  m_finite_constraint (NO_CHECK),
1412  m_minval (std::pair<double, bool> (octave_NaN, true)),
1413  m_maxval (std::pair<double, bool> (octave_NaN, true))
1414  {
1415  get_data_limits ();
1416  }
1417 
1418  // This copy constructor is only intended to be used
1419  // internally to access min/max values; no need to
1420  // copy constraints.
1422  : base_property (p), m_data (p.m_data),
1423  m_min_val (p.m_min_val), m_max_val (p.m_max_val),
1424  m_min_pos (p.m_min_pos), m_max_neg (p.m_max_neg),
1425  m_type_constraints (), m_size_constraints (),
1426  m_finite_constraint (NO_CHECK),
1427  m_minval (std::pair<double, bool> (octave_NaN, true)),
1428  m_maxval (std::pair<double, bool> (octave_NaN, true))
1429  { }
1430 
1431  // FIXME: Should we define assignment?
1432  array_property& operator = (const array_property&) = delete;
1433 
1434  ~array_property () = default;
1435 
1436  octave_value get () const { return m_data; }
1437 
1438  void add_constraint (const std::string& type)
1439  { m_type_constraints.insert (type); }
1440 
1441  void add_constraint (const dim_vector& dims)
1442  { m_size_constraints.push_back (dims); }
1443 
1444  void add_constraint (const finite_type finite)
1445  { m_finite_constraint = finite; }
1446 
1447  void add_constraint (const std::string& type, double val, bool inclusive)
1448  {
1449  if (type == "min")
1450  m_minval = std::pair<double, bool> (val, inclusive);
1451  else if (type == "max")
1452  m_maxval = std::pair<double, bool> (val, inclusive);
1453  }
1454 
1455  double min_val () const { return m_min_val; }
1456  double max_val () const { return m_max_val; }
1457  double min_pos () const { return m_min_pos; }
1458  double max_neg () const { return m_max_neg; }
1459 
1461  {
1462  Matrix m (1, 4);
1463 
1464  m(0) = min_val ();
1465  m(1) = max_val ();
1466  m(2) = min_pos ();
1467  m(3) = max_neg ();
1468 
1469  return m;
1470  }
1471 
1472  array_property& operator = (const octave_value& val)
1473  {
1474  set (val);
1475  return *this;
1476  }
1477 
1479  {
1480  array_property *p = new array_property (*this);
1481 
1482  p->m_type_constraints = m_type_constraints;
1483  p->m_size_constraints = m_size_constraints;
1484  p->m_finite_constraint = m_finite_constraint;
1485  p->m_minval = m_minval;
1486  p->m_maxval = m_maxval;
1487 
1488  return p;
1489  }
1490 
1491 protected:
1492  bool do_set (const octave_value& v)
1493  {
1494  octave_value tmp = (v.issparse () ? v.full_value () : v);
1495 
1496  if (! validate (tmp))
1497  error (R"(invalid value for array property "%s")",
1498  get_name ().c_str ());
1499 
1500  // FIXME: should we check for actual data change?
1501  if (! is_equal (tmp))
1502  {
1503  m_data = tmp;
1504 
1505  get_data_limits ();
1506 
1507  return true;
1508  }
1509 
1510  return false;
1511  }
1512 
1513 private:
1514  OCTINTERP_API bool validate (const octave_value& v);
1515 
1516  OCTINTERP_API bool is_equal (const octave_value& v) const;
1517 
1518  OCTINTERP_API void get_data_limits ();
1519 
1520 protected:
1522  double m_min_val;
1523  double m_max_val;
1524  double m_min_pos;
1525  double m_max_neg;
1526  std::set<std::string> m_type_constraints;
1527  std::list<dim_vector> m_size_constraints;
1529  std::pair<double, bool> m_minval, m_maxval;
1530 };
1531 
1532 class OCTINTERP_API row_vector_property : public array_property
1533 {
1534 public:
1535 
1536  row_vector_property () = delete;
1537 
1538  row_vector_property (const std::string& nm, const graphics_handle& h,
1539  const octave_value& m)
1540  : array_property (nm, h, m)
1541  {
1542  add_constraint (dim_vector (-1, 1));
1543  add_constraint (dim_vector (1, -1));
1544  add_constraint (dim_vector (0, 0));
1545  }
1546 
1548  : array_property (p)
1549  {
1550  add_constraint (dim_vector (-1, 1));
1551  add_constraint (dim_vector (1, -1));
1552  add_constraint (dim_vector (0, 0));
1553  }
1554 
1555  // FIXME: should we define assignment?
1556  row_vector_property& operator = (const row_vector_property&) = delete;
1557 
1558  ~row_vector_property () = default;
1559 
1560  void add_constraint (const std::string& type)
1561  {
1563  }
1564 
1565  void add_constraint (const dim_vector& dims)
1566  {
1568  }
1569 
1570  void add_constraint (const finite_type finite)
1571  {
1573  }
1574 
1575  void add_constraint (const std::string& type, double val, bool inclusive)
1576  {
1577  array_property::add_constraint (type, val, inclusive);
1578  }
1579 
1581  {
1582  m_size_constraints.remove (dim_vector (1, -1));
1583  m_size_constraints.remove (dim_vector (-1, 1));
1584  m_size_constraints.remove (dim_vector (0, 0));
1585 
1586  add_constraint (dim_vector (1, len));
1587  add_constraint (dim_vector (len, 1));
1588  }
1589 
1590  row_vector_property& operator = (const octave_value& val)
1591  {
1592  set (val);
1593  return *this;
1594  }
1595 
1597  {
1598  row_vector_property *p = new row_vector_property (*this);
1599 
1600  p->m_type_constraints = m_type_constraints;
1601  p->m_size_constraints = m_size_constraints;
1602  p->m_finite_constraint = m_finite_constraint;
1603  p->m_minval = m_minval;
1604  p->m_maxval = m_maxval;
1605 
1606  return p;
1607  }
1608 
1609 protected:
1610  bool do_set (const octave_value& v)
1611  {
1612  bool retval = array_property::do_set (v);
1613 
1614  dim_vector dv = m_data.dims ();
1615 
1616  if (dv(0) > 1 && dv(1) == 1)
1617  {
1618  int tmp = dv(0);
1619  dv(0) = dv(1);
1620  dv(1) = tmp;
1621 
1622  m_data = m_data.reshape (dv);
1623  }
1624 
1625  return retval;
1626  }
1627 
1628 private:
1629  OCTINTERP_API bool validate (const octave_value& v);
1630 };
1631 
1632 // ---------------------------------------------------------------------
1633 
1634 class OCTINTERP_API bool_property : public radio_property
1635 {
1636 public:
1637 
1638  bool_property () = delete;
1639 
1640  bool_property (const std::string& nm, const graphics_handle& h,
1641  bool val)
1642  : radio_property (nm, h, radio_values (val ? "{on}|off" : "on|{off}"))
1643  { }
1644 
1645  bool_property (const std::string& nm, const graphics_handle& h,
1646  const char *val)
1647  : radio_property (nm, h, radio_values (std::string (val) == "on" ?
1648  "{on}|off" : "on|{off}"), val)
1649  { }
1650 
1651  OCTAVE_DEFAULT_COPY_MOVE_CTOR (bool_property)
1652  OCTAVE_DISABLE_COPY_MOVE_ASGN (bool_property)
1653 
1654  ~bool_property () = default;
1655 
1656  bool is_on () const { return is ("on"); }
1657 
1658  bool_property& operator = (const octave_value& val)
1659  {
1660  set (val);
1661  return *this;
1662  }
1663 
1664  base_property * clone () const { return new bool_property (*this); }
1665 
1666 protected:
1667  bool do_set (const octave_value& val)
1668  {
1669  if (val.is_bool_scalar ())
1670  return radio_property::do_set (val.bool_value () ? "on" : "off");
1671  else
1672  return radio_property::do_set (val);
1673  }
1674 };
1675 
1676 // ---------------------------------------------------------------------
1677 
1678 class OCTINTERP_API handle_property : public base_property
1679 {
1680 public:
1681 
1682  handle_property () = delete;
1683 
1684  handle_property (const std::string& nm, const graphics_handle& h,
1685  const graphics_handle& val = graphics_handle ())
1686  : base_property (nm, h),
1687  m_current_val (val) { }
1688 
1689  handle_property (const handle_property&) = default;
1690 
1691  // FIXME: should we define assignment?
1692  handle_property& operator = (const handle_property&) = delete;
1693 
1694  ~handle_property () = default;
1695 
1696  octave_value get () const { return m_current_val.as_octave_value (); }
1697 
1698  graphics_handle handle_value () const { return m_current_val; }
1699 
1700  handle_property& operator = (const octave_value& val)
1701  {
1702  set (val);
1703  return *this;
1704  }
1705 
1706  handle_property& operator = (const graphics_handle& h)
1707  {
1708  set (octave_value (h.value ()));
1709  return *this;
1710  }
1711 
1712  void invalidate ()
1713  { m_current_val = octave::numeric_limits<double>::NaN (); }
1714 
1715  base_property * clone () const { return new handle_property (*this); }
1716 
1717  void add_constraint (const std::string& type)
1718  { m_type_constraints.insert (type); }
1719 
1720 protected:
1721  OCTINTERP_API bool do_set (const octave_value& v);
1722  std::set<std::string> m_type_constraints;
1723 
1724 private:
1725  graphics_handle m_current_val;
1726 };
1727 
1728 // ---------------------------------------------------------------------
1729 
1730 class OCTINTERP_API any_property : public base_property
1731 {
1732 public:
1733 
1734  any_property () = delete;
1735 
1736  any_property (const std::string& nm, const graphics_handle& h,
1737  const octave_value& m = Matrix ())
1738  : base_property (nm, h), m_data (m) { }
1739 
1740  OCTAVE_DEFAULT_COPY_MOVE_CTOR (any_property)
1741  OCTAVE_DISABLE_COPY_MOVE_ASGN (any_property)
1742 
1743  ~any_property () = default;
1744 
1745  octave_value get () const { return m_data; }
1746 
1747  any_property& operator = (const octave_value& val)
1748  {
1749  set (val);
1750  return *this;
1751  }
1752 
1753  base_property * clone () const { return new any_property (*this); }
1754 
1755 protected:
1756  bool do_set (const octave_value& v)
1757  {
1758  m_data = v;
1759  return true;
1760  }
1761 
1762 private:
1763  octave_value m_data;
1764 };
1765 
1766 // ---------------------------------------------------------------------
1767 
1768 class OCTINTERP_API children_property : public base_property
1769 {
1770 public:
1772  : base_property ("", graphics_handle ()), m_children_list ()
1773  {
1774  do_init_children (Matrix ());
1775  }
1776 
1777  children_property (const std::string& nm, const graphics_handle& h,
1778  const Matrix& val)
1779  : base_property (nm, h), m_children_list ()
1780  {
1781  do_init_children (val);
1782  }
1783 
1785  : base_property (p), m_children_list ()
1786  {
1787  do_init_children (p.m_children_list);
1788  }
1789 
1790  children_property& operator = (const octave_value& val)
1791  {
1792  set (val);
1793  return *this;
1794  }
1795 
1796  // FIXME: should we define assignment?
1797  children_property& operator = (const children_property&) = delete;
1798 
1799  ~children_property () = default;
1800 
1801  base_property * clone () const { return new children_property (*this); }
1802 
1803  bool remove_child (double val)
1804  {
1805  return do_remove_child (val);
1806  }
1807 
1808  void adopt (double val)
1809  {
1810  do_adopt_child (val);
1811  }
1812 
1814  {
1815  return do_get_children (false);
1816  }
1817 
1819  {
1820  return do_get_children (true);
1821  }
1822 
1823  Matrix get_all () const
1824  {
1825  return do_get_all_children ();
1826  }
1827 
1829  {
1830  return octave_value (get_children ());
1831  }
1832 
1833  void delete_children (bool clear = false, bool from_root = false)
1834  {
1835  do_delete_children (clear, from_root);
1836  }
1837 
1839  {
1840  for (auto& hchild : m_children_list)
1841  {
1842  if (hchild == old_gh)
1843  {
1844  hchild = new_gh.value ();
1845  return;
1846  }
1847  }
1848 
1849  error ("children_list::renumber: child not found!");
1850  }
1851 
1852 private:
1853  typedef std::list<double>::iterator children_list_iterator;
1854  typedef std::list<double>::const_iterator const_children_list_iterator;
1855  std::list<double> m_children_list;
1856 
1857 protected:
1858  bool do_set (const octave_value& val)
1859  {
1860  Matrix new_kids;
1861 
1862  try
1863  {
1864  new_kids = val.matrix_value ();
1865  }
1866  catch (octave::execution_exception& ee)
1867  {
1868  error (ee, "set: children must be an array of graphics handles");
1869  }
1870 
1871  octave_idx_type nel = new_kids.numel ();
1872 
1873  const Matrix new_kids_column = new_kids.reshape (dim_vector (nel, 1));
1874 
1875  bool is_ok = true;
1876  bool add_hidden = true;
1877 
1878  const Matrix visible_kids = do_get_children (false);
1879  const Matrix hidden_kids = do_get_children (true);
1880 
1881  if (visible_kids.numel () == new_kids.numel ())
1882  {
1883  Matrix t1 = visible_kids.sort ();
1884  Matrix t2 = new_kids_column.sort ();
1885  Matrix t3 = hidden_kids.sort ();
1886 
1887  if (t1 != t2)
1888  is_ok = false;
1889 
1890  if (t1 == t3)
1891  add_hidden = false;
1892  }
1893  else
1894  is_ok = false;
1895 
1896  if (! is_ok)
1897  error ("set: new children list must be a permutation of existing "
1898  "children with visible handles");
1899 
1900  m_children_list.clear ();
1901 
1902  // Don't use do_init_children here, as that reverses the
1903  // order of the list, and we don't want to do that if setting
1904  // the child list directly.
1905  for (octave_idx_type i = 0; i < new_kids_column.numel (); i++)
1906  m_children_list.push_back (new_kids_column.xelem (i));
1907 
1908  if (add_hidden)
1909  for (octave_idx_type i = 0; i < hidden_kids.numel (); i++)
1910  m_children_list.push_back (hidden_kids.xelem (i));
1911 
1912  return true;
1913  }
1914 
1915 private:
1916  void do_init_children (const Matrix& val)
1917  {
1918  m_children_list.clear ();
1919  for (octave_idx_type i = 0; i < val.numel (); i++)
1920  m_children_list.push_front (val.xelem (i));
1921  }
1922 
1923  void do_init_children (const std::list<double>& val)
1924  {
1925  m_children_list.clear ();
1926  m_children_list = val;
1927  }
1928 
1929  OCTINTERP_API Matrix do_get_children (bool return_hidden) const;
1930 
1931  Matrix do_get_all_children () const
1932  {
1933  Matrix retval (m_children_list.size (), 1);
1934  octave_idx_type i = 0;
1935 
1936  for (const auto& hchild : m_children_list)
1937  retval(i++) = hchild;
1938 
1939  return retval;
1940  }
1941 
1942  bool do_remove_child (double child)
1943  {
1944  for (auto it = m_children_list.begin (); it != m_children_list.end (); it++)
1945  {
1946  if (*it == child)
1947  {
1948  m_children_list.erase (it);
1949  return true;
1950  }
1951  }
1952  return false;
1953  }
1954 
1955  void do_adopt_child (double val)
1956  {
1957  m_children_list.push_front (val);
1958  }
1959 
1960  void do_delete_children (bool clear, bool from_root);
1961 };
1962 
1963 // ---------------------------------------------------------------------
1964 
1965 class OCTINTERP_API callback_property : public base_property
1966 {
1967 public:
1968 
1969  callback_property () = delete;
1970 
1971  callback_property (const std::string& nm, const graphics_handle& h,
1972  const octave_value& m)
1973  : base_property (nm, h), m_callback (m) { }
1974 
1976 
1977  // FIXME: should we define assignment?
1978  callback_property& operator = (const callback_property&) = delete;
1979 
1980  ~callback_property () = default;
1981 
1982  octave_value get () const { return m_callback; }
1983 
1984  OCTINTERP_API void execute (const octave_value& data = octave_value ()) const;
1985 
1986  bool is_defined () const
1987  {
1988  return (m_callback.is_defined () && ! m_callback.isempty ());
1989  }
1990 
1991  callback_property& operator = (const octave_value& val)
1992  {
1993  set (val);
1994  return *this;
1995  }
1996 
1997  base_property * clone () const { return new callback_property (*this); }
1998 
1999 protected:
2000  bool do_set (const octave_value& v)
2001  {
2002  if (! validate (v))
2003  error (R"(invalid value for callback property "%s")",
2004  get_name ().c_str ());
2005 
2006  m_callback = v;
2007  return true;
2008  return false;
2009  }
2010 
2011 private:
2012  OCTINTERP_API bool validate (const octave_value& v) const;
2013 
2014 private:
2015  octave_value m_callback;
2016 };
2017 
2018 // ---------------------------------------------------------------------
2019 
2020 class OCTINTERP_API property
2021 {
2022 public:
2023  property () : m_rep (new base_property ("", graphics_handle ()))
2024  { }
2025 
2026  property (base_property *bp, bool persist = false) : m_rep (bp)
2027  { if (persist) m_rep->m_count++; }
2028 
2029  property (const property& p) : m_rep (p.m_rep)
2030  {
2031  m_rep->m_count++;
2032  }
2033 
2035  {
2036  if (--m_rep->m_count == 0)
2037  delete m_rep;
2038  }
2039 
2040  bool ok () const
2041  { return m_rep->ok (); }
2042 
2043  std::string get_name () const
2044  { return m_rep->get_name (); }
2045 
2046  void set_name (const std::string& name)
2047  { m_rep->set_name (name); }
2048 
2050  { return m_rep->get_parent (); }
2051 
2052  void set_parent (const graphics_handle& h)
2053  { m_rep->set_parent (h); }
2054 
2055  bool is_hidden () const
2056  { return m_rep->is_hidden (); }
2057 
2058  void set_hidden (bool flag)
2059  { m_rep->set_hidden (flag); }
2060 
2061  bool is_radio () const
2062  { return m_rep->is_radio (); }
2063 
2064  int get_id () const
2065  { return m_rep->get_id (); }
2066 
2067  void set_id (int d)
2068  { m_rep->set_id (d); }
2069 
2071  { return m_rep->get (); }
2072 
2073  bool set (const octave_value& val, bool do_run = true,
2074  bool do_notify_toolkit = true)
2075  { return m_rep->set (val, do_run, do_notify_toolkit); }
2076 
2077  std::string values_as_string () const
2078  { return m_rep->values_as_string (); }
2079 
2081  { return m_rep->values_as_cell (); }
2082 
2083  property& operator = (const octave_value& val)
2084  {
2085  *m_rep = val;
2086  return *this;
2087  }
2088 
2089  property& operator = (const property& p)
2090  {
2091  if (m_rep && --m_rep->m_count == 0)
2092  delete m_rep;
2093 
2094  m_rep = p.m_rep;
2095  m_rep->m_count++;
2096 
2097  return *this;
2098  }
2099 
2101  { m_rep->add_listener (v, mode); }
2102 
2104  listener_mode mode = GCB_POSTSET)
2105  { m_rep->delete_listener (v, mode); }
2106 
2108  { m_rep->run_listeners (mode); }
2109 
2110  static OCTINTERP_API property
2111  create (const std::string& name, const graphics_handle& parent,
2112  const caseless_str& type, const octave_value_list& args);
2113 
2114  property clone () const
2115  { return property (m_rep->clone ()); }
2116 
2117 private:
2118  base_property *m_rep;
2119 };
2120 
2121 // ---------------------------------------------------------------------
2122 
2123 typedef std::pair<std::string, octave_value> pval_pair;
2124 
2125 class OCTINTERP_API pval_vector : public std::vector<pval_pair>
2126 {
2127 public:
2128  const_iterator find (const std::string pname) const
2129  {
2130  const_iterator it;
2131 
2132  for (it = (*this).begin (); it != (*this).end (); it++)
2133  if (pname == (*it).first)
2134  return it;
2135 
2136  return (*this).end ();
2137  }
2138 
2139  iterator find (const std::string pname)
2140  {
2141  iterator it;
2142 
2143  for (it = (*this).begin (); it != (*this).end (); it++)
2144  if (pname == (*it).first)
2145  return it;
2146 
2147  return (*this).end ();
2148  }
2149 
2150  octave_value lookup (const std::string pname) const
2151  {
2152  octave_value retval;
2153 
2154  const_iterator it = find (pname);
2155 
2156  if (it != (*this).end ())
2157  retval = (*it).second;
2158 
2159  return retval;
2160  }
2161 
2162  octave_value& operator [] (const std::string pname)
2163  {
2164  iterator it = find (pname);
2165 
2166  if (it == (*this).end ())
2167  {
2168  push_back (pval_pair (pname, octave_value ()));
2169  return (*this).back ().second;
2170  }
2171 
2172  return (*it).second;
2173  }
2174 
2175  void erase (const std::string pname)
2176  {
2177  iterator it = find (pname);
2178  if (it != (*this).end ())
2179  erase (it);
2180  }
2181 
2182  void erase (iterator it)
2183  {
2184  std::vector<pval_pair>::erase (it);
2185  }
2186 
2187 };
2188 
2189 class OCTINTERP_API property_list
2190 {
2191 public:
2193  typedef std::map<std::string, pval_map_type> plist_map_type;
2194 
2195  typedef pval_map_type::iterator pval_map_iterator;
2196  typedef pval_map_type::const_iterator pval_map_const_iterator;
2197 
2198  typedef plist_map_type::iterator plist_map_iterator;
2199  typedef plist_map_type::const_iterator plist_map_const_iterator;
2200 
2202  : m_plist_map (m) { }
2203 
2204  OCTAVE_DEFAULT_COPY_MOVE_DELETE (property_list)
2205 
2206  OCTINTERP_API void set (const caseless_str& name, const octave_value& val);
2207 
2208  OCTINTERP_API octave_value lookup (const caseless_str& name) const;
2209 
2210  plist_map_iterator begin () { return m_plist_map.begin (); }
2211  plist_map_const_iterator begin () const { return m_plist_map.begin (); }
2212 
2213  plist_map_iterator end () { return m_plist_map.end (); }
2214  plist_map_const_iterator end () const { return m_plist_map.end (); }
2215 
2216  plist_map_iterator find (const std::string& go_name)
2217  {
2218  return m_plist_map.find (go_name);
2219  }
2220 
2221  plist_map_const_iterator find (const std::string& go_name) const
2222  {
2223  return m_plist_map.find (go_name);
2224  }
2225 
2226  OCTINTERP_API octave_scalar_map
2227  as_struct (const std::string& prefix_arg) const;
2228 
2229 private:
2230  plist_map_type m_plist_map;
2231 };
2232 
2233 // ---------------------------------------------------------------------
2234 
2235 class base_graphics_object;
2236 class graphics_object;
2237 
2238 class OCTINTERP_API base_properties
2239 {
2240 public:
2241  base_properties (const std::string& ty = "unknown",
2242  const graphics_handle& mh = graphics_handle (),
2243  const graphics_handle& p = graphics_handle ());
2244 
2245  OCTAVE_DISABLE_COPY_MOVE (base_properties)
2246 
2247  virtual ~base_properties () = default;
2248 
2249  virtual std::string graphics_object_name () const { return "unknown"; }
2250 
2251  OCTINTERP_API void mark_modified ();
2252 
2253  OCTINTERP_API void override_defaults (base_graphics_object& obj);
2254 
2255  virtual void init_integerhandle (const octave_value&)
2256  {
2257  panic_impossible ();
2258  }
2259 
2260  // Look through DEFAULTS for properties with given CLASS_NAME, and
2261  // apply them to the current object with set (virtual method).
2262 
2263  OCTINTERP_API void
2264  set_from_list (base_graphics_object& obj, property_list& defaults);
2265 
2266  void insert_property (const std::string& name, property p)
2267  {
2268  p.set_name (name);
2269  p.set_parent (m___myhandle__);
2270  m_all_props[name] = p;
2271  }
2272 
2273  virtual void set (const caseless_str&, const octave_value&);
2274 
2275  virtual octave_value get (const caseless_str& pname) const;
2276 
2277  virtual octave_value get (const std::string& pname) const
2278  {
2279  return get (caseless_str (pname));
2280  }
2281 
2282  virtual octave_value get (const char *pname) const
2283  {
2284  return get (caseless_str (pname));
2285  }
2286 
2287  virtual octave_value get (bool all = false) const;
2288 
2289  // FIXME: It seems like this function should be const, but that is
2290  // currently not possible with the way that properties are stored as
2291  // specific types in the graphics_object classes.
2292  virtual property get_property (const caseless_str& pname);
2293 
2294  virtual bool has_property (const caseless_str&) const
2295  {
2296  panic_impossible ();
2297  return false;
2298  }
2299 
2300  bool is_modified () const { return is___modified__ (); }
2301 
2302  virtual void remove_child (const graphics_handle& h, bool = false)
2303  {
2304  if (m_children.remove_child (h.value ()))
2305  {
2306  m_children.run_listeners ();
2307  mark_modified ();
2308  }
2309  }
2310 
2311  virtual void adopt (const graphics_handle& h)
2312  {
2313  m_children.adopt (h.value ());
2314  m_children.run_listeners ();
2315  mark_modified ();
2316  }
2317 
2318  virtual octave::graphics_toolkit get_toolkit () const;
2319 
2320  virtual Matrix
2321  get_boundingbox (bool /* finternal */ = false,
2322  const Matrix& /* parent_pix_size */ = Matrix ()) const
2323  { return Matrix (1, 4, 0.0); }
2324 
2325  virtual void update_boundingbox ();
2326 
2327  virtual void update_autopos (const std::string& elem_type);
2328 
2329  virtual void add_listener (const caseless_str&, const octave_value&,
2331 
2332  virtual void delete_listener (const caseless_str&, const octave_value&,
2334 
2335  void set_beingdeleted (const octave_value& val)
2336  {
2337  m_beingdeleted.set (val, true, false);
2338  update_beingdeleted ();
2339  }
2340 
2341  void set_tag (const octave_value& val) { m_tag = val; }
2342 
2343  OCTINTERP_API void set_parent (const octave_value& val);
2344 
2346  {
2347  return m_children.get_children ();
2348  }
2349 
2351  {
2352  return m_children.get_all ();
2353  }
2354 
2356  {
2357  return m_children.get_hidden ();
2358  }
2359 
2360  OCTINTERP_API void
2361  get_children_of_type (const caseless_str& type, bool get_invisible,
2362  bool traverse,
2363  std::list<graphics_object>& children_list) const;
2364 
2365  void set_modified (const octave_value& val) { set___modified__ (val); }
2366 
2367  void set___modified__ (const octave_value& val) { m___modified__ = val; }
2368 
2369  // Redirect calls to "uicontextmenu" to "contextmenu".
2370 
2372  {
2373  return get_contextmenu ();
2374  }
2375 
2377  {
2378  set_contextmenu (val);
2379  }
2380 
2381  void reparent (const graphics_handle& new_parent) { m_parent = new_parent; }
2382 
2383  // Update data limits for AXIS_TYPE (xdata, ydata, etc.) in the parent
2384  // axes object.
2385 
2386  virtual void update_axis_limits (const std::string& axis_type) const;
2387 
2388  virtual void update_axis_limits (const std::string& axis_type,
2389  const graphics_handle& h) const;
2390 
2391  virtual void update_contextmenu () const;
2392 
2393  virtual void delete_children (bool clear = false, bool from_root = false)
2394  {
2395  m_children.delete_children (clear, from_root);
2396  }
2397 
2399  {
2400  m_children.renumber (old_gh, new_gh);
2401  }
2402 
2404  {
2405  m_parent = new_gh;
2406  }
2407 
2408  static OCTINTERP_API property_list::pval_map_type factory_defaults ();
2409 
2410  // FIXME: These functions should be generated automatically by the
2411  // genprops.awk script.
2412  //
2413  // EMIT_BASE_PROPERTIES_GET_FUNCTIONS
2414 
2415  virtual octave_value get_alim () const { return octave_value (); }
2416  virtual octave_value get_clim () const { return octave_value (); }
2417  virtual octave_value get_xlim () const { return octave_value (); }
2418  virtual octave_value get_ylim () const { return octave_value (); }
2419  virtual octave_value get_zlim () const { return octave_value (); }
2420 
2421  virtual bool is_aliminclude () const { return false; }
2422  virtual bool is_climinclude () const { return false; }
2423  virtual bool is_xliminclude () const { return false; }
2424  virtual bool is_yliminclude () const { return false; }
2425  virtual bool is_zliminclude () const { return false; }
2426 
2427  OCTINTERP_API bool is_handle_visible () const;
2428 
2429  OCTINTERP_API std::set<std::string> dynamic_property_names () const;
2430 
2431  OCTINTERP_API bool has_dynamic_property (const std::string& pname) const;
2432 
2433 protected:
2434  std::set<std::string> m_dynamic_properties;
2435 
2436  OCTINTERP_API void
2437  set_dynamic (const caseless_str& pname, const octave_value& val);
2438 
2439  OCTINTERP_API octave_value get_dynamic (const caseless_str& pname) const;
2440 
2441  OCTINTERP_API octave_value get_dynamic (bool all = false) const;
2442 
2443  OCTINTERP_API property get_property_dynamic (const caseless_str& pname) const;
2444 
2445 public:
2446 
2447 
2448  static std::set<std::string> core_property_names ();
2449 
2450  static std::set<std::string> readonly_property_names ();
2451 
2452  static bool has_core_property (const caseless_str& pname);
2453 
2454  static bool has_readonly_property (const caseless_str& pname);
2455 
2456  std::set<std::string> all_property_names () const;
2457 
2458 protected:
2459 
2483 
2484 public:
2485 
2486  enum
2487  {
2488  ID_BEINGDELETED = 0,
2489  ID_BUSYACTION = 1,
2490  ID_BUTTONDOWNFCN = 2,
2491  ID_CHILDREN = 3,
2492  ID_CLIPPING = 4,
2493  ID_CONTEXTMENU = 5,
2494  ID_CREATEFCN = 6,
2495  ID_DELETEFCN = 7,
2496  ID_HANDLEVISIBILITY = 8,
2497  ID_HITTEST = 9,
2498  ID_INTERRUPTIBLE = 10,
2499  ID_PARENT = 11,
2500  ID_PICKABLEPARTS = 12,
2501  ID_SELECTED = 13,
2502  ID_SELECTIONHIGHLIGHT = 14,
2503  ID_TAG = 15,
2504  ID_TYPE = 16,
2505  ID_UICONTEXTMENU = 17,
2506  ID_USERDATA = 18,
2507  ID_VISIBLE = 19,
2508  ID___APPDATA__ = 20,
2509  ID___MODIFIED__ = 21,
2510  ID___MYHANDLE__ = 22
2511  };
2512 
2513  bool is_beingdeleted () const { return m_beingdeleted.is_on (); }
2514  std::string get_beingdeleted () const { return m_beingdeleted.current_value (); }
2515 
2516  bool busyaction_is (const std::string& v) const { return m_busyaction.is (v); }
2517  std::string get_busyaction () const { return m_busyaction.current_value (); }
2518 
2519  void execute_buttondownfcn (const octave_value& new_data = octave_value ()) const { m_buttondownfcn.execute (new_data); }
2520  octave_value get_buttondownfcn () const { return m_buttondownfcn.get (); }
2521 
2522  bool is_clipping () const { return m_clipping.is_on (); }
2523  std::string get_clipping () const { return m_clipping.current_value (); }
2524 
2525  graphics_handle get_contextmenu () const { return m_contextmenu.handle_value (); }
2526 
2527  void execute_createfcn (const octave_value& new_data = octave_value ()) const { m_createfcn.execute (new_data); }
2528  octave_value get_createfcn () const { return m_createfcn.get (); }
2529 
2530  void execute_deletefcn (const octave_value& new_data = octave_value ()) const { m_deletefcn.execute (new_data); }
2531  octave_value get_deletefcn () const { return m_deletefcn.get (); }
2532 
2533  bool handlevisibility_is (const std::string& v) const { return m_handlevisibility.is (v); }
2534  std::string get_handlevisibility () const { return m_handlevisibility.current_value (); }
2535 
2536  bool is_hittest () const { return m_hittest.is_on (); }
2537  std::string get_hittest () const { return m_hittest.current_value (); }
2538 
2539  bool is_interruptible () const { return m_interruptible.is_on (); }
2540  std::string get_interruptible () const { return m_interruptible.current_value (); }
2541 
2542  graphics_handle get_parent () const { return m_parent.handle_value (); }
2543 
2544  bool pickableparts_is (const std::string& v) const { return m_pickableparts.is (v); }
2545  std::string get_pickableparts () const { return m_pickableparts.current_value (); }
2546 
2547  bool is_selected () const { return m_selected.is_on (); }
2548  std::string get_selected () const { return m_selected.current_value (); }
2549 
2550  bool is_selectionhighlight () const { return m_selectionhighlight.is_on (); }
2551  std::string get_selectionhighlight () const { return m_selectionhighlight.current_value (); }
2552 
2553  std::string get_tag () const { return m_tag.string_value (); }
2554 
2555  std::string get_type () const { return m_type.string_value (); }
2556 
2557  octave_value get_userdata () const { return m_userdata.get (); }
2558 
2559  bool is_visible () const { return m_visible.is_on (); }
2560  std::string get_visible () const { return m_visible.current_value (); }
2561 
2562  octave_value get___appdata__ () const { return m___appdata__.get (); }
2563 
2564  bool is___modified__ () const { return m___modified__.is_on (); }
2565  std::string get___modified__ () const { return m___modified__.current_value (); }
2566 
2567  graphics_handle get___myhandle__ () const { return m___myhandle__; }
2568 
2569 
2570  void set_busyaction (const octave_value& val)
2571  {
2572  if (m_busyaction.set (val, true))
2573  {
2574  mark_modified ();
2575  }
2576  }
2577 
2579  {
2580  if (m_buttondownfcn.set (val, true))
2581  {
2582  mark_modified ();
2583  }
2584  }
2585 
2586  void set_children (const octave_value& val)
2587  {
2588  if (m_children.set (val, true))
2589  {
2590  mark_modified ();
2591  }
2592  }
2593 
2594  void set_clipping (const octave_value& val)
2595  {
2596  if (m_clipping.set (val, true))
2597  {
2598  mark_modified ();
2599  }
2600  }
2601 
2602  void set_contextmenu (const octave_value& val)
2603  {
2604  if (m_contextmenu.set (val, true))
2605  {
2606  update_contextmenu ();
2607  mark_modified ();
2608  }
2609  }
2610 
2611  void set_createfcn (const octave_value& val)
2612  {
2613  if (m_createfcn.set (val, true))
2614  {
2615  mark_modified ();
2616  }
2617  }
2618 
2619  void set_deletefcn (const octave_value& val)
2620  {
2621  if (m_deletefcn.set (val, true))
2622  {
2623  mark_modified ();
2624  }
2625  }
2626 
2628  {
2629  if (m_handlevisibility.set (val, true))
2630  {
2631  update_handlevisibility ();
2632  mark_modified ();
2633  }
2634  }
2635 
2636  void set_hittest (const octave_value& val)
2637  {
2638  if (m_hittest.set (val, true))
2639  {
2640  mark_modified ();
2641  }
2642  }
2643 
2645  {
2646  if (m_interruptible.set (val, true))
2647  {
2648  mark_modified ();
2649  }
2650  }
2651 
2653  {
2654  if (m_pickableparts.set (val, true))
2655  {
2656  mark_modified ();
2657  }
2658  }
2659 
2660  void set_selected (const octave_value& val)
2661  {
2662  if (m_selected.set (val, true))
2663  {
2664  mark_modified ();
2665  }
2666  }
2667 
2669  {
2670  if (m_selectionhighlight.set (val, true))
2671  {
2672  mark_modified ();
2673  }
2674  }
2675 
2676  void set_userdata (const octave_value& val)
2677  {
2678  if (m_userdata.set (val, true))
2679  {
2680  mark_modified ();
2681  }
2682  }
2683 
2684  void set_visible (const octave_value& val)
2685  {
2686  if (m_visible.set (val, true))
2687  {
2688  update_visible ();
2689  mark_modified ();
2690  }
2691  }
2692 
2693  void set___appdata__ (const octave_value& val)
2694  {
2695  if (m___appdata__.set (val, true))
2696  {
2697  mark_modified ();
2698  }
2699  }
2700 
2701 
2702  virtual void update_beingdeleted () { };
2703 
2704  virtual void update_handlevisibility ();
2705 
2706  virtual void update_visible () { };
2707 
2708 protected:
2710  {
2711  public:
2712  bool operator () (const caseless_str& a, const caseless_str& b) const
2713  {
2714  std::string a1 = a;
2715  std::transform (a1.begin (), a1.end (), a1.begin (), tolower);
2716  std::string b1 = b;
2717  std::transform (b1.begin (), b1.end (), b1.begin (), tolower);
2718 
2719  return a1 < b1;
2720  }
2721  };
2722 
2723  std::map<caseless_str, property, cmp_caseless_str> m_all_props;
2724 
2725 protected:
2726 
2727  virtual void init ()
2728  {
2729  m_contextmenu.add_constraint ("uicontextmenu");
2730  }
2731 };
2732 
2733 class OCTINTERP_API base_graphics_object
2734 {
2735 public:
2736  friend class graphics_object;
2737 
2738  base_graphics_object () : m_toolkit_flag (false) { }
2739 
2740  OCTAVE_DISABLE_COPY_MOVE (base_graphics_object)
2741 
2742  virtual ~base_graphics_object () = default;
2743 
2744  virtual void mark_modified ()
2745  {
2746  if (! valid_object ())
2747  error ("base_graphics_object::mark_modified: invalid graphics object");
2748 
2750  }
2751 
2753  {
2754  if (! valid_object ())
2755  error ("base_graphics_object::override_defaults: invalid graphics object");
2757  }
2758 
2760  const std::string go_name) const;
2761 
2762  virtual void set_from_list (property_list& plist)
2763  {
2764  if (! valid_object ())
2765  error ("base_graphics_object::set_from_list: invalid graphics object");
2766 
2767  get_properties ().set_from_list (*this, plist);
2768  }
2769 
2770  virtual void set (const caseless_str& pname, const octave_value& pval)
2771  {
2772  if (! valid_object ())
2773  error ("base_graphics_object::set: invalid graphics object");
2774 
2775  get_properties ().set (pname, pval);
2776  }
2777 
2778  virtual void set_defaults (const std::string&)
2779  {
2780  error ("base_graphics_object::set_defaults: invalid graphics object");
2781  }
2782 
2783  // The following version of the get method is not declared virtual
2784  // because no derived class overrides it.
2785 
2786  octave_value get (bool all = false) const
2787  {
2788  if (! valid_object ())
2789  error ("base_graphics_object::get: invalid graphics object");
2790 
2791  return get_properties ().get (all);
2792  }
2793 
2794  virtual octave_value get (const caseless_str& pname) const
2795  {
2796  if (! valid_object ())
2797  error ("base_graphics_object::get: invalid graphics object");
2798 
2799  return get_properties ().get (pname);
2800  }
2801 
2802  virtual octave_value get_default (const caseless_str&) const;
2803 
2804  virtual octave_value get_factory_default (const caseless_str&) const;
2805 
2806  virtual octave_value get_defaults () const
2807  {
2808  error ("base_graphics_object::get_defaults: invalid graphics object");
2809  }
2810 
2812  {
2813  if (! valid_object ())
2814  error ("base_graphics_object::get_defaults_list: invalid graphics object");
2815 
2816  return property_list ();
2817  }
2818 
2820  {
2821  error ("base_graphics_object::get_factory_defaults: invalid graphics object");
2822  }
2823 
2825  {
2826  error ("base_graphics_object::get_factory_defaults_list: invalid graphics object");
2827  }
2828 
2829  virtual bool has_readonly_property (const caseless_str& pname) const
2830  {
2832  }
2833 
2834  // FIXME: It seems like this function should be const, but that is
2835  // currently not possible.
2836  virtual std::string values_as_string ();
2837 
2838  // FIXME: It seems like this function should be const, but that is
2839  // currently not possible.
2840  virtual std::string value_as_string (const std::string& prop);
2841 
2842  // FIXME: It seems like this function should be const, but that is
2843  // currently not possible.
2845 
2846  virtual graphics_handle get_parent () const
2847  {
2848  if (! valid_object ())
2849  error ("base_graphics_object::get_parent: invalid graphics object");
2850 
2851  return get_properties ().get_parent ();
2852  }
2853 
2855  {
2856  if (! valid_object ())
2857  error ("base_graphics_object::get_handle: invalid graphics object");
2858 
2859  return get_properties ().get___myhandle__ ();
2860  }
2861 
2862  virtual void remove_child (const graphics_handle& h, bool from_root = false)
2863  {
2864  if (! valid_object ())
2865  error ("base_graphics_object::remove_child: invalid graphics object");
2866 
2867  get_properties ().remove_child (h, from_root);
2868  }
2869 
2870  virtual void adopt (const graphics_handle& h)
2871  {
2872  if (! valid_object ())
2873  error ("base_graphics_object::adopt: invalid graphics object");
2874 
2875  get_properties ().adopt (h);
2876  }
2877 
2878  virtual void reparent (const graphics_handle& np)
2879  {
2880  if (! valid_object ())
2881  error ("base_graphics_object::reparent: invalid graphics object");
2882 
2883  get_properties ().reparent (np);
2884  }
2885 
2886  virtual void defaults () const
2887  {
2888  if (! valid_object ())
2889  error ("base_graphics_object::default: invalid graphics object");
2890 
2891  std::string msg = (type () + "::defaults");
2892  err_not_implemented (msg.c_str ());
2893  }
2894 
2896  {
2897  static base_properties properties;
2898  warning ("base_graphics_object::get_properties: invalid graphics object");
2899  return properties;
2900  }
2901 
2902  virtual const base_properties& get_properties () const
2903  {
2904  static base_properties properties;
2905  warning ("base_graphics_object::get_properties: invalid graphics object");
2906  return properties;
2907  }
2908 
2909  virtual void update_axis_limits (const std::string& axis_type);
2910 
2911  virtual void update_axis_limits (const std::string& axis_type,
2912  const graphics_handle& h);
2913 
2914  virtual bool valid_object () const { return false; }
2915 
2916  bool valid_toolkit_object () const { return m_toolkit_flag; }
2917 
2918  virtual std::string type () const
2919  {
2920  return (valid_object () ? get_properties ().graphics_object_name ()
2921  : "unknown");
2922  }
2923 
2924  bool isa (const std::string& go_name) const
2925  {
2926  return type () == go_name;
2927  }
2928 
2929  virtual octave::graphics_toolkit get_toolkit () const
2930  {
2931  if (! valid_object ())
2932  error ("base_graphics_object::get_toolkit: invalid graphics object");
2933 
2934  return get_properties ().get_toolkit ();
2935  }
2936 
2937  virtual void add_property_listener (const std::string& nm,
2938  const octave_value& v,
2939  listener_mode mode = GCB_POSTSET)
2940  {
2941  if (valid_object ())
2942  get_properties ().add_listener (nm, v, mode);
2943  }
2944 
2945  virtual void delete_property_listener (const std::string& nm,
2946  const octave_value& v,
2947  listener_mode mode = GCB_POSTSET)
2948  {
2949  if (valid_object ())
2950  get_properties ().delete_listener (nm, v, mode);
2951  }
2952 
2953  virtual void remove_all_listeners ();
2954 
2955  virtual void reset_default_properties ();
2956 
2957 protected:
2958  virtual void initialize (const graphics_object& go)
2959  {
2960  if (! m_toolkit_flag)
2961  m_toolkit_flag = get_toolkit ().initialize (go);
2962  }
2963 
2964  virtual void finalize (const graphics_object& go)
2965  {
2966  if (m_toolkit_flag)
2967  {
2968  get_toolkit ().finalize (go);
2969  m_toolkit_flag = false;
2970  }
2971  }
2972 
2973  virtual void update (const graphics_object& go, int id)
2974  {
2975  if (m_toolkit_flag)
2976  get_toolkit ().update (go, id);
2977  }
2978 
2979 protected:
2980 
2981  // A flag telling whether this object is a valid object
2982  // in the backend context.
2984 };
2985 
2986 class OCTINTERP_API graphics_object
2987 {
2988 public:
2989 
2990  graphics_object () : m_rep (new base_graphics_object ()) { }
2991 
2992  graphics_object (base_graphics_object *new_rep) : m_rep (new_rep) { }
2993 
2994  graphics_object (const graphics_object&) = default;
2995 
2996  graphics_object& operator = (const graphics_object&) = default;
2997 
2998  ~graphics_object () = default;
2999 
3000  void mark_modified () { m_rep->mark_modified (); }
3001 
3003  {
3004  m_rep->override_defaults (obj);
3005  }
3006 
3008  {
3009  m_rep->override_defaults (*m_rep);
3010  }
3011 
3013  const std::string go_name) const
3014  {
3015  m_rep->build_user_defaults_map (def, go_name);
3016  }
3017 
3018  void set_from_list (property_list& plist) { m_rep->set_from_list (plist); }
3019 
3020  void set (const caseless_str& name, const octave_value& val)
3021  {
3022  m_rep->set (name, val);
3023  }
3024 
3025  OCTINTERP_API void set (const octave_value_list& args);
3026 
3027  OCTINTERP_API void set (const Array<std::string>& names, const Cell& values,
3028  octave_idx_type row);
3029 
3030  OCTINTERP_API void set (const octave_map& m);
3031 
3032  OCTINTERP_API void set_value_or_default (const caseless_str& name,
3033  const octave_value& val);
3034 
3035  void set_defaults (const std::string& mode) { m_rep->set_defaults (mode); }
3036 
3037  octave_value get (bool all = false) const { return m_rep->get (all); }
3038 
3039  octave_value get (const caseless_str& name) const
3040  {
3041  return name.compare ("default")
3042  ? get_defaults ()
3043  : (name.compare ("factory")
3044  ? get_factory_defaults () : m_rep->get (name));
3045  }
3046 
3047  octave_value get (const std::string& name) const
3048  {
3049  return get (caseless_str (name));
3050  }
3051 
3052  octave_value get (const char *name) const
3053  {
3054  return get (caseless_str (name));
3055  }
3056 
3058  {
3059  return m_rep->get_default (name);
3060  }
3061 
3063  {
3064  return m_rep->get_factory_default (name);
3065  }
3066 
3067  octave_value get_defaults () const { return m_rep->get_defaults (); }
3068 
3070  {
3071  return m_rep->get_defaults_list ();
3072  }
3073 
3075  {
3076  return m_rep->get_factory_defaults ();
3077  }
3078 
3080  {
3081  return m_rep->get_factory_defaults_list ();
3082  }
3083 
3084  bool has_readonly_property (const caseless_str& pname) const
3085  {
3086  return m_rep->has_readonly_property (pname);
3087  }
3088 
3089  // FIXME: It seems like this function should be const, but that is
3090  // currently not possible.
3091  std::string values_as_string () { return m_rep->values_as_string (); }
3092 
3093  // FIXME: It seems like this function should be const, but that is
3094  // currently not possible.
3095  std::string value_as_string (const std::string& prop)
3096  {
3097  return m_rep->value_as_string (prop);
3098  }
3099 
3100  // FIXME: It seems like this function should be const, but that is
3101  // currently not possible.
3102  octave_map values_as_struct () { return m_rep->values_as_struct (); }
3103 
3104  graphics_handle get_parent () const { return m_rep->get_parent (); }
3105 
3106  graphics_handle get_handle () const { return m_rep->get_handle (); }
3107 
3108  OCTINTERP_API graphics_object get_ancestor (const std::string& type) const;
3109 
3110  void remove_child (const graphics_handle& h) { m_rep->remove_child (h); }
3111 
3112  void adopt (const graphics_handle& h) { m_rep->adopt (h); }
3113 
3114  void reparent (const graphics_handle& h) { m_rep->reparent (h); }
3115 
3116  void defaults () const { m_rep->defaults (); }
3117 
3118  bool isa (const std::string& go_name) const { return m_rep->isa (go_name); }
3119 
3120  base_properties& get_properties () { return m_rep->get_properties (); }
3121 
3123  {
3124  return m_rep->get_properties ();
3125  }
3126 
3127  void update_axis_limits (const std::string& axis_type)
3128  {
3129  m_rep->update_axis_limits (axis_type);
3130  }
3131 
3132  void update_axis_limits (const std::string& axis_type,
3133  const graphics_handle& h)
3134  {
3135  m_rep->update_axis_limits (axis_type, h);
3136  }
3137 
3138  bool valid_object () const { return m_rep->valid_object (); }
3139 
3140  std::string type () const { return m_rep->type (); }
3141 
3142  operator bool () const { return m_rep->valid_object (); }
3143 
3144  // FIXME: These functions should be generated automatically by the
3145  // genprops.awk script.
3146  //
3147  // EMIT_GRAPHICS_OBJECT_GET_FUNCTIONS
3148 
3150  { return get_properties ().get_alim (); }
3151 
3153  { return get_properties ().get_clim (); }
3154 
3156  { return get_properties ().get_xlim (); }
3157 
3159  { return get_properties ().get_ylim (); }
3160 
3162  { return get_properties ().get_zlim (); }
3163 
3164  bool is_aliminclude () const
3165  { return get_properties ().is_aliminclude (); }
3166 
3167  bool is_climinclude () const
3168  { return get_properties ().is_climinclude (); }
3169 
3170  bool is_xliminclude () const
3171  { return get_properties ().is_xliminclude (); }
3172 
3173  bool is_yliminclude () const
3174  { return get_properties ().is_yliminclude (); }
3175 
3176  bool is_zliminclude () const
3177  { return get_properties ().is_zliminclude (); }
3178 
3179  bool is_handle_visible () const
3180  { return get_properties ().is_handle_visible (); }
3181 
3182  octave::graphics_toolkit get_toolkit () const
3183  { return m_rep->get_toolkit (); }
3184 
3185  void add_property_listener (const std::string& nm, const octave_value& v,
3186  listener_mode mode = GCB_POSTSET)
3187  { m_rep->add_property_listener (nm, v, mode); }
3188 
3189  void delete_property_listener (const std::string& nm, const octave_value& v,
3190  listener_mode mode = GCB_POSTSET)
3191  { m_rep->delete_property_listener (nm, v, mode); }
3192 
3193  void remove_all_listeners () { m_rep->remove_all_listeners (); }
3194 
3195  void initialize () { m_rep->initialize (*this); }
3196 
3197  void finalize () { m_rep->finalize (*this); }
3198 
3199  void update (int id) { m_rep->update (*this, id); }
3200 
3202  { m_rep->reset_default_properties (); }
3203 
3204 private:
3205 
3206  std::shared_ptr<base_graphics_object> m_rep;
3207 };
3208 
3209 // ---------------------------------------------------------------------
3210 
3211 class OCTINTERP_API root_figure : public base_graphics_object
3212 {
3213 public:
3214 
3215  // The gh_manager constructor creates the single instance of
3216  // the root_figure object.
3217 
3218  friend class gh_manager;
3219 
3220  class OCTINTERP_API properties : public base_properties
3221  {
3222  public:
3223  OCTINTERP_API void
3224  remove_child (const graphics_handle& h, bool from_root = false);
3225 
3226  OCTINTERP_API Matrix
3227  get_boundingbox (bool internal = false,
3228  const Matrix& parent_pix_size = Matrix ()) const;
3229 
3230  // See the genprops.awk script for an explanation of the
3231  // properties declarations.
3232 
3233  // FIXME: Properties that still don't have callbacks are:
3234  // monitorpositions, pointerlocation, pointerwindow.
3235  // Note that these properties are not yet used by Octave, so setting
3236  // them will have no effect.
3237 
3238  // FIXME: The commandwindowsize property has been deprecated in Matlab
3239  // and is now available through matlab.desktop.comandwindow.size.
3240  // Until Octave has something similar, keep this property in root.
3241 
3242  // Programming note: Keep property list sorted if new ones are added.
3243 
3244 public:
3245  properties (const graphics_handle& mh, const graphics_handle& p);
3246 
3247  properties () = delete;
3248 
3249  OCTAVE_DISABLE_COPY_MOVE (properties)
3250 
3251  ~properties () = default;
3252 
3253  void set (const caseless_str& pname, const octave_value& val);
3254 
3255  octave_value get (bool all = false) const;
3256 
3257  octave_value get (const caseless_str& pname) const;
3258 
3259  octave_value get (const std::string& pname) const
3260  {
3261  return get (caseless_str (pname));
3262  }
3263 
3264  octave_value get (const char *pname) const
3265  {
3266  return get (caseless_str (pname));
3267  }
3268 
3269  property get_property (const caseless_str& pname);
3270 
3271  std::string graphics_object_name () const { return s_go_name; }
3272 
3273  static property_list::pval_map_type factory_defaults ();
3274 
3275 private:
3276  static std::string s_go_name;
3277 
3278 public:
3279 
3280 
3281  static std::set<std::string> core_property_names ();
3282 
3283  static std::set<std::string> readonly_property_names ();
3284 
3285  static bool has_core_property (const caseless_str& pname);
3286 
3287  static bool has_readonly_property (const caseless_str& pname);
3288 
3289  std::set<std::string> all_property_names () const;
3290 
3291  bool has_property (const caseless_str& pname) const;
3292 
3293 private:
3294 
3295  handle_property m_callbackobject;
3296  array_property m_commandwindowsize;
3297  handle_property m_currentfigure;
3298  string_property m_fixedwidthfontname;
3299  array_property m_monitorpositions;
3300  array_property m_pointerlocation;
3301  double_property m_pointerwindow;
3302  double_property m_screendepth;
3303  double_property m_screenpixelsperinch;
3304  array_property m_screensize;
3305  bool_property m_showhiddenhandles;
3306  radio_property m_units;
3307 
3308 public:
3309 
3310  enum
3311  {
3312  ID_CALLBACKOBJECT = 1000,
3313  ID_COMMANDWINDOWSIZE = 1001,
3314  ID_CURRENTFIGURE = 1002,
3315  ID_FIXEDWIDTHFONTNAME = 1003,
3316  ID_MONITORPOSITIONS = 1004,
3317  ID_POINTERLOCATION = 1005,
3318  ID_POINTERWINDOW = 1006,
3319  ID_SCREENDEPTH = 1007,
3320  ID_SCREENPIXELSPERINCH = 1008,
3321  ID_SCREENSIZE = 1009,
3322  ID_SHOWHIDDENHANDLES = 1010,
3323  ID_UNITS = 1011
3324  };
3325 
3326  graphics_handle get_callbackobject () const { return m_callbackobject.handle_value (); }
3327 
3328  octave_value get_commandwindowsize () const { return m_commandwindowsize.get (); }
3329 
3330  graphics_handle get_currentfigure () const { return m_currentfigure.handle_value (); }
3331 
3332  std::string get_fixedwidthfontname () const { return m_fixedwidthfontname.string_value (); }
3333 
3334  octave_value get_monitorpositions () const { return m_monitorpositions.get (); }
3335 
3336  octave_value get_pointerlocation () const { return m_pointerlocation.get (); }
3337 
3338  double get_pointerwindow () const { return m_pointerwindow.double_value (); }
3339 
3340  double get_screendepth () const { return m_screendepth.double_value (); }
3341 
3342  double get_screenpixelsperinch () const { return m_screenpixelsperinch.double_value (); }
3343 
3344  octave_value get_screensize () const { return m_screensize.get (); }
3345 
3346  bool is_showhiddenhandles () const { return m_showhiddenhandles.is_on (); }
3347  std::string get_showhiddenhandles () const { return m_showhiddenhandles.current_value (); }
3348 
3349  bool units_is (const std::string& v) const { return m_units.is (v); }
3350  std::string get_units () const { return m_units.current_value (); }
3351 
3352 
3353  void set_callbackobject (const octave_value& val);
3354 
3356  {
3357  if (m_commandwindowsize.set (val, true))
3358  {
3359  mark_modified ();
3360  }
3361  }
3362 
3363  void set_currentfigure (const octave_value& val);
3364 
3366  {
3367  if (m_fixedwidthfontname.set (val, true))
3368  {
3369  mark_modified ();
3370  }
3371  }
3372 
3374  {
3375  if (m_monitorpositions.set (val, true))
3376  {
3377  mark_modified ();
3378  }
3379  }
3380 
3382  {
3383  if (m_pointerlocation.set (val, true))
3384  {
3385  mark_modified ();
3386  }
3387  }
3388 
3390  {
3391  if (m_pointerwindow.set (val, true))
3392  {
3393  mark_modified ();
3394  }
3395  }
3396 
3397  void set_screendepth (const octave_value& val)
3398  {
3399  if (m_screendepth.set (val, true))
3400  {
3401  mark_modified ();
3402  }
3403  }
3404 
3406  {
3407  if (m_screenpixelsperinch.set (val, true))
3408  {
3409  mark_modified ();
3410  }
3411  }
3412 
3413  void set_screensize (const octave_value& val)
3414  {
3415  if (m_screensize.set (val, true))
3416  {
3417  mark_modified ();
3418  }
3419  }
3420 
3422  {
3423  if (m_showhiddenhandles.set (val, true))
3424  {
3425  mark_modified ();
3426  }
3427  }
3428 
3429  void set_units (const octave_value& val)
3430  {
3431  if (m_units.set (val, true))
3432  {
3433  update_units ();
3434  mark_modified ();
3435  }
3436  }
3437 
3438  void update_units ();
3439 
3440  };
3441 
3442 private:
3443 
3444  properties m_properties;
3445 
3446 protected:
3447 
3449  : m_properties (0, graphics_handle ()), m_default_properties (),
3450  m_factory_properties (init_factory_properties ())
3451  { }
3452 
3453 public:
3454 
3455  OCTAVE_DISABLE_COPY_MOVE (root_figure)
3456 
3457  ~root_figure () = default;
3458 
3459  void mark_modified () { }
3460 
3462  {
3463  // Now override with our defaults. If the default_properties
3464  // list includes the properties for all defaults (line,
3465  // surface, etc.) then we don't have to know the type of OBJ
3466  // here, we just call its set function and let it decide which
3467  // properties from the list to use.
3468  obj.set_from_list (m_default_properties);
3469  }
3470 
3471  void set (const caseless_str& name, const octave_value& value)
3472  {
3473  if (name.compare ("default", 7))
3474  // strip "default", pass rest to function that will
3475  // parse the remainder and add the element to the
3476  // default_properties map.
3477  m_default_properties.set (name.substr (7), value);
3478  else
3479  m_properties.set (name, value);
3480  }
3481 
3482  octave_value get (const caseless_str& name) const
3483  {
3484  octave_value retval;
3485 
3486  if (name.compare ("default", 7))
3487  return get_default (name.substr (7));
3488  else if (name.compare ("factory", 7))
3489  return get_factory_default (name.substr (7));
3490  else
3491  retval = m_properties.get (name);
3492 
3493  return retval;
3494  }
3495 
3497  {
3498  octave_value retval = m_default_properties.lookup (name);
3499 
3500  if (retval.is_undefined ())
3501  {
3502  // no default property found, use factory default
3503  retval = m_factory_properties.lookup (name);
3504 
3505  if (retval.is_undefined ())
3506  error ("get: invalid default property '%s'", name.c_str ());
3507  }
3508 
3509  return retval;
3510  }
3511 
3513  {
3514  octave_value retval = m_factory_properties.lookup (name);
3515 
3516  if (retval.is_undefined ())
3517  error ("get: invalid factory default property '%s'", name.c_str ());
3518 
3519  return retval;
3520  }
3521 
3523  {
3524  return m_default_properties.as_struct ("default");
3525  }
3526 
3528  {
3529  return m_default_properties;
3530  }
3531 
3533  {
3534  return m_factory_properties.as_struct ("factory");
3535  }
3536 
3538  {
3539  return m_factory_properties;
3540  }
3541 
3542  base_properties& get_properties () { return m_properties; }
3543 
3544  const base_properties& get_properties () const { return m_properties; }
3545 
3546  bool valid_object () const { return true; }
3547 
3548  OCTINTERP_API void reset_default_properties ();
3549 
3550  bool has_readonly_property (const caseless_str& pname) const
3551  {
3552  bool retval = m_properties.has_readonly_property (pname);
3553  if (! retval)
3554  retval = base_properties::has_readonly_property (pname);
3555  return retval;
3556  }
3557 
3558 private:
3559 
3560  property_list m_default_properties;
3561 
3562  property_list m_factory_properties;
3563 
3564  static OCTINTERP_API property_list::plist_map_type
3565  init_factory_properties ();
3566 };
3567 
3568 // ---------------------------------------------------------------------
3569 
3570 class OCTINTERP_API figure : public base_graphics_object
3571 {
3572 public:
3573 
3574  class OCTINTERP_API properties : public base_properties
3575  {
3576  public:
3578  {
3579  m_integerhandle = val;
3580  }
3581 
3582  OCTINTERP_API void
3583  remove_child (const graphics_handle& h, bool from_root = false);
3584 
3585  OCTINTERP_API void set_visible (const octave_value& val);
3586 
3587  OCTINTERP_API octave::graphics_toolkit get_toolkit () const;
3588 
3589  OCTINTERP_API void set_toolkit (const octave::graphics_toolkit& b);
3590 
3591  OCTINTERP_API void set___graphics_toolkit__ (const octave_value& val);
3592 
3593  OCTINTERP_API void adopt (const graphics_handle& h);
3594 
3595  // Alias "innerposition" to "position".
3597  {
3598  return get_position ();
3599  }
3600 
3602  {
3603  set_position (val);
3604  }
3605 
3606  OCTINTERP_API void set_position (const octave_value& val,
3607  bool do_notify_toolkit = true);
3608 
3609  OCTINTERP_API void set_outerposition (const octave_value& val,
3610  bool do_notify_toolkit = true);
3611 
3612  OCTINTERP_API Matrix bbox2position (const Matrix& bbox) const;
3613 
3614  OCTINTERP_API Matrix
3615  get_boundingbox (bool internal = false,
3616  const Matrix& parent_pix_size = Matrix ()) const;
3617 
3618  OCTINTERP_API void
3619  set_boundingbox (const Matrix& bb, bool internal = false,
3620  bool do_notify_toolkit = true);
3621 
3622  OCTINTERP_API Matrix map_from_boundingbox (double x, double y) const;
3623 
3624  OCTINTERP_API Matrix map_to_boundingbox (double x, double y) const;
3625 
3626  OCTINTERP_API void update_units (const caseless_str& old_units);
3627 
3628  OCTINTERP_API void update_paperunits (const caseless_str& old_paperunits);
3629 
3630  OCTINTERP_API std::string get_title () const;
3631 
3632  // See the genprops.awk script for an explanation of the
3633  // properties declarations.
3634  // Programming note: Keep property list sorted if new ones are added.
3635 
3636 public:
3637  properties (const graphics_handle& mh, const graphics_handle& p);
3638 
3639  properties () = delete;
3640 
3641  OCTAVE_DISABLE_COPY_MOVE (properties)
3642 
3643  ~properties () = default;
3644 
3645  void set (const caseless_str& pname, const octave_value& val);
3646 
3647  octave_value get (bool all = false) const;
3648 
3649  octave_value get (const caseless_str& pname) const;
3650 
3651  octave_value get (const std::string& pname) const
3652  {
3653  return get (caseless_str (pname));
3654  }
3655 
3656  octave_value get (const char *pname) const
3657  {
3658  return get (caseless_str (pname));
3659  }
3660 
3661  property get_property (const caseless_str& pname);
3662 
3663  std::string graphics_object_name () const { return s_go_name; }
3664 
3665  static property_list::pval_map_type factory_defaults ();
3666 
3667 private:
3668  static std::string s_go_name;
3669 
3670 public:
3671 
3672 
3673  static std::set<std::string> core_property_names ();
3674 
3675  static std::set<std::string> readonly_property_names ();
3676 
3677  static bool has_core_property (const caseless_str& pname);
3678 
3679  static bool has_readonly_property (const caseless_str& pname);
3680 
3681  std::set<std::string> all_property_names () const;
3682 
3683  bool has_property (const caseless_str& pname) const;
3684 
3685 private:
3686 
3687  array_property m_alphamap;
3688  callback_property m_buttondownfcn;
3689  callback_property m_closerequestfcn;
3690  color_property m_color;
3691  array_property m_colormap;
3692  handle_property m_currentaxes;
3693  string_property m_currentcharacter;
3694  handle_property m_currentobject;
3695  array_property m_currentpoint;
3696  bool_property m_dockcontrols;
3697  string_property m_filename;
3698  bool_property m_graphicssmoothing;
3699  array_property m_innerposition;
3700  bool_property m_integerhandle;
3701  bool_property m_inverthardcopy;
3702  callback_property m_keypressfcn;
3703  callback_property m_keyreleasefcn;
3704  radio_property m_menubar;
3705  string_property m_name;
3706  array_property m_number;
3707  radio_property m_nextplot;
3708  bool_property m_numbertitle;
3709  array_property m_outerposition;
3710  radio_property m_paperorientation;
3711  array_property m_paperposition;
3712  radio_property m_paperpositionmode;
3713  array_property m_papersize;
3714  radio_property m_papertype;
3715  radio_property m_paperunits;
3716  radio_property m_pointer;
3717  array_property m_pointershapecdata;
3718  array_property m_pointershapehotspot;
3719  array_property m_position;
3720  radio_property m_renderer;
3721  radio_property m_renderermode;
3722  bool_property m_resize;
3723  callback_property m_resizefcn;
3724  radio_property m_selectiontype;
3725  callback_property m_sizechangedfcn;
3726  radio_property m_toolbar;
3727  radio_property m_units;
3728  callback_property m_windowbuttondownfcn;
3729  callback_property m_windowbuttonmotionfcn;
3730  callback_property m_windowbuttonupfcn;
3731  callback_property m_windowkeypressfcn;
3732  callback_property m_windowkeyreleasefcn;
3733  callback_property m_windowscrollwheelfcn;
3734  radio_property m_windowstate;
3735  radio_property m_windowstyle;
3736  radio_property m_pickableparts;
3737  mutable string_property m___gl_extensions__;
3738  mutable string_property m___gl_renderer__;
3739  mutable string_property m___gl_vendor__;
3740  mutable string_property m___gl_version__;
3741  bool_property m___gl_window__;
3742  string_property m___graphics_toolkit__;
3743  any_property m___guidata__;
3744  radio_property m___mouse_mode__;
3745  bool_property m___printing__;
3746  any_property m___pan_mode__;
3747  any_property m___plot_stream__;
3748  any_property m___rotate_mode__;
3749  any_property m___zoom_mode__;
3750  double_property m___device_pixel_ratio__;
3751 
3752 public:
3753 
3754  enum
3755  {
3756  ID_ALPHAMAP = 2000,
3757  ID_BUTTONDOWNFCN = 2001,
3758  ID_CLOSEREQUESTFCN = 2002,
3759  ID_COLOR = 2003,
3760  ID_COLORMAP = 2004,
3761  ID_CURRENTAXES = 2005,
3762  ID_CURRENTCHARACTER = 2006,
3763  ID_CURRENTOBJECT = 2007,
3764  ID_CURRENTPOINT = 2008,
3765  ID_DOCKCONTROLS = 2009,
3766  ID_FILENAME = 2010,
3767  ID_GRAPHICSSMOOTHING = 2011,
3768  ID_INNERPOSITION = 2012,
3769  ID_INTEGERHANDLE = 2013,
3770  ID_INVERTHARDCOPY = 2014,
3771  ID_KEYPRESSFCN = 2015,
3772  ID_KEYRELEASEFCN = 2016,
3773  ID_MENUBAR = 2017,
3774  ID_NAME = 2018,
3775  ID_NUMBER = 2019,
3776  ID_NEXTPLOT = 2020,
3777  ID_NUMBERTITLE = 2021,
3778  ID_OUTERPOSITION = 2022,
3779  ID_PAPERORIENTATION = 2023,
3780  ID_PAPERPOSITION = 2024,
3781  ID_PAPERPOSITIONMODE = 2025,
3782  ID_PAPERSIZE = 2026,
3783  ID_PAPERTYPE = 2027,
3784  ID_PAPERUNITS = 2028,
3785  ID_POINTER = 2029,
3786  ID_POINTERSHAPECDATA = 2030,
3787  ID_POINTERSHAPEHOTSPOT = 2031,
3788  ID_POSITION = 2032,
3789  ID_RENDERER = 2033,
3790  ID_RENDERERMODE = 2034,
3791  ID_RESIZE = 2035,
3792  ID_RESIZEFCN = 2036,
3793  ID_SELECTIONTYPE = 2037,
3794  ID_SIZECHANGEDFCN = 2038,
3795  ID_TOOLBAR = 2039,
3796  ID_UNITS = 2040,
3797  ID_WINDOWBUTTONDOWNFCN = 2041,
3798  ID_WINDOWBUTTONMOTIONFCN = 2042,
3799  ID_WINDOWBUTTONUPFCN = 2043,
3800  ID_WINDOWKEYPRESSFCN = 2044,
3801  ID_WINDOWKEYRELEASEFCN = 2045,
3802  ID_WINDOWSCROLLWHEELFCN = 2046,
3803  ID_WINDOWSTATE = 2047,
3804  ID_WINDOWSTYLE = 2048,
3805  ID_PICKABLEPARTS = 2049,
3806  ID___GL_EXTENSIONS__ = 2050,
3807  ID___GL_RENDERER__ = 2051,
3808  ID___GL_VENDOR__ = 2052,
3809  ID___GL_VERSION__ = 2053,
3810  ID___GL_WINDOW__ = 2054,
3811  ID___GRAPHICS_TOOLKIT__ = 2055,
3812  ID___GUIDATA__ = 2056,
3813  ID___MOUSE_MODE__ = 2057,
3814  ID___PRINTING__ = 2058,
3815  ID___PAN_MODE__ = 2059,
3816  ID___PLOT_STREAM__ = 2060,
3817  ID___ROTATE_MODE__ = 2061,
3818  ID___ZOOM_MODE__ = 2062,
3819  ID___DEVICE_PIXEL_RATIO__ = 2063
3820  };
3821 
3822  octave_value get_alphamap () const { return m_alphamap.get (); }
3823 
3824  void execute_buttondownfcn (const octave_value& new_data = octave_value ()) const { m_buttondownfcn.execute (new_data); }
3825  octave_value get_buttondownfcn () const { return m_buttondownfcn.get (); }
3826 
3827  void execute_closerequestfcn (const octave_value& new_data = octave_value ()) const { m_closerequestfcn.execute (new_data); }
3828  octave_value get_closerequestfcn () const { return m_closerequestfcn.get (); }
3829 
3830  bool color_is_rgb () const { return m_color.is_rgb (); }
3831  bool color_is (const std::string& v) const { return m_color.is (v); }
3832  Matrix get_color_rgb () const { return (m_color.is_rgb () ? m_color.rgb () : Matrix ()); }
3833  octave_value get_color () const { return m_color.get (); }
3834 
3835  octave_value get_colormap () const { return m_colormap.get (); }
3836 
3837  graphics_handle get_currentaxes () const { return m_currentaxes.handle_value (); }
3838 
3839  std::string get_currentcharacter () const { return m_currentcharacter.string_value (); }
3840 
3841  graphics_handle get_currentobject () const { return m_currentobject.handle_value (); }
3842 
3843  octave_value get_currentpoint () const { return m_currentpoint.get (); }
3844 
3845  bool is_dockcontrols () const { return m_dockcontrols.is_on (); }
3846  std::string get_dockcontrols () const { return m_dockcontrols.current_value (); }
3847 
3848  std::string get_filename () const { return m_filename.string_value (); }
3849 
3850  bool is_graphicssmoothing () const { return m_graphicssmoothing.is_on (); }
3851  std::string get_graphicssmoothing () const { return m_graphicssmoothing.current_value (); }
3852 
3853  bool is_integerhandle () const { return m_integerhandle.is_on (); }
3854  std::string get_integerhandle () const { return m_integerhandle.current_value (); }
3855 
3856  bool is_inverthardcopy () const { return m_inverthardcopy.is_on (); }
3857  std::string get_inverthardcopy () const { return m_inverthardcopy.current_value (); }
3858 
3859  void execute_keypressfcn (const octave_value& new_data = octave_value ()) const { m_keypressfcn.execute (new_data); }
3860  octave_value get_keypressfcn () const { return m_keypressfcn.get (); }
3861 
3862  void execute_keyreleasefcn (const octave_value& new_data = octave_value ()) const { m_keyreleasefcn.execute (new_data); }
3863  octave_value get_keyreleasefcn () const { return m_keyreleasefcn.get (); }
3864 
3865  bool menubar_is (const std::string& v) const { return m_menubar.is (v); }
3866  std::string get_menubar () const { return m_menubar.current_value (); }
3867 
3868  std::string get_name () const { return m_name.string_value (); }
3869 
3870  octave_value get_number () const;
3871 
3872  bool nextplot_is (const std::string& v) const { return m_nextplot.is (v); }
3873  std::string get_nextplot () const { return m_nextplot.current_value (); }
3874 
3875  bool is_numbertitle () const { return m_numbertitle.is_on (); }
3876  std::string get_numbertitle () const { return m_numbertitle.current_value (); }
3877 
3878  octave_value get_outerposition () const { return m_outerposition.get (); }
3879 
3880  bool paperorientation_is (const std::string& v) const { return m_paperorientation.is (v); }
3881  std::string get_paperorientation () const { return m_paperorientation.current_value (); }
3882 
3883  octave_value get_paperposition () const { return m_paperposition.get (); }
3884 
3885  bool paperpositionmode_is (const std::string& v) const { return m_paperpositionmode.is (v); }
3886  std::string get_paperpositionmode () const { return m_paperpositionmode.current_value (); }
3887 
3888  octave_value get_papersize () const { return m_papersize.get (); }
3889 
3890  bool papertype_is (const std::string& v) const { return m_papertype.is (v); }
3891  std::string get_papertype () const { return m_papertype.current_value (); }
3892 
3893  bool paperunits_is (const std::string& v) const { return m_paperunits.is (v); }
3894  std::string get_paperunits () const { return m_paperunits.current_value (); }
3895 
3896  bool pointer_is (const std::string& v) const { return m_pointer.is (v); }
3897  std::string get_pointer () const { return m_pointer.current_value (); }
3898 
3899  octave_value get_pointershapecdata () const { return m_pointershapecdata.get (); }
3900 
3901  octave_value get_pointershapehotspot () const { return m_pointershapehotspot.get (); }
3902 
3903  octave_value get_position () const { return m_position.get (); }
3904 
3905  bool renderer_is (const std::string& v) const { return m_renderer.is (v); }
3906  std::string get_renderer () const { return m_renderer.current_value (); }
3907 
3908  bool renderermode_is (const std::string& v) const { return m_renderermode.is (v); }
3909  std::string get_renderermode () const { return m_renderermode.current_value (); }
3910 
3911  bool is_resize () const { return m_resize.is_on (); }
3912  std::string get_resize () const { return m_resize.current_value (); }
3913 
3914  void execute_resizefcn (const octave_value& new_data = octave_value ()) const { m_resizefcn.execute (new_data); }
3915  octave_value get_resizefcn () const { return m_resizefcn.get (); }
3916 
3917  bool selectiontype_is (const std::string& v) const { return m_selectiontype.is (v); }
3918  std::string get_selectiontype () const { return m_selectiontype.current_value (); }
3919 
3920  void execute_sizechangedfcn (const octave_value& new_data = octave_value ()) const { m_sizechangedfcn.execute (new_data); }
3921  octave_value get_sizechangedfcn () const { return m_sizechangedfcn.get (); }
3922 
3923  bool toolbar_is (const std::string& v) const { return m_toolbar.is (v); }
3924  std::string get_toolbar () const { return m_toolbar.current_value (); }
3925 
3926  bool units_is (const std::string& v) const { return m_units.is (v); }
3927  std::string get_units () const { return m_units.current_value (); }
3928 
3929  void execute_windowbuttondownfcn (const octave_value& new_data = octave_value ()) const { m_windowbuttondownfcn.execute (new_data); }
3930  octave_value get_windowbuttondownfcn () const { return m_windowbuttondownfcn.get (); }
3931 
3932  void execute_windowbuttonmotionfcn (const octave_value& new_data = octave_value ()) const { m_windowbuttonmotionfcn.execute (new_data); }
3933  octave_value get_windowbuttonmotionfcn () const { return m_windowbuttonmotionfcn.get (); }
3934 
3935  void execute_windowbuttonupfcn (const octave_value& new_data = octave_value ()) const { m_windowbuttonupfcn.execute (new_data); }
3936  octave_value get_windowbuttonupfcn () const { return m_windowbuttonupfcn.get (); }
3937 
3938  void execute_windowkeypressfcn (const octave_value& new_data = octave_value ()) const { m_windowkeypressfcn.execute (new_data); }
3939  octave_value get_windowkeypressfcn () const { return m_windowkeypressfcn.get (); }
3940 
3941  void execute_windowkeyreleasefcn (const octave_value& new_data = octave_value ()) const { m_windowkeyreleasefcn.execute (new_data); }
3942  octave_value get_windowkeyreleasefcn () const { return m_windowkeyreleasefcn.get (); }
3943 
3944  void execute_windowscrollwheelfcn (const octave_value& new_data = octave_value ()) const { m_windowscrollwheelfcn.execute (new_data); }
3945  octave_value get_windowscrollwheelfcn () const { return m_windowscrollwheelfcn.get (); }
3946 
3947  bool windowstate_is (const std::string& v) const { return m_windowstate.is (v); }
3948  std::string get_windowstate () const { return m_windowstate.current_value (); }
3949 
3950  bool windowstyle_is (const std::string& v) const { return m_windowstyle.is (v); }
3951  std::string get_windowstyle () const { return m_windowstyle.current_value (); }
3952 
3953  bool pickableparts_is (const std::string& v) const { return m_pickableparts.is (v); }
3954  std::string get_pickableparts () const { return m_pickableparts.current_value (); }
3955 
3956  std::string get___gl_extensions__ () const { return m___gl_extensions__.string_value (); }
3957 
3958  std::string get___gl_renderer__ () const { return m___gl_renderer__.string_value (); }
3959 
3960  std::string get___gl_vendor__ () const { return m___gl_vendor__.string_value (); }
3961 
3962  std::string get___gl_version__ () const { return m___gl_version__.string_value (); }
3963 
3964  bool is___gl_window__ () const { return m___gl_window__.is_on (); }
3965  std::string get___gl_window__ () const { return m___gl_window__.current_value (); }
3966 
3967  std::string get___graphics_toolkit__ () const { return m___graphics_toolkit__.string_value (); }
3968 
3969  octave_value get___guidata__ () const { return m___guidata__.get (); }
3970 
3971  bool __mouse_mode___is (const std::string& v) const { return m___mouse_mode__.is (v); }
3972  std::string get___mouse_mode__ () const { return m___mouse_mode__.current_value (); }
3973 
3974  bool is___printing__ () const { return m___printing__.is_on (); }
3975  std::string get___printing__ () const { return m___printing__.current_value (); }
3976 
3977  octave_value get___pan_mode__ () const { return m___pan_mode__.get (); }
3978 
3979  octave_value get___plot_stream__ () const { return m___plot_stream__.get (); }
3980 
3981  octave_value get___rotate_mode__ () const { return m___rotate_mode__.get (); }
3982 
3983  octave_value get___zoom_mode__ () const { return m___zoom_mode__.get (); }
3984 
3985  double get___device_pixel_ratio__ () const { return m___device_pixel_ratio__.double_value (); }
3986 
3987 
3988  void set_alphamap (const octave_value& val)
3989  {
3990  if (m_alphamap.set (val, true))
3991  {
3992  mark_modified ();
3993  }
3994  }
3995 
3997  {
3998  if (m_buttondownfcn.set (val, true))
3999  {
4000  mark_modified ();
4001  }
4002  }
4003 
4005  {
4006  if (m_closerequestfcn.set (val, true))
4007  {
4008  mark_modified ();
4009  }
4010  }
4011 
4012  void set_color (const octave_value& val)
4013  {
4014  if (m_color.set (val, true))
4015  {
4016  mark_modified ();
4017  }
4018  }
4019 
4020  void set_colormap (const octave_value& val)
4021  {
4022  if (m_colormap.set (val, true))
4023  {
4024  mark_modified ();
4025  }
4026  }
4027 
4028  void set_currentaxes (const octave_value& val);
4029 
4031  {
4032  if (m_currentcharacter.set (val, true))
4033  {
4034  mark_modified ();
4035  }
4036  }
4037 
4039  {
4040  if (m_currentobject.set (val, true))
4041  {
4042  mark_modified ();
4043  }
4044  }
4045 
4046  void set_currentpoint (const octave_value& val)
4047  {
4048  if (m_currentpoint.set (val, true))
4049  {
4050  mark_modified ();
4051  }
4052  }
4053 
4054  void set_dockcontrols (const octave_value& val)
4055  {
4056  if (m_dockcontrols.set (val, true))
4057  {
4058  mark_modified ();
4059  }
4060  }
4061 
4062  void set_filename (const octave_value& val)
4063  {
4064  if (m_filename.set (val, true))
4065  {
4066  mark_modified ();
4067  }
4068  }
4069 
4071  {
4072  if (m_graphicssmoothing.set (val, true))
4073  {
4074  mark_modified ();
4075  }
4076  }
4077 
4078  void set_integerhandle (const octave_value& val);
4079 
4081  {
4082  if (m_inverthardcopy.set (val, true))
4083  {
4084  mark_modified ();
4085  }
4086  }
4087 
4088  void set_keypressfcn (const octave_value& val)
4089  {
4090  if (m_keypressfcn.set (val, true))
4091  {
4092  mark_modified ();
4093  }
4094  }
4095 
4097  {
4098  if (m_keyreleasefcn.set (val, true))
4099  {
4100  mark_modified ();
4101  }
4102  }
4103 
4104  void set_menubar (const octave_value& val)
4105  {
4106  if (m_menubar.set (val, true))
4107  {
4108  mark_modified ();
4109  }
4110  }
4111 
4112  void set_name (const octave_value& val)
4113  {
4114  if (m_name.set (val, true))
4115  {
4116  mark_modified ();
4117  }
4118  }
4119 
4120  void set_number (const octave_value& val)
4121  {
4122  if (m_number.set (val, true))
4123  {
4124  mark_modified ();
4125  }
4126  }
4127 
4128  void set_nextplot (const octave_value& val)
4129  {
4130  if (m_nextplot.set (val, true))
4131  {
4132  mark_modified ();
4133  }
4134  }
4135 
4136  void set_numbertitle (const octave_value& val)
4137  {
4138  if (m_numbertitle.set (val, true))
4139  {
4140  mark_modified ();
4141  }
4142  }
4143 
4145  {
4146  if (m_paperorientation.set (val, true))
4147  {
4148  update_paperorientation ();
4149  mark_modified ();
4150  }
4151  }
4152 
4153  void update_paperorientation ();
4154 
4156  {
4157  if (m_paperposition.set (val, false))
4158  {
4159  set_paperpositionmode ("manual");
4160  m_paperposition.run_listeners (GCB_POSTSET);
4161  mark_modified ();
4162  }
4163  else
4164  set_paperpositionmode ("manual");
4165  }
4166 
4168  {
4169  if (m_paperpositionmode.set (val, true))
4170  {
4171  update_paperpositionmode ();
4172  mark_modified ();
4173  }
4174  }
4175 
4176  void set_papersize (const octave_value& val)
4177  {
4178  if (m_papersize.set (val, true))
4179  {
4180  update_papersize ();
4181  mark_modified ();
4182  }
4183  }
4184 
4185  void update_papersize ();
4186 
4187  void set_papertype (const octave_value& val);
4188 
4189  void update_papertype ();
4190 
4191  void set_paperunits (const octave_value& val);
4192 
4193  void set_pointer (const octave_value& val)
4194  {
4195  if (m_pointer.set (val, true))
4196  {
4197  mark_modified ();
4198  }
4199  }
4200 
4202  {
4203  if (m_pointershapecdata.set (val, true))
4204  {
4205  mark_modified ();
4206  }
4207  }
4208 
4210  {
4211  if (m_pointershapehotspot.set (val, true))
4212  {
4213  mark_modified ();
4214  }
4215  }
4216 
4217  void set_renderer (const octave_value& val)
4218  {
4219  if (m_renderer.set (val, false))
4220  {
4221  set_renderermode ("manual");
4222  m_renderer.run_listeners (GCB_POSTSET);
4223  mark_modified ();
4224  }
4225  else
4226  set_renderermode ("manual");
4227  }
4228 
4229  void set_renderermode (const octave_value& val)
4230  {
4231  if (m_renderermode.set (val, true))
4232  {
4233  mark_modified ();
4234  }
4235  }
4236 
4237  void set_resize (const octave_value& val)
4238  {
4239  if (m_resize.set (val, true))
4240  {
4241  mark_modified ();
4242  }
4243  }
4244 
4245  void set_resizefcn (const octave_value& val)
4246  {
4247  if (m_resizefcn.set (val, true))
4248  {
4249  mark_modified ();
4250  }
4251  }
4252 
4254  {
4255  if (m_selectiontype.set (val, true))
4256  {
4257  mark_modified ();
4258  }
4259  }
4260 
4262  {
4263  if (m_sizechangedfcn.set (val, true))
4264  {
4265  mark_modified ();
4266  }
4267  }
4268 
4269  void set_toolbar (const octave_value& val)
4270  {
4271  if (m_toolbar.set (val, true))
4272  {
4273  mark_modified ();
4274  }
4275  }
4276 
4277  void set_units (const octave_value& val);
4278 
4280  {
4281  if (m_windowbuttondownfcn.set (val, true))
4282  {
4283  mark_modified ();
4284  }
4285  }
4286 
4288  {
4289  if (m_windowbuttonmotionfcn.set (val, true))
4290  {
4291  mark_modified ();
4292  }
4293  }
4294 
4296  {
4297  if (m_windowbuttonupfcn.set (val, true))
4298  {
4299  mark_modified ();
4300  }
4301  }
4302 
4304  {
4305  if (m_windowkeypressfcn.set (val, true))
4306  {
4307  mark_modified ();
4308  }
4309  }
4310 
4312  {
4313  if (m_windowkeyreleasefcn.set (val, true))
4314  {
4315  mark_modified ();
4316  }
4317  }
4318 
4320  {
4321  if (m_windowscrollwheelfcn.set (val, true))
4322  {
4323  mark_modified ();
4324  }
4325  }
4326 
4327  void set_windowstate (const octave_value& val)
4328  {
4329  if (m_windowstate.set (val, true))
4330  {
4331  mark_modified ();
4332  }
4333  }
4334 
4335  void set_windowstyle (const octave_value& val)
4336  {
4337  if (m_windowstyle.set (val, true))
4338  {
4339  mark_modified ();
4340  }
4341  }
4342 
4344  {
4345  if (m_pickableparts.set (val, true))
4346  {
4347  mark_modified ();
4348  }
4349  }
4350 
4351  void set___gl_extensions__ (const octave_value& val) const
4352  {
4353  if (m___gl_extensions__.set (val, true))
4354  {
4355  }
4356  }
4357 
4358  void set___gl_renderer__ (const octave_value& val) const
4359  {
4360  if (m___gl_renderer__.set (val, true))
4361  {
4362  }
4363  }
4364 
4365  void set___gl_vendor__ (const octave_value& val) const
4366  {
4367  if (m___gl_vendor__.set (val, true))
4368  {
4369  }
4370  }
4371 
4372  void set___gl_version__ (const octave_value& val) const
4373  {
4374  if (m___gl_version__.set (val, true))
4375  {
4376  }
4377  }
4378 
4380  {
4381  if (m___gl_window__.set (val, true))
4382  {
4383  mark_modified ();
4384  }
4385  }
4386 
4387  void set___guidata__ (const octave_value& val)
4388  {
4389  if (m___guidata__.set (val, true))
4390  {
4391  mark_modified ();
4392  }
4393  }
4394 
4395  void set___mouse_mode__ (const octave_value& val);
4396 
4397  void set___printing__ (const octave_value& val)
4398  {
4399  if (m___printing__.set (val, true))
4400  {
4401  mark_modified ();
4402  }
4403  }
4404 
4405  void set___pan_mode__ (const octave_value& val)
4406  {
4407  if (m___pan_mode__.set (val, true))
4408  {
4409  mark_modified ();
4410  }
4411  }
4412 
4414  {
4415  if (m___plot_stream__.set (val, true))
4416  {
4417  mark_modified ();
4418  }
4419  }
4420 
4422  {
4423  if (m___rotate_mode__.set (val, true))
4424  {
4425  mark_modified ();
4426  }
4427  }
4428 
4430  {
4431  if (m___zoom_mode__.set (val, true))
4432  {
4433  mark_modified ();
4434  }
4435  }
4436 
4438  {
4439  if (m___device_pixel_ratio__.set (val, true))
4440  {
4441  update___device_pixel_ratio__ ();
4442  mark_modified ();
4443  }
4444  }
4445 
4446  void update___device_pixel_ratio__ ();
4447 
4448 
4449  protected:
4450  void init ()
4451  {
4452  m_alphamap.add_constraint (dim_vector (-1, 1));
4453  m_alphamap.add_constraint (dim_vector (1, -1));
4454  m_colormap.add_constraint (dim_vector (-1, 3));
4455  m_colormap.add_constraint (dim_vector (0, 0));
4456  m_outerposition.add_constraint (dim_vector (1, 4));
4457  m_outerposition.add_constraint (FINITE);
4458  m_paperposition.add_constraint (dim_vector (1, 4));
4459  m_paperposition.add_constraint (FINITE);
4460  m_papersize.add_constraint (dim_vector (1, 2));
4461  m_papersize.add_constraint (FINITE);
4462  m_pointershapecdata.add_constraint (dim_vector (16, 16));
4463  m_pointershapecdata.add_constraint (dim_vector (32, 32));
4464  m_pointershapehotspot.add_constraint (dim_vector (1, 2));
4465  m_position.add_constraint (dim_vector (1, 4));
4466  m_position.add_constraint (FINITE);
4467 
4468  init_toolkit ();
4469  }
4470 
4471  private:
4472  OCTINTERP_API Matrix get_auto_paperposition ();
4473 
4474  void update_paperpositionmode ()
4475  {
4476  if (m_paperpositionmode.is ("auto"))
4477  m_paperposition.set (get_auto_paperposition ());
4478  }
4479 
4480  OCTINTERP_API void update_handlevisibility ();
4481 
4482  OCTINTERP_API void init_toolkit ();
4483 
4484  octave::graphics_toolkit m_toolkit;
4485  };
4486 
4487 private:
4488  properties m_properties;
4489 
4490 public:
4491 
4493  : base_graphics_object (), m_properties (mh, p), m_default_properties ()
4494  { }
4495 
4496  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (figure)
4497 
4498  ~figure () = default;
4499 
4501  {
4502  // Allow parent (root object) to override first (properties knows how
4503  // to find the parent object).
4504  m_properties.override_defaults (obj);
4505 
4506  // Now override with our defaults. If the default_properties
4507  // list includes the properties for all defaults (line,
4508  // surface, etc.) then we don't have to know the type of OBJ
4509  // here, we just call its set function and let it decide which
4510  // properties from the list to use.
4511  obj.set_from_list (m_default_properties);
4512  }
4513 
4514  void set (const caseless_str& name, const octave_value& value)
4515  {
4516  if (name.compare ("default", 7))
4517  // strip "default", pass rest to function that will
4518  // parse the remainder and add the element to the
4519  // default_properties map.
4520  m_default_properties.set (name.substr (7), value);
4521  else
4522  m_properties.set (name, value);
4523  }
4524 
4525  octave_value get (const caseless_str& name) const
4526  {
4527  octave_value retval;
4528 
4529  if (name.compare ("default", 7))
4530  retval = get_default (name.substr (7));
4531  else
4532  retval = m_properties.get (name);
4533 
4534  return retval;
4535  }
4536 
4537  OCTINTERP_API octave_value get_default (const caseless_str& name) const;
4538 
4540  {
4541  return m_default_properties.as_struct ("default");
4542  }
4543 
4545  {
4546  return m_default_properties;
4547  }
4548 
4549  base_properties& get_properties () { return m_properties; }
4550 
4551  const base_properties& get_properties () const { return m_properties; }
4552 
4553  bool valid_object () const { return true; }
4554 
4555  OCTINTERP_API void reset_default_properties ();
4556 
4557  bool has_readonly_property (const caseless_str& pname) const
4558  {
4559  bool retval = m_properties.has_readonly_property (pname);
4560  if (! retval)
4561  retval = base_properties::has_readonly_property (pname);
4562  return retval;
4563  }
4564 
4565 private:
4566  property_list m_default_properties;
4567 };
4568 
4569 // ---------------------------------------------------------------------
4570 
4571 class OCTINTERP_API graphics_xform
4572 {
4573 public:
4574 
4576  : m_xform (xform_eye ()), m_xform_inv (xform_eye ()),
4577  m_sx ("linear"), m_sy ("linear"), m_sz ("linear"), m_zlim (1, 2, 0.0)
4578  {
4579  m_zlim(1) = 1.0;
4580  }
4581 
4582  graphics_xform (const Matrix& xm, const Matrix& xim,
4583  const scaler& x, const scaler& y, const scaler& z,
4584  const Matrix& zl)
4585  : m_xform (xm), m_xform_inv (xim), m_sx (x), m_sy (y),
4586  m_sz (z), m_zlim (zl)
4587  { }
4588 
4590  : m_xform (g.m_xform), m_xform_inv (g.m_xform_inv), m_sx (g.m_sx),
4591  m_sy (g.m_sy), m_sz (g.m_sz), m_zlim (g.m_zlim) { }
4592 
4593  ~graphics_xform () = default;
4594 
4595  graphics_xform& operator = (const graphics_xform& g)
4596  {
4597  m_xform = g.m_xform;
4598  m_xform_inv = g.m_xform_inv;
4599  m_sx = g.m_sx;
4600  m_sy = g.m_sy;
4601  m_sz = g.m_sz;
4602  m_zlim = g.m_zlim;
4603 
4604  return *this;
4605  }
4606 
4607  static OCTINTERP_API ColumnVector xform_vector (double x, double y, double z);
4608 
4609  static OCTINTERP_API Matrix xform_eye ();
4610 
4611  OCTINTERP_API ColumnVector
4612  transform (double x, double y, double z, bool use_scale = true) const;
4613 
4614  OCTINTERP_API ColumnVector
4615  untransform (double x, double y, double z, bool use_scale = true) const;
4616 
4617  ColumnVector untransform (double x, double y, bool use_scale = true) const
4618  { return untransform (x, y, (m_zlim(0)+m_zlim(1))/2, use_scale); }
4619 
4620  Matrix xscale (const Matrix& m) const { return m_sx.scale (m); }
4621  Matrix yscale (const Matrix& m) const { return m_sy.scale (m); }
4622  Matrix zscale (const Matrix& m) const { return m_sz.scale (m); }
4623 
4624  Matrix scale (const Matrix& m) const
4625  {
4626  bool has_z = (m.columns () > 2);
4627 
4628  if (m_sx.is_linear () && m_sy.is_linear ()
4629  && (! has_z || m_sz.is_linear ()))
4630  return m;
4631 
4632  Matrix retval (m.dims ());
4633 
4634  int r = m.rows ();
4635 
4636  for (int i = 0; i < r; i++)
4637  {
4638  retval(i, 0) = m_sx.scale (m(i, 0));
4639  retval(i, 1) = m_sy.scale (m(i, 1));
4640  if (has_z)
4641  retval(i, 2) = m_sz.scale (m(i, 2));
4642  }
4643 
4644  return retval;
4645  }
4646 
4647 private:
4648  Matrix m_xform;
4649  Matrix m_xform_inv;
4650  scaler m_sx, m_sy, m_sz;
4651  Matrix m_zlim;
4652 };
4653 
4654 enum
4655 {
4659  AXE_VERT_DIR = 3
4660 };
4661 
4662 class OCTINTERP_API axes : public base_graphics_object
4663 {
4664 public:
4665 
4666  class OCTINTERP_API properties : public base_properties
4667  {
4668  public:
4669 
4670  OCTINTERP_API void
4671  set_defaults (base_graphics_object& obj, const std::string& mode);
4672 
4673  OCTINTERP_API void
4674  remove_child (const graphics_handle& h, bool from_root = false);
4675 
4676  OCTINTERP_API void adopt (const graphics_handle& h);
4677 
4678  const scaler& get_x_scaler () const { return m_sx; }
4679  const scaler& get_y_scaler () const { return m_sy; }
4680  const scaler& get_z_scaler () const { return m_sz; }
4681 
4682  OCTINTERP_API Matrix
4683  get_boundingbox (bool internal = false,
4684  const Matrix& parent_pix_size = Matrix ()) const;
4685  OCTINTERP_API Matrix
4686  get_extent (bool with_text = false,
4687  bool only_text_height=false) const;
4688 
4689  OCTINTERP_API double
4690  get___fontsize_points__ (double box_pix_height = 0) const;
4691 
4693  {
4694  if (units_is ("normalized"))
4695  {
4696  sync_positions ();
4698  }
4699  }
4700 
4701  OCTINTERP_API void update_camera ();
4702  OCTINTERP_API void update_axes_layout ();
4703  OCTINTERP_API void update_aspectratios ();
4705  {
4706  update_aspectratios ();
4707  update_camera ();
4708  update_axes_layout ();
4709  }
4710 
4711  OCTINTERP_API void sync_positions ();
4712 
4713  // Redirect calls to "activepositionproperty" to "positionconstraint".
4714 
4715  std::string get_activepositionproperty () const
4716  {
4717  std::string cur_val;
4718 
4719  if (m_positionconstraint.is ("innerposition"))
4720  cur_val = "position";
4721  else
4722  cur_val = "outerposition";
4723 
4724  return cur_val;
4725  }
4726 
4728  {
4729  // call set method to validate the input
4730  m_activepositionproperty.set (val);
4731 
4732  if (val.char_matrix_value ().row_as_string (0) == "position")
4733  set_positionconstraint ("innerposition");
4734  else
4735  set_positionconstraint (val);
4736  }
4737 
4738  // Redirect calls to "innerposition" to "position".
4739 
4741  {
4742  return get_position ();
4743  }
4744 
4746  {
4747  set_position (val);
4748  }
4749 
4750  OCTINTERP_API void update_autopos (const std::string& elem_type);
4751  OCTINTERP_API void update_xlabel_position ();
4752  OCTINTERP_API void update_ylabel_position ();
4753  OCTINTERP_API void update_zlabel_position ();
4754  OCTINTERP_API void update_title_position ();
4755 
4757  {
4758  return graphics_xform (m_x_render, m_x_render_inv,
4759  m_sx, m_sy, m_sz, m_x_zlim);
4760  }
4761 
4762  Matrix get_transform_matrix () const { return m_x_render; }
4763  Matrix get_inverse_transform_matrix () const { return m_x_render_inv; }
4764  Matrix get_opengl_matrix_1 () const { return m_x_gl_mat1; }
4765  Matrix get_opengl_matrix_2 () const { return m_x_gl_mat2; }
4766  Matrix get_transform_zlim () const { return m_x_zlim; }
4767 
4768  int get_xstate () const { return m_xstate; }
4769  int get_ystate () const { return m_ystate; }
4770  int get_zstate () const { return m_zstate; }
4771  double get_xPlane () const { return m_xPlane; }
4772  double get_xPlaneN () const { return m_xPlaneN; }
4773  double get_yPlane () const { return m_yPlane; }
4774  double get_yPlaneN () const { return m_yPlaneN; }
4775  double get_zPlane () const { return m_zPlane; }
4776  double get_zPlaneN () const { return m_zPlaneN; }
4777  double get_xpTick () const { return m_xpTick; }
4778  double get_xpTickN () const { return m_xpTickN; }
4779  double get_ypTick () const { return m_ypTick; }
4780  double get_ypTickN () const { return m_ypTickN; }
4781  double get_zpTick () const { return m_zpTick; }
4782  double get_zpTickN () const { return m_zpTickN; }
4783  double get_x_min () const { return std::min (m_xPlane, m_xPlaneN); }
4784  double get_x_max () const { return std::max (m_xPlane, m_xPlaneN); }
4785  double get_y_min () const { return std::min (m_yPlane, m_yPlaneN); }
4786  double get_y_max () const { return std::max (m_yPlane, m_yPlaneN); }
4787  double get_z_min () const { return std::min (m_zPlane, m_zPlaneN); }
4788  double get_z_max () const { return std::max (m_zPlane, m_zPlaneN); }
4789  double get_fx () const { return m_fx; }
4790  double get_fy () const { return m_fy; }
4791  double get_fz () const { return m_fz; }
4792  double get_xticklen () const { return m_xticklen; }
4793  double get_yticklen () const { return m_yticklen; }
4794  double get_zticklen () const { return m_zticklen; }
4795  double get_xtickoffset () const { return m_xtickoffset; }
4796  double get_ytickoffset () const { return m_ytickoffset; }
4797  double get_ztickoffset () const { return m_ztickoffset; }
4798  bool get_x2Dtop () const { return m_x2Dtop; }
4799  bool get_y2Dright () const { return m_y2Dright; }
4800  bool get_layer2Dtop () const { return m_layer2Dtop; }
4801  bool get_is2D (bool include_kids = false) const
4802  { return (include_kids ? (m_is2D && ! m_has3Dkids) : m_is2D); }
4803  void set_has3Dkids (bool val) { m_has3Dkids = val; }
4804  bool get_xySym () const { return m_xySym; }
4805  bool get_xyzSym () const { return m_xyzSym; }
4806  bool get_zSign () const { return m_zSign; }
4807  bool get_nearhoriz () const { return m_nearhoriz; }
4808 
4809  ColumnVector pixel2coord (double px, double py) const
4810  {
4811  return get_transform ().untransform (px, py,
4812  (m_x_zlim(0)+m_x_zlim(1))/2);
4813  }
4814 
4815  ColumnVector coord2pixel (double x, double y, double z) const
4816  { return get_transform ().transform (x, y, z); }
4817 
4818  OCTINTERP_API void
4819  zoom_about_point (const std::string& mode, double x, double y,
4820  double factor, bool push_to_zoom_stack = true);
4821  OCTINTERP_API void
4822  zoom (const std::string& mode, double factor,
4823  bool push_to_zoom_stack = true);
4824  OCTINTERP_API void
4825  zoom (const std::string& mode, const Matrix& xl, const Matrix& yl,
4826  bool push_to_zoom_stack = true);
4827 
4828  OCTINTERP_API void
4829  translate_view (const std::string& mode,
4830  double x0, double x1, double y0, double y1,
4831  bool push_to_zoom_stack = true);
4832 
4833  OCTINTERP_API void
4834  pan (const std::string& mode, double factor,
4835  bool push_to_zoom_stack = true);
4836 
4837  OCTINTERP_API void
4838  rotate3d (double x0, double x1, double y0, double y1,
4839  bool push_to_zoom_stack = true);
4840 
4841  OCTINTERP_API void
4842  rotate_view (double delta_az, double delta_el,
4843  bool push_to_zoom_stack = true);
4844 
4845  OCTINTERP_API void unzoom ();
4846  OCTINTERP_API void update_handlevisibility ();
4847  OCTINTERP_API void push_zoom_stack ();
4848  OCTINTERP_API void clear_zoom_stack (bool do_unzoom = true);
4849 
4850  OCTINTERP_API void update_units (const caseless_str& old_units);
4851 
4852  OCTINTERP_API void update_font (std::string prop = "");
4853 
4854  OCTINTERP_API void update_fontunits (const caseless_str& old_fontunits);
4855 
4856  void increase_num_lights () { m_num_lights++; }
4857  void decrease_num_lights () { m_num_lights--; }
4858  unsigned int get_num_lights () const { return m_num_lights; }
4859 
4860  private:
4861 
4862  scaler m_sx = scaler ();
4863  scaler m_sy = scaler ();
4864  scaler m_sz = scaler ();
4865 
4866  Matrix m_x_render = Matrix ();
4867  Matrix m_x_render_inv = Matrix ();
4868  Matrix m_x_gl_mat1 = Matrix ();
4869  Matrix m_x_gl_mat2 = Matrix ();
4870  Matrix m_x_zlim = Matrix ();
4871 
4872  std::list<octave_value> m_zoom_stack = std::list<octave_value> ();
4873 
4874  // Axes layout data
4875  int m_xstate = 0;
4876  int m_ystate = 0;
4877  int m_zstate = 0;
4878 
4879  double m_xPlane = 0.0;
4880  double m_yPlane = 0.0;
4881  double m_zPlane = 0.0;
4882 
4883  double m_xPlaneN = 0.0;
4884  double m_yPlaneN = 0.0;
4885  double m_zPlaneN = 0.0;
4886 
4887  double m_xpTick = 0.0;
4888  double m_ypTick = 0.0;
4889  double m_zpTick = 0.0;
4890 
4891  double m_xpTickN = 0.0;
4892  double m_ypTickN = 0.0;
4893  double m_zpTickN = 0.0;
4894 
4895  double m_fx = 0.0;
4896  double m_fy = 0.0;
4897  double m_fz = 0.0;
4898 
4899  double m_xticklen = 0.0;
4900  double m_yticklen = 0.0;
4901  double m_zticklen = 0.0;
4902 
4903  double m_xtickoffset = 0.0;
4904  double m_ytickoffset = 0.0;
4905  double m_ztickoffset = 0.0;
4906 
4907  bool m_x2Dtop = false;
4908  bool m_y2Dright = false;
4909  bool m_layer2Dtop = false;
4910  bool m_is2D = false;
4911  bool m_has3Dkids = false;
4912  bool m_xySym = false;
4913  bool m_xyzSym = false;
4914  bool m_zSign = false;
4915  bool m_nearhoriz = false;
4916 
4917  unsigned int m_num_lights = 0;
4918 
4919  // Text renderer, used for calculation of text (tick labels) size
4920  octave::text_renderer m_txt_renderer;
4921 
4922  OCTINTERP_API void
4923  set_text_child (handle_property& h, const std::string& who,
4924  const octave_value& v);
4925 
4926  OCTINTERP_API void
4927  delete_text_child (handle_property& h, bool from_root = false);
4928 
4929  // See the genprops.awk script for an explanation of the
4930  // properties declarations.
4931  // Programming note: Keep property list sorted if new ones are added.
4932 
4933 public:
4934  properties (const graphics_handle& mh, const graphics_handle& p);
4935 
4936  properties () = delete;
4937 
4938  OCTAVE_DISABLE_COPY_MOVE (properties)
4939 
4940  ~properties () = default;
4941 
4942  void set (const caseless_str& pname, const octave_value& val);
4943 
4944  octave_value get (bool all = false) const;
4945 
4946  octave_value get (const caseless_str& pname) const;
4947 
4948  octave_value get (const std::string& pname) const
4949  {
4950  return get (caseless_str (pname));
4951  }
4952 
4953  octave_value get (const char *pname) const
4954  {
4955  return get (caseless_str (pname));
4956  }
4957 
4958  property get_property (const caseless_str& pname);
4959 
4960  std::string graphics_object_name () const { return s_go_name; }
4961 
4962  static property_list::pval_map_type factory_defaults ();
4963 
4964 private:
4965  static std::string s_go_name;
4966 
4967 public:
4968 
4969 
4970  static std::set<std::string> core_property_names ();
4971 
4972  static std::set<std::string> readonly_property_names ();
4973 
4974  static bool has_core_property (const caseless_str& pname);
4975 
4976  static bool has_readonly_property (const caseless_str& pname);
4977 
4978  std::set<std::string> all_property_names () const;
4979 
4980  bool has_property (const caseless_str& pname) const;
4981 
4982 private:
4983 
4984  radio_property m_activepositionproperty;
4985  row_vector_property m_alim;
4986  radio_property m_alimmode;
4987  array_property m_alphamap;
4988  radio_property m_alphascale;
4989  color_property m_ambientlightcolor;
4990  bool_property m_box;
4991  radio_property m_boxstyle;
4992  row_vector_property m_cameraposition;
4993  radio_property m_camerapositionmode;
4994  row_vector_property m_cameratarget;
4995  radio_property m_cameratargetmode;
4996  row_vector_property m_cameraupvector;
4997  radio_property m_cameraupvectormode;
4998  double_property m_cameraviewangle;
4999  radio_property m_cameraviewanglemode;
5000  row_vector_property m_clim;
5001  radio_property m_climmode;
5002  radio_property m_clippingstyle;
5003  color_property m_color;
5004  array_property m_colormap;
5005  array_property m_colororder;
5006  double_property m_colororderindex;
5007  radio_property m_colorscale;
5008  array_property m_currentpoint;
5009  row_vector_property m_dataaspectratio;
5010  radio_property m_dataaspectratiomode;
5011  radio_property m_fontangle;
5012  string_property m_fontname;
5013  double_property m_fontsize;
5014  radio_property m_fontsizemode;
5015  bool_property m_fontsmoothing;
5016  radio_property m_fontunits;
5017  radio_property m_fontweight;
5018  double_property m_gridalpha;
5019  radio_property m_gridalphamode;
5020  color_property m_gridcolor;
5021  radio_property m_gridcolormode;
5022  radio_property m_gridlinestyle;
5023  array_property m_innerposition;
5024  any_property m_interactions;
5025  double_property m_labelfontsizemultiplier;
5026  radio_property m_layer;
5027  handle_property m_layout;
5028  handle_property m_legend;
5029  any_property m_linestyleorder;
5030  double_property m_linestyleorderindex;
5031  double_property m_linewidth;
5032  double_property m_minorgridalpha;
5033  radio_property m_minorgridalphamode;
5034  color_property m_minorgridcolor;
5035  radio_property m_minorgridcolormode;
5036  radio_property m_minorgridlinestyle;
5037  radio_property m_nextplot;
5038  double_property m_nextseriesindex;
5039  array_property m_outerposition;
5040  row_vector_property m_plotboxaspectratio;
5041  radio_property m_plotboxaspectratiomode;
5042  array_property m_position;
5043  radio_property m_positionconstraint;
5044  radio_property m_projection;
5045  radio_property m_sortmethod;
5046  radio_property m_tickdir;
5047  radio_property m_tickdirmode;
5048  radio_property m_ticklabelinterpreter;
5049  array_property m_ticklength;
5050  array_property m_tightinset;
5051  handle_property m_title;
5052  double_property m_titlefontsizemultiplier;
5053  radio_property m_titlefontweight;
5054  handle_property m_toolbar;
5055  radio_property m_units;
5056  array_property m_view;
5057  handle_property m_xaxis;
5058  radio_property m_xaxislocation;
5059  color_property m_xcolor;
5060  radio_property m_xcolormode;
5061  radio_property m_xdir;
5062  bool_property m_xgrid;
5063  handle_property m_xlabel;
5064  row_vector_property m_xlim;
5065  radio_property m_xlimitmethod;
5066  radio_property m_xlimmode;
5067  bool_property m_xminorgrid;
5068  bool_property m_xminortick;
5069  radio_property m_xscale;
5070  row_vector_property m_xtick;
5071  any_property m_xticklabel;
5072  radio_property m_xticklabelmode;
5073  double_property m_xticklabelrotation;
5074  radio_property m_xtickmode;
5075  handle_property m_yaxis;
5076  radio_property m_yaxislocation;
5077  color_property m_ycolor;
5078  radio_property m_ycolormode;
5079  radio_property m_ydir;
5080  bool_property m_ygrid;
5081  handle_property m_ylabel;
5082  row_vector_property m_ylim;
5083  radio_property m_ylimitmethod;
5084  radio_property m_ylimmode;
5085  bool_property m_yminorgrid;
5086  bool_property m_yminortick;
5087  radio_property m_yscale;
5088  row_vector_property m_ytick;
5089  any_property m_yticklabel;
5090  radio_property m_yticklabelmode;
5091  double_property m_yticklabelrotation;
5092  radio_property m_ytickmode;
5093  handle_property m_zaxis;
5094  color_property m_zcolor;
5095  radio_property m_zcolormode;
5096  radio_property m_zdir;
5097  bool_property m_zgrid;
5098  handle_property m_zlabel;
5099  row_vector_property m_zlim;
5100  radio_property m_zlimitmethod;
5101  radio_property m_zlimmode;
5102  bool_property m_zminorgrid;
5103  bool_property m_zminortick;
5104  radio_property m_zscale;
5105  row_vector_property m_ztick;
5106  any_property m_zticklabel;
5107  radio_property m_zticklabelmode;
5108  double_property m_zticklabelrotation;
5109  radio_property m_ztickmode;
5110  array_property m___colormap__;
5111  double_property m_mousewheelzoom;
5112  radio_property m___autopos_tag__;
5113  array_property m_looseinset;
5114  row_vector_property m_xminortickvalues;
5115  row_vector_property m_yminortickvalues;
5116  row_vector_property m_zminortickvalues;
5117  double_property m___fontsize_points__;
5118 
5119 public:
5120 
5121  enum
5122  {
5123  ID_ACTIVEPOSITIONPROPERTY = 3000,
5124  ID_ALIM = 3001,
5125  ID_ALIMMODE = 3002,
5126  ID_ALPHAMAP = 3003,
5127  ID_ALPHASCALE = 3004,
5128  ID_AMBIENTLIGHTCOLOR = 3005,
5129  ID_BOX = 3006,
5130  ID_BOXSTYLE = 3007,
5131  ID_CAMERAPOSITION = 3008,
5132  ID_CAMERAPOSITIONMODE = 3009,
5133  ID_CAMERATARGET = 3010,
5134  ID_CAMERATARGETMODE = 3011,
5135  ID_CAMERAUPVECTOR = 3012,
5136  ID_CAMERAUPVECTORMODE = 3013,
5137  ID_CAMERAVIEWANGLE = 3014,
5138  ID_CAMERAVIEWANGLEMODE = 3015,
5139  ID_CLIM = 3016,
5140  ID_CLIMMODE = 3017,
5141  ID_CLIPPINGSTYLE = 3018,
5142  ID_COLOR = 3019,
5143  ID_COLORMAP = 3020,
5144  ID_COLORORDER = 3021,
5145  ID_COLORORDERINDEX = 3022,
5146  ID_COLORSCALE = 3023,
5147  ID_CURRENTPOINT = 3024,
5148  ID_DATAASPECTRATIO = 3025,
5149  ID_DATAASPECTRATIOMODE = 3026,
5150  ID_FONTANGLE = 3027,
5151  ID_FONTNAME = 3028,
5152  ID_FONTSIZE = 3029,
5153  ID_FONTSIZEMODE = 3030,
5154  ID_FONTSMOOTHING = 3031,
5155  ID_FONTUNITS = 3032,
5156  ID_FONTWEIGHT = 3033,
5157  ID_GRIDALPHA = 3034,
5158  ID_GRIDALPHAMODE = 3035,
5159  ID_GRIDCOLOR = 3036,
5160  ID_GRIDCOLORMODE = 3037,
5161  ID_GRIDLINESTYLE = 3038,
5162  ID_INNERPOSITION = 3039,
5163  ID_INTERACTIONS = 3040,
5164  ID_LABELFONTSIZEMULTIPLIER = 3041,
5165  ID_LAYER = 3042,
5166  ID_LAYOUT = 3043,
5167  ID_LEGEND = 3044,
5168  ID_LINESTYLEORDER = 3045,
5169  ID_LINESTYLEORDERINDEX = 3046,
5170  ID_LINEWIDTH = 3047,
5171  ID_MINORGRIDALPHA = 3048,
5172  ID_MINORGRIDALPHAMODE = 3049,
5173  ID_MINORGRIDCOLOR = 3050,
5174  ID_MINORGRIDCOLORMODE = 3051,
5175  ID_MINORGRIDLINESTYLE = 3052,
5176  ID_NEXTPLOT = 3053,
5177  ID_NEXTSERIESINDEX = 3054,
5178  ID_OUTERPOSITION = 3055,
5179  ID_PLOTBOXASPECTRATIO = 3056,
5180  ID_PLOTBOXASPECTRATIOMODE = 3057,
5181  ID_POSITION = 3058,
5182  ID_POSITIONCONSTRAINT = 3059,
5183  ID_PROJECTION = 3060,
5184  ID_SORTMETHOD = 3061,
5185  ID_TICKDIR = 3062,
5186  ID_TICKDIRMODE = 3063,
5187  ID_TICKLABELINTERPRETER = 3064,
5188  ID_TICKLENGTH = 3065,
5189  ID_TIGHTINSET = 3066,
5190  ID_TITLE = 3067,
5191  ID_TITLEFONTSIZEMULTIPLIER = 3068,
5192  ID_TITLEFONTWEIGHT = 3069,
5193  ID_TOOLBAR = 3070,
5194  ID_UNITS = 3071,
5195  ID_VIEW = 3072,
5196  ID_XAXIS = 3073,
5197  ID_XAXISLOCATION = 3074,
5198  ID_XCOLOR = 3075,
5199  ID_XCOLORMODE = 3076,
5200  ID_XDIR = 3077,
5201  ID_XGRID = 3078,
5202  ID_XLABEL = 3079,
5203  ID_XLIM = 3080,
5204  ID_XLIMITMETHOD = 3081,
5205  ID_XLIMMODE = 3082,
5206  ID_XMINORGRID = 3083,
5207  ID_XMINORTICK = 3084,
5208  ID_XSCALE = 3085,
5209  ID_XTICK = 3086,
5210  ID_XTICKLABEL = 3087,
5211  ID_XTICKLABELMODE = 3088,
5212  ID_XTICKLABELROTATION = 3089,
5213  ID_XTICKMODE = 3090,
5214  ID_YAXIS = 3091,
5215  ID_YAXISLOCATION = 3092,
5216  ID_YCOLOR = 3093,
5217  ID_YCOLORMODE = 3094,
5218  ID_YDIR = 3095,
5219  ID_YGRID = 3096,
5220  ID_YLABEL = 3097,
5221  ID_YLIM = 3098,
5222  ID_YLIMITMETHOD = 3099,
5223  ID_YLIMMODE = 3100,
5224  ID_YMINORGRID = 3101,
5225  ID_YMINORTICK = 3102,
5226  ID_YSCALE = 3103,
5227  ID_YTICK = 3104,
5228  ID_YTICKLABEL = 3105,
5229  ID_YTICKLABELMODE = 3106,
5230  ID_YTICKLABELROTATION = 3107,
5231  ID_YTICKMODE = 3108,
5232  ID_ZAXIS = 3109,
5233  ID_ZCOLOR = 3110,
5234  ID_ZCOLORMODE = 3111,
5235  ID_ZDIR = 3112,
5236  ID_ZGRID = 3113,
5237  ID_ZLABEL = 3114,
5238  ID_ZLIM = 3115,
5239  ID_ZLIMITMETHOD = 3116,
5240  ID_ZLIMMODE = 3117,
5241  ID_ZMINORGRID = 3118,
5242  ID_ZMINORTICK = 3119,
5243  ID_ZSCALE = 3120,
5244  ID_ZTICK = 3121,
5245  ID_ZTICKLABEL = 3122,
5246  ID_ZTICKLABELMODE = 3123,
5247  ID_ZTICKLABELROTATION = 3124,
5248  ID_ZTICKMODE = 3125,
5249  ID___COLORMAP__ = 3126,
5250  ID_MOUSEWHEELZOOM = 3127,
5251  ID___AUTOPOS_TAG__ = 3128,
5252  ID_LOOSEINSET = 3129,
5253  ID_XMINORTICKVALUES = 3130,
5254  ID_YMINORTICKVALUES = 3131,
5255  ID_ZMINORTICKVALUES = 3132,
5256  ID___FONTSIZE_POINTS__ = 3133
5257  };
5258 
5259  octave_value get_alim () const { return m_alim.get (); }
5260 
5261  bool alimmode_is (const std::string& v) const { return m_alimmode.is (v); }
5262  std::string get_alimmode () const { return m_alimmode.current_value (); }
5263 
5264  octave_value get_alphamap () const { return m_alphamap.get (); }
5265 
5266  bool alphascale_is (const std::string& v) const { return m_alphascale.is (v); }
5267  std::string get_alphascale () const { return m_alphascale.current_value (); }
5268 
5269  bool ambientlightcolor_is_rgb () const { return m_ambientlightcolor.is_rgb (); }
5270  bool ambientlightcolor_is (const std::string& v) const { return m_ambientlightcolor.is (v); }
5271  Matrix get_ambientlightcolor_rgb () const { return (m_ambientlightcolor.is_rgb () ? m_ambientlightcolor.rgb () : Matrix ()); }
5272  octave_value get_ambientlightcolor () const { return m_ambientlightcolor.get (); }
5273 
5274  bool is_box () const { return m_box.is_on (); }
5275  std::string get_box () const { return m_box.current_value (); }
5276 
5277  bool boxstyle_is (const std::string& v) const { return m_boxstyle.is (v); }
5278  std::string get_boxstyle () const { return m_boxstyle.current_value (); }
5279 
5280  octave_value get_cameraposition () const { return m_cameraposition.get (); }
5281 
5282  bool camerapositionmode_is (const std::string& v) const { return m_camerapositionmode.is (v); }
5283  std::string get_camerapositionmode () const { return m_camerapositionmode.current_value (); }
5284 
5285  octave_value get_cameratarget () const { return m_cameratarget.get (); }
5286 
5287  bool cameratargetmode_is (const std::string& v) const { return m_cameratargetmode.is (v); }
5288  std::string get_cameratargetmode () const { return m_cameratargetmode.current_value (); }
5289 
5290  octave_value get_cameraupvector () const { return m_cameraupvector.get (); }
5291 
5292  bool cameraupvectormode_is (const std::string& v) const { return m_cameraupvectormode.is (v); }
5293  std::string get_cameraupvectormode () const { return m_cameraupvectormode.current_value (); }
5294 
5295  double get_cameraviewangle () const { return m_cameraviewangle.double_value (); }
5296 
5297  bool cameraviewanglemode_is (const std::string& v) const { return m_cameraviewanglemode.is (v); }
5298  std::string get_cameraviewanglemode () const { return m_cameraviewanglemode.current_value (); }
5299 
5300  octave_value get_clim () const { return m_clim.get (); }
5301 
5302  bool climmode_is (const std::string& v) const { return m_climmode.is (v); }
5303  std::string get_climmode () const { return m_climmode.current_value (); }
5304 
5305  bool clippingstyle_is (const std::string& v) const { return m_clippingstyle.is (v); }
5306  std::string get_clippingstyle () const { return m_clippingstyle.current_value (); }
5307 
5308  bool color_is_rgb () const { return m_color.is_rgb (); }
5309  bool color_is (const std::string& v) const { return m_color.is (v); }
5310  Matrix get_color_rgb () const { return (m_color.is_rgb () ? m_color.rgb () : Matrix ()); }
5311  octave_value get_color () const { return m_color.get (); }
5312 
5313  octave_value get_colororder () const { return m_colororder.get (); }
5314 
5315  double get_colororderindex () const { return m_colororderindex.double_value (); }
5316 
5317  bool colorscale_is (const std::string& v) const { return m_colorscale.is (v); }
5318  std::string get_colorscale () const { return m_colorscale.current_value (); }
5319 
5320  octave_value get_currentpoint () const { return m_currentpoint.get (); }
5321 
5322  octave_value get_dataaspectratio () const { return m_dataaspectratio.get (); }
5323 
5324  bool dataaspectratiomode_is (const std::string& v) const { return m_dataaspectratiomode.is (v); }
5325  std::string get_dataaspectratiomode () const { return m_dataaspectratiomode.current_value (); }
5326 
5327  bool fontangle_is (const std::string& v) const { return m_fontangle.is (v); }
5328  std::string get_fontangle () const { return m_fontangle.current_value (); }
5329 
5330  std::string get_fontname () const { return m_fontname.string_value (); }
5331 
5332  double get_fontsize () const { return m_fontsize.double_value (); }
5333 
5334  bool fontsizemode_is (const std::string& v) const { return m_fontsizemode.is (v); }
5335  std::string get_fontsizemode () const { return m_fontsizemode.current_value (); }
5336 
5337  bool is_fontsmoothing () const { return m_fontsmoothing.is_on (); }
5338  std::string get_fontsmoothing () const { return m_fontsmoothing.current_value (); }
5339 
5340  bool fontunits_is (const std::string& v) const { return m_fontunits.is (v); }
5341  std::string get_fontunits () const { return m_fontunits.current_value (); }
5342 
5343  bool fontweight_is (const std::string& v) const { return m_fontweight.is (v); }
5344  std::string get_fontweight () const { return m_fontweight.current_value (); }
5345 
5346  double get_gridalpha () const { return m_gridalpha.double_value (); }
5347 
5348  bool gridalphamode_is (const std::string& v) const { return m_gridalphamode.is (v); }
5349  std::string get_gridalphamode () const { return m_gridalphamode.current_value (); }
5350 
5351  bool gridcolor_is_rgb () const { return m_gridcolor.is_rgb (); }
5352  bool gridcolor_is (const std::string& v) const { return m_gridcolor.is (v); }
5353  Matrix get_gridcolor_rgb () const { return (m_gridcolor.is_rgb () ? m_gridcolor.rgb () : Matrix ()); }
5354  octave_value get_gridcolor () const { return m_gridcolor.get (); }
5355 
5356  bool gridcolormode_is (const std::string& v) const { return m_gridcolormode.is (v); }
5357  std::string get_gridcolormode () const { return m_gridcolormode.current_value (); }
5358 
5359  bool gridlinestyle_is (const std::string& v) const { return m_gridlinestyle.is (v); }
5360  std::string get_gridlinestyle () const { return m_gridlinestyle.current_value (); }
5361 
5362  octave_value get_interactions () const { return m_interactions.get (); }
5363 
5364  double get_labelfontsizemultiplier () const { return m_labelfontsizemultiplier.double_value (); }
5365 
5366  bool layer_is (const std::string& v) const { return m_layer.is (v); }
5367  std::string get_layer () const { return m_layer.current_value (); }
5368 
5369  graphics_handle get_layout () const { return m_layout.handle_value (); }
5370 
5371  graphics_handle get_legend () const { return m_legend.handle_value (); }
5372 
5373  octave_value get_linestyleorder () const { return m_linestyleorder.get (); }
5374 
5375  double get_linestyleorderindex () const { return m_linestyleorderindex.double_value (); }
5376 
5377  double get_linewidth () const { return m_linewidth.double_value (); }
5378 
5379  double get_minorgridalpha () const { return m_minorgridalpha.double_value (); }
5380 
5381  bool minorgridalphamode_is (const std::string& v) const { return m_minorgridalphamode.is (v); }
5382  std::string get_minorgridalphamode () const { return m_minorgridalphamode.current_value (); }
5383 
5384  bool minorgridcolor_is_rgb () const { return m_minorgridcolor.is_rgb (); }
5385  bool minorgridcolor_is (const std::string& v) const { return m_minorgridcolor.is (v); }
5386  Matrix get_minorgridcolor_rgb () const { return (m_minorgridcolor.is_rgb () ? m_minorgridcolor.rgb () : Matrix ()); }
5387  octave_value get_minorgridcolor () const { return m_minorgridcolor.get (); }
5388 
5389  bool minorgridcolormode_is (const std::string& v) const { return m_minorgridcolormode.is (v); }
5390  std::string get_minorgridcolormode () const { return m_minorgridcolormode.current_value (); }
5391 
5392  bool minorgridlinestyle_is (const std::string& v) const { return m_minorgridlinestyle.is (v); }
5393  std::string get_minorgridlinestyle () const { return m_minorgridlinestyle.current_value (); }
5394 
5395  bool nextplot_is (const std::string& v) const { return m_nextplot.is (v); }
5396  std::string get_nextplot () const { return m_nextplot.current_value (); }
5397 
5398  double get_nextseriesindex () const { return m_nextseriesindex.double_value (); }
5399 
5400  octave_value get_outerposition () const { return m_outerposition.get (); }
5401 
5402  octave_value get_plotboxaspectratio () const { return m_plotboxaspectratio.get (); }
5403 
5404  bool plotboxaspectratiomode_is (const std::string& v) const { return m_plotboxaspectratiomode.is (v); }
5405  std::string get_plotboxaspectratiomode () const { return m_plotboxaspectratiomode.current_value (); }
5406 
5407  octave_value get_position () const { return m_position.get (); }
5408 
5409  bool positionconstraint_is (const std::string& v) const { return m_positionconstraint.is (v); }
5410  std::string get_positionconstraint () const { return m_positionconstraint.current_value (); }
5411 
5412  bool projection_is (const std::string& v) const { return m_projection.is (v); }
5413  std::string get_projection () const { return m_projection.current_value (); }
5414 
5415  bool sortmethod_is (const std::string& v) const { return m_sortmethod.is (v); }
5416  std::string get_sortmethod () const { return m_sortmethod.current_value (); }
5417 
5418  bool tickdir_is (const std::string& v) const { return m_tickdir.is (v); }
5419  std::string get_tickdir () const { return m_tickdir.current_value (); }
5420 
5421  bool tickdirmode_is (const std::string& v) const { return m_tickdirmode.is (v); }
5422  std::string get_tickdirmode () const { return m_tickdirmode.current_value (); }
5423 
5424  bool ticklabelinterpreter_is (const std::string& v) const { return m_ticklabelinterpreter.is (v); }
5425  std::string get_ticklabelinterpreter () const { return m_ticklabelinterpreter.current_value (); }
5426 
5427  octave_value get_ticklength () const { return m_ticklength.get (); }
5428 
5429  octave_value get_tightinset () const { return m_tightinset.get (); }
5430 
5431  graphics_handle get_title () const { return m_title.handle_value (); }
5432 
5433  double get_titlefontsizemultiplier () const { return m_titlefontsizemultiplier.double_value (); }
5434 
5435  bool titlefontweight_is (const std::string& v) const { return m_titlefontweight.is (v); }
5436  std::string get_titlefontweight () const { return m_titlefontweight.current_value (); }
5437 
5438  graphics_handle get_toolbar () const { return m_toolbar.handle_value (); }
5439 
5440  bool units_is (const std::string& v) const { return m_units.is (v); }
5441  std::string get_units () const { return m_units.current_value (); }
5442 
5443  octave_value get_view () const { return m_view.get (); }
5444 
5445  graphics_handle get_xaxis () const { return m_xaxis.handle_value (); }
5446 
5447  bool xaxislocation_is (const std::string& v) const { return m_xaxislocation.is (v); }
5448  std::string get_xaxislocation () const { return m_xaxislocation.current_value (); }
5449 
5450  bool xcolor_is_rgb () const { return m_xcolor.is_rgb (); }
5451  bool xcolor_is (const std::string& v) const { return m_xcolor.is (v); }
5452  Matrix get_xcolor_rgb () const { return (m_xcolor.is_rgb () ? m_xcolor.rgb () : Matrix ()); }
5453  octave_value get_xcolor () const { return m_xcolor.get (); }
5454 
5455  bool xcolormode_is (const std::string& v) const { return m_xcolormode.is (v); }
5456  std::string get_xcolormode () const { return m_xcolormode.current_value (); }
5457 
5458  bool xdir_is (const std::string& v) const { return m_xdir.is (v); }
5459  std::string get_xdir () const { return m_xdir.current_value (); }
5460 
5461  bool is_xgrid () const { return m_xgrid.is_on (); }
5462  std::string get_xgrid () const { return m_xgrid.current_value (); }
5463 
5464  graphics_handle get_xlabel () const { return m_xlabel.handle_value (); }
5465 
5466  octave_value get_xlim () const { return m_xlim.get (); }
5467 
5468  bool xlimitmethod_is (const std::string& v) const { return m_xlimitmethod.is (v); }
5469  std::string get_xlimitmethod () const { return m_xlimitmethod.current_value (); }
5470 
5471  bool xlimmode_is (const std::string& v) const { return m_xlimmode.is (v); }
5472  std::string get_xlimmode () const { return m_xlimmode.current_value (); }
5473 
5474  bool is_xminorgrid () const { return m_xminorgrid.is_on (); }
5475  std::string get_xminorgrid () const { return m_xminorgrid.current_value (); }
5476 
5477  bool is_xminortick () const { return m_xminortick.is_on (); }
5478  std::string get_xminortick () const { return m_xminortick.current_value (); }
5479 
5480  bool xscale_is (const std::string& v) const { return m_xscale.is (v); }
5481  std::string get_xscale () const { return m_xscale.current_value (); }
5482 
5483  octave_value get_xtick () const { return m_xtick.get (); }
5484 
5485  octave_value get_xticklabel () const { return m_xticklabel.get (); }
5486 
5487  bool xticklabelmode_is (const std::string& v) const { return m_xticklabelmode.is (v); }
5488  std::string get_xticklabelmode () const { return m_xticklabelmode.current_value (); }
5489 
5490  double get_xticklabelrotation () const { return m_xticklabelrotation.double_value (); }
5491 
5492  bool xtickmode_is (const std::string& v) const { return m_xtickmode.is (v); }
5493  std::string get_xtickmode () const { return m_xtickmode.current_value (); }
5494 
5495  graphics_handle get_yaxis () const { return m_yaxis.handle_value (); }
5496 
5497  bool yaxislocation_is (const std::string& v) const { return m_yaxislocation.is (v); }
5498  std::string get_yaxislocation () const { return m_yaxislocation.current_value (); }
5499 
5500  bool ycolor_is_rgb () const { return m_ycolor.is_rgb (); }
5501  bool ycolor_is (const std::string& v) const { return m_ycolor.is (v); }
5502  Matrix get_ycolor_rgb () const { return (m_ycolor.is_rgb () ? m_ycolor.rgb () : Matrix ()); }
5503  octave_value get_ycolor () const { return m_ycolor.get (); }
5504 
5505  bool ycolormode_is (const std::string& v) const { return m_ycolormode.is (v); }
5506  std::string get_ycolormode () const { return m_ycolormode.current_value (); }
5507 
5508  bool ydir_is (const std::string& v) const { return m_ydir.is (v); }
5509  std::string get_ydir () const { return m_ydir.current_value (); }
5510 
5511  bool is_ygrid () const { return m_ygrid.is_on (); }
5512  std::string get_ygrid () const { return m_ygrid.current_value (); }
5513 
5514  graphics_handle get_ylabel () const { return m_ylabel.handle_value (); }
5515 
5516  octave_value get_ylim () const { return m_ylim.get (); }
5517 
5518  bool ylimitmethod_is (const std::string& v) const { return m_ylimitmethod.is (v); }
5519  std::string get_ylimitmethod () const { return m_ylimitmethod.current_value (); }
5520 
5521  bool ylimmode_is (const std::string& v) const { return m_ylimmode.is (v); }
5522  std::string get_ylimmode () const { return m_ylimmode.current_value (); }
5523 
5524  bool is_yminorgrid () const { return m_yminorgrid.is_on (); }
5525  std::string get_yminorgrid () const { return m_yminorgrid.current_value (); }
5526 
5527  bool is_yminortick () const { return m_yminortick.is_on (); }
5528  std::string get_yminortick () const { return m_yminortick.current_value (); }
5529 
5530  bool yscale_is (const std::string& v) const { return m_yscale.is (v); }
5531  std::string get_yscale () const { return m_yscale.current_value (); }
5532 
5533  octave_value get_ytick () const { return m_ytick.get (); }
5534 
5535  octave_value get_yticklabel () const { return m_yticklabel.get (); }
5536 
5537  bool yticklabelmode_is (const std::string& v) const { return m_yticklabelmode.is (v); }
5538  std::string get_yticklabelmode () const { return m_yticklabelmode.current_value (); }
5539 
5540  double get_yticklabelrotation () const { return m_yticklabelrotation.double_value (); }
5541 
5542  bool ytickmode_is (const std::string& v) const { return m_ytickmode.is (v); }
5543  std::string get_ytickmode () const { return m_ytickmode.current_value (); }
5544 
5545  graphics_handle get_zaxis () const { return m_zaxis.handle_value (); }
5546 
5547  bool zcolor_is_rgb () const { return m_zcolor.is_rgb (); }
5548  bool zcolor_is (const std::string& v) const { return m_zcolor.is (v); }
5549  Matrix get_zcolor_rgb () const { return (m_zcolor.is_rgb () ? m_zcolor.rgb () : Matrix ()); }
5550  octave_value get_zcolor () const { return m_zcolor.get (); }
5551 
5552  bool zcolormode_is (const std::string& v) const { return m_zcolormode.is (v); }
5553  std::string get_zcolormode () const { return m_zcolormode.current_value (); }
5554 
5555  bool zdir_is (const std::string& v) const { return m_zdir.is (v); }
5556  std::string get_zdir () const { return m_zdir.current_value (); }
5557 
5558  bool is_zgrid () const { return m_zgrid.is_on (); }
5559  std::string get_zgrid () const { return m_zgrid.current_value (); }
5560 
5561  graphics_handle get_zlabel () const { return m_zlabel.handle_value (); }
5562 
5563  octave_value get_zlim () const { return m_zlim.get (); }
5564 
5565  bool zlimitmethod_is (const std::string& v) const { return m_zlimitmethod.is (v); }
5566  std::string get_zlimitmethod () const { return m_zlimitmethod.current_value (); }
5567 
5568  bool zlimmode_is (const std::string& v) const { return m_zlimmode.is (v); }
5569  std::string get_zlimmode () const { return m_zlimmode.current_value (); }
5570 
5571  bool is_zminorgrid () const { return m_zminorgrid.is_on (); }
5572  std::string get_zminorgrid () const { return m_zminorgrid.current_value (); }
5573 
5574  bool is_zminortick () const { return m_zminortick.is_on (); }
5575  std::string get_zminortick () const { return m_zminortick.current_value (); }
5576 
5577  bool zscale_is (const std::string& v) const { return m_zscale.is (v); }
5578  std::string get_zscale () const { return m_zscale.current_value (); }
5579 
5580  octave_value get_ztick () const { return m_ztick.get (); }
5581 
5582  octave_value get_zticklabel () const { return m_zticklabel.get (); }
5583 
5584  bool zticklabelmode_is (const std::string& v) const { return m_zticklabelmode.is (v); }
5585  std::string get_zticklabelmode () const { return m_zticklabelmode.current_value (); }
5586 
5587  double get_zticklabelrotation () const { return m_zticklabelrotation.double_value (); }
5588 
5589  bool ztickmode_is (const std::string& v) const { return m_ztickmode.is (v); }
5590  std::string get_ztickmode () const { return m_ztickmode.current_value (); }
5591 
5592  octave_value get___colormap__ () const { return m___colormap__.get (); }
5593 
5594  double get_mousewheelzoom () const { return m_mousewheelzoom.double_value (); }
5595 
5596  bool __autopos_tag___is (const std::string& v) const { return m___autopos_tag__.is (v); }
5597  std::string get___autopos_tag__ () const { return m___autopos_tag__.current_value (); }
5598 
5599  octave_value get_looseinset () const { return m_looseinset.get (); }
5600 
5601  octave_value get_xminortickvalues () const { return m_xminortickvalues.get (); }
5602 
5603  octave_value get_yminortickvalues () const { return m_yminortickvalues.get (); }
5604 
5605  octave_value get_zminortickvalues () const { return m_zminortickvalues.get (); }
5606 
5607 
5608  void set_alim (const octave_value& val)
5609  {
5610  if (m_alim.set (val, false))
5611  {
5612  set_alimmode ("manual");
5613  m_alim.run_listeners (GCB_POSTSET);
5614  mark_modified ();
5615  }
5616  else
5617  set_alimmode ("manual");
5618  }
5619 
5620  void set_alimmode (const octave_value& val)
5621  {
5622  if (m_alimmode.set (val, true))
5623  {
5624  mark_modified ();
5625  }
5626  }
5627 
5628  void set_alphamap (const octave_value& val)
5629  {
5630  if (m_alphamap.set (val, true))
5631  {
5632  mark_modified ();
5633  }
5634  }
5635 
5636  void set_alphascale (const octave_value& val)
5637  {
5638  if (m_alphascale.set (val, true))
5639  {
5640  mark_modified ();
5641  }
5642  }
5643 
5645  {
5646  if (m_ambientlightcolor.set (val, true))
5647  {
5648  mark_modified ();
5649  }
5650  }
5651 
5652  void set_box (const octave_value& val)
5653  {
5654  if (m_box.set (val, true))
5655  {
5656  update_box ();
5657  mark_modified ();
5658  }
5659  }
5660 
5661  void set_boxstyle (const octave_value& val)
5662  {
5663  if (m_boxstyle.set (val, true))
5664  {
5665  mark_modified ();
5666  }
5667  }
5668 
5670  {
5671  if (m_cameraposition.set (val, false))
5672  {
5673  set_camerapositionmode ("manual");
5674  update_cameraposition ();
5675  m_cameraposition.run_listeners (GCB_POSTSET);
5676  mark_modified ();
5677  }
5678  else
5679  set_camerapositionmode ("manual");
5680  }
5681 
5683  {
5684  if (m_camerapositionmode.set (val, true))
5685  {
5686  update_camerapositionmode ();
5687  mark_modified ();
5688  }
5689  }
5690 
5691  void set_cameratarget (const octave_value& val)
5692  {
5693  if (m_cameratarget.set (val, false))
5694  {
5695  set_cameratargetmode ("manual");
5696  update_cameratarget ();
5697  m_cameratarget.run_listeners (GCB_POSTSET);
5698  mark_modified ();
5699  }
5700  else
5701  set_cameratargetmode ("manual");
5702  }
5703 
5705  {
5706  if (m_cameratargetmode.set (val, true))
5707  {
5708  update_cameratargetmode ();
5709  mark_modified ();
5710  }
5711  }
5712 
5714  {
5715  if (m_cameraupvector.set (val, false))
5716  {
5717  set_cameraupvectormode ("manual");
5718  update_cameraupvector ();
5719  m_cameraupvector.run_listeners (GCB_POSTSET);
5720  mark_modified ();
5721  }
5722  else
5723  set_cameraupvectormode ("manual");
5724  }
5725 
5727  {
5728  if (m_cameraupvectormode.set (val, true))
5729  {
5730  update_cameraupvectormode ();
5731  mark_modified ();
5732  }
5733  }
5734 
5736  {
5737  if (m_cameraviewangle.set (val, false))
5738  {
5739  set_cameraviewanglemode ("manual");
5740  update_cameraviewangle ();
5741  m_cameraviewangle.run_listeners (GCB_POSTSET);
5742  mark_modified ();
5743  }
5744  else
5745  set_cameraviewanglemode ("manual");
5746  }
5747 
5749  {
5750  if (m_cameraviewanglemode.set (val, true))
5751  {
5752  update_cameraviewanglemode ();
5753  mark_modified ();
5754  }
5755  }
5756 
5757  void set_clim (const octave_value& val)
5758  {
5759  if (m_clim.set (val, false))
5760  {
5761  set_climmode ("manual");
5762  m_clim.run_listeners (GCB_POSTSET);
5763  mark_modified ();
5764  }
5765  else
5766  set_climmode ("manual");
5767  }
5768 
5769  void set_climmode (const octave_value& val)
5770  {
5771  if (m_climmode.set (val, false))
5772  {
5773  update_axis_limits ("climmode");
5774  m_climmode.run_listeners (GCB_POSTSET);
5775  mark_modified ();
5776  }
5777  }
5778 
5780  {
5781  if (m_clippingstyle.set (val, true))
5782  {
5783  mark_modified ();
5784  }
5785  }
5786 
5787  void set_color (const octave_value& val)
5788  {
5789  if (m_color.set (val, true))
5790  {
5791  mark_modified ();
5792  }
5793  }
5794 
5795  void set_colororder (const octave_value& val)
5796  {
5797  if (m_colororder.set (val, true))
5798  {
5799  mark_modified ();
5800  }
5801  }
5802 
5804  {
5805  if (m_colororderindex.set (val, true))
5806  {
5807  mark_modified ();
5808  }
5809  }
5810 
5811  void set_colorscale (const octave_value& val)
5812  {
5813  if (m_colorscale.set (val, true))
5814  {
5815  mark_modified ();
5816  }
5817  }
5818 
5819  void set_currentpoint (const octave_value& val)
5820  {
5821  if (m_currentpoint.set (val, true))
5822  {
5823  mark_modified ();
5824  }
5825  }
5826 
5828  {
5829  if (m_dataaspectratio.set (val, false))
5830  {
5831  set_dataaspectratiomode ("manual");
5832  update_dataaspectratio ();
5833  m_dataaspectratio.run_listeners (GCB_POSTSET);
5834  mark_modified ();
5835  }
5836  else
5837  set_dataaspectratiomode ("manual");
5838  }
5839 
5841  {
5842  if (m_dataaspectratiomode.set (val, true))
5843  {
5844  update_dataaspectratiomode ();
5845  mark_modified ();
5846  }
5847  }
5848 
5849  void set_fontangle (const octave_value& val)
5850  {
5851  if (m_fontangle.set (val, true))
5852  {
5853  update_fontangle ();
5854  mark_modified ();
5855  }
5856  }
5857 
5858  void set_fontname (const octave_value& val)
5859  {
5860  if (m_fontname.set (val, true))
5861  {
5862  update_fontname ();
5863  mark_modified ();
5864  }
5865  }
5866 
5867  void set_fontsize (const octave_value& val)
5868  {
5869  if (m_fontsize.set (val, false))
5870  {
5871  set_fontsizemode ("manual");
5872  update_fontsize ();
5873  m_fontsize.run_listeners (GCB_POSTSET);
5874  mark_modified ();
5875  }
5876  else
5877  set_fontsizemode ("manual");
5878  }
5879 
5880  void set_fontsizemode (const octave_value& val)
5881  {
5882  if (m_fontsizemode.set (val, true))
5883  {
5884  mark_modified ();
5885  }
5886  }
5887 
5889  {
5890  if (m_fontsmoothing.set (val, true))
5891  {
5892  update_fontsmoothing ();
5893  mark_modified ();
5894  }
5895  }
5896 
5897  void set_fontunits (const octave_value& val);
5898 
5900 
5901  void set_fontweight (const octave_value& val)
5902  {
5903  if (m_fontweight.set (val, true))
5904  {
5905  update_fontweight ();
5906  mark_modified ();
5907  }
5908  }
5909 
5910  void set_gridalpha (const octave_value& val)
5911  {
5912  if (m_gridalpha.set (val, false))
5913  {
5914  set_gridalphamode ("manual");
5915  m_gridalpha.run_listeners (GCB_POSTSET);
5916  mark_modified ();
5917  }
5918  else
5919  set_gridalphamode ("manual");
5920  }
5921 
5923  {
5924  if (m_gridalphamode.set (val, true))
5925  {
5926  mark_modified ();
5927  }
5928  }
5929 
5930  void set_gridcolor (const octave_value& val)
5931  {
5932  if (m_gridcolor.set (val, false))
5933  {
5934  set_gridcolormode ("manual");
5935  m_gridcolor.run_listeners (GCB_POSTSET);
5936  mark_modified ();
5937  }
5938  else
5939  set_gridcolormode ("manual");
5940  }
5941 
5943  {
5944  if (m_gridcolormode.set (val, true))
5945  {
5946  mark_modified ();
5947  }
5948  }
5949 
5951  {
5952  if (m_gridlinestyle.set (val, true))
5953  {
5954  mark_modified ();
5955  }
5956  }
5957 
5958  void set_interactions (const octave_value& val)
5959  {
5960  if (m_interactions.set (val, true))
5961  {
5962  mark_modified ();
5963  }
5964  }
5965 
5967  {
5968  if (m_labelfontsizemultiplier.set (val, true))
5969  {
5970  update_labelfontsizemultiplier ();
5971  mark_modified ();
5972  }
5973  }
5974 
5975  void set_layer (const octave_value& val)
5976  {
5977  if (m_layer.set (val, true))
5978  {
5979  update_layer ();
5980  mark_modified ();
5981  }
5982  }
5983 
5984  void set_layout (const octave_value& val)
5985  {
5986  if (m_layout.set (val, true))
5987  {
5988  mark_modified ();
5989  }
5990  }
5991 
5992  void set_legend (const octave_value& val)
5993  {
5994  if (m_legend.set (val, true))
5995  {
5996  mark_modified ();
5997  }
5998  }
5999 
6000  void set_linestyleorder (const octave_value& val);
6001 
6003  {
6004  if (m_linestyleorderindex.set (val, true))
6005  {
6006  mark_modified ();
6007  }
6008  }
6009 
6010  void set_linewidth (const octave_value& val)
6011  {
6012  if (m_linewidth.set (val, true))
6013  {
6014  mark_modified ();
6015  }
6016  }
6017 
6019  {
6020  if (m_minorgridalpha.set (val, false))
6021  {
6022  set_minorgridalphamode ("manual");
6023  m_minorgridalpha.run_listeners (GCB_POSTSET);
6024  mark_modified ();
6025  }
6026  else
6027  set_minorgridalphamode ("manual");
6028  }
6029 
6031  {
6032  if (m_minorgridalphamode.set (val, true))
6033  {
6034  mark_modified ();
6035  }
6036  }
6037 
6039  {
6040  if (m_minorgridcolor.set (val, false))
6041  {
6042  set_minorgridcolormode ("manual");
6043  m_minorgridcolor.run_listeners (GCB_POSTSET);
6044  mark_modified ();
6045  }
6046  else
6047  set_minorgridcolormode ("manual");
6048  }
6049 
6051  {
6052  if (m_minorgridcolormode.set (val, true))
6053  {
6054  mark_modified ();
6055  }
6056  }
6057 
6059  {
6060  if (m_minorgridlinestyle.set (val, true))
6061  {
6062  mark_modified ();
6063  }
6064  }
6065 
6066  void set_nextplot (const octave_value& val)
6067  {
6068  if (m_nextplot.set (val, true))
6069  {
6070  mark_modified ();
6071  }
6072  }
6073 
6075  {
6076  if (m_nextseriesindex.set (val, true))
6077  {
6078  mark_modified ();
6079  }
6080  }
6081 
6083  {
6084  if (m_outerposition.set (val, true))
6085  {
6086  update_outerposition ();
6087  mark_modified ();
6088  }
6089  }
6090 
6092  {
6093  if (m_plotboxaspectratio.set (val, false))
6094  {
6095  set_plotboxaspectratiomode ("manual");
6096  update_plotboxaspectratio ();
6097  m_plotboxaspectratio.run_listeners (GCB_POSTSET);
6098  mark_modified ();
6099  }
6100  else
6101  set_plotboxaspectratiomode ("manual");
6102  }
6103 
6105  {
6106  if (m_plotboxaspectratiomode.set (val, true))
6107  {
6108  update_plotboxaspectratiomode ();
6109  mark_modified ();
6110  }
6111  }
6112 
6113  void set_position (const octave_value& val)
6114  {
6115  if (m_position.set (val, true))
6116  {
6117  update_position ();
6118  mark_modified ();
6119  }
6120  }
6121 
6123  {
6124  if (m_positionconstraint.set (val, true))
6125  {
6126  mark_modified ();
6127  }
6128  }
6129 
6130  void set_projection (const octave_value& val)
6131  {
6132  if (m_projection.set (val, true))
6133  {
6134  mark_modified ();
6135  }
6136  }
6137 
6138  void set_sortmethod (const octave_value& val)
6139  {
6140  if (m_sortmethod.set (val, true))
6141  {
6142  mark_modified ();
6143  }
6144  }
6145 
6146  void set_tickdir (const octave_value& val)
6147  {
6148  if (m_tickdir.set (val, false))
6149  {
6150  set_tickdirmode ("manual");
6151  update_tickdir ();
6152  m_tickdir.run_listeners (GCB_POSTSET);
6153  mark_modified ();
6154  }
6155  else
6156  set_tickdirmode ("manual");
6157  }
6158 
6159  void set_tickdirmode (const octave_value& val)
6160  {
6161  if (m_tickdirmode.set (val, true))
6162  {
6163  update_tickdirmode ();
6164  mark_modified ();
6165  }
6166  }
6167 
6169  {
6170  if (m_ticklabelinterpreter.set (val, true))
6171  {
6172  update_ticklabelinterpreter ();
6173  mark_modified ();
6174  }
6175  }
6176 
6177  void set_ticklength (const octave_value& val)
6178  {
6179  if (m_ticklength.set (val, true))
6180  {
6181  update_ticklength ();
6182  mark_modified ();
6183  }
6184  }
6185 
6186  void set_tightinset (const octave_value& val)
6187  {
6188  if (m_tightinset.set (val, true))
6189  {
6190  mark_modified ();
6191  }
6192  }
6193 
6194  void set_title (const octave_value& val);
6195 
6197  {
6198  if (m_titlefontsizemultiplier.set (val, true))
6199  {
6200  update_titlefontsizemultiplier ();
6201  mark_modified ();
6202  }
6203  }
6204 
6206  {
6207  if (m_titlefontweight.set (val, true))
6208  {
6209  update_titlefontweight ();
6210  mark_modified ();
6211  }
6212  }
6213 
6214  void set_toolbar (const octave_value& val)
6215  {
6216  if (m_toolbar.set (val, true))
6217  {
6218  mark_modified ();
6219  }
6220  }
6221 
6222  void set_units (const octave_value& val);
6223 
6224  void update_units ();
6225 
6226  void set_view (const octave_value& val)
6227  {
6228  if (m_view.set (val, true))
6229  {
6230  update_view ();
6231  mark_modified ();
6232  }
6233  }
6234 
6235  void set_xaxis (const octave_value& val)
6236  {
6237  if (m_xaxis.set (val, true))
6238  {
6239  mark_modified ();
6240  }
6241  }
6242 
6244  {
6245  if (m_xaxislocation.set (val, true))
6246  {
6247  update_xaxislocation ();
6248  mark_modified ();
6249  }
6250  }
6251 
6252  void set_xcolor (const octave_value& val)
6253  {
6254  if (m_xcolor.set (val, false))
6255  {
6256  set_xcolormode ("manual");
6257  update_xcolor ();
6258  m_xcolor.run_listeners (GCB_POSTSET);
6259  mark_modified ();
6260  }
6261  else
6262  set_xcolormode ("manual");
6263  }
6264 
6265  void set_xcolormode (const octave_value& val)
6266  {
6267  if (m_xcolormode.set (val, true))
6268  {
6269  mark_modified ();
6270  }
6271  }
6272 
6273  void set_xdir (const octave_value& val)
6274  {
6275  if (m_xdir.set (val, true))
6276  {
6277  update_xdir ();
6278  mark_modified ();
6279  }
6280  }
6281 
6282  void set_xgrid (const octave_value& val)
6283  {
6284  if (m_xgrid.set (val, true))
6285  {
6286  mark_modified ();
6287  }
6288  }
6289 
6290  void set_xlabel (const octave_value& val);
6291 
6292  void set_xlim (const octave_value& val)
6293  {
6294  if (m_xlim.set (val, false))
6295  {
6296  set_xlimmode ("manual");
6297  update_xlim ();
6298  m_xlim.run_listeners (GCB_POSTSET);
6299  mark_modified ();
6300  }
6301  else
6302  set_xlimmode ("manual");
6303  }
6304 
6305  void set_xlimitmethod (const octave_value& val)
6306  {
6307  if (m_xlimitmethod.set (val, true))
6308  {
6309  update_xlimitmethod ();
6310  mark_modified ();
6311  }
6312  }
6313 
6314  void set_xlimmode (const octave_value& val)
6315  {
6316  if (m_xlimmode.set (val, false))
6317  {
6318  update_axis_limits ("xlimmode");
6319  m_xlimmode.run_listeners (GCB_POSTSET);
6320  mark_modified ();
6321  }
6322  }
6323 
6324  void set_xminorgrid (const octave_value& val)
6325  {
6326  if (m_xminorgrid.set (val, true))
6327  {
6328  mark_modified ();
6329  }
6330  }
6331 
6332  void set_xminortick (const octave_value& val)
6333  {
6334  if (m_xminortick.set (val, true))
6335  {
6336  mark_modified ();
6337  }
6338  }
6339 
6340  void set_xscale (const octave_value& val)
6341  {
6342  if (m_xscale.set (val, false))
6343  {
6344  update_xscale ();
6345  update_axis_limits ("xscale");
6346  m_xscale.run_listeners (GCB_POSTSET);
6347  mark_modified ();
6348  }
6349  }
6350 
6351  void set_xtick (const octave_value& val)
6352  {
6353  if (m_xtick.set (val, false))
6354  {
6355  set_xtickmode ("manual");
6356  update_xtick ();
6357  m_xtick.run_listeners (GCB_POSTSET);
6358  mark_modified ();
6359  }
6360  else
6361  set_xtickmode ("manual");
6362  }
6363 
6364  void set_xticklabel (const octave_value& val);
6365 
6367  {
6368  if (m_xticklabelmode.set (val, true))
6369  {
6370  update_xticklabelmode ();
6371  mark_modified ();
6372  }
6373  }
6374 
6376  {
6377  if (m_xticklabelrotation.set (val, true))
6378  {
6379  mark_modified ();
6380  }
6381  }
6382 
6383  void set_xtickmode (const octave_value& val)
6384  {
6385  if (m_xtickmode.set (val, true))
6386  {
6387  update_xtickmode ();
6388  mark_modified ();
6389  }
6390  }
6391 
6392  void set_yaxis (const octave_value& val)
6393  {
6394  if (m_yaxis.set (val, true))
6395  {
6396  mark_modified ();
6397  }
6398  }
6399 
6401  {
6402  if (m_yaxislocation.set (val, true))
6403  {
6404  update_yaxislocation ();
6405  mark_modified ();
6406  }
6407  }
6408 
6409  void set_ycolor (const octave_value& val)
6410  {
6411  if (m_ycolor.set (val, false))
6412  {
6413  set_ycolormode ("manual");
6414  update_ycolor ();
6415  m_ycolor.run_listeners (GCB_POSTSET);
6416  mark_modified ();
6417  }
6418  else
6419  set_ycolormode ("manual");
6420  }
6421 
6422  void set_ycolormode (const octave_value& val)
6423  {
6424  if (m_ycolormode.set (val, true))
6425  {
6426  mark_modified ();
6427  }
6428  }
6429 
6430  void set_ydir (const octave_value& val)
6431  {
6432  if (m_ydir.set (val, true))
6433  {
6434  update_ydir ();
6435  mark_modified ();
6436  }
6437  }
6438 
6439  void set_ygrid (const octave_value& val)
6440  {
6441  if (m_ygrid.set (val, true))
6442  {
6443  mark_modified ();
6444  }
6445  }
6446 
6447  void set_ylabel (const octave_value& val);
6448 
6449  void set_ylim (const octave_value& val)
6450  {
6451  if (m_ylim.set (val, false))
6452  {
6453  set_ylimmode ("manual");
6454  update_ylim ();
6455  m_ylim.run_listeners (GCB_POSTSET);
6456  mark_modified ();
6457  }
6458  else
6459  set_ylimmode ("manual");
6460  }
6461 
6462  void set_ylimitmethod (const octave_value& val)
6463  {
6464  if (m_ylimitmethod.set (val, true))
6465  {
6466  update_ylimitmethod ();
6467  mark_modified ();
6468  }
6469  }
6470 
6471  void set_ylimmode (const octave_value& val)
6472  {
6473  if (m_ylimmode.set (val, false))
6474  {
6475  update_axis_limits ("ylimmode");
6476  m_ylimmode.run_listeners (GCB_POSTSET);
6477  mark_modified ();
6478  }
6479  }
6480 
6481  void set_yminorgrid (const octave_value& val)
6482  {
6483  if (m_yminorgrid.set (val, true))
6484  {
6485  mark_modified ();
6486  }
6487  }
6488 
6489  void set_yminortick (const octave_value& val)
6490  {
6491  if (m_yminortick.set (val, true))
6492  {
6493  mark_modified ();
6494  }
6495  }
6496 
6497  void set_yscale (const octave_value& val)
6498  {
6499  if (m_yscale.set (val, false))
6500  {
6501  update_yscale ();
6502  update_axis_limits ("yscale");
6503  m_yscale.run_listeners (GCB_POSTSET);
6504  mark_modified ();
6505  }
6506  }
6507 
6508  void set_ytick (const octave_value& val)
6509  {
6510  if (m_ytick.set (val, false))
6511  {
6512  set_ytickmode ("manual");
6513  update_ytick ();
6514  m_ytick.run_listeners (GCB_POSTSET);
6515  mark_modified ();
6516  }
6517  else
6518  set_ytickmode ("manual");
6519  }
6520 
6521  void set_yticklabel (const octave_value& val);
6522 
6524  {
6525  if (m_yticklabelmode.set (val, true))
6526  {
6527  update_yticklabelmode ();
6528  mark_modified ();
6529  }
6530  }
6531 
6533  {
6534  if (m_yticklabelrotation.set (val, true))
6535  {
6536  mark_modified ();
6537  }
6538  }
6539 
6540  void set_ytickmode (const octave_value& val)
6541  {
6542  if (m_ytickmode.set (val, true))
6543  {
6544  update_ytickmode ();
6545  mark_modified ();
6546  }
6547  }
6548 
6549  void set_zaxis (const octave_value& val)
6550  {
6551  if (m_zaxis.set (val, true))
6552  {
6553  mark_modified ();
6554  }
6555  }
6556 
6557  void set_zcolor (const octave_value& val)
6558  {
6559  if (m_zcolor.set (val, false))
6560  {
6561  set_zcolormode ("manual");
6562  update_zcolor ();
6563  m_zcolor.run_listeners (GCB_POSTSET);
6564  mark_modified ();
6565  }
6566  else
6567  set_zcolormode ("manual");
6568  }
6569 
6570  void set_zcolormode (const octave_value& val)
6571  {
6572  if (m_zcolormode.set (val, true))
6573  {
6574  mark_modified ();
6575  }
6576  }
6577 
6578  void set_zdir (const octave_value& val)
6579  {
6580  if (m_zdir.set (val, true))
6581  {
6582  update_zdir ();
6583  mark_modified ();
6584  }
6585  }
6586 
6587  void set_zgrid (const octave_value& val)
6588  {
6589  if (m_zgrid.set (val, true))
6590  {
6591  mark_modified ();
6592  }
6593  }
6594 
6595  void set_zlabel (const octave_value& val);
6596 
6597  void set_zlim (const octave_value& val)
6598  {
6599  if (m_zlim.set (val, false))
6600  {
6601  set_zlimmode ("manual");
6602  update_zlim ();
6603  m_zlim.run_listeners (GCB_POSTSET);
6604  mark_modified ();
6605  }
6606  else
6607  set_zlimmode ("manual");
6608  }
6609 
6610  void set_zlimitmethod (const octave_value& val)
6611  {
6612  if (m_zlimitmethod.set (val, true))
6613  {
6614  update_zlimitmethod ();
6615  mark_modified ();
6616  }
6617  }
6618 
6619  void set_zlimmode (const octave_value& val)
6620  {
6621  if (m_zlimmode.set (val, false))
6622  {
6623  update_axis_limits ("zlimmode");
6624  m_zlimmode.run_listeners (GCB_POSTSET);
6625  mark_modified ();
6626  }
6627  }
6628 
6629  void set_zminorgrid (const octave_value& val)
6630  {
6631  if (m_zminorgrid.set (val, true))
6632  {
6633  mark_modified ();
6634  }
6635  }
6636 
6637  void set_zminortick (const octave_value& val)
6638  {
6639  if (m_zminortick.set (val, true))
6640  {
6641  mark_modified ();
6642  }
6643  }
6644 
6645  void set_zscale (const octave_value& val)
6646  {
6647  if (m_zscale.set (val, false))
6648  {
6649  update_zscale ();
6650  update_axis_limits ("zscale");
6651  m_zscale.run_listeners (GCB_POSTSET);
6652  mark_modified ();
6653  }
6654  }
6655 
6656  void set_ztick (const octave_value& val)
6657  {
6658  if (m_ztick.set (val, false))
6659  {
6660  set_ztickmode ("manual");
6661  update_ztick ();
6662  m_ztick.run_listeners (GCB_POSTSET);
6663  mark_modified ();
6664  }
6665  else
6666  set_ztickmode ("manual");
6667  }
6668 
6669  void set_zticklabel (const octave_value& val);
6670 
6672  {
6673  if (m_zticklabelmode.set (val, true))
6674  {
6675  update_zticklabelmode ();
6676  mark_modified ();
6677  }
6678  }
6679 
6681  {
6682  if (m_zticklabelrotation.set (val, true))
6683  {
6684  mark_modified ();
6685  }
6686  }
6687 
6688  void set_ztickmode (const octave_value& val)
6689  {
6690  if (m_ztickmode.set (val, true))
6691  {
6692  update_ztickmode ();
6693  mark_modified ();
6694  }
6695  }
6696 
6697  void set___colormap__ (const octave_value& val)
6698  {
6699  if (m___colormap__.set (val, true))
6700  {
6701  update___colormap__ ();
6702  mark_modified ();
6703  }
6704  }
6705 
6707  {
6708  if (m_mousewheelzoom.set (val, true))
6709  {
6710  mark_modified ();
6711  }
6712  }
6713 
6715  {
6716  if (m___autopos_tag__.set (val, true))
6717  {
6718  mark_modified ();
6719  }
6720  }
6721 
6722  void set_looseinset (const octave_value& val)
6723  {
6724  if (m_looseinset.set (val, true))
6725  {
6726  update_looseinset ();
6727  mark_modified ();
6728  }
6729  }
6730 
6732  {
6733  if (m_xminortickvalues.set (val, true))
6734  {
6735  mark_modified ();
6736  }
6737  }
6738 
6740  {
6741  if (m_yminortickvalues.set (val, true))
6742  {
6743  mark_modified ();
6744  }
6745  }
6746 
6748  {
6749  if (m_zminortickvalues.set (val, true))
6750  {
6751  mark_modified ();
6752  }
6753  }
6754 
6756  {
6757  if (m___fontsize_points__.set (val, true))
6758  {
6759  mark_modified ();
6760  }
6761  }
6762 
6763 
6764  protected:
6765  OCTINTERP_API void init ();
6766 
6767  private:
6768 
6769  std::string
6770  get_scale (const std::string& scale, const Matrix& lims)
6771  {
6772  std::string retval = scale;
6773 
6774  if (scale == "log" && lims.numel () > 1 && lims(0) < 0 && lims(1) < 0)
6775  retval = "neglog";
6776 
6777  return retval;
6778  }
6779 
6780  void update_xscale ()
6781  {
6782  m_sx = get_scale (get_xscale (), m_xlim.get ().matrix_value ());
6783  }
6784 
6785  void update_yscale ()
6786  {
6787  m_sy = get_scale (get_yscale (), m_ylim.get ().matrix_value ());
6788  }
6789 
6790  void update_zscale ()
6791  {
6792  m_sz = get_scale (get_zscale (), m_zlim.get ().matrix_value ());
6793  }
6794 
6795  OCTINTERP_API void
6796  update_label_color (handle_property label, color_property col);
6797  void update_xcolor ()
6798  { update_label_color (m_xlabel, m_xcolor); }
6799 
6800  void update_ycolor ()
6801  { update_label_color (m_ylabel, m_ycolor); }
6802 
6803  void update_zcolor ()
6804  { update_label_color (m_zlabel, m_zcolor); }
6805 
6806  void update_view () { sync_positions (); }
6807 
6808  void update_cameraposition () { update_transform (); }
6809  void update_cameratarget () { update_transform (); }
6810  void update_cameraupvector () { update_transform (); }
6811  void update_cameraviewangle () { update_transform (); }
6812 
6813  void update_camerapositionmode ()
6814  {
6815  if (camerapositionmode_is ("auto"))
6816  update_cameraposition ();
6817  }
6818  void update_cameratargetmode ()
6819  {
6820  if (cameratargetmode_is ("auto"))
6821  update_cameratarget ();
6822  }
6823  void update_cameraupvectormode ()
6824  {
6825  if (cameraupvectormode_is ("auto"))
6826  update_cameraupvector ();
6827  }
6828  void update_cameraviewanglemode ()
6829  {
6830  if (cameraviewanglemode_is ("auto"))
6831  update_cameraviewangle ();
6832  }
6833 
6834  void update_dataaspectratio () { sync_positions (); }
6835  void update_dataaspectratiomode () { sync_positions (); }
6836  void update_plotboxaspectratio () { sync_positions (); }
6837  void update_plotboxaspectratiomode () { sync_positions (); }
6838 
6839  void update_layer () { update_axes_layout (); }
6840  void update_box ()
6841  {
6842  if (m_xticklabelmode.is ("auto"))
6843  calc_ticklabels (m_xtick, m_xticklabel, m_xscale.is ("log"),
6844  xaxislocation_is ("origin"),
6845  m_yscale.is ("log") ? 2 :
6846  (yaxislocation_is ("origin") ? 0 :
6847  (yaxislocation_is ("left") ? -1 : 1)),
6848  m_xlim);
6849  if (m_yticklabelmode.is ("auto"))
6850  calc_ticklabels (m_ytick, m_yticklabel, m_yscale.is ("log"),
6851  yaxislocation_is ("origin"),
6852  m_xscale.is ("log") ? 2 :
6853  (xaxislocation_is ("origin") ? 0 :
6854  (xaxislocation_is ("bottom") ? -1 : 1)),
6855  m_ylim);
6856  }
6857  void update_yaxislocation ()
6858  {
6859  sync_positions ();
6860  update_axes_layout ();
6861  if (m_xticklabelmode.is ("auto"))
6862  calc_ticklabels (m_xtick, m_xticklabel, m_xscale.is ("log"),
6863  xaxislocation_is ("origin"),
6864  m_yscale.is ("log") ? 2 :
6865  (yaxislocation_is ("origin") ? 0 :
6866  (yaxislocation_is ("left") ? -1 : 1)),
6867  m_xlim);
6868  if (m_yticklabelmode.is ("auto"))
6869  calc_ticklabels (m_ytick, m_yticklabel, m_yscale.is ("log"),
6870  yaxislocation_is ("origin"),
6871  m_xscale.is ("log") ? 2 :
6872  (xaxislocation_is ("origin") ? 0 :
6873  (xaxislocation_is ("bottom") ? -1 : 1)),
6874  m_ylim);
6875  update_ylabel_position ();
6876  }
6877  void update_xaxislocation ()
6878  {
6879  sync_positions ();
6880  update_axes_layout ();
6881  if (m_xticklabelmode.is ("auto"))
6882  calc_ticklabels (m_xtick, m_xticklabel, m_xscale.is ("log"),
6883  xaxislocation_is ("origin"),
6884  m_yscale.is ("log") ? 2 :
6885  (yaxislocation_is ("origin") ? 0 :
6886  (yaxislocation_is ("left") ? -1 : 1)),
6887  m_xlim);
6888  if (m_yticklabelmode.is ("auto"))
6889  calc_ticklabels (m_ytick, m_yticklabel, m_yscale.is ("log"),
6890  yaxislocation_is ("origin"),
6891  m_xscale.is ("log") ? 2 :
6892  (xaxislocation_is ("origin") ? 0 :
6893  (xaxislocation_is ("bottom") ? -1 : 1)),
6894  m_ylim);
6895  update_xlabel_position ();
6896  }
6897 
6898  void update_xdir () { update_camera (); update_axes_layout (); }
6899  void update_ydir () { update_camera (); update_axes_layout (); }
6900  void update_zdir () { update_camera (); update_axes_layout (); }
6901 
6902  void update_ticklength ();
6903  void update_tickdir () { update_ticklength (); }
6904  void update_tickdirmode () { update_ticklength (); }
6905 
6906  void update_ticklabelinterpreter ()
6907  {
6908  update_xtick (false);
6909  update_ytick (false);
6910  update_ztick (true);
6911  }
6912 
6913  void update_xtick (bool sync_pos = true)
6914  {
6915  calc_ticks_and_lims (m_xlim, m_xtick, m_xminortickvalues,
6916  m_xlimmode.is ("auto"), m_xtickmode.is ("auto"),
6917  m_xscale.is ("log"), m_xlimitmethod.is ("padded"),
6918  m_xlimitmethod.is ("tight"));
6919  if (m_xticklabelmode.is ("auto"))
6920  calc_ticklabels (m_xtick, m_xticklabel, m_xscale.is ("log"),
6921  xaxislocation_is ("origin"),
6922  m_yscale.is ("log") ? 2 :
6923  (yaxislocation_is ("origin") ? 0 :
6924  (yaxislocation_is ("left") ? -1 : 1)),
6925  m_xlim);
6926 
6927  if (sync_pos)
6928  sync_positions ();
6929  }
6930  void update_ytick (bool sync_pos = true)
6931  {
6932  calc_ticks_and_lims (m_ylim, m_ytick, m_yminortickvalues,
6933  m_ylimmode.is ("auto"), m_ytickmode.is ("auto"),
6934  m_yscale.is ("log"), m_ylimitmethod.is ("padded"),
6935  m_ylimitmethod.is ("tight"));
6936  if (m_yticklabelmode.is ("auto"))
6937  calc_ticklabels (m_ytick, m_yticklabel, m_yscale.is ("log"),
6938  yaxislocation_is ("origin"),
6939  m_xscale.is ("log") ? 2 :
6940  (xaxislocation_is ("origin") ? 0 :
6941  (xaxislocation_is ("bottom") ? -1 : 1)),
6942  m_ylim);
6943 
6944  if (sync_pos)
6945  sync_positions ();
6946  }
6947  void update_ztick (bool sync_pos = true)
6948  {
6949  calc_ticks_and_lims (m_zlim, m_ztick, m_zminortickvalues,
6950  m_zlimmode.is ("auto"), m_ztickmode.is ("auto"),
6951  m_zscale.is ("log"), m_zlimitmethod.is ("padded"),
6952  m_zlimitmethod.is ("tight"));
6953  if (m_zticklabelmode.is ("auto"))
6954  calc_ticklabels (m_ztick, m_zticklabel, m_zscale.is ("log"), false,
6955  2, m_zlim);
6956 
6957  if (sync_pos)
6958  sync_positions ();
6959  }
6960 
6961  void update_xtickmode ()
6962  {
6963  if (m_xtickmode.is ("auto"))
6964  update_xtick ();
6965  }
6966  void update_ytickmode ()
6967  {
6968  if (m_ytickmode.is ("auto"))
6969  update_ytick ();
6970  }
6971  void update_ztickmode ()
6972  {
6973  if (m_ztickmode.is ("auto"))
6974  update_ztick ();
6975  }
6976 
6977  void update_xticklabelmode ()
6978  {
6979  if (m_xticklabelmode.is ("auto"))
6980  calc_ticklabels (m_xtick, m_xticklabel, m_xscale.is ("log"),
6981  xaxislocation_is ("origin"),
6982  m_yscale.is ("log") ? 2 :
6983  (yaxislocation_is ("origin") ? 0 :
6984  (yaxislocation_is ("left") ? -1 : 1)),
6985  m_xlim);
6986  }
6987  void update_yticklabelmode ()
6988  {
6989  if (m_yticklabelmode.is ("auto"))
6990  calc_ticklabels (m_ytick, m_yticklabel, m_yscale.is ("log"),
6991  yaxislocation_is ("origin"),
6992  m_xscale.is ("log") ? 2 :
6993  (xaxislocation_is ("origin") ? 0 :
6994  (xaxislocation_is ("bottom") ? -1 : 1)),
6995  m_ylim);
6996  }
6997  void update_zticklabelmode ()
6998  {
6999  if (m_zticklabelmode.is ("auto"))
7000  calc_ticklabels (m_ztick, m_zticklabel, m_zscale.is ("log"),
7001  false, 2, m_zlim);
7002  }
7003 
7004  void update_fontname ()
7005  {
7006  update_font ("fontname");
7007  sync_positions ();
7008  }
7009  void update_fontsize ()
7010  {
7011  update_font ("fontsize");
7012  sync_positions ();
7013  }
7014  void update_fontsmoothing ()
7015  {
7016  update_font ("fontsmoothing");
7017  }
7018  void update_fontangle ()
7019  {
7020  update_font ("fontangle");
7021  sync_positions ();
7022  }
7023  void update_fontweight ()
7024  {
7025  update_font ("fontweight");
7026  sync_positions ();
7027  }
7028 
7029  void update_titlefontsizemultiplier ()
7030  {
7031  // update_font handles title and axis labels
7032  update_font ("fontsize");
7033  sync_positions ();
7034  }
7035 
7036  void update_labelfontsizemultiplier ()
7037  {
7038  update_font ("fontsize");
7039  sync_positions ();
7040  }
7041 
7042  void update_titlefontweight ()
7043  {
7044  // update_font handles title and axis labels
7045  update_font ("fontweight");
7046  sync_positions ();
7047  }
7048 
7049  OCTINTERP_API void update_outerposition ();
7050  OCTINTERP_API void update_position ();
7051  OCTINTERP_API void update_looseinset ();
7052 
7053  OCTINTERP_API double calc_tick_sep (double minval, double maxval);
7054  OCTINTERP_API void
7055  calc_ticks_and_lims (array_property& lims, array_property& ticks,
7056  array_property& mticks, bool limmode_is_auto,
7057  bool tickmode_is_auto, bool is_logscale,
7058  bool method_is_padded, bool method_is_tight);
7059  OCTINTERP_API void
7060  calc_ticklabels (const array_property& ticks, any_property& labels,
7061  bool is_logscale, const bool is_origin,
7062  const int other_axislocation,
7063  const array_property& axis_lims);
7064  OCTINTERP_API Matrix
7065  get_ticklabel_extents (const Matrix& ticks,
7066  const string_vector& ticklabels,
7067  const Matrix& limits);
7068 
7069  void fix_limits (array_property& lims)
7070  {
7071  if (lims.get ().isempty ())
7072  return;
7073 
7074  Matrix l = lims.get ().matrix_value ();
7075  if (l(0) > l(1))
7076  {
7077  l(0) = 0;
7078  l(1) = 1;
7079  lims = l;
7080  }
7081  else if (l(0) == l(1))
7082  {
7083  l(0) -= 0.5;
7084  l(1) += 0.5;
7085  lims = l;
7086  }
7087  }
7088 
7089  OCTINTERP_API Matrix calc_tightbox (const Matrix& init_pos);
7090 
7091  void set_colormap (const octave_value& val)
7092  {
7093  set___colormap__ (val);
7094  }
7095 
7096  void update___colormap__ ()
7097  {
7098  m_colormap.run_listeners (GCB_POSTSET);
7099  }
7100 
7101  OCTINTERP_API octave_value get_colormap () const;
7102 
7103  public:
7104  OCTINTERP_API Matrix
7105  get_axis_limits (double xmin, double xmax,
7106  double min_pos, double max_neg,
7107  const bool logscale, const std::string& method);
7108 
7109  OCTINTERP_API void
7110  check_axis_limits (Matrix& limits, const Matrix kids,
7111  const bool logscale, char& update_type);
7112 
7113  void update_xlim ()
7114  {
7115  update_axis_limits ("xlim");
7116 
7117  calc_ticks_and_lims (m_xlim, m_xtick, m_xminortickvalues,
7118  m_xlimmode.is ("auto"), m_xtickmode.is ("auto"),
7119  m_xscale.is ("log"), m_xlimitmethod.is ("padded"),
7120  m_xlimitmethod.is ("tight"));
7121  if (m_xticklabelmode.is ("auto"))
7122  calc_ticklabels (m_xtick, m_xticklabel, m_xscale.is ("log"),
7123  m_xaxislocation.is ("origin"),
7124  m_yscale.is ("log") ? 2 :
7125  (yaxislocation_is ("origin") ? 0 :
7126  (yaxislocation_is ("left") ? -1 : 1)),
7127  m_xlim);
7128 
7129  fix_limits (m_xlim);
7130 
7131  update_xscale ();
7132 
7133  update_axes_layout ();
7134  }
7135 
7137  {
7138  update_xlim ();
7139  }
7140 
7141  void update_ylim ()
7142  {
7143  update_axis_limits ("ylim");
7144 
7145  calc_ticks_and_lims (m_ylim, m_ytick, m_yminortickvalues,
7146  m_ylimmode.is ("auto"), m_ytickmode.is ("auto"),
7147  m_yscale.is ("log"), m_ylimitmethod.is ("padded"),
7148  m_ylimitmethod.is ("tight"));
7149  if (m_yticklabelmode.is ("auto"))
7150  calc_ticklabels (m_ytick, m_yticklabel, m_yscale.is ("log"),
7151  yaxislocation_is ("origin"),
7152  m_xscale.is ("log") ? 2 :
7153  (xaxislocation_is ("origin") ? 0 :
7154  (xaxislocation_is ("bottom") ? -1 : 1)),
7155  m_ylim);
7156 
7157  fix_limits (m_ylim);
7158 
7159  update_yscale ();
7160 
7161  update_axes_layout ();
7162  }
7163 
7165  {
7166  update_ylim ();
7167  }
7168 
7169  void update_zlim ()
7170  {
7171  update_axis_limits ("zlim");
7172 
7173  calc_ticks_and_lims (m_zlim, m_ztick, m_zminortickvalues,
7174  m_zlimmode.is ("auto"), m_ztickmode.is ("auto"),
7175  m_zscale.is ("log"), m_zlimitmethod.is ("padded"),
7176  m_zlimitmethod.is ("tight"));
7177  if (m_zticklabelmode.is ("auto"))
7178  calc_ticklabels (m_ztick, m_zticklabel, m_zscale.is ("log"), false,
7179  2, m_zlim);
7180 
7181  fix_limits (m_zlim);
7182 
7183  update_zscale ();
7184 
7185  update_axes_layout ();
7186  }
7187 
7189  {
7190  update_zlim ();
7191  }
7192 
7193  void trigger_normals_calc ();
7194 
7195  };
7196 
7197 private:
7198  properties m_properties;
7199 
7200 public:
7201  axes (const graphics_handle& mh, const graphics_handle& p)
7202  : base_graphics_object (), m_properties (mh, p), m_default_properties ()
7203  {
7204  m_properties.update_transform ();
7205  }
7206 
7207  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (axes)
7208 
7209  ~axes () = default;
7210 
7212  {
7213  // Allow parent (figure) to override first (properties knows how
7214  // to find the parent object).
7215  m_properties.override_defaults (obj);
7216 
7217  // Now override with our defaults. If the default_properties
7218  // list includes the properties for all defaults (line,
7219  // surface, etc.) then we don't have to know the type of OBJ
7220  // here, we just call its set function and let it decide which
7221  // properties from the list to use.
7222  obj.set_from_list (m_default_properties);
7223  }
7224 
7225  void set (const caseless_str& name, const octave_value& value)
7226  {
7227  if (name.compare ("default", 7))
7228  // strip "default", pass rest to function that will
7229  // parse the remainder and add the element to the
7230  // default_properties map.
7231  m_default_properties.set (name.substr (7), value);
7232  else
7233  m_properties.set (name, value);
7234  }
7235 
7236  void set_defaults (const std::string& mode)
7237  {
7238  m_properties.set_defaults (*this, mode);
7239  }
7240 
7241  octave_value get (const caseless_str& name) const
7242  {
7243  octave_value retval;
7244 
7245  // FIXME: finish this.
7246  if (name.compare ("default", 7))
7247  retval = get_default (name.substr (7));
7248  else
7249  retval = m_properties.get (name);
7250 
7251  return retval;
7252  }
7253 
7254  OCTINTERP_API octave_value get_default (const caseless_str& name) const;
7255 
7257  {
7258  return m_default_properties.as_struct ("default");
7259  }
7260 
7262  {
7263  return m_default_properties;
7264  }
7265 
7266  base_properties& get_properties () { return m_properties; }
7267 
7268  const base_properties& get_properties () const { return m_properties; }
7269 
7270  OCTINTERP_API void update_axis_limits (const std::string& axis_type);
7271 
7272  OCTINTERP_API void update_axis_limits (const std::string& axis_type,
7273  const graphics_handle& h);
7274 
7275  bool valid_object () const { return true; }
7276 
7277  OCTINTERP_API void reset_default_properties ();
7278 
7279  bool has_readonly_property (const caseless_str& pname) const
7280  {
7281  bool retval = m_properties.has_readonly_property (pname);
7282  if (! retval)
7283  retval = base_properties::has_readonly_property (pname);
7284  return retval;
7285  }
7286 
7287 protected:
7288  OCTINTERP_API void initialize (const graphics_object& go);
7289 
7290 private:
7291  property_list m_default_properties;
7292 };
7293 
7294 // ---------------------------------------------------------------------
7295 
7296 class OCTINTERP_API line : public base_graphics_object
7297 {
7298 public:
7299 
7300  class OCTINTERP_API properties : public base_properties
7301  {
7302  public:
7303 
7304  // See the genprops.awk script for an explanation of the
7305  // properties declarations.
7306  // Programming note: Keep property list sorted if new ones are added.
7307 
7308 public:
7309  properties (const graphics_handle& mh, const graphics_handle& p);
7310 
7311  properties () = delete;
7312 
7313  OCTAVE_DISABLE_COPY_MOVE (properties)
7314 
7315  ~properties () = default;
7316 
7317  void set (const caseless_str& pname, const octave_value& val);
7318 
7319  octave_value get (bool all = false) const;
7320 
7321  octave_value get (const caseless_str& pname) const;
7322 
7323  octave_value get (const std::string& pname) const
7324  {
7325  return get (caseless_str (pname));
7326  }
7327 
7328  octave_value get (const char *pname) const
7329  {
7330  return get (caseless_str (pname));
7331  }
7332 
7333  property get_property (const caseless_str& pname);
7334 
7335  std::string graphics_object_name () const { return s_go_name; }
7336 
7337  static property_list::pval_map_type factory_defaults ();
7338 
7339 private:
7340  static std::string s_go_name;
7341 
7342 public:
7343 
7344 
7345  static std::set<std::string> core_property_names ();
7346 
7347  static std::set<std::string> readonly_property_names ();
7348 
7349  static bool has_core_property (const caseless_str& pname);
7350 
7351  static bool has_readonly_property (const caseless_str& pname);
7352 
7353  std::set<std::string> all_property_names () const;
7354 
7355  bool has_property (const caseless_str& pname) const;
7356 
7357 private:
7358 
7359  color_property m_color;
7360  string_property m_displayname;
7361  radio_property m_linejoin;
7362  radio_property m_linestyle;
7363  double_property m_linewidth;
7364  radio_property m_marker;
7365  color_property m_markeredgecolor;
7366  color_property m_markerfacecolor;
7367  double_property m_markersize;
7368  row_vector_property m_xdata;
7369  string_property m_xdatasource;
7370  row_vector_property m_ydata;
7371  string_property m_ydatasource;
7372  row_vector_property m_zdata;
7373  string_property m_zdatasource;
7374  row_vector_property m_xlim;
7375  row_vector_property m_ylim;
7376  row_vector_property m_zlim;
7377  bool_property m_xliminclude;
7378  bool_property m_yliminclude;
7379  bool_property m_zliminclude;
7380 
7381 public:
7382 
7383  enum
7384  {
7385  ID_COLOR = 4000,
7386  ID_DISPLAYNAME = 4001,
7387  ID_LINEJOIN = 4002,
7388  ID_LINESTYLE = 4003,
7389  ID_LINEWIDTH = 4004,
7390  ID_MARKER = 4005,
7391  ID_MARKEREDGECOLOR = 4006,
7392  ID_MARKERFACECOLOR = 4007,
7393  ID_MARKERSIZE = 4008,
7394  ID_XDATA = 4009,
7395  ID_XDATASOURCE = 4010,
7396  ID_YDATA = 4011,
7397  ID_YDATASOURCE = 4012,
7398  ID_ZDATA = 4013,
7399  ID_ZDATASOURCE = 4014,
7400  ID_XLIM = 4015,
7401  ID_YLIM = 4016,
7402  ID_ZLIM = 4017,
7403  ID_XLIMINCLUDE = 4018,
7404  ID_YLIMINCLUDE = 4019,
7405  ID_ZLIMINCLUDE = 4020
7406  };
7407 
7408  bool color_is_rgb () const { return m_color.is_rgb (); }
7409  bool color_is (const std::string& v) const { return m_color.is (v); }
7410  Matrix get_color_rgb () const { return (m_color.is_rgb () ? m_color.rgb () : Matrix ()); }
7411  octave_value get_color () const { return m_color.get (); }
7412 
7413  std::string get_displayname () const { return m_displayname.string_value (); }
7414 
7415  bool linejoin_is (const std::string& v) const { return m_linejoin.is (v); }
7416  std::string get_linejoin () const { return m_linejoin.current_value (); }
7417 
7418  bool linestyle_is (const std::string& v) const { return m_linestyle.is (v); }
7419  std::string get_linestyle () const { return m_linestyle.current_value (); }
7420 
7421  double get_linewidth () const { return m_linewidth.double_value (); }
7422 
7423  bool marker_is (const std::string& v) const { return m_marker.is (v); }
7424  std::string get_marker () const { return m_marker.current_value (); }
7425 
7426  bool markeredgecolor_is_rgb () const { return m_markeredgecolor.is_rgb (); }
7427  bool markeredgecolor_is (const std::string& v) const { return m_markeredgecolor.is (v); }
7428  Matrix get_markeredgecolor_rgb () const { return (m_markeredgecolor.is_rgb () ? m_markeredgecolor.rgb () : Matrix ()); }
7429  octave_value get_markeredgecolor () const { return m_markeredgecolor.get (); }
7430 
7431  bool markerfacecolor_is_rgb () const { return m_markerfacecolor.is_rgb (); }
7432  bool markerfacecolor_is (const std::string& v) const { return m_markerfacecolor.is (v); }
7433  Matrix get_markerfacecolor_rgb () const { return (m_markerfacecolor.is_rgb () ? m_markerfacecolor.rgb () : Matrix ()); }
7434  octave_value get_markerfacecolor () const { return m_markerfacecolor.get (); }
7435 
7436  double get_markersize () const { return m_markersize.double_value (); }
7437 
7438  octave_value get_xdata () const { return m_xdata.get (); }
7439 
7440  std::string get_xdatasource () const { return m_xdatasource.string_value (); }
7441 
7442  octave_value get_ydata () const { return m_ydata.get (); }
7443 
7444  std::string get_ydatasource () const { return m_ydatasource.string_value (); }
7445 
7446  octave_value get_zdata () const { return m_zdata.get (); }
7447 
7448  std::string get_zdatasource () const { return m_zdatasource.string_value (); }
7449 
7450  octave_value get_xlim () const { return m_xlim.get (); }
7451 
7452  octave_value get_ylim () const { return m_ylim.get (); }
7453 
7454  octave_value get_zlim () const { return m_zlim.get (); }
7455 
7456  bool is_xliminclude () const { return m_xliminclude.is_on (); }
7457  std::string get_xliminclude () const { return m_xliminclude.current_value (); }
7458 
7459  bool is_yliminclude () const { return m_yliminclude.is_on (); }
7460  std::string get_yliminclude () const { return m_yliminclude.current_value (); }
7461 
7462  bool is_zliminclude () const { return m_zliminclude.is_on (); }
7463  std::string get_zliminclude () const { return m_zliminclude.current_value (); }
7464 
7465 
7466  void set_color (const octave_value& val)
7467  {
7468  if (m_color.set (val, true))
7469  {
7470  mark_modified ();
7471  }
7472  }
7473 
7474  void set_displayname (const octave_value& val)
7475  {
7476  if (m_displayname.set (val, true))
7477  {
7478  mark_modified ();
7479  }
7480  }
7481 
7482  void set_linejoin (const octave_value& val)
7483  {
7484  if (m_linejoin.set (val, true))
7485  {
7486  mark_modified ();
7487  }
7488  }
7489 
7490  void set_linestyle (const octave_value& val)
7491  {
7492  if (m_linestyle.set (val, true))
7493  {
7494  mark_modified ();
7495  }
7496  }
7497 
7498  void set_linewidth (const octave_value& val)
7499  {
7500  if (m_linewidth.set (val, true))
7501  {
7502  mark_modified ();
7503  }
7504  }
7505 
7506  void set_marker (const octave_value& val)
7507  {
7508  if (m_marker.set (val, true))
7509  {
7510  mark_modified ();
7511  }
7512  }
7513 
7515  {
7516  if (m_markeredgecolor.set (val, true))
7517  {
7518  mark_modified ();
7519  }
7520  }
7521 
7523  {
7524  if (m_markerfacecolor.set (val, true))
7525  {
7526  mark_modified ();
7527  }
7528  }
7529 
7530  void set_markersize (const octave_value& val)
7531  {
7532  if (m_markersize.set (val, true))
7533  {
7534  mark_modified ();
7535  }
7536  }
7537 
7538  void set_xdata (const octave_value& val)
7539  {
7540  if (m_xdata.set (val, true))
7541  {
7542  update_xdata ();
7543  mark_modified ();
7544  }
7545  }
7546 
7547  void set_xdatasource (const octave_value& val)
7548  {
7549  if (m_xdatasource.set (val, true))
7550  {
7551  mark_modified ();
7552  }
7553  }
7554 
7555  void set_ydata (const octave_value& val)
7556  {
7557  if (m_ydata.set (val, true))
7558  {
7559  update_ydata ();
7560  mark_modified ();
7561  }
7562  }
7563 
7564  void set_ydatasource (const octave_value& val)
7565  {
7566  if (m_ydatasource.set (val, true))
7567  {
7568  mark_modified ();
7569  }
7570  }
7571 
7572  void set_zdata (const octave_value& val)
7573  {
7574  if (m_zdata.set (val, true))
7575  {
7576  update_zdata ();
7577  mark_modified ();
7578  }
7579  }
7580 
7581  void set_zdatasource (const octave_value& val)
7582  {
7583  if (m_zdatasource.set (val, true))
7584  {
7585  mark_modified ();
7586  }
7587  }
7588 
7589  void set_xlim (const octave_value& val)
7590  {
7591  if (m_xlim.set (val, false))
7592  {
7593  update_axis_limits ("xlim");
7594  m_xlim.run_listeners (GCB_POSTSET);
7595  mark_modified ();
7596  }
7597  }
7598 
7599  void set_ylim (const octave_value& val)
7600  {
7601  if (m_ylim.set (val, false))
7602  {
7603  update_axis_limits ("ylim");
7604  m_ylim.run_listeners (GCB_POSTSET);
7605  mark_modified ();
7606  }
7607  }
7608 
7609  void set_zlim (const octave_value& val)
7610  {
7611  if (m_zlim.set (val, false))
7612  {
7613  update_axis_limits ("zlim");
7614  m_zlim.run_listeners (GCB_POSTSET);
7615  mark_modified ();
7616  }
7617  }
7618 
7619  void set_xliminclude (const octave_value& val)
7620  {
7621  if (m_xliminclude.set (val, false))
7622  {
7623  update_axis_limits ("xliminclude");
7624  m_xliminclude.run_listeners (GCB_POSTSET);
7625  mark_modified ();
7626  }
7627  }
7628 
7629  void set_yliminclude (const octave_value& val)
7630  {
7631  if (m_yliminclude.set (val, false))
7632  {
7633  update_axis_limits ("yliminclude");
7634  m_yliminclude.run_listeners (GCB_POSTSET);
7635  mark_modified ();
7636  }
7637  }
7638 
7639  void set_zliminclude (const octave_value& val)
7640  {
7641  if (m_zliminclude.set (val, false))
7642  {
7643  update_axis_limits ("zliminclude");
7644  m_zliminclude.run_listeners (GCB_POSTSET);
7645  mark_modified ();
7646  }
7647  }
7648 
7649 
7650  protected:
7651  void init ()
7652  {
7653  m_linewidth.add_constraint ("min", 0, false);
7654  m_markersize.add_constraint ("min", 0, false);
7655  }
7656 
7657  private:
7658  OCTINTERP_API Matrix compute_xlim () const;
7659  OCTINTERP_API Matrix compute_ylim () const;
7660 
7661  void update_xdata () { set_xlim (compute_xlim ()); }
7662 
7663  void update_ydata () { set_ylim (compute_ylim ()); }
7664 
7665  void update_zdata () { set_zlim (m_zdata.get_limits ()); }
7666  };
7667 
7668 private:
7669  properties m_properties;
7670 
7671 public:
7672  line (const graphics_handle& mh, const graphics_handle& p)
7673  : base_graphics_object (), m_properties (mh, p)
7674  { }
7675 
7676  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (line)
7677 
7678  ~line () = default;
7679 
7680  base_properties& get_properties () { return m_properties; }
7681 
7682  const base_properties& get_properties () const { return m_properties; }
7683 
7684  bool valid_object () const { return true; }
7685 
7686  bool has_readonly_property (const caseless_str& pname) const
7687  {
7688  bool retval = m_properties.has_readonly_property (pname);
7689  if (! retval)
7690  retval = base_properties::has_readonly_property (pname);
7691  return retval;
7692  }
7693 };
7694 
7695 // ---------------------------------------------------------------------
7696 
7697 class OCTINTERP_API text : public base_graphics_object
7698 {
7699 public:
7700 
7701  class OCTINTERP_API properties : public base_properties
7702  {
7703  public:
7704 
7705  OCTINTERP_API double
7706  get___fontsize_points__ (double box_pix_height = 0) const;
7707 
7708  OCTINTERP_API void update_text_extent ();
7709 
7710  OCTINTERP_API void update_font ();
7711 
7712  void set_position (const octave_value& val)
7713  {
7714  octave_value new_val (val);
7715 
7716  if (new_val.numel () == 2)
7717  {
7718  dim_vector dv (1, 3);
7719 
7720  new_val = new_val.resize (dv, true);
7721  }
7722 
7723  if (m_position.set (new_val, false))
7724  {
7725  set_positionmode ("manual");
7726  update_position ();
7727  m_position.run_listeners (GCB_POSTSET);
7728  mark_modified ();
7729  }
7730  else
7731  set_positionmode ("manual");
7732  }
7733 
7734  // See the genprops.awk script for an explanation of the
7735  // properties declarations.
7736  // Programming note: Keep property list sorted if new ones are added.
7737 
7738 public:
7739  properties (const graphics_handle& mh, const graphics_handle& p);
7740 
7741  properties () = delete;
7742 
7743  OCTAVE_DISABLE_COPY_MOVE (properties)
7744 
7745  ~properties () = default;
7746 
7747  void set (const caseless_str& pname, const octave_value& val);
7748 
7749  octave_value get (bool all = false) const;
7750 
7751  octave_value get (const caseless_str& pname) const;
7752 
7753  octave_value get (const std::string& pname) const
7754  {
7755  return get (caseless_str (pname));
7756  }
7757 
7758  octave_value get (const char *pname) const
7759  {
7760  return get (caseless_str (pname));
7761  }
7762 
7763  property get_property (const caseless_str& pname);
7764 
7765  std::string graphics_object_name () const { return s_go_name; }
7766 
7767  static property_list::pval_map_type factory_defaults ();
7768 
7769 private:
7770  static std::string s_go_name;
7771 
7772 public:
7773 
7774 
7775  static std::set<std::string> core_property_names ();
7776 
7777  static std::set<std::string> readonly_property_names ();
7778 
7779  static bool has_core_property (const caseless_str& pname);
7780 
7781  static bool has_readonly_property (const caseless_str& pname);
7782 
7783  std::set<std::string> all_property_names () const;
7784 
7785  bool has_property (const caseless_str& pname) const;
7786 
7787 private:
7788 
7789  color_property m_backgroundcolor;
7790  color_property m_color;
7791  color_property m_edgecolor;
7792  bool_property m_editing;
7793  array_property m_extent;
7794  radio_property m_fontangle;
7795  string_property m_fontname;
7796  double_property m_fontsize;
7797  bool_property m_fontsmoothing;
7798  radio_property m_fontunits;
7799  radio_property m_fontweight;
7800  radio_property m_horizontalalignment;
7801  radio_property m_interpreter;
7802  radio_property m_linestyle;
7803  double_property m_linewidth;
7804  double_property m_margin;
7805  array_property m_position;
7806  double_property m_rotation;
7807  text_label_property m_string;
7808  radio_property m_units;
7809  radio_property m_verticalalignment;
7810  row_vector_property m_xlim;
7811  row_vector_property m_ylim;
7812  row_vector_property m_zlim;
7813  bool_property m_xliminclude;
7814  bool_property m_yliminclude;
7815  bool_property m_zliminclude;
7816  radio_property m_positionmode;
7817  radio_property m_rotationmode;
7818  radio_property m_horizontalalignmentmode;
7819  radio_property m_verticalalignmentmode;
7820  radio_property m___autopos_tag__;
7821  double_property m___fontsize_points__;
7822 
7823 public:
7824 
7825  enum
7826  {
7827  ID_BACKGROUNDCOLOR = 5000,
7828  ID_COLOR = 5001,
7829  ID_EDGECOLOR = 5002,
7830  ID_EDITING = 5003,
7831  ID_EXTENT = 5004,
7832  ID_FONTANGLE = 5005,
7833  ID_FONTNAME = 5006,
7834  ID_FONTSIZE = 5007,
7835  ID_FONTSMOOTHING = 5008,
7836  ID_FONTUNITS = 5009,
7837  ID_FONTWEIGHT = 5010,
7838  ID_HORIZONTALALIGNMENT = 5011,
7839  ID_INTERPRETER = 5012,
7840  ID_LINESTYLE = 5013,
7841  ID_LINEWIDTH = 5014,
7842  ID_MARGIN = 5015,
7843  ID_POSITION = 5016,
7844  ID_ROTATION = 5017,
7845  ID_STRING = 5018,
7846  ID_UNITS = 5019,
7847  ID_VERTICALALIGNMENT = 5020,
7848  ID_XLIM = 5021,
7849  ID_YLIM = 5022,
7850  ID_ZLIM = 5023,
7851  ID_XLIMINCLUDE = 5024,
7852  ID_YLIMINCLUDE = 5025,
7853  ID_ZLIMINCLUDE = 5026,
7854  ID_POSITIONMODE = 5027,
7855  ID_ROTATIONMODE = 5028,
7856  ID_HORIZONTALALIGNMENTMODE = 5029,
7857  ID_VERTICALALIGNMENTMODE = 5030,
7858  ID___AUTOPOS_TAG__ = 5031,
7859  ID___FONTSIZE_POINTS__ = 5032
7860  };
7861 
7862  bool backgroundcolor_is_rgb () const { return m_backgroundcolor.is_rgb (); }
7863  bool backgroundcolor_is (const std::string& v) const { return m_backgroundcolor.is (v); }
7864  Matrix get_backgroundcolor_rgb () const { return (m_backgroundcolor.is_rgb () ? m_backgroundcolor.rgb () : Matrix ()); }
7865  octave_value get_backgroundcolor () const { return m_backgroundcolor.get (); }
7866 
7867  bool color_is_rgb () const { return m_color.is_rgb (); }
7868  bool color_is (const std::string& v) const { return m_color.is (v); }
7869  Matrix get_color_rgb () const { return (m_color.is_rgb () ? m_color.rgb () : Matrix ()); }
7870  octave_value get_color () const { return m_color.get (); }
7871 
7872  bool edgecolor_is_rgb () const { return m_edgecolor.is_rgb (); }
7873  bool edgecolor_is (const std::string& v) const { return m_edgecolor.is (v); }
7874  Matrix get_edgecolor_rgb () const { return (m_edgecolor.is_rgb () ? m_edgecolor.rgb () : Matrix ()); }
7875  octave_value get_edgecolor () const { return m_edgecolor.get (); }
7876 
7877  bool is_editing () const { return m_editing.is_on (); }
7878  std::string get_editing () const { return m_editing.current_value (); }
7879 
7880  octave_value get_extent () const;
7881 
7882  bool fontangle_is (const std::string& v) const { return m_fontangle.is (v); }
7883  std::string get_fontangle () const { return m_fontangle.current_value (); }
7884 
7885  std::string get_fontname () const { return m_fontname.string_value (); }
7886 
7887  double get_fontsize () const { return m_fontsize.double_value (); }
7888 
7889  bool is_fontsmoothing () const { return m_fontsmoothing.is_on (); }
7890  std::string get_fontsmoothing () const { return m_fontsmoothing.current_value (); }
7891 
7892  bool fontunits_is (const std::string& v) const { return m_fontunits.is (v); }
7893  std::string get_fontunits () const { return m_fontunits.current_value (); }
7894 
7895  bool fontweight_is (const std::string& v) const { return m_fontweight.is (v); }
7896  std::string get_fontweight () const { return m_fontweight.current_value (); }
7897 
7898  bool horizontalalignment_is (const std::string& v) const { return m_horizontalalignment.is (v); }
7899  std::string get_horizontalalignment () const { return m_horizontalalignment.current_value (); }
7900 
7901  bool interpreter_is (const std::string& v) const { return m_interpreter.is (v); }
7902  std::string get_interpreter () const { return m_interpreter.current_value (); }
7903 
7904  bool linestyle_is (const std::string& v) const { return m_linestyle.is (v); }
7905  std::string get_linestyle () const { return m_linestyle.current_value (); }
7906 
7907  double get_linewidth () const { return m_linewidth.double_value (); }
7908 
7909  double get_margin () const { return m_margin.double_value (); }
7910 
7911  octave_value get_position () const { return m_position.get (); }
7912 
7913  double get_rotation () const { return m_rotation.double_value (); }
7914 
7915  octave_value get_string () const { return m_string.get (); }
7916 
7917  bool units_is (const std::string& v) const { return m_units.is (v); }
7918  std::string get_units () const { return m_units.current_value (); }
7919 
7920  bool verticalalignment_is (const std::string& v) const { return m_verticalalignment.is (v); }
7921  std::string get_verticalalignment () const { return m_verticalalignment.current_value (); }
7922 
7923  octave_value get_xlim () const { return m_xlim.get (); }
7924 
7925  octave_value get_ylim () const { return m_ylim.get (); }
7926 
7927  octave_value get_zlim () const { return m_zlim.get (); }
7928 
7929  bool is_xliminclude () const { return m_xliminclude.is_on (); }
7930  std::string get_xliminclude () const { return m_xliminclude.current_value (); }
7931 
7932  bool is_yliminclude () const { return m_yliminclude.is_on (); }
7933  std::string get_yliminclude () const { return m_yliminclude.current_value (); }
7934 
7935  bool is_zliminclude () const { return m_zliminclude.is_on (); }
7936  std::string get_zliminclude () const { return m_zliminclude.current_value (); }
7937 
7938  bool positionmode_is (const std::string& v) const { return m_positionmode.is (v); }
7939  std::string get_positionmode () const { return m_positionmode.current_value (); }
7940 
7941  bool rotationmode_is (const std::string& v) const { return m_rotationmode.is (v); }
7942  std::string get_rotationmode () const { return m_rotationmode.current_value (); }
7943 
7944  bool horizontalalignmentmode_is (const std::string& v) const { return m_horizontalalignmentmode.is (v); }
7945  std::string get_horizontalalignmentmode () const { return m_horizontalalignmentmode.current_value (); }
7946 
7947  bool verticalalignmentmode_is (const std::string& v) const { return m_verticalalignmentmode.is (v); }
7948  std::string get_verticalalignmentmode () const { return m_verticalalignmentmode.current_value (); }
7949 
7950  bool __autopos_tag___is (const std::string& v) const { return m___autopos_tag__.is (v); }
7951  std::string get___autopos_tag__ () const { return m___autopos_tag__.current_value (); }
7952 
7953 
7955  {
7956  if (m_backgroundcolor.set (val, true))
7957  {
7958  mark_modified ();
7959  }
7960  }
7961 
7962  void set_color (const octave_value& val)
7963  {
7964  if (m_color.set (val, true))
7965  {
7966  update_color ();
7967  mark_modified ();
7968  }
7969  }
7970 
7971  void set_edgecolor (const octave_value& val)
7972  {
7973  if (m_edgecolor.set (val, true))
7974  {
7975  mark_modified ();
7976  }
7977  }
7978 
7979  void set_editing (const octave_value& val)
7980  {
7981  if (m_editing.set (val, true))
7982  {
7983  mark_modified ();
7984  }
7985  }
7986 
7987  void set_extent (const octave_value& val)
7988  {
7989  if (m_extent.set (val, true))
7990  {
7991  mark_modified ();
7992  }
7993  }
7994 
7995  void set_fontangle (const octave_value& val)
7996  {
7997  if (m_fontangle.set (val, true))
7998  {
7999  update_fontangle ();
8000  mark_modified ();
8001  }
8002  }
8003 
8004  void set_fontname (const octave_value& val)
8005  {
8006  if (m_fontname.set (val, true))
8007  {
8008  update_fontname ();
8009  mark_modified ();
8010  }
8011  }
8012 
8013  void set_fontsize (const octave_value& val)
8014  {
8015  if (m_fontsize.set (val, true))
8016  {
8017  update_fontsize ();
8018  mark_modified ();
8019  }
8020  }
8021 
8023  {
8024  if (m_fontsmoothing.set (val, true))
8025  {
8026  update_fontsmoothing ();
8027  mark_modified ();
8028  }
8029  }
8030 
8031  void set_fontunits (const octave_value& val);
8032 
8034 
8035  void set_fontweight (const octave_value& val)
8036  {
8037  if (m_fontweight.set (val, true))
8038  {
8039  update_fontweight ();
8040  mark_modified ();
8041  }
8042  }
8043 
8045  {
8046  if (m_horizontalalignment.set (val, false))
8047  {
8048  set_horizontalalignmentmode ("manual");
8049  update_horizontalalignment ();
8050  m_horizontalalignment.run_listeners (GCB_POSTSET);
8051  mark_modified ();
8052  }
8053  else
8054  set_horizontalalignmentmode ("manual");
8055  }
8056 
8057  void set_interpreter (const octave_value& val)
8058  {
8059  if (m_interpreter.set (val, true))
8060  {
8061  update_interpreter ();
8062  mark_modified ();
8063  }
8064  }
8065 
8066  void set_linestyle (const octave_value& val)
8067  {
8068  if (m_linestyle.set (val, true))
8069  {
8070  mark_modified ();
8071  }
8072  }
8073 
8074  void set_linewidth (const octave_value& val)
8075  {
8076  if (m_linewidth.set (val, true))
8077  {
8078  mark_modified ();
8079  }
8080  }
8081 
8082  void set_margin (const octave_value& val)
8083  {
8084  if (m_margin.set (val, true))
8085  {
8086  mark_modified ();
8087  }
8088  }
8089 
8090  void set_rotation (const octave_value& val)
8091  {
8092  if (m_rotation.set (val, false))
8093  {
8094  set_rotationmode ("manual");
8095  update_rotation ();
8096  m_rotation.run_listeners (GCB_POSTSET);
8097  mark_modified ();
8098  }
8099  else
8100  set_rotationmode ("manual");
8101  }
8102 
8103  void set_string (const octave_value& val)
8104  {
8105  if (m_string.set (val, true))
8106  {
8107  update_string ();
8108  mark_modified ();
8109  }
8110  }
8111 
8112  void set_units (const octave_value& val)
8113  {
8114  if (m_units.set (val, true))
8115  {
8116  update_units ();
8117  mark_modified ();
8118  }
8119  }
8120 
8122  {
8123  if (m_verticalalignment.set (val, false))
8124  {
8125  set_verticalalignmentmode ("manual");
8126  update_verticalalignment ();
8127  m_verticalalignment.run_listeners (GCB_POSTSET);
8128  mark_modified ();
8129  }
8130  else
8131  set_verticalalignmentmode ("manual");
8132  }
8133 
8134  void set_xlim (const octave_value& val)
8135  {
8136  if (m_xlim.set (val, false))
8137  {
8138  update_axis_limits ("xlim");
8139  m_xlim.run_listeners (GCB_POSTSET);
8140  mark_modified ();
8141  }
8142  }
8143 
8144  void set_ylim (const octave_value& val)
8145  {
8146  if (m_ylim.set (val, false))
8147  {
8148  update_axis_limits ("ylim");
8149  m_ylim.run_listeners (GCB_POSTSET);
8150  mark_modified ();
8151  }
8152  }
8153 
8154  void set_zlim (const octave_value& val)
8155  {
8156  if (m_zlim.set (val, false))
8157  {
8158  update_axis_limits ("zlim");
8159  m_zlim.run_listeners (GCB_POSTSET);
8160  mark_modified ();
8161  }
8162  }
8163 
8164  void set_xliminclude (const octave_value& val)
8165  {
8166  if (m_xliminclude.set (val, false))
8167  {
8168  update_axis_limits ("xliminclude");
8169  m_xliminclude.run_listeners (GCB_POSTSET);
8170  mark_modified ();
8171  }
8172  }
8173 
8174  void set_yliminclude (const octave_value& val)
8175  {
8176  if (m_yliminclude.set (val, false))
8177  {
8178  update_axis_limits ("yliminclude");
8179  m_yliminclude.run_listeners (GCB_POSTSET);
8180  mark_modified ();
8181  }
8182  }
8183 
8184  void set_zliminclude (const octave_value& val)
8185  {
8186  if (m_zliminclude.set (val, false))
8187  {
8188  update_axis_limits ("zliminclude");
8189  m_zliminclude.run_listeners (GCB_POSTSET);
8190  mark_modified ();
8191  }
8192  }
8193 
8194  void set_positionmode (const octave_value& val)
8195  {
8196  if (m_positionmode.set (val, true))
8197  {
8198  update_positionmode ();
8199  mark_modified ();
8200  }
8201  }
8202 
8203  void set_rotationmode (const octave_value& val)
8204  {
8205  if (m_rotationmode.set (val, true))
8206  {
8207  update_rotationmode ();
8208  mark_modified ();
8209  }
8210  }
8211 
8213  {
8214  if (m_horizontalalignmentmode.set (val, true))
8215  {
8216  update_horizontalalignmentmode ();
8217  mark_modified ();
8218  }
8219  }
8220 
8222  {
8223  if (m_verticalalignmentmode.set (val, true))
8224  {
8225  update_verticalalignmentmode ();
8226  mark_modified ();
8227  }
8228  }
8229 
8231  {
8232  if (m___autopos_tag__.set (val, true))
8233  {
8234  mark_modified ();
8235  }
8236  }
8237 
8239  {
8240  if (m___fontsize_points__.set (val, true))
8241  {
8242  mark_modified ();
8243  }
8244  }
8245 
8246 
8247  OCTINTERP_API Matrix get_data_position () const;
8248  OCTINTERP_API Matrix get_extent_matrix (bool rotated = false) const;
8249  const uint8NDArray& get_pixels () const { return m_pixels; }
8250 
8251  // Text renderer, used for calculation of text size
8252  octave::text_renderer m_txt_renderer;
8253 
8254  protected:
8255  void init ()
8256  {
8257  m_position.add_constraint (dim_vector (1, 3));
8258  m_fontsize.add_constraint ("min", 0.0, false);
8259  m_linewidth.add_constraint ("min", 0.0, false);
8260  m_margin.add_constraint ("min", 0.0, false);
8261  m_cached_units = get_units ();
8262  update_font ();
8263  }
8264 
8265  private:
8266  void update_position ()
8267  {
8268  Matrix pos = get_data_position ();
8269  Matrix lim;
8270 
8271  lim = Matrix (1, 4, pos(0));
8272  lim(2) = (lim(2) <= 0 ? octave::numeric_limits<double>::Inf () : lim(2));
8273  lim(3) = (lim(3) >= 0 ? -octave::numeric_limits<double>::Inf () : lim(3));
8274  set_xlim (lim);
8275 
8276  lim = Matrix (1, 4, pos(1));
8277  lim(2) = (lim(2) <= 0 ? octave::numeric_limits<double>::Inf () : lim(2));
8278  lim(3) = (lim(3) >= 0 ? -octave::numeric_limits<double>::Inf () : lim(3));
8279  set_ylim (lim);
8280 
8281  if (pos.numel () == 3)
8282  {
8283  lim = Matrix (1, 4, pos(2));
8284  lim(2) = (lim(2) <= 0 ? octave::numeric_limits<double>::Inf ()
8285  : lim(2));
8286  lim(3) = (lim(3) >= 0 ? -octave::numeric_limits<double>::Inf ()
8287  : lim(3));
8288  set_zlim (lim);
8289  }
8290  }
8291 
8292  OCTINTERP_API void request_autopos ();
8293  void update_positionmode () { request_autopos (); }
8294  void update_rotationmode () { request_autopos (); }
8295  void update_horizontalalignmentmode () { request_autopos (); }
8296  void update_verticalalignmentmode () { request_autopos (); }
8297 
8298  void update_string () { request_autopos (); update_text_extent (); }
8299  void update_rotation () { update_text_extent (); }
8300  void update_fontname () { update_font (); update_text_extent (); }
8301  void update_fontsize () { update_font (); update_text_extent (); }
8302  void update_fontsmoothing () { update_font (); update_text_extent (); }
8303 
8304  void update_color ()
8305  {
8306  if (! m_color.is ("none"))
8307  {
8308  update_font ();
8309  update_text_extent ();
8310  }
8311  }
8312 
8313  void update_fontangle ()
8314  {
8315  update_font ();
8316  update_text_extent ();
8317  }
8318  void update_fontweight () { update_font (); update_text_extent (); }
8319 
8320  void update_interpreter () { update_text_extent (); }
8321  void update_horizontalalignment () { update_text_extent (); }
8322  void update_verticalalignment () { update_text_extent (); }
8323 
8324  OCTINTERP_API void update_units ();
8325  OCTINTERP_API void update_fontunits (const caseless_str& old_fontunits);
8326 
8327  private:
8328  std::string m_cached_units;
8329  uint8NDArray m_pixels;
8330  };
8331 
8332 private:
8333  properties m_properties;
8334 
8335 public:
8336  text (const graphics_handle& mh, const graphics_handle& p)
8337  : base_graphics_object (), m_properties (mh, p)
8338  {
8339  m_properties.set_clipping ("off");
8340  }
8341 
8342  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (text)
8343 
8344  ~text () = default;
8345 
8346  base_properties& get_properties () { return m_properties; }
8347 
8348  const base_properties& get_properties () const { return m_properties; }
8349 
8350  bool valid_object () const { return true; }
8351 
8352  bool has_readonly_property (const caseless_str& pname) const
8353  {
8354  bool retval = m_properties.has_readonly_property (pname);
8355  if (! retval)
8356  retval = base_properties::has_readonly_property (pname);
8357  return retval;
8358  }
8359 };
8360 
8361 // ---------------------------------------------------------------------
8362 
8363 class OCTINTERP_API image : public base_graphics_object
8364 {
8365 public:
8366 
8367  class OCTINTERP_API properties : public base_properties
8368  {
8369  public:
8370 
8371  bool is_aliminclude () const
8372  { return (m_aliminclude.is_on () && m_alphadatamapping.is ("scaled")); }
8373  std::string get_aliminclude () const
8374  { return m_aliminclude.current_value (); }
8375 
8376  bool is_climinclude () const
8377  { return (m_climinclude.is_on () && m_cdatamapping.is ("scaled")); }
8378  std::string get_climinclude () const
8379  { return m_climinclude.current_value (); }
8380 
8381  OCTINTERP_API octave_value get_color_data () const;
8382 
8383  void initialize_data () { update_cdata (); }
8384 
8385  // See the genprops.awk script for an explanation of the
8386  // properties declarations.
8387  // Programming note: Keep property list sorted if new ones are added.
8388 
8389 public:
8390  properties (const graphics_handle& mh, const graphics_handle& p);
8391 
8392  properties () = delete;
8393 
8394  OCTAVE_DISABLE_COPY_MOVE (properties)
8395 
8396  ~properties () = default;
8397 
8398  void set (const caseless_str& pname, const octave_value& val);
8399 
8400  octave_value get (bool all = false) const;
8401 
8402  octave_value get (const caseless_str& pname) const;
8403 
8404  octave_value get (const std::string& pname) const
8405  {
8406  return get (caseless_str (pname));
8407  }
8408 
8409  octave_value get (const char *pname) const
8410  {
8411  return get (caseless_str (pname));
8412  }
8413 
8414  property get_property (const caseless_str& pname);
8415 
8416  std::string graphics_object_name () const { return s_go_name; }
8417 
8418  static property_list::pval_map_type factory_defaults ();
8419 
8420 private:
8421  static std::string s_go_name;
8422 
8423 public:
8424 
8425 
8426  static std::set<std::string> core_property_names ();
8427 
8428  static std::set<std::string> readonly_property_names ();
8429 
8430  static bool has_core_property (const caseless_str& pname);
8431 
8432  static bool has_readonly_property (const caseless_str& pname);
8433 
8434  std::set<std::string> all_property_names () const;
8435 
8436  bool has_property (const caseless_str& pname) const;
8437 
8438 private:
8439 
8440  array_property m_alphadata;
8441  radio_property m_alphadatamapping;
8442  array_property m_cdata;
8443  radio_property m_cdatamapping;
8444  row_vector_property m_xdata;
8445  row_vector_property m_ydata;
8446  row_vector_property m_alim;
8447  row_vector_property m_clim;
8448  row_vector_property m_xlim;
8449  row_vector_property m_ylim;
8450  bool_property m_aliminclude;
8451  bool_property m_climinclude;
8452  bool_property m_xliminclude;
8453  bool_property m_yliminclude;
8454  radio_property m_xdatamode;
8455  radio_property m_ydatamode;
8456 
8457 public:
8458 
8459  enum
8460  {
8461  ID_ALPHADATA = 6000,
8462  ID_ALPHADATAMAPPING = 6001,
8463  ID_CDATA = 6002,
8464  ID_CDATAMAPPING = 6003,
8465  ID_XDATA = 6004,
8466  ID_YDATA = 6005,
8467  ID_ALIM = 6006,
8468  ID_CLIM = 6007,
8469  ID_XLIM = 6008,
8470  ID_YLIM = 6009,
8471  ID_ALIMINCLUDE = 6010,
8472  ID_CLIMINCLUDE = 6011,
8473  ID_XLIMINCLUDE = 6012,
8474  ID_YLIMINCLUDE = 6013,
8475  ID_XDATAMODE = 6014,
8476  ID_YDATAMODE = 6015
8477  };
8478 
8479  octave_value get_alphadata () const { return m_alphadata.get (); }
8480 
8481  bool alphadatamapping_is (const std::string& v) const { return m_alphadatamapping.is (v); }
8482  std::string get_alphadatamapping () const { return m_alphadatamapping.current_value (); }
8483 
8484  octave_value get_cdata () const { return m_cdata.get (); }
8485 
8486  bool cdatamapping_is (const std::string& v) const { return m_cdatamapping.is (v); }
8487  std::string get_cdatamapping () const { return m_cdatamapping.current_value (); }
8488 
8489  octave_value get_xdata () const { return m_xdata.get (); }
8490 
8491  octave_value get_ydata () const { return m_ydata.get (); }
8492 
8493  octave_value get_alim () const { return m_alim.get (); }
8494 
8495  octave_value get_clim () const { return m_clim.get (); }
8496 
8497  octave_value get_xlim () const { return m_xlim.get (); }
8498 
8499  octave_value get_ylim () const { return m_ylim.get (); }
8500 
8501  bool is_xliminclude () const { return m_xliminclude.is_on (); }
8502  std::string get_xliminclude () const { return m_xliminclude.current_value (); }
8503 
8504  bool is_yliminclude () const { return m_yliminclude.is_on (); }
8505  std::string get_yliminclude () const { return m_yliminclude.current_value (); }
8506 
8507  bool xdatamode_is (const std::string& v) const { return m_xdatamode.is (v); }
8508  std::string get_xdatamode () const { return m_xdatamode.current_value (); }
8509 
8510  bool ydatamode_is (const std::string& v) const { return m_ydatamode.is (v); }
8511  std::string get_ydatamode () const { return m_ydatamode.current_value (); }
8512 
8513 
8514  void set_alphadata (const octave_value& val)
8515  {
8516  if (m_alphadata.set (val, true))
8517  {
8518  update_alphadata ();
8519  mark_modified ();
8520  }
8521  }
8522 
8524  {
8525  if (m_alphadatamapping.set (val, false))
8526  {
8527  update_axis_limits ("alphadatamapping");
8528  m_alphadatamapping.run_listeners (GCB_POSTSET);
8529  mark_modified ();
8530  }
8531  }
8532 
8533  void set_cdata (const octave_value& val)
8534  {
8535  if (m_cdata.set (val, true))
8536  {
8537  update_cdata ();
8538  mark_modified ();
8539  }
8540  }
8541 
8542  void set_cdatamapping (const octave_value& val)
8543  {
8544  if (m_cdatamapping.set (val, false))
8545  {
8546  update_axis_limits ("cdatamapping");
8547  m_cdatamapping.run_listeners (GCB_POSTSET);
8548  mark_modified ();
8549  }
8550  }
8551 
8552  void set_xdata (const octave_value& val)
8553  {
8554  if (m_xdata.set (val, false))
8555  {
8556  set_xdatamode ("manual");
8557  update_xdata ();
8558  m_xdata.run_listeners (GCB_POSTSET);
8559  mark_modified ();
8560  }
8561  else
8562  set_xdatamode ("manual");
8563  }
8564 
8565  void set_ydata (const octave_value& val)
8566  {
8567  if (m_ydata.set (val, false))
8568  {
8569  set_ydatamode ("manual");
8570  update_ydata ();
8571  m_ydata.run_listeners (GCB_POSTSET);
8572  mark_modified ();
8573  }
8574  else
8575  set_ydatamode ("manual");
8576  }
8577 
8578  void set_alim (const octave_value& val)
8579  {
8580  if (m_alim.set (val, false))
8581  {
8582  update_axis_limits ("alim");
8583  m_alim.run_listeners (GCB_POSTSET);
8584  mark_modified ();
8585  }
8586  }
8587 
8588  void set_clim (const octave_value& val)
8589  {
8590  if (m_clim.set (val, false))
8591  {
8592  update_axis_limits ("clim");
8593  m_clim.run_listeners (GCB_POSTSET);
8594  mark_modified ();
8595  }
8596  }
8597 
8598  void set_xlim (const octave_value& val)
8599  {
8600  if (m_xlim.set (val, false))
8601  {
8602  update_axis_limits ("xlim");
8603  m_xlim.run_listeners (GCB_POSTSET);
8604  mark_modified ();
8605  }
8606  }
8607 
8608  void set_ylim (const octave_value& val)
8609  {
8610  if (m_ylim.set (val, false))
8611  {
8612  update_axis_limits ("ylim");
8613  m_ylim.run_listeners (GCB_POSTSET);
8614  mark_modified ();
8615  }
8616  }
8617 
8618  void set_aliminclude (const octave_value& val)
8619  {
8620  if (m_aliminclude.set (val, false))
8621  {
8622  update_axis_limits ("aliminclude");
8623  m_aliminclude.run_listeners (GCB_POSTSET);
8624  mark_modified ();
8625  }
8626  }
8627 
8628  void set_climinclude (const octave_value& val)
8629  {
8630  if (m_climinclude.set (val, false))
8631  {
8632  update_axis_limits ("climinclude");
8633  m_climinclude.run_listeners (GCB_POSTSET);
8634  mark_modified ();
8635  }
8636  }
8637 
8638  void set_xliminclude (const octave_value& val)
8639  {
8640  if (m_xliminclude.set (val, false))
8641  {
8642  update_axis_limits ("xliminclude");
8643  m_xliminclude.run_listeners (GCB_POSTSET);
8644  mark_modified ();
8645  }
8646  }
8647 
8648  void set_yliminclude (const octave_value& val)
8649  {
8650  if (m_yliminclude.set (val, false))
8651  {
8652  update_axis_limits ("yliminclude");
8653  m_yliminclude.run_listeners (GCB_POSTSET);
8654  mark_modified ();
8655  }
8656  }
8657 
8658  void set_xdatamode (const octave_value& val)
8659  {
8660  if (m_xdatamode.set (val, true))
8661  {
8662  mark_modified ();
8663  }
8664  }
8665 
8666  void set_ydatamode (const octave_value& val)
8667  {
8668  if (m_ydatamode.set (val, true))
8669  {
8670  mark_modified ();
8671  }
8672  }
8673 
8674 
8675  protected:
8676  void init ()
8677  {
8678  m_xdata.add_constraint (2);
8679  m_xdata.add_constraint (dim_vector (0, 0));
8680  m_ydata.add_constraint (2);
8681  m_ydata.add_constraint (dim_vector (0, 0));
8682  m_cdata.add_constraint ("double");
8683  m_cdata.add_constraint ("single");
8684  m_cdata.add_constraint ("logical");
8685  m_cdata.add_constraint ("int8");
8686  m_cdata.add_constraint ("int16");
8687  m_cdata.add_constraint ("int32");
8688  m_cdata.add_constraint ("int64");
8689  m_cdata.add_constraint ("uint8");
8690  m_cdata.add_constraint ("uint16");
8691  m_cdata.add_constraint ("uint32");
8692  m_cdata.add_constraint ("uint64");
8693  m_cdata.add_constraint ("real");
8694  m_cdata.add_constraint (dim_vector (-1, -1));
8695  m_cdata.add_constraint (dim_vector (-1, -1, 3));
8696  m_alphadata.add_constraint ("double");
8697  m_alphadata.add_constraint ("uint8");
8698  m_alphadata.add_constraint (dim_vector (-1, -1));
8699  }
8700 
8701  private:
8702  void update_alphadata ()
8703  {
8704  if (alphadatamapping_is ("scaled"))
8705  set_alim (m_alphadata.get_limits ());
8706  else
8707  m_alim = m_alphadata.get_limits ();
8708  }
8709 
8710  void update_cdata ()
8711  {
8712  if (cdatamapping_is ("scaled"))
8713  set_clim (m_cdata.get_limits ());
8714  else
8715  m_clim = m_cdata.get_limits ();
8716 
8717  if (m_xdatamode.is ("auto"))
8718  update_xdata ();
8719 
8720  if (m_ydatamode.is ("auto"))
8721  update_ydata ();
8722  }
8723 
8724  void update_xdata ()
8725  {
8726  if (m_xdata.get ().isempty ())
8727  set_xdatamode ("auto");
8728 
8729  if (m_xdatamode.is ("auto"))
8730  {
8731  set_xdata (get_auto_xdata ());
8732  set_xdatamode ("auto");
8733  }
8734 
8735  Matrix limits = m_xdata.get_limits ();
8736  float dp = pixel_xsize ();
8737 
8738  limits(0) = limits(0) - dp;
8739  limits(1) = limits(1) + dp;
8740  set_xlim (limits);
8741  }
8742 
8743  void update_ydata ()
8744  {
8745  if (m_ydata.get ().isempty ())
8746  set_ydatamode ("auto");
8747 
8748  if (m_ydatamode.is ("auto"))
8749  {
8750  set_ydata (get_auto_ydata ());
8751  set_ydatamode ("auto");
8752  }
8753 
8754  Matrix limits = m_ydata.get_limits ();
8755  float dp = pixel_ysize ();
8756 
8757  limits(0) = limits(0) - dp;
8758  limits(1) = limits(1) + dp;
8759  set_ylim (limits);
8760  }
8761 
8762  Matrix get_auto_xdata ()
8763  {
8764  dim_vector dv = get_cdata ().dims ();
8765  Matrix data;
8766  if (dv(1) > 0.)
8767  {
8768  data = Matrix (1, 2, 1);
8769  data(1) = dv(1);
8770  }
8771  return data;
8772  }
8773 
8774  Matrix get_auto_ydata ()
8775  {
8776  dim_vector dv = get_cdata ().dims ();
8777  Matrix data;
8778  if (dv(0) > 0.)
8779  {
8780  data = Matrix (1, 2, 1);
8781  data(1) = dv(0);
8782  }
8783  return data;
8784  }
8785 
8786  float pixel_size (octave_idx_type dim, const Matrix limits)
8787  {
8788  octave_idx_type l = dim - 1;
8789  float dp;
8790 
8791  if (l > 0 && limits(0) != limits(1))
8792  dp = (limits(1) - limits(0))/(2*l);
8793  else
8794  {
8795  if (limits(1) == limits(2))
8796  dp = 0.5;
8797  else
8798  dp = (limits(1) - limits(0))/2;
8799  }
8800  return dp;
8801  }
8802 
8803  public:
8804  float pixel_xsize ()
8805  {
8806  return pixel_size ((get_cdata ().dims ())(1), m_xdata.get_limits ());
8807  }
8808 
8809  float pixel_ysize ()
8810  {
8811  return pixel_size ((get_cdata ().dims ())(0), m_ydata.get_limits ());
8812  }
8813  };
8814 
8815 private:
8816  properties m_properties;
8817 
8818 public:
8819  image (const graphics_handle& mh, const graphics_handle& p)
8820  : base_graphics_object (), m_properties (mh, p)
8821  {
8822  m_properties.initialize_data ();
8823  }
8824 
8825  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (image)
8826 
8827  ~image () = default;
8828 
8829  base_properties& get_properties () { return m_properties; }
8830 
8831  const base_properties& get_properties () const { return m_properties; }
8832 
8833  bool valid_object () const { return true; }
8834 
8835  bool has_readonly_property (const caseless_str& pname) const
8836  {
8837  bool retval = m_properties.has_readonly_property (pname);
8838  if (! retval)
8839  retval = base_properties::has_readonly_property (pname);
8840  return retval;
8841  }
8842 };
8843 
8844 // ---------------------------------------------------------------------
8845 
8846 class OCTINTERP_API light : public base_graphics_object
8847 {
8848 public:
8849 
8850  class OCTINTERP_API properties : public base_properties
8851  {
8852  // See the genprops.awk script for an explanation of the
8853  // properties declarations.
8854  // Programming note: Keep property list sorted if new ones are added.
8855 
8856 public:
8857  properties (const graphics_handle& mh, const graphics_handle& p);
8858 
8859  properties () = delete;
8860 
8861  OCTAVE_DISABLE_COPY_MOVE (properties)
8862 
8863  ~properties () = default;
8864 
8865  void set (const caseless_str& pname, const octave_value& val);
8866 
8867  octave_value get (bool all = false) const;
8868 
8869  octave_value get (const caseless_str& pname) const;
8870 
8871  octave_value get (const std::string& pname) const
8872  {
8873  return get (caseless_str (pname));
8874  }
8875 
8876  octave_value get (const char *pname) const
8877  {
8878  return get (caseless_str (pname));
8879  }
8880 
8881  property get_property (const caseless_str& pname);
8882 
8883  std::string graphics_object_name () const { return s_go_name; }
8884 
8885  static property_list::pval_map_type factory_defaults ();
8886 
8887 private:
8888  static std::string s_go_name;
8889 
8890 public:
8891 
8892 
8893  static std::set<std::string> core_property_names ();
8894 
8895  static std::set<std::string> readonly_property_names ();
8896 
8897  static bool has_core_property (const caseless_str& pname);
8898 
8899  static bool has_readonly_property (const caseless_str& pname);
8900 
8901  std::set<std::string> all_property_names () const;
8902 
8903  bool has_property (const caseless_str& pname) const;
8904 
8905 private:
8906 
8907  color_property m_color;
8908  array_property m_position;
8909  radio_property m_style;
8910 
8911 public:
8912 
8913  enum
8914  {
8915  ID_COLOR = 7000,
8916  ID_POSITION = 7001,
8917  ID_STYLE = 7002
8918  };
8919 
8920  bool color_is_rgb () const { return m_color.is_rgb (); }
8921  bool color_is (const std::string& v) const { return m_color.is (v); }
8922  Matrix get_color_rgb () const { return (m_color.is_rgb () ? m_color.rgb () : Matrix ()); }
8923  octave_value get_color () const { return m_color.get (); }
8924 
8925  octave_value get_position () const { return m_position.get (); }
8926 
8927  bool style_is (const std::string& v) const { return m_style.is (v); }
8928  std::string get_style () const { return m_style.current_value (); }
8929 
8930 
8931  void set_color (const octave_value& val)
8932  {
8933  if (m_color.set (val, true))
8934  {
8935  mark_modified ();
8936  }
8937  }
8938 
8939  void set_position (const octave_value& val)
8940  {
8941  if (m_position.set (val, true))
8942  {
8943  mark_modified ();
8944  }
8945  }
8946 
8947  void set_style (const octave_value& val)
8948  {
8949  if (m_style.set (val, true))
8950  {
8951  mark_modified ();
8952  }
8953  }
8954 
8955 
8956  protected:
8957  void init ()
8958  {
8959  m_position.add_constraint (dim_vector (1, 3));
8960  }
8961 
8962  private:
8963  OCTINTERP_API void update_visible ();
8964  };
8965 
8966 private:
8967  properties m_properties;
8968 
8969 public:
8970  light (const graphics_handle& mh, const graphics_handle& p)
8971  : base_graphics_object (), m_properties (mh, p)
8972  { }
8973 
8974  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (light)
8975 
8976  ~light () = default;
8977 
8978  base_properties& get_properties () { return m_properties; }
8979 
8980  const base_properties& get_properties () const { return m_properties; }
8981 
8982  bool valid_object () const { return true; }
8983 
8984  bool has_readonly_property (const caseless_str& pname) const
8985  {
8986  bool retval = m_properties.has_readonly_property (pname);
8987  if (! retval)
8988  retval = base_properties::has_readonly_property (pname);
8989  return retval;
8990  }
8991 
8992 protected:
8993  OCTINTERP_API void initialize (const graphics_object& go);
8994 };
8995 
8996 // ---------------------------------------------------------------------
8997 
8998 class OCTINTERP_API patch : public base_graphics_object
8999 {
9000 public:
9001 
9002  class OCTINTERP_API properties : public base_properties
9003  {
9004  public:
9005 
9006  octave_value get_color_data () const;
9007 
9008  // Matlab allows incoherent data to be stored into patch properties.
9009  // The patch should then be ignored by the renderer.
9010  bool has_bad_data (std::string& msg) const
9011  {
9012  msg = m_bad_data_msg;
9013  return ! msg.empty ();
9014  }
9015 
9016  bool is_aliminclude () const
9017  { return (m_aliminclude.is_on () && m_alphadatamapping.is ("scaled")); }
9018  std::string get_aliminclude () const
9019  { return m_aliminclude.current_value (); }
9020 
9021  bool is_climinclude () const
9022  { return (m_climinclude.is_on () && m_cdatamapping.is ("scaled")); }
9023  std::string get_climinclude () const
9024  { return m_climinclude.current_value (); }
9025 
9026  OCTINTERP_API bool get_do_lighting () const;
9027 
9028  std::vector<std::vector<octave_idx_type>> m_coplanar_last_idx;
9029 
9030  // See the genprops.awk script for an explanation of the
9031  // properties declarations.
9032  // Programming note: Keep property list sorted if new ones are added.
9033 
9034 public:
9035  properties (const graphics_handle& mh, const graphics_handle& p);
9036 
9037  properties () = delete;
9038 
9039  OCTAVE_DISABLE_COPY_MOVE (properties)
9040 
9041  ~properties () = default;
9042 
9043  void set (const caseless_str& pname, const octave_value& val);
9044 
9045  octave_value get (bool all = false) const;
9046 
9047  octave_value get (const caseless_str& pname) const;
9048 
9049  octave_value get (const std::string& pname) const
9050  {
9051  return get (caseless_str (pname));
9052  }
9053 
9054  octave_value get (const char *pname) const
9055  {
9056  return get (caseless_str (pname));
9057  }
9058 
9059  property get_property (const caseless_str& pname);
9060 
9061  std::string graphics_object_name () const { return s_go_name; }
9062 
9063  static property_list::pval_map_type factory_defaults ();
9064 
9065 private:
9066  static std::string s_go_name;
9067 
9068 public:
9069 
9070 
9071  static std::set<std::string> core_property_names ();
9072 
9073  static std::set<std::string> readonly_property_names ();
9074 
9075  static bool has_core_property (const caseless_str& pname);
9076 
9077  static bool has_readonly_property (const caseless_str& pname);
9078 
9079  std::set<std::string> all_property_names () const;
9080 
9081  bool has_property (const caseless_str& pname) const;
9082 
9083 private:
9084 
9085  radio_property m_alphadatamapping;
9086  double_property m_ambientstrength;
9087  radio_property m_backfacelighting;
9088  array_property m_cdata;
9089  radio_property m_cdatamapping;
9090  double_property m_diffusestrength;
9091  string_property m_displayname;
9092  double_radio_property m_edgealpha;
9093  color_property m_edgecolor;
9094  radio_property m_edgelighting;
9095  double_radio_property m_facealpha;
9096  color_property m_facecolor;
9097  radio_property m_facelighting;
9098  array_property m_facenormals;
9099  radio_property m_facenormalsmode;
9100  array_property m_faces;
9101  array_property m_facevertexalphadata;
9102  array_property m_facevertexcdata;
9103  radio_property m_linestyle;
9104  double_property m_linewidth;
9105  radio_property m_marker;
9106  color_property m_markeredgecolor;
9107  color_property m_markerfacecolor;
9108  double_property m_markersize;
9109  double_property m_specularcolorreflectance;
9110  double_property m_specularexponent;
9111  double_property m_specularstrength;
9112  array_property m_vertexnormals;
9113  radio_property m_vertexnormalsmode;
9114  array_property m_vertices;
9115  array_property m_xdata;
9116  array_property m_ydata;
9117  array_property m_zdata;
9118  row_vector_property m_alim;
9119  row_vector_property m_clim;
9120  row_vector_property m_xlim;
9121  row_vector_property m_ylim;
9122  row_vector_property m_zlim;
9123  bool_property m_aliminclude;
9124  bool_property m_climinclude;
9125  bool_property m_xliminclude;
9126  bool_property m_yliminclude;
9127  bool_property m_zliminclude;
9128 
9129 public:
9130 
9131  enum
9132  {
9133  ID_ALPHADATAMAPPING = 8000,
9134  ID_AMBIENTSTRENGTH = 8001,
9135  ID_BACKFACELIGHTING = 8002,
9136  ID_CDATA = 8003,
9137  ID_CDATAMAPPING = 8004,
9138  ID_DIFFUSESTRENGTH = 8005,
9139  ID_DISPLAYNAME = 8006,
9140  ID_EDGEALPHA = 8007,
9141  ID_EDGECOLOR = 8008,
9142  ID_EDGELIGHTING = 8009,
9143  ID_FACEALPHA = 8010,
9144  ID_FACECOLOR = 8011,
9145  ID_FACELIGHTING = 8012,
9146  ID_FACENORMALS = 8013,
9147  ID_FACENORMALSMODE = 8014,
9148  ID_FACES = 8015,
9149  ID_FACEVERTEXALPHADATA = 8016,
9150  ID_FACEVERTEXCDATA = 8017,
9151  ID_LINESTYLE = 8018,
9152  ID_LINEWIDTH = 8019,
9153  ID_MARKER = 8020,
9154  ID_MARKEREDGECOLOR = 8021,
9155  ID_MARKERFACECOLOR = 8022,
9156  ID_MARKERSIZE = 8023,
9157  ID_SPECULARCOLORREFLECTANCE = 8024,
9158  ID_SPECULAREXPONENT = 8025,
9159  ID_SPECULARSTRENGTH = 8026,
9160  ID_VERTEXNORMALS = 8027,
9161  ID_VERTEXNORMALSMODE = 8028,
9162  ID_VERTICES = 8029,
9163  ID_XDATA = 8030,
9164  ID_YDATA = 8031,
9165  ID_ZDATA = 8032,
9166  ID_ALIM = 8033,
9167  ID_CLIM = 8034,
9168  ID_XLIM = 8035,
9169  ID_YLIM = 8036,
9170  ID_ZLIM = 8037,
9171  ID_ALIMINCLUDE = 8038,
9172  ID_CLIMINCLUDE = 8039,
9173  ID_XLIMINCLUDE = 8040,
9174  ID_YLIMINCLUDE = 8041,
9175  ID_ZLIMINCLUDE = 8042
9176  };
9177 
9178  bool alphadatamapping_is (const std::string& v) const { return m_alphadatamapping.is (v); }
9179  std::string get_alphadatamapping () const { return m_alphadatamapping.current_value (); }
9180 
9181  double get_ambientstrength () const { return m_ambientstrength.double_value (); }
9182 
9183  bool backfacelighting_is (const std::string& v) const { return m_backfacelighting.is (v); }
9184  std::string get_backfacelighting () const { return m_backfacelighting.current_value (); }
9185 
9186  octave_value get_cdata () const { return m_cdata.get (); }
9187 
9188  bool cdatamapping_is (const std::string& v) const { return m_cdatamapping.is (v); }
9189  std::string get_cdatamapping () const { return m_cdatamapping.current_value (); }
9190 
9191  double get_diffusestrength () const { return m_diffusestrength.double_value (); }
9192 
9193  std::string get_displayname () const { return m_displayname.string_value (); }
9194 
9195  bool edgealpha_is_double () const { return m_edgealpha.is_double (); }
9196  bool edgealpha_is (const std::string& v) const { return m_edgealpha.is (v); }
9197  double get_edgealpha_double () const { return (m_edgealpha.is_double () ? m_edgealpha.double_value () : 0); }
9198  octave_value get_edgealpha () const { return m_edgealpha.get (); }
9199 
9200  bool edgecolor_is_rgb () const { return m_edgecolor.is_rgb (); }
9201  bool edgecolor_is (const std::string& v) const { return m_edgecolor.is (v); }
9202  Matrix get_edgecolor_rgb () const { return (m_edgecolor.is_rgb () ? m_edgecolor.rgb () : Matrix ()); }
9203  octave_value get_edgecolor () const { return m_edgecolor.get (); }
9204 
9205  bool edgelighting_is (const std::string& v) const { return m_edgelighting.is (v); }
9206  std::string get_edgelighting () const { return m_edgelighting.current_value (); }
9207 
9208  bool facealpha_is_double () const { return m_facealpha.is_double (); }
9209  bool facealpha_is (const std::string& v) const { return m_facealpha.is (v); }
9210  double get_facealpha_double () const { return (m_facealpha.is_double () ? m_facealpha.double_value () : 0); }
9211  octave_value get_facealpha () const { return m_facealpha.get (); }
9212 
9213  bool facecolor_is_rgb () const { return m_facecolor.is_rgb (); }
9214  bool facecolor_is (const std::string& v) const { return m_facecolor.is (v); }
9215  Matrix get_facecolor_rgb () const { return (m_facecolor.is_rgb () ? m_facecolor.rgb () : Matrix ()); }
9216  octave_value get_facecolor () const { return m_facecolor.get (); }
9217 
9218  bool facelighting_is (const std::string& v) const { return m_facelighting.is (v); }
9219  std::string get_facelighting () const { return m_facelighting.current_value (); }
9220 
9221  octave_value get_facenormals () const { return m_facenormals.get (); }
9222 
9223  bool facenormalsmode_is (const std::string& v) const { return m_facenormalsmode.is (v); }
9224  std::string get_facenormalsmode () const { return m_facenormalsmode.current_value (); }
9225 
9226  octave_value get_faces () const { return m_faces.get (); }
9227 
9228  octave_value get_facevertexalphadata () const { return m_facevertexalphadata.get (); }
9229 
9230  octave_value get_facevertexcdata () const { return m_facevertexcdata.get (); }
9231 
9232  bool linestyle_is (const std::string& v) const { return m_linestyle.is (v); }
9233  std::string get_linestyle () const { return m_linestyle.current_value (); }
9234 
9235  double get_linewidth () const { return m_linewidth.double_value (); }
9236 
9237  bool marker_is (const std::string& v) const { return m_marker.is (v); }
9238  std::string get_marker () const { return m_marker.current_value (); }
9239 
9240  bool markeredgecolor_is_rgb () const { return m_markeredgecolor.is_rgb (); }
9241  bool markeredgecolor_is (const std::string& v) const { return m_markeredgecolor.is (v); }
9242  Matrix get_markeredgecolor_rgb () const { return (m_markeredgecolor.is_rgb () ? m_markeredgecolor.rgb () : Matrix ()); }
9243  octave_value get_markeredgecolor () const { return m_markeredgecolor.get (); }
9244 
9245  bool markerfacecolor_is_rgb () const { return m_markerfacecolor.is_rgb (); }
9246  bool markerfacecolor_is (const std::string& v) const { return m_markerfacecolor.is (v); }
9247  Matrix get_markerfacecolor_rgb () const { return (m_markerfacecolor.is_rgb () ? m_markerfacecolor.rgb () : Matrix ()); }
9248  octave_value get_markerfacecolor () const { return m_markerfacecolor.get (); }
9249 
9250  double get_markersize () const { return m_markersize.double_value (); }
9251 
9252  double get_specularcolorreflectance () const { return m_specularcolorreflectance.double_value (); }
9253 
9254  double get_specularexponent () const { return m_specularexponent.double_value (); }
9255 
9256  double get_specularstrength () const { return m_specularstrength.double_value (); }
9257 
9258  octave_value get_vertexnormals () const { return m_vertexnormals.get (); }
9259 
9260  bool vertexnormalsmode_is (const std::string& v) const { return m_vertexnormalsmode.is (v); }
9261  std::string get_vertexnormalsmode () const { return m_vertexnormalsmode.current_value (); }
9262 
9263  octave_value get_vertices () const { return m_vertices.get (); }
9264 
9265  octave_value get_xdata () const { return m_xdata.get (); }
9266 
9267  octave_value get_ydata () const { return m_ydata.get (); }
9268 
9269  octave_value get_zdata () const { return m_zdata.get (); }
9270 
9271  octave_value get_alim () const { return m_alim.get (); }
9272 
9273  octave_value get_clim () const { return m_clim.get (); }
9274 
9275  octave_value get_xlim () const { return m_xlim.get (); }
9276 
9277  octave_value get_ylim () const { return m_ylim.get (); }
9278 
9279  octave_value get_zlim () const { return m_zlim.get (); }
9280 
9281  bool is_xliminclude () const { return m_xliminclude.is_on (); }
9282  std::string get_xliminclude () const { return m_xliminclude.current_value (); }
9283 
9284  bool is_yliminclude () const { return m_yliminclude.is_on (); }
9285  std::string get_yliminclude () const { return m_yliminclude.current_value (); }
9286 
9287  bool is_zliminclude () const { return m_zliminclude.is_on (); }
9288  std::string get_zliminclude () const { return m_zliminclude.current_value (); }
9289 
9290 
9292  {
9293  if (m_alphadatamapping.set (val, false))
9294  {
9295  update_axis_limits ("alphadatamapping");
9296  m_alphadatamapping.run_listeners (GCB_POSTSET);
9297  mark_modified ();
9298  }
9299  }
9300 
9302  {
9303  if (m_ambientstrength.set (val, true))
9304  {
9305  mark_modified ();
9306  }
9307  }
9308 
9310  {
9311  if (m_backfacelighting.set (val, true))
9312  {
9313  mark_modified ();
9314  }
9315  }
9316 
9317  void set_cdata (const octave_value& val)
9318  {
9319  if (m_cdata.set (val, true))
9320  {
9321  update_cdata ();
9322  mark_modified ();
9323  }
9324  }
9325 
9326  void set_cdatamapping (const octave_value& val)
9327  {
9328  if (m_cdatamapping.set (val, false))
9329  {
9330  update_axis_limits ("cdatamapping");
9331  m_cdatamapping.run_listeners (GCB_POSTSET);
9332  mark_modified ();
9333  }
9334  }
9335 
9337  {
9338  if (m_diffusestrength.set (val, true))
9339  {
9340  mark_modified ();
9341  }
9342  }
9343 
9344  void set_displayname (const octave_value& val)
9345  {
9346  if (m_displayname.set (val, true))
9347  {
9348  mark_modified ();
9349  }
9350  }
9351 
9352  void set_edgealpha (const octave_value& val)
9353  {
9354  if (m_edgealpha.set (val, true))
9355  {
9356  mark_modified ();
9357  }
9358  }
9359 
9360  void set_edgecolor (const octave_value& val)
9361  {
9362  if (m_edgecolor.set (val, true))
9363  {
9364  mark_modified ();
9365  }
9366  }
9367 
9368  void set_edgelighting (const octave_value& val)
9369  {
9370  if (m_edgelighting.set (val, true))
9371  {
9372  update_edgelighting ();
9373  mark_modified ();
9374  }
9375  }
9376 
9377  void set_facealpha (const octave_value& val)
9378  {
9379  if (m_facealpha.set (val, true))
9380  {
9381  mark_modified ();
9382  }
9383  }
9384 
9385  void set_facecolor (const octave_value& val)
9386  {
9387  if (m_facecolor.set (val, true))
9388  {
9389  mark_modified ();
9390  }
9391  }
9392 
9393  void set_facelighting (const octave_value& val)
9394  {
9395  if (m_facelighting.set (val, true))
9396  {
9397  update_facelighting ();
9398  mark_modified ();
9399  }
9400  }
9401 
9402  void set_facenormals (const octave_value& val)
9403  {
9404  if (m_facenormals.set (val, false))
9405  {
9406  set_facenormalsmode ("manual");
9407  m_facenormals.run_listeners (GCB_POSTSET);
9408  mark_modified ();
9409  }
9410  else
9411  set_facenormalsmode ("manual");
9412  }
9413 
9415  {
9416  if (m_facenormalsmode.set (val, true))
9417  {
9418  update_facenormalsmode ();
9419  mark_modified ();
9420  }
9421  }
9422 
9423  void set_faces (const octave_value& val)
9424  {
9425  if (m_faces.set (val, true))
9426  {
9427  update_faces ();
9428  mark_modified ();
9429  }
9430  }
9431 
9433  {
9434  if (m_facevertexalphadata.set (val, true))
9435  {
9436  mark_modified ();
9437  }
9438  }
9439 
9441  {
9442  if (m_facevertexcdata.set (val, true))
9443  {
9444  update_facevertexcdata ();
9445  mark_modified ();
9446  }
9447  }
9448 
9449  void set_linestyle (const octave_value& val)
9450  {
9451  if (m_linestyle.set (val, true))
9452  {
9453  mark_modified ();
9454  }
9455  }
9456 
9457  void set_linewidth (const octave_value& val)
9458  {
9459  if (m_linewidth.set (val, true))
9460  {
9461  mark_modified ();
9462  }
9463  }
9464 
9465  void set_marker (const octave_value& val)
9466  {
9467  if (m_marker.set (val, true))
9468  {
9469  mark_modified ();
9470  }
9471  }
9472 
9474  {
9475  if (m_markeredgecolor.set (val, true))
9476  {
9477  mark_modified ();
9478  }
9479  }
9480 
9482  {
9483  if (m_markerfacecolor.set (val, true))
9484  {
9485  mark_modified ();
9486  }
9487  }
9488 
9489  void set_markersize (const octave_value& val)
9490  {
9491  if (m_markersize.set (val, true))
9492  {
9493  mark_modified ();
9494  }
9495  }
9496 
9498  {
9499  if (m_specularcolorreflectance.set (val, true))
9500  {
9501  mark_modified ();
9502  }
9503  }
9504 
9506  {
9507  if (m_specularexponent.set (val, true))
9508  {
9509  mark_modified ();
9510  }
9511  }
9512 
9514  {
9515  if (m_specularstrength.set (val, true))
9516  {
9517  mark_modified ();
9518  }
9519  }
9520 
9522  {
9523  if (m_vertexnormals.set (val, false))
9524  {
9525  set_vertexnormalsmode ("manual");
9526  m_vertexnormals.run_listeners (GCB_POSTSET);
9527  mark_modified ();
9528  }
9529  else
9530  set_vertexnormalsmode ("manual");
9531  }
9532 
9534  {
9535  if (m_vertexnormalsmode.set (val, true))
9536  {
9537  update_vertexnormalsmode ();
9538  mark_modified ();
9539  }
9540  }
9541 
9542  void set_vertices (const octave_value& val)
9543  {
9544  if (m_vertices.set (val, true))
9545  {
9546  update_vertices ();
9547  mark_modified ();
9548  }
9549  }
9550 
9551  void set_xdata (const octave_value& val)
9552  {
9553  if (m_xdata.set (val, true))
9554  {
9555  update_xdata ();
9556  mark_modified ();
9557  }
9558  }
9559 
9560  void set_ydata (const octave_value& val)
9561  {
9562  if (m_ydata.set (val, true))
9563  {
9564  update_ydata ();
9565  mark_modified ();
9566  }
9567  }
9568 
9569  void set_zdata (const octave_value& val)
9570  {
9571  if (m_zdata.set (val, true))
9572  {
9573  update_zdata ();
9574  mark_modified ();
9575  }
9576  }
9577 
9578  void set_alim (const octave_value& val)
9579  {
9580  if (m_alim.set (val, false))
9581  {
9582  update_axis_limits ("alim");
9583  m_alim.run_listeners (GCB_POSTSET);
9584  mark_modified ();
9585  }
9586  }
9587 
9588  void set_clim (const octave_value& val)
9589  {
9590  if (m_clim.set (val, false))
9591  {
9592  update_axis_limits ("clim");
9593  m_clim.run_listeners (GCB_POSTSET);
9594  mark_modified ();
9595  }
9596  }
9597 
9598  void set_xlim (const octave_value& val)
9599  {
9600  if (m_xlim.set (val, false))
9601  {
9602  update_axis_limits ("xlim");
9603  m_xlim.run_listeners (GCB_POSTSET);
9604  mark_modified ();
9605  }
9606  }
9607 
9608  void set_ylim (const octave_value& val)
9609  {
9610  if (m_ylim.set (val, false))
9611  {
9612  update_axis_limits ("ylim");
9613  m_ylim.run_listeners (GCB_POSTSET);
9614  mark_modified ();
9615  }
9616  }
9617 
9618  void set_zlim (const octave_value& val)
9619  {
9620  if (m_zlim.set (val, false))
9621  {
9622  update_axis_limits ("zlim");
9623  m_zlim.run_listeners (GCB_POSTSET);
9624  mark_modified ();
9625  }
9626  }
9627 
9628  void set_aliminclude (const octave_value& val)
9629  {
9630  if (m_aliminclude.set (val, false))
9631  {
9632  update_axis_limits ("aliminclude");
9633  m_aliminclude.run_listeners (GCB_POSTSET);
9634  mark_modified ();
9635  }
9636  }
9637 
9638  void set_climinclude (const octave_value& val)
9639  {
9640  if (m_climinclude.set (val, false))
9641  {
9642  update_axis_limits ("climinclude");
9643  m_climinclude.run_listeners (GCB_POSTSET);
9644  mark_modified ();
9645  }
9646  }
9647 
9648  void set_xliminclude (const octave_value& val)
9649  {
9650  if (m_xliminclude.set (val, false))
9651  {
9652  update_axis_limits ("xliminclude");
9653  m_xliminclude.run_listeners (GCB_POSTSET);
9654  mark_modified ();
9655  }
9656  }
9657 
9658  void set_yliminclude (const octave_value& val)
9659  {
9660  if (m_yliminclude.set (val, false))
9661  {
9662  update_axis_limits ("yliminclude");
9663  m_yliminclude.run_listeners (GCB_POSTSET);
9664  mark_modified ();
9665  }
9666  }
9667 
9668  void set_zliminclude (const octave_value& val)
9669  {
9670  if (m_zliminclude.set (val, false))
9671  {
9672  update_axis_limits ("zliminclude");
9673  m_zliminclude.run_listeners (GCB_POSTSET);
9674  mark_modified ();
9675  }
9676  }
9677 
9678 
9679  protected:
9680  void init ()
9681  {
9682  m_xdata.add_constraint (dim_vector (-1, -1));
9683  m_ydata.add_constraint (dim_vector (-1, -1));
9684  m_zdata.add_constraint (dim_vector (-1, -1));
9685  m_faces.add_constraint (dim_vector (-1, -1));
9686  m_vertices.add_constraint (dim_vector (-1, 2));
9687  m_vertices.add_constraint (dim_vector (-1, 3));
9688  m_cdata.add_constraint ("double");
9689  m_cdata.add_constraint ("single");
9690  m_cdata.add_constraint ("logical");
9691  m_cdata.add_constraint ("int8");
9692  m_cdata.add_constraint ("int16");
9693  m_cdata.add_constraint ("int32");
9694  m_cdata.add_constraint ("int64");
9695  m_cdata.add_constraint ("uint8");
9696  m_cdata.add_constraint ("uint16");
9697  m_cdata.add_constraint ("uint32");
9698  m_cdata.add_constraint ("uint64");
9699  m_cdata.add_constraint ("real");
9700  m_cdata.add_constraint (dim_vector (-1, -1));
9701  m_cdata.add_constraint (dim_vector (-1, -1, 3));
9702  m_facevertexcdata.add_constraint (dim_vector (-1, 1));
9703  m_facevertexcdata.add_constraint (dim_vector (-1, 3));
9704  m_facevertexcdata.add_constraint (dim_vector (0, 0));
9705  m_facevertexalphadata.add_constraint (dim_vector (-1, 1));
9706  m_facevertexalphadata.add_constraint (dim_vector (0, 0));
9707  m_facenormals.add_constraint (dim_vector (-1, 3));
9708  m_facenormals.add_constraint (dim_vector (0, 0));
9709  m_vertexnormals.add_constraint (dim_vector (-1, 3));
9710  m_vertexnormals.add_constraint (dim_vector (0, 0));
9711 
9712  m_ambientstrength.add_constraint ("min", 0.0, true);
9713  m_ambientstrength.add_constraint ("max", 1.0, true);
9714  m_diffusestrength.add_constraint ("min", 0.0, true);
9715  m_diffusestrength.add_constraint ("max", 1.0, true);
9716  m_linewidth.add_constraint ("min", 0.0, false);
9717  m_markersize.add_constraint ("min", 0.0, false);
9718  m_specularcolorreflectance.add_constraint ("min", 0.0, true);
9719  m_specularcolorreflectance.add_constraint ("max", 1.0, true);
9720  m_specularexponent.add_constraint ("min", 0.0, false);
9721  m_specularstrength.add_constraint ("min", 0.0, true);
9722  m_specularstrength.add_constraint ("max", 1.0, true);
9723  }
9724 
9725  public:
9726  void update_normals (bool reset, bool force = false)
9727  {
9728  update_face_normals (reset, force);
9729  update_vertex_normals (reset, force);
9730  }
9731 
9732 
9733  private:
9734  std::string m_bad_data_msg;
9735 
9736  void update_faces () { update_data ();}
9737 
9738  void update_vertices () { update_data ();}
9739 
9740  void update_facevertexcdata () { update_data ();}
9741 
9742  OCTINTERP_API void update_fvc ();
9743 
9744  void update_xdata ()
9745  {
9746  if (get_xdata ().isempty ())
9747  {
9748  // For compatibility with matlab behavior,
9749  // if x/ydata are set empty, silently empty other *data and
9750  // faces properties while vertices remain unchanged.
9751  set_ydata (Matrix ());
9752  set_zdata (Matrix ());
9753  set_cdata (Matrix ());
9754  set_faces (Matrix ());
9755  }
9756  else
9757  {
9758  update_fvc ();
9759  update_normals (true);
9760  }
9761 
9762  set_xlim (m_xdata.get_limits ());
9763  }
9764 
9765  void update_ydata ()
9766  {
9767  if (get_ydata ().isempty ())
9768  {
9769  set_xdata (Matrix ());
9770  set_zdata (Matrix ());
9771  set_cdata (Matrix ());
9772  set_faces (Matrix ());
9773  }
9774  else
9775  {
9776  update_fvc ();
9777  update_normals (true);
9778  }
9779 
9780  set_ylim (m_ydata.get_limits ());
9781  }
9782 
9783  void update_zdata ()
9784  {
9785  update_fvc ();
9786  update_normals (true);
9787  set_zlim (m_zdata.get_limits ());
9788  }
9789 
9790  void update_cdata ()
9791  {
9792  update_fvc ();
9793  update_normals (false);
9794 
9795  if (cdatamapping_is ("scaled"))
9796  set_clim (m_cdata.get_limits ());
9797  else
9798  m_clim = m_cdata.get_limits ();
9799  }
9800 
9801  OCTINTERP_API void update_data ();
9802 
9803  OCTINTERP_API void calc_face_normals (Matrix& normals);
9804  OCTINTERP_API void update_face_normals (bool reset, bool force = false);
9805  OCTINTERP_API void update_vertex_normals (bool reset, bool force = false);
9806 
9807  void update_edgelighting ()
9808  {
9809  update_normals (false);
9810  }
9811 
9812  void update_facelighting ()
9813  {
9814  update_normals (false);
9815  }
9816 
9817  void update_facenormalsmode ()
9818  {
9819  update_face_normals (false);
9820  }
9821 
9822  void update_vertexnormalsmode ()
9823  {
9824  update_vertex_normals (false);
9825  }
9826 
9827  void update_visible ()
9828  {
9829  if (is_visible ())
9830  update_normals (false);
9831  }
9832  };
9833 
9834 private:
9835  properties m_properties;
9836  property_list m_default_properties;
9837 
9838 public:
9839  patch (const graphics_handle& mh, const graphics_handle& p)
9840  : base_graphics_object (), m_properties (mh, p)
9841  { }
9842 
9843  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (patch)
9844 
9845  ~patch () = default;
9846 
9847  base_properties& get_properties () { return m_properties; }
9848 
9849  const base_properties& get_properties () const { return m_properties; }
9850 
9851  bool valid_object () const { return true; }
9852 
9853  bool has_readonly_property (const caseless_str& pname) const
9854  {
9855  bool retval = m_properties.has_readonly_property (pname);
9856  if (! retval)
9857  retval = base_properties::has_readonly_property (pname);
9858  return retval;
9859  }
9860 
9861  OCTINTERP_API void reset_default_properties ();
9862 
9863 protected:
9864  OCTINTERP_API void initialize (const graphics_object& go);
9865 
9866 };
9867 
9868 // ---------------------------------------------------------------------
9869 
9870 class OCTINTERP_API scatter : public base_graphics_object
9871 {
9872 public:
9873 
9874  class OCTINTERP_API properties : public base_properties
9875  {
9876  public:
9877 
9878  OCTINTERP_API octave_value get_color_data () const;
9879 
9880  // Matlab allows incoherent data to be stored in scatter properties.
9881  // The scatter object should then be ignored by the renderer.
9882  bool has_bad_data (std::string& msg) const
9883  {
9884  msg = m_bad_data_msg;
9885  return ! msg.empty ();
9886  }
9887 
9888  bool is_aliminclude () const
9889  { return m_aliminclude.is_on (); }
9890  std::string get_aliminclude () const
9891  { return m_aliminclude.current_value (); }
9892 
9893  bool is_climinclude () const
9894  { return m_climinclude.is_on (); }
9895  std::string get_climinclude () const
9896  { return m_climinclude.current_value (); }
9897 
9898  // See the genprops.awk script for an explanation of the
9899  // properties declarations.
9900  // Programming note: Keep property list sorted if new ones are added.
9901 
9902 public:
9903  properties (const graphics_handle& mh, const graphics_handle& p);
9904 
9905  properties () = delete;
9906 
9907  OCTAVE_DISABLE_COPY_MOVE (properties)
9908 
9909  ~properties () = default;
9910 
9911  void set (const caseless_str& pname, const octave_value& val);
9912 
9913  octave_value get (bool all = false) const;
9914 
9915  octave_value get (const caseless_str& pname) const;
9916 
9917  octave_value get (const std::string& pname) const
9918  {
9919  return get (caseless_str (pname));
9920  }
9921 
9922  octave_value get (const char *pname) const
9923  {
9924  return get (caseless_str (pname));
9925  }
9926 
9927  property get_property (const caseless_str& pname);
9928 
9929  std::string graphics_object_name () const { return s_go_name; }
9930 
9931  static property_list::pval_map_type factory_defaults ();
9932 
9933 private:
9934  static std::string s_go_name;
9935 
9936 public:
9937 
9938 
9939  static std::set<std::string> core_property_names ();
9940 
9941  static std::set<std::string> readonly_property_names ();
9942 
9943  static bool has_core_property (const caseless_str& pname);
9944 
9945  static bool has_readonly_property (const caseless_str& pname);
9946 
9947  std::set<std::string> all_property_names () const;
9948 
9949  bool has_property (const caseless_str& pname) const;
9950 
9951 private:
9952 
9953  array_property m_annotation;
9954  array_property m_cdata;
9955  radio_property m_cdatamode;
9956  string_property m_cdatasource;
9957  array_property m_datatiptemplate;
9958  string_property m_displayname;
9959  array_property m_latitudedata;
9960  string_property m_latitudedatasource;
9961  double_property m_linewidth;
9962  array_property m_longitudedata;
9963  string_property m_longitudedatasource;
9964  radio_property m_marker;
9965  double_property m_markeredgealpha;
9966  color_property m_markeredgecolor;
9967  double_property m_markerfacealpha;
9968  color_property m_markerfacecolor;
9969  array_property m_rdata;
9970  string_property m_rdatasource;
9971  array_property m_seriesindex;
9972  array_property m_sizedata;
9973  string_property m_sizedatasource;
9974  array_property m_thetadata;
9975  string_property m_thetadatasource;
9976  array_property m_xdata;
9977  string_property m_xdatasource;
9978  array_property m_ydata;
9979  string_property m_ydatasource;
9980  array_property m_zdata;
9981  string_property m_zdatasource;
9982  row_vector_property m_alim;
9983  row_vector_property m_clim;
9984  row_vector_property m_xlim;
9985  row_vector_property m_ylim;
9986  row_vector_property m_zlim;
9987  bool_property m_aliminclude;
9988  bool_property m_climinclude;
9989  bool_property m_xliminclude;
9990  bool_property m_yliminclude;
9991  bool_property m_zliminclude;
9992 
9993 public:
9994 
9995  enum
9996  {
9997  ID_ANNOTATION = 9000,
9998  ID_CDATA = 9001,
9999  ID_CDATAMODE = 9002,
10000  ID_CDATASOURCE = 9003,
10001  ID_DATATIPTEMPLATE = 9004,
10002  ID_DISPLAYNAME = 9005,
10003  ID_LATITUDEDATA = 9006,
10004  ID_LATITUDEDATASOURCE = 9007,
10005  ID_LINEWIDTH = 9008,
10006  ID_LONGITUDEDATA = 9009,
10007  ID_LONGITUDEDATASOURCE = 9010,
10008  ID_MARKER = 9011,
10009  ID_MARKEREDGEALPHA = 9012,
10010  ID_MARKEREDGECOLOR = 9013,
10011  ID_MARKERFACEALPHA = 9014,
10012  ID_MARKERFACECOLOR = 9015,
10013  ID_RDATA = 9016,
10014  ID_RDATASOURCE = 9017,
10015  ID_SERIESINDEX = 9018,
10016  ID_SIZEDATA = 9019,
10017  ID_SIZEDATASOURCE = 9020,
10018  ID_THETADATA = 9021,
10019  ID_THETADATASOURCE = 9022,
10020  ID_XDATA = 9023,
10021  ID_XDATASOURCE = 9024,
10022  ID_YDATA = 9025,
10023  ID_YDATASOURCE = 9026,
10024  ID_ZDATA = 9027,
10025  ID_ZDATASOURCE = 9028,
10026  ID_ALIM = 9029,
10027  ID_CLIM = 9030,
10028  ID_XLIM = 9031,
10029  ID_YLIM = 9032,
10030  ID_ZLIM = 9033,
10031  ID_ALIMINCLUDE = 9034,
10032  ID_CLIMINCLUDE = 9035,
10033  ID_XLIMINCLUDE = 9036,
10034  ID_YLIMINCLUDE = 9037,
10035  ID_ZLIMINCLUDE = 9038
10036  };
10037 
10038  octave_value get_annotation () const { return m_annotation.get (); }
10039 
10040  octave_value get_cdata () const { return m_cdata.get (); }
10041 
10042  bool cdatamode_is (const std::string& v) const { return m_cdatamode.is (v); }
10043  std::string get_cdatamode () const { return m_cdatamode.current_value (); }
10044 
10045  std::string get_cdatasource () const { return m_cdatasource.string_value (); }
10046 
10047  octave_value get_datatiptemplate () const { return m_datatiptemplate.get (); }
10048 
10049  std::string get_displayname () const { return m_displayname.string_value (); }
10050 
10051  octave_value get_latitudedata () const { return m_latitudedata.get (); }
10052 
10053  std::string get_latitudedatasource () const { return m_latitudedatasource.string_value (); }
10054 
10055  double get_linewidth () const { return m_linewidth.double_value (); }
10056 
10057  octave_value get_longitudedata () const { return m_longitudedata.get (); }
10058 
10059  std::string get_longitudedatasource () const { return m_longitudedatasource.string_value (); }
10060 
10061  bool marker_is (const std::string& v) const { return m_marker.is (v); }
10062  std::string get_marker () const { return m_marker.current_value (); }
10063 
10064  double get_markeredgealpha () const { return m_markeredgealpha.double_value (); }
10065 
10066  bool markeredgecolor_is_rgb () const { return m_markeredgecolor.is_rgb (); }
10067  bool markeredgecolor_is (const std::string& v) const { return m_markeredgecolor.is (v); }
10068  Matrix get_markeredgecolor_rgb () const { return (m_markeredgecolor.is_rgb () ? m_markeredgecolor.rgb () : Matrix ()); }
10069  octave_value get_markeredgecolor () const { return m_markeredgecolor.get (); }
10070 
10071  double get_markerfacealpha () const { return m_markerfacealpha.double_value (); }
10072 
10073  bool markerfacecolor_is_rgb () const { return m_markerfacecolor.is_rgb (); }
10074  bool markerfacecolor_is (const std::string& v) const { return m_markerfacecolor.is (v); }
10075  Matrix get_markerfacecolor_rgb () const { return (m_markerfacecolor.is_rgb () ? m_markerfacecolor.rgb () : Matrix ()); }
10076  octave_value get_markerfacecolor () const { return m_markerfacecolor.get (); }
10077 
10078  octave_value get_rdata () const { return m_rdata.get (); }
10079 
10080  std::string get_rdatasource () const { return m_rdatasource.string_value (); }
10081 
10082  octave_value get_seriesindex () const { return m_seriesindex.get (); }
10083 
10084  octave_value get_sizedata () const { return m_sizedata.get (); }
10085 
10086  std::string get_sizedatasource () const { return m_sizedatasource.string_value (); }
10087 
10088  octave_value get_thetadata () const { return m_thetadata.get (); }
10089 
10090  std::string get_thetadatasource () const { return m_thetadatasource.string_value (); }
10091 
10092  octave_value get_xdata () const { return m_xdata.get (); }
10093 
10094  std::string get_xdatasource () const { return m_xdatasource.string_value (); }
10095 
10096  octave_value get_ydata () const { return m_ydata.get (); }
10097 
10098  std::string get_ydatasource () const { return m_ydatasource.string_value (); }
10099 
10100  octave_value get_zdata () const { return m_zdata.get (); }
10101 
10102  std::string get_zdatasource () const { return m_zdatasource.string_value (); }
10103 
10104  octave_value get_alim () const { return m_alim.get (); }
10105 
10106  octave_value get_clim () const { return m_clim.get (); }
10107 
10108  octave_value get_xlim () const { return m_xlim.get (); }
10109 
10110  octave_value get_ylim () const { return m_ylim.get (); }
10111 
10112  octave_value get_zlim () const { return m_zlim.get (); }
10113 
10114  bool is_xliminclude () const { return m_xliminclude.is_on (); }
10115  std::string get_xliminclude () const { return m_xliminclude.current_value (); }
10116 
10117  bool is_yliminclude () const { return m_yliminclude.is_on (); }
10118  std::string get_yliminclude () const { return m_yliminclude.current_value (); }
10119 
10120  bool is_zliminclude () const { return m_zliminclude.is_on (); }
10121  std::string get_zliminclude () const { return m_zliminclude.current_value (); }
10122 
10123 
10124  void set_annotation (const octave_value& val)
10125  {
10126  if (m_annotation.set (val, true))
10127  {
10128  mark_modified ();
10129  }
10130  }
10131 
10132  void set_cdata (const octave_value& val)
10133  {
10134  if (m_cdata.set (val, false))
10135  {
10136  set_cdatamode ("manual");
10137  update_cdata ();
10138  m_cdata.run_listeners (GCB_POSTSET);
10139  mark_modified ();
10140  }
10141  else
10142  set_cdatamode ("manual");
10143  }
10144 
10145  void set_cdatamode (const octave_value& val)
10146  {
10147  if (m_cdatamode.set (val, true))
10148  {
10149  update_cdatamode ();
10150  mark_modified ();
10151  }
10152  }
10153 
10154  void set_cdatasource (const octave_value& val)
10155  {
10156  if (m_cdatasource.set (val, true))
10157  {
10158  mark_modified ();
10159  }
10160  }
10161 
10163  {
10164  if (m_datatiptemplate.set (val, true))
10165  {
10166  mark_modified ();
10167  }
10168  }
10169 
10170  void set_displayname (const octave_value& val)
10171  {
10172  if (m_displayname.set (val, true))
10173  {
10174  mark_modified ();
10175  }
10176  }
10177 
10178  void set_latitudedata (const octave_value& val)
10179  {
10180  if (m_latitudedata.set (val, true))
10181  {
10182  mark_modified ();
10183  }
10184  }
10185 
10187  {
10188  if (m_latitudedatasource.set (val, true))
10189  {
10190  mark_modified ();
10191  }
10192  }
10193 
10194  void set_linewidth (const octave_value& val)
10195  {
10196  if (m_linewidth.set (val, true))
10197  {
10198  mark_modified ();
10199  }
10200  }
10201 
10203  {
10204  if (m_longitudedata.set (val, true))
10205  {
10206  mark_modified ();
10207  }
10208  }
10209 
10211  {
10212  if (m_longitudedatasource.set (val, true))
10213  {
10214  mark_modified ();
10215  }
10216  }
10217 
10218  void set_marker (const octave_value& val)
10219  {
10220  if (m_marker.set (val, true))
10221  {
10222  mark_modified ();
10223  }
10224  }
10225 
10227  {
10228  if (m_markeredgealpha.set (val, true))
10229  {
10230  mark_modified ();
10231  }
10232  }
10233 
10235  {
10236  if (m_markeredgecolor.set (val, true))
10237  {
10238  mark_modified ();
10239  }
10240  }
10241 
10243  {
10244  if (m_markerfacealpha.set (val, true))
10245  {
10246  mark_modified ();
10247  }
10248  }
10249 
10251  {
10252  if (m_markerfacecolor.set (val, true))
10253  {
10254  mark_modified ();
10255  }
10256  }
10257 
10258  void set_rdata (const octave_value& val)
10259  {
10260  if (m_rdata.set (val, true))
10261  {
10262  mark_modified ();
10263  }
10264  }
10265 
10266  void set_rdatasource (const octave_value& val)
10267  {
10268  if (m_rdatasource.set (val, true))
10269  {
10270  mark_modified ();
10271  }
10272  }
10273 
10274  void set_seriesindex (const octave_value& val)
10275  {
10276  if (m_seriesindex.set (val, true))
10277  {
10278  update_seriesindex ();
10279  mark_modified ();
10280  }
10281  }
10282 
10283  void set_sizedata (const octave_value& val)
10284  {
10285  if (m_sizedata.set (val, true))
10286  {
10287  update_sizedata ();
10288  mark_modified ();
10289  }
10290  }
10291 
10293  {
10294  if (m_sizedatasource.set (val, true))
10295  {
10296  mark_modified ();
10297  }
10298  }
10299 
10300  void set_thetadata (const octave_value& val)
10301  {
10302  if (m_thetadata.set (val, true))
10303  {
10304  mark_modified ();
10305  }
10306  }
10307 
10309  {
10310  if (m_thetadatasource.set (val, true))
10311  {
10312  mark_modified ();
10313  }
10314  }
10315 
10316  void set_xdata (const octave_value& val)
10317  {
10318  if (m_xdata.set (val, true))
10319  {
10320  update_xdata ();
10321  mark_modified ();
10322  }
10323  }
10324 
10325  void set_xdatasource (const octave_value& val)
10326  {
10327  if (m_xdatasource.set (val, true))
10328  {
10329  mark_modified ();
10330  }
10331  }
10332 
10333  void set_ydata (const octave_value& val)
10334  {
10335  if (m_ydata.set (val, true))
10336  {
10337  update_ydata ();
10338  mark_modified ();
10339  }
10340  }
10341 
10342  void set_ydatasource (const octave_value& val)
10343  {
10344  if (m_ydatasource.set (val, true))
10345  {
10346  mark_modified ();
10347  }
10348  }
10349 
10350  void set_zdata (const octave_value& val)
10351  {
10352  if (m_zdata.set (val, true))
10353  {
10354  update_zdata ();
10355  mark_modified ();
10356  }
10357  }
10358 
10359  void set_zdatasource (const octave_value& val)
10360  {
10361  if (m_zdatasource.set (val, true))
10362  {
10363  mark_modified ();
10364  }
10365  }
10366 
10367  void set_alim (const octave_value& val)
10368  {
10369  if (m_alim.set (val, false))
10370  {
10371  update_axis_limits ("alim");
10372  m_alim.run_listeners (GCB_POSTSET);
10373  mark_modified ();
10374  }
10375  }
10376 
10377  void set_clim (const octave_value& val)
10378  {
10379  if (m_clim.set (val, false))
10380  {
10381  update_axis_limits ("clim");
10382  m_clim.run_listeners (GCB_POSTSET);
10383  mark_modified ();
10384  }
10385  }
10386 
10387  void set_xlim (const octave_value& val)
10388  {
10389  if (m_xlim.set (val, false))
10390  {
10391  update_axis_limits ("xlim");
10392  m_xlim.run_listeners (GCB_POSTSET);
10393  mark_modified ();
10394  }
10395  }
10396 
10397  void set_ylim (const octave_value& val)
10398  {
10399  if (m_ylim.set (val, false))
10400  {
10401  update_axis_limits ("ylim");
10402  m_ylim.run_listeners (GCB_POSTSET);
10403  mark_modified ();
10404  }
10405  }
10406 
10407  void set_zlim (const octave_value& val)
10408  {
10409  if (m_zlim.set (val, false))
10410  {
10411  update_axis_limits ("zlim");
10412  m_zlim.run_listeners (GCB_POSTSET);
10413  mark_modified ();
10414  }
10415  }
10416 
10417  void set_aliminclude (const octave_value& val)
10418  {
10419  if (m_aliminclude.set (val, false))
10420  {
10421  update_axis_limits ("aliminclude");
10422  m_aliminclude.run_listeners (GCB_POSTSET);
10423  mark_modified ();
10424  }
10425  }
10426 
10427  void set_climinclude (const octave_value& val)
10428  {
10429  if (m_climinclude.set (val, false))
10430  {
10431  update_axis_limits ("climinclude");
10432  m_climinclude.run_listeners (GCB_POSTSET);
10433  mark_modified ();
10434  }
10435  }
10436 
10437  void set_xliminclude (const octave_value& val)
10438  {
10439  if (m_xliminclude.set (val, false))
10440  {
10441  update_axis_limits ("xliminclude");
10442  m_xliminclude.run_listeners (GCB_POSTSET);
10443  mark_modified ();
10444  }
10445  }
10446 
10447  void set_yliminclude (const octave_value& val)
10448  {
10449  if (m_yliminclude.set (val, false))
10450  {
10451  update_axis_limits ("yliminclude");
10452  m_yliminclude.run_listeners (GCB_POSTSET);
10453  mark_modified ();
10454  }
10455  }
10456 
10457  void set_zliminclude (const octave_value& val)
10458  {
10459  if (m_zliminclude.set (val, false))
10460  {
10461  update_axis_limits ("zliminclude");
10462  m_zliminclude.run_listeners (GCB_POSTSET);
10463  mark_modified ();
10464  }
10465  }
10466 
10467 
10468  protected:
10469  void init ()
10470  {
10471  m_xdata.add_constraint (dim_vector (-1, 1));
10472  m_xdata.add_constraint (dim_vector (1, -1));
10473  m_xdata.add_constraint (dim_vector (-1, 0));
10474  m_xdata.add_constraint (dim_vector (0, -1));
10475  m_ydata.add_constraint (dim_vector (-1, 1));
10476  m_ydata.add_constraint (dim_vector (1, -1));
10477  m_ydata.add_constraint (dim_vector (-1, 0));
10478  m_ydata.add_constraint (dim_vector (0, -1));
10479  m_zdata.add_constraint (dim_vector (-1, 1));
10480  m_zdata.add_constraint (dim_vector (1, -1));
10481  m_zdata.add_constraint (dim_vector (-1, 0));
10482  m_zdata.add_constraint (dim_vector (0, -1));
10483  m_sizedata.add_constraint ("min", 0.0, false);
10484  m_sizedata.add_constraint (dim_vector (-1, 1));
10485  m_sizedata.add_constraint (dim_vector (1, -1));
10486  m_sizedata.add_constraint (dim_vector (-1, 0));
10487  m_sizedata.add_constraint (dim_vector (0, -1));
10488  m_cdata.add_constraint ("double");
10489  m_cdata.add_constraint ("single");
10490  m_cdata.add_constraint ("logical");
10491  m_cdata.add_constraint ("int8");
10492  m_cdata.add_constraint ("int16");
10493  m_cdata.add_constraint ("int32");
10494  m_cdata.add_constraint ("int64");
10495  m_cdata.add_constraint ("uint8");
10496  m_cdata.add_constraint ("uint16");
10497  m_cdata.add_constraint ("uint32");
10498  m_cdata.add_constraint ("uint64");
10499  m_cdata.add_constraint ("real");
10500  m_cdata.add_constraint (dim_vector (-1, 1));
10501  m_cdata.add_constraint (dim_vector (-1, 3));
10502  m_cdata.add_constraint (dim_vector (-1, 0));
10503  m_cdata.add_constraint (dim_vector (0, -1));
10504 
10505  m_linewidth.add_constraint ("min", 0.0, false);
10506  m_seriesindex.add_constraint (dim_vector (1, 1));
10507  m_seriesindex.add_constraint (dim_vector (-1, 0));
10508  m_seriesindex.add_constraint (dim_vector (0, -1));
10509  }
10510 
10511  public:
10512  OCTINTERP_API void update_color ();
10513 
10514  private:
10515  std::string m_bad_data_msg;
10516 
10517  void update_xdata ()
10518  {
10519  if (get_xdata ().isempty ())
10520  {
10521  // For compatibility with Matlab behavior,
10522  // if x/ydata are set empty, silently empty other *data properties.
10523  set_ydata (Matrix ());
10524  set_zdata (Matrix ());
10525  bool cdatamode_auto = m_cdatamode.is ("auto");
10526  set_cdata (Matrix ());
10527  if (cdatamode_auto)
10528  set_cdatamode ("auto");
10529  }
10530 
10531  set_xlim (m_xdata.get_limits ());
10532 
10533  update_data ();
10534  }
10535 
10536  void update_ydata ()
10537  {
10538  if (get_ydata ().isempty ())
10539  {
10540  set_xdata (Matrix ());
10541  set_zdata (Matrix ());
10542  bool cdatamode_auto = m_cdatamode.is ("auto");
10543  set_cdata (Matrix ());
10544  if (cdatamode_auto)
10545  set_cdatamode ("auto");
10546  }
10547 
10548  set_ylim (m_ydata.get_limits ());
10549 
10550  update_data ();
10551  }
10552 
10553  void update_zdata ()
10554  {
10555  set_zlim (m_zdata.get_limits ());
10556 
10557  update_data ();
10558  }
10559 
10560  void update_sizedata ()
10561  {
10562  update_data ();
10563  }
10564 
10565  void update_cdata ()
10566  {
10567  if (get_cdata ().matrix_value ().rows () == 1)
10568  set_clim (m_cdata.get_limits ());
10569  else
10570  m_clim = m_cdata.get_limits ();
10571 
10572  update_data ();
10573  }
10574 
10575  void update_cdatamode ()
10576  {
10577  if (m_cdatamode.is ("auto"))
10578  update_color ();
10579  }
10580 
10581  void update_seriesindex ()
10582  {
10583  if (m_cdatamode.is ("auto"))
10584  update_color ();
10585  }
10586 
10587  void update_data ();
10588 
10589  };
10590 
10591 private:
10592  properties m_properties;
10593  property_list m_default_properties;
10594 
10595 public:
10597  : base_graphics_object (), m_properties (mh, p)
10598  {
10599  // FIXME: seriesindex should increment by one each time a new scatter
10600  // object is added to the axes.
10601  }
10602 
10603  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (scatter)
10604 
10605  ~scatter () = default;
10606 
10607  base_properties& get_properties () { return m_properties; }
10608 
10609  const base_properties& get_properties () const { return m_properties; }
10610 
10611  bool valid_object () const { return true; }
10612 
10613  bool has_readonly_property (const caseless_str& pname) const
10614  {
10615  bool retval = m_properties.has_readonly_property (pname);
10616  if (! retval)
10617  retval = base_properties::has_readonly_property (pname);
10618  return retval;
10619  }
10620 
10621 protected:
10622  OCTINTERP_API void initialize (const graphics_object& go);
10623 
10624 };
10625 
10626 // ---------------------------------------------------------------------
10627 
10628 class OCTINTERP_API surface : public base_graphics_object
10629 {
10630 public:
10631 
10632  class OCTINTERP_API properties : public base_properties
10633  {
10634  public:
10635 
10636  octave_value get_color_data () const;
10637 
10638  bool is_aliminclude () const
10639  { return (m_aliminclude.is_on () && m_alphadatamapping.is ("scaled")); }
10640  std::string get_aliminclude () const
10641  { return m_aliminclude.current_value (); }
10642 
10643  bool is_climinclude () const
10644  { return (m_climinclude.is_on () && m_cdatamapping.is ("scaled")); }
10645  std::string get_climinclude () const
10646  { return m_climinclude.current_value (); }
10647 
10648  OCTINTERP_API bool get_do_lighting () const;
10649 
10650  // See the genprops.awk script for an explanation of the
10651  // properties declarations.
10652  // Programming note: Keep property list sorted if new ones are added.
10653 
10654 public:
10655  properties (const graphics_handle& mh, const graphics_handle& p);
10656 
10657  properties () = delete;
10658 
10659  OCTAVE_DISABLE_COPY_MOVE (properties)
10660 
10661  ~properties () = default;
10662 
10663  void set (const caseless_str& pname, const octave_value& val);
10664 
10665  octave_value get (bool all = false) const;
10666 
10667  octave_value get (const caseless_str& pname) const;
10668 
10669  octave_value get (const std::string& pname) const
10670  {
10671  return get (caseless_str (pname));
10672  }
10673 
10674  octave_value get (const char *pname) const
10675  {
10676  return get (caseless_str (pname));
10677  }
10678 
10679  property get_property (const caseless_str& pname);
10680 
10681  std::string graphics_object_name () const { return s_go_name; }
10682 
10683  static property_list::pval_map_type factory_defaults ();
10684 
10685 private:
10686  static std::string s_go_name;
10687 
10688 public:
10689 
10690 
10691  static std::set<std::string> core_property_names ();
10692 
10693  static std::set<std::string> readonly_property_names ();
10694 
10695  static bool has_core_property (const caseless_str& pname);
10696 
10697  static bool has_readonly_property (const caseless_str& pname);
10698 
10699  std::set<std::string> all_property_names () const;
10700 
10701  bool has_property (const caseless_str& pname) const;
10702 
10703 private:
10704 
10705  array_property m_alphadata;
10706  radio_property m_alphadatamapping;
10707  double_property m_ambientstrength;
10708  radio_property m_backfacelighting;
10709  array_property m_cdata;
10710  radio_property m_cdatamapping;
10711  string_property m_cdatasource;
10712  double_property m_diffusestrength;
10713  string_property m_displayname;
10714  double_radio_property m_edgealpha;
10715  color_property m_edgecolor;
10716  radio_property m_edgelighting;
10717  double_radio_property m_facealpha;
10718  color_property m_facecolor;
10719  radio_property m_facelighting;
10720  array_property m_facenormals;
10721  radio_property m_facenormalsmode;
10722  radio_property m_linestyle;
10723  double_property m_linewidth;
10724  radio_property m_marker;
10725  color_property m_markeredgecolor;
10726  color_property m_markerfacecolor;
10727  double_property m_markersize;
10728  radio_property m_meshstyle;
10729  double_property m_specularcolorreflectance;
10730  double_property m_specularexponent;
10731  double_property m_specularstrength;
10732  array_property m_vertexnormals;
10733  radio_property m_vertexnormalsmode;
10734  array_property m_xdata;
10735  string_property m_xdatasource;
10736  array_property m_ydata;
10737  string_property m_ydatasource;
10738  array_property m_zdata;
10739  string_property m_zdatasource;
10740  row_vector_property m_alim;
10741  row_vector_property m_clim;
10742  row_vector_property m_xlim;
10743  row_vector_property m_ylim;
10744  row_vector_property m_zlim;
10745  bool_property m_aliminclude;
10746  bool_property m_climinclude;
10747  bool_property m_xliminclude;
10748  bool_property m_yliminclude;
10749  bool_property m_zliminclude;
10750 
10751 public:
10752 
10753  enum
10754  {
10755  ID_ALPHADATA = 10000,
10756  ID_ALPHADATAMAPPING = 10001,
10757  ID_AMBIENTSTRENGTH = 10002,
10758  ID_BACKFACELIGHTING = 10003,
10759  ID_CDATA = 10004,
10760  ID_CDATAMAPPING = 10005,
10761  ID_CDATASOURCE = 10006,
10762  ID_DIFFUSESTRENGTH = 10007,
10763  ID_DISPLAYNAME = 10008,
10764  ID_EDGEALPHA = 10009,
10765  ID_EDGECOLOR = 10010,
10766  ID_EDGELIGHTING = 10011,
10767  ID_FACEALPHA = 10012,
10768  ID_FACECOLOR = 10013,
10769  ID_FACELIGHTING = 10014,
10770  ID_FACENORMALS = 10015,
10771  ID_FACENORMALSMODE = 10016,
10772  ID_LINESTYLE = 10017,
10773  ID_LINEWIDTH = 10018,
10774  ID_MARKER = 10019,
10775  ID_MARKEREDGECOLOR = 10020,
10776  ID_MARKERFACECOLOR = 10021,
10777  ID_MARKERSIZE = 10022,
10778  ID_MESHSTYLE = 10023,
10779  ID_SPECULARCOLORREFLECTANCE = 10024,
10780  ID_SPECULAREXPONENT = 10025,
10781  ID_SPECULARSTRENGTH = 10026,
10782  ID_VERTEXNORMALS = 10027,
10783  ID_VERTEXNORMALSMODE = 10028,
10784  ID_XDATA = 10029,
10785  ID_XDATASOURCE = 10030,
10786  ID_YDATA = 10031,
10787  ID_YDATASOURCE = 10032,
10788  ID_ZDATA = 10033,
10789  ID_ZDATASOURCE = 10034,
10790  ID_ALIM = 10035,
10791  ID_CLIM = 10036,
10792  ID_XLIM = 10037,
10793  ID_YLIM = 10038,
10794  ID_ZLIM = 10039,
10795  ID_ALIMINCLUDE = 10040,
10796  ID_CLIMINCLUDE = 10041,
10797  ID_XLIMINCLUDE = 10042,
10798  ID_YLIMINCLUDE = 10043,
10799  ID_ZLIMINCLUDE = 10044
10800  };
10801 
10802  octave_value get_alphadata () const { return m_alphadata.get (); }
10803 
10804  bool alphadatamapping_is (const std::string& v) const { return m_alphadatamapping.is (v); }
10805  std::string get_alphadatamapping () const { return m_alphadatamapping.current_value (); }
10806 
10807  double get_ambientstrength () const { return m_ambientstrength.double_value (); }
10808 
10809  bool backfacelighting_is (const std::string& v) const { return m_backfacelighting.is (v); }
10810  std::string get_backfacelighting () const { return m_backfacelighting.current_value (); }
10811 
10812  octave_value get_cdata () const { return m_cdata.get (); }
10813 
10814  bool cdatamapping_is (const std::string& v) const { return m_cdatamapping.is (v); }
10815  std::string get_cdatamapping () const { return m_cdatamapping.current_value (); }
10816 
10817  std::string get_cdatasource () const { return m_cdatasource.string_value (); }
10818 
10819  double get_diffusestrength () const { return m_diffusestrength.double_value (); }
10820 
10821  std::string get_displayname () const { return m_displayname.string_value (); }
10822 
10823  bool edgealpha_is_double () const { return m_edgealpha.is_double (); }
10824  bool edgealpha_is (const std::string& v) const { return m_edgealpha.is (v); }
10825  double get_edgealpha_double () const { return (m_edgealpha.is_double () ? m_edgealpha.double_value () : 0); }
10826  octave_value get_edgealpha () const { return m_edgealpha.get (); }
10827 
10828  bool edgecolor_is_rgb () const { return m_edgecolor.is_rgb (); }
10829  bool edgecolor_is (const std::string& v) const { return m_edgecolor.is (v); }
10830  Matrix get_edgecolor_rgb () const { return (m_edgecolor.is_rgb () ? m_edgecolor.rgb () : Matrix ()); }
10831  octave_value get_edgecolor () const { return m_edgecolor.get (); }
10832 
10833  bool edgelighting_is (const std::string& v) const { return m_edgelighting.is (v); }
10834  std::string get_edgelighting () const { return m_edgelighting.current_value (); }
10835 
10836  bool facealpha_is_double () const { return m_facealpha.is_double (); }
10837  bool facealpha_is (const std::string& v) const { return m_facealpha.is (v); }
10838  double get_facealpha_double () const { return (m_facealpha.is_double () ? m_facealpha.double_value () : 0); }
10839  octave_value get_facealpha () const { return m_facealpha.get (); }
10840 
10841  bool facecolor_is_rgb () const { return m_facecolor.is_rgb (); }
10842  bool facecolor_is (const std::string& v) const { return m_facecolor.is (v); }
10843  Matrix get_facecolor_rgb () const { return (m_facecolor.is_rgb () ? m_facecolor.rgb () : Matrix ()); }
10844  octave_value get_facecolor () const { return m_facecolor.get (); }
10845 
10846  bool facelighting_is (const std::string& v) const { return m_facelighting.is (v); }
10847  std::string get_facelighting () const { return m_facelighting.current_value (); }
10848 
10849  octave_value get_facenormals () const { return m_facenormals.get (); }
10850 
10851  bool facenormalsmode_is (const std::string& v) const { return m_facenormalsmode.is (v); }
10852  std::string get_facenormalsmode () const { return m_facenormalsmode.current_value (); }
10853 
10854  bool linestyle_is (const std::string& v) const { return m_linestyle.is (v); }
10855  std::string get_linestyle () const { return m_linestyle.current_value (); }
10856 
10857  double get_linewidth () const { return m_linewidth.double_value (); }
10858 
10859  bool marker_is (const std::string& v) const { return m_marker.is (v); }
10860  std::string get_marker () const { return m_marker.current_value (); }
10861 
10862  bool markeredgecolor_is_rgb () const { return m_markeredgecolor.is_rgb (); }
10863  bool markeredgecolor_is (const std::string& v) const { return m_markeredgecolor.is (v); }
10864  Matrix get_markeredgecolor_rgb () const { return (m_markeredgecolor.is_rgb () ? m_markeredgecolor.rgb () : Matrix ()); }
10865  octave_value get_markeredgecolor () const { return m_markeredgecolor.get (); }
10866 
10867  bool markerfacecolor_is_rgb () const { return m_markerfacecolor.is_rgb (); }
10868  bool markerfacecolor_is (const std::string& v) const { return m_markerfacecolor.is (v); }
10869  Matrix get_markerfacecolor_rgb () const { return (m_markerfacecolor.is_rgb () ? m_markerfacecolor.rgb () : Matrix ()); }
10870  octave_value get_markerfacecolor () const { return m_markerfacecolor.get (); }
10871 
10872  double get_markersize () const { return m_markersize.double_value (); }
10873 
10874  bool meshstyle_is (const std::string& v) const { return m_meshstyle.is (v); }
10875  std::string get_meshstyle () const { return m_meshstyle.current_value (); }
10876 
10877  double get_specularcolorreflectance () const { return m_specularcolorreflectance.double_value (); }
10878 
10879  double get_specularexponent () const { return m_specularexponent.double_value (); }
10880 
10881  double get_specularstrength () const { return m_specularstrength.double_value (); }
10882 
10883  octave_value get_vertexnormals () const { return m_vertexnormals.get (); }
10884 
10885  bool vertexnormalsmode_is (const std::string& v) const { return m_vertexnormalsmode.is (v); }
10886  std::string get_vertexnormalsmode () const { return m_vertexnormalsmode.current_value (); }
10887 
10888  octave_value get_xdata () const { return m_xdata.get (); }
10889 
10890  std::string get_xdatasource () const { return m_xdatasource.string_value (); }
10891 
10892  octave_value get_ydata () const { return m_ydata.get (); }
10893 
10894  std::string get_ydatasource () const { return m_ydatasource.string_value (); }
10895 
10896  octave_value get_zdata () const { return m_zdata.get (); }
10897 
10898  std::string get_zdatasource () const { return m_zdatasource.string_value (); }
10899 
10900  octave_value get_alim () const { return m_alim.get (); }
10901 
10902  octave_value get_clim () const { return m_clim.get (); }
10903 
10904  octave_value get_xlim () const { return m_xlim.get (); }
10905 
10906  octave_value get_ylim () const { return m_ylim.get (); }
10907 
10908  octave_value get_zlim () const { return m_zlim.get (); }
10909 
10910  bool is_xliminclude () const { return m_xliminclude.is_on (); }
10911  std::string get_xliminclude () const { return m_xliminclude.current_value (); }
10912 
10913  bool is_yliminclude () const { return m_yliminclude.is_on (); }
10914  std::string get_yliminclude () const { return m_yliminclude.current_value (); }
10915 
10916  bool is_zliminclude () const { return m_zliminclude.is_on (); }
10917  std::string get_zliminclude () const { return m_zliminclude.current_value (); }
10918 
10919 
10920  void set_alphadata (const octave_value& val)
10921  {
10922  if (m_alphadata.set (val, true))
10923  {
10924  update_alphadata ();
10925  mark_modified ();
10926  }
10927  }
10928 
10930  {
10931  if (m_alphadatamapping.set (val, false))
10932  {
10933  update_axis_limits ("alphadatamapping");
10934  m_alphadatamapping.run_listeners (GCB_POSTSET);
10935  mark_modified ();
10936  }
10937  }
10938 
10940  {
10941  if (m_ambientstrength.set (val, true))
10942  {
10943  mark_modified ();
10944  }
10945  }
10946 
10948  {
10949  if (m_backfacelighting.set (val, true))
10950  {
10951  mark_modified ();
10952  }
10953  }
10954 
10955  void set_cdata (const octave_value& val)
10956  {
10957  if (m_cdata.set (val, true))
10958  {
10959  update_cdata ();
10960  mark_modified ();
10961  }
10962  }
10963 
10964  void set_cdatamapping (const octave_value& val)
10965  {
10966  if (m_cdatamapping.set (val, false))
10967  {
10968  update_axis_limits ("cdatamapping");
10969  m_cdatamapping.run_listeners (GCB_POSTSET);
10970  mark_modified ();
10971  }
10972  }
10973 
10974  void set_cdatasource (const octave_value& val)
10975  {
10976  if (m_cdatasource.set (val, true))
10977  {
10978  mark_modified ();
10979  }
10980  }
10981 
10983  {
10984  if (m_diffusestrength.set (val, true))
10985  {
10986  mark_modified ();
10987  }
10988  }
10989 
10990  void set_displayname (const octave_value& val)
10991  {
10992  if (m_displayname.set (val, true))
10993  {
10994  mark_modified ();
10995  }
10996  }
10997 
10998  void set_edgealpha (const octave_value& val)
10999  {
11000  if (m_edgealpha.set (val, true))
11001  {
11002  mark_modified ();
11003  }
11004  }
11005 
11006  void set_edgecolor (const octave_value& val)
11007  {
11008  if (m_edgecolor.set (val, true))
11009  {
11010  mark_modified ();
11011  }
11012  }
11013 
11014  void set_edgelighting (const octave_value& val)
11015  {
11016  if (m_edgelighting.set (val, true))
11017  {
11018  update_edgelighting ();
11019  mark_modified ();
11020  }
11021  }
11022 
11023  void set_facealpha (const octave_value& val)
11024  {
11025  if (m_facealpha.set (val, true))
11026  {
11027  mark_modified ();
11028  }
11029  }
11030 
11031  void set_facecolor (const octave_value& val)
11032  {
11033  if (m_facecolor.set (val, true))
11034  {
11035  mark_modified ();
11036  }
11037  }
11038 
11039  void set_facelighting (const octave_value& val)
11040  {
11041  if (m_facelighting.set (val, true))
11042  {
11043  update_facelighting ();
11044  mark_modified ();
11045  }
11046  }
11047 
11048  void set_facenormals (const octave_value& val)
11049  {
11050  if (m_facenormals.set (val, false))
11051  {
11052  set_facenormalsmode ("manual");
11053  m_facenormals.run_listeners (GCB_POSTSET);
11054  mark_modified ();
11055  }
11056  else
11057  set_facenormalsmode ("manual");
11058  }
11059 
11061  {
11062  if (m_facenormalsmode.set (val, true))
11063  {
11064  update_facenormalsmode ();
11065  mark_modified ();
11066  }
11067  }
11068 
11069  void set_linestyle (const octave_value& val)
11070  {
11071  if (m_linestyle.set (val, true))
11072  {
11073  mark_modified ();
11074  }
11075  }
11076 
11077  void set_linewidth (const octave_value& val)
11078  {
11079  if (m_linewidth.set (val, true))
11080  {
11081  mark_modified ();
11082  }
11083  }
11084 
11085  void set_marker (const octave_value& val)
11086  {
11087  if (m_marker.set (val, true))
11088  {
11089  mark_modified ();
11090  }
11091  }
11092 
11094  {
11095  if (m_markeredgecolor.set (val, true))
11096  {
11097  mark_modified ();
11098  }
11099  }
11100 
11102  {
11103  if (m_markerfacecolor.set (val, true))
11104  {
11105  mark_modified ();
11106  }
11107  }
11108 
11109  void set_markersize (const octave_value& val)
11110  {
11111  if (m_markersize.set (val, true))
11112  {
11113  mark_modified ();
11114  }
11115  }
11116 
11117  void set_meshstyle (const octave_value& val)
11118  {
11119  if (m_meshstyle.set (val, true))
11120  {
11121  mark_modified ();
11122  }
11123  }
11124 
11126  {
11127  if (m_specularcolorreflectance.set (val, true))
11128  {
11129  mark_modified ();
11130  }
11131  }
11132 
11134  {
11135  if (m_specularexponent.set (val, true))
11136  {
11137  mark_modified ();
11138  }
11139  }
11140 
11142  {
11143  if (m_specularstrength.set (val, true))
11144  {
11145  mark_modified ();
11146  }
11147  }
11148 
11150  {
11151  if (m_vertexnormals.set (val, false))
11152  {
11153  set_vertexnormalsmode ("manual");
11154  m_vertexnormals.run_listeners (GCB_POSTSET);
11155  mark_modified ();
11156  }
11157  else
11158  set_vertexnormalsmode ("manual");
11159  }
11160 
11162  {
11163  if (m_vertexnormalsmode.set (val, true))
11164  {
11165  update_vertexnormalsmode ();
11166  mark_modified ();
11167  }
11168  }
11169 
11170  void set_xdata (const octave_value& val)
11171  {
11172  if (m_xdata.set (val, true))
11173  {
11174  update_xdata ();
11175  mark_modified ();
11176  }
11177  }
11178 
11179  void set_xdatasource (const octave_value& val)
11180  {
11181  if (m_xdatasource.set (val, true))
11182  {
11183  mark_modified ();
11184  }
11185  }
11186 
11187  void set_ydata (const octave_value& val)
11188  {
11189  if (m_ydata.set (val, true))
11190  {
11191  update_ydata ();
11192  mark_modified ();
11193  }
11194  }
11195 
11196  void set_ydatasource (const octave_value& val)
11197  {
11198  if (m_ydatasource.set (val, true))
11199  {
11200  mark_modified ();
11201  }
11202  }
11203 
11204  void set_zdata (const octave_value& val)
11205  {
11206  if (m_zdata.set (val, true))
11207  {
11208  update_zdata ();
11209  mark_modified ();
11210  }
11211  }
11212 
11213  void set_zdatasource (const octave_value& val)
11214  {
11215  if (m_zdatasource.set (val, true))
11216  {
11217  mark_modified ();
11218  }
11219  }
11220 
11221  void set_alim (const octave_value& val)
11222  {
11223  if (m_alim.set (val, false))
11224  {
11225  update_axis_limits ("alim");
11226  m_alim.run_listeners (GCB_POSTSET);
11227  mark_modified ();
11228  }
11229  }
11230 
11231  void set_clim (const octave_value& val)
11232  {
11233  if (m_clim.set (val, false))
11234  {
11235  update_axis_limits ("clim");
11236  m_clim.run_listeners (GCB_POSTSET);
11237  mark_modified ();
11238  }
11239  }
11240 
11241  void set_xlim (const octave_value& val)
11242  {
11243  if (m_xlim.set (val, false))
11244  {
11245  update_axis_limits ("xlim");
11246  m_xlim.run_listeners (GCB_POSTSET);
11247  mark_modified ();
11248  }
11249  }
11250 
11251  void set_ylim (const octave_value& val)
11252  {
11253  if (m_ylim.set (val, false))
11254  {
11255  update_axis_limits ("ylim");
11256  m_ylim.run_listeners (GCB_POSTSET);
11257  mark_modified ();
11258  }
11259  }
11260 
11261  void set_zlim (const octave_value& val)
11262  {
11263  if (m_zlim.set (val, false))
11264  {
11265  update_axis_limits ("zlim");
11266  m_zlim.run_listeners (GCB_POSTSET);
11267  mark_modified ();
11268  }
11269  }
11270 
11271  void set_aliminclude (const octave_value& val)
11272  {
11273  if (m_aliminclude.set (val, false))
11274  {
11275  update_axis_limits ("aliminclude");
11276  m_aliminclude.run_listeners (GCB_POSTSET);
11277  mark_modified ();
11278  }
11279  }
11280 
11281  void set_climinclude (const octave_value& val)
11282  {
11283  if (m_climinclude.set (val, false))
11284  {
11285  update_axis_limits ("climinclude");
11286  m_climinclude.run_listeners (GCB_POSTSET);
11287  mark_modified ();
11288  }
11289  }
11290 
11291  void set_xliminclude (const octave_value& val)
11292  {
11293  if (m_xliminclude.set (val, false))
11294  {
11295  update_axis_limits ("xliminclude");
11296  m_xliminclude.run_listeners (GCB_POSTSET);
11297  mark_modified ();
11298  }
11299  }
11300 
11301  void set_yliminclude (const octave_value& val)
11302  {
11303  if (m_yliminclude.set (val, false))
11304  {
11305  update_axis_limits ("yliminclude");
11306  m_yliminclude.run_listeners (GCB_POSTSET);
11307  mark_modified ();
11308  }
11309  }
11310 
11311  void set_zliminclude (const octave_value& val)
11312  {
11313  if (m_zliminclude.set (val, false))
11314  {
11315  update_axis_limits ("zliminclude");
11316  m_zliminclude.run_listeners (GCB_POSTSET);
11317  mark_modified ();
11318  }
11319  }
11320 
11321 
11322  protected:
11323  void init ()
11324  {
11325  m_xdata.add_constraint (dim_vector (-1, -1));
11326  m_ydata.add_constraint (dim_vector (-1, -1));
11327  m_zdata.add_constraint (dim_vector (-1, -1));
11328  m_cdata.add_constraint ("double");
11329  m_cdata.add_constraint ("single");
11330  m_cdata.add_constraint ("logical");
11331  m_cdata.add_constraint ("int8");
11332  m_cdata.add_constraint ("int16");
11333  m_cdata.add_constraint ("int32");
11334  m_cdata.add_constraint ("int64");
11335  m_cdata.add_constraint ("uint8");
11336  m_cdata.add_constraint ("uint16");
11337  m_cdata.add_constraint ("uint32");
11338  m_cdata.add_constraint ("uint64");
11339  m_cdata.add_constraint ("real");
11340  m_cdata.add_constraint (dim_vector (-1, -1));
11341  m_cdata.add_constraint (dim_vector (-1, -1, 3));
11342  m_alphadata.add_constraint ("double");
11343  m_alphadata.add_constraint ("uint8");
11344  m_alphadata.add_constraint (dim_vector (-1, -1));
11345  m_facenormals.add_constraint (dim_vector (-1, -1, 3));
11346  m_facenormals.add_constraint (dim_vector (0, 0));
11347  m_vertexnormals.add_constraint (dim_vector (-1, -1, 3));
11348  m_vertexnormals.add_constraint (dim_vector (0, 0));
11349 
11350  m_ambientstrength.add_constraint ("min", 0.0, true);
11351  m_ambientstrength.add_constraint ("max", 1.0, true);
11352  m_diffusestrength.add_constraint ("min", 0.0, true);
11353  m_diffusestrength.add_constraint ("max", 1.0, true);
11354  m_linewidth.add_constraint ("min", 0.0, false);
11355  m_markersize.add_constraint ("min", 0.0, false);
11356  m_specularcolorreflectance.add_constraint ("min", 0.0, true);
11357  m_specularcolorreflectance.add_constraint ("max", 1.0, true);
11358  m_specularexponent.add_constraint ("min", 0.0, false);
11359  m_specularstrength.add_constraint ("min", 0.0, true);
11360  m_specularstrength.add_constraint ("max", 1.0, true);
11361  }
11362 
11363  public:
11364  void update_normals (bool reset, bool force = false)
11365  {
11366  update_face_normals (reset, force);
11367  update_vertex_normals (reset, force);
11368  }
11369 
11370 
11371  private:
11372  void update_alphadata ()
11373  {
11374  if (alphadatamapping_is ("scaled"))
11375  set_alim (m_alphadata.get_limits ());
11376  else
11377  m_alim = m_alphadata.get_limits ();
11378  }
11379 
11380  void update_cdata ()
11381  {
11382  if (cdatamapping_is ("scaled"))
11383  set_clim (m_cdata.get_limits ());
11384  else
11385  m_clim = m_cdata.get_limits ();
11386  }
11387 
11388  void update_xdata ()
11389  {
11390  update_normals (true);
11391  set_xlim (m_xdata.get_limits ());
11392  }
11393 
11394  void update_ydata ()
11395  {
11396  update_normals (true);
11397  set_ylim (m_ydata.get_limits ());
11398  }
11399 
11400  void update_zdata ()
11401  {
11402  update_normals (true);
11403  set_zlim (m_zdata.get_limits ());
11404  }
11405 
11406  OCTINTERP_API void update_face_normals (bool reset, bool force = false);
11407  OCTINTERP_API void update_vertex_normals (bool reset, bool force = false);
11408 
11409  void update_facenormalsmode ()
11410  { update_face_normals (false); }
11411 
11412  void update_vertexnormalsmode ()
11413  { update_vertex_normals (false); }
11414 
11415  void update_edgelighting ()
11416  { update_normals (false); }
11417 
11418  void update_facelighting ()
11419  { update_normals (false); }
11420 
11421  void update_visible ()
11422  {
11423  if (is_visible ())
11424  update_normals (false);
11425  }
11426 
11427  };
11428 
11429 private:
11430  properties m_properties;
11431 
11432 public:
11434  : base_graphics_object (), m_properties (mh, p)
11435  { }
11436 
11437  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (surface)
11438 
11439  ~surface () = default;
11440 
11441  base_properties& get_properties () { return m_properties; }
11442 
11443  const base_properties& get_properties () const { return m_properties; }
11444 
11445  bool valid_object () const { return true; }
11446 
11447  bool has_readonly_property (const caseless_str& pname) const
11448  {
11449  bool retval = m_properties.has_readonly_property (pname);
11450  if (! retval)
11451  retval = base_properties::has_readonly_property (pname);
11452  return retval;
11453  }
11454 };
11455 
11456 // ---------------------------------------------------------------------
11457 
11458 class OCTINTERP_API hggroup : public base_graphics_object
11459 {
11460 public:
11461 
11462  class OCTINTERP_API properties : public base_properties
11463  {
11464  public:
11465 
11466  OCTINTERP_API void
11467  remove_child (const graphics_handle& h, bool from_root = false);
11468 
11469  OCTINTERP_API void adopt (const graphics_handle& h);
11470 
11471  // See the genprops.awk script for an explanation of the
11472  // properties declarations.
11473  // Programming note: Keep property list sorted if new ones are added.
11474 
11475 public:
11476  properties (const graphics_handle& mh, const graphics_handle& p);
11477 
11478  properties () = delete;
11479 
11480  OCTAVE_DISABLE_COPY_MOVE (properties)
11481 
11482  ~properties () = default;
11483 
11484  void set (const caseless_str& pname, const octave_value& val);
11485 
11486  octave_value get (bool all = false) const;
11487 
11488  octave_value get (const caseless_str& pname) const;
11489 
11490  octave_value get (const std::string& pname) const
11491  {
11492  return get (caseless_str (pname));
11493  }
11494 
11495  octave_value get (const char *pname) const
11496  {
11497  return get (caseless_str (pname));
11498  }
11499 
11500  property get_property (const caseless_str& pname);
11501 
11502  std::string graphics_object_name () const { return s_go_name; }
11503 
11504  static property_list::pval_map_type factory_defaults ();
11505 
11506 private:
11507  static std::string s_go_name;
11508 
11509 public:
11510 
11511 
11512  static std::set<std::string> core_property_names ();
11513 
11514  static std::set<std::string> readonly_property_names ();
11515 
11516  static bool has_core_property (const caseless_str& pname);
11517 
11518  static bool has_readonly_property (const caseless_str& pname);
11519 
11520  std::set<std::string> all_property_names () const;
11521 
11522  bool has_property (const caseless_str& pname) const;
11523 
11524 private:
11525 
11526  string_property m_displayname;
11527  row_vector_property m_alim;
11528  row_vector_property m_clim;
11529  row_vector_property m_xlim;
11530  row_vector_property m_ylim;
11531  row_vector_property m_zlim;
11532  bool_property m_aliminclude;
11533  bool_property m_climinclude;
11534  bool_property m_xliminclude;
11535  bool_property m_yliminclude;
11536  bool_property m_zliminclude;
11537 
11538 public:
11539 
11540  enum
11541  {
11542  ID_DISPLAYNAME = 11000,
11543  ID_ALIM = 11001,
11544  ID_CLIM = 11002,
11545  ID_XLIM = 11003,
11546  ID_YLIM = 11004,
11547  ID_ZLIM = 11005,
11548  ID_ALIMINCLUDE = 11006,
11549  ID_CLIMINCLUDE = 11007,
11550  ID_XLIMINCLUDE = 11008,
11551  ID_YLIMINCLUDE = 11009,
11552  ID_ZLIMINCLUDE = 11010
11553  };
11554 
11555  std::string get_displayname () const { return m_displayname.string_value (); }
11556 
11557  octave_value get_alim () const { return m_alim.get (); }
11558 
11559  octave_value get_clim () const { return m_clim.get (); }
11560 
11561  octave_value get_xlim () const { return m_xlim.get (); }
11562 
11563  octave_value get_ylim () const { return m_ylim.get (); }
11564 
11565  octave_value get_zlim () const { return m_zlim.get (); }
11566 
11567  bool is_aliminclude () const { return m_aliminclude.is_on (); }
11568  std::string get_aliminclude () const { return m_aliminclude.current_value (); }
11569 
11570  bool is_climinclude () const { return m_climinclude.is_on (); }
11571  std::string get_climinclude () const { return m_climinclude.current_value (); }
11572 
11573  bool is_xliminclude () const { return m_xliminclude.is_on (); }
11574  std::string get_xliminclude () const { return m_xliminclude.current_value (); }
11575 
11576  bool is_yliminclude () const { return m_yliminclude.is_on (); }
11577  std::string get_yliminclude () const { return m_yliminclude.current_value (); }
11578 
11579  bool is_zliminclude () const { return m_zliminclude.is_on (); }
11580  std::string get_zliminclude () const { return m_zliminclude.current_value (); }
11581 
11582 
11583  void set_displayname (const octave_value& val)
11584  {
11585  if (m_displayname.set (val, true))
11586  {
11587  mark_modified ();
11588  }
11589  }
11590 
11591  void set_alim (const octave_value& val)
11592  {
11593  if (m_alim.set (val, true))
11594  {
11595  mark_modified ();
11596  }
11597  }
11598 
11599  void set_clim (const octave_value& val)
11600  {
11601  if (m_clim.set (val, true))
11602  {
11603  mark_modified ();
11604  }
11605  }
11606 
11607  void set_xlim (const octave_value& val)
11608  {
11609  if (m_xlim.set (val, true))
11610  {
11611  mark_modified ();
11612  }
11613  }
11614 
11615  void set_ylim (const octave_value& val)
11616  {
11617  if (m_ylim.set (val, true))
11618  {
11619  mark_modified ();
11620  }
11621  }
11622 
11623  void set_zlim (const octave_value& val)
11624  {
11625  if (m_zlim.set (val, true))
11626  {
11627  mark_modified ();
11628  }
11629  }
11630 
11631  void set_aliminclude (const octave_value& val)
11632  {
11633  if (m_aliminclude.set (val, true))
11634  {
11635  mark_modified ();
11636  }
11637  }
11638 
11639  void set_climinclude (const octave_value& val)
11640  {
11641  if (m_climinclude.set (val, true))
11642  {
11643  mark_modified ();
11644  }
11645  }
11646 
11647  void set_xliminclude (const octave_value& val)
11648  {
11649  if (m_xliminclude.set (val, true))
11650  {
11651  mark_modified ();
11652  }
11653  }
11654 
11655  void set_yliminclude (const octave_value& val)
11656  {
11657  if (m_yliminclude.set (val, true))
11658  {
11659  mark_modified ();
11660  }
11661  }
11662 
11663  void set_zliminclude (const octave_value& val)
11664  {
11665  if (m_zliminclude.set (val, true))
11666  {
11667  mark_modified ();
11668  }
11669  }
11670 
11671 
11672  private:
11673  OCTINTERP_API void update_limits () const;
11674 
11675  OCTINTERP_API void update_limits (const graphics_handle& h) const;
11676 
11677  protected:
11678  void init ()
11679  { }
11680 
11681  };
11682 
11683 private:
11684  properties m_properties;
11685 
11686 public:
11688  : base_graphics_object (), m_properties (mh, p)
11689  { }
11690 
11691  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (hggroup)
11692 
11693  ~hggroup () = default;
11694 
11695  base_properties& get_properties () { return m_properties; }
11696 
11697  const base_properties& get_properties () const { return m_properties; }
11698 
11699  bool valid_object () const { return true; }
11700 
11701  OCTINTERP_API void update_axis_limits (const std::string& axis_type);
11702 
11703  OCTINTERP_API void update_axis_limits (const std::string& axis_type,
11704  const graphics_handle& h);
11705 
11706  bool has_readonly_property (const caseless_str& pname) const
11707  {
11708  bool retval = m_properties.has_readonly_property (pname);
11709  if (! retval)
11710  retval = base_properties::has_readonly_property (pname);
11711  return retval;
11712  }
11713 
11714 };
11715 
11716 // ---------------------------------------------------------------------
11717 
11718 class OCTINTERP_API uimenu : public base_graphics_object
11719 {
11720 public:
11721 
11722  class OCTINTERP_API properties : public base_properties
11723  {
11724  public:
11725 
11726  void remove_child (const graphics_handle& h, bool from_root = false)
11727  {
11728  base_properties::remove_child (h, from_root);
11729  }
11730 
11731  void adopt (const graphics_handle& h)
11732  {
11734  }
11735 
11736  // See the genprops.awk script for an explanation of the
11737  // properties declarations.
11738  // Programming note: Keep property list sorted if new ones are added.
11739 
11740 public:
11741  properties (const graphics_handle& mh, const graphics_handle& p);
11742 
11743  properties () = delete;
11744 
11745  OCTAVE_DISABLE_COPY_MOVE (properties)
11746 
11747  ~properties () = default;
11748 
11749  void set (const caseless_str& pname, const octave_value& val);
11750 
11751  octave_value get (bool all = false) const;
11752 
11753  octave_value get (const caseless_str& pname) const;
11754 
11755  octave_value get (const std::string& pname) const
11756  {
11757  return get (caseless_str (pname));
11758  }
11759 
11760  octave_value get (const char *pname) const
11761  {
11762  return get (caseless_str (pname));
11763  }
11764 
11765  property get_property (const caseless_str& pname);
11766 
11767  std::string graphics_object_name () const { return s_go_name; }
11768 
11769  static property_list::pval_map_type factory_defaults ();
11770 
11771 private:
11772  static std::string s_go_name;
11773 
11774 public:
11775 
11776 
11777  static std::set<std::string> core_property_names ();
11778 
11779  static std::set<std::string> readonly_property_names ();
11780 
11781  static bool has_core_property (const caseless_str& pname);
11782 
11783  static bool has_readonly_property (const caseless_str& pname);
11784 
11785  std::set<std::string> all_property_names () const;
11786 
11787  bool has_property (const caseless_str& pname) const;
11788 
11789 private:
11790 
11791  string_property m_accelerator;
11792  callback_property m_callback;
11793  bool_property m_checked;
11794  bool_property m_enable;
11795  color_property m_foregroundcolor;
11796  string_property m_label;
11797  callback_property m_menuselectedfcn;
11798  double_property m_position;
11799  bool_property m_separator;
11800  string_property m_text;
11801  string_property m___fltk_label__;
11802  any_property m___object__;
11803 
11804 public:
11805 
11806  enum
11807  {
11808  ID_ACCELERATOR = 12000,
11809  ID_CALLBACK = 12001,
11810  ID_CHECKED = 12002,
11811  ID_ENABLE = 12003,
11812  ID_FOREGROUNDCOLOR = 12004,
11813  ID_LABEL = 12005,
11814  ID_MENUSELECTEDFCN = 12006,
11815  ID_POSITION = 12007,
11816  ID_SEPARATOR = 12008,
11817  ID_TEXT = 12009,
11818  ID___FLTK_LABEL__ = 12010,
11819  ID___OBJECT__ = 12011
11820  };
11821 
11822  std::string get_accelerator () const { return m_accelerator.string_value (); }
11823 
11824  bool is_checked () const { return m_checked.is_on (); }
11825  std::string get_checked () const { return m_checked.current_value (); }
11826 
11827  bool is_enable () const { return m_enable.is_on (); }
11828  std::string get_enable () const { return m_enable.current_value (); }
11829 
11830  bool foregroundcolor_is_rgb () const { return m_foregroundcolor.is_rgb (); }
11831  bool foregroundcolor_is (const std::string& v) const { return m_foregroundcolor.is (v); }
11832  Matrix get_foregroundcolor_rgb () const { return (m_foregroundcolor.is_rgb () ? m_foregroundcolor.rgb () : Matrix ()); }
11833  octave_value get_foregroundcolor () const { return m_foregroundcolor.get (); }
11834 
11835  void execute_menuselectedfcn (const octave_value& new_data = octave_value ()) const { m_menuselectedfcn.execute (new_data); }
11836  octave_value get_menuselectedfcn () const { return m_menuselectedfcn.get (); }
11837 
11838  double get_position () const { return m_position.double_value (); }
11839 
11840  bool is_separator () const { return m_separator.is_on (); }
11841  std::string get_separator () const { return m_separator.current_value (); }
11842 
11843  std::string get_text () const { return m_text.string_value (); }
11844 
11845  std::string get___fltk_label__ () const { return m___fltk_label__.string_value (); }
11846 
11847  octave_value get___object__ () const { return m___object__.get (); }
11848 
11849 
11850  void set_accelerator (const octave_value& val)
11851  {
11852  if (m_accelerator.set (val, true))
11853  {
11854  mark_modified ();
11855  }
11856  }
11857 
11858  void set_checked (const octave_value& val)
11859  {
11860  if (m_checked.set (val, true))
11861  {
11862  mark_modified ();
11863  }
11864  }
11865 
11866  void set_enable (const octave_value& val)
11867  {
11868  if (m_enable.set (val, true))
11869  {
11870  mark_modified ();
11871  }
11872  }
11873 
11875  {
11876  if (m_foregroundcolor.set (val, true))
11877  {
11878  mark_modified ();
11879  }
11880  }
11881 
11883  {
11884  if (m_menuselectedfcn.set (val, true))
11885  {
11886  mark_modified ();
11887  }
11888  }
11889 
11890  void set_position (const octave_value& val)
11891  {
11892  if (m_position.set (val, true))
11893  {
11894  mark_modified ();
11895  }
11896  }
11897 
11898  void set_separator (const octave_value& val)
11899  {
11900  if (m_separator.set (val, true))
11901  {
11902  mark_modified ();
11903  }
11904  }
11905 
11906  void set_text (const octave_value& val)
11907  {
11908  if (m_text.set (val, true))
11909  {
11910  mark_modified ();
11911  }
11912  }
11913 
11915  {
11916  if (m___fltk_label__.set (val, true))
11917  {
11918  mark_modified ();
11919  }
11920  }
11921 
11922  void set___object__ (const octave_value& val)
11923  {
11924  if (m___object__.set (val, true))
11925  {
11926  mark_modified ();
11927  }
11928  }
11929 
11930 
11931  // Make "Label" an alias for "Text".
11932  std::string get_label () const
11933  {
11934  return get_text ();
11935  }
11936 
11937  void set_label (const octave_value& val)
11938  {
11939  set_text (val);
11940  }
11941 
11942  // Make "Callback" an alias for "MenuSelectedFcn".
11944  {
11945  return get_menuselectedfcn ();
11946  }
11947 
11948  void set_callback (const octave_value& val)
11949  {
11950  set_menuselectedfcn (val);
11951  }
11952 
11953  protected:
11954  void init ()
11955  {
11956  m_position.add_constraint ("min", 0, true);
11957  }
11958  };
11959 
11960 private:
11961  properties m_properties;
11962 
11963 public:
11965  : base_graphics_object (), m_properties (mh, p)
11966  { }
11967 
11968  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (uimenu)
11969 
11970  ~uimenu () = default;
11971 
11972  base_properties& get_properties () { return m_properties; }
11973 
11974  const base_properties& get_properties () const { return m_properties; }
11975 
11976  bool valid_object () const { return true; }
11977 
11978  bool has_readonly_property (const caseless_str& pname) const
11979  {
11980  bool retval = m_properties.has_readonly_property (pname);
11981  if (! retval)
11982  retval = base_properties::has_readonly_property (pname);
11983  return retval;
11984  }
11985 
11986 };
11987 
11988 // ---------------------------------------------------------------------
11989 
11990 // FIXME: This class has been renamed to "contextmenu" in Matlab R2020a.
11991 class OCTINTERP_API uicontextmenu : public base_graphics_object
11992 {
11993 public:
11994 
11995  class OCTINTERP_API properties : public base_properties
11996  {
11997  public:
11998 
12000  { m_dependent_obj_list.push_back (gh); }
12001 
12002  // FIXME: the list may contain duplicates.
12003  // Should we return only unique elements?
12004  const std::list<graphics_handle> get_dependent_obj_list ()
12005  { return m_dependent_obj_list; }
12006 
12007  // See the genprops.awk script for an explanation of the
12008  // properties declarations.
12009  // Programming note: Keep property list sorted if new ones are added.
12010 
12011 public:
12012  properties (const graphics_handle& mh, const graphics_handle& p);
12013 
12014  properties () = delete;
12015 
12016  OCTAVE_DISABLE_COPY_MOVE (properties)
12017 
12018  ~properties () = default;
12019 
12020  void set (const caseless_str& pname, const octave_value& val);
12021 
12022  octave_value get (bool all = false) const;
12023 
12024  octave_value get (const caseless_str& pname) const;
12025 
12026  octave_value get (const std::string& pname) const
12027  {
12028  return get (caseless_str (pname));
12029  }
12030 
12031  octave_value get (const char *pname) const
12032  {
12033  return get (caseless_str (pname));
12034  }
12035 
12036  property get_property (const caseless_str& pname);
12037 
12038  std::string graphics_object_name () const { return s_go_name; }
12039 
12040  static property_list::pval_map_type factory_defaults ();
12041 
12042 private:
12043  static std::string s_go_name;
12044 
12045 public:
12046 
12047 
12048  static std::set<std::string> core_property_names ();
12049 
12050  static std::set<std::string> readonly_property_names ();
12051 
12052  static bool has_core_property (const caseless_str& pname);
12053 
12054  static bool has_readonly_property (const caseless_str& pname);
12055 
12056  std::set<std::string> all_property_names () const;
12057 
12058  bool has_property (const caseless_str& pname) const;
12059 
12060 private:
12061 
12062  callback_property m_callback;
12063  array_property m_position;
12064  any_property m___object__;
12065 
12066 public:
12067 
12068  enum
12069  {
12070  ID_CALLBACK = 13000,
12071  ID_POSITION = 13001,
12072  ID___OBJECT__ = 13002
12073  };
12074 
12075  void execute_callback (const octave_value& new_data = octave_value ()) const { m_callback.execute (new_data); }
12076  octave_value get_callback () const { return m_callback.get (); }
12077 
12078  octave_value get_position () const { return m_position.get (); }
12079 
12080  octave_value get___object__ () const { return m___object__.get (); }
12081 
12082 
12083  void set_callback (const octave_value& val)
12084  {
12085  if (m_callback.set (val, true))
12086  {
12087  mark_modified ();
12088  }
12089  }
12090 
12091  void set_position (const octave_value& val)
12092  {
12093  if (m_position.set (val, true))
12094  {
12095  mark_modified ();
12096  }
12097  }
12098 
12099  void set___object__ (const octave_value& val)
12100  {
12101  if (m___object__.set (val, true))
12102  {
12103  mark_modified ();
12104  }
12105  }
12106 
12107 
12108  protected:
12109  void init ()
12110  {
12111  m_position.add_constraint (dim_vector (1, 2));
12112  m_position.add_constraint (dim_vector (2, 1));
12113  m_visible.set (octave_value (false));
12114  }
12115 
12116  private:
12117  // List of objects that might depend on this uicontextmenu object
12118  std::list<graphics_handle> m_dependent_obj_list;
12119 
12120  OCTINTERP_API void update_beingdeleted ();
12121 
12122  };
12123 
12124 private:
12125  properties m_properties;
12126 
12127 public:
12129  : base_graphics_object (), m_properties (mh, p)
12130  { }
12131 
12132  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (uicontextmenu)
12133 
12134  ~uicontextmenu () = default;
12135 
12136  base_properties& get_properties () { return m_properties; }
12137 
12138  const base_properties& get_properties () const { return m_properties; }
12139 
12140  bool valid_object () const { return true; }
12141 
12142  bool has_readonly_property (const caseless_str& pname) const
12143  {
12144  bool retval = m_properties.has_readonly_property (pname);
12145  if (! retval)
12146  retval = base_properties::has_readonly_property (pname);
12147  return retval;
12148  }
12149 
12150 };
12151 
12152 // ---------------------------------------------------------------------
12153 
12154 class OCTINTERP_API uicontrol : public base_graphics_object
12155 {
12156 public:
12157 
12158  class OCTINTERP_API properties : public base_properties
12159  {
12160  public:
12161 
12162  OCTINTERP_API Matrix
12163  get_boundingbox (bool internal = false,
12164  const Matrix& parent_pix_size = Matrix ()) const;
12165 
12166  OCTINTERP_API double
12167  get___fontsize_points__ (double box_pix_height = 0) const;
12168 
12169  // See the genprops.awk script for an explanation of the
12170  // properties declarations.
12171  // Programming note: Keep property list sorted if new ones are added.
12172 
12173 public:
12174  properties (const graphics_handle& mh, const graphics_handle& p);
12175 
12176  properties () = delete;
12177 
12178  OCTAVE_DISABLE_COPY_MOVE (properties)
12179 
12180  ~properties () = default;
12181 
12182  void set (const caseless_str& pname, const octave_value& val);
12183 
12184  octave_value get (bool all = false) const;
12185 
12186  octave_value get (const caseless_str& pname) const;
12187 
12188  octave_value get (const std::string& pname) const
12189  {
12190  return get (caseless_str (pname));
12191  }
12192 
12193  octave_value get (const char *pname) const
12194  {
12195  return get (caseless_str (pname));
12196  }
12197 
12198  property get_property (const caseless_str& pname);
12199 
12200  std::string graphics_object_name () const { return s_go_name; }
12201 
12202  static property_list::pval_map_type factory_defaults ();
12203 
12204 private:
12205  static std::string s_go_name;
12206 
12207 public:
12208 
12209 
12210  static std::set<std::string> core_property_names ();
12211 
12212  static std::set<std::string> readonly_property_names ();
12213 
12214  static bool has_core_property (const caseless_str& pname);
12215 
12216  static bool has_readonly_property (const caseless_str& pname);
12217 
12218  std::set<std::string> all_property_names () const;
12219 
12220  bool has_property (const caseless_str& pname) const;
12221 
12222 private:
12223 
12224  color_property m_backgroundcolor;
12225  callback_property m_callback;
12226  array_property m_cdata;
12227  bool_property m_clipping;
12228  radio_property m_enable;
12229  array_property m_extent;
12230  radio_property m_fontangle;
12231  string_property m_fontname;
12232  double_property m_fontsize;
12233  radio_property m_fontunits;
12234  radio_property m_fontweight;
12235  color_property m_foregroundcolor;
12236  radio_property m_horizontalalignment;
12237  callback_property m_keypressfcn;
12238  double_property m_listboxtop;
12239  double_property m_max;
12240  double_property m_min;
12241  array_property m_position;
12242  array_property m_sliderstep;
12243  string_array_property m_string;
12244  radio_property m_style;
12245  string_property m_tooltipstring;
12246  radio_property m_units;
12247  row_vector_property m_value;
12248  radio_property m_verticalalignment;
12249  bool_property m___focus__;
12250  any_property m___object__;
12251 
12252 public:
12253 
12254  enum
12255  {
12256  ID_BACKGROUNDCOLOR = 14000,
12257  ID_CALLBACK = 14001,
12258  ID_CDATA = 14002,
12259  ID_CLIPPING = 14003,
12260  ID_ENABLE = 14004,
12261  ID_EXTENT = 14005,
12262  ID_FONTANGLE = 14006,
12263  ID_FONTNAME = 14007,
12264  ID_FONTSIZE = 14008,
12265  ID_FONTUNITS = 14009,
12266  ID_FONTWEIGHT = 14010,
12267  ID_FOREGROUNDCOLOR = 14011,
12268  ID_HORIZONTALALIGNMENT = 14012,
12269  ID_KEYPRESSFCN = 14013,
12270  ID_LISTBOXTOP = 14014,
12271  ID_MAX = 14015,
12272  ID_MIN = 14016,
12273  ID_POSITION = 14017,
12274  ID_SLIDERSTEP = 14018,
12275  ID_STRING = 14019,
12276  ID_STYLE = 14020,
12277  ID_TOOLTIPSTRING = 14021,
12278  ID_UNITS = 14022,
12279  ID_VALUE = 14023,
12280  ID_VERTICALALIGNMENT = 14024,
12281  ID___FOCUS__ = 14025,
12282  ID___OBJECT__ = 14026
12283  };
12284 
12285  bool backgroundcolor_is_rgb () const { return m_backgroundcolor.is_rgb (); }
12286  bool backgroundcolor_is (const std::string& v) const { return m_backgroundcolor.is (v); }
12287  Matrix get_backgroundcolor_rgb () const { return (m_backgroundcolor.is_rgb () ? m_backgroundcolor.rgb () : Matrix ()); }
12288  octave_value get_backgroundcolor () const { return m_backgroundcolor.get (); }
12289 
12290  void execute_callback (const octave_value& new_data = octave_value ()) const { m_callback.execute (new_data); }
12291  octave_value get_callback () const { return m_callback.get (); }
12292 
12293  octave_value get_cdata () const { return m_cdata.get (); }
12294 
12295  bool is_clipping () const { return m_clipping.is_on (); }
12296  std::string get_clipping () const { return m_clipping.current_value (); }
12297 
12298  bool enable_is (const std::string& v) const { return m_enable.is (v); }
12299  std::string get_enable () const { return m_enable.current_value (); }
12300 
12301  octave_value get_extent () const;
12302 
12303  bool fontangle_is (const std::string& v) const { return m_fontangle.is (v); }
12304  std::string get_fontangle () const { return m_fontangle.current_value (); }
12305 
12306  std::string get_fontname () const { return m_fontname.string_value (); }
12307 
12308  double get_fontsize () const { return m_fontsize.double_value (); }
12309 
12310  bool fontunits_is (const std::string& v) const { return m_fontunits.is (v); }
12311  std::string get_fontunits () const { return m_fontunits.current_value (); }
12312 
12313  bool fontweight_is (const std::string& v) const { return m_fontweight.is (v); }
12314  std::string get_fontweight () const { return m_fontweight.current_value (); }
12315 
12316  bool foregroundcolor_is_rgb () const { return m_foregroundcolor.is_rgb (); }
12317  bool foregroundcolor_is (const std::string& v) const { return m_foregroundcolor.is (v); }
12318  Matrix get_foregroundcolor_rgb () const { return (m_foregroundcolor.is_rgb () ? m_foregroundcolor.rgb () : Matrix ()); }
12319  octave_value get_foregroundcolor () const { return m_foregroundcolor.get (); }
12320 
12321  bool horizontalalignment_is (const std::string& v) const { return m_horizontalalignment.is (v); }
12322  std::string get_horizontalalignment () const { return m_horizontalalignment.current_value (); }
12323 
12324  void execute_keypressfcn (const octave_value& new_data = octave_value ()) const { m_keypressfcn.execute (new_data); }
12325  octave_value get_keypressfcn () const { return m_keypressfcn.get (); }
12326 
12327  double get_listboxtop () const { return m_listboxtop.double_value (); }
12328 
12329  double get_max () const { return m_max.double_value (); }
12330 
12331  double get_min () const { return m_min.double_value (); }
12332 
12333  octave_value get_position () const { return m_position.get (); }
12334 
12335  octave_value get_sliderstep () const { return m_sliderstep.get (); }
12336 
12337  std::string get_string_string () const { return m_string.string_value (); }
12338  string_vector get_string_vector () const { return m_string.string_vector_value (); }
12339  octave_value get_string () const { return m_string.get (); }
12340 
12341  bool style_is (const std::string& v) const { return m_style.is (v); }
12342  std::string get_style () const { return m_style.current_value (); }
12343 
12344  std::string get_tooltipstring () const { return m_tooltipstring.string_value (); }
12345 
12346  bool units_is (const std::string& v) const { return m_units.is (v); }
12347  std::string get_units () const { return m_units.current_value (); }
12348 
12349  octave_value get_value () const { return m_value.get (); }
12350 
12351  bool verticalalignment_is (const std::string& v) const { return m_verticalalignment.is (v); }
12352  std::string get_verticalalignment () const { return m_verticalalignment.current_value (); }
12353 
12354  bool is___focus__ () const { return m___focus__.is_on (); }
12355  std::string get___focus__ () const { return m___focus__.current_value (); }
12356 
12357  octave_value get___object__ () const { return m___object__.get (); }
12358 
12359 
12361  {
12362  if (m_backgroundcolor.set (val, true))
12363  {
12364  mark_modified ();
12365  }
12366  }
12367 
12368  void set_callback (const octave_value& val)
12369  {
12370  if (m_callback.set (val, true))
12371  {
12372  mark_modified ();
12373  }
12374  }
12375 
12376  void set_cdata (const octave_value& val)
12377  {
12378  if (m_cdata.set (val, true))
12379  {
12380  mark_modified ();
12381  }
12382  }
12383 
12384  void set_clipping (const octave_value& val)
12385  {
12386  if (m_clipping.set (val, true))
12387  {
12388  mark_modified ();
12389  }
12390  }
12391 
12392  void set_enable (const octave_value& val)
12393  {
12394  if (m_enable.set (val, true))
12395  {
12396  mark_modified ();
12397  }
12398  }
12399 
12400  void set_extent (const octave_value& val)
12401  {
12402  if (m_extent.set (val, true))
12403  {
12404  mark_modified ();
12405  }
12406  }
12407 
12408  void set_fontangle (const octave_value& val)
12409  {
12410  if (m_fontangle.set (val, true))
12411  {
12412  update_fontangle ();
12413  mark_modified ();
12414  }
12415  }
12416 
12417  void set_fontname (const octave_value& val)
12418  {
12419  if (m_fontname.set (val, true))
12420  {
12421  update_fontname ();
12422  mark_modified ();
12423  }
12424  }
12425 
12426  void set_fontsize (const octave_value& val)
12427  {
12428  if (m_fontsize.set (val, true))
12429  {
12430  update_fontsize ();
12431  mark_modified ();
12432  }
12433  }
12434 
12435  void set_fontunits (const octave_value& val);
12436 
12437  void set_fontweight (const octave_value& val)
12438  {
12439  if (m_fontweight.set (val, true))
12440  {
12441  update_fontweight ();
12442  mark_modified ();
12443  }
12444  }
12445 
12447  {
12448  if (m_foregroundcolor.set (val, true))
12449  {
12450  mark_modified ();
12451  }
12452  }
12453 
12455  {
12456  if (m_horizontalalignment.set (val, true))
12457  {
12458  mark_modified ();
12459  }
12460  }
12461 
12462  void set_keypressfcn (const octave_value& val)
12463  {
12464  if (m_keypressfcn.set (val, true))
12465  {
12466  mark_modified ();
12467  }
12468  }
12469 
12470  void set_listboxtop (const octave_value& val)
12471  {
12472  if (m_listboxtop.set (val, true))
12473  {
12474  mark_modified ();
12475  }
12476  }
12477 
12478  void set_max (const octave_value& val)
12479  {
12480  if (m_max.set (val, true))
12481  {
12482  mark_modified ();
12483  }
12484  }
12485 
12486  void set_min (const octave_value& val)
12487  {
12488  if (m_min.set (val, true))
12489  {
12490  mark_modified ();
12491  }
12492  }
12493 
12494  void set_position (const octave_value& val)
12495  {
12496  if (m_position.set (val, true))
12497  {
12498  mark_modified ();
12499  }
12500  }
12501 
12502  void set_sliderstep (const octave_value& val)
12503  {
12504  if (m_sliderstep.set (val, true))
12505  {
12506  mark_modified ();
12507  }
12508  }
12509 
12510  void set_string (const octave_value& val)
12511  {
12512  if (m_string.set (val, true))
12513  {
12514  update_string ();
12515  mark_modified ();
12516  }
12517  }
12518 
12519  void set_style (const octave_value& val);
12520 
12522  {
12523  if (m_tooltipstring.set (val, true))
12524  {
12525  mark_modified ();
12526  }
12527  }
12528 
12529  void set_units (const octave_value& val)
12530  {
12531  if (m_units.set (val, true))
12532  {
12533  update_units ();
12534  mark_modified ();
12535  }
12536  }
12537 
12538  void set_value (const octave_value& val)
12539  {
12540  if (m_value.set (val, true))
12541  {
12542  mark_modified ();
12543  }
12544  }
12545 
12547  {
12548  if (m_verticalalignment.set (val, true))
12549  {
12550  mark_modified ();
12551  }
12552  }
12553 
12554  void set___focus__ (const octave_value& val)
12555  {
12556  if (m___focus__.set (val, true))
12557  {
12558  mark_modified ();
12559  }
12560  }
12561 
12562  void set___object__ (const octave_value& val)
12563  {
12564  if (m___object__.set (val, true))
12565  {
12566  mark_modified ();
12567  }
12568  }
12569 
12570 
12571  private:
12572  std::string m_cached_units;
12573 
12574  protected:
12575  void init ()
12576  {
12577  m_cdata.add_constraint ("double");
12578  m_cdata.add_constraint ("single");
12579  m_cdata.add_constraint ("uint8");
12580  m_cdata.add_constraint (dim_vector (-1, -1, 3));
12581  m_cdata.add_constraint (dim_vector (0, 0));
12582  m_position.add_constraint (dim_vector (1, 4));
12583  m_sliderstep.add_constraint (dim_vector (1, 2));
12584  m_fontsize.add_constraint ("min", 0.0, false);
12585  m_cached_units = get_units ();
12586  }
12587 
12588  OCTINTERP_API void update_text_extent ();
12589 
12590  void update_string () { update_text_extent (); }
12591  void update_fontname () { update_text_extent (); }
12592  void update_fontsize () { update_text_extent (); }
12594  {
12595  update_text_extent ();
12596  }
12597  void update_fontweight () { update_text_extent (); }
12598 
12599  OCTINTERP_API void update_fontunits (const caseless_str& old_units);
12600 
12601  OCTINTERP_API void update_units ();
12602 
12603  };
12604 
12605 private:
12606  properties m_properties;
12607 
12608 public:
12610  : base_graphics_object (), m_properties (mh, p)
12611  { }
12612 
12613  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (uicontrol)
12614 
12615  ~uicontrol () = default;
12616 
12617  base_properties& get_properties () { return m_properties; }
12618 
12619  const base_properties& get_properties () const { return m_properties; }
12620 
12621  bool valid_object () const { return true; }
12622 
12623  bool has_readonly_property (const caseless_str& pname) const
12624  {
12625  bool retval = m_properties.has_readonly_property (pname);
12626  if (! retval)
12627  retval = base_properties::has_readonly_property (pname);
12628  return retval;
12629  }
12630 };
12631 
12632 // ---------------------------------------------------------------------
12633 
12634 class OCTINTERP_API uibuttongroup : public base_graphics_object
12635 {
12636 public:
12637 
12638  class OCTINTERP_API properties : public base_properties
12639  {
12640  public:
12641 
12642  OCTINTERP_API void
12643  remove_child (const graphics_handle& h, bool from_root = false);
12644 
12645  OCTINTERP_API void adopt (const graphics_handle& h);
12646 
12647  OCTINTERP_API Matrix
12648  get_boundingbox (bool internal = false,
12649  const Matrix& parent_pix_size = Matrix ()) const;
12650 
12651  OCTINTERP_API double
12652  get___fontsize_points__ (double box_pix_height = 0) const;
12653 
12654  // See the genprops.awk script for an explanation of the
12655  // properties declarations.
12656  // Programming note: Keep property list sorted if new ones are added.
12657 
12658 public:
12659  properties (const graphics_handle& mh, const graphics_handle& p);
12660 
12661  properties () = delete;
12662 
12663  OCTAVE_DISABLE_COPY_MOVE (properties)
12664 
12665  ~properties () = default;
12666 
12667  void set (const caseless_str& pname, const octave_value& val);
12668 
12669  octave_value get (bool all = false) const;
12670 
12671  octave_value get (const caseless_str& pname) const;
12672 
12673  octave_value get (const std::string& pname) const
12674  {
12675  return get (caseless_str (pname));
12676  }
12677 
12678  octave_value get (const char *pname) const
12679  {
12680  return get (caseless_str (pname));
12681  }
12682 
12683  property get_property (const caseless_str& pname);
12684 
12685  std::string graphics_object_name () const { return s_go_name; }
12686 
12687  static property_list::pval_map_type factory_defaults ();
12688 
12689 private:
12690  static std::string s_go_name;
12691 
12692 public:
12693 
12694 
12695  static std::set<std::string> core_property_names ();
12696 
12697  static std::set<std::string> readonly_property_names ();
12698 
12699  static bool has_core_property (const caseless_str& pname);
12700 
12701  static bool has_readonly_property (const caseless_str& pname);
12702 
12703  std::set<std::string> all_property_names () const;
12704 
12705  bool has_property (const caseless_str& pname) const;
12706 
12707 private:
12708 
12709  color_property m_backgroundcolor;
12710  radio_property m_bordertype;
12711  double_property m_borderwidth;
12712  bool_property m_clipping;
12713  radio_property m_fontangle;
12714  string_property m_fontname;
12715  double_property m_fontsize;
12716  radio_property m_fontunits;
12717  radio_property m_fontweight;
12718  color_property m_foregroundcolor;
12719  color_property m_highlightcolor;
12720  array_property m_position;
12721  callback_property m_resizefcn;
12722  handle_property m_selectedobject;
12723  callback_property m_selectionchangedfcn;
12724  color_property m_shadowcolor;
12725  callback_property m_sizechangedfcn;
12726  radio_property m_units;
12727  string_property m_title;
12728  radio_property m_titleposition;
12729  any_property m___object__;
12730 
12731 public:
12732 
12733  enum
12734  {
12735  ID_BACKGROUNDCOLOR = 15000,
12736  ID_BORDERTYPE = 15001,
12737  ID_BORDERWIDTH = 15002,
12738  ID_CLIPPING = 15003,
12739  ID_FONTANGLE = 15004,
12740  ID_FONTNAME = 15005,
12741  ID_FONTSIZE = 15006,
12742  ID_FONTUNITS = 15007,
12743  ID_FONTWEIGHT = 15008,
12744  ID_FOREGROUNDCOLOR = 15009,
12745  ID_HIGHLIGHTCOLOR = 15010,
12746  ID_POSITION = 15011,
12747  ID_RESIZEFCN = 15012,
12748  ID_SELECTEDOBJECT = 15013,
12749  ID_SELECTIONCHANGEDFCN = 15014,
12750  ID_SHADOWCOLOR = 15015,
12751  ID_SIZECHANGEDFCN = 15016,
12752  ID_UNITS = 15017,
12753  ID_TITLE = 15018,
12754  ID_TITLEPOSITION = 15019,
12755  ID___OBJECT__ = 15020
12756  };
12757 
12758  bool backgroundcolor_is_rgb () const { return m_backgroundcolor.is_rgb (); }
12759  bool backgroundcolor_is (const std::string& v) const { return m_backgroundcolor.is (v); }
12760  Matrix get_backgroundcolor_rgb () const { return (m_backgroundcolor.is_rgb () ? m_backgroundcolor.rgb () : Matrix ()); }
12761  octave_value get_backgroundcolor () const { return m_backgroundcolor.get (); }
12762 
12763  bool bordertype_is (const std::string& v) const { return m_bordertype.is (v); }
12764  std::string get_bordertype () const { return m_bordertype.current_value (); }
12765 
12766  double get_borderwidth () const { return m_borderwidth.double_value (); }
12767 
12768  bool is_clipping () const { return m_clipping.is_on (); }
12769  std::string get_clipping () const { return m_clipping.current_value (); }
12770 
12771  bool fontangle_is (const std::string& v) const { return m_fontangle.is (v); }
12772  std::string get_fontangle () const { return m_fontangle.current_value (); }
12773 
12774  std::string get_fontname () const { return m_fontname.string_value (); }
12775 
12776  double get_fontsize () const { return m_fontsize.double_value (); }
12777 
12778  bool fontunits_is (const std::string& v) const { return m_fontunits.is (v); }
12779  std::string get_fontunits () const { return m_fontunits.current_value (); }
12780 
12781  bool fontweight_is (const std::string& v) const { return m_fontweight.is (v); }
12782  std::string get_fontweight () const { return m_fontweight.current_value (); }
12783 
12784  bool foregroundcolor_is_rgb () const { return m_foregroundcolor.is_rgb (); }
12785  bool foregroundcolor_is (const std::string& v) const { return m_foregroundcolor.is (v); }
12786  Matrix get_foregroundcolor_rgb () const { return (m_foregroundcolor.is_rgb () ? m_foregroundcolor.rgb () : Matrix ()); }
12787  octave_value get_foregroundcolor () const { return m_foregroundcolor.get (); }
12788 
12789  bool highlightcolor_is_rgb () const { return m_highlightcolor.is_rgb (); }
12790  bool highlightcolor_is (const std::string& v) const { return m_highlightcolor.is (v); }
12791  Matrix get_highlightcolor_rgb () const { return (m_highlightcolor.is_rgb () ? m_highlightcolor.rgb () : Matrix ()); }
12792  octave_value get_highlightcolor () const { return m_highlightcolor.get (); }
12793 
12794  octave_value get_position () const { return m_position.get (); }
12795 
12796  void execute_resizefcn (const octave_value& new_data = octave_value ()) const { m_resizefcn.execute (new_data); }
12797  octave_value get_resizefcn () const { return m_resizefcn.get (); }
12798 
12799  graphics_handle get_selectedobject () const { return m_selectedobject.handle_value (); }
12800 
12801  void execute_selectionchangedfcn (const octave_value& new_data = octave_value ()) const { m_selectionchangedfcn.execute (new_data); }
12802  octave_value get_selectionchangedfcn () const { return m_selectionchangedfcn.get (); }
12803 
12804  bool shadowcolor_is_rgb () const { return m_shadowcolor.is_rgb (); }
12805  bool shadowcolor_is (const std::string& v) const { return m_shadowcolor.is (v); }
12806  Matrix get_shadowcolor_rgb () const { return (m_shadowcolor.is_rgb () ? m_shadowcolor.rgb () : Matrix ()); }
12807  octave_value get_shadowcolor () const { return m_shadowcolor.get (); }
12808 
12809  void execute_sizechangedfcn (const octave_value& new_data = octave_value ()) const { m_sizechangedfcn.execute (new_data); }
12810  octave_value get_sizechangedfcn () const { return m_sizechangedfcn.get (); }
12811 
12812  bool units_is (const std::string& v) const { return m_units.is (v); }
12813  std::string get_units () const { return m_units.current_value (); }
12814 
12815  std::string get_title () const { return m_title.string_value (); }
12816 
12817  bool titleposition_is (const std::string& v) const { return m_titleposition.is (v); }
12818  std::string get_titleposition () const { return m_titleposition.current_value (); }
12819 
12820  octave_value get___object__ () const { return m___object__.get (); }
12821 
12822 
12824  {
12825  if (m_backgroundcolor.set (val, true))
12826  {
12827  mark_modified ();
12828  }
12829  }
12830 
12831  void set_bordertype (const octave_value& val)
12832  {
12833  if (m_bordertype.set (val, true))
12834  {
12835  mark_modified ();
12836  }
12837  }
12838 
12839  void set_borderwidth (const octave_value& val)
12840  {
12841  if (m_borderwidth.set (val, true))
12842  {
12843  mark_modified ();
12844  }
12845  }
12846 
12847  void set_clipping (const octave_value& val)
12848  {
12849  if (m_clipping.set (val, true))
12850  {
12851  mark_modified ();
12852  }
12853  }
12854 
12855  void set_fontangle (const octave_value& val)
12856  {
12857  if (m_fontangle.set (val, true))
12858  {
12859  mark_modified ();
12860  }
12861  }
12862 
12863  void set_fontname (const octave_value& val)
12864  {
12865  if (m_fontname.set (val, true))
12866  {
12867  mark_modified ();
12868  }
12869  }
12870 
12871  void set_fontsize (const octave_value& val)
12872  {
12873  if (m_fontsize.set (val, true))
12874  {
12875  mark_modified ();
12876  }
12877  }
12878 
12879  void set_fontunits (const octave_value& val);
12880 
12881  void set_fontweight (const octave_value& val)
12882  {
12883  if (m_fontweight.set (val, true))
12884  {
12885  mark_modified ();
12886  }
12887  }
12888 
12890  {
12891  if (m_foregroundcolor.set (val, true))
12892  {
12893  mark_modified ();
12894  }
12895  }
12896 
12898  {
12899  if (m_highlightcolor.set (val, true))
12900  {
12901  mark_modified ();
12902  }
12903  }
12904 
12905  void set_position (const octave_value& val);
12906 
12907  void set_resizefcn (const octave_value& val)
12908  {
12909  if (m_resizefcn.set (val, true))
12910  {
12911  mark_modified ();
12912  }
12913  }
12914 
12915  void set_selectedobject (const octave_value& val);
12916 
12918  {
12919  if (m_selectionchangedfcn.set (val, true))
12920  {
12921  mark_modified ();
12922  }
12923  }
12924 
12925  void set_shadowcolor (const octave_value& val)
12926  {
12927  if (m_shadowcolor.set (val, true))
12928  {
12929  mark_modified ();
12930  }
12931  }
12932 
12934  {
12935  if (m_sizechangedfcn.set (val, true))
12936  {
12937  mark_modified ();
12938  }
12939  }
12940 
12941  void set_units (const octave_value& val);
12942 
12943  void set_title (const octave_value& val)
12944  {
12945  if (m_title.set (val, true))
12946  {
12947  mark_modified ();
12948  }
12949  }
12950 
12952  {
12953  if (m_titleposition.set (val, true))
12954  {
12955  mark_modified ();
12956  }
12957  }
12958 
12959  void set___object__ (const octave_value& val)
12960  {
12961  if (m___object__.set (val, true))
12962  {
12963  mark_modified ();
12964  }
12965  }
12966 
12967 
12968  protected:
12969  void init ()
12970  {
12971  m_position.add_constraint (dim_vector (1, 4));
12972  m_borderwidth.add_constraint ("min", 0.0, true);
12973  m_fontsize.add_constraint ("min", 0.0, false);
12974  }
12975 
12976  // void update_text_extent ();
12977  // void update_string () { update_text_extent (); }
12978  // void update_fontname () { update_text_extent (); }
12979  // void update_fontsize () { update_text_extent (); }
12980  // void update_fontangle () { update_text_extent (); }
12981  // void update_fontweight () { update_fontweight (); }
12982 
12983  OCTINTERP_API void update_units (const caseless_str& old_units);
12984  OCTINTERP_API void update_fontunits (const caseless_str& old_units);
12985 
12986  };
12987 
12988 private:
12989  properties m_properties;
12990 
12991 public:
12993  : base_graphics_object (), m_properties (mh, p)
12994  { }
12995 
12996  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (uibuttongroup)
12997 
12998  ~uibuttongroup () = default;
12999 
13000  base_properties& get_properties () { return m_properties; }
13001 
13002  const base_properties& get_properties () const { return m_properties; }
13003 
13004  bool valid_object () const { return true; }
13005 
13006  bool has_readonly_property (const caseless_str& pname) const
13007  {
13008  bool retval = m_properties.has_readonly_property (pname);
13009  if (! retval)
13010  retval = base_properties::has_readonly_property (pname);
13011  return retval;
13012  }
13013 
13014 };
13015 
13016 // ---------------------------------------------------------------------
13017 
13018 class OCTINTERP_API uipanel : public base_graphics_object
13019 {
13020 public:
13021 
13022  class OCTINTERP_API properties : public base_properties
13023  {
13024  public:
13025 
13026  OCTINTERP_API Matrix
13027  get_boundingbox (bool internal = false,
13028  const Matrix& parent_pix_size = Matrix ()) const;
13029 
13030  OCTINTERP_API double
13031  get___fontsize_points__ (double box_pix_height = 0) const;
13032 
13033  // See the genprops.awk script for an explanation of the
13034  // properties declarations.
13035  // Programming note: Keep property list sorted if new ones are added.
13036 
13037 public:
13038  properties (const graphics_handle& mh, const graphics_handle& p);
13039 
13040  properties () = delete;
13041 
13042  OCTAVE_DISABLE_COPY_MOVE (properties)
13043 
13044  ~properties () = default;
13045 
13046  void set (const caseless_str& pname, const octave_value& val);
13047 
13048  octave_value get (bool all = false) const;
13049 
13050  octave_value get (const caseless_str& pname) const;
13051 
13052  octave_value get (const std::string& pname) const
13053  {
13054  return get (caseless_str (pname));
13055  }
13056 
13057  octave_value get (const char *pname) const
13058  {
13059  return get (caseless_str (pname));
13060  }
13061 
13062  property get_property (const caseless_str& pname);
13063 
13064  std::string graphics_object_name () const { return s_go_name; }
13065 
13066  static property_list::pval_map_type factory_defaults ();
13067 
13068 private:
13069  static std::string s_go_name;
13070 
13071 public:
13072 
13073 
13074  static std::set<std::string> core_property_names ();
13075 
13076  static std::set<std::string> readonly_property_names ();
13077 
13078  static bool has_core_property (const caseless_str& pname);
13079 
13080  static bool has_readonly_property (const caseless_str& pname);
13081 
13082  std::set<std::string> all_property_names () const;
13083 
13084  bool has_property (const caseless_str& pname) const;
13085 
13086 private:
13087 
13088  color_property m_backgroundcolor;
13089  radio_property m_bordertype;
13090  double_property m_borderwidth;
13091  radio_property m_fontangle;
13092  string_property m_fontname;
13093  double_property m_fontsize;
13094  radio_property m_fontunits;
13095  radio_property m_fontweight;
13096  color_property m_foregroundcolor;
13097  color_property m_highlightcolor;
13098  array_property m_position;
13099  callback_property m_resizefcn;
13100  color_property m_shadowcolor;
13101  callback_property m_sizechangedfcn;
13102  string_property m_title;
13103  radio_property m_titleposition;
13104  radio_property m_units;
13105  any_property m___object__;
13106 
13107 public:
13108 
13109  enum
13110  {
13111  ID_BACKGROUNDCOLOR = 16000,
13112  ID_BORDERTYPE = 16001,
13113  ID_BORDERWIDTH = 16002,
13114  ID_FONTANGLE = 16003,
13115  ID_FONTNAME = 16004,
13116  ID_FONTSIZE = 16005,
13117  ID_FONTUNITS = 16006,
13118  ID_FONTWEIGHT = 16007,
13119  ID_FOREGROUNDCOLOR = 16008,
13120  ID_HIGHLIGHTCOLOR = 16009,
13121  ID_POSITION = 16010,
13122  ID_RESIZEFCN = 16011,
13123  ID_SHADOWCOLOR = 16012,
13124  ID_SIZECHANGEDFCN = 16013,
13125  ID_TITLE = 16014,
13126  ID_TITLEPOSITION = 16015,
13127  ID_UNITS = 16016,
13128  ID___OBJECT__ = 16017
13129  };
13130 
13131  bool backgroundcolor_is_rgb () const { return m_backgroundcolor.is_rgb (); }
13132  bool backgroundcolor_is (const std::string& v) const { return m_backgroundcolor.is (v); }
13133  Matrix get_backgroundcolor_rgb () const { return (m_backgroundcolor.is_rgb () ? m_backgroundcolor.rgb () : Matrix ()); }
13134  octave_value get_backgroundcolor () const { return m_backgroundcolor.get (); }
13135 
13136  bool bordertype_is (const std::string& v) const { return m_bordertype.is (v); }
13137  std::string get_bordertype () const { return m_bordertype.current_value (); }
13138 
13139  double get_borderwidth () const { return m_borderwidth.double_value (); }
13140 
13141  bool fontangle_is (const std::string& v) const { return m_fontangle.is (v); }
13142  std::string get_fontangle () const { return m_fontangle.current_value (); }
13143 
13144  std::string get_fontname () const { return m_fontname.string_value (); }
13145 
13146  double get_fontsize () const { return m_fontsize.double_value (); }
13147 
13148  bool fontunits_is (const std::string& v) const { return m_fontunits.is (v); }
13149  std::string get_fontunits () const { return m_fontunits.current_value (); }
13150 
13151  bool fontweight_is (const std::string& v) const { return m_fontweight.is (v); }
13152  std::string get_fontweight () const { return m_fontweight.current_value (); }
13153 
13154  bool foregroundcolor_is_rgb () const { return m_foregroundcolor.is_rgb (); }
13155  bool foregroundcolor_is (const std::string& v) const { return m_foregroundcolor.is (v); }
13156  Matrix get_foregroundcolor_rgb () const { return (m_foregroundcolor.is_rgb () ? m_foregroundcolor.rgb () : Matrix ()); }
13157  octave_value get_foregroundcolor () const { return m_foregroundcolor.get (); }
13158 
13159  bool highlightcolor_is_rgb () const { return m_highlightcolor.is_rgb (); }
13160  bool highlightcolor_is (const std::string& v) const { return m_highlightcolor.is (v); }
13161  Matrix get_highlightcolor_rgb () const { return (m_highlightcolor.is_rgb () ? m_highlightcolor.rgb () : Matrix ()); }
13162  octave_value get_highlightcolor () const { return m_highlightcolor.get (); }
13163 
13164  octave_value get_position () const { return m_position.get (); }
13165 
13166  void execute_resizefcn (const octave_value& new_data = octave_value ()) const { m_resizefcn.execute (new_data); }
13167  octave_value get_resizefcn () const { return m_resizefcn.get (); }
13168 
13169  bool shadowcolor_is_rgb () const { return m_shadowcolor.is_rgb (); }
13170  bool shadowcolor_is (const std::string& v) const { return m_shadowcolor.is (v); }
13171  Matrix get_shadowcolor_rgb () const { return (m_shadowcolor.is_rgb () ? m_shadowcolor.rgb () : Matrix ()); }
13172  octave_value get_shadowcolor () const { return m_shadowcolor.get (); }
13173 
13174  void execute_sizechangedfcn (const octave_value& new_data = octave_value ()) const { m_sizechangedfcn.execute (new_data); }
13175  octave_value get_sizechangedfcn () const { return m_sizechangedfcn.get (); }
13176 
13177  std::string get_title () const { return m_title.string_value (); }
13178 
13179  bool titleposition_is (const std::string& v) const { return m_titleposition.is (v); }
13180  std::string get_titleposition () const { return m_titleposition.current_value (); }
13181 
13182  bool units_is (const std::string& v) const { return m_units.is (v); }
13183  std::string get_units () const { return m_units.current_value (); }
13184 
13185  octave_value get___object__ () const { return m___object__.get (); }
13186 
13187 
13189  {
13190  if (m_backgroundcolor.set (val, true))
13191  {
13192  mark_modified ();
13193  }
13194  }
13195 
13196  void set_bordertype (const octave_value& val)
13197  {
13198  if (m_bordertype.set (val, true))
13199  {
13200  mark_modified ();
13201  }
13202  }
13203 
13204  void set_borderwidth (const octave_value& val)
13205  {
13206  if (m_borderwidth.set (val, true))
13207  {
13208  mark_modified ();
13209  }
13210  }
13211 
13212  void set_fontangle (const octave_value& val)
13213  {
13214  if (m_fontangle.set (val, true))
13215  {
13216  mark_modified ();
13217  }
13218  }
13219 
13220  void set_fontname (const octave_value& val)
13221  {
13222  if (m_fontname.set (val, true))
13223  {
13224  mark_modified ();
13225  }
13226  }
13227 
13228  void set_fontsize (const octave_value& val)
13229  {
13230  if (m_fontsize.set (val, true))
13231  {
13232  mark_modified ();
13233  }
13234  }
13235 
13236  void set_fontunits (const octave_value& val);
13237 
13238  void set_fontweight (const octave_value& val)
13239  {
13240  if (m_fontweight.set (val, true))
13241  {
13242  mark_modified ();
13243  }
13244  }
13245 
13247  {
13248  if (m_foregroundcolor.set (val, true))
13249  {
13250  mark_modified ();
13251  }
13252  }
13253 
13255  {
13256  if (m_highlightcolor.set (val, true))
13257  {
13258  mark_modified ();
13259  }
13260  }
13261 
13262  void set_position (const octave_value& val);
13263 
13264  void set_resizefcn (const octave_value& val)
13265  {
13266  if (m_resizefcn.set (val, true))
13267  {
13268  mark_modified ();
13269  }
13270  }
13271 
13272  void set_shadowcolor (const octave_value& val)
13273  {
13274  if (m_shadowcolor.set (val, true))
13275  {
13276  mark_modified ();
13277  }
13278  }
13279 
13281  {
13282  if (m_sizechangedfcn.set (val, true))
13283  {
13284  mark_modified ();
13285  }
13286  }
13287 
13288  void set_title (const octave_value& val)
13289  {
13290  if (m_title.set (val, true))
13291  {
13292  mark_modified ();
13293  }
13294  }
13295 
13297  {
13298  if (m_titleposition.set (val, true))
13299  {
13300  mark_modified ();
13301  }
13302  }
13303 
13304  void set_units (const octave_value& val);
13305 
13306  void set___object__ (const octave_value& val)
13307  {
13308  if (m___object__.set (val, true))
13309  {
13310  mark_modified ();
13311  }
13312  }
13313 
13314 
13315  protected:
13316  void init ()
13317  {
13318  m_borderwidth.add_constraint ("min", 0.0, true);
13319  m_fontsize.add_constraint ("min", 0.0, false);
13320  m_position.add_constraint (dim_vector (1, 4));
13321  }
13322 
13323  OCTINTERP_API void update_units (const caseless_str& old_units);
13324  OCTINTERP_API void update_fontunits (const caseless_str& old_units);
13325 
13326  };
13327 
13328 private:
13329  properties m_properties;
13330 
13331 public:
13333  : base_graphics_object (), m_properties (mh, p)
13334  { }
13335 
13336  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (uipanel)
13337 
13338  ~uipanel () = default;
13339 
13340  base_properties& get_properties () { return m_properties; }
13341 
13342  const base_properties& get_properties () const { return m_properties; }
13343 
13344  bool valid_object () const { return true; }
13345 
13346  bool has_readonly_property (const caseless_str& pname) const
13347  {
13348  bool retval = m_properties.has_readonly_property (pname);
13349  if (! retval)
13350  retval = base_properties::has_readonly_property (pname);
13351  return retval;
13352  }
13353 };
13354 
13355 // ---------------------------------------------------------------------
13356 
13357 class OCTINTERP_API uitable : public base_graphics_object
13358 {
13359 public:
13360 
13361  class OCTINTERP_API properties : public base_properties
13362  {
13363  public:
13364 
13365  OCTINTERP_API Matrix
13366  get_boundingbox (bool internal = false,
13367  const Matrix& parent_pix_size = Matrix ()) const;
13368 
13369  OCTINTERP_API double
13370  get___fontsize_points__ (double box_pix_height = 0) const;
13371 
13372  OCTINTERP_API double
13373  get_fontsize_pixels (double box_pix_height = 0) const;
13374 
13375  // See the genprops.awk script for an explanation of the
13376  // properties declarations.
13377  // Programming note: Keep property list sorted if new ones are added.
13378 
13379  // FIXME: keypressfcn, keyreleasefcn, rearrangeablecolumns properties
13380  // seem to have been removed from Matlab.
13381 
13382 public:
13383  properties (const graphics_handle& mh, const graphics_handle& p);
13384 
13385  properties () = delete;
13386 
13387  OCTAVE_DISABLE_COPY_MOVE (properties)
13388 
13389  ~properties () = default;
13390 
13391  void set (const caseless_str& pname, const octave_value& val);
13392 
13393  octave_value get (bool all = false) const;
13394 
13395  octave_value get (const caseless_str& pname) const;
13396 
13397  octave_value get (const std::string& pname) const
13398  {
13399  return get (caseless_str (pname));
13400  }
13401 
13402  octave_value get (const char *pname) const
13403  {
13404  return get (caseless_str (pname));
13405  }
13406 
13407  property get_property (const caseless_str& pname);
13408 
13409  std::string graphics_object_name () const { return s_go_name; }
13410 
13411  static property_list::pval_map_type factory_defaults ();
13412 
13413 private:
13414  static std::string s_go_name;
13415 
13416 public:
13417 
13418 
13419  static std::set<std::string> core_property_names ();
13420 
13421  static std::set<std::string> readonly_property_names ();
13422 
13423  static bool has_core_property (const caseless_str& pname);
13424 
13425  static bool has_readonly_property (const caseless_str& pname);
13426 
13427  std::set<std::string> all_property_names () const;
13428 
13429  bool has_property (const caseless_str& pname) const;
13430 
13431 private:
13432 
13433  any_property m___object__;
13434  array_property m_backgroundcolor;
13435  callback_property m_celleditcallback;
13436  callback_property m_cellselectioncallback;
13437  row_vector_property m_columneditable;
13438  any_property m_columnformat;
13439  any_property m_columnname;
13440  any_property m_columnwidth;
13441  any_property m_data;
13442  bool_property m_enable;
13443  array_property m_extent;
13444  radio_property m_fontangle;
13445  string_property m_fontname;
13446  double_property m_fontsize;
13447  radio_property m_fontunits;
13448  radio_property m_fontweight;
13449  color_property m_foregroundcolor;
13450  callback_property m_keypressfcn;
13451  callback_property m_keyreleasefcn;
13452  array_property m_position;
13453  bool_property m_rearrangeablecolumns;
13454  any_property m_rowname;
13455  bool_property m_rowstriping;
13456  string_property m_tooltipstring;
13457  radio_property m_units;
13458 
13459 public:
13460 
13461  enum
13462  {
13463  ID___OBJECT__ = 17000,
13464  ID_BACKGROUNDCOLOR = 17001,
13465  ID_CELLEDITCALLBACK = 17002,
13466  ID_CELLSELECTIONCALLBACK = 17003,
13467  ID_COLUMNEDITABLE = 17004,
13468  ID_COLUMNFORMAT = 17005,
13469  ID_COLUMNNAME = 17006,
13470  ID_COLUMNWIDTH = 17007,
13471  ID_DATA = 17008,
13472  ID_ENABLE = 17009,
13473  ID_EXTENT = 17010,
13474  ID_FONTANGLE = 17011,
13475  ID_FONTNAME = 17012,
13476  ID_FONTSIZE = 17013,
13477  ID_FONTUNITS = 17014,
13478  ID_FONTWEIGHT = 17015,
13479  ID_FOREGROUNDCOLOR = 17016,
13480  ID_KEYPRESSFCN = 17017,
13481  ID_KEYRELEASEFCN = 17018,
13482  ID_POSITION = 17019,
13483  ID_REARRANGEABLECOLUMNS = 17020,
13484  ID_ROWNAME = 17021,
13485  ID_ROWSTRIPING = 17022,
13486  ID_TOOLTIPSTRING = 17023,
13487  ID_UNITS = 17024
13488  };
13489 
13490  octave_value get___object__ () const { return m___object__.get (); }
13491 
13492  octave_value get_backgroundcolor () const { return m_backgroundcolor.get (); }
13493 
13494  void execute_celleditcallback (const octave_value& new_data = octave_value ()) const { m_celleditcallback.execute (new_data); }
13495  octave_value get_celleditcallback () const { return m_celleditcallback.get (); }
13496 
13497  void execute_cellselectioncallback (const octave_value& new_data = octave_value ()) const { m_cellselectioncallback.execute (new_data); }
13498  octave_value get_cellselectioncallback () const { return m_cellselectioncallback.get (); }
13499 
13500  octave_value get_columneditable () const { return m_columneditable.get (); }
13501 
13502  octave_value get_columnformat () const { return m_columnformat.get (); }
13503 
13504  octave_value get_columnname () const { return m_columnname.get (); }
13505 
13506  octave_value get_columnwidth () const { return m_columnwidth.get (); }
13507 
13508  octave_value get_data () const { return m_data.get (); }
13509 
13510  bool is_enable () const { return m_enable.is_on (); }
13511  std::string get_enable () const { return m_enable.current_value (); }
13512 
13513  octave_value get_extent () const;
13514 
13515  bool fontangle_is (const std::string& v) const { return m_fontangle.is (v); }
13516  std::string get_fontangle () const { return m_fontangle.current_value (); }
13517 
13518  std::string get_fontname () const { return m_fontname.string_value (); }
13519 
13520  double get_fontsize () const { return m_fontsize.double_value (); }
13521 
13522  bool fontunits_is (const std::string& v) const { return m_fontunits.is (v); }
13523  std::string get_fontunits () const { return m_fontunits.current_value (); }
13524 
13525  bool fontweight_is (const std::string& v) const { return m_fontweight.is (v); }
13526  std::string get_fontweight () const { return m_fontweight.current_value (); }
13527 
13528  bool foregroundcolor_is_rgb () const { return m_foregroundcolor.is_rgb (); }
13529  bool foregroundcolor_is (const std::string& v) const { return m_foregroundcolor.is (v); }
13530  Matrix get_foregroundcolor_rgb () const { return (m_foregroundcolor.is_rgb () ? m_foregroundcolor.rgb () : Matrix ()); }
13531  octave_value get_foregroundcolor () const { return m_foregroundcolor.get (); }
13532 
13533  void execute_keypressfcn (const octave_value& new_data = octave_value ()) const { m_keypressfcn.execute (new_data); }
13534  octave_value get_keypressfcn () const { return m_keypressfcn.get (); }
13535 
13536  void execute_keyreleasefcn (const octave_value& new_data = octave_value ()) const { m_keyreleasefcn.execute (new_data); }
13537  octave_value get_keyreleasefcn () const { return m_keyreleasefcn.get (); }
13538 
13539  octave_value get_position () const { return m_position.get (); }
13540 
13541  bool is_rearrangeablecolumns () const { return m_rearrangeablecolumns.is_on (); }
13542  std::string get_rearrangeablecolumns () const { return m_rearrangeablecolumns.current_value (); }
13543 
13544  octave_value get_rowname () const { return m_rowname.get (); }
13545 
13546  bool is_rowstriping () const { return m_rowstriping.is_on (); }
13547  std::string get_rowstriping () const { return m_rowstriping.current_value (); }
13548 
13549  std::string get_tooltipstring () const { return m_tooltipstring.string_value (); }
13550 
13551  bool units_is (const std::string& v) const { return m_units.is (v); }
13552  std::string get_units () const { return m_units.current_value (); }
13553 
13554 
13555  void set___object__ (const octave_value& val)
13556  {
13557  if (m___object__.set (val, true))
13558  {
13559  mark_modified ();
13560  }
13561  }
13562 
13564  {
13565  if (m_backgroundcolor.set (val, true))
13566  {
13567  mark_modified ();
13568  }
13569  }
13570 
13572  {
13573  if (m_celleditcallback.set (val, true))
13574  {
13575  mark_modified ();
13576  }
13577  }
13578 
13580  {
13581  if (m_cellselectioncallback.set (val, true))
13582  {
13583  mark_modified ();
13584  }
13585  }
13586 
13588  {
13589  if (m_columneditable.set (val, true))
13590  {
13591  mark_modified ();
13592  }
13593  }
13594 
13595  void set_columnformat (const octave_value& val);
13596 
13597  void set_columnname (const octave_value& val)
13598  {
13599  if (m_columnname.set (val, true))
13600  {
13601  mark_modified ();
13602  }
13603  }
13604 
13605  void set_columnwidth (const octave_value& val);
13606 
13607  void set_data (const octave_value& val)
13608  {
13609  if (m_data.set (val, true))
13610  {
13611  update_data ();
13612  mark_modified ();
13613  }
13614  }
13615 
13616  void set_enable (const octave_value& val)
13617  {
13618  if (m_enable.set (val, true))
13619  {
13620  mark_modified ();
13621  }
13622  }
13623 
13624  void set_extent (const octave_value& val)
13625  {
13626  if (m_extent.set (val, true))
13627  {
13628  mark_modified ();
13629  }
13630  }
13631 
13632  void set_fontangle (const octave_value& val)
13633  {
13634  if (m_fontangle.set (val, true))
13635  {
13636  update_fontangle ();
13637  mark_modified ();
13638  }
13639  }
13640 
13641  void set_fontname (const octave_value& val)
13642  {
13643  if (m_fontname.set (val, true))
13644  {
13645  update_fontname ();
13646  mark_modified ();
13647  }
13648  }
13649 
13650  void set_fontsize (const octave_value& val)
13651  {
13652  if (m_fontsize.set (val, true))
13653  {
13654  update_fontsize ();
13655  mark_modified ();
13656  }
13657  }
13658 
13659  void set_fontunits (const octave_value& val);
13660 
13661  void set_fontweight (const octave_value& val)
13662  {
13663  if (m_fontweight.set (val, true))
13664  {
13665  update_fontweight ();
13666  mark_modified ();
13667  }
13668  }
13669 
13671  {
13672  if (m_foregroundcolor.set (val, true))
13673  {
13674  mark_modified ();
13675  }
13676  }
13677 
13678  void set_keypressfcn (const octave_value& val)
13679  {
13680  if (m_keypressfcn.set (val, true))
13681  {
13682  mark_modified ();
13683  }
13684  }
13685 
13687  {
13688  if (m_keyreleasefcn.set (val, true))
13689  {
13690  mark_modified ();
13691  }
13692  }
13693 
13694  void set_position (const octave_value& val)
13695  {
13696  if (m_position.set (val, true))
13697  {
13698  mark_modified ();
13699  }
13700  }
13701 
13703  {
13704  if (m_rearrangeablecolumns.set (val, true))
13705  {
13706  mark_modified ();
13707  }
13708  }
13709 
13710  void set_rowname (const octave_value& val)
13711  {
13712  if (m_rowname.set (val, true))
13713  {
13714  mark_modified ();
13715  }
13716  }
13717 
13718  void set_rowstriping (const octave_value& val)
13719  {
13720  if (m_rowstriping.set (val, true))
13721  {
13722  mark_modified ();
13723  }
13724  }
13725 
13727  {
13728  if (m_tooltipstring.set (val, true))
13729  {
13730  mark_modified ();
13731  }
13732  }
13733 
13734  void set_units (const octave_value& val);
13735 
13736 
13737  OCTINTERP_API Matrix get_extent_matrix () const;
13738 
13739  OCTINTERP_API Matrix get_backgroundcolor_rgb ();
13740 
13741  OCTINTERP_API Matrix get_alternatebackgroundcolor_rgb ();
13742 
13743  protected:
13744  void init ()
13745  {
13746  m_position.add_constraint (dim_vector (1, 4));
13747  m_extent.add_constraint (dim_vector (1, 4));
13748  m_backgroundcolor.add_constraint ("double");
13749  m_backgroundcolor.add_constraint (dim_vector (-1, 3));
13750  m_columneditable.add_constraint ("logical");
13751  }
13752 
13753  OCTINTERP_API void update_units (const caseless_str& old_units);
13754  OCTINTERP_API void update_fontunits (const caseless_str& old_units);
13755  void update_table_extent () { };
13756  void update_data () { update_table_extent (); }
13757  void update_fontname () { update_table_extent (); }
13758  void update_fontsize () { update_table_extent (); }
13760  {
13761  update_table_extent ();
13762  }
13763  void update_fontweight () { update_table_extent (); }
13764  };
13765 
13766 private:
13767  properties m_properties;
13768 
13769 public:
13771  : base_graphics_object (), m_properties (mh, p)
13772  { }
13773 
13774  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (uitable)
13775 
13776  ~uitable () = default;
13777 
13778  base_properties& get_properties () { return m_properties; }
13779 
13780  const base_properties& get_properties () const { return m_properties; }
13781 
13782  bool valid_object () const { return true; }
13783 
13784  bool has_readonly_property (const caseless_str& pname) const
13785  {
13786  bool retval = m_properties.has_readonly_property (pname);
13787  if (! retval)
13788  retval = base_properties::has_readonly_property (pname);
13789  return retval;
13790  }
13791 };
13792 
13793 // ---------------------------------------------------------------------
13794 
13795 class OCTINTERP_API uitoolbar : public base_graphics_object
13796 {
13797 public:
13798 
13799  class OCTINTERP_API properties : public base_properties
13800  {
13801  public:
13802 
13803  // See the genprops.awk script for an explanation of the
13804  // properties declarations.
13805  // Programming note: Keep property list sorted if new ones are added.
13806 
13807 public:
13808  properties (const graphics_handle& mh, const graphics_handle& p);
13809 
13810  properties () = delete;
13811 
13812  OCTAVE_DISABLE_COPY_MOVE (properties)
13813 
13814  ~properties () = default;
13815 
13816  void set (const caseless_str& pname, const octave_value& val);
13817 
13818  octave_value get (bool all = false) const;
13819 
13820  octave_value get (const caseless_str& pname) const;
13821 
13822  octave_value get (const std::string& pname) const
13823  {
13824  return get (caseless_str (pname));
13825  }
13826 
13827  octave_value get (const char *pname) const
13828  {
13829  return get (caseless_str (pname));
13830  }
13831 
13832  property get_property (const caseless_str& pname);
13833 
13834  std::string graphics_object_name () const { return s_go_name; }
13835 
13836  static property_list::pval_map_type factory_defaults ();
13837 
13838 private:
13839  static std::string s_go_name;
13840 
13841 public:
13842 
13843 
13844  static std::set<std::string> core_property_names ();
13845 
13846  static std::set<std::string> readonly_property_names ();
13847 
13848  static bool has_core_property (const caseless_str& pname);
13849 
13850  static bool has_readonly_property (const caseless_str& pname);
13851 
13852  std::set<std::string> all_property_names () const;
13853 
13854  bool has_property (const caseless_str& pname) const;
13855 
13856 private:
13857 
13858  any_property m___object__;
13859 
13860 public:
13861 
13862  enum
13863  {
13864  ID___OBJECT__ = 18000
13865  };
13866 
13867  octave_value get___object__ () const { return m___object__.get (); }
13868 
13869 
13870  void set___object__ (const octave_value& val)
13871  {
13872  if (m___object__.set (val, true))
13873  {
13874  mark_modified ();
13875  }
13876  }
13877 
13878 
13879  protected:
13880  void init ()
13881  { }
13882  };
13883 
13884 private:
13885  properties m_properties;
13886 
13887 public:
13889  : base_graphics_object (), m_properties (mh, p), m_default_properties ()
13890  { }
13891 
13892  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (uitoolbar)
13893 
13894  ~uitoolbar () = default;
13895 
13897  {
13898  // Allow parent (figure) to override first (properties knows how
13899  // to find the parent object).
13900  m_properties.override_defaults (obj);
13901 
13902  // Now override with our defaults. If the default_properties
13903  // list includes the properties for all defaults (line,
13904  // surface, etc.) then we don't have to know the type of OBJ
13905  // here, we just call its set function and let it decide which
13906  // properties from the list to use.
13907  obj.set_from_list (m_default_properties);
13908  }
13909 
13910  void set (const caseless_str& name, const octave_value& value)
13911  {
13912  if (name.compare ("default", 7))
13913  // strip "default", pass rest to function that will
13914  // parse the remainder and add the element to the
13915  // default_properties map.
13916  m_default_properties.set (name.substr (7), value);
13917  else
13918  m_properties.set (name, value);
13919  }
13920 
13921  octave_value get (const caseless_str& name) const
13922  {
13923  octave_value retval;
13924 
13925  if (name.compare ("default", 7))
13926  retval = get_default (name.substr (7));
13927  else
13928  retval = m_properties.get (name);
13929 
13930  return retval;
13931  }
13932 
13933  OCTINTERP_API octave_value get_default (const caseless_str& name) const;
13934 
13936  {
13937  return m_default_properties.as_struct ("default");
13938  }
13939 
13941  {
13942  return m_default_properties;
13943  }
13944 
13945  base_properties& get_properties () { return m_properties; }
13946 
13947  const base_properties& get_properties () const { return m_properties; }
13948 
13949  bool valid_object () const { return true; }
13950 
13951  OCTINTERP_API void reset_default_properties ();
13952 
13953  bool has_readonly_property (const caseless_str& pname) const
13954  {
13955  bool retval = m_properties.has_readonly_property (pname);
13956  if (! retval)
13957  retval = base_properties::has_readonly_property (pname);
13958  return retval;
13959  }
13960 
13961 private:
13962  property_list m_default_properties;
13963 };
13964 
13965 // ---------------------------------------------------------------------
13966 
13967 class OCTINTERP_API uipushtool : public base_graphics_object
13968 {
13969 public:
13970 
13971  class OCTINTERP_API properties : public base_properties
13972  {
13973  public:
13974 
13975  // See the genprops.awk script for an explanation of the
13976  // properties declarations.
13977  // Programming note: Keep property list sorted if new ones are added.
13978 
13979 public:
13980  properties (const graphics_handle& mh, const graphics_handle& p);
13981 
13982  properties () = delete;
13983 
13984  OCTAVE_DISABLE_COPY_MOVE (properties)
13985 
13986  ~properties () = default;
13987 
13988  void set (const caseless_str& pname, const octave_value& val);
13989 
13990  octave_value get (bool all = false) const;
13991 
13992  octave_value get (const caseless_str& pname) const;
13993 
13994  octave_value get (const std::string& pname) const
13995  {
13996  return get (caseless_str (pname));
13997  }
13998 
13999  octave_value get (const char *pname) const
14000  {
14001  return get (caseless_str (pname));
14002  }
14003 
14004  property get_property (const caseless_str& pname);
14005 
14006  std::string graphics_object_name () const { return s_go_name; }
14007 
14008  static property_list::pval_map_type factory_defaults ();
14009 
14010 private:
14011  static std::string s_go_name;
14012 
14013 public:
14014 
14015 
14016  static std::set<std::string> core_property_names ();
14017 
14018  static std::set<std::string> readonly_property_names ();
14019 
14020  static bool has_core_property (const caseless_str& pname);
14021 
14022  static bool has_readonly_property (const caseless_str& pname);
14023 
14024  std::set<std::string> all_property_names () const;
14025 
14026  bool has_property (const caseless_str& pname) const;
14027 
14028 private:
14029 
14030  array_property m_cdata;
14031  callback_property m_clickedcallback;
14032  bool_property m_enable;
14033  bool_property m_separator;
14034  string_property m_tooltipstring;
14035  string_property m___named_icon__;
14036  any_property m___object__;
14037 
14038 public:
14039 
14040  enum
14041  {
14042  ID_CDATA = 19000,
14043  ID_CLICKEDCALLBACK = 19001,
14044  ID_ENABLE = 19002,
14045  ID_SEPARATOR = 19003,
14046  ID_TOOLTIPSTRING = 19004,
14047  ID___NAMED_ICON__ = 19005,
14048  ID___OBJECT__ = 19006
14049  };
14050 
14051  octave_value get_cdata () const { return m_cdata.get (); }
14052 
14053  void execute_clickedcallback (const octave_value& new_data = octave_value ()) const { m_clickedcallback.execute (new_data); }
14054  octave_value get_clickedcallback () const { return m_clickedcallback.get (); }
14055 
14056  bool is_enable () const { return m_enable.is_on (); }
14057  std::string get_enable () const { return m_enable.current_value (); }
14058 
14059  bool is_separator () const { return m_separator.is_on (); }
14060  std::string get_separator () const { return m_separator.current_value (); }
14061 
14062  std::string get_tooltipstring () const { return m_tooltipstring.string_value (); }
14063 
14064  std::string get___named_icon__ () const { return m___named_icon__.string_value (); }
14065 
14066  octave_value get___object__ () const { return m___object__.get (); }
14067 
14068 
14069  void set_cdata (const octave_value& val)
14070  {
14071  if (m_cdata.set (val, true))
14072  {
14073  mark_modified ();
14074  }
14075  }
14076 
14078  {
14079  if (m_clickedcallback.set (val, true))
14080  {
14081  mark_modified ();
14082  }
14083  }
14084 
14085  void set_enable (const octave_value& val)
14086  {
14087  if (m_enable.set (val, true))
14088  {
14089  mark_modified ();
14090  }
14091  }
14092 
14093  void set_separator (const octave_value& val)
14094  {
14095  if (m_separator.set (val, true))
14096  {
14097  mark_modified ();
14098  }
14099  }
14100 
14102  {
14103  if (m_tooltipstring.set (val, true))
14104  {
14105  mark_modified ();
14106  }
14107  }
14108 
14110  {
14111  if (m___named_icon__.set (val, true))
14112  {
14113  mark_modified ();
14114  }
14115  }
14116 
14117  void set___object__ (const octave_value& val)
14118  {
14119  if (m___object__.set (val, true))
14120  {
14121  mark_modified ();
14122  }
14123  }
14124 
14125 
14126  protected:
14127  void init ()
14128  {
14129  m_cdata.add_constraint ("double");
14130  m_cdata.add_constraint ("single");
14131  m_cdata.add_constraint ("uint8");
14132  m_cdata.add_constraint (dim_vector (-1, -1, 3));
14133  m_cdata.add_constraint (dim_vector (0, 0));
14134  }
14135  };
14136 
14137 private:
14138  properties m_properties;
14139 
14140 public:
14142  : base_graphics_object (), m_properties (mh, p)
14143  { }
14144 
14145  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (uipushtool)
14146 
14147  ~uipushtool () = default;
14148 
14149  base_properties& get_properties () { return m_properties; }
14150 
14151  const base_properties& get_properties () const { return m_properties; }
14152 
14153  bool valid_object () const { return true; }
14154 
14155  bool has_readonly_property (const caseless_str& pname) const
14156  {
14157  bool retval = m_properties.has_readonly_property (pname);
14158  if (! retval)
14159  retval = base_properties::has_readonly_property (pname);
14160  return retval;
14161  }
14162 
14163 };
14164 
14165 // ---------------------------------------------------------------------
14166 
14167 class OCTINTERP_API uitoggletool : public base_graphics_object
14168 {
14169 public:
14170 
14171  class OCTINTERP_API properties : public base_properties
14172  {
14173  public:
14174 
14175  // See the genprops.awk script for an explanation of the
14176  // properties declarations.
14177  // Programming note: Keep property list sorted if new ones are added.
14178 
14179 public:
14180  properties (const graphics_handle& mh, const graphics_handle& p);
14181 
14182  properties () = delete;
14183 
14184  OCTAVE_DISABLE_COPY_MOVE (properties)
14185 
14186  ~properties () = default;
14187 
14188  void set (const caseless_str& pname, const octave_value& val);
14189 
14190  octave_value get (bool all = false) const;
14191 
14192  octave_value get (const caseless_str& pname) const;
14193 
14194  octave_value get (const std::string& pname) const
14195  {
14196  return get (caseless_str (pname));
14197  }
14198 
14199  octave_value get (const char *pname) const
14200  {
14201  return get (caseless_str (pname));
14202  }
14203 
14204  property get_property (const caseless_str& pname);
14205 
14206  std::string graphics_object_name () const { return s_go_name; }
14207 
14208  static property_list::pval_map_type factory_defaults ();
14209 
14210 private:
14211  static std::string s_go_name;
14212 
14213 public:
14214 
14215 
14216  static std::set<std::string> core_property_names ();
14217 
14218  static std::set<std::string> readonly_property_names ();
14219 
14220  static bool has_core_property (const caseless_str& pname);
14221 
14222  static bool has_readonly_property (const caseless_str& pname);
14223 
14224  std::set<std::string> all_property_names () const;
14225 
14226  bool has_property (const caseless_str& pname) const;
14227 
14228 private:
14229 
14230  array_property m_cdata;
14231  callback_property m_clickedcallback;
14232  bool_property m_enable;
14233  callback_property m_offcallback;
14234  callback_property m_oncallback;
14235  bool_property m_separator;
14236  bool_property m_state;
14237  string_property m_tooltipstring;
14238  string_property m___named_icon__;
14239  any_property m___object__;
14240 
14241 public:
14242 
14243  enum
14244  {
14245  ID_CDATA = 20000,
14246  ID_CLICKEDCALLBACK = 20001,
14247  ID_ENABLE = 20002,
14248  ID_OFFCALLBACK = 20003,
14249  ID_ONCALLBACK = 20004,
14250  ID_SEPARATOR = 20005,
14251  ID_STATE = 20006,
14252  ID_TOOLTIPSTRING = 20007,
14253  ID___NAMED_ICON__ = 20008,
14254  ID___OBJECT__ = 20009
14255  };
14256 
14257  octave_value get_cdata () const { return m_cdata.get (); }
14258 
14259  void execute_clickedcallback (const octave_value& new_data = octave_value ()) const { m_clickedcallback.execute (new_data); }
14260  octave_value get_clickedcallback () const { return m_clickedcallback.get (); }
14261 
14262  bool is_enable () const { return m_enable.is_on (); }
14263  std::string get_enable () const { return m_enable.current_value (); }
14264 
14265  void execute_offcallback (const octave_value& new_data = octave_value ()) const { m_offcallback.execute (new_data); }
14266  octave_value get_offcallback () const { return m_offcallback.get (); }
14267 
14268  void execute_oncallback (const octave_value& new_data = octave_value ()) const { m_oncallback.execute (new_data); }
14269  octave_value get_oncallback () const { return m_oncallback.get (); }
14270 
14271  bool is_separator () const { return m_separator.is_on (); }
14272  std::string get_separator () const { return m_separator.current_value (); }
14273 
14274  bool is_state () const { return m_state.is_on (); }
14275  std::string get_state () const { return m_state.current_value (); }
14276 
14277  std::string get_tooltipstring () const { return m_tooltipstring.string_value (); }
14278 
14279  std::string get___named_icon__ () const { return m___named_icon__.string_value (); }
14280 
14281  octave_value get___object__ () const { return m___object__.get (); }
14282 
14283 
14284  void set_cdata (const octave_value& val)
14285  {
14286  if (m_cdata.set (val, true))
14287  {
14288  mark_modified ();
14289  }
14290  }
14291 
14293  {
14294  if (m_clickedcallback.set (val, true))
14295  {
14296  mark_modified ();
14297  }
14298  }
14299 
14300  void set_enable (const octave_value& val)
14301  {
14302  if (m_enable.set (val, true))
14303  {
14304  mark_modified ();
14305  }
14306  }
14307 
14308  void set_offcallback (const octave_value& val)
14309  {
14310  if (m_offcallback.set (val, true))
14311  {
14312  mark_modified ();
14313  }
14314  }
14315 
14316  void set_oncallback (const octave_value& val)
14317  {
14318  if (m_oncallback.set (val, true))
14319  {
14320  mark_modified ();
14321  }
14322  }
14323 
14324  void set_separator (const octave_value& val)
14325  {
14326  if (m_separator.set (val, true))
14327  {
14328  mark_modified ();
14329  }
14330  }
14331 
14332  void set_state (const octave_value& val)
14333  {
14334  if (m_state.set (val, true))
14335  {
14336  mark_modified ();
14337  }
14338  }
14339 
14341  {
14342  if (m_tooltipstring.set (val, true))
14343  {
14344  mark_modified ();
14345  }
14346  }
14347 
14349  {
14350  if (m___named_icon__.set (val, true))
14351  {
14352  mark_modified ();
14353  }
14354  }
14355 
14356  void set___object__ (const octave_value& val)
14357  {
14358  if (m___object__.set (val, true))
14359  {
14360  mark_modified ();
14361  }
14362  }
14363 
14364 
14365  protected:
14366  void init ()
14367  {
14368  m_cdata.add_constraint ("double");
14369  m_cdata.add_constraint ("single");
14370  m_cdata.add_constraint ("uint8");
14371  m_cdata.add_constraint (dim_vector (-1, -1, 3));
14372  m_cdata.add_constraint (dim_vector (0, 0));
14373  }
14374  };
14375 
14376 private:
14377  properties m_properties;
14378 
14379 public:
14381  : base_graphics_object (), m_properties (mh, p)
14382  { }
14383 
14384  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (uitoggletool)
14385 
14386  ~uitoggletool () = default;
14387 
14388  base_properties& get_properties () { return m_properties; }
14389 
14390  const base_properties& get_properties () const { return m_properties; }
14391 
14392  bool valid_object () const { return true; }
14393 
14394  bool has_readonly_property (const caseless_str& pname) const
14395  {
14396  bool retval = m_properties.has_readonly_property (pname);
14397  if (! retval)
14398  retval = base_properties::has_readonly_property (pname);
14399  return retval;
14400  }
14401 
14402 };
14403 
14404 // ---------------------------------------------------------------------
14405 
14406 OCTINTERP_API octave_value
14407 get_property_from_handle (double handle, const std::string& property,
14408  const std::string& fcn);
14409 OCTINTERP_API bool
14410 set_property_in_handle (double handle, const std::string& property,
14411  const octave_value& arg, const std::string& fcn);
14412 
14413 // ---------------------------------------------------------------------
14414 
14415 class graphics_event;
14416 
14417 class
14418 OCTINTERP_API
14420 {
14421 public:
14422  enum priority { INTERRUPT, QUEUE, CANCEL };
14423 
14424  friend class graphics_event;
14425 
14427  : m_busyaction (QUEUE)
14428  { };
14429 
14430  base_graphics_event (int busyaction)
14431  : m_busyaction (busyaction)
14432  { };
14433 
14434  OCTAVE_DEFAULT_COPY_MOVE (base_graphics_event)
14435 
14436  virtual ~base_graphics_event () = default;
14437 
14438  int get_busyaction () { return m_busyaction; };
14439 
14440  virtual void execute () = 0;
14441 
14442 private:
14443  int m_busyaction;
14444 };
14445 
14446 class
14447 OCTINTERP_API
14449 {
14450 public:
14451 
14452  typedef void (*event_fcn) (void *);
14453 
14454  graphics_event () = default;
14455 
14456  graphics_event (base_graphics_event *new_rep) : m_rep (new_rep) { }
14457 
14458  graphics_event (const graphics_event&) = default;
14459 
14460  ~graphics_event () = default;
14461 
14463 
14465  {
14466  if (ok ())
14467  return m_rep->get_busyaction ();
14468  else
14469  error ("graphics_event::busyaction: invalid graphics_event");
14470  }
14471 
14472  void execute ()
14473  {
14474  if (ok ())
14475  m_rep->execute ();
14476  }
14477 
14478  bool ok () const { return (m_rep != nullptr); }
14479 
14480  static OCTINTERP_API graphics_event
14482  const std::string& name,
14483  const octave_value& data = Matrix (),
14484  int busyaction = base_graphics_event::QUEUE);
14485 
14486  static OCTINTERP_API graphics_event
14488  const octave_value& cb,
14489  const octave_value& data = Matrix (),
14490  int busyaction = base_graphics_event::QUEUE);
14491 
14492  static OCTINTERP_API graphics_event
14493  create_mcode_event (const graphics_handle& h, const std::string& cmd,
14494  int busyaction);
14495 
14496  static OCTINTERP_API graphics_event
14497  create_function_event (event_fcn fcn, void *data = nullptr);
14498 
14499  static OCTINTERP_API graphics_event
14500  create_set_event (const graphics_handle& h, const std::string& name,
14501  const octave_value& value, bool notify_toolkit = true,
14502  bool redraw_figure = false);
14503 private:
14504 
14505  std::shared_ptr <base_graphics_event> m_rep;
14506 };
14507 
14508 OCTINTERP_API base_graphics_object *
14510  const graphics_handle& h = graphics_handle (),
14511  const graphics_handle& p = graphics_handle ());
14512 
14513 OCTINTERP_API void
14514 get_children_limits (double& min_val, double& max_val,
14515  double& min_pos, double& max_neg,
14516  const Matrix& kids, char limit_type);
14517 
14518 OCTINTERP_API int calc_dimensions (const graphics_object& gh);
14519 
14520 // This function is NOT equivalent to the scripting language function gcf.
14521 OCTINTERP_API graphics_handle gcf ();
14522 
14523 // This function is NOT equivalent to the scripting language function gca.
14524 OCTINTERP_API graphics_handle gca ();
14525 
14526 OCTINTERP_API void close_all_figures ();
14527 
14528 OCTAVE_END_NAMESPACE(octave)
14529 
14530 #endif
#define Inf
Definition: Faddeeva.cc:260
#define NaN
Definition: Faddeeva.cc:261
octave_idx_type lookup(const T *x, octave_idx_type n, T y)
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:230
charNDArray min(char d, const charNDArray &m)
Definition: chNDArray.cc:207
T * fortran_vec()
Size of the specified dimension.
Definition: Array-base.cc:1764
octave_idx_type rows() const
Definition: Array.h:459
Array< T, Alloc > sort(int dim=0, sortmode mode=ASCENDING) const
Size of the specified dimension.
Definition: Array-base.cc:1781
T & xelem(octave_idx_type n)
Size of the specified dimension.
Definition: Array.h:524
octave_idx_type numel() const
Number of elements in the array.
Definition: Array.h:414
Definition: Cell.h:43
Array< std::string > cellstr_value() const
Definition: Cell.cc:145
bool iscellstr() const
Definition: Cell.cc:126
MArray< T > reshape(const dim_vector &new_dims) const
Definition: MArray.h:87
Definition: dMatrix.h:42
octave_value get() const
Definition: graphics.h:1745
any_property()=delete
any_property(const std::string &nm, const graphics_handle &h, const octave_value &m=Matrix())
Definition: graphics.h:1736
base_property * clone() const
Definition: graphics.h:1753
~any_property()=default
bool do_set(const octave_value &v)
Definition: graphics.h:1756
~array_property()=default
double m_max_val
Definition: graphics.h:1523
array_property(const array_property &p)
Definition: graphics.h:1421
double m_min_pos
Definition: graphics.h:1524
finite_type m_finite_constraint
Definition: graphics.h:1528
base_property * clone() const
Definition: graphics.h:1478
bool do_set(const octave_value &v)
Definition: graphics.h:1492
array_property(const std::string &nm, const graphics_handle &h, const octave_value &m)
Definition: graphics.h:1406
std::pair< double, bool > m_minval
Definition: graphics.h:1529
double m_max_neg
Definition: graphics.h:1525
Matrix get_limits() const
Definition: graphics.h:1460
octave_value m_data
Definition: graphics.h:1521
double min_val() const
Definition: graphics.h:1455
octave_value get() const
Definition: graphics.h:1436
double max_neg() const
Definition: graphics.h:1458
std::set< std::string > m_type_constraints
Definition: graphics.h:1526
double min_pos() const
Definition: graphics.h:1457
std::pair< double, bool > m_maxval
Definition: graphics.h:1529
void add_constraint(const dim_vector &dims)
Definition: graphics.h:1441
void add_constraint(const std::string &type, double val, bool inclusive)
Definition: graphics.h:1447
double m_min_val
Definition: graphics.h:1522
std::list< dim_vector > m_size_constraints
Definition: graphics.h:1527
void add_constraint(const finite_type finite)
Definition: graphics.h:1444
void add_constraint(const std::string &type)
Definition: graphics.h:1438
double max_val() const
Definition: graphics.h:1456
std::string get_camerapositionmode() const
Definition: graphics.h:5283
void set_xlimmode(const octave_value &val)
Definition: graphics.h:6314
bool yscale_is(const std::string &v) const
Definition: graphics.h:5530
bool positionconstraint_is(const std::string &v) const
Definition: graphics.h:5409
double get_gridalpha() const
Definition: graphics.h:5346
double get_nextseriesindex() const
Definition: graphics.h:5398
std::string get_xlimitmethod() const
Definition: graphics.h:5469
bool is_box() const
Definition: graphics.h:5274
octave_value get_xtick() const
Definition: graphics.h:5483
void set_box(const octave_value &val)
Definition: graphics.h:5652
std::string get_xtickmode() const
Definition: graphics.h:5493
bool minorgridcolor_is_rgb() const
Definition: graphics.h:5384
std::string get_ycolormode() const
Definition: graphics.h:5506
octave_value get_view() const
Definition: graphics.h:5443
unsigned int get_num_lights() const
Definition: graphics.h:4858
octave_value get_position() const
Definition: graphics.h:5407
void set_ylim(const octave_value &val)
Definition: graphics.h:6449
bool ycolormode_is(const std::string &v) const
Definition: graphics.h:5505
void increase_num_lights()
Definition: graphics.h:4856
std::string get_zminorgrid() const
Definition: graphics.h:5572
const scaler & get_y_scaler() const
Definition: graphics.h:4679
bool get_x2Dtop() const
Definition: graphics.h:4798
double get_titlefontsizemultiplier() const
Definition: graphics.h:5433
void set_camerapositionmode(const octave_value &val)
Definition: graphics.h:5682
void set_plotboxaspectratio(const octave_value &val)
Definition: graphics.h:6091
octave_value get(const std::string &pname) const
Definition: graphics.h:4948
std::string get_fontunits() const
Definition: graphics.h:5341
std::string get_xcolormode() const
Definition: graphics.h:5456
void set_fontsizemode(const octave_value &val)
Definition: graphics.h:5880
void set_cameraposition(const octave_value &val)
Definition: graphics.h:5669
void set_ztickmode(const octave_value &val)
Definition: graphics.h:6688
void set_dataaspectratiomode(const octave_value &val)
Definition: graphics.h:5840
std::string get_xgrid() const
Definition: graphics.h:5462
std::string get_xlimmode() const
Definition: graphics.h:5472
bool xcolor_is_rgb() const
Definition: graphics.h:5450
octave_value get_zcolor() const
Definition: graphics.h:5550
std::string get_clippingstyle() const
Definition: graphics.h:5306
bool cameratargetmode_is(const std::string &v) const
Definition: graphics.h:5287
int get_zstate() const
Definition: graphics.h:4770
void set_yminortick(const octave_value &val)
Definition: graphics.h:6489
int get_ystate() const
Definition: graphics.h:4769
void set_xminorgrid(const octave_value &val)
Definition: graphics.h:6324
const scaler & get_x_scaler() const
Definition: graphics.h:4678
bool fontsizemode_is(const std::string &v) const
Definition: graphics.h:5334
std::string get_nextplot() const
Definition: graphics.h:5396
std::string get_alimmode() const
Definition: graphics.h:5262
std::string get_xaxislocation() const
Definition: graphics.h:5448
std::string get_zscale() const
Definition: graphics.h:5578
void set_minorgridalphamode(const octave_value &val)
Definition: graphics.h:6030
bool ambientlightcolor_is_rgb() const
Definition: graphics.h:5269
void set_toolbar(const octave_value &val)
Definition: graphics.h:6214
properties()=delete
octave_value get_cameraposition() const
Definition: graphics.h:5280
std::string get_fontsmoothing() const
Definition: graphics.h:5338
void set_cameratargetmode(const octave_value &val)
Definition: graphics.h:5704
void set_yscale(const octave_value &val)
Definition: graphics.h:6497
void set_layout(const octave_value &val)
Definition: graphics.h:5984
double get_xtickoffset() const
Definition: graphics.h:4795
void set___fontsize_points__(const octave_value &val)
Definition: graphics.h:6755
bool layer_is(const std::string &v) const
Definition: graphics.h:5366
void update_fontunits()
bool minorgridlinestyle_is(const std::string &v) const
Definition: graphics.h:5392
void set_zticklabelmode(const octave_value &val)
Definition: graphics.h:6671
std::string get_activepositionproperty() const
Definition: graphics.h:4715
double get_ytickoffset() const
Definition: graphics.h:4796
void set_nextplot(const octave_value &val)
Definition: graphics.h:6066
void set_titlefontsizemultiplier(const octave_value &val)
Definition: graphics.h:6196
bool minorgridalphamode_is(const std::string &v) const
Definition: graphics.h:5381
std::string get_gridcolormode() const
Definition: graphics.h:5357
void set_color(const octave_value &val)
Definition: graphics.h:5787
bool fontangle_is(const std::string &v) const
Definition: graphics.h:5327
void update_transform()
Definition: graphics.h:4704
std::string get_ylimitmethod() const
Definition: graphics.h:5519
void set_xaxis(const octave_value &val)
Definition: graphics.h:6235
void set_zcolor(const octave_value &val)
Definition: graphics.h:6557
void set_zlim(const octave_value &val)
Definition: graphics.h:6597
std::string get_zcolormode() const
Definition: graphics.h:5553
void set_minorgridcolormode(const octave_value &val)
Definition: graphics.h:6050
std::string get_fontsizemode() const
Definition: graphics.h:5335
void set_activepositionproperty(const octave_value &val)
Definition: graphics.h:4727
Matrix get_ambientlightcolor_rgb() const
Definition: graphics.h:5271
void set_boxstyle(const octave_value &val)
Definition: graphics.h:5661
void set_zscale(const octave_value &val)
Definition: graphics.h:6645
std::string get_fontangle() const
Definition: graphics.h:5328
Matrix get_opengl_matrix_1() const
Definition: graphics.h:4764
bool xscale_is(const std::string &v) const
Definition: graphics.h:5480
void set_minorgridalpha(const octave_value &val)
Definition: graphics.h:6018
bool zcolormode_is(const std::string &v) const
Definition: graphics.h:5552
void set_xlimitmethod(const octave_value &val)
Definition: graphics.h:6305
graphics_handle get_title() const
Definition: graphics.h:5431
std::string get_zlimmode() const
Definition: graphics.h:5569
std::string get_projection() const
Definition: graphics.h:5413
octave_value get___colormap__() const
Definition: graphics.h:5592
octave_value get_dataaspectratio() const
Definition: graphics.h:5322
void update_zlim()
Definition: graphics.h:7169
octave_value get_tightinset() const
Definition: graphics.h:5429
graphics_handle get_layout() const
Definition: graphics.h:5369
void set_ycolormode(const octave_value &val)
Definition: graphics.h:6422
void set_looseinset(const octave_value &val)
Definition: graphics.h:6722
bool xticklabelmode_is(const std::string &v) const
Definition: graphics.h:5487
void set_ztick(const octave_value &val)
Definition: graphics.h:6656
graphics_handle get_legend() const
Definition: graphics.h:5371
void set_currentpoint(const octave_value &val)
Definition: graphics.h:5819
void set_xgrid(const octave_value &val)
Definition: graphics.h:6282
void set_clippingstyle(const octave_value &val)
Definition: graphics.h:5779
void set_cameraupvectormode(const octave_value &val)
Definition: graphics.h:5726
bool alphascale_is(const std::string &v) const
Definition: graphics.h:5266
bool ztickmode_is(const std::string &v) const
Definition: graphics.h:5589
void set_fontname(const octave_value &val)
Definition: graphics.h:5858
bool is_yminortick() const
Definition: graphics.h:5527
bool fontunits_is(const std::string &v) const
Definition: graphics.h:5340
octave_value get_alim() const
Definition: graphics.h:5259
void set_gridcolormode(const octave_value &val)
Definition: graphics.h:5942
void set_yaxis(const octave_value &val)
Definition: graphics.h:6392
octave_value get_cameraupvector() const
Definition: graphics.h:5290
bool cameraviewanglemode_is(const std::string &v) const
Definition: graphics.h:5297
void update_ylim()
Definition: graphics.h:7141
void set___autopos_tag__(const octave_value &val)
Definition: graphics.h:6714
void set_ylimmode(const octave_value &val)
Definition: graphics.h:6471
std::string get_minorgridlinestyle() const
Definition: graphics.h:5393
std::string get_ydir() const
Definition: graphics.h:5509
graphics_handle get_xlabel() const
Definition: graphics.h:5464
std::string get_cameraviewanglemode() const
Definition: graphics.h:5298
ColumnVector pixel2coord(double px, double py) const
Definition: graphics.h:4809
octave_value get_interactions() const
Definition: graphics.h:5362
const scaler & get_z_scaler() const
Definition: graphics.h:4680
double get_fy() const
Definition: graphics.h:4790
double get_yPlane() const
Definition: graphics.h:4773
void set_ycolor(const octave_value &val)
Definition: graphics.h:6409
graphics_handle get_xaxis() const
Definition: graphics.h:5445
void set_interactions(const octave_value &val)
Definition: graphics.h:5958
octave_value get_clim() const
Definition: graphics.h:5300
bool zticklabelmode_is(const std::string &v) const
Definition: graphics.h:5584
std::string get_yaxislocation() const
Definition: graphics.h:5498
bool gridcolor_is_rgb() const
Definition: graphics.h:5351
void set_positionconstraint(const octave_value &val)
Definition: graphics.h:6122
octave_value get_ylim() const
Definition: graphics.h:5516
void set_linewidth(const octave_value &val)
Definition: graphics.h:6010
bool ydir_is(const std::string &v) const
Definition: graphics.h:5508
octave_value get_outerposition() const
Definition: graphics.h:5400
octave_value get_xminortickvalues() const
Definition: graphics.h:5601
double get_minorgridalpha() const
Definition: graphics.h:5379
octave_value get_minorgridcolor() const
Definition: graphics.h:5387
std::string get_ztickmode() const
Definition: graphics.h:5590
double get_fontsize() const
Definition: graphics.h:5332
void update_zlimitmethod()
Definition: graphics.h:7188
std::string get_yminorgrid() const
Definition: graphics.h:5525
graphics_handle get_ylabel() const
Definition: graphics.h:5514
void set_climmode(const octave_value &val)
Definition: graphics.h:5769
void set_has3Dkids(bool val)
Definition: graphics.h:4803
bool zcolor_is_rgb() const
Definition: graphics.h:5547
bool is_xminortick() const
Definition: graphics.h:5477
octave_value get_alphamap() const
Definition: graphics.h:5264
void set___colormap__(const octave_value &val)
Definition: graphics.h:6697
octave_value get_innerposition() const
Definition: graphics.h:4740
void set_alim(const octave_value &val)
Definition: graphics.h:5608
double get_ypTick() const
Definition: graphics.h:4779
double get_cameraviewangle() const
Definition: graphics.h:5295
bool get_layer2Dtop() const
Definition: graphics.h:4800
bool projection_is(const std::string &v) const
Definition: graphics.h:5412
void set_minorgridcolor(const octave_value &val)
Definition: graphics.h:6038
bool get_is2D(bool include_kids=false) const
Definition: graphics.h:4801
double get_ypTickN() const
Definition: graphics.h:4780
void set_clim(const octave_value &val)
Definition: graphics.h:5757
octave_value get_zticklabel() const
Definition: graphics.h:5582
void set_zlimmode(const octave_value &val)
Definition: graphics.h:6619
octave_value get_gridcolor() const
Definition: graphics.h:5354
void set_tightinset(const octave_value &val)
Definition: graphics.h:6186
void set_ydir(const octave_value &val)
Definition: graphics.h:6430
void set_ambientlightcolor(const octave_value &val)
Definition: graphics.h:5644
void set_zdir(const octave_value &val)
Definition: graphics.h:6578
bool xlimmode_is(const std::string &v) const
Definition: graphics.h:5471
std::string get_minorgridcolormode() const
Definition: graphics.h:5390
void set_fontangle(const octave_value &val)
Definition: graphics.h:5849
bool zlimmode_is(const std::string &v) const
Definition: graphics.h:5568
graphics_handle get_zaxis() const
Definition: graphics.h:5545
std::string get_cameratargetmode() const
Definition: graphics.h:5288
bool alimmode_is(const std::string &v) const
Definition: graphics.h:5261
void set_xminortick(const octave_value &val)
Definition: graphics.h:6332
std::string get_zticklabelmode() const
Definition: graphics.h:5585
bool tickdirmode_is(const std::string &v) const
Definition: graphics.h:5421
std::string get_xdir() const
Definition: graphics.h:5459
bool get_xyzSym() const
Definition: graphics.h:4805
Matrix get_inverse_transform_matrix() const
Definition: graphics.h:4763
void set_labelfontsizemultiplier(const octave_value &val)
Definition: graphics.h:5966
void set_yminorgrid(const octave_value &val)
Definition: graphics.h:6481
std::string get_gridalphamode() const
Definition: graphics.h:5349
void set_xcolormode(const octave_value &val)
Definition: graphics.h:6265
bool get_xySym() const
Definition: graphics.h:4804
void set_gridalphamode(const octave_value &val)
Definition: graphics.h:5922
void set_nextseriesindex(const octave_value &val)
Definition: graphics.h:6074
bool minorgridcolor_is(const std::string &v) const
Definition: graphics.h:5385
void update_xlimitmethod()
Definition: graphics.h:7136
std::string get_ylimmode() const
Definition: graphics.h:5522
bool get_zSign() const
Definition: graphics.h:4806
bool boxstyle_is(const std::string &v) const
Definition: graphics.h:5277
bool plotboxaspectratiomode_is(const std::string &v) const
Definition: graphics.h:5404
std::string get_layer() const
Definition: graphics.h:5367
void update_xlim()
Definition: graphics.h:7113
std::string get_zlimitmethod() const
Definition: graphics.h:5566
std::string get_xminorgrid() const
Definition: graphics.h:5475
bool ytickmode_is(const std::string &v) const
Definition: graphics.h:5542
double get_linewidth() const
Definition: graphics.h:5377
std::string get_yminortick() const
Definition: graphics.h:5528
void set_xtickmode(const octave_value &val)
Definition: graphics.h:6383
bool color_is_rgb() const
Definition: graphics.h:5308
std::string get_dataaspectratiomode() const
Definition: graphics.h:5325
void set_zgrid(const octave_value &val)
Definition: graphics.h:6587
octave_value get_looseinset() const
Definition: graphics.h:5599
std::string get_fontname() const
Definition: graphics.h:5330
void set_ticklabelinterpreter(const octave_value &val)
Definition: graphics.h:6168
bool sortmethod_is(const std::string &v) const
Definition: graphics.h:5415
double get_xticklabelrotation() const
Definition: graphics.h:5490
std::string get_xticklabelmode() const
Definition: graphics.h:5488
void set_minorgridlinestyle(const octave_value &val)
Definition: graphics.h:6058
bool zscale_is(const std::string &v) const
Definition: graphics.h:5577
octave_value get_xticklabel() const
Definition: graphics.h:5485
bool xtickmode_is(const std::string &v) const
Definition: graphics.h:5492
void set_zlimitmethod(const octave_value &val)
Definition: graphics.h:6610
int get_xstate() const
Definition: graphics.h:4768
void set_layer(const octave_value &val)
Definition: graphics.h:5975
bool fontweight_is(const std::string &v) const
Definition: graphics.h:5343
bool is_zgrid() const
Definition: graphics.h:5558
void update_ylimitmethod()
Definition: graphics.h:7164
void set_fontsize(const octave_value &val)
Definition: graphics.h:5867
bool yticklabelmode_is(const std::string &v) const
Definition: graphics.h:5537
void set_zminorgrid(const octave_value &val)
Definition: graphics.h:6629
bool get_nearhoriz() const
Definition: graphics.h:4807
std::string get_units() const
Definition: graphics.h:5441
Matrix get_minorgridcolor_rgb() const
Definition: graphics.h:5386
double get_fz() const
Definition: graphics.h:4791
void set_projection(const octave_value &val)
Definition: graphics.h:6130
std::string get_titlefontweight() const
Definition: graphics.h:5436
bool climmode_is(const std::string &v) const
Definition: graphics.h:5302
octave_value get_currentpoint() const
Definition: graphics.h:5320
void set_fontweight(const octave_value &val)
Definition: graphics.h:5901
bool cameraupvectormode_is(const std::string &v) const
Definition: graphics.h:5292
bool xdir_is(const std::string &v) const
Definition: graphics.h:5458
double get_xpTick() const
Definition: graphics.h:4777
octave_value get_plotboxaspectratio() const
Definition: graphics.h:5402
void set_fontsmoothing(const octave_value &val)
Definition: graphics.h:5888
void set_yticklabelrotation(const octave_value &val)
Definition: graphics.h:6532
std::string get_yticklabelmode() const
Definition: graphics.h:5538
double get_ztickoffset() const
Definition: graphics.h:4797
octave_value get_ytick() const
Definition: graphics.h:5533
bool is_fontsmoothing() const
Definition: graphics.h:5337
octave_value get_ycolor() const
Definition: graphics.h:5503
void set_linestyleorderindex(const octave_value &val)
Definition: graphics.h:6002
bool zdir_is(const std::string &v) const
Definition: graphics.h:5555
void set_tickdirmode(const octave_value &val)
Definition: graphics.h:6159
void set_yaxislocation(const octave_value &val)
Definition: graphics.h:6400
double get_colororderindex() const
Definition: graphics.h:5315
bool units_is(const std::string &v) const
Definition: graphics.h:5440
void set_gridalpha(const octave_value &val)
Definition: graphics.h:5910
bool colorscale_is(const std::string &v) const
Definition: graphics.h:5317
double get_mousewheelzoom() const
Definition: graphics.h:5594
void set_gridcolor(const octave_value &val)
Definition: graphics.h:5930
bool is_zminortick() const
Definition: graphics.h:5574
std::string get_zdir() const
Definition: graphics.h:5556
void set_alimmode(const octave_value &val)
Definition: graphics.h:5620
octave_value get_xlim() const
Definition: graphics.h:5466
void set_zminortick(const octave_value &val)
Definition: graphics.h:6637
bool color_is(const std::string &v) const
Definition: graphics.h:5309
std::string get_alphascale() const
Definition: graphics.h:5267
void set_zminortickvalues(const octave_value &val)
Definition: graphics.h:6747
Matrix get_zcolor_rgb() const
Definition: graphics.h:5549
bool is_yminorgrid() const
Definition: graphics.h:5524
std::string get_climmode() const
Definition: graphics.h:5303
bool is_ygrid() const
Definition: graphics.h:5511
std::string get_minorgridalphamode() const
Definition: graphics.h:5382
graphics_xform get_transform() const
Definition: graphics.h:4756
void set_xticklabelrotation(const octave_value &val)
Definition: graphics.h:6375
std::string get_gridlinestyle() const
Definition: graphics.h:5360
octave_value get_yticklabel() const
Definition: graphics.h:5535
void set_titlefontweight(const octave_value &val)
Definition: graphics.h:6205
std::string get_colorscale() const
Definition: graphics.h:5318
octave_value get_zlim() const
Definition: graphics.h:5563
bool clippingstyle_is(const std::string &v) const
Definition: graphics.h:5305
octave_value get_cameratarget() const
Definition: graphics.h:5285
double get_yticklen() const
Definition: graphics.h:4793
void set_xlim(const octave_value &val)
Definition: graphics.h:6292
void set_gridlinestyle(const octave_value &val)
Definition: graphics.h:5950
Matrix get_opengl_matrix_2() const
Definition: graphics.h:4765
double get_x_min() const
Definition: graphics.h:4783
double get_xPlane() const
Definition: graphics.h:4771
void set_innerposition(const octave_value &val)
Definition: graphics.h:4745
std::string get_positionconstraint() const
Definition: graphics.h:5410
bool zlimitmethod_is(const std::string &v) const
Definition: graphics.h:5565
void set_cameraviewanglemode(const octave_value &val)
Definition: graphics.h:5748
Matrix get_xcolor_rgb() const
Definition: graphics.h:5452
void set_zaxis(const octave_value &val)
Definition: graphics.h:6549
void set_cameratarget(const octave_value &val)
Definition: graphics.h:5691
void set_xticklabelmode(const octave_value &val)
Definition: graphics.h:6366
std::string get_boxstyle() const
Definition: graphics.h:5278
void set_outerposition(const octave_value &val)
Definition: graphics.h:6082
std::string get_tickdir() const
Definition: graphics.h:5419
void set_zcolormode(const octave_value &val)
Definition: graphics.h:6570
octave_value get_ambientlightcolor() const
Definition: graphics.h:5272
double get_y_min() const
Definition: graphics.h:4785
bool ycolor_is_rgb() const
Definition: graphics.h:5500
bool ambientlightcolor_is(const std::string &v) const
Definition: graphics.h:5270
graphics_handle get_zlabel() const
Definition: graphics.h:5561
bool titlefontweight_is(const std::string &v) const
Definition: graphics.h:5435
bool get_y2Dright() const
Definition: graphics.h:4799
octave_value get_xcolor() const
Definition: graphics.h:5453
std::string get_ygrid() const
Definition: graphics.h:5512
bool ylimitmethod_is(const std::string &v) const
Definition: graphics.h:5518
void set_ylimitmethod(const octave_value &val)
Definition: graphics.h:6462
void set_ytick(const octave_value &val)
Definition: graphics.h:6508
Matrix get_ycolor_rgb() const
Definition: graphics.h:5502
std::string get_box() const
Definition: graphics.h:5275
void set_cameraviewangle(const octave_value &val)
Definition: graphics.h:5735
bool ycolor_is(const std::string &v) const
Definition: graphics.h:5501
bool ticklabelinterpreter_is(const std::string &v) const
Definition: graphics.h:5424
Matrix get_gridcolor_rgb() const
Definition: graphics.h:5353
~properties()=default
bool camerapositionmode_is(const std::string &v) const
Definition: graphics.h:5282
ColumnVector coord2pixel(double x, double y, double z) const
Definition: graphics.h:4815
octave_value get_zminortickvalues() const
Definition: graphics.h:5605
void set_colororder(const octave_value &val)
Definition: graphics.h:5795
std::string get___autopos_tag__() const
Definition: graphics.h:5597
octave_value get_yminortickvalues() const
Definition: graphics.h:5603
Matrix get_transform_zlim() const
Definition: graphics.h:4766
void set_legend(const octave_value &val)
Definition: graphics.h:5992
void set_yticklabelmode(const octave_value &val)
Definition: graphics.h:6523
octave_value get_colororder() const
Definition: graphics.h:5313
bool dataaspectratiomode_is(const std::string &v) const
Definition: graphics.h:5324
double get_zPlane() const
Definition: graphics.h:4775
octave_value get_ticklength() const
Definition: graphics.h:5427
void set_xtick(const octave_value &val)
Definition: graphics.h:6351
double get_zpTickN() const
Definition: graphics.h:4782
bool tickdir_is(const std::string &v) const
Definition: graphics.h:5418
std::string get_sortmethod() const
Definition: graphics.h:5416
std::string get_yscale() const
Definition: graphics.h:5531
double get_xpTickN() const
Definition: graphics.h:4778
bool is_xminorgrid() const
Definition: graphics.h:5474
bool __autopos_tag___is(const std::string &v) const
Definition: graphics.h:5596
Matrix get_transform_matrix() const
Definition: graphics.h:4762
bool gridalphamode_is(const std::string &v) const
Definition: graphics.h:5348
bool gridlinestyle_is(const std::string &v) const
Definition: graphics.h:5359
void set_alphamap(const octave_value &val)
Definition: graphics.h:5628
std::string get_zminortick() const
Definition: graphics.h:5575
bool xaxislocation_is(const std::string &v) const
Definition: graphics.h:5447
void set_position(const octave_value &val)
Definition: graphics.h:6113
double get_x_max() const
Definition: graphics.h:4784
double get_linestyleorderindex() const
Definition: graphics.h:5375
void set_mousewheelzoom(const octave_value &val)
Definition: graphics.h:6706
double get_zticklen() const
Definition: graphics.h:4794
double get_z_min() const
Definition: graphics.h:4787
void set_colorscale(const octave_value &val)
Definition: graphics.h:5811
double get_zpTick() const
Definition: graphics.h:4781
bool gridcolormode_is(const std::string &v) const
Definition: graphics.h:5356
bool zcolor_is(const std::string &v) const
Definition: graphics.h:5548
double get_z_max() const
Definition: graphics.h:4788
void set_xdir(const octave_value &val)
Definition: graphics.h:6273
octave_value get_color() const
Definition: graphics.h:5311
void set_view(const octave_value &val)
Definition: graphics.h:6226
std::string graphics_object_name() const
Definition: graphics.h:4960
void set_xminortickvalues(const octave_value &val)
Definition: graphics.h:6731
graphics_handle get_toolbar() const
Definition: graphics.h:5438
std::string get_tickdirmode() const
Definition: graphics.h:5422
bool is_zminorgrid() const
Definition: graphics.h:5571
octave_value get_ztick() const
Definition: graphics.h:5580
bool xcolor_is(const std::string &v) const
Definition: graphics.h:5451
double get_yticklabelrotation() const
Definition: graphics.h:5540
void set_xaxislocation(const octave_value &val)
Definition: graphics.h:6243
octave_value get(const char *pname) const
Definition: graphics.h:4953
void set_zticklabelrotation(const octave_value &val)
Definition: graphics.h:6680
bool xlimitmethod_is(const std::string &v) const
Definition: graphics.h:5468
void set_colororderindex(const octave_value &val)
Definition: graphics.h:5803
std::string get_xscale() const
Definition: graphics.h:5481
void set_cameraupvector(const octave_value &val)
Definition: graphics.h:5713
std::string get_fontweight() const
Definition: graphics.h:5344
double get_yPlaneN() const
Definition: graphics.h:4774
bool xcolormode_is(const std::string &v) const
Definition: graphics.h:5455
bool nextplot_is(const std::string &v) const
Definition: graphics.h:5395
void set_dataaspectratio(const octave_value &val)
Definition: graphics.h:5827
void set_xcolor(const octave_value &val)
Definition: graphics.h:6252
std::string get_plotboxaspectratiomode() const
Definition: graphics.h:5405
void set_sortmethod(const octave_value &val)
Definition: graphics.h:6138
void set_plotboxaspectratiomode(const octave_value &val)
Definition: graphics.h:6104
double get_zticklabelrotation() const
Definition: graphics.h:5587
std::string get_xminortick() const
Definition: graphics.h:5478
Matrix get_color_rgb() const
Definition: graphics.h:5310
void set_ygrid(const octave_value &val)
Definition: graphics.h:6439
void set_xscale(const octave_value &val)
Definition: graphics.h:6340
void set_ticklength(const octave_value &val)
Definition: graphics.h:6177
double get_labelfontsizemultiplier() const
Definition: graphics.h:5364
octave_value get_linestyleorder() const
Definition: graphics.h:5373
double get_y_max() const
Definition: graphics.h:4786
bool is_xgrid() const
Definition: graphics.h:5461
double get_xticklen() const
Definition: graphics.h:4792
double get_xPlaneN() const
Definition: graphics.h:4772
std::string get_ytickmode() const
Definition: graphics.h:5543
bool gridcolor_is(const std::string &v) const
Definition: graphics.h:5352
bool minorgridcolormode_is(const std::string &v) const
Definition: graphics.h:5389
double get_zPlaneN() const
Definition: graphics.h:4776
std::string get_zgrid() const
Definition: graphics.h:5559
void set_tickdir(const octave_value &val)
Definition: graphics.h:6146
std::string get_cameraupvectormode() const
Definition: graphics.h:5293
void set_yminortickvalues(const octave_value &val)
Definition: graphics.h:6739
void decrease_num_lights()
Definition: graphics.h:4857
void set_ytickmode(const octave_value &val)
Definition: graphics.h:6540
graphics_handle get_yaxis() const
Definition: graphics.h:5495
bool ylimmode_is(const std::string &v) const
Definition: graphics.h:5521
void update_boundingbox()
Definition: graphics.h:4692
void set_alphascale(const octave_value &val)
Definition: graphics.h:5636
std::string get_ticklabelinterpreter() const
Definition: graphics.h:5425
bool yaxislocation_is(const std::string &v) const
Definition: graphics.h:5497
double get_fx() const
Definition: graphics.h:4789
const base_properties & get_properties() const
Definition: graphics.h:7268
octave_value get(const caseless_str &name) const
Definition: graphics.h:7241
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:7279
void set(const caseless_str &name, const octave_value &value)
Definition: graphics.h:7225
void set_defaults(const std::string &mode)
Definition: graphics.h:7236
base_properties & get_properties()
Definition: graphics.h:7266
~axes()=default
property_list get_defaults_list() const
Definition: graphics.h:7261
octave_value get_defaults() const
Definition: graphics.h:7256
void override_defaults(base_graphics_object &obj)
Definition: graphics.h:7211
bool valid_object() const
Definition: graphics.h:7275
axes(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:7201
base_graphics_event(int busyaction)
Definition: graphics.h:14430
virtual void execute()=0
virtual property_list get_defaults_list() const
Definition: graphics.h:2811
virtual property_list get_factory_defaults_list() const
Definition: graphics.h:2824
virtual bool valid_object() const
Definition: graphics.h:2914
graphics_handle get_handle() const
Definition: graphics.h:2854
virtual octave_value get_factory_defaults() const
Definition: graphics.h:2819
virtual void adopt(const graphics_handle &h)
Definition: graphics.h:2870
virtual octave_value get(const caseless_str &pname) const
Definition: graphics.h:2794
virtual void delete_property_listener(const std::string &nm, const octave_value &v, listener_mode mode=GCB_POSTSET)
Definition: graphics.h:2945
virtual const base_properties & get_properties() const
Definition: graphics.h:2902
bool valid_toolkit_object() const
Definition: graphics.h:2916
virtual octave_value get_defaults() const
Definition: graphics.h:2806
virtual std::string type() const
Definition: graphics.h:2918
virtual void initialize(const graphics_object &go)
Definition: graphics.h:2958
virtual void reparent(const graphics_handle &np)
Definition: graphics.h:2878
virtual void set(const caseless_str &pname, const octave_value &pval)
Definition: graphics.h:2770
virtual graphics_handle get_parent() const
Definition: graphics.h:2846
bool isa(const std::string &go_name) const
Definition: graphics.h:2924
octave_value get(bool all=false) const
Definition: graphics.h:2786
virtual void remove_child(const graphics_handle &h, bool from_root=false)
Definition: graphics.h:2862
virtual octave::graphics_toolkit get_toolkit() const
Definition: graphics.h:2929
virtual void defaults() const
Definition: graphics.h:2886
virtual base_properties & get_properties()
Definition: graphics.h:2895
virtual bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:2829
virtual void set_from_list(property_list &plist)
Definition: graphics.h:2762
virtual void update(const graphics_object &go, int id)
Definition: graphics.h:2973
virtual void override_defaults(base_graphics_object &obj)
Definition: graphics.h:2752
virtual void set_defaults(const std::string &)
Definition: graphics.h:2778
virtual void add_property_listener(const std::string &nm, const octave_value &v, listener_mode mode=GCB_POSTSET)
Definition: graphics.h:2937
virtual void finalize(const graphics_object &go)
Definition: graphics.h:2964
bool is_beingdeleted() const
Definition: graphics.h:2513
virtual octave_value get_clim() const
Definition: graphics.h:2416
void set___modified__(const octave_value &val)
Definition: graphics.h:2367
Matrix get_hidden_children() const
Definition: graphics.h:2355
virtual bool is_aliminclude() const
Definition: graphics.h:2421
bool handlevisibility_is(const std::string &v) const
Definition: graphics.h:2533
void set_selectionhighlight(const octave_value &val)
Definition: graphics.h:2668
void mark_modified()
Definition: graphics.cc:3108
void set_from_list(base_graphics_object &obj, property_list &defaults)
Definition: graphics.cc:2947
virtual void init()
Definition: graphics.h:2727
void reparent(const graphics_handle &new_parent)
Definition: graphics.h:2381
void override_defaults(base_graphics_object &obj)
Definition: graphics.cc:3124
callback_property m_buttondownfcn
Definition: graphics.h:2462
bool_property m_interruptible
Definition: graphics.h:2470
std::string get_handlevisibility() const
Definition: graphics.h:2534
virtual octave_value get_xlim() const
Definition: graphics.h:2417
void set_pickableparts(const octave_value &val)
Definition: graphics.h:2652
virtual void update_beingdeleted()
Definition: graphics.h:2702
std::string get_interruptible() const
Definition: graphics.h:2540
void set_busyaction(const octave_value &val)
Definition: graphics.h:2570
bool_property m_beingdeleted
Definition: graphics.h:2460
graphics_handle get_parent() const
Definition: graphics.h:2542
bool_property m_hittest
Definition: graphics.h:2469
children_property m_children
Definition: graphics.h:2463
string_property m_tag
Definition: graphics.h:2475
void set_contextmenu(const octave_value &val)
Definition: graphics.h:2602
virtual octave::graphics_toolkit get_toolkit() const
Definition: graphics.cc:3183
octave_value get_userdata() const
Definition: graphics.h:2557
std::string get___modified__() const
Definition: graphics.h:2565
void set_visible(const octave_value &val)
Definition: graphics.h:2684
graphics_handle get_uicontextmenu() const
Definition: graphics.h:2371
void set_interruptible(const octave_value &val)
Definition: graphics.h:2644
virtual void set(const caseless_str &, const octave_value &)
callback_property m_deletefcn
Definition: graphics.h:2467
std::set< std::string > m_dynamic_properties
Definition: graphics.h:2434
std::string get_clipping() const
Definition: graphics.h:2523
virtual bool is_xliminclude() const
Definition: graphics.h:2423
std::map< caseless_str, property, cmp_caseless_str > m_all_props
Definition: graphics.h:2723
std::string get_selectionhighlight() const
Definition: graphics.h:2551
virtual void update_boundingbox()
Definition: graphics.cc:3196
bool is_hittest() const
Definition: graphics.h:2536
graphics_handle get___myhandle__() const
Definition: graphics.h:2567
void set_buttondownfcn(const octave_value &val)
Definition: graphics.h:2578
void set_hittest(const octave_value &val)
Definition: graphics.h:2636
void set_clipping(const octave_value &val)
Definition: graphics.h:2594
void set_selected(const octave_value &val)
Definition: graphics.h:2660
radio_property m_handlevisibility
Definition: graphics.h:2468
bool is___modified__() const
Definition: graphics.h:2564
bool is_selected() const
Definition: graphics.h:2547
std::string get_hittest() const
Definition: graphics.h:2537
octave_value get_createfcn() const
Definition: graphics.h:2528
bool is_selectionhighlight() const
Definition: graphics.h:2550
void set___appdata__(const octave_value &val)
Definition: graphics.h:2693
std::string get_type() const
Definition: graphics.h:2555
virtual bool is_yliminclude() const
Definition: graphics.h:2424
void set_children(const octave_value &val)
Definition: graphics.h:2586
bool is_clipping() const
Definition: graphics.h:2522
bool_property m_selectionhighlight
Definition: graphics.h:2474
bool pickableparts_is(const std::string &v) const
Definition: graphics.h:2544
virtual octave_value get_ylim() const
Definition: graphics.h:2418
any_property m___appdata__
Definition: graphics.h:2480
std::string get_selected() const
Definition: graphics.h:2548
virtual bool is_zliminclude() const
Definition: graphics.h:2425
virtual void add_listener(const caseless_str &, const octave_value &, listener_mode=GCB_POSTSET)
Definition: graphics.cc:3288
void set_handlevisibility(const octave_value &val)
Definition: graphics.h:2627
std::string get_beingdeleted() const
Definition: graphics.h:2514
void insert_property(const std::string &name, property p)
Definition: graphics.h:2266
void set_uicontextmenu(const octave_value &val)
Definition: graphics.h:2376
void set_createfcn(const octave_value &val)
Definition: graphics.h:2611
octave_value get_deletefcn() const
Definition: graphics.h:2531
void set_deletefcn(const octave_value &val)
Definition: graphics.h:2619
radio_property m_busyaction
Definition: graphics.h:2461
bool is_interruptible() const
Definition: graphics.h:2539
virtual bool has_property(const caseless_str &) const
Definition: graphics.h:2294
virtual octave_value get(const caseless_str &pname) const
radio_property m_pickableparts
Definition: graphics.h:2472
bool is_visible() const
Definition: graphics.h:2559
void set_modified(const octave_value &val)
Definition: graphics.h:2365
virtual octave_value get_alim() const
Definition: graphics.h:2415
bool_property m___modified__
Definition: graphics.h:2481
bool busyaction_is(const std::string &v) const
Definition: graphics.h:2516
void execute_deletefcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:2530
void set_userdata(const octave_value &val)
Definition: graphics.h:2676
handle_property m_contextmenu
Definition: graphics.h:2465
virtual octave_value get(const char *pname) const
Definition: graphics.h:2282
virtual void adopt(const graphics_handle &h)
Definition: graphics.h:2311
static bool has_readonly_property(const caseless_str &pname)
octave_value get___appdata__() const
Definition: graphics.h:2562
graphics_handle get_contextmenu() const
Definition: graphics.h:2525
std::string get_busyaction() const
Definition: graphics.h:2517
bool_property m_clipping
Definition: graphics.h:2464
std::string get_pickableparts() const
Definition: graphics.h:2545
handle_property m_parent
Definition: graphics.h:2471
any_property m_userdata
Definition: graphics.h:2478
Matrix get_all_children() const
Definition: graphics.h:2350
virtual octave_value get_zlim() const
Definition: graphics.h:2419
Matrix get_children() const
Definition: graphics.h:2345
void set_beingdeleted(const octave_value &val)
Definition: graphics.h:2335
virtual void init_integerhandle(const octave_value &)
Definition: graphics.h:2255
callback_property m_createfcn
Definition: graphics.h:2466
void execute_createfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:2527
void execute_buttondownfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:2519
string_property m_type
Definition: graphics.h:2476
handle_property m_uicontextmenu
Definition: graphics.h:2477
virtual void delete_children(bool clear=false, bool from_root=false)
Definition: graphics.h:2393
bool_property m_visible
Definition: graphics.h:2479
virtual void remove_child(const graphics_handle &h, bool=false)
Definition: graphics.h:2302
virtual void delete_listener(const caseless_str &, const octave_value &, listener_mode=GCB_POSTSET)
Definition: graphics.cc:3299
std::string get_visible() const
Definition: graphics.h:2560
octave_value get_buttondownfcn() const
Definition: graphics.h:2520
virtual void update_visible()
Definition: graphics.h:2706
void renumber_child(graphics_handle old_gh, graphics_handle new_gh)
Definition: graphics.h:2398
virtual octave_value get(const std::string &pname) const
Definition: graphics.h:2277
virtual Matrix get_boundingbox(bool=false, const Matrix &=Matrix()) const
Definition: graphics.h:2321
bool_property m_selected
Definition: graphics.h:2473
void set_tag(const octave_value &val)
Definition: graphics.h:2341
graphics_handle m___myhandle__
Definition: graphics.h:2482
void renumber_parent(graphics_handle new_gh)
Definition: graphics.h:2403
std::string get_tag() const
Definition: graphics.h:2553
bool is_modified() const
Definition: graphics.h:2300
virtual bool is_climinclude() const
Definition: graphics.h:2422
void set_name(const std::string &s)
Definition: graphics.h:312
void set_parent(const graphics_handle &h)
Definition: graphics.h:316
virtual octave_value get() const
Definition: graphics.h:333
virtual std::string values_as_string() const
Definition: graphics.h:338
void add_listener(const octave_value &v, listener_mode mode=GCB_POSTSET)
Definition: graphics.h:354
base_property(const base_property &p)
Definition: graphics.h:298
graphics_handle get_parent() const
Definition: graphics.h:314
bool ok() const
Definition: graphics.h:308
virtual bool is_radio() const
Definition: graphics.h:322
void delete_listener(const octave_value &v=octave_value(), listener_mode mode=GCB_POSTSET)
Definition: graphics.h:360
virtual bool do_set(const octave_value &)
Definition: graphics.h:417
void set_hidden(bool flag)
Definition: graphics.h:320
virtual base_property * clone() const
Definition: graphics.h:413
int get_id() const
Definition: graphics.h:324
void run_listeners(listener_mode mode=GCB_POSTSET)
Definition: graphics.cc:1280
bool is_hidden() const
Definition: graphics.h:318
base_property(const std::string &s, const graphics_handle &h)
Definition: graphics.h:293
virtual Cell values_as_cell() const
Definition: graphics.h:343
void set_id(int d)
Definition: graphics.h:326
std::string get_name() const
Definition: graphics.h:310
bool set(const octave_value &v, bool do_run=true, bool do_notify_toolkit=true)
Definition: graphics.cc:1255
virtual ~base_property()=default
virtual double unscale(double) const
Definition: graphics.h:91
virtual double scale(double) const
Definition: graphics.h:86
virtual NDArray scale(const NDArray &) const
Definition: graphics.h:81
virtual base_scaler * clone() const
Definition: graphics.h:96
virtual bool is_linear() const
Definition: graphics.h:99
bool_property(const std::string &nm, const graphics_handle &h, bool val)
Definition: graphics.h:1640
~bool_property()=default
bool do_set(const octave_value &val)
Definition: graphics.h:1667
bool is_on() const
Definition: graphics.h:1656
bool_property()=delete
bool_property(const std::string &nm, const graphics_handle &h, const char *val)
Definition: graphics.h:1645
base_property * clone() const
Definition: graphics.h:1664
bool do_set(const octave_value &v)
Definition: graphics.h:2000
bool is_defined() const
Definition: graphics.h:1986
~callback_property()=default
callback_property()=delete
void execute(const octave_value &data=octave_value()) const
Definition: graphics.cc:1983
callback_property(const callback_property &)=default
base_property * clone() const
Definition: graphics.h:1997
octave_value get() const
Definition: graphics.h:1982
callback_property(const std::string &nm, const graphics_handle &h, const octave_value &m)
Definition: graphics.h:1971
bool compare(const std::string &s, std::size_t limit=std::string::npos) const
Definition: caseless-str.h:78
std::string row_as_string(octave_idx_type, bool strip_ws=false) const
Definition: chMatrix.cc:82
Matrix get_children() const
Definition: graphics.h:1813
~children_property()=default
Matrix get_hidden() const
Definition: graphics.h:1818
void delete_children(bool clear=false, bool from_root=false)
Definition: graphics.h:1833
Matrix get_all() const
Definition: graphics.h:1823
children_property(const children_property &p)
Definition: graphics.h:1784
void adopt(double val)
Definition: graphics.h:1808
octave_value get() const
Definition: graphics.h:1828
void renumber(graphics_handle old_gh, graphics_handle new_gh)
Definition: graphics.h:1838
base_property * clone() const
Definition: graphics.h:1801
bool remove_child(double val)
Definition: graphics.h:1803
children_property(const std::string &nm, const graphics_handle &h, const Matrix &val)
Definition: graphics.h:1777
bool do_set(const octave_value &val)
Definition: graphics.h:1858
color_property(const radio_values &v, const color_values &c)
Definition: graphics.h:1081
color_property(const std::string &nm, const graphics_handle &h, const color_values &c=color_values(), const radio_values &v=radio_values())
Definition: graphics.h:1087
bool is_rgb() const
Definition: graphics.h:1129
color_property()=delete
Cell values_as_cell() const
Definition: graphics.h:1165
bool is(const std::string &v) const
Definition: graphics.h:1133
color_property(const color_values &c, const radio_values &v)
Definition: graphics.h:1075
bool is_radio() const
Definition: graphics.h:1131
color_property(const std::string &nm, const graphics_handle &h, const radio_values &v)
Definition: graphics.h:1095
color_property(const std::string &nm, const graphics_handle &h, const color_property &v)
Definition: graphics.h:1109
color_property(const std::string &nm, const graphics_handle &h, const std::string &v)
Definition: graphics.h:1102
const std::string & current_value() const
Definition: graphics.h:1144
~color_property()=default
std::string values_as_string() const
Definition: graphics.h:1162
octave_value get() const
Definition: graphics.h:1121
Matrix rgb() const
Definition: graphics.h:1136
base_property * clone() const
Definition: graphics.h:1160
color_values(double r=0, double g=0, double b=1)
Definition: graphics.h:1021
color_values(const std::string &str)
Definition: graphics.h:1031
void validate() const
Definition: graphics.h:1054
Matrix rgb() const
Definition: graphics.h:1050
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:94
double double_value() const
Definition: graphics.h:1213
double_property(const double_property &p)
Definition: graphics.h:1200
void add_constraint(const finite_type finite)
Definition: graphics.h:1240
octave_value get() const
Definition: graphics.h:1211
bool do_set(const octave_value &v)
Definition: graphics.h:1244
double_property(const std::string &nm, const graphics_handle &h, double d=0)
Definition: graphics.h:1193
base_property * clone() const
Definition: graphics.h:1221
double_property()=delete
void add_constraint(const std::string &type, double val, bool inclusive)
Definition: graphics.h:1232
~double_property()=default
double double_value() const
Definition: graphics.h:1353
double_radio_property(const std::string &nm, const graphics_handle &h, const double_radio_property &v)
Definition: graphics.h:1326
double_radio_property()=delete
~double_radio_property()=default
const std::string & current_value() const
Definition: graphics.h:1361
octave_value get() const
Definition: graphics.h:1338
base_property * clone() const
Definition: graphics.h:1377
double_radio_property(const std::string &nm, const graphics_handle &h, const std::string &v)
Definition: graphics.h:1319
bool is_radio() const
Definition: graphics.h:1348
bool is_double() const
Definition: graphics.h:1346
bool is(const std::string &v) const
Definition: graphics.h:1350
double_radio_property(double d, const radio_values &v)
Definition: graphics.h:1313
std::string get_renderer() const
Definition: graphics.h:3906
bool windowstyle_is(const std::string &v) const
Definition: graphics.h:3950
octave_value get_papersize() const
Definition: graphics.h:3888
bool is_graphicssmoothing() const
Definition: graphics.h:3850
bool __mouse_mode___is(const std::string &v) const
Definition: graphics.h:3971
void set_windowscrollwheelfcn(const octave_value &val)
Definition: graphics.h:4319
std::string get_dockcontrols() const
Definition: graphics.h:3846
bool paperpositionmode_is(const std::string &v) const
Definition: graphics.h:3885
void execute_windowscrollwheelfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:3944
bool papertype_is(const std::string &v) const
Definition: graphics.h:3890
bool is___gl_window__() const
Definition: graphics.h:3964
void set_alphamap(const octave_value &val)
Definition: graphics.h:3988
void set_pointershapehotspot(const octave_value &val)
Definition: graphics.h:4209
void set_innerposition(const octave_value &val)
Definition: graphics.h:3601
std::string get___printing__() const
Definition: graphics.h:3975
std::string get___gl_extensions__() const
Definition: graphics.h:3956
void set_dockcontrols(const octave_value &val)
Definition: graphics.h:4054
octave_value get_windowkeyreleasefcn() const
Definition: graphics.h:3942
octave_value get___plot_stream__() const
Definition: graphics.h:3979
void execute_closerequestfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:3827
bool paperunits_is(const std::string &v) const
Definition: graphics.h:3893
std::string get_inverthardcopy() const
Definition: graphics.h:3857
octave_value get_windowbuttondownfcn() const
Definition: graphics.h:3930
std::string get_paperorientation() const
Definition: graphics.h:3881
void set___zoom_mode__(const octave_value &val)
Definition: graphics.h:4429
octave_value get_resizefcn() const
Definition: graphics.h:3915
bool is_numbertitle() const
Definition: graphics.h:3875
std::string get_graphicssmoothing() const
Definition: graphics.h:3851
octave_value get___guidata__() const
Definition: graphics.h:3969
void set_pickableparts(const octave_value &val)
Definition: graphics.h:4343
std::string get___mouse_mode__() const
Definition: graphics.h:3972
void set_resize(const octave_value &val)
Definition: graphics.h:4237
bool toolbar_is(const std::string &v) const
Definition: graphics.h:3923
void set_selectiontype(const octave_value &val)
Definition: graphics.h:4253
bool pickableparts_is(const std::string &v) const
Definition: graphics.h:3953
void set_windowkeypressfcn(const octave_value &val)
Definition: graphics.h:4303
void set_number(const octave_value &val)
Definition: graphics.h:4120
void set_pointershapecdata(const octave_value &val)
Definition: graphics.h:4201
bool nextplot_is(const std::string &v) const
Definition: graphics.h:3872
void execute_windowbuttonmotionfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:3932
void set___guidata__(const octave_value &val)
Definition: graphics.h:4387
void set_pointer(const octave_value &val)
Definition: graphics.h:4193
std::string get_menubar() const
Definition: graphics.h:3866
void execute_buttondownfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:3824
octave_value get_windowscrollwheelfcn() const
Definition: graphics.h:3945
bool renderermode_is(const std::string &v) const
Definition: graphics.h:3908
bool windowstate_is(const std::string &v) const
Definition: graphics.h:3947
std::string get___graphics_toolkit__() const
Definition: graphics.h:3967
octave_value get_windowkeypressfcn() const
Definition: graphics.h:3939
void execute_windowbuttonupfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:3935
std::string get___gl_version__() const
Definition: graphics.h:3962
std::string get_papertype() const
Definition: graphics.h:3891
void set_numbertitle(const octave_value &val)
Definition: graphics.h:4136
octave_value get_pointershapehotspot() const
Definition: graphics.h:3901
std::string get_toolbar() const
Definition: graphics.h:3924
void set___gl_window__(const octave_value &val)
Definition: graphics.h:4379
std::string get_renderermode() const
Definition: graphics.h:3909
void execute_sizechangedfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:3920
void set___gl_renderer__(const octave_value &val) const
Definition: graphics.h:4358
octave_value get_closerequestfcn() const
Definition: graphics.h:3828
octave_value get_keyreleasefcn() const
Definition: graphics.h:3863
void set_graphicssmoothing(const octave_value &val)
Definition: graphics.h:4070
void set___gl_extensions__(const octave_value &val) const
Definition: graphics.h:4351
std::string get_selectiontype() const
Definition: graphics.h:3918
void set_keyreleasefcn(const octave_value &val)
Definition: graphics.h:4096
graphics_handle get_currentaxes() const
Definition: graphics.h:3837
octave_value get_buttondownfcn() const
Definition: graphics.h:3825
graphics_handle get_currentobject() const
Definition: graphics.h:3841
std::string get_paperpositionmode() const
Definition: graphics.h:3886
std::string get___gl_renderer__() const
Definition: graphics.h:3958
bool is_inverthardcopy() const
Definition: graphics.h:3856
double get___device_pixel_ratio__() const
Definition: graphics.h:3985
void set_keypressfcn(const octave_value &val)
Definition: graphics.h:4088
void execute_windowkeyreleasefcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:3941
octave_value get_paperposition() const
Definition: graphics.h:3883
bool selectiontype_is(const std::string &v) const
Definition: graphics.h:3917
std::string get_numbertitle() const
Definition: graphics.h:3876
bool menubar_is(const std::string &v) const
Definition: graphics.h:3865
std::string get_windowstate() const
Definition: graphics.h:3948
std::string get_units() const
Definition: graphics.h:3927
octave_value get_windowbuttonupfcn() const
Definition: graphics.h:3936
std::string get_paperunits() const
Definition: graphics.h:3894
void execute_windowbuttondownfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:3929
octave_value get_windowbuttonmotionfcn() const
Definition: graphics.h:3933
void set___gl_version__(const octave_value &val) const
Definition: graphics.h:4372
void set_name(const octave_value &val)
Definition: graphics.h:4112
void execute_keypressfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:3859
octave_value get_keypressfcn() const
Definition: graphics.h:3860
octave_value get_outerposition() const
Definition: graphics.h:3878
void set_resizefcn(const octave_value &val)
Definition: graphics.h:4245
void set_paperpositionmode(const octave_value &val)
Definition: graphics.h:4167
void set___device_pixel_ratio__(const octave_value &val)
Definition: graphics.h:4437
std::string get_windowstyle() const
Definition: graphics.h:3951
void set_windowbuttondownfcn(const octave_value &val)
Definition: graphics.h:4279
void set_currentpoint(const octave_value &val)
Definition: graphics.h:4046
void set_currentcharacter(const octave_value &val)
Definition: graphics.h:4030
bool paperorientation_is(const std::string &v) const
Definition: graphics.h:3880
std::string get___gl_vendor__() const
Definition: graphics.h:3960
void set_papersize(const octave_value &val)
Definition: graphics.h:4176
bool color_is_rgb() const
Definition: graphics.h:3830
void set_color(const octave_value &val)
Definition: graphics.h:4012
octave_value get___rotate_mode__() const
Definition: graphics.h:3981
void set_closerequestfcn(const octave_value &val)
Definition: graphics.h:4004
bool is___printing__() const
Definition: graphics.h:3974
void set_windowbuttonmotionfcn(const octave_value &val)
Definition: graphics.h:4287
std::string get___gl_window__() const
Definition: graphics.h:3965
octave_value get___pan_mode__() const
Definition: graphics.h:3977
Matrix get_color_rgb() const
Definition: graphics.h:3832
void set_filename(const octave_value &val)
Definition: graphics.h:4062
void set_windowbuttonupfcn(const octave_value &val)
Definition: graphics.h:4295
void set___pan_mode__(const octave_value &val)
Definition: graphics.h:4405
void set_paperorientation(const octave_value &val)
Definition: graphics.h:4144
void set___gl_vendor__(const octave_value &val) const
Definition: graphics.h:4365
std::string get_filename() const
Definition: graphics.h:3848
void set_buttondownfcn(const octave_value &val)
Definition: graphics.h:3996
void init_integerhandle(const octave_value &val)
Definition: graphics.h:3577
octave_value get(const std::string &pname) const
Definition: graphics.h:3651
std::string get_currentcharacter() const
Definition: graphics.h:3839
void set_currentobject(const octave_value &val)
Definition: graphics.h:4038
void execute_resizefcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:3914
void execute_keyreleasefcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:3862
std::string get_integerhandle() const
Definition: graphics.h:3854
octave_value get_colormap() const
Definition: graphics.h:3835
octave_value get_sizechangedfcn() const
Definition: graphics.h:3921
bool is_dockcontrols() const
Definition: graphics.h:3845
void set_windowstate(const octave_value &val)
Definition: graphics.h:4327
octave_value get_alphamap() const
Definition: graphics.h:3822
bool pointer_is(const std::string &v) const
Definition: graphics.h:3896
bool renderer_is(const std::string &v) const
Definition: graphics.h:3905
void set_windowstyle(const octave_value &val)
Definition: graphics.h:4335
std::string get_pickableparts() const
Definition: graphics.h:3954
void set___printing__(const octave_value &val)
Definition: graphics.h:4397
void set_renderer(const octave_value &val)
Definition: graphics.h:4217
void set_inverthardcopy(const octave_value &val)
Definition: graphics.h:4080
void execute_windowkeypressfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:3938
void set_paperposition(const octave_value &val)
Definition: graphics.h:4155
octave_value get_innerposition() const
Definition: graphics.h:3596
octave_value get_currentpoint() const
Definition: graphics.h:3843
void set_menubar(const octave_value &val)
Definition: graphics.h:4104
std::string get_pointer() const
Definition: graphics.h:3897
void set_windowkeyreleasefcn(const octave_value &val)
Definition: graphics.h:4311
bool color_is(const std::string &v) const
Definition: graphics.h:3831
std::string get_nextplot() const
Definition: graphics.h:3873
octave_value get(const char *pname) const
Definition: graphics.h:3656
bool is_resize() const
Definition: graphics.h:3911
void set___rotate_mode__(const octave_value &val)
Definition: graphics.h:4421
std::string get_name() const
Definition: graphics.h:3868
~properties()=default
void set___plot_stream__(const octave_value &val)
Definition: graphics.h:4413
octave_value get_position() const
Definition: graphics.h:3903
void set_renderermode(const octave_value &val)
Definition: graphics.h:4229
void set_nextplot(const octave_value &val)
Definition: graphics.h:4128
void set_sizechangedfcn(const octave_value &val)
Definition: graphics.h:4261
octave_value get_pointershapecdata() const
Definition: graphics.h:3899
octave_value get___zoom_mode__() const
Definition: graphics.h:3983
bool units_is(const std::string &v) const
Definition: graphics.h:3926
void set_colormap(const octave_value &val)
Definition: graphics.h:4020
std::string graphics_object_name() const
Definition: graphics.h:3663
octave_value get_color() const
Definition: graphics.h:3833
void set_toolbar(const octave_value &val)
Definition: graphics.h:4269
bool is_integerhandle() const
Definition: graphics.h:3853
std::string get_resize() const
Definition: graphics.h:3912
const base_properties & get_properties() const
Definition: graphics.h:4551
property_list get_defaults_list() const
Definition: graphics.h:4544
figure(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:4492
octave_value get(const caseless_str &name) const
Definition: graphics.h:4525
bool valid_object() const
Definition: graphics.h:4553
void override_defaults(base_graphics_object &obj)
Definition: graphics.h:4500
octave_value get_defaults() const
Definition: graphics.h:4539
void set(const caseless_str &name, const octave_value &value)
Definition: graphics.h:4514
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:4557
base_properties & get_properties()
Definition: graphics.h:4549
~figure()=default
graphics_event()=default
~graphics_event()=default
static graphics_event create_mcode_event(const graphics_handle &h, const std::string &cmd, int busyaction)
Definition: graphics.cc:11812
graphics_event(const graphics_event &)=default
int get_busyaction()
Definition: graphics.h:14464
graphics_event & operator=(const graphics_event &)=default
void execute()
Definition: graphics.h:14472
void(* event_fcn)(void *)
Definition: graphics.h:14452
bool ok() const
Definition: graphics.h:14478
static graphics_event create_function_event(event_fcn fcn, void *data=nullptr)
Definition: graphics.cc:11820
graphics_event(base_graphics_event *new_rep)
Definition: graphics.h:14456
static graphics_event create_set_event(const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit=true, bool redraw_figure=false)
Definition: graphics.cc:11827
static graphics_event create_callback_event(const graphics_handle &h, const std::string &name, const octave_value &data=Matrix(), int busyaction=base_graphics_event::QUEUE)
Definition: graphics.cc:11794
void update(int id)
Definition: graphics.h:3199
void update_axis_limits(const std::string &axis_type, const graphics_handle &h)
Definition: graphics.h:3132
octave_value get(const caseless_str &name) const
Definition: graphics.h:3039
bool is_xliminclude() const
Definition: graphics.h:3170
std::string value_as_string(const std::string &prop)
Definition: graphics.h:3095
void remove_all_listeners()
Definition: graphics.h:3193
octave_value get_alim() const
Definition: graphics.h:3149
void mark_modified()
Definition: graphics.h:3000
void override_defaults(base_graphics_object &obj)
Definition: graphics.h:3002
octave_value get_ylim() const
Definition: graphics.h:3158
~graphics_object()=default
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:3084
bool is_climinclude() const
Definition: graphics.h:3167
octave_value get(bool all=false) const
Definition: graphics.h:3037
graphics_object(const graphics_object &)=default
void reset_default_properties()
Definition: graphics.h:3201
void set(const caseless_str &name, const octave_value &val)
Definition: graphics.h:3020
void update_axis_limits(const std::string &axis_type)
Definition: graphics.h:3127
std::string values_as_string()
Definition: graphics.h:3091
void delete_property_listener(const std::string &nm, const octave_value &v, listener_mode mode=GCB_POSTSET)
Definition: graphics.h:3189
void initialize()
Definition: graphics.h:3195
base_properties & get_properties()
Definition: graphics.h:3120
bool isa(const std::string &go_name) const
Definition: graphics.h:3118
const base_properties & get_properties() const
Definition: graphics.h:3122
octave_value get_zlim() const
Definition: graphics.h:3161
std::string type() const
Definition: graphics.h:3140
void defaults() const
Definition: graphics.h:3116
void finalize()
Definition: graphics.h:3197
bool is_handle_visible() const
Definition: graphics.h:3179
octave_value get(const char *name) const
Definition: graphics.h:3052
octave_value get_factory_default(const caseless_str &name) const
Definition: graphics.h:3062
octave_value get(const std::string &name) const
Definition: graphics.h:3047
octave_value get_xlim() const
Definition: graphics.h:3155
void reparent(const graphics_handle &h)
Definition: graphics.h:3114
graphics_handle get_parent() const
Definition: graphics.h:3104
octave_value get_defaults() const
Definition: graphics.h:3067
graphics_handle get_handle() const
Definition: graphics.h:3106
octave_value get_default(const caseless_str &name) const
Definition: graphics.h:3057
void override_defaults()
Definition: graphics.h:3007
void set_defaults(const std::string &mode)
Definition: graphics.h:3035
property_list get_defaults_list() const
Definition: graphics.h:3069
octave_value get_clim() const
Definition: graphics.h:3152
void build_user_defaults_map(property_list::pval_map_type &def, const std::string go_name) const
Definition: graphics.h:3012
octave_value get_factory_defaults() const
Definition: graphics.h:3074
bool valid_object() const
Definition: graphics.h:3138
void set_from_list(property_list &plist)
Definition: graphics.h:3018
graphics_object(base_graphics_object *new_rep)
Definition: graphics.h:2992
void remove_child(const graphics_handle &h)
Definition: graphics.h:3110
property_list get_factory_defaults_list() const
Definition: graphics.h:3079
void add_property_listener(const std::string &nm, const octave_value &v, listener_mode mode=GCB_POSTSET)
Definition: graphics.h:3185
bool is_zliminclude() const
Definition: graphics.h:3176
void adopt(const graphics_handle &h)
Definition: graphics.h:3112
bool is_aliminclude() const
Definition: graphics.h:3164
octave::graphics_toolkit get_toolkit() const
Definition: graphics.h:3182
bool is_yliminclude() const
Definition: graphics.h:3173
octave_map values_as_struct()
Definition: graphics.h:3102
Matrix zscale(const Matrix &m) const
Definition: graphics.h:4622
Matrix yscale(const Matrix &m) const
Definition: graphics.h:4621
Matrix xscale(const Matrix &m) const
Definition: graphics.h:4620
graphics_xform(const graphics_xform &g)
Definition: graphics.h:4589
Matrix scale(const Matrix &m) const
Definition: graphics.h:4624
~graphics_xform()=default
graphics_xform(const Matrix &xm, const Matrix &xim, const scaler &x, const scaler &y, const scaler &z, const Matrix &zl)
Definition: graphics.h:4582
ColumnVector untransform(double x, double y, bool use_scale=true) const
Definition: graphics.h:4617
std::set< std::string > m_type_constraints
Definition: graphics.h:1722
handle_property(const handle_property &)=default
handle_property(const std::string &nm, const graphics_handle &h, const graphics_handle &val=graphics_handle())
Definition: graphics.h:1684
void invalidate()
Definition: graphics.h:1712
void add_constraint(const std::string &type)
Definition: graphics.h:1717
~handle_property()=default
handle_property()=delete
graphics_handle handle_value() const
Definition: graphics.h:1698
octave_value get() const
Definition: graphics.h:1696
base_property * clone() const
Definition: graphics.h:1715
octave_value get(const std::string &pname) const
Definition: graphics.h:11490
void set_yliminclude(const octave_value &val)
Definition: graphics.h:11655
void set_aliminclude(const octave_value &val)
Definition: graphics.h:11631
octave_value get_ylim() const
Definition: graphics.h:11563
bool is_zliminclude() const
Definition: graphics.h:11579
std::string get_aliminclude() const
Definition: graphics.h:11568
bool is_yliminclude() const
Definition: graphics.h:11576
void set_displayname(const octave_value &val)
Definition: graphics.h:11583
void set_zliminclude(const octave_value &val)
Definition: graphics.h:11663
void set_zlim(const octave_value &val)
Definition: graphics.h:11623
bool is_xliminclude() const
Definition: graphics.h:11573
octave_value get_zlim() const
Definition: graphics.h:11565
octave_value get_alim() const
Definition: graphics.h:11557
void set_clim(const octave_value &val)
Definition: graphics.h:11599
bool is_climinclude() const
Definition: graphics.h:11570
octave_value get_clim() const
Definition: graphics.h:11559
void set_xlim(const octave_value &val)
Definition: graphics.h:11607
std::string get_displayname() const
Definition: graphics.h:11555
octave_value get_xlim() const
Definition: graphics.h:11561
std::string get_zliminclude() const
Definition: graphics.h:11580
std::string graphics_object_name() const
Definition: graphics.h:11502
std::string get_climinclude() const
Definition: graphics.h:11571
std::string get_yliminclude() const
Definition: graphics.h:11577
void set_ylim(const octave_value &val)
Definition: graphics.h:11615
void set_alim(const octave_value &val)
Definition: graphics.h:11591
bool is_aliminclude() const
Definition: graphics.h:11567
void set_xliminclude(const octave_value &val)
Definition: graphics.h:11647
void set_climinclude(const octave_value &val)
Definition: graphics.h:11639
octave_value get(const char *pname) const
Definition: graphics.h:11495
std::string get_xliminclude() const
Definition: graphics.h:11574
hggroup(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:11687
base_properties & get_properties()
Definition: graphics.h:11695
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:11706
bool valid_object() const
Definition: graphics.h:11699
const base_properties & get_properties() const
Definition: graphics.h:11697
~hggroup()=default
octave_value get_alphadata() const
Definition: graphics.h:8479
bool is_aliminclude() const
Definition: graphics.h:8371
bool is_climinclude() const
Definition: graphics.h:8376
bool ydatamode_is(const std::string &v) const
Definition: graphics.h:8510
octave_value get(const std::string &pname) const
Definition: graphics.h:8404
octave_value get_xlim() const
Definition: graphics.h:8497
void set_climinclude(const octave_value &val)
Definition: graphics.h:8628
bool is_yliminclude() const
Definition: graphics.h:8504
void set_alim(const octave_value &val)
Definition: graphics.h:8578
std::string get_alphadatamapping() const
Definition: graphics.h:8482
float pixel_ysize()
Definition: graphics.h:8809
octave_value get_alim() const
Definition: graphics.h:8493
std::string get_cdatamapping() const
Definition: graphics.h:8487
bool cdatamapping_is(const std::string &v) const
Definition: graphics.h:8486
void set_alphadatamapping(const octave_value &val)
Definition: graphics.h:8523
void set_ydatamode(const octave_value &val)
Definition: graphics.h:8666
void set_alphadata(const octave_value &val)
Definition: graphics.h:8514
~properties()=default
void set_aliminclude(const octave_value &val)
Definition: graphics.h:8618
bool alphadatamapping_is(const std::string &v) const
Definition: graphics.h:8481
octave_value get_clim() const
Definition: graphics.h:8495
void initialize_data()
Definition: graphics.h:8383
std::string get_climinclude() const
Definition: graphics.h:8378
void set_ydata(const octave_value &val)
Definition: graphics.h:8565
void set_clim(const octave_value &val)
Definition: graphics.h:8588
octave_value get_xdata() const
Definition: graphics.h:8489
std::string get_yliminclude() const
Definition: graphics.h:8505
void set_xliminclude(const octave_value &val)
Definition: graphics.h:8638
bool is_xliminclude() const
Definition: graphics.h:8501
std::string get_xdatamode() const
Definition: graphics.h:8508
octave_value get_cdata() const
Definition: graphics.h:8484
void set_xlim(const octave_value &val)
Definition: graphics.h:8598
void set_yliminclude(const octave_value &val)
Definition: graphics.h:8648
float pixel_xsize()
Definition: graphics.h:8804
std::string get_aliminclude() const
Definition: graphics.h:8373
void set_xdatamode(const octave_value &val)
Definition: graphics.h:8658
void set_xdata(const octave_value &val)
Definition: graphics.h:8552
std::string graphics_object_name() const
Definition: graphics.h:8416
bool xdatamode_is(const std::string &v) const
Definition: graphics.h:8507
void set_cdatamapping(const octave_value &val)
Definition: graphics.h:8542
std::string get_xliminclude() const
Definition: graphics.h:8502
void set_cdata(const octave_value &val)
Definition: graphics.h:8533
octave_value get_ydata() const
Definition: graphics.h:8491
octave_value get_ylim() const
Definition: graphics.h:8499
octave_value get(const char *pname) const
Definition: graphics.h:8409
void set_ylim(const octave_value &val)
Definition: graphics.h:8608
std::string get_ydatamode() const
Definition: graphics.h:8511
image(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:8819
bool valid_object() const
Definition: graphics.h:8833
base_properties & get_properties()
Definition: graphics.h:8829
~image()=default
const base_properties & get_properties() const
Definition: graphics.h:8831
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:8835
void set_style(const octave_value &val)
Definition: graphics.h:8947
octave_value get_position() const
Definition: graphics.h:8925
octave_value get(const char *pname) const
Definition: graphics.h:8876
octave_value get(const std::string &pname) const
Definition: graphics.h:8871
std::string get_style() const
Definition: graphics.h:8928
bool style_is(const std::string &v) const
Definition: graphics.h:8927
~properties()=default
octave_value get_color() const
Definition: graphics.h:8923
Matrix get_color_rgb() const
Definition: graphics.h:8922
void set_color(const octave_value &val)
Definition: graphics.h:8931
void set_position(const octave_value &val)
Definition: graphics.h:8939
std::string graphics_object_name() const
Definition: graphics.h:8883
bool color_is_rgb() const
Definition: graphics.h:8920
bool color_is(const std::string &v) const
Definition: graphics.h:8921
bool valid_object() const
Definition: graphics.h:8982
light(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:8970
~light()=default
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:8984
base_properties & get_properties()
Definition: graphics.h:8978
const base_properties & get_properties() const
Definition: graphics.h:8980
base_scaler * clone() const
Definition: graphics.h:117
double unscale(double d) const
Definition: graphics.h:115
double scale(double d) const
Definition: graphics.h:113
NDArray scale(const NDArray &m) const
Definition: graphics.h:111
Matrix scale(const Matrix &m) const
Definition: graphics.h:109
bool is_linear() const
Definition: graphics.h:119
void set_linestyle(const octave_value &val)
Definition: graphics.h:7490
std::string get_marker() const
Definition: graphics.h:7424
std::string graphics_object_name() const
Definition: graphics.h:7335
bool marker_is(const std::string &v) const
Definition: graphics.h:7423
Matrix get_color_rgb() const
Definition: graphics.h:7410
std::string get_xliminclude() const
Definition: graphics.h:7457
std::string get_displayname() const
Definition: graphics.h:7413
void set_zlim(const octave_value &val)
Definition: graphics.h:7609
std::string get_zliminclude() const
Definition: graphics.h:7463
std::string get_yliminclude() const
Definition: graphics.h:7460
bool linejoin_is(const std::string &v) const
Definition: graphics.h:7415
double get_linewidth() const
Definition: graphics.h:7421
void set_yliminclude(const octave_value &val)
Definition: graphics.h:7629
bool markeredgecolor_is(const std::string &v) const
Definition: graphics.h:7427
octave_value get_color() const
Definition: graphics.h:7411
std::string get_zdatasource() const
Definition: graphics.h:7448
octave_value get_ylim() const
Definition: graphics.h:7452
bool is_xliminclude() const
Definition: graphics.h:7456
void set_zdata(const octave_value &val)
Definition: graphics.h:7572
bool color_is_rgb() const
Definition: graphics.h:7408
void set_displayname(const octave_value &val)
Definition: graphics.h:7474
void set_ydatasource(const octave_value &val)
Definition: graphics.h:7564
octave_value get(const std::string &pname) const
Definition: graphics.h:7323
void set_ylim(const octave_value &val)
Definition: graphics.h:7599
void set_zdatasource(const octave_value &val)
Definition: graphics.h:7581
void set_markeredgecolor(const octave_value &val)
Definition: graphics.h:7514
void set_xdata(const octave_value &val)
Definition: graphics.h:7538
double get_markersize() const
Definition: graphics.h:7436
octave_value get_markeredgecolor() const
Definition: graphics.h:7429
std::string get_linestyle() const
Definition: graphics.h:7419
~properties()=default
bool is_zliminclude() const
Definition: graphics.h:7462
Matrix get_markeredgecolor_rgb() const
Definition: graphics.h:7428
void set_xdatasource(const octave_value &val)
Definition: graphics.h:7547
bool markerfacecolor_is(const std::string &v) const
Definition: graphics.h:7432
void set_xliminclude(const octave_value &val)
Definition: graphics.h:7619
bool linestyle_is(const std::string &v) const
Definition: graphics.h:7418
bool markerfacecolor_is_rgb() const
Definition: graphics.h:7431
octave_value get_xlim() const
Definition: graphics.h:7450
void set_zliminclude(const octave_value &val)
Definition: graphics.h:7639
void set_xlim(const octave_value &val)
Definition: graphics.h:7589
void set_markerfacecolor(const octave_value &val)
Definition: graphics.h:7522
bool is_yliminclude() const
Definition: graphics.h:7459
octave_value get_markerfacecolor() const
Definition: graphics.h:7434
void set_linejoin(const octave_value &val)
Definition: graphics.h:7482
octave_value get(const char *pname) const
Definition: graphics.h:7328
void set_linewidth(const octave_value &val)
Definition: graphics.h:7498
bool color_is(const std::string &v) const
Definition: graphics.h:7409
std::string get_ydatasource() const
Definition: graphics.h:7444
octave_value get_ydata() const
Definition: graphics.h:7442
octave_value get_zlim() const
Definition: graphics.h:7454
void set_ydata(const octave_value &val)
Definition: graphics.h:7555
bool markeredgecolor_is_rgb() const
Definition: graphics.h:7426
void set_color(const octave_value &val)
Definition: graphics.h:7466
void set_marker(const octave_value &val)
Definition: graphics.h:7506
std::string get_linejoin() const
Definition: graphics.h:7416
void set_markersize(const octave_value &val)
Definition: graphics.h:7530
std::string get_xdatasource() const
Definition: graphics.h:7440
octave_value get_zdata() const
Definition: graphics.h:7446
Matrix get_markerfacecolor_rgb() const
Definition: graphics.h:7433
octave_value get_xdata() const
Definition: graphics.h:7438
properties()=delete
line(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:7672
base_properties & get_properties()
Definition: graphics.h:7680
~line()=default
bool valid_object() const
Definition: graphics.h:7684
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:7686
const base_properties & get_properties() const
Definition: graphics.h:7682
Matrix scale(const Matrix &m) const
Definition: graphics.h:128
base_scaler * clone() const
Definition: graphics.h:152
NDArray scale(const NDArray &m) const
Definition: graphics.h:137
double unscale(double d) const
Definition: graphics.h:149
double scale(double d) const
Definition: graphics.h:146
base_scaler * clone() const
Definition: graphics.h:193
double unscale(double d) const
Definition: graphics.h:190
NDArray scale(const NDArray &m) const
Definition: graphics.h:178
double scale(double d) const
Definition: graphics.h:187
double value() const
Definition: oct-handle.h:78
void resize(octave_idx_type n, const octave_value &rfv=octave_value())
Definition: ovl.h:117
octave_idx_type length() const
Definition: ovl.h:113
bool is_undefined() const
Definition: ov.h:595
bool bool_value(bool warn=false) const
Definition: ov.h:885
charMatrix char_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:894
Cell cell_value() const
octave_idx_type rows() const
Definition: ov.h:545
bool is_scalar_type() const
Definition: ov.h:744
bool isreal() const
Definition: ov.h:738
bool is_string() const
Definition: ov.h:637
bool isempty() const
Definition: ov.h:601
bool issparse() const
Definition: ov.h:753
bool iscell() const
Definition: ov.h:604
octave_idx_type numel() const
Definition: ov.h:559
std::string string_value(bool force=false) const
Definition: ov.h:974
string_vector string_vector_value(bool pad=false) const
Definition: ov.h:977
NDArray array_value(bool frc_str_conv=false) const
Definition: ov.h:859
bool is_bool_scalar() const
Definition: ov.h:622
octave_value full_value() const
Definition: ov.h:435
octave_value resize(const dim_vector &dv, bool fill=false) const
Definition: ov.h:580
bool iscellstr() const
Definition: ov.h:607
Matrix matrix_value(bool frc_str_conv=false) const
Definition: ov.h:853
double double_value(bool frc_str_conv=false) const
Definition: ov.h:841
void set_zlim(const octave_value &val)
Definition: graphics.h:9618
octave_value get_ydata() const
Definition: graphics.h:9267
std::string get_displayname() const
Definition: graphics.h:9193
void set_backfacelighting(const octave_value &val)
Definition: graphics.h:9309
double get_ambientstrength() const
Definition: graphics.h:9181
void set_markeredgecolor(const octave_value &val)
Definition: graphics.h:9473
octave_value get_zlim() const
Definition: graphics.h:9279
bool edgealpha_is_double() const
Definition: graphics.h:9195
void set_facelighting(const octave_value &val)
Definition: graphics.h:9393
void set_aliminclude(const octave_value &val)
Definition: graphics.h:9628
void set_edgelighting(const octave_value &val)
Definition: graphics.h:9368
void set_displayname(const octave_value &val)
Definition: graphics.h:9344
bool has_bad_data(std::string &msg) const
Definition: graphics.h:9010
std::string graphics_object_name() const
Definition: graphics.h:9061
void set_yliminclude(const octave_value &val)
Definition: graphics.h:9658
bool linestyle_is(const std::string &v) const
Definition: graphics.h:9232
bool backfacelighting_is(const std::string &v) const
Definition: graphics.h:9183
bool edgecolor_is_rgb() const
Definition: graphics.h:9200
double get_markersize() const
Definition: graphics.h:9250
void set_linestyle(const octave_value &val)
Definition: graphics.h:9449
octave_value get(const std::string &pname) const
Definition: graphics.h:9049
bool alphadatamapping_is(const std::string &v) const
Definition: graphics.h:9178
std::string get_cdatamapping() const
Definition: graphics.h:9189
bool markerfacecolor_is(const std::string &v) const
Definition: graphics.h:9246
std::string get_yliminclude() const
Definition: graphics.h:9285
octave_value get_ylim() const
Definition: graphics.h:9277
bool markeredgecolor_is(const std::string &v) const
Definition: graphics.h:9241
std::string get_climinclude() const
Definition: graphics.h:9023
~properties()=default
void set_markerfacecolor(const octave_value &val)
Definition: graphics.h:9481
void set_specularexponent(const octave_value &val)
Definition: graphics.h:9505
void set_alim(const octave_value &val)
Definition: graphics.h:9578
octave_value get_facecolor() const
Definition: graphics.h:9216
void set_cdatamapping(const octave_value &val)
Definition: graphics.h:9326
void set_ydata(const octave_value &val)
Definition: graphics.h:9560
bool is_yliminclude() const
Definition: graphics.h:9284
double get_linewidth() const
Definition: graphics.h:9235
bool markerfacecolor_is_rgb() const
Definition: graphics.h:9245
void set_ylim(const octave_value &val)
Definition: graphics.h:9608
bool is_climinclude() const
Definition: graphics.h:9021
bool marker_is(const std::string &v) const
Definition: graphics.h:9237
bool facealpha_is(const std::string &v) const
Definition: graphics.h:9209
std::string get_aliminclude() const
Definition: graphics.h:9018
void set_vertexnormals(const octave_value &val)
Definition: graphics.h:9521
double get_specularstrength() const
Definition: graphics.h:9256
bool markeredgecolor_is_rgb() const
Definition: graphics.h:9240
std::string get_edgelighting() const
Definition: graphics.h:9206
void set_xliminclude(const octave_value &val)
Definition: graphics.h:9648
Matrix get_markeredgecolor_rgb() const
Definition: graphics.h:9242
octave_value get_facevertexcdata() const
Definition: graphics.h:9230
std::string get_backfacelighting() const
Definition: graphics.h:9184
bool is_xliminclude() const
Definition: graphics.h:9281
void set_vertexnormalsmode(const octave_value &val)
Definition: graphics.h:9533
void set_zdata(const octave_value &val)
Definition: graphics.h:9569
double get_edgealpha_double() const
Definition: graphics.h:9197
void set_alphadatamapping(const octave_value &val)
Definition: graphics.h:9291
double get_diffusestrength() const
Definition: graphics.h:9191
octave_value get_vertices() const
Definition: graphics.h:9263
void set_facenormalsmode(const octave_value &val)
Definition: graphics.h:9414
bool facecolor_is_rgb() const
Definition: graphics.h:9213
void set_xdata(const octave_value &val)
Definition: graphics.h:9551
bool edgelighting_is(const std::string &v) const
Definition: graphics.h:9205
std::string get_marker() const
Definition: graphics.h:9238
void set_facevertexalphadata(const octave_value &val)
Definition: graphics.h:9432
void set_vertices(const octave_value &val)
Definition: graphics.h:9542
double get_specularexponent() const
Definition: graphics.h:9254
void set_diffusestrength(const octave_value &val)
Definition: graphics.h:9336
double get_specularcolorreflectance() const
Definition: graphics.h:9252
std::string get_linestyle() const
Definition: graphics.h:9233
void set_faces(const octave_value &val)
Definition: graphics.h:9423
bool facelighting_is(const std::string &v) const
Definition: graphics.h:9218
std::string get_vertexnormalsmode() const
Definition: graphics.h:9261
Matrix get_edgecolor_rgb() const
Definition: graphics.h:9202
std::string get_alphadatamapping() const
Definition: graphics.h:9179
void set_marker(const octave_value &val)
Definition: graphics.h:9465
void set_edgealpha(const octave_value &val)
Definition: graphics.h:9352
std::string get_facelighting() const
Definition: graphics.h:9219
octave_value get_xdata() const
Definition: graphics.h:9265
void set_clim(const octave_value &val)
Definition: graphics.h:9588
bool vertexnormalsmode_is(const std::string &v) const
Definition: graphics.h:9260
octave_value get_edgecolor() const
Definition: graphics.h:9203
octave_value get_alim() const
Definition: graphics.h:9271
void set_specularcolorreflectance(const octave_value &val)
Definition: graphics.h:9497
bool facenormalsmode_is(const std::string &v) const
Definition: graphics.h:9223
void set_facealpha(const octave_value &val)
Definition: graphics.h:9377
std::string get_xliminclude() const
Definition: graphics.h:9282
bool edgealpha_is(const std::string &v) const
Definition: graphics.h:9196
octave_value get_markeredgecolor() const
Definition: graphics.h:9243
double get_facealpha_double() const
Definition: graphics.h:9210
bool facealpha_is_double() const
Definition: graphics.h:9208
octave_value get_xlim() const
Definition: graphics.h:9275
void set_markersize(const octave_value &val)
Definition: graphics.h:9489
std::string get_zliminclude() const
Definition: graphics.h:9288
void set_specularstrength(const octave_value &val)
Definition: graphics.h:9513
octave_value get_markerfacecolor() const
Definition: graphics.h:9248
octave_value get_edgealpha() const
Definition: graphics.h:9198
Matrix get_markerfacecolor_rgb() const
Definition: graphics.h:9247
octave_value get_vertexnormals() const
Definition: graphics.h:9258
octave_value get_facealpha() const
Definition: graphics.h:9211
octave_value get_zdata() const
Definition: graphics.h:9269
octave_value get_clim() const
Definition: graphics.h:9273
octave_value get_facenormals() const
Definition: graphics.h:9221
void set_facenormals(const octave_value &val)
Definition: graphics.h:9402
octave_value get(const char *pname) const
Definition: graphics.h:9054
void update_normals(bool reset, bool force=false)
Definition: graphics.h:9726
void set_facevertexcdata(const octave_value &val)
Definition: graphics.h:9440
bool is_zliminclude() const
Definition: graphics.h:9287
void set_xlim(const octave_value &val)
Definition: graphics.h:9598
void set_edgecolor(const octave_value &val)
Definition: graphics.h:9360
bool edgecolor_is(const std::string &v) const
Definition: graphics.h:9201
void set_zliminclude(const octave_value &val)
Definition: graphics.h:9668
void set_linewidth(const octave_value &val)
Definition: graphics.h:9457
Matrix get_facecolor_rgb() const
Definition: graphics.h:9215
std::vector< std::vector< octave_idx_type > > m_coplanar_last_idx
Definition: graphics.h:9028
octave_value get_faces() const
Definition: graphics.h:9226
bool facecolor_is(const std::string &v) const
Definition: graphics.h:9214
void set_facecolor(const octave_value &val)
Definition: graphics.h:9385
bool cdatamapping_is(const std::string &v) const
Definition: graphics.h:9188
std::string get_facenormalsmode() const
Definition: graphics.h:9224
void set_cdata(const octave_value &val)
Definition: graphics.h:9317
void set_climinclude(const octave_value &val)
Definition: graphics.h:9638
octave_value get_facevertexalphadata() const
Definition: graphics.h:9228
octave_value get_cdata() const
Definition: graphics.h:9186
void set_ambientstrength(const octave_value &val)
Definition: graphics.h:9301
bool is_aliminclude() const
Definition: graphics.h:9016
patch(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:9839
bool valid_object() const
Definition: graphics.h:9851
const base_properties & get_properties() const
Definition: graphics.h:9849
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:9853
base_properties & get_properties()
Definition: graphics.h:9847
~patch()=default
plist_map_const_iterator end() const
Definition: graphics.h:2214
plist_map_const_iterator begin() const
Definition: graphics.h:2211
plist_map_iterator find(const std::string &go_name)
Definition: graphics.h:2216
property_list(const plist_map_type &m=plist_map_type())
Definition: graphics.h:2201
plist_map_const_iterator find(const std::string &go_name) const
Definition: graphics.h:2221
plist_map_type::const_iterator plist_map_const_iterator
Definition: graphics.h:2199
plist_map_iterator begin()
Definition: graphics.h:2210
pval_map_type::iterator pval_map_iterator
Definition: graphics.h:2195
pval_map_type::const_iterator pval_map_const_iterator
Definition: graphics.h:2196
std::map< std::string, pval_map_type > plist_map_type
Definition: graphics.h:2193
plist_map_iterator end()
Definition: graphics.h:2213
plist_map_type::iterator plist_map_iterator
Definition: graphics.h:2198
pval_vector pval_map_type
Definition: graphics.h:2192
property & operator=(const octave_value &val)
Definition: graphics.h:2083
Cell values_as_cell() const
Definition: graphics.h:2080
octave_value get() const
Definition: graphics.h:2070
int get_id() const
Definition: graphics.h:2064
void delete_listener(const octave_value &v=octave_value(), listener_mode mode=GCB_POSTSET)
Definition: graphics.h:2103
bool ok() const
Definition: graphics.h:2040
void set_id(int d)
Definition: graphics.h:2067
void set_hidden(bool flag)
Definition: graphics.h:2058
bool is_radio() const
Definition: graphics.h:2061
~property()
Definition: graphics.h:2034
void set_parent(const graphics_handle &h)
Definition: graphics.h:2052
property(base_property *bp, bool persist=false)
Definition: graphics.h:2026
property(const property &p)
Definition: graphics.h:2029
void set_name(const std::string &name)
Definition: graphics.h:2046
void run_listeners(listener_mode mode=GCB_POSTSET)
Definition: graphics.h:2107
property()
Definition: graphics.h:2023
property clone() const
Definition: graphics.h:2114
std::string values_as_string() const
Definition: graphics.h:2077
void add_listener(const octave_value &v, listener_mode mode=GCB_POSTSET)
Definition: graphics.h:2100
bool is_hidden() const
Definition: graphics.h:2055
graphics_handle get_parent() const
Definition: graphics.h:2049
bool set(const octave_value &val, bool do_run=true, bool do_notify_toolkit=true)
Definition: graphics.h:2073
std::string get_name() const
Definition: graphics.h:2043
void erase(iterator it)
Definition: graphics.h:2182
octave_value lookup(const std::string pname) const
Definition: graphics.h:2150
iterator find(const std::string pname)
Definition: graphics.h:2139
void erase(const std::string pname)
Definition: graphics.h:2175
const_iterator find(const std::string pname) const
Definition: graphics.h:2128
base_property * clone() const
Definition: graphics.h:981
radio_property(const std::string &nm, const graphics_handle &h, const std::string &v)
Definition: graphics.h:946
radio_property()=delete
radio_property(const std::string &nm, const graphics_handle &h, const radio_values &v=radio_values())
Definition: graphics.h:941
radio_property(const std::string &nm, const graphics_handle &h, const radio_values &v, const std::string &def)
Definition: graphics.h:951
~radio_property()=default
Cell values_as_cell() const
Definition: graphics.h:968
bool is(const caseless_str &v) const
Definition: graphics.h:970
bool is_radio() const
Definition: graphics.h:973
const std::string & current_value() const
Definition: graphics.h:963
bool do_set(const octave_value &newval)
Definition: graphics.h:984
std::string values_as_string() const
Definition: graphics.h:965
octave_value get() const
Definition: graphics.h:961
bool contains(const std::string &val, std::string &match)
Definition: graphics.h:884
bool validate(const std::string &val, std::string &match)
Definition: graphics.h:874
octave_idx_type nelem() const
Definition: graphics.h:927
void set_screenpixelsperinch(const octave_value &val)
Definition: graphics.h:3405
octave_value get_screensize() const
Definition: graphics.h:3344
void set_pointerlocation(const octave_value &val)
Definition: graphics.h:3381
void set_screensize(const octave_value &val)
Definition: graphics.h:3413
void set_commandwindowsize(const octave_value &val)
Definition: graphics.h:3355
void set_monitorpositions(const octave_value &val)
Definition: graphics.h:3373
void set_showhiddenhandles(const octave_value &val)
Definition: graphics.h:3421
octave_value get_commandwindowsize() const
Definition: graphics.h:3328
void set_fixedwidthfontname(const octave_value &val)
Definition: graphics.h:3365
std::string graphics_object_name() const
Definition: graphics.h:3271
octave_value get(const std::string &pname) const
Definition: graphics.h:3259
void set_pointerwindow(const octave_value &val)
Definition: graphics.h:3389
graphics_handle get_callbackobject() const
Definition: graphics.h:3326
double get_pointerwindow() const
Definition: graphics.h:3338
void set_screendepth(const octave_value &val)
Definition: graphics.h:3397
octave_value get_pointerlocation() const
Definition: graphics.h:3336
octave_value get_monitorpositions() const
Definition: graphics.h:3334
octave_value get(const char *pname) const
Definition: graphics.h:3264
bool is_showhiddenhandles() const
Definition: graphics.h:3346
double get_screenpixelsperinch() const
Definition: graphics.h:3342
void set_units(const octave_value &val)
Definition: graphics.h:3429
std::string get_fixedwidthfontname() const
Definition: graphics.h:3332
std::string get_units() const
Definition: graphics.h:3350
bool units_is(const std::string &v) const
Definition: graphics.h:3349
graphics_handle get_currentfigure() const
Definition: graphics.h:3330
double get_screendepth() const
Definition: graphics.h:3340
std::string get_showhiddenhandles() const
Definition: graphics.h:3347
octave_value get(const caseless_str &name) const
Definition: graphics.h:3482
base_properties & get_properties()
Definition: graphics.h:3542
void mark_modified()
Definition: graphics.h:3459
const base_properties & get_properties() const
Definition: graphics.h:3544
octave_value get_defaults() const
Definition: graphics.h:3522
property_list get_factory_defaults_list() const
Definition: graphics.h:3537
octave_value get_factory_default(const caseless_str &name) const
Definition: graphics.h:3512
octave_value get_default(const caseless_str &name) const
Definition: graphics.h:3496
void override_defaults(base_graphics_object &obj)
Definition: graphics.h:3461
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:3550
property_list get_defaults_list() const
Definition: graphics.h:3527
octave_value get_factory_defaults() const
Definition: graphics.h:3532
void set(const caseless_str &name, const octave_value &value)
Definition: graphics.h:3471
~root_figure()=default
bool valid_object() const
Definition: graphics.h:3546
base_property * clone() const
Definition: graphics.h:1596
row_vector_property(const row_vector_property &p)
Definition: graphics.h:1547
row_vector_property(const std::string &nm, const graphics_handle &h, const octave_value &m)
Definition: graphics.h:1538
row_vector_property()=delete
bool do_set(const octave_value &v)
Definition: graphics.h:1610
void add_constraint(const finite_type finite)
Definition: graphics.h:1570
void add_constraint(octave_idx_type len)
Definition: graphics.h:1580
void add_constraint(const dim_vector &dims)
Definition: graphics.h:1565
void add_constraint(const std::string &type)
Definition: graphics.h:1560
void add_constraint(const std::string &type, double val, bool inclusive)
Definition: graphics.h:1575
~row_vector_property()=default
scaler()
Definition: graphics.h:208
Matrix scale(const Matrix &m) const
Definition: graphics.h:224
scaler(const std::string &s)
Definition: graphics.h:212
double scale(double d) const
Definition: graphics.h:230
bool is_linear() const
Definition: graphics.h:236
double unscale(double d) const
Definition: graphics.h:233
~scaler()
Definition: graphics.h:222
NDArray scale(const NDArray &m) const
Definition: graphics.h:227
scaler(const scaler &s)
Definition: graphics.h:210
void set_xlim(const octave_value &val)
Definition: graphics.h:10387
void set_ydatasource(const octave_value &val)
Definition: graphics.h:10342
void set_cdata(const octave_value &val)
Definition: graphics.h:10132
std::string get_zdatasource() const
Definition: graphics.h:10102
void set_xdatasource(const octave_value &val)
Definition: graphics.h:10325
void set_yliminclude(const octave_value &val)
Definition: graphics.h:10447
void set_rdatasource(const octave_value &val)
Definition: graphics.h:10266
std::string get_aliminclude() const
Definition: graphics.h:9890
void set_displayname(const octave_value &val)
Definition: graphics.h:10170
octave_value get_clim() const
Definition: graphics.h:10106
void set_datatiptemplate(const octave_value &val)
Definition: graphics.h:10162
void set_longitudedata(const octave_value &val)
Definition: graphics.h:10202
std::string get_cdatamode() const
Definition: graphics.h:10043
void set_markerfacealpha(const octave_value &val)
Definition: graphics.h:10242
void set_ylim(const octave_value &val)
Definition: graphics.h:10397
std::string get_ydatasource() const
Definition: graphics.h:10098
bool markeredgecolor_is(const std::string &v) const
Definition: graphics.h:10067
std::string get_xdatasource() const
Definition: graphics.h:10094
std::string get_displayname() const
Definition: graphics.h:10049
bool markeredgecolor_is_rgb() const
Definition: graphics.h:10066
void set_rdata(const octave_value &val)
Definition: graphics.h:10258
std::string get_cdatasource() const
Definition: graphics.h:10045
bool is_xliminclude() const
Definition: graphics.h:10114
void set_zdatasource(const octave_value &val)
Definition: graphics.h:10359
octave_value get_xlim() const
Definition: graphics.h:10108
octave_value get_cdata() const
Definition: graphics.h:10040
void set_longitudedatasource(const octave_value &val)
Definition: graphics.h:10210
std::string get_climinclude() const
Definition: graphics.h:9895
octave_value get_zdata() const
Definition: graphics.h:10100
bool marker_is(const std::string &v) const
Definition: graphics.h:10061
void set_sizedata(const octave_value &val)
Definition: graphics.h:10283
std::string get_xliminclude() const
Definition: graphics.h:10115
void set_xdata(const octave_value &val)
Definition: graphics.h:10316
std::string get_thetadatasource() const
Definition: graphics.h:10090
void set_annotation(const octave_value &val)
Definition: graphics.h:10124
std::string get_marker() const
Definition: graphics.h:10062
void set_clim(const octave_value &val)
Definition: graphics.h:10377
void set_marker(const octave_value &val)
Definition: graphics.h:10218
octave_value get_latitudedata() const
Definition: graphics.h:10051
void set_seriesindex(const octave_value &val)
Definition: graphics.h:10274
octave_value get_datatiptemplate() const
Definition: graphics.h:10047
std::string get_sizedatasource() const
Definition: graphics.h:10086
void set_sizedatasource(const octave_value &val)
Definition: graphics.h:10292
void set_linewidth(const octave_value &val)
Definition: graphics.h:10194
void set_markeredgecolor(const octave_value &val)
Definition: graphics.h:10234
std::string get_longitudedatasource() const
Definition: graphics.h:10059
std::string get_latitudedatasource() const
Definition: graphics.h:10053
octave_value get_markeredgecolor() const
Definition: graphics.h:10069
octave_value get_annotation() const
Definition: graphics.h:10038
void set_thetadatasource(const octave_value &val)
Definition: graphics.h:10308
octave_value get_rdata() const
Definition: graphics.h:10078
double get_linewidth() const
Definition: graphics.h:10055
std::string get_yliminclude() const
Definition: graphics.h:10118
void set_climinclude(const octave_value &val)
Definition: graphics.h:10427
octave_value get_zlim() const
Definition: graphics.h:10112
double get_markerfacealpha() const
Definition: graphics.h:10071
void set_zlim(const octave_value &val)
Definition: graphics.h:10407
octave_value get_sizedata() const
Definition: graphics.h:10084
void set_cdatamode(const octave_value &val)
Definition: graphics.h:10145
std::string graphics_object_name() const
Definition: graphics.h:9929
void set_ydata(const octave_value &val)
Definition: graphics.h:10333
octave_value get_xdata() const
Definition: graphics.h:10092
void set_zdata(const octave_value &val)
Definition: graphics.h:10350
bool cdatamode_is(const std::string &v) const
Definition: graphics.h:10042
Matrix get_markeredgecolor_rgb() const
Definition: graphics.h:10068
bool markerfacecolor_is_rgb() const
Definition: graphics.h:10073
void set_xliminclude(const octave_value &val)
Definition: graphics.h:10437
octave_value get_ydata() const
Definition: graphics.h:10096
bool is_yliminclude() const
Definition: graphics.h:10117
void set_aliminclude(const octave_value &val)
Definition: graphics.h:10417
double get_markeredgealpha() const
Definition: graphics.h:10064
std::string get_zliminclude() const
Definition: graphics.h:10121
void set_markerfacecolor(const octave_value &val)
Definition: graphics.h:10250
bool is_climinclude() const
Definition: graphics.h:9893
bool is_aliminclude() const
Definition: graphics.h:9888
octave_value get_markerfacecolor() const
Definition: graphics.h:10076
octave_value get_thetadata() const
Definition: graphics.h:10088
std::string get_rdatasource() const
Definition: graphics.h:10080
octave_value get_ylim() const
Definition: graphics.h:10110
bool markerfacecolor_is(const std::string &v) const
Definition: graphics.h:10074
void set_alim(const octave_value &val)
Definition: graphics.h:10367
void set_thetadata(const octave_value &val)
Definition: graphics.h:10300
void set_cdatasource(const octave_value &val)
Definition: graphics.h:10154
octave_value get(const char *pname) const
Definition: graphics.h:9922
void set_zliminclude(const octave_value &val)
Definition: graphics.h:10457
Matrix get_markerfacecolor_rgb() const
Definition: graphics.h:10075
bool is_zliminclude() const
Definition: graphics.h:10120
void set_markeredgealpha(const octave_value &val)
Definition: graphics.h:10226
octave_value get_longitudedata() const
Definition: graphics.h:10057
octave_value get(const std::string &pname) const
Definition: graphics.h:9917
void set_latitudedatasource(const octave_value &val)
Definition: graphics.h:10186
void set_latitudedata(const octave_value &val)
Definition: graphics.h:10178
octave_value get_alim() const
Definition: graphics.h:10104
bool has_bad_data(std::string &msg) const
Definition: graphics.h:9882
octave_value get_seriesindex() const
Definition: graphics.h:10082
~scatter()=default
base_properties & get_properties()
Definition: graphics.h:10607
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:10613
scatter(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:10596
const base_properties & get_properties() const
Definition: graphics.h:10609
bool valid_object() const
Definition: graphics.h:10611
bool do_set(const octave_value &val)
Definition: graphics.h:583
string_array_property()=delete
Cell cell_value() const
Definition: graphics.h:569
string_array_property(const std::string &s, const graphics_handle &h, const Cell &c, const char &sep='|', const desired_enum &typ=string_t)
Definition: graphics.h:523
string_array_property(const string_array_property &)=default
std::string string_value() const
Definition: graphics.h:555
string_array_property(const std::string &s, const graphics_handle &h, const std::string &val="", const char &sep='|', const desired_enum &typ=string_t)
Definition: graphics.h:500
octave_value get() const
Definition: graphics.h:547
~string_array_property()=default
base_property * clone() const
Definition: graphics.h:579
string_vector string_vector_value() const
Definition: graphics.h:571
std::string string_value() const
Definition: graphics.h:460
octave_value get() const
Definition: graphics.h:457
string_property(const string_property &)=default
bool do_set(const octave_value &val)
Definition: graphics.h:471
string_property(const std::string &s, const graphics_handle &h, const std::string &val="")
Definition: graphics.h:446
string_property()=delete
~string_property()=default
base_property * clone() const
Definition: graphics.h:468
string_vector & append(const std::string &s)
Definition: str-vec.cc:110
octave_idx_type numel() const
Definition: str-vec.h:100
bool edgealpha_is(const std::string &v) const
Definition: graphics.h:10824
void set_xdatasource(const octave_value &val)
Definition: graphics.h:11179
octave_value get_ylim() const
Definition: graphics.h:10906
std::string graphics_object_name() const
Definition: graphics.h:10681
bool backfacelighting_is(const std::string &v) const
Definition: graphics.h:10809
void set_specularexponent(const octave_value &val)
Definition: graphics.h:11133
void set_xdata(const octave_value &val)
Definition: graphics.h:11170
void set_specularcolorreflectance(const octave_value &val)
Definition: graphics.h:11125
octave_value get_facealpha() const
Definition: graphics.h:10839
std::string get_zliminclude() const
Definition: graphics.h:10917
std::string get_edgelighting() const
Definition: graphics.h:10834
octave_value get_ydata() const
Definition: graphics.h:10892
octave_value get_xdata() const
Definition: graphics.h:10888
void set_xliminclude(const octave_value &val)
Definition: graphics.h:11291
double get_markersize() const
Definition: graphics.h:10872
octave_value get_zlim() const
Definition: graphics.h:10908
void set_facealpha(const octave_value &val)
Definition: graphics.h:11023
octave_value get_cdata() const
Definition: graphics.h:10812
bool markeredgecolor_is_rgb() const
Definition: graphics.h:10862
std::string get_meshstyle() const
Definition: graphics.h:10875
void set_diffusestrength(const octave_value &val)
Definition: graphics.h:10982
std::string get_aliminclude() const
Definition: graphics.h:10640
Matrix get_markerfacecolor_rgb() const
Definition: graphics.h:10869
void set_ambientstrength(const octave_value &val)
Definition: graphics.h:10939
bool facealpha_is(const std::string &v) const
Definition: graphics.h:10837
bool facelighting_is(const std::string &v) const
Definition: graphics.h:10846
double get_diffusestrength() const
Definition: graphics.h:10819
bool edgecolor_is(const std::string &v) const
Definition: graphics.h:10829
Matrix get_markeredgecolor_rgb() const
Definition: graphics.h:10864
octave_value get_markeredgecolor() const
Definition: graphics.h:10865
void set_xlim(const octave_value &val)
Definition: graphics.h:11241
void set_aliminclude(const octave_value &val)
Definition: graphics.h:11271
void set_ydata(const octave_value &val)
Definition: graphics.h:11187
void set_edgelighting(const octave_value &val)
Definition: graphics.h:11014
bool meshstyle_is(const std::string &v) const
Definition: graphics.h:10874
void set_markerfacecolor(const octave_value &val)
Definition: graphics.h:11101
void set_zdata(const octave_value &val)
Definition: graphics.h:11204
bool is_aliminclude() const
Definition: graphics.h:10638
double get_edgealpha_double() const
Definition: graphics.h:10825
std::string get_alphadatamapping() const
Definition: graphics.h:10805
bool cdatamapping_is(const std::string &v) const
Definition: graphics.h:10814
void set_meshstyle(const octave_value &val)
Definition: graphics.h:11117
void set_zliminclude(const octave_value &val)
Definition: graphics.h:11311
std::string get_facenormalsmode() const
Definition: graphics.h:10852
double get_ambientstrength() const
Definition: graphics.h:10807
void set_alphadata(const octave_value &val)
Definition: graphics.h:10920
void set_linestyle(const octave_value &val)
Definition: graphics.h:11069
std::string get_yliminclude() const
Definition: graphics.h:10914
void set_facelighting(const octave_value &val)
Definition: graphics.h:11039
octave_value get_edgealpha() const
Definition: graphics.h:10826
void set_specularstrength(const octave_value &val)
Definition: graphics.h:11141
void set_facecolor(const octave_value &val)
Definition: graphics.h:11031
std::string get_xliminclude() const
Definition: graphics.h:10911
void set_facenormals(const octave_value &val)
Definition: graphics.h:11048
void update_normals(bool reset, bool force=false)
Definition: graphics.h:11364
void set_zlim(const octave_value &val)
Definition: graphics.h:11261
void set_zdatasource(const octave_value &val)
Definition: graphics.h:11213
octave_value get(const std::string &pname) const
Definition: graphics.h:10669
octave_value get_alphadata() const
Definition: graphics.h:10802
Matrix get_facecolor_rgb() const
Definition: graphics.h:10843
void set_vertexnormalsmode(const octave_value &val)
Definition: graphics.h:11161
double get_specularstrength() const
Definition: graphics.h:10881
void set_backfacelighting(const octave_value &val)
Definition: graphics.h:10947
std::string get_xdatasource() const
Definition: graphics.h:10890
double get_linewidth() const
Definition: graphics.h:10857
bool edgelighting_is(const std::string &v) const
Definition: graphics.h:10833
void set_edgealpha(const octave_value &val)
Definition: graphics.h:10998
void set_cdatamapping(const octave_value &val)
Definition: graphics.h:10964
void set_displayname(const octave_value &val)
Definition: graphics.h:10990
bool facenormalsmode_is(const std::string &v) const
Definition: graphics.h:10851
bool facecolor_is(const std::string &v) const
Definition: graphics.h:10842
void set_alphadatamapping(const octave_value &val)
Definition: graphics.h:10929
std::string get_displayname() const
Definition: graphics.h:10821
bool is_xliminclude() const
Definition: graphics.h:10910
std::string get_cdatamapping() const
Definition: graphics.h:10815
bool is_yliminclude() const
Definition: graphics.h:10913
void set_facenormalsmode(const octave_value &val)
Definition: graphics.h:11060
std::string get_facelighting() const
Definition: graphics.h:10847
bool alphadatamapping_is(const std::string &v) const
Definition: graphics.h:10804
bool linestyle_is(const std::string &v) const
Definition: graphics.h:10854
void set_cdata(const octave_value &val)
Definition: graphics.h:10955
octave_value get_vertexnormals() const
Definition: graphics.h:10883
bool facealpha_is_double() const
Definition: graphics.h:10836
void set_ydatasource(const octave_value &val)
Definition: graphics.h:11196
void set_cdatasource(const octave_value &val)
Definition: graphics.h:10974
octave_value get_edgecolor() const
Definition: graphics.h:10831
double get_specularcolorreflectance() const
Definition: graphics.h:10877
octave_value get_alim() const
Definition: graphics.h:10900
bool is_zliminclude() const
Definition: graphics.h:10916
bool vertexnormalsmode_is(const std::string &v) const
Definition: graphics.h:10885
bool marker_is(const std::string &v) const
Definition: graphics.h:10859
void set_marker(const octave_value &val)
Definition: graphics.h:11085
double get_specularexponent() const
Definition: graphics.h:10879
void set_markeredgecolor(const octave_value &val)
Definition: graphics.h:11093
octave_value get(const char *pname) const
Definition: graphics.h:10674
std::string get_linestyle() const
Definition: graphics.h:10855
void set_clim(const octave_value &val)
Definition: graphics.h:11231
octave_value get_zdata() const
Definition: graphics.h:10896
void set_alim(const octave_value &val)
Definition: graphics.h:11221
void set_edgecolor(const octave_value &val)
Definition: graphics.h:11006
void set_linewidth(const octave_value &val)
Definition: graphics.h:11077
bool markerfacecolor_is_rgb() const
Definition: graphics.h:10867
octave_value get_facenormals() const
Definition: graphics.h:10849
void set_ylim(const octave_value &val)
Definition: graphics.h:11251
bool facecolor_is_rgb() const
Definition: graphics.h:10841
bool markerfacecolor_is(const std::string &v) const
Definition: graphics.h:10868
octave_value get_markerfacecolor() const
Definition: graphics.h:10870
bool edgecolor_is_rgb() const
Definition: graphics.h:10828
double get_facealpha_double() const
Definition: graphics.h:10838
void set_markersize(const octave_value &val)
Definition: graphics.h:11109
std::string get_marker() const
Definition: graphics.h:10860
octave_value get_facecolor() const
Definition: graphics.h:10844
std::string get_vertexnormalsmode() const
Definition: graphics.h:10886
void set_vertexnormals(const octave_value &val)
Definition: graphics.h:11149
std::string get_climinclude() const
Definition: graphics.h:10645
bool edgealpha_is_double() const
Definition: graphics.h:10823
Matrix get_edgecolor_rgb() const
Definition: graphics.h:10830
bool markeredgecolor_is(const std::string &v) const
Definition: graphics.h:10863
std::string get_zdatasource() const
Definition: graphics.h:10898
bool is_climinclude() const
Definition: graphics.h:10643
std::string get_backfacelighting() const
Definition: graphics.h:10810
void set_climinclude(const octave_value &val)
Definition: graphics.h:11281
std::string get_cdatasource() const
Definition: graphics.h:10817
octave_value get_clim() const
Definition: graphics.h:10902
void set_yliminclude(const octave_value &val)
Definition: graphics.h:11301
std::string get_ydatasource() const
Definition: graphics.h:10894
octave_value get_xlim() const
Definition: graphics.h:10904
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:11447
bool valid_object() const
Definition: graphics.h:11445
surface(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:11433
base_properties & get_properties()
Definition: graphics.h:11441
const base_properties & get_properties() const
Definition: graphics.h:11443
~surface()=default
octave_value get_color() const
Definition: graphics.h:7870
std::string get_linestyle() const
Definition: graphics.h:7905
void set_edgecolor(const octave_value &val)
Definition: graphics.h:7971
bool units_is(const std::string &v) const
Definition: graphics.h:7917
bool verticalalignmentmode_is(const std::string &v) const
Definition: graphics.h:7947
void update_fontunits()
bool fontunits_is(const std::string &v) const
Definition: graphics.h:7892
bool backgroundcolor_is(const std::string &v) const
Definition: graphics.h:7863
void set_color(const octave_value &val)
Definition: graphics.h:7962
octave_value get_string() const
Definition: graphics.h:7915
octave_value get_ylim() const
Definition: graphics.h:7925
void set_fontweight(const octave_value &val)
Definition: graphics.h:8035
double get_margin() const
Definition: graphics.h:7909
bool __autopos_tag___is(const std::string &v) const
Definition: graphics.h:7950
double get_linewidth() const
Definition: graphics.h:7907
bool is_fontsmoothing() const
Definition: graphics.h:7889
Matrix get_edgecolor_rgb() const
Definition: graphics.h:7874
void set_editing(const octave_value &val)
Definition: graphics.h:7979
octave_value get(const std::string &pname) const
Definition: graphics.h:7753
void set_extent(const octave_value &val)
Definition: graphics.h:7987
std::string get_verticalalignment() const
Definition: graphics.h:7921
std::string get_editing() const
Definition: graphics.h:7878
std::string get_verticalalignmentmode() const
Definition: graphics.h:7948
Matrix get_backgroundcolor_rgb() const
Definition: graphics.h:7864
void set_zliminclude(const octave_value &val)
Definition: graphics.h:8184
void set_fontangle(const octave_value &val)
Definition: graphics.h:7995
std::string get_fontsmoothing() const
Definition: graphics.h:7890
void set_interpreter(const octave_value &val)
Definition: graphics.h:8057
bool edgecolor_is_rgb() const
Definition: graphics.h:7872
std::string get___autopos_tag__() const
Definition: graphics.h:7951
std::string get_rotationmode() const
Definition: graphics.h:7942
void set_linestyle(const octave_value &val)
Definition: graphics.h:8066
std::string get_horizontalalignment() const
Definition: graphics.h:7899
octave_value get_xlim() const
Definition: graphics.h:7923
double get_fontsize() const
Definition: graphics.h:7887
void set_margin(const octave_value &val)
Definition: graphics.h:8082
std::string get_fontname() const
Definition: graphics.h:7885
bool horizontalalignmentmode_is(const std::string &v) const
Definition: graphics.h:7944
std::string get_units() const
Definition: graphics.h:7918
std::string get_positionmode() const
Definition: graphics.h:7939
bool rotationmode_is(const std::string &v) const
Definition: graphics.h:7941
std::string get_horizontalalignmentmode() const
Definition: graphics.h:7945
void set_backgroundcolor(const octave_value &val)
Definition: graphics.h:7954
bool color_is_rgb() const
Definition: graphics.h:7867
std::string get_fontweight() const
Definition: graphics.h:7896
void set_rotation(const octave_value &val)
Definition: graphics.h:8090
Matrix get_color_rgb() const
Definition: graphics.h:7869
bool backgroundcolor_is_rgb() const
Definition: graphics.h:7862
bool fontangle_is(const std::string &v) const
Definition: graphics.h:7882
bool is_xliminclude() const
Definition: graphics.h:7929
bool positionmode_is(const std::string &v) const
Definition: graphics.h:7938
std::string get_fontunits() const
Definition: graphics.h:7893
octave_value get_position() const
Definition: graphics.h:7911
std::string get_fontangle() const
Definition: graphics.h:7883
properties()=delete
void set_horizontalalignmentmode(const octave_value &val)
Definition: graphics.h:8212
void set_positionmode(const octave_value &val)
Definition: graphics.h:8194
void set_linewidth(const octave_value &val)
Definition: graphics.h:8074
bool edgecolor_is(const std::string &v) const
Definition: graphics.h:7873
std::string get_zliminclude() const
Definition: graphics.h:7936
void set_zlim(const octave_value &val)
Definition: graphics.h:8154
void set_yliminclude(const octave_value &val)
Definition: graphics.h:8174
std::string get_xliminclude() const
Definition: graphics.h:7930
bool fontweight_is(const std::string &v) const
Definition: graphics.h:7895
void set_fontsize(const octave_value &val)
Definition: graphics.h:8013
bool linestyle_is(const std::string &v) const
Definition: graphics.h:7904
void set___fontsize_points__(const octave_value &val)
Definition: graphics.h:8238
void set_verticalalignment(const octave_value &val)
Definition: graphics.h:8121
void set_ylim(const octave_value &val)
Definition: graphics.h:8144
std::string get_interpreter() const
Definition: graphics.h:7902
double get_rotation() const
Definition: graphics.h:7913
void set_rotationmode(const octave_value &val)
Definition: graphics.h:8203
void set_xlim(const octave_value &val)
Definition: graphics.h:8134
bool is_zliminclude() const
Definition: graphics.h:7935
bool verticalalignment_is(const std::string &v) const
Definition: graphics.h:7920
std::string graphics_object_name() const
Definition: graphics.h:7765
void set_units(const octave_value &val)
Definition: graphics.h:8112
void set_verticalalignmentmode(const octave_value &val)
Definition: graphics.h:8221
octave_value get_zlim() const
Definition: graphics.h:7927
void set_position(const octave_value &val)
Definition: graphics.h:7712
void set_xliminclude(const octave_value &val)
Definition: graphics.h:8164
bool interpreter_is(const std::string &v) const
Definition: graphics.h:7901
void set___autopos_tag__(const octave_value &val)
Definition: graphics.h:8230
octave_value get_edgecolor() const
Definition: graphics.h:7875
const uint8NDArray & get_pixels() const
Definition: graphics.h:8249
bool horizontalalignment_is(const std::string &v) const
Definition: graphics.h:7898
bool is_yliminclude() const
Definition: graphics.h:7932
~properties()=default
octave::text_renderer m_txt_renderer
Definition: graphics.h:8252
std::string get_yliminclude() const
Definition: graphics.h:7933
octave_value get_backgroundcolor() const
Definition: graphics.h:7865
octave_value get(const char *pname) const
Definition: graphics.h:7758
bool is_editing() const
Definition: graphics.h:7877
void set_horizontalalignment(const octave_value &val)
Definition: graphics.h:8044
void set_fontname(const octave_value &val)
Definition: graphics.h:8004
void set_string(const octave_value &val)
Definition: graphics.h:8103
bool color_is(const std::string &v) const
Definition: graphics.h:7868
void set_fontsmoothing(const octave_value &val)
Definition: graphics.h:8022
bool do_set(const octave_value &val)
Definition: graphics.h:793
text_label_property()=delete
charMatrix char_value() const
Definition: graphics.h:779
~text_label_property()=default
base_property * clone() const
Definition: graphics.h:789
octave_value get() const
Definition: graphics.h:764
text_label_property(const std::string &s, const graphics_handle &h, const Cell &c)
Definition: graphics.h:726
text_label_property(const std::string &s, const graphics_handle &h, const std::string &val="")
Definition: graphics.h:705
text_label_property(const std::string &s, const graphics_handle &h, const NDArray &nda)
Definition: graphics.h:710
string_vector string_vector_value() const
Definition: graphics.h:777
std::string string_value() const
Definition: graphics.h:772
bool empty() const
Definition: graphics.h:758
text_label_property(const text_label_property &)=default
Cell cell_value() const
Definition: graphics.h:781
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:8352
~text()=default
const base_properties & get_properties() const
Definition: graphics.h:8348
base_properties & get_properties()
Definition: graphics.h:8346
bool valid_object() const
Definition: graphics.h:8350
text(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:8336
bool highlightcolor_is_rgb() const
Definition: graphics.h:12789
octave_value get___object__() const
Definition: graphics.h:12820
std::string get_clipping() const
Definition: graphics.h:12769
bool is_clipping() const
Definition: graphics.h:12768
std::string get_fontangle() const
Definition: graphics.h:12772
bool units_is(const std::string &v) const
Definition: graphics.h:12812
octave_value get_shadowcolor() const
Definition: graphics.h:12807
std::string get_fontunits() const
Definition: graphics.h:12779
bool titleposition_is(const std::string &v) const
Definition: graphics.h:12817
bool fontweight_is(const std::string &v) const
Definition: graphics.h:12781
std::string get_titleposition() const
Definition: graphics.h:12818
bool backgroundcolor_is_rgb() const
Definition: graphics.h:12758
bool bordertype_is(const std::string &v) const
Definition: graphics.h:12763
bool backgroundcolor_is(const std::string &v) const
Definition: graphics.h:12759
bool highlightcolor_is(const std::string &v) const
Definition: graphics.h:12790
octave_value get(const std::string &pname) const
Definition: graphics.h:12673
void set_fontname(const octave_value &val)
Definition: graphics.h:12863
Matrix get_highlightcolor_rgb() const
Definition: graphics.h:12791
std::string get_units() const
Definition: graphics.h:12813
void set_titleposition(const octave_value &val)
Definition: graphics.h:12951
void set_backgroundcolor(const octave_value &val)
Definition: graphics.h:12823
std::string get_fontname() const
Definition: graphics.h:12774
bool foregroundcolor_is_rgb() const
Definition: graphics.h:12784
std::string graphics_object_name() const
Definition: graphics.h:12685
void set_fontweight(const octave_value &val)
Definition: graphics.h:12881
Matrix get_foregroundcolor_rgb() const
Definition: graphics.h:12786
octave_value get_sizechangedfcn() const
Definition: graphics.h:12810
double get_borderwidth() const
Definition: graphics.h:12766
void set_selectionchangedfcn(const octave_value &val)
Definition: graphics.h:12917
void execute_selectionchangedfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:12801
graphics_handle get_selectedobject() const
Definition: graphics.h:12799
bool fontunits_is(const std::string &v) const
Definition: graphics.h:12778
octave_value get_resizefcn() const
Definition: graphics.h:12797
std::string get_bordertype() const
Definition: graphics.h:12764
void set_sizechangedfcn(const octave_value &val)
Definition: graphics.h:12933
Matrix get_backgroundcolor_rgb() const
Definition: graphics.h:12760
void set_highlightcolor(const octave_value &val)
Definition: graphics.h:12897
bool fontangle_is(const std::string &v) const
Definition: graphics.h:12771
void set_clipping(const octave_value &val)
Definition: graphics.h:12847
void set_fontsize(const octave_value &val)
Definition: graphics.h:12871
void execute_resizefcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:12796
void execute_sizechangedfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:12809
bool foregroundcolor_is(const std::string &v) const
Definition: graphics.h:12785
void set___object__(const octave_value &val)
Definition: graphics.h:12959
void set_foregroundcolor(const octave_value &val)
Definition: graphics.h:12889
octave_value get_backgroundcolor() const
Definition: graphics.h:12761
bool shadowcolor_is_rgb() const
Definition: graphics.h:12804
octave_value get(const char *pname) const
Definition: graphics.h:12678
double get_fontsize() const
Definition: graphics.h:12776
std::string get_fontweight() const
Definition: graphics.h:12782
void set_borderwidth(const octave_value &val)
Definition: graphics.h:12839
octave_value get_position() const
Definition: graphics.h:12794
octave_value get_foregroundcolor() const
Definition: graphics.h:12787
octave_value get_selectionchangedfcn() const
Definition: graphics.h:12802
void set_bordertype(const octave_value &val)
Definition: graphics.h:12831
void set_fontangle(const octave_value &val)
Definition: graphics.h:12855
bool shadowcolor_is(const std::string &v) const
Definition: graphics.h:12805
octave_value get_highlightcolor() const
Definition: graphics.h:12792
Matrix get_shadowcolor_rgb() const
Definition: graphics.h:12806
std::string get_title() const
Definition: graphics.h:12815
void set_title(const octave_value &val)
Definition: graphics.h:12943
void set_resizefcn(const octave_value &val)
Definition: graphics.h:12907
void set_shadowcolor(const octave_value &val)
Definition: graphics.h:12925
~uibuttongroup()=default
bool valid_object() const
Definition: graphics.h:13004
const base_properties & get_properties() const
Definition: graphics.h:13002
uibuttongroup(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:12992
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:13006
base_properties & get_properties()
Definition: graphics.h:13000
const std::list< graphics_handle > get_dependent_obj_list()
Definition: graphics.h:12004
std::string graphics_object_name() const
Definition: graphics.h:12038
octave_value get_position() const
Definition: graphics.h:12078
void add_dependent_obj(graphics_handle gh)
Definition: graphics.h:11999
void set_callback(const octave_value &val)
Definition: graphics.h:12083
octave_value get___object__() const
Definition: graphics.h:12080
void set___object__(const octave_value &val)
Definition: graphics.h:12099
octave_value get_callback() const
Definition: graphics.h:12076
octave_value get(const char *pname) const
Definition: graphics.h:12031
octave_value get(const std::string &pname) const
Definition: graphics.h:12026
void execute_callback(const octave_value &new_data=octave_value()) const
Definition: graphics.h:12075
void set_position(const octave_value &val)
Definition: graphics.h:12091
const base_properties & get_properties() const
Definition: graphics.h:12138
~uicontextmenu()=default
bool valid_object() const
Definition: graphics.h:12140
base_properties & get_properties()
Definition: graphics.h:12136
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:12142
uicontextmenu(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:12128
void set_units(const octave_value &val)
Definition: graphics.h:12529
octave_value get_value() const
Definition: graphics.h:12349
octave_value get___object__() const
Definition: graphics.h:12357
bool fontunits_is(const std::string &v) const
Definition: graphics.h:12310
std::string get_units() const
Definition: graphics.h:12347
void set_min(const octave_value &val)
Definition: graphics.h:12486
octave_value get(const std::string &pname) const
Definition: graphics.h:12188
octave_value get_cdata() const
Definition: graphics.h:12293
void set_max(const octave_value &val)
Definition: graphics.h:12478
void set_keypressfcn(const octave_value &val)
Definition: graphics.h:12462
std::string graphics_object_name() const
Definition: graphics.h:12200
void set_extent(const octave_value &val)
Definition: graphics.h:12400
void set_fontweight(const octave_value &val)
Definition: graphics.h:12437
bool horizontalalignment_is(const std::string &v) const
Definition: graphics.h:12321
Matrix get_backgroundcolor_rgb() const
Definition: graphics.h:12287
bool foregroundcolor_is_rgb() const
Definition: graphics.h:12316
bool verticalalignment_is(const std::string &v) const
Definition: graphics.h:12351
std::string get_verticalalignment() const
Definition: graphics.h:12352
void set_verticalalignment(const octave_value &val)
Definition: graphics.h:12546
octave_value get_sliderstep() const
Definition: graphics.h:12335
void set_value(const octave_value &val)
Definition: graphics.h:12538
bool backgroundcolor_is_rgb() const
Definition: graphics.h:12285
bool backgroundcolor_is(const std::string &v) const
Definition: graphics.h:12286
void set_backgroundcolor(const octave_value &val)
Definition: graphics.h:12360
std::string get_tooltipstring() const
Definition: graphics.h:12344
std::string get_fontunits() const
Definition: graphics.h:12311
void set_listboxtop(const octave_value &val)
Definition: graphics.h:12470
bool enable_is(const std::string &v) const
Definition: graphics.h:12298
void set_cdata(const octave_value &val)
Definition: graphics.h:12376
void set_fontsize(const octave_value &val)
Definition: graphics.h:12426
bool is___focus__() const
Definition: graphics.h:12354
bool foregroundcolor_is(const std::string &v) const
Definition: graphics.h:12317
void set_horizontalalignment(const octave_value &val)
Definition: graphics.h:12454
void execute_callback(const octave_value &new_data=octave_value()) const
Definition: graphics.h:12290
std::string get___focus__() const
Definition: graphics.h:12355
void set_sliderstep(const octave_value &val)
Definition: graphics.h:12502
bool is_clipping() const
Definition: graphics.h:12295
bool units_is(const std::string &v) const
Definition: graphics.h:12346
double get_min() const
Definition: graphics.h:12331
void set_position(const octave_value &val)
Definition: graphics.h:12494
std::string get_clipping() const
Definition: graphics.h:12296
octave_value get_position() const
Definition: graphics.h:12333
void set_string(const octave_value &val)
Definition: graphics.h:12510
octave_value get_callback() const
Definition: graphics.h:12291
double get_listboxtop() const
Definition: graphics.h:12327
octave_value get(const char *pname) const
Definition: graphics.h:12193
octave_value get_backgroundcolor() const
Definition: graphics.h:12288
void set_tooltipstring(const octave_value &val)
Definition: graphics.h:12521
octave_value get_keypressfcn() const
Definition: graphics.h:12325
octave_value get_string() const
Definition: graphics.h:12339
octave_value get_foregroundcolor() const
Definition: graphics.h:12319
void set_fontangle(const octave_value &val)
Definition: graphics.h:12408
bool fontweight_is(const std::string &v) const
Definition: graphics.h:12313
Matrix get_foregroundcolor_rgb() const
Definition: graphics.h:12318
double get_max() const
Definition: graphics.h:12329
bool style_is(const std::string &v) const
Definition: graphics.h:12341
std::string get_fontname() const
Definition: graphics.h:12306
std::string get_horizontalalignment() const
Definition: graphics.h:12322
void set___object__(const octave_value &val)
Definition: graphics.h:12562
double get_fontsize() const
Definition: graphics.h:12308
void set_fontname(const octave_value &val)
Definition: graphics.h:12417
void set___focus__(const octave_value &val)
Definition: graphics.h:12554
std::string get_fontweight() const
Definition: graphics.h:12314
void set_enable(const octave_value &val)
Definition: graphics.h:12392
bool fontangle_is(const std::string &v) const
Definition: graphics.h:12303
void set_callback(const octave_value &val)
Definition: graphics.h:12368
void set_clipping(const octave_value &val)
Definition: graphics.h:12384
std::string get_string_string() const
Definition: graphics.h:12337
std::string get_style() const
Definition: graphics.h:12342
string_vector get_string_vector() const
Definition: graphics.h:12338
std::string get_enable() const
Definition: graphics.h:12299
void execute_keypressfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:12324
void set_foregroundcolor(const octave_value &val)
Definition: graphics.h:12446
std::string get_fontangle() const
Definition: graphics.h:12304
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:12623
uicontrol(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:12609
~uicontrol()=default
bool valid_object() const
Definition: graphics.h:12621
const base_properties & get_properties() const
Definition: graphics.h:12619
base_properties & get_properties()
Definition: graphics.h:12617
void set_text(const octave_value &val)
Definition: graphics.h:11906
octave_value get_callback() const
Definition: graphics.h:11943
void set___fltk_label__(const octave_value &val)
Definition: graphics.h:11914
bool is_separator() const
Definition: graphics.h:11840
octave_value get___object__() const
Definition: graphics.h:11847
void set_accelerator(const octave_value &val)
Definition: graphics.h:11850
bool is_enable() const
Definition: graphics.h:11827
void set_foregroundcolor(const octave_value &val)
Definition: graphics.h:11874
void set_menuselectedfcn(const octave_value &val)
Definition: graphics.h:11882
std::string get_enable() const
Definition: graphics.h:11828
~properties()=default
std::string get_accelerator() const
Definition: graphics.h:11822
void set_enable(const octave_value &val)
Definition: graphics.h:11866
Matrix get_foregroundcolor_rgb() const
Definition: graphics.h:11832
void set_label(const octave_value &val)
Definition: graphics.h:11937
std::string graphics_object_name() const
Definition: graphics.h:11767
void remove_child(const graphics_handle &h, bool from_root=false)
Definition: graphics.h:11726
octave_value get(const std::string &pname) const
Definition: graphics.h:11755
void set___object__(const octave_value &val)
Definition: graphics.h:11922
double get_position() const
Definition: graphics.h:11838
octave_value get(const char *pname) const
Definition: graphics.h:11760
std::string get_label() const
Definition: graphics.h:11932
std::string get___fltk_label__() const
Definition: graphics.h:11845
octave_value get_foregroundcolor() const
Definition: graphics.h:11833
void adopt(const graphics_handle &h)
Definition: graphics.h:11731
std::string get_checked() const
Definition: graphics.h:11825
std::string get_text() const
Definition: graphics.h:11843
void set_checked(const octave_value &val)
Definition: graphics.h:11858
void set_separator(const octave_value &val)
Definition: graphics.h:11898
bool foregroundcolor_is_rgb() const
Definition: graphics.h:11830
bool is_checked() const
Definition: graphics.h:11824
void execute_menuselectedfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:11835
void set_callback(const octave_value &val)
Definition: graphics.h:11948
octave_value get_menuselectedfcn() const
Definition: graphics.h:11836
void set_position(const octave_value &val)
Definition: graphics.h:11890
std::string get_separator() const
Definition: graphics.h:11841
bool foregroundcolor_is(const std::string &v) const
Definition: graphics.h:11831
uimenu(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:11964
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:11978
base_properties & get_properties()
Definition: graphics.h:11972
~uimenu()=default
const base_properties & get_properties() const
Definition: graphics.h:11974
bool valid_object() const
Definition: graphics.h:11976
std::string get_fontangle() const
Definition: graphics.h:13142
bool foregroundcolor_is_rgb() const
Definition: graphics.h:13154
octave_value get_highlightcolor() const
Definition: graphics.h:13162
octave_value get(const char *pname) const
Definition: graphics.h:13057
octave_value get_shadowcolor() const
Definition: graphics.h:13172
Matrix get_highlightcolor_rgb() const
Definition: graphics.h:13161
std::string get_titleposition() const
Definition: graphics.h:13180
void set___object__(const octave_value &val)
Definition: graphics.h:13306
void set_foregroundcolor(const octave_value &val)
Definition: graphics.h:13246
std::string graphics_object_name() const
Definition: graphics.h:13064
std::string get_units() const
Definition: graphics.h:13183
bool highlightcolor_is(const std::string &v) const
Definition: graphics.h:13160
octave_value get_backgroundcolor() const
Definition: graphics.h:13134
void set_title(const octave_value &val)
Definition: graphics.h:13288
bool foregroundcolor_is(const std::string &v) const
Definition: graphics.h:13155
bool highlightcolor_is_rgb() const
Definition: graphics.h:13159
bool titleposition_is(const std::string &v) const
Definition: graphics.h:13179
bool fontweight_is(const std::string &v) const
Definition: graphics.h:13151
std::string get_fontweight() const
Definition: graphics.h:13152
Matrix get_foregroundcolor_rgb() const
Definition: graphics.h:13156
bool fontangle_is(const std::string &v) const
Definition: graphics.h:13141
void set_fontangle(const octave_value &val)
Definition: graphics.h:13212
std::string get_fontname() const
Definition: graphics.h:13144
octave_value get_position() const
Definition: graphics.h:13164
octave_value get(const std::string &pname) const
Definition: graphics.h:13052
std::string get_fontunits() const
Definition: graphics.h:13149
bool bordertype_is(const std::string &v) const
Definition: graphics.h:13136
bool backgroundcolor_is_rgb() const
Definition: graphics.h:13131
void set_backgroundcolor(const octave_value &val)
Definition: graphics.h:13188
void set_fontweight(const octave_value &val)
Definition: graphics.h:13238
double get_borderwidth() const
Definition: graphics.h:13139
Matrix get_shadowcolor_rgb() const
Definition: graphics.h:13171
std::string get_title() const
Definition: graphics.h:13177
void set_resizefcn(const octave_value &val)
Definition: graphics.h:13264
void set_fontsize(const octave_value &val)
Definition: graphics.h:13228
bool fontunits_is(const std::string &v) const
Definition: graphics.h:13148
void execute_sizechangedfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:13174
void set_bordertype(const octave_value &val)
Definition: graphics.h:13196
void set_shadowcolor(const octave_value &val)
Definition: graphics.h:13272
void set_fontname(const octave_value &val)
Definition: graphics.h:13220
bool backgroundcolor_is(const std::string &v) const
Definition: graphics.h:13132
void set_borderwidth(const octave_value &val)
Definition: graphics.h:13204
std::string get_bordertype() const
Definition: graphics.h:13137
void execute_resizefcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:13166
bool shadowcolor_is(const std::string &v) const
Definition: graphics.h:13170
octave_value get_sizechangedfcn() const
Definition: graphics.h:13175
bool units_is(const std::string &v) const
Definition: graphics.h:13182
void set_sizechangedfcn(const octave_value &val)
Definition: graphics.h:13280
void set_highlightcolor(const octave_value &val)
Definition: graphics.h:13254
octave_value get_resizefcn() const
Definition: graphics.h:13167
octave_value get___object__() const
Definition: graphics.h:13185
octave_value get_foregroundcolor() const
Definition: graphics.h:13157
void set_titleposition(const octave_value &val)
Definition: graphics.h:13296
Matrix get_backgroundcolor_rgb() const
Definition: graphics.h:13133
bool shadowcolor_is_rgb() const
Definition: graphics.h:13169
double get_fontsize() const
Definition: graphics.h:13146
base_properties & get_properties()
Definition: graphics.h:13340
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:13346
bool valid_object() const
Definition: graphics.h:13344
const base_properties & get_properties() const
Definition: graphics.h:13342
uipanel(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:13332
~uipanel()=default
bool is_enable() const
Definition: graphics.h:14056
octave_value get_clickedcallback() const
Definition: graphics.h:14054
std::string get_enable() const
Definition: graphics.h:14057
void set_tooltipstring(const octave_value &val)
Definition: graphics.h:14101
octave_value get(const std::string &pname) const
Definition: graphics.h:13994
void set___object__(const octave_value &val)
Definition: graphics.h:14117
void execute_clickedcallback(const octave_value &new_data=octave_value()) const
Definition: graphics.h:14053
std::string get_tooltipstring() const
Definition: graphics.h:14062
std::string get___named_icon__() const
Definition: graphics.h:14064
octave_value get___object__() const
Definition: graphics.h:14066
void set_cdata(const octave_value &val)
Definition: graphics.h:14069
void set_clickedcallback(const octave_value &val)
Definition: graphics.h:14077
void set___named_icon__(const octave_value &val)
Definition: graphics.h:14109
std::string graphics_object_name() const
Definition: graphics.h:14006
void set_separator(const octave_value &val)
Definition: graphics.h:14093
octave_value get(const char *pname) const
Definition: graphics.h:13999
void set_enable(const octave_value &val)
Definition: graphics.h:14085
std::string get_separator() const
Definition: graphics.h:14060
octave_value get_cdata() const
Definition: graphics.h:14051
bool is_separator() const
Definition: graphics.h:14059
bool valid_object() const
Definition: graphics.h:14153
uipushtool(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:14141
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:14155
const base_properties & get_properties() const
Definition: graphics.h:14151
~uipushtool()=default
base_properties & get_properties()
Definition: graphics.h:14149
void set_celleditcallback(const octave_value &val)
Definition: graphics.h:13571
bool units_is(const std::string &v) const
Definition: graphics.h:13551
void set_fontweight(const octave_value &val)
Definition: graphics.h:13661
octave_value get(const char *pname) const
Definition: graphics.h:13402
bool fontangle_is(const std::string &v) const
Definition: graphics.h:13515
void set_foregroundcolor(const octave_value &val)
Definition: graphics.h:13670
octave_value get_rowname() const
Definition: graphics.h:13544
bool is_rowstriping() const
Definition: graphics.h:13546
void set_fontname(const octave_value &val)
Definition: graphics.h:13641
void execute_keyreleasefcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:13536
void update_table_extent()
Definition: graphics.h:13755
void set_keyreleasefcn(const octave_value &val)
Definition: graphics.h:13686
octave_value get_columnformat() const
Definition: graphics.h:13502
bool foregroundcolor_is_rgb() const
Definition: graphics.h:13528
void set_extent(const octave_value &val)
Definition: graphics.h:13624
std::string get_units() const
Definition: graphics.h:13552
std::string get_rearrangeablecolumns() const
Definition: graphics.h:13542
bool is_rearrangeablecolumns() const
Definition: graphics.h:13541
std::string get_rowstriping() const
Definition: graphics.h:13547
double get_fontsize() const
Definition: graphics.h:13520
std::string get_fontname() const
Definition: graphics.h:13518
std::string get_tooltipstring() const
Definition: graphics.h:13549
bool fontunits_is(const std::string &v) const
Definition: graphics.h:13522
octave_value get___object__() const
Definition: graphics.h:13490
std::string graphics_object_name() const
Definition: graphics.h:13409
void set_rowstriping(const octave_value &val)
Definition: graphics.h:13718
void set_columnname(const octave_value &val)
Definition: graphics.h:13597
void set_keypressfcn(const octave_value &val)
Definition: graphics.h:13678
std::string get_fontangle() const
Definition: graphics.h:13516
void set___object__(const octave_value &val)
Definition: graphics.h:13555
void execute_keypressfcn(const octave_value &new_data=octave_value()) const
Definition: graphics.h:13533
std::string get_fontunits() const
Definition: graphics.h:13523
void set_backgroundcolor(const octave_value &val)
Definition: graphics.h:13563
void set_fontangle(const octave_value &val)
Definition: graphics.h:13632
octave_value get_data() const
Definition: graphics.h:13508
octave_value get_cellselectioncallback() const
Definition: graphics.h:13498
octave_value get_columnname() const
Definition: graphics.h:13504
bool fontweight_is(const std::string &v) const
Definition: graphics.h:13525
void set_columneditable(const octave_value &val)
Definition: graphics.h:13587
void set_fontsize(const octave_value &val)
Definition: graphics.h:13650
octave_value get_celleditcallback() const
Definition: graphics.h:13495
octave_value get_columneditable() const
Definition: graphics.h:13500
void set_enable(const octave_value &val)
Definition: graphics.h:13616
octave_value get(const std::string &pname) const
Definition: graphics.h:13397
void set_cellselectioncallback(const octave_value &val)
Definition: graphics.h:13579
void set_rearrangeablecolumns(const octave_value &val)
Definition: graphics.h:13702
bool foregroundcolor_is(const std::string &v) const
Definition: graphics.h:13529
void set_position(const octave_value &val)
Definition: graphics.h:13694
octave_value get_foregroundcolor() const
Definition: graphics.h:13531
Matrix get_foregroundcolor_rgb() const
Definition: graphics.h:13530
octave_value get_keypressfcn() const
Definition: graphics.h:13534
void execute_cellselectioncallback(const octave_value &new_data=octave_value()) const
Definition: graphics.h:13497
octave_value get_keyreleasefcn() const
Definition: graphics.h:13537
void update_fontweight()
Definition: graphics.h:13763
void set_data(const octave_value &val)
Definition: graphics.h:13607
octave_value get_backgroundcolor() const
Definition: graphics.h:13492
void execute_celleditcallback(const octave_value &new_data=octave_value()) const
Definition: graphics.h:13494
std::string get_enable() const
Definition: graphics.h:13511
bool is_enable() const
Definition: graphics.h:13510
void set_rowname(const octave_value &val)
Definition: graphics.h:13710
std::string get_fontweight() const
Definition: graphics.h:13526
octave_value get_columnwidth() const
Definition: graphics.h:13506
void set_tooltipstring(const octave_value &val)
Definition: graphics.h:13726
octave_value get_position() const
Definition: graphics.h:13539
base_properties & get_properties()
Definition: graphics.h:13778
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:13784
bool valid_object() const
Definition: graphics.h:13782
~uitable()=default
const base_properties & get_properties() const
Definition: graphics.h:13780
uitable(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:13770
void set_clickedcallback(const octave_value &val)
Definition: graphics.h:14292
void set_separator(const octave_value &val)
Definition: graphics.h:14324
std::string get_enable() const
Definition: graphics.h:14263
std::string get___named_icon__() const
Definition: graphics.h:14279
std::string graphics_object_name() const
Definition: graphics.h:14206
bool is_separator() const
Definition: graphics.h:14271
void set_state(const octave_value &val)
Definition: graphics.h:14332
octave_value get_oncallback() const
Definition: graphics.h:14269
bool is_enable() const
Definition: graphics.h:14262
octave_value get_cdata() const
Definition: graphics.h:14257
octave_value get_clickedcallback() const
Definition: graphics.h:14260
std::string get_separator() const
Definition: graphics.h:14272
octave_value get(const char *pname) const
Definition: graphics.h:14199
void set_oncallback(const octave_value &val)
Definition: graphics.h:14316
void set_enable(const octave_value &val)
Definition: graphics.h:14300
void execute_offcallback(const octave_value &new_data=octave_value()) const
Definition: graphics.h:14265
void set_tooltipstring(const octave_value &val)
Definition: graphics.h:14340
octave_value get(const std::string &pname) const
Definition: graphics.h:14194
octave_value get_offcallback() const
Definition: graphics.h:14266
std::string get_state() const
Definition: graphics.h:14275
void execute_oncallback(const octave_value &new_data=octave_value()) const
Definition: graphics.h:14268
std::string get_tooltipstring() const
Definition: graphics.h:14277
void set___named_icon__(const octave_value &val)
Definition: graphics.h:14348
void set_cdata(const octave_value &val)
Definition: graphics.h:14284
void execute_clickedcallback(const octave_value &new_data=octave_value()) const
Definition: graphics.h:14259
octave_value get___object__() const
Definition: graphics.h:14281
void set_offcallback(const octave_value &val)
Definition: graphics.h:14308
void set___object__(const octave_value &val)
Definition: graphics.h:14356
uitoggletool(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:14380
base_properties & get_properties()
Definition: graphics.h:14388
const base_properties & get_properties() const
Definition: graphics.h:14390
bool valid_object() const
Definition: graphics.h:14392
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:14394
~uitoggletool()=default
octave_value get(const char *pname) const
Definition: graphics.h:13827
octave_value get___object__() const
Definition: graphics.h:13867
octave_value get(const std::string &pname) const
Definition: graphics.h:13822
void set___object__(const octave_value &val)
Definition: graphics.h:13870
std::string graphics_object_name() const
Definition: graphics.h:13834
property_list get_defaults_list() const
Definition: graphics.h:13940
base_properties & get_properties()
Definition: graphics.h:13945
void override_defaults(base_graphics_object &obj)
Definition: graphics.h:13896
~uitoolbar()=default
octave_value get_defaults() const
Definition: graphics.h:13935
uitoolbar(const graphics_handle &mh, const graphics_handle &p)
Definition: graphics.h:13888
octave_value get(const caseless_str &name) const
Definition: graphics.h:13921
bool valid_object() const
Definition: graphics.h:13949
const base_properties & get_properties() const
Definition: graphics.h:13947
void set(const caseless_str &name, const octave_value &value)
Definition: graphics.h:13910
bool has_readonly_property(const caseless_str &pname) const
Definition: graphics.h:13953
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
bool operator!=(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:536
void warning(const char *fmt,...)
Definition: error.cc:1063
void warning_with_id(const char *id, const char *fmt,...)
Definition: error.cc:1078
void() error(const char *fmt,...)
Definition: error.cc:988
#define panic_impossible()
Definition: error.h:503
void err_not_implemented(const char *fcn)
Definition: errwarn.cc:110
ColumnVector xform_vector()
Definition: graphics.cc:5446
void scale(Matrix &m, double x, double y, double z)
Definition: graphics.cc:5500
ColumnVector transform(const Matrix &m, double x, double y, double z)
Definition: graphics.cc:5468
std::pair< std::string, octave_value > pval_pair
Definition: graphics.h:2123
bool set_property_in_handle(double handle, const std::string &property, const octave_value &arg, const std::string &fcn)
Definition: graphics.cc:13597
finite_type
Definition: graphics.h:1180
@ NOT_INF
Definition: graphics.h:1184
@ NOT_NAN
Definition: graphics.h:1183
@ NO_CHECK
Definition: graphics.h:1181
@ FINITE
Definition: graphics.h:1182
void get_children_limits(double &min_val, double &max_val, double &min_pos, double &max_neg, const Matrix &kids, char limit_type)
Definition: graphics.cc:8105
base_graphics_object * make_graphics_object_from_type(const caseless_str &type, const graphics_handle &h=graphics_handle(), const graphics_handle &p=graphics_handle())
Definition: graphics.cc:1205
graphics_handle gcf()
Definition: graphics.cc:2793
void close_all_figures()
@ AXE_ANY_DIR
Definition: graphics.h:4656
@ AXE_DEPTH_DIR
Definition: graphics.h:4657
@ AXE_HORZ_DIR
Definition: graphics.h:4658
@ AXE_VERT_DIR
Definition: graphics.h:4659
int calc_dimensions(const graphics_object &gh)
Definition: graphics.cc:12741
graphics_handle gca()
Definition: graphics.cc:2803
listener_mode
Definition: graphics.h:280
@ GCB_PREDELETE
Definition: graphics.h:280
@ GCB_POSTSET
Definition: graphics.h:280
@ GCB_PERSISTENT
Definition: graphics.h:280
octave_value get_property_from_handle(double handle, const std::string &property, const std::string &fcn)
Definition: graphics.cc:13581
#define octave_NaN
Definition: lo-ieee.h:46
bool isfinite(double x)
Definition: lo-mappers.h:192
bool isinf(double x)
Definition: lo-mappers.h:203
bool isnan(bool)
Definition: lo-mappers.h:178
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
F77_RET_T const F77_DBLE * x
T octave_idx_type m
Definition: mx-inlines.cc:781
octave_idx_type n
Definition: mx-inlines.cc:761
T * r
Definition: mx-inlines.cc:781
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
octave_int< T > xmin(const octave_int< T > &x, const octave_int< T > &y)
octave_int< T > xmax(const octave_int< T > &x, const octave_int< T > &y)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
F77_RET_T len
Definition: xerbla.cc:61