1topic "DataPusher";
2[2 $$0,0#00000000000000000000000000000000:Default]
3[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
4[l288;2 $$2,0#27521748481378242620020725143825:desc]
5[0 $$3,0#96390100711032703541132217272105:end]
6[H6;0 $$4,0#05600065144404261032431302351956:begin]
7[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
8[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
9[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
10[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
11[b42;2 $$9,9#13035079074754324216151401829390:normal]
12[{_}%EN-US
13[ {{10000@3 [s0; [*@(229)4 DataPusher]]}}&]
14[s3; &]
15[s1;:DataPusher`:`:class:%- [@(0.0.255)3 class][3 _][*3 DataPusher][3 _:_][@(0.0.255)3 public][3 _
16][*@3;3 Pusher]&]
17[s0; &]
18[s2;
19@@image:1906&143
20�������������������ѭ°��Ż����ۘ���Ď��ű�㶔����ݏ������餐ϓ�Ǔ���������Ё
21ײ���࠰������������������֍������׎��׹���Δ�����ᄌ������ڔ���䥍�����Ѯ�
22�����ْє���䛈��ޓ����붽�Ȯ��ی�ٞ����������ޅ۶�ϖ���������������П��Ҿ
23��я��ܘ���������蘧���ݮ����޷�����ʞ���곷����֔�����ң�����ӯ���������ܙ����
24і��҄��Į��ܷ������Ұ���ϗ����ۘ���⏧���܀��������ϗ�������Ѳ������Ƭ������
25������׳���׻�߀�ݧ������ٌ������������ؒ���Ƣ���ؒ��ᮥ�‡�������ˆ���ނ���
26
27&]
28[s0; &]
29[s9; DataPusher is a class that is able to Convert and Display some
30Value and also allows user to click this value (usually in order
31to change it). Note that both Convert and Display lifetime must
32exceed the lifetime of DataPusher (DataPusher stores just the
33reference to them).&]
34[s2; &]
35[s9; Usual usage pattern is that DataPusher displays some data that
36can be changed by some complex dialog. This pattern can be implemented
37either by deriving new class from DataPusher, overriding DoAction
38method and using SetDataAction at the end of it to both change
39the value of DataPusher and invoke repainting and WhenAction,
40or it can use default DoAction implementation and WhenAction
41callback (do not call SetDataAction in this case).&]
42[s2; &]
43[s0;%- [%%/ Derived from][%%  ][^topic`:`/`/CtrlLib`/src`/Pusher`$en`-us^ Pusher]&]
44[s3; &]
45[s0; &]
46[ {{10000F(128)G(128)@1 [s0; [* Constructor Detail]]}}&]
47[s3;%- &]
48[s5;:DataPusher`:`:DataPusher`(`):%- [* DataPusher]()&]
49[s2; Initializes the data pusher.&]
50[s3; &]
51[s4; &]
52[s5;:DataPusher`:`:DataPusher`(const Convert`&`,const Display`&`):%- [* DataPusher]([@(0.0.255) c
53onst]_[_^Convert^ Convert][@(0.0.255) `&]_[*@3 convert], [@(0.0.255) const]_[_^Display^ Dis
54play][@(0.0.255) `&]_[*@3 display]_`=_StdDisplay())&]
55[s2; Creates DataPusher with specified Convert and Display used to
56Convert a then Display the Value of DataPusher. Note that both
57convert and display lifetime must exceed the lifetime of DataPusher
58(DataPusher stores just the reference to them).&]
59[s7; [%-*C@3 convert]-|Convert.&]
60[s7; [%-*C@3 display]-|Display.&]
61[s3; &]
62[s4;%- &]
63[s5;:DataPusher`:`:DataPusher`(const Display`&`):%- [* DataPusher]([@(0.0.255) const]_[_^Display^ D
64isplay][@(0.0.255) `&]_[*@3 display])&]
65[s2; Creates DataPusher with specified Display.&]
66[s7; [%-*C@3 display]-|Display.&]
67[s3; &]
68[s0; &]
69[ {{10000F(128)G(128)@1 [s0; [* Protected Method List]]}}&]
70[s3;%- &]
71[s5;:DataPusher`:`:DoAction`(`):%- [@(0.0.255) virtual] [@(0.0.255) void]_[* DoAction]()&]
72[s2; This virtual method is invoked when user clicks DataPusher.
73Default action is to call WhenAction callback.&]
74[s3; &]
75[s0;%- &]
76[ {{10000F(128)G(128)@1 [s0; [* Public Member List]]}}&]
77[s3;%- &]
78[s5;:DataPusher`:`:SetConvert`(const Convert`&`):%- [_^DataPusher^ DataPusher][@(0.0.255) `&
79]_[* SetConvert]([@(0.0.255) const]_[_^Convert^ Convert][@(0.0.255) `&]_[*@3 `_convert])&]
80[s2; Sets the new Convert.&]
81[s7; [%-*C@3 `_convert]-|New Convert.&]
82[s7; [*/ Return value]-|`*this for chaining.&]
83[s3; &]
84[s4;%- &]
85[s5;:DataPusher`:`:GetConvert`(`)const:%- [@(0.0.255) const]_[_^Convert^ Convert][@(0.0.255) `&
86]_[* GetConvert]()_[@(0.0.255) const]&]
87[s2; Returns current Convert.&]
88[s7; [*/ Return value]-|Current Convert.&]
89[s3; &]
90[s4;%- &]
91[s5;:DataPusher`:`:SetDisplay`(const Display`&`):%- [_^DataPusher^ DataPusher][@(0.0.255) `&
92]_[* SetDisplay]([@(0.0.255) const]_[_^Display^ Display][@(0.0.255) `&]_[*@3 `_display])&]
93[s2; Sets the new Display.&]
94[s7; [%-*C@3 `_display]-|New Display.&]
95[s7; [*/ Return value]-|`*this for chaining.&]
96[s3; &]
97[s4;%- &]
98[s5;:DataPusher`:`:GetDisplay`(`)const:%- [@(0.0.255) const]_[_^Display^ Display][@(0.0.255) `&
99]_[* GetDisplay]()_[@(0.0.255) const]&]
100[s2; Returns current Display.&]
101[s7; [*/ Return value]-|Current Display.&]
102[s3; &]
103[s4;%- &]
104[s5;:DataPusher`:`:SetDataAction`(const Value`&`):%- [@(0.0.255) void]_[* SetDataAction](
105[@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 value])&]
106[s2; Invokes SetData([%-*C@3 value]) and then UpdateActionRefresh().
107Useful when building DataPusher derived class.&]
108[s3; &]
109[s4;%- &]
110[s5;:DataPusher`:`:Set`(const Value`&`):%- [@(0.0.255) void]_[* Set]([@(0.0.255) const]_[_^Value^ V
111alue][@(0.0.255) `&]_[*@3 value])&]
112[s2; Alternative way to set data, decoupled from SetData interface.
113Sets the data to be displayed. Intended to be used by derived
114classes that implement own SetData/GetData.&]
115[s3; &]
116[s4;%- &]
117[s5;:DataPusher`:`:SetData`(const Value`&`):%- [@(0.0.255) virtual]
118[@(0.0.255) void]_[* SetData]([@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 value])
119&]
120[s2; Sets the control`'s data to [%-*@3 value].&]
121[s3; &]
122[s4;%- &]
123[s5;:DataPusher`:`:GetData`(`)const:%- [@(0.0.255) virtual] [_^Value^ Value]_[* GetData]()_
124[@(0.0.255) const]&]
125[s2; Returns the control`'s data.&]
126[s3;%- &]
127[s4;%- &]
128[s5;:DataPusher`:`:NullText`(const char`*`,Color`):%- [_^DataPusher^ DataPusher][@(0.0.255) `&
129]_[* NullText]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 text]_`=_t`_(`"([@(0.0.255) defa
130ult])`"), [_^Color^ Color]_[*@3 ink]_`=_Brown)&]
131[s5;:DataPusher`:`:NullText`(const char`*`,Font`,Color`):%- [_^DataPusher^ DataPusher][@(0.0.255) `&
132]_[* NullText]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 text], [_^Font^ Font]_[*@3 fnt],
133[_^Color^ Color]_[*@3 ink])&]
134[s2; Sets the default text that will be displayed if no data is supplied.&]
135[s7;%- [*@3 text]-|default text&]
136[s7;%- [*@3 ink]-|color of the text&]
137[s7;%- [*@3 fnt]-|font of the text&]
138[s3; &]
139[s4;%- &]
140[s5;:DataPusher`:`:WhenPreAction:%- [_^Callback^ Callback]_[* WhenPreAction]&]
141[s2; This callback is invoked before DoAction.&]
142[s3; &]
143[s0; ]