% 
%  GUI ohne GUIDE - PushButton
%
function raw2cv()

  % struct g1, um alle GUI-Daten zu strukturieren 
  %   ist aber nicht zwingend notwendig 
  g1.name = 'Aufgabe: raw2'; 
  
  % Position und Abmessungen des Fenster  
  g1.FigPosX   = 200;
  g1.FigPosY   = 300;
  g1.FigWidth  = 400;
  g1.FigHeight = 200;
  
  % Position und Abmessungen des Text-Feldes  
  g1.TextMPosX   = 100;
  g1.TextMPosY   = 100;
  g1.TextMWidth  = 100;
  g1.TextMHeight = 30;


  % Figure erzeugen 
  g1.Figure = figure( 'name', g1.name,...
                  'menubar','none',...
                  'numbertitle','off',...
                  'units','pixels',...
                  'position',[g1.FigPosX g1.FigPosY g1.FigWidth g1.FigHeight] );

  % Pushbutton  erzeugen             
  g1.PushButton = uicontrol( 'style','pushbutton',... 
                  'units','pix',...
                  'position',[g1.TextMPosX g1.TextMPosY g1.TextMWidth g1.TextMHeight],...
                  'string',' Press Me ', 'callback', @callbackFnc, ...
                  'UserData', g1 );
              
end     

% function pushbutton1_Callback( hObject, eventdata ) 
%   Übergabe von User-Daten 
function callbackFnc( hObject, eventdata ) 
   
   % hObjectVal   = get( hObject, 'Value' ) 
   hObjectType  = get( hObject, 'Type' ) 
   hObjectStyle = get( hObject, 'style' ) 
   hObjectPos   = get( hObject, 'position' ) 
   hObjectUserData = get( hObject, 'UserData' )

end
              