Zasoby avi w pliku dll

Odpowiedz Nowy wątek
wseia Kielce
2004-01-09 15:58
wseia Kielce
0

Powracam z pytaniem na które od paru miesięcy mi mogę uzyskać odpowiedzi.
Jak mogę odczytać za pomocą komponentu animate delphi7 animację avi z pliku dll. Naprawde bardzo proszę o pomoc albo jakiś kod w którym jest to wykorzystane - namiary.
Dzięki!

Pozostało 580 znaków

2004-01-09 16:47

Rejestracja: 17 lat temu

Ostatnio: 10 lat temu

0

Jaką masz wersje Delphi ? Jezeli Professional albo Enterprise to przejrzyj sobie plik ComCtrls zawierający ten ten komponent - w koncu animacje CommonAVI sa ładowane z shell32.dll więc mozę dojdziesz jak sie to robi (probowałem poprzez załądowanie dynamiczne biblioteki i przypisanie Animate.ResHandle i ResID ale pokazuje sie sie error 'Cannot open AVI').

PS. Jezeli nie masz dostepu do tych wersji Delphi i chcesz zobaczyć ten plik to daj znac :-) .


80% problemów które pojawiają sie na forum w postach rozwiązaliby samodzielnie ich autorzy, gdyby nie mieli internetu...

Pozostało 580 znaków

wseia Kielce
2004-01-12 13:50
wseia Kielce
0

Mi dokładnie wywala ten sam błąd.
Mam D7 Enterprise ale ort! tego pliku, gdzie go szukać?

Pozostało 580 znaków

jarek
2004-01-13 12:48
jarek
0
<ort>Niewiem</ort> ... :-P

Pozostało 580 znaków

2004-01-13 12:55

Rejestracja: 17 lat temu

Ostatnio: 10 lat temu

0

Delphi7\Source\VCL\ComCtrls.pas

Albo prościej - naciskasz ctrl, najeżdzasz w Delphi na deklaracje TAnimation która podświetla sie na niebiesko i klikasz.

[dopisane]

Eeee, to chyba nie jest zbyt dobry pomysł dawanie tego pliku tutaj... Poza tym ja mam ten plik i chciałem Ci tylko pomóc - żebyś wiedział gdzie szukać.


80% problemów które pojawiają sie na forum w postach rozwiązaliby samodzielnie ich autorzy, gdyby nie mieli internetu...

Pozostało 580 znaków

wseia Kielce
2004-01-14 15:32
wseia Kielce
0

Mam ten plik, jak potrafisz z niego coś wyczytać to proszę:

Mam nadzieje że znajdziesz interesujący nas kawałek kodu i dasz znać.

{}
{ }
{ Borland Delphi Visual Component Library }
{ }
{ Copyright (c) 1996-2001 Borland Software Corporation }
{ }
{
}

unit ComCtrls;

{$R-,T-,H+,X+}

interface

uses Messages, Windows, SysUtils, CommCtrl, Controls, Forms, Classes,
Menus, Graphics, StdCtrls, RichEdit, ToolWin, ImgList, ExtCtrls, ListActns;

type
THitTest = (htAbove, htBelow, htNowhere, htOnItem, htOnButton, htOnIcon,
htOnIndent, htOnLabel, htOnRight, htOnStateIcon, htToLeft, htToRight);
THitTests = set of THitTest;

TCustomTabControl = class;

TTabChangingEvent = procedure(Sender: TObject;
var AllowChange: Boolean) of object;

TTabPosition = (tpTop, tpBottom, tpLeft, tpRight);

TTabStyle = (tsTabs, tsButtons, tsFlatButtons);

TDrawTabEvent = procedure(Control: TCustomTabControl; TabIndex: Integer;
const Rect: TRect; Active: Boolean) of object;
TTabGetImageEvent = procedure(Sender: TObject; TabIndex: Integer;
var ImageIndex: Integer) of object;

TCustomTabControl = class(TWinControl)
private
FCanvas: TCanvas;
FHotTrack: Boolean;
FImageChangeLink: TChangeLink;
FImages: TCustomImageList;
FMultiLine: Boolean;
FMultiSelect: Boolean;
FOwnerDraw: Boolean;
FRaggedRight: Boolean;
FSaveTabIndex: Integer;
FSaveTabs: TStringList;
FScrollOpposite: Boolean;
FStyle: TTabStyle;
FTabPosition: TTabPosition;
FTabs: TStrings;
FTabSize: TSmallPoint;
FUpdating: Boolean;
FSavedAdjustRect: TRect;
FOnChange: TNotifyEvent;
FOnChanging: TTabChangingEvent;
FOnDrawTab: TDrawTabEvent;
FOnGetImageIndex: TTabGetImageEvent;
function GetDisplayRect: TRect;
function GetTabIndex: Integer;
procedure ImageListChange(Sender: TObject);
function InternalSetMultiLine(Value: Boolean): Boolean;
procedure SetHotTrack(Value: Boolean);
procedure SetImages(Value: TCustomImageList);
procedure SetMultiLine(Value: Boolean);
procedure SetMultiSelect(Value: Boolean);
procedure SetOwnerDraw(Value: Boolean);
procedure SetRaggedRight(Value: Boolean);
procedure SetScrollOpposite(Value: Boolean);
procedure SetStyle(Value: TTabStyle);
procedure SetTabHeight(Value: Smallint);
procedure SetTabIndex(Value: Integer);
procedure SetTabPosition(Value: TTabPosition);
procedure SetTabs(Value: TStrings);
procedure SetTabWidth(Value: Smallint);
procedure TabsChanged;
procedure UpdateTabSize;
procedure CMFontChanged(var Message); message CM_FONTCHANGED;
procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE;
procedure CMTabStopChanged(var Message: TMessage); message CM_TABSTOPCHANGED;
procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY;
procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR;
procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM;
procedure TCMAdjustRect(var Message: TMessage); message TCM_ADJUSTRECT;
procedure WMDestroy(var Message: TWMDestroy); message WM_DESTROY;
procedure WMNotifyFormat(var Message: TMessage); message WM_NOTIFYFORMAT;
procedure WMSize(var Message: TMessage); message WM_SIZE;
protected
procedure AdjustClientRect(var Rect: TRect); override;
function CanChange: Boolean; dynamic;
function CanShowTab(TabIndex: Integer): Boolean; virtual;
procedure Change; dynamic;
procedure CreateParams(var Params: TCreateParams); override;
procedure CreateWnd; override;
procedure DrawTab(TabIndex: Integer; const Rect: TRect; Active: Boolean); virtual;
function GetImageIndex(TabIndex: Integer): Integer; virtual;
procedure Loaded; override;
procedure UpdateTabImages;
property DisplayRect: TRect read GetDisplayRect;
property HotTrack: Boolean read FHotTrack write SetHotTrack default False;
property Images: TCustomImageList read FImages write SetImages;
property MultiLine: Boolean read FMultiLine write SetMultiLine default False;
property MultiSelect: Boolean read FMultiSelect write SetMultiSelect default False;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
property OwnerDraw: Boolean read FOwnerDraw write SetOwnerDraw default False;
property RaggedRight: Boolean read FRaggedRight write SetRaggedRight default False;
property ScrollOpposite: Boolean read FScrollOpposite
write SetScrollOpposite default False;
property Style: TTabStyle read FStyle write SetStyle default tsTabs;
property TabHeight: Smallint read FTabSize.Y write SetTabHeight default 0;
property TabIndex: Integer read GetTabIndex write SetTabIndex default -1;
property TabPosition: TTabPosition read FTabPosition write SetTabPosition
default tpTop;
property Tabs: TStrings read FTabs write SetTabs;
property TabWidth: Smallint read FTabSize.X write SetTabWidth default 0;
property OnChange: TNotifyEvent read FOnChange write FOnChange;
property OnChanging: TTabChangingEvent read FOnChanging write FOnChanging;
property OnDrawTab: TDrawTabEvent read FOnDrawTab write FOnDrawTab;
property OnGetImageIndex: TTabGetImageEvent read FOnGetImageIndex write FOnGetImageIndex;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function IndexOfTabAt(X, Y: Integer): Integer;
function GetHitTestInfoAt(X, Y: Integer): THitTests;
function TabRect(Index: Integer): TRect;
function RowCount: Integer;
procedure ScrollTabs(Delta: Integer);
property Canvas: TCanvas read FCanvas;
property TabStop default True;
end;

TTabControl = class(TCustomTabControl)
public
property DisplayRect;
published
property Align;
property Anchors;
property BiDiMode;
property Constraints;
property DockSite;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Font;
property HotTrack;
property Images;
property MultiLine;
property MultiSelect;
property OwnerDraw;
property ParentBiDiMode;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property RaggedRight;
property ScrollOpposite;
property ShowHint;
property Style;
property TabHeight;
property TabOrder;
property TabPosition;
property Tabs;
property TabIndex; // must be after Tabs
property TabStop;
property TabWidth;
property Visible;
property OnChange;
property OnChanging;
property OnContextPopup;
property OnDockDrop;
property OnDockOver;
property OnDragDrop;
property OnDragOver;
property OnDrawTab;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnGetImageIndex;
property OnGetSiteInfo;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property OnStartDock;
property OnStartDrag;
property OnUnDock;
end;

TPageControl = class;

TTabSheet = class(TWinControl)
private
FImageIndex: TImageIndex;
FPageControl: TPageControl;
FTabVisible: Boolean;
FTabShowing: Boolean;
FHighlighted: Boolean;
FOnHide: TNotifyEvent;
FOnShow: TNotifyEvent;
function GetPageIndex: Integer;
function GetTabIndex: Integer;
procedure SetHighlighted(Value: Boolean);
procedure SetImageIndex(Value: TImageIndex);
procedure SetPageControl(APageControl: TPageControl);
procedure SetPageIndex(Value: Integer);
procedure SetTabShowing(Value: Boolean);
procedure SetTabVisible(Value: Boolean);
procedure UpdateTabShowing;
procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED;
procedure CMShowingChanged(var Message: TMessage); message CM_SHOWINGCHANGED;
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure DoHide; dynamic;
procedure DoShow; dynamic;
procedure ReadState(Reader: TReader); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property PageControl: TPageControl read FPageControl write SetPageControl;
property TabIndex: Integer read GetTabIndex;
published
property BorderWidth;
property Caption;
property DragMode;
property Enabled;
property Font;
property Height stored False;
property Highlighted: Boolean read FHighlighted write SetHighlighted default False;
property ImageIndex: TImageIndex read FImageIndex write SetImageIndex default 0;
property Left stored False;
property Constraints;
property PageIndex: Integer read GetPageIndex write SetPageIndex stored False;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property TabVisible: Boolean read FTabVisible write SetTabVisible default True;
property Top stored False;
property Visible stored False;
property Width stored False;
property OnContextPopup;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnHide: TNotifyEvent read FOnHide write FOnHide;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property OnShow: TNotifyEvent read FOnShow write FOnShow;
property OnStartDrag;
end;

TPageControl = class(TCustomTabControl)
private
FPages: TList;
FActivePage: TTabSheet;
FNewDockSheet: TTabSheet;
FUndockingPage: TTabSheet;
procedure ChangeActivePage(Page: TTabSheet);
procedure DeleteTab(Page: TTabSheet; Index: Integer);
function GetActivePageIndex: Integer;
function GetDockClientFromMousePos(MousePos: TPoint): TControl;
function GetPage(Index: Integer): TTabSheet;
function GetPageCount: Integer;
procedure InsertPage(Page: TTabSheet);
procedure InsertTab(Page: TTabSheet);
procedure MoveTab(CurIndex, NewIndex: Integer);
procedure RemovePage(Page: TTabSheet);
procedure SetActivePage(Page: TTabSheet);
procedure SetActivePageIndex(const Value: Integer);
procedure UpdateTab(Page: TTabSheet);
procedure UpdateTabHighlights;
procedure CMDesignHitTest(var Message: TCMDesignHitTest); message CM_DESIGNHITTEST;
procedure CMDialogKey(var Message: TCMDialogKey); message CM_DIALOGKEY;
procedure CMDockClient(var Message: TCMDockClient); message CM_DOCKCLIENT;
procedure CMDockNotification(var Message: TCMDockNotification); message CM_DOCKNOTIFICATION;
procedure CMUnDockClient(var Message: TCMUnDockClient); message CM_UNDOCKCLIENT;
procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN;
procedure WMLButtonDblClk(var Message: TWMLButtonDblClk); message WM_LBUTTONDBLCLK;
protected
function CanShowTab(TabIndex: Integer): Boolean; override;
procedure Change; override;
procedure DoAddDockClient(Client: TControl; const ARect: TRect); override;
procedure DockOver(Source: TDragDockObject; X, Y: Integer;
State: TDragState; var Accept: Boolean); override;
procedure DoRemoveDockClient(Client: TControl); override;
procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
function GetImageIndex(TabIndex: Integer): Integer; override;
function GetPageFromDockClient(Client: TControl): TTabSheet;
procedure GetSiteInfo(Client: TControl; var InfluenceRect: TRect;
MousePos: TPoint; var CanDock: Boolean); override;
procedure Loaded; override;
procedure SetChildOrder(Child: TComponent; Order: Integer); override;
procedure ShowControl(AControl: TControl); override;
procedure UpdateActivePage; virtual;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function FindNextPage(CurPage: TTabSheet;
GoForward, CheckTabVisible: Boolean): TTabSheet;
procedure SelectNextPage(GoForward: Boolean; CheckTabVisible: Boolean = True);
property ActivePageIndex: Integer read GetActivePageIndex
write SetActivePageIndex;
property PageCount: Integer read GetPageCount;
property Pages[Index: Integer]: TTabSheet read GetPage;
published
property ActivePage: TTabSheet read FActivePage write SetActivePage;
property Align;
property Anchors;
property BiDiMode;
property Constraints;
property DockSite;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Font;
property HotTrack;
property Images;
property MultiLine;
property OwnerDraw;
property ParentBiDiMode;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property RaggedRight;
property ScrollOpposite;
property ShowHint;
property Style;
property TabHeight;
property TabIndex;
property TabOrder;
property TabPosition;
property TabStop;
property TabWidth;
property Visible;
property OnChange;
property OnChanging;
property OnContextPopup;
property OnDockDrop;
property OnDockOver;
property OnDragDrop;
property OnDragOver;
property OnDrawTab;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnGetImageIndex;
property OnGetSiteInfo;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property OnStartDock;
property OnStartDrag;
property OnUnDock;
end;

{ TCustomStatusBar }

TCustomStatusBar = class;
TStatusPanels = class;
TStatusPanelStyle = (psText, psOwnerDraw);
TStatusPanelBevel = (pbNone, pbLowered, pbRaised);
TStatusPanelClass = class of TStatusPanel;

TStatusPanel = class(TCollectionItem)
private
FText: string;
FWidth: Integer;
FAlignment: TAlignment;
FBevel: TStatusPanelBevel;
FBiDiMode: TBiDiMode;
FParentBiDiMode: Boolean;
FStyle: TStatusPanelStyle;
FUpdateNeeded: Boolean;
procedure SetAlignment(Value: TAlignment);
procedure SetBevel(Value: TStatusPanelBevel);
procedure SetBiDiMode(Value: TBiDiMode);
procedure SetParentBiDiMode(Value: Boolean);
procedure SetStyle(Value: TStatusPanelStyle);
procedure SetText(const Value: string);
procedure SetWidth(Value: Integer);
function IsBiDiModeStored: Boolean;
protected
function GetDisplayName: string; override;
public
constructor Create(Collection: TCollection); override;
procedure Assign(Source: TPersistent); override;
procedure ParentBiDiModeChanged;
function UseRightToLeftAlignment: Boolean;
function UseRightToLeftReading: Boolean;
published
property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
property Bevel: TStatusPanelBevel read FBevel write SetBevel default pbLowered;
property BiDiMode: TBiDiMode read FBiDiMode write SetBiDiMode stored IsBiDiModeStored;
property ParentBiDiMode: Boolean read FParentBiDiMode write SetParentBiDiMode default True;
property Style: TStatusPanelStyle read FStyle write SetStyle default psText;
property Text: string read FText write SetText;
property Width: Integer read FWidth write SetWidth;
end;

TStatusPanels = class(TCollection)
private
FStatusBar: TCustomStatusBar;
function GetItem(Index: Integer): TStatusPanel;
procedure SetItem(Index: Integer; Value: TStatusPanel);
protected
function GetOwner: TPersistent; override;
procedure Update(Item: TCollectionItem); override;
public
constructor Create(StatusBar: TCustomStatusBar);
function Add: TStatusPanel;
function AddItem(Item: TStatusPanel; Index: Integer): TStatusPanel;
function Insert(Index: Integer): TStatusPanel;
property Items[Index: Integer]: TStatusPanel read GetItem write SetItem; default;
end;

TCustomDrawPanelEvent = procedure(StatusBar: TCustomStatusBar; Panel: TStatusPanel;
const Rect: TRect) of object;
TSBCreatePanelClassEvent = procedure(Sender: TCustomStatusBar;
var PanelClass: TStatusPanelClass) of object;

TCustomStatusBar = class(TWinControl)
private
FPanels: TStatusPanels;
FCanvas: TCanvas;
FSimpleText: string;
FSimplePanel: Boolean;
FSizeGrip, FSizeGripValid: Boolean;
FUseSystemFont: Boolean;
FAutoHint: Boolean;
FOnDrawPanel: TCustomDrawPanelEvent;
FOnHint: TNotifyEvent;
FOnCreatePanelClass: TSBCreatePanelClassEvent;
procedure DoRightToLeftAlignment(var Str: string; AAlignment: TAlignment;
ARTLAlignment: Boolean);
procedure SetPanels(Value: TStatusPanels);
procedure SetSimplePanel(Value: Boolean);
procedure UpdateSimpleText;
procedure SetSimpleText(const Value: string);
procedure SetSizeGrip(Value: Boolean);
procedure SyncToSystemFont;
procedure UpdatePanel(Index: Integer; Repaint: Boolean);
procedure UpdatePanels(UpdateRects, UpdateText: Boolean);
procedure CMBiDiModeChanged(var Message: TMessage); message CM_BIDIMODECHANGED;
procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED;
procedure CMParentFontChanged(var Message: TMessage); message CM_PARENTFONTCHANGED;
procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE;
procedure CMWinIniChange(var Message: TMessage); message CM_WININICHANGE;
procedure CMSysFontChanged(var Message: TMessage); message CM_SYSFONTCHANGED;
procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM;
procedure WMGetTextLength(var Message: TWMGetTextLength); message WM_GETTEXTLENGTH;
procedure WMPaint(var Message: TWMPaint); message WM_PAINT;
procedure WMSize(var Message: TWMSize); message WM_SIZE;
procedure SetUseSystemFont(const Value: Boolean);
procedure ValidateSizeGrip(ARecreate: Boolean);
protected
procedure ChangeScale(M, D: Integer); override;
function CreatePanel: TStatusPanel; virtual;
function CreatePanels: TStatusPanels; virtual;
procedure CreateParams(var Params: TCreateParams); override;
procedure CreateWnd; override;
function DoHint: Boolean; virtual;
procedure DrawPanel(Panel: TStatusPanel; const Rect: TRect); dynamic;
function GetPanelClass: TStatusPanelClass; virtual;
function IsFontStored: Boolean;
procedure SetParent(AParent: TWinControl); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function ExecuteAction(Action: TBasicAction): Boolean; override;
procedure FlipChildren(AllLevels: Boolean); override;
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
property Canvas: TCanvas read FCanvas;
property AutoHint: Boolean read FAutoHint write FAutoHint;
property Panels: TStatusPanels read FPanels write SetPanels;
property SimplePanel: Boolean read FSimplePanel write SetSimplePanel;
property SimpleText: string read FSimpleText write SetSimpleText;
property SizeGrip: Boolean read FSizeGrip write SetSizeGrip;
property UseSystemFont: Boolean read FUseSystemFont write SetUseSystemFont;
property OnCreatePanelClass: TSBCreatePanelClassEvent read FOnCreatePanelClass
write FOnCreatePanelClass;
property OnHint: TNotifyEvent read FOnHint write FOnHint;
property OnDrawPanel: TCustomDrawPanelEvent read FOnDrawPanel write FOnDrawPanel;
end;

{ TStatusBar }

TStatusBar = class;

TDrawPanelEvent = procedure(StatusBar: TStatusBar; Panel: TStatusPanel;
const Rect: TRect) of object;

TStatusBar = class(TCustomStatusBar)
private
function GetOnDrawPanel: TDrawPanelEvent;
procedure SetOnDrawPanel(const Value: TDrawPanelEvent);
published
property Action;
property AutoHint default False;
property Align default alBottom;
property Anchors;
property BiDiMode;
property BorderWidth;
property Color default clBtnFace;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Font stored IsFontStored;
property Constraints;
property Panels;
property ParentBiDiMode;
property ParentColor default False;
property ParentFont default False;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property SimplePanel;
property SimpleText;
property SizeGrip default True;
property UseSystemFont default True;
property Visible;
property OnClick;
property OnContextPopup;
property OnCreatePanelClass;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnHint;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
// Required for backwards compatibility with the old event signature
property OnDrawPanel: TDrawPanelEvent read GetOnDrawPanel write SetOnDrawPanel;
property OnResize;
property OnStartDock;
property OnStartDrag;
end;

{ Custom draw }

TCustomDrawTarget = (dtControl, dtItem, dtSubItem);
TCustomDrawStage = (cdPrePaint, cdPostPaint, cdPreErase, cdPostErase);
TCustomDrawState = set of (cdsSelected, cdsGrayed, cdsDisabled, cdsChecked,
cdsFocused, cdsDefault, cdsHot, cdsMarked, cdsIndeterminate);

{ TCustomHeaderControl }

TCustomHeaderControl = class;

{ THeaderControl }

THeaderControl = class;

THeaderSectionStyle = (hsText, hsOwnerDraw);
THeaderSectionClass = class of THeaderSection;

THeaderSection = class(TCollectionItem)
private
FText: string;
FWidth: Integer;
FMinWidth: Integer;
FMaxWidth: Integer;
FAlignment: TAlignment;
FStyle: THeaderSectionStyle;
FAllowClick: Boolean;
FAutoSize: Boolean;
FImageIndex: TImageIndex;
FBiDiMode: TBiDiMode;
FParentBiDiMode: Boolean;
function GetLeft: Integer;
function GetRight: Integer;
function IsBiDiModeStored: Boolean;
procedure SetAlignment(Value: TAlignment);
procedure SetAutoSize(Value: Boolean);
procedure SetBiDiMode(Value: TBiDiMode);
procedure SetMaxWidth(Value: Integer);
procedure SetMinWidth(Value: Integer);
procedure SetParentBiDiMode(Value: Boolean);
procedure SetStyle(Value: THeaderSectionStyle);
procedure SetText(const Value: string);
procedure SetWidth(Value: Integer);
procedure SetImageIndex(const Value: TImageIndex);
protected
function GetDisplayName: string; override;
public
constructor Create(Collection: TCollection); override;
procedure Assign(Source: TPersistent); override;
procedure ParentBiDiModeChanged;
function UseRightToLeftAlignment: Boolean;
function UseRightToLeftReading: Boolean;
property Left: Integer read GetLeft;
property Right: Integer read GetRight;
published
property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
property AllowClick: Boolean read FAllowClick write FAllowClick default True;
property AutoSize: Boolean read FAutoSize write SetAutoSize default False;
property BiDiMode: TBiDiMode read FBiDiMode write SetBiDiMode stored IsBiDiModeStored;
property ImageIndex: TImageIndex read FImageIndex write SetImageIndex;
property MaxWidth: Integer read FMaxWidth write SetMaxWidth default 10000;
property MinWidth: Integer read FMinWidth write SetMinWidth default 0;
property ParentBiDiMode: Boolean read FParentBiDiMode write SetParentBiDiMode default True;
property Style: THeaderSectionStyle read FStyle write SetStyle default hsText;
property Text: string read FText write SetText;
property Width: Integer read FWidth write SetWidth;
end;

THeaderSections = class(TCollection)
private
FHeaderControl: TCustomHeaderControl;
function GetItem(Index: Integer): THeaderSection;
procedure SetItem(Index: Integer; Value: THeaderSection);
protected
function GetOwner: TPersistent; override;
procedure Update(Item: TCollectionItem); override;
public
constructor Create(HeaderControl: TCustomHeaderControl);
function Add: THeaderSection;
function AddItem(Item: THeaderSection; Index: Integer): THeaderSection;
function Insert(Index: Integer): THeaderSection;
property Items[Index: Integer]: THeaderSection read GetItem write SetItem; default;
end;

TSectionTrackState = (tsTrackBegin, tsTrackMove, tsTrackEnd);

TCustomDrawSectionEvent = procedure(HeaderControl: TCustomHeaderControl;
Section: THeaderSection; const Rect: TRect; Pressed: Boolean) of object;
TCustomSectionNotifyEvent = procedure(HeaderControl: TCustomHeaderControl;
Section: THeaderSection) of object;
TCustomSectionTrackEvent = procedure(HeaderControl: TCustomHeaderControl;
Section: THeaderSection; Width: Integer;
State: TSectionTrackState) of object;
TSectionDragEvent = procedure (Sender: TObject; FromSection, ToSection: THeaderSection;
var AllowDrag: Boolean) of object;
TCustomHCCreateSectionClassEvent = procedure(Sender: TCustomHeaderControl;
var SectionClass: THeaderSectionClass) of object;

THeaderStyle = (hsButtons, hsFlat);

TCustomHeaderControl = class(TWinControl)
private
FSections: THeaderSections;
FSectionStream: TMemoryStream;
FUpdatingSectionOrder,
FSectionDragged: Boolean;
FCanvas: TCanvas;
FFromIndex,
FToIndex: Integer;
FFullDrag: Boolean;
FHotTrack: Boolean;
FDragReorder: Boolean;
FImageChangeLink: TChangeLink;
FImages: TCustomImageList;
FStyle: THeaderStyle;
FTrackSection: THeaderSection;
FTrackWidth: Integer;
FTrackPos: TPoint;
FOnDrawSection: TCustomDrawSectionEvent;
FOnSectionClick: TCustomSectionNotifyEvent;
FOnSectionResize: TCustomSectionNotifyEvent;
FOnSectionTrack: TCustomSectionTrackEvent;
FOnSectionDrag: TSectionDragEvent;
FOnSectionEndDrag: TNotifyEvent;
FOnCreateSectionClass: TCustomHCCreateSectionClassEvent;
function DoSectionDrag(FromSection, ToSection: THeaderSection): Boolean;
procedure DoSectionEndDrag;
procedure ImageListChange(Sender: TObject);
procedure SetDragReorder(const Value: Boolean);
procedure SetFullDrag(Value: Boolean);
procedure SetHotTrack(Value: Boolean);
procedure SetSections(Value: THeaderSections);
procedure SetStyle(Value: THeaderStyle);
procedure UpdateItem(Message, Index: Integer);
procedure UpdateSection(Index: Integer);
procedure UpdateSections;
procedure CMBiDiModeChanged(var Message: TMessage); message CM_BIDIMODECHANGED;
procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM;
procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY;
procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN;
procedure WMSize(var Message: TWMSize); message WM_SIZE;
procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED;
protected
function CreateSection: THeaderSection; virtual;
function CreateSections: THeaderSections; virtual;
procedure CreateParams(var Params: TCreateParams); override;
procedure CreateWnd; override;
procedure DestroyWnd; override;
procedure DrawSection(Section: THeaderSection; const Rect: TRect;
Pressed: Boolean); dynamic;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure SectionClick(Section: THeaderSection); dynamic;
procedure SectionDrag(FromSection, ToSection: THeaderSection; var AllowDrag: Boolean); dynamic;
procedure SectionEndDrag; dynamic;
procedure SectionResize(Section: THeaderSection); dynamic;
procedure SectionTrack(Section: THeaderSection; Width: Integer;
State: TSectionTrackState); dynamic;
procedure SetImages(Value: TCustomImageList); virtual;
procedure WndProc(var Message: TMessage); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property Canvas: TCanvas read FCanvas;
procedure FlipChildren(AllLevels: Boolean); override;
published
property Align default alTop;
property Anchors;
property BiDiMode;
property BorderWidth;
property DragCursor;
property DragKind;
property DragMode;
property DragReorder: Boolean read FDragReorder write SetDragReorder;
property FullDrag: Boolean read FFullDrag write SetFullDrag;
property HotTrack: Boolean read FHotTrack write SetHotTrack;
property Enabled;
property Font;
property Images: TCustomImageList read FImages write SetImages;
property Constraints;
property Sections: THeaderSections read FSections write SetSections;
property Style: THeaderStyle read FStyle write SetStyle;
property OnCreateSectionClass: TCustomHCCreateSectionClassEvent read FOnCreateSectionClass
write FOnCreateSectionClass;
property OnDrawSection: TCustomDrawSectionEvent read FOnDrawSection write FOnDrawSection;
property OnSectionClick: TCustomSectionNotifyEvent read FOnSectionClick
write FOnSectionClick;
property OnSectionDrag: TSectionDragEvent read FOnSectionDrag
write FOnSectionDrag;
property OnSectionEndDrag: TNotifyEvent read FOnSectionEndDrag
write FOnSectionEndDrag;
property OnSectionResize: TCustomSectionNotifyEvent read FOnSectionResize
write FOnSectionResize;
property OnSectionTrack: TCustomSectionTrackEvent read FOnSectionTrack
write FOnSectionTrack;
end;

{ THeaderControl }

TDrawSectionEvent = procedure(HeaderControl: THeaderControl;
Section: THeaderSection; const Rect: TRect; Pressed: Boolean) of object;
TSectionNotifyEvent = procedure(HeaderControl: THeaderControl;
Section: THeaderSection) of object;
TSectionTrackEvent = procedure(HeaderControl: THeaderControl;
Section: THeaderSection; Width: Integer;
State: TSectionTrackState) of object;
THCCreateSectionClassEvent = procedure(Sender: THeaderControl;
var SectionClass: THeaderSectionClass) of object;

THeaderControl = class(TCustomHeaderControl)
private
function GetOnDrawSection: TDrawSectionEvent;
function GetOnSectionClick: TSectionNotifyEvent;
function GetOnSectionResize: TSectionNotifyEvent;
function GetOnSectionTrack: TSectionTrackEvent;
procedure SetOnDrawSection(const Value: TDrawSectionEvent);
procedure SetOnSectionClick(const Value: TSectionNotifyEvent);
procedure SetOnSectionResize(const Value: TSectionNotifyEvent);
procedure SetOnSectionTrack(const Value: TSectionTrackEvent);
published
property Align default alTop;
property Anchors;
property BiDiMode;
property BorderWidth;
property DragCursor;
property DragKind;
property DragMode;
property DragReorder;
property Enabled;
property Font;
property FullDrag default True;
property HotTrack default False;
property Images;
property Constraints;
property Sections;
property ShowHint;
property Style default hsButtons;
property ParentBiDiMode;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property Visible;
property OnContextPopup;
property OnCreateSectionClass;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
// Required for backwards compatibility with the old events
property OnDrawSection: TDrawSectionEvent read GetOnDrawSection write SetOnDrawSection;
property OnSectionClick: TSectionNotifyEvent read GetOnSectionClick
write SetOnSectionClick;
property OnSectionResize: TSectionNotifyEvent read GetOnSectionResize
write SetOnSectionResize;
property OnSectionTrack: TSectionTrackEvent read GetOnSectionTrack
write SetOnSectionTrack;
property OnSectionDrag;
property OnSectionEndDrag;
property OnStartDock;
property OnStartDrag;
end;

