Help building on Linux

Calder

20-03-2009 21:49:47

I wanted to try QuikGUI, because CEGUI is altogether too clunky and cumbersome for my tastes, so I downloaded the source. After finding that there was no configuration file or Makefile, (I run Ubuntu 8.10), I created a Code::Blocks project and added all the files and headers. When I try to build the project, however, I get the following error:
./include/QuickGUIWidget.h line 119
error: ‘Factory’ is not a template


If anyone knows how to fix this, or has had success building on Linux in the past, thanks in advance for the help.

-Calder

EDIT: After following the advice here: viewtopic.php?f=13&t=9403#p54675 , I now have a new set of errors:
./include/QuickGUIFactory.h 30
error: expected primary-expression before ‘>’ token

./include/QuickGUIFactory.h 30
error: expected primary-expression before ‘;’ token

kungfoomasta

21-03-2009 00:28:30

Sorry for the problems getting setup. I don't have access to the code right now, what is at line 30 in Factory.h? This weekend I'll investigate this problem people are seeing related to the including of Factory.h, hopefully its something obvious I missed.

Calder

21-03-2009 05:08:46

Line 30, as requested:
m_object_creator[className] = &Factory::createObject<ClassType>;


...and the whole file just in case it helps:
#ifndef QUICKGUIFACTORY_H
#define QUICKGUIFACTORY_H

#include "QuickGUIException.h"
#include "QuickGUIExportDLL.h"

#include "OgrePrerequisites.h"
#include "OgreStringConverter.h"

#include <ctype.h>

namespace QuickGUI
{
template<typename BaseClassType>
class _QuickGUIExport Factory
{
public:
// Only FactoryManager can create/destroy Factories
friend class FactoryManager;
protected:
typedef BaseClassType* (Factory::*createObjectFunc)(const Ogre::String&);

public:
template<typename ClassType>
bool registerClass(const Ogre::String& className)
{
if (m_object_creator.find(className) != m_object_creator.end())
return false;

m_object_creator[className] = &Factory::createObject<ClassType>;

return true;
}

bool unregisterClass(const Ogre::String& className)
{
return (m_object_creator.erase(className) == 1);
}

template<typename ClassType>
ClassType* createInstance(const Ogre::String& className, const Ogre::String& name)
{
typename std::map<Ogre::String, createObjectFunc>::iterator iter = m_object_creator.find(className);

if (iter == m_object_creator.end())
throw Exception(Exception::ERR_FACTORY,"\"" + className + "\" is not a registered class!","Factory::createInstance");

Ogre::String instanceName = resolveName(name);

if((name != "") && (instanceName != name))
{
Ogre::Log* defaultLog = Ogre::LogManager::getSingletonPtr()->getDefaultLog();
if(defaultLog != NULL)
defaultLog->logMessage("[QGUI] Factory::createInstance: Provided name \"" + name + "\" was taken. Instance was created with name \"" + instanceName + "\".");
}

BaseClassType* newInstance = (this->*(*iter).second)(instanceName);
mInstances[instanceName] = newInstance;

if(name == "")
++mNumAutoNamedInstances;

return dynamic_cast<ClassType*>(newInstance);
}

template<typename ClassType>
ClassType* createInstance(const Ogre::String& className)
{
return createInstance<ClassType>(className,"");
}

bool destroyInstance(const Ogre::String& instanceName)
{
if(mInDestructor)
return false;

if(!instanceExists(instanceName))
throw Exception(Exception::ERR_FACTORY,"Instance with name \"" + instanceName + "\" does not exist!","Factory::getInstance");

OGRE_DELETE_T(mInstances[instanceName],BaseClassType,Ogre::MEMCATEGORY_GENERAL);
mInstances.erase(instanceName);

return true;
}

bool destroyInstance(BaseClassType* instance)
{
if(mInDestructor)
return false;

for(typename std::map<Ogre::String, BaseClassType*>::iterator it = mInstances.begin(); it != mInstances.end(); ++it)
{
if((*it).second == instance)
{
mFreeList.insert(instance);
mInstances.erase(it);

return true;
}
}

return false;
}

template<typename ClassType>
ClassType* getInstance(const Ogre::String& instanceName)
{
if(!instanceExists(instanceName))
throw Exception(Exception::ERR_FACTORY,"Instance with name \"" + instanceName + "\" does not exist!","Factory::getInstance");

return dynamic_cast<ClassType*>(mInstances[instanceName]);
}

bool instanceExists(const Ogre::String& instanceName)
{
return (mInstances.find(instanceName) != mInstances.end());
}

Ogre::String resolveName(const Ogre::String& name)
{
if(name != "")
{
if(instanceExists(name))
{
int strLen = static_cast<int>(name.size());

int counter = strLen - 1;
while(isdigit(name[counter]))
--counter;

if(counter == (strLen - 1))
return (name + Ogre::StringConverter::toString(1));
else
{
int n = atoi(name.substr(counter + 1).c_str());

return (name.substr(0,counter) + Ogre::StringConverter::toString(n));
}
}
else
return name;
}

return "FactoryAutoNamedObject" + Ogre::StringConverter::toString(mNumAutoNamedInstances);
}

/**
* Updates factory, most useful for cleaning up objects
* queued for deletion.
*/
void update()
{
for(typename std::set<BaseClassType*>::iterator it = mFreeList.begin(); it != mFreeList.end(); ++it)
OGRE_DELETE_T((*it),BaseClassType,Ogre::MEMCATEGORY_GENERAL);
mFreeList.clear();
}

Ogre::String updateName(BaseClassType* instance, const Ogre::String& name)
{
typename std::map<Ogre::String, BaseClassType*>::iterator it;
for(it = mInstances.begin(); it != mInstances.end(); ++it)
{
if((*it).second == instance)
break;
}

if(it == mInstances.end())
throw Exception(Exception::ERR_FACTORY,"Object is not an object created by this factory!","Factory::updateName");

mInstances.erase(it);

Ogre::String newInstanceName = resolveName(name);

if((name != "") && (newInstanceName != name))
{
Ogre::Log* defaultLog = Ogre::LogManager::getSingletonPtr()->getDefaultLog();
if(defaultLog != NULL)
defaultLog->logMessage("[QGUI] Factory::createInstance: Provided name \"" + name + "\" was taken. Instance was created with name \"" + newInstanceName + "\".");
}

mInstances[newInstanceName] = instance;

if(name == "")
++mNumAutoNamedInstances;

return newInstanceName;
}

protected:
Factory() : mNumAutoNamedInstances(0), mInDestructor(false) {}
virtual ~Factory()
{
mInDestructor = true;

update();

for(typename std::map<Ogre::String, BaseClassType*>::iterator it = mInstances.begin(); it != mInstances.end(); ++it)
OGRE_DELETE_T((*it).second,BaseClassType,Ogre::MEMCATEGORY_GENERAL);
}

std::map<Ogre::String, createObjectFunc> m_object_creator;
std::map<Ogre::String, BaseClassType*> mInstances;
std::set<BaseClassType*> mFreeList;

unsigned int mNumAutoNamedInstances;

// This flag is used to protect Objects from Deleting Factory Objects while the Factory is destroying all Objects
// in its destructor.
bool mInDestructor;

template<typename ClassType>
BaseClassType* createObject(const Ogre::String& param1)
{
return OGRE_NEW_T(ClassType,Ogre::MEMCATEGORY_GENERAL)(param1);
}
};
}

#endif

kungfoomasta

21-03-2009 21:02:21

I've redone a lot of the Factory usage. Can you try to compile this?

http://stormsonggames.com/downloads/QuickGUI_9_03b.zip

I've added #include "QuickGUI.h" to every header file in the Editor project and there were no problems for me.

Calder

21-03-2009 21:16:22

Oh w00t, new code! Thanks kungfoomasta! Downloading right now...

Calder

21-03-2009 21:24:29

Alright, it actually built a few files correctly this time before encountering an error! Progress! ;-)

Here's the error:
./include/QuickGUIDescManager.h line 75
error: no matching function for call to ‘QuickGUI::DescFactory::createInstance(const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)’


And here's line 75:
Desc* d = FactoryManager::getSingleton().getDescFactory()->createInstance(className);

And here's the entire file in case you're still separated from your code:
#ifndef QUICKGUIDESCMANAGER_H
#define QUICKGUIDESCMANAGER_H

#include "QuickGUIExportDLL.h"
#include "QuickGUIFactoryManager.h"
#include "QuickGUIDescFactory.h"

#include "OgreSingleton.h"
#include "OgrePrerequisites.h"

#include <map>

namespace QuickGUI
{
// forward declarations
class Desc;
class ButtonDesc;
class CheckBoxDesc;
class ColorPickerDesc;
class ComboBoxDesc;
class ConsoleDesc;
class ContextMenuDesc;
class HScrollBarDesc;
class ImageDesc;
class LabelDesc;
class ListDesc;
class ListImageItemDesc;
class ListTextItemDesc;
class MenuDesc;
class MenuTextItemDesc;
class MenuPanelDesc;
class ModalWindowDesc;
class PanelDesc;
class ProgressBarDesc;
class PropertyGridDesc;
class PropertyGridSectionDesc;
class PropertyGridTextPropertyDesc;
class PropertyGridBoolPropertyDesc;
class PropertyGridComboBoxPropertyDesc;
class RadioButtonDesc;
class SheetDesc;
class TabControlDesc;
class TabDesc;
class TabPageDesc;
class TextAreaDesc;
class TextBoxDesc;
class TitleBarDesc;
class ToolBarDesc;
class TreeViewDesc;
class TreeViewNodeDesc;
class TreeViewCheckBoxNodeDesc;
class TreeViewRadioButtonNodeDesc;
class VScrollBarDesc;
class WindowDesc;

/*
* This manager manages user-defined Event Handlers.
*/
class _QuickGUIExport DescManager :
public Ogre::Singleton<DescManager>,
public Ogre::GeneralAllocatedObject
{
public:
friend class Root;
public:
static DescManager& getSingleton(void);
static DescManager* getSingletonPtr(void);

template<class T>
T* createDesc(const Ogre::String& className, const Ogre::String& id)
{
if(mUserCreatedDescs.find(id) != mUserCreatedDescs.end())
throw Exception(Exception::ERR_FACTORY,"Cannot create Desc with id \"" + id + "\", it already exists!","DescManager::createDesc");

Desc* d = FactoryManager::getSingleton().getDescFactory()->createInstance(className);

mUserCreatedDescs[id] = d;

return dynamic_cast<T*>(d);
}

void destroyDesc(Desc* d);

template<class T>
T* getDesc(const Ogre::String id)
{
if(mUserCreatedDescs.find(id) == mUserCreatedDescs.end())
throw Exception(Exception::ERR_FACTORY,"Cannot get Desc with id \"" + id + "\", it does not exist!","DescManager::getDesc");

return dynamic_cast<T*>(mUserCreatedDescs[id]);
}

ButtonDesc* getDefaultButtonDesc();
CheckBoxDesc* getDefaultCheckBoxDesc();
ColorPickerDesc* getDefaultColorPickerDesc();
ComboBoxDesc* getDefaultComboBoxDesc();
ConsoleDesc* getDefaultConsoleDesc();
ContextMenuDesc* getDefaultContextMenuDesc();
HScrollBarDesc* getDefaultHScrollBarDesc();
ImageDesc* getDefaultImageDesc();
LabelDesc* getDefaultLabelDesc();
ListDesc* getDefaultListDesc();
ListImageItemDesc* getDefaultListImageItemDesc();
ListTextItemDesc* getDefaultListTextItemDesc();
MenuDesc* getDefaultMenuDesc();
MenuTextItemDesc* getDefaultMenuTextItemDesc();
MenuPanelDesc* getDefaultMenuPanelDesc();
ModalWindowDesc* getDefaultModalWindowDesc();
PanelDesc* getDefaultPanelDesc();
ProgressBarDesc* getDefaultProgressBarDesc();
PropertyGridDesc* getDefaultPropertyGridDesc();
PropertyGridSectionDesc* getDefaultPropertyGridSectionDesc();
PropertyGridTextPropertyDesc* getDefaultPropertyGridTextPropertyDesc();
PropertyGridBoolPropertyDesc* getDefaultPropertyGridBoolPropertyDesc();
PropertyGridComboBoxPropertyDesc* getDefaultPropertyGridComboBoxPropertyDesc();
RadioButtonDesc* getDefaultRadioButtonDesc();
SheetDesc* getDefaultSheetDesc();
TabControlDesc* getDefaultTabControlDesc();
TabDesc* getDefaultTabDesc();
TabPageDesc* getDefaultTabPageDesc();
TextAreaDesc* getDefaultTextAreaDesc();
TextBoxDesc* getDefaultTextBoxDesc();
TitleBarDesc* getDefaultTitleBarDesc();
ToolBarDesc* getDefaultToolBarDesc();
TreeViewDesc* getDefaultTreeViewDesc();
TreeViewNodeDesc* getDefaultTreeViewNodeDesc();
TreeViewCheckBoxNodeDesc* getDefaultTreeViewCheckBoxNodeDesc();
TreeViewRadioButtonNodeDesc* getDefaultTreeViewRadioButtonNodeDesc();
VScrollBarDesc* getDefaultVScrollBarDesc();
WindowDesc* getDefaultWindowDesc();

protected:
DescManager();
virtual ~DescManager();

std::map<Ogre::String,Desc*> mUserCreatedDescs;

ButtonDesc* mDefaultButtonDesc;
CheckBoxDesc* mDefaultCheckBoxDesc;
ColorPickerDesc* mDefaultColorPickerDesc;
ComboBoxDesc* mDefaultComboBoxDesc;
ConsoleDesc* mDefaultConsoleDesc;
ContextMenuDesc* mDefaultContextMenuDesc;
HScrollBarDesc* mDefaultHScrollBarDesc;
ImageDesc* mDefaultImageDesc;
LabelDesc* mDefaultLabelDesc;
ListDesc* mDefaultListDesc;
ListImageItemDesc* mDefaultListImageItemDesc;
ListTextItemDesc* mDefaultListTextItemDesc;
MenuDesc* mDefaultMenuDesc;
MenuTextItemDesc* mDefaultMenuTextItemDesc;
MenuPanelDesc* mDefaultMenuPanelDesc;
ModalWindowDesc* mDefaultModalWindowDesc;
PanelDesc* mDefaultPanelDesc;
ProgressBarDesc* mDefaultProgressBarDesc;
PropertyGridDesc* mDefaultPropertyGridDesc;
PropertyGridSectionDesc* mDefaultPropertyGridSectionDesc;
PropertyGridTextPropertyDesc* mDefaultPropertyGridTextPropertyDesc;
PropertyGridBoolPropertyDesc* mDefaultPropertyGridBoolPropertyDesc;
PropertyGridComboBoxPropertyDesc* mDefaultPropertyGridComboBoxPropertyDesc;
RadioButtonDesc* mDefaultRadioButtonDesc;
SheetDesc* mDefaultSheetDesc;
TabControlDesc* mDefaultTabControlDesc;
TabDesc* mDefaultTabDesc;
TabPageDesc* mDefaultTabPageDesc;
TextAreaDesc* mDefaultTextAreaDesc;
TextBoxDesc* mDefaultTextBoxDesc;
TitleBarDesc* mDefaultTitleBarDesc;
ToolBarDesc* mDefaultToolBarDesc;
TreeViewDesc* mDefaultTreeViewDesc;
TreeViewNodeDesc* mDefaultTreeViewNodeDesc;
TreeViewCheckBoxNodeDesc* mDefaultTreeViewCheckBoxNodeDesc;
TreeViewRadioButtonNodeDesc* mDefaultTreeViewRadioButtonNodeDesc;
VScrollBarDesc* mDefaultVScrollBarDesc;
WindowDesc* mDefaultWindowDesc;

private:
};
}

#endif


Sorry to take up so much of your time with this, I can only hope that it will lead to a functional Linux version so that you don't have to waste all this time just to get my install up and running. If you're still looking for a Linux maintainer, I could potentially do the testing an Makefile creation, though I'd be useless in monitoring / fixing the actual code...

Thanks a ton for the active responses and help,
-Calder

Edit: Upon further investigation I noticed that in line 47 of QuickGUIDescFactory.h declares the createInstance method as follows:
ClassType* createInstance(const Ogre::String& className)

And here's the entire file:
#ifndef QUICKGUIDescFACTORY_H
#define QUICKGUIDescFACTORY_H

#include "QuickGUIDesc.h"
#include "QuickGUIException.h"
#include "QuickGUIExportDLL.h"

#include "OgrePrerequisites.h"

#include <map>

