5 #ifndef __crowcolumnview__ 6 #define __crowcolumnview__ 8 #include "cviewcontainer.h" 20 virtual void layoutViews () = 0;
25 bool addView (
CView* pView,
const CRect& mouseableArea,
bool mouseEnabled =
true)
override;
59 Style getStyle ()
const {
return style; }
60 void setStyle (
Style style);
62 CCoord getSpacing ()
const {
return spacing; }
63 void setSpacing (CCoord spacing);
65 const CRect& getMargin ()
const {
return margin; }
66 void setMargin (
const CRect& margin);
68 bool isAnimateViewResizing ()
const;
69 void setAnimateViewResizing (
bool state);
71 uint32_t getViewResizeAnimationTime ()
const {
return viewResizeAnimationTime; }
72 void setViewResizeAnimationTime (uint32_t ms) { viewResizeAnimationTime = ms; }
74 bool hideClippedSubviews ()
const;
75 void setHideClippedSubviews (
bool state);
77 LayoutStyle getLayoutStyle ()
const {
return layoutStyle; }
80 void layoutViews ()
override;
82 CMessageResult notify (CBaseObject* sender, IdStringPtr message)
override;
84 CLASS_METHODS(CRowColumnView, CAutoLayoutContainerView)
86 void getMaxChildViewSize (CPoint& maxSize);
87 void layoutViewsEqualSize ();
88 void resizeSubView (CView* view,
const CRect& newSize);
91 kAnimateViewResizing = 1 << 0,
92 kHideClippedSubViews = 1 << 1,
101 uint32_t viewResizeAnimationTime;
106 #endif // __crowcolumnview__ subviews are centered to each other
Definition: crowcolumnview.h:52
void invalid() override
mark whole view as invalid
Definition: cviewcontainer.cpp:618
Container Class of CView objects.
Definition: cviewcontainer.h:52
bool sizeToFit() override
resize view to optimal size
Definition: crowcolumnview.cpp:204
Rect structure.
Definition: crect.h:17
LayoutStyle
Definition: crowcolumnview.h:49
subviews have the same left or top position (default)
Definition: crowcolumnview.h:51
Definition: crowcolumnview.h:15
subviews are arranged as rows (top to bottom)
Definition: crowcolumnview.h:45
a view container which layouts its subview as rows or columns
Definition: crowcolumnview.h:40
Definition: customcontrols.cpp:8
subviews have the same right or bottom position
Definition: crowcolumnview.h:53
bool attached(CView *parent) override
view is attached to a parent view
Definition: crowcolumnview.cpp:267
Base Class of all view objects.
Definition: cview.h:44
bool removeView(CView *pView, bool withForget=true) override
remove a child view
Definition: crowcolumnview.cpp:322
bool addView(CView *pView) override
add a child view
Definition: crowcolumnview.cpp:286
Style
Definition: crowcolumnview.h:43
stretch subviews to the same width and height
Definition: crowcolumnview.h:54
subviews are arranged as columns (left to right)
Definition: crowcolumnview.h:46
bool changeViewZOrder(CView *view, uint32_t newIndex) override
change view z order position
Definition: crowcolumnview.cpp:334
void setViewSize(const CRect &rect, bool invalid=true) override
set views size
Definition: crowcolumnview.cpp:278