Initial popup window.
This commit is contained in:
parent
f16dd7c0d9
commit
70220fc6e9
22 changed files with 253 additions and 15 deletions
|
@ -16,6 +16,11 @@ class AbstractVisualNode;
|
|||
class TransformNode;
|
||||
class RectangleNode;
|
||||
|
||||
namespace mt
|
||||
{
|
||||
class Window;
|
||||
}
|
||||
|
||||
class Widget
|
||||
{
|
||||
public:
|
||||
|
@ -93,6 +98,8 @@ public:
|
|||
|
||||
void setSize(const BoundedSize& size);
|
||||
|
||||
void setMaxWidth(unsigned maxWidth);
|
||||
|
||||
void setMargin(unsigned margin);
|
||||
|
||||
void setMargin(const BoundaryOffset& margin);
|
||||
|
@ -110,13 +117,17 @@ public:
|
|||
mName = name;
|
||||
}
|
||||
|
||||
const std::string& getName()
|
||||
const std::string& getName() const
|
||||
{
|
||||
return mName;
|
||||
}
|
||||
|
||||
bool needsUpdate() const;
|
||||
|
||||
void setWindow(mt::Window* window);
|
||||
|
||||
mt::Window* getTopLevelWindow() const;
|
||||
|
||||
protected:
|
||||
virtual bool onMyKeyboardEvent(const KeyboardEvent* event);
|
||||
|
||||
|
@ -130,6 +141,14 @@ protected:
|
|||
|
||||
virtual bool isDirty() const;
|
||||
|
||||
|
||||
|
||||
void setParent(Widget* parent);
|
||||
|
||||
Widget* getParent() const;
|
||||
|
||||
mt::Window* getWindow() const;
|
||||
|
||||
DiscretePoint mLocation;
|
||||
BoundedSize mSize;
|
||||
BoundaryOffset mPadding;
|
||||
|
@ -152,6 +171,8 @@ protected:
|
|||
std::vector<TransformNode*> mPendingChildNodes;
|
||||
|
||||
FontItem mDefaultFont;
|
||||
Widget* mParent{nullptr};
|
||||
mt::Window* mWindow{nullptr};
|
||||
};
|
||||
|
||||
using WidgetUPtr = std::unique_ptr<Widget>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue