Torque3D Documentation / _generateds / PlatformWindowSDL

PlatformWindowSDL

Engine/source/windowManager/sdl/sdlWindow.h

Implementation of a window on SDL.

More...

Active window list

Items used to track window instances.

Which manager created us?

Which window comes next in list?

Window Information

SDL_Window *

Our SDL window.

SDL_Window *

Our former Parent.

The GFX device that we're tied to.

Reference to the render target allocated on this window.

Our current size/resolution/fullscreen status.

Our position on the desktop.

bool

Is the mouse locked to this window?

bool

Determines whether this window should lock the mouse when it has an opportunity.

bool

When set, we don't trigger device resets due to sizing events.

void *

Menu associated with this window. This is a passive property of the window and is not required to be used at all.

bool

Indicates if the window is being closed. This allows us to safely ignore other events like focus being gained or losed after cleanup has begun.

Public Friends

Private Functions

_processSDLEvent(SDL_Event & evt)
_triggerKeyNotify(const SDL_Event & event)
_triggerMouseWheelNotify(const SDL_Event & event)
_triggerTextNotify(const SDL_Event & event)
_updateMonitorFromMove(const SDL_Event & event)

Public Functions

_setFullscreen(const bool fullscreen)
bool

If we're fullscreen, this function returns us to desktop mode.

Convert the coordinate given in this window space to screen coordinates.

Destroy the window on screen.

Provide a simple GDI-based render for when the game is not rendering.

Get the position and size (fullscreen windows are always at (0,0)).

const char *

Get the window's caption.

Get the Client Area Extent (Resolution) of this window.

Return a pointer to the GFX device this window is bound to.

Return a pointer to this window's render target.

void *

Return the platform specific object needed to create or attach an accelerated graohics drawing context on or to the window.

Get the position of this window.

SDL_Window *

Get our current video mode - if the window has been resized, it will reflect this.

Get the ID that uniquely identifies this window in the context of its window manager.

hide()

Hide the window on screen.

bool

Returns true if the window has input focus.

bool
bool

Returns true if the window is maximized.

bool

Returns true if the window is minimized.

bool

Is the mouse locked ?

bool

Returns true if the window is instantiated in the OS.

bool

Returns true if the window is visible.

Maximize the window on screen.

Minimize the window on screen.

Restore the window from a Maximized or Minimized state.

Convert the given screen coordinates to coordinates in this window space.

setBounds(const RectI & newBounds)

The bounds of a Window are defined as the entire area occupied by that Window.

bool
setCaption(const char * cap)

Set the window's caption.

The Client Rectangle or "Render Area" of a window is the area that is occupied by a given client that is rendering to that window.

Set Focused State (Foreground)

Set if relevant keypress events should be translated into character input events.

setMenuHandle(void * menuHandle)
setMouseLocked(bool enable)

Lock the mouse to this window.

setPosition(const Point2I newPosition)

The Position of a window is always in relation to the very upper left of the window.

bool
setSize(const Point2I & newSize)

Resize the window to have a new size (but be in the same position).

bool

Should the mouse be locked at the next opportunity ?

show()

Show the window on screen.

Public Static Functions

Return the class name for the curtain window class.

Return the class name for the windows we create with this class.

Detailed Description

Implementation of a window on SDL.

Active window list

Items used to track window instances.

PlatformWindowManagerSDL * mOwningManager 

Which manager created us?

PlatformWindowSDL * mNextWindow 

Which window comes next in list?

Window Information

SDL_Window * mWindowHandle 

Our SDL window.

SDL_Window * mOldParent 

Our former Parent.

GFXDevice * mDevice 

The GFX device that we're tied to.

GFXWindowTargetRef mTarget 

Reference to the render target allocated on this window.

GFXVideoMode mVideoMode 

Our current size/resolution/fullscreen status.

Point2I mPosition 

Our position on the desktop.

bool mMouseLocked 

Is the mouse locked to this window?

bool mShouldLockMouse 

Determines whether this window should lock the mouse when it has an opportunity.

bool mSuppressReset 

When set, we don't trigger device resets due to sizing events.

void * mMenuHandle 

Menu associated with this window. This is a passive property of the window and is not required to be used at all.

bool mClosing 

Indicates if the window is being closed. This allows us to safely ignore other events like focus being gained or losed after cleanup has begun.

Public Friends

Private Functions

_processSDLEvent(SDL_Event & evt)

_triggerKeyNotify(const SDL_Event & event)

_triggerMouseButtonNotify(const SDL_Event & event)

_triggerMouseLocationNotify(const SDL_Event & evt)

_triggerMouseWheelNotify(const SDL_Event & event)

_triggerTextNotify(const SDL_Event & event)

_updateMonitorFromMove(const SDL_Event & event)

Public Functions

PlatformWindowSDL()

~PlatformWindowSDL()

_setFullscreen(const bool fullscreen)

Reimplemented from: PlatformWindow

_setVideoMode(const GFXVideoMode & mode)

Reimplemented from: PlatformWindow

centerWindow()

Reimplemented from: PlatformWindow

clearFullscreen()

Reimplemented from: PlatformWindow

clientToScreen(const Point2I & point)

Reimplemented from: PlatformWindow

close()

Reimplemented from: PlatformWindow

defaultRender()

Provide a simple GDI-based render for when the game is not rendering.

getBounds()

Reimplemented from: PlatformWindow

getCaption()

Reimplemented from: PlatformWindow

getClientExtent()

Reimplemented from: PlatformWindow

getGFXDevice()

Reimplemented from: PlatformWindow

getGFXTarget()

Reimplemented from: PlatformWindow

getMenuHandle()

getNextWindow()

Reimplemented from: PlatformWindow

getPlatformDrawable()

Reimplemented from: PlatformWindow

getPosition()

Reimplemented from: PlatformWindow

getSDLWindow()

getSystemWindow(const WindowSystem system)

Reimplemented from: PlatformWindow

getVideoMode()

Reimplemented from: PlatformWindow

getWindowId()

Reimplemented from: PlatformWindow

hide()

Reimplemented from: PlatformWindow

isFocused()

Reimplemented from: PlatformWindow

isFullscreen()

Reimplemented from: PlatformWindow

isMaximized()

Reimplemented from: PlatformWindow

isMinimized()

Reimplemented from: PlatformWindow

isMouseLocked()

Reimplemented from: PlatformWindow

isOpen()

Reimplemented from: PlatformWindow

isVisible()

Reimplemented from: PlatformWindow

maximize()

Reimplemented from: PlatformWindow

minimize()

Reimplemented from: PlatformWindow

restore()

Reimplemented from: PlatformWindow

screenToClient(const Point2I & point)

Reimplemented from: PlatformWindow

setBounds(const RectI & newBounds)

Reimplemented from: PlatformWindow

setCaption(const char * cap)

Reimplemented from: PlatformWindow

setClientExtent(const Point2I newExtent)

Reimplemented from: PlatformWindow

setFocus()

Reimplemented from: PlatformWindow

setKeyboardTranslation(const bool enabled)

Reimplemented from: PlatformWindow

setMenuHandle(void * menuHandle)

setMouseLocked(bool enable)

Reimplemented from: PlatformWindow

setPosition(const Point2I newPosition)

Reimplemented from: PlatformWindow

setSize(const Point2I & newSize)

Reimplemented from: PlatformWindow

shouldLockMouse()

Reimplemented from: PlatformWindow

show()

Reimplemented from: PlatformWindow

Public Static Functions

getCurtainWindowClassName()

Return the class name for the curtain window class.

getWindowClassName()

Return the class name for the windows we create with this class.