Simple GUI Library
container.h
Go to the documentation of this file.
1/**
2 * @author Nikita Mochalov (github.com/tralf-strues)
3 * @file container.h
4 * @date 2021-11-07
5 *
6 * @copyright Copyright (c) 2021
7 */
8
9#pragma once
10
11#include "../parent.h"
12
13namespace Sgl
14{
15 class Container : public Parent
16 {
17 public:
18 static const ColorFill DEFAULT_FILL;
19 static const Background DEFAULT_BACKGROUND;
20
21 public:
22 Container();
23 virtual ~Container() override = default;
24
25 virtual Component* getHitComponent(int32_t x, int32_t y) override;
26 virtual void render(const Sml::Rectangle<int32_t>& targetRegion) override;
27
28 protected:
29 virtual void prerenderSelf() override;
30 };
31
33 {
34 public:
35 virtual int32_t computeCustomPrefWidth(int32_t height = -1) const override;
36 virtual int32_t computeCustomPrefHeight(int32_t width = -1) const override;
37 };
38}