Office Assistant Package v2.51

Copyright© Kambiz R. Khojasteh. All rights reserved.

TABLE OF CONTENTS

DESCRIPTION

The Office Assistant package contains two components in purpose of adding animated characters like office assistant characters to Delphi applications.

TAssistant is the main component in the Office Assistant package, which is a non-visual component. This component provides a floating stage for the loaded animated character (actor) into thecomponent. In addition, this component has some properties and methods for showing standard dialogs (balloon shape) like message boxes, hints and tips, and search. Some major features of TAssistant component are:

The other component in the Office Assistant package is TAssistantPanel. As you can guess from its name, it is an assistant fixed on a panel. The TAssistantPanel has all features of TAssistant component except support for balloons.


COMPATIBILITY

Office Assistant Package is built for Borland Delphi 3.0, 4.0, 5.0, and 6.0. Because Delphi 3.0 does not support bi-directional languages and variant variables, when using the package on this version of Delphi, consider the following notes:

  1. Change to BiDiMode property of TAssistant has no effect.
  2. To play animation by using its index reference, developers must use PlayIndex method instead of Play method.

INSTALLATION

Note: Office Assistant Package needs TOffice97Button component version 2.01 or later written by Jonathan Hosking.

To install Office Assistant Package follow the procedure below:

  1. Unzip the file ASSIST.ZIP to any directory
  2. Copy files of TOffice97Button component to the above directory
  3. Click on File|Open menu item
  4. Select the file ASSISTX0.DPK from the open dialog and click Open
    (X is 3, 4, 5, or 6 depending to your Delphi version)
  5. Click the Install button on the package window to install the component
  6. Click on File|Close menu item to close the package window
  7. Click on Tools|Environment Options menu item
  8. Go to Library tab
  9. Add the install directory to Library Path
  10. Click OK to confirm changes
You can also add oaReg.pas into a new or existing package.

OFFICE ASSISTANT COMPONENTS

Office Assistant Package contains two components:

Note: Office Assistant Package needs at least one Actor Library. You can download actor libraries from my web site.

TAssistant:

TAssistant is a non-visual component. By placing this component on the main form of the application and filling its properties you have a powerful assistant. Some features of this component are:

The following tables contain the list of all TAssistant properties, methods and events.

TAssistant Properties
Property Name Data Type Description
ActorLibrary String Specifies the filename of the currently loaded actor library.
ActorName Read-only String Contains the actor's name of the currently loaded actor library.
ActorVerInfo Read-only String This property is an array of version informations for the currently loaded actor library. For example ActorVerInfo['Language'] returns language name of the actor.
Animations Read-only TAnimation This property is an array of animations data that indexed from 1 to AnimationCount.
AnimationCount Read-only Word Contains the number of animations in the currently loaded actor library.
AutoIdle Boolean Controls whether the assistant plays the idle animations automatically.
AutoSize Boolean Determines whether the assistant resizes to accommodate the actor it loads.
Balloon TBalloonOptions Contains the balloon properties.
Balloon.BorderColor TColor Specifies the border color of the balloon.
Balloon.Color TColor Specifies the background color of the balloon.
Balloon.Font TFont Controls the attributes of text written on the balloon.
Balloon.HoverFont TFont Determines the font of buttons when the cursor is over them.
Balloon.LabelClass Class of TControl Determines the control class that the component will use for displaying text labels. When this property set to something other than TLabel, OnAdjustCustomLabel event will fire to initialize properties of custom labels.
Balloon.Office2000Look Boolean Determines whether Office 2000 look is applied to balloons.
BalloonAnchor TCustomForm Determines the form that arrow of balloon points to it. This property helps you to control position of balloon when assistant is not visible. As default when assistant is hidden and balloon is visible, balloon is centered to desktop and BalloonPos property will be set to bpCenter.
BalloonPos Read-only TBalloonPos Indicates the position of the balloon relative to the BalloonAnchor form.
BgMode TBgMode Determines how the selected background image is displayed on the assistant window.
BgPicture TPicture Determines the background image of the assistant window.
Caption String Specifies the title of the assistant window.
ClientHeight Integer Specifies the height of the assistant window's client area in pixels.
ClientWidth Integer Specifies the width of the assistant window's client area in pixels.
Color TColor Specifies the background color of the assistant window.
CustomDialog TAssistantBalloon Determines the form which will be used as custom balloon. By calling ShowCustom or ShowCustomModal methods the custom balloon will be displayed. To create a custom balloon please follow the procedures below:
  1. Create a new form.
  2. Add oaBaloon to the unit uses clause.
  3. Change the form class ancestor from TForm to TAssistantBalloon.
  4. Drop one and only one TPanel control on the form. At run-time, the balloon size will be set to the panel size.
  5. Set the panel properties as below:

    ParentColor := True;
    BevelOuter := bvNone;
    Caption := EmptyStr;

  6. Use the panel as the client area for creating your custom balloon.
