XB360Window Class Reference

#include <xb360Window.h>

Inheritance diagram for XB360Window:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 XB360Window ()
 ~XB360Window ()
virtual GFXDevicegetGFXDevice ()
 Return a pointer to the GFX device this window is bound to.
virtual GFXWindowTargetgetGFXTarget ()
 Return a pointer to this window's render target.
virtual void setMode (const GFXVideoMode &mode)
virtual const GFXVideoModegetCurrentMode ()
virtual bool clearFullscreen ()
 If we're fullscreen, this function returns us to desktop mode.
virtual bool setCaption (const char *cap)
 Set the window's caption.
virtual const char * getCaption ()
 Get the window's caption.
virtual bool setBounds (const RectI &newBounds)
 Resize the window to have some new bounds.
virtual bool setSize (const Point2I &newSize)
 Resize the window to have a new size (but be in the same position).
virtual bool setPosition (const Point2I)
 Set the position of this window.
virtual RectI getBounds ()
virtual bool isOpen ()
 Returns true if the window is instantiated in the OS.
virtual bool isVisible ()
 Returns true if the window is visible.
virtual bool isFocused ()
 Returns true if the window has input focus.
virtual void minimize ()
 Minimize the window on screen.
virtual void hide ()
 Hide the window on screen.
virtual void show ()
 Show the window on screen.
virtual void close ()
 Destroy the window on screen.
virtual void restore ()
 Restore the window from a Maximized or Minimized state.
virtual void setMouseLocked (bool enable)
 Lock the mouse to this window.
virtual bool isMouseLocked () const
 Is the mouse locked ?
virtual bool shouldLockMouse () const
 Should the mouse be locked at the next opportunity ?
virtual DeviceId getDeviceId ()
virtual PlatformWindowgetNextWindow () const
virtual void defaultRender ()
 Provide a simple GDI-based render for when the game is not rendering.

Private Attributes

Active window list
Items used to track window instances.

XB360WindowManagermOwningManager
 Which manager created us?
XB360WindowmNextWindow
 Which window comes next in list?
Window Information
GFXDevicemDevice
 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.
DeviceId mDeviceId
 An opaque ID used to resolve references to this window.

Friends

class XB360WindowManager
class GFX360Device
class GFXD3D9WindowTarget

Constructor & Destructor Documentation

XB360Window::XB360Window (  ) 

XB360Window::~XB360Window (  ) 


Member Function Documentation

virtual GFXDevice* XB360Window::getGFXDevice (  )  [virtual]

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

A GFX device may use many windows, but a window can only be used by a single GFX device.

Implements PlatformWindow.

virtual GFXWindowTarget* XB360Window::getGFXTarget (  )  [virtual]

Return a pointer to this window's render target.

By setting window targets from different windows, we can effect rendering to multiple windows from a single device.

Implements PlatformWindow.

virtual void XB360Window::setMode ( const GFXVideoMode mode  )  [virtual]

virtual const GFXVideoMode& XB360Window::getCurrentMode (  )  [virtual]

virtual bool XB360Window::clearFullscreen (  )  [virtual]

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

This will be either the last mode that we had that was not fullscreen, or the equivalent mode, windowed.

Implements PlatformWindow.

virtual bool XB360Window::setCaption ( const char *  cap  )  [inline, virtual]

Set the window's caption.

Implements PlatformWindow.

virtual const char* XB360Window::getCaption (  )  [inline, virtual]

Get the window's caption.

Implements PlatformWindow.

virtual bool XB360Window::setBounds ( const RectI newBounds  )  [virtual]

Resize the window to have some new bounds.

This includes the area needed for a title-bar, menu, borders, and other non-client elements.

Implements PlatformWindow.

virtual bool XB360Window::setSize ( const Point2I newSize  )  [virtual]

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

Implements PlatformWindow.

virtual bool XB360Window::setPosition ( const   Point2I  )  [virtual]

Set the position of this window.

This means that saying setPosition at 0,0 will put the position of the window title-bar (if one exists) at 0,0 and the Client area will be offset from that point by the space needed for the Non-Client area.

Implements PlatformWindow.

virtual RectI XB360Window::getBounds (  )  [virtual]

virtual bool XB360Window::isOpen (  )  [inline, virtual]

Returns true if the window is instantiated in the OS.

Implements PlatformWindow.

virtual bool XB360Window::isVisible (  )  [inline, virtual]

Returns true if the window is visible.

Implements PlatformWindow.

virtual bool XB360Window::isFocused (  )  [inline, virtual]

Returns true if the window has input focus.

Implements PlatformWindow.

virtual void XB360Window::minimize (  )  [inline, virtual]

Minimize the window on screen.

Implements PlatformWindow.

virtual void XB360Window::hide (  )  [inline, virtual]

Hide the window on screen.

Implements PlatformWindow.

virtual void XB360Window::show (  )  [inline, virtual]

Show the window on screen.

Implements PlatformWindow.

virtual void XB360Window::close (  )  [virtual]

Destroy the window on screen.

Implements PlatformWindow.

virtual void XB360Window::restore (  )  [inline, virtual]

Restore the window from a Maximized or Minimized state.

Implements PlatformWindow.

virtual void XB360Window::setMouseLocked ( bool  enable  )  [inline, virtual]

Lock the mouse to this window.

When this is set, the mouse will always be returned to the center of the client area after every mouse event. The mouse will also be hidden while it is locked.

The mouse cannot be moved out of the bounds of the window, but the window may lose focus (for instance by an alt-tab or other event). While the window lacks focus, no mouse events will be reported.

Implements PlatformWindow.

virtual bool XB360Window::isMouseLocked (  )  const [inline, virtual]

Is the mouse locked ?

Implements PlatformWindow.

virtual bool XB360Window::shouldLockMouse (  )  const [inline, virtual]

Should the mouse be locked at the next opportunity ?

This flag is set to the current state of the mouse lock on a window, to specify the preferred lock status of the mouse in a platform window.

This is important for situations where a call is made to setMouseLocked, and the window is not in a state that it can be cleanly locked. Take for example if it was called while the window is in the background, then it is not appropriate to lock the window, but rather the window should query this state at it's next opportunity and lock the mouse if requested.

Implements PlatformWindow.

virtual DeviceId XB360Window::getDeviceId (  )  [virtual]

virtual PlatformWindow* XB360Window::getNextWindow (  )  const [inline, virtual]

Implements PlatformWindow.

virtual void XB360Window::defaultRender (  )  [virtual]

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


Friends And Related Function Documentation

friend class XB360WindowManager [friend]

friend class GFX360Device [friend]

friend class GFXD3D9WindowTarget [friend]


Member Data Documentation

Which manager created us?

Which window comes next in list?

The GFX device that we're tied to.

Reference to the render target allocated on this window.

Our current size/resolution/fullscreen status.

DeviceId XB360Window::mDeviceId [private]

An opaque ID used to resolve references to this window.