Gorgon Game Engine
List.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Base.h"
4 
5 namespace Gorgon { namespace UI { namespace Organizers {
6 
12  class List : public Base {
13  public:
16  explicit List(int spacing = 5) : spacing(spacing) {
17  }
18 
20  void SetSpacing(int value) {
21  spacing = value;
22  }
23 
25  int GetSpacing() const {
26  return spacing;
27  }
28 
29  protected:
30  virtual void reorganize() override;
31 
32  int spacing;
33  };
34 
35 } } }
Gorgon::UI::Organizers::List
List organizer will organize components one per line like a list.
Definition: List.h:12
Gorgon::UI::Organizers::List::spacing
int spacing
Definition: List.h:32
Base.h
Gorgon::UI::Organizers::Base
Provides the basis for the automatic UI organizers.
Definition: Base.h:18
Gorgon::UI::WidgetContainer::GetInteriorSize
virtual Geometry::Size GetInteriorSize() const =0
Should return the interior (usable) size of the container.
Gorgon
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
Gorgon::UI::Organizers::List::GetSpacing
int GetSpacing() const
Returns the spacing between the lines.
Definition: List.h:25
Gorgon::UI::Organizers::List::reorganize
virtual void reorganize() override
Should reorganize the contents of the organizer.
Definition: List.cpp:6
Gorgon::UI::Organizers::List::List
List(int spacing=5)
Constructs a new list organizer, spacing between lines can be specified.
Definition: List.h:16
Gorgon::UI::Organizers::List::SetSpacing
void SetSpacing(int value)
Sets the spacing between the lines.
Definition: List.h:20
Gorgon::Geometry::basic_Size::Width
T_ Width
Width of this size object.
Definition: Size.h:258
List.h
Gorgon::UI::Organizers::Base::GetAttached
WidgetContainer & GetAttached() const
Returns the container that this organizer is attached to.
Definition: Base.h:38