Dragging Read-only Boolean While Dragging is true, the user is dragging the assistant window.
Empty Read-only Boolean Determines whether an actor library is loaded to the component.
FastShowHide Boolean If FastShowHide is true, the assistant will not play show and hide animations on show and hide events.
FormLeft Integer Specifies the horizontal coordinate of the left edge of the assistant window relative to the screen.
FormTop Integer Specifies the vertical coordinate of the top edge of the assistant window relative to the screen.
GuideDlg TGuideDlgOptions Contains the Guide balloon options.
GuideDlg.AcceptRequest Boolean If AcceptRequest is false, the edit box and search button will not be displayed on the Guide balloon.
GuideDlg.Description String Contains a short description about the found topics.
GuideDlg.Icon TIcon Specifies an icon for the guide balloon.
GuideDlg.Request String Contains the requested search text entered by the user.
GuideDlg.RequestResult Boolean Indicates whether topics are result of a user request's search or not. When RequestResult is true, topics will be displayed followed by a circle button, otherwise a bulb will be displayed instead of circle button.
GuideDlg.Title String Specifies the title of the Guide balloon.
GuideDlg.Topics TTopicsList Specifies the list of found topics according to the user search request.
GuideDlg.VisibleButtons TGuideDlgButtons Determines which button appear on the Guide balloon.
Height Integer Specifies the vertical size of the assistant window in pixels.
HintBulb Boolean Indicates whether a hint bulb appear beside the assistant.
HintDlg THintDlgOptions Contains the Hint balloon options.
HintDlg.Description String Contains the hint itself or a short description about available hints.
GuideDlg.Icon TIcon Specifies an icon for the Hint balloon.
HintDlg.Title String Specifies the title of the Hint balloon.
HintDlg.Topics TTopicsList Specifies the list of available hint topics.
ModalBalloon Read-only Boolean If ModalBalloon is true, the visible balloon has been shown as modal.
MoveStep Byte Specifies the amount of movements, in pixels, in every step of MoveTo method.
MsgDlg TMsgDlgOptions Contains the Message balloon options.
MsgDlg.CheckBox TCheckBoxOptions Contains check box options.
MsgDlg.CheckBox.AllowGrayed Boolean Determines whether check box can be in "grayed" state.
MsgDlg.CheckBox.Caption String Specifies the display text of check box.
MsgDlg.CheckBox.Checked Boolean Determines whether the check box appears checked.
MsgDlg.CheckBox.Enabled Boolean Determines whether the check box is enabled.
MsgDlg.CheckBox.State TCheckBoxState Indicates whether the check box is selected, deselected, or grayed.
MsgDlg.CheckBox.Visible Boolean Determines whether the check box is visible.
MsgDlg.CustomIcon TIcon When Type parameter of MessageDlg method is mtCustom, the balloon uses the value of the CustomIcon.
MsgDlg.Title String Determines the title of the Message balloon.
Mute Boolean Controls whether the assistant makes sound.
Name String Specifies the name of the assistant as referenced in code.
PlayIdling Read-only Boolean Indicates whether an idle animation is playing on the idle time.
Playing Read-only Boolean If Playing is true, indicates an animation is playing.
PlayingID Read-only TRequestID Identifies the ID of current playing animation
PopupMenu TPopupMenu Identifies the pop-up menu associated with the assistant.
Priority TThreadPriority Determines the priority of the thread that plays animations.
Speed Word Specifies the relational speed of animations according to the original animation speed in percent.
Stretch Boolean TAssistant stretch the frame's image if the animation width or height is bigger than the client size of the assistant window. By setting Stretch to true, TAssistant will stretch the image if it is less than the client size of the assistant window. TAssistant always keeps the aspect ratio of the image.
Tag Integer Stores an integer value as part of the component.
TipsDlg TTipsDlgOptions Contains the Tips balloon options.
TipsDlg.TipIndex Integer Specifies the index of the current selected tip on the Tips balloon.
TipsDlg.Tips TStringList Contains the list of tip strings.
TipsDlg.VisibleButtons TTipsDlgButtons Determines which button appear on the Tips balloon.
Transparent Boolean Specifies whether the assistant displays animations with a transparent background.
Visible Boolean Indicates whether the assistant is visible.
VisibleBalloon Read-only TBalloonKind Indicates the kind of visible balloon. If balloon is not visible the value of this property is bkNone.
Width Integer Specifies the horizontal size of the assistant window in pixels.

