Home > functions > common > utility > @file_dialog > visible.m

visible

PURPOSE ^

file_dialogクラスのGUI処理メソッド

SYNOPSIS ^

function [current_dir, current_file] = visible(this)

DESCRIPTION ^

 file_dialogクラスのGUI処理メソッド

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [current_dir, current_file] = visible(this)
0002 % file_dialogクラスのGUI処理メソッド
0003 %
0004 % Copyright (C) 2011, ATR All Rights Reserved.
0005 % License : New BSD License(see VBMEG_LICENSE.txt)
0006 
0007 % GUIを構築する。
0008 this.private.gui_handles = create_gui(this);
0009 
0010 % Dialog windowの'UserData' propertyにfile_dialog構造体をセットする。
0011 UserData = struct('public', this.public, 'private', this.private);
0012 % drive_info構造体を更新する。(Windows環境のみ有効)
0013 UserData = set_drive_info(UserData);
0014 set(this.private.gui_handles.dialog, 'UserData', UserData, 'Visible', 'on');
0015 % Dialog windowのGUIのproperty値を更新する。
0016 set_gui_property(this.private.gui_handles.dialog);
0017 
0018 % Dialog windowが非表示化されるまでwaitする。
0019 waitfor(this.private.gui_handles.dialog, 'Visible', 'off')
0020 
0021 
0022 if length( find(get(0, 'children') == this.private.gui_handles.dialog) )
0023   % current検索directory, current検索fileを求める。
0024   this = get(this.private.gui_handles.dialog, 'UserData');
0025   current_dir = this.public.current_dir;
0026   current_file = this.private.current_file;
0027   delete(this.private.gui_handles.dialog);
0028 else
0029   current_dir = [];
0030   current_file = {};
0031 end
0032

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005