Skip to content

Commit 7be4671

Browse files
committed
format
1 parent c28b822 commit 7be4671

File tree

13 files changed

+51
-37
lines changed

13 files changed

+51
-37
lines changed

src/ruis/animation/animation.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,15 @@ void animation::update(uint32_t dt)
7474
void animation::start(uint32_t dt_ms)
7575
{
7676
// This will add the updatable to an active list, but will not call the update() immediately.
77-
this->updater.get().start(//
78-
utki::make_shared_from(//
79-
static_cast<updateable&>(*this)));
77+
this->updater.get().start( //
78+
utki::make_shared_from( //
79+
static_cast<updateable&>(*this)
80+
)
81+
);
8082

8183
// This call to update() can potentially stop the started updating,
8284
// this is why it is called after the updating has been started.
83-
if(dt_ms != 0){
85+
if (dt_ms != 0) {
8486
this->update(dt_ms);
8587
}
8688
}

src/ruis/layout/abstract_layout.hpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,20 @@ class abstract_layout
3939
abstract_layout(abstract_layout&&) = delete;
4040
abstract_layout& operator=(abstract_layout&&) = delete;
4141

42-
virtual vector2 measure(const vector2& quotum,//
43-
const_widget_list& widgets) const = 0;
42+
virtual vector2 measure(
43+
const vector2& quotum, //
44+
const_widget_list& widgets
45+
) const = 0;
4446

4547
/**
4648
* @brief Arrange widgets.
4749
* @param dims - dimensions of the area available to the layout.
4850
* @param widgets - widgets to arrange.
4951
*/
50-
virtual void lay_out(const vector2& dims, //
51-
semiconst_widget_list& widgets) const = 0;
52+
virtual void lay_out(
53+
const vector2& dims, //
54+
semiconst_widget_list& widgets
55+
) const = 0;
5256

5357
virtual ~abstract_layout() = default;
5458
};
@@ -59,4 +63,4 @@ extern const utki::shared_ref<abstract_layout> pile;
5963
extern const utki::shared_ref<abstract_layout> row;
6064
extern const utki::shared_ref<abstract_layout> column;
6165

62-
} // namespace ruis
66+
} // namespace ruis::layout

src/ruis/layout/dimension.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ class dimension
155155

156156
std::ostream& operator<<(std::ostream& o, const dimension& d);
157157

158-
} // namespace ruis
158+
} // namespace ruis::layout
159159

160-
namespace ruis{
160+
namespace ruis {
161161
using dim = layout::dimension;
162-
}
162+
} // namespace ruis

src/ruis/layout/linear_layout.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ struct info {
3838
};
3939
} // namespace
4040

41-
void linear_layout::lay_out(const vector2& dims,//
42-
semiconst_widget_list& widgets) const
41+
void linear_layout::lay_out(
42+
const vector2& dims, //
43+
semiconst_widget_list& widgets
44+
) const
4345
{
4446
unsigned long_index = this->get_long_index();
4547
unsigned trans_index = this->get_trans_index();
@@ -255,8 +257,10 @@ void linear_layout::lay_out(const vector2& dims,//
255257
}
256258
}
257259

258-
ruis::vector2 linear_layout::measure(const vector2& quotum, //
259-
const_widget_list& widgets) const
260+
ruis::vector2 linear_layout::measure(
261+
const vector2& quotum, //
262+
const_widget_list& widgets
263+
) const
260264
{
261265
unsigned long_index = this->get_long_index();
262266
unsigned trans_index = this->get_trans_index();

src/ruis/layout/linear_layout.hpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@ class linear_layout :
3434
public:
3535
linear_layout(bool is_vertical);
3636

37-
void lay_out(const vector2& dims,//
38-
semiconst_widget_list& widgets) const override;
39-
40-
vector2 measure(const vector2& quotum, //
41-
const_widget_list& widgets) const override;
37+
void lay_out(
38+
const vector2& dims, //
39+
semiconst_widget_list& widgets
40+
) const override;
41+
42+
vector2 measure(
43+
const vector2& quotum, //
44+
const_widget_list& widgets
45+
) const override;
4246
};
4347

44-
} // namespace ruis
48+
} // namespace ruis::layout

src/ruis/layout/parameters.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2727

2828
#include "dimension.hpp"
2929

30-
namespace ruis::layout{
30+
namespace ruis::layout {
3131

3232
/**
3333
* @brief Widget layout parameters.
@@ -53,4 +53,4 @@ struct parameters {
5353
r4::vector2<styled<ruis::align>> align = {ruis::align::undefined, ruis::align::undefined};
5454
};
5555

56-
}; // namespace ruis
56+
}; // namespace ruis::layout

src/ruis/layout/pile_layout.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ class pile_layout : public abstract_layout
3939
) const override;
4040
};
4141

42-
} // namespace ruis
42+
} // namespace ruis::layout

src/ruis/layout/size_layout.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ class size_layout : public trivial_layout
3434
) const override;
3535
};
3636

37-
} // namespace ruis
37+
} // namespace ruis::layout

src/ruis/layout/trivial_layout.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ class trivial_layout : public abstract_layout
3939
) const override;
4040
};
4141

42-
} // namespace ruis
42+
} // namespace ruis::layout

src/ruis/widget/container.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
3535

3636
namespace ruis {
3737

38-
namespace layout{
38+
namespace layout {
3939
class layout;
40-
}
40+
} // namespace layout
4141

4242
/**
4343
* @brief Container widget.
@@ -130,8 +130,10 @@ class container : virtual public widget
130130
};
131131

132132
protected:
133-
void render_child(const matrix4& matrix, //
134-
const widget& c) const;
133+
void render_child(
134+
const matrix4& matrix, //
135+
const widget& c
136+
) const;
135137

136138
public:
137139
struct parameters {

0 commit comments

Comments
 (0)