isxclasses.pas 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961
  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. TNewPathEdit = class(TNewEdit)
  309. end;
  310. TCustomMemo = class(TCustomEdit)
  311. property Lines: TStrings; read write;
  312. end;
  313. TScrollStyle = (ssNone, ssHorizontal, ssVertical, ssBoth);
  314. TMemo = class(TCustomMemo)
  315. property Alignment: TAlignment; read write;
  316. property Anchors: TAnchors; read write;
  317. property BorderStyle: TBorderStyle; read write;
  318. property Color: TColor; read write;
  319. property Font: TFont; read write;
  320. property HideSelection: Boolean; read write;
  321. property Lines: TStrings; read write;
  322. property MaxLength: Integer; read write;
  323. property ReadOnly: Boolean; read write;
  324. property ScrollBars: TScrollStyle; read write;
  325. property WantReturns: Boolean; read write;
  326. property WantTabs: Boolean; read write;
  327. property WordWrap: Boolean; read write;
  328. property OnChange: TNotifyEvent; read write;
  329. property OnClick: TNotifyEvent; read write;
  330. property OnDblClick: TNotifyEvent; read write;
  331. property OnKeyDown: TKeyEvent; read write;
  332. property OnKeyPress: TKeyPressEvent; read write;
  333. property OnKeyUp: TKeyEvent; read write;
  334. end;
  335. TNewMemo = class(TMemo)
  336. end;
  337. TCustomComboBox = class(TWinControl)
  338. property DroppedDown: Boolean; read write;
  339. property Items: TStrings; read write;
  340. property ItemIndex: Integer; read write;
  341. end;
  342. TComboBoxStyle = (csDropDown, csSimple, csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable);
  343. TComboBox = class(TCustomComboBox)
  344. property Anchors: TAnchors; read write;
  345. property Color: TColor; read write;
  346. property DropDownCount: Integer; read write;
  347. property Font: TFont; read write;
  348. property MaxLength: Integer; read write;
  349. property Sorted: Boolean; read write;
  350. property Style: TComboBoxStyle; read write;
  351. property Text: String; read write;
  352. property OnChange: TNotifyEvent; read write;
  353. property OnClick: TNotifyEvent; read write;
  354. property OnDblClick: TNotifyEvent; read write;
  355. property OnDropDown: TNotifyEvent; read write;
  356. property OnKeyDown: TKeyEvent; read write;
  357. property OnKeyPress: TKeyPressEvent; read write;
  358. property OnKeyUp: TKeyEvent; read write;
  359. end;
  360. TNewComboBox = class(TComboBox)
  361. end;
  362. TButtonControl = class(TWinControl)
  363. end;
  364. TButtonStyle = (bsPushButton, bsCommandLink, bsSplitButton);
  365. TButton = class(TButtonControl)
  366. property Anchors: TAnchors; read write;
  367. property Cancel: Boolean; read write;
  368. property Caption: String; read write;
  369. property CommandLinkHint: String; read write;
  370. property Default: Boolean; read write;
  371. property ElevationRequired: Boolean; read write;
  372. property Font: TFont; read write;
  373. property ModalResult: Longint; read write;
  374. property Style: TButtonStyle; read write;
  375. property OnClick: TNotifyEvent; read write;
  376. end;
  377. TNewButton = class(TButton)
  378. function AdjustHeightIfCommandLink: Integer;
  379. end;
  380. TCustomCheckBox = class(TButtonControl)
  381. end;
  382. TCheckBoxState = (cbUnchecked, cbChecked, cbGrayed);
  383. TCheckBox = class(TCustomCheckBox)
  384. property Alignment: TAlignment; read write;
  385. property AllowGrayed: Boolean; read write;
  386. property Anchors: TAnchors; read write;
  387. property Caption: String; read write;
  388. property Checked: Boolean; read write;
  389. property Color: TColor; read write;
  390. property Font: TFont; read write;
  391. property State: TCheckBoxState; read write;
  392. property OnClick: TNotifyEvent; read write;
  393. end;
  394. TNewCheckBox = class(TCheckBox)
  395. end;
  396. TRadioButton = class(TButtonControl)
  397. property Alignment: TAlignment; read write;
  398. property Anchors: TAnchors; read write;
  399. property Caption: String; read write;
  400. property Checked: Boolean; read write;
  401. property Color: TColor; read write;
  402. property Font: TFont; read write;
  403. property OnClick: TNotifyEvent; read write;
  404. property OnDblClick: TNotifyEvent; read write;
  405. end;
  406. TNewRadioButton = class(TRadioButton)
  407. end;
  408. TSysLinkType = (sltURL, sltID);
  409. TSysLinkEvent = procedure(Sender: TObject; const Link: string; LinkType: TSysLinkType);
  410. TCustomLinkLabel = class(TWinControl)
  411. property Alignment: TAlignment; read write;
  412. property AutoSize: Boolean; read write;
  413. property UseVisualStyle: Boolean; read write;
  414. property OnLinkClick: TSysLinkEvent; read write;
  415. end;
  416. TLinkLabel = class(TCustomLinkLabel)
  417. property Anchors: TAnchors; read write;
  418. property Caption: String; read write;
  419. property Color: TColor; read write;
  420. property Font: TFont; read write;
  421. end;
  422. TNewLinkLabel = class(TLinkLabel)
  423. function AdjustHeight: Integer;
  424. end;
  425. TCustomListBox = class(TWinControl)
  426. property Items: TStrings; read write;
  427. property ItemIndex: Integer; read write;
  428. property SelCount: Integer; read;
  429. property Selected[Index: Integer]: Boolean; read write;
  430. end;
  431. TListBoxStyle = (lbStandard, lbOwnerDrawFixed, lbOwnerDrawVariable);
  432. TListBox = class(TCustomListBox)
  433. property Anchors: TAnchors; read write;
  434. property BorderStyle: TBorderStyle; read write;
  435. property Color: TColor; read write;
  436. property Font: TFont; read write;
  437. property MultiSelect: Boolean; read write;
  438. property Sorted: Boolean; read write;
  439. property Style: TListBoxStyle; read write;
  440. property OnClick: TNotifyEvent; read write;
  441. property OnDblClick: TNotifyEvent; read write;
  442. property OnKeyDown: TKeyEvent; read write;
  443. property OnKeyPress: TKeyPressEvent; read write;
  444. property OnKeyUp: TKeyEvent; read write;
  445. end;
  446. TNewListBox = class(TListBox)
  447. end;
  448. TBevelKind = (bkNone, bkTile, bkSoft, bkFlat);
  449. TBevelShape = (bsBox, bsFrame, bsTopLine, bsBottomLine, bsLeftLine, bsRightLine, bsSpacer);
  450. TBevelStyle = (bsLowered, bsRaised);
  451. TBevel = class(TGraphicControl)
  452. property Anchors: TAnchors; read write;
  453. property Shape: TBevelShape; read write;
  454. property Style: TBevelStyle; read write;
  455. end;
  456. TCustomPanel = class(TCustomControl)
  457. end;
  458. TPanelBevel = (bvNone, bvLowered, bvRaised, bvSpace);
  459. TBevelWidth = Longint;
  460. TBorderWidth = Longint;
  461. TPanel = class(TCustomPanel)
  462. property Alignment: TAlignment; read write;
  463. property Anchors: TAnchors; read write;
  464. property BevelInner: TPanelBevel; read write;
  465. property BevelKind: TBevelKind; read write;
  466. property BevelOuter: TPanelBevel; read write;
  467. property BevelWidth: TBevelWidth; read write;
  468. property BorderWidth: TBorderWidth; read write;
  469. property BorderStyle: TBorderStyle; read write;
  470. property Caption: String; read write;
  471. property Color: TColor; read write;
  472. property Font: TFont; read write;
  473. property OnClick: TNotifyEvent; read write;
  474. property OnDblClick: TNotifyEvent; read write;
  475. end;
  476. TNewStaticText = class(TWinControl)
  477. function AdjustHeight: Integer;
  478. property Anchors: TAnchors; read write;
  479. property AutoSize: Boolean; read write;
  480. property Caption: String; read write;
  481. property Color: TColor; read write;
  482. property FocusControl: TWinControl; read write;
  483. property Font: TFont; read write;
  484. property ForceLTRReading: Boolean; read write;
  485. property ShowAccelChar: Boolean; read write;
  486. property WordWrap: Boolean; read write;
  487. property OnClick: TNotifyEvent; read write;
  488. property OnDblClick: TNotifyEvent; read write;
  489. end;
  490. TCheckItemOperation = (coUncheck, coCheck, coCheckWithChildren);
  491. TNewCheckListBox = class(TCustomListBox)
  492. function AddCheckBox(const ACaption, ASubItem: String; ALevel: Byte; AChecked, AEnabled, AHasInternalChildren, ACheckWhenParentChecked: Boolean; AObject: TObject): Integer;
  493. function AddGroup(ACaption, ASubItem: String; ALevel: Byte; AObject: TObject): Integer;
  494. function AddRadioButton(const ACaption, ASubItem: String; ALevel: Byte; AChecked, AEnabled: Boolean; AObject: TObject): Integer;
  495. function CheckItem(const Index: Integer; const AOperation: TCheckItemOperation): Boolean;
  496. property Anchors: TAnchors; read write;
  497. property Checked[Index: Integer]: Boolean; read write;
  498. property State[Index: Integer]: TCheckBoxState; read write;
  499. property ItemCaption[Index: Integer]: String; read write;
  500. property ItemEnabled[Index: Integer]: Boolean; read write;
  501. property ItemFontStyle[Index: Integer]: TFontStyles; read write;
  502. property ItemLevel[Index: Integer]: Byte; read;
  503. property ItemObject[Index: Integer]: TObject; read write;
  504. property ItemSubItem[Index: Integer]: String; read write;
  505. property SubItemFontStyle[Index: Integer]: TFontStyles; read write;
  506. property Flat: Boolean; read write;
  507. property MinItemHeight: Integer; read write;
  508. property Offset: Integer; read write;
  509. property OnClickCheck: TNotifyEvent; read write;
  510. property BorderStyle: TBorderStyle; read write;
  511. property Color: TColor; read write;
  512. property Font: TFont; read write;
  513. property Sorted: Boolean; read write;
  514. property OnClick: TNotifyEvent; read write;
  515. property OnDblClick: TNotifyEvent; read write;
  516. property OnKeyDown: TKeyEvent; read write;
  517. property OnKeyPress: TKeyPressEvent; read write;
  518. property OnKeyUp: TKeyEvent; read write;
  519. property ShowLines: Boolean; read write;
  520. property WantTabs: Boolean; read write;
  521. property RequireRadioSelection: Boolean; read write;
  522. end;
  523. TNewProgressBarState = (npbsNormal, npbsError, npbsPaused);
  524. TNewProgressBarStyle = (npbstNormal, npbstMarquee);
  525. TNewProgressBar = class(TWinControl)
  526. property Anchors: TAnchors; read write;
  527. property Min: Longint; read write;
  528. property Max: Longint; read write;
  529. property Position: Longint; read write;
  530. property State: TNewProgressBarState; read write;
  531. property Style: TNewProgressBarStyle; read write;
  532. property Visible: Boolean; read write;
  533. end;
  534. TRichEditViewer = class(TMemo)
  535. property Anchors: TAnchors; read write;
  536. property BevelKind: TBevelKind; read write;
  537. property BorderStyle: TBorderStyle; read write;
  538. property RTFText: AnsiString; write;
  539. property UseRichEdit: Boolean; read write;
  540. end;
  541. TPasswordEdit = class(TCustomEdit)
  542. property Anchors: TAnchors; read write;
  543. property AutoSelect: Boolean; read write;
  544. property AutoSize: Boolean; read write;
  545. property BorderStyle: TBorderStyle; read write;
  546. property Color: TColor; read write;
  547. property Font: TFont; read write;
  548. property HideSelection: Boolean; read write;
  549. property MaxLength: Integer; read write;
  550. property Password: Boolean; read write;
  551. property ReadOnly: Boolean; read write;
  552. property Text: String; read write;
  553. property OnChange: TNotifyEvent; read write;
  554. property OnClick: TNotifyEvent; read write;
  555. property OnDblClick: TNotifyEvent; read write;
  556. property OnKeyDown: TKeyEvent; read write;
  557. property OnKeyPress: TKeyPressEvent; read write;
  558. property OnKeyUp: TKeyEvent; read write;
  559. end;
  560. TCustomFolderTreeView = class(TWinControl)
  561. procedure ChangeDirectory(const Value: String; const CreateNewItems: Boolean);
  562. procedure CreateNewDirectory(const ADefaultName: String);
  563. property: Directory: String; read write;
  564. end;
  565. TFolderRenameEvent = procedure(Sender: TCustomFolderTreeView; var NewName: String; var Accept: Boolean);
  566. TFolderTreeView = class(TCustomFolderTreeView)
  567. property Anchors: TAnchors; read write;
  568. property OnChange: TNotifyEvent; read write;
  569. property OnRename: TFolderRenameEvent; read write;
  570. end;
  571. TStartMenuFolderTreeView = class(TCustomFolderTreeView)
  572. procedure SetPaths(const AUserPrograms, ACommonPrograms, AUserStartup, ACommonStartup: String);
  573. property Anchors: TAnchors; read write;
  574. property OnChange: TNotifyEvent; read write;
  575. property OnRename: TFolderRenameEvent; read write;
  576. end;
  577. TBitmapButton = class(TCustomControl)
  578. property Anchors: TAnchors; read write;
  579. property AutoSize: Boolean; read write;
  580. property BackColor: TColor; read write;
  581. property Bitmap: TBitmap; read write;
  582. property Caption: Boolean; read write;
  583. property Center: Boolean; read write;
  584. property PngImage: TPngImage; read write;
  585. property ReplaceColor: TColor; read write;
  586. property ReplaceWithColor: TColor; read write;
  587. property Stretch: Boolean; read write;
  588. property OnClick: TNotifyEvent; read write;
  589. property OnDblClick: TNotifyEvent; read write;
  590. end;
  591. TBitmapImage = class(TGraphicControl)
  592. property Anchors: TAnchors; read write;
  593. property AutoSize: Boolean; read write;
  594. property BackColor: TColor; read write;
  595. property Bitmap: TBitmap; read write;
  596. property Center: Boolean; read write;
  597. property PngImage: TPngImage; read write;
  598. property ReplaceColor: TColor; read write;
  599. property ReplaceWithColor: TColor; read write;
  600. property Stretch: Boolean; read write;
  601. property OnClick: TNotifyEvent; read write;
  602. property OnDblClick: TNotifyEvent; read write;
  603. end;
  604. TNewNotebook = class(TWinControl)
  605. function FindNextPage(CurPage: TNewNotebookPage; GoForward: Boolean): TNewNotebookPage;
  606. property Anchors: TAnchors; read write;
  607. property PageCount: Integer; read write;
  608. property Pages[Index: Integer]: TNewNotebookPage; read;
  609. property ActivePage: TNewNotebookPage; read write;
  610. end;
  611. TNewNotebookPage = class(TCustomControl)
  612. property Color: TColor; read write;
  613. property Notebook: TNewNotebook; read write;
  614. property PageIndex: Integer; read write;
  615. end;
  616. TWizardPageNotifyEvent = procedure(Sender: TWizardPage);
  617. TWizardPageButtonEvent = function(Sender: TWizardPage): Boolean;
  618. TWizardPageCancelEvent = procedure(Sender: TWizardPage; var ACancel, AConfirm: Boolean);
  619. TWizardPageShouldSkipEvent = function(Sender: TWizardPage): Boolean;
  620. TWizardPage = class(TComponent)
  621. property ID: Integer; read;
  622. property Caption: String; read write;
  623. property Description: String; read write;
  624. property Surface: TNewNotebookPage; read;
  625. property SurfaceColor: TColor; read;
  626. property SurfaceHeight: Integer; read;
  627. property SurfaceExtraHeight: Integer; read;
  628. property SurfaceWidth: Integer; read;
  629. property SurfaceExtraWidth: Integer; read;
  630. property OnActivate: TWizardPageNotifyEvent; read write;
  631. property OnBackButtonClick: TWizardPageButtonEvent; read write;
  632. property OnCancelButtonClick: TWizardPageCancelEvent; read write;
  633. property OnNextButtonClick: TWizardPageButtonEvent; read write;
  634. property OnShouldSkipPage: TWizardPageShouldSkipEvent; read write;
  635. end;
  636. TInputQueryWizardPage = class(TWizardPage)
  637. function Add(const APrompt: String; const APassword: Boolean): Integer;
  638. property Edits[Index: Integer]: TPasswordEdit; read;
  639. property PromptLabels[Index: Integer]: TNewStaticText; read;
  640. property SubCaptionLabel: TNewStaticText; read;
  641. property Values[Index: Integer]: String; read write;
  642. end;
  643. TInputOptionWizardPage = class(TWizardPage)
  644. function Add(const ACaption: String): Integer;
  645. function AddEx(const ACaption: String; const ALevel: Byte; const AExclusive: Boolean): Integer;
  646. property CheckListBox: TNewCheckListBox; read;
  647. property SelectedValueIndex: Integer; read write;
  648. property SubCaptionLabel: TNewStaticText; read;
  649. property Values[Index: Integer]: Boolean; read write;
  650. end;
  651. TInputDirWizardPage = class(TWizardPage)
  652. function Add(const APrompt: String): Integer;
  653. property Buttons[Index: Integer]: TNewButton; read;
  654. property Edits[Index: Integer]: TNewPathEdit; read;
  655. property NewFolderName: String; read write;
  656. property PromptLabels[Index: Integer]: TNewStaticText; read;
  657. property SubCaptionLabel: TNewStaticText; read;
  658. property Values[Index: Integer]: String; read write;
  659. end;
  660. TInputFileWizardPage = class(TWizardPage)
  661. function Add(const APrompt, AFilter, ADefaultExtension: String): Integer;
  662. property Buttons[Index: Integer]: TNewButton; read;
  663. property Edits[Index: Integer]: TNewPathEdit; read;
  664. property PromptLabels[Index: Integer]: TNewStaticText; read;
  665. property SubCaptionLabel: TNewStaticText; read;
  666. property Values[Index: Integer]: String; read write;
  667. property IsSaveButton[Index: Integer]: Boolean; read write;
  668. end;
  669. TOutputMsgWizardPage = class(TWizardPage)
  670. property MsgLabel: TNewStaticText; read;
  671. end;
  672. TOutputMsgMemoWizardPage = class(TWizardPage)
  673. property RichEditViewer: TRichEditViewer; read;
  674. property SubCaptionLabel: TNewStaticText; read;
  675. end;
  676. TOutputProgressWizardPage = class(TWizardPage)
  677. procedure Hide;
  678. property Msg1Label: TNewStaticText; read;
  679. property Msg2Label: TNewStaticText; read;
  680. property ProgressBar: TNewProgressBar; read;
  681. procedure SetProgress(const Position, Max: Longint);
  682. procedure SetText(const Msg1, Msg2: String);
  683. procedure Show;
  684. end;
  685. TOutputMarqueeProgressWizardPage = class(TOutputProgressWizardPage)
  686. procedure Animate;
  687. end;
  688. TDownloadWizardPage = class(TOutputProgressWizardPage)
  689. property AbortButton: TNewButton; read;
  690. property AbortedByUser: Boolean; read;
  691. function Add(const Url, BaseName, RequiredSHA256OfFile: String): Integer;
  692. function AddWithISSigVerify(const Url, ISSigUrl, BaseName: String; const AllowedKeysRuntimeIDs: TStringList): Integer;
  693. function AddEx(const Url, BaseName, RequiredSHA256OfFile, UserName, Password: String): Integer;
  694. function AddExWithISSigVerify(const Url, ISSigUrl, BaseName, UserName, Password: String; const AllowedKeysRuntimeIDs: TStringList: Integer;
  695. procedure Clear;
  696. function Download: Int64;
  697. property LastBaseNameOrUrl: String; read;
  698. property ShowBaseNameInsteadOfUrl: Boolean; read write;
  699. end;
  700. TExtractionWizardPage = class(TOutputProgressWizardPage)
  701. property AbortButton: TNewButton; read;
  702. property AbortedByUser: Boolean; read;
  703. function Add(const ArchiveFileName, DestDir: String; const FullPaths: Boolean): Integer;
  704. function AddEx(const ArchiveFileName, DestDir, Password: String; const FullPaths: Boolean): Integer;
  705. procedure Clear;
  706. procedure Extract;
  707. property ShowArchiveInsteadOfFile: Boolean; read write;
  708. end;
  709. TUIStateForm = class(TForm)
  710. end;
  711. TSetupForm = class(TUIStateForm)
  712. function CalculateButtonWidth(const ButtonCaptions: array of String): Integer;
  713. function ShouldSizeX: Boolean;
  714. function ShouldSizeY: Boolean;
  715. procedure FlipAndCenterIfNeeded(const ACenterInsideControl: Boolean; const CenterInsideControlCtl: TWinControl; const CenterInsideControlInsideClientArea: Boolean);
  716. property CenterOnShow: Boolean; read write;
  717. property ControlsFlipped: Boolean; read;
  718. property GetExtraClientWidth: Integer; read;
  719. property GetExtraClientHeight: Integer; read;
  720. property FlipControlsOnShow: Boolean; read write;
  721. property KeepSizeX: Boolean; read;
  722. property KeepSizeY: Boolean; read;
  723. property RightToLeft: Boolean; read;
  724. end;
  725. TWizardForm = class(TSetupForm)
  726. property CancelButton: TNewButton; read;
  727. property NextButton: TNewButton; read;
  728. property BackButton: TNewButton; read;
  729. property OuterNotebook: TNotebook; read;
  730. property InnerNotebook: TNotebook; read;
  731. property WelcomePage: TNewNotebookPage; read;
  732. property InnerPage: TNewNotebookPage; read;
  733. property FinishedPage: TNewNotebookPage; read;
  734. property LicensePage: TNewNotebookPage; read;
  735. property PasswordPage: TNewNotebookPage; read;
  736. property InfoBeforePage: TNewNotebookPage; read;
  737. property UserInfoPage: TNewNotebookPage; read;
  738. property SelectDirPage: TNewNotebookPage; read;
  739. property SelectComponentsPage: TNewNotebookPage; read;
  740. property SelectProgramGroupPage: TNewNotebookPage; read;
  741. property SelectTasksPage: TNewNotebookPage; read;
  742. property ReadyPage: TNewNotebookPage; read;
  743. property PreparingPage: TNewNotebookPage; read;
  744. property InstallingPage: TNewNotebookPage; read;
  745. property InfoAfterPage: TNewNotebookPage; read;
  746. property DiskSpaceLabel: TNewStaticText; read;
  747. property DirEdit: TNewPathEdit; read;
  748. property GroupEdit: TNewEdit; read;
  749. property NoIconsCheck: TNewCheckBox; read;
  750. property PasswordLabel: TNewStaticText; read;
  751. property PasswordEdit: TPasswordEdit; read;
  752. property PasswordEditLabel: TNewStaticText; read;
  753. property ReadyMemo: TNewMemo; read;
  754. property TypesCombo: TNewComboBox; read;
  755. property Bevel: TBevel; read;
  756. property WizardBitmapImage: TBitmapImage; read;
  757. property WelcomeLabel1: TNewStaticText; read;
  758. property InfoBeforeMemo: TRichEditViewer; read;
  759. property InfoBeforeClickLabel: TNewStaticText; read;
  760. property MainPanel: TPanel; read;
  761. property Bevel1: TBevel; read;
  762. property PageNameLabel: TNewStaticText; read;
  763. property PageDescriptionLabel: TNewStaticText; read;
  764. property WizardSmallBitmapImage: TBitmapImage; read;
  765. property ReadyLabel: TNewStaticText; read;
  766. property FinishedLabel: TNewStaticText; read;
  767. property YesRadio: TNewRadioButton; read;
  768. property NoRadio: TNewRadioButton; read;
  769. property WizardBitmapImage2: TBitmapImage; read;
  770. property WelcomeLabel2: TNewStaticText; read;
  771. property LicenseLabel1: TNewStaticText; read;
  772. property LicenseMemo: TRichEditViewer; read;
  773. property InfoAfterMemo: TRichEditViewer; read;
  774. property InfoAfterClickLabel: TNewStaticText; read;
  775. property ComponentsList: TNewCheckListBox; read;
  776. property ComponentsDiskSpaceLabel: TNewStaticText; read;
  777. property BeveledLabel: TNewStaticText; read;
  778. property StatusLabel: TNewStaticText; read;
  779. property FilenameLabel: TNewStaticText; read;
  780. property ProgressGauge: TNewProgressBar; read;
  781. property SelectDirLabel: TNewStaticText; read;
  782. property SelectStartMenuFolderLabel: TNewStaticText; read;
  783. property SelectComponentsLabel: TNewStaticText; read;
  784. property SelectTasksLabel: TNewStaticText; read;
  785. property LicenseAcceptedRadio: TNewRadioButton; read;
  786. property LicenseNotAcceptedRadio: TNewRadioButton; read;
  787. property UserInfoNameLabel: TNewStaticText; read;
  788. property UserInfoNameEdit: TNewEdit; read;
  789. property UserInfoOrgLabel: TNewStaticText; read;
  790. property UserInfoOrgEdit: TNewEdit; read;
  791. property PreparingErrorBitmapImage: TBitmapImage; read;
  792. property PreparingLabel: TNewStaticText; read;
  793. property FinishedHeadingLabel: TNewStaticText; read;
  794. property UserInfoSerialLabel: TNewStaticText; read;
  795. property UserInfoSerialEdit: TNewEdit; read;
  796. property TasksList: TNewCheckListBox; read;
  797. property RunList: TNewCheckListBox; read;
  798. property DirBrowseButton: TNewButton; read;
  799. property GroupBrowseButton: TNewButton; read;
  800. property SelectDirBitmapImage: TBitmapImage; read;
  801. property SelectGroupBitmapImage: TBitmapImage; read;
  802. property SelectDirBrowseLabel: TNewStaticText; read;
  803. property SelectStartMenuFolderBrowseLabel: TNewStaticText; read;
  804. property PreparingYesRadio: TNewRadioButton; read;
  805. property PreparingNoRadio: TNewRadioButton; read;
  806. property PreparingMemo: TNewMemo; read;
  807. property CurPageID: Integer; read;
  808. function AdjustLabelHeight(ALabel: TNewStaticText): Integer;
  809. function AdjustLinkLabelHeight(ALinkLabel: TNewLinkLabel): Integer;
  810. procedure IncTopDecHeight(AControl: TControl; Amount: Integer);
  811. property PrevAppDir: String; read;
  812. end;
  813. TUninstallProgressForm = class(TSetupForm)
  814. property OuterNotebook: TNewNotebook; read;
  815. property InnerPage: TNewNotebookPage; read;
  816. property InnerNotebook: TNewNotebook; read;
  817. property InstallingPage: TNewNotebookPage; read;
  818. property MainPanel: TPanel; read;
  819. property PageNameLabel: TNewStaticText; read;
  820. property PageDescriptionLabel: TNewStaticText; read;
  821. property WizardSmallBitmapImage: TBitmapImage; read;
  822. property Bevel1: TBevel; read;
  823. property StatusLabel: TNewStaticText; read;
  824. property ProgressBar: TNewProgressBar; read;
  825. property BeveledLabel: TNewStaticText; read;
  826. property Bevel: TBevel; read;
  827. property CancelButton: TNewButton; read;
  828. end;