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