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 ؀휱Ƙʼ͡СƊ¬ʁ­€թȥ Ô׽綱ßӲƎÀè씳ú씳ú ߐ߶ڰ؛ѲԎƌ拝ۿզ ܈יҗ얏̰޶ਏ Υ߰ߪäݸф˰ʼnпǯ쥤Ū ρ끰ᣝҡܔԡ̓ҡ؎ӌȱʺ ޗ伓ӎߡӫ壅ϸ裤Ӷˊݯߡ ٔזۛвԔꯞƍӌ١ҡ҇ àָΝ܀ʎ܀ا԰С֛҇ ٹӔૹɴ߯DzʉԆ̹ &] [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; ]