{ TTreeNode }

TCustomTreeView = class;
TTreeNodes = class;

TNodeState = (nsCut, nsDropHilited, nsFocused, nsSelected, nsExpanded);
TNodeAttachMode = (naAdd, naAddFirst, naAddChild, naAddChildFirst, naInsert);
TAddMode = (taAddFirst, taAdd, taInsert);

PNodeInfo = ^TNodeInfo;
TNodeInfo = packed record
ImageIndex: Integer;
SelectedIndex: Integer;
StateIndex: Integer;
OverlayIndex: Integer;
Data: Pointer;
Count: Integer;
Text: string[255];
end;

TTreeNodeClass = class of TTreeNode;
TTreeNode = class(TPersistent)
private
FOwner: TTreeNodes;
FText: string;
FData: Pointer;
FItemId: HTreeItem;
FImageIndex: TImageIndex;
FSelectedIndex: Integer;
FOverlayIndex: Integer;
FStateIndex: Integer;
FDeleting: Boolean;
FInTree: Boolean;
function CompareCount(CompareMe: Integer): Boolean;
function DoCanExpand(Expand: Boolean): Boolean;
procedure DoExpand(Expand: Boolean);
procedure ExpandItem(Expand: Boolean; Recurse: Boolean);
function GetAbsoluteIndex: Integer;
function GetExpanded: Boolean;
function GetLevel: Integer;
function GetParent: TTreeNode;
function GetChildren: Boolean;
function GetCut: Boolean;
function GetDropTarget: Boolean;
function GetFocused: Boolean;
function GetIndex: Integer;
function GetItem(Index: Integer): TTreeNode;
function GetSelected: Boolean;
function GetCount: Integer;
function GetTreeView: TCustomTreeView;
procedure InternalMove(ParentNode, Node: TTreeNode; HItem: HTreeItem;
AddMode: TAddMode);
function IsEqual(Node: TTreeNode): Boolean;
function IsNodeVisible: Boolean;
procedure ReadData(Stream: TStream; Info: PNodeInfo);
procedure SetChildren(Value: Boolean);
procedure SetCut(Value: Boolean);
procedure SetData(Value: Pointer);
procedure SetDropTarget(Value: Boolean);
procedure SetItem(Index: Integer; Value: TTreeNode);
procedure SetExpanded(Value: Boolean);
procedure SetFocused(Value: Boolean);
procedure SetImageIndex(Value: TImageIndex);
procedure SetOverlayIndex(Value: Integer);
procedure SetSelectedIndex(Value: Integer);
procedure SetSelected(Value: Boolean);
procedure SetStateIndex(Value: Integer);
procedure SetText(const S: string);
procedure WriteData(Stream: TStream; Info: PNodeInfo);
protected
function GetState(NodeState: TNodeState): Boolean;
procedure SetState(NodeState: TNodeState; Value: Boolean);
procedure SetSelectedBit(Value: Boolean);
public
constructor Create(AOwner: TTreeNodes);
destructor Destroy; override;
function AlphaSort(ARecurse: Boolean = False): Boolean;
procedure Assign(Source: TPersistent); override;
procedure Collapse(Recurse: Boolean);
function CustomSort(SortProc: TTVCompare; Data: Longint; ARecurse: Boolean = False): Boolean;
procedure Delete;
procedure DeleteChildren;
function DisplayRect(TextOnly: Boolean): TRect;
function EditText: Boolean;
procedure EndEdit(Cancel: Boolean);
procedure Expand(Recurse: Boolean);
function getFirstChild: TTreeNode; {GetFirstChild conflicts with C++ macro}
function GetHandle: HWND;
function GetLastChild: TTreeNode;
function GetNext: TTreeNode;
function GetNextChild(Value: TTreeNode): TTreeNode;
function getNextSibling: TTreeNode; {GetNextSibling conflicts with C++ macro}
function GetNextVisible: TTreeNode;
function GetPrev: TTreeNode;
function GetPrevChild(Value: TTreeNode): TTreeNode;
function getPrevSibling: TTreeNode; {GetPrevSibling conflicts with a C++ macro}
function GetPrevVisible: TTreeNode;
function HasAsParent(Value: TTreeNode): Boolean;
function IndexOf(Value: TTreeNode): Integer;
procedure MakeVisible;
procedure MoveTo(Destination: TTreeNode; Mode: TNodeAttachMode); virtual;
property AbsoluteIndex: Integer read GetAbsoluteIndex;
function IsFirstNode: Boolean;
property Count: Integer read GetCount;
property Cut: Boolean read GetCut write SetCut;
property Data: Pointer read FData write SetData;
property Deleting: Boolean read FDeleting;
property Focused: Boolean read GetFocused write SetFocused;
property DropTarget: Boolean read GetDropTarget write SetDropTarget;
property Selected: Boolean read GetSelected write SetSelected;
property Expanded: Boolean read GetExpanded write SetExpanded;
property Handle: HWND read GetHandle;
property HasChildren: Boolean read GetChildren write SetChildren;
property ImageIndex: TImageIndex read FImageIndex write SetImageIndex;
property Index: Integer read GetIndex;
property IsVisible: Boolean read IsNodeVisible;
property Item[Index: Integer]: TTreeNode read GetItem write SetItem; default;
property ItemId: HTreeItem read FItemId;
property Level: Integer read GetLevel;
property OverlayIndex: Integer read FOverlayIndex write SetOverlayIndex;
property Owner: TTreeNodes read FOwner;
property Parent: TTreeNode read GetParent;
property SelectedIndex: Integer read FSelectedIndex write SetSelectedIndex;
property StateIndex: Integer read FStateIndex write SetStateIndex;
property Text: string read FText write SetText;
property TreeView: TCustomTreeView read GetTreeView;
end;

{ TTreeNodes }

PNodeCache = ^TNodeCache;
TNodeCache = record
CacheNode: TTreeNode;
CacheIndex: Integer;
end;

TTreeNodes = class(TPersistent)
private
FOwner: TCustomTreeView;
FUpdateCount: Integer;
FNodeCache: TNodeCache;
FReading: Boolean;
procedure AddedNode(Value: TTreeNode);
function GetHandle: HWND;
function GetNodeFromIndex(Index: Integer): TTreeNode;
procedure ReadData(Stream: TStream);
procedure Repaint(Node: TTreeNode);
procedure WriteData(Stream: TStream);
procedure ClearCache;
procedure WriteExpandedState(Stream: TStream);
procedure ReadExpandedState(Stream: TStream);
protected
function AddItem(Parent, Target: HTreeItem; const Item: TTVItem;
AddMode: TAddMode): HTreeItem;
procedure DefineProperties(Filer: TFiler); override;
function CreateItem(Node: TTreeNode): TTVItem;
function GetCount: Integer;
procedure SetItem(Index: Integer; Value: TTreeNode);
procedure SetUpdateState(Updating: Boolean);
property Reading: Boolean read FReading;
public
constructor Create(AOwner: TCustomTreeView);
destructor Destroy; override;
function AddChildFirst(Parent: TTreeNode; const S: string): TTreeNode;
function AddChild(Parent: TTreeNode; const S: string): TTreeNode;
function AddChildObjectFirst(Parent: TTreeNode; const S: string;
Ptr: Pointer): TTreeNode;
function AddChildObject(Parent: TTreeNode; const S: string;
Ptr: Pointer): TTreeNode;
function AddFirst(Sibling: TTreeNode; const S: string): TTreeNode;
function Add(Sibling: TTreeNode; const S: string): TTreeNode;
function AddObjectFirst(Sibling: TTreeNode; const S: string;
Ptr: Pointer): TTreeNode;
function AddObject(Sibling: TTreeNode; const S: string;
Ptr: Pointer): TTreeNode;
function AddNode(Node, Relative: TTreeNode; const S: string;
Ptr: Pointer; Method: TNodeAttachMode): TTreeNode;
function AlphaSort(ARecurse: Boolean = False): Boolean;
procedure Assign(Source: TPersistent); override;
procedure BeginUpdate;
procedure Clear;
function CustomSort(SortProc: TTVCompare; Data: Longint; ARecurse: Boolean = False): Boolean;
procedure Delete(Node: TTreeNode);
procedure EndUpdate;
function GetFirstNode: TTreeNode;
function GetNode(ItemId: HTreeItem): TTreeNode;
function Insert(Sibling: TTreeNode; const S: string): TTreeNode;
function InsertObject(Sibling: TTreeNode; const S: string;
Ptr: Pointer): TTreeNode;
function InsertNode(Node, Sibling: TTreeNode; const S: string;
Ptr: Pointer): TTreeNode;
property Count: Integer read GetCount;
property Handle: HWND read GetHandle;
property Item[Index: Integer]: TTreeNode read GetNodeFromIndex; default;
property Owner: TCustomTreeView read FOwner;
end;

