More window cleaning
This commit is contained in:
parent
6adc441e6f
commit
53c98a227d
29 changed files with 422 additions and 261 deletions
|
@ -11,27 +11,27 @@ class MouseEvent;
|
|||
|
||||
class Button : public Widget
|
||||
{
|
||||
private:
|
||||
using clickFunc = std::function<void(Widget* self)>;
|
||||
std::string mLabel;
|
||||
clickFunc mClickFunc;
|
||||
Color mCachedColor;
|
||||
ColorUPtr mClickedColor;
|
||||
|
||||
public:
|
||||
using clickFunc = std::function<void(Widget* self)>;
|
||||
|
||||
Button();
|
||||
|
||||
static std::unique_ptr<Button> Create();
|
||||
|
||||
void SetLabel(const std::string& text);
|
||||
void setLabel(const std::string& text);
|
||||
|
||||
void SetOnClickFunction(clickFunc func);
|
||||
|
||||
void OnPaintEvent(const PaintEvent* event) override;
|
||||
void setOnClickFunction(clickFunc func);
|
||||
|
||||
protected:
|
||||
void onMyMouseEvent(const MouseEvent* event) override;
|
||||
|
||||
void OnMyMouseEvent(const MouseEvent* event) override;
|
||||
void onPaintEvent(const PaintEvent* event) override;
|
||||
|
||||
private:
|
||||
std::string mLabel;
|
||||
clickFunc mClickFunc;
|
||||
Color mCachedColor;
|
||||
ColorUPtr mClickedColor;
|
||||
};
|
||||
|
||||
using ButtonUPtr = std::unique_ptr<Button>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue