summaryrefslogtreecommitdiffstats
path: root/MainWindow.hh
diff options
context:
space:
mode:
Diffstat (limited to 'MainWindow.hh')
-rw-r--r--MainWindow.hh70
1 files changed, 70 insertions, 0 deletions
diff --git a/MainWindow.hh b/MainWindow.hh
new file mode 100644
index 0000000..635e66d
--- /dev/null
+++ b/MainWindow.hh
@@ -0,0 +1,70 @@
+#ifndef foomainwindowhhfoo
+#define foomainwindowhhfoo
+
+#include <gtkmm.h>
+#include <libglademm.h>
+#include <polyp/polyplib.h>
+
+class MainWinow;
+
+#include "ServerInfo.hh"
+
+class MainWindow : public Gtk::Window {
+public:
+ MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
+ virtual ~MainWindow();
+ static MainWindow* create();
+
+ Gtk::Label *statusLabel,
+ *serverNameLabel,
+ *serverVersionLabel,
+ *defaultSampleTypeLabel,
+ *userNameLabel,
+ *hostNameLabel;
+
+ Gtk::Button *deviceOpenButton,
+ *moduleOpenButton,
+ *connectButton;
+
+ Gtk::TreeView *deviceTreeView, *moduleTreeView;
+
+protected:
+
+ class DeviceTreeModelColumns : public Gtk::TreeModel::ColumnRecord {
+ public:
+
+ DeviceTreeModelColumns() {
+ add(name);
+ add(description);
+ add(index);
+ add(type);
+ }
+
+ Gtk::TreeModelColumn<Glib::ustring> name;
+ Gtk::TreeModelColumn<Glib::ustring> description;
+ Gtk::TreeModelColumn<int> index;
+ Gtk::TreeModelColumn<int> type;
+ };
+
+ DeviceTreeModelColumns deviceTreeModelColumns;
+ Glib::RefPtr<Gtk::TreeStore> deviceTreeModel;
+
+ Gtk::TreeModel::Row sinkRow, sourceRow;
+
+public:
+ virtual void updateInfo(const struct pa_server_info &i);
+ virtual void updateInfo(const SinkInfo &i);
+ virtual void updateInfo(const SourceInfo &i);
+
+ virtual void onDeviceTreeViewCursorChanged();
+ virtual void onDeviceTreeViewRowActivated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* /* column */);
+
+ virtual void showSuccess(const char *t);
+ virtual void showFailure(const char *t);
+ virtual void clearAllData();
+
+ virtual void onDeviceOpenButton();
+ virtual void onConnectButton();
+};
+
+#endif