Class TdkwGraph (unit Graph) |
Inherits from
TCustomControl
constructor Create ( AOwner: TComponent ) ;
- Public declarations
*************************************************************
*
* TdkwGraph Implementation
*
**************************************************************) (* Create a multi-layer graph
procedure AddAxis ( Name: String ; Axis: TdkwGraphAxis ) ;
Add a new X or Y axis to the graph
procedure AddLayer ( Name: String ; Layer: TdkwGraphLayer ) ;
Add a new display layer to the graph
destructor Destroy ;
Destroy a multi-layer graph
procedure RemoveAxis ( Axis: TdkwGraphAxis ) ;
Remove an existing axis from the graph
procedure RemoveLayer ( Layer: TdkwGraphLayer ) ;
Remove an existing display layer from the graph
procedure Restructure ;
Prepare to draw the graph after changes
procedure SetBounds ( ALeft, ATop, AWidth, AHeight: Integer ) ;
Restructure when bounds change occurs
procedure MouseDown ( Button: TMouseButton ; Shift: TShiftState ;
X, Y: Integer );
Protected declarations Allow clients to respond to mouse clicks on the graph
procedure Paint ;
Draw the graph
procedure ScrollGraph ( Sender: TObject ; ScrollCode: TScrollCode ;
var ScrollPos: Integer ) ;
Respond to scroll bar changes
property FixedWidth : Integer
event OnClick : TdkwGraphClickEvent
FFixedWidth : Integer ;
Private declarations
FOnClick : TdkwGraphClickEvent ;
GraphLayers : TStringList ;
GraphRect : TRect ;
HorizontalAxes : TStringList ;
NeedsRestructure : Boolean ;
ScrollBar : TScrollBar ;
VerticalAxes : TStringList ;
constructor Create ( AOwner: TComponent ) ;
Public declarations
*************************************************************
*
* TdkwGraph Implementation
*
**************************************************************) (* Create a multi-layer graph
procedure AddAxis ( Name: String ; Axis: TdkwGraphAxis ) ;
Add a new X or Y axis to the graph
procedure AddLayer ( Name: String ; Layer: TdkwGraphLayer ) ;
Add a new display layer to the graph
destructor Destroy ;
Destroy a multi-layer graph
procedure RemoveAxis ( Axis: TdkwGraphAxis ) ;
Remove an existing axis from the graph
procedure RemoveLayer ( Layer: TdkwGraphLayer ) ;
Remove an existing display layer from the graph
procedure Restructure ;
Prepare to draw the graph after changes
procedure SetBounds ( ALeft, ATop, AWidth, AHeight: Integer ) ;
Restructure when bounds change occurs
procedure MouseDown ( Button: TMouseButton ; Shift: TShiftState ;
X, Y: Integer );
Protected declarations
Allow clients to respond to mouse clicks on the graph
procedure Paint ;
Draw the graph
procedure ScrollGraph ( Sender: TObject ; ScrollCode: TScrollCode ;
var ScrollPos: Integer ) ;
Respond to scroll bar changes
property FixedWidth : Integer
event OnClick : TdkwGraphClickEvent
FFixedWidth : Integer ;
Private declarations
FOnClick : TdkwGraphClickEvent ;
GraphLayers : TStringList ;
GraphRect : TRect ;
HorizontalAxes : TStringList ;
NeedsRestructure : Boolean ;
ScrollBar : TScrollBar ;
VerticalAxes : TStringList ;