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-2013 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 00082 virtual void create(const String& name, unsigned int width, unsigned int height, 00083 bool fullScreen, const NameValuePairList *miscParams) = 0; 00084 00092 virtual void setFullscreen(bool fullScreen, unsigned int width, unsigned int height) 00093 { (void)fullScreen; (void)width; (void)height; } 00094 00097 virtual void destroy(void) = 0; 00098 00101 virtual void resize(unsigned int width, unsigned int height) = 0; 00102 00107 virtual void windowMovedOrResized() {} 00108 00111 virtual void reposition(int left, int top) = 0; 00112 00115 virtual bool isVisible(void) const { return true; } 00116 00119 virtual void setVisible(bool visible) 00120 { (void)visible; } 00121 00124 virtual bool isHidden(void) const { return false; } 00125 00134 virtual void setHidden(bool hidden) 00135 { (void)hidden; } 00136 00139 virtual void setVSyncEnabled(bool vsync) 00140 { (void)vsync; } 00141 00144 virtual bool isVSyncEnabled() const { return false; } 00145 00149 virtual void setVSyncInterval(unsigned int interval) 00150 { (void)interval; } 00151 00154 virtual unsigned int getVSyncInterval() const { return 1; } 00155 00156 00159 virtual bool isActive(void) const { return mActive && isVisible(); } 00160 00163 virtual bool isClosed(void) const = 0; 00164 00171 virtual bool isPrimary(void) const; 00172 00175 virtual bool isFullScreen(void) const; 00176 00180 virtual void getMetrics(unsigned int& width, unsigned int& height, unsigned int& colourDepth, 00181 int& left, int& top); 00182 00184 PixelFormat suggestPixelFormat() const { return PF_BYTE_RGB; } 00185 00188 bool isDeactivatedOnFocusChange() const; 00189 00194 void setDeactivateOnFocusChange(bool deactivate); 00195 00196 protected: 00197 bool mIsFullScreen; 00198 bool mIsPrimary; 00199 bool mAutoDeactivatedOnFocusChange; 00200 int mLeft; 00201 int mTop; 00202 00206 void _setPrimary() { mIsPrimary = true; } 00207 00208 friend class Root; 00209 }; 00213 } // Namespace 00214 #endif
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Mon Jul 27 2020 13:40:45