function varargout = enableQuestion_Flash(varargin)
% ENABLEQUESTION_FLASH MATLAB file for enableQuestion_Flash.fig
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

%   Copyright 2008-2011 The MathWorks, Inc.

% Last Modified by GUIDE v2.5 30-May-2008 12:17:49

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @flashWarning_OpeningFcn, ...
                   'gui_OutputFcn',  @flashWarning_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before deprecationWarning_LF2407 is made visible.
function flashWarning_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to deprecationWarning_LF2407 (see VARARGIN)

% Choose default command line output for deprecationWarning_LF2407
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes deprecationWarning_LF2407 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
IconXOffset = 10;
IconYOffset = 59;
IconHeight = 38;
IconWidth  =38;
IconAxes=axes(                                            ...
    'Parent'          ,hObject                , ...
    'Units'           ,'points'                , ...
    'Position'        ,[IconXOffset IconYOffset ...
    IconWidth IconHeight]  , ...
    'Tag'             ,'IconAxes'                ...
    );


load (fullfile(matlabroot,'toolbox','matlab','uitools','dialogicons.mat'));
warnIconMap(256,:)=get(hObject,'color');

IconCMap=warnIconMap;

Img = image('CData', warnIconData ,'Parent',IconAxes);
set(hObject, 'Colormap', IconCMap);
set(IconAxes          , ...
    'XLim'            ,get(Img,'XData')+[-0.5 0.5], ...
    'YLim'            ,get(Img,'YData')+[-0.5 0.5], ...
    'Visible'         ,'off'                      , ...
    'YDir'            ,'reverse'                    ...
    );
drawnow;
% % Make the GUI modal
% set(handles.figure1,'WindowStyle','modal')

% UIWAIT makes quest wait for user response (see UIRESUME)
uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = flashWarning_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
if isfield(handles, 'output')
    varargout{1} = handles.output;
end


% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
close(handles.figure1);


% --- Executes on button press in checkbox1.
function checkbox1_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox1
togglestate =  get(hObject,'Value');
if togglestate ==  1
    setpref('MathWorks_TIC2000', 'TI_C2000LIB_EnableFlashSetting', 1);
else
    setpref('MathWorks_TIC2000', 'TI_C2000LIB_EnableFlashSetting', 0);
end



% --- Executes when figure1 is resized.
function figure1_ResizeFcn(hObject, eventdata, handles)
% hObject    handle to figure1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