{ TCustomTreeView }

TSortType = (stNone, stData, stText, stBoth);
TMultiSelectStyles = (msControlSelect, msShiftSelect,
msVisibleOnly, msSiblingOnly);
TMultiSelectStyle = set of TMultiSelectStyles;
ETreeViewError = class(Exception);

TTVChangingEvent = procedure(Sender: TObject; Node: TTreeNode;
var AllowChange: Boolean) of object;
TTVChangedEvent = procedure(Sender: TObject; Node: TTreeNode) of object;
TTVEditingEvent = procedure(Sender: TObject; Node: TTreeNode;
var AllowEdit: Boolean) of object;
TTVEditedEvent = procedure(Sender: TObject; Node: TTreeNode; var S: string) of object;
TTVExpandingEvent = procedure(Sender: TObject; Node: TTreeNode;
var AllowExpansion: Boolean) of object;
TTVCollapsingEvent = procedure(Sender: TObject; Node: TTreeNode;
var AllowCollapse: Boolean) of object;
TTVExpandedEvent = procedure(Sender: TObject; Node: TTreeNode) of object;
TTVCompareEvent = procedure(Sender: TObject; Node1, Node2: TTreeNode;
Data: Integer; var Compare: Integer) of object;
TTVCustomDrawEvent = procedure(Sender: TCustomTreeView; const ARect: TRect;
var DefaultDraw: Boolean) of object;
TTVCustomDrawItemEvent = procedure(Sender: TCustomTreeView; Node: TTreeNode;
State: TCustomDrawState; var DefaultDraw: Boolean) of object;
TTVAdvancedCustomDrawEvent = procedure(Sender: TCustomTreeView; const ARect: TRect;
Stage: TCustomDrawStage; var DefaultDraw: Boolean) of object;
TTVAdvancedCustomDrawItemEvent = procedure(Sender: TCustomTreeView; Node: TTreeNode;
State: TCustomDrawState; Stage: TCustomDrawStage; var PaintImages,
DefaultDraw: Boolean) of object;
TTVCreateNodeClassEvent = procedure(Sender: TCustomTreeView;
var NodeClass: TTreeNodeClass) of object;

