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.

This file is part of the Lazarus Component Library (LCL).

Button states for the pop-up 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 on the pop-up notification form.TNotifierForm provides methods which paint, hide, and handle resizing for the form.

Label with the Title for the form.
Label with the Text for the form.
Image with the Icon for the form.
Custom 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.

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 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.

Draws the form background and icon image.

Paint is an overridden method in TNotifierForm used to render the form to its Canvas using values in the Color and ImgIcon properties. Canvas is updated with the brush style and color needed, and its FillRect method is called to paint the background for the form. The bitmap in ImgIcon is drawn on the Canvas when it has been assigned.

Paint re-implements the method, and does not call the inherited method.

Implements a pop-up notification component.

TPopupNotifier is a TComponent descendant which implements a pop-up 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 pop-up 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 pop-up 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 pop-up 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 pop-up 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 pop-up notification form. GetText is the read access specifier for the Text property. GetText returns the Caption for the corresponding TLabel on the pop-up 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 pop-up 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 pop-up 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 pop-up 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 pop-up 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 pop-up 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 pop-up 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 pop-up 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 pop-up notification form for the component. Use Hide to close the pop-up 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 pop-up 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 pop-up notification form.

SetOnClose is a procedure which sets the OnClose event handler in the pop-up 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 pop-up notification.

vNotifierForm is a public TNotifierForm member which represents the form used to display the pop-up 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 pop-up notification form, and frees the the vNotifierForm member. Destroy calls the inherited destructor prior to exiting from the method.

Hides the pop-up notification form.

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

Displays the pop-up notification.

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

Displays the pop-up notification form at the specified position.

ShowAtPos is a procedure which displays the pop-up 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 pop-up notification form.

Horizontal position for the notification.
Vertical position for the notification.
Color for the pop-up notification form.

Color is a TColor property that provides access to the background color for the pop-up notification form. GetColor is the read access specifier for the property. SetColor is the write access specifier for the property.

Icon for the pop-up notification form.

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

Text for the pop-up notification form.

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

Font used for the Text displayed on the form.

TextFont is a TFont property with the font face used for the Text displayed on the form. Changing the value for the property causes the font to be assigned to the TLabel instance used to display the value in Text.

Title for the pop-up notification form.

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

Font used for the Title displayed on the form.

TitleFont is a TFont property with the font face used for the Title displayed on the form. Changing the value for the property causes the font to be assigned to the TLabel instance used to display the value in Title.

Value for the Visible property in the pop-up notification form.

Visible is a Boolean property that provides access to the Visible property for the pop-up 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 pop-up notification form.

OnClose is a TCloseEven property that provides access to the OnClose event handler for the pop-up 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.
Registers components for use on the Lazarus IDE component palette.

Register adds the following components to the Lazarus IDE component palette:

Common Controls Tab

- TPopupNotifier