TAssistant Methods
Methods
procedure AdjustClientSize;
Sets the client size of the assistant window to size of the loaded
actor library.
procedure BringToFront;
Assistant normally will not place on top of modal forms. When a modal form is showing, BringToFront brings the assistant on top of the modal form.
procedure CloseBalloon;
Closes the current visible balloon.
constructor Create(AOwner: TComponent);
Creates and initializes a new TAssistant.
destructor Destroy;
Destroys an instance of TAssistant.
function GestureAt(X, Y: Integer): TRequestID;
Plays the gesture animation according to the screen coordinate specified by X and Y parameters. The function returns a unique id for played animation or zero on error.
function GlanceAt(X, Y: Integer): TRequestID;
Plays the glance animation according to the screen coordinate specified by X and Y parameters. The function returns a unique id for played animation or zero on error.
procedure Hide(Fast: Boolean);
Hides the assistant. If Fast is true, the hide animation will not play.
function InputQuery(const ACaption, APrompt: String; var Value: String): Boolean;
Displays an input balloon that enables the user to enter a string.
function IsValid(RequestID: TRequestID): Boolean;
If the specified RequestID is a playing or queued animation, the function returns true.
function LookAt(X, Y: Integer): TRequestID;
Plays the look animation according to the screen coordinate specified by X and Y parameters. The function returns a unique id for played animation or zero on error.
function MessageDlg(const Msg: String; AType: TMsgDlgType; AButtons: TMsgDlgButtons; HelpCtx: LongInt): Word;
This function is as same as Delphi MessageDlg function except that this method shows a balloon.
procedure MoveBalloonTo(Point: TPoint);
Moves the visible balloon to the specified point.
procedure MoveBalloonToControl(Control: TControl);
Moves the visible balloon over the specified control.
procedure MoveBalloonToCursor;
Moves the visible balloon to the mouse cursor's position.
procedure MoveTo(X, Y: Integer);
Plays the move animation according to the screen coordinate specified by X and Y parameters and move the assistant to this screen coordinate.
Delphi 4.0, 5.0:
function Play(Index: Word): TRequestID;
Delphi 3.0:
function PlayIndex(Index: Word): TRequestID;
Plays the animation specified by the animation's index. The function returns a unique id for played animation or zero on error.
Delphi 3.0, 4.0, 5.0:
function Play(Name: String):
TRequestID;
Delphi 3.0:
function PlayName(Name: String): TRequestID;
Plays the animation specified by the animation's name. The function returns a unique id for played animation or zero on error.
Delphi 3.0, 4.0, 5.0:
function Play(Action:
TActorAction): TRequestID;
Delphi 3.0:
function PlayAction(Action: TActorAction): TRequestID;
Plays randomly one of animations associated to the action. The function returns a unique id for played animation or zero on error.
procedure Show(Fast: Boolean);
Shows the assistant. If Fast is true, the show animation will not play.
procedure ShowCustom;
Shows the custom balloon. Custom balloon determines by
CustomDialog property.
function ShowCustomModal: Word;
Shows the custom balloon as modal. Custom balloon determines by
CustomDialog property. The retuned value is the modal result.
procedure ShowHint;
Shows the Hint balloon.
function ShowHintModal: Word;
Shows the Hint balloon as modal. The retuned value is the id or index of the selected hint topic.
procedure ShowGuide;
Shows the Guide balloon.
function ShowGuideModal: Word;
Shows the Guide balloon as modal. The retuned value is the id or index of the selected guide topic.
procedure ShowTips;
Shows the Tips balloon.
procedure Speak(const Msg: String; Timeout: Integer = 0);
Shows a balloon containing the Msg and wait for timeout to hide the balloon. The timeout is in milliseconds and if it is zero the balloon will be hide only by calling the
CloseBalloon method.
procedure Stop(RequestID: TRequestID);
Stops the specified animation if it is playing or removes it from queue if it is queued.
procedure StopAll;
Stops the current playing animation and empties the animation queue.
procedure Think(const Msg: String; Timeout: Integer = 0);
Shows a think balloon containing the Msg and wait for timeout to hide the balloon. The timeout is in milliseconds and if it is zero the balloon will be hide only by calling the
CloseBalloon method.
function WaitFor(RequestID: TRequestID): Boolean;
Waits for specified animation until its playing terminate. If the specified animation has an infinite loop, the function returns immediately with a false result.

TAssistant Events
Event Name Type Description
OnAdjustCustomLabel TCustomLabelEvent Occurs when a control class other than TLabel has been efined for LabelClass property of the component. Use this event for initializing properties of the new label control. For example, if the new control class has a word-wrap property, in this event set it to true.
OnBalloonHide TNotifyEvent Occurs when the balloon hides.
OnBalloonShow TNotifyEvent Occurs when the balloon shows.
OnCanResize TCanResizeEvent Occurs when an attempt is made to resize the assistant window.
OnChange TNotifyEvent Occurs whenever the ActorLibrary changes.
OnClick TNotifyEvent Occurs when the user clicks on the assistant.
OnCloseQuery TCloseQueryEvent Occurs when the user closes the assistant window from the system menu of the window.
OnDblClick TNotifyEvent Occurs when the user double-clicks on the assistant.
OnDragging TNotifyEvent Occurs when the user is dragging the assistant.
OnDragStart TNotifyEvent Occurs when the user begins to drag the assistant.
OnDragStop TNotifyEvent Occurs when the dragging of the assistant ends.
OnGuideOptionsClick TNotifyEvent Occurs when the user clicks on the options button of the Guide balloon.
OnGuideRequestChange TNotifyEvent Occurs when the user changes the text of the edit box on the Guide balloon.
OnGuideSearchClick TNotifyEvent Occurs when the user clicks on the search button of the Guide balloon.
OnGuideTopicClick TTopicClickEvent Occurs when the user clicks on the one of topics displayed on the Guide balloon.
OnHide TNotifyEvent This event just triggered when the assistant goes to hide.
OnHintBlubClick TNotifyEvent Occurs when the user clicks on the hint bulb.
OnHintTopicClick TTopicClickEvent Occurs when the user clicks on the one of topics displayed on the Hint balloon.
OnIdle TIdleEvent This event triggered when the assistant needs to play an idle animation.
OnPlayStart TPlayEvent This event just triggered when an animation begins to play.
OnPlayStop TPlayEvent This event triggered when an animation terminates.
OnShow TNotifyEvent This event just triggered when the assistant goes to show.
OnTipsTipChange TNotifyEvent This event triggered after changing the current tip of the Tips balloon.

TAssistantPanel:

TAssistantPanel is a descendent of the TCustomPanel component. This component is suitable for creating preview or options dialogs. Some features of this component are:

The following tables contain the list of all TAssistantPanel properties, methods and events.

TAssistantPanel Properties
Property Name Data Type Description
ActorLibrary String Specifies the filename of the currently loaded actor library.
ActorName Read-only String Contains the actor's name of the currently loaded actor library.
ActorVerInfo Read-only String This property is an array of version informations for the currently loaded actor library. For example ActorVerInfo['Language'] returns language name of the actor.
Align TAlign Determines how the TAssistantPanel aligns within its container.
Anchors TAnchors Specifies how the TAssistantPanel anchored to its parent.
Animations Read-only TAnimation This property is an array of animations data that indexed from 1 to AnimationCount.
AnimationCount Read-only Word Contains the number of animations in the currently loaded actor library.
AutoIdle Boolean Controls whether the control plays the idle animations automatically.
AutoSize Boolean Determines whether the control resizes to accommodate the actor it loads.
BevelInner TPanelBevel Determines the style of the inner bevel of the control.
BevelOuter TPanelBevel Determines the style of the outer bevel of the control.
BevelWidth TBevelWidth Determines the width, in pixels, of both inner an outer bevels of the control.
BgMode TBgMode Determines how the selected background image is displayed.
BgPicture TPicture Determines the background image of the control.
BorderStyle TBorderStyle Determines the style of the line drawn around the perimeter of the control.
Color TColor Specifies the background color of the control.
Constraints TSizeConstrains Specifies the size constraints of the control.
Cursor TCursor Specifies the image used to represent the mouse pointer when it passes into the region covered by the control.
DragCursor TCursor Indicates the image used to represent the mouse pointer when the control is being dragged.
DragKind TDragKind Specifies whether the control is being dragged normally or for docking.
DragMode TDragMode Determines how the control initiates drag-and-drop or drag-and-dock operations.
Empty Read-only Boolean If Empty is true, Indicates an actor library is loaded to the control.
Enabled Boolean Controls whether the control responds to mouse, keyboard, and timer events.
Height Integer Specifies the vertical size of the control in pixels.
HelpContext THelpContext Provides a context number for use in calling context-sensitive online Help.
Hint String Contains the text string that can appear when the user moves the mouse over the control.
Left Integer Specifies the horizontal coordinate of the left edge of the control relative to its parent.
Mute Boolean Controls whether the assistant makes sound.
Name String Specifies the name of the control as referenced in code.
ParentColor Boolean If ParentColor is true, the control uses the Color property of its parent.
ParentShowHint Boolean If ParentShowHint is True, the control uses the ShowHint property value of its parent.
PlayIdling Read-only Boolean Indicates whether an idle animation is playing on the idle time.
Playing Read-only Boolean If Playing is true, indicates an animation is playing.
PlayingID Read-only TRequestID Identifies the ID of current playing animation
PopupMenu TPopupMenu Identifies the pop-up menu associated with the assistant.
Priority TThreadPriority Determines the priority of the thread that plays animations.
ShowHint Boolean Determines whether the control displays a Help Hint when the mouse pointer rests momentarily on the control.
Speed Word Specifies the relational speed of animations according to the original animation speed in percent.
Stretch Boolean TAssistantPanel stretch the frame's image if the animation width or height is bigger than the client size of the assistant window. By setting Stretch to true, TAssistantPanel will stretch the image if it is less than the client size of the assistant window. TAssistantPanel always keeps the aspect ratio of the image.
Tag Integer Stores an integer value as part of the component.
Top Integer Specifies the vertical coordinate of the top edge of the control relative to its parent.
Visible Boolean Determines whether the control appears on the parent's client.
Width Integer Specifies the horizontal size of the control in pixels.

TAssistantPanel Methods
Methods
procedure AdjustClientSize;
Sets the client size of the control to size of the loaded
actor library.
constructor Create(AOwner: TComponent);
Creates and initializes a new TAssistantPanel.
destructor Destroy;
Destroys an instance of TAssistantPanel.
function GestureAt(X, Y: Integer): TRequestID;
Plays the gesture animation according to the screen coordinate specified by X and Y parameters. The function returns a unique id for played animation or zero on error.
function GlanceAt(X, Y: Integer): TRequestID;
Plays the glance animation according to the screen coordinate specified by X and Y parameters. The function returns a unique id for played animation or zero on error.
function IsValid(RequestID: TRequestID): Boolean;
If the specified RequestID is a playing or queued animation, the function returns true.
function LookAt(X, Y: Integer): TRequestID;
Plays the look animation according to the screen coordinate specified by X and Y parameters. The function returns a unique id for played animation or zero on error.
Delphi 4.0, 5.0:
function Play(Index: Word): TRequestID;
Delphi 3.0:
function PlayIndex(Index: Word): TRequestID;
Plays the animation specified by the animation's index. The function returns a unique id for played animation or zero on error.
Delphi 3.0, 4.0, 5.0:
function Play(Name: String):
TRequestID;
Delphi 3.0:
function PlayName(Name: String): TRequestID;
Plays the animation specified by the animation's name. The function returns a unique id for played animation or zero on error.
Delphi 3.0, 4.0, 5.0:
function Play(Action:
TActorAction): TRequestID;
Delphi 3.0:
function PlayAction(Action: TActorAction): TRequestID;
Plays randomly one of animations associated to the action. The function returns a unique id for played animation or zero on error.
procedure Stop(RequestID: TRequestID);
Stops the specified animation if it is playing or removes it from queue if it is queued.
procedure StopAll;
Stops the current playing animation and empties the animation queue.
function WaitFor(RequestID: TRequestID): Boolean;
Waits for specified animation until its playing terminate. If the specified animation has an infinite loop, the function returns immediately with a false result.

