why not add a createWindow's Event ? i do think we need!

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

koria
Just popping in
Just popping in
Posts: 17
Joined: Mon May 19, 2008 09:16

why not add a createWindow's Event ? i do think we need!

Postby koria » Fri Feb 27, 2009 06:45

code in src/CEGUIWindowManager.cpp

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Fri Feb 27, 2009 10:10

Hi,

This request is certainly something that's possible; it will have to be a 0.7 type of feature since it requires WindowManager to inherit from EventSet, other than that it's a trivial change.

Thanks for the suggestion, and I've added a mantis ticket for this.

CE.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests