Public Types | Public Member Functions | Public Attributes

xl7::directx::Window Class Reference

#include <Window.h>

Inheritance diagram for xl7::directx::Window:
xl7::directx::Component< Window > xl7::errorcodes::ErrorCodeAssembly< Window > cl7::designpatterns::Singleton< Window >

List of all members.

Public Types

typedef void(* QUIT_CALLBACK )(void *user_data)

Public Member Functions

 Window (void)
 ~Window (void)
HWND GetHandle () const
int GetWidth () const
int GetHeight () const
ml7::Vector2 GetSize () const
float GetAspect () const
const cl7::string_typeGetTitle () const
HICON GetIconHandle () const
bool IsActive () const
QUIT_CALLBACK GetQuitCallback () const
void * GetQuitData () const
void SetQuitCallback (QUIT_CALLBACK quit_callback)
void SetQuitCallback (QUIT_CALLBACK quit_callback, void *user_data)
void SetQuitData (void *user_data)
bool ShowWindow ()
bool HideWindow ()
errorcodes::ErrorCode Close ()

Public Attributes

errorcodes::ErrorCode window_class_error
errorcodes::ErrorCode create_window_error
errorcodes::ErrorCode init_window_error
errorcodes::ErrorCode init_window_success
errorcodes::ErrorCode shutdown_window_error
errorcodes::ErrorCode shutdown_window_success

Detailed Description

The DirectX window.


Member Typedef Documentation

typedef void(* xl7::directx::Window::QUIT_CALLBACK)(void *user_data)

Constructor & Destructor Documentation

xl7::directx::Window::Window ( void   ) 

Default constructor.

xl7::directx::Window::~Window ( void   ) 

Destructor.


Member Function Documentation

errorcodes::ErrorCode xl7::directx::Window::Close (  ) 

Closes the window (and destroys it).

float xl7::directx::Window::GetAspect (  )  const [inline]

Returns the aspect ratio (pixel width / pixel height).

HWND xl7::directx::Window::GetHandle (  )  const [inline]

Returns the handle of the window.

int xl7::directx::Window::GetHeight (  )  const [inline]

Returns the window height in pixels.

HICON xl7::directx::Window::GetIconHandle (  )  const [inline]

Returns the handle of the icon (or NULL).

QUIT_CALLBACK xl7::directx::Window::GetQuitCallback (  )  const [inline]

Returns the quit callback function that will be called when the window gets closed (and thus destroyed).

void* xl7::directx::Window::GetQuitData (  )  const [inline]

Returns the object that will be passed to the quit callback function.

ml7::Vector2 xl7::directx::Window::GetSize (  )  const [inline]

Returns the window size in pixels.

const cl7::string_type& xl7::directx::Window::GetTitle (  )  const [inline]

Returns the title of the window.

int xl7::directx::Window::GetWidth (  )  const [inline]

Returns the window width in pixels.

bool xl7::directx::Window::HideWindow (  ) 

Hides the window (makes the window unvisible). The function returns true, if the window was visible before.

bool xl7::directx::Window::IsActive (  )  const [inline]

Returns the flag specifying whether the window is currently active.

void xl7::directx::Window::SetQuitCallback ( QUIT_CALLBACK  quit_callback  )  [inline]

Sets the quit callback function that will be called when the window gets closed (and thus destroyed).

void xl7::directx::Window::SetQuitCallback ( QUIT_CALLBACK  quit_callback,
void *  user_data 
) [inline]

Sets the quit callback function that will be called when the window gets closed (and thus destroyed) as well as the object that will be passed to the quit callback function.

void xl7::directx::Window::SetQuitData ( void *  user_data  )  [inline]

Sets the object that will be passed to the quit callback function.

bool xl7::directx::Window::ShowWindow (  ) 

Shows the window (makes the window visible). The function returns true, if the window was visible before.


Member Data Documentation

CreateWindow failed and returned NULL.

RegisterClassEx (or UnregisterClass) failed and returned FALSE.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines