BatchTrayIcon.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00002 
00011 /*
00012  *  This program is free software; you can redistribute it and/or
00013  *  modify it under the terms of the GNU General Public
00014  *  License as published by the Free Software Foundation; either
00015  *  version 2 of the License, or (at your option) any later version.
00016  *
00017  *  This software is distributed in the hope that it will be useful,
00018  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  *  General Public License for more details.
00021  *
00022  *  You should have received a copy of the GNU General Public
00023  *  License along with this software; if not, write to the Free Software
00024  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  */
00027 
00028 #ifndef BATCHTRAYICON_H
00029 #define BATCHTRAYICON_H
00030 
00032 #include <wx/taskbar.h>
00033 class BatchTaskBarIcon : public wxTaskBarIcon
00034 {
00035 protected:
00037     void OnLeftButtonDClick(wxTaskBarIconEvent&);
00039     void OnShowGUI(wxCommandEvent& e);
00041     void OnStartBatch(wxCommandEvent& e);
00043     void OnPauseBatch(wxCommandEvent& e);
00045     void OnStopBatch(wxCommandEvent& e);
00047     void OnExit(wxCommandEvent& e);
00049     void OnAddProject(wxCommandEvent& e);
00051     void OnAddProjectToAssistant(wxCommandEvent& e);
00053     virtual wxMenu* CreatePopupMenu();
00054 
00055     DECLARE_EVENT_TABLE()
00056 };
00057 
00058 #if defined __WXMSW__ && wxUSE_TASKBARICON_BALLOONS && wxCHECK_VERSION(2,9,0)
00059 // wxMSW, version 2.9 offers a native balloon for the traybar notification
00060 // we need to implement a own version for the other systems only
00061 #else
00062 #include <wx/frame.h>
00063 #include <wx/timer.h>
00064 
00066 // idea from http://wiki.wxwidgets.org/WxTaskBarIcon
00067 class TaskBarBalloon : public wxFrame
00068 {
00069 public:
00070     TaskBarBalloon(wxString sTitle, wxString sMessage);
00071     virtual ~TaskBarBalloon();
00073     void OnTimerTick(wxTimerEvent& e);
00075     void OnClick(wxMouseEvent& e);
00077     void OnKeyDown(wxKeyEvent& e);
00078 
00080     void showBalloon(unsigned int iTimeout);
00081 private:
00082     wxTimer* m_timer;
00083     DECLARE_EVENT_TABLE();
00084 };
00085 #endif
00086 
00087 #endif // BATCHTRAYICON_H

Generated on Sat Apr 19 01:25:38 2014 for Hugintrunk by  doxygen 1.3.9.1