xref: /aoo42x/main/toolkit/doc/layout/metricfield.txt (revision cdf0e10c)
1** MetricField:
2    + in vcl:
3class VCL_DLLPUBLIC CurrencyField : public SpinField, public CurrencyFormatter
4class VCL_DLLPUBLIC CurrencyFormatter : public NumericFormatter
5class VCL_DLLPUBLIC MetricFormatter : public NumericFormatter
6class VCL_DLLPUBLIC NumericFormatter : public FormatterBase
7
8MetricFormatter - very simple sal_Int64 wrapping ...
9    + no doubles ...
10    + *Could* replicate this with the same interface:
11	+ prolly easier / better to add an XMetricField interface.
12
13vcl's MetricField - itself does a load of (double) casting ...
14    + to get the value it wants :-)
15    + Urgh ! ...
16
17** Can we just twist VCLXCurrencyField to this purpose ?
18    + what differences would we want ?
19    + LongCurrencyFormatter -> 'MetricFormatter' ...
20
21** Interesting !
22    + VCLXCurrencyField is based on 'LongCurrencyField' not CurrencyField ...
23	+ this is really based on 'BigInt' [ curious ] - so even more precision loss.
24
25    + So ... cut/paste VCLXCurencyField -> VCLXMetricField
26
27	    + Look at 'VCLXNumericField' interface ...
28		+ Use 'XNumericField' instead (?)
29		    + why does this just not "just work" ?
30
31    + The 'MetricField' (is also a MetricFormatter)
32	+ MetricFormatter [ unusually ] has 'Unit' support
33	    + API grep shows:
34		+ a) requires 'fieldunit'
35		+ b) has "UserValue"
36		+ c) => new IDL interface required ...
37		+ sub-set / expand NumericField ?
38
39	    + add 'CustomConvert' ?
40	    + add '[SG]etFirst'/Last
41	    + Properties:
42	        + 'Unit'
43		+ 'CustomUnitText'
44	    + 'spin-size' -> 'value-step'
45	    + 'BaseValue' ...
46	    + sal_Int64 ... [!?] ...
47	    + CorrectedValue
48	    + Want properties for the UI designer (?)
49		+ move that stuff out into there ?
50    + FIXME:
51	+ rationalise the 'Modify' event crud ...
52	    + share the code in a base-class ...
53
54    + Wrapper:
55        + need to have static methods 'ConvertDoubleValue' etc.
56	+ also 'ConvertValue' etc.
57	+ GetCorrectedValue - never used ...
58