namespace QuickGUI
{
class _QuickGUIExport DescFactory
{
public:
// Only FactoryManager can create/destroy Factories
friend class FactoryManager;
// DescManager uses factory to create/destroy Descs
friend class DescManager;
// These Widgets need to create/destroy Descs
friend class Sheet;
friend class Widget;
protected:
typedef Desc* (DescFactory::*createDescFunction)();

public:
template<typename ClassType>
bool registerClass(const Ogre::String& className)
{
if (mFunctorMap.find(className) != mFunctorMap.end())
return false;

mFunctorMap[className] = &DescFactory::createDesc<ClassType>;

return true;
}

bool unregisterClass(const Ogre::String& className)
{
return (mFunctorMap.erase(className) == 1);
}

protected:

template<typename ClassType>
ClassType* createInstance(const Ogre::String& className)
{
typename std::map<Ogre::String, createDescFunction>::iterator iter = mFunctorMap.find(className);

if (iter == mFunctorMap.end())
throw Exception(Exception::ERR_FACTORY,"\"" + className + "\" is not a registered class!","DescFactory::createInstance");

Desc* newInstance = (this->*(*iter).second)();

return dynamic_cast<ClassType*>(newInstance);
}

void destroyInstance(Desc* instance)
{
OGRE_DELETE_T(instance,Desc,Ogre::MEMCATEGORY_GENERAL);
}

protected:
DescFactory() {}
virtual ~DescFactory() {}

std::map<Ogre::String, createDescFunction> mFunctorMap;

template<typename ClassType>
Desc* createDesc()
{
return OGRE_NEW_T(ClassType,Ogre::MEMCATEGORY_GENERAL)();
}
};
}

#endif

kungfoomasta

21-03-2009 21:58:41

Sorry to take up so much of your time with this, I can only hope that it will lead to a functional Linux version so that you don't have to waste all this time just to get my install up and running.

Actually I feel its my responsibility to help get this working for you, I feel bad that you're having troubles getting setup. I don't use Linux, which hurts me a bit, but I'd like QuickGUI to be cross platform.

I found the error, I wonder why VC 8 compiler didn't complain:

Desc* d = FactoryManager::getSingleton().getDescFactory()->createInstance(className);

Should be:

Desc* d = FactoryManager::getSingleton().getDescFactory()->createInstance<Desc>(className);

Without the "<Desc>" the templated function should not be able to deduce the type of class to cast the instance to. I've re-uploaded the zip to the same link I posted above, or you can just make the change and see if compiling gets any further. Again, sorry for the troubles, hopefully there aren't more errors. :(

Calder

21-03-2009 23:33:13


Actually I feel its my responsibility to help get this working for you, I feel bad that you're having troubles getting setup. I don't use Linux, which hurts me a bit, but I'd like QuickGUI to be cross platform.

Actually actually, you don't have any responsibility to do anything, as you're already kind enough to be releasing your hard work as open-source software. That said, your generosity with your time is amplified by the fact that you have not obligation, contractual or otherwise, to provide this level of support and help. Which is one of the things I really love about the open-source community in general. You often get much better support than with a company who you are paying for their product, and you invariably run into nicer people. In short, thanks a million and keep up the great work. :D


Without the "<Desc>" the templated function should not be able to deduce the type of class to cast the instance to. I've re-uploaded the zip to the same link I posted above, or you can just make the change and see if compiling gets any further. Again, sorry for the troubles, hopefully there aren't more errors. :(


Umm... It got through about 5-10 more files this time... And then:

./include/QuickGUIConsole.h line 79
error: invalid use of incomplete type ‘struct QuickGUI::TextBox’

./include/QuickGUIConsole.h line 13
error: forward declaration of ‘struct QuickGUI::TextBox’


Line 13:
class TextBox;

Line 79:
mInputBox->addWidgetEventHandler(WIDGET_EVENT_CHARACTER_KEY,function,obj);

And here's the file:
#ifndef QUICKGUICONSOLE_H
#define QUICKGUICONSOLE_H

#include "QuickGUIConsoleEnums.h"
#include "QuickGUIConsoleInputHandler.h"
#include "QuickGUIComponentWidget.h"
#include "QuickGUITextInputValidator.h"

namespace QuickGUI
{
// forward declarations
class TextArea;
class TextBox;

class _QuickGUIExport ConsoleDesc :
public ComponentWidgetDesc
{
public:
friend class DescFactory;
protected:
ConsoleDesc();
virtual ~ConsoleDesc() {}
public:

HorizontalTextAlignment console_displayAreaHorizontalAlignment;
float console_inputBoxHeight;
Ogre::ColourValue console_inputBoxDefaultColor;
Ogre::String console_inputBoxDefaultFontName;
HorizontalTextAlignment console_inputBoxHorizontalAlignment;
ConsoleLayout console_layout;
Ogre::String console_inputBoxTextCursorDefaultSkinTypeName;

TextDesc textDesc;

/**
* Returns the class of Desc object this is.
*/
virtual Ogre::String getClass() { return "ConsoleDesc"; }
/**
* Returns the class of Widget this desc object is meant for.
*/
virtual Ogre::String getWidgetClass() { return "Console"; }

/**
* Restore properties to default values
*/
virtual void resetToDefault();

/**
* Outlines how the desc class is written to XML and read from XML.
*/
virtual void serialize(SerialBase* b);
};

class _QuickGUIExport Console :
public ComponentWidget
{
public:
// Skin Constants
static const Ogre::String BACKGROUND;
static const Ogre::String TEXTBOX;
static const Ogre::String TEXTAREA;
// Define Skin Structure
static void registerSkinDefinition();
public:
friend class WidgetFactory;
public:

/**
* Internal function, do not use.
*/
virtual void _initialize(WidgetDesc* d);

/**
* Add an event handler called when characters are input into the InputBox.
*/
template<typename T> void addCharEnteredEventHandler(void (T::*function)(const EventArgs&), T* obj)
{
mInputBox->addWidgetEventHandler(WIDGET_EVENT_CHARACTER_KEY,function,obj);
}
void addCharEnteredEventHandler(EventHandlerSlot* function);
/**
* Adds text to this object.
*/
void addInputBoxText(Ogre::UTFString s, Ogre::FontPtr fp, const Ogre::ColourValue& cv);
/**
* Adds text to this object.
*/
void addInputBoxText(Ogre::UTFString s, const Ogre::String& fontName, const Ogre::ColourValue& cv);
/**
* Adds text to this object.
*/
void addInputBoxText(Ogre::UTFString s);
/**
* Adds Text using Text Segments.
*/
void addInputBoxText(std::vector<TextSegment> segments);

/**
* Clears Display Area.
*/
void clearDisplayArea();
/**
* Clears Input Box.
*/
void clearInputBox();

/**
* Sets the Sheet's keyboardListener to the InputBox.
*/
void focusInputBox();

/**
* Returns the class name of this Widget.
*/
virtual Ogre::String getClass();
/**
* Gets the alignment of text in the Display Area.
*/
HorizontalTextAlignment getDisplayAreaHorizontalAlignment();
/**
* Gets the default color used for text in the input box.
*/
Ogre::ColourValue getInputBoxDefaultColor();
/**
* Gets the default font used for text in the input box.
*/
Ogre::String getInputBoxDefaultFont();
/**
* Gets the height of the Input Box in pixels.
*/
float getInputBoxHeight();
/**
* Gets the alignment of text in the Input Box.
*/
HorizontalTextAlignment getInputBoxHorizontalAlignment();
/**
* Gets the InputBox's Text.
*/
Ogre::UTFString getInputBoxText();
/**
* Gets the InputBox's TextCursor's skin type.
*/
Ogre::String getInputBoxTextCursorSkinType();
/**
* Gets the InputBox's TextSegments.
*/
std::vector<TextSegment> getInputBoxTextSegments();

/** Sets the input validator used to determine whether input is accepted.
@param
function member function assigned to process input. Given in the form of myClass::myFunction.
Function must return bool, and take a code point, index, and UTFString as its parameters.
@param
obj particular class instance that defines the handler for this event. Here is an example:
setTextInputValidator(myClass::myFunction,this);
@note
You may see Visual Studio give an error warning such as "error C2660: 'QuickGUI::TextBox::setTextInputValidator' : function does not take x arguments".
This is an incorrect error message. Make sure your function pointer points to a function which returns bool, and takes parameters "Ogre::UTFString::code_point cp, unsigned int index, const Ogre::UTFString& currentText".
*/
template<typename T> void setConsoleInputHandler(void (T::*ConsoleInputHandler)(Console* console, bool& clearInputBox, bool& addToDisplayArea), T* obj)
{
if(mConsoleInputHandlerSlot != NULL)
OGRE_DELETE_T(mConsoleInputHandlerSlot,ConsoleInputHandlerSlot,Ogre::MEMCATEGORY_GENERAL);

mConsoleInputHandlerSlot = OGRE_NEW_T(ConsoleInputHandlerPointer<T>,Ogre::MEMCATEGORY_GENERAL)(ConsoleInputHandler,obj);
}
/**
* Sets the alignment of text in the Display Area.
*/
void setDisplayAreaHorizontalAlignment(HorizontalTextAlignment a);
/**
* Sets the default color used for text in the input box.
*/
void setInputBoxDefaultColor(const Ogre::ColourValue& cv);
/**
* Sets the default font used for text in the input box.
*/
void setInputBoxDefaultFont(const Ogre::String& fontName);
/**
* Sets the height of the Input Box in pixels.
*/
void setInputBoxHeight(float heightInPixels);
/**
* Gets the alignment of text in the Input Box.
*/
void setInputBoxHorizontalAlignment(HorizontalTextAlignment a);
/**
* Sets the text for this object.
*/
void setInputBoxText(Ogre::UTFString s);
/**
* Sets the text for this object.
*/
void setInputBoxText(Ogre::UTFString s, Ogre::FontPtr fp, const Ogre::ColourValue& cv);
/**
* Sets the Text using Text Segments.
*/
void setInputBoxText(std::vector<TextSegment> segments);
/**
* Sets the SkinType of the TextCursor.
*/
void setInputBoxTextCursorSkinType(const Ogre::String& skinTypeName);
/**
* Sets whether the input box is on top of the display area or below it.
*/
void setLayout(ConsoleLayout l);
/**
* Sets the "type" of this widget. For example you
* can create several types of Button widgets: "close", "add", "fire.skill.1", etc.
* NOTE: The type property determines what is drawn to the screen.
*/
virtual void setSkinType(const Ogre::String type);

public:
// Here we have to call out any protected Widget set accesors we want to expose

using Widget::drag;
using Widget::resize;
using Widget::setConsumeKeyboardEvents;
using Widget::setDimensions;
using Widget::setDragable;
using Widget::setHorizontalAnchor;
using Widget::setMaxSize;
using Widget::setMinSize;
using Widget::setPosition;
using Widget::setPositionRelativeToParentClientDimensions;
using Widget::setResizeFromAllSides;
using Widget::setResizeFromBottom;
using Widget::setResizeFromLeft;
using Widget::setResizeFromRight;
using Widget::setResizeFromTop;
using Widget::setScrollable;
using Widget::setSerialize;
using Widget::setTransparencyPicking;
using Widget::setVerticalAnchor;
using Widget::setVisible;

using ComponentWidget::setHeight;
using ComponentWidget::setSize;
using ComponentWidget::setWidth;

protected:
Console(const Ogre::String& name);
virtual ~Console();

// Pointer pointing to mWidgetDesc object, but casted for quick use.
ConsoleDesc* mDesc;

ConsoleInputHandlerSlot* mConsoleInputHandlerSlot;

TextBox* mInputBox;
TextArea* mDisplayArea;

void _updateComponentDimensions();

void onTextSubmitted(const EventArgs& args);

/**
* Outlines how the widget is drawn to the current render target
*/
virtual void onDraw();
};
}

#endif


-Calder

EDIT: I tried adding #include "QuickGUI.h" to the file, as that's where TextBox seems to be included from, and it seemed to make that error go away.

Unfortunately, there was a replacement ready.

./include/QuickGUIContextMenu.h line 88
error: ISO C++ forbids declaration of ‘Menu’ with no type


And line 88:

Menu* createSubMenu(const Ogre::UTFString& text, int index = -1);


And the entire file:

#ifndef QUICKGUICONTEXTMENU_H
#define QUICKGUICONTEXTMENU_H

#include "QuickGUIException.h"
#include "QuickGUIWindow.h"

#include <vector>

namespace QuickGUI
{
// forward declarations
class MenuItem;
class MenuTextItem;

class MenuItemDesc;

class _QuickGUIExport ContextMenuDesc :
public WindowDesc
{
public:
friend class DescFactory;
protected:
ContextMenuDesc();
virtual ~ContextMenuDesc() {}
public:

float contextmenu_itemHeight;
float contextmenu_maxMenuHeight;
/// Sets the amount of pixel overlap sub elements are drawn over this Menu.
float contextmenu_subMenuOverlap;

/**
* Returns the class of Desc object this is.
*/
virtual Ogre::String getClass() { return "ContextMenuDesc"; }
/**
* Returns the class of Widget this desc object is meant for.
*/
virtual Ogre::String getWidgetClass() { return "ContextMenu"; }

/**
* Restore properties to default values
*/
virtual void resetToDefault();

/**
* Outlines how the desc class is written to XML and read from XML.
*/
virtual void serialize(SerialBase* b);
};

class _QuickGUIExport ContextMenu :
public Window
{
public:
// Define Skin Structure
static void registerSkinDefinition();
public:
friend class WidgetFactory;
public:

/**
* Internal function, do not use.
*/
virtual void _initialize(WidgetDesc* d);

/**
* Hides Menu and any submenus.
*/
void closeMenu();
/**
* Closes any SubMenus that may be open.
*/
void closeSubMenus();
/**
* Creates a Child MenuItem.
*/
MenuItem* createMenuItem(MenuItemDesc* d, int index = -1);
/**
* Creates a Child MenuTextItem.
*/
MenuTextItem* createTextItem(const Ogre::UTFString& text, int index = -1);
MenuTextItem* createTextItem(std::vector<TextSegment> segments, int index = -1);
MenuTextItem* createTextItem(int index = -1);
/**
* Creates a Child Menu.
*/
Menu* createSubMenu(const Ogre::UTFString& text, int index = -1);
Menu* createSubMenu(std::vector<TextSegment> segments, int index = -1);
Menu* createSubMenu(int index = -1);

/**
* Removes an Item from the List.
*/
void destroyItem(unsigned int index);

/**
* Returns the class name of this Widget.
*/
virtual Ogre::String getClass();
/**
* Returns the Item at the index given. If the index is invalid,
* NULL is returned.
*/
MenuItem* getItem(unsigned int index);
/**
* Gets the height of each ListItem within this List.
*/
float getItemHeight();
/**
* Returns the number of MenuItems this menu has.
*/
int getNumberOfItems();

/**
* Returns true if the given menu is a submenu of this menu, false otherwise.
* NOTE: Does not have to be a direct sub menu.
*/
bool hasSubMenu(Menu* m);
/**
* Hides the Menu and any visible SubMenus.
*/
void hide();

/**
* Displays the Menu and its MenuItems. Menu is positioned to
* display on screen.
*/
void openMenu(const Point& position);
/**
* Finds the SubMenu and opens all Menus that lead to that Menu.
*/
void openSubMenu(Menu* m);

/**
* Sets the height of each ListItem within the List.
*/
void setItemHeight(float height);
/**
* Shows the Menu at the specified location. Menu may be repositioned to
* display on screen.
*/
void show(const Point& position);

protected:
ContextMenu(const Ogre::String& name);
virtual ~ContextMenu();

ContextMenuDesc* mDesc;

int mAutoNameCounter;

// Access to child MenuItems
std::list<MenuItem*> mItems;

// Immediate SubMenus
std::vector<Menu*> mSubMenus;

/**
* Adds a child widget to this container widget.
*/
virtual void addChild(Widget* w);

/**
* Forcing all MenuItems to be the width of client dimensions.
*/
void onClientSizeChanged(const EventArgs& args);
void onLoseFocus(const EventArgs& args);
void onPositionChanged(const EventArgs& args);
void onVisibleChanged(const EventArgs& args);

private:
};
}

#endif


EDIT2: On a side note: by all practical measures, including "QuickGUI.h" in "QuickGUIConsole.h" should cause a circular inclusion error because "QuickGUI.h" in turn includes "QuickGUIConsole.h". I always thought that header files only stored the structure of the class, not any information about the implimentation, and that's how you avoided circular inclusions in C++... I'm really confused now. Maybe I'll stop trying to figure this out and dump it on you, kungfoomasta. Lo siento mucho.

kungfoomasta

22-03-2009 04:56:41

Thanks for the catches! I seriously don't know why the vc 8 compiler lets me get away with these things.. one of these days I'll migrate to Linux just so I can use a compiler that doesn't let my mistakes go unnoticed. :lol:

Just to fill you in on how forward declarations go.. you've got the basic idea down, the header files (.h) generally define the interface of a class, and the source files (.cpp) define the implementation. As you know, when a header file includes other header files, it will need to be rebuilt whenever those included files have been modified. Forward declarations help in reducing the number of includes (or, dependencies) a header may have. The line

class TextBox;

As used in QuickGUIConsole.h, is a forward declaration. Its basically telling the compiler "There is an object called "TextBox"". The header can contain many references to this "TextBox" object, and there are no problems, because you told the compiler there is such an object. However, if the header includes any actual implementation details, the compiler will complain.

OK:

class TextBox;

Class A
{
protected:
TextBox* myTextBox; // "I have a pointer to an object of type 'TextBox'
};


Not OK:

class TextBox;

Class A
{
protected:
TextBox myTextBox; // "I have an instance of the TextBox class as a member
};


In the second case, the Class needs to know what a TextBox is.

Anyhow, there is a lot more that can be explained about forward declaration. I've fixed the two issues you ran into:

QuickGUIConsole.h must include TextBox.h since it uses it in the header. (#include "QuickGUITextBox.h")
QuickGUIContextMenu needs to forward declare Menu or include it as a dependency. (forward declare to keep dependencies to a minimum: class Menu;)

I've re-uploaded the files to the same link as previously (wait at least 10 min after this post to download). I'm sure there are probably more errors, but I can't easily find them since my compiler builds everything fine. Keep posting issues and I'll keep fixing them! :)

Calder

22-03-2009 14:28:11

Ok, new errors, but we're definitely getting somewhere. It compiled fine for over 5 minutes though. :D

Errors:

/home/calder/Developer/QuickGUI_9_03b/QuickGUI/src/QuickGUITextWidget.cpp line115
error: no ‘void QuickGUI::ITextWidget::setColor(const Ogre::ColourValue&)’ member function declared in class ‘QuickGUI::ITextWidget’

/home/calder/Developer/QuickGUI_9_03b/QuickGUI/src/QuickGUITextWidget.cpp line 124
error: no ‘void QuickGUI::ITextWidget::setColor(const Ogre::ColourValue&, unsigned int)’ member function declared in class ‘QuickGUI::ITextWidget’

/home/calder/Developer/QuickGUI_9_03b/QuickGUI/src/QuickGUITextWidget.cpp line 131
error: no ‘void QuickGUI::ITextWidget::setColor(const Ogre::ColourValue&, unsigned int, unsigned int)’ member function declared in class ‘QuickGUI::ITextWidget'

/home/calder/Developer/QuickGUI_9_03b/QuickGUI/src/QuickGUITextWidget.cpp line 138
error: no ‘void QuickGUI::ITextWidget::setColor(const Ogre::ColourValue&, Ogre::uint16, bool)’ member function declared in class ‘QuickGUI::ITextWidget’

/home/calder/Developer/QuickGUI_9_03b/QuickGUI/src/QuickGUITextWidget.cpp line 145
error: no ‘void QuickGUI::ITextWidget::setColor(const Ogre::ColourValue&, Ogre::UTFString, bool)’ member function declared in class ‘QuickGUI::ITextWidget’


This just looks like a header booboo, I'll see if I can fix it.

-Calder

EDIT: Got it to compile further by declaring those function in "QuickGUIITextWidget.h". Here's the modified file, with Doxygen comments include, if you want to use it.
SEE EDIT3 FOR UPDATED FILE

I didn't know what line 93 did though, so I took a guess at it and put '???' after it.

EDIT2: Ok, got a new error, after another minute or so of compilation. We're definitely getting somewhere though.

It involves the same file:

/home/calder/Developer/QuickGUI_9_03b/QuickGUI/src/QuickGUITextWidget.cpp line 6
error: prototype for ‘QuickGUI::ITextWidgetDesc::ITextWidgetDesc(const Ogre::String&)’ does not match any in class ‘QuickGUI::ITextWidgetDesc’


EDIT3: Fixed that problem with a declaration in "QuickGUIITextWidget.h". Here's the updated file:

#ifndef QUICKGUIIITextWidget_H
#define QUICKGUIIITextWidget_H

#include "QuickGUIDesc.h"
#include "QuickGUIText.h"
#include "QuickGUIException.h"

namespace QuickGUI
{
// forward declaration
class Widget;
class WidgetDesc;

class _QuickGUIExport ITextWidgetDesc
{
public:
friend class DescFactory;
protected:
ITextWidgetDesc();
ITextWidgetDesc(const Ogre::String& id);
virtual ~ITextWidgetDesc() {}
public:

/// Describes the Text used in this Label
TextDesc textDesc;
Ogre::ColourValue text_defaultColor;
Ogre::String text_defaultFontName;

/**
* Restore properties to default values
*/
virtual void resetToDefault();

/**
* Outlines how the desc class is written to XML and read from XML.
*/
virtual void serialize(SerialBase* b);
};

/**
* ITextWidget is an interface outlining all common interfaces a Widget that
* manipulates Text would have. This allows all Text using Widgets to share the
* same convenience APIs.
*/
class _QuickGUIExport ITextWidget
{
public:

/**
* Internal function, do not use.
*/
void _initialize(Widget* owner, WidgetDesc* d);

/**
* Adds text to this object.
*/
void addText(Ogre::UTFString s, Ogre::FontPtr fp, const Ogre::ColourValue& cv);
/**
* Adds text to this object.
*/
void addText(Ogre::UTFString s, const Ogre::String& fontName, const Ogre::ColourValue& cv);
/**
* Adds text to this object.
*/
void addText(Ogre::UTFString s);
/**
* Adds Text using Text Segments.
*/
void addText(std::vector<TextSegment> segments);

/**
* Clears the Text of this widget.
*/
void clearText();

/**
* Sets the color of all Text within this widget.
*/
void setColor(const Ogre::ColourValue& cv);

/**
* Sets the color of all Text within this widget.
*/
void setColor(const Ogre::ColourValue& cv, unsigned int index);

/**
* Sets the color of the specified Character in this widget.
*/
void setColor(const Ogre::ColourValue& cv, unsigned int startIndex, unsigned int endIndex);

/**
* Sets the color of Text within this widget that satisfies a boolean expression???
*/
void setColor(const Ogre::ColourValue& cv, Ogre::UTFString::code_point c, bool allOccurrences);

/**
* Sets the color of occurences of a given String within this widget.
*/
void setColor(const Ogre::ColourValue& cv, Ogre::UTFString s, bool allOccurrences);

/**
* Gets the color used when adding text without specifying color.
*/
Ogre::ColourValue getDefaultColor();
/**
* Gets the font used when adding text without specifying font.
*/
Ogre::String getDefaultFont();
/**
* Returns the horizontal alignment of text within this widget's client area.
*/
virtual HorizontalTextAlignment getHorizontalTextAlignment();
/**
* Gets the text in UTFString form.
*/
Ogre::UTFString getText();
/**
* Returns the amount of width defined for this text. Word wrapping occurs
* when the allotted width is smaller than the width of the text.
* NOTE: a value of 0 means no word wrapping will occur.
*/
float getTextAllottedWidth();
/**
* Returns the filtering used when drawing the text of this widget.
*/
BrushFilterMode getTextBrushFilterMode();
/**
* Returns the height of the Text;
*/
float getTextHeight();
/**
* Returns a list of Text Segments. Each Text Segment has the same color and font.
*/
std::vector<TextSegment> getTextSegments();
/**
* Returns the width of the Text;
*/
float getTextWidth();
/**
* Returns the number of pixels placed between each line of text, if there
* are multiple lines of text.
*/
float getVerticalLineSpacing();

/**
* Sets the color used when adding text without specifying color.
*/
void setDefaultColor(const Ogre::ColourValue& cv);
/**
* Sets the font used when adding text without specifying font.
*/
void setDefaultFont(const Ogre::String& fontName);
/**
* Sets all characters of the text to the specified font.
*/
virtual void setFont(const Ogre::String& fontName);
/**
* Sets the character at the index given to the specified font.
*/
void setFont(const Ogre::String& fontName, unsigned int index);
/**
* Sets all characters within the defined range to the specified font.
*/
void setFont(const Ogre::String& fontName, unsigned int startIndex, unsigned int endIndex);
/**
* Searches text for c. If allOccurrences is true, all characters of text matching c
* will be changed to the font specified, otherwise only the first occurrence is changed.
*/
void setFont(const Ogre::String& fontName, Ogre::UTFString::code_point c, bool allOccurrences);
/**
* Searches text for s. If allOccurrences is true, all sub strings of text matching s
* will be changed to the font specified, otherwise only the first occurrence is changed.
*/
void setFont(const Ogre::String& fontName, Ogre::UTFString s, bool allOccurrences);
/**
* Sets the Horizontal alignment of Text as displayed within the Label area.
*/
virtual void setHorizontalTextAlignment(HorizontalTextAlignment a);
/**
* Sets the text for this object.
*/
void setText(Ogre::UTFString s, Ogre::FontPtr fp, const Ogre::ColourValue& cv);
/**
* Sets the text for this object.
*/
void setText(Ogre::UTFString s, const Ogre::String& fontName, const Ogre::ColourValue& cv);
/**
* Sets the text for this object.
*/
void setText(Ogre::UTFString s);
/**
* Sets the Text using Text Segments.
*/
void setText(std::vector<TextSegment> segments);
/**
* Defines the amount of width allowed for this text. Word wrapping occurs
* when the allotted width is smaller than the width of the text.
* NOTE: set width to 0 to disable word wrapping.
*/
void setTextAllottedWidth(float allottedWidth);
/**
* Sets the filtering used when drawing the text.
*/
void setTextBrushFilterMode(BrushFilterMode m);
/**
* Sets all characters of the text to the specified color.
*/
virtual void setTextColor(const Ogre::ColourValue& cv);
/**
* Sets the character at the index given to the specified color.
*/
void setTextColor(const Ogre::ColourValue& cv, unsigned int index);
/**
* Sets all characters within the defined range to the specified color.
*/
void setTextColor(const Ogre::ColourValue& cv, unsigned int startIndex, unsigned int endIndex);
/**
* Searches text for c. If allOccurrences is true, all characters of text matching c
* will be colored, otherwise only the first occurrence is colored.
*/
void setTextColor(const Ogre::ColourValue& cv, Ogre::UTFString::code_point c, bool allOccurrences);
/**
* Searches text for s. If allOccurrences is true, all sub strings of text matching s
* will be colored, otherwise only the first occurrence is colored.
*/
void setTextColor(const Ogre::ColourValue& cv, Ogre::UTFString s, bool allOccurrences);
/**
* Sets the number of pixels placed between each line of text, if there
* are multiple lines of text.
*/
void setVerticalLineSpacing(float distance);

protected:
ITextWidget();
virtual ~ITextWidget();

ITextWidgetDesc* mDesc;
Text* mText;

// Pointer to the Widget that owns this interface
Widget* mOwner;

/**
* Called when Text changes, allowing Widgets to easily override and use this notification.
*/
virtual void onTextChanged();

/**
* Flags the parent window as dirty causing its texture to be updated (redrawn).
*/
void Redraw();

private:
};
}

#endif


EDIT4: W00t!!! 517 warnings later, QuickGUI builds successfully! I'll keep you updated as I start testing it.

Calder

22-03-2009 16:15:34

Thanks so much kungfoomasta, QuickGUI seems to be functional after a quick initial inspection. I tried building PlayPen, but "MainMenu.h" appears to be missing. I'll try the editor too, soon.

As for multiplatform support, there're a few things you could do from a Windows machine, even if you don't feel like installing Ubuntu on a 5-10GB partition. First, VirtualBox has great Linux support, so while you won't be able to run anything from inside a virtual machine, you can at least test that it builds successfully. I'm using a virtual Ubuntu machine within Ubuntu right now, just so I have a clean sandbox to install Ogre in, (I'm writing a HowTo for installing Ogre in Ubuntu, as instructions are seriously lacking there). I know people get really attached to their IDEs, but the second thing you could do would be to consider migrating to Code::Blocks. Code::Blocks is completely cross-platform and ISO-C++ compliant, so it will give you the warnings that VB doesn't, and insure compatibility on pretty much any system. I might be wrong, but I think the only difference between distributions would be the name of the DLLs and SLLs they include. Finally, if you don't want to bother with either of these right now, I would consider maintaining it, though I'm sure there are much better people for the job than me. I don't really know anything about Makefiles, and as I'm terminally lazy, I'd just end up doing it through Code::Blocks anyway, which isn't the proper solution. ;-)

-Calder

kungfoomasta

22-03-2009 17:59:01

Awesome! Although, the PlayPen shouldn't require MainMenu to run. It may have in the past, but I cleaned it up when I created the Editor project, they share a lot of similar code.

Looking at the errors you posted, I realized I never deleted QuickGUITextWidget.h/.cpp. QuickGUIITextWidget.h/.cpp are the correct files (notice there are 2 I's). I have now renamed these files to QuickGUITextUser.h/.cpp. There should be no QuickGUITextWidget or QuickGUIITextWidget files in the zip. I also did a global search to see if "setColor" was being used anywhere, and the only places I found it in use was against the Brush and Text classes, which do support those functions. Otherwise, the correct API should be "setTextColor".

I was curious when I heard so many warnings were raised, so I raised the warning level of the QuickGUI project and recompiled. The only QuickGUI warning I saw was related to an unused variable:

virtual void serialize(SerialBase* b) {}

There were hundreds of Ogre warnings, however. If you see any legit warnings in QuickGUI, you can post them and I'll silence them. I generally try to remove all warnings from my code.

Since there is still a ton for me to develop, I would greatly appreciate it if you wanted to help me out in the linux side of things. Eventually I will probably look into Code Blocks like you suggested, but that is a waaaaays down the road. Like when my other projects using QuickGUI need to be tested for cross platform support. :)

If you run into the "setColor" errors, or any other errors, if you post the offending line of code, that will help me in figuring out why there is an error.

Hopefully now you can start using the lib, now that so much time was spent getting it up and running. :lol: Sorry for the trouble!

Calder

24-03-2009 16:12:19

Well, I've got QuickGUI up, running and rendering a cursor in my project! So I can confirm that it works, not just builds. Thanks again for all the help, KFM!

Also, here are the warnings you requested. Don't beat yourself up over them, as they're mostly nothing to worry about. Stuff like not having a default in a switch, declaring a variable that isn't ever used, etc. etc. etc.

Don't ruin your life over it, but here's the build log. I tried to make it as human readable as possible, but it's still not very nice.

=== QuickGUI, Debug ===

QuickGUIBrush In member function ‘void QuickGUI::Brush::queueLine(QuickGUI::Point, QuickGUI::Point, const Ogre::ColourValue&)’:

QuickGUIBrush line 655
warning: comparison between signed and unsigned integer expressions

QuickGUIBrush In member function ‘void QuickGUI::Brush::queueRect(QuickGUI::Rect, QuickGUI::UVRect)’:

QuickGUIBrush line 687
warning: comparison between signed and unsigned integer expressions

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

QuickGUIButton In member function ‘virtual void QuickGUI::Button::_initialize(QuickGUI::WidgetDesc*)’:

QuickGUIButton line 56
warning: unused variable ‘bd’

./include/QuickGUICharacter In constructor ‘QuickGUI::Character::Character(Ogre::uint16, Ogre::FontPtr, Ogre::ColourValue)’:

./include/QuickGUICharacter line 53
warning: ‘QuickGUI::Character::fontPtr’ will be initialized after

./include/QuickGUICharacter line 49
warning: ‘Ogre::ColourValue QuickGUI::Character::colorValue’

QuickGUICharacter line 6
warning: when initialized here

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIComboBox In constructor ‘QuickGUI::ComboBox::ComboBox(const Ogre::String&)’:

./include/QuickGUIComboBox line 276
warning: ‘QuickGUI::ComboBox::mSelectedItem’ will be initialized after

./include/QuickGUIComboBox line 267
warning: ‘QuickGUI::Button* QuickGUI::ComboBox::mDropDownButton’

QuickGUIComboBox line 75
warning: when initialized here

QuickGUIComboBox In member function ‘void QuickGUI::ComboBox::destroyItem(unsigned int)’:

QuickGUIComboBox line 380
warning: comparison between signed and unsigned integer expressions

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

QuickGUIComponentWidget In member function ‘virtual void QuickGUI::ComponentWidget::setHeight(float)’:

QuickGUIComponentWidget line 215
warning: enumeration value ‘ANCHOR_VERTICAL_TOP’ not handled in switch

QuickGUIComponentWidget line 215
warning: enumeration value ‘ANCHOR_VERTICAL_NONE’ not handled in switch

QuickGUIComponentWidget In member function ‘virtual void QuickGUI::ComponentWidget::setSize(QuickGUI::Size)’:

QuickGUIComponentWidget line 301
warning: enumeration value ‘ANCHOR_HORIZONTAL_LEFT’ not handled in switch

QuickGUIComponentWidget line 301
warning: enumeration value ‘ANCHOR_HORIZONTAL_NONE’ not handled in switch

QuickGUIComponentWidget line 337
warning: enumeration value ‘ANCHOR_VERTICAL_TOP’ not handled in switch

QuickGUIComponentWidget line 337
warning: enumeration value ‘ANCHOR_VERTICAL_NONE’ not handled in switch

QuickGUIComponentWidget In member function ‘virtual void QuickGUI::ComponentWidget::setWidth(float)’:

QuickGUIComponentWidget line 414
warning: enumeration value ‘ANCHOR_HORIZONTAL_LEFT’ not handled in switch

QuickGUIComponentWidget line 414
warning: enumeration value ‘ANCHOR_HORIZONTAL_NONE’ not handled in switch

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIConsole In constructor ‘QuickGUI::Console::Console(const Ogre::String&)’:

./include/QuickGUIConsole line 250
warning: ‘QuickGUI::Console::mConsoleInputHandlerSlot’ will be initialized after

./include/QuickGUIConsole line 248
warning: ‘QuickGUI::ConsoleDesc* QuickGUI::Console::mDesc’

QuickGUIConsole line 62
warning: when initialized here

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

QuickGUIContainerWidget In member function ‘virtual void QuickGUI::ContainerWidget::setHeight(float)’:

QuickGUIContainerWidget line 633
warning: enumeration value ‘ANCHOR_VERTICAL_TOP’ not handled in switch

QuickGUIContainerWidget line 633
warning: enumeration value ‘ANCHOR_VERTICAL_NONE’ not handled in switch

QuickGUIContainerWidget line 673
warning: enumeration value ‘ANCHOR_VERTICAL_TOP’ not handled in switch

QuickGUIContainerWidget line 673
warning: enumeration value ‘ANCHOR_VERTICAL_NONE’ not handled in switch

QuickGUIContainerWidget In member function ‘virtual void QuickGUI::ContainerWidget::setSize(QuickGUI::Size)’:

QuickGUIContainerWidget line 773
warning: enumeration value ‘ANCHOR_HORIZONTAL_LEFT’ not handled in switch

QuickGUIContainerWidget line 773
warning: enumeration value ‘ANCHOR_HORIZONTAL_NONE’ not handled in switch

QuickGUIContainerWidget line 809
warning: enumeration value ‘ANCHOR_VERTICAL_TOP’ not handled in switch

QuickGUIContainerWidget line 809
warning: enumeration value ‘ANCHOR_VERTICAL_NONE’ not handled in switch

QuickGUIContainerWidget line 849
warning: enumeration value ‘ANCHOR_HORIZONTAL_LEFT’ not handled in switch

QuickGUIContainerWidget line 849
warning: enumeration value ‘ANCHOR_HORIZONTAL_NONE’ not handled in switch

QuickGUIContainerWidget line 885
warning: enumeration value ‘ANCHOR_VERTICAL_TOP’ not handled in switch

QuickGUIContainerWidget line 885
warning: enumeration value ‘ANCHOR_VERTICAL_NONE’ not handled in switch

QuickGUIContainerWidget In member function ‘virtual void QuickGUI::ContainerWidget::setWidth(float)’:

QuickGUIContainerWidget line 1016
warning: enumeration value ‘ANCHOR_HORIZONTAL_LEFT’ not handled in switch

QuickGUIContainerWidget line 1016
warning: enumeration value ‘ANCHOR_HORIZONTAL_NONE’ not handled in switch

QuickGUIContainerWidget line 1056
warning: enumeration value ‘ANCHOR_HORIZONTAL_LEFT’ not handled in switch

QuickGUIContainerWidget line 1056
warning: enumeration value ‘ANCHOR_HORIZONTAL_NONE’ not handled in switch

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

QuickGUIContextMenu In member function ‘void QuickGUI::ContextMenu::destroyItem(unsigned int)’:

QuickGUIContextMenu line 312
warning: comparison between signed and unsigned integer expressions

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIITextWidget In constructor ‘QuickGUI::ITextWidget::ITextWidget()’:

./include/QuickGUIITextWidget line 241
warning: ‘QuickGUI::ITextWidget::mOwner’ will be initialized after

./include/QuickGUIITextWidget line 238
warning: ‘QuickGUI::Text* QuickGUI::ITextWidget::mText’

QuickGUIITextWidget line 27
warning: when initialized here

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIList In constructor ‘QuickGUI::List::List(const Ogre::String&)’:

./include/QuickGUIList line 226
warning: ‘QuickGUI::List::mPrevSelectedIndex’ will be initialized after

./include/QuickGUIList line 218
warning: ‘int QuickGUI::List::mAutoNameCounter’

QuickGUIList line 55
warning: when initialized here

QuickGUIList In member function ‘void QuickGUI::List::destroyItem(unsigned int)’:

QuickGUIList line 311
warning: comparison between signed and unsigned integer expressions

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIManager In constructor ‘QuickGUI::GUIManager::GUIManager(QuickGUI::GUIManagerDesc&)’:

./include/QuickGUIManager line 206
warning: ‘QuickGUI::GUIManager::mDraggingWidget’ will be initialized after

./include/QuickGUIManager line 170
warning: ‘QuickGUI::Sheet* QuickGUI::GUIManager::mActiveSheet’

QuickGUIManager line 33
warning: when initialized here

./include/QuickGUIManager line 200
warning: ‘QuickGUI::GUIManager::mButtonMask’ will be initialized after

./include/QuickGUIManager line 172
warning: ‘QuickGUI::Widget* QuickGUI::GUIManager::mWidgetUnderMouseCursor’

QuickGUIManager line 33
warning: when initialized here

./include/QuickGUIManager line 209
warning: ‘QuickGUI::GUIManager::mDownOnBorder’ will be initialized after

./include/QuickGUIManager line 203
warning: ‘unsigned int QuickGUI::GUIManager::mKeyModifiers’

QuickGUIManager line 33
warning: when initialized here

./include/QuickGUIManager line 212
warning: ‘QuickGUI::GUIManager::mPreviousBorder’ will be initialized after

./include/QuickGUIManager line 210
warning: ‘QuickGUI::BorderSide QuickGUI::GUIManager::mResizableBorder’

QuickGUIManager line 33
warning: when initialized here

./include/QuickGUIManager line 210
warning: ‘QuickGUI::GUIManager::mResizableBorder’ will be initialized after

./include/QuickGUIManager line 164
warning: ‘float QuickGUI::GUIManager::mViewportWidth’

QuickGUIManager line 33
warning: when initialized here

QuickGUIManager In member function ‘bool QuickGUI::GUIManager::injectMouseButtonDown(const QuickGUI::MouseButtonID&)’:

QuickGUIManager line 371
warning: enumeration value ‘BORDER_NONE’ not handled in switch

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIMenu In constructor ‘QuickGUI::Menu::Menu(const Ogre::String&)’:

./include/QuickGUIMenu line 196
warning: ‘QuickGUI::Menu::mMenuPanel’ will be initialized after

./include/QuickGUIMenu line 193
warning: ‘int QuickGUI::Menu::mAutoNameCounter’

QuickGUIMenu line 60
warning: when initialized here

QuickGUIMenu In member function ‘void QuickGUI::Menu::destroyItem(unsigned int)’:

QuickGUIMenu line 358
warning: comparison between signed and unsigned integer expressions

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

QuickGUIMenuItem In member function ‘virtual void QuickGUI::MenuItem::_initialize(QuickGUI::WidgetDesc*)’:

QuickGUIMenuItem line 36
warning: unused variable ‘mid’

QuickGUIMenuItem line 37
warning: unused variable ‘mDesc’

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIPropertyGrid In constructor ‘QuickGUI::PropertyGrid::PropertyGrid(const Ogre::String&)’:

./include/QuickGUIPropertyGrid line 219
warning: ‘QuickGUI::PropertyGrid::mSelectedProperty’ will be initialized after

./include/QuickGUIPropertyGrid line 213
warning: ‘float QuickGUI::PropertyGrid::mLabelWidth’

QuickGUIPropertyGrid line 59
warning: when initialized here

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

QuickGUIPropertyGridItem In member function ‘virtual void QuickGUI::PropertyGridItem::onKeyDown(const QuickGUI::EventArgs&)’:

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_UNASSIGNED’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_ESCAPE’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_1’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_2’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_3’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_4’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_5’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_6’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_7’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_8’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_9’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_0’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_MINUS’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_EQUALS’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_BACK’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_TAB’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_Q’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_W’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_E’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_R’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_T’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_Y’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_U’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_I’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_O’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_P’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_LBRACKET’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_RBRACKET’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_RETURN’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_LCONTROL’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_A’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_S’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_D’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_G’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_H’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_J’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_K’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_L’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_SEMICOLON’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_APOSTROPHE’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_GRAVE’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_LSHIFT’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_BACKSLASH’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_Z’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_X’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_C’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_V’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_B’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_N’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_M’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_COMMA’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_PERIOD’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_SLASH’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_RSHIFT’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_MULTIPLY’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_LMENU’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_SPACE’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_CAPITAL’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F1’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F2’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F3’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F4’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F5’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F6’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F7’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F8’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F9’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F10’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMLOCK’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_SCROLL’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPAD7’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPAD8’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPAD9’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_SUBTRACT’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPAD4’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPAD5’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPAD6’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_ADD’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPAD1’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPAD2’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPAD3’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPAD0’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_DECIMAL’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_OEM_102’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F11’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F12’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F13’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F14’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_F15’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_KANA’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_ABNT_C1’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_CONVERT’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NOCONVERT’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_YEN’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_ABNT_C2’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPADEQUALS’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_PREVTRACK’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_AT’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_COLON’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_UNDERLINE’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_KANJI’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_STOP’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_AX’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_UNLABELED’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NEXTTRACK’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPADENTER’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_RCONTROL’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_MUTE’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_CALCULATOR’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_PLAYPAUSE’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_MEDIASTOP’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_VOLUMEDOWN’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_VOLUMEUP’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_WEBHOME’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_NUMPADCOMMA’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_DIVIDE’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_SYSRQ’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_RMENU’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_PAUSE’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_HOME’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_PGUP’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_RIGHT’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_END’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_PGDOWN’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_INSERT’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_DELETE’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_LWIN’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_RWIN’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_APPS’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_POWER’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_SLEEP’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_WAKE’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_WEBSEARCH’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_WEBFAVORITES’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_WEBREFRESH’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_WEBSTOP’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_WEBFORWARD’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_WEBBACK’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_MYCOMPUTER’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_MAIL’ not handled in switch

QuickGUIPropertyGridItem line 323
warning: enumeration value ‘KC_MEDIASELECT’ not handled in switch

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIPropertyGridSection In constructor ‘QuickGUI::PropertyGridSection::PropertyGridSection(const Ogre::String&)’:

./include/QuickGUIPropertyGridSection line 148
warning: ‘QuickGUI::PropertyGridSection::mStateButton’ will be initialized after

./include/QuickGUIPropertyGridSection line 147
warning: ‘bool QuickGUI::PropertyGridSection::mExpanded’

QuickGUIPropertyGridSection line 41
warning: when initialized here

QuickGUIPropertyGridSection In member function ‘virtual void QuickGUI::PropertyGridSection::onKeyDown(const QuickGUI::EventArgs&)’:

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_UNASSIGNED’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_ESCAPE’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_1’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_2’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_3’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_4’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_5’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_6’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_7’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_8’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_9’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_0’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_MINUS’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_EQUALS’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_BACK’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_TAB’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_Q’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_W’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_E’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_R’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_T’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_Y’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_U’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_I’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_O’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_P’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_LBRACKET’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_RBRACKET’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_RETURN’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_LCONTROL’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_A’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_S’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_D’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_G’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_H’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_J’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_K’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_L’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_SEMICOLON’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_APOSTROPHE’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_GRAVE’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_LSHIFT’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_BACKSLASH’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_Z’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_X’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_C’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_V’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_B’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_N’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_M’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_COMMA’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_PERIOD’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_SLASH’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_RSHIFT’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_MULTIPLY’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_LMENU’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_SPACE’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_CAPITAL’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F1’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F2’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F3’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F4’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F5’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F6’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F7’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F8’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F9’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F10’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMLOCK’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_SCROLL’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPAD7’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPAD8’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPAD9’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_SUBTRACT’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPAD4’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPAD5’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPAD6’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_ADD’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPAD1’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPAD2’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPAD3’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPAD0’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_DECIMAL’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_OEM_102’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F11’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F12’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F13’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F14’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_F15’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_KANA’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_ABNT_C1’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_CONVERT’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NOCONVERT’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_YEN’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_ABNT_C2’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPADEQUALS’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_PREVTRACK’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_AT’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_COLON’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_UNDERLINE’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_KANJI’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_STOP’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_AX’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_UNLABELED’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NEXTTRACK’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPADENTER’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_RCONTROL’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_MUTE’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_CALCULATOR’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_PLAYPAUSE’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_MEDIASTOP’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_VOLUMEDOWN’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_VOLUMEUP’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_WEBHOME’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_NUMPADCOMMA’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_DIVIDE’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_SYSRQ’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_RMENU’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_PAUSE’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_HOME’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_PGUP’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_END’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_PGDOWN’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_INSERT’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_DELETE’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_LWIN’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_RWIN’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_APPS’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_POWER’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_SLEEP’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_WAKE’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_WEBSEARCH’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_WEBFAVORITES’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_WEBREFRESH’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_WEBSTOP’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_WEBFORWARD’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_WEBBACK’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_MYCOMPUTER’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_MAIL’ not handled in switch

QuickGUIPropertyGridSection line 481
warning: enumeration value ‘KC_MEDIASELECT’ not handled in switch

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

QuickGUIScriptReader In member function ‘void QuickGUI::ScriptReader::_createDefinitions(std::vector<QuickGUI::Token, std::allocator<QuickGUI::Token> >&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, QuickGUI::ScriptDefinition*, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, QuickGUI::ScriptDefinition*> > >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, QuickGUI::ScriptDefinition*, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, QuickGUI::ScriptDefinition*> > > > > >&)’:

QuickGUIScriptReader line 150
warning: enumeration value ‘TYPE_TEXT’ not handled in switch

QuickGUIScriptReader line 150
warning: enumeration value ‘TYPE_NEWLINE’ not handled in switch

QuickGUIScriptReader line 150
warning: enumeration value ‘TYPE_OPENBRACE’ not handled in switch

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUISheet In constructor ‘QuickGUI::Sheet::Sheet(QuickGUI::SheetDesc*)’:

./include/QuickGUISheet line 314
warning: ‘QuickGUI::Sheet::mDesc’ will be initialized after

./include/QuickGUISheet line 310
warning: ‘QuickGUI::Widget* QuickGUI::Sheet::mKeyboardListener’

QuickGUISheet line 59
warning: when initialized here

QuickGUISheet In member function ‘virtual void QuickGUI::Sheet::_initialize(QuickGUI::WidgetDesc*)’:

QuickGUISheet line 127
warning: unused variable ‘sd’

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUISkinElement In constructor ‘QuickGUI::SkinElement::SkinElement(const Ogre::String&)’:

./include/QuickGUISkinElement line 106
warning: ‘QuickGUI::SkinElement::mDirty’ will be initialized after

./include/QuickGUISkinElement line 98
warning: ‘bool QuickGUI::SkinElement::mTileBackground’

QuickGUISkinElement line 11
warning: when initialized here

./include/QuickGUISkinType In constructor ‘QuickGUI::SkinType::SkinType(const Ogre::String&, const Ogre::String&)’:

./include/QuickGUISkinType line 71
warning: ‘QuickGUI::SkinType::mClassName’ will be initialized after

./include/QuickGUISkinType line 70
warning: ‘Ogre::String QuickGUI::SkinType::mName’

QuickGUISkinType line 6
warning: when initialized here

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

QuickGUITabControl In member function ‘void QuickGUI::TabControl::destroyTabPage(unsigned int)’:

QuickGUITabControl line 220
warning: comparison between signed and unsigned integer expressions

QuickGUITabControl line 210
warning: unused variable ‘yPos’

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIText In constructor ‘QuickGUI::Text::Text(QuickGUI::TextDesc&)’:

./include/QuickGUIText line 486
warning: ‘QuickGUI::Text::mTextLinesDirty’ will be initialized after

./include/QuickGUIText line 476
warning: ‘bool QuickGUI::Text::mMaskText’

QuickGUIText line 164
warning: when initialized here

QuickGUIText In member function ‘void QuickGUI::Text::addCharacter(QuickGUI::Character*, unsigned int)’:

QuickGUIText line 628
warning: comparison between signed and unsigned integer expressions

QuickGUIText In member function ‘QuickGUI::Character* QuickGUI::Text::getCharacter(unsigned int)’:

QuickGUIText line 783
warning: comparison between signed and unsigned integer expressions

QuickGUIText In member function ‘QuickGUI::Point QuickGUI::Text::getCharacterPosition(unsigned int)’:

QuickGUIText line 800
warning: comparison between signed and unsigned integer expressions

QuickGUIText In member function ‘float QuickGUI::Text::getCharacterYPosition(unsigned int)’:

QuickGUIText line 825
warning: comparison between signed and unsigned integer expressions

QuickGUIText In member function ‘int QuickGUI::Text::getIndexOfPreviousWord(unsigned int)’:

QuickGUIText line 927
warning: comparison between signed and unsigned integer expressions

QuickGUIText In member function ‘void QuickGUI::Text::highlight(unsigned int)’:

QuickGUIText line 1212
warning: comparison between signed and unsigned integer expressions

QuickGUIText In member function ‘void QuickGUI::Text::highlight(Ogre::uint16, bool)’:

QuickGUIText line 1257
warning: comparison between signed and unsigned integer expressions

QuickGUIText In member function ‘void QuickGUI::Text::removeCharacter(unsigned int)’:

QuickGUIText line 1320
warning: comparison between signed and unsigned integer expressions

QuickGUIText In member function ‘void QuickGUI::Text::setColor(const Ogre::ColourValue&, unsigned int)’:

QuickGUIText line 1366
warning: comparison between signed and unsigned integer expressions

QuickGUIText In member function ‘void QuickGUI::Text::setColor(const Ogre::ColourValue&, Ogre::uint16, bool)’:

QuickGUIText line 1417
warning: comparison between signed and unsigned integer expressions

QuickGUIText In member function ‘void QuickGUI::Text::setFont(const Ogre::String&, unsigned int)’:

QuickGUIText line 1494
warning: comparison between signed and unsigned integer expressions

QuickGUIText In member function ‘void QuickGUI::Text::setFont(const Ogre::String&, Ogre::uint16, bool)’:

QuickGUIText line 1549
warning: comparison between signed and unsigned integer expressions

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUITextArea In constructor ‘QuickGUI::TextArea::TextArea(const Ogre::String&)’:

./include/QuickGUITextArea line 416
warning: ‘QuickGUI::TextArea::mDesc’ will be initialized after

./include/QuickGUITextArea line 379
warning: ‘QuickGUI::TextCursor* QuickGUI::TextArea::mTextCursor’

QuickGUITextArea line 71
warning: when initialized here

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUITextBox In constructor ‘QuickGUI::TextBox::TextBox(const Ogre::String&)’:

./include/QuickGUITextBox line 382
warning: ‘QuickGUI::TextBox::mDesc’ will be initialized after

./include/QuickGUITextBox line 348
warning: ‘QuickGUI::TextCursor* QuickGUI::TextBox::mTextCursor’

QuickGUITextBox line 76
warning: when initialized here

./include/QuickGUITextBox line 352
warning: ‘QuickGUI::TextBox::mTextInputValidatorSlot’ will be initialized after

./include/QuickGUITextBox line 349
warning: ‘int QuickGUI::TextBox::mCursorIndex’

QuickGUITextBox line 76
warning: when initialized here

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUITextCursor In constructor ‘QuickGUI::TextCursor::TextCursor(QuickGUI::Widget*)’:

./include/QuickGUITextCursor line 76
warning: ‘QuickGUI::TextCursor::mSkinElement’ will be initialized after

./include/QuickGUITextCursor line 74
warning: ‘QuickGUI::SkinType* QuickGUI::TextCursor::mSkinType’

QuickGUITextCursor line 21
warning: when initialized here

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIITextWidget In constructor ‘QuickGUI::ITextWidget::ITextWidget()’:

./include/QuickGUIITextWidget line 241
warning: ‘QuickGUI::ITextWidget::mOwner’ will be initialized after

./include/QuickGUIITextWidget line 238
warning: ‘QuickGUI::Text* QuickGUI::ITextWidget::mText’

QuickGUITextWidget line 26
warning: when initialized here

./include/QuickGUITimer In constructor ‘QuickGUI::Timer::Timer(QuickGUI::TimerDesc&)’:

./include/QuickGUITimer line 126
warning: ‘QuickGUI::Timer::mUpdate’ will be initialized after

./include/QuickGUITimer line 124
warning: ‘float QuickGUI::Timer::mTimeAccumulator’

QuickGUITimer line 13
warning: when initialized here

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

Calder

24-03-2009 16:24:08

...and the rest:
./include/QuickGUITreeView In constructor ‘QuickGUI::TreeView::TreeView(const Ogre::String&)’:

./include/QuickGUITreeView line 224
warning: ‘QuickGUI::TreeView::mSelectedNode’ will be initialized after

./include/QuickGUITreeView line 218
warning: ‘int QuickGUI::TreeView::mAutoNameCounter’

QuickGUITreeView line 58
warning: when initialized here

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUITreeViewNode In constructor ‘QuickGUI::TreeViewNode::TreeViewNode(const Ogre::String&)’:

./include/QuickGUITreeViewNode line 210
warning: ‘QuickGUI::TreeViewNode::mExpanded’ will be initialized after

./include/QuickGUITreeViewNode line 203
warning: ‘QuickGUI::Button* QuickGUI::TreeViewNode::mStateButton’

QuickGUITreeViewNode line 57
warning: when initialized here

QuickGUITreeViewNode In member function ‘void QuickGUI::TreeViewNode::onKeyDown(const QuickGUI::EventArgs&)’:

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_UNASSIGNED’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_ESCAPE’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_1’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_2’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_3’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_4’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_5’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_6’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_7’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_8’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_9’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_0’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_MINUS’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_EQUALS’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_BACK’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_TAB’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_Q’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_W’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_E’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_R’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_T’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_Y’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_U’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_I’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_O’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_P’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_LBRACKET’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_RBRACKET’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_RETURN’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_LCONTROL’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_A’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_S’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_D’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_G’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_H’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_J’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_K’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_L’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_SEMICOLON’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_APOSTROPHE’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_GRAVE’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_LSHIFT’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_BACKSLASH’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_Z’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_X’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_C’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_V’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_B’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_N’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_M’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_COMMA’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_PERIOD’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_SLASH’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_RSHIFT’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_MULTIPLY’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_LMENU’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_CAPITAL’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F1’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F2’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F3’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F4’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F5’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F6’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F7’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F8’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F9’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F10’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMLOCK’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_SCROLL’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPAD7’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPAD8’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPAD9’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_SUBTRACT’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPAD4’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPAD5’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPAD6’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_ADD’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPAD1’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPAD2’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPAD3’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPAD0’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_DECIMAL’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_OEM_102’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F11’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F12’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F13’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F14’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_F15’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_KANA’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_ABNT_C1’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_CONVERT’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NOCONVERT’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_YEN’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_ABNT_C2’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPADEQUALS’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_PREVTRACK’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_AT’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_COLON’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_UNDERLINE’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_KANJI’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_STOP’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_AX’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_UNLABELED’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NEXTTRACK’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPADENTER’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_RCONTROL’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_MUTE’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_CALCULATOR’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_PLAYPAUSE’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_MEDIASTOP’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_VOLUMEDOWN’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_VOLUMEUP’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_WEBHOME’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_NUMPADCOMMA’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_DIVIDE’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_SYSRQ’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_RMENU’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_PAUSE’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_HOME’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_PGUP’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_END’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_PGDOWN’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_INSERT’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_DELETE’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_LWIN’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_RWIN’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_APPS’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_POWER’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_SLEEP’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_WAKE’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_WEBSEARCH’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_WEBFAVORITES’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_WEBREFRESH’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_WEBSTOP’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_WEBFORWARD’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_WEBBACK’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_MYCOMPUTER’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_MAIL’ not handled in switch

QuickGUITreeViewNode line 621
warning: enumeration value ‘KC_MEDIASELECT’ not handled in switch

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIUVRect In constructor ‘QuickGUI::UVRect::UVRect(float, float, float, float)’:

./include/QuickGUIUVRect line 47
warning: ‘QuickGUI::UVRect::top’ will be initialized after

./include/QuickGUIUVRect line 46
warning: ‘float QuickGUI::UVRect::right’

QuickGUIUVRect line 13
warning: when initialized here

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

./include/QuickGUIWidget In constructor ‘QuickGUI::Widget::Widget(const Ogre::String&)’:

./include/QuickGUIWidget line 670
warning: ‘QuickGUI::Widget::mComponentOfAWidget’ will be initialized after

./include/QuickGUIWidget line 642
warning: ‘bool QuickGUI::Widget::mGrabbed’

QuickGUIWidget line 78
warning: when initialized here

./include/QuickGUIWidget line 666
warning: ‘QuickGUI::Widget::mInitialized’ will be initialized after

./include/QuickGUIWidget line 628
warning: ‘bool QuickGUI::Widget::mNameRegisteredWithSheet’

QuickGUIWidget line 78
warning: when initialized here

./include/QuickGUIWidget line 663
warning: ‘QuickGUI::Widget::mSkinElementName’ will be initialized after

./include/QuickGUIWidget line 661
warning: ‘QuickGUI::SkinType* QuickGUI::Widget::mSkinType’

QuickGUIWidget line 78
warning: when initialized here

./include/QuickGUIWidget line 661
warning: ‘QuickGUI::Widget::mSkinType’ will be initialized after

./include/QuickGUIWidget line 630
warning: ‘QuickGUI::WidgetDesc* QuickGUI::Widget::mWidgetDesc’

QuickGUIWidget line 78
warning: when initialized here

QuickGUIWidget In member function ‘void QuickGUI::Widget::resize(QuickGUI::BorderSide, float, float)’:

QuickGUIWidget line 659
warning: enumeration value ‘BORDER_NONE’ not handled in switch

./include/QuickGUIEventArgs line 42
warning: ‘typedef’ was ignored in this declaration

QuickGUIWindow In member function ‘void QuickGUI::Window::createRenderTarget()’:

QuickGUIWindow line 168
warning: unused variable ‘vp’



=== Build finished: 0 errors, 625 warnings ===

Calder

24-03-2009 17:12:00

The second tutorial on the wiki is rather broken, BTW... http://www.ogre3d.org/wiki/index.php/Qu ... Tutorial_2 The FactoryManager no longer has a method getWidgetDescFactory, and the object returned by the closest thing to it, getDescFactory, doesn't have a getInstance method...

EDIT10: Oh wait, that's just because this is pre-release code. Forget it.

kungfoomasta

24-03-2009 17:21:22

Its broken according to the new zip I sent you, ahead of release date. :wink:

I will update it after at the beginning of next month. For now, just use the DescManager to create/get/destroy Descs, or to retrieve default provided Descs.

DescManager::getSingletonPtr()->getDesc<ButtonDesc>("myButtonDesc");
DescManager::getSingletonPtr()->getDefaultButtonDesc();
etc.

Calder

26-03-2009 02:27:56

Shoot, really sorry about that. I figured that out and edited my post, but too late.

EDIT: Nevermind, I was being stupid. I'll leave this here in case someone else can learn from my mistake. I'd simply forgotten to define the function with the argument (const EventArgs& args).
/*
I'm also stuck on adding an event handler, although I think this is more me being broken than QuickGUI. ;-) The following line:
sBrushIntensity->addWidgetEventHandler(WIDGET_EVENT_MOUSE_MOVE, &GUIMain::onBrushIntensityMouseMove, this);
gives the following error:
error: no matching function for call to ‘QuickGUI::HScrollBar::addWidgetEventHandler(QuickGUI::WidgetEvent, void (GUIMain::*)(), GUIMain* const)’
and not-so-helpfully notes:
note: candidates are: virtual void QuickGUI::Widget::addWidgetEventHandler(QuickGUI::WidgetEvent, QuickGUI::EventHandlerSlot*)

Thanks in advance for any and all help,
-Calder
*/

Calder

26-03-2009 02:40:36

One more quick question. There seems to be the slightest lag, (probably no more than a fifth of a second) whenever I mouse over a scrollbar, and I think it's due to the cursor being changed. Is this normal?

kungfoomasta

26-03-2009 07:12:35

Regarding your error:

Make sure you have a function defined like this:

void GUIMain::onBrushIntensityMouseMove(const EventArgs& args);

Also, what kind of Widget is "sBrushIntensity"?

About the lag, are you running in debug mode? It also depends on the texture size. For example, each Window has its own texture, and the Sheet is also a Window. Whenever a widget needs to be redrawn, the window it belongs to has to update its texture and draw it to screen. (texture caching) So if you have a button on a sheet of size 800 x 600, whenever the mouse hovers over the button, or clicks on it, the entire 800 x 600 texture needs to be updates, so that it can be redrawn. While I don't know if this is the best method for rendering GUI, it definately lets me structure the code in a very organized way. Previous versions of QuickGUI tried to render using other methods, and while they were performance friendly, it was very disorganized and full of bugs. Personally I'm very satisfied with the performance of today's QuickGUI. I don't think qgui is slower than any other Ogre GUI systems. (to others: if there is information to disprove this I'd be interested in learning more :twisted: )

The Mouse Cursor it its own texture, drawn separately, so changing the cursor will no cause any major performance issues. Its more likely the ScrollBar wants to be redrawn in an "over" state, particularly if you move over a button in the scrollbar, belonging to a large window. Users can also leverage this by making windows of smaller sizes and using them as they see fit. Also note each Window is another batch to be rendered. But a few batches are little compared to use of Ogre overlays, which use TONS of batches, and easily slow rendering. With Texture Caching, the only performance hits are when the texture needs to be updated. Most of the time there are just a few textures rendered to a few quads, which won't affect performance.

Calder

26-03-2009 13:44:18

Wow, thanks for the detailed response, KFM! The first problem I had already fixed, sorry to waste your time with it unnecessarily.

After some observation, I think I see what's going on with the second. You're right about it being the caching, as it happens with buttons, too, but I just hadn't noticed it before. My window is only 200x600, but it causes a rather noticeable lag on my machine. Would there be any way to render hover states as separate objects that just get superimposed over the first? Because the lag-time is perfectly acceptable for dragging sliders and the like, just not every time you mouse-over a button. Or could you only update the section of the texture described by that specific widget's rect... This would all probably be very hard to code though; don't worry about it if it's not an easy fix.

And one more question: how do you toggle the visibility of a sheet? Since it's descended from the QuickGUI::Widget class, I tried setVisibilityFlags, but that didn't seem to work. Is the only way just to activate a blank sheet?

Thanks,
-Calder

kungfoomasta

26-03-2009 17:38:29

What are your machine specs? And is this in debug or release mode? (or, are there 2 distinctions on linux? I don't know) It might be possible to update just a section of the texture, but I haven't looked into it, it would probably require a lot of work. I'm guessing if you were to try out RBGUI you would find the same lag, we both share the same rendering process. Its very odd you see a lag on a 200 x 600 window, thats not very big. Unfortunately there are a ton of other things that need to be developed, I wouldn't be able to look into optimizations in the short term. Hopefully your machine hardware isn't very recent. :lol:

The sheet is drawn the instant you set it as the active sheet. If you want to hide it, you can try

mGUIManager->setActiveSheet(NULL);

And to draw it again, set it as active sheet. I haven't tried setting the sheet invisible, I will have to remember to check that out and see if it should be allowed or not. I can't think of anything that would make me want to disallow it, but we'll see..

Calder

31-03-2009 21:40:31

What are your machine specs?
9 month old computer with integrated graphics. Specifics:
2GB RAM
Dual core 2Ghz AMD Athlon processors
nVidia GeForce 7150M Integrated Graphics Chip

And is this in debug or release mode? (or, are there 2 distinctions on linux? I don't know)[/quote
I'm using the default debug mode with a lot of Ogre libraries and include directories added. Sorry I don't know the difference between Debug and Release. Is it just static vs. dynamic linking, or am I completely wrong?

It might be possible to update just a section of the texture, but I haven't looked into it, it would probably require a lot of work. I'm guessing if you were to try out RBGUI you would find the same lag, we both share the same rendering process. Its very odd you see a lag on a 200 x 600 window, thats not very big. Unfortunately there are a ton of other things that need to be developed, I wouldn't be able to look into optimizations in the short term. Hopefully your machine hardware isn't very recent. :lol:
Yeah, don't worry about the rendering stuff. I might look at the code and see if I can find an easy way to patch/modify it, but don't waste time on it yet yourself. Prioritizing is key. Somewhat off-topic, my personal agenda of things-I'd-love-to-see-before-optimization-updates consists of:
  1. Easy image buttons, (a la tabs)[/*:m]
  2. Tabbed environments that don't create a whole bulky window border around themselves.[/*:m]
  3. Can't think of anything else right now. So far I've been extremely pleased with QuickGUI![/*:m][/list:u]

    Thanks again for this incredible addon!

    -Calder

kungfoomasta

31-03-2009 21:55:53

Thanks for using it and providing feedback! :D

I'm not sure about the specifics, but when built in release mode, a lot of optimizations are made to the code, and the performance is generally a lot better. A quick search got me this quote:


re: What's the difference between a Debug vs Release Build? The biggest difference between these is that:
In a debug build the complete symbolic debug information is emitted to help while debugging applications and also the code optimization is not taken into account.
While in release build the symbolic debug info is not emitted and the code execution is optimized.
Also, because the symbolic info is not emitted in a release build, the size of the final executable is lesser than a debug executable.

One can expect to see funny errors in release builds due to compiler optimizations or differences in memory layout or initialization. These are ususally referred to as Release - Only bugs :)

In terms of execution speed, a release executable will execute faster for sure, but not always will this different be significant.


Tabs with images should be fairly easy to create, I made APIs for them, something like "createImageTab". I agree with the TabControls, and even the Menus, the skins are definately in need of an update. Maybe I can try to come up with something instead of re-using skins. If you have any links to cool looking tab controls, post the links and I'll use it as reference. :)

Calder

01-04-2009 01:36:28

Ok, thanks for the info on debug. I'll try building it for release and see if that improves the speed.

As for the image tabs, I don't think I made that wish clear, (yes, this feels a lot like having a magic lamp ;-) ). While I haven't tried the image tabs, they seem to be kinda what I want, and that wasn't the request. The request is to have an easy way to give a button an image, say, instead of text. Then you could have a button with the normal border and everything, but instead of a text fill just pass it an image file.

Also, BTW, line 104 of QuickGUITextBox.cpp, causes a Seg-Fault when deleting a sheet that contains a modal window containing a text box. Here's the line:
mWindow->removeWindowEventHandler(WINDOW_EVENT_DRAWN,this);
While I was able to track this down through a couple painful hours of Seg-Fault debugging, I don't really know why this happens. Is it that mModalWindow has been declared, but not mWindow?

EDIT: Well, I tried building it in Release mode, and while the final executable was 1.57 MB down from 20.77 MB, the GUI's behavior was unchanged, and I witnessed some of the random segfaults that your source promised! ;-)

kungfoomasta

01-04-2009 05:01:00

Then you could have a button with the normal border and everything, but instead of a text fill just pass it an image file.

Ah, I see! I will add this to the list of things to implement, should be decently easy.

About the segfault, thats odd because the editor has 2 modal windows with TextBoxes, and no crashes occur. I can't think of how the segfault would occur, other than the mWindow pointer being bad. I hope those random segfaults are not the fault of QuickGUI! I try to do a good job at initializing my pointers to NULL, since release mode doesn't initialize them automatically. Why this is, I don't know.

kungfoomasta

02-04-2009 09:01:04

I've added in support for images within the Button's client area, via:

Button::setImage
Button::setTileImage


I've re-uploaded 9.04, it has this feature included.

Calder

07-04-2009 03:29:39

Cool!

...but what happened to the sheet manager?

kungfoomasta

07-04-2009 18:19:17

I removed the SheetManager so that users can create and manage Sheets on their own. The Sheet class still registers itself with the Root class, so if you fail to destroy them all, they will be destroyed on cleanup. I made the Sheet's constructor/destructor public. Basically I didn't want to force unique naming of Sheets, which was a problem in my own project. There was also a problem in the Editor, consider this scenario:

I have a Sheet displayed, called "MySheet". I want to load a Sheet from file, I take the following steps:

1. Try to load the sheet from file
2. If successful, Destroy currently active Sheet, and set the newly loaded sheet as Active Sheet

The problem is, what if the Sheet being loaded from file has the name "MySheet". Crash! Cannot have two sheets with the same name! This is why I removed the SheetManager, it just gets in the way. Likewise in my project, I have a Scene class, and each Scene class has a Load screen which is implemented via a Sheet. If I have 2 Scenes loaded at once, I will have naming conflicts with the sheet.

The SheetManager was a decent idea, but through practical use it seems too limiting, so I removed it. Let me know if it doesn't seem justified. :)

Calder

07-04-2009 23:00:00

Ok, so then how would you go about quickly creating a blank sheet? Right now, I'm just using the default SheetDesc, but that's not as simple. I'm also getting the following errors when I tried that:

||=== project, Debug ===|
obj/Debug/libs/QuickGUI/QuickGUIButton.o||In function `QuickGUI::TextUserDesc::~TextUserDesc()':|
QuickGUIButton.cpp:(.text._ZN8QuickGUI12TextUserDescD2Ev[QuickGUI::TextUserDesc::~TextUserDesc()]+0x16)||undefined reference to `vtable for QuickGUI::TextUserDesc'|
obj/Debug/libs/QuickGUI/QuickGUIButton.o:(.rodata._ZTVN8QuickGUI6ButtonE[vtable for QuickGUI::Button]+0x170)||undefined reference to `QuickGUI::TextUser::getHorizontalTextAlignment()'|
obj/Debug/libs/QuickGUI/QuickGUIButton.o:(.rodata._ZTVN8QuickGUI6ButtonE[vtable for QuickGUI::Button]+0x178)||undefined reference to `QuickGUI::TextUser::setFont(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|
obj/Debug/libs/QuickGUI/QuickGUIButton.o:(.rodata._ZTVN8QuickGUI6ButtonE[vtable for QuickGUI::Button]+0x180)||undefined reference to `QuickGUI::TextUser::setHorizontalTextAlignment(QuickGUI::HorizontalTextAlignment)'|
obj/Debug/libs/QuickGUI/QuickGUIButton.o:(.rodata._ZTVN8QuickGUI6ButtonE[vtable for QuickGUI::Button]+0x188)||undefined reference to `QuickGUI::TextUser::setTextColor(Ogre::ColourValue const&)'|
obj/Debug/libs/QuickGUI/QuickGUIButton.o:(.rodata._ZTVN8QuickGUI6ButtonE[vtable for QuickGUI::Button]+0x1a0)||undefined reference to `QuickGUI::TextUser::onTextChanged()'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o||In function `QuickGUI::ComboBox::selectItem(QuickGUI::MouseEventArgs const&)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|669|undefined reference to `QuickGUI::TextUser::getTextSegments()'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o||In function `QuickGUI::ComboBox::_initialize(QuickGUI::WidgetDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|173|undefined reference to `QuickGUI::TextUser::_initialize(QuickGUI::Widget*, QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o||In function `~ComboBox':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|133|undefined reference to `QuickGUI::TextUser::~TextUser()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|133|undefined reference to `QuickGUI::TextUser::~TextUser()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|133|undefined reference to `QuickGUI::TextUser::~TextUser()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|133|undefined reference to `QuickGUI::TextUser::~TextUser()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|133|undefined reference to `QuickGUI::TextUser::~TextUser()'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o:/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|133|more undefined references to `QuickGUI::TextUser::~TextUser()' follow|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o||In function `ComboBox':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|105|undefined reference to `QuickGUI::TextUser::TextUser()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|108|undefined reference to `QuickGUI::TextUser::~TextUser()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|105|undefined reference to `QuickGUI::TextUser::TextUser()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|108|undefined reference to `QuickGUI::TextUser::~TextUser()'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o||In function `QuickGUI::ComboBoxDesc::serialize(QuickGUI::SerialBase*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|76|undefined reference to `QuickGUI::TextUserDesc::serialize(QuickGUI::SerialBase*)'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o||In function `QuickGUI::ComboBoxDesc::resetToDefault()':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|63|undefined reference to `QuickGUI::TextUserDesc::resetToDefault()'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o||In function `ComboBoxDesc':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|41|undefined reference to `QuickGUI::TextUserDesc::TextUserDesc()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|41|undefined reference to `QuickGUI::TextUserDesc::TextUserDesc()'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o:(.rodata._ZTVN8QuickGUI8ComboBoxE[vtable for QuickGUI::ComboBox]+0x1b0)||undefined reference to `QuickGUI::TextUser::getHorizontalTextAlignment()'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o:(.rodata._ZTVN8QuickGUI8ComboBoxE[vtable for QuickGUI::ComboBox]+0x1b8)||undefined reference to `QuickGUI::TextUser::setFont(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o:(.rodata._ZTVN8QuickGUI8ComboBoxE[vtable for QuickGUI::ComboBox]+0x1c0)||undefined reference to `QuickGUI::TextUser::setHorizontalTextAlignment(QuickGUI::HorizontalTextAlignment)'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o:(.rodata._ZTVN8QuickGUI8ComboBoxE[vtable for QuickGUI::ComboBox]+0x1c8)||undefined reference to `QuickGUI::TextUser::setTextColor(Ogre::ColourValue const&)'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o:(.rodata._ZTVN8QuickGUI8ComboBoxE[vtable for QuickGUI::ComboBox]+0x1e0)||undefined reference to `QuickGUI::TextUser::onTextChanged()'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o:(.rodata._ZTIN8QuickGUI8ComboBoxE[typeinfo for QuickGUI::ComboBox]+0x28)||undefined reference to `typeinfo for QuickGUI::TextUser'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o:(.rodata._ZTIN8QuickGUI12ComboBoxDescE[typeinfo for QuickGUI::ComboBoxDesc]+0x28)||undefined reference to `typeinfo for QuickGUI::TextUserDesc'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o||In function `QuickGUI::ListTextItem::_initialize(QuickGUI::WidgetDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIListTextItem.cpp|68|undefined reference to `QuickGUI::TextUser::_initialize(QuickGUI::Widget*, QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o||In function `~ListTextItem':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIListTextItem.cpp|52|undefined reference to `QuickGUI::TextUser::~TextUser()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIListTextItem.cpp|52|undefined reference to `QuickGUI::TextUser::~TextUser()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIListTextItem.cpp|52|undefined reference to `QuickGUI::TextUser::~TextUser()'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o||In function `ListTextItem':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIListTextItem.cpp|45|undefined reference to `QuickGUI::TextUser::TextUser()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIListTextItem.cpp|48|undefined reference to `QuickGUI::TextUser::~TextUser()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIListTextItem.cpp|45|undefined reference to `QuickGUI::TextUser::TextUser()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIListTextItem.cpp|48|undefined reference to `QuickGUI::TextUser::~TextUser()'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o||In function `QuickGUI::ListTextItemDesc::serialize(QuickGUI::SerialBase*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIListTextItem.cpp|40|undefined reference to `QuickGUI::TextUserDesc::serialize(QuickGUI::SerialBase*)'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o||In function `QuickGUI::ListTextItemDesc::resetToDefault()':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIListTextItem.cpp|31|undefined reference to `QuickGUI::TextUserDesc::resetToDefault()'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o||In function `ListTextItemDesc':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIListTextItem.cpp|20|undefined reference to `QuickGUI::TextUserDesc::TextUserDesc()'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIListTextItem.cpp|20|undefined reference to `QuickGUI::TextUserDesc::TextUserDesc()'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o:(.rodata._ZTVN8QuickGUI12ListTextItemE[vtable for QuickGUI::ListTextItem]+0x1a8)||undefined reference to `QuickGUI::TextUser::getHorizontalTextAlignment()'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o:(.rodata._ZTVN8QuickGUI12ListTextItemE[vtable for QuickGUI::ListTextItem]+0x1b0)||undefined reference to `QuickGUI::TextUser::setFont(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o:(.rodata._ZTVN8QuickGUI12ListTextItemE[vtable for QuickGUI::ListTextItem]+0x1b8)||undefined reference to `QuickGUI::TextUser::setHorizontalTextAlignment(QuickGUI::HorizontalTextAlignment)'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o:(.rodata._ZTVN8QuickGUI12ListTextItemE[vtable for QuickGUI::ListTextItem]+0x1c0)||undefined reference to `QuickGUI::TextUser::setTextColor(Ogre::ColourValue const&)'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o:(.rodata._ZTVN8QuickGUI12ListTextItemE[vtable for QuickGUI::ListTextItem]+0x1d8)||undefined reference to `QuickGUI::TextUser::onTextChanged()'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o:(.rodata._ZTIN8QuickGUI12ListTextItemE[typeinfo for QuickGUI::ListTextItem]+0x28)||undefined reference to `typeinfo for QuickGUI::TextUser'|
obj/Debug/libs/QuickGUI/QuickGUIListTextItem.o:(.rodata._ZTIN8QuickGUI16ListTextItemDescE[typeinfo for QuickGUI::ListTextItemDesc]+0x28)||undefined reference to `typeinfo for QuickGUI::TextUserDesc'|
obj/Debug/libs/QuickGUI/QuickGUIMenu.o:(.rodata._ZTVN8QuickGUI4MenuE[vtable for QuickGUI::Menu]+0x1e0)||undefined reference to `QuickGUI::TextUser::getHorizontalTextAlignment()'|
obj/Debug/libs/QuickGUI/QuickGUIMenu.o:(.rodata._ZTVN8QuickGUI4MenuE[vtable for QuickGUI::Menu]+0x1e8)||undefined reference to `QuickGUI::TextUser::setFont(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|

kungfoomasta

07-04-2009 23:53:34

I've updated the wiki to show how this is done, but here is another example:

SheetDesc* sd = DescManager::getSingleton().getDefaultSheetDesc();
sd->resetToDefault();
Sheet* mySheet = new Sheet(sd);


Regarding your errors, it looks like everything that needs to include "QuickGUITextUser.h" is failing. Is that included into your build process?

Calder

08-04-2009 00:06:59

Oh jeez, sorry to bug you with that, I was being stupid. That was a new file added since the last release and I thought I'd recursively re-added all the new files, but apparently I hadn't. Sorry for wasting your time!

Calder

08-04-2009 01:46:21

BTW, do you know of any particular reason why I would get a segfault when deleting certain sheets? I could include the files if that would help...

GUIloop.cpp:

#include "QuickGUI.h"
using namespace QuickGUI;

#include "gui.h"
#include "gui/GUIloop.h"


// Begin GUILoop
GUILoop::GUILoop (GUI* tGUI)
{
gui = tGUI;

SheetDesc* sd = DescManager::getSingletonPtr()->getDefaultSheetDesc();
sd->resetToDefault();
sheet = new Sheet(sd);
gui->mGuiMgr->setActiveSheet(sheet);
}

GUILoop::~GUILoop ()
{
delete sheet;
}
// End GUILoop


GUImain.cpp: (The one that works fine)

#include <string>
using namespace std;

#include "QuickGUI.h"
using namespace QuickGUI;

#include "gui.h"
#include "GUImain.h"


// Begin GUIMain
GUIMain::GUIMain (GUI* tGUI) : GUILoop(tGUI)
{
name = "Main";
//--------------------
gui->mEdit = true;
gui->setBrushShape(1);
gui->setBrushSize(8);
gui->roofHeight = gui->getTerrainDimensions()->y/2;
gui->floorHeight = gui->getTerrainDimensions()->y/-2;
//--------------------
makeBrushPallete();
}

GUIMain::~GUIMain ()
{
}

// Sheet Creation
void GUIMain::makeBrushPallete ()
{
DescManager* dMan = DescManager::getSingletonPtr();
WindowDesc* wd;
TabControlDesc* tcd;
ButtonDesc* bd;
LabelDesc* ld;
HScrollBarDesc* sd;
int inum = 0;
int vert = 0;

wd = dMan->getDefaultWindowDesc();
wd->resetToDefault();
wd->window_titleBarCloseButton = false;
wd->window_titleBarDragable = false;
wd->textDesc.horizontalTextAlignment = TEXT_ALIGNMENT_HORIZONTAL_CENTER;
wd->textDesc.segments.push_back(TextSegment("Brushes"));
wd->widget_visible = true;
wd->widget_resizeFromBottom = false;
wd->widget_resizeFromLeft = false;
wd->widget_resizeFromRight = false;
wd->widget_resizeFromTop = false;
wd->widget_dimensions.size = Size(220,gui->height-20);
wd->widget_dimensions.position = Point(10,10);
wd->widget_relativeOpacity = 0.7;
wBrushes = sheet->createWindow(wd);

tcd = dMan->getDefaultTabControlDesc();
tcd->resetToDefault();
tcd->tabcontrol_selectedTab = 1;
tcd->tabcontrol_tabHeight = 10;
tcd->tabcontrol_tabOverlap = 5;
tcd->tabcontrol_tabReordering = false;
tcd->widget_dimensions.size = Size(200,400);
tcd->widget_dimensions.position = Point(0,vert);
tcBrushType = wBrushes->createTabControl(tcd);
vert+=30;

tNormal = tcBrushType->createTabPage("Normal");
tSmooth = tcBrushType->createTabPage("Smooth");
tTexture = tcBrushType->createTabPage("Texture");
tcBrushType->selectTabPage(tNormal);
//tcBrushType->addTabControlEventHandler(TABCONTROL_EVENT_SELECTION_CHANGED, &GUIMain::onBrushTypeChange, this);

ld = dMan->getDefaultLabelDesc();
ld->resetToDefault();
ld->textDesc.segments.push_back(TextSegment("Brush Size: Small"));
ld->widget_dimensions.size = Size(140,15);
ld->widget_dimensions.position = Point(10,vert);
lBrushSize = tNormal->createLabel(ld); inum = 0;
vert+=20;

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Small"));
bd->widget_dimensions.size = Size(40,40);
bd->widget_dimensions.position = Point(10+inum*50,vert);
bBrushSmall = tNormal->createButton(bd); inum++;
bBrushSmall->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMain::onBrushSizeSmallClick, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Medium"));
bd->widget_dimensions.size = Size(40,40);
bd->widget_dimensions.position = Point(10+inum*50,vert);
bBrushMedium = tNormal->createButton(bd); inum++;
bBrushMedium->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMain::onBrushSizeMediumClick, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Large"));
bd->widget_dimensions.size = Size(40,40);
bd->widget_dimensions.position = Point(10+inum*50,vert);
bBrushLarge = tNormal->createButton(bd); inum++;
bBrushLarge->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMain::onBrushSizeLargeClick, this);
vert+=60;

ld = dMan->getDefaultLabelDesc();
ld->resetToDefault();
ld->textDesc.segments.push_back(TextSegment("Brush Shape: Peak"));
ld->widget_dimensions.size = Size(140,15);
ld->widget_dimensions.position = Point(10,vert);
lBrushShape = tNormal->createLabel(ld); inum = 0;
vert+=20;

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Peak"));
bd->widget_dimensions.size = Size(40,40);
bd->widget_dimensions.position = Point(10+inum*50,vert);
bBrushPeak = tNormal->createButton(bd); inum++;
bBrushPeak->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMain::onBrushShapePeakClick, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Hill"));
bd->widget_dimensions.size = Size(40,40);
bd->widget_dimensions.position = Point(10+inum*50,vert);
bBrushSinwave = tNormal->createButton(bd); inum++;
bBrushSinwave->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMain::onBrushShapeHillClick, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Cliff"));
bd->widget_dimensions.size = Size(40,40);
bd->widget_dimensions.position = Point(10+inum*50,vert);
bBrushFlat = tNormal->createButton(bd); inum++;
bBrushFlat->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMain::onBrushShapeCliffClick, this);
vert+=60;

ld = dMan->getDefaultLabelDesc();
ld->resetToDefault();
ld->textDesc.segments.push_back(TextSegment("Brush Intensity: 1"));
ld->widget_dimensions.size = Size(140,15);
ld->widget_dimensions.position = Point(10,vert);
lBrushIntensity = tNormal->createLabel(ld);
vert+=20;

sd = dMan->getDefaultHScrollBarDesc();
sd->resetToDefault();
sd->hscrollbar_scrollBarButtonLayout = HSCROLL_BAR_BUTTON_LAYOUT_NONE;
sd->widget_dimensions.size = Size(140,15);
sd->widget_dimensions.position = Point(10,vert);
sBrushIntensity = tNormal->createHScrollBar(sd);
sBrushIntensity->setPercentage((1-sBrushIntensity->getSliderWidthPercentage())/2);
sBrushIntensity->addScrollBarEventHandler(SCROLLBAR_EVENT_ON_SCROLLED, &GUIMain::onBrushIntensityScroll, this);
vert+=30;

ld = dMan->getDefaultLabelDesc();
ld->resetToDefault();
ld->textDesc.segments.push_back(TextSegment("Roof Height: "));
ld->widget_dimensions.size = Size(140,15);
ld->widget_dimensions.position = Point(10,vert);
lRoofHeight = tNormal->createLabel(ld);
vert+=20;

sd = dMan->getDefaultHScrollBarDesc();
sd->resetToDefault();
sd->hscrollbar_scrollBarButtonLayout = HSCROLL_BAR_BUTTON_LAYOUT_NONE;
sd->widget_dimensions.size = Size(140,15);
sd->widget_dimensions.position = Point(10,vert);
sRoofHeight = tNormal->createHScrollBar(sd);
sRoofHeight->setPercentage(1);
sRoofHeight->addScrollBarEventHandler(SCROLLBAR_EVENT_ON_SCROLLED, &GUIMain::onRoofHeightScroll, this);
vert+=20;

ld = dMan->getDefaultLabelDesc();
ld->resetToDefault();
ld->textDesc.segments.push_back(TextSegment("Floor Height: "));
ld->widget_dimensions.size = Size(140,15);
ld->widget_dimensions.position = Point(10,vert);
lFloorHeight = tNormal->createLabel(ld);
vert+=20;

sd = dMan->getDefaultHScrollBarDesc();
sd->resetToDefault();
sd->hscrollbar_scrollBarButtonLayout = HSCROLL_BAR_BUTTON_LAYOUT_NONE;
sd->widget_dimensions.size = Size(140,15);
sd->widget_dimensions.position = Point(10,vert);
sFloorHeight = tNormal->createHScrollBar(sd);
sFloorHeight->setPercentage(0);
sFloorHeight->addScrollBarEventHandler(SCROLLBAR_EVENT_ON_SCROLLED, &GUIMain::onFloorHeightScroll, this);
vert+=20;

onRoofHeightScroll(EventArgs());
onFloorHeightScroll(EventArgs());
}

// Event Handlers
/*
void GUIMain::onBrushTypeNormalClick (const EventArgs& args)
{
lBrushType->clearText();
lBrushType->addText("Brush Type: Normal");
}

void GUIMain::onBrushTypeSmoothClick (const EventArgs& args)
{
lBrushType->clearText();
lBrushType->addText("Brush Type: Smooth");
}

void GUIMain::onBrushTypeTextureClick (const EventArgs& args)
{
lBrushType->clearText();
lBrushType->addText("Brush Type: Texture");
}
*/

void GUIMain::onBrushSizeSmallClick (const EventArgs& args)
{
lBrushSize->clearText();
lBrushSize->addText("Brush Size: Small");
gui->setBrushSize(8);
}

void GUIMain::onBrushSizeMediumClick (const EventArgs& args)
{
lBrushSize->clearText();
lBrushSize->addText("Brush Size: Medium");
gui->setBrushSize(16);
}

void GUIMain::onBrushSizeLargeClick (const EventArgs& args)
{
lBrushSize->clearText();
lBrushSize->addText("Brush Size: Large");
gui->setBrushSize(32);
}

void GUIMain::onBrushShapePeakClick (const EventArgs& args)
{
lBrushShape->clearText();
lBrushShape->addText("Brush Shape: Peak");
gui->setBrushShape(1);
}

void GUIMain::onBrushShapeHillClick (const EventArgs& args)
{
lBrushShape->clearText();
lBrushShape->addText("Brush Shape: Hill");
gui->setBrushShape(2);
}

void GUIMain::onBrushShapeCliffClick (const EventArgs& args)
{
lBrushShape->clearText();
lBrushShape->addText("Brush Shape: Cliff");
gui->setBrushShape(3);
}

void GUIMain::onBrushIntensityScroll (const EventArgs& args)
{
float strength = floor(pow(10, -1+2*floor((sBrushIntensity->getPercentage()/(1-sBrushIntensity->getSliderWidthPercentage()))*100+0.5)/100)*100+0.5)/100;
gui->kDeformSpeed = strength;
lBrushIntensity->clearText();
stringstream out;
out << strength;
lBrushIntensity->addText("Brush Intensity: "+out.str());
}

void GUIMain::onRoofHeightScroll (const EventArgs& args)
{
float maxHeight = gui->getTerrainDimensions()->y;
float sliderPart = floor(sRoofHeight->getPercentage()/(1-sRoofHeight->getSliderWidthPercentage()) *100+0.5) / 100;
int height = floor(maxHeight*(-0.5+sliderPart)+0.5);
gui->setRoofHeight(height);
lRoofHeight->clearText();
stringstream out;
out << height;
lRoofHeight->addText("Roof Height: "+out.str());
}

void GUIMain::onFloorHeightScroll (const EventArgs& args)
{
float maxHeight = gui->getTerrainDimensions()->y;
float sliderPart = floor(sFloorHeight->getPercentage()/(1-sFloorHeight->getSliderWidthPercentage()) *100+0.5) / 100;
int height = floor(maxHeight*(-0.5+sliderPart)+0.5);
gui->setFloorHeight(height);
lFloorHeight->clearText();
stringstream out;
out << height;
lFloorHeight->addText("Floor Height: "+out.str());
}

// End GUIMain


GUImenu.cpp: (The one that doesn't)

#include <string>
using namespace std;

#include "QuickGUI.h"
using namespace QuickGUI;

#include "gui.h"
#include "GUImenu.h"


// Begin GUIMenu
GUIMenu::GUIMenu (GUI* tGUI) : GUILoop(tGUI)
{
name = "Menu";
//------------------
gui->mEdit = false;
//------------------
makeMenu();
makeSaveWindow();
makeReplaceWindow();
makeLoadWindow();
}

GUIMenu::~GUIMenu ()
{
}

// Sheet Creation
void GUIMenu::makeMenu ()
{
DescManager* dMan = DescManager::getSingletonPtr();
int inum = 0;
ModalWindowDesc* mwd;
ButtonDesc* bd;

mwd = dMan->getDefaultModalWindowDesc();
mwd->resetToDefault();
mwd->window_titleBarCloseButton = false;
mwd->window_titleBarDragable = false;
mwd->textDesc.horizontalTextAlignment = TEXT_ALIGNMENT_HORIZONTAL_CENTER;
mwd->textDesc.segments.push_back(TextSegment("Main Menu"));
mwd->widget_visible = true;
mwd->widget_resizeFromBottom = false;
mwd->widget_resizeFromLeft = false;
mwd->widget_resizeFromRight = false;
mwd->widget_resizeFromTop = false;
mwd->widget_dimensions.size = Size(200,400);
mwd->widget_dimensions.position = Point(300,150);
mwd->widget_relativeOpacity = 0.7;
wMenu = sheet->createModalWindow(mwd);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Save"));
bd->widget_dimensions.size = Size(160,40);
bd->widget_dimensions.position = Point(10,10+50*inum);
bSave = wMenu->createButton(bd); inum++;
bSave->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onSaveButtonClick, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Load"));
bd->widget_dimensions.size = Size(160,40);
bd->widget_dimensions.position = Point(10,10+50*inum);
bLoad = wMenu->createButton(bd); inum++;
bLoad->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onLoadButtonClick, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Map Options"));
bd->widget_dimensions.size = Size(160,40);
bd->widget_dimensions.position = Point(10,10+50*inum);
bLoad = wMenu->createButton(bd); inum++;
bLoad->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onMapOptionsButtonClick, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Editor Options"));
bd->widget_dimensions.size = Size(160,40);
bd->widget_dimensions.position = Point(10,10+50*inum);
bLoad = wMenu->createButton(bd); inum++;
bLoad->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onEditorOptionsButtonClick, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Exit"));
bd->widget_dimensions.size = Size(160,40);
bd->widget_dimensions.position = Point(10,10+50*inum);
bExit = wMenu->createButton(bd); inum++;
bExit->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onExitButtonClick, this);
}

void GUIMenu::makeSaveWindow ()
{
DescManager* dMan = DescManager::getSingletonPtr();
ModalWindowDesc* mwd;
LabelDesc* ld;
TextBoxDesc* td;
ButtonDesc* bd;

mwd = dMan->getDefaultModalWindowDesc();
mwd->resetToDefault();
mwd->window_titleBarCloseButton = false;
mwd->window_titleBarDragable = false;
mwd->textDesc.horizontalTextAlignment = TEXT_ALIGNMENT_HORIZONTAL_CENTER;
mwd->textDesc.segments.push_back(TextSegment("Save Map As"));
mwd->widget_visible = false;
mwd->widget_resizeFromBottom = false;
mwd->widget_resizeFromLeft = false;
mwd->widget_resizeFromRight = false;
mwd->widget_resizeFromTop = false;
mwd->widget_dimensions.size = Size(300,300);
mwd->widget_dimensions.position = Point(250,200);
mwd->widget_relativeOpacity = 1.0;
wSave = sheet->createModalWindow(mwd);

ld = dMan->getDefaultLabelDesc();
ld->resetToDefault();
ld->textDesc.segments.push_back(TextSegment("File Name: "));
ld->widget_dimensions.size = Size(100,20);
ld->widget_dimensions.position = Point(10,10);
wSave_lFileName = wSave->createLabel(ld);

td = dMan->getDefaultTextBoxDesc();
td->resetToDefault();
td->widget_dimensions.size = Size(150,20);
td->widget_dimensions.position = Point(110,10);
wSave_tFileName = wSave->createTextBox(td);
wSave_tFileName->addWidgetEventHandler(WIDGET_EVENT_KEY_DOWN, &GUIMenu::onSaveWindowFileNameChange, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Save"));
bd->widget_dimensions.size = Size(140,40);
bd->widget_dimensions.position = Point(10,210);
wSave_bSave = wSave->createButton(bd);
wSave_bSave->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onSaveWindowSaveClick, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Cancel"));
bd->widget_dimensions.size = Size(100,40);
bd->widget_dimensions.position = Point(160,210);
wSave_bCancel = wSave->createButton(bd);
wSave_bCancel->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onSaveWindowCancelClick, this);

onSaveWindowFileNameChange(EventArgs());
}

void GUIMenu::makeReplaceWindow ()
{
DescManager* dMan = DescManager::getSingletonPtr();
ModalWindowDesc* mwd;
LabelDesc* ld;
ButtonDesc* bd;

mwd = dMan->getDefaultModalWindowDesc();
mwd->resetToDefault();
mwd->window_titleBarCloseButton = false;
mwd->window_titleBarDragable = false;
mwd->textDesc.horizontalTextAlignment = TEXT_ALIGNMENT_HORIZONTAL_CENTER;
mwd->textDesc.segments.push_back(TextSegment("Overwrite Map?"));
mwd->widget_visible = false;
mwd->widget_resizeFromBottom = false;
mwd->widget_resizeFromLeft = false;
mwd->widget_resizeFromRight = false;
mwd->widget_resizeFromTop = false;
mwd->widget_dimensions.size = Size(300,200);
mwd->widget_dimensions.position = Point(250,200);
mwd->widget_relativeOpacity = 1.0;
wReplace = sheet->createModalWindow(mwd);

ld = dMan->getDefaultLabelDesc();
ld->resetToDefault();
ld->textDesc.segments.push_back(TextSegment("Are you sure you want to overwrite the map ''?"));
ld->widget_dimensions.size = Size(230,40);
ld->widget_dimensions.position = Point(10,10);
wReplace_lWarning = wReplace->createLabel(ld);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Replace"));
bd->widget_dimensions.size = Size(120,40);
bd->widget_dimensions.position = Point(10,110);
wReplace_bReplace = wReplace->createButton(bd);
wReplace_bReplace->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onReplaceWindowReplaceClick, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Cancel"));
bd->widget_dimensions.size = Size(120,40);
bd->widget_dimensions.position = Point(140,110);
wReplace_bCancel = wReplace->createButton(bd);
wReplace_bCancel->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onReplaceWindowCancelClick, this);
}

void GUIMenu::makeLoadWindow ()
{
DescManager* dMan = DescManager::getSingletonPtr();
ModalWindowDesc* mwd;
LabelDesc* ld;
TextBoxDesc* td;
ButtonDesc* bd;

mwd = dMan->getDefaultModalWindowDesc();
mwd->resetToDefault();
mwd->window_titleBarCloseButton = false;
mwd->window_titleBarDragable = false;
mwd->textDesc.horizontalTextAlignment = TEXT_ALIGNMENT_HORIZONTAL_CENTER;
mwd->textDesc.segments.push_back(TextSegment("Save Map As"));
mwd->widget_visible = false;
mwd->widget_resizeFromBottom = false;
mwd->widget_resizeFromLeft = false;
mwd->widget_resizeFromRight = false;
mwd->widget_resizeFromTop = false;
mwd->widget_dimensions.size = Size(300,300);
mwd->widget_dimensions.position = Point(250,200);
mwd->widget_relativeOpacity = 1.0;
wLoad = sheet->createModalWindow(mwd);

ld = dMan->getDefaultLabelDesc();
ld->resetToDefault();
ld->textDesc.segments.push_back(TextSegment("File Name: "));
ld->widget_dimensions.size = Size(100,20);
ld->widget_dimensions.position = Point(10,10);
wLoad_lFileName = wLoad->createLabel(ld);

td = dMan->getDefaultTextBoxDesc();
td->resetToDefault();
td->widget_dimensions.size = Size(150,20);
td->widget_dimensions.position = Point(110,10);
wLoad_tFileName = wLoad->createTextBox(td);
wLoad_tFileName->addWidgetEventHandler(WIDGET_EVENT_KEY_DOWN, &GUIMenu::onLoadWindowFileNameChange, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Load"));
bd->widget_dimensions.size = Size(140,40);
bd->widget_dimensions.position = Point(10,210);
wLoad_bLoad = wLoad->createButton(bd);
wLoad_bLoad->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onLoadWindowLoadClick, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Cancel"));
bd->widget_dimensions.size = Size(100,40);
bd->widget_dimensions.position = Point(160,210);
wLoad_bCancel = wLoad->createButton(bd);
wLoad_bCancel->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onLoadWindowCancelClick, this);

onLoadWindowFileNameChange(EventArgs());
}

void GUIMenu::makeOverloadWindow ()
{
DescManager* dMan = DescManager::getSingletonPtr();
ModalWindowDesc* mwd;
LabelDesc* ld;
ButtonDesc* bd;

mwd = dMan->getDefaultModalWindowDesc();
mwd->resetToDefault();
mwd->window_titleBarCloseButton = false;
mwd->window_titleBarDragable = false;
mwd->textDesc.horizontalTextAlignment = TEXT_ALIGNMENT_HORIZONTAL_CENTER;
mwd->textDesc.segments.push_back(TextSegment("Overwrite?"));
mwd->widget_visible = false;
mwd->widget_resizeFromBottom = false;
mwd->widget_resizeFromLeft = false;
mwd->widget_resizeFromRight = false;
mwd->widget_resizeFromTop = false;
mwd->widget_dimensions.size = Size(300,200);
mwd->widget_dimensions.position = Point(250,200);
mwd->widget_relativeOpacity = 1.0;
wOverload = sheet->createModalWindow(mwd);

ld = dMan->getDefaultLabelDesc();
ld->resetToDefault();
ld->textDesc.segments.push_back(TextSegment("Are you sure you want to load over the current map?"));
ld->widget_dimensions.size = Size(230,40);
ld->widget_dimensions.position = Point(10,10);
wOverload_lWarning = wOverload->createLabel(ld);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Load"));
bd->widget_dimensions.size = Size(120,40);
bd->widget_dimensions.position = Point(10,110);
wOverload_bLoad = wOverload->createButton(bd);
wOverload_bLoad->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onOverloadWindowLoadClick, this);

bd = dMan->getDefaultButtonDesc();
bd->resetToDefault();
bd->textDesc.segments.push_back(TextSegment("Cancel"));
bd->widget_dimensions.size = Size(120,40);
bd->widget_dimensions.position = Point(140,110);
wOverload_bCancel = wOverload->createButton(bd);
wOverload_bCancel->addWidgetEventHandler(WIDGET_EVENT_MOUSE_CLICK, &GUIMenu::onOverloadWindowCancelClick, this);
}

// Event Handlers
void GUIMenu::onSaveButtonClick (const EventArgs& args)
{
wMenu->setVisible(false);
wSave->setVisible(true);
wSave_tFileName->clearText();
}

void GUIMenu::onLoadButtonClick (const EventArgs& args)
{
wMenu->setVisible(false);
wLoad->setVisible(true);
wLoad_tFileName->clearText();
}

void GUIMenu::onMapOptionsButtonClick (const EventArgs& args)
{
}

void GUIMenu::onEditorOptionsButtonClick (const EventArgs& args)
{
}

void GUIMenu::onExitButtonClick (const EventArgs& args)
{
gui->mContinue = false;
}

void GUIMenu::onSaveWindowFileNameChange (const EventArgs& args)
{
if (wSave_tFileName->getText() == "")
{
wSave_bSave->setRelativeOpacity(0.5);
wSave_bSave->setEnabled(false);
}
else
{
wSave_bSave->setRelativeOpacity(1.0);
wSave_bSave->setEnabled(true);
}
}

void GUIMenu::onSaveWindowSaveClick (const EventArgs& args)
{
wSave->setVisible(false);

if (false)
{
wReplace_lWarning->clearText();
wReplace_lWarning->addText("Are you sure you want to overwrite the map '"+wSave_tFileName->getText()+"'?");
wReplace->setVisible(true);
}
else
{
gui->saveMap(wSave_tFileName->getText());
wMenu->setVisible(true);
}
}

void GUIMenu::onSaveWindowCancelClick (const EventArgs& args)
{
wSave->setVisible(false);
wMenu->setVisible(true);
}

void GUIMenu::onReplaceWindowReplaceClick (const EventArgs& args)
{
wReplace->setVisible(false);
gui->saveMap(wSave_tFileName->getText());
wMenu->setVisible(true);
}

void GUIMenu::onReplaceWindowCancelClick (const EventArgs& args)
{
wReplace->setVisible(false);
wSave->setVisible(true);
}

void GUIMenu::onLoadWindowLoadClick (const EventArgs& args)
{
wLoad->setVisible(false);
if (false)
{
wOverload->setVisible(true);
}
else
{
gui->loadMap(wLoad_tFileName->getText());
wMenu->setVisible(true);
}
}

void GUIMenu::onLoadWindowCancelClick (const EventArgs& args)
{
wLoad->setVisible(false);
wMenu->setVisible(true);
}

void GUIMenu::onLoadWindowFileNameChange (const EventArgs& args)
{
if (wLoad_tFileName->getText() == "")
{
wLoad_bLoad->setRelativeOpacity(0.5);
wLoad_bLoad->setEnabled(false);
}
else
{
wLoad_bLoad->setRelativeOpacity(1.0);
wLoad_bLoad->setEnabled(true);
}
}

void GUIMenu::onOverloadWindowLoadClick (const EventArgs& args)
{
wOverload->setVisible(false);
gui->loadMap(wLoad_tFileName->getText());
wMenu->setVisible(true);
}

void GUIMenu::onOverloadWindowCancelClick (const EventArgs& args)
{
wOverload->setVisible(false);
wLoad->setVisible(true);
}

// End GUIMenu


I've ascertained that the problem lies in the first and only line of ~GUILoop():
delete sheet;
But from there, I don't really know what's going wrong.

Thanks in advance for any help, I hope I'm not uselessly wasting inordinate amounts of your time... :S

-Calder

kungfoomasta

08-04-2009 08:29:54

Is there any way you can provide a call stack of some sort? Without being able to step through the code, its hard to see what the problem could be. And just to make sure, the Sheet is the first thing that is deleted? I'm wondering if its possible you have some other classes that destroy the Root, as this will destroy the Sheet for you. If the Sheet is destroyed before your call to destroy the Sheet, you'll be calling delete on a bad pointer. (again this is just one guess out of many.. callstack might help)

I've also updated the 9.04 zip in case you're interested, the editor was exposing some weird bugs related to scrolling, so I refactored scrolling, and cleaned up other code to reduce possible bugs. (and maybe introduce new ones :lol: )

Calder

08-04-2009 15:29:47

Ok, I'm not exactly sure how to get a call stack, but I ran it in GDB and got the following information:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f646e32a730 (LWP 14121)]
0x000000000053ff04 in QuickGUI::Window::removeWindowEventHandler (
this=0x7f64657c4460, EVENT=QuickGUI::WINDOW_EVENT_DRAWN,
obj=0x7f64657d6b60)
at /home/calder/Developer/editor/libs/QuickGUI/QuickGUIWindow.cpp:319
319 if((*it)->getClass() == obj)

kungfoomasta

08-04-2009 18:59:48

Ok I'm taking another stab at this, I'm going to guess the problem is related to the use of the TextBox. Can you verify that commenting out the TextBox removes the crash that occurs when trying to destroy the Sheet? If this is the problem, it should be easy for me to reproduce and figure out a fix for. TextBox and TextArea are the only widgets that call removeWindowEventHandler, and they do it on destruction, AFAIK.

Calder

08-04-2009 19:29:59

Ok, two things.

EDIT: Fixed and committed the first one.

Second, I tried commenting out the textboxes as you suggested, and that solved the problem. Hope that helps!

EDIT2: This seems to be a wider problem. I searched back through TextBox's inheritance, and realized that nowhere is mWindow actually initialized. Shouldn't the Widget constructor automatically call setParent?

EDIT3: I really hate to waste your time with this, and I could probably fix it myself if I understood what the heck these errors meant:

obj/Debug/libs/QuickGUI/QuickGUIButton.o:(.rodata._ZTVN8QuickGUI6ButtonE[vtable for QuickGUI::Button]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUICheckBox.o:(.rodata._ZTVN8QuickGUI8CheckBoxE[vtable for QuickGUI::CheckBox]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIColorPicker.o||In function `QuickGUI::ColorPicker::_initialize(QuickGUI::WidgetDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIColorPicker.cpp|73|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIColorPicker.o:(.rodata._ZTVN8QuickGUI11ColorPickerE[vtable for QuickGUI::ColorPicker]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o||In function `QuickGUI::ComboBox::createItem(QuickGUI::ListItemDesc*, int)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|342|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o||In function `QuickGUI::ComboBox::_initialize(QuickGUI::WidgetDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|160|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIComboBox.cpp|185|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIComboBox.o:(.rodata._ZTVN8QuickGUI8ComboBoxE[vtable for QuickGUI::ComboBox]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIComponentWidget.o:(.rodata._ZTVN8QuickGUI15ComponentWidgetE[vtable for QuickGUI::ComponentWidget]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIConsole.o||In function `QuickGUI::Console::_initialize(QuickGUI::WidgetDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIConsole.cpp|91|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIConsole.cpp|101|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIConsole.o:(.rodata._ZTVN8QuickGUI7ConsoleE[vtable for QuickGUI::Console]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIContainerWidget.o||In function `QuickGUI::ContainerWidget::_initialize(QuickGUI::WidgetDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIContainerWidget.cpp|146|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIContainerWidget.cpp|159|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIContainerWidget.o:(.rodata._ZTVN8QuickGUI15ContainerWidgetE[vtable for QuickGUI::ContainerWidget]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIContextMenu.o||In function `QuickGUI::ContextMenu::createMenuItem(QuickGUI::MenuItemDesc*, int)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIContextMenu.cpp|221|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIContextMenu.o:(.rodata._ZTVN8QuickGUI11ContextMenuE[vtable for QuickGUI::ContextMenu]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIHScrollBar.o||In function `QuickGUI::HScrollBar::_initialize(QuickGUI::WidgetDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIHScrollBar.cpp|277|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIHScrollBar.cpp|283|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIHScrollBar.cpp|290|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIHScrollBar.cpp|296|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIHScrollBar.cpp|304|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIHScrollBar.o:(.rodata._ZTVN8QuickGUI10HScrollBarE[vtable for QuickGUI::HScrollBar]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIImage.o:(.rodata._ZTVN8QuickGUI5ImageE[vtable for QuickGUI::Image]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUILabel.o:(.rodata._ZTVN8QuickGUI5LabelE[vtable for QuickGUI::Label]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIList.o||In function `QuickGUI::List::createItem(QuickGUI::ListItemDesc*, int)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIList.cpp|246|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIList.o:(.rodata._ZTVN8QuickGUI4ListE[vtable for QuickGUI::List]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIMenu.o||In function `QuickGUI::Menu::createItem(QuickGUI::MenuItemDesc*, int)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIMenu.cpp|263|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIMenu.o||In function `QuickGUI::Menu::_initialize(QuickGUI::WidgetDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIMenu.cpp|103|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIMenuPanel.o:(.rodata._ZTVN8QuickGUI9MenuPanelE[vtable for QuickGUI::MenuPanel]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIModalWindow.o:(.rodata._ZTVN8QuickGUI11ModalWindowE[vtable for QuickGUI::ModalWindow]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIPanel.o||In function `QuickGUI::Panel::createVScrollBar(QuickGUI::VScrollBarDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIPanel.cpp|812|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIPanel.o||In function `QuickGUI::Panel::createTreeView(QuickGUI::TreeViewDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIPanel.cpp|775|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIPanel.o||In function `QuickGUI::Panel::createToolBar(QuickGUI::ToolBarDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIPanel.cpp|738|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIPanel.o||In function `QuickGUI::Panel::createTextBox(QuickGUI::TextBoxDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIPanel.cpp|701|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIPanel.o||In function `QuickGUI::Panel::createTextArea(QuickGUI::TextAreaDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIPanel.cpp|664|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIPanel.o:/home/calder/Developer/editor/libs/QuickGUI/QuickGUIPanel.cpp|627|more undefined references to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)' follow|
obj/Debug/libs/QuickGUI/QuickGUIPanel.o:(.rodata._ZTVN8QuickGUI5PanelE[vtable for QuickGUI::Panel]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIProgressBar.o:(.rodata._ZTVN8QuickGUI11ProgressBarE[vtable for QuickGUI::ProgressBar]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIPropertyGrid.o||In function `QuickGUI::PropertyGrid::createSection(QuickGUI::PropertyGridSectionDesc*, int)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIPropertyGrid.cpp|189|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIPropertyGrid.o:(.rodata._ZTVN8QuickGUI12PropertyGridE[vtable for QuickGUI::PropertyGrid]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIPropertyGridBoolProperty.o||In function `QuickGUI::PropertyGridBoolProperty::_initialize(QuickGUI::WidgetDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIPropertyGridBoolProperty.cpp|62|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIPropertyGridBoolProperty.o:(.rodata._ZTVN8QuickGUI24PropertyGridBoolPropertyE[vtable for QuickGUI::PropertyGridBoolProperty]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIPropertyGridComboBoxProperty.o:(.rodata._ZTVN8QuickGUI28PropertyGridComboBoxPropertyE[vtable for QuickGUI::PropertyGridComboBoxProperty]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIPropertyGridItem.o:(.rodata._ZTVN8QuickGUI16PropertyGridItemE[vtable for QuickGUI::PropertyGridItem]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIPropertyGridSection.o||In function `QuickGUI::PropertyGridSection::createItem(QuickGUI::PropertyGridItemDesc*, int)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIPropertyGridSection.cpp|181|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIPropertyGridSection.o||In function `QuickGUI::PropertyGridSection::createStateButtonIfNotExists()':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIPropertyGridSection.cpp|164|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIPropertyGridSection.o:(.rodata._ZTVN8QuickGUI19PropertyGridSectionE[vtable for QuickGUI::PropertyGridSection]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
obj/Debug/libs/QuickGUI/QuickGUIPropertyGridTextProperty.o||In function `QuickGUI::PropertyGridTextProperty::_initialize(QuickGUI::WidgetDesc*)':|
/home/calder/Developer/editor/libs/QuickGUI/QuickGUIPropertyGridTextProperty.cpp|61|undefined reference to `QuickGUI::Widget::_createWidget(QuickGUI::WidgetDesc*)'|
obj/Debug/libs/QuickGUI/QuickGUIPropertyGridTextProperty.o:(.rodata._ZTVN8QuickGUI24PropertyGridTextPropertyE[vtable for QuickGUI::PropertyGridTextProperty]+0x38)||undefined reference to `QuickGUI::Widget::destroy()'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 7 warnings ===|

kungfoomasta

11-04-2009 00:01:40

It looks like certain parts of your enlistment are out of date, particularly QuickGUIWidget.h/.cpp.

I'm rusty and forget which API sets the mWindow reference. I recently added in a gaurd so that if mWindow is NULL, the TextBox does not try to remove the event handler. I haven't looked into this much in the last few days, most of the updates I've done were during extra cycles at work. :twisted:

Calder

11-04-2009 00:27:11

Sorry about the 'enlistment' problem. Although I don't know what that means, I took a stab and deleted all my compiled object files. That worked, but I could have sworn I'd done that at least twice already! :roll:

mWindow is automatically set by windows to point to themselves. Outside of that, it's only set in Widget's setParent function. I'll see if I can make it get called automatically in a Widget's constructor.

kungfoomasta

11-04-2009 00:55:47

Actually, the "setParent" function is called when a ContainerWidget adds a child, via the "addChild" method. Widgets do not have parent's initially, they're created along, and then become attached to other widgets, as children or components.

About the enlistment, I think you haven't updated to the latest SVN code, or your code is only partially updated for some reason.