TAssistantPanel Events
Event Name Type Description
OnCanResize TCanResizeEvent Occurs when an attempt is made to resize the control.
OnChange TNotifyEvent Occurs whenever the ActorLibrary changes.
OnClick TNotifyEvent Occurs when the user clicks on the control.
OnConstrainedResize TConstrainedResizeEvent Occurs immediately after OnCanResize.
OnDblClick TNotifyEvent Occurs when the user double-clicks on the control.
OnDragDrop TDragDropEvent Occurs when the user drops an object being dragged.
OnDragOver TDragDropEvent Occurs when the user drags an object over the control.
OnEndDrag TEndDragEvent Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging.
OnIdle TIdleEvent This event triggered when the control needs to play an idle animation.
OnMouseDown TMouseEvent Occurs when the user presses a mouse button with the mouse pointer over the control.
OnMouseMove TMouseMoveEvent Occurs when the user moves the mouse pointer while the mouse pointer is over the control.
OnMouseUp TMouseEvent Occurs when the user releases a mouse button that was pressed with the mouse pointer over the control.
OnPlayStart TPlayEvent This event just triggered when an animation begins to play.
OnPlayStop TPlayEvent This event triggered when an animation terminates.
OnResize TNotifyEvent Occurs immediately after the control is resized.
OnStartDrag TStartDragEvent Occurs when the user begins to drag the control or an object it contains by left-clicking on the control and holding the mouse button down.


CLASSES, TYPE DEFINITIONS, AND CONSTANTS

Here, is a list of classes, type definitions, and constants that declared and used by Office Assistant package. The multi-language application developers can change string constants to the appropriate language at run-time or design-time.

Classes
Classes
TTopicsList = class(TStringList);
property Count: Integer;
Determines the number of topics in the list. This property is read-only.
property Strings [Index: Integer]: String;
Contains list of topics' titles.
property Options [Index: Integer]: TTopicOptions;
Contains list of topics' options.
constructor Create;
Default constructor of the class.
function Add(const S: String): Integer;
Adds a new topic to the end of topics list.
function AddOptions(const S: String; AOptions: TTopicOptions): Integer;
Adds a new topic and its options to the end of topics list.
function AddStyle(const S: String; AStyles: TTopicStyles): Integer;
Adds a new topic and its styles to the end of topics list.
procedure Assign(Source: TPersistent);
Copies the contents of another topics list to the object where the method is executed.
procedure Delete(Index: Integer);
Deletes the topic with the specified index from the list of topics.
procedure Clear;
Deletes all topics from the list of topics.
TTopicOptions = class(TPersistent);
property ID: Integer;
Determines the ID of the topic. If this value is zero or a non-negative value, by selecting the topic the second parameter of
OnGuideTopicClick or OnHintTopicClick events will be the topic ID otherwise index of the topic in the topics list will be used.
property Styles: TTopicStyles;
Determines the visual style of the topic item.
property OnSelect: TTopicClickEvent;
Occurs when user selects the topic. If this event is not assigned OnGuideTopicClick or OnHintTopicClick events will be called.

