Torque3D Documentation / _generateds / PlatformWindowManagerSDL

PlatformWindowManagerSDL

Engine/source/windowManager/sdl/sdlWindowMgr.h

SDL2 implementation of the window manager interface.

More...

Public Types

enum
KeyboardInputState {
  NONE = 0
  TEXT_INPUT = 1
  RAW_INPUT = 2
}

An enum that holds an event loop frame of the state of the keyboard for how the keyboard is interpreted inside of Torque.

Public Friends

Protected Attributes

SDL_Window *

If a curtain window is present, then will be stored here.

bool

This is set as part of the canvas being shown, and flags that the windows should render as normal from now on.

The input state that will change whenever SDL needs notified.

bool

set via command line -offscreen option, controls whether rendering/input

SDL_Window *

Parent window, used in window setup in web plugin scenarios.

List of allocated windows.

Protected Functions

Callback for the process list.

_processCmdLineArgs(const S32 argc, const char ** argv)

Process command line arguments from StandardMainLoop.

Link the specified window into the window list.

Remove specified window from the window list.

Public Functions

Create a new window, appropriate for the specified device and mode.

Retrieve the currently set desktop bit depth.

Retrieve the currently set desktop resolution.

Get the first window in the window list.

Get the window that currently has the input focus or NULL.

getMonitorMode(U32 monitorIndex, U32 modeIndex)
getMonitorModeCount(U32 monitorIndex)
const char *

Populate a vector with all monitors and their extents in window space.

void *

Get the parent window.

Return the extents in window coordinates of the primary desktop area.

Get a window from a device ID.

Populate a list with references to all the windows created from this manager.

This method cues the appearance of that window ("lowering the curtain").

setDisplayWindow(bool set)

This method indicates to created windows to show as normal.

setParentWindow(void * newParent)

Set the parent window.

Stores the input state so that the event loop will fire a check if we need to change how keyboard input is being handled.

Detailed Description

SDL2 implementation of the window manager interface.

Public Types

KeyboardInputState

Enumerator

NONE = 0
TEXT_INPUT = 1

< No state change during this event loop cycle.

RAW_INPUT = 2

< We want to change to text based events & raw input.

An enum that holds an event loop frame of the state of the keyboard for how the keyboard is interpreted inside of Torque.

SDL has a concept of text editing events as well as raw input events. Because of this, SDL needs notified whenever it needs to fire text based events. SDL will continue firing raw input events as well during this time.

The reason why this was created is because we needed time to transition between raw input to raw input + text based events. If we take a raw input and notify SDL we wanted text during the event loop, SDL will issue a text input event as well. This was causing issues with the console, where the console key would be appended to the console buffer upon opening it. We fix this by delaying the notification to SDL until the event loop is complete.

Public Friends

Protected Attributes

SDL_Window * mCurtainWindow 

If a curtain window is present, then will be stored here.

bool mDisplayWindow 

This is set as part of the canvas being shown, and flags that the windows should render as normal from now on.

KeyboardInputState mInputState 

The input state that will change whenever SDL needs notified.

After it is handled, it will return to state NONE.

bool mOffscreenRender 

set via command line -offscreen option, controls whether rendering/input

SignalSlot< void()> mOnProcessSignalSlot 
SDL_Window * mParentWindow 

Parent window, used in window setup in web plugin scenarios.

PlatformWindowSDL * mWindowListHead 

List of allocated windows.

Map< U32, PlatformWindowSDL * > mWindowMap 

Protected Functions

_process()

Callback for the process list.

_processCmdLineArgs(const S32 argc, const char ** argv)

Reimplemented from: PlatformWindowManager

linkWindow(PlatformWindowSDL * w)

Link the specified window into the window list.

unlinkWindow(PlatformWindowSDL * w)

Remove specified window from the window list.

Public Functions

PlatformWindowManagerSDL()

~PlatformWindowManagerSDL()

createWindow(GFXDevice * device, const GFXVideoMode & mode)

Reimplemented from: PlatformWindowManager

findFirstMatchingMonitor(const char * name)

Reimplemented from: PlatformWindowManager

getDesktopBitDepth()

Reimplemented from: PlatformWindowManager

getDesktopResolution()

Reimplemented from: PlatformWindowManager

getFirstWindow()

Reimplemented from: PlatformWindowManager

getFocusedWindow()

Reimplemented from: PlatformWindowManager

getMonitorCount()

Reimplemented from: PlatformWindowManager

getMonitorDesktopMode(U32 monitorIndex)

Reimplemented from: PlatformWindowManager

getMonitorMode(U32 monitorIndex, U32 modeIndex)

Reimplemented from: PlatformWindowManager

getMonitorModeCount(U32 monitorIndex)

Reimplemented from: PlatformWindowManager

getMonitorName(U32 index)

Reimplemented from: PlatformWindowManager

getMonitorRect(U32 index)

Reimplemented from: PlatformWindowManager

getMonitorRegions(Vector< RectI > & regions)

Reimplemented from: PlatformWindowManager

getMonitorUsableRect(U32 index)

Reimplemented from: PlatformWindowManager

getParentWindow()

Reimplemented from: PlatformWindowManager

getPrimaryDesktopArea()

Reimplemented from: PlatformWindowManager

getWindowById(WindowId id)

Reimplemented from: PlatformWindowManager

getWindows(VectorPtr< PlatformWindow * > & windows)

Reimplemented from: PlatformWindowManager

lowerCurtain()

Reimplemented from: PlatformWindowManager

raiseCurtain()

Reimplemented from: PlatformWindowManager

setDisplayWindow(bool set)

Reimplemented from: PlatformWindowManager

setParentWindow(void * newParent)

Reimplemented from: PlatformWindowManager

updateSDLTextInputState(KeyboardInputState state)

Stores the input state so that the event loop will fire a check if we need to change how keyboard input is being handled.

Parameters:

state

The state of the keyboard input, either being raw input or text based input.