isxclasses.pas 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
  1. TObject = class
  2. constructor Create;
  3. procedure Free;
  4. end;
  5. TPersistent = class(TObject)
  6. procedure Assign(Source: TPersistent);
  7. end;
  8. TComponent = class(TPersistent)
  9. function FindComponent(AName: String): TComponent;
  10. constructor Create(AOwner: TComponent);
  11. property Owner: TComponent; read write;
  12. procedure DestroyComponents;
  13. procedure Destroying;
  14. procedure FreeNotification(AComponent: TComponent);
  15. procedure InsertComponent(AComponent: TComponent);
  16. procedure RemoveComponent(AComponent: TComponent);
  17. property Components[Index: Integer]: TComponent; read;
  18. property ComponentCount: Integer; read;
  19. property ComponentIndex: Integer; read write;
  20. property ComponentState: Byte; read;
  21. property DesignInfo: Longint; read write;
  22. property Name: String; read write;
  23. property Tag: Longint; read write;
  24. end;
  25. TStrings = class(TPersistent)
  26. function Add(S: String): Integer;
  27. procedure Append(S: String);
  28. procedure AddStrings(Strings: TStrings);
  29. procedure Clear;
  30. procedure Delete(Index: Integer);
  31. function IndexOf(const S: String): Integer;
  32. procedure Insert(Index: Integer; S: String);
  33. property Count: Integer; read;
  34. property Text: String; read write;
  35. property CommaText: String; read write;
  36. procedure LoadFromFile(FileName: String);
  37. procedure SaveToFile(FileName: String);
  38. property Strings[Index: Integer]: String; read write;
  39. property Objects[Index: Integer]: TObject; read write;
  40. end;
  41. TNotifyEvent = procedure(Sender: TObject);
  42. TDuplicates = (dupIgnore, dupAccept, dupError);
  43. TStringList = class(TStrings)
  44. function Find(S: String; var Index: Integer): Boolean;
  45. procedure Sort;
  46. property Duplicates: TDuplicates; read write;
  47. property Sorted: Boolean; read write;
  48. property OnChange: TNotifyEvent; read write;
  49. property OnChanging: TNotifyEvent; read write;
  50. end;
  51. { Seek Origin values: soFromBeginning, soFromCurrent, soFromEnd }
  52. TStream = class(TObject)
  53. function Read(var Buffer: AnyString; ByteCount: Longint): Longint;
  54. function Write(const Buffer: AnyString; ByteCount: Longint): Longint;
  55. function Seek(Offset: Int64; Origin: Word): Int64;
  56. procedure ReadBuffer(var Buffer: AnyString; ByteCount: Longint);
  57. procedure WriteBuffer(const Buffer: AnyString; ByteCount: Longint);
  58. function CopyFrom(Source: TStream; ByteCount: Int64; BufferSize: Integer): Int64;
  59. property Position: Longint; read write;
  60. property Size: Longint; read write;
  61. end;
  62. THandleStream = class(TStream)
  63. constructor Create(AHandle: Integer);
  64. property Handle: Integer; read;
  65. end;
  66. TFileStream = class(THandleStream)
  67. constructor Create(Filename: String; Mode: Word);
  68. end;
  69. TStringStream = class(TStream)
  70. constructor Create(AString: String);
  71. end;
  72. TGraphicsObject = class(TPersistent)
  73. property OnChange: TNotifyEvent; read write;
  74. end;
  75. TBrushStyle = (bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross);
  76. TBrush = class(TGraphicsObject)
  77. constructor Create;
  78. property Color: TColor; read write;
  79. property Style: TBrushStyle; read write;
  80. end;
  81. TFontStyle = (fsBold, fsItalic, fsUnderline, fsStrikeOut);
  82. TFontStyles = set of TFontStyle;
  83. TColor = Integer;
  84. { TColor values: clBlack, clMaroon, clGreen, clOlive, clNavy, clPurple, clTeal, clGray, clSilver, clRed, clLime, clYellow, clBlue, clFuchsia, clAqua, clLtGray, clDkGray, clWhite, clNone, clDefault, clScrollBar, clBackground, clActiveCaption, clInactiveCaption, clMenu, clWindow, clWindowFrame, clMenuText, clWindowText, clCaptionText, clActiveBorder, clInactiveBorder, clAppWorkSpace, clHighlight, clHighlightText, clBtnFace, clBtnShadow, clGrayText, clBtnText, clInactiveCaptionText, clBtnHighlight, cl3DDkShadow, cl3DLight, clInfoText, clInfoBk, clHotLight }
  85. TFont = class(TGraphicsObject)
  86. constructor Create;
  87. property Handle: Integer; read;
  88. property Color: TColor; read write;
  89. property Height: Integer; read write;
  90. property Name: String; read write;
  91. property Pitch: Byte; read write;
  92. property Size: Integer; read write;
  93. property PixelsPerInch: Integer; read write;
  94. property Style: TFontStyles; read write;
  95. end;
  96. TPenMode = (pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, pmMaskPenNot, pmMergeNotPen, pmMaskNotPen, pmMerge, pmNotMerge, pmMask, pmNotMask, pmXor, pmNotXor);
  97. TPenStyle = (psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideFrame);
  98. TPen = class(TGraphicsObject)
  99. constructor Create;
  100. property Color: TColor; read write;
  101. property Mode: TPenMode; read write;
  102. property Style: TPenStyle; read write;
  103. property Width: Integer; read write;
  104. end;
  105. TCanvas = class(TPersistent)
  106. procedure Arc(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);
  107. procedure Chord(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);
  108. procedure Draw(X, Y: Integer; Graphic: TGraphic);
  109. procedure Ellipse(X1, Y1, X2, Y2: Integer);
  110. procedure FloodFill(X, Y: Integer; Color: TColor; FillStyle: Byte);
  111. procedure LineTo(X, Y: Integer);
  112. procedure MoveTo(X, Y: Integer);
  113. procedure Pie(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);
  114. procedure Rectangle(X1, Y1, X2, Y2: Integer);
  115. procedure Refresh;
  116. procedure RoundRect(X1, Y1, X2, Y2, X3, Y3: Integer);
  117. function TextHeight(Text: String): Integer;
  118. procedure TextOut(X, Y: Integer; Text: String);
  119. function TextWidth(Text: String): Integer;
  120. property Handle: Integer; read write;
  121. property Pixels: Integer Integer Integer; read write;
  122. property Brush: TBrush; read;
  123. property CopyMode: Byte; read write;
  124. property Font: TFont; read;
  125. property Pen: TPen; read;
  126. end;
  127. TGraphic = class(TPersistent)
  128. procedure LoadFromFile(const Filename: String);
  129. procedure SaveToFile(const Filename: String);
  130. property Empty: Boolean; read write;
  131. property Height: Integer; read write;
  132. property Modified: Boolean; read write;
  133. property Width: Integer; read write;
  134. property OnChange: TNotifyEvent; read write;
  135. end;
  136. TAlphaFormat = (afIgnored, afDefined, afPremultiplied);
  137. HBITMAP = Integer;
  138. TBitmap = class(TGraphic)
  139. procedure LoadFromStream(Stream: TStream);
  140. procedure SaveToStream(Stream: TStream);
  141. property AlphaFormat: TAlphaFormat; read write;
  142. property Canvas: TCanvas; read write;
  143. property Handle: HBITMAP; read write;
  144. end;
  145. TPngImage = class(TGraphic)
  146. procedure LoadFromStream(Stream: TStream);
  147. procedure SaveToStream(Stream: TStream);
  148. property Canvas: TCanvas; read write;
  149. end;
  150. TAlign = (alNone, alTop, alBottom, alLeft, alRight, alClient);
  151. TAnchorKind = (akLeft, akTop, akRight, akBottom);
  152. TAnchors = set of TAnchorKind;
  153. TCursor = Integer;
  154. { TCursor values: crDefault, crNone, crArrow, crCross, crIBeam, crSizeNESW, crSizeNS, crSizeNWSE, crSizeWE, crUpArrow, crHourGlass, crDrag, crNoDrop, crHSplit, crVSplit, crMultiDrag, crSQLWait, crNo, crAppStart, crHelp, crHandPoint, crSizeAll, crHand }
  155. TStyleElement = (seFont, seClient, seBorder);
  156. TStyleElements = set of TStyleElement;
  157. TControl = class(TComponent)
  158. constructor Create(AOwner: TComponent);
  159. procedure BringToFront;
  160. procedure Hide;
  161. procedure Invalidate;
  162. procedure Refresh;
  163. procedure Repaint;
  164. procedure SendToBack;
  165. procedure Show;
  166. procedure Update;
  167. procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer);
  168. property Left: Integer; read write;
  169. property Top: Integer; read write;
  170. property Width: Integer; read write;
  171. property Height: Integer; read write;
  172. property Hint: String; read write;
  173. property Align: TAlign; read write;
  174. property ClientHeight: Longint; read write;
  175. property ClientWidth: Longint; read write;
  176. property ShowHint: Boolean; read write;
  177. property Visible: Boolean; read write;
  178. property Enabled: Boolean; read write;
  179. property Cursor: TCursor; read write;
  180. property StyleElements: TStyleElements; read write;
  181. property StyleName: String; read write;
  182. end;
  183. TWinControl = class(TControl)
  184. property Parent: TWinControl; read write;
  185. property ParentBackground: Boolean; read write;
  186. property Handle: Longint; read write;
  187. property Showing: Boolean; read;
  188. property TabOrder: Integer; read write;
  189. property TabStop: Boolean; read write;
  190. function CanFocus: Boolean;
  191. function Focused: Boolean;
  192. property Controls[Index: Integer]: TControl; read;
  193. property ControlCount: Integer; read;
  194. end;
  195. TGraphicControl = class(TControl)
  196. end;
  197. TCustomControl = class(TWinControl)
  198. end;
  199. TScrollingWinControl = class(TWinControl)
  200. procedure ScrollInView(AControl: TControl);
  201. end;
  202. TFormBorderStyle = (bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin);
  203. TBorderIcon = (biSystemMenu, biMinimize, biMaximize, biHelp);
  204. TBorderIcons = set of TBorderIcon;
  205. TConstraintSize = 0..MaxInt;
  206. TSizeConstraints = class(TPersistent);
  207. property MaxHeight: TConstraintSize; read write;
  208. property MaxWidth: TConstraintSize; read write;
  209. property MinHeight: TConstraintSize; read write;
  210. property MinWidth: TConstraintSize; read write;
  211. end;
  212. TFormStyle = (fsNormal, fsMDIChild, fsMDIForm, fsStayOnTop);
  213. TPopupMode = (pmNone, pmAuto, pmExplicit);
  214. TPosition = (poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly, poScreenCenter, poDesktopCenter, poMainFormCenter, poOwnerFormCenter);
  215. TCloseAction = (caNone, caHide, caFree, caMinimize);
  216. TCloseEvent = procedure(Sender: TObject; var Action: TCloseAction);
  217. TCloseQueryEvent = procedure(Sender: TObject; var CanClose: Boolean);
  218. TEShiftState = (ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble);
  219. TShiftState = set of TEShiftState;
  220. TKeyEvent = procedure(Sender: TObject; var Key: Word; Shift: TShiftState);
  221. TKeyPressEvent = procedure(Sender: TObject; var Key: Char);
  222. TForm = class(TScrollingWinControl)
  223. constructor CreateNew(AOwner: TComponent);
  224. procedure Close;
  225. procedure Hide;
  226. procedure Show;
  227. function ShowModal: Integer;
  228. procedure Release;
  229. property Active: Boolean; read;
  230. property ActiveControl: TWinControl; read write;
  231. property Anchors: TAnchors; read write;
  232. property AutoScroll: Boolean; read write;
  233. property BorderIcons: TBorderIcons; read write;
  234. property BorderStyle: TFormBorderStyle; read write;
  235. property Caption: String; read write;
  236. property Color: TColor; read write;
  237. property Constraints: TSizeConstraints; read write;
  238. property Font: TFont; read write;
  239. property FormStyle: TFormStyle; read write;
  240. property KeyPreview: Boolean; read write;
  241. property PopupMode: TPopupMode; read write;
  242. property PopupParent: TForm; read write;
  243. property Position: TPosition; read write;
  244. property OnActivate: TNotifyEvent; read write;
  245. property OnClick: TNotifyEvent; read write;
  246. property OnDblClick: TNotifyEvent; read write;
  247. property OnClose: TCloseEvent; read write;
  248. property OnCloseQuery: TCloseQueryEvent; read write;
  249. property OnCreate: TNotifyEvent; read write;
  250. property OnDestroy: TNotifyEvent; read write;
  251. property OnDeactivate: TNotifyEvent; read write;
  252. property OnHide: TNotifyEvent; read write;
  253. property OnKeyDown: TKeyEvent; read write;
  254. property OnKeyPress: TKeyPressEvent; read write;
  255. property OnKeyUp: TKeyEvent; read write;
  256. property OnResize: TNotifyEvent; read write;
  257. property OnShow: TNotifyEvent; read write;
  258. end;
  259. TCustomLabel = class(TGraphicControl)
  260. end;
  261. TAlignment = (taLeftJustify, taRightJustify, taCenter);
  262. TLabel = class(TCustomLabel)
  263. property Alignment: TAlignment; read write;
  264. property Anchors: TAnchors; read write;
  265. property AutoSize: Boolean; read write;
  266. property Caption: String; read write;
  267. property Color: TColor; read write;
  268. property FocusControl: TWinControl; read write;
  269. property Font: TFont; read write;
  270. property WordWrap: Boolean; read write;
  271. property OnClick: TNotifyEvent; read write;
  272. property OnDblClick: TNotifyEvent; read write;
  273. end;
  274. TCustomEdit = class(TWinControl)
  275. procedure Clear;
  276. procedure ClearSelection;
  277. procedure SelectAll;
  278. property Modified: Boolean; read write;
  279. property SelLength: Integer; read write;
  280. property SelStart: Integer; read write;
  281. property SelText: String; read write;
  282. property Text: String; read write;
  283. end;
  284. TBorderStyle = TFormBorderStyle;
  285. TEditCharCase = (ecNormal, ecUpperCase, ecLowerCase);
  286. TEdit = class(TCustomEdit)
  287. property Anchors: TAnchors; read write;
  288. property AutoSelect: Boolean; read write;
  289. property AutoSize: Boolean; read write;
  290. property BorderStyle: TBorderStyle; read write;
  291. property CharCase: TEditCharCase; read write;
  292. property Color: TColor; read write;
  293. property Font: TFont; read write;
  294. property HideSelection: Boolean; read write;
  295. property MaxLength: Integer; read write;
  296. property PasswordChar: Char; read write;
  297. property ReadOnly: Boolean; read write;
  298. property Text: String; read write;
  299. property OnChange: TNotifyEvent; read write;
  300. property OnClick: TNotifyEvent; read write;
  301. property OnDblClick: TNotifyEvent; read write;
  302. property OnKeyDown: TKeyEvent; read write;
  303. property OnKeyPress: TKeyPressEvent; read write;
  304. property OnKeyUp: TKeyEvent; read write;
  305. end;
  306. TNewEdit = class(TEdit)
  307. end;
  308. TCustomMemo = class(TCustomEdit)
  309. property Lines: TStrings; read write;
  310. end;
  311. TScrollStyle = (ssNone, ssHorizontal, ssVertical, ssBoth);
  312. TMemo = class(TCustomMemo)
  313. property Alignment: TAlignment; read write;
  314. property Anchors: TAnchors; read write;
  315. property BorderStyle: TBorderStyle; read write;
  316. property Color: TColor; read write;
  317. property Font: TFont; read write;
  318. property HideSelection: Boolean; read write;
  319. property Lines: TStrings; read write;
  320. property MaxLength: Integer; read write;
  321. property ReadOnly: Boolean; read write;
  322. property ScrollBars: TScrollStyle; read write;
  323. property WantReturns: Boolean; read write;
  324. property WantTabs: Boolean; read write;
  325. property WordWrap: Boolean; read write;
  326. property OnChange: TNotifyEvent; read write;
  327. property OnClick: TNotifyEvent; read write;
  328. property OnDblClick: TNotifyEvent; read write;
  329. property OnKeyDown: TKeyEvent; read write;
  330. property OnKeyPress: TKeyPressEvent; read write;
  331. property OnKeyUp: TKeyEvent; read write;
  332. end;
  333. TNewMemo = class(TMemo)
  334. end;
  335. TCustomComboBox = class(TWinControl)
  336. property DroppedDown: Boolean; read write;
  337. property Items: TStrings; read write;
  338. property ItemIndex: Integer; read write;
  339. end;
  340. TComboBoxStyle = (csDropDown, csSimple, csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable);
  341. TComboBox = class(TCustomComboBox)
  342. property Anchors: TAnchors; read write;
  343. property Color: TColor; read write;
  344. property DropDownCount: Integer; read write;
  345. property Font: TFont; read write;
  346. property MaxLength: Integer; read write;
  347. property Sorted: Boolean; read write;
  348. property Style: TComboBoxStyle; read write;
  349. property Text: String; read write;
  350. property OnChange: TNotifyEvent; read write;
  351. property OnClick: TNotifyEvent; read write;
  352. property OnDblClick: TNotifyEvent; read write;
  353. property OnDropDown: TNotifyEvent; read write;
  354. property OnKeyDown: TKeyEvent; read write;
  355. property OnKeyPress: TKeyPressEvent; read write;
  356. property OnKeyUp: TKeyEvent; read write;
  357. end;
  358. TNewComboBox = class(TComboBox)
  359. end;
  360. TButtonControl = class(TWinControl)
  361. end;
  362. TButtonStyle = (bsPushButton, bsCommandLink, bsSplitButton);
  363. TButton = class(TButtonControl)
  364. property Anchors: TAnchors; read write;
  365. property Cancel: Boolean; read write;
  366. property Caption: String; read write;
  367. property CommandLinkHint: String; read write;
  368. property Default: Boolean; read write;
  369. property ElevationRequired: Boolean; read write;
  370. property Font: TFont; read write;
  371. property ModalResult: Longint; read write;
  372. property Style: TButtonStyle; read write;
  373. property OnClick: TNotifyEvent; read write;
  374. end;
  375. TNewButton = class(TButton)
  376. function AdjustHeightIfCommandLink: Integer;
  377. end;
  378. TCustomCheckBox = class(TButtonControl)
  379. end;
  380. TCheckBoxState = (cbUnchecked, cbChecked, cbGrayed);
  381. TCheckBox = class(TCustomCheckBox)
  382. property Alignment: TAlignment; read write;
  383. property AllowGrayed: Boolean; read write;
  384. property Anchors: TAnchors; read write;
  385. property Caption: String; read write;
  386. property Checked: Boolean; read write;
  387. property Color: TColor; read write;
  388. property Font: TFont; read write;
  389. property State: TCheckBoxState; read write;
  390. property OnClick: TNotifyEvent; read write;
  391. end;
  392. TNewCheckBox = class(TCheckBox)
  393. end;
  394. TRadioButton = class(TButtonControl)
  395. property Alignment: TAlignment; read write;
  396. property Anchors: TAnchors; read write;
  397. property Caption: String; read write;
  398. property Checked: Boolean; read write;
  399. property Color: TColor; read write;
  400. property Font: TFont; read write;
  401. property OnClick: TNotifyEvent; read write;
  402. property OnDblClick: TNotifyEvent; read write;
  403. end;
  404. TNewRadioButton = class(TRadioButton)
  405. end;
  406. TSysLinkType = (sltURL, sltID);
  407. TSysLinkEvent = procedure(Sender: TObject; const Link: string; LinkType: TSysLinkType);
  408. TCustomLinkLabel = class(TWinControl)
  409. property Alignment: TAlignment; read write;
  410. property AutoSize: Boolean; read write;
  411. property UseVisualStyle: Boolean; read write;
  412. property OnLinkClick: TSysLinkEvent; read write;
  413. end;
  414. TLinkLabel = class(TCustomLinkLabel)
  415. property Anchors: TAnchors; read write;
  416. property Caption: String; read write;
  417. property Color: TColor; read write;
  418. property Font: TFont; read write;
  419. end;
  420. TNewLinkLabel = class(TLinkLabel)
  421. function AdjustHeight: Integer;
  422. end;
  423. TCustomListBox = class(TWinControl)
  424. property Items: TStrings; read write;
  425. property ItemIndex: Integer; read write;
  426. property SelCount: Integer; read;
  427. property Selected[Index: Integer]: Boolean; read write;
  428. end;
  429. TListBoxStyle = (lbStandard, lbOwnerDrawFixed, lbOwnerDrawVariable);
  430. TListBox = class(TCustomListBox)
  431. property Anchors: TAnchors; read write;
  432. property BorderStyle: TBorderStyle; read write;
  433. property Color: TColor; read write;
  434. property Font: TFont; read write;
  435. property MultiSelect: Boolean; read write;
  436. property Sorted: Boolean; read write;
  437. property Style: TListBoxStyle; read write;
  438. property OnClick: TNotifyEvent; read write;
  439. property OnDblClick: TNotifyEvent; read write;
  440. property OnKeyDown: TKeyEvent; read write;
  441. property OnKeyPress: TKeyPressEvent; read write;
  442. property OnKeyUp: TKeyEvent; read write;
  443. end;
  444. TNewListBox = class(TListBox)
  445. end;
  446. TBevelKind = (bkNone, bkTile, bkSoft, bkFlat);
  447. TBevelShape = (bsBox, bsFrame, bsTopLine, bsBottomLine, bsLeftLine, bsRightLine, bsSpacer);
  448. TBevelStyle = (bsLowered, bsRaised);
  449. TBevel = class(TGraphicControl)
  450. property Anchors: TAnchors; read write;
  451. property Shape: TBevelShape; read write;
  452. property Style: TBevelStyle; read write;
  453. end;
  454. TCustomPanel = class(TCustomControl)
  455. end;
  456. TPanelBevel = (bvNone, bvLowered, bvRaised, bvSpace);
  457. TBevelWidth = Longint;
  458. TBorderWidth = Longint;
  459. TPanel = class(TCustomPanel)
  460. property Alignment: TAlignment; read write;
  461. property Anchors: TAnchors; read write;
  462. property BevelInner: TPanelBevel; read write;
  463. property BevelKind: TBevelKind; read write;
  464. property BevelOuter: TPanelBevel; read write;
  465. property BevelWidth: TBevelWidth; read write;
  466. property BorderWidth: TBorderWidth; read write;
  467. property BorderStyle: TBorderStyle; read write;
  468. property Caption: String; read write;
  469. property Color: TColor; read write;
  470. property Font: TFont; read write;
  471. property OnClick: TNotifyEvent; read write;
  472. property OnDblClick: TNotifyEvent; read write;
  473. end;
  474. TNewStaticText = class(TWinControl)
  475. function AdjustHeight: Integer;
  476. property Anchors: TAnchors; read write;
  477. property AutoSize: Boolean; read write;
  478. property Caption: String; read write;
  479. property Color: TColor; read write;
  480. property FocusControl: TWinControl; read write;
  481. property Font: TFont; read write;
  482. property ForceLTRReading: Boolean; read write;
  483. property ShowAccelChar: Boolean; read write;
  484. property WordWrap: Boolean; read write;
  485. property OnClick: TNotifyEvent; read write;
  486. property OnDblClick: TNotifyEvent; read write;
  487. end;
  488. TCheckItemOperation = (coUncheck, coCheck, coCheckWithChildren);
  489. TNewCheckListBox = class(TCustomListBox)
  490. function AddCheckBox(const ACaption, ASubItem: String; ALevel: Byte; AChecked, AEnabled, AHasInternalChildren, ACheckWhenParentChecked: Boolean; AObject: TObject): Integer;
  491. function AddGroup(ACaption, ASubItem: String; ALevel: Byte; AObject: TObject): Integer;
  492. function AddRadioButton(const ACaption, ASubItem: String; ALevel: Byte; AChecked, AEnabled: Boolean; AObject: TObject): Integer;
  493. function CheckItem(const Index: Integer; const AOperation: TCheckItemOperation): Boolean;
  494. property Anchors: TAnchors; read write;
  495. property Checked[Index: Integer]: Boolean; read write;
  496. property State[Index: Integer]: TCheckBoxState; read write;
  497. property ItemCaption[Index: Integer]: String; read write;
  498. property ItemEnabled[Index: Integer]: Boolean; read write;
  499. property ItemFontStyle[Index: Integer]: TFontStyles; read write;
  500. property ItemLevel[Index: Integer]: Byte; read;
  501. property ItemObject[Index: Integer]: TObject; read write;
  502. property ItemSubItem[Index: Integer]: String; read write;
  503. property SubItemFontStyle[Index: Integer]: TFontStyles; read write;
  504. property Flat: Boolean; read write;
  505. property MinItemHeight: Integer; read write;
  506. property Offset: Integer; read write;
  507. property OnClickCheck: TNotifyEvent; read write;
  508. property BorderStyle: TBorderStyle; read write;
  509. property Color: TColor; read write;
  510. property Font: TFont; read write;
  511. property Sorted: Boolean; read write;
  512. property OnClick: TNotifyEvent; read write;
  513. property OnDblClick: TNotifyEvent; read write;
  514. property OnKeyDown: TKeyEvent; read write;
  515. property OnKeyPress: TKeyPressEvent; read write;
  516. property OnKeyUp: TKeyEvent; read write;
  517. property ShowLines: Boolean; read write;
  518. property WantTabs: Boolean; read write;
  519. property RequireRadioSelection: Boolean; read write;
  520. end;
  521. TNewProgressBarState = (npbsNormal, npbsError, npbsPaused);
  522. TNewProgressBarStyle = (npbstNormal, npbstMarquee);
  523. TNewProgressBar = class(TWinControl)
  524. property Anchors: TAnchors; read write;
  525. property Min: Longint; read write;
  526. property Max: Longint; read write;
  527. property Position: Longint; read write;
  528. property State: TNewProgressBarState; read write;
  529. property Style: TNewProgressBarStyle; read write;
  530. property Visible: Boolean; read write;
  531. end;
  532. TRichEditViewer = class(TMemo)
  533. property Anchors: TAnchors; read write;
  534. property BevelKind: TBevelKind; read write;
  535. property BorderStyle: TBorderStyle; read write;
  536. property RTFText: AnsiString; write;
  537. property UseRichEdit: Boolean; read write;
  538. end;
  539. TPasswordEdit = class(TCustomEdit)
  540. property Anchors: TAnchors; read write;
  541. property AutoSelect: Boolean; read write;
  542. property AutoSize: Boolean; read write;
  543. property BorderStyle: TBorderStyle; read write;
  544. property Color: TColor; read write;
  545. property Font: TFont; read write;
  546. property HideSelection: Boolean; read write;
  547. property MaxLength: Integer; read write;
  548. property Password: Boolean; read write;
  549. property ReadOnly: Boolean; read write;
  550. property Text: String; read write;
  551. property OnChange: TNotifyEvent; read write;
  552. property OnClick: TNotifyEvent; read write;
  553. property OnDblClick: TNotifyEvent; read write;
  554. property OnKeyDown: TKeyEvent; read write;
  555. property OnKeyPress: TKeyPressEvent; read write;
  556. property OnKeyUp: TKeyEvent; read write;
  557. end;
  558. TCustomFolderTreeView = class(TWinControl)
  559. procedure ChangeDirectory(const Value: String; const CreateNewItems: Boolean);
  560. procedure CreateNewDirectory(const ADefaultName: String);
  561. property: Directory: String; read write;
  562. end;
  563. TFolderRenameEvent = procedure(Sender: TCustomFolderTreeView; var NewName: String; var Accept: Boolean);
  564. TFolderTreeView = class(TCustomFolderTreeView)
  565. property Anchors: TAnchors; read write;
  566. property OnChange: TNotifyEvent; read write;
  567. property OnRename: TFolderRenameEvent; read write;
  568. end;
  569. TStartMenuFolderTreeView = class(TCustomFolderTreeView)
  570. procedure SetPaths(const AUserPrograms, ACommonPrograms, AUserStartup, ACommonStartup: String);
  571. property Anchors: TAnchors; read write;
  572. property OnChange: TNotifyEvent; read write;
  573. property OnRename: TFolderRenameEvent; read write;
  574. end;
  575. TBitmapButton = class(TCustomControl)
  576. property Anchors: TAnchors; read write;
  577. property AutoSize: Boolean; read write;
  578. property BackColor: TColor; read write;
  579. property Bitmap: TBitmap; read write;
  580. property Caption: Boolean; read write;
  581. property Center: Boolean; read write;
  582. property PngImage: TPngImage; read write;
  583. property ReplaceColor: TColor; read write;
  584. property ReplaceWithColor: TColor; read write;
  585. property Stretch: Boolean; read write;
  586. property OnClick: TNotifyEvent; read write;
  587. property OnDblClick: TNotifyEvent; read write;
  588. end;
  589. TBitmapImage = class(TGraphicControl)
  590. property Anchors: TAnchors; read write;
  591. property AutoSize: Boolean; read write;
  592. property BackColor: TColor; read write;
  593. property Bitmap: TBitmap; read write;
  594. property Center: Boolean; read write;
  595. property PngImage: TPngImage; read write;
  596. property ReplaceColor: TColor; read write;
  597. property ReplaceWithColor: TColor; read write;
  598. property Stretch: Boolean; read write;
  599. property OnClick: TNotifyEvent; read write;
  600. property OnDblClick: TNotifyEvent; read write;
  601. end;
  602. TNewNotebook = class(TWinControl)
  603. function FindNextPage(CurPage: TNewNotebookPage; GoForward: Boolean): TNewNotebookPage;
  604. property Anchors: TAnchors; read write;
  605. property PageCount: Integer; read write;
  606. property Pages[Index: Integer]: TNewNotebookPage; read;
  607. property ActivePage: TNewNotebookPage; read write;
  608. end;
  609. TNewNotebookPage = class(TCustomControl)
  610. property Color: TColor; read write;
  611. property Notebook: TNewNotebook; read write;
  612. property PageIndex: Integer; read write;
  613. end;
  614. TWizardPageNotifyEvent = procedure(Sender: TWizardPage);
  615. TWizardPageButtonEvent = function(Sender: TWizardPage): Boolean;
  616. TWizardPageCancelEvent = procedure(Sender: TWizardPage; var ACancel, AConfirm: Boolean);
  617. TWizardPageShouldSkipEvent = function(Sender: TWizardPage): Boolean;
  618. TWizardPage = class(TComponent)
  619. property ID: Integer; read;
  620. property Caption: String; read write;
  621. property Description: String; read write;
  622. property Surface: TNewNotebookPage; read;
  623. property SurfaceColor: TColor; read;
  624. property SurfaceHeight: Integer; read;
  625. property SurfaceExtraHeight: Integer; read;
  626. property SurfaceWidth: Integer; read;
  627. property SurfaceExtraWidth: Integer; read;
  628. property OnActivate: TWizardPageNotifyEvent; read write;
  629. property OnBackButtonClick: TWizardPageButtonEvent; read write;
  630. property OnCancelButtonClick: TWizardPageCancelEvent; read write;
  631. property OnNextButtonClick: TWizardPageButtonEvent; read write;
  632. property OnShouldSkipPage: TWizardPageShouldSkipEvent; read write;
  633. end;
  634. TInputQueryWizardPage = class(TWizardPage)
  635. function Add(const APrompt: String; const APassword: Boolean): Integer;
  636. property Edits[Index: Integer]: TPasswordEdit; read;
  637. property PromptLabels[Index: Integer]: TNewStaticText; read;
  638. property SubCaptionLabel: TNewStaticText; read;
  639. property Values[Index: Integer]: String; read write;
  640. end;
  641. TInputOptionWizardPage = class(TWizardPage)
  642. function Add(const ACaption: String): Integer;
  643. function AddEx(const ACaption: String; const ALevel: Byte; const AExclusive: Boolean): Integer;
  644. property CheckListBox: TNewCheckListBox; read;
  645. property SelectedValueIndex: Integer; read write;
  646. property SubCaptionLabel: TNewStaticText; read;
  647. property Values[Index: Integer]: Boolean; read write;
  648. end;
  649. TInputDirWizardPage = class(TWizardPage)
  650. function Add(const APrompt: String): Integer;
  651. property Buttons[Index: Integer]: TNewButton; read;
  652. property Edits[Index: Integer]: TEdit; read;
  653. property NewFolderName: String; read write;
  654. property PromptLabels[Index: Integer]: TNewStaticText; read;
  655. property SubCaptionLabel: TNewStaticText; read;
  656. property Values[Index: Integer]: String; read write;
  657. end;
  658. TInputFileWizardPage = class(TWizardPage)
  659. function Add(const APrompt, AFilter, ADefaultExtension: String): Integer;
  660. property Buttons[Index: Integer]: TNewButton; read;
  661. property Edits[Index: Integer]: TEdit; read;
  662. property PromptLabels[Index: Integer]: TNewStaticText; read;
  663. property SubCaptionLabel: TNewStaticText; read;
  664. property Values[Index: Integer]: String; read write;
  665. property IsSaveButton[Index: Integer]: Boolean; read write;
  666. end;
  667. TOutputMsgWizardPage = class(TWizardPage)
  668. property MsgLabel: TNewStaticText; read;
  669. end;
  670. TOutputMsgMemoWizardPage = class(TWizardPage)
  671. property RichEditViewer: TRichEditViewer; read;
  672. property SubCaptionLabel: TNewStaticText; read;
  673. end;
  674. TOutputProgressWizardPage = class(TWizardPage)
  675. procedure Hide;
  676. property Msg1Label: TNewStaticText; read;
  677. property Msg2Label: TNewStaticText; read;
  678. property ProgressBar: TNewProgressBar; read;
  679. procedure SetProgress(const Position, Max: Longint);
  680. procedure SetText(const Msg1, Msg2: String);
  681. procedure Show;
  682. end;
  683. TOutputMarqueeProgressWizardPage = class(TOutputProgressWizardPage)
  684. procedure Animate;
  685. end;
  686. TDownloadWizardPage = class(TOutputProgressWizardPage)
  687. property AbortButton: TNewButton; read;
  688. property AbortedByUser: Boolean; read;
  689. function Add(const Url, BaseName, RequiredSHA256OfFile: String): Integer;
  690. function AddWithISSigVerify(const Url, ISSigUrl, BaseName: String; const AllowedKeysRuntimeIDs: TStringList): Integer;
  691. function AddEx(const Url, BaseName, RequiredSHA256OfFile, UserName, Password: String): Integer;
  692. function AddExWithISSigVerify(const Url, ISSigUrl, BaseName, UserName, Password: String; const AllowedKeysRuntimeIDs: TStringList: Integer;
  693. procedure Clear;
  694. function Download: Int64;
  695. property LastBaseNameOrUrl: String; read;
  696. property ShowBaseNameInsteadOfUrl: Boolean; read write;
  697. end;
  698. TExtractionWizardPage = class(TOutputProgressWizardPage)
  699. property AbortButton: TNewButton; read;
  700. property AbortedByUser: Boolean; read;
  701. function Add(const ArchiveFileName, DestDir: String; const FullPaths: Boolean): Integer;
  702. function AddEx(const ArchiveFileName, DestDir, Password: String; const FullPaths: Boolean): Integer;
  703. procedure Clear;
  704. procedure Extract;
  705. property ShowArchiveInsteadOfFile: Boolean; read write;
  706. end;
  707. TUIStateForm = class(TForm)
  708. end;
  709. TSetupForm = class(TUIStateForm)
  710. function CalculateButtonWidth(const ButtonCaptions: array of String): Integer;
  711. function ShouldSizeX: Boolean;
  712. function ShouldSizeY: Boolean;
  713. procedure FlipAndCenterIfNeeded(const ACenterInsideControl: Boolean; const CenterInsideControlCtl: TWinControl; const CenterInsideControlInsideClientArea: Boolean);
  714. property CenterOnShow: Boolean; read write;
  715. property ControlsFlipped: Boolean; read;
  716. property GetExtraClientWidth: Integer; read;
  717. property GetExtraClientHeight: Integer; read;
  718. property FlipControlsOnShow: Boolean; read write;
  719. property KeepSizeX: Boolean; read;
  720. property KeepSizeY: Boolean; read;
  721. property RightToLeft: Boolean; read;
  722. end;
  723. TWizardForm = class(TSetupForm)
  724. property CancelButton: TNewButton; read;
  725. property NextButton: TNewButton; read;
  726. property BackButton: TNewButton; read;
  727. property OuterNotebook: TNotebook; read;
  728. property InnerNotebook: TNotebook; read;
  729. property WelcomePage: TNewNotebookPage; read;
  730. property InnerPage: TNewNotebookPage; read;
  731. property FinishedPage: TNewNotebookPage; read;
  732. property LicensePage: TNewNotebookPage; read;
  733. property PasswordPage: TNewNotebookPage; read;
  734. property InfoBeforePage: TNewNotebookPage; read;
  735. property UserInfoPage: TNewNotebookPage; read;
  736. property SelectDirPage: TNewNotebookPage; read;
  737. property SelectComponentsPage: TNewNotebookPage; read;
  738. property SelectProgramGroupPage: TNewNotebookPage; read;
  739. property SelectTasksPage: TNewNotebookPage; read;
  740. property ReadyPage: TNewNotebookPage; read;
  741. property PreparingPage: TNewNotebookPage; read;
  742. property InstallingPage: TNewNotebookPage; read;
  743. property InfoAfterPage: TNewNotebookPage; read;
  744. property DiskSpaceLabel: TNewStaticText; read;
  745. property DirEdit: TEdit; read;
  746. property GroupEdit: TNewEdit; read;
  747. property NoIconsCheck: TNewCheckBox; read;
  748. property PasswordLabel: TNewStaticText; read;
  749. property PasswordEdit: TPasswordEdit; read;
  750. property PasswordEditLabel: TNewStaticText; read;
  751. property ReadyMemo: TNewMemo; read;
  752. property TypesCombo: TNewComboBox; read;
  753. property Bevel: TBevel; read;
  754. property WizardBitmapImage: TBitmapImage; read;
  755. property WelcomeLabel1: TNewStaticText; read;
  756. property InfoBeforeMemo: TRichEditViewer; read;
  757. property InfoBeforeClickLabel: TNewStaticText; read;
  758. property MainPanel: TPanel; read;
  759. property Bevel1: TBevel; read;
  760. property PageNameLabel: TNewStaticText; read;
  761. property PageDescriptionLabel: TNewStaticText; read;
  762. property WizardSmallBitmapImage: TBitmapImage; read;
  763. property ReadyLabel: TNewStaticText; read;
  764. property FinishedLabel: TNewStaticText; read;
  765. property YesRadio: TNewRadioButton; read;
  766. property NoRadio: TNewRadioButton; read;
  767. property WizardBitmapImage2: TBitmapImage; read;
  768. property WelcomeLabel2: TNewStaticText; read;
  769. property LicenseLabel1: TNewStaticText; read;
  770. property LicenseMemo: TRichEditViewer; read;
  771. property InfoAfterMemo: TRichEditViewer; read;
  772. property InfoAfterClickLabel: TNewStaticText; read;
  773. property ComponentsList: TNewCheckListBox; read;
  774. property ComponentsDiskSpaceLabel: TNewStaticText; read;
  775. property BeveledLabel: TNewStaticText; read;
  776. property StatusLabel: TNewStaticText; read;
  777. property FilenameLabel: TNewStaticText; read;
  778. property ProgressGauge: TNewProgressBar; read;
  779. property SelectDirLabel: TNewStaticText; read;
  780. property SelectStartMenuFolderLabel: TNewStaticText; read;
  781. property SelectComponentsLabel: TNewStaticText; read;
  782. property SelectTasksLabel: TNewStaticText; read;
  783. property LicenseAcceptedRadio: TNewRadioButton; read;
  784. property LicenseNotAcceptedRadio: TNewRadioButton; read;
  785. property UserInfoNameLabel: TNewStaticText; read;
  786. property UserInfoNameEdit: TNewEdit; read;
  787. property UserInfoOrgLabel: TNewStaticText; read;
  788. property UserInfoOrgEdit: TNewEdit; read;
  789. property PreparingErrorBitmapImage: TBitmapImage; read;
  790. property PreparingLabel: TNewStaticText; read;
  791. property FinishedHeadingLabel: TNewStaticText; read;
  792. property UserInfoSerialLabel: TNewStaticText; read;
  793. property UserInfoSerialEdit: TNewEdit; read;
  794. property TasksList: TNewCheckListBox; read;
  795. property RunList: TNewCheckListBox; read;
  796. property DirBrowseButton: TNewButton; read;
  797. property GroupBrowseButton: TNewButton; read;
  798. property SelectDirBitmapImage: TBitmapImage; read;
  799. property SelectGroupBitmapImage: TBitmapImage; read;
  800. property SelectDirBrowseLabel: TNewStaticText; read;
  801. property SelectStartMenuFolderBrowseLabel: TNewStaticText; read;
  802. property PreparingYesRadio: TNewRadioButton; read;
  803. property PreparingNoRadio: TNewRadioButton; read;
  804. property PreparingMemo: TNewMemo; read;
  805. property CurPageID: Integer; read;
  806. function AdjustLabelHeight(ALabel: TNewStaticText): Integer;
  807. function AdjustLinkLabelHeight(ALinkLabel: TNewLinkLabel): Integer;
  808. procedure IncTopDecHeight(AControl: TControl; Amount: Integer);
  809. property PrevAppDir: String; read;
  810. end;
  811. TUninstallProgressForm = class(TSetupForm)
  812. property OuterNotebook: TNewNotebook; read;
  813. property InnerPage: TNewNotebookPage; read;
  814. property InnerNotebook: TNewNotebook; read;
  815. property InstallingPage: TNewNotebookPage; read;
  816. property MainPanel: TPanel; read;
  817. property PageNameLabel: TNewStaticText; read;
  818. property PageDescriptionLabel: TNewStaticText; read;
  819. property WizardSmallBitmapImage: TBitmapImage; read;
  820. property Bevel1: TBevel; read;
  821. property StatusLabel: TNewStaticText; read;
  822. property ProgressBar: TNewProgressBar; read;
  823. property BeveledLabel: TNewStaticText; read;
  824. property Bevel: TBevel; read;
  825. property CancelButton: TNewButton; read;
  826. end;