1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-30 14:18:26 +00:00
openmw/components/widgets/windowcaption.hpp

43 lines
928 B
C++

#ifndef OPENMW_WIDGETS_WINDOWCAPTION_H
#define OPENMW_WIDGETS_WINDOWCAPTION_H
#include <string>
#include <MyGUI_EditBox.h>
#include <MyGUI_RTTI.h>
#include <MyGUI_Types.h>
#include <MyGUI_UString.h>
namespace MyGUI
{
class Widget;
}
namespace Gui
{
/// Window caption that automatically adjusts "Left" and "Right" widgets in its skin
/// based on the text size of the caption in the middle
class WindowCaption final : public MyGUI::EditBox
{
MYGUI_RTTI_DERIVED(WindowCaption)
public:
WindowCaption();
void setCaption(const MyGUI::UString& _value) override;
void initialiseOverride() override;
void setSize(const MyGUI::IntSize& _value) override;
void setCoord(const MyGUI::IntCoord& _value) override;
private:
MyGUI::Widget* mLeft;
MyGUI::Widget* mRight;
MyGUI::Widget* mClient;
void align();
};
}
#endif