home *** CD-ROM | disk | FTP | other *** search
- {*******************************************************}
- { }
- { Delphi Visual Component Library }
- { }
- { Copyright (c) 1995 Borland International }
- { }
- {*******************************************************}
-
- unit ExtCtrls;
-
- {$S-,W-,R-}
- {$C PRELOAD}
-
- interface
-
- uses WinTypes, WinProcs, Messages, SysUtils, Classes, Controls, Forms, Menus,
- Graphics, StdCtrls;
-
- type
-
- TShapeType = (stRectangle, stSquare, stRoundRect, stRoundSquare,
- stEllipse, stCircle);
-
- TShape = class(TGraphicControl)
- protected
- procedure Paint; override;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- published
- procedure StyleChanged(Sender: TObject);
- property Brush: TBrush;
- property DragCursor;
- property DragMode;
- property Enabled;
- property ParentShowHint;
- property Pen: TPen;
- property Shape: TShapeType default stRectangle;
- property ShowHint;
- property Visible;
- property OnDragDrop;
- property OnDragOver;
- property OnEndDrag;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- end;
-
- TPaintBox = class(TGraphicControl)
- protected
- procedure Paint; override;
- public
- constructor Create(AOwner: TComponent); override;
- property Canvas;
- published
- property Align;
- property Color;
- property DragCursor;
- property DragMode;
- property Enabled;
- property Font;
- property ParentColor;
- property ParentFont;
- property ParentShowHint;
- property PopupMenu;
- property ShowHint;
- property Visible;
- property OnClick;
- property OnDblClick;
- property OnDragDrop;
- property OnDragOver;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- property OnPaint: TNotifyEvent;
- end;
-
- TImage = class(TGraphicControl)
- protected
- function GetPalette: HPALETTE; override;
- procedure Paint; override;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- property Canvas: TCanvas;
- published
- property Align;
- property AutoSize: Boolean default False;
- property Center: Boolean default False;
- property DragCursor;
- property DragMode;
- property Enabled;
- property ParentShowHint;
- property Picture: TPicture;
- property PopupMenu;
- property ShowHint;
- property Stretch: Boolean default False;
- property Visible;
- property OnClick;
- property OnDblClick;
- property OnDragDrop;
- property OnDragOver;
- property OnEndDrag;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- end;
-
- TBevelStyle = (bsLowered, bsRaised);
- TBevelShape = (bsBox, bsFrame, bsTopLine, bsBottomLine, bsLeftLine,
- bsRightLine);
-
- TBevel = class(TGraphicControl)
- protected
- procedure Paint; override;
- public
- constructor Create(AOwner: TComponent); override;
- published
- property Align;
- property ParentShowHint;
- property Shape: TBevelShape default bsBox;
- property ShowHint;
- property Style: TBevelStyle default bsLowered;
- property Visible;
- end;
-
- TTimer = class(TComponent)
- protected
- procedure Timer; dynamic;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- published
- property Enabled: Boolean default True;
- property Interval: Word default 1000;
- property OnTimer: TNotifyEvent;
- end;
-
- TPanelBevel = (bvNone, bvLowered, bvRaised);
- TBevelWidth = 1..MaxInt;
- TBorderWidth = 0..MaxInt;
-
- TCustomPanel = class(TCustomControl)
- protected
- procedure CreateParams(var Params: TCreateParams); override;
- procedure AlignControls(AControl: TControl; var Rect: TRect); override;
- procedure DefineProperties(Filer: TFiler); override;
- procedure Paint; override;
- procedure Resize; dynamic;
- property Alignment: TAlignment default taCenter;
- property BevelInner: TPanelBevel default bvNone;
- property BevelOuter: TPanelBevel default bvRaised;
- property BevelWidth: TBevelWidth default 1;
- property BorderWidth: TBorderWidth default 0;
- property BorderStyle: TBorderStyle default bsNone;
- property Color default clBtnFace;
- property Locked: Boolean default False;
- property ParentColor default False;
- property OnResize: TNotifyEvent;
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
- TPanel = class(TCustomPanel)
- published
- property Align;
- property Alignment;
- property BevelInner;
- property BevelOuter;
- property BevelWidth;
- property BorderWidth;
- property BorderStyle;
- property DragCursor;
- property DragMode;
- property Enabled;
- property Caption;
- property Color;
- property Ctl3D;
- property Font;
- property Locked;
- property ParentColor;
- property ParentCtl3D;
- property ParentFont;
- property ParentShowHint;
- property PopupMenu;
- property ShowHint;
- property TabOrder;
- property TabStop;
- property Visible;
- property OnClick;
- property OnDblClick;
- property OnDragDrop;
- property OnDragOver;
- property OnEndDrag;
- property OnEnter;
- property OnExit;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- property OnResize;
- end;
-
- TNotebook = class(TCustomControl)
- protected
- procedure CreateParams(var Params: TCreateParams); override;
- procedure ReadState(Reader: TReader); override;
- procedure ShowControl(AControl: TControl); override;
- procedure WriteComponents(Writer: TWriter); override;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- published
- property ActivePage: string;
- property Align;
- property Color;
- property Ctl3D;
- property DragCursor;
- property DragMode;
- property Font;
- property Enabled;
- property PageIndex: Integer default 0;
- property Pages: TStrings;
- property ParentColor;
- property ParentCtl3D;
- property ParentFont;
- property ParentShowHint;
- property PopupMenu;
- property ShowHint;
- property TabOrder;
- property TabStop;
- property Visible;
- property OnClick;
- property OnDblClick;
- property OnDragDrop;
- property OnDragOver;
- property OnEndDrag;
- property OnEnter;
- property OnExit;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- property OnPageChanged: TNotifyEvent;
- end;
-
- { THeader
- Purpose - Creates sectioned visual header that allows each section to be
- resized with the mouse.
- Features - This is a design-interactive control. In design mode, the
- sections are named using the string-list editor. Each section
- can now be manually resized using the right mouse button the grab
- the divider and drag to the new size. Changing the section list
- at design (or even run-time), will attempt to maintain the
- section widths for sections that have not been changed.
- Properties:
- Align - Standard property.
- AllowResize - If True, the control allows run-time mouse resizing of the
- sections.
- BorderStyle - Turns the border on and off.
- Font - Standard property.
- Sections - A special string-list that contains the section text.
- ParentFont - Standard property.
- OnSizing - Event called for each mouse move during a section resize
- operation.
- OnSized - Event called once the size operation is complete.
-
- SectionWidth - Array property allowing run-time getting and setting of
- each section's width. }
-
- TSectionEvent = procedure(Sender: TObject;
- ASection, AWidth: Integer) of object;
-
- THeader = class(TCustomControl)
- protected
- procedure Paint; override;
- procedure CreateParams(var Params: TCreateParams); override;
- procedure Sizing(ASection, AWidth: Integer); dynamic;
- procedure Sized(ASection, AWidth: Integer); dynamic;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- property SectionWidth[X: Integer]: Integer;
- published
- property Align;
- property AllowResize: Boolean default True;
- property BorderStyle: TBorderStyle default bsSingle;
- property Enabled;
- property Font;
- property ParentFont;
- property ParentShowHint;
- property Sections: TStrings;
- property ShowHint;
- property TabOrder;
- property TabStop;
- property Visible;
- property OnSizing: TSectionEvent;
- property OnSized: TSectionEvent;
- end;
-
- TCustomRadioGroup = class(TCustomGroupBox)
- protected
- procedure ReadState(Reader: TReader); override;
- function CanModify: Boolean; virtual;
- property Columns: Integer default 1;
- property ItemIndex: Integer default -1;
- property Items: TStrings;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- end;
-
- TRadioGroup = class(TCustomRadioGroup)
- published
- property Align;
- property Caption;
- property Color;
- property Columns;
- property Ctl3D;
- property DragCursor;
- property DragMode;
- property Enabled;
- property Font;
- property ItemIndex;
- property Items;
- property ParentColor;
- property ParentCtl3D;
- property ParentFont;
- property ParentShowHint;
- property PopupMenu;
- property ShowHint;
- property TabOrder;
- property TabStop;
- property Visible;
- property OnClick;
- property OnDragDrop;
- property OnDragOver;
- property OnEndDrag;
- property OnEnter;
- property OnExit;
- end;
-
- procedure Frame3D(Canvas: TCanvas; var Rect: TRect;
- TopColor, BottomColor: TColor; Width: Integer);
-
- implementation
-