MyGUI_ISubWidget.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_I_SUB_WIDGET_H_
#define MYGUI_I_SUB_WIDGET_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_ICroppedRectangle.h"
#include "MyGUI_ILayerNode.h"
#include "MyGUI_Types.h"
#include "MyGUI_IRenderTarget.h"
#include "MyGUI_IStateInfo.h"
#include "MyGUI_IObject.h"
namespace MyGUI
{
class ISubWidget;
using VectorSubWidget = std::vector<ISubWidget*>;
class MYGUI_EXPORT ISubWidget : public ICroppedRectangle, public IObject
{
MYGUI_RTTI_DERIVED(ISubWidget)
public:
virtual void createDrawItem(ITexture* _texture, ILayerNode* _node) = 0;
virtual void destroyDrawItem() = 0;
virtual void setAlpha(float /*_alpha*/)
{
}
virtual void setStateData(IStateInfo* /*_data*/)
{
}
virtual void doRender() = 0;
virtual void setAlign(Align _value)
{
mAlign = _value;
}
virtual void setVisible(bool _value)
{
mVisible = _value;
}
virtual void _updateView()
{
}
virtual void _correctView()
{
}
virtual void _setAlign(const IntSize& /*_oldsize*/)
{
}
virtual void doManualRender(IVertexBuffer* /*_buffer*/, ITexture* /*_texture*/, size_t /*_count*/)
{
}
protected:
Align mAlign;
bool mVisible{true};
};
} // namespace MyGUI
#endif // MYGUI_I_SUB_WIDGET_H_
MyGUI_ICroppedRectangle.h
MyGUI_ILayerNode.h
MyGUI_IObject.h
MyGUI_IRenderTarget.h
MyGUI_IStateInfo.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:69
MyGUI_Types.h
MyGUI::ICroppedRectangle
Definition MyGUI_ICroppedRectangle.h:17
MyGUI::ILayerNode
Definition MyGUI_ILayerNode.h:29
MyGUI::IObject
Definition MyGUI_IObject.h:17
MyGUI::IStateInfo
Definition MyGUI_IStateInfo.h:17
MyGUI::ISubWidget
Definition MyGUI_ISubWidget.h:25
MyGUI::ISubWidget::createDrawItem
virtual void createDrawItem(ITexture *_texture, ILayerNode *_node)=0
MyGUI::ISubWidget::setAlign
virtual void setAlign(Align _value)
Definition MyGUI_ISubWidget.h:42
MyGUI::ISubWidget::mAlign
Align mAlign
Definition MyGUI_ISubWidget.h:67
MyGUI::ISubWidget::doRender
virtual void doRender()=0
MyGUI::ISubWidget::setStateData
virtual void setStateData(IStateInfo *)
Definition MyGUI_ISubWidget.h:36
MyGUI::ISubWidget::_updateView
virtual void _updateView()
Definition MyGUI_ISubWidget.h:51
MyGUI::ISubWidget::setAlpha
virtual void setAlpha(float)
Definition MyGUI_ISubWidget.h:32
MyGUI::ISubWidget::_correctView
virtual void _correctView()
Definition MyGUI_ISubWidget.h:54
MyGUI::ISubWidget::doManualRender
virtual void doManualRender(IVertexBuffer *, ITexture *, size_t)
Definition MyGUI_ISubWidget.h:62
MyGUI::ISubWidget::mVisible
bool mVisible
Definition MyGUI_ISubWidget.h:68
MyGUI::ISubWidget::destroyDrawItem
virtual void destroyDrawItem()=0
MyGUI::ISubWidget::setVisible
virtual void setVisible(bool _value)
Definition MyGUI_ISubWidget.h:46
MyGUI::ISubWidget::_setAlign
virtual void _setAlign(const IntSize &)
Definition MyGUI_ISubWidget.h:58
MyGUI::ITexture
Definition MyGUI_ITexture.h:28
MyGUI::IVertexBuffer
Definition MyGUI_IVertexBuffer.h:17
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::VectorSubWidget
std::vector< ISubWidget * > VectorSubWidget
Definition MyGUI_ISubWidget.h:22
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::Align
Definition MyGUI_Align.h:20