1{ 2 ***************************************************************************** 3 * WSExtDlgs.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 WSExtDlgs; 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//////////////////////////////////////////////////// 38// To get as little as posible circles, 39// uncomment only when needed for registration 40//////////////////////////////////////////////////// 41// ExtDlgs, 42//////////////////////////////////////////////////// 43 WSLCLClasses, WSControls, WSDialogs, WSForms, WSFactory; 44 45type 46 { TWSPreviewFileControl } 47 48 TWSPreviewFileControl = class(TWSWinControl) 49 published 50 end; 51 52 { TWSPreviewFileDialog } 53 54 TWSPreviewFileDialog = class(TWSOpenDialog) 55 published 56 end; 57 58 { TWSOpenPictureDialog } 59 60 TWSOpenPictureDialog = class(TWSPreviewFileDialog) 61 published 62 end; 63 64 { TWSSavePictureDialog } 65 66 TWSSavePictureDialog = class(TWSOpenPictureDialog) 67 published 68 end; 69 70 { TWSCalculatorDialog } 71 72 TWSCalculatorDialog = class(TWSCommonDialog) 73 published 74 end; 75 76 { TWSCalculatorForm } 77 78 TWSCalculatorForm = class(TWSForm) 79 published 80 end; 81 82 { TWSCalendarDialogForm } 83 84 TWSCalendarDialogForm = class(TWSForm) 85 published 86 end; 87 88 { TWSCalendarDialog } 89 90 TWSCalendarDialog = class(TWSCommonDialog) 91 published 92 end; 93 94 { WidgetSetRegistration } 95 96 procedure RegisterPreviewFileControl; 97 procedure RegisterPreviewFileDialog; 98 procedure RegisterOpenPictureDialog; 99 procedure RegisterSavePictureDialog; 100 procedure RegisterCalculatorDialog; 101 procedure RegisterCalculatorForm; 102 function RegisterCalculatorPanel: Boolean; 103 //procedure RegisterCalendarDialogForm; 104 procedure RegisterCalendarDialog; 105 106implementation 107 108{ WidgetSetRegistration } 109 110procedure RegisterPreviewFileControl; 111const 112 Done: Boolean = False; 113begin 114 if Done then exit; 115 WSRegisterPreviewFileControl; 116// if not WSRegisterPreviewFileControl then 117// RegisterWSComponent(TPreviewFileControl, TWSPreviewFileControl); 118 Done := True; 119end; 120 121procedure RegisterPreviewFileDialog; 122const 123 Done: Boolean = False; 124begin 125 if Done then exit; 126 WSRegisterPreviewFileDialog; 127// if not WSRegisterPreviewFileDialog then 128// RegisterWSComponent(TPreviewFileDialog, TWSPreviewFileDialog); 129 Done := True; 130end; 131 132procedure RegisterOpenPictureDialog; 133const 134 Done: Boolean = False; 135begin 136 if Done then exit; 137 WSRegisterOpenPictureDialog; 138// if not WSRegisterOpenPictureDialog then 139// RegisterWSComponent(TOpenPictureDialog, TWSOpenPictureDialog); 140 Done := True; 141end; 142 143procedure RegisterSavePictureDialog; 144const 145 Done: Boolean = False; 146begin 147 if Done then exit; 148 WSRegisterSavePictureDialog; 149// if not WSRegisterSavePictureDialog then 150// RegisterWSComponent(TSavePictureDialog, TWSSavePictureDialog); 151 Done := True; 152end; 153 154procedure RegisterCalculatorDialog; 155const 156 Done: Boolean = False; 157begin 158 if Done then exit; 159 WSRegisterCalculatorDialog; 160// if not WSRegisterCalculatorDialog then 161// RegisterWSComponent(TCalculatorDialog, TWSCalculatorDialog); 162 Done := True; 163end; 164 165procedure RegisterCalculatorForm; 166const 167 Done: Boolean = False; 168begin 169 if Done then exit; 170 WSRegisterCalculatorForm; 171// if not WSRegisterCalculatorForm then 172// RegisterWSComponent(TCalculatorForm, TWSCalculatorForm); 173 Done := True; 174end; 175 176function RegisterCalculatorPanel: Boolean; 177const 178 Done: Boolean = False; 179begin 180 Result := False; 181 if Done then exit; 182 // WSRegisterCalculatorPanel; 183 Done := True; 184 Result := True; 185end; 186 187(*procedure RegisterCalendarDialogForm; 188const 189 Done: Boolean = False; 190begin 191 if Done then exit; 192 WSRegisterCalendarDialogForm; 193// if not WSRegisterCalendarDialogForm then 194// RegisterWSComponent(TCalendarDialogForm, TWSCalendarDialogForm); 195 Done := True; 196end;*) 197 198procedure RegisterCalendarDialog; 199const 200 Done: Boolean = False; 201begin 202 if Done then exit; 203 WSRegisterCalendarDialog; 204// if not WSRegisterCalendarDialog then 205// RegisterWSComponent(TCalendarDialog, TWSCalendarDialog); 206 Done := True; 207end; 208 209end. 210