ultimatepp/uppsrc/CtrlLib/src.tpp/Switch$en-us.tpp
cbpporter 570358510f CtrlLib documentation update
git-svn-id: svn://ultimatepp.org/upp/trunk@992 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2009-03-20 17:04:08 +00:00

234 lines
No EOL
10 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

topic "Switch";
[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]
[{_}%EN-US
[ {{10000@3 [s0; [*@(229)4 Switch]]}}&]
[s3;%- &]
[s1;:Switch`:`:class:%- [@(0.0.255)3 class][3 _][*3 Switch][3 _:_][@(0.0.255)3 public][3 _][*@3;3 Ct
rl]&]
[s0; Switch provides selection of mutually exclusive options (cases).&]
[s0; &]
[s2;
@@image:1287&131
€€€<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><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><EFBFBD><EFBFBD>
&]
[s2;
@@image:406&312
€γ€€€€π<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><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><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>
&]
[s9; Options can be visually aligned horizontally or vertically `-
U`+`+ choses alignment based on size of options and Ctrl rectangle.
Each option represents a case with associated text and value.
Switch can be assigned any Value (not only Values associated
with current cases); if there is no case with Value equal to
the Value of Switch, no case is highlighted.&]
[s0;* &]
[s0;%- [%%/ Derived from][%% ][^topic`:`/`/CtrlCore`/src`/Ctrl`$en`-us^ Ctrl]&]
[s3; &]
[s0; &]
[ {{10000F(128)G(128)@1 [s0; [* Constructor Detail]]}}&]
[s3;%- &]
[s5;:Switch`:`:Switch`(`):%- [* Switch]()&]
[s2; Initializes the switch.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:`~Switch`(`):%- [@(0.0.255) `~][* Switch]()&]
[s2; Default destructor.&]
[s3; &]
[s0;%- &]
[ {{10000F(128)G(128)@1 [s0; [* Public Method List]]}}&]
[s3;%- &]
[s5;:Switch`:`:SetLabel`(int`,const char`*`):%- [_^Switch^ Switch][@(0.0.255) `&]_[* SetLab
el]([@(0.0.255) int]_[*@3 i], [@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 text])&]
[s2; Sets text of case with specified index [*@3 i]. Text can contain
`'`\b`' for access`-key assignment. Value of case is set to [*@3 i].
If [*@3 i] is greater than current number of cases, empty cases
are added to Switch with values equivalent to their indexes.&]
[s7; [%-*C@3 i]-|Index of the case.&]
[s7; [%-*C@3 text]-|Text of the case.&]
[s7; [*/ Return value]-|`*this for chaining.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:SetLabel`(const char`*`):%- [_^Switch^ Switch][@(0.0.255) `&]_[* SetLabel]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 text])&]
[s2; Sets content of Switch. Each line of [*@3 text ]represents one
case with value equivalent to the index of line.&]
[s7; [%-*C@3 text]-|Content of the Switch.&]
[s7; [*/ Return value]-|`*this for chaining.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:GetLabel`(int`)const:%- [_^String^ String]_[* GetLabel]([@(0.0.255) int]_[*@3 i
])_[@(0.0.255) const]&]
[s2; Returns the text of case with specified index [*@3 i].&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:GetLabel`(`)const:%- [_^String^ String]_[* GetLabel]()_[@(0.0.255) const]&]
[s2; Returns the context of the Switch.&]
[s3;%- &]
[s4;%- &]
[s5;:Switch`:`:Set`(int`,const Value`&`,const char`*`):%- [_^Switch^ Switch][@(0.0.255) `&
]_[* Set]([@(0.0.255) int]_[*@3 i], [@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 val
], [@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 text])&]
[s2; Sets text of case with specified index [*@3 i]. Text can contain
`'`\b`' for access`-key assignment. Value of case is set to [*@3 val].
If [*@3 i] is greater than current number of cases, empty cases
are added to Switch with values equivalent to their indexes.&]
[s7; [%-*C@3 i]-|Index of the case.&]
[s7; [%-*C@3 val]-|Value of the case.&]
[s7; [%-*C@3 text]-|Text of the case.&]
[s7; [*/ Return value]-|`*this for chaining.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:Set`(int`,const Value`&`):%- [_^Switch^ Switch][@(0.0.255) `&]_[* Set]([@(0.0.255) i
nt]_[*@3 i], [@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 val])&]
[s2; Sets the Value of of case with specified index [*@3 i]. The text
of case is unaltered.&]
[s7; [%-*C@3 i]-|Index of the case.&]
[s7; [%-*C@3 val]-|Value of the case.&]
[s7; [*/ Return value]-|`*this for chaining.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:Add`(const Value`&`,const char`*`):%- [_^Switch^ Switch][@(0.0.255) `&]_[* A
dd]([@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 val], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 text])&]
[s2; Adds a new case to the Switch.&]
[s7; [%-*C@3 val]-|Value of the case.&]
[s7; [%-*C@3 text]-|Text of the case.&]
[s7; [*/ Return value]-|`*this for chaining.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:Add`(const char`*`):%- [_^Switch^ Switch][@(0.0.255) `&]_[* Add]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 text])&]
[s2; Adds a new case to the Switch. Value of the case is equal to
its index.&]
[s7; [%-*C@3 text]-|Text of the case.&]
[s7; [*/ Return value]-|`*this for chaining&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:EnableCase`(int`,bool`):%- [@(0.0.255) void]_[* EnableCase]([@(0.0.255) int]_
[*@3 i], [@(0.0.255) bool]_[*@3 enable]_`=_[@(0.0.255) true])&]
[s2; Enables or disables case with the specified index [*@3 i].&]
[s7; [%-*C@3 i]-|Index of the case to be enabled or disabled.&]
[s7; [%-*C@3 enable]-|Enable flag (true if case is to be enabled).&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:DisableCase`(int`):%- [@(0.0.255) void]_[* DisableCase]([@(0.0.255) int]_[*@3 i
])&]
[s2; Same as [^topic`:`/`/CtrlLib`/src`/Switch`$en`-us`#Switch`:`:EnableCase`(int`,bool`)^ E
nableCase](i, false).&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:EnableValue`(const Value`&`,bool`):%- [@(0.0.255) void]_[* EnableValue]([@(0.0.255) c
onst]_[_^Value^ Value][@(0.0.255) `&]_[*@3 val], [@(0.0.255) bool]_[*@3 enable]_`=_[@(0.0.255) t
rue])&]
[s2; Enables or disables case based on its value.&]
[s7; [%-*C@3 val]-|Value of the case to be enabled / disabled.&]
[s7; [%-*C@3 enable]-|Enable flag (true if case is to be enabled).&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:DisableValue`(const Value`&`):%- [@(0.0.255) void]_[* DisableValue]([@(0.0.255) c
onst]_[_^Value^ Value][@(0.0.255) `&]_[*@3 val])&]
[s2; Same as [^topic`:`/`/CtrlLib`/src`/Switch`$en`-us`#Switch`:`:EnableValue`(const Value`&`,bool`)^ E
nableValue](val, false).&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:Reset`(`):%- [@(0.0.255) void]_[* Reset]()&]
[s2; Removes content of the Switch.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:GetCases`(`)const:%- [@(0.0.255) const]_[_^Array^ Array][@(0.0.255) <][_^Switch`:`:Case^ C
ase][@(0.0.255) >`&]_[* GetCases]()_[@(0.0.255) const]&]
[s2;%- Retrieves information of all cases in the Switch.&]
[s7; [*/ Return value]-|Array of [^topic`:`/`/CtrlLib`/src`/Switch`$en`-us`#Switch`:`:Case`:`:struct^ S
witch`::Case] structures.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:operator int`(`)const:%- [* operator_int]()_[@(0.0.255) const]&]
[s2; Simplified access to Switch Value. Equivalent to (int)GetData().&]
[s6; Switch must be assigned an integer value.&]
[s7; [*/ Return value]-|Integer Value of Switch.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:operator`=`(const Value`&`):%- [@(0.0.255) void]_[* operator`=]([@(0.0.255) c
onst]_[_^Value^ Value][@(0.0.255) `&]_[*@3 v])&]
[s2; Equivalent to SetData([%-*@3 v]).&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:SetFont`(Font`):%- [_^Switch^ Switch][@(0.0.255) `&]_[* SetFont]([_^Font^ Font
]_[*@3 f])&]
[s2; Alters the font to be used in the Switch.&]
[s7; [%-*C@3 f]-|Font to be used.&]
[s7; [*/ Return value]-|`*this for chaining.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:GetFont`(`)const:%- [_^Font^ Font]_[* GetFont]()_[@(0.0.255) const]&]
[s2; Retrieves the font used in the Switch.&]
[s7; [*/ Return value]-|`*this for chaining.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:MinCaseHeight`(int`):%- [_^Switch^ Switch][@(0.0.255) `&]_[* MinCaseHeight](
[@(0.0.255) int]_[*@3 cy])&]
[s2; Sets the minimal height of a case in the switch.&]
[s7; [%-*C@3 f]-|Font to be used.&]
[s7; [*/ Return value]-|`*this for chaining.&]
[s3; &]
[s0; &]
[s0; &]
[s0;%- &]
[ {{10000@3 [s0; [*@(229)4 Switch`::Case]]}}&]
[s3; &]
[s1;:Switch`:`:Case`:`:struct:%- [@(0.0.255)3 struct][3 _][*3 Case][3 _:_][@(0.0.255)3 public][3 _
][*@3;3 Moveable][@(0.0.255)3 <][*3 Case][@(0.0.255)3 >][3 _]&]
[s9; This structure is returned by the [^topic`:`/`/CtrlLib`/src`/Switch`$en`-us`#Switch`:`:GetCases`(`)const^ S
witch`::GetCases] method.&]
[s3; &]
[s0;%- &]
[ {{10000F(128)G(128)@1 [s0; [* Public Field List]]}}&]
[s3;%- &]
[s5;:Switch`:`:Case`:`:label:%- [_^String^ String]_[* label]&]
[s2; Text of the case.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:Case`:`:value:%- [_^Value^ Value]_[* value]&]
[s2; Value of the case.&]
[s3; &]
[s4;%- &]
[s5;:Switch`:`:Case`:`:accesskey:%- [@(0.0.255) int]_[* accesskey]&]
[s2; Access key.&]
[s5; &]
[s4;%- &]
[s5;:Switch`:`:Case`:`:enabled:%- [@(0.0.255) bool]_[* enabled]&]
[s2; Enable flag.&]
[s3; &]
[s0; ]