| 1 |
/* |
| 2 |
** jstest-gtk - A graphical joystick tester |
| 3 |
** Copyright (C) 2009 Ingo Ruhnke <[email protected]> |
| 4 |
** |
| 5 |
** This program is free software: you can redistribute it and/or modify |
| 6 |
** it under the terms of the GNU General Public License as published by |
| 7 |
** the Free Software Foundation, either version 3 of the License, or |
| 8 |
** (at your option) any later version. |
| 9 |
** |
| 10 |
** This program is distributed in the hope that it will be useful, |
| 11 |
** but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
** GNU General Public License for more details. |
| 14 |
** |
| 15 |
** You should have received a copy of the GNU General Public License |
| 16 |
** along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifndef HEADER_JSTEST_GTK_JOYSTICK_LIST_WIDGET_HPP |
| 20 |
#define HEADER_JSTEST_GTK_JOYSTICK_LIST_WIDGET_HPP |
| 21 |
|
| 22 |
#include <gtkmm/box.h> |
| 23 |
#include <gtkmm/button.h> |
| 24 |
#include <gtkmm/frame.h> |
| 25 |
#include <gtkmm/buttonbox.h> |
| 26 |
#include <gtkmm/treeview.h> |
| 27 |
#include <gtkmm/scrolledwindow.h> |
| 28 |
#include <gtkmm/liststore.h> |
| 29 |
#include <gtkmm/window.h> |
| 30 |
|
| 31 |
class JoystickListWidget : public Gtk::Window |
| 32 |
{ |
| 33 |
private: |
| 34 |
Gtk::Frame frame; |
| 35 |
Gtk::ScrolledWindow scrolled; |
| 36 |
Gtk::TreeView treeview; |
| 37 |
|
| 38 |
Gtk::VBox m_vbox; |
| 39 |
Gtk::HButtonBox m_buttonbox; |
| 40 |
Gtk::Button m_refresh_button; |
| 41 |
Gtk::Button m_properties_button; |
| 42 |
Gtk::Button m_close_button; |
| 43 |
|
| 44 |
Glib::RefPtr<Gtk::ListStore> device_list; |
| 45 |
|
| 46 |
public: |
| 47 |
JoystickListWidget(); |
| 48 |
|
| 49 |
void on_refresh_button(); |
| 50 |
void on_properties_button(); |
| 51 |
void on_row_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column); |
| 52 |
|
| 53 |
private: |
| 54 |
JoystickListWidget(const JoystickListWidget&); |
| 55 |
JoystickListWidget& operator=(const JoystickListWidget&); |
| 56 |
}; |
| 57 |
|
| 58 |
#endif |
| 59 |
|
| 60 |
/* EOF */ |