Contains the TPopupNotifier visual component.

The following controls are added to the component palette in the Lazarus IDE:

Common Controls Tab

  • TPopupNotifier
Please note that ExtCtrls has a dependency on the popupnotifier unit; circular dependencies between popupnotifier and other units should be avoided.

popupnotifier.pas 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 for 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 private 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 close button using the Canvas for the control. Paint updates the Canvas with the pen and brush needed to draw the button in its current state. Canvas methods are called to draw the filled rectangle and "X" icon displayed on the close button.

Paint calls the inherited method prior to exit to signal the OnPaint event handler (when assigned).

TCustomControl.Paint TCustomControl.OnPaint
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.

THintWindow
Label with the Title for the form. Label with the Text for the form. Image with the Icon for the form. Custom close button for the form. Signals the OnClose event handler 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). 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.

TCustomForm.Hide
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 assigned as the event handler for the OnShow event in the form.

TCustomForm.OnShow
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 to ensure that a handle is allocated for the control.

CreateHandle ensures that font colors used in its TLabel instances are resolved, when needed. clDefault is converted to the value clInfoText in TNotifierForm.

TWinControl.CreateHandle
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 configures 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 and apply sizing constraints.

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 prior 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 and does not call the inherited method.

TCustomControl.Canvas TCanvas.FillRect TPicture.Bitmap TCustomForm.Color THintWindow.Paint
Implements a pop-up notification component.

TPopupNotifier is a TComponent descendant which implements a pop-up notification component. TPopupNotifier includes an internal TNotifierForm member which displays the Title, Text, Icon and the close button for the notification. TPopupNotifier provides methods needed to display or hide the notification 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. When the Application singleton has been assigned, its BidiMode property is applied to the notifier form instance.

THintWindow.BidiMode
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 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 form.

Show is a procedure which displays the pop-up notification form for the component. Show calls the Show method in vNotifierForm. The default values in its Left (0) and Top (0) properties are used.

Use ShowAtPos to display the form at specific coordinates.

Use the Hide method, or set Visible to False, to close the pop-up notification form.

TCustomForm.Show
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, and assigned to the Left and Top properties in the form. ShowAtPos calls the Show method in vNotifierForm to display the pop-up notification form.

Use the Show method to display the pop-up notification form at its default position (0, 0).

Use the Hide method, or set Visible to False, to close 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 with 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.

TNotifierForm use clInfoBk as the default value for its Color property. Use this property to override the default color value in the pop-up notification form.

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

Use Icon to assign an image using one of the supported LCL formats to display on the pop-up notification form.

TPicture
Text for the pop-up notification form.

Text is a String property with 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.

Use TextFont to specify the typeface and style attributes used to display the value in Text.

Use Title and TitleFont for the title text displayed on the pop-up notification form.

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.

Use TitleFont to set the font face and style used for the Title on the pop-up notification form.

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

Use TitleFont to set the typeface and style attributes used to display the value on the pop-up notification form.

Use Text and TextFont for the text displayed on the pop-up notification form.

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.

Use TextFont to set the typeface and style attributes for the Text displayed on the pop-up notification form.

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.

Setting Visible to False is the same as calling the Hide method.

TCustomForm.Hide TCustomForm.Visible
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.

TCustomForm.OnClose TCloseEvent
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