1{ 2 ***************************************************************************** 3 * WSDesigner.pp * 4 * ------------ * 5 * * 6 * * 7 ***************************************************************************** 8 9 ***************************************************************************** 10 This file is part of the Lazarus Component Library (LCL) 11 12 See the file COPYING.modifiedLGPL.txt, included in this distribution, 13 for details about the license. 14 ***************************************************************************** 15} 16unit WSDesigner; 17 18{$mode objfpc}{$H+} 19{$I lcl_defines.inc} 20 21interface 22//////////////////////////////////////////////////// 23// I M P O R T A N T 24//////////////////////////////////////////////////// 25// 1) Only class methods allowed 26// 2) Class methods have to be published and virtual 27// 3) To get as little as posible circles, the uses 28// clause should contain only those LCL units 29// needed for registration. WSxxx units are OK 30// 4) To improve speed, register only classes in the 31// initialization section which actually 32// implement something 33// 5) To enable your XXX widgetset units, look at 34// the uses clause of the XXXintf.pp 35//////////////////////////////////////////////////// 36uses 37 Classes, RubberBand, 38 WsControls, WSFactory; 39 40type 41 { TWsCustomRubberBand } 42 43 TWsCustomRubberBand = class(TWsWinControl) 44 published 45 class procedure SetShape(ARubberBand: TCustomRubberBand; AShape: TRubberBandShape); virtual; overload; 46 end; 47 TWsCustomRubberBandClass = class of TWsCustomRubberBand; 48 49 { WidgetSetRegistration } 50 51 procedure RegisterCustomRubberBand; 52 53implementation 54 55{ TWsCustomRubberBand } 56 57class procedure TWsCustomRubberBand.SetShape(ARubberBand: TCustomRubberBand; 58 AShape: TRubberBandShape); 59begin 60end; 61 62 { WidgetSetRegistration } 63 64procedure RegisterCustomRubberBand; 65const 66 Done: Boolean = False; 67begin 68 if Done then exit; 69 WSRegisterCustomRubberBand; 70// if not WSRegisterCustomRubberBand then 71// RegisterWSComponent(TCustomRubberBand, TWSCustomRubberBand); 72 Done := True; 73end; 74 75end. 76