aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/render/FlexLayoutRenderObject.h
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-11-21 21:43:42 +0800
committerYuqian Yang <crupest@crupest.life>2025-11-21 22:13:54 +0800
commitfd61739197ec009d47da87a7cc66970a55f12db4 (patch)
treebb2bc007aaf9b47fecb090df96c23b5ee6a898e3 /include/cru/ui/render/FlexLayoutRenderObject.h
parent3b875091c445b7465b9bd044914318989a94d2ad (diff)
downloadcru-fd61739197ec009d47da87a7cc66970a55f12db4.tar.gz
cru-fd61739197ec009d47da87a7cc66970a55f12db4.tar.bz2
cru-fd61739197ec009d47da87a7cc66970a55f12db4.zip
Clean codes. Remove member function const in RenderObject.
Diffstat (limited to 'include/cru/ui/render/FlexLayoutRenderObject.h')
-rw-r--r--include/cru/ui/render/FlexLayoutRenderObject.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/include/cru/ui/render/FlexLayoutRenderObject.h b/include/cru/ui/render/FlexLayoutRenderObject.h
index bf68720a..82ac6639 100644
--- a/include/cru/ui/render/FlexLayoutRenderObject.h
+++ b/include/cru/ui/render/FlexLayoutRenderObject.h
@@ -93,32 +93,26 @@ struct FlexChildLayoutData {
//
class CRU_UI_API FlexLayoutRenderObject
: public LayoutRenderObject<FlexChildLayoutData> {
- CRU_DEFINE_CLASS_LOG_TAG("FlexLayoutRenderObject")
+ CRU_DEFINE_CLASS_LOG_TAG("cru::ui::render::FlexLayoutRenderObject")
public:
- FlexLayoutRenderObject() = default;
- FlexLayoutRenderObject(const FlexLayoutRenderObject& other) = delete;
- FlexLayoutRenderObject& operator=(const FlexLayoutRenderObject& other) =
- delete;
- FlexLayoutRenderObject(FlexLayoutRenderObject&& other) = delete;
- FlexLayoutRenderObject& operator=(FlexLayoutRenderObject&& other) = delete;
- ~FlexLayoutRenderObject() override = default;
+ static constexpr auto kRenderObjectName = "FlexLayoutRenderObject";
- std::string GetName() const override;
+ FlexLayoutRenderObject();
- FlexDirection GetFlexDirection() const { return direction_; }
+ FlexDirection GetFlexDirection() { return direction_; }
void SetFlexDirection(FlexDirection direction) {
direction_ = direction;
InvalidateLayout();
}
- FlexMainAlignment GetContentMainAlign() const { return content_main_align_; }
+ FlexMainAlignment GetContentMainAlign() { return content_main_align_; }
void SetContentMainAlign(FlexMainAlignment align) {
content_main_align_ = align;
InvalidateLayout();
}
- FlexCrossAlignment GetItemCrossAlign() const { return item_cross_align_; }
+ FlexCrossAlignment GetItemCrossAlign() { return item_cross_align_; }
void SetItemCrossAlign(FlexCrossAlignment align) {
item_cross_align_ = align;
InvalidateLayout();