function varargout = IADV(varargin)
% IADV M-file for IADV.fig
%      IADV, by itself, creates a new IADV or raises the existing
%      singleton*.
%
%      H = IADV returns the handle to a new IADV or the handle to
%      the existing singleton*.
%
%      IADV('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in IADV.M with the given input arguments.
%
%      IADV('Property','Value',...) creates a new IADV or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before IADV_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to IADV_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help IADV

% Last Modified by GUIDE v2.5 30-Jun-2010 05:19:36

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @IADV_OpeningFcn, ...
                   'gui_OutputFcn',  @IADV_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 IADV is made visible.
function IADV_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 IADV (see VARARGIN)

otraventana=varargin{1};
if otraventana~=0
    delete(otraventana);
end


fondo=importdata('.\buttons\fondo.tif');
axes(handles.axesfondo);
image(fondo);
axis off

boton1=importdata('.\buttons\botonC295.tif');
boton2=importdata('.\buttons\botonC235.tif');
boton3=importdata('.\buttons\botonCN235.tif');
boton4=importdata('.\buttons\botonA400M.tif');

set(handles.pushbutton1,'CDATA',boton1);
set(handles.pushbutton2,'CDATA',boton2);
set(handles.pushbutton3,'CDATA',boton3);
set(handles.pushbutton4,'CDATA',boton4);

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

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes IADV wait for user response (see UIRESUME)
uiwait(handles.figureIADV);


% --- Outputs from this function are returned to the command line.
function varargout = IADV_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

delete(gcf);


% --- 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)
modelo=cell(1);
modelo{1}='C-295';
posicion=get(handles.figureIADV,'Position');
menup(modelo,posicion,handles.figureIADV);



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

modelo=cell(1);
modelo{1}='C-235';
posicion=get(handles.figureIADV,'Position');
menup(modelo,posicion,handles.figureIADV);

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

modelo=cell(1);
modelo{1}='C-235DW';
posicion=get(handles.figureIADV,'Position');
menup(modelo,posicion,handles.figureIADV);

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


% --- Executes when user attempts to close figureIADV.
function figureIADV_CloseRequestFcn(hObject, eventdata, handles)
% hObject    handle to figureIADV (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: delete(hObject) closes the figure
uiresume(handles.figureIADV);
