Crazy Eddie's GUI System  ${CEGUI_VERSION}
Win32CEGuiRendererSelector.h
1 /***********************************************************************
2  created: 24/9/2004
3  author: Paul D Turner
4 *************************************************************************/
5 /***************************************************************************
6  * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining
9  * a copy of this software and associated documentation files (the
10  * "Software"), to deal in the Software without restriction, including
11  * without limitation the rights to use, copy, modify, merge, publish,
12  * distribute, sublicense, and/or sell copies of the Software, and to
13  * permit persons to whom the Software is furnished to do so, subject to
14  * the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be
17  * included in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  ***************************************************************************/
27 #ifndef _Win32CEGuiRendererSelector_h_
28 #define _Win32CEGuiRendererSelector_h_
29 
30 #if defined( __WIN32__ ) || defined( _WIN32 )
31 # define WIN32_LEAN_AND_MEAN
32 # include "windows.h"
33 #endif
34 
35 #include "CEGuiRendererSelector.h"
36 
37 
43 {
44 public:
50 
51 
57 
58 
66  virtual bool invokeDialog();
67 
68 
69 protected:
75  bool addComboboxOption(HWND combo, const char* name, CEGuiRendererType rendererType);
76 
77  /*************************************************************************
78  Static methods
79  *************************************************************************/
84  static LPDLGTEMPLATE createDialogTemplate();
85 
86 
91  static INT_PTR CALLBACK dialogProcedure(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
92 
93 
101  static LPBYTE alignPointer(LPBYTE buff);
102 
103 
121  static int copyAnsiToWideChar(LPBYTE outBuff, LPCTSTR ansiString);
122 
123 
124  /*************************************************************************
125  Data fields
126  *************************************************************************/
127  LPDLGTEMPLATE d_template;
128 };
129 
130 #endif // end of guard _Win32CEGuiRendererSelector_h_
Base class for the renderer selection dialog class.
Definition: CEGuiRendererSelector.h:57
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...
Definition: Win32CEGuiRendererSelector.cpp:344
static int copyAnsiToWideChar(LPBYTE outBuff, LPCTSTR ansiString)
Converts the Ansi string in 'pAnsiIn' into wide characters and copies the result into the WORD array ...
Definition: Win32CEGuiRendererSelector.cpp:462
virtual ~Win32CEGuiRendererSelector()
Destructor.
Definition: Win32CEGuiRendererSelector.cpp:42
static LPDLGTEMPLATE createDialogTemplate()
Create a Win32 dialog template for the requester.
Definition: Win32CEGuiRendererSelector.cpp:90
Win32CEGuiRendererSelector()
Constructor.
Definition: Win32CEGuiRendererSelector.cpp:34
Class representing a modal renderer selection dialog under Win32.
Definition: Win32CEGuiRendererSelector.h:42
static INT_PTR CALLBACK dialogProcedure(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Win32 dialog procedure function.
Definition: Win32CEGuiRendererSelector.cpp:365
virtual bool invokeDialog()
Displays a dialog allowing the user to select a renderer to be used.
Definition: Win32CEGuiRendererSelector.cpp:54
static LPBYTE alignPointer(LPBYTE buff)
Take an input pointer, return closest pointer that is aligned on a DWORD (4 byte) boundary...
Definition: Win32CEGuiRendererSelector.cpp:448