Crazy Eddie's GUI System  ${CEGUI_VERSION}
Win32CEGuiRendererSelector Class Reference

Class representing a modal renderer selection dialog under Win32. More...

+ Inheritance diagram for Win32CEGuiRendererSelector:
+ Collaboration diagram for Win32CEGuiRendererSelector:

Public Member Functions

 Win32CEGuiRendererSelector ()
 Constructor.
 
virtual ~Win32CEGuiRendererSelector ()
 Destructor.
 
virtual bool invokeDialog ()
 Displays a dialog allowing the user to select a renderer to be used. More...
 
- Public Member Functions inherited from CEGuiRendererSelector
 CEGuiRendererSelector ()
 Constructor.
 
virtual ~CEGuiRendererSelector ()
 Destructor.
 
CEGuiRendererType getSelectedRendererType ()
 Return the CEGuiRendererType value of the renderer most recently selected by the user. More...
 
void setRendererAvailability (CEGuiRendererType rendererType, bool available=true)
 Set whether or not a specific renderer type will be available for selection from the dialog the next time it is displayed. More...
 

Protected Member Functions

bool addComboboxOption (HWND combo, const char *name, CEGuiRendererType rendererType)
 Helper method to add entries for renderers to the Combobox and pre-select the first item entered.
 

Static Protected Member Functions

static LPDLGTEMPLATE createDialogTemplate ()
 Create a Win32 dialog template for the requester.
 
static INT_PTR CALLBACK dialogProcedure (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 Win32 dialog procedure function.
 
static LPBYTE alignPointer (LPBYTE buff)
 Take an input pointer, return closest pointer that is aligned on a DWORD (4 byte) boundary. More...
 
static int copyAnsiToWideChar (LPBYTE outBuff, LPCTSTR ansiString)
 Converts the Ansi string in 'pAnsiIn' into wide characters and copies the result into the WORD array at 'pWCStr'. More...
 

Protected Attributes

LPDLGTEMPLATE d_template
 
- Protected Attributes inherited from CEGuiRendererSelector
CEGuiRendererType d_lastSelected
 Holds the last selected renderer type.
 
bool d_rendererAvailability [RendererTypeCount]
 Holds availability of renderer types.
 

Detailed Description

Class representing a modal renderer selection dialog under Win32.

Member Function Documentation

LPBYTE Win32CEGuiRendererSelector::alignPointer ( LPBYTE  buff)
staticprotected

Take an input pointer, return closest pointer that is aligned on a DWORD (4 byte) boundary.

Note
This is taken from the DynDlg sample in the Win32 Platform SDK.

Referenced by createDialogTemplate().

int Win32CEGuiRendererSelector::copyAnsiToWideChar ( LPBYTE  outBuff,
LPCTSTR  ansiString 
)
staticprotected

Converts the Ansi string in 'pAnsiIn' into wide characters and copies the result into the WORD array at 'pWCStr'.

Note
This is taken from the DynDlg sample in the Win32 Platform SDK.
Parameters
outBuffPointer to the destination buffer.
pAnsiInInput ANSI string.
Returns
The number of wide characters copied, including the trailing wide char NULL.

Referenced by createDialogTemplate().

bool Win32CEGuiRendererSelector::invokeDialog ( )
virtual

Displays a dialog allowing the user to select a renderer to be used.

Returns
false if the user cancelled.

Implements CEGuiRendererSelector.

References CEGuiRendererSelector::d_lastSelected, CEGuiRendererSelector::d_rendererAvailability, and dialogProcedure().