vectorchooser.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // gvectors is a frontend to libgvectors using gtkmm.
00004 // Copyright (C) 2007  Rafael Ostertag
00005 //
00006 // This program is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU General Public License
00008 // as published by the Free Software Foundation; either version 2
00009 // of the License, or (at your option) any later version.
00010 //
00011 // This program is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU General Public License
00017 // along with this program; if not, write to the Free Software
00018 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
00019 // USA.
00020 //
00021 // $Id: vectorchooser_8h-source.html,v 1.1 2007-09-10 23:31:15 rafi Exp $
00022 // 
00023 // File:   vectorchooser.h
00024 // Author: Rafael Ostertag
00025 //
00026 // Created on August 25, 2007, 10:03 AM
00027 //
00028 
00031 
00032 #ifndef _VECTORCHOOSER_H
00033 #define _VECTORCHOOSER_H
00034 
00035 #include <gtkmm.h>
00036 #include <gvectors.h>
00037 
00038 #include "vectorlist.h"
00039 
00043 class VectorChooser : public Gtk::Window {
00044 private:
00045     Gtk::VBox vbox;
00046     Gtk::ScrolledWindow sw;
00047     Gtk::Label label;
00048     Gtk::HButtonBox bbox;
00049     Gtk::Button bchoose;
00050     Gtk::Button bcancel;
00051     Gtk::TreeView vectorview;
00052     Gtk::TreeModel::iterator it;
00053     Glib::ustring labeltext;
00054     
00055     Glib::RefPtr<Gtk::TreeStore> liststore;
00056     VectorList vectorlist;
00057     
00060     GVectors::gvid_t parent_id;
00063     bool cancelled;
00064     
00065     void setup_window();
00066 protected:
00067     void on_button_choose_click();
00068     void on_button_cancel_click();
00069     
00070 public:
00071     VectorChooser(Glib::RefPtr<Gtk::TreeStore> lstore);
00072     VectorChooser(Glib::RefPtr<Gtk::TreeStore> lstore, Glib::ustring& lt);
00073     inline ~VectorChooser() { ; }
00075     inline GVectors::gvid_t get_parent_id() const { return parent_id; }
00077     inline Gtk::TreeModel::iterator get_iterator() const { return it; }
00079     inline bool is_cancelled() const { return cancelled; }
00080 };
00081 
00082 #endif  /* _VECTORCHOOSER_H */
00083 

Generated on Tue Sep 11 01:14:28 2007 for gvectors by  doxygen 1.4.7