OSDN Git Service

fix cmake/Macros.cmake
[moflib/moflib.git] / moflib-1.0 / src / mof / widget / flow_layout.hpp
1 #pragma once
2 #include <memory>
3 #include <mof/widget/Layout.hpp>
4
5 namespace mof
6 {
7 namespace widget
8 {
9
10         class flow_layout : public Layout
11     {
12
13         public:
14                 enum xalign
15         {
16                         XALIGN_LEFT,
17                         XALIGN_CENTER,
18                         XALIGN_RIGHT,
19                 };
20                 enum yalign
21         {
22                         YALIGN_TOP,
23                         YALIGN_CENTER,
24                         YALIGN_BOTTOM,
25                 };
26
27                 flow_layout(xalign xa, yalign ya, size_t w, size_t h);
28                 virtual ~flow_layout();
29                 virtual void add(std::shared_ptr<WidgetView> pView);
30         virtual Vector2D getPreferredSize() const;
31         virtual void connect(WidgetView* pParentView);
32         virtual size_t getLength( ) const;
33         virtual int getAdjacencyAsUp(int index) const;
34         virtual int getAdjacencyAsDown(int index) const;
35         virtual int getAdjacencyAsLeft(int index) const;
36         virtual int getAdjacencyAsRight(int index) const;
37
38     private:
39         struct impl;
40                 std::unique_ptr<impl> pimpl_;
41         };
42
43 }// namepsace widget
44 }// namepsace mof
45