00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef BAKERY_UTILITIES_BUSYCURSOR_H
00020 #define BAKERY_UTILITIES_BUSYCURSOR_H
00021
00022 #include <gtkmm/window.h>
00023 #include <gdkmm/cursor.h>
00024 #include <map>
00025
00026 namespace Bakery
00027 {
00028
00032 class BusyCursor
00033 {
00034 public:
00037 BusyCursor(Gtk::Window& window, Gdk::CursorType cursor_type = Gdk::WATCH);
00038
00041 BusyCursor(Gtk::Window* window, Gdk::CursorType cursor_type = Gdk::WATCH);
00042
00043 virtual ~BusyCursor();
00044
00045 protected:
00046
00047 void init();
00048 void force_gui_update();
00049
00050 Gdk::Cursor m_Cursor;
00051 Gtk::Window* m_pWindow;
00052 Glib::RefPtr<Gdk::Window> m_refWindow;
00053
00054 typedef std::map<Gtk::Window*, Gdk::Cursor> type_map_cursors;
00055 static type_map_cursors m_map_cursors;
00056 Gdk::Cursor m_old_cursor;
00057 bool m_old_cursor_valid;
00058 };
00059
00060 }
00061
00062 #endif //BAKERY_UTILITIES_BUSYCURSOR_H