Rename stack to flex
This commit is contained in:
parent
2ba59d8e37
commit
e7753f244c
11 changed files with 32 additions and 31 deletions
|
|
@ -37,13 +37,13 @@ private:
|
|||
};
|
||||
|
||||
class GlComponent;
|
||||
class GlStack;
|
||||
class GlFlex;
|
||||
class GlLabel;
|
||||
class GlWindow: public GlContainer, public std::enable_shared_from_this<GlWindow>
|
||||
{
|
||||
friend class GlApplication;
|
||||
friend class GlComponent;
|
||||
friend class GlStack;
|
||||
friend class GlFlex;
|
||||
friend class GlLabel;
|
||||
|
||||
public:
|
||||
|
|
@ -56,7 +56,7 @@ public:
|
|||
std::shared_ptr<GlComponent> create_component(const position_t x, const position_t y, const position_t width, const position_t height);
|
||||
std::shared_ptr<GlLabel> create_label(
|
||||
const position_t x, const position_t y, const std::string& text, const std::tuple<float, float, float, float>& text_color);
|
||||
std::shared_ptr<GlStack> create_stack(const position_t x, const position_t y, const Direction direction);
|
||||
std::shared_ptr<GlFlex> create_flex(const position_t x, const position_t y, const Direction direction);
|
||||
|
||||
protected:
|
||||
GlApplication* app;
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@
|
|||
|
||||
namespace uui
|
||||
{
|
||||
class GlStack;
|
||||
class GlFlex;
|
||||
class GlComponent: public std::enable_shared_from_this<GlComponent>
|
||||
{
|
||||
friend class GlWindow;
|
||||
friend class GlStack;
|
||||
friend class GlFlex;
|
||||
|
||||
public:
|
||||
~GlComponent();
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@
|
|||
namespace uui
|
||||
{
|
||||
class GlComponent;
|
||||
class GlStack;
|
||||
class GlFlex;
|
||||
class GlContainer
|
||||
{
|
||||
friend class GlComponent;
|
||||
friend class GlStack;
|
||||
friend class GlFlex;
|
||||
|
||||
protected:
|
||||
GlContainer() = default;
|
||||
|
|
@ -33,7 +33,7 @@ public:
|
|||
enum Type
|
||||
{
|
||||
WINDOW,
|
||||
STACK
|
||||
FLEX
|
||||
};
|
||||
std::vector<std::shared_ptr<GlComponent>> components;
|
||||
Type type;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace uui
|
||||
{
|
||||
class GlStack: public GlComponent, public GlContainer
|
||||
class GlFlex: public GlComponent, public GlContainer
|
||||
{
|
||||
friend class GlWindow;
|
||||
|
||||
|
|
@ -23,11 +23,11 @@ protected:
|
|||
int content_width;
|
||||
int content_height;
|
||||
|
||||
GlStack(
|
||||
GlFlex(
|
||||
std::shared_ptr<GlWindow> window, std::size_t window_index, std::shared_ptr<GlContainer> parent, std::size_t parent_index,
|
||||
const position_t x, const position_t y, const Direction direction);
|
||||
GlStack(std::shared_ptr<GlWindow> window, std::size_t window_index, const position_t x, const position_t y, const Direction direction):
|
||||
GlStack(window, window_index, window, window_index, x, y, direction)
|
||||
GlFlex(std::shared_ptr<GlWindow> window, std::size_t window_index, const position_t x, const position_t y, const Direction direction):
|
||||
GlFlex(window, window_index, window, window_index, x, y, direction)
|
||||
{}
|
||||
|
||||
float get_width() const;
|
||||
|
|
@ -8,11 +8,11 @@
|
|||
|
||||
namespace uui
|
||||
{
|
||||
class GlStack;
|
||||
class GlFlex;
|
||||
class GlLabel: public GlComponent
|
||||
{
|
||||
friend class GlWindow;
|
||||
friend class GlStack;
|
||||
friend class GlFlex;
|
||||
|
||||
size_t font_index;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue