00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
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
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