comparison scripts/gui/waitbar.m @ 19628:fe689210525c gui-release

maint: Periodic merge of stable to gui-release.
author John W. Eaton <jwe@octave.org>
date Tue, 20 Jan 2015 10:05:42 -0500
parents e7b347dcfc63 446c46af4b42
children 4197fc428c7d
comparison
equal deleted inserted replaced
19624:6d75f1683ce8 19628:fe689210525c
27 ## 27 ##
28 ## The waitbar is filled to fraction @var{frac} which must be in the range 28 ## The waitbar is filled to fraction @var{frac} which must be in the range
29 ## [0, 1]. The optional message @var{msg} is centered and displayed above the 29 ## [0, 1]. The optional message @var{msg} is centered and displayed above the
30 ## waitbar. The appearance of the waitbar figure window can be configured by 30 ## waitbar. The appearance of the waitbar figure window can be configured by
31 ## passing property/value pairs to the function. 31 ## passing property/value pairs to the function.
32 ## 32 ##
33 ## When called with a single input the current waitbar, if it exists, is 33 ## When called with a single input the current waitbar, if it exists, is
34 ## updated to the new value @var{frac}. If there are multiple outstanding 34 ## updated to the new value @var{frac}. If there are multiple outstanding
35 ## waitbars they can be updated individually by passing the handle @var{hwbar} 35 ## waitbars they can be updated individually by passing the handle @var{hwbar}
36 ## of the specific waitbar to modify. 36 ## of the specific waitbar to modify.
37 ## @end deftypefn 37 ## @end deftypefn
93 if (ischar (msg) || iscellstr (msg)) 93 if (ischar (msg) || iscellstr (msg))
94 th = get (ax, "title"); 94 th = get (ax, "title");
95 curr_msg = get (th, "string"); 95 curr_msg = get (th, "string");
96 ## graphics handles always store data as column vectors 96 ## graphics handles always store data as column vectors
97 if (iscellstr (msg)) 97 if (iscellstr (msg))
98 msg = msg(:); 98 msg = msg(:);
99 endif 99 endif
100 cmp = strcmp (msg, curr_msg); 100 cmp = strcmp (msg, curr_msg);
101 if (! all (cmp(:))) 101 if (! all (cmp(:)))
102 set (th, "string", msg); 102 set (th, "string", msg);
103 endif 103 endif