/*************************************************************************** * SystemTray.h * * Mon Dec 24 15:00:53 2007 * Copyright 2007 Fernando TarĂ­n Morales * icemanf@gmail.com ****************************************************************************/ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA */ #ifndef _SYSTEMTRAY_H #define _SYSTEMTRAY_H #include #include #include #include class MainWindow; class SystemTray{ private: bool shown; Glib::RefPtr showLince; Glib::RefPtr systemTray; // Menu Glib::RefPtr m_refActionGroup; Glib::RefPtr s_refUIManager; // Signals void on_my_popup_menu(guint button, guint32 time); void toggleShowButton(); public: SystemTray(MainWindow *); ~SystemTray(); void show() { shown = true; systemTray->set_visible(true); }; void hide() { shown = false; systemTray->set_visible(false); }; void setToggleShowButton(bool value) { showLince->set_active(value); }; void setToolTip(float, float, int, int); bool isShown() { return shown; }; bool isEmbedded() { return systemTray->is_embedded(); }; GtkStatusIcon* getGtkStatusIcon() { return systemTray->gobj(); }; }; #endif /* _SYSTEMTRAY_H */