function varargout = Rueckgabe(varargin)
% RUECKGABE M-file for Rueckgabe.fig

% Last Modified by GUIDE v2.5 29-Jan-2007 12:11:29

% Begin initialization code - DO NOT EDIT
   gui_Singleton = 1;
   gui_State = struct('gui_Name',       mfilename, ...
                      'gui_Singleton',  gui_Singleton, ...
                      'gui_OpeningFcn', @Rueckgabe_OpeningFcn, ...
                      'gui_OutputFcn',  @Rueckgabe_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 Rueckgabe is made visible.
function Rueckgabe_OpeningFcn(hObject, eventdata, handles, varargin)
   % Start-Wert 0 für Rueckgabe setzen
   handles.output = 0;
   % Update handles structure
   guidata(hObject, handles);

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

% --- Outputs from this function are returned to the command line.
function varargout = Rueckgabe_OutputFcn(hObject, eventdata, handles) 
   % in Callback gesetzten Wert zurückgeben
   varargout{1} = handles.output;
   
   % Fenster schließen
   delete( handles.figure1 );

% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
   % Wert 1 setzen
   handles.output = 1;
   % Update handles structure
   guidata(hObject, handles);
   
   % Fenster freigeben
   uiresume(handles.figure1);

% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
   % Wert 2 setzen
   handles.output = 2;
   % Update handles structure
   guidata(hObject, handles);

   % Fenster freigeben
   uiresume(handles.figure1);


% --- Executes when user attempts to close figure1.
function figure1_CloseRequestFcn(hObject, eventdata, handles)
   % für das Schließen über den x-Knopf
   % dabei wird dann der Start-Wert 0 zurückgegeben
   % Fenster freigeben
   uiresume(handles.figure1);



