Blender V2.61 - r43446
|
#include <GPG_Canvas.h>
Public Member Functions | |
GPG_Canvas (GHOST_IWindow *window) | |
virtual | ~GPG_Canvas (void) |
virtual void | Init (void) |
virtual void | SetMousePosition (int x, int y) |
virtual void | SetMouseState (RAS_MouseState mousestate) |
virtual void | SwapBuffers () |
probably needs some arguments for PS2 in future | |
virtual int | GetMouseX (int x) |
virtual int | GetMouseY (int y) |
virtual float | GetMouseNormalizedX (int x) |
virtual float | GetMouseNormalizedY (int y) |
bool | BeginDraw () |
void | EndDraw () |
Protected Attributes | |
GHOST_IWindow * | m_window |
Definition at line 44 of file GPG_Canvas.h.
GPG_Canvas::GPG_Canvas | ( | GHOST_IWindow * | window | ) |
Definition at line 37 of file GPG_Canvas.cpp.
References GHOST_IWindow::getClientBounds(), GHOST_Rect::getHeight(), GHOST_Rect::getWidth(), m_window, and GPC_Canvas::Resize().
GPG_Canvas::~GPG_Canvas | ( | void | ) | [virtual] |
Definition at line 49 of file GPG_Canvas.cpp.
bool GPG_Canvas::BeginDraw | ( | ) | [inline, virtual] |
Initializes the canvas for drawing. Drawing to the canvas is only allowed between BeginDraw() and EndDraw().
false | Acquiring the canvas failed. |
true | Acquiring the canvas succeeded. |
Implements RAS_ICanvas.
Definition at line 63 of file GPG_Canvas.h.
void GPG_Canvas::EndDraw | ( | ) | [inline, virtual] |
Unitializes the canvas for drawing.
Implements RAS_ICanvas.
Definition at line 64 of file GPG_Canvas.h.
float GPG_Canvas::GetMouseNormalizedX | ( | int | x | ) | [virtual] |
Implements RAS_ICanvas.
Definition at line 111 of file GPG_Canvas.cpp.
References GPC_Canvas::GetWidth().
float GPG_Canvas::GetMouseNormalizedY | ( | int | y | ) | [virtual] |
Implements RAS_ICanvas.
Definition at line 116 of file GPG_Canvas.cpp.
References GPC_Canvas::GetHeight().
virtual int GPG_Canvas::GetMouseX | ( | int | x | ) | [inline, virtual] |
Implements RAS_ICanvas.
Definition at line 58 of file GPG_Canvas.h.
virtual int GPG_Canvas::GetMouseY | ( | int | y | ) | [inline, virtual] |
Implements RAS_ICanvas.
Definition at line 59 of file GPG_Canvas.h.
void GPG_Canvas::Init | ( | void | ) | [virtual] |
Implements RAS_ICanvas.
Definition at line 54 of file GPG_Canvas.cpp.
References assert, GHOST_kDrawingContextTypeOpenGL, GHOST_kSuccess, m_window, and GHOST_IWindow::setDrawingContextType().
Referenced by GPG_Application::initEngine().
void GPG_Canvas::SetMousePosition | ( | int | x, |
int | y | ||
) | [virtual] |
Reimplemented from GPC_Canvas.
Definition at line 64 of file GPG_Canvas.cpp.
References GHOST_IWindow::clientToScreen(), GHOST_ISystem::getSystem(), m_window, and GHOST_ISystem::setCursorPosition().
void GPG_Canvas::SetMouseState | ( | RAS_MouseState | mousestate | ) | [virtual] |
Semantics are not yet honoured.
Reimplemented from GPC_Canvas.
Definition at line 79 of file GPG_Canvas.cpp.
References GHOST_kStandardCursorRightArrow, GHOST_kStandardCursorWait, RAS_ICanvas::m_mousestate, m_window, RAS_ICanvas::MOUSE_INVISIBLE, RAS_ICanvas::MOUSE_NORMAL, RAS_ICanvas::MOUSE_WAIT, GHOST_IWindow::setCursorShape(), and GHOST_IWindow::setCursorVisibility().
Referenced by GPG_Application::initEngine().
void GPG_Canvas::SwapBuffers | ( | ) | [virtual] |
probably needs some arguments for PS2 in future
Implements RAS_ICanvas.
Definition at line 103 of file GPG_Canvas.cpp.
References m_window, and GHOST_IWindow::swapBuffers().
GHOST_IWindow* GPG_Canvas::m_window [protected] |
GHOST window.
Definition at line 48 of file GPG_Canvas.h.
Referenced by GPG_Canvas(), Init(), SetMousePosition(), SetMouseState(), and SwapBuffers().