00001 /* 00002 This file is part of UFORadiant. 00003 00004 UFORadiant is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU General Public License as published by 00006 the Free Software Foundation; either version 2 of the License, or 00007 (at your option) any later version. 00008 00009 UFORadiant is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with UFORadiant; if not, write to the Free Software 00016 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00017 */ 00018 00019 #if !defined(INCLUDED_JOBINFO_H) 00020 #define INCLUDED_JOBINFO_H 00021 00022 #include <gtk/gtk.h> 00023 #include "gtkutil/menu/PopupMenu.h" 00024 00025 namespace sidebar 00026 { 00027 class JobInfo 00028 { 00029 // Main widget 00030 GtkWidget* _widget; 00031 00032 // Main store and view 00033 GtkListStore* _jobList; 00034 GtkWidget* _view; 00035 00036 // Context menu 00037 gtkutil::PopupMenu _popupMenu; 00038 00039 private: 00040 00041 /* GTK CALLBACKS */ 00042 00043 static void stopJobCallback (gpointer data, gpointer userData); 00044 static void updateJobs (gpointer data, gpointer userData); 00045 00046 public: 00047 00050 static JobInfo& getInstance () 00051 { 00052 static JobInfo _instance; 00053 return _instance; 00054 } 00055 00059 GtkWidget* getWidget () 00060 { 00061 gtk_widget_show_all(_widget); 00062 return _widget; 00063 } 00064 00067 JobInfo (); 00068 00071 void update (void); 00072 }; 00073 00074 GtkWidget *JobInfo_constructNotebookTab (); 00075 void JobInfo_Update (void); 00076 } 00077 00078 #endif