Contains the TPopupNotifier visual component Please note that ExtCtrls has a dependency on the popupnotifier unit; circular dependencies between popupnotifier and other units should be avoided. Button states for the popup notifier buttons

TNotifierXButtonButtonState is an enumeration type with values that define the state for buttons in TPopupNotifier. TNotifierXButtonButtonState is defined to avoid a dependency on the Buttons unit.

The button is up The button is down The button is hot (under the mouse) Implements the button for TNotifierForm

TNotifierXButton is a TCustomControl descendant that implements the button for TNotifierForm. TNotifierXButton provides methods need to draw the button in a specific state, and respond to mouse up and down messages.

Responds to mouse down messages

HandleMouseDown is a procedure which responds to mouse down messages in the button. HandleMouseDown sets the internal state and redraws the button when the left mouse button is clicked. No actions are performed in the method if Button contains a value other than mbLeft.

Object generating the mouse message Mouse button for the message

HandleMouseDown is a procedure which responds to mouse down messages in the button. HandleMouseDown sets the internal state and redraws the button when the left mouse button is clicked. No actions are performed if the method if Button contains a value other than than mbLeft.

Horizontal position for the mouse message Vertical position for the mouse message Responds to mouse up messages

HandleMouseUp is a procedure which responds to mouse up messages in the button. HandleMouseUp sets the internal state and redraws the button when the left mouse button is released.

Object generating the mouse message Button for the mouse message Shift key state for the message Horizontal position for the mouse message Vertical position for the mouse message Constructor for the class instance

Create is the constructor for the class instance. Create calls the inherited constructor using AOwner as the owner for the class instance. Create sets the initial value for the internal state tracking member to nbsUp. Create sets the event handlers in the class instance to the following methods:

OnMouseUp
HandleMouseUp
OnMouseDown
HandleMouseDown
Owner for the class instance Destructor for the class instance

Destroy is the destructor for the class instance. Destroy calls the inherited destructor.

Draws the button in its current state

Paint is an overridden procedure which draws the button using the Canvas for the control. Paint ensures that the pen and brush contain the correct values needed to draw the button in its current state. Paint calls the inherited method prior to exit.

Implements the form used for TPopupNotifier

TNotifierForm is a THintWindow descendant that implements the form used for TPopupNotifier. TNotifierForm has private members that are used for the title, text, icon, and button in the popup notification.TNotifierForm provides methods which paint, hide, and handle resizing for the form.

Title for the form Text for the form Icon for the form Button for the form Signals an event when the form is hidden

HideForm is a procedure which signals an event when the form is hidden. HideForm signals the OnClose event (when assigned) with a TCloseAction standard action. HideForm calls Hide prior to exiting from the method.

HideForm is assigned as the OnClick event handler in TLabel and TNotifierXButton members created for the form.

Object generating the event Handles resize requests for the form

HandleResize is a procedure which handles resize requests for the form. HandleResize adjusts the size for the Icon, Button, Text, and Title in the form to their new size constraints. HandleResize is set as the event handler for the OnShow event in the form.

Object generating the event Creates the handle for the form

CreateHandle is an overridden procedure used to update font colors for TLabel members when the handle for the form is created. CreateHandle calls the inherited method, as uses clInfoText as the font color in TLabel instances with the value clDefault in their stored font color setting.

Create is the constructor for the class instance. Create calls the inherited constructor using AOwner as the owner for the class instance. Create sets the BorderStyle to bsNone, and calculates the Width and Height for the form. Create allocates resources and initializes the Icon, Title, Text, and Button for the form. The Color for the form is set to clInfoBk.

Create sets the event handlers in the class instance to the following methods:

OnMouseUp
HandleMouseUp
OnMouseDown
HandleMouseDown

Create calls HandleResize to resize the current form instance.

Owner of the form instance Frees the class instance

Destroy is the destructor for the class instance. Destroy frees resources allocated in the constructor for the Icon, Title, Text, and Button on the form. Destroy calls the inherited destructor proper to exiting from the method.

Implements a popup notification component

TPopupNotifier is a TComponent descendant which implements a popup notification component. TPopupNotifier includes a TNotifierForm member which displays the contents of the notification. TPopupNotifier provides methods and properties that allow access to the form and its controls. TPopupNotifier also provides methods which display and hide the form.

Gets the color for the notification form

GetColor is a TColor function used to get the value for the Color property in the form which displays the popup notification. GetColor is the read access specifier for the Color property.

Use Color to read or write the value for the property.

Current color for the notification form Sets the color for the notification form

SetColor is procedure used to set color for the form which displays the popup notification. SetColor is the write access specifier for the Color property. SetColor stores the specified value in the Color property for the notification form.

Use Color to read or write the value for the property.

New color for the notification form Gets the icon for the notification form

GetIcon is a TPicture function which gets the icon for the popup notification form. GetIcon is the read access specifier for the Icon property.

Use Icon to read or write the value for the property.

