Project stdui: "Simple Type Dialog User-Interface"

|
Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

stdui.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Serge Lussier,,,   *
00003  *   serge.lussier@videotron.ca   *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 
00022 #ifdef HAVE_CONFIG_H
00023 #include <config.h>
00024 #endif
00025 
00026 #include <iostream>
00027 #include <cstdlib>
00028 #include <stdui.h>
00029 #include <stdobject.h>
00030 
00031 
00032 using namespace std;
00033 
00034 bool destroy_notify( stdui::stdobject* o)
00035 {
00036    cerr << "object named:[" << o->name() << "] in destructor state..." << endl;
00037    return true;
00038 }
00039 
00040 int main(int argc, char *argv[])
00041 {
00042    cout << "Hello, world!" << endl;
00043    stdui::stdobject * object = new stdui::stdobject(0l,"stdobject test");
00044    //sigc::slot<bool, stdui::stdobject*> sl = sigc::ptr_fun(&destroy_notify);
00045    //object->destroy_signal().connect(sl);
00046    (void)object->destroy_delegate( sigc::ptr_fun(&destroy_notify) );
00047    cerr << "a stdobject is created, and one destroy delegate has been connected..." << endl;
00048    sleep(2);
00049    cerr << "now deleting the object and see if the delegate function is called ..." << endl;
00050    delete object;
00051    
00052   return EXIT_SUCCESS;
00053 }

API Documentation Generated by:  doxygen 1.4.0
About the author | Site started with trial version of DreamWeaver MX 2004 | Finalizing with  | Contact | ©2005, Serge Lussier ( Bretzel )