TCustomTreeView = class(TWinControl)
private
FAutoExpand: Boolean;
FBorderStyle: TBorderStyle;
FCanvas: TCanvas;
FCanvasChanged: Boolean;
FDefEditProc: Pointer;
FDragged: Boolean;
FDragImage: TDragImageList;
FDragNode: TTreeNode;
FEditHandle: HWND;
FEditInstance: Pointer;
FHideSelection: Boolean;
FHotTrack: Boolean;
FImageChangeLink: TChangeLink;
FImages: TCustomImageList;
FLastDropTarget: TTreeNode;
FMemStream: TMemoryStream;
FRClickNode: TTreeNode;
FRightClickSelect: Boolean;
FManualNotify: Boolean;
FReadOnly: Boolean;
FRowSelect: Boolean;
FSaveIndex: Integer;
FSaveIndent: Integer;
FSaveItems: TStringList;
FSaveTopIndex: Integer;
FShowButtons: Boolean;
FShowLines: Boolean;
FShowRoot: Boolean;
FSortType: TSortType;
FStateChanging: Boolean;
FStateImages: TCustomImageList;
FStateChangeLink: TChangeLink;
FToolTips: Boolean;
FTreeNodes: TTreeNodes;
FWideText: WideString;
FMultiSelect: Boolean;
FMultiSelectStyle: TMultiSelectStyle;
FSelections: TList;
FSaveIndexes: TList;
FShiftAnchor: TTreeNode;
FSelecting, FSelectChanged: Boolean;
FOurFont: Integer;
FStockFont: Integer;
FCreateWndRestores: Boolean;
FOnAdvancedCustomDraw: TTVAdvancedCustomDrawEvent;
FOnAdvancedCustomDrawItem: TTVAdvancedCustomDrawItemEvent;
FOnCancelEdit: TTVChangedEvent;
FOnChange: TTVChangedEvent;
FOnChanging: TTVChangingEvent;
FOnCollapsed: TTVExpandedEvent;
FOnCollapsing: TTVCollapsingEvent;
FOnCompare: TTVCompareEvent;
FOnCustomDraw: TTVCustomDrawEvent;
FOnCustomDrawItem: TTVCustomDrawItemEvent;
FOnDeletion: TTVExpandedEvent;
FOnAddition: TTVExpandedEvent;
FOnEditing: TTVEditingEvent;
FOnEdited: TTVEditedEvent;
FOnExpanded: TTVExpandedEvent;
FOnExpanding: TTVExpandingEvent;
FOnGetImageIndex: TTVExpandedEvent;
FOnGetSelectedIndex: TTVExpandedEvent;
FOnCreateNodeClass: TTVCreateNodeClassEvent;
procedure CanvasChanged(Sender: TObject);
procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED;
procedure CMCtl3DChanged(var Message: TMessage); message CM_CTL3DCHANGED;
procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED;
procedure CMDrag(var Message: TCMDrag); message CM_DRAG;
procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY;
procedure EditWndProc(var Message: TMessage);
procedure DoDragOver(Source: TDragObject; X, Y: Integer; CanDrop: Boolean);
procedure NodeDeselect(Index: Integer);
procedure NodeSelect(Node: TTreeNode; At: Integer = 0);
procedure FinishSelection(Node: TTreeNode; ShiftState: TShiftState);
procedure ControlSelectNode(Node: TTreeNode);
procedure ShiftSelectNode(Node: TTreeNode; Backward: Boolean; Deselect: Boolean = True);
procedure ControlShiftSelectNode(Node: TTreeNode; Backward: Boolean);
procedure SelectNode(Node: TTreeNode);
function GetChangeDelay: Integer;
function GetDropTarget: TTreeNode;
function GetIndent: Integer;
function GetNodeFromItem(const Item: TTVItem): TTreeNode;
function GetSelected: TTreeNode;
function GetSelectionCount: Cardinal;
function GetSelection(Index: Integer): TTreeNode;
function GetTopItem: TTreeNode;
procedure ImageListChange(Sender: TObject);
procedure SetAutoExpand(Value: Boolean);
procedure SetBorderStyle(Value: TBorderStyle);
procedure SetButtonStyle(Value: Boolean);
procedure SetChangeDelay(Value: Integer);
procedure SetDropTarget(Value: TTreeNode);
procedure SetHideSelection(Value: Boolean);
procedure SetHotTrack(Value: Boolean);
procedure SetImageList(Value: HImageList; Flags: Integer);
procedure SetIndent(Value: Integer);
procedure SetImages(Value: TCustomImageList);
procedure SetLineStyle(Value: Boolean);
procedure SetMultiSelect(const Value: Boolean);
procedure SetMultiSelectStyle(const Value: TMultiSelectStyle);
procedure SetReadOnly(Value: Boolean);
procedure SetRootStyle(Value: Boolean);
procedure SetRowSelect(Value: Boolean);
procedure SetSelected(Value: TTreeNode);
procedure SetSortType(Value: TSortType);
procedure SetStateImages(Value: TCustomImageList);
procedure SetToolTips(Value: Boolean);
procedure SetTreeNodes(Value: TTreeNodes);
procedure SetTopItem(Value: TTreeNode);
procedure OnChangeTimer(Sender: TObject);
procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN;
procedure WMNotify(var Message: TWMNotify); message WM_NOTIFY;
procedure WMContextMenu(var Message: TWMContextMenu); message WM_CONTEXTMENU;
procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE;
protected
FChangeTimer: TTimer;
function CanEdit(Node: TTreeNode): Boolean; dynamic;
function CanChange(Node: TTreeNode): Boolean; dynamic;
function CanCollapse(Node: TTreeNode): Boolean; dynamic;
function CanExpand(Node: TTreeNode): Boolean; dynamic;
procedure Change(Node: TTreeNode); dynamic;
procedure Collapse(Node: TTreeNode); dynamic;
function CreateNode: TTreeNode; virtual;
function CreateNodes: TTreeNodes; virtual;
procedure CreateParams(var Params: TCreateParams); override;
procedure CreateWnd; override;
function CustomDraw(const ARect: TRect; Stage: TCustomDrawStage): Boolean; virtual;
function CustomDrawItem(Node: TTreeNode; State: TCustomDrawState;
Stage: TCustomDrawStage; var PaintImages: Boolean): Boolean; virtual;
procedure Delete(Node: TTreeNode); dynamic;
procedure Added(Node: TTreeNode); dynamic;
procedure DestroyWnd; override;
procedure DoEndDrag(Target: TObject; X, Y: Integer); override;
procedure DoStartDrag(var DragObject: TDragObject); override;
procedure Edit(const Item: TTVItem); dynamic;
procedure Expand(Node: TTreeNode); dynamic;
function GetDragImages: TDragImageList; override;
procedure GetImageIndex(Node: TTreeNode); virtual;
procedure GetSelectedIndex(Node: TTreeNode); virtual;
function IsCustomDrawn(Target: TCustomDrawTarget; Stage: TCustomDrawStage): Boolean; virtual;
procedure Loaded; override;
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
procedure SetDragMode(Value: TDragMode); override;
procedure WndProc(var Message: TMessage); override;
procedure ValidateSelection;
procedure InvalidateSelectionsRects;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure DoEnter; override;
procedure DoExit; override;
property AutoExpand: Boolean read FAutoExpand write SetAutoExpand default False;
property BorderStyle: TBorderStyle read FBorderStyle write SetBorderStyle default bsSingle;
property ChangeDelay: Integer read GetChangeDelay write SetChangeDelay default 0;
property CreateWndRestores: Boolean read FCreateWndRestores write FCreateWndRestores default True;
property HideSelection: Boolean read FHideSelection write SetHideSelection default True;
property HotTrack: Boolean read FHotTrack write SetHotTrack default False;
property Images: TCustomImageList read FImages write SetImages;
property Indent: Integer read GetIndent write SetIndent;
property Items: TTreeNodes read FTreeNodes write SetTreeNodes;
property MultiSelect: Boolean read FMultiSelect write SetMultiSelect default False;
property MultiSelectStyle: TMultiSelectStyle read FMultiSelectStyle write SetMultiSelectStyle default [msControlSelect];
property ReadOnly: Boolean read FReadOnly write SetReadOnly default False;
property RightClickSelect: Boolean read FRightClickSelect write FRightClickSelect default False;
property RowSelect: Boolean read FRowSelect write SetRowSelect default False;
property ShowButtons: Boolean read FShowButtons write SetButtonStyle default True;
property ShowLines: Boolean read FShowLines write SetLineStyle default True;
property ShowRoot: Boolean read FShowRoot write SetRootStyle default True;
property SortType: TSortType read FSortType write SetSortType default stNone;
property StateImages: TCustomImageList read FStateImages write SetStateImages;
property ToolTips: Boolean read FToolTips write SetToolTips default True;
property OnAddition: TTVExpandedEvent read FOnAddition write FOnAddition;
property OnAdvancedCustomDraw: TTVAdvancedCustomDrawEvent read FOnAdvancedCustomDraw write FOnAdvancedCustomDraw;
property OnAdvancedCustomDrawItem: TTVAdvancedCustomDrawItemEvent read FOnAdvancedCustomDrawItem write FOnAdvancedCustomDrawItem;
property OnCancelEdit: TTVChangedEvent read FOnCancelEdit write FOnCancelEdit;
property OnChange: TTVChangedEvent read FOnChange write FOnChange;
property OnChanging: TTVChangingEvent read FOnChanging write FOnChanging;
property OnCollapsed: TTVExpandedEvent read FOnCollapsed write FOnCollapsed;
property OnCollapsing: TTVCollapsingEvent read FOnCollapsing write FOnCollapsing;
property OnCompare: TTVCompareEvent read FOnCompare write FOnCompare;
property OnCustomDraw: TTVCustomDrawEvent read FOnCustomDraw write FOnCustomDraw;
property OnCustomDrawItem: TTVCustomDrawItemEvent read FOnCustomDrawItem write FOnCustomDrawItem;
property OnDeletion: TTVExpandedEvent read FOnDeletion write FOnDeletion;
property OnEditing: TTVEditingEvent read FOnEditing write FOnEditing;
property OnEdited: TTVEditedEvent read FOnEdited write FOnEdited;
property OnExpanding: TTVExpandingEvent read FOnExpanding write FOnExpanding;
property OnExpanded: TTVExpandedEvent read FOnExpanded write FOnExpanded;
property OnGetImageIndex: TTVExpandedEvent read FOnGetImageIndex write FOnGetImageIndex;
property OnGetSelectedIndex: TTVExpandedEvent read FOnGetSelectedIndex write FOnGetSelectedIndex;
property OnCreateNodeClass: TTVCreateNodeClassEvent read FOnCreateNodeClass write FOnCreateNodeClass;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function AlphaSort(ARecurse: Boolean = True): Boolean;
function CustomSort(SortProc: TTVCompare; Data: Longint; ARecurse: Boolean = True): Boolean;
procedure FullCollapse;
procedure FullExpand;
function GetHitTestInfoAt(X, Y: Integer): THitTests;
function GetNodeAt(X, Y: Integer): TTreeNode;
function IsEditing: Boolean;
procedure LoadFromFile(const FileName: string);
procedure LoadFromStream(Stream: TStream);
procedure SaveToFile(const FileName: string);
procedure SaveToStream(Stream: TStream);
property Canvas: TCanvas read FCanvas;
property DropTarget: TTreeNode read GetDropTarget write SetDropTarget;
property Selected: TTreeNode read GetSelected write SetSelected;
property TopItem: TTreeNode read GetTopItem write SetTopItem;

procedure Select(Node: TTreeNode; ShiftState: TShiftState = []); overload; virtual;
procedure Select(const Nodes: array of TTreeNode); overload; virtual;
procedure Select(Nodes: TList); overload; virtual;
procedure Deselect(Node: TTreeNode); virtual;
procedure Subselect(Node: TTreeNode; Validate: Boolean = False); virtual;
property SelectionCount: Cardinal read GetSelectionCount;
property Selections[Index: Integer]: TTreeNode read GetSelection;
procedure ClearSelection(KeepPrimary: Boolean = False); virtual;
function GetSelections(AList: TList): TTreeNode;
function FindNextToSelect: TTreeNode; virtual;

end;

