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-2012 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 isHidden(void) const { return false; }
    00136
    00145         virtual void setHidden(bool hidden)
    00146         { (void)hidden; }
    00147
    00150         virtual void setVSyncEnabled(bool vsync)
    00151         { (void)vsync; }
    00152
    00155         virtual bool isVSyncEnabled() const { return false; }
    00156
    00160         virtual void setVSyncInterval(unsigned int interval)
    00161         { (void)interval; }
    00162
    00165         virtual unsigned int getVSyncInterval() const { return 1; }
    00166
    00167
    00170         virtual bool isActive(void) const { return mActive && isVisible(); }
    00171
    00174         virtual bool isClosed(void) const = 0;
    00175
    00182         virtual bool isPrimary(void) const;
    00183
    00186         virtual bool isFullScreen(void) const;
    00187
    00191         virtual void getMetrics(unsigned int& width, unsigned int& height, unsigned int& colourDepth,
    00192             int& left, int& top);
    00193
    00195         PixelFormat suggestPixelFormat() const { return PF_BYTE_RGB; }
    00196
    00199         bool isDeactivatedOnFocusChange() const;
    00200
    00205         void setDeactivateOnFocusChange(bool deactivate);
    00206
    00207     protected:
    00208         bool mIsFullScreen;
    00209         bool mIsPrimary;
    00210         bool mAutoDeactivatedOnFocusChange;
    00211         int mLeft;
    00212         int mTop;
    00213
    00217         void _setPrimary() { mIsPrimary = true; }
    00218
    00219         friend class Root;
    00220     };
    00224 } // Namespace
    00225 #endif

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Sep 2 2012 07:27:23