Debian Codegraph @

examples/book/listbox_flowbox/listmodel/examplewindow.h

raw
1 /* gtkmm example Copyright (C) 2016 gtkmm development team
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, see <https://www.gnu.org/licenses/>.
15 */
16
17 #ifndef GTKMM_EXAMPLEWINDOW_H
18 #define GTKMM_EXAMPLEWINDOW_H
19
20 #include <gtkmm.h>
21 #include "myobject.h"
22
23 class ExampleWindow : public Gtk::Window
24 {
25 public:
26 ExampleWindow();
27
28 private:
29 // Callback functions.
30 static Gtk::Widget* on_create_widget1(const Glib::RefPtr<Glib::Object>& item);
31 static Gtk::Widget* on_create_widget2(const Glib::RefPtr<MyObject>& item);
32
33 // Signal handlers.
34 void on_add_some();
35 void on_remove_some();
36 void on_quit();
37
38 // Member data.
39 Glib::RefPtr<Gio::ListStore<MyObject>> m_store;
40 Gtk::Grid m_grid;
41 Gtk::ScrolledWindow m_scrolled_window_list_box;
42 Gtk::ScrolledWindow m_scrolled_window_flow_box;
43 Gtk::ListBox m_list_box;
44 Gtk::FlowBox m_flow_box;
45 Gtk::Button m_button_add_some;
46 Gtk::Button m_button_remove_some;
47 Gtk::Button m_button_quit;
48 };
49
50 #endif // GTKMM_EXAMPLEWINDOW_H