52 : event_queue_mutex (new
octave_mutex ()), gui_event_queue (),
53 debugging (false), link_enabled (true)
75 ::error (
"octave_link is already linked!");
105 DEFUN (__octave_link_enabled__, , ,
107 @deftypefn {Built-in Function} {} __octave_link_enabled__ ()\n\
108 Undocumented internal function.\n\
114 DEFUN (__octave_link_edit_file__, args, ,
116 @deftypefn {Built-in Function} {} __octave_link_edit_file__ (@var{file})\n\
117 Undocumented internal function.\n\
122 if (args.length () == 1)
133 error (
"expecting file name as argument");
135 else if (args.length () == 2)
137 std::string file = args(0).string_value ();
146 error (
"expecting file name as first argument");
152 DEFUN (__octave_link_message_dialog__, args, ,
154 @deftypefn {Built-in Function} {} __octave_link_message_dialog__ (@var{dlg}, @var{msg}, @var{title})\n\
155 Undocumented internal function.\n\
160 if (args.length () == 3)
163 std::string msg = args(1).string_value ();
164 std::string title = args(2).string_value ();
173 error (
"invalid arguments");
179 DEFUN (__octave_link_question_dialog__, args, ,
181 @deftypefn {Built-in Function} {} __octave_link_question_dialog__ (@var{msg}, @var{title}, @var{btn1}, @var{btn2}, @var{btn3}, @var{default})\n\
182 Undocumented internal function.\n\
187 if (args.length () == 6)
190 std::string title = args(1).string_value ();
191 std::string btn1 = args(2).string_value ();
192 std::string btn2 = args(3).string_value ();
193 std::string btn3 = args(4).string_value ();
194 std::string btndef = args(5).string_value ();
204 error (
"invalid arguments");
210 DEFUN (__octave_link_file_dialog__, args, ,
212 @deftypefn {Built-in Function} {} __octave_link_file_dialog__ (@var{filterlist}, @var{title}, @var{filename}, @var{size} @var{multiselect}, @var{pathname})\n\
213 Undocumented internal function.\n\
218 if (args.length () == 6)
222 std::string title = args(1).string_value ();
223 std::string filename = args(2).string_value ();
224 Matrix pos = args(3).matrix_value ();
225 std::string multi_on = args(4).string_value ();
226 std::string pathname = args(5).string_value ();
232 filter_lst.push_back (std::make_pair (flist(i,0),
234 ? flist(i,1) :
"")));
240 std::list<std::string> items_lst
244 nel = items_lst.size ();
252 for (std::list<std::string>::iterator it = items_lst.begin ();
253 it != items_lst.end (); it++)
257 if (idx == 1 && retval(0).string_value ().
length () == 0)
261 retval(2) = atoi (retval(2).string_value ().c_str ());
267 nel = items_lst.size () - 2;
270 std::list<std::string>::iterator it = items_lst.begin ();
272 for (
int idx = 0; idx < nel; idx++)
274 items.
xelem (idx) = *it;
280 retval(2) = atoi (it->c_str ());
284 error (
"invalid arguments");
290 DEFUN (__octave_link_list_dialog__, args, ,
292 @deftypefn {Built-in Function} {} __octave_link_list_dialog__ (@var{list}, @var{mode}, @var{size}, @var{intial}, @var{name}, @var{prompt}, @var{ok_string}, @var{cancel_string})\n\
293 Undocumented internal function.\n\
298 if (args.length () == 8)
300 Cell list = args(0).cell_value ();
303 std::list<std::string> list_lst;
305 list_lst.push_back (tlist(i));
307 std::string mode = args(1).string_value ();
309 Matrix size_matrix = args(2).matrix_value ();
310 int width = size_matrix(0);
311 int height = size_matrix(1);
313 Matrix initial_matrix = args(3).matrix_value ();
314 nel = initial_matrix.
numel ();
315 std::list<int> initial_lst;
317 initial_lst.push_back (initial_matrix(i));
319 std::string name = args(4).string_value ();
320 list = args(5).cell_value ();
322 nel = plist.
numel ();
323 std::list<std::string> prompt_lst;
325 prompt_lst.push_back (plist(i));
326 std::string ok_string = args(6).string_value ();
327 std::string cancel_string = args(7).string_value ();
333 std::pair<std::list<int>,
int> result
335 initial_lst, name, prompt_lst,
336 ok_string, cancel_string);
338 std::list<int> items_lst = result.first;
339 nel = items_lst.size ();
342 for (std::list<int>::iterator it = items_lst.begin ();
343 it != items_lst.end (); it++)
345 items.
xelem(i++) = *it;
348 retval(1) = result.second;
352 error (
"invalid arguments");
358 DEFUN (__octave_link_input_dialog__, args, ,
360 @deftypefn {Built-in Function} {} __octave_link_input_dialog__ (@var{prompt}, @var{title}, @var{rowscols}, @var{defaults})\n\
361 Undocumented internal function.\n\
366 if (args.length () == 4)
368 Cell prompt = args(0).cell_value ();
371 std::list<std::string> prompt_lst;
373 prompt_lst.push_back (tmp(i));
375 std::string title = args(1).string_value ();
377 Matrix rc = args(2).matrix_value ();
383 nr.push_back (rc(i,0));
384 nc.push_back (rc(i,1));
387 Cell defaults = args(3).cell_value ();
390 std::list<std::string> defaults_lst;
392 defaults_lst.push_back (tmp(i));
398 std::list<std::string> items_lst
402 nel = items_lst.size ();
405 for (std::list<std::string>::iterator it = items_lst.begin ();
406 it != items_lst.end (); it++)
408 items.
xelem(i++) = *it;
414 error (
"invalid arguments");
420 DEFUN (__octave_link_show_preferences__, , ,
422 @deftypefn {Built-in Function} {} __octave_link_show_preferences__ ()\n\
423 Undocumented internal function.\n\
433 DEFUN (__octave_link_show_doc__, args, ,
435 @deftypefn {Built-in Function} {} __octave_link_show_doc__ ( @var{filename} )\n\
436 Undocumented internal function.\n\
442 if (args.length () >= 1)