Blender V2.61 - r43446
Public Member Functions

GHOST_IWindow Class Reference

#include <GHOST_IWindow.h>

Inheritance diagram for GHOST_IWindow:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~GHOST_IWindow ()
virtual bool getValid () const =0
virtual void * getOSWindow () const =0
virtual GHOST_TDrawingContextType getDrawingContextType ()=0
virtual GHOST_TSuccess setDrawingContextType (GHOST_TDrawingContextType type)=0
virtual void setTitle (const STR_String &title)=0
virtual void getTitle (STR_String &title) const =0
virtual void getWindowBounds (GHOST_Rect &bounds) const =0
virtual void getClientBounds (GHOST_Rect &bounds) const =0
virtual GHOST_TSuccess setClientWidth (GHOST_TUns32 width)=0
virtual GHOST_TSuccess setClientHeight (GHOST_TUns32 height)=0
virtual GHOST_TSuccess setClientSize (GHOST_TUns32 width, GHOST_TUns32 height)=0
virtual void screenToClient (GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const =0
virtual void clientToScreen (GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const =0
virtual void setAcceptDragOperation (bool canAccept)=0
virtual bool canAcceptDragOperation () const =0
virtual GHOST_TWindowState getState () const =0
virtual GHOST_TSuccess setState (GHOST_TWindowState state)=0
virtual GHOST_TSuccess setModifiedState (bool isUnsavedChanges)=0
virtual bool getModifiedState ()=0
virtual GHOST_TSuccess setOrder (GHOST_TWindowOrder order)=0
virtual GHOST_TSuccess swapBuffers ()=0
virtual GHOST_TSuccess activateDrawingContext ()=0
virtual GHOST_TSuccess invalidate ()=0
virtual GHOST_TUserDataPtr getUserData () const =0
virtual void setUserData (const GHOST_TUserDataPtr userData)=0
virtual const GHOST_TabletDataGetTabletData ()=0
virtual GHOST_TSuccess setProgressBar (float progress)=0
virtual GHOST_TSuccess endProgressBar ()=0
virtual GHOST_TStandardCursor getCursorShape () const =0
virtual GHOST_TSuccess setCursorShape (GHOST_TStandardCursor cursorShape)=0
virtual GHOST_TSuccess setCustomCursorShape (GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY)=0
virtual GHOST_TSuccess setCustomCursorShape (GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color)=0
virtual bool getCursorVisibility () const =0
virtual GHOST_TSuccess setCursorVisibility (bool visible)=0
virtual GHOST_TSuccess setCursorGrab (GHOST_TGrabCursorMode mode, GHOST_Rect *bounds)

Detailed Description

Interface for GHOST windows.

You can create a window with the system's GHOST_ISystem::createWindow method.

See also:
GHOST_ISystem::createWindow

There are two coordinate systems:

Author:
Maarten Gribnau
Date:
May 31, 2001

Definition at line 59 of file GHOST_IWindow.h.


Constructor & Destructor Documentation

virtual GHOST_IWindow::~GHOST_IWindow ( ) [inline, virtual]

Destructor.

Definition at line 65 of file GHOST_IWindow.h.


Member Function Documentation

virtual GHOST_TSuccess GHOST_IWindow::activateDrawingContext ( ) [pure virtual]

Activates the drawing context of this window.

Returns:
A boolean success indicator.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_ActivateWindowDrawingContext(), GPG_Application::processEvent(), and View().

virtual bool GHOST_IWindow::canAcceptDragOperation ( ) const [pure virtual]

Returns acceptance of the dropped object Usually called by the "object dropped" event handling function

Implemented in GHOST_Window.

virtual void GHOST_IWindow::clientToScreen ( GHOST_TInt32  inX,
GHOST_TInt32  inY,
GHOST_TInt32 outX,
GHOST_TInt32 outY 
) const [pure virtual]

Converts a point in screen coordinates to client rectangle coordinates

Parameters:
inXThe x-coordinate in the client rectangle.
inYThe y-coordinate in the client rectangle.
outXThe x-coordinate on the screen.
outYThe y-coordinate on the screen.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_ClientToScreen(), GHOST_SetCursorGrab(), and GPG_Canvas::SetMousePosition().

virtual GHOST_TSuccess GHOST_IWindow::endProgressBar ( ) [pure virtual]

Hides the progress bar in the icon

Implemented in GHOST_Window, and GHOST_WindowWin32.

Referenced by GHOST_EndProgressBar().

virtual void GHOST_IWindow::getClientBounds ( GHOST_Rect bounds) const [pure virtual]

Returns the client rectangle dimensions. The left and top members of the rectangle are always zero.

Parameters:
boundsThe bounding rectangle of the client area of the window.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_GetClientBounds(), GHOST_SetCursorGrab(), GPG_Canvas::GPG_Canvas(), GPG_Application::processEvent(), GHOST_Window::setCursorGrab(), and View().

virtual GHOST_TStandardCursor GHOST_IWindow::getCursorShape ( ) const [pure virtual]

Returns the current cursor shape.

Returns:
The current cursor shape.

Implemented in GHOST_Window.

Referenced by GHOST_GetCursorShape().

virtual bool GHOST_IWindow::getCursorVisibility ( ) const [pure virtual]

Returns the visibility state of the cursor.

Returns:
The visibility state of the cursor.

Implemented in GHOST_Window.

Referenced by GHOST_GetCursorVisibility(), and Application::processEvent().

virtual GHOST_TDrawingContextType GHOST_IWindow::getDrawingContextType ( ) [pure virtual]

Returns the type of drawing context used in this window.

Returns:
The current type of drawing context.

Implemented in GHOST_Window.

Referenced by GHOST_GetDrawingContextType().

virtual bool GHOST_IWindow::getModifiedState ( ) [pure virtual]

Gets the window "modified" status, indicating unsaved changes

Returns:
True if there are unsaved changes

Implemented in GHOST_Window.

virtual void* GHOST_IWindow::getOSWindow ( ) const [pure virtual]

Returns the associated OS object/handle

Returns:
The associated OS object/handle

Implemented in GHOST_Window.

virtual GHOST_TWindowState GHOST_IWindow::getState ( ) const [pure virtual]

Returns the state of the window (normal, minimized, maximized).

Returns:
The state of the window.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_GetWindowState().

virtual const GHOST_TabletData* GHOST_IWindow::GetTabletData ( ) [pure virtual]

Returns the tablet data (pressure etc).

Returns:
The tablet data (pressure etc).

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

virtual void GHOST_IWindow::getTitle ( STR_String title) const [pure virtual]

Returns the title displayed in the title bar.

Parameters:
titleThe title displayed in the title bar.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_GetTitle(), and Application::processEvent().

virtual GHOST_TUserDataPtr GHOST_IWindow::getUserData ( ) const [pure virtual]

Returns the window user data.

Returns:
The window user data.

Implemented in GHOST_Window.

Referenced by GHOST_GetWindowUserData().

virtual bool GHOST_IWindow::getValid ( ) const [pure virtual]
virtual void GHOST_IWindow::getWindowBounds ( GHOST_Rect bounds) const [pure virtual]

Returns the window rectangle dimensions. These are screen coordinates.

Parameters:
boundsThe bounding rectangle of the window.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_GetWindowBounds().

virtual GHOST_TSuccess GHOST_IWindow::invalidate ( ) [pure virtual]
virtual void GHOST_IWindow::screenToClient ( GHOST_TInt32  inX,
GHOST_TInt32  inY,
GHOST_TInt32 outX,
GHOST_TInt32 outY 
) const [pure virtual]

Converts a point in screen coordinates to client rectangle coordinates

Parameters:
inXThe x-coordinate on the screen.
inYThe y-coordinate on the screen.
outXThe x-coordinate in the client rectangle.
outYThe y-coordinate in the client rectangle.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_ScreenToClient(), and GPG_Application::handleCursorMove().

virtual void GHOST_IWindow::setAcceptDragOperation ( bool  canAccept) [pure virtual]

Tells if the ongoing drag'n'drop object can be accepted upon mouse drop

Implemented in GHOST_Window.

Referenced by GHOST_setAcceptDragOperation().

virtual GHOST_TSuccess GHOST_IWindow::setClientHeight ( GHOST_TUns32  height) [pure virtual]

Resizes client rectangle height.

Parameters:
heightThe new height of the client area of the window.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_SetClientHeight().

virtual GHOST_TSuccess GHOST_IWindow::setClientSize ( GHOST_TUns32  width,
GHOST_TUns32  height 
) [pure virtual]

Resizes client rectangle.

Parameters:
widthThe new width of the client area of the window.
heightThe new height of the client area of the window.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_SetClientSize(), and GPG_Application::startWindow().

virtual GHOST_TSuccess GHOST_IWindow::setClientWidth ( GHOST_TUns32  width) [pure virtual]

Resizes client rectangle width.

Parameters:
widthThe new width of the client area of the window.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_SetClientWidth().

virtual GHOST_TSuccess GHOST_IWindow::setCursorGrab ( GHOST_TGrabCursorMode  mode,
GHOST_Rect bounds 
) [inline, virtual]

Grabs the cursor for a modal operation.

Parameters:
grabThe new grab state of the cursor.
Returns:
Indication of success.

Reimplemented in GHOST_Window.

Definition at line 306 of file GHOST_IWindow.h.

References GHOST_kSuccess.

Referenced by GHOST_SetCursorGrab().

virtual GHOST_TSuccess GHOST_IWindow::setCursorShape ( GHOST_TStandardCursor  cursorShape) [pure virtual]

Set the shape of the cursor.

Parameters:
cursorThe new cursor shape type id.
Returns:
Indication of success.

Implemented in GHOST_Window.

Referenced by GHOST_SetCursorShape(), Application::processEvent(), and GPG_Canvas::SetMouseState().

virtual GHOST_TSuccess GHOST_IWindow::setCursorVisibility ( bool  visible) [pure virtual]

Shows or hides the cursor.

Parameters:
visibleThe new visibility state of the cursor.
Returns:
Indication of success.

Implemented in GHOST_Window.

Referenced by GHOST_SetCursorVisibility(), Application::processEvent(), GPG_Canvas::SetMouseState(), GPG_Application::startFullScreen(), and GPG_Application::startWindow().

virtual GHOST_TSuccess GHOST_IWindow::setCustomCursorShape ( GHOST_TUns8 bitmap,
GHOST_TUns8 mask,
int  sizex,
int  sizey,
int  hotX,
int  hotY,
int  fg_color,
int  bg_color 
) [pure virtual]

Implemented in GHOST_Window.

virtual GHOST_TSuccess GHOST_IWindow::setCustomCursorShape ( GHOST_TUns8  bitmap[16][2],
GHOST_TUns8  mask[16][2],
int  hotX,
int  hotY 
) [pure virtual]

Set the shape of the cursor to a custom cursor.

Parameters:
bitmapThe bitmap data for the cursor.
maskThe mask data for the cursor.
hotXThe X coordinate of the cursor hotspot.
hotYThe Y coordinate of the cursor hotspot.
Returns:
Indication of success.

Implemented in GHOST_Window.

Referenced by GHOST_SetCustomCursorShape(), and GHOST_SetCustomCursorShapeEx().

virtual GHOST_TSuccess GHOST_IWindow::setDrawingContextType ( GHOST_TDrawingContextType  type) [pure virtual]

Tries to install a rendering context in this window.

Parameters:
typeThe type of rendering context installed.
Returns:
Indication as to whether installation has succeeded.

Implemented in GHOST_Window.

Referenced by GHOST_SetDrawingContextType(), and GPG_Canvas::Init().

virtual GHOST_TSuccess GHOST_IWindow::setModifiedState ( bool  isUnsavedChanges) [pure virtual]

Sets the window "modified" status, indicating unsaved changes

Parameters:
isUnsavedChangesUnsaved changes or not
Returns:
Indication of success.

Implemented in GHOST_Window.

Referenced by GHOST_SetWindowModifiedState().

virtual GHOST_TSuccess GHOST_IWindow::setOrder ( GHOST_TWindowOrder  order) [pure virtual]

Sets the order of the window (bottom, top).

Parameters:
orderThe order of the window.
Returns:
Indication of success.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_SetWindowOrder().

virtual GHOST_TSuccess GHOST_IWindow::setProgressBar ( float  progress) [pure virtual]

Sets the progress bar value displayed in the window/application icon

Parameters:
progressThe progress %

Implemented in GHOST_Window, and GHOST_WindowWin32.

Referenced by GHOST_SetProgressBar().

virtual GHOST_TSuccess GHOST_IWindow::setState ( GHOST_TWindowState  state) [pure virtual]

Sets the state of the window (normal, minimized, maximized).

Parameters:
stateThe state of the window.
Returns:
Indication of success.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_SetWindowState(), and GPG_Application::startFullScreen().

virtual void GHOST_IWindow::setTitle ( const STR_String title) [pure virtual]

Sets the title displayed in the title bar.

Parameters:
titleThe title to display in the title bar.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_SetTitle(), and Application::processEvent().

virtual void GHOST_IWindow::setUserData ( const GHOST_TUserDataPtr  userData) [pure virtual]

Changes the window user data.

Parameters:
dataThe window user data.

Implemented in GHOST_Window.

Referenced by GHOST_SetWindowUserData().

virtual GHOST_TSuccess GHOST_IWindow::swapBuffers ( ) [pure virtual]

Swaps front and back buffers of a window.

Returns:
A boolean success indicator.

Implemented in GHOST_WindowCarbon, GHOST_WindowNULL, GHOST_WindowSDL, GHOST_WindowWin32, and GHOST_WindowX11.

Referenced by GHOST_SwapWindowBuffers(), Application::processEvent(), and GPG_Canvas::SwapBuffers().


The documentation for this class was generated from the following file: