Skip to content

Commit 8f11431

Browse files
committed
additional docs for floating_element
1 parent 5a66064 commit 8f11431

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

lib/include/elements/element/floating.hpp

+32-4
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ namespace cycfi::elements
2828
view_limits limits(basic_context const& ctx) const override;
2929
void prepare_subject(context& ctx) override;
3030

31-
rect bounds() const { return _bounds; }
32-
void bounds(rect bounds_) { _bounds = bounds_; }
31+
rect bounds() const;
32+
void bounds(rect bounds_);
3333

3434
private:
3535

@@ -44,8 +44,7 @@ namespace cycfi::elements
4444
* The element type which must satisfy the `Element` concept.
4545
*
4646
* \param bounds
47-
* A `rect` object specifying the initial bounds of the
48-
* `floating_element`.
47+
* A `rect` specifying the initial bounds of the `floating_element`.
4948
*
5049
* \param subject
5150
* The `Subject` that needs to be treated as floating.
@@ -60,6 +59,35 @@ namespace cycfi::elements
6059
{
6160
return {std::forward<Subject>(subject), bounds};
6261
}
62+
63+
////////////////////////////////////////////////////////////////////////////
64+
// Inlines
65+
////////////////////////////////////////////////////////////////////////////
66+
namespace inlines{}
67+
68+
/**
69+
* \brief
70+
* Get the bounds of the `floating_element`.
71+
*
72+
* \returns
73+
* The bounds of the `floating_element`.
74+
*/
75+
inline rect floating_element::bounds() const
76+
{
77+
return _bounds;
78+
}
79+
80+
/**
81+
* \brief
82+
* Set the bounds of the floating element.
83+
*
84+
* \param bounds_
85+
* A `rect` specifying the new bounds of the `floating_element`.
86+
*/
87+
inline void floating_element::bounds(rect bounds_)
88+
{
89+
_bounds = bounds_;
90+
}
6391
}
6492

6593
#endif

0 commit comments

Comments
 (0)