bakery  2.6
BusyCursor.h
Go to the documentation of this file.
1 /*
2  * Copyright 2000 Murray Cumming
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18 
19 #ifndef BAKERY_UTILITIES_BUSYCURSOR_H
20 #define BAKERY_UTILITIES_BUSYCURSOR_H
21 
22 #include <gtkmm/window.h>
23 #include <gdkmm/cursor.h>
24 #include <map>
25 
26 namespace Bakery
27 {
28 
33 {
34 public:
37  BusyCursor(Gtk::Window& window, Gdk::CursorType cursor_type = Gdk::WATCH);
38 
41  BusyCursor(Gtk::Window* window, Gdk::CursorType cursor_type = Gdk::WATCH);
42 
43  virtual ~BusyCursor();
44 
45 protected:
46 
47  void init();
48  void force_gui_update();
49 
50  Gdk::Cursor m_Cursor;
51  Gtk::Window* m_pWindow;
52  Glib::RefPtr<Gdk::Window> m_refWindow;
53 
54  typedef std::map<Gtk::Window*, Gdk::Cursor> type_map_cursors;
56  Gdk::Cursor m_old_cursor;
58 };
59 
60 } //namespace Bakery
61 
62 #endif //BAKERY_UTILITIES_BUSYCURSOR_H