Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * Contributor(s): Campbell Barton 00019 * 00020 * ***** END GPL LICENSE BLOCK ***** 00021 */ 00022 00028 #ifndef _GHOST_WINDOWNULL_H_ 00029 #define _GHOST_WINDOWNULL_H_ 00030 00031 #include "GHOST_Window.h" 00032 00033 #include <map> 00034 00035 class STR_String; 00036 class GHOST_SystemNULL; 00037 00038 class GHOST_WindowNULL : public GHOST_Window 00039 { 00040 public: 00041 const GHOST_TabletData* GetTabletData() { return NULL; } 00042 00043 GHOST_WindowNULL( 00044 GHOST_SystemNULL *system, 00045 const STR_String& title, 00046 GHOST_TInt32 left, 00047 GHOST_TInt32 top, 00048 GHOST_TUns32 width, 00049 GHOST_TUns32 height, 00050 GHOST_TWindowState state, 00051 const GHOST_TEmbedderWindowID parentWindow, 00052 GHOST_TDrawingContextType type, 00053 const bool stereoVisual, 00054 const GHOST_TUns16 numOfAASamples 00055 ) : 00056 GHOST_Window(width,height,state,type,stereoVisual,numOfAASamples), 00057 m_system (system) 00058 { 00059 setTitle(title); 00060 } 00061 00062 protected: 00063 GHOST_TSuccess installDrawingContext( GHOST_TDrawingContextType type ){ return GHOST_kSuccess; } 00064 GHOST_TSuccess removeDrawingContext( ){ return GHOST_kSuccess; } 00065 GHOST_TSuccess setWindowCursorGrab( GHOST_TGrabCursorMode mode ){ return GHOST_kSuccess; } 00066 GHOST_TSuccess setWindowCursorShape( GHOST_TStandardCursor shape ){ return GHOST_kSuccess; } 00067 GHOST_TSuccess setWindowCustomCursorShape( GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY ) { return GHOST_kSuccess; } 00068 GHOST_TSuccess setWindowCustomCursorShape( GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color ){ return GHOST_kSuccess; } 00069 00070 bool getValid( ) const { return true; } 00071 void setTitle( const STR_String& title ){ /* nothing */ } 00072 void getTitle( STR_String& title ) const { title= "untitled"; } 00073 void getWindowBounds( GHOST_Rect& bounds ) const { getClientBounds(bounds); } 00074 void getClientBounds( GHOST_Rect& bounds ) const { /* nothing */ } 00075 GHOST_TSuccess setClientWidth( GHOST_TUns32 width ){ return GHOST_kFailure; } 00076 GHOST_TSuccess setClientHeight( GHOST_TUns32 height ){ return GHOST_kFailure; } 00077 GHOST_TSuccess setClientSize( GHOST_TUns32 width, GHOST_TUns32 height ){ return GHOST_kFailure; } 00078 void screenToClient( GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY ) const { outX = inX; outY = inY; } 00079 void clientToScreen( GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY ) const { outX = inX; outY = inY; } 00080 GHOST_TSuccess swapBuffers( ){ return GHOST_kFailure; } 00081 GHOST_TSuccess activateDrawingContext( ){ return GHOST_kFailure; } 00082 ~GHOST_WindowNULL( ){ /* nothing */ } 00083 GHOST_TSuccess setWindowCursorVisibility( bool visible ){ return GHOST_kSuccess; } 00084 GHOST_TSuccess setState(GHOST_TWindowState state) { return GHOST_kSuccess; } 00085 GHOST_TWindowState getState() const { return GHOST_kWindowStateNormal; } 00086 GHOST_TSuccess invalidate() { return GHOST_kSuccess; } 00087 GHOST_TSuccess setOrder(GHOST_TWindowOrder order) { return GHOST_kSuccess; } 00088 00089 00090 private : 00091 GHOST_SystemNULL * m_system; 00092 }; 00093 00094 00095 #endif // _GHOST_WINDOWNULL_H_