TTreeView = class(TCustomTreeView)
published
property Align;
property Anchors;
property AutoExpand;
property BevelEdges;
property BevelInner;
property BevelOuter;
property BevelKind default bkNone;
property BevelWidth;
property BiDiMode;
property BorderStyle;
property BorderWidth;
property ChangeDelay;
property Color;
property Ctl3D;
property Constraints;
property DragKind;
property DragCursor;
property DragMode;
property Enabled;
property Font;
property HideSelection;
property HotTrack;
property Images;
property Indent;
property MultiSelect;
property MultiSelectStyle;
property ParentBiDiMode;
property ParentColor default False;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ReadOnly;
property RightClickSelect;
property RowSelect;
property ShowButtons;
property ShowHint;
property ShowLines;
property ShowRoot;
property SortType;
property StateImages;
property TabOrder;
property TabStop default True;
property ToolTips;
property Visible;
property OnAddition;
property OnAdvancedCustomDraw;
property OnAdvancedCustomDrawItem;
property OnChange;
property OnChanging;
property OnClick;
property OnCollapsed;
property OnCollapsing;
property OnCompare;
property OnContextPopup;
property OnCreateNodeClass;
property OnCustomDraw;
property OnCustomDrawItem;
property OnDblClick;
property OnDeletion;
property OnDragDrop;
property OnDragOver;
property OnEdited;
property OnEditing;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnExpanding;
property OnExpanded;
property OnGetImageIndex;
property OnGetSelectedIndex;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnStartDock;
property OnStartDrag;
{ Items must be published after OnGetImageIndex and OnGetSelectedIndex }
property Items;
end;

{ TTrackBar }

TTrackBarOrientation = (trHorizontal, trVertical);
TTickMark = (tmBottomRight, tmTopLeft, tmBoth);
TTickStyle = (tsNone, tsAuto, tsManual);

TTrackBar = class(TWinControl)
private
FOrientation: TTrackBarOrientation;
FTickMarks: TTickMark;
FTickStyle: TTickStyle;
FLineSize: Integer;
FPageSize: Integer;
FThumbLength: Integer;
FSliderVisible: Boolean;
FMin: Integer;
FMax: Integer;
FFrequency: Integer;
FPosition: Integer;
FSelStart: Integer;
FSelEnd: Integer;
FOnChange: TNotifyEvent;
function GetThumbLength: Integer;
procedure SetOrientation(Value: TTrackBarOrientation);
procedure SetParams(APosition, AMin, AMax: Integer);
procedure SetPosition(Value: Integer);
procedure SetMin(Value: Integer);
procedure SetMax(Value: Integer);
procedure SetFrequency(Value: Integer);
procedure SetTickStyle(Value: TTickStyle);
procedure SetTickMarks(Value: TTickMark);
procedure SetLineSize(Value: Integer);
procedure SetPageSize(Value: Integer);
procedure SetThumbLength(Value: Integer);
procedure SetSliderVisible(Value: Boolean);
procedure SetSelStart(Value: Integer);
procedure SetSelEnd(Value: Integer);
procedure UpdateSelection;
procedure CNHScroll(var Message: TWMHScroll); message CN_HSCROLL;
procedure CNVScroll(var Message: TWMVScroll); message CN_VSCROLL;
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure CreateWnd; override;
procedure DestroyWnd; override;
procedure Changed; dynamic;
public
constructor Create(AOwner: TComponent); override;
procedure SetTick(Value: Integer);
published
property Align;
property Anchors;
property BorderWidth;
property Ctl3D;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Constraints;
property LineSize: Integer read FLineSize write SetLineSize default 1;
property Max: Integer read FMax write SetMax default 10;
property Min: Integer read FMin write SetMin default 0;
property Orientation: TTrackBarOrientation read FOrientation write SetOrientation;
property ParentCtl3D;
property ParentShowHint;
property PageSize: Integer read FPageSize write SetPageSize default 2;
property PopupMenu;
property Frequency: Integer read FFrequency write SetFrequency;
property Position: Integer read FPosition write SetPosition;
property SliderVisible: Boolean read FSliderVisible write SetSliderVisible default True;
property SelEnd: Integer read FSelEnd write SetSelEnd;
property SelStart: Integer read FSelStart write SetSelStart;
property ShowHint;
property TabOrder;
property TabStop default True;
property ThumbLength: Integer read GetThumbLength write SetThumbLength default 20;
property TickMarks: TTickMark read FTickMarks write SetTickMarks;
property TickStyle: TTickStyle read FTickStyle write SetTickStyle;
property Visible;
property OnContextPopup;
property OnChange: TNotifyEvent read FOnChange write FOnChange;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnStartDock;
property OnStartDrag;
end;

{ TProgressBar }

TProgressRange = Integer; // for backward compatibility

TProgressBarOrientation = (pbHorizontal, pbVertical);

TProgressBar = class(TWinControl)
private
F32BitMode: Boolean;
FMin: Integer;
FMax: Integer;
FPosition: Integer;
FStep: Integer;
FOrientation: TProgressBarOrientation;
FSmooth: Boolean;
function GetMin: Integer;
function GetMax: Integer;
function GetPosition: Integer;
procedure SetParams(AMin, AMax: Integer);
procedure SetMin(Value: Integer);
procedure SetMax(Value: Integer);
procedure SetPosition(Value: Integer);
procedure SetStep(Value: Integer);
procedure SetOrientation(Value: TProgressBarOrientation);
procedure SetSmooth(Value: Boolean);
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure CreateWnd; override;
procedure DestroyWnd; override;
public
constructor Create(AOwner: TComponent); override;
procedure StepIt;
procedure StepBy(Delta: Integer);
published
property Align;
property Anchors;
property BorderWidth;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Hint;
property Constraints;
property Min: Integer read GetMin write SetMin;
property Max: Integer read GetMax write SetMax;
property Orientation: TProgressBarOrientation read FOrientation
write SetOrientation default pbHorizontal;
property ParentShowHint;
property PopupMenu;
property Position: Integer read GetPosition write SetPosition default 0;
property Smooth: Boolean read FSmooth write SetSmooth default False;
property Step: Integer read FStep write SetStep default 10;
property ShowHint;
property TabOrder;
property TabStop;
property Visible;
property OnContextPopup;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnStartDock;
property OnStartDrag;
end;

{ TTextAttributes }

TCustomRichEdit = class;

TAttributeType = (atSelected, atDefaultText);
TConsistentAttribute = (caBold, caColor, caFace, caItalic,
caSize, caStrikeOut, caUnderline, caProtected);
TConsistentAttributes = set of TConsistentAttribute;

TTextAttributes = class(TPersistent)
private
RichEdit: TCustomRichEdit;
FType: TAttributeType;
procedure GetAttributes(var Format: TCharFormat);
function GetCharset: TFontCharset;
function GetColor: TColor;
function GetConsistentAttributes: TConsistentAttributes;
function GetHeight: Integer;
function GetName: TFontName;
function GetPitch: TFontPitch;
function GetProtected: Boolean;
function GetSize: Integer;
function GetStyle: TFontStyles;
procedure SetAttributes(var Format: TCharFormat);
procedure SetCharset(Value: TFontCharset);
procedure SetColor(Value: TColor);
procedure SetHeight(Value: Integer);
procedure SetName(Value: TFontName);
procedure SetPitch(Value: TFontPitch);
procedure SetProtected(Value: Boolean);
procedure SetSize(Value: Integer);
procedure SetStyle(Value: TFontStyles);
protected
procedure InitFormat(var Format: TCharFormat);
procedure AssignTo(Dest: TPersistent); override;
public
constructor Create(AOwner: TCustomRichEdit; AttributeType: TAttributeType);
procedure Assign(Source: TPersistent); override;
property Charset: TFontCharset read GetCharset write SetCharset;
property Color: TColor read GetColor write SetColor;
property ConsistentAttributes: TConsistentAttributes read GetConsistentAttributes;
property Name: TFontName read GetName write SetName;
property Pitch: TFontPitch read GetPitch write SetPitch;
property Protected: Boolean read GetProtected write SetProtected;
property Size: Integer read GetSize write SetSize;
property Style: TFontStyles read GetStyle write SetStyle;
property Height: Integer read GetHeight write SetHeight;
end;

{ TParaAttributes }

TNumberingStyle = (nsNone, nsBullet);

TParaAttributes = class(TPersistent)
private
RichEdit: TCustomRichEdit;
procedure GetAttributes(var Paragraph: TParaFormat);
function GetAlignment: TAlignment;
function GetFirstIndent: Longint;
function GetLeftIndent: Longint;

Pozostało 580 znaków

Odpowiedz

1 użytkowników online, w tym zalogowanych: 0, gości: 1, botów: 0