isxclasses.pas 36 KB

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