home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / COMCTRLS.HPP < prev    next >
C/C++ Source or Header  |  1997-02-14  |  82KB  |  2,091 lines

  1. //----------------------------------------------------------------------------
  2. // ComCtrls.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
  3. // From: ComCtrls.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef ComCtrlsHPP
  6. #define ComCtrlsHPP
  7. //----------------------------------------------------------------------------
  8. #include <RichEdit.hpp>
  9. #include <StdCtrls.hpp>
  10. #include <Graphics.hpp>
  11. #include <Menus.hpp>
  12. #include <Forms.hpp>
  13. #include <Controls.hpp>
  14. #include <Classes.hpp>
  15. #include <CommCtrl.hpp>
  16. #include <SysUtils.hpp>
  17. #include <Windows.hpp>
  18. #include <Messages.hpp>
  19. #include <System.hpp>
  20. #pragma warn -par
  21. #pragma warn -hid 
  22. #pragma warn -inl
  23.  
  24. namespace Comctrls
  25. {
  26. //-- type declarations -------------------------------------------------------
  27. typedef void __fastcall (__closure *TTabChangingEvent)(System::TObject* Sender, bool &AllowChange);
  28.  
  29. class __declspec(delphiclass) TCustomTabControl;
  30. class __declspec(pascalimplementation) TCustomTabControl : public Controls::TWinControl
  31. {
  32.     typedef Controls::TWinControl inherited;
  33.     
  34. private:
  35.     Classes::TStrings* FTabs;
  36.     Classes::TStringList* FSaveTabs;
  37.     int FSaveTabIndex;
  38.     Windows::TSmallPoint FTabSize;
  39.     bool FMultiLine;
  40.     bool FUpdating;
  41.     Classes::TNotifyEvent FOnChange;
  42.     TTabChangingEvent FOnChanging;
  43.     Windows::TRect __fastcall GetDisplayRect(void);
  44.     int __fastcall GetTabIndex(void);
  45.     void __fastcall SetMultiLine(bool Value);
  46.     void __fastcall SetTabHeight(short Value);
  47.     void __fastcall SetTabIndex(int Value);
  48.     void __fastcall SetTabs(Classes::TStrings* Value);
  49.     void __fastcall SetTabWidth(short Value);
  50.     void __fastcall TabsChanged(void);
  51.     void __fastcall UpdateTabSize(void);
  52.     HIDESBASE MESSAGE void __fastcall WMDestroy(Messages::TWMNoParams &Message);
  53.     MESSAGE void __fastcall CMTabStopChanged(Messages::TMessage &Message);
  54.     MESSAGE void __fastcall CNNotify(Messages::TWMNotify &Message);
  55.     
  56. protected:
  57.     virtual void __fastcall AlignControls(Controls::TControl* AControl, Windows::TRect &Rect);
  58.     virtual bool __fastcall CanChange(void);
  59.     virtual void __fastcall Change(void);
  60.     virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
  61.     virtual void __fastcall CreateWnd(void);
  62.     virtual void __fastcall DestroyWnd(void);
  63.     __property Windows::TRect DisplayRect = {read=GetDisplayRect};
  64.     __property bool MultiLine = {read=FMultiLine, write=SetMultiLine, default=0};
  65.     __property short TabHeight = {read=FTabSize.y, write=SetTabHeight, default=0};
  66.     __property int TabIndex = {read=GetTabIndex, write=SetTabIndex, default=-1};
  67.     __property Classes::TStrings* Tabs = {read=FTabs, write=SetTabs, nodefault};
  68.     __property short TabWidth = {read=FTabSize.x, write=SetTabWidth, default=0};
  69.     __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
  70.     __property TTabChangingEvent OnChanging = {read=FOnChanging, write=FOnChanging};
  71.     
  72. public:
  73.     __fastcall virtual TCustomTabControl(Classes::TComponent* AOwner);
  74.     __fastcall virtual ~TCustomTabControl(void);
  75.     __property TabStop ;
  76. public:
  77.     /* TWinControl.CreateParented */ __fastcall TCustomTabControl(HWND ParentWindow) : Controls::TWinControl(
  78.         ParentWindow) { }
  79.     
  80. };
  81.  
  82. class __declspec(delphiclass) TTabControl;
  83. class __declspec(pascalimplementation) TTabControl : public TCustomTabControl
  84. {
  85.     typedef TCustomTabControl inherited;
  86.     
  87. public:
  88.     __property DisplayRect ;
  89.     
  90. __published:
  91.     __property Align ;
  92.     __property DragCursor ;
  93.     __property DragMode ;
  94.     __property Enabled ;
  95.     __property Font ;
  96.     __property MultiLine ;
  97.     __property ParentFont ;
  98.     __property ParentShowHint ;
  99.     __property PopupMenu ;
  100.     __property ShowHint ;
  101.     __property TabHeight ;
  102.     __property TabIndex ;
  103.     __property TabOrder ;
  104.     __property Tabs ;
  105.     __property TabStop ;
  106.     __property TabWidth ;
  107.     __property Visible ;
  108.     __property OnChange ;
  109.     __property OnChanging ;
  110.     __property OnDragDrop ;
  111.     __property OnDragOver ;
  112.     __property OnEndDrag ;
  113.     __property OnEnter ;
  114.     __property OnExit ;
  115.     __property OnMouseDown ;
  116.     __property OnMouseMove ;
  117.     __property OnMouseUp ;
  118.     __property OnStartDrag ;
  119. public:
  120.     /* TCustomTabControl.Create */ __fastcall virtual TTabControl(Classes::TComponent* AOwner) : Comctrls::
  121.         TCustomTabControl(AOwner) { }
  122.     /* TCustomTabControl.Destroy */ __fastcall virtual ~TTabControl(void) { }
  123.     
  124. public:
  125.     /* TWinControl.CreateParented */ __fastcall TTabControl(HWND ParentWindow) : Comctrls::TCustomTabControl(
  126.         ParentWindow) { }
  127.     
  128. };
  129.  
  130. class __declspec(delphiclass) TTabSheet;
  131. class __declspec(delphiclass) TPageControl;
  132. class __declspec(pascalimplementation) TPageControl : public TCustomTabControl
  133. {
  134.     typedef TCustomTabControl inherited;
  135.     
  136. private:
  137.     Classes::TList* FPages;
  138.     TTabSheet* FActivePage;
  139.     void __fastcall ChangeActivePage(TTabSheet* Page);
  140.     void __fastcall DeleteTab(TTabSheet* Page);
  141.     TTabSheet* __fastcall GetPage(int Index);
  142.     int __fastcall GetPageCount(void);
  143.     void __fastcall InsertPage(TTabSheet* Page);
  144.     void __fastcall InsertTab(TTabSheet* Page);
  145.     void __fastcall MoveTab(int CurIndex, int NewIndex);
  146.     void __fastcall RemovePage(TTabSheet* Page);
  147.     void __fastcall SetActivePage(TTabSheet* Page);
  148.     void __fastcall UpdateTab(TTabSheet* Page);
  149.     void __fastcall UpdateActivePage(void);
  150.     HIDESBASE MESSAGE void __fastcall CMDesignHitTest(Messages::TWMMouse &Message);
  151.     HIDESBASE MESSAGE void __fastcall CMDialogKey(Messages::TWMKey &Message);
  152.     
  153. protected:
  154.     virtual void __fastcall Change(void);
  155.     virtual void __fastcall GetChildren(Classes::TGetChildProc Proc);
  156.     virtual void __fastcall SetChildOrder(Classes::TComponent* Child, int Order);
  157.     virtual void __fastcall ShowControl(Controls::TControl* AControl);
  158.     
  159. public:
  160.     __fastcall virtual TPageControl(Classes::TComponent* AOwner);
  161.     __fastcall virtual ~TPageControl(void);
  162.     TTabSheet* __fastcall FindNextPage(TTabSheet* CurPage, bool GoForward, bool CheckTabVisible);
  163.     void __fastcall SelectNextPage(bool GoForward);
  164.     __property int PageCount = {read=GetPageCount, nodefault};
  165.     __property TTabSheet* Pages[int Index] = {read=GetPage};
  166.     
  167. __published:
  168.     __property TTabSheet* ActivePage = {read=FActivePage, write=SetActivePage, nodefault};
  169.     __property Align ;
  170.     __property DragCursor ;
  171.     __property DragMode ;
  172.     __property Enabled ;
  173.     __property Font ;
  174.     __property MultiLine ;
  175.     __property ParentFont ;
  176.     __property ParentShowHint ;
  177.     __property PopupMenu ;
  178.     __property ShowHint ;
  179.     __property TabHeight ;
  180.     __property TabOrder ;
  181.     __property TabStop ;
  182.     __property TabWidth ;
  183.     __property Visible ;
  184.     __property OnChange ;
  185.     __property OnChanging ;
  186.     __property OnDragDrop ;
  187.     __property OnDragOver ;
  188.     __property OnEndDrag ;
  189.     __property OnEnter ;
  190.     __property OnExit ;
  191.     __property OnMouseDown ;
  192.     __property OnMouseMove ;
  193.     __property OnMouseUp ;
  194.     __property OnStartDrag ;
  195. public:
  196.     /* TWinControl.CreateParented */ __fastcall TPageControl(HWND ParentWindow) : Comctrls::TCustomTabControl(
  197.         ParentWindow) { }
  198.     
  199. };
  200.  
  201. class __declspec(pascalimplementation) TTabSheet : public Controls::TWinControl
  202. {
  203.     typedef Controls::TWinControl inherited;
  204.     
  205. private:
  206.     TPageControl* FPageControl;
  207.     bool FTabVisible;
  208.     bool FTabShowing;
  209.     int __fastcall GetPageIndex(void);
  210.     int __fastcall GetTabIndex(void);
  211.     void __fastcall SetPageControl(TPageControl* APageControl);
  212.     void __fastcall SetPageIndex(int Value);
  213.     void __fastcall SetTabShowing(bool Value);
  214.     void __fastcall SetTabVisible(bool Value);
  215.     void __fastcall UpdateTabShowing(void);
  216.     MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
  217.     
  218. protected:
  219.     virtual void __fastcall ReadState(Classes::TReader* Reader);
  220.     
  221. public:
  222.     __fastcall virtual TTabSheet(Classes::TComponent* AOwner);
  223.     __fastcall virtual ~TTabSheet(void);
  224.     __property TPageControl* PageControl = {read=FPageControl, write=SetPageControl, nodefault};
  225.     __property int TabIndex = {read=GetTabIndex, nodefault};
  226.     
  227. __published:
  228.     __property Caption ;
  229.     __property Enabled ;
  230.     __property Font ;
  231.     __property Height  = {stored=false};
  232.     __property Left  = {stored=false};
  233.     __property int PageIndex = {read=GetPageIndex, write=SetPageIndex, stored=false, nodefault};
  234.     __property ParentFont ;
  235.     __property ParentShowHint ;
  236.     __property PopupMenu ;
  237.     __property ShowHint ;
  238.     __property bool TabVisible = {read=FTabVisible, write=SetTabVisible, default=1};
  239.     __property Top  = {stored=false};
  240.     __property Visible  = {stored=false, default=1};
  241.     __property Width  = {stored=false};
  242.     __property OnDragDrop ;
  243.     __property OnDragOver ;
  244.     __property OnEnter ;
  245.     __property OnExit ;
  246.     __property OnMouseDown ;
  247.     __property OnMouseMove ;
  248.     __property OnMouseUp ;
  249. public:
  250.     /* TWinControl.CreateParented */ __fastcall TTabSheet(HWND ParentWindow) : Controls::TWinControl(ParentWindow
  251.         ) { }
  252.     
  253. };
  254.  
  255. enum TStatusPanelStyle { psText, psOwnerDraw };
  256.  
  257. enum TStatusPanelBevel { pbNone, pbLowered, pbRaised };
  258.  
  259. class __declspec(delphiclass) TStatusPanel;
  260. class __declspec(pascalimplementation) TStatusPanel : public Classes::TCollectionItem
  261. {
  262.     typedef Classes::TCollectionItem inherited;
  263.     
  264. private:
  265.     System::AnsiString FText;
  266.     int FWidth;
  267.     TAlignment FAlignment;
  268.     TStatusPanelBevel FBevel;
  269.     TStatusPanelStyle FStyle;
  270.     void __fastcall SetAlignment(Classes::TAlignment Value);
  271.     void __fastcall SetBevel(TStatusPanelBevel Value);
  272.     void __fastcall SetStyle(TStatusPanelStyle Value);
  273.     void __fastcall SetText(const System::AnsiString Value);
  274.     void __fastcall SetWidth(int Value);
  275.     
  276. public:
  277.     __fastcall virtual TStatusPanel(Classes::TCollection* Collection);
  278.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  279.     
  280. __published:
  281.     __property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, default=0};
  282.     __property TStatusPanelBevel Bevel = {read=FBevel, write=SetBevel, default=1};
  283.     __property TStatusPanelStyle Style = {read=FStyle, write=SetStyle, default=0};
  284.     __property System::AnsiString Text = {read=FText, write=SetText, nodefault};
  285.     __property int Width = {read=FWidth, write=SetWidth, nodefault};
  286. public:
  287.     /* TCollectionItem.Destroy */ __fastcall virtual ~TStatusPanel(void) { }
  288.     
  289. };
  290.  
  291. class __declspec(delphiclass) TStatusPanels;
  292. class __declspec(delphiclass) TStatusBar;
  293. typedef void __fastcall (__closure *TDrawPanelEvent)(TStatusBar* StatusBar, TStatusPanel* Panel, const 
  294.     Windows::TRect &Rect);
  295.  
  296. class __declspec(pascalimplementation) TStatusBar : public Controls::TWinControl
  297. {
  298.     typedef Controls::TWinControl inherited;
  299.     
  300. private:
  301.     TStatusPanels* FPanels;
  302.     Graphics::TCanvas* FCanvas;
  303.     System::AnsiString FSimpleText;
  304.     bool FSimplePanel;
  305.     bool FSizeGrip;
  306.     TDrawPanelEvent FOnDrawPanel;
  307.     Classes::TNotifyEvent FOnResize;
  308.     void __fastcall SetPanels(TStatusPanels* Value);
  309.     void __fastcall SetSimplePanel(bool Value);
  310.     void __fastcall SetSimpleText(const System::AnsiString Value);
  311.     void __fastcall SetSizeGrip(bool Value);
  312.     void __fastcall UpdatePanel(int Index);
  313.     void __fastcall UpdatePanels(void);
  314.     MESSAGE void __fastcall CNDrawItem(Messages::TWMDrawItem &Message);
  315.     HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
  316.     
  317. protected:
  318.     virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
  319.     virtual void __fastcall CreateWnd(void);
  320.     virtual void __fastcall DrawPanel(TStatusPanel* Panel, const Windows::TRect &Rect);
  321.     virtual void __fastcall Resize(void);
  322.     
  323. public:
  324.     __fastcall virtual TStatusBar(Classes::TComponent* AOwner);
  325.     __fastcall virtual ~TStatusBar(void);
  326.     __property Graphics::TCanvas* Canvas = {read=FCanvas, nodefault};
  327.     
  328. __published:
  329.     __property Align ;
  330.     __property DragCursor ;
  331.     __property DragMode ;
  332.     __property Enabled ;
  333.     __property Font ;
  334.     __property TStatusPanels* Panels = {read=FPanels, write=SetPanels, nodefault};
  335.     __property ParentFont ;
  336.     __property ParentShowHint ;
  337.     __property PopupMenu ;
  338.     __property ShowHint ;
  339.     __property bool SimplePanel = {read=FSimplePanel, write=SetSimplePanel, nodefault};
  340.     __property System::AnsiString SimpleText = {read=FSimpleText, write=SetSimpleText, nodefault};
  341.     __property bool SizeGrip = {read=FSizeGrip, write=SetSizeGrip, default=1};
  342.     __property Visible ;
  343.     __property OnClick ;
  344.     __property OnDblClick ;
  345.     __property OnDragDrop ;
  346.     __property OnDragOver ;
  347.     __property OnEndDrag ;
  348.     __property OnMouseDown ;
  349.     __property OnMouseMove ;
  350.     __property OnMouseUp ;
  351.     __property TDrawPanelEvent OnDrawPanel = {read=FOnDrawPanel, write=FOnDrawPanel};
  352.     __property Classes::TNotifyEvent OnResize = {read=FOnResize, write=FOnResize};
  353.     __property OnStartDrag ;
  354. public:
  355.     /* TWinControl.CreateParented */ __fastcall TStatusBar(HWND ParentWindow) : Controls::TWinControl(ParentWindow
  356.         ) { }
  357.     
  358. };
  359.  
  360. class __declspec(pascalimplementation) TStatusPanels : public Classes::TCollection
  361. {
  362.     typedef Classes::TCollection inherited;
  363.     
  364. private:
  365.     TStatusBar* FStatusBar;
  366.     HIDESBASE TStatusPanel* __fastcall GetItem(int Index);
  367.     HIDESBASE void __fastcall SetItem(int Index, TStatusPanel* Value);
  368.     
  369. protected:
  370.     virtual void __fastcall Update(Classes::TCollectionItem* Item);
  371.     
  372. public:
  373.     __fastcall TStatusPanels(TStatusBar* StatusBar);
  374.     HIDESBASE TStatusPanel* __fastcall Add(void);
  375.     __property TStatusPanel* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
  376. public:
  377.     /* TCollection.Destroy */ __fastcall virtual ~TStatusPanels(void) { }
  378.     
  379. };
  380.  
  381. enum THeaderSectionStyle { hsText, hsOwnerDraw };
  382.  
  383. class __declspec(delphiclass) THeaderSection;
  384. class __declspec(pascalimplementation) THeaderSection : public Classes::TCollectionItem
  385. {
  386.     typedef Classes::TCollectionItem inherited;
  387.     
  388. private:
  389.     System::AnsiString FText;
  390.     int FWidth;
  391.     int FMinWidth;
  392.     int FMaxWidth;
  393.     TAlignment FAlignment;
  394.     THeaderSectionStyle FStyle;
  395.     bool FAllowClick;
  396.     int __fastcall GetLeft(void);
  397.     int __fastcall GetRight(void);
  398.     void __fastcall SetAlignment(Classes::TAlignment Value);
  399.     void __fastcall SetMaxWidth(int Value);
  400.     void __fastcall SetMinWidth(int Value);
  401.     void __fastcall SetStyle(THeaderSectionStyle Value);
  402.     void __fastcall SetText(const System::AnsiString Value);
  403.     void __fastcall SetWidth(int Value);
  404.     
  405. public:
  406.     __fastcall virtual THeaderSection(Classes::TCollection* Collection);
  407.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  408.     __property int Left = {read=GetLeft, nodefault};
  409.     __property int Right = {read=GetRight, nodefault};
  410.     
  411. __published:
  412.     __property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, default=0};
  413.     __property bool AllowClick = {read=FAllowClick, write=FAllowClick, default=1};
  414.     __property int MaxWidth = {read=FMaxWidth, write=SetMaxWidth, default=10000};
  415.     __property int MinWidth = {read=FMinWidth, write=SetMinWidth, default=0};
  416.     __property THeaderSectionStyle Style = {read=FStyle, write=SetStyle, default=0};
  417.     __property System::AnsiString Text = {read=FText, write=SetText, nodefault};
  418.     __property int Width = {read=FWidth, write=SetWidth, nodefault};
  419. public:
  420.     /* TCollectionItem.Destroy */ __fastcall virtual ~THeaderSection(void) { }
  421.     
  422. };
  423.  
  424. class __declspec(delphiclass) THeaderSections;
  425. class __declspec(delphiclass) THeaderControl;
  426. typedef void __fastcall (__closure *TDrawSectionEvent)(THeaderControl* HeaderControl, THeaderSection* 
  427.     Section, const Windows::TRect &Rect, bool Pressed);
  428.  
  429. typedef void __fastcall (__closure *TSectionNotifyEvent)(THeaderControl* HeaderControl, THeaderSection* 
  430.     Section);
  431.  
  432. enum TSectionTrackState { tsTrackBegin, tsTrackMove, tsTrackEnd };
  433.  
  434. typedef void __fastcall (__closure *TSectionTrackEvent)(THeaderControl* HeaderControl, THeaderSection* 
  435.     Section, int Width, TSectionTrackState State);
  436.  
  437. class __declspec(pascalimplementation) THeaderControl : public Controls::TWinControl
  438. {
  439.     typedef Controls::TWinControl inherited;
  440.     
  441. private:
  442.     THeaderSections* FSections;
  443.     Graphics::TCanvas* FCanvas;
  444.     TDrawSectionEvent FOnDrawSection;
  445.     Classes::TNotifyEvent FOnResize;
  446.     TSectionNotifyEvent FOnSectionClick;
  447.     TSectionNotifyEvent FOnSectionResize;
  448.     TSectionTrackEvent FOnSectionTrack;
  449.     void __fastcall SetSections(THeaderSections* Value);
  450.     void __fastcall UpdateItem(int Message, int Index);
  451.     void __fastcall UpdateSection(int Index);
  452.     void __fastcall UpdateSections(void);
  453.     MESSAGE void __fastcall CNDrawItem(Messages::TWMDrawItem &Message);
  454.     MESSAGE void __fastcall CNNotify(Messages::TWMNotify &Message);
  455.     HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
  456.     HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
  457.     
  458. protected:
  459.     virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
  460.     virtual void __fastcall CreateWnd(void);
  461.     virtual void __fastcall DrawSection(THeaderSection* Section, const Windows::TRect &Rect, bool Pressed
  462.         );
  463.     virtual void __fastcall Resize(void);
  464.     virtual void __fastcall SectionClick(THeaderSection* Section);
  465.     virtual void __fastcall SectionResize(THeaderSection* Section);
  466.     virtual void __fastcall SectionTrack(THeaderSection* Section, int Width, TSectionTrackState State);
  467.         
  468. public:
  469.     __fastcall virtual THeaderControl(Classes::TComponent* AOwner);
  470.     __fastcall virtual ~THeaderControl(void);
  471.     __property Graphics::TCanvas* Canvas = {read=FCanvas, nodefault};
  472.     
  473. __published:
  474.     __property Align ;
  475.     __property DragCursor ;
  476.     __property DragMode ;
  477.     __property Enabled ;
  478.     __property Font ;
  479.     __property THeaderSections* Sections = {read=FSections, write=SetSections, nodefault};
  480.     __property ShowHint ;
  481.     __property ParentFont ;
  482.     __property ParentShowHint ;
  483.     __property PopupMenu ;
  484.     __property Visible ;
  485.     __property OnDragDrop ;
  486.     __property OnDragOver ;
  487.     __property OnEndDrag ;
  488.     __property OnMouseDown ;
  489.     __property OnMouseMove ;
  490.     __property OnMouseUp ;
  491.     __property TDrawSectionEvent OnDrawSection = {read=FOnDrawSection, write=FOnDrawSection};
  492.     __property Classes::TNotifyEvent OnResize = {read=FOnResize, write=FOnResize};
  493.     __property TSectionNotifyEvent OnSectionClick = {read=FOnSectionClick, write=FOnSectionClick};
  494.     __property TSectionNotifyEvent OnSectionResize = {read=FOnSectionResize, write=FOnSectionResize};
  495.     __property TSectionTrackEvent OnSectionTrack = {read=FOnSectionTrack, write=FOnSectionTrack};
  496.     __property OnStartDrag ;
  497. public:
  498.     /* TWinControl.CreateParented */ __fastcall THeaderControl(HWND ParentWindow) : Controls::TWinControl(
  499.         ParentWindow) { }
  500.     
  501. };
  502.  
  503. class __declspec(pascalimplementation) THeaderSections : public Classes::TCollection
  504. {
  505.     typedef Classes::TCollection inherited;
  506.     
  507. private:
  508.     THeaderControl* FHeaderControl;
  509.     HIDESBASE THeaderSection* __fastcall GetItem(int Index);
  510.     HIDESBASE void __fastcall SetItem(int Index, THeaderSection* Value);
  511.     
  512. protected:
  513.     virtual void __fastcall Update(Classes::TCollectionItem* Item);
  514.     
  515. public:
  516.     __fastcall THeaderSections(THeaderControl* HeaderControl);
  517.     HIDESBASE THeaderSection* __fastcall Add(void);
  518.     __property THeaderSection* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
  519. public:
  520.     /* TCollection.Destroy */ __fastcall virtual ~THeaderSections(void) { }
  521.     
  522. };
  523.  
  524. enum TNodeState { nsCut, nsDropHilited, nsFocused, nsSelected, nsExpanded };
  525.  
  526. enum TNodeAttachMode { naAdd, naAddFirst, naAddChild, naAddChildFirst, naInsert };
  527.  
  528. enum TAddMode { taAddFirst, taAdd, taInsert };
  529.  
  530. struct TNodeInfo;
  531. typedef TNodeInfo *PNodeInfo;
  532.  
  533. #pragma pack(push, 1)
  534. struct TNodeInfo
  535. {
  536.     int ImageIndex;
  537.     int SelectedIndex;
  538.     int StateIndex;
  539.     int OverlayIndex;
  540.     void *Data;
  541.     int Count;
  542.     System::SmallString<255>  Text;
  543. } ;
  544. #pragma pack(pop)
  545.  
  546. class __declspec(delphiclass) TTreeNode;
  547. class __declspec(delphiclass) TTreeNodes;
  548. class __declspec(delphiclass) TCustomTreeView;
  549. enum TSortType { stNone, stData, stText, stBoth };
  550.  
  551. typedef void __fastcall (__closure *TTVEditingEvent)(System::TObject* Sender, TTreeNode* Node, bool 
  552.     &AllowEdit);
  553.  
  554. typedef void __fastcall (__closure *TTVEditedEvent)(System::TObject* Sender, TTreeNode* Node,  System::AnsiString &
  555.     S);
  556.  
  557. typedef void __fastcall (__closure *TTVExpandedEvent)(System::TObject* Sender, TTreeNode* Node);
  558.  
  559. typedef void __fastcall (__closure *TTVExpandingEvent)(System::TObject* Sender, TTreeNode* Node, bool 
  560.     &AllowExpansion);
  561.  
  562. typedef void __fastcall (__closure *TTVCollapsingEvent)(System::TObject* Sender, TTreeNode* Node, bool 
  563.     &AllowCollapse);
  564.  
  565. typedef void __fastcall (__closure *TTVChangingEvent)(System::TObject* Sender, TTreeNode* Node, bool 
  566.     &AllowChange);
  567.  
  568. typedef void __fastcall (__closure *TTVChangedEvent)(System::TObject* Sender, TTreeNode* Node);
  569.  
  570. typedef void __fastcall (__closure *TTVCompareEvent)(System::TObject* Sender, TTreeNode* Node1, TTreeNode* 
  571.     Node2, int Data, int &Compare);
  572.  
  573. enum THitTest { htAbove, htBelow, htNowhere, htOnItem, htOnButton, htOnIcon, htOnIndent, htOnLabel, 
  574.     htOnRight, htOnStateIcon, htToLeft, htToRight };
  575.  
  576. typedef Set<THitTest, htAbove, htToRight>  THitTests;
  577.  
  578. class __declspec(pascalimplementation) TCustomTreeView : public Controls::TWinControl
  579. {
  580.     typedef Controls::TWinControl inherited;
  581.     
  582. private:
  583.     bool FShowLines;
  584.     bool FShowRoot;
  585.     bool FShowButtons;
  586.     TFormBorderStyle FBorderStyle;
  587.     bool FReadOnly;
  588.     Controls::TImageList* FImages;
  589.     Controls::TImageList* FStateImages;
  590.     Controls::TChangeLink* FImageChangeLink;
  591.     Controls::TChangeLink* FStateChangeLink;
  592.     Controls::TImageList* FDragImage;
  593.     TTreeNodes* FTreeNodes;
  594.     TSortType FSortType;
  595.     Classes::TStringList* FSaveItems;
  596.     int FSaveTopIndex;
  597.     int FSaveIndex;
  598.     int FSaveIndent;
  599.     bool FHideSelection;
  600.     Classes::TMemoryStream* FMemStream;
  601.     void *FEditInstance;
  602.     void *FDefEditProc;
  603.     HWND FEditHandle;
  604.     bool FDragged;
  605.     bool FRClicked;
  606.     TTreeNode* FLastDropTarget;
  607.     TTreeNode* FDragNode;
  608.     TTVEditingEvent FOnEditing;
  609.     TTVEditedEvent FOnEdited;
  610.     TTVExpandedEvent FOnExpanded;
  611.     TTVExpandingEvent FOnExpanding;
  612.     TTVExpandedEvent FOnCollapsed;
  613.     TTVCollapsingEvent FOnCollapsing;
  614.     TTVChangingEvent FOnChanging;
  615.     TTVChangedEvent FOnChange;
  616.     TTVCompareEvent FOnCompare;
  617.     TTVExpandedEvent FOnDeletion;
  618.     TTVExpandedEvent FOnGetImageIndex;
  619.     TTVExpandedEvent FOnGetSelectedIndex;
  620.     HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
  621.     HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
  622.     HIDESBASE MESSAGE void __fastcall CMDrag(Controls::TCMDrag &Message);
  623.     MESSAGE void __fastcall CNNotify(Messages::TWMNotify &Message);
  624.     void __fastcall EditWndProc(Messages::TMessage &Message);
  625.     void __fastcall DoDragOver(Controls::TDragObject* Source, int X, int Y);
  626.     void __fastcall GetImageIndex(TTreeNode* Node);
  627.     void __fastcall GetSelectedIndex(TTreeNode* Node);
  628.     TTreeNode* __fastcall GetDropTarget(void);
  629.     int __fastcall GetIndent(void);
  630.     TTreeNode* __fastcall GetNodeFromItem(const TV_ITEMA &Item);
  631.     TTreeNode* __fastcall GetSelection(void);
  632.     TTreeNode* __fastcall GetTopItem(void);
  633.     void __fastcall ImageListChange(System::TObject* Sender);
  634.     void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
  635.     void __fastcall SetButtonStyle(bool Value);
  636.     void __fastcall SetDropTarget(TTreeNode* Value);
  637.     void __fastcall SetHideSelection(bool Value);
  638.     void __fastcall SetImageList(int Value, int Flags);
  639.     void __fastcall SetIndent(int Value);
  640.     void __fastcall SetImages(Controls::TImageList* Value);
  641.     void __fastcall SetLineStyle(bool Value);
  642.     void __fastcall SetReadOnly(bool Value);
  643.     void __fastcall SetRootStyle(bool Value);
  644.     void __fastcall SetSelection(TTreeNode* Value);
  645.     void __fastcall SetSortType(TSortType Value);
  646.     void __fastcall SetStateImages(Controls::TImageList* Value);
  647.     void __fastcall SetStyle(int Value, bool UseStyle);
  648.     void __fastcall SetTreeNodes(TTreeNodes* Value);
  649.     void __fastcall SetTopItem(TTreeNode* Value);
  650.     HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
  651.     HIDESBASE MESSAGE void __fastcall WMRButtonDown(Messages::TWMMouse &Message);
  652.     
  653. protected:
  654.     virtual bool __fastcall CanEdit(TTreeNode* Node);
  655.     virtual bool __fastcall CanChange(TTreeNode* Node);
  656.     virtual bool __fastcall CanCollapse(TTreeNode* Node);
  657.     virtual bool __fastcall CanExpand(TTreeNode* Node);
  658.     virtual void __fastcall Change(TTreeNode* Node);
  659.     virtual void __fastcall Collapse(TTreeNode* Node);
  660.     virtual TTreeNode* __fastcall CreateNode(void);
  661.     virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
  662.     virtual void __fastcall CreateWnd(void);
  663.     virtual void __fastcall DestroyWnd(void);
  664.     HIDESBASE virtual void __fastcall DoEndDrag(System::TObject* Target, int X, int Y);
  665.     virtual void __fastcall DoStartDrag(Controls::TDragObject* &DragObject);
  666.     virtual void __fastcall Edit(const TV_ITEMA &Item);
  667.     virtual void __fastcall Expand(TTreeNode* Node);
  668.     virtual Controls::TCustomImageList* __fastcall GetDragImages(void);
  669.     virtual void __fastcall Loaded(void);
  670.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  671.         );
  672.     virtual void __fastcall SetDragMode(Controls::TDragMode Value);
  673.     virtual void __fastcall WndProc(Messages::TMessage &Message);
  674.     __property TTVEditingEvent OnEditing = {read=FOnEditing, write=FOnEditing};
  675.     __property TTVEditedEvent OnEdited = {read=FOnEdited, write=FOnEdited};
  676.     __property TTVExpandingEvent OnExpanding = {read=FOnExpanding, write=FOnExpanding};
  677.     __property TTVExpandedEvent OnExpanded = {read=FOnExpanded, write=FOnExpanded};
  678.     __property TTVCollapsingEvent OnCollapsing = {read=FOnCollapsing, write=FOnCollapsing};
  679.     __property TTVExpandedEvent OnCollapsed = {read=FOnCollapsed, write=FOnCollapsed};
  680.     __property TTVChangingEvent OnChanging = {read=FOnChanging, write=FOnChanging};
  681.     __property TTVChangedEvent OnChange = {read=FOnChange, write=FOnChange};
  682.     __property TTVCompareEvent OnCompare = {read=FOnCompare, write=FOnCompare};
  683.     __property TTVExpandedEvent OnDeletion = {read=FOnDeletion, write=FOnDeletion};
  684.     __property TTVExpandedEvent OnGetImageIndex = {read=FOnGetImageIndex, write=FOnGetImageIndex};
  685.     __property TTVExpandedEvent OnGetSelectedIndex = {read=FOnGetSelectedIndex, write=FOnGetSelectedIndex
  686.         };
  687.     __property bool ShowButtons = {read=FShowButtons, write=SetButtonStyle, default=1};
  688.     __property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
  689.     __property bool ShowLines = {read=FShowLines, write=SetLineStyle, default=1};
  690.     __property bool ShowRoot = {read=FShowRoot, write=SetRootStyle, default=1};
  691.     __property bool ReadOnly = {read=FReadOnly, write=SetReadOnly, default=0};
  692.     __property int Indent = {read=GetIndent, write=SetIndent, nodefault};
  693.     __property TTreeNodes* Items = {read=FTreeNodes, write=SetTreeNodes, nodefault};
  694.     __property TSortType SortType = {read=FSortType, write=SetSortType, default=0};
  695.     __property bool HideSelection = {read=FHideSelection, write=SetHideSelection, default=1};
  696.     __property Controls::TImageList* Images = {read=FImages, write=SetImages, nodefault};
  697.     __property Controls::TImageList* StateImages = {read=FStateImages, write=SetStateImages, nodefault}
  698.         ;
  699.     
  700. public:
  701.     __fastcall virtual TCustomTreeView(Classes::TComponent* AOwner);
  702.     __fastcall virtual ~TCustomTreeView(void);
  703.     bool __fastcall AlphaSort(void);
  704.     bool __fastcall CustomSort(Commctrl::TTVCompare SortProc, long Data);
  705.     void __fastcall FullCollapse(void);
  706.     void __fastcall FullExpand(void);
  707.     THitTests __fastcall GetHitTestInfoAt(int X, int Y);
  708.     TTreeNode* __fastcall GetNodeAt(int X, int Y);
  709.     bool __fastcall IsEditing(void);
  710.     void __fastcall LoadFromFile(const System::AnsiString FileName);
  711.     void __fastcall LoadFromStream(Classes::TStream* Stream);
  712.     void __fastcall SaveToFile(const System::AnsiString FileName);
  713.     void __fastcall SaveToStream(Classes::TStream* Stream);
  714.     __property TTreeNode* DropTarget = {read=GetDropTarget, write=SetDropTarget, nodefault};
  715.     __property TTreeNode* Selected = {read=GetSelection, write=SetSelection, nodefault};
  716.     __property TTreeNode* TopItem = {read=GetTopItem, write=SetTopItem, nodefault};
  717. public:
  718.     /* TWinControl.CreateParented */ __fastcall TCustomTreeView(HWND ParentWindow) : Controls::TWinControl(
  719.         ParentWindow) { }
  720.     
  721. };
  722.  
  723. class __declspec(pascalimplementation) TTreeNodes : public Classes::TPersistent
  724. {
  725.     typedef Classes::TPersistent inherited;
  726.     
  727. private:
  728.     TCustomTreeView* FOwner;
  729.     int FUpdateCount;
  730.     void __fastcall AddedNode(TTreeNode* Value);
  731.     HWND __fastcall GetHandle(void);
  732.     TTreeNode* __fastcall GetNodeFromIndex(int Index);
  733.     void __fastcall ReadData(Classes::TStream* Stream);
  734.     void __fastcall Repaint(TTreeNode* Node);
  735.     void __fastcall WriteData(Classes::TStream* Stream);
  736.     
  737. protected:
  738.     Commctrl::HTreeItem __fastcall AddItem(Commctrl::HTreeItem Parent, Commctrl::HTreeItem Target, const 
  739.         TV_ITEMA &Item, TAddMode AddMode);
  740.     TTreeNode* __fastcall InternalAddObject(TTreeNode* Node, const System::AnsiString S, void * Ptr, TAddMode 
  741.         AddMode);
  742.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  743.     TV_ITEMA __fastcall CreateItem(TTreeNode* Node);
  744.     int __fastcall GetCount(void);
  745.     void __fastcall SetItem(int Index, TTreeNode* Value);
  746.     void __fastcall SetUpdateState(bool Updating);
  747.     
  748. public:
  749.     __fastcall TTreeNodes(TCustomTreeView* AOwner);
  750.     __fastcall virtual ~TTreeNodes(void);
  751.     TTreeNode* __fastcall AddChildFirst(TTreeNode* Node, const System::AnsiString S);
  752.     TTreeNode* __fastcall AddChild(TTreeNode* Node, const System::AnsiString S);
  753.     TTreeNode* __fastcall AddChildObjectFirst(TTreeNode* Node, const System::AnsiString S, void * Ptr);
  754.         
  755.     TTreeNode* __fastcall AddChildObject(TTreeNode* Node, const System::AnsiString S, void * Ptr);
  756.     TTreeNode* __fastcall AddFirst(TTreeNode* Node, const System::AnsiString S);
  757.     TTreeNode* __fastcall Add(TTreeNode* Node, const System::AnsiString S);
  758.     TTreeNode* __fastcall AddObjectFirst(TTreeNode* Node, const System::AnsiString S, void * Ptr);
  759.     TTreeNode* __fastcall AddObject(TTreeNode* Node, const System::AnsiString S, void * Ptr);
  760.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  761.     void __fastcall BeginUpdate(void);
  762.     void __fastcall Clear(void);
  763.     void __fastcall Delete(TTreeNode* Node);
  764.     void __fastcall EndUpdate(void);
  765.     TTreeNode* __fastcall GetFirstNode(void);
  766.     TTreeNode* __fastcall GetNode(Commctrl::HTreeItem ItemId);
  767.     TTreeNode* __fastcall Insert(TTreeNode* Node, const System::AnsiString S);
  768.     TTreeNode* __fastcall InsertObject(TTreeNode* Node, const System::AnsiString S, void * Ptr);
  769.     __property int Count = {read=GetCount, nodefault};
  770.     __property HWND Handle = {read=GetHandle, nodefault};
  771.     __property TTreeNode* Item[int Index] = {read=GetNodeFromIndex/*, default*/};
  772.     __property TCustomTreeView* Owner = {read=FOwner, nodefault};
  773. };
  774.  
  775. class __declspec(pascalimplementation) TTreeNode : public Classes::TPersistent
  776. {
  777.     typedef Classes::TPersistent inherited;
  778.     
  779. private:
  780.     TTreeNodes* FOwner;
  781.     System::AnsiString FText;
  782.     void *FData;
  783.     Commctrl::_TreeItem *FItemId;
  784.     int FImageIndex;
  785.     int FSelectedIndex;
  786.     int FOverlayIndex;
  787.     int FStateIndex;
  788.     bool FDeleting;
  789.     void __fastcall ExpandItem(bool Expand, bool Recurse);
  790.     int __fastcall GetAbsoluteIndex(void);
  791.     bool __fastcall GetExpanded(void);
  792.     int __fastcall GetLevel(void);
  793.     TTreeNode* __fastcall GetParent(void);
  794.     bool __fastcall GetChildren(void);
  795.     bool __fastcall GetCut(void);
  796.     bool __fastcall GetDropTarget(void);
  797.     bool __fastcall GetFocused(void);
  798.     int __fastcall GetIndex(void);
  799.     TTreeNode* __fastcall GetItem(int Index);
  800.     bool __fastcall GetSelected(void);
  801.     bool __fastcall GetState(TNodeState NodeState);
  802.     int __fastcall GetCount(void);
  803.     TCustomTreeView* __fastcall GetTreeView(void);
  804.     bool __fastcall HasVisibleParent(void);
  805.     void __fastcall InternalMove(TTreeNode* ParentNode, TTreeNode* Node, Commctrl::HTreeItem HItem, TAddMode 
  806.         AddMode);
  807.     bool __fastcall IsEqual(TTreeNode* Node);
  808.     bool __fastcall IsNodeVisible(void);
  809.     void __fastcall ReadData(Classes::TStream* Stream, PNodeInfo Info);
  810.     void __fastcall SetChildren(bool Value);
  811.     void __fastcall SetCut(bool Value);
  812.     void __fastcall SetData(void * Value);
  813.     void __fastcall SetDropTarget(bool Value);
  814.     void __fastcall SetItem(int Index, TTreeNode* Value);
  815.     void __fastcall SetExpanded(bool Value);
  816.     void __fastcall SetFocused(bool Value);
  817.     void __fastcall SetImageIndex(int Value);
  818.     void __fastcall SetOverlayIndex(int Value);
  819.     void __fastcall SetSelectedIndex(int Value);
  820.     void __fastcall SetSelected(bool Value);
  821.     void __fastcall SetStateIndex(int Value);
  822.     void __fastcall SetText(const System::AnsiString S);
  823.     void __fastcall WriteData(Classes::TStream* Stream, PNodeInfo Info);
  824.     
  825. public:
  826.     __fastcall TTreeNode(TTreeNodes* AOwner);
  827.     __fastcall virtual ~TTreeNode(void);
  828.     bool __fastcall AlphaSort(void);
  829.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  830.     void __fastcall Collapse(bool Recurse);
  831.     bool __fastcall CustomSort(Commctrl::TTVCompare SortProc, long Data);
  832.     void __fastcall Delete(void);
  833.     void __fastcall DeleteChildren(void);
  834.     Windows::TRect __fastcall DisplayRect(bool TextOnly);
  835.     bool __fastcall EditText(void);
  836.     void __fastcall EndEdit(bool Cancel);
  837.     void __fastcall Expand(bool Recurse);
  838.     TTreeNode* __fastcall getFirstChild(void);
  839.     HWND __fastcall GetHandle(void);
  840.     TTreeNode* __fastcall GetLastChild(void);
  841.     TTreeNode* __fastcall GetNext(void);
  842.     TTreeNode* __fastcall GetNextChild(TTreeNode* Value);
  843.     TTreeNode* __fastcall getNextSibling(void);
  844.     TTreeNode* __fastcall GetNextVisible(void);
  845.     TTreeNode* __fastcall GetPrev(void);
  846.     TTreeNode* __fastcall GetPrevChild(TTreeNode* Value);
  847.     TTreeNode* __fastcall getPrevSibling(void);
  848.     TTreeNode* __fastcall GetPrevVisible(void);
  849.     bool __fastcall HasAsParent(TTreeNode* Value);
  850.     int __fastcall IndexOf(TTreeNode* Value);
  851.     void __fastcall MakeVisible(void);
  852.     void __fastcall MoveTo(TTreeNode* Destination, TNodeAttachMode Mode);
  853.     __property int AbsoluteIndex = {read=GetAbsoluteIndex, nodefault};
  854.     __property int Count = {read=GetCount, nodefault};
  855.     __property bool Cut = {read=GetCut, write=SetCut, nodefault};
  856.     __property void * Data = {read=FData, write=SetData, nodefault};
  857.     __property bool Deleting = {read=FDeleting, nodefault};
  858.     __property bool Focused = {read=GetFocused, write=SetFocused, nodefault};
  859.     __property bool DropTarget = {read=GetDropTarget, write=SetDropTarget, nodefault};
  860.     __property bool Selected = {read=GetSelected, write=SetSelected, nodefault};
  861.     __property bool Expanded = {read=GetExpanded, write=SetExpanded, nodefault};
  862.     __property HWND Handle = {read=GetHandle, nodefault};
  863.     __property bool HasChildren = {read=GetChildren, write=SetChildren, nodefault};
  864.     __property int ImageIndex = {read=FImageIndex, write=SetImageIndex, nodefault};
  865.     __property int Index = {read=GetIndex, nodefault};
  866.     __property bool IsVisible = {read=IsNodeVisible, nodefault};
  867.     __property TTreeNode* Item[int Index] = {read=GetItem, write=SetItem/*, default*/};
  868.     __property Commctrl::HTreeItem ItemId = {read=FItemId, nodefault};
  869.     __property int Level = {read=GetLevel, nodefault};
  870.     __property int OverlayIndex = {read=FOverlayIndex, write=SetOverlayIndex, nodefault};
  871.     __property TTreeNodes* Owner = {read=FOwner, nodefault};
  872.     __property TTreeNode* Parent = {read=GetParent, nodefault};
  873.     __property int SelectedIndex = {read=FSelectedIndex, write=SetSelectedIndex, nodefault};
  874.     __property int StateIndex = {read=FStateIndex, write=SetStateIndex, nodefault};
  875.     __property System::AnsiString Text = {read=FText, write=SetText, nodefault};
  876.     __property TCustomTreeView* TreeView = {read=GetTreeView, nodefault};
  877. };
  878.  
  879. class __declspec(delphiclass) ETreeViewError;
  880. class __declspec(pascalimplementation) ETreeViewError : public Sysutils::Exception
  881. {
  882.     typedef Sysutils::Exception inherited;
  883.     
  884. public:
  885.     /* Exception.Create */ __fastcall ETreeViewError(const System::AnsiString Msg) : Sysutils::Exception(
  886.         Msg) { }
  887.     /* Exception.CreateFmt */ __fastcall ETreeViewError(const System::AnsiString Msg, const System::TVarRec 
  888.         * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  889.     /* Exception.CreateRes */ __fastcall ETreeViewError(int Ident) : Sysutils::Exception(Ident) { }
  890.     /* Exception.CreateResFmt */ __fastcall ETreeViewError(int Ident, const System::TVarRec * Args, const 
  891.         int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
  892.     /* Exception.CreateHelp */ __fastcall ETreeViewError(const System::AnsiString Msg, int AHelpContext
  893.         ) : Sysutils::Exception(Msg, AHelpContext) { }
  894.     /* Exception.CreateFmtHelp */ __fastcall ETreeViewError(const System::AnsiString Msg, const System::TVarRec 
  895.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
  896.         ) { }
  897.     /* Exception.CreateResHelp */ __fastcall ETreeViewError(int Ident, int AHelpContext) : Sysutils::Exception(
  898.         Ident, AHelpContext) { }
  899.     /* Exception.CreateResFmtHelp */ __fastcall ETreeViewError(int Ident, const System::TVarRec * Args, 
  900.         const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext)
  901.          { }
  902.     
  903. public:
  904.     /* TObject.Destroy */ __fastcall virtual ~ETreeViewError(void) { }
  905.     
  906. };
  907.  
  908. class __declspec(delphiclass) TTreeView;
  909. class __declspec(pascalimplementation) TTreeView : public TCustomTreeView
  910. {
  911.     typedef TCustomTreeView inherited;
  912.     
  913. __published:
  914.     __property ShowButtons ;
  915.     __property BorderStyle ;
  916.     __property DragCursor ;
  917.     __property ShowLines ;
  918.     __property ShowRoot ;
  919.     __property ReadOnly ;
  920.     __property DragMode ;
  921.     __property HideSelection ;
  922.     __property Indent ;
  923.     __property Items ;
  924.     __property OnEditing ;
  925.     __property OnEdited ;
  926.     __property OnExpanding ;
  927.     __property OnExpanded ;
  928.     __property OnCollapsing ;
  929.     __property OnCompare ;
  930.     __property OnCollapsed ;
  931.     __property OnChanging ;
  932.     __property OnChange ;
  933.     __property OnDeletion ;
  934.     __property OnGetImageIndex ;
  935.     __property OnGetSelectedIndex ;
  936.     __property Align ;
  937.     __property Enabled ;
  938.     __property Font ;
  939.     __property Color ;
  940.     __property ParentColor ;
  941.     __property ParentCtl3D ;
  942.     __property Ctl3D ;
  943.     __property SortType ;
  944.     __property TabOrder ;
  945.     __property TabStop ;
  946.     __property Visible ;
  947.     __property OnClick ;
  948.     __property OnEnter ;
  949.     __property OnExit ;
  950.     __property OnDragDrop ;
  951.     __property OnDragOver ;
  952.     __property OnStartDrag ;
  953.     __property OnEndDrag ;
  954.     __property OnMouseDown ;
  955.     __property OnMouseMove ;
  956.     __property OnMouseUp ;
  957.     __property OnDblClick ;
  958.     __property OnKeyDown ;
  959.     __property OnKeyPress ;
  960.     __property OnKeyUp ;
  961.     __property PopupMenu ;
  962.     __property ParentFont ;
  963.     __property ParentShowHint ;
  964.     __property ShowHint ;
  965.     __property Images ;
  966.     __property StateImages ;
  967. public:
  968.     /* TCustomTreeView.Create */ __fastcall virtual TTreeView(Classes::TComponent* AOwner) : Comctrls::
  969.         TCustomTreeView(AOwner) { }
  970.     /* TCustomTreeView.Destroy */ __fastcall virtual ~TTreeView(void) { }
  971.     
  972. public:
  973.     /* TWinControl.CreateParented */ __fastcall TTreeView(HWND ParentWindow) : Comctrls::TCustomTreeView(
  974.         ParentWindow) { }
  975.     
  976. };
  977.  
  978. enum TTrackBarOrientation { trHorizontal, trVertical };
  979.  
  980. enum TTickMark { tmBottomRight, tmTopLeft, tmBoth };
  981.  
  982. enum TTickStyle { tsNone, tsAuto, tsManual };
  983.  
  984. class __declspec(delphiclass) TTrackBar;
  985. class __declspec(pascalimplementation) TTrackBar : public Controls::TWinControl
  986. {
  987.     typedef Controls::TWinControl inherited;
  988.     
  989. private:
  990.     TTrackBarOrientation FOrientation;
  991.     TTickMark FTickMarks;
  992.     TTickStyle FTickStyle;
  993.     int FLineSize;
  994.     int FPageSize;
  995.     int FMin;
  996.     int FMax;
  997.     int FFrequency;
  998.     int FPosition;
  999.     int FSelStart;
  1000.     int FSelEnd;
  1001.     Classes::TNotifyEvent FOnChange;
  1002.     void __fastcall SetOrientation(TTrackBarOrientation Value);
  1003.     void __fastcall SetParams(int APosition, int AMin, int AMax);
  1004.     void __fastcall SetPosition(int Value);
  1005.     void __fastcall SetMin(int Value);
  1006.     void __fastcall SetMax(int Value);
  1007.     void __fastcall SetFrequency(int Value);
  1008.     void __fastcall SetTickStyle(TTickStyle Value);
  1009.     void __fastcall SetTickMarks(TTickMark Value);
  1010.     void __fastcall SetLineSize(int Value);
  1011.     void __fastcall SetPageSize(int Value);
  1012.     void __fastcall SetSelStart(int Value);
  1013.     void __fastcall SetSelEnd(int Value);
  1014.     void __fastcall UpdateSelection(void);
  1015.     MESSAGE void __fastcall CNHScroll(Messages::TWMScroll &Message);
  1016.     MESSAGE void __fastcall CNVScroll(Messages::TWMScroll &Message);
  1017.     
  1018. protected:
  1019.     virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
  1020.     virtual void __fastcall CreateWnd(void);
  1021.     virtual void __fastcall DestroyWnd(void);
  1022.     
  1023. public:
  1024.     __fastcall virtual TTrackBar(Classes::TComponent* AOwner);
  1025.     void __fastcall SetTick(int Value);
  1026.     
  1027. __published:
  1028.     __property Ctl3D ;
  1029.     __property DragCursor ;
  1030.     __property DragMode ;
  1031.     __property Enabled ;
  1032.     __property int LineSize = {read=FLineSize, write=SetLineSize, default=1};
  1033.     __property int Max = {read=FMax, write=SetMax, default=10};
  1034.     __property int Min = {read=FMin, write=SetMin, default=0};
  1035.     __property TTrackBarOrientation Orientation = {read=FOrientation, write=SetOrientation, nodefault};
  1036.         
  1037.     __property ParentCtl3D ;
  1038.     __property ParentShowHint ;
  1039.     __property int PageSize = {read=FPageSize, write=SetPageSize, default=2};
  1040.     __property PopupMenu ;
  1041.     __property int Frequency = {read=FFrequency, write=SetFrequency, nodefault};
  1042.     __property int Position = {read=FPosition, write=SetPosition, nodefault};
  1043.     __property int SelEnd = {read=FSelEnd, write=SetSelEnd, nodefault};
  1044.     __property int SelStart = {read=FSelStart, write=SetSelStart, nodefault};
  1045.     __property ShowHint ;
  1046.     __property TabOrder ;
  1047.     __property TabStop ;
  1048.     __property TTickMark TickMarks = {read=FTickMarks, write=SetTickMarks, nodefault};
  1049.     __property TTickStyle TickStyle = {read=FTickStyle, write=SetTickStyle, nodefault};
  1050.     __property Visible ;
  1051.     __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
  1052.     __property OnDragDrop ;
  1053.     __property OnDragOver ;
  1054.     __property OnEndDrag ;
  1055.     __property OnEnter ;
  1056.     __property OnExit ;
  1057.     __property OnKeyDown ;
  1058.     __property OnKeyPress ;
  1059.     __property OnKeyUp ;
  1060.     __property OnStartDrag ;
  1061. public:
  1062.     /* TWinControl.CreateParented */ __fastcall TTrackBar(HWND ParentWindow) : Controls::TWinControl(ParentWindow
  1063.         ) { }
  1064.     /* TWinControl.Destroy */ __fastcall virtual ~TTrackBar(void) { }
  1065.     
  1066. };
  1067.  
  1068. typedef Word TProgressRange;
  1069.  
  1070. class __declspec(delphiclass) TProgressBar;
  1071. class __declspec(pascalimplementation) TProgressBar : public Controls::TWinControl
  1072. {
  1073.     typedef Controls::TWinControl inherited;
  1074.     
  1075. private:
  1076.     TProgressRange FMin;
  1077.     TProgressRange FMax;
  1078.     TProgressRange FStep;
  1079.     TProgressRange FPosition;
  1080.     TProgressRange __fastcall GetPosition(void);
  1081.     void __fastcall SetParams(TProgressRange AMin, TProgressRange AMax);
  1082.     void __fastcall SetMin(TProgressRange Value);
  1083.     void __fastcall SetMax(TProgressRange Value);
  1084.     void __fastcall SetPosition(TProgressRange Value);
  1085.     void __fastcall SetStep(TProgressRange Value);
  1086.     
  1087. protected:
  1088.     virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
  1089.     virtual void __fastcall CreateWnd(void);
  1090.     
  1091. public:
  1092.     __fastcall virtual TProgressBar(Classes::TComponent* AOwner);
  1093.     void __fastcall StepIt(void);
  1094.     void __fastcall StepBy(TProgressRange Delta);
  1095.     
  1096. __published:
  1097.     __property Align ;
  1098.     __property Enabled ;
  1099.     __property Hint ;
  1100.     __property TProgressRange Min = {read=FMin, write=SetMin, nodefault};
  1101.     __property TProgressRange Max = {read=FMax, write=SetMax, nodefault};
  1102.     __property ParentShowHint ;
  1103.     __property PopupMenu ;
  1104.     __property TProgressRange Position = {read=GetPosition, write=SetPosition, default=0};
  1105.     __property TProgressRange Step = {read=FStep, write=SetStep, default=10};
  1106.     __property ShowHint ;
  1107.     __property TabOrder ;
  1108.     __property TabStop ;
  1109.     __property Visible ;
  1110.     __property OnDragDrop ;
  1111.     __property OnDragOver ;
  1112.     __property OnEndDrag ;
  1113.     __property OnEnter ;
  1114.     __property OnExit ;
  1115.     __property OnMouseDown ;
  1116.     __property OnMouseMove ;
  1117.     __property OnMouseUp ;
  1118.     __property OnStartDrag ;
  1119. public:
  1120.     /* TWinControl.CreateParented */ __fastcall TProgressBar(HWND ParentWindow) : Controls::TWinControl(
  1121.         ParentWindow) { }
  1122.     /* TWinControl.Destroy */ __fastcall virtual ~TProgressBar(void) { }
  1123.     
  1124. };
  1125.  
  1126. enum TAttributeType { atSelected, atDefaultText };
  1127.  
  1128. enum TConsistentAttribute { caBold, caColor, caFace, caItalic, caSize, caStrikeOut, caUnderline, caProtected 
  1129.     };
  1130.  
  1131. typedef Set<TConsistentAttribute, caBold, caProtected>  TConsistentAttributes;
  1132.  
  1133. class __declspec(delphiclass) TTextAttributes;
  1134. class __declspec(delphiclass) TCustomRichEdit;
  1135. class __declspec(delphiclass) TParaAttributes;
  1136. enum TNumberingStyle { nsNone, nsBullet };
  1137.  
  1138. class __declspec(pascalimplementation) TParaAttributes : public Classes::TPersistent
  1139. {
  1140.     typedef Classes::TPersistent inherited;
  1141.     
  1142. private:
  1143.     TCustomRichEdit* RichEdit;
  1144.     void __fastcall GetAttributes(PARAFORMAT &Paragraph);
  1145.     Classes::TAlignment __fastcall GetAlignment(void);
  1146.     long __fastcall GetFirstIndent(void);
  1147.     long __fastcall GetLeftIndent(void);
  1148.     long __fastcall GetRightIndent(void);
  1149.     TNumberingStyle __fastcall GetNumbering(void);
  1150.     long __fastcall GetTab(Byte Index);
  1151.     int __fastcall GetTabCount(void);
  1152.     void __fastcall InitPara(PARAFORMAT &Paragraph);
  1153.     void __fastcall SetAlignment(Classes::TAlignment Value);
  1154.     void __fastcall SetAttributes(PARAFORMAT &Paragraph);
  1155.     void __fastcall SetFirstIndent(long Value);
  1156.     void __fastcall SetLeftIndent(long Value);
  1157.     void __fastcall SetRightIndent(long Value);
  1158.     void __fastcall SetNumbering(TNumberingStyle Value);
  1159.     void __fastcall SetTab(Byte Index, long Value);
  1160.     void __fastcall SetTabCount(int Value);
  1161.     
  1162. public:
  1163.     __fastcall TParaAttributes(TCustomRichEdit* AOwner);
  1164.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  1165.     __property Classes::TAlignment Alignment = {read=GetAlignment, write=SetAlignment, nodefault};
  1166.     __property long FirstIndent = {read=GetFirstIndent, write=SetFirstIndent, nodefault};
  1167.     __property long LeftIndent = {read=GetLeftIndent, write=SetLeftIndent, nodefault};
  1168.     __property TNumberingStyle Numbering = {read=GetNumbering, write=SetNumbering, nodefault};
  1169.     __property long RightIndent = {read=GetRightIndent, write=SetRightIndent, nodefault};
  1170.     __property long Tab[Byte Index] = {read=GetTab, write=SetTab};
  1171.     __property int TabCount = {read=GetTabCount, write=SetTabCount, nodefault};
  1172. public:
  1173.     /* TObject.Destroy */ __fastcall virtual ~TParaAttributes(void) { }
  1174.     
  1175. };
  1176.  
  1177. typedef System::TMetaClass*TConversionClass;
  1178.  
  1179. typedef void __fastcall (__closure *TRichEditResizeEvent)(System::TObject* Sender, const Windows::TRect 
  1180.     &Rect);
  1181.  
  1182. typedef void __fastcall (__closure *TRichEditProtectChange)(System::TObject* Sender, int StartPos, int 
  1183.     EndPos, bool &AllowChange);
  1184.  
  1185. typedef void __fastcall (__closure *TRichEditSaveClipboard)(System::TObject* Sender, int NumObjects, 
  1186.     int NumChars, bool &SaveClipboard);
  1187.  
  1188. enum TSearchType { stWholeWord, stMatchCase };
  1189.  
  1190. typedef Set<TSearchType, stWholeWord, stMatchCase>  TSearchTypes;
  1191.  
  1192. class __declspec(pascalimplementation) TCustomRichEdit : public Stdctrls::TCustomMemo
  1193. {
  1194.     typedef Stdctrls::TCustomMemo inherited;
  1195.     
  1196. private:
  1197.     int FLibHandle;
  1198.     bool FHideScrollBars;
  1199.     TTextAttributes* FSelAttributes;
  1200.     TTextAttributes* FDefAttributes;
  1201.     TParaAttributes* FParagraph;
  1202.     int FScreenLogPixels;
  1203.     Classes::TStrings* FRichEditStrings;
  1204.     Classes::TMemoryStream* FMemStream;
  1205.     Classes::TNotifyEvent FOnSelChange;
  1206.     bool FHideSelection;
  1207.     bool FModified;
  1208.     System::TMetaClass*FDefaultConverter;
  1209.     TRichEditResizeEvent FOnResizeRequest;
  1210.     TRichEditProtectChange FOnProtectChange;
  1211.     TRichEditSaveClipboard FOnSaveClipboard;
  1212.     Windows::TRect FPageRect;
  1213.     HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
  1214.     HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
  1215.     MESSAGE void __fastcall CNNotify(Messages::TWMNotify &Message);
  1216.     bool __fastcall GetPlainText(void);
  1217.     bool __fastcall ProtectChange(int StartPos, int EndPos);
  1218.     bool __fastcall SaveClipboard(int NumObj, int NumChars);
  1219.     void __fastcall SetHideScrollBars(bool Value);
  1220.     HIDESBASE void __fastcall SetHideSelection(bool Value);
  1221.     void __fastcall SetPlainText(bool Value);
  1222.     void __fastcall SetRichEditStrings(Classes::TStrings* Value);
  1223.     void __fastcall SetDefAttributes(TTextAttributes* Value);
  1224.     void __fastcall SetSelAttributes(TTextAttributes* Value);
  1225.     HIDESBASE MESSAGE void __fastcall WMNCDestroy(Messages::TWMNoParams &Message);
  1226.     HIDESBASE MESSAGE void __fastcall WMSetCursor(Messages::TWMSetCursor &Message);
  1227.     HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
  1228.     HIDESBASE MESSAGE void __fastcall WMSetFont(Messages::TWMSetFont &Message);
  1229.     
  1230. protected:
  1231.     virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
  1232.     virtual void __fastcall CreateWnd(void);
  1233.     virtual void __fastcall DestroyWnd(void);
  1234.     virtual void __fastcall RequestSize(const Windows::TRect &Rect);
  1235.     virtual void __fastcall SelectionChange(void);
  1236.     __property bool HideSelection = {read=FHideSelection, write=SetHideSelection, default=1};
  1237.     __property bool HideScrollBars = {read=FHideScrollBars, write=SetHideScrollBars, default=1};
  1238.     __property Classes::TStrings* Lines = {read=FRichEditStrings, write=SetRichEditStrings, nodefault};
  1239.         
  1240.     __property TRichEditSaveClipboard OnSaveClipboard = {read=FOnSaveClipboard, write=FOnSaveClipboard}
  1241.         ;
  1242.     __property Classes::TNotifyEvent OnSelectionChange = {read=FOnSelChange, write=FOnSelChange};
  1243.     __property TRichEditProtectChange OnProtectChange = {read=FOnProtectChange, write=FOnProtectChange}
  1244.         ;
  1245.     __property TRichEditResizeEvent OnResizeRequest = {read=FOnResizeRequest, write=FOnResizeRequest};
  1246.     __property bool PlainText = {read=GetPlainText, write=SetPlainText, default=0};
  1247.     
  1248. public:
  1249.     __fastcall virtual TCustomRichEdit(Classes::TComponent* AOwner);
  1250.     __fastcall virtual ~TCustomRichEdit(void);
  1251.     int __fastcall FindText(const System::AnsiString SearchStr, int StartPos, int Length, TSearchTypes 
  1252.         Options);
  1253.     void __fastcall Print(const System::AnsiString Caption);
  1254.     static /* class method */ void __fastcall RegisterConversionFormat(const System::TMetaClass* const vmt, 
  1255.         const System::AnsiString AExtension, System::TMetaClass* AConversionClass);
  1256.     __property System::TMetaClass* DefaultConverter = {read=FDefaultConverter, write=FDefaultConverter, 
  1257.         nodefault};
  1258.     __property TTextAttributes* DefAttributes = {read=FDefAttributes, write=SetDefAttributes, nodefault
  1259.         };
  1260.     __property TTextAttributes* SelAttributes = {read=FSelAttributes, write=SetSelAttributes, nodefault
  1261.         };
  1262.     __property Windows::TRect PageRect = {read=FPageRect, write=FPageRect};
  1263.     __property TParaAttributes* Paragraph = {read=FParagraph, nodefault};
  1264. public:
  1265.     /* TWinControl.CreateParented */ __fastcall TCustomRichEdit(HWND ParentWindow) : Stdctrls::TCustomMemo(
  1266.         ParentWindow) { }
  1267.     
  1268. };
  1269.  
  1270. class __declspec(pascalimplementation) TTextAttributes : public Classes::TPersistent
  1271. {
  1272.     typedef Classes::TPersistent inherited;
  1273.     
  1274. private:
  1275.     TCustomRichEdit* RichEdit;
  1276.     TAttributeType FType;
  1277.     void __fastcall GetAttributes(CHARFORMAT &Format);
  1278.     Graphics::TColor __fastcall GetColor(void);
  1279.     TConsistentAttributes __fastcall GetConsistentAttributes(void);
  1280.     int __fastcall GetHeight(void);
  1281.     Graphics::TFontName __fastcall GetName(void);
  1282.     Graphics::TFontPitch __fastcall GetPitch(void);
  1283.     bool __fastcall GetProtected(void);
  1284.     int __fastcall GetSize(void);
  1285.     Graphics::TFontStyles __fastcall GetStyle(void);
  1286.     void __fastcall SetAttributes(CHARFORMAT &Format);
  1287.     void __fastcall SetColor(Graphics::TColor Value);
  1288.     void __fastcall SetHeight(int Value);
  1289.     void __fastcall SetName( Graphics::TFontName &Value);
  1290.     void __fastcall SetPitch(Graphics::TFontPitch Value);
  1291.     void __fastcall SetProtected(bool Value);
  1292.     void __fastcall SetSize(int Value);
  1293.     void __fastcall SetStyle(Graphics::TFontStyles Value);
  1294.     
  1295. protected:
  1296.     void __fastcall InitFormat(CHARFORMAT &Format);
  1297.     virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
  1298.     
  1299. public:
  1300.     __fastcall TTextAttributes(TCustomRichEdit* AOwner, TAttributeType AttributeType);
  1301.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  1302.     __property Graphics::TColor Color = {read=GetColor, write=SetColor, nodefault};
  1303.     __property TConsistentAttributes ConsistentAttributes = {read=GetConsistentAttributes, nodefault};
  1304.     __property Graphics::TFontName Name = {read=GetName, write=SetName};
  1305.     __property Graphics::TFontPitch Pitch = {read=GetPitch, write=SetPitch, nodefault};
  1306.     __property bool Protected = {read=GetProtected, write=SetProtected, nodefault};
  1307.     __property int Size = {read=GetSize, write=SetSize, nodefault};
  1308.     __property Graphics::TFontStyles Style = {read=GetStyle, write=SetStyle, nodefault};
  1309.     __property int Height = {read=GetHeight, write=SetHeight, nodefault};
  1310. public:
  1311.     /* TObject.Destroy */ __fastcall virtual ~TTextAttributes(void) { }
  1312.     
  1313. };
  1314.  
  1315. class __declspec(delphiclass) TConversion;
  1316. class __declspec(pascalimplementation) TConversion : public System::TObject
  1317. {
  1318.     typedef System::TObject inherited;
  1319.     
  1320. public:
  1321.     virtual int __fastcall ConvertReadStream(Classes::TStream* Stream, char * Buffer, int BufSize);
  1322.     virtual int __fastcall ConvertWriteStream(Classes::TStream* Stream, char * Buffer, int BufSize);
  1323. public:
  1324.         
  1325.     /* TObject.Create */ __fastcall TConversion(void) : System::TObject() { }
  1326.     /* TObject.Destroy */ __fastcall virtual ~TConversion(void) { }
  1327.     
  1328. };
  1329.  
  1330. struct TConversionFormat;
  1331. typedef TConversionFormat *PConversionFormat;
  1332.  
  1333. struct TConversionFormat
  1334. {
  1335.     System::TMetaClass*ConversionClass;
  1336.     System::AnsiString Extension;
  1337.     TConversionFormat *Next;
  1338. } ;
  1339.  
  1340. struct TRichEditStreamInfo
  1341. {
  1342.     TConversion* Converter;
  1343.     Classes::TStream* Stream;
  1344. } ;
  1345.  
  1346. typedef TRichEditStreamInfo *PRichEditStreamInfo;
  1347.  
  1348. class __declspec(delphiclass) TRichEdit;
  1349. class __declspec(pascalimplementation) TRichEdit : public TCustomRichEdit
  1350. {
  1351.     typedef TCustomRichEdit inherited;
  1352.     
  1353. __published:
  1354.     __property Align ;
  1355.     __property Alignment ;
  1356.     __property BorderStyle ;
  1357.     __property Color ;
  1358.     __property Ctl3D ;
  1359.     __property DragMode ;
  1360.     __property Enabled ;
  1361.     __property Font ;
  1362.     __property HideSelection ;
  1363.     __property HideScrollBars ;
  1364.     __property ImeMode ;
  1365.     __property ImeName ;
  1366.     __property Lines ;
  1367.     __property MaxLength ;
  1368.     __property ParentColor ;
  1369.     __property ParentCtl3D ;
  1370.     __property ParentFont ;
  1371.     __property PlainText ;
  1372.     __property PopupMenu ;
  1373.     __property ReadOnly ;
  1374.     __property ScrollBars ;
  1375.     __property ShowHint ;
  1376.     __property TabOrder ;
  1377.     __property TabStop ;
  1378.     __property Visible ;
  1379.     __property WantTabs ;
  1380.     __property WantReturns ;
  1381.     __property WordWrap ;
  1382.     __property OnChange ;
  1383.     __property OnDragDrop ;
  1384.     __property OnDragOver ;
  1385.     __property OnEndDrag ;
  1386.     __property OnEnter ;
  1387.     __property OnExit ;
  1388.     __property OnKeyDown ;
  1389.     __property OnKeyPress ;
  1390.     __property OnKeyUp ;
  1391.     __property OnMouseDown ;
  1392.     __property OnMouseMove ;
  1393.     __property OnMouseUp ;
  1394.     __property OnResizeRequest ;
  1395.     __property OnSelectionChange ;
  1396.     __property OnStartDrag ;
  1397.     __property OnProtectChange ;
  1398.     __property OnSaveClipboard ;
  1399. public:
  1400.     /* TCustomRichEdit.Create */ __fastcall virtual TRichEdit(Classes::TComponent* AOwner) : Comctrls::
  1401.         TCustomRichEdit(AOwner) { }
  1402.     /* TCustomRichEdit.Destroy */ __fastcall virtual ~TRichEdit(void) { }
  1403.     
  1404. public:
  1405.     /* TWinControl.CreateParented */ __fastcall TRichEdit(HWND ParentWindow) : Comctrls::TCustomRichEdit(
  1406.         ParentWindow) { }
  1407.     
  1408. };
  1409.  
  1410. enum TUDAlignButton { udLeft, udRight };
  1411.  
  1412. enum TUDOrientation { udHorizontal, udVertical };
  1413.  
  1414. enum TUDBtnType { btNext, btPrev };
  1415.  
  1416. typedef void __fastcall (__closure *TUDClickEvent)(System::TObject* Sender, TUDBtnType Button);
  1417.  
  1418. typedef void __fastcall (__closure *TUDChangingEvent)(System::TObject* Sender, bool &AllowChange);
  1419.  
  1420. class __declspec(delphiclass) TCustomUpDown;
  1421. class __declspec(pascalimplementation) TCustomUpDown : public Controls::TWinControl
  1422. {
  1423.     typedef Controls::TWinControl inherited;
  1424.     
  1425. private:
  1426.     bool FArrowKeys;
  1427.     Controls::TWinControl* FAssociate;
  1428.     short FMin;
  1429.     short FMax;
  1430.     int FIncrement;
  1431.     short FPosition;
  1432.     bool FThousands;
  1433.     bool FWrap;
  1434.     TUDClickEvent FOnClick;
  1435.     TUDAlignButton FAlignButton;
  1436.     TUDOrientation FOrientation;
  1437.     TUDChangingEvent FOnChanging;
  1438.     void __fastcall UndoAutoResizing(Controls::TWinControl* Value);
  1439.     void __fastcall SetAssociate(Controls::TWinControl* Value);
  1440.     short __fastcall GetPosition(void);
  1441.     void __fastcall SetMin(short Value);
  1442.     void __fastcall SetMax(short Value);
  1443.     void __fastcall SetIncrement(int Value);
  1444.     void __fastcall SetPosition(short Value);
  1445.     void __fastcall SetAlignButton(TUDAlignButton Value);
  1446.     void __fastcall SetOrientation(TUDOrientation Value);
  1447.     void __fastcall SetArrowKeys(bool Value);
  1448.     void __fastcall SetThousands(bool Value);
  1449.     void __fastcall SetWrap(bool Value);
  1450.     MESSAGE void __fastcall CNNotify(Messages::TWMNotify &Message);
  1451.     HIDESBASE MESSAGE void __fastcall WMHScroll(Messages::TWMScroll &Message);
  1452.     HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Message);
  1453.     
  1454. protected:
  1455.     bool __fastcall CanChange(void);
  1456.     virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
  1457.     virtual void __fastcall CreateWnd(void);
  1458.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  1459.         );
  1460.     HIDESBASE virtual void __fastcall Click(TUDBtnType Button);
  1461.     __property TUDAlignButton AlignButton = {read=FAlignButton, write=SetAlignButton, default=1};
  1462.     __property bool ArrowKeys = {read=FArrowKeys, write=SetArrowKeys, default=1};
  1463.     __property Controls::TWinControl* Associate = {read=FAssociate, write=SetAssociate, nodefault};
  1464.     __property short Min = {read=FMin, write=SetMin, nodefault};
  1465.     __property short Max = {read=FMax, write=SetMax, default=100};
  1466.     __property int Increment = {read=FIncrement, write=SetIncrement, default=1};
  1467.     __property TUDOrientation Orientation = {read=FOrientation, write=SetOrientation, default=1};
  1468.     __property short Position = {read=GetPosition, write=SetPosition, nodefault};
  1469.     __property bool Thousands = {read=FThousands, write=SetThousands, default=1};
  1470.     __property bool Wrap = {read=FWrap, write=SetWrap, nodefault};
  1471.     __property TUDChangingEvent OnChanging = {read=FOnChanging, write=FOnChanging};
  1472.     __property TUDClickEvent OnClick = {read=FOnClick, write=FOnClick};
  1473.     
  1474. public:
  1475.     __fastcall virtual TCustomUpDown(Classes::TComponent* AOwner);
  1476. public:
  1477.     /* TWinControl.CreateParented */ __fastcall TCustomUpDown(HWND ParentWindow) : Controls::TWinControl(
  1478.         ParentWindow) { }
  1479.     /* TWinControl.Destroy */ __fastcall virtual ~TCustomUpDown(void) { }
  1480.     
  1481. };
  1482.  
  1483. class __declspec(delphiclass) TUpDown;
  1484. class __declspec(pascalimplementation) TUpDown : public TCustomUpDown
  1485. {
  1486.     typedef TCustomUpDown inherited;
  1487.     
  1488. __published:
  1489.     __property AlignButton ;
  1490.     __property Associate ;
  1491.     __property ArrowKeys ;
  1492.     __property Enabled ;
  1493.     __property Hint ;
  1494.     __property Min ;
  1495.     __property Max ;
  1496.     __property Increment ;
  1497.     __property Orientation ;
  1498.     __property ParentShowHint ;
  1499.     __property PopupMenu ;
  1500.     __property Position ;
  1501.     __property ShowHint ;
  1502.     __property TabOrder ;
  1503.     __property TabStop ;
  1504.     __property Thousands ;
  1505.     __property Visible ;
  1506.     __property Wrap ;
  1507.     __property OnChanging ;
  1508.     __property OnClick ;
  1509.     __property OnEnter ;
  1510.     __property OnExit ;
  1511.     __property OnMouseDown ;
  1512.     __property OnMouseMove ;
  1513.     __property OnMouseUp ;
  1514. public:
  1515.     /* TCustomUpDown.Create */ __fastcall virtual TUpDown(Classes::TComponent* AOwner) : Comctrls::TCustomUpDown(
  1516.         AOwner) { }
  1517.     
  1518. public:
  1519.     /* TWinControl.CreateParented */ __fastcall TUpDown(HWND ParentWindow) : Comctrls::TCustomUpDown(ParentWindow
  1520.         ) { }
  1521.     /* TWinControl.Destroy */ __fastcall virtual ~TUpDown(void) { }
  1522.     
  1523. };
  1524.  
  1525. enum THKModifier { hkShift, hkCtrl, hkAlt, hkExt };
  1526.  
  1527. typedef Set<THKModifier, hkShift, hkExt>  THKModifiers;
  1528.  
  1529. enum THKInvalidKey { hcNone, hcShift, hcCtrl, hcAlt, hcShiftCtrl, hcShiftAlt, hcCtrlAlt, hcShiftCtrlAlt 
  1530.     };
  1531.  
  1532. typedef Set<THKInvalidKey, hcNone, hcShiftCtrlAlt>  THKInvalidKeys;
  1533.  
  1534. class __declspec(delphiclass) TCustomHotKey;
  1535. class __declspec(pascalimplementation) TCustomHotKey : public Controls::TWinControl
  1536. {
  1537.     typedef Controls::TWinControl inherited;
  1538.     
  1539. private:
  1540.     bool FAutoSize;
  1541.     THKModifiers FModifiers;
  1542.     THKInvalidKeys FInvalidKeys;
  1543.     Word FHotKey;
  1544.     Classes::TShiftState FShiftState;
  1545.     void __fastcall AdjustHeight(void);
  1546.     void __fastcall SetAutoSize(bool Value);
  1547.     void __fastcall SetInvalidKeys(THKInvalidKeys Value);
  1548.     void __fastcall SetModifiers(THKModifiers Value);
  1549.     void __fastcall UpdateHeight(void);
  1550.     Menus::TShortCut __fastcall GetHotKey(void);
  1551.     void __fastcall SetHotKey(Menus::TShortCut Value);
  1552.     void __fastcall ShortCutToHotKey(Menus::TShortCut Value);
  1553.     Menus::TShortCut __fastcall HotKeyToShortCut(long Value);
  1554.     
  1555. protected:
  1556.     virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
  1557.     virtual void __fastcall CreateWnd(void);
  1558.     __property bool AutoSize = {read=FAutoSize, write=SetAutoSize, default=1};
  1559.     __property THKInvalidKeys InvalidKeys = {read=FInvalidKeys, write=SetInvalidKeys, nodefault};
  1560.     __property THKModifiers Modifiers = {read=FModifiers, write=SetModifiers, nodefault};
  1561.     __property Menus::TShortCut HotKey = {read=GetHotKey, write=SetHotKey, nodefault};
  1562.     __property TabStop ;
  1563.     
  1564. public:
  1565.     __fastcall virtual TCustomHotKey(Classes::TComponent* AOwner);
  1566. public:
  1567.     /* TWinControl.CreateParented */ __fastcall TCustomHotKey(HWND ParentWindow) : Controls::TWinControl(
  1568.         ParentWindow) { }
  1569.     /* TWinControl.Destroy */ __fastcall virtual ~TCustomHotKey(void) { }
  1570.     
  1571. };
  1572.  
  1573. class __declspec(delphiclass) THotKey;
  1574. class __declspec(pascalimplementation) THotKey : public TCustomHotKey
  1575. {
  1576.     typedef TCustomHotKey inherited;
  1577.     
  1578. __published:
  1579.     __property AutoSize ;
  1580.     __property Enabled ;
  1581.     __property Hint ;
  1582.     __property HotKey ;
  1583.     __property InvalidKeys ;
  1584.     __property Modifiers ;
  1585.     __property ParentShowHint ;
  1586.     __property PopupMenu ;
  1587.     __property ShowHint ;
  1588.     __property TabOrder ;
  1589.     __property TabStop ;
  1590.     __property Visible ;
  1591.     __property OnEnter ;
  1592.     __property OnExit ;
  1593.     __property OnMouseDown ;
  1594.     __property OnMouseMove ;
  1595.     __property OnMouseUp ;
  1596. public:
  1597.     /* TCustomHotKey.Create */ __fastcall virtual THotKey(Classes::TComponent* AOwner) : Comctrls::TCustomHotKey(
  1598.         AOwner) { }
  1599.     
  1600. public:
  1601.     /* TWinControl.CreateParented */ __fastcall THotKey(HWND ParentWindow) : Comctrls::TCustomHotKey(ParentWindow
  1602.         ) { }
  1603.     /* TWinControl.Destroy */ __fastcall virtual ~THotKey(void) { }
  1604.     
  1605. };
  1606.  
  1607. typedef int TWidth;
  1608.  
  1609. class __declspec(delphiclass) TListColumn;
  1610. class __declspec(pascalimplementation) TListColumn : public Classes::TCollectionItem
  1611. {
  1612.     typedef Classes::TCollectionItem inherited;
  1613.     
  1614. private:
  1615.     System::AnsiString FCaption;
  1616.     TAlignment FAlignment;
  1617.     TWidth FWidth;
  1618.     void __fastcall DoChange(void);
  1619.     TWidth __fastcall GetWidth(void);
  1620.     void __fastcall ReadData(Classes::TReader* Reader);
  1621.     void __fastcall SetAlignment(Classes::TAlignment Value);
  1622.     void __fastcall SetCaption(const System::AnsiString Value);
  1623.     void __fastcall SetWidth(TWidth Value);
  1624.     void __fastcall WriteData(Classes::TWriter* Writer);
  1625.     
  1626. protected:
  1627.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  1628.     
  1629. public:
  1630.     __fastcall virtual TListColumn(Classes::TCollection* Collection);
  1631.     __fastcall virtual ~TListColumn(void);
  1632.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  1633.     __property TWidth WidthType = {read=FWidth, nodefault};
  1634.     
  1635. __published:
  1636.     __property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, default=0};
  1637.     __property System::AnsiString Caption = {read=FCaption, write=SetCaption, nodefault};
  1638.     __property TWidth Width = {read=GetWidth, write=SetWidth, default=50};
  1639. };
  1640.  
  1641. class __declspec(delphiclass) TListColumns;
  1642. class __declspec(delphiclass) TCustomListView;
  1643. enum TViewStyle { vsIcon, vsSmallIcon, vsList, vsReport };
  1644.  
  1645. class __declspec(delphiclass) TListItems;
  1646. class __declspec(delphiclass) TListItem;
  1647. class __declspec(pascalimplementation) TListItems : public Classes::TPersistent
  1648. {
  1649.     typedef Classes::TPersistent inherited;
  1650.     
  1651. private:
  1652.     TCustomListView* FOwner;
  1653.     int FUpdateCount;
  1654.     bool FNoRedraw;
  1655.     void __fastcall ReadData(Classes::TStream* Stream);
  1656.     void __fastcall WriteData(Classes::TStream* Stream);
  1657.     
  1658. protected:
  1659.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  1660.     LV_ITEMA __fastcall CreateItem(int Index, TListItem* ListItem);
  1661.     int __fastcall GetCount(void);
  1662.     HWND __fastcall GetHandle(void);
  1663.     TListItem* __fastcall GetItem(int Index);
  1664.     void __fastcall SetItem(int Index, TListItem* Value);
  1665.     void __fastcall SetUpdateState(bool Updating);
  1666.     
  1667. public:
  1668.     __fastcall TListItems(TCustomListView* AOwner);
  1669.     __fastcall virtual ~TListItems(void);
  1670.     TListItem* __fastcall Add(void);
  1671.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  1672.     void __fastcall BeginUpdate(void);
  1673.     void __fastcall Clear(void);
  1674.     void __fastcall Delete(int Index);
  1675.     void __fastcall EndUpdate(void);
  1676.     int __fastcall IndexOf(TListItem* Value);
  1677.     TListItem* __fastcall Insert(int Index);
  1678.     __property int Count = {read=GetCount, nodefault};
  1679.     __property HWND Handle = {read=GetHandle, nodefault};
  1680.     __property TListItem* Item[int Index] = {read=GetItem, write=SetItem/*, default*/};
  1681.     __property TCustomListView* Owner = {read=FOwner, nodefault};
  1682. };
  1683.  
  1684. class __declspec(delphiclass) TIconOptions;
  1685. enum TIconArrangement { iaTop, iaLeft };
  1686.  
  1687. class __declspec(pascalimplementation) TIconOptions : public Classes::TPersistent
  1688. {
  1689.     typedef Classes::TPersistent inherited;
  1690.     
  1691. private:
  1692.     TCustomListView* FListView;
  1693.     TIconArrangement FArrangement;
  1694.     bool FAutoArrange;
  1695.     bool FWrapText;
  1696.     void __fastcall SetArrangement(TIconArrangement Value);
  1697.     void __fastcall SetAutoArrange(bool Value);
  1698.     void __fastcall SetWrapText(bool Value);
  1699.     
  1700. public:
  1701.     __fastcall TIconOptions(TCustomListView* AOwner);
  1702.     
  1703. __published:
  1704.     __property TIconArrangement Arrangement = {read=FArrangement, write=SetArrangement, default=0};
  1705.     __property bool AutoArrange = {read=FAutoArrange, write=SetAutoArrange, default=0};
  1706.     __property bool WrapText = {read=FWrapText, write=SetWrapText, default=1};
  1707. public:
  1708.     /* TObject.Destroy */ __fastcall virtual ~TIconOptions(void) { }
  1709.     
  1710. };
  1711.  
  1712. enum TItemChange { ctText, ctImage, ctState };
  1713.  
  1714. typedef void __fastcall (__closure *TLVChangeEvent)(System::TObject* Sender, TListItem* Item, TItemChange 
  1715.     Change);
  1716.  
  1717. typedef void __fastcall (__closure *TLVChangingEvent)(System::TObject* Sender, TListItem* Item, TItemChange 
  1718.     Change, bool &AllowChange);
  1719.  
  1720. typedef void __fastcall (__closure *TLVColumnClickEvent)(System::TObject* Sender, TListColumn* Column
  1721.     );
  1722.  
  1723. typedef void __fastcall (__closure *TLVDeletedEvent)(System::TObject* Sender, TListItem* Item);
  1724.  
  1725. typedef void __fastcall (__closure *TLVEditingEvent)(System::TObject* Sender, TListItem* Item, bool 
  1726.     &AllowEdit);
  1727.  
  1728. typedef void __fastcall (__closure *TLVEditedEvent)(System::TObject* Sender, TListItem* Item,  System::AnsiString &
  1729.     S);
  1730.  
  1731. typedef void __fastcall (__closure *TLVCompareEvent)(System::TObject* Sender, TListItem* Item1, TListItem* 
  1732.     Item2, int Data, int &Compare);
  1733.  
  1734. enum TListArrangement { arAlignBottom, arAlignLeft, arAlignRight, arAlignTop, arDefault, arSnapToGrid 
  1735.     };
  1736.  
  1737. enum TSearchDirection { sdLeft, sdRight, sdAbove, sdBelow, sdAll };
  1738.  
  1739. enum TItemState { isNone, isCut, isDropHilited, isFocused, isSelected };
  1740.  
  1741. typedef Set<TItemState, isNone, isSelected>  TItemStates;
  1742.  
  1743. class __declspec(pascalimplementation) TCustomListView : public Controls::TWinControl
  1744. {
  1745.     typedef Controls::TWinControl inherited;
  1746.     
  1747. private:
  1748.     TFormBorderStyle FBorderStyle;
  1749.     TViewStyle FViewStyle;
  1750.     bool FReadOnly;
  1751.     Controls::TImageList* FLargeImages;
  1752.     Controls::TImageList* FSmallImages;
  1753.     Controls::TImageList* FStateImages;
  1754.     Controls::TImageList* FDragImage;
  1755.     bool FShareImages;
  1756.     bool FMultiSelect;
  1757.     TSortType FSortType;
  1758.     bool FColumnClick;
  1759.     bool FShowColumnHeaders;
  1760.     TListItems* FListItems;
  1761.     bool FClicked;
  1762.     bool FRClicked;
  1763.     TIconOptions* FIconOptions;
  1764.     bool FHideSelection;
  1765.     TListColumns* FListColumns;
  1766.     Classes::TMemoryStream* FMemStream;
  1767.     void *FEditInstance;
  1768.     void *FDefEditProc;
  1769.     HWND FEditHandle;
  1770.     void *FHeaderInstance;
  1771.     void *FDefHeaderProc;
  1772.     HWND FHeaderHandle;
  1773.     int FAllocBy;
  1774.     int FDragIndex;
  1775.     TListItem* FLastDropTarget;
  1776.     Controls::TChangeLink* FLargeChangeLink;
  1777.     Controls::TChangeLink* FSmallChangeLink;
  1778.     Controls::TChangeLink* FStateChangeLink;
  1779.     TLVChangeEvent FOnChange;
  1780.     TLVChangingEvent FOnChanging;
  1781.     TLVColumnClickEvent FOnColumnClick;
  1782.     TLVDeletedEvent FOnDeletion;
  1783.     TLVEditingEvent FOnEditing;
  1784.     TLVEditedEvent FOnEdited;
  1785.     TLVDeletedEvent FOnInsert;
  1786.     TLVCompareEvent FOnCompare;
  1787.     HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
  1788.     HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
  1789.     HIDESBASE MESSAGE void __fastcall CMDrag(Controls::TCMDrag &Message);
  1790.     HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
  1791.     MESSAGE void __fastcall CNNotify(Messages::TWMNotify &Message);
  1792.     void __fastcall DoDragOver(Controls::TDragObject* Source, int X, int Y);
  1793.     void __fastcall EditWndProc(Messages::TMessage &Message);
  1794.     Windows::TRect __fastcall GetBoundingRect(void);
  1795.     TListColumn* __fastcall GetColumnFromIndex(int Index);
  1796.     TListItem* __fastcall GetDropTarget(void);
  1797.     TListItem* __fastcall GetFocused(void);
  1798.     TListItem* __fastcall GetItem(const LV_ITEMA &Value);
  1799.     int __fastcall GetSelCount(void);
  1800.     TListItem* __fastcall GetSelection(void);
  1801.     TListItem* __fastcall GetTopItem(void);
  1802.     POINT __fastcall GetViewOrigin(void);
  1803.     int __fastcall GetVisibleRowCount(void);
  1804.     void __fastcall HeaderWndProc(Messages::TMessage &Message);
  1805.     void __fastcall ImageListChange(System::TObject* Sender);
  1806.     virtual void __fastcall InsertItem(TListItem* Item);
  1807.     void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
  1808.     void __fastcall SetColumnClick(bool Value);
  1809.     void __fastcall SetColumnHeaders(bool Value);
  1810.     void __fastcall SetDropTarget(TListItem* Value);
  1811.     void __fastcall SetFocused(TListItem* Value);
  1812.     void __fastcall SetHideSelection(bool Value);
  1813.     void __fastcall SetIconArrangement(TIconArrangement Value);
  1814.     void __fastcall SetIconOptions(TIconOptions* Value);
  1815.     void __fastcall SetImageList(int Value, int Flags);
  1816.     void __fastcall SetLargeImages(Controls::TImageList* Value);
  1817.     void __fastcall SetAllocBy(int Value);
  1818.     void __fastcall SetItems(TListItems* Value);
  1819.     void __fastcall SetListColumns(TListColumns* Value);
  1820.     void __fastcall SetMultiSelect(bool Value);
  1821.     void __fastcall SetReadOnly(bool Value);
  1822.     void __fastcall SetSmallImages(Controls::TImageList* Value);
  1823.     void __fastcall SetSortType(TSortType Value);
  1824.     void __fastcall SetSelection(TListItem* Value);
  1825.     void __fastcall SetStateImages(Controls::TImageList* Value);
  1826.     void __fastcall SetTextBkColor(Graphics::TColor Value);
  1827.     void __fastcall SetTextColor(Graphics::TColor Value);
  1828.     void __fastcall SetViewStyle(TViewStyle Value);
  1829.     bool __fastcall ValidHeaderHandle(void);
  1830.     HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
  1831.     HIDESBASE MESSAGE void __fastcall WMNotify(Messages::TWMNotify &Message);
  1832.     HIDESBASE MESSAGE void __fastcall WMParentNotify(Messages::TWMParentNotify &Message);
  1833.     HIDESBASE MESSAGE void __fastcall WMRButtonDown(Messages::TWMMouse &Message);
  1834.     
  1835. protected:
  1836.     virtual bool __fastcall CanChange(TListItem* Item, int Change);
  1837.     virtual bool __fastcall CanEdit(TListItem* Item);
  1838.     virtual void __fastcall Change(TListItem* Item, int Change);
  1839.     virtual void __fastcall ColClick(TListColumn* Column);
  1840.     bool __fastcall ColumnsShowing(void);
  1841.     virtual TListItem* __fastcall CreateListItem(void);
  1842.     virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
  1843.     virtual void __fastcall CreateWnd(void);
  1844.     virtual void __fastcall Delete(TListItem* Item);
  1845.     virtual void __fastcall DestroyWnd(void);
  1846.     HIDESBASE virtual void __fastcall DoEndDrag(System::TObject* Target, int X, int Y);
  1847.     virtual void __fastcall DoStartDrag(Controls::TDragObject* &DragObject);
  1848.     virtual void __fastcall Edit(const LV_ITEMA &Item);
  1849.     virtual Controls::TCustomImageList* __fastcall GetDragImages(void);
  1850.     int __fastcall GetItemIndex(TListItem* Value);
  1851.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  1852.         );
  1853.     void __fastcall UpdateColumn(int Index);
  1854.     void __fastcall UpdateColumns(void);
  1855.     virtual void __fastcall WndProc(Messages::TMessage &Message);
  1856.     __property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
  1857.     __property TListColumns* Columns = {read=FListColumns, write=SetListColumns, nodefault};
  1858.     __property bool ColumnClick = {read=FColumnClick, write=SetColumnClick, default=1};
  1859.     __property bool ReadOnly = {read=FReadOnly, write=SetReadOnly, nodefault};
  1860.     __property bool HideSelection = {read=FHideSelection, write=SetHideSelection, default=1};
  1861.     __property TIconOptions* IconOptions = {read=FIconOptions, write=SetIconOptions, nodefault};
  1862.     __property TListItems* Items = {read=FListItems, write=SetItems, nodefault};
  1863.     __property int AllocBy = {read=FAllocBy, write=SetAllocBy, default=0};
  1864.     __property Controls::TImageList* LargeImages = {read=FLargeImages, write=SetLargeImages, nodefault}
  1865.         ;
  1866.     __property bool MultiSelect = {read=FMultiSelect, write=SetMultiSelect, default=0};
  1867.     __property TLVChangeEvent OnChange = {read=FOnChange, write=FOnChange};
  1868.     __property TLVChangingEvent OnChanging = {read=FOnChanging, write=FOnChanging};
  1869.     __property TLVColumnClickEvent OnColumnClick = {read=FOnColumnClick, write=FOnColumnClick};
  1870.     __property TLVCompareEvent OnCompare = {read=FOnCompare, write=FOnCompare};
  1871.     __property TLVDeletedEvent OnDeletion = {read=FOnDeletion, write=FOnDeletion};
  1872.     __property TLVEditedEvent OnEdited = {read=FOnEdited, write=FOnEdited};
  1873.     __property TLVEditingEvent OnEditing = {read=FOnEditing, write=FOnEditing};
  1874.     __property TLVDeletedEvent OnInsert = {read=FOnInsert, write=FOnInsert};
  1875.     __property bool ShowColumnHeaders = {read=FShowColumnHeaders, write=SetColumnHeaders, default=1};
  1876.     __property Controls::TImageList* SmallImages = {read=FSmallImages, write=SetSmallImages, nodefault}
  1877.         ;
  1878.     __property TSortType SortType = {read=FSortType, write=SetSortType, default=0};
  1879.     __property Controls::TImageList* StateImages = {read=FStateImages, write=SetStateImages, nodefault}
  1880.         ;
  1881.     __property TViewStyle ViewStyle = {read=FViewStyle, write=SetViewStyle, default=0};
  1882.     
  1883. public:
  1884.     __fastcall virtual TCustomListView(Classes::TComponent* AOwner);
  1885.     __fastcall virtual ~TCustomListView(void);
  1886.     bool __fastcall AlphaSort(void);
  1887.     void __fastcall Arrange(TListArrangement Code);
  1888.     TListItem* __fastcall FindCaption(int StartIndex,  System::AnsiString Value, bool Partial, bool Inclusive
  1889.         , bool Wrap);
  1890.     TListItem* __fastcall FindData(int StartIndex, void * Value, bool Inclusive, bool Wrap);
  1891.     TListItem* __fastcall GetItemAt(int X, int Y);
  1892.     TListItem* __fastcall GetNearestItem(const POINT &Point, TSearchDirection Direction);
  1893.     TListItem* __fastcall GetNextItem(TListItem* StartItem, TSearchDirection Direction, TItemStates States
  1894.         );
  1895.     System::AnsiString __fastcall GetSearchString(void);
  1896.     bool __fastcall IsEditing(void);
  1897.     void __fastcall Scroll(int DX, int DY);
  1898.     __property TListColumn* Column[int Index] = {read=GetColumnFromIndex};
  1899.     __property TListItem* DropTarget = {read=GetDropTarget, write=SetDropTarget, nodefault};
  1900.     __property TListItem* ItemFocused = {read=GetFocused, write=SetFocused, nodefault};
  1901.     __property int SelCount = {read=GetSelCount, nodefault};
  1902.     __property TListItem* Selected = {read=GetSelection, write=SetSelection, nodefault};
  1903.     bool __fastcall CustomSort(Commctrl::TLVCompare SortProc, long lParam);
  1904.     int __fastcall StringWidth( System::AnsiString S);
  1905.     void __fastcall UpdateItems(int FirstIndex, int LastIndex);
  1906.     __property TListItem* TopItem = {read=GetTopItem, nodefault};
  1907.     __property POINT ViewOrigin = {read=GetViewOrigin};
  1908.     __property int VisibleRowCount = {read=GetVisibleRowCount, nodefault};
  1909.     __property Windows::TRect BoundingRect = {read=GetBoundingRect};
  1910. public:
  1911.     /* TWinControl.CreateParented */ __fastcall TCustomListView(HWND ParentWindow) : Controls::TWinControl(
  1912.         ParentWindow) { }
  1913.     
  1914. };
  1915.  
  1916. class __declspec(pascalimplementation) TListColumns : public Classes::TCollection
  1917. {
  1918.     typedef Classes::TCollection inherited;
  1919.     
  1920. private:
  1921.     TCustomListView* FOwner;
  1922.     HIDESBASE TListColumn* __fastcall GetItem(int Index);
  1923.     HIDESBASE void __fastcall SetItem(int Index, TListColumn* Value);
  1924.     
  1925. protected:
  1926.     virtual void __fastcall Update(Classes::TCollectionItem* Item);
  1927.     
  1928. public:
  1929.     __fastcall TListColumns(TCustomListView* AOwner);
  1930.     HIDESBASE TListColumn* __fastcall Add(void);
  1931.     __property TCustomListView* Owner = {read=FOwner, nodefault};
  1932.     __property TListColumn* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
  1933. public:
  1934.     /* TCollection.Destroy */ __fastcall virtual ~TListColumns(void) { }
  1935.     
  1936. };
  1937.  
  1938. enum TDisplayCode { drBounds, drIcon, drLabel, drSelectBounds };
  1939.  
  1940. class __declspec(pascalimplementation) TListItem : public Classes::TPersistent
  1941. {
  1942.     typedef Classes::TPersistent inherited;
  1943.     
  1944. private:
  1945.     TListItems* FOwner;
  1946.     Classes::TStrings* FSubItems;
  1947.     void *FData;
  1948.     int FImageIndex;
  1949.     int FOverlayIndex;
  1950.     int FStateIndex;
  1951.     System::AnsiString FCaption;
  1952.     bool FDeleting;
  1953.     bool FProcessedDeleting;
  1954.     HWND __fastcall GetHandle(void);
  1955.     int __fastcall GetIndex(void);
  1956.     TCustomListView* __fastcall GetListView(void);
  1957.     int __fastcall GetLeft(void);
  1958.     bool __fastcall GetState(int Index);
  1959.     int __fastcall GetTop(void);
  1960.     bool __fastcall IsEqual(TListItem* Item);
  1961.     void __fastcall SetCaption(const System::AnsiString Value);
  1962.     void __fastcall SetData(void * Value);
  1963.     void __fastcall SetImage(int Index, int Value);
  1964.     void __fastcall SetLeft(int Value);
  1965.     void __fastcall SetState(int Index, bool State);
  1966.     void __fastcall SetSubItems(Classes::TStrings* Value);
  1967.     void __fastcall SetTop(int Value);
  1968.     
  1969. protected:
  1970.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  1971.     
  1972. public:
  1973.     __fastcall TListItem(TListItems* AOwner);
  1974.     __fastcall virtual ~TListItem(void);
  1975.     void __fastcall CancelEdit(void);
  1976.     void __fastcall Delete(void);
  1977.     Windows::TRect __fastcall DisplayRect(TDisplayCode Code);
  1978.     bool __fastcall EditCaption(void);
  1979.     POINT __fastcall GetPosition(void);
  1980.     void __fastcall MakeVisible(bool PartialOK);
  1981.     void __fastcall Update(void);
  1982.     void __fastcall SetPosition(const POINT &Value);
  1983.     __property System::AnsiString Caption = {read=FCaption, write=SetCaption, nodefault};
  1984.     __property bool Cut = {read=GetState, write=SetState, index=0, nodefault};
  1985.     __property void * Data = {read=FData, write=SetData, nodefault};
  1986.     __property bool DropTarget = {read=GetState, write=SetState, index=1, nodefault};
  1987.     __property bool Focused = {read=GetState, write=SetState, index=2, nodefault};
  1988.     __property HWND Handle = {read=GetHandle, nodefault};
  1989.     __property int ImageIndex = {read=FImageIndex, write=SetImage, index=0, nodefault};
  1990.     __property int Index = {read=GetIndex, nodefault};
  1991.     __property int Left = {read=GetLeft, write=SetLeft, nodefault};
  1992.     __property TCustomListView* ListView = {read=GetListView, nodefault};
  1993.     __property TListItems* Owner = {read=FOwner, nodefault};
  1994.     __property int OverlayIndex = {read=FOverlayIndex, write=SetImage, index=1, nodefault};
  1995.     __property bool Selected = {read=GetState, write=SetState, index=3, nodefault};
  1996.     __property int StateIndex = {read=FStateIndex, write=SetImage, index=2, nodefault};
  1997.     __property Classes::TStrings* SubItems = {read=FSubItems, write=SetSubItems, nodefault};
  1998.     __property int Top = {read=GetTop, write=SetTop, nodefault};
  1999. };
  2000.  
  2001. class __declspec(delphiclass) TListView;
  2002. class __declspec(pascalimplementation) TListView : public TCustomListView
  2003. {
  2004.     typedef TCustomListView inherited;
  2005.     
  2006. __published:
  2007.     __property Align ;
  2008.     __property BorderStyle ;
  2009.     __property Color ;
  2010.     __property ColumnClick ;
  2011.     __property OnClick ;
  2012.     __property OnDblClick ;
  2013.     __property Columns ;
  2014.     __property Ctl3D ;
  2015.     __property DragMode ;
  2016.     __property ReadOnly ;
  2017.     __property Font ;
  2018.     __property HideSelection ;
  2019.     __property IconOptions ;
  2020.     __property Items ;
  2021.     __property AllocBy ;
  2022.     __property MultiSelect ;
  2023.     __property OnChange ;
  2024.     __property OnChanging ;
  2025.     __property OnColumnClick ;
  2026.     __property OnCompare ;
  2027.     __property OnDeletion ;
  2028.     __property OnEdited ;
  2029.     __property OnEditing ;
  2030.     __property OnEnter ;
  2031.     __property OnExit ;
  2032.     __property OnInsert ;
  2033.     __property OnDragDrop ;
  2034.     __property OnDragOver ;
  2035.     __property DragCursor ;
  2036.     __property OnStartDrag ;
  2037.     __property OnEndDrag ;
  2038.     __property OnMouseDown ;
  2039.     __property OnMouseMove ;
  2040.     __property OnMouseUp ;
  2041.     __property ParentShowHint ;
  2042.     __property ShowHint ;
  2043.     __property PopupMenu ;
  2044.     __property ShowColumnHeaders ;
  2045.     __property SortType ;
  2046.     __property TabOrder ;
  2047.     __property TabStop ;
  2048.     __property ViewStyle ;
  2049.     __property Visible ;
  2050.     __property OnKeyDown ;
  2051.     __property OnKeyPress ;
  2052.     __property OnKeyUp ;
  2053.     __property LargeImages ;
  2054.     __property SmallImages ;
  2055.     __property StateImages ;
  2056. public:
  2057.     /* TCustomListView.Create */ __fastcall virtual TListView(Classes::TComponent* AOwner) : Comctrls::
  2058.         TCustomListView(AOwner) { }
  2059.     /* TCustomListView.Destroy */ __fastcall virtual ~TListView(void) { }
  2060.     
  2061. public:
  2062.     /* TWinControl.CreateParented */ __fastcall TListView(HWND ParentWindow) : Comctrls::TCustomListView(
  2063.         ParentWindow) { }
  2064.     
  2065. };
  2066.  
  2067. //-- var, const, procedure ---------------------------------------------------
  2068. #define ColumnHeaderWidth (Shortint)(-2)
  2069. #define ColumnTextWidth (Shortint)(-1)
  2070. //-- template instantiations -------------------------------------------------
  2071. template class TItemStates ;
  2072. template class Classes::TShiftState ;
  2073. template class THKInvalidKeys ;
  2074. template class THKModifiers ;
  2075. template class TSearchTypes ;
  2076. template class TConsistentAttributes ;
  2077. template class THitTests ;
  2078. template class SmallString<255> ;
  2079.  
  2080. }    /* namespace Comctrls */
  2081.  
  2082. #pragma warn .par
  2083. #pragma warn .hid 
  2084. #pragma warn .inl
  2085.  
  2086. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  2087. using namespace Comctrls;
  2088. #endif
  2089. //-- end unit ----------------------------------------------------------------
  2090. #endif    // ComCtrls
  2091.