mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-04 14:22:43 -06:00
168 lines
No EOL
7.4 KiB
C++
168 lines
No EOL
7.4 KiB
C++
topic "WithDropChoice";
|
||
[2 $$0,0#00000000000000000000000000000000:Default]
|
||
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
|
||
[l288;2 $$2,0#27521748481378242620020725143825:desc]
|
||
[0 $$3,0#96390100711032703541132217272105:end]
|
||
[H6;0 $$4,0#05600065144404261032431302351956:begin]
|
||
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
|
||
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
|
||
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
|
||
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
|
||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||
[{_}
|
||
[ {{10000@3 [s0; [*@(229)4 WithDropChoice]]}}&]
|
||
[s3; &]
|
||
[s1;:noref: [@(0.0.255)3 template][3 _<][@(0.0.255)3 class][3 _][*@3;3 T][@(0.0.255)3 >]&]
|
||
[s1;:WithDropChoice`:`:class: [@(0.0.255) class]_[* WithDropChoice]_:_[@(0.0.255) public]_[*@3 T
|
||
]&]
|
||
[s0;%% &]
|
||
[s2;%%
|
||
@@image:1350&331
|
||
們貈祤€€兯<EFBFBD>€€€€<EFBFBD>滍湵污榔榾笫记咄<EFBFBD>小氆茒唵疇插ㄐ辶卢潹蕘垔谅<EFBFBD>聙堈诈幈谍勅<EFBFBD>叮<EFBFBD>
|
||
屆斪交х角鑫棼魨缍睋狚苠鸂<EFBFBD><EFBFBD><EFBFBD>張瓐脽军嬝硬茙脌挕疵▊彑瘺嬶戊敵煤絼鈵牢<EFBFBD><EFBFBD>㈧敵煤勨
|
||
邜狐<EFBFBD>囤镑貨播飰<EFBFBD>獓哉睚茬巡螟<EFBFBD><EFBFBD><EFBFBD><EFBFBD>椟堅幙╇祢制屄濇嫕距铤患欨桉赤枸坎釃输錆哒︸<EFBFBD>
|
||
奸介蝤摎礋愜顷贶<EFBFBD>軋捾懒<EFBFBD><EFBFBD>掲圍鰢垊屪櫙扇<EFBFBD><EFBFBD>溡棽楛湗収鞏徧稗动п<EFBFBD><EFBFBD>ǔ帀<EFBFBD>啜彁<EFBFBD><EFBFBD>
|
||
违革鹎鋽胚奥<EFBFBD>擢瓏盲椇撼葫<EFBFBD>易榉胼秆勈裆昼颂税毄霌膣髋壭喀羔飶钳<EFBFBD>攳<EFBFBD>嗗红イ弄犰<EFBFBD>
|
||
<EFBFBD><EFBFBD>蟻飧雭胞幔澛癀荃棂兑≤攪煼仾捹浴馍隄贮€是蒯虛钖忾摇亨澵帟鲹<EFBFBD><EFBFBD>肆鵂禍徲寲缺樖耗
|
||
迼斾紦<EFBFBD>嵱廃^痨冞〔荧浱免樖深锓豉<EFBFBD>斛澹叅栀狳穵紫笅瑁し佣阼町藠狠<EFBFBD>摺绝尡帍埗黍
|
||
亱嬽裳婆麢牫寚駜<EFBFBD>堎斾骁<EFBFBD>讝椱蹧胁党<EFBFBD>詳垆戬灴<EFBFBD>赎琮妿缙嵀訉棤﹂儋♀∫『屶覈榭羻
|
||
<EFBFBD>澓剹犆狆伜剹犆鲳伇澲笓螡妵駩軃蕩羺钀軃矌羺丕€嬙盀倠小袱酪噣ィ骺ㄨ濎镯堕字泲嬽<EFBFBD>
|
||
凉俟煴黪辂訑<EFBFBD><EFBFBD>钹<EFBFBD>巩Л<EFBFBD><EFBFBD>磮公椷<EFBFBD>橒遣娫蕢谊臌<EFBFBD>莆能诊催朱吳颔俩詥坦嵄瀳<EFBFBD><EFBFBD>厢<EFBFBD>
|
||
傜婧
|
||
&]
|
||
[s0;%% &]
|
||
[s9;%% This template class adds a list of choices, with drop down
|
||
button placed at right side of the frame, to any widget with
|
||
associated value accessible via SetData/GetData interface.&]
|
||
[s3;%% &]
|
||
[s0; &]
|
||
[ {{10000F(128)G(128)@1 [s0;%% [* Public Member List]]}}&]
|
||
[s3; &]
|
||
[s5;:WithDropChoice`:`:WhenDrop: [_^Callback^ Callback]_[* WhenDrop]&]
|
||
[s2;%% This callback is invoked when the drop button is pushed (before
|
||
drop down list appears). Client code can use it to create or
|
||
alter the list.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:WhenSelect: [_^Callback^ Callback]_[* WhenSelect]&]
|
||
[s2;%% This callback is called after user selected an item from drop`-down
|
||
list and this value was assigned to the base widget.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:ClearList`(`): [@(0.0.255) void]_[* ClearList]()&]
|
||
[s2;%% Clears the drop`-down list.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:AddList`(const Value`&`): [@(0.0.255) void]_[* AddList]([@(0.0.255) c
|
||
onst]_[_^Value^ Value][@(0.0.255) `&]_[*@3 data])&]
|
||
[s2;%% Adds [%-*@3 data] to the drop`-down list.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:SerializeList`(Stream`&`): [@(0.0.255) void]_[* SerializeList]([_^Stream^ S
|
||
tream][@(0.0.255) `&]_[*@3 s])&]
|
||
[s2;%% Serializes the drop`-down list content.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:AddHistory`(int`): [@(0.0.255) void]_[* AddHistory]([@(0.0.255) int]_
|
||
[*@3 max]_`=_[@3 12])&]
|
||
[s2;%% This method puts the value to the begin of drop`-down list.
|
||
If value is already in the list, it is removed first (values
|
||
in the list are unique). If there is more than [%-*@3 max] items
|
||
in the list, list is trimmed. This method is ideal when you want
|
||
to keep the history of previous values.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:Dropping`(bool`): [_^WithDropChoice^ WithDropChoice][@(0.0.255) `&
|
||
]_[* Dropping]([@(0.0.255) bool]_[*@3 b]_`=_[@(0.0.255) true])&]
|
||
[s2;%% In this mode, drop button is visible. Can be used to temporarily
|
||
remove the drop`-down list capability. Default is on.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:NoDropping`(`): [_^WithDropChoice^ WithDropChoice][@(0.0.255) `&]_
|
||
[* NoDropping]()&]
|
||
[s2;%% Same as Dropping(false).&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:NoDropFocus`(`): [_^WithDropChoice^ WithDropChoice][@(0.0.255) `&]_
|
||
[* NoDropFocus]()&]
|
||
[s2;%% If NoDropFocus is active, focus is not moved to base widget
|
||
when drop button is pushed. Default is to move the focus.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:Appending`(const String`&`,`"`): [_^WithDropChoice^ WithDropChoi
|
||
ce][@(0.0.255) `&]_[* Appending]([@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 s]_
|
||
`=_`", `")&]
|
||
[s2; [*@3 s]&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:SetDropLines`(int`): [_^WithDropChoice^ WithDropChoice][@(0.0.255) `&
|
||
]_[* SetDropLines]([@(0.0.255) int]_[*@3 n])&]
|
||
[s2;%% Sets the maximum height of drop`-down list to accommodate
|
||
[%-*@3 n] lines (scrollbar appears if there is more than that).&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:SetDisplay`(int`,const Display`&`): [_^WithDropChoice^ WithDropC
|
||
hoice][@(0.0.255) `&]_[* SetDisplay]([@(0.0.255) int]_[*@3 i], [@(0.0.255) const]_[_^Display^ D
|
||
isplay][@(0.0.255) `&]_[*@3 d])&]
|
||
[s2;%% Sets the Display to be used with drop`-down list item [%-*@3 i].&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:SetDisplay`(const Display`&`): [_^WithDropChoice^ WithDropChoice
|
||
][@(0.0.255) `&]_[* SetDisplay]([@(0.0.255) const]_[_^Display^ Display][@(0.0.255) `&]_[*@3 d
|
||
])&]
|
||
[s2;%% Sets the Display to be used with drop`-down list, unless item`-specific
|
||
Display is assigned.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:SetLineCy`(int`): [_^WithDropChoice^ WithDropChoice][@(0.0.255) `&
|
||
]_[* SetLineCy]([@(0.0.255) int]_[*@3 lcy])&]
|
||
[s2;%% Sets the line height of drop`-down display.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:SetDisplay`(const Display`&`,int`): [_^WithDropChoice^ WithDropC
|
||
hoice][@(0.0.255) `&]_[* SetDisplay]([@(0.0.255) const]_[_^Display^ Display][@(0.0.255) `&]_
|
||
[*@3 d], [@(0.0.255) int]_[*@3 lcy])&]
|
||
[s2;%% Same as SetDisplay(d).SetLineCy(lcy).&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:AlwaysDrop`(bool`): [_^WithDropChoice^ WithDropChoice][@(0.0.255) `&
|
||
]_[* AlwaysDrop]([@(0.0.255) bool]_[*@3 b]_`=_[@(0.0.255) true])&]
|
||
[s2;%% If active, drop button is visible even if the list is empty
|
||
(client code can fill it using WhenDrop callback).&]
|
||
[s3; &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:DropWidth`(int`): [_^WithDropChoice^ WithDropChoice][@(0.0.255) `&
|
||
]_[* DropWidth]([@(0.0.255) int]_[*@3 w])&]
|
||
[s2;%% Set the width of the drop down list to [%-*@3 w].&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:DropWidthZ`(int`): [_^WithDropChoice^ WithDropChoice][@(0.0.255) `&
|
||
]_[* DropWidthZ]([@(0.0.255) int]_[*@3 w])&]
|
||
[s2;%% Set the width of the drop down list to a value obtained by
|
||
zooming [%-*@3 w] in accordance with font scaling.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:GetCount`(`)const: [@(0.0.255) int]_[* GetCount]()_[@(0.0.255) const
|
||
]&]
|
||
[s2;%% Returns the number of items in the drop down list.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:Get`(int`)const: [_^Value^ Value]_[* Get]([@(0.0.255) int]_[*@3 i])_[@(0.0.255) c
|
||
onst]&]
|
||
[s2;%% Returns the item with the index [%-*@3 i ]from the drop down
|
||
list.&]
|
||
[s3;%% &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:StyleDefault`(`): [@(0.0.255) const]_[_^MultiButton`:`:Style^ Mult
|
||
iButton`::Style][@(0.0.255) `&]_[* StyleDefault]()&]
|
||
[s2;%% Returns the default style of the drop down frame added to
|
||
the widget.&]
|
||
[s3; &]
|
||
[s4; &]
|
||
[s5;:WithDropChoice`:`:SetStyle`(const MultiButton`:`:Style`&`): [_^WithDropChoice^ Wit
|
||
hDropChoice][@(0.0.255) `&]_[* SetStyle]([@(0.0.255) const]_[_^MultiButton`:`:Style^ Mult
|
||
iButton`::Style][@(0.0.255) `&]_[*@3 s])&]
|
||
[s2;%% Sets the frame style to [%-_^MultiButton`:`:Style^ MultiButton`::Style]
|
||
[%-*@3 s].&]
|
||
[s3;%% &]
|
||
[s0; ] |