Type Definitions
Type Definitions
TRequestID = Cardinal;
This type holds a unique id for playing or queued animations. By this id you can stop an animation or wait until it be finished. The low order word of TRequestID contains animation's index.
TBalloonKind = (bkNone, bkMessage, bkTips, bkHint, bkGuide, bkSpeak, bkThink, bkQuery, bkCustom
bkNone Indicates the balloon is not visible
bkMessage Indicates the visible balloon has been shown by MessageDlg method
bkTips Indicates the visible balloon has been shown by ShowTips method
bkHint Indicates the visible balloon has been shown by ShowHint or ShowHintModal methods
bkGuide Indicates the visible balloon has been shown by ShowGuide or ShowGuideModal methods
bkSpeak Indicates the visible balloon has been shown by Speak method
bkThink Indicates the visible balloon has been shown by Think method
bkQuery Indicates the visible balloon has been shown by InputQuery method
bkCustom Indicates the visible balloon has been shown by ShowCustom or ShowCustomModal methods
TBalloonPos = (bpCenter, bpTopLeft, bpTopRight, bpRightTop, bpRightBottom, bpBottomRight, bpBottomLeft, bpLeftBottom, bpLeftTop);
bpCenter The balloon centered on the Windows Desktop (or Screen on Delphi 3)
bpTopLeft The balloon placed on top of the assistant window and left aligned
bpTopRight The balloon placed on top of the assistant window and right aligned
bpRightTop The balloon placed on right of the assistant window and top aligned
bpRightBottom The balloon placed on right of the assistant window and bottom aligned
bpBottomRight The balloon placed on bottom of the assistant window and left aligned
bpBottomLeft The balloon placed on bottom of the assistant window and right aligned
bpLeftBottom The balloon placed on left of the assistant window and top aligned
bpLeftTop The balloon placed on left of the assistant window and bottom aligned
TBgMode = (bmNone, bmTiled, bmCentered, bmStretched);
bmNone The background image will be ignored
bmTiled The background image will be tiled on the stage
bmCentered The background image will be displayed on the center of the stage
bmStretched The background image will be stretched to the client size of the stage
TExitType = (etNone, etAnimation, etExitBranch);
etNone Indicates the animation does not have a return animation
etAnimation Indicates the animation has a return animation
etExitBranch Indicates the animation returns by using exit branches
Office Assistant Package plays the return animations automatically.
TTipsDlgBtn = (tbClose, tbNext, tbBack);
TTipsDlgButtons = set of TTipsDlgBtn;
tbClose The id of Close button on the Tips balloon
tbNext The id of Next button on the Tips balloon
tbBack The id of Back button on the Tips balloon
TGuideDlgBtn = (gbClose, gbOptions, gbTips, gbSearch, gbBackPage, gbNextPage);
TGuideDlgCmdBtn = gbClose..gbSearch;
TGuideDlgNavBtn = gbBackPage..gbNextPage;
TGuideDlgButtons = set of TGuideDlgCmdBtn;
gbClose The id of Close button on the Guide balloon
gbOptions The id of Options button on the Guide balloon
gbTips The id of Tips button on the Guide balloon
gbSearch The id of Search button on the Guide balloon
gbBackPage The id of Previous Topics button on the Guide balloon
gbNextPage The id of Next Topics button on the Guide balloon
THintDlgBtn = (hbClose, hbBackPage, hbNextPage);
THintDlgCmdBtn = hbClose..hbClose;
THintDlgNavBtn = hbBackPage..hbNextPage;
THintDlgButtons = set of THintDlgCmdBtn;
hbClose The id of Close button on the Hint balloon
hbBackPage The id of Previous Topics button on the Hint balloon
hbNextPage The id of Next Topics button on the Hint balloon
TQueryDlgBtn = (qbClose, qbCancel);
TQueryDlgButtons = set of TQueryDlgCmdBtn;
qbOK The id of OK button on the Input Query balloon
qbCancel The id of Cancel button on the Input Query balloon
TActorAction = aaNone, aaAcknowledge, aaAlert, aaAnnounce, aaBlink, aaConfused, aaCongratulate, aaDecline, aaDoMagic, aaDontRecognize, aaExplain, aaGestureDown, aaGestureDownLeft, aaGestureDownRight, aaGestureLeft, aaGestureRight, aaGestureUp, aaGestureUpLeft, aaGestureUpRight, aaGetAttention, aaGetAttentionContinued, aaGlanceDown, aaGlanceDownLeft, aaGlanceDownRight, aaGlanceLeft, aaGlanceRight, aaGlanceUp, aaGlanceUpLeft, aaGlanceUpRight, aaGreet, aaHear, aaHearing, aaHide, aaIdlingLevel1, aaIdlingLevel2, aaIdlingLevel3, aaListen, aaListening, aaLookDown, aaLookDownLeft, aaLookDownRight, aaLookLeft, aaLookRight, aaLookUp, aaLookUpLeft, aaLookUpRight, aaMoveDown, aaMoveDownLeft, aaMoveDownRight, aaMoveLeft, aaMoveRight, aaMoveUp, aaMoveUpLeft, aaMoveUpRight, aaPleased, aaProcess, aaProcessing, aaRead, aaReadContinued, aaReading, aaRestPose, aaSad, aaSearch, aaSearching, aaShow, aaSpeak, aaSpeaking, aaStartListening, aaStopListening, aaSuggest, aaSurprised, aaThink, aaThinking, aaUncertain, aaWave, aaWrite, aaWriteContinued, aaWriting);
TActorActions = set of TActorAction;
The ActorAction is a predefined id for animations of an actor library. Each animation may be assigned to one or more ActorAction and vice versa.
TAnimation = record
   Name: String[255];
   Actions: TActorActions;
   case ExitType: TExitType of
      etNone: ();
      etAnimation: (ReturnName: String[255]);
      etExitBranch: ();
   end;