Current Icon for the notification form Sets the icon for the notification form

SetIcon is a procedure which sets the Icon for the popup notification form to the specified value. SetIcon is the write access specifier for the Icon property.

Use Icon to read or write the value in the property.

New icon for the notification form Gets the text for the notification form

GetText is a String function which gets the value of the Text label for the popup notification form. GetText is the read access specifier for the Text property. GetText returns the Caption for the corresponding TLabel on the popup notification form.

Use Text to read or write the value for the property.

Text for the notification form Sets the text for the notification form

SetText is a procedure which sets the text on the popup notification form to the specified value. SetText is the write access specifier for the Text property. SetText stores the specified value in the caption of the corresponding TLabel on the popup notification form.

Use Text to read or write the value for the property.

New text for the notification form Gets the title for the notification form

GetTitle is a String function which gets the title displayed on the popup notification form. GetTitle is the read access specifier for the Title property. GetTitle returns the value for the caption in the corresponding TLabel on the notification form.

Use Title to read or write the value in the property.

Title for the notification form Sets the title for the notification form

SetTitle is a procedure which sets the value for the title on the popup notification form. SetTitle is the write access specifier for the Title property. SetTitle stores the specified value in the caption of the TLabel for the popup notification form.

Use Title to read or write the value for the property.

New title for the notification form Gets the Visible property for the notification form

GetVisible is a Boolean function which gets the value for the Visible property in the popup notification form. GetVisible is the read access specifier for the Visible property.

Use Visible to read or write the value for the property.

Value of the Visible property for the notification form Sets the Visible property for the notification form

SetVisible is a procedure which sets the value in the Visible property for the popup notification form. SetVisible is the write access specifier for the Visible property.

Use Visible to read or write the value for the property.

Use Show or ShowAtPos to display the popup notification form for the component. Use Hide to close the popup notification form for the component.

New value for the Visible property in the notification form Sets the OnClose event handler for the notification form

GetOnClose is a TCloseEvent function which gets the OnClose event handler assigned to the popup notification form. GetOnClose is the read access specifier for the OnClose property.

Use OnClose to read or write the value for the property.

Value for the OnClose event handler in the notification form Sets the OnClose event handler for the popup notification form

SetOnClose is a procedure which sets the OnClose event handler in the popup notification form to the specified value. SetOnClose is the write access specifier for the OnClose property.

Use OnClose to read or write the value in the property.

New event handler assigned to OnClose in the notification form Form which displays the popup notification

vNotifierForm is a public TNotifierForm member which represents the form used to display the popup notification. vNotifierForm is instantiated in Create but not displayed; its Visible property is set to False. vNotifierForm is displayed using the Show or ShowAtPos methods. Use the Hide method to hide the form. vNotifierForm is freed in the Destroy method.

Constructor for the component instance

Create is the constructor for the component instance. Create calls the inherited constructor using AOwner as the owner for the component instance. Create allocates resources needed for the vNotifierForm member, and sets the forms Visible property to False.

Owner of the component instance Frees the component

Destroy is the destructor for the component instance. Destroy calls the Hide method for the popup notification form, and frees the the vNotifierForm member. Destroy calls the inherited destructor prior to exiting from the method.

Hides the popup notification form

Hide is a procedure which hides the popup notification form for the component. Hide calls the Hide method in VNotifierForm.

Displays the popup notification

Show is a procedure which displays the popup notification form for the component. Show calls the Show method in vNotifierForm.

Displays the popup notification form at the specified position

ShowAtPos is a procedure which displays the popup notification form at the specified position on the screen. Values in X and Y are corrected to fit the screen dimensions, similar to the mechanism used for TPopupMenu. ShowAtPos calls the Show method in vNotifierForm to display the popup notification form.

Horizontal position for the notification Vertical position for the notification Color for the popup notification form

Color is a TColor property that provides access to the Color property in the popup notification form. GetColor is the read access specifier for the property. SetColor is the write access specifier for the property.

Icon for the popup notification form

Icon is a TPicture property that provides access to the Icon for the popup notification form. GetIcon is the read access specifier for the property. SetIcon is the write access specifier for the property.

Text for the popup notification form

Text is a String property that provides access to the text for the popup notification form. GetText is the read access specifier for the property. SetText is the write access specifier for the property.

Title for the popup notification form

Title is a String property that provides access to the title for the popup notification form. GetTitle is the read access specifier for the property. SetTitle is the write access specifier for the property.

Value for the Visible property in the popup notification form

Visible is a Boolean property that provides access to the Visible property for the popup notification form. GetVisible is the read access specifier for the property. SetVisible is the write access specifier for the property.

OnClose event handler for the popup notification form

OnClose is a TCloseEven property that provides access to the OnClose event handler for the popup notification form. GetOnClose is the read access specifier for the property. SetOnClose is the write access specifier for the property.

Not used in the current implementation

BGDrawn is a Boolean constant with the value False.

BGDrawn is not used in the current implementation.