# OgreRenderWindow.h

Go to the documentation of this file.

    00001 /*-------------------------------------------------------------------------
    00002 This source file is a part of OGRE
    00003 (Object-oriented Graphics Rendering Engine)
    00004
    00005 For the latest info, see http://www.ogre3d.org/
    00006
    00007 Copyright (c) 2000-2006 Torus Knot Software Ltd
    00008 Also see acknowledgements in Readme.html
    00009
    00010 This library is free software; you can redistribute it and/or modify it
    00011 under the terms of the GNU Lesser General Public License (LGPL) as
    00012 published by the Free Software Foundation; either version 2.1 of the
    00013 License, or (at your option) any later version.
    00014
    00015 This library is distributed in the hope that it will be useful, but
    00016 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    00017 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
    00018 License for more details.
    00019
    00020 You should have received a copy of the GNU Lesser General Public License
    00021 along with this library; if not, write to the Free Software Foundation,
    00022 Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA or go to
    00023 http://www.gnu.org/copyleft/lesser.txt
    00024 -------------------------------------------------------------------------*/
    00025 #ifndef __RenderWindow_H__
    00026 #define __RenderWindow_H__
    00027
    00028 #include "OgrePrerequisites.h"
    00029
    00030 #include "OgreRenderTarget.h"
    00031
    00032 namespace Ogre
    00033 {
    00055     class _OgreExport RenderWindow : public RenderTarget
    00056     {
    00057
    00058     public:
    00061         RenderWindow();
    00062
    00086         virtual void create(const String& name, unsigned int width, unsigned int height,
    00087                 bool fullScreen, const NameValuePairList *miscParams) = 0;
    00088
    00096         virtual void setFullscreen(bool fullScreen, unsigned int width, unsigned int height) {}
    00097
    00100         virtual void destroy(void) = 0;
    00101
    00104         virtual void resize(unsigned int width, unsigned int height) = 0;
    00105
    00110     virtual void windowMovedOrResized() {}
    00111
    00114         virtual void reposition(int left, int top) = 0;
    00115
    00118         virtual bool isVisible(void) const { return true; }
    00119
    00122         virtual void setVisible(bool visible) {}
    00123
    00126         virtual bool isActive(void) const { return mActive && isVisible(); }
    00127
    00130         virtual bool isClosed(void) const = 0;
    00131
    00138         virtual bool isPrimary(void) const;
    00139
    00142         virtual bool isFullScreen(void) const;
    00143
    00147         virtual void getMetrics(unsigned int& width, unsigned int& height, unsigned int& colourDepth,
    00148             int& left, int& top);
    00149
    00151         PixelFormat suggestPixelFormat() const { return PF_BYTE_RGB; }
    00152
    00155         bool isDeactivatedOnFocusChange() const;
    00156
    00161         void setDeactivateOnFocusChange(bool deactivate);
    00162
    00163     protected:
    00164         bool mIsFullScreen;
    00165         bool mIsPrimary;
    00166         bool mAutoDeactivatedOnFocusChange;
    00167         int mLeft;
    00168         int mTop;
    00169
    00173         void _setPrimary() { mIsPrimary = true; }
    00174
    00175         friend class Root;
    00176     };
    00177
    00178 } // Namespace
    00179 #endif

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Dec 27 17:31:07 2009