// Copyright (C) 2007, 2008, 2009  Interdepartmental Research Center "E. Piaggio", University of Pisa
//
// This file is part of RTSS, the Robotics Toolbox for Scilab/Scicos.
//
// RTSS is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// RTSS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with RTSS; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA



function rt_drivebotcb3(name)
// File name:       rt_drivebotcb3.sci
//
// Function:        rt_drivebotcb3
//
// Description:     callback for the push-button-styled (Quit) uicontrol of the GUI
//                  generated by rt_drivebot() function
//
// Annotations:     this code is a Scilab port of corresponding function in the
//                  Robotics Toolbox for MATLAB(R) written by Peter I. Corke.
//
// References:      Robotics Toolbox for MATLAB(R), robot7.1/drivebot.m
//
// Author:          Matteo Morelli, I.R.C. "E. Piaggio", University of Pisa
//
// Date:            April 2007
//
// $LastChangedDate: 2009-03-23 23:14:55 +0100(lun, 23 mar 2009) $

    // who is the caller?
    obj = findobj("Tag", name);   // because i'm here, it does exist surely
    fig = get(obj, "Parent");

    gui_ud = evstr(get(obj, "Userdata"));
    rplot_id = gui_ud($);
    close(fig);

    newcfh = scf(rplot_id);
    if ~isempty(newcfh) & (typeof(newcfh) == "handle" | typeof(newcfh) == "h") then
        newcfh.pixmap = "off";
    end

endfunction
