exButton.cc |
RAVL, Recognition And Vision Library |
// This file is part of RAVL, Recognition And Vision Library
// Copyright (C) 2001, University of Surrey
// This code may be redistributed under the terms of the GNU Lesser
// General Public License (LGPL). See the lgpl.licence file for details or
// see http://www.gnu.org/copyleft/lesser.html
// file-header-ends-here
/////////////////////////////////////////////////////////
//! rcsid="$Id: exButton.cc,v 1.3 2002/01/31 14:55:33 craftit Exp $"
//! lib=RavlGUI
//! file="Ravl/GUI/GTK/exButton.cc"
#include "Ravl/GUI/Window.hh"
#include "Ravl/GUI/Button.hh"
//#include "Ravl/GUI/ToggleButton.hh"
#include "Ravl/GUI/Manager.hh"
#include "Ravl/GUI/LBox.hh"
#include "Ravl/Option.hh"
using namespace RavlGUIN;
bool buttonA(IntT &v)
{
cerr << "ButtonA:" << v << "\n";
return true;
}
bool buttonB(IntT &v)
{
cerr << "ButtonB:" << v << "\n";
return true;
}
int main(int nargs,char *args[])
{
Manager.Init(nargs,args);
OptionC opts(nargs,args);
opts.Check();
WindowC win(100,100,"Hello");
win.Add(VBox(Button("Button 1",buttonA,1) +
Button("Button 2",buttonB,2)
)
);
win.Show();
Manager.Start();
cerr << "Finished... \n";
}
Documentation by CxxDoc: Tue Aug 13 09:59:56 2002
|