why not add a createWindow's Event ? i do think we need!
Posted: Fri Feb 27, 2009 06:45
code in src/CEGUIWindowManager.cpp
when i use the CEGUI to design a GUI FrameWork. i found if add a createWindow Event to let the FrameWork know is very important.
i do think this should be add into the "createWindow" method.
CE, do you think about this ?????????
thanks
koria@163.com
Code: Select all
Window* WindowManager::createWindow(const String& type, const String& name)
{
String finalName(name.empty() ? generateUniqueWindowName() : name);
if (isWindowPresent(finalName))
{
throw AlreadyExistsException("WindowManager::createWindow - A Window object with the name '" + finalName +"' already exists within the system.");
}
WindowFactoryManager& wfMgr = WindowFactoryManager::getSingleton();
WindowFactory* factory = wfMgr.getFactory(type);
Window* newWindow = factory->createWindow(finalName);
Logger::getSingleton().logEvent("Window '" + finalName +"' of type '" + type + "' has been created.", Informative);
// see if we need to assign a look to this window
if (wfMgr.isFalagardMappedType(type))
{
const WindowFactoryManager::FalagardWindowMapping& fwm = wfMgr.getFalagardMappingForType(type);
// this was a mapped type, so assign a look to the window so it can finalise
// its initialisation
newWindow->d_falagardType = type;
newWindow->setWindowRenderer(fwm.d_rendererType);
newWindow->setLookNFeel(fwm.d_lookName);
}
d_windowRegistry[finalName] = newWindow;
return newWindow;
}
when i use the CEGUI to design a GUI FrameWork. i found if add a createWindow Event to let the FrameWork know is very important.
i do think this should be add into the "createWindow" method.
CE, do you think about this ?????????
thanks
koria@163.com