1{ $Id: wsspin.pp 55146 2017-06-01 19:36:16Z sekelsenmat $}
2{
3 *****************************************************************************
4 *                                 WSSpin.pp                                 *
5 *                                 ---------                                 *
6 *                                                                           *
7 *                                                                           *
8 *****************************************************************************
9
10 *****************************************************************************
11  This file is part of the Lazarus Component Library (LCL)
12
13  See the file COPYING.modifiedLGPL.txt, included in this distribution,
14  for details about the license.
15 *****************************************************************************
16}
17unit WSSpin;
18
19{$mode objfpc}{$H+}
20{$I lcl_defines.inc}
21
22interface
23////////////////////////////////////////////////////
24// I M P O R T A N T
25////////////////////////////////////////////////////
26// 1) Only class methods allowed
27// 2) Class methods have to be published and virtual
28// 3) To get as little as posible circles, the uses
29//    clause should contain only those LCL units
30//    needed for registration. WSxxx units are OK
31// 4) To improve speed, register only classes in the
32//    initialization section which actually
33//    implement something
34// 5) To enable your XXX widgetset units, look at
35//    the uses clause of the XXXintf.pp
36////////////////////////////////////////////////////
37uses
38////////////////////////////////////////////////////
39// To get as little as posible circles,
40// uncomment only when needed for registration
41////////////////////////////////////////////////////
42  Spin, LResources,
43////////////////////////////////////////////////////
44  WSLCLClasses, WSControls, WSStdCtrls, WSFactory;
45
46type
47  { TWSCustomFloatSpinEdit }
48
49  TWSCustomFloatSpinEdit = class(TWSCustomEdit)
50  published
51    class function  GetValue(const ACustomFloatSpinEdit: TCustomFloatSpinEdit): double; virtual;
52
53(*  TODO: seperation into properties instead of bulk update
54    class procedure SetIncrement(const ACustomFloatSpinEdit: TCustomFloatSpinEdit; NewIncrement: Double); virtual;
55    class procedure SetMinValue(const ACustomFloatSpinEdit: TCustomFloatSpinEdit; NewValue: Double); virtual;
56    class procedure SetMaxValue(const ACustomFloatSpinEdit: TCustomFloatSpinEdit; NewValue: Double); virtual;
57    class procedure SetValueEmpty(const ACustomFloatSpinEdit: TCustomFloatSpinEdit; NewEmpty: boolean); virtual;
58*)
59
60    class procedure UpdateControl(const ACustomFloatSpinEdit: TCustomFloatSpinEdit); virtual;
61  end;
62  TWSCustomFloatSpinEditClass = class of TWSCustomFloatSpinEdit;
63
64  { WidgetSetRegistration }
65
66  procedure RegisterCustomFloatSpinEdit;
67
68implementation
69
70{ TWSCustomFloatSpinEdit }
71
72class function TWSCustomFloatSpinEdit.GetValue(const ACustomFloatSpinEdit: TCustomFloatSpinEdit): double;
73begin
74  Result := 0.0;
75end;
76
77class procedure TWSCustomFloatSpinEdit.UpdateControl(const ACustomFloatSpinEdit: TCustomFloatSpinEdit);
78begin
79end;
80
81{ WidgetSetRegistration }
82
83procedure RegisterCustomFloatSpinEdit;
84const
85  Done: Boolean = False;
86begin
87  if Done then exit;
88  RegisterPropertyToSkip(TCustomFloatSpinEdit, 'MaxLength', 'VCL compatibility property', '');
89  if not WSRegisterCustomFloatSpinEdit then
90    RegisterWSComponent(TCustomFloatSpinEdit, TWSCustomFloatSpinEdit);
91  Done := True;
92end;
93
94end.
95