preferences_display.hpp

Go to the documentation of this file.
00001 /* $Id: preferences_display.hpp 52997 2012-02-08 21:44:01Z shadowmaster $ */
00002 /*
00003    Copyright (C) 2003 - 2012 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 as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY.
00012 
00013    See the COPYING file for more details.
00014 */
00015 
00016 #ifndef PREFERENCES_DISPLAY_HPP_INCLUDED
00017 #define PREFERENCES_DISPLAY_HPP_INCLUDED
00018 
00019 class CVideo;
00020 class config;
00021 class display;
00022 
00023 #include <string>
00024 
00025 namespace preferences {
00026 
00027     struct display_manager
00028     {
00029         display_manager(display* disp);
00030         ~display_manager();
00031     };
00032 
00033 
00034     /**
00035      * Detect a good resolution.
00036      *
00037      * @param video               The video 'holding' the framebuffer.
00038      * @param resolution          Any good resultion is returned through this reference.
00039      * @param bpp                 A reference through which the best bpp is returned.
00040      * @param video_flags         A reference through which the video flags for setting the video mode are returned.
00041      *
00042      * @returns                   Whether valid video settings were found.
00043      */
00044     bool detect_video_settings(CVideo& video, std::pair<int,int>& resolution, int& bpp, int& video_flags);
00045 
00046     void set_fullscreen(CVideo& video, const bool ison);
00047     void set_fullscreen(bool ison);
00048     void set_scroll_to_action(bool ison);
00049     void set_resolution(const std::pair<int,int>& res);
00050 
00051     /**
00052      * Set the resolution.
00053      *
00054      * @param video               The video 'holding' the framebuffer.
00055      * @param width               The new width.
00056      * @param height              The new height.
00057      *
00058      * @returns                   The status true if width and height are the
00059      *                            size of the framebuffer, false otherwise.
00060      */
00061     bool set_resolution(CVideo& video
00062             , const unsigned width, const unsigned height);
00063     void set_turbo(bool ison);
00064     void set_ellipses(bool ison);
00065     void set_grid(bool ison);
00066     void set_turbo_speed(double speed);
00067     void set_color_cursors(bool value);
00068 
00069     // Control unit idle animations
00070     void set_idle_anim(bool ison);
00071     void set_idle_anim_rate(int rate);
00072 
00073     std::string show_wesnothd_server_search(display&);
00074     void show_preferences_dialog(display& disp, const config& game_cfg);
00075     bool show_video_mode_dialog(display& disp);
00076     bool show_theme_dialog(display& disp);
00077 
00078     // If prefs is non-null, save the hotkeys in that config
00079     // instead of the default.
00080     void show_hotkeys_dialog(display & disp);
00081 } // end namespace preferences
00082 
00083 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:03:08 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs