Add final modifier to fix warnings

pull/2702/head
elsid 5 years ago
parent a0902bb98e
commit 650f429ff5
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -9,7 +9,7 @@ namespace MWGui
/** /**
* @brief A variant of MyGUI::ImageBox with aspect ratio correction using black bars * @brief A variant of MyGUI::ImageBox with aspect ratio correction using black bars
*/ */
class BackgroundImage : public MyGUI::ImageBox class BackgroundImage final : public MyGUI::ImageBox
{ {
MYGUI_RTTI_DERIVED(BackgroundImage) MYGUI_RTTI_DERIVED(BackgroundImage)
@ -22,8 +22,8 @@ namespace MWGui
*/ */
void setBackgroundImage (const std::string& image, bool fixedRatio=true, bool stretch=true); void setBackgroundImage (const std::string& image, bool fixedRatio=true, bool stretch=true);
virtual void setSize (const MyGUI::IntSize &_value); void setSize (const MyGUI::IntSize &_value) final;
virtual void setCoord (const MyGUI::IntCoord &_value); void setCoord (const MyGUI::IntCoord &_value) final;
private: private:
MyGUI::ImageBox* mChild; MyGUI::ImageBox* mChild;

@ -817,7 +817,7 @@ namespace
}; };
} }
class PageDisplay : public MyGUI::ISubWidgetText class PageDisplay final : public MyGUI::ISubWidgetText
{ {
MYGUI_RTTI_DERIVED(PageDisplay) MYGUI_RTTI_DERIVED(PageDisplay)
protected: protected:
@ -1140,7 +1140,7 @@ public:
i->second->createDrawItem (mNode); i->second->createDrawItem (mNode);
} }
void setVisible (bool newVisible) void setVisible (bool newVisible) final
{ {
if (mVisible == newVisible) if (mVisible == newVisible)
return; return;
@ -1162,7 +1162,7 @@ public:
} }
} }
void createDrawItem(MyGUI::ITexture* texture, MyGUI::ILayerNode* node) void createDrawItem(MyGUI::ITexture* texture, MyGUI::ILayerNode* node) final
{ {
mNode = node; mNode = node;
@ -1230,9 +1230,9 @@ public:
// ISubWidget should not necessarily be a drawitem // ISubWidget should not necessarily be a drawitem
// in this case, it is not... // in this case, it is not...
void doRender() { } void doRender() final { }
void _updateView () void _updateView () final
{ {
_checkMargin(); _checkMargin();
@ -1241,7 +1241,7 @@ public:
mNode->outOfDate (i->second->mRenderItem); mNode->outOfDate (i->second->mRenderItem);
} }
void _correctView() void _correctView() final
{ {
_checkMargin (); _checkMargin ();
@ -1251,7 +1251,7 @@ public:
} }
void destroyDrawItem() void destroyDrawItem() final
{ {
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i) for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
i->second->destroyDrawItem (mNode); i->second->destroyDrawItem (mNode);
@ -1261,7 +1261,7 @@ public:
}; };
class BookPageImpl : public BookPage class BookPageImpl final : public BookPage
{ {
MYGUI_RTTI_DERIVED(BookPage) MYGUI_RTTI_DERIVED(BookPage)
public: public:
@ -1271,24 +1271,24 @@ public:
{ {
} }
void showPage (TypesetBook::Ptr book, size_t page) void showPage (TypesetBook::Ptr book, size_t page) final
{ {
mPageDisplay->showPage (book, page); mPageDisplay->showPage (book, page);
} }
void adviseLinkClicked (std::function <void (InteractiveId)> linkClicked) void adviseLinkClicked (std::function <void (InteractiveId)> linkClicked) final
{ {
mPageDisplay->mLinkClicked = linkClicked; mPageDisplay->mLinkClicked = linkClicked;
} }
void unadviseLinkClicked () void unadviseLinkClicked () final
{ {
mPageDisplay->mLinkClicked = std::function <void (InteractiveId)> (); mPageDisplay->mLinkClicked = std::function <void (InteractiveId)> ();
} }
protected: protected:
virtual void initialiseOverride() void initialiseOverride() final
{ {
Base::initialiseOverride(); Base::initialiseOverride();
@ -1302,24 +1302,24 @@ protected:
} }
} }
void onMouseLostFocus(Widget* _new) void onMouseLostFocus(Widget* _new) final
{ {
// NOTE: MyGUI also fires eventMouseLostFocus for widgets that are about to be destroyed (if they had focus). // NOTE: MyGUI also fires eventMouseLostFocus for widgets that are about to be destroyed (if they had focus).
// Child widgets may already be destroyed! So be careful. // Child widgets may already be destroyed! So be careful.
mPageDisplay->onMouseLostFocus (); mPageDisplay->onMouseLostFocus ();
} }
void onMouseMove(int left, int top) void onMouseMove(int left, int top) final
{ {
mPageDisplay->onMouseMove (left, top); mPageDisplay->onMouseMove (left, top);
} }
void onMouseButtonPressed (int left, int top, MyGUI::MouseButton id) void onMouseButtonPressed (int left, int top, MyGUI::MouseButton id) final
{ {
mPageDisplay->onMouseButtonPressed (left, top, id); mPageDisplay->onMouseButtonPressed (left, top, id);
} }
void onMouseButtonReleased(int left, int top, MyGUI::MouseButton id) void onMouseButtonReleased(int left, int top, MyGUI::MouseButton id) final
{ {
mPageDisplay->onMouseButtonReleased (left, top, id); mPageDisplay->onMouseButtonReleased (left, top, id);
} }

@ -14,14 +14,14 @@ namespace MWGui
namespace Controllers namespace Controllers
{ {
/// Automatically positions a widget below the mouse cursor. /// Automatically positions a widget below the mouse cursor.
class ControllerFollowMouse : class ControllerFollowMouse final :
public MyGUI::ControllerItem public MyGUI::ControllerItem
{ {
MYGUI_RTTI_DERIVED( ControllerFollowMouse ) MYGUI_RTTI_DERIVED( ControllerFollowMouse )
private: private:
bool addTime(MyGUI::Widget* _widget, float _time); bool addTime(MyGUI::Widget* _widget, float _time) final;
void prepareItem(MyGUI::Widget* _widget); void prepareItem(MyGUI::Widget* _widget) final;
}; };
} }
} }

@ -11,7 +11,7 @@ namespace MWGui
/// ResourceImageSetPointer that we need. /// ResourceImageSetPointer that we need.
/// \example MyGUI::FactoryManager::getInstance().registerFactory<ResourceImageSetPointerFix>("Resource", "ResourceImageSetPointer"); /// \example MyGUI::FactoryManager::getInstance().registerFactory<ResourceImageSetPointerFix>("Resource", "ResourceImageSetPointer");
/// MyGUI::ResourceManager::getInstance().load("core.xml"); /// MyGUI::ResourceManager::getInstance().load("core.xml");
class ResourceImageSetPointerFix : class ResourceImageSetPointerFix final :
public MyGUI::IPointer public MyGUI::IPointer
{ {
MYGUI_RTTI_DERIVED( ResourceImageSetPointerFix ) MYGUI_RTTI_DERIVED( ResourceImageSetPointerFix )
@ -20,17 +20,17 @@ namespace MWGui
ResourceImageSetPointerFix(); ResourceImageSetPointerFix();
virtual ~ResourceImageSetPointerFix(); virtual ~ResourceImageSetPointerFix();
virtual void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version); void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version) final;
virtual void setImage(MyGUI::ImageBox* _image); void setImage(MyGUI::ImageBox* _image) final;
virtual void setPosition(MyGUI::ImageBox* _image, const MyGUI::IntPoint& _point); void setPosition(MyGUI::ImageBox* _image, const MyGUI::IntPoint& _point) final;
//and now for the whole point of this class, allow us to get //and now for the whole point of this class, allow us to get
//the hot spot, the image and the size of the cursor. //the hot spot, the image and the size of the cursor.
virtual MyGUI::ResourceImageSetPtr getImageSet(); MyGUI::ResourceImageSetPtr getImageSet();
virtual MyGUI::IntPoint getHotSpot(); MyGUI::IntPoint getHotSpot();
virtual MyGUI::IntSize getSize(); MyGUI::IntSize getSize();
virtual int getRotation(); int getRotation();
private: private:
MyGUI::IntPoint mPoint; MyGUI::IntPoint mPoint;

@ -21,7 +21,7 @@ namespace MWGui
class ItemModel; class ItemModel;
class ItemWidget; class ItemWidget;
class ItemChargeView : public MyGUI::Widget class ItemChargeView final : public MyGUI::Widget
{ {
MYGUI_RTTI_DERIVED(ItemChargeView) MYGUI_RTTI_DERIVED(ItemChargeView)
public: public:
@ -36,7 +36,7 @@ namespace MWGui
/// Register needed components with MyGUI's factory manager /// Register needed components with MyGUI's factory manager
static void registerComponents(); static void registerComponents();
virtual void initialiseOverride(); void initialiseOverride() final;
/// Takes ownership of \a model /// Takes ownership of \a model
void setModel(ItemModel* model); void setModel(ItemModel* model);
@ -47,8 +47,8 @@ namespace MWGui
void layoutWidgets(); void layoutWidgets();
void resetScrollbars(); void resetScrollbars();
virtual void setSize(const MyGUI::IntSize& value); void setSize(const MyGUI::IntSize& value) final;
virtual void setCoord(const MyGUI::IntCoord& value); void setCoord(const MyGUI::IntCoord& value) final;
MyGUI::delegates::CMultiDelegate2<MyGUI::Widget*, const MWWorld::Ptr&> eventItemClicked; MyGUI::delegates::CMultiDelegate2<MyGUI::Widget*, const MWWorld::Ptr&> eventItemClicked;

@ -8,7 +8,7 @@
namespace MWGui namespace MWGui
{ {
class ItemView : public MyGUI::Widget class ItemView final : public MyGUI::Widget
{ {
MYGUI_RTTI_DERIVED(ItemView) MYGUI_RTTI_DERIVED(ItemView)
public: public:
@ -33,12 +33,12 @@ namespace MWGui
void resetScrollBars(); void resetScrollBars();
private: private:
virtual void initialiseOverride(); void initialiseOverride() final;
void layoutWidgets(); void layoutWidgets();
virtual void setSize(const MyGUI::IntSize& _value); void setSize(const MyGUI::IntSize& _value) final;
virtual void setCoord(const MyGUI::IntCoord& _value); void setCoord(const MyGUI::IntCoord& _value) final;
void onSelectedItem (MyGUI::Widget* sender); void onSelectedItem (MyGUI::Widget* sender);
void onSelectedBackground (MyGUI::Widget* sender); void onSelectedBackground (MyGUI::Widget* sender);

@ -41,7 +41,7 @@ namespace MWGui
void setFrame (const std::string& frame, const MyGUI::IntCoord& coord); void setFrame (const std::string& frame, const MyGUI::IntCoord& coord);
protected: protected:
virtual void initialiseOverride(); void initialiseOverride() final;
MyGUI::ImageBox* mItem; MyGUI::ImageBox* mItem;
MyGUI::ImageBox* mItemShadow; MyGUI::ImageBox* mItemShadow;

@ -54,7 +54,7 @@ namespace
/// @brief A widget that changes its color when hovered. /// @brief A widget that changes its color when hovered.
class MarkerWidget: public MyGUI::Widget class MarkerWidget final : public MyGUI::Widget
{ {
MYGUI_RTTI_DERIVED(MarkerWidget) MYGUI_RTTI_DERIVED(MarkerWidget)
@ -74,12 +74,12 @@ namespace
MyGUI::Colour mNormalColour; MyGUI::Colour mNormalColour;
MyGUI::Colour mHoverColour; MyGUI::Colour mHoverColour;
void onMouseLostFocus(MyGUI::Widget* _new) void onMouseLostFocus(MyGUI::Widget* _new) final
{ {
setColour(mNormalColour); setColour(mNormalColour);
} }
void onMouseSetFocus(MyGUI::Widget* _old) void onMouseSetFocus(MyGUI::Widget* _old) final
{ {
setColour(mHoverColour); setColour(mHoverColour);
} }

@ -5,12 +5,12 @@
namespace MWGui namespace MWGui
{ {
class AutoSizedResourceSkin : public MyGUI::ResourceSkin class AutoSizedResourceSkin final : public MyGUI::ResourceSkin
{ {
MYGUI_RTTI_DERIVED( AutoSizedResourceSkin ) MYGUI_RTTI_DERIVED( AutoSizedResourceSkin )
public: public:
virtual void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version); void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version) final;
}; };
} }

@ -19,7 +19,7 @@ namespace MWGui
class SpellModel; class SpellModel;
///@brief Displays a SpellModel in a list widget ///@brief Displays a SpellModel in a list widget
class SpellView : public MyGUI::Widget class SpellView final : public MyGUI::Widget
{ {
MYGUI_RTTI_DERIVED(SpellView) MYGUI_RTTI_DERIVED(SpellView)
public: public:
@ -47,10 +47,10 @@ namespace MWGui
/// Fired when a spell was clicked /// Fired when a spell was clicked
EventHandle_ModelIndex eventSpellClicked; EventHandle_ModelIndex eventSpellClicked;
virtual void initialiseOverride(); void initialiseOverride() final;
virtual void setSize(const MyGUI::IntSize& _value); void setSize(const MyGUI::IntSize& _value) final;
virtual void setCoord(const MyGUI::IntCoord& _value); void setCoord(const MyGUI::IntCoord& _value) final;
void resetScrollbars(); void resetScrollbars();

@ -90,7 +90,7 @@ namespace MWGui
typedef std::vector<SpellEffectParams> SpellEffectList; typedef std::vector<SpellEffectParams> SpellEffectList;
class MWSkill : public MyGUI::Widget class MWSkill final : public MyGUI::Widget
{ {
MYGUI_RTTI_DERIVED( MWSkill ) MYGUI_RTTI_DERIVED( MWSkill )
public: public:
@ -116,7 +116,7 @@ namespace MWGui
protected: protected:
virtual ~MWSkill(); virtual ~MWSkill();
virtual void initialiseOverride(); void initialiseOverride() final;
void onClicked(MyGUI::Widget* _sender); void onClicked(MyGUI::Widget* _sender);
@ -131,7 +131,7 @@ namespace MWGui
}; };
typedef MWSkill* MWSkillPtr; typedef MWSkill* MWSkillPtr;
class MWAttribute : public MyGUI::Widget class MWAttribute final : public MyGUI::Widget
{ {
MYGUI_RTTI_DERIVED( MWAttribute ) MYGUI_RTTI_DERIVED( MWAttribute )
public: public:
@ -156,7 +156,7 @@ namespace MWGui
protected: protected:
virtual ~MWAttribute(); virtual ~MWAttribute();
virtual void initialiseOverride(); void initialiseOverride() final;
void onClicked(MyGUI::Widget* _sender); void onClicked(MyGUI::Widget* _sender);
@ -175,7 +175,7 @@ namespace MWGui
* @todo remove this class and use MWEffectList instead * @todo remove this class and use MWEffectList instead
*/ */
class MWSpellEffect; class MWSpellEffect;
class MWSpell : public MyGUI::Widget class MWSpell final : public MyGUI::Widget
{ {
MYGUI_RTTI_DERIVED( MWSpell ) MYGUI_RTTI_DERIVED( MWSpell )
public: public:
@ -199,7 +199,7 @@ namespace MWGui
protected: protected:
virtual ~MWSpell(); virtual ~MWSpell();
virtual void initialiseOverride(); void initialiseOverride() final;
private: private:
void updateWidgets(); void updateWidgets();
@ -209,7 +209,7 @@ namespace MWGui
}; };
typedef MWSpell* MWSpellPtr; typedef MWSpell* MWSpellPtr;
class MWEffectList : public MyGUI::Widget class MWEffectList final : public MyGUI::Widget
{ {
MYGUI_RTTI_DERIVED( MWEffectList ) MYGUI_RTTI_DERIVED( MWEffectList )
public: public:
@ -241,7 +241,7 @@ namespace MWGui
protected: protected:
virtual ~MWEffectList(); virtual ~MWEffectList();
virtual void initialiseOverride(); void initialiseOverride() final;
private: private:
void updateWidgets(); void updateWidgets();
@ -250,7 +250,7 @@ namespace MWGui
}; };
typedef MWEffectList* MWEffectListPtr; typedef MWEffectList* MWEffectListPtr;
class MWSpellEffect : public MyGUI::Widget class MWSpellEffect final : public MyGUI::Widget
{ {
MYGUI_RTTI_DERIVED( MWSpellEffect ) MYGUI_RTTI_DERIVED( MWSpellEffect )
public: public:
@ -265,7 +265,7 @@ namespace MWGui
protected: protected:
virtual ~MWSpellEffect(); virtual ~MWSpellEffect();
virtual void initialiseOverride(); void initialiseOverride() final;
private: private:
static const int sIconOffset = 24; static const int sIconOffset = 24;
@ -279,7 +279,7 @@ namespace MWGui
}; };
typedef MWSpellEffect* MWSpellEffectPtr; typedef MWSpellEffect* MWSpellEffectPtr;
class MWDynamicStat : public MyGUI::Widget class MWDynamicStat final : public MyGUI::Widget
{ {
MYGUI_RTTI_DERIVED( MWDynamicStat ) MYGUI_RTTI_DERIVED( MWDynamicStat )
public: public:
@ -294,7 +294,7 @@ namespace MWGui
protected: protected:
virtual ~MWDynamicStat(); virtual ~MWDynamicStat();
virtual void initialiseOverride(); void initialiseOverride() final;
private: private:

@ -14,7 +14,7 @@ namespace osgMyGUI
{ {
/// @brief A Layer rendering with additive blend mode. /// @brief A Layer rendering with additive blend mode.
class AdditiveLayer : public MyGUI::OverlappedLayer class AdditiveLayer final : public MyGUI::OverlappedLayer
{ {
public: public:
MYGUI_RTTI_DERIVED( AdditiveLayer ) MYGUI_RTTI_DERIVED( AdditiveLayer )
@ -22,7 +22,7 @@ namespace osgMyGUI
AdditiveLayer(); AdditiveLayer();
~AdditiveLayer(); ~AdditiveLayer();
virtual void renderToTarget(MyGUI::IRenderTarget* _target, bool _update); void renderToTarget(MyGUI::IRenderTarget* _target, bool _update) final;
private: private:
osg::ref_ptr<osg::StateSet> mStateSet; osg::ref_ptr<osg::StateSet> mStateSet;

@ -8,18 +8,18 @@ namespace osgMyGUI
///@brief A Layer that lays out and renders widgets in screen-relative coordinates. The "Size" property determines the size of the virtual screen, ///@brief A Layer that lays out and renders widgets in screen-relative coordinates. The "Size" property determines the size of the virtual screen,
/// which is then upscaled to the real screen size during rendering. The aspect ratio is kept intact, adding blanks to the sides when necessary. /// which is then upscaled to the real screen size during rendering. The aspect ratio is kept intact, adding blanks to the sides when necessary.
class ScalingLayer : public MyGUI::OverlappedLayer class ScalingLayer final : public MyGUI::OverlappedLayer
{ {
public: public:
MYGUI_RTTI_DERIVED(ScalingLayer) MYGUI_RTTI_DERIVED(ScalingLayer)
virtual void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version); void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version) final;
virtual MyGUI::ILayerItem* getLayerItemByPoint(int _left, int _top) const; MyGUI::ILayerItem* getLayerItemByPoint(int _left, int _top) const final;
virtual MyGUI::IntPoint getPosition(int _left, int _top) const; MyGUI::IntPoint getPosition(int _left, int _top) const final;
virtual void renderToTarget(MyGUI::IRenderTarget* _target, bool _update); void renderToTarget(MyGUI::IRenderTarget* _target, bool _update) final;
virtual void resizeView(const MyGUI::IntSize& _viewSize); void resizeView(const MyGUI::IntSize& _viewSize) final;
private: private:
void screenToLayerCoords(int& _left, int& _top) const; void screenToLayerCoords(int& _left, int& _top) const;

@ -44,11 +44,11 @@ namespace Gui
MYGUI_RTTI_DERIVED( AutoSizedTextBox ) MYGUI_RTTI_DERIVED( AutoSizedTextBox )
public: public:
virtual MyGUI::IntSize getRequestedSize(); MyGUI::IntSize getRequestedSize() final;
virtual void setCaption(const MyGUI::UString& _value); void setCaption(const MyGUI::UString& _value) final;
protected: protected:
virtual void setPropertyOverride(const std::string& _key, const std::string& _value); void setPropertyOverride(const std::string& _key, const std::string& _value) final;
std::string mFontSize; std::string mFontSize;
}; };
@ -58,14 +58,14 @@ namespace Gui
public: public:
virtual MyGUI::IntSize getRequestedSize(); MyGUI::IntSize getRequestedSize() final;
virtual void setCaption(const MyGUI::UString& _value); void setCaption(const MyGUI::UString& _value) final;
virtual void initialiseOverride(); void initialiseOverride() final;
protected: protected:
virtual void setPropertyOverride(const std::string& _key, const std::string& _value); void setPropertyOverride(const std::string& _key, const std::string& _value) final;
virtual int getWidth(); int getWidth();
std::string mFontSize; std::string mFontSize;
bool mShrink = false; bool mShrink = false;
bool mWasResized = false; bool mWasResized = false;
@ -77,11 +77,11 @@ namespace Gui
MYGUI_RTTI_DERIVED( AutoSizedButton ) MYGUI_RTTI_DERIVED( AutoSizedButton )
public: public:
virtual MyGUI::IntSize getRequestedSize(); MyGUI::IntSize getRequestedSize() final;
virtual void setCaption(const MyGUI::UString& _value); void setCaption(const MyGUI::UString& _value) final;
protected: protected:
virtual void setPropertyOverride(const std::string& _key, const std::string& _value); void setPropertyOverride(const std::string& _key, const std::string& _value) final;
std::string mFontSize; std::string mFontSize;
}; };
@ -114,7 +114,7 @@ namespace Gui
public: public:
Spacer(); Spacer();
virtual MyGUI::IntSize getRequestedSize() { return MyGUI::IntSize(0,0); } MyGUI::IntSize getRequestedSize() final { return MyGUI::IntSize(0,0); }
}; };
class HBox : public Box, public MyGUI::Widget class HBox : public Box, public MyGUI::Widget
@ -122,18 +122,18 @@ namespace Gui
MYGUI_RTTI_DERIVED( HBox ) MYGUI_RTTI_DERIVED( HBox )
public: public:
virtual void setSize (const MyGUI::IntSize &_value); void setSize (const MyGUI::IntSize &_value) final;
virtual void setCoord (const MyGUI::IntCoord &_value); void setCoord (const MyGUI::IntCoord &_value) final;
protected: protected:
virtual void initialiseOverride(); void initialiseOverride() final;
virtual void align(); void align() final;
virtual MyGUI::IntSize getRequestedSize(); MyGUI::IntSize getRequestedSize() final;
virtual void setPropertyOverride(const std::string& _key, const std::string& _value); void setPropertyOverride(const std::string& _key, const std::string& _value) final;
virtual void onWidgetCreated(MyGUI::Widget* _widget); void onWidgetCreated(MyGUI::Widget* _widget) final;
}; };
class VBox : public Box, public MyGUI::Widget class VBox : public Box, public MyGUI::Widget
@ -141,18 +141,18 @@ namespace Gui
MYGUI_RTTI_DERIVED( VBox) MYGUI_RTTI_DERIVED( VBox)
public: public:
virtual void setSize (const MyGUI::IntSize &_value); void setSize (const MyGUI::IntSize &_value) final;
virtual void setCoord (const MyGUI::IntCoord &_value); void setCoord (const MyGUI::IntCoord &_value) final;
protected: protected:
virtual void initialiseOverride(); void initialiseOverride() final;
virtual void align(); void align() final;
virtual MyGUI::IntSize getRequestedSize(); MyGUI::IntSize getRequestedSize() final;
virtual void setPropertyOverride(const std::string& _key, const std::string& _value); void setPropertyOverride(const std::string& _key, const std::string& _value) final;
virtual void onWidgetCreated(MyGUI::Widget* _widget); void onWidgetCreated(MyGUI::Widget* _widget) final;
}; };
} }

@ -9,7 +9,7 @@ namespace Gui
/** /**
* @brief allows using different image textures depending on the button state * @brief allows using different image textures depending on the button state
*/ */
class ImageButton : public MyGUI::ImageBox class ImageButton final : public MyGUI::ImageBox
{ {
MYGUI_RTTI_DERIVED(ImageButton) MYGUI_RTTI_DERIVED(ImageButton)
@ -31,13 +31,13 @@ namespace Gui
static bool sDefaultNeedKeyFocus; static bool sDefaultNeedKeyFocus;
protected: protected:
virtual void setPropertyOverride(const std::string& _key, const std::string& _value); void setPropertyOverride(const std::string& _key, const std::string& _value) final;
virtual void onMouseLostFocus(MyGUI::Widget* _new); void onMouseLostFocus(MyGUI::Widget* _new) final;
virtual void onMouseSetFocus(MyGUI::Widget* _old); void onMouseSetFocus(MyGUI::Widget* _old) final;
virtual void onMouseButtonPressed(int _left, int _top, MyGUI::MouseButton _id); void onMouseButtonPressed(int _left, int _top, MyGUI::MouseButton _id) final;
virtual void onMouseButtonReleased(int _left, int _top, MyGUI::MouseButton _id); void onMouseButtonReleased(int _left, int _top, MyGUI::MouseButton _id) final;
virtual void onKeySetFocus(MyGUI::Widget* _old); void onKeySetFocus(MyGUI::Widget* _old) final;
virtual void onKeyLostFocus(MyGUI::Widget* _new); void onKeyLostFocus(MyGUI::Widget* _new) final;
std::string mImageHighlighted; std::string mImageHighlighted;
std::string mImageNormal; std::string mImageNormal;

@ -48,10 +48,10 @@ namespace Gui
void scrollToTop(); void scrollToTop();
virtual void setPropertyOverride(const std::string& _key, const std::string& _value); void setPropertyOverride(const std::string& _key, const std::string& _value) final;
protected: protected:
void initialiseOverride(); void initialiseOverride() final;
void redraw(bool scrollbarShown = false); void redraw(bool scrollbarShown = false);

@ -11,7 +11,7 @@ namespace Gui
/** /**
* @brief A variant of the EditBox that only allows integer inputs * @brief A variant of the EditBox that only allows integer inputs
*/ */
class NumericEditBox : public FontWrapper<MyGUI::EditBox> class NumericEditBox final : public FontWrapper<MyGUI::EditBox>
{ {
MYGUI_RTTI_DERIVED(NumericEditBox) MYGUI_RTTI_DERIVED(NumericEditBox)
@ -22,8 +22,8 @@ namespace Gui
{ {
} }
void initialiseOverride(); void initialiseOverride() final;
void shutdownOverride(); void shutdownOverride() final;
typedef MyGUI::delegates::CMultiDelegate1<int> EventHandle_ValueChanged; typedef MyGUI::delegates::CMultiDelegate1<int> EventHandle_ValueChanged;
EventHandle_ValueChanged eventValueChanged; EventHandle_ValueChanged eventValueChanged;
@ -36,8 +36,8 @@ namespace Gui
void setMaxValue(int maxValue); void setMaxValue(int maxValue);
private: private:
void onEditTextChange(MyGUI::EditBox* sender); void onEditTextChange(MyGUI::EditBox* sender);
void onKeyLostFocus(MyGUI::Widget* _new); void onKeyLostFocus(MyGUI::Widget* _new) final;
void onKeyButtonPressed(MyGUI::KeyCode key, MyGUI::Char character); void onKeyButtonPressed(MyGUI::KeyCode key, MyGUI::Char character) final;
int mValue; int mValue;

@ -13,7 +13,7 @@ namespace Gui
typedef std::vector<SharedStateButton*> ButtonGroup; typedef std::vector<SharedStateButton*> ButtonGroup;
/// @brief A button that applies its own state changes to other widgets, to do this you define it as part of a ButtonGroup. /// @brief A button that applies its own state changes to other widgets, to do this you define it as part of a ButtonGroup.
class SharedStateButton : public FontWrapper<MyGUI::Button> class SharedStateButton final : public FontWrapper<MyGUI::Button>
{ {
MYGUI_RTTI_DERIVED(SharedStateButton) MYGUI_RTTI_DERIVED(SharedStateButton)
@ -23,13 +23,13 @@ namespace Gui
protected: protected:
void updateButtonState(); void updateButtonState();
virtual void onMouseButtonPressed(int _left, int _top, MyGUI::MouseButton _id); void onMouseButtonPressed(int _left, int _top, MyGUI::MouseButton _id) final;
virtual void onMouseButtonReleased(int _left, int _top, MyGUI::MouseButton _id); void onMouseButtonReleased(int _left, int _top, MyGUI::MouseButton _id) final;
virtual void onMouseSetFocus(MyGUI::Widget* _old); void onMouseSetFocus(MyGUI::Widget* _old) final;
virtual void onMouseLostFocus(MyGUI::Widget* _new); void onMouseLostFocus(MyGUI::Widget* _new) final;
virtual void baseUpdateEnable(); void baseUpdateEnable() final;
virtual void shutdownOverride(); void shutdownOverride() final;
bool _setState(const std::string &_value); bool _setState(const std::string &_value);

@ -8,17 +8,17 @@ namespace Gui
/// Window caption that automatically adjusts "Left" and "Right" widgets in its skin /// Window caption that automatically adjusts "Left" and "Right" widgets in its skin
/// based on the text size of the caption in the middle /// based on the text size of the caption in the middle
class WindowCaption : public MyGUI::EditBox class WindowCaption final : public MyGUI::EditBox
{ {
MYGUI_RTTI_DERIVED(WindowCaption) MYGUI_RTTI_DERIVED(WindowCaption)
public: public:
WindowCaption(); WindowCaption();
virtual void setCaption(const MyGUI::UString &_value); void setCaption(const MyGUI::UString &_value) final;
virtual void initialiseOverride(); void initialiseOverride() final;
virtual void setSize(const MyGUI::IntSize& _value); void setSize(const MyGUI::IntSize& _value) final;
virtual void setCoord(const MyGUI::IntCoord& _value); void setCoord(const MyGUI::IntCoord& _value) final;
private: private:
MyGUI::Widget* mLeft; MyGUI::Widget* mLeft;

Loading…
Cancel
Save