Add some widget layout and ability event handling.
This commit is contained in:
parent
b99708e7d3
commit
4e85edacc8
24 changed files with 285 additions and 31 deletions
|
@ -17,6 +17,7 @@ protected:
|
|||
DiscretePoint mLocation;
|
||||
unsigned mWidth;
|
||||
unsigned mHeight;
|
||||
unsigned mMaxHeight;
|
||||
std::vector<VisualLayerUPtr> mMyLayers;
|
||||
std::vector<VisualLayer*> mLayers;
|
||||
std::vector<std::unique_ptr<Widget> > mChildren;
|
||||
|
@ -30,12 +31,14 @@ public:
|
|||
|
||||
static std::unique_ptr<Widget> Create();
|
||||
|
||||
void AddWidget(std::unique_ptr<Widget> widget);
|
||||
virtual void AddWidget(std::unique_ptr<Widget> widget);
|
||||
|
||||
unsigned GetWidth() const;
|
||||
|
||||
unsigned GetHeight() const;
|
||||
|
||||
unsigned GetMaxHeight() const;
|
||||
|
||||
std::vector<VisualLayer*> GetLayers() const;
|
||||
|
||||
DiscretePoint GetLocation() const;
|
||||
|
@ -54,6 +57,8 @@ public:
|
|||
|
||||
void SetLocation(const DiscretePoint& loc);
|
||||
|
||||
void SetMaxHeight(unsigned maxHeight);
|
||||
|
||||
protected:
|
||||
|
||||
virtual bool OnMyKeyboardEvent(const KeyboardEvent* event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue