|
Freya
0.0.1
A Gtk3 MPD Client
|
00001 /*********************************************************** 00002 * This file is part of Freya 00003 * - A free MPD Gtk3 MPD Client - 00004 * 00005 * Authors: Christopher Pahl, Christoph Piechula, 00006 * Eduard Schneider 00007 * 00008 * Copyright (C) [2011-2012] 00009 * Hosted at: https://github.com/studentkittens/Freya 00010 * 00011 * __..--''``---....___ _..._ __ 00012 * /// //_.-' .-/"; ` ``<._ ``.''_ `. / // / 00013 * ///_.-' _..--.'_ `( ) ) // // 00014 * / (_..-' // (< _ ;_..__ ; `' / /// 00015 * / // // // `-._,_)' // / ``--...____..-' /// / // 00016 * Ascii-Art by Felix Lee <flee@cse.psu.edu> 00017 * 00018 * Freya is free software: you can redistribute it and/or modify 00019 * it under the terms of the GNU General Public License as published by 00020 * the Free Software Foundation, either version 3 of the License, or 00021 * (at your option) any later version. 00022 * 00023 * Freya is distributed in the hope that it will be useful, 00024 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00025 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00026 * GNU General Public License for more details. 00027 * 00028 * You should have received a copy of the GNU General Public License 00029 * along with Freya. If not, see <http://www.gnu.org/licenses/>. 00030 **************************************************************/ 00031 #ifndef FREYA_AVAHIVIEW_H 00032 #define FREYA_AVAHIVIEW_H 00033 00034 #include "../ui_includes.hh" 00035 00036 namespace Avahi 00037 { 00041 class View : public Gtk::Window 00042 { 00043 public: 00044 View(); 00045 00054 void server_append(const char * ip, const char * hostname, const char * name, unsigned int port); 00060 void server_delete(const char * name); 00066 void set_status(const char * message); 00067 00068 /* Select callback */ 00069 sigc::signal<void,Glib::ustring,Glib::ustring,Glib::ustring, unsigned int> signal_select; 00070 00071 protected: 00072 //Signal handlers: 00073 void on_button_cancel(); 00074 void on_button_select(); 00075 00076 //Tree model columns: 00077 class ModelColumns : public Gtk::TreeModel::ColumnRecord 00078 { 00079 public: 00080 00081 ModelColumns() 00082 { 00083 add(m_col_ip); 00084 add(m_col_hostname); 00085 add(m_col_name); 00086 add(m_col_port); 00087 } 00088 00089 Gtk::TreeModelColumn<Glib::ustring> m_col_ip; 00090 Gtk::TreeModelColumn<Glib::ustring> m_col_hostname; 00091 Gtk::TreeModelColumn<Glib::ustring> m_col_name; 00092 Gtk::TreeModelColumn<unsigned int> m_col_port; 00093 }; 00094 00095 ModelColumns m_Columns; 00096 00097 //Child widgets: 00098 Gtk::VBox m_VBox; 00099 00100 Gtk::ScrolledWindow m_ScrolledWindow; 00101 Gtk::TreeView m_TreeView; 00102 Glib::RefPtr<Gtk::ListStore> m_refTreeModel; 00103 00104 Gtk::HButtonBox m_ButtonBox; 00105 Gtk::Button m_Button_Cancel; 00106 Gtk::Button m_Button_Select; 00107 Gtk::Label m_Status_Label; 00108 Gtk::Separator m_CtrlSep; 00109 }; 00110 } 00111 #endif //GTKMM_View_H
1.8.0