26 #if defined (HAVE_CONFIG_H)
44 error (
"no graphics toolkits are available!");
46 auto pl = m_loaded_toolkits.find (m_dtk);
48 if (pl == m_loaded_toolkits.end ())
50 auto pa = m_available_toolkits.find (m_dtk);
52 if (pa == m_available_toolkits.end ())
53 error (
"default graphics toolkit '%s' is not available!",
58 m_interpreter.
feval (
"graphics_toolkit", args);
60 pl = m_loaded_toolkits.find (m_dtk);
62 if (pl == m_loaded_toolkits.end ())
63 error (
"failed to load %s graphics toolkit", m_dtk.c_str ());
76 if (m_dtk.empty () || name ==
"qt"
78 && m_available_toolkits.find (
"qt") == m_available_toolkits.end ()))
81 m_available_toolkits.insert (name);
87 m_available_toolkits.erase (name);
91 if (m_available_toolkits.empty ())
95 auto pa = m_available_toolkits.cbegin ();
99 while (pa != m_available_toolkits.cend ())
101 std::string tk_name = *pa++;
104 || (tk_name ==
"fltk"
105 && (m_available_toolkits.find (
"qt")
106 == m_available_toolkits.cend ())))
113 OCTAVE_END_NAMESPACE(
octave)
void register_toolkit(const std::string &name)
void unregister_toolkit(const std::string &name)
graphics_toolkit get_toolkit() const
octave_value_list feval(const char *name, const octave_value_list &args=octave_value_list(), int nargout=0)
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void() error(const char *fmt,...)