| Class TPieChart (unit PieChart) |
| Constructors |
constructor Create (AOwner: TComponent);| Functions |
procedure Clear;
destructor Destroy;
procedure SetDataAndLabels (source_data: TStringList);
procedure DblClick;
procedure MouseDown (Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure Paint;find out where we were clicked - in client co-ordinates translate this relative to the centre of the pie chart
function get_object_from_mouse_coords: boolean;
procedure MouseUp (Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure SetListBox (ListBox: TListBox);| Properties |
property Font :
property Height :
property ListBox : TListBox
property ParentFont :
property Width :
property Canvas : | Events |
event OnDblClick : TNotifyEvent
event OnRightClick : TNotifyEvent| Variables |
ClickedObject : TObject;
ClickedString : string;
FData : TStringListWithDouble;
FListBox : TListBox;
FMouseX : integer;
FMouseY : integer;
FOnDblClick : TNotifyEvent;
FOnRightClick : TNotifyEvent;
FTotal : double;| Constructors |
constructor Create (AOwner: TComponent);| Functions |
procedure Clear;
destructor Destroy;
procedure SetDataAndLabels (source_data: TStringList);remove any items in the list box
procedure DblClick;
procedure MouseDown (Button: TMouseButton; Shift: TShiftState; X, Y: Integer);copy the user's strings and objects to the list box
procedure Paint;Protected declarations
find out where we were clicked - in client co-ordinates translate this relative to the centre of the pie chart
function get_object_from_mouse_coords: boolean;
procedure MouseUp (Button: TMouseButton; Shift: TShiftState; X, Y: Integer);record the mouse co-ordinates in case of a subsequent double-click
procedure SetListBox (ListBox: TListBox);| Properties |
property Font :
property Height : Published declarations
property ListBox : TListBox
property ParentFont :
property Width :
property Canvas : | Events |
event OnDblClick : TNotifyEvent
event OnRightClick : TNotifyEvent| Variables |
ClickedObject : TObject;Public declarations
ClickedString : string;
FData : TStringListWithDouble;Private declarations
FListBox : TListBox;computed internal data
FMouseX : integer;
FMouseY : integer;
FOnDblClick : TNotifyEvent;
FOnRightClick : TNotifyEvent;
FTotal : double;