end;
This record holds specifications of the animation.
TTopicStyle = (tsHeader, tsUnderline, tsBold, tsItalic, tsHoverUnderline, tsHoverBold, tsHoverItalic);
TTopicStyles = set of TTopicStyle;
tsHeader Indicates the topic is a header and will not response to mouse click
tsUnderline The topic will be displayed as underline
tsBold The topic will be displayed as bold
tsItalic The topic will be displayed as italic
tsHoverUnderline The topic will be displayed as underline while cursor is over the topic
tsHoverBold The topic will be displayed as bold while cursor is over the topic
tsHoverItalic The topic will be displayed as italic while cursor is over the topic
TCustomLabelEvent = procedure(Sender: TObject; TheLabel: TControl) of object;
This is type of OnAdjustCustomLabel event. TheLabel parameter is the new created label control that you may want to initialize its properties.
TIdleEvent = procedure(Sender: TObject; Level: Integer; var Handled: Boolean) of object;
This is type of OnIdle event. Level parameter Indicates the level of idling and is a value between 1 and 3. If you want to ignore the default handler, set Handled parameter to true.
TPlayEvent = procedure(Sender: TObject; RequestID: TRequestID) of object;
This is type of OnPlayStart and OnPlayStop events. RequestID is the unique id of the played or stopped animation.
TTopicClickEvent = procedure(Sender: TObject; TopicIndex: Integer) of Object;
This is type of OnGuideTopicClick and OnHintTopicClick events. If topic ID is negative, TopicIndex parameter is index of the topic otherwise it is the topic ID.

Constants
Constants
DefMsgDlgBtns : array [TMsgDlgBtn] of String = ('&Yes', '&No', '&OK', 'Cancel', '&Abort', '&Retry', '&Ignore', 'All', 'No To All', 'Yes To All', '&Help');
This constant contains the caption of Message balloon buttons.
DefTipsDlgBtns : array [TTipsDlgBtn] of String = ('Close', '&Next', '&Back');
This constant contains the caption of Tips balloon buttons.
DefGuideDlgBtns : array [TGuideDlgBtn] of String = ('Close', '&Options', '&Tips', '&Search', 'See previous...', 'See more...');
This constant contains the caption of Guide balloon buttons.
DefHintDlgBtns : array [THintDlgBtn] of String = ('&OK', 'See previous...', 'See more...');
This constant contains the caption of Hint balloon buttons.
DefQueryDlgBtns : array [TQueryDlgBtn] of String = ('&OK', 'Cancel');
This constant contains the caption of Input Query balloon buttons.


ACTOR LIBRARY

The Actor Library is a DLL file with .aal extension that stores the assistant's actor definitions and animations. Each actor has a set of animations that may be assigned to one or more predefined actions and vice versa. Each animation has one or many frames and each frame may be had a sound. Some animation after stop needs to another animation so that returns the actor to its original state (RestPose). Return animations may be created as a separate animation or may be defined by exit branches in the first animation. Each actor has at least one animation assigned to its RestPose action.

Actor libraries can be used as compressed. ASPack is an exe compressor that has been tested for compressing actor libraries and works great. You could download ASPack from http://www.aspack.com.
Thanks to Bill Miller for giving me this information.

Note: Office Assistant Package needs at least one actor library. You could download some actor libraries from my site.


ACTOR EDITOR

On my web site there is a simple editor for creating actor libraries. Unfortunately this editor has not any help file or documentation and needs Delphi command line compiler (DCC32.EXE) to build libraries.


VERSION HISTORY

DISCLAIMER

Office Assistant Package is provided "AS IS" without any warranty of any kind, either express or implied. The entire risk as to the quality and performance of the software is with you. The author is not liable for any damages resulting from the use and misuse of the software.


LICENCE

Office Assistant Package is freeware. You may copy it as long as you copy all of files. If you want to change the source code in order to improve the components' features, performance, etc. please send to the author the new source code so that the author can have a look at it. The changed source code should contain descriptions what you have changed, and your name. The only thing you may not change is the original copyright information.


CREDITS


CONTACT INFORMATION

If you have any bug reports, suggestions, or comments feel free to contact me by email address given below. You can also visit my web site to find out the latest news about this package or download the available actor libraries.

e-mail: kambiz@delphiarea.com
web: http://www.delphiarea.com


END OF DOCUMENT