📄 workbar.m
字号:
% ------- Delete Me (Begin) ----------
% winchangeicon(progfig,'MavLogo.ico'); % Change icon (Not Released)
% ------- Delete Me (End) ------------
axes('parent',progfig,... % Set the progress bar parent to the figure
'units','pixels',... % Provide axes units in pixels
'pos',[10 winheight-45 winwidth-50 15],... % Set the progress bar position and size
'xlim',[0 1],... % Set the range from 0 to 1
'visible','off',... % Turn off axes
'drawmode','fast'); % Draw faster (I dunno if this matters)
imshow(progimage(m)); % Set Progress Bar Image
progaxes = axes('parent',progfig,... % Set the progress bar parent to the figure
'units','pixels',... % Provide axes units in pixels
'pos',[14-pgx(m) winheight-pgy(m) winwidth-pgw(m) 7-pgh(m)],... % Set the progress bar position and size
'xlim',[0 1],... % Set the range from 0 to 1
'visible','off'); % Turn off axes
progpatch = patch(...
'XData', [1 0 0 1],... % Initialize X-coordinates for patch
'YData', [0 0 1 1],... % Initialize Y-coordinates for patch
'Facecolor', 'w',... % Set Color of patch
'EraseMode', 'normal',... % Set Erase mode, so we can see progress image
'edgecolor', 'none'); % Set the edge color of the patch to none
text(1) = uicontrol(progfig,'style','text',... % Prepare message text (set the style to text)
'pos',[10 winheight-30 winwidth-20 20],... % Set the textbox position and size
'hor','left',... % Center the text in the textbox
'backgroundcolor',wincolor,... % Set the textbox background color
'foregroundcolor',0*[1 1 1],... % Set the text color
'string',message); % Set the text to the input message
text(2) = uicontrol(progfig,'style','text',... % Prepare static estimated time text
'pos',[10 5 winwidth-20 20],... % Set the textbox position and size
'hor','left',... % Left align the text in the textbox
'backgroundcolor',wincolor,... % Set the textbox background color
'foregroundcolor',0*[1 1 1],... % Set the text color
'string',est_text); % Set the static text for estimated time
text(3) = uicontrol(progfig,'style','text',... % Prepare estimated time
'pos',[135 5 winwidth-145 20],... % Set the textbox position and size
'hor','left',... % Left align the text in the textbox
'backgroundcolor',wincolor,... % Set the textbox background color
'foregroundcolor',0*[1 1 1],... % Set the text color
'string',''); % Initialize the estimated time as blank
text(4) = uicontrol(progfig,'style','text',... % Prepare the percentage progress
'pos',[winwidth-35 winheight-50 25 20],... % Set the textbox position and size
'hor','right',... % Left align the text in the textbox
'backgroundcolor',wincolor,... % Set the textbox background color
'foregroundcolor',0*[1 1 1],... % Set the textbox foreground color
'string',''); % Initialize the progress text as blank
% Set time of last update to ensure a redraw
lastupdate = clock - 1;
% Task starting time reference
if isempty(starttime) | (fractiondone == 0)
starttime = clock;
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -