demowindow.h

00001 /* $Id: demowindow.h,v 1.1 2006/06/10 05:01:12 rvinyard Exp $ */
00002 
00003 /* Copyright (C) 2001 The gtkmm Development Team
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library 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 GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public
00016  * License along with this library; if not, write to the Free
00017  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  */
00019 
00020 #ifndef _DEMOWINDOW_H
00021 #define _DEMOWINDOW_H
00022 
00023 #include "gtkmm/window.h"
00024 #include "gtkmm/notebook.h"
00025 #include "gtkmm/box.h"
00026 
00027 #include "gtkmm/treestore.h"
00028 #include "gtkmm/treeview.h"
00029 #include "textwidget.h"
00030 #include <stdio.h>
00031 
00032 class DemoWindow : public Gtk::Window
00033 {
00034 public:
00035   DemoWindow();
00036   virtual ~DemoWindow();
00037 
00038 protected:
00039   void fill_tree();
00040 
00041   void load_file(const std::string& filename);
00042   bool read_line (FILE *stream, GString *str);
00043 
00044   //Signal handlers:
00045   static bool select_function(const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool currently_selected);
00046   virtual void on_treeselection_changed();
00047   virtual void on_treeview_row_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
00048   virtual void on_example_window_hide();
00049 
00050   //Member widgets:
00051   Gtk::Notebook m_Notebook;
00052   Gtk::HBox m_HBox;
00053 
00054   Glib::RefPtr<Gtk::TreeStore> m_refTreeStore;
00055   Gtk::TreeView m_TreeView;
00056   Glib::RefPtr<Gtk::TreeSelection> m_refTreeSelection;
00057   Gtk::TreeModel::Path m_TreePath;
00058 
00059   TextWidget m_TextWidget_Info, m_TextWidget_Source;
00060 
00061   Gtk::Window* m_pWindow_Example;
00062 
00063   std::string m_current_filename;
00064 };
00065 
00066 #endif //_DEMOWINDOW_H
00067 

Generated on Sat Aug 26 17:35:29 2006 by  doxygen 1.4.6