Main Page   Class Hierarchy   Compound List   File List   Compound Members  

gfxConfig.h

00001 //////////////////////////////////////////////////////////////////////
00002 // Copyright (c) 2001-2002 David Pritchard <drpritch@alumni.uwaterloo.ca>
00003 // 
00004 // This program is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public License
00006 // as published by the Free Software Foundation; either
00007 // version 2 of the License, or (at your option) any later
00008 // version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU Lesser General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU Lesser General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019 #ifndef freecloth_gfx_gfxConfig_h
00020 #define freecloth_gfx_gfxConfig_h
00021 
00022 #ifndef freecloth_gfx_package_h
00023 #include <freecloth/gfx/package.h>
00024 #endif
00025 
00026 #ifndef freecloth_resmgt_resConfig_h
00027 #include <freecloth/resmgt/resConfig.h>
00028 #endif
00029 
00030 ////////////////////////////////////////////////////////////////////////////////
00031 // FORWARD DECLARATIONS
00032 
00033 ////////////////////////////////////////////////////////////////////////////////
00034 /*!
00035  * \class GfxConfig freecloth/gfx/gfxConfig.h
00036  * \brief Configuration information for graphics applications.
00037  *
00038  * Includes window size and position, or fullscreen video mode information.
00039  */
00040 class GfxConfig : public ResConfig
00041 {
00042 public:
00043     //----- classes -----
00044     /*!
00045      * \class WindowInfo freecloth/gfx/gfxConfig.h
00046      * \brief Graphics configuration for windowed applications
00047      */
00048     class WindowInfo
00049     {
00050     public:
00051         //----- data members -----
00052         UInt32 _width;
00053         UInt32 _height;
00054         UInt32 _x;
00055         UInt32 _y;
00056     };
00057 
00058     /*!
00059      * \class VideoModeInfo freecloth/gfx/gfxConfig.h
00060      * \brief Graphics configuration for fullscreen applications
00061      */
00062     class VideoModeInfo
00063     {
00064     public:
00065         //----- data members -----
00066         UInt32 _width;
00067         UInt32 _height;
00068         UInt32 _bitsPerPixel;
00069     };
00070 
00071     //----- member functions -----
00072 
00073     GfxConfig();
00074 
00075     // See base.
00076     virtual void load( ResConfigRegistryR& reg );
00077     virtual void save( ResConfigRegistryW& reg ) const;
00078     // FIXME: contravariant return type.
00079     virtual RCShdPtr<ResConfig> clone() const;
00080 
00081     //@{
00082     //! Accessor
00083     const WindowInfo& getWindowInfo() const;
00084     const VideoModeInfo& getVideoModeInfo() const;
00085     bool getFullscreen() const;
00086     //@}
00087 
00088     //@{
00089     //! Mutator
00090     void setWindowInfo( const WindowInfo& );
00091     void setVideoModeInfo( const VideoModeInfo& );
00092     void setFullscreen( bool );
00093     //@}
00094 
00095 protected:
00096     //----- member functions -----
00097 
00098     GfxConfig( const GfxConfig& );
00099 
00100 private:
00101     //----- member functions -----
00102 
00103     // Disallowed.
00104     GfxConfig& operator = ( const GfxConfig& );
00105 
00106     //----- data members -----
00107 
00108     WindowInfo      _windowInfo;
00109     VideoModeInfo   _videoModeInfo;
00110     bool            _fullscreen;
00111 };
00112 #endif

Generated on Wed Apr 23 15:58:52 2003 for Freecloth by doxygen1.3-rc3