24 concept CWidget = CDerivedFrom<T, SWidget>;
28 concept CSlot = CDerivedFrom<T, FSlotBase>;
64 using Type =
typename T::FArguments;
70 using Type =
typename T::FSlotArguments;
82 template <CW
idgetOrSlot T>
86 template <CW
idgetOrSlot T>
90 template <CW
idgetOrSlot T>
106 template <CW
idgetOrSlotArguments Arguments, CFunctionLike AttrBlock>
109 && CSameAs<Arguments&, TFunction_Arg<AttrBlock, 0>>
113 return attributes(args);
129 template <CW
idgetOrSlotArguments Arguments, CFunctionLike AttrBlock>
132 && CSameAs<Arguments&, TFunction_Arg<AttrBlock, 0>>
136 return attributes(args);
174 CFunctionLike Transform,
175 CFunctionLike OnEmpty = TUniqueFunction<TFunction_Return<Transform>()>,
181 TSlots(
const Range& range, Transform&& transform, TOptional<OnEmpty>&& onEmpty = {})
183 , TransformStorage(MoveTemp(transform))
184 , OnEmptyStorage(MoveTemp(onEmpty))
189 : RangeRef(o.RangeRef),
190 TransformStorage(MoveTemp(o.TransformStorage)),
191 OnEmptyStorage(MoveTemp(o.OnEmptyStorage))
200 RangeRef = o.RangeRef;
201 TransformStorage = MoveTemp(o.TransformStorage);
202 OnEmptyStorage = MoveTemp(o.OnEmptyStorage);
206 template <CW
idgetArguments Arguments>
209 if (RangeRef.begin() == RangeRef.end() && OnEmptyStorage.IsSet())
211 args + OnEmptyStorage.GetValue()();
215 for (
auto it = RangeRef.begin(); it != RangeRef.end(); ++it)
216 args + TransformStorage(*it);
220 const Range& RangeRef;
221 Transform TransformStorage;
222 TOptional<OnEmpty> OnEmptyStorage;
227 CFunctionLike Transform,
228 CFunctionLike OnEmpty,
229 CSlotArguments SlotArguments,
230 CWidgetArguments Arguments
238 MCRO_API EVisibility
IsVisible(
bool visible, EVisibility hiddenState = EVisibility::Collapsed);