<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>bakery: BusyCursor.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.2-20100208 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <h1>BusyCursor.h</h1><a href="BusyCursor_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> * Copyright 2000 Murray Cumming</span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * This library is free software; you can redistribute it and/or</span> <a name="l00005"></a>00005 <span class="comment"> * modify it under the terms of the GNU Library General Public</span> <a name="l00006"></a>00006 <span class="comment"> * License as published by the Free Software Foundation; either</span> <a name="l00007"></a>00007 <span class="comment"> * version 2 of the License, or (at your option) any later version.</span> <a name="l00008"></a>00008 <span class="comment"> *</span> <a name="l00009"></a>00009 <span class="comment"> * This library is distributed in the hope that it will be useful,</span> <a name="l00010"></a>00010 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00011"></a>00011 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00012"></a>00012 <span class="comment"> * Library General Public License for more details.</span> <a name="l00013"></a>00013 <span class="comment"> *</span> <a name="l00014"></a>00014 <span class="comment"> * You should have received a copy of the GNU Library General Public</span> <a name="l00015"></a>00015 <span class="comment"> * License along with this library; if not, write to the Free</span> <a name="l00016"></a>00016 <span class="comment"> * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span> <a name="l00017"></a>00017 <span class="comment"> */</span> <a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="preprocessor">#ifndef BAKERY_UTILITIES_BUSYCURSOR_H</span> <a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define BAKERY_UTILITIES_BUSYCURSOR_H</span> <a name="l00021"></a>00021 <span class="preprocessor"></span> <a name="l00022"></a>00022 <span class="preprocessor">#include <gtkmm/window.h></span> <a name="l00023"></a>00023 <span class="preprocessor">#include <gdkmm/cursor.h></span> <a name="l00024"></a>00024 <span class="preprocessor">#include <map></span> <a name="l00025"></a>00025 <a name="l00026"></a>00026 <span class="keyword">namespace </span>Bakery <a name="l00027"></a>00027 { <a name="l00028"></a>00028 <a name="l00032"></a><a class="code" href="classBakery_1_1BusyCursor.html">00032</a> <span class="keyword">class </span><a class="code" href="classBakery_1_1BusyCursor.html" title="Changes the cursor for as long as this instance lives.">BusyCursor</a> <a name="l00033"></a>00033 { <a name="l00034"></a>00034 <span class="keyword">public</span>: <a name="l00037"></a>00037 <a class="code" href="classBakery_1_1BusyCursor.html#a020af630bdf50fb7ed15516d5541bf1d" title="Associate a busy cursor with the window, for the lifetime of this object.">BusyCursor</a>(Gtk::Window& window, Gdk::CursorType cursor_type = Gdk::WATCH); <a name="l00038"></a>00038 <a name="l00041"></a>00041 <a class="code" href="classBakery_1_1BusyCursor.html#a020af630bdf50fb7ed15516d5541bf1d" title="Associate a busy cursor with the window, for the lifetime of this object.">BusyCursor</a>(Gtk::Window* window, Gdk::CursorType cursor_type = Gdk::WATCH); <a name="l00042"></a>00042 <a name="l00043"></a>00043 <span class="keyword">virtual</span> <a class="code" href="classBakery_1_1BusyCursor.html#acc33e9ed8d7b13e163f14c34c2feacce">~BusyCursor</a>(); <a name="l00044"></a>00044 <a name="l00045"></a>00045 <span class="keyword">protected</span>: <a name="l00046"></a>00046 <a name="l00047"></a>00047 <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1BusyCursor.html#a7d749534aba6f81dafe32d42817be9a9">init</a>(); <a name="l00048"></a>00048 <span class="keywordtype">void</span> <a class="code" href="classBakery_1_1BusyCursor.html#a46ef80a61313f2e5f168a1571ba3f8ea">force_gui_update</a>(); <a name="l00049"></a>00049 <a name="l00050"></a><a class="code" href="classBakery_1_1BusyCursor.html#a18120f7368f3c9407036b0ca1f46070f">00050</a> Gdk::Cursor <a class="code" href="classBakery_1_1BusyCursor.html#a18120f7368f3c9407036b0ca1f46070f">m_Cursor</a>; <a name="l00051"></a><a class="code" href="classBakery_1_1BusyCursor.html#ad5970c0e8564650d50382d8202db1b08">00051</a> Gtk::Window* <a class="code" href="classBakery_1_1BusyCursor.html#ad5970c0e8564650d50382d8202db1b08">m_pWindow</a>; <a name="l00052"></a><a class="code" href="classBakery_1_1BusyCursor.html#a6a240069fcfda5179c6685e88589f2df">00052</a> Glib::RefPtr<Gdk::Window> <a class="code" href="classBakery_1_1BusyCursor.html#a6a240069fcfda5179c6685e88589f2df">m_refWindow</a>; <a name="l00053"></a>00053 <a name="l00054"></a><a class="code" href="classBakery_1_1BusyCursor.html#a747f3326e1322cb8c39b3e5431dfb32b">00054</a> <span class="keyword">typedef</span> std::map<Gtk::Window*, Gdk::Cursor> <a class="code" href="classBakery_1_1BusyCursor.html#a747f3326e1322cb8c39b3e5431dfb32b">type_map_cursors</a>; <a name="l00055"></a><a class="code" href="classBakery_1_1BusyCursor.html#ab51cd0a81105915731c11c00474f977a">00055</a> <span class="keyword">static</span> <a class="code" href="classBakery_1_1BusyCursor.html#a747f3326e1322cb8c39b3e5431dfb32b">type_map_cursors</a> <a class="code" href="classBakery_1_1BusyCursor.html#ab51cd0a81105915731c11c00474f977a">m_map_cursors</a>; <a name="l00056"></a><a class="code" href="classBakery_1_1BusyCursor.html#a78bbab199448eb0aca184081d73fa744">00056</a> Gdk::Cursor <a class="code" href="classBakery_1_1BusyCursor.html#a78bbab199448eb0aca184081d73fa744">m_old_cursor</a>; <a name="l00057"></a><a class="code" href="classBakery_1_1BusyCursor.html#abbc97a772ca16ffe90046822ed40369b">00057</a> <span class="keywordtype">bool</span> <a class="code" href="classBakery_1_1BusyCursor.html#abbc97a772ca16ffe90046822ed40369b">m_old_cursor_valid</a>; <a name="l00058"></a>00058 }; <a name="l00059"></a>00059 <a name="l00060"></a>00060 } <span class="comment">//namespace Bakery</span> <a name="l00061"></a>00061 <a name="l00062"></a>00062 <span class="preprocessor">#endif //BAKERY_UTILITIES_BUSYCURSOR_H</span> </pre></div></div> <hr class="footer"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address> </body> </html>