| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef _DEMOWINDOW_H |
| 18 |
#define _DEMOWINDOW_H |
| 19 |
|
| 20 |
#include <gtkmm/window.h> |
| 21 |
#include <gtkmm/headerbar.h> |
| 22 |
#include <gtkmm/button.h> |
| 23 |
#include <gtkmm/notebook.h> |
| 24 |
#include <gtkmm/scrolledwindow.h> |
| 25 |
#include <gtkmm/box.h> |
| 26 |
|
| 27 |
#include <gtkmm/treestore.h> |
| 28 |
#include <gtkmm/treeview.h> |
| 29 |
#include "textwidget.h" |
| 30 |
#include <stdio.h> |
| 31 |
|
| 32 |
class DemoWindow : public Gtk::Window |
| 33 |
{ |
| 34 |
public: |
| 35 |
DemoWindow(); |
| 36 |
~DemoWindow() override; |
| 37 |
|
| 38 |
protected: |
| 39 |
void run_example(const Gtk::TreeModel::Row& row); |
| 40 |
void configure_header_bar(); |
| 41 |
|
| 42 |
void fill_tree(); |
| 43 |
|
| 44 |
void load_file(const std::string& filename); |
| 45 |
void add_data_tabs(const std::string& filename); |
| 46 |
void remove_data_tabs(); |
| 47 |
|
| 48 |
|
| 49 |
static bool select_function(const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool currently_selected); |
| 50 |
virtual void on_treeselection_changed(); |
| 51 |
virtual void on_treeview_row_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column); |
| 52 |
virtual void on_example_window_hide(); |
| 53 |
virtual void on_run_button_clicked(); |
| 54 |
|
| 55 |
|
| 56 |
Gtk::HeaderBar m_HeaderBar; |
| 57 |
Gtk::Button m_RunButton; |
| 58 |
Gtk::Notebook m_Notebook; |
| 59 |
Gtk::ScrolledWindow m_SideBar; |
| 60 |
Gtk::Box m_HBox; |
| 61 |
|
| 62 |
Glib::RefPtr<Gtk::TreeStore> m_refTreeStore; |
| 63 |
Gtk::TreeView m_TreeView; |
| 64 |
Glib::RefPtr<Gtk::TreeSelection> m_refTreeSelection; |
| 65 |
Gtk::TreeModel::Path m_TreePath; |
| 66 |
|
| 67 |
TextWidget m_TextWidget_Info, m_TextWidget_Source; |
| 68 |
|
| 69 |
Gtk::Window* m_pWindow_Example; |
| 70 |
|
| 71 |
std::string m_current_filename; |
| 72 |
}; |
| 73 |
|
| 74 |
#endif |