# 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-2009 Torus Knot Software Ltd
    00008 Permission is hereby granted, free of charge, to any person obtaining a copy
    00009 of this software and associated documentation files (the "Software"), to deal
    00010 in the Software without restriction, including without limitation the rights
    00011 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    00012 copies of the Software, and to permit persons to whom the Software is
    00013 furnished to do so, subject to the following conditions:
    00014
    00015 The above copyright notice and this permission notice shall be included in
    00016 all copies or substantial portions of the Software.
    00017
    00018 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    00019 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    00020 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    00021 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    00022 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    00023 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    00024 THE SOFTWARE
    00025 -------------------------------------------------------------------------*/
    00026 #ifndef __RenderWindow_H__
    00027 #define __RenderWindow_H__
    00028
    00029 #include "OgrePrerequisites.h"
    00030
    00031 #include "OgreRenderTarget.h"
    00032
    00033 namespace Ogre
    00034 {
    00062     class _OgreExport RenderWindow : public RenderTarget
    00063     {
    00064
    00065     public:
    00068         RenderWindow();
    00069
    00093         virtual void create(const String& name, unsigned int width, unsigned int height,
    00094                 bool fullScreen, const NameValuePairList *miscParams) = 0;
    00095
    00103         virtual void setFullscreen(bool fullScreen, unsigned int width, unsigned int height)
    00104                 { (void)fullScreen; (void)width; (void)height; }
    00105
    00108         virtual void destroy(void) = 0;
    00109
    00112         virtual void resize(unsigned int width, unsigned int height) = 0;
    00113
    00118         virtual void windowMovedOrResized() {}
    00119
    00122         virtual void reposition(int left, int top) = 0;
    00123
    00126         virtual bool isVisible(void) const { return true; }
    00127
    00130         virtual void setVisible(bool visible)
    00131         { (void)visible; }
    00132
    00135         virtual bool isActive(void) const { return mActive && isVisible(); }
    00136
    00139         virtual bool isClosed(void) const = 0;
    00140
    00147         virtual bool isPrimary(void) const;
    00148
    00151         virtual bool isFullScreen(void) const;
    00152
    00156         virtual void getMetrics(unsigned int& width, unsigned int& height, unsigned int& colourDepth,
    00157             int& left, int& top);
    00158
    00160         PixelFormat suggestPixelFormat() const { return PF_BYTE_RGB; }
    00161
    00164         bool isDeactivatedOnFocusChange() const;
    00165
    00170         void setDeactivateOnFocusChange(bool deactivate);
    00171
    00172     protected:
    00173         bool mIsFullScreen;
    00174         bool mIsPrimary;
    00175         bool mAutoDeactivatedOnFocusChange;
    00176         int mLeft;
    00177         int mTop;
    00178
    00182         void _setPrimary() { mIsPrimary = true; }
    00183
    00184         friend class Root;
    00185     };
    00189 } // Namespace
    00190 #endif

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Wed Nov 3 2010 19:24:52