28 #ifndef YSL_INC_UI_scroll_h_
29 #define YSL_INC_UI_scroll_h_ 1
32 #include YFM_YSLib_UI_Button
33 #include YFM_YSLib_UI_YUIContainer
34 #include YFM_YSLib_UI_WidgetIteration
83 :
UIEventArgs(wgt), pair<float, float>(val, float()),
91 :
UIEventArgs(wgt), pair<float, float>(val, old_val),
152 SDst min_thumb_length;
154 ValueType large_delta; \
177 DefGetter(
const ynothrow,
SDst, MinThumbLength, min_thumb_length)
180 GetTrackLength() - GetThumbLength())
182 GetSizeOf(tmbScroll).GetRef(IsHorizontal()))
187 DefGetter(
const ynothrow, ValueType, LargeDelta, large_delta)
193 SetThumbLength(
SDst);
198 SetThumbPosition(
SPos);
205 SetMaxValue(ValueType);
217 SetLargeDelta(ValueType);
224 CheckArea(
SPos)
const;
334 InitializeArrowPainters(
Rotation, Rotation);
349 DefGetter(const ynothrow, ValueType, SmallDelta, small_delta)
361 PDefH(
void, LocateThumb, ValueType val,
363 ImplRet(GetTrackRef().LocateThumb(val, t))
385 GetBoundControlPtr(
const KeyInput&)
override;
402 ImplI(ATrack)
DefGetter(
const ynothrow, Orientation, Orientation, Vertical)
406 GetBoundControlPtr(
const KeyInput&)
override;
448 FixLayout(const
Size&);
#define DefEventGetter(_q, _tEventHandler, _name, _member)
定义事件访问器。
pt pt Y const IWidget &wgt const IWidget &wgt GetSizeOf
无效化:使相对于部件的子部件的指定区域在直接和间接的窗口缓冲区中无效。
pt pt Y const IWidget &wgt GetLocationOf
#define DefWidgetMemberIteration(...)
定义部件成员下标及部件成员迭代器起始、终止和范围操作。
static auto first(const _tIterator &i) -> decltype((i->first))
#define DefPred(_q, _n,...)
ATrack::ValueType ValueType
DeclEvent(HViewEvent, ViewChanged) DeclEvent(HIndexEvent
视图变更事件。
std::uint16_t SDst
屏幕坐标距离。
#define DefGetter(_q, _t, _n,...)
#define DefSetterMem(_t, _n, _m)
ScrollEventArgs(IWidget &wgt, ScrollCategory t, ValueType val)
构造:使用指定事件源、滚动事件类型和值。
YF_API void DrawTrackBackground(PaintEventArgs &&e, ATrack &)
绘制指定色调的基本按钮背景。
PDefH(void, Activate, Console &console, Drawing::Color fc=Drawing::ColorSpace::White) ImplExpr(Activate(console
激活:使用指定屏幕、有效性、前景色和默认背景色。
ValueType small_delta
小距离滚动偏移量:滚动事件关联的滑块位置变化绝对值。
VerticalScrollBar vsbVertical
控制竖直可视区域的竖直滚动条。
unique_ptr< ATrack > pTrack
ScrollEventArgs(IWidget &wgt, ScrollCategory t, ValueType val, ValueType old_val)
构造:使用指定事件源、滚动事件类型、值和旧值。
#define ynothrow
YSLib 无异常抛出保证:若支持 noexcept 关键字, 指定特定的 noexcept 异常规范。
DeclDelegate(HScrollEvent, ScrollEventArgs) class YF_API ATrack
轨道。
#define DefSetter(_t, _n, _m)
#define YAssertNonnull(_expr)
HorizontalScrollBar hsbHorizontal
控制水平可视区域的水平滚动条。
ScrollCategory Category
滚动事件类别。
const IWidget &wgt ImplRet(wgt.GetView().IsVisible()) bool YF_API Contains(const IWidget &
判断点是否在部件的可视区域内。
DefGetterMem(const ynothrow, ListType::size_type, SelectedIndex, viewer) SDst GetFullViewHeight() const
取完整视图高。
Selected const shared_ptr< ListType > const pair< Color, Color > & DefDeMoveCtor(TextList) DefPredMem(const ynothrow
static auto second(const _tIterator &i) -> decltype((i->second))
std::bitset< KeyBitsetWidth > KeyInput
按键并行位宽。