cursor.hpp

Go to the documentation of this file.
00001 /* $Id: cursor.hpp 23842 2008-02-16 08:47:16Z mordante $ */
00002 /*
00003    Copyright (C) 2003 - 2008 by David White <dave@whitevine.net>
00004    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License version 2
00008    or at your option any later version.
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY.
00011 
00012    See the COPYING file for more details.
00013 */
00014 
00015 //! @file cursor.hpp
00016 //!
00017 
00018 #ifndef CURSOR_HPP_INCLUDED
00019 #define CURSOR_HPP_INCLUDED
00020 
00021 #include "SDL.h"
00022 #include "sdl_utils.hpp"
00023 
00024 namespace cursor
00025 {
00026 
00027 struct manager
00028 {
00029     manager();
00030     ~manager();
00031 };
00032 
00033 enum CURSOR_TYPE { NORMAL, WAIT, MOVE, ATTACK, HYPERLINK, MOVE_DRAG, ATTACK_DRAG, NO_CURSOR, NUM_CURSORS };
00034 
00035 //! This function uses temporary the b&w cursors while the display is busy.
00036 // If used, the colour-cursors will be reused when the display is ready again.
00037 void temporary_use_bw();
00038 
00039 //! Use the default parameter to reset cursors.
00040 // e.g. after a change in color cursor preferences
00041 void set(CURSOR_TYPE type = NUM_CURSORS);
00042 void set_dragging(bool drag);
00043 CURSOR_TYPE get();
00044 
00045 void draw(surface screen);
00046 void undraw(surface screen);
00047 
00048 void set_focus(bool focus);
00049 
00050 struct setter
00051 {
00052     setter(CURSOR_TYPE type);
00053     ~setter();
00054 
00055 private:
00056     CURSOR_TYPE old_;
00057 };
00058 
00059 } // end namespace cursor
00060 
00061 #endif

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs