You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
891 B

13 years ago
#ifndef UIWINDOW_H
#define UIWINDOW_H
#include "uiwidget.h"
13 years ago
class UIWindow : public UIWidget
13 years ago
{
public:
UIWindow();
13 years ago
static UIWindowPtr create();
virtual void loadStyleFromOTML(const OTMLNodePtr& styleNode);
virtual void render();
13 years ago
void setTitle(const std::string& title) { m_title = title; }
13 years ago
std::string getTitle() const { return m_title; }
13 years ago
protected:
virtual void onRectUpdate(UIRectUpdateEvent& event);
virtual void onFocusChange(UIFocusEvent& event);
virtual void onMousePress(UIMouseEvent& event);
virtual void onMouseRelease(UIMouseEvent& event);
virtual void onMouseMove(UIMouseEvent& event);
13 years ago
private:
std::string m_title;
13 years ago
bool m_moving;
Point m_movingReference;
// styling
BorderImagePtr m_headImage;
ImagePtr m_bodyImage;
int m_headHeight;
int m_headMargin;
AlignmentFlag m_titleAlign;
13 years ago
};
#endif