Running on Linux again and small clean up.

This commit is contained in:
jmsgrogan 2021-03-06 16:02:13 -05:00
parent 683ba5447f
commit 2bde5567be
24 changed files with 113 additions and 60 deletions

View file

@ -1,14 +1,16 @@
#pragma once
#include "DiscretePoint.h"
#include <memory>
#include <vector>
#include "DiscretePoint.h"
#include "VisualLayer.h"
#include "PaintEvent.h"
#include "Color.h"
#include "MouseEvent.h"
#include "KeyboardEvent.h"
class MouseEvent;
class KeyboardEvent;
class PaintEvent;
class VisualLayer;
class Color;
class Widget
{
@ -34,12 +36,12 @@ protected:
BoundedSize mSize;
BoundaryOffset mPadding;
BoundaryOffset mMargin;
std::vector<VisualLayerUPtr> mMyLayers;
std::vector<std::unique_ptr<VisualLayer> > mMyLayers;
std::vector<VisualLayer*> mLayers;
std::vector<std::unique_ptr<Widget> > mChildren;
unsigned mBorderThickness;
ColorUPtr mBackgroundColor;
ColorUPtr mBorderColor;
std::unique_ptr<Color> mBackgroundColor;
std::unique_ptr<Color> mBorderColor;
bool mVisible;
public:
@ -66,7 +68,7 @@ public:
bool Contains(const DiscretePoint& loc) const;
void SetBackgroundColor(ColorUPtr color);
void SetBackgroundColor(std::unique_ptr<Color> color);
void SetBounds(unsigned width, unsigned height);