Contains types and classes used to implement Forms, which are the basis for the Lazarus Graphical User Interface The type of a procedure that takes no arguments The type of a method that takes no arguments Represents the Position and Size of a Form on Screen

poDesigned - The Form appears exactly as it is positioned and sized in the Form Designer

poDefault - The window manager decides how the form is to appear, in a default position and size

poDefaultPosOnly - keeps the Designed size, but position determined by windowmanager

poDefaultSizeOnly - keeps the Designed position, but size determined by windowmanager

poScreenCenter - Centers the form on screen

poDeskTopCenter - Centers the form on desktop

poMainFormCenter - Centers the Form on the Main Form

poOwnerFormCenter - Centers the Form on Owner form

poWorkAreaCenter - Centers the Form on working area

The Form appears exactly as it is positioned and sized in the Form Designer. The window manager decides how the form is to appear, in a default position and size. Keeps the designed form size, but position determined by windowmanager. Keeps the designed form position, but size determined by windowmanager. Centers the form on screen. Centers the form on the desktop (not recommended, use poScreenCenter). Centers the form on the Main Form Centers the form on its Owner form Represents the actual State of the window on the screen

The actual meaning of each value depends on the platform:

Windows and Mac OS X
These operating systems support all values.
X11
The window state is a hint sent to the Window Manager, so more primitive Window Managers might ignore these hints.
Windows CE
In Windows CE platforms where Application.ApplicationType = atKeyPadDevice or atPDA (like in Windows Phone, PocketPC and Windows Mobile), wsMinimized and wsNormal are understood as wsMaximized, which is the normal state for windows in this platform. An exception are windows with BorderStyle=bsDialog or bsNone, which are allowed to have a custom position and size. For more information please read http://wiki.lazarus.freepascal.org/Windows_CE_Development_Notes#Positioning_and_size_of_Dialogs_and_Forms
Android
In this platform windows are always fullscreen.

The valid values for this enumerated type are:

wsNormal
The window appears normal
wsMinimized
The window is minimized and is not shown in the screen, but only in the taskbar
wsMaximized
The window appears maximized
wsFullScreen
The window appears in full screen mode, as much as allowed by the platform
Neither maximized nor minimized The window is minimized and is not shown in the screen, but only in the taskbar The window appears maximized. The exact behavior is up to the window manager, but usually the window appear occupying all of the work area of a monitor. to the full monitor? The window appears in full screen mode, when allowed by the platform. It will, for example, attempt to appear on the top of taskbars and other static platform user interface elements. ? What should happen when a form is closed TCustomForm.OnClose Do nothing The form is hidden The form is destroyed The form is minimized Action taken when a new value is assigned to , and no OnHint handler is available !? The new Hint text The orientation of a ScrollBar Horizontal scrollbar Vertical scrollbar The range of scrollbar increments Scrollbar style flags Default what's this? Scrollbar appears flat Scrollbar sends HotTrack messages Not used in the current LCL version. Class for exception in Type of a scrollbar in a

Scrollable controls supply their own integrated scrollbars, one for horizontal and one for vertical scrolling. This class allows access to (one of) these integrated scrollbars.

A scrollable control has both a physical (visible) client size, and a logical (virtual) client size.

The Range property reflects the total virtual client size, in pixels.

The Page property corresponds to physical (visible) client size, in pixels, excluding the scrollbars. It also determines the size of the slider, relative to the total Range.

The Position property reflects the virtual origin of the visible client area, equivalent to the top coordinate of the slider. The Position can be changed by the user or by code.

Scrollbars usually appear only when Range is higher than Page, i.e. when not the entire content can be shown at the same time. See the ScrollBar property of the scrolling control for details.

The virtual scroll range (FRange - ClientSize), at least zero (never negative) The associated The Handle of the associated The handle for the associated control The AutoScroll state of the associated Please note: GetAutoScroll is not used as the read access specifier for the AutoScroll property. It is used in methods to ensure that the class reflects the current state for its associated Control. True when the Control for the class instance has set its AutoScroll property True when the associated has a handle allocated Determines the scrollbar Range, using the physical and virtual size for the associated control Notifies the associated Control of changes Checks and updates the new range for scrollbars in the Control Handler for the ScrollBar movement messages Message examined in the method New value for the property New value for the property New value for the property New value for the property New value for the property New value for the property New value for the property New value for the property Updates the state and position for the scroll bar in the associated Control

UpdateScrollBar is a procedure used to update the state and position for the scroll bar in the associated Control.

When Control is a TScrollingWinControl instance, TScrollInfo is captured using the Range, Position, and Page properties. The scroll bar information is applied to the associated control by calling SetScrollInfo.

Please note: TScrollInfo values are not applied when a handle has not been allocated for the control, or when Control is not a TScrollingWinControl class instance.

UpdateScrollBar calls SetPosition to apply the current value in Position to a visible scroll bar in the class instance. When Control is a TScrollingWinControl instance, the Smooth property is used to determine if Increment needs to be adjusted to a value that is 10% of the Page size for the control.

UpdateScrollBar is used in the implementation of the ControlUpdateScrollBars method.

Renders scroll information invalid for the control usage? Get the horizontal scrollbar for the Control Get the vertical scrollbar for the Control Scrollbar for the control, or Nil when not a TScrollingWinControl descendant Determines whether a scrollbar is required True when Visible and Range higher than Page Creates a scrollbar object for AControl TObject.Create The windowed control in which the scroll bar is found The scrollbar orientation If Source is a TControlScrollBar, copies properties to itself, else performs inherited Assign

Assigns the contents of the source object to the current object; in particular finds the increment, position, range and whether smooth scrolling is to be feature and whether the scroll bar is visible.

Determines the current widget state True if scrollbar is visible The scroll Position, zero if not Visible The scroll Position, zero if not Visible Get the ScrollBar of the opposite direction (horz/vert) The currently remaining extent of the Parent Control, depending on ScrollBar visibility return for vertical scrollbar the clientwidth for vertical scrollbar the clientwidth The remaining extent of the Parent Control, when the ScrollBar is visible Return for vertical scrollbar the clientwidth with the bar, even if Visible=false. For vertical scrollbar the clientwidth with the bar, even if Visible=false The remaining extent of the Parent Control, when the ScrollBar is not visible. Return for vertical scrollbar the clientwidth without the bar, even if Visible=true. For vertical scrollbar the clientwidth without the bar, even if Visible=true The small Position increment, applicable to the scrollbar arrows The amount by which the Position moves if the triangle at either end of the bar is selected. The default value is 8 (pixels). The orientation for the scroll bar: horizontal or vertical The slider size, position increment applicable to the scrollbar area beneath the slider

The amount by which the scroll indicator moves if the cursor selects the scroll bar above, below or on either side of the scroll indicator. The default value is 80 (pixels).

Position of the slider, 0..Range-Page

The Position reflects the top coordinate of the slider, which is Range-Page when the slider is at the bottom of the bar.

Enables smooth scrolling, with automatic adjustment of Increment and Page. Smooth scrolling uses an Increment of 10%, and a Page size of 90% of the visible client area. ? The virtual size of the Parent Control The adjustable size of the scroll bar

The length of the bar is the Width (or Height) of the Parent Control, the Size is the other (free) coordinate.

Gives feedback while the slider is dragged

When it takes an significant amount of time, to repaint the parent control at a new position, Tracking should be False to prevent flicker; then the control is updated only when the slider is released.

Definitely hides the scrollbar when False (default True)

The scrollbar widget is visible only if (Visible=True) and (Range>Page).

Set Visible to False to disallow the user to scroll the content, while the content still can be scrolled by code.

Use IsScrollBarVisible to get the current visible state of the widget.

Class of a windowed control with incorporated scroll bars

This class introduces a logical (virtual) client area, part of which is visible in the physical (visible) client area. ScrollBars allow the user to scroll through the logical client area.

Prevents recursive updates, True while an update is already in progress Also calculates sizes for the scrollbars if required TWinControl.AlignControls Indicates if automatic scrolling is enabled for the control

AutoScrollEnabled is a Boolean function which indicates if automatic scrolling is enabled for the control. The return value is True when the control is NOT automatically resized, or used as a docksite by an active docking manager.

Use the AutoSize property to enabled or disable automatic control resizing. Set the UseDockManager property to False to disable use of the DockSite for the control.

True when not automatically resized or used as a dock site Sets or resets the ranges used for scrollbars in the control Used in the implementation of the ComputeScrollbars method. The virtual origin of the physical client area TControl.GetClientScrollOffset The ScrollBar Positions, or (0,0) if no scrollbars in use Returns the full virtual ClientRect. TControl.GetLogicalClientRect Also updates scrollbars if needed TControl.DoOnResize Calculates the size of the client area for the control excluding visible scroll bars Width of the client area Height of the client area Performs actions needed to handle WMSize messages

WMSize is a procedure used to perform actions needed to handle WMSize messages for the control. WMSize calls the inherited WMSize method to set the bounds for the control, optionally using the bounds from the parent control.

WMSize provides support for setting the window state based on size messages that originate in the LCL interface, and calls Resizing to realize the new window state.

Message examined in the method Delegates scroll messages to the horizontal ScrollBar Delegates scroll messages to the vertical ScrollBar Updates Page, AutoRange, IsScrollBarVisible, returns True on changes True when something has changed Also initializes the scroll bars TWinControl.Loaded Performs actions needed when the control processes the WMSize message

Resizing is an empty implementation in TScrollingWinControl. It must be implemented in descendent form or control classes.

Allows ScrollBars to be displayed only when needed (when True) New value for the property Owner of the class instance Destructor for the class instance

Destroy is the overridden destructor for the class instance. Destroy frees resources allocated for the HorzScrollBar and VertScrollBar properties. Destroy calls the inherited destructor prior to exiting from the method.

Initializes or updates the ScrollBars for the control Ignores recursive calls. Tells the widget to scroll the client area relative The still visible part doesn't deserve a repaint (optimization). Control which provides the bounds adjusted in the method The horizontal scroll bar (LCL control) The vertical scroll bar (LCL control) Implements a windowed control with scroll bars

TScrollBox is a TScrollingWinControl descendant that implements a windowed control with scroll bars. TScrollBox sets the visibility for properties inherited from the ancestor class. TScrollBox includes an overridden constructor which sets the default values for properties in the class instance.

Owner for the class instance Provides a designer surface for scaling and layout of its child controls

TCustomDesignControl is a TScrollingWinControl descendant which provides a designer surface used for scaling and layout of its child controls.

Properties are provided to set the display density (Pixels Per Inch) for design-time and run-time usage, and to Scale child controls. Methods are also provided to use TLayoutAdjustmentPolicy to layout and to re-size the child controls.

An overridden Loaded method is provided to adjust the design-time PPI (when scaling is enabled in the application).

TCustomDesignControl is used as the ancestor for TCustomFrame and TCustomForm, and is the type used for the ParentForm property in TControl and its descendants.

Sets the value for the DesignTimePPI property New value for the property Sets the value for the Scaled property New value for the property Applies size and layout changes to the design surface and its Parent control

DoAutoAdjustLayout is a procedure used to perform actions needed to apply size and layout changes to the design surface and its Parent control.

DoAutoAdjustLayout adjusts the height and width for the design surface by the specified scaling factors. Similarly, the BorderSpacing and Constraints in the control are adjusted using the scaling factors. Finally, the SetBounds method is called to apply the new values for Height and Width to the design surface.

Please note: No actions are performed in the method when the Parent property has not been assigned (contains Nil). In addition, no actions are performed when AMode omits the lapAutoAdjustWithoutHorizontalScrolling and lapAutoAdjustForDPI enumeration values.
TLayoutAdjustmentPolicy applied in the method Horizontal scaling factor applied in the method Vertical scaling factor applied in the method Constructor for the class instance

Create is the overridden constructor for the class instance. Create calls the inherited method using the value in TheOwner as the the owner of the class instance. Create sets the default values for the following properties:

  • Scaled
  • DesignTimePPI
  • PixelsPerInch

When scaling is enabled in the Application, the value in DesignTimePPI is used as the PixelsPerInch setting in the Font property.

Owner of the class instance Applies a new display density (Pixels Per Inch) for a layout policy to the control

AutoAdjustLayout is used to set the value in the PixelsPerInch property to the value specified in AToPPI for the lapAutoAdjustForDPI layout policy. AutoAdjustLayout calls the inherited method.

No additional actions are performed in the method when AMode contains a value other than lapAutoAdjustForDPI.
Layout policy to use for the design surface Original display density setting New display density setting Original form width New form width Design-time Pixels Per Inch for the designer surface

DesignTimePPI is an Integer property that contains the display density (or Pixels Per Inch) used on the designer surface. The default value for the property is 96 (pixels).

The property value is normally set when the component is loaded using the LCL streaming mechanism. It can be assigned at design-time to the value in ADesignTimePPI only when the new value matches the display density for the current Screen where the designer surface is used. The value can be changed at run-time, but the programmer must ensure that the value is valid for the intended usage.

An EInvalidOperation exception is raised if an invalid value is specified at design-time.

When scaling is enabled in the Application, the value in DesignTimePPI is assigned to the Font for the designer surface.

Use PixelsPerInch to access the run-time display density for the designer surface.

Run-time Pixels Per Inch for the designer surface Indicates if the design surface is scaled to reflect changes in display density (Pixels Per Inch) The base type for TFrame

TCustomFrame is a TCustomDesignControl descendant which implements the base class for TFrame. A Frame is a named container for related components. Groups of controls can be place on a frame, and re-used in your applications.

A Frame has behavior very similar to a Form. Their unique ability is that they can be embedded into forms or other frames in the designer. Like forms, they are stored in two separate files: the code is stored in a .pas unit file, and the design is stored in a .lfm file.

Frames can be created and designed in the Lazarus IDE by creating a new Frame module, and using the unit in your application. An existing frame can be added using the TFrame component on the Standard tab in the Lazarus IDE; you will be prompted for the TFrame class to use for the component.

Frames can also be created entirely in code at run-time. They do not have to be installed in the Lazarus IDE. One drawback is that complex inheritance hierarchies for TFrame classes can be problematic; they do not propagate changes to all derived frames in a multi-level inheritance tree.

Adds the specified list of Actions to the Parent form for the frame class Please note: No actions are performed in the method when a Parent form has not been assigned for the class instance. List of Actions added in the method Removes the specified list of Actions from the Parent form Please note: No actions are performed in the method when a Parent form has not been assigned for the class instance. List of Actions removed in the method Implements reading the Left property for the designer surface Implements reading the Right property for the designer surface Implements writing the Left property for the designer surface Implements writing the Top property for the designer surface Invokes Proc for all Controls and also for all Components without a Parent TComponent.GetChildren TWinControl.GetChildren The callback method Components are enumerated only if Root=Self Also handles add/remove of ActionLists TComponent.Notification TControl.Notification Component for the notification Operation for the notification Sets the value for the Parent property Also updates the ActionLists, and performs automatic layout adjustments when needed. Value assigned to the Parent property Constructor for the class instance

Create is the overridden constructor for the class instance. Create calls the inherited method using AOwner as the owner for the class instance. Create sets the ControlStyle property to the following enumeration values:

  • csAcceptsControls
  • csCaptureMouse
  • csClickEvents
  • csSetCaption
  • csDoubleClicks
  • csParentBackground

Create uses the default size for its class type to set the initial bounds for the control.

Raises an EResNotFound exception at run-time if the ClassType for the class instance is not derived from TFrame.
Owner of the class instance Frames can be designed like Forms and used like custom controls, without much coding or installation in the IDE.

TFrame is a TCustomFrame descendant which implements a named container for related components. Groups of controls can be place on a frame, and re-used in your applications.

A Frame has behavior very similar to a Form. Their unique ability is that they can be embedded into forms or other frames in the designer. Like forms, they are stored in two separate files: the code is stored in a .pas unit file, and the design is stored in a .lfm file.

Frames can be created and designed in the Lazarus IDE by creating a new Frame module, and using the unit in your application. An existing frame can be added using the TFrame component on the Standard tab in the Lazarus IDE; you will be prompted for the TFrame class to use for the component.

Frames can also be created entirely in code at run-time. They do not have to be installed in the Lazarus IDE. One drawback is that complex inheritance hierarchies for TFrame classes can be problematic; they do not propagate changes to all derived frames in the entire inheritance tree.

TFrame contains a new property which indicates the LCL (Lazarus Component Library) version number used in the container. An overridden constructor is also introduced to initialize the value in the LCLVersion property. TFrame sets the visibility for properties defines in ancestor classes.

Owner of the class instance Visual elements in window title bars; depends on window manager support.
biSystemMenu
The form has a System menu (Maybe not all windowmanager supports this)
biMinimize
The form has an minimize button
biMaximize
The form has a maximize button
biHelp
When you click this button a Question Cursor appears, and the help routines are called if you click on an control
Window has a system menu Window has an Minimize button Window has an Maximize button Window has an Help button The preferred monitor for showing a form

When a form is not assigned to a specific monitor, assume the following display context:

dmDesktop
No attempt to choose specific monitor
dmPrimary
On the primary monitor
dmMainForm
On the same monitor as the main form; if there is no main form then use dmPrimary behavior
dmActiveForm
On the same monitor as the currently active form; if there is no active form then use dmMainForm behavior
Place the form on the full desktop Place the form on the primary monitor Place the form on the same monitor as the main form. If there is no such form then use the primary monitor. Place the form on the same monitor as the currently active form. If there is no such form then use the primary monitor. Form state flags

The form states are:

fsCreating
initializing (form streaming)
fsVisible
form should be shown
fsShowing
form handling WM_SHOWWINDOW message
fsModal
form is modal
fsCreatedMDIChild
not yet implemented
fsBorderStyleChanged
border style changed before window handle creation
fsFormStyleChanged
form style is changed before window handle creation
fsFirstShow
form is shown for the first time
fsDisableAutoSize
disable autosize
initializing (form streaming) form should be shown form handling WM_SHOWWINDOW message form is modal not yet implemented border style changed before window handle creation form style is changed before window handle creation form is shown for the first time disable autosize The set of form state flags Dummy type for the values that can be returned as a modal result

Even though the type is defined as an integer, only the defined constant values should be used (mrOK, mrCancel, et. al.).

TForm Notification handler types Notified on first form Show Notified on form Close Notified after form Create How a form is represented in the TaskBar Uses the default rules from the platform for showing the form in the TaskBar platform? Always show the form in the TaskBar Never show the form in the TaskBar Defines the handling performed for a parent window in forms and dialogs

TPopupMode is an enumerated type with values that specify how the parent is determined for a form or dialog. TPopupMode is the type used for the PopupMode property in TCustomForm.

modal: popup to active form or if not available, to main form; non-modal: no window parent

For modal windows, the handle has to be recreated in ShowModal. If this is not wanted, please use explicitly pmAuto before calling ShowModal.

modal and non-modal: popup to active form or if not available, to main form modal and non-modal: popup to PopupParent or if not available, to main form Type used for an OnClose event handler in a form

Closing a form can have several meanings:

caNone
Do nothing (don't close).
caHide
Hide the form (default for modal forms).
caFree
Destroy the form.
caMinimize
Minimize the form (MDI child default).

The handler can set CloseAction to the desired value for the action.

The form that received an Close request Set this to caNone, to prevent the form from closing Type of an form OnCloseQuery handler The form that received an Close request Set to False to deny closing ? Type used for an OnDropFiles event handler

TDropFilesEvent is an object procedure which specifies an event handler triggered when files are dropped on a drag and drop-enabled control.

TDropFilesEvent is the type used to implement the OnDropFiles property in TCustomForm and TApplication. Applications must implement a procedure using the signature for the event handler, and assign it to the property.

The control that received the dropped files The list of the dropped files Type used for an OnHelp event handler

THelpEvent is an object function which specifies an event handler signalled when Help is requested in an application or form. THelpEvent is the type used to implement the OnHelp event handler in TCustomForm and TApplication. Applications must implement a function using the signature for the event handler, and assign it to the property.

Indicates if the help request is satisfied by the event handler; False causes the default help handler for the application to be used Help command type requested; either HELP_CONTEXT or HELP_COMMAND Context data for the help request False suppresses help display Type used for an OnShortcut event handler

A shortcut handler is invoked when a key is pressed, before any other processing. It can interpret the key as an shortcut and act accordingly. In this case, Handled should be set to True to prevent further processing of the key.

The key event message Set Handled to True to prevent further processing of the key Specifies an event handler signalled when a modal message dialog is completed

TModalDialogFinished is an object procedure which specifies an event handler signalled when a modal message dialog is completed. The AResult argument contains the modal result constant returned from the message dialog.

TModalDialogFinished is the type used to implement the TCustomForm.OnShowModalFinished and TApplication.OnMessageDialogFinished properties.

TObject instance for the event notification Modal result value from the dialog The base type for TForm classes

TCustomForm is a TCustomDesignControl descendant that implements the base type for TForm classes.

Forms represent a window or a dialog used as the user interface for a GUI application. It is a container where visual components (such as buttons, labels, edit fields, images, etc.) can be placed. It is also a designer surface which provides design-time support for configuration and layout of the content placed on the form.

TCustomForm acts an abstraction layer which masks implementation-specific routines required for the various widget sets supported in the Lazarus Component Library (LCL). Methods and properties are provided which interact with the underlying Operating System or platform, and provide a common API for form-related operations.

Lists of installed Form notification handlers The last active control, used to detect focus changes Used to track Focus changes (Enter/Exit events) Tries to resolve stDefault in ShowInTaskBar using Application settings.

Calls ShowInTaskBar to get the visibility of an icon for the form.

When the return value is stDefault (or when called at design-time), the TaskBarBehavior property in Application is taken into consideration to get the actual return value. If the application displays a single button for the executable and its forms, the return value is set to stNever. If multiple buttons can be displayed in the task bar, the value stAlways is used. If the Application uses the value tbDefault, the value stDefault is retained in the return value.

Effect visibility for the form icon in the task bar Gets the value for the Monitor property Value for the property Indicates whether Form properties should be stored in the stream

IsForm is used as the storage specifier for selected properties in the class instance. Always returns True in TCustomForm.

True when the value for the various properties should be included in the LCL streaming mechanism Closes a modal form

CloseModal is a procedure which attempts to close a form that has been displayed by calling the ShowModal method.

CloseModal calls CloseQuery to determine the action performed in the method. When CloseQuery returns True, the close action is set to caHide and the OnClose event handler is signalled when assigned. Form handlers are notified of the close action.

When CloseQuery is False, the close action is used to determine how the request is handled. If the CloseAction is caNone, the value in ModalResult is set to 0 (zero). If the CloseAction is caFree, the Release method is called to allow the Application to free the form component.

If an exception occurs in the method, the value in ModalResult is set to 0 (zero) and the Application.HandleException method is called.

Please note: CloseModal does not forward the action to the widget set class; that is performed in the ShowModal method to ensure it is executed in the widget set class.
Destroys the form icons Loads the new form icons, and notifies the widget set and all forms Performs actions needed for delayed window move, resize, show, and activate messages

DelayedEvent are a mechanism used to reduce the number of move, resize, show, and activate messages that occur for forms and their child controls.

DelayedEvent discards duplicate calls to the method; only the most recent message is processed. It is used in conjunction with the QueueAsyncCall method in TApplication. DelayedEvent decrements an internal counter used to track the number of pending delayed event messages. When the counter reaches zero (0), the message is applied.

When WindowState is changed to wsNormal, the window origin or size is restored and DoOnChangeBounds is called. For delayed WMSize messages, the DoOnShow and/or Activate methods are called for the message.

DelayedEvent is used in the implementation of the WMSize and WMMove methods.

An integer pointer to the data for the event; not used in the current implementation Remembers the last focused control Called when the Focus changed ? Adds a form notification handler of the specified type Removes a form notification handler of the specified type Returns the first control in the form Tab order Called when the main menu has been changed Don't show a main menu for dialog forms, i.e. when BorderStyle=bsDialog (Delphi compatible). Notifies the widget set of the change what does Result=0 mean? FActionLists is a local variable holding lists of actions associated with the Form When a control is not Active, sets the Focus to the first control in the TabOrder for the form. Notifies the OnActivate handler Does nothing ? Excludes borders from the given rectangle TWinControl.AdjustClientRect Locks form updates (AutoSize), until EndFormUpdate Nested calls are allowed (pairs of Begin/EndFormUpdate). Creates the widget, updates the widget-dependent properties. TWinControl.CreateWnd TScrollingWinControl.CreateWnd Called when the form looses the focus. Notifies the OnDeactivate handler Notifies the form close handlers Notifies the form create handlers Notifies the OnDestroy handler Notifies the OnHide handler Notifies the OnShow handler Unlocks form updates; used with BeginFormUpdate When the update counter reaches zero, FormEndUpdated is invoked to realize the pending changes. Placeholder for exception handlers in derived classes By default the Application exception handler is invoked. True when the exception was handled Placeholder for exception handlers in derived classes By default the Application exception handler is invoked. True when the exception was handled Placeholder for exception handlers in derived classes By default the Application exception handler is invoked. True when the exception was handled Initializes the widget, also for AlphaBlend and AllowDropFiles Also renews ActiveControl and Visible Called after all child control handles are created. When this is a top level form (Parent=Nil) also invokes ParentFormHandleInitialized. TWinControl.ChildHandlesCreated Calls the user Alignment handler (AlignControls). Here: NOP for a top-level form. Performs actions needed when the form processes the WMSize message

Uses the value in State to determine the action required in the method. The LCL interface is used to detemine if the window state is valid for the widget set. When allowed, the following methods are called for the corresponding TWindowState value:

wsMinimized
Calls the Minimize method in Application, or Restore if the Form is already minimized

When the OnWindowStateChange event handler has been assigned for the form, it is signalled for the current class instance.

Window state applied in the method Here: clip width and height of a top-level form to the monitor WorkArea Here: Moves a top-level form in front or back of all forms True for BringToFront Moves the form to the initial Position Called when the widget visibility (Showing) is changed. Updates (and realizes?) all properties affecting the visual representation for the form. TWinControl.UpdateShowing New value for the property If the the form is about to show, calculate its metrics Notifies the FirstShow handlers UpdateWindowState is an empty implementation in TCustomForm An empty implementation in the current LCL version. Notifies all VisibleChanging handlers Notifies all VisibleChanged handlers Handled messages include: Activate, SetFocus, KillFocus, Exit, Enter, Window Position Changing, and DrawItem Adds the specified list of actions to the ActionList for the form Removes an ActionList List of actions removed in the method Loads resources needed for the form Calls InitResourceComponent to load form resources for the current form instance. Raises an EResNotFound exception if RequireDerivedFormResource is set for the application, and a resource is not found for the form. Checked BeginDrag Allow form dragging only if it is docked into a site without a DockManager. why? Here: returns the Caption Handler for ActionExecute messages Handler for ActionUpdate messages Asks all applicable components to execute an action

First, the ActiveControl and the Form itself are asked to execute the action. Then, all child components are tried. The search stops as soon as the action is handled.

True when the action was handled Action to execute Tries all applicable components to update an action DoExecuteAction True when the action was updated Asks all components to initiate their actions ? The Handle of the MDIForm client (container for MDI children) Owner for the class instance Creates a form without a resource Owner for the new class instance Here: ignored purpose? Destructor for the class instance

Destroy is the overridden destructor for the class instance.

Destroy ensures that unhandled queued asynchronous calls in the Application instance are removed for the form.

Destroy disables auto-sizing to prevent resize messages while the form is being freed. Destroy frees resources allocated for the form instance, including its Icon and any allocated icon handles. The form instance is removed from Screen, and its ActionLists are freed. Destroy frees all form handlers added to the class instance.

Destroy calls the inherited destructor prior to exiting from the method.

The Handle of the big form icon Closes the form

Close does not necessarily destroy the form. Modal forms only are hidden. When the MainForm is closed, the application terminates.

An OnCloseQuery handler can refuse to allow the form to close.

Asks the OnCloseQuery handler whether the form can close Updates ActiveControl if it is to be defocused The control that looses the focus True when the control is removed Ensures that the form is fully visible, and optionally brings it in front of all other forms Bring the form to front if True Focus the control. If needed bring form to front. If the control or one of its parents is not visible or disabled, an exception will be raised (in SetFocus). when? always? The control receiving the focus Indicates if the BeginFormUpdate method has been called without a corresponding EndFormUpdate method call

The method is used in TControl descendants to determine if the parent form for the control is already rendering changes to its content.

Returns True when the internal update counter for the form contains a positive non-zero value Makes a Bitmap image with the Form content The role(s) for the control in a modal form (default or cancel button) Gets the form that is the effective parent for the pop-up, dialog, or splash screen Form instance that is the parent for the pop-up form, or Nil for a splash screen Invokes the OnDropFiles handler of the form. This function is called by the LCL interface.

The drop files event will be invoked when the user drops one or more dragged files onto one of forms in the application. First this event should be fired for the target form (or main form if drop target is unknown), and then for the application instance.

Show help for control or menu item. This function is called by the LCL interface. Asks all applicable components to interpret a keystroke as a shortcut. Returns True when the specified Key and Message are active as a shortcut. True when the specified Key was handled as a shortcut. Extends or shrinks the form to a monitor The monitor to use, Nil means the design-time monitor If True then extend to the WorkArea for the monitor. Otherwise, clip the form to the monitor bounds. Returns True if AutoSize should be skipped or delayed because of a missing handle propagate back into TControl? Marks the form for destruction

Release is a procedure used to request destruction of the current form instance.

Release checks for a TApplication instance in the Application singleton. When it is assigned (contains a value other than Nil), its ReleaseComponent method is called to free the form instance by posting an asynchronous application message. When Application is not assigned, the Free method is called to destroy the form instance.

True when the form can receive focus

CanFocus is an overridden Boolean function which indicates if the form instance can receive focus. The return value is True when the form is Visible and Enabled, or the inherited CanFocus method returns True.

CanFocus is used in the implementation of various methods in the class, including: SetWindowFocus, UpdateShowing, SetActiveControl, and Loaded.

True when the form can receive focus in the application Handles focus switch to a control (enter/exit messages) False when no switching allowed ? The control that received the focus ? Sets the bounds for the restored control Temporarily goes into the normal (restored) window state, if required. Show this form as a modal Dialog

Shows the form in a modal state and waits until it is closed by the user or by the program. Modal state means that neither the user nor the program can switch to another form already made visible before calling ShowModal.

The form must have Visible set to False when calling ShowModal. The call does not return until the form is closed. The application switches to modal state until ShowModal has completed.

ShowModal creates its own event loop using ProcessMessages.

Raises an EInvalidOperation exception if the form cannot be displayed as a modal form.

The modal result for the dialog Shows this form in front of all other forms Returns (and eventually creates) the Handle of the small Form or Application Icon. Invokes Proc for all Controls and also for all Components with no Parent TComponent.GetChildren TWinControl.GetChildren The callback method Components are enumerated only if Root is Self Always returns False in TCustomForm ? Here: always False Adds a handler for the first Show of the form Removes a handler for the first Show of the form Adds a handler for form Close Removes a handler for form Close Adds a handler for form Create Removes a handler for form Create Returns the currently active MDI child form A non-nil result is returned only when FormStyle contains fsMDIForm or fsMDIChild; otherwise Result is nil. Nil if the form is neither an MDI host nor child Nil if caller isn't an MDI type or handle isn't allocated -1 if caller isn't an MDI form or handle is not allocated Sets scaled to True and AutoAdjustLayout to current monitor PPI Contains True when the form has the focus Use active to check if the form has the focus Specifies the active control on the form Use this to get or set the active control on this form. Specifies the Default control for the Form The Default control reacts on the Enter key pressed. Specifies whether files can be dropped onto this form

AllowDropFiles is a Boolean property which indicates whether this form receives an OnDropFiles event when files are dropped on form during a drag-and-drop operation.

Allows for a translucent form somewhat transparent? The translucence level for the form (0=transparent, 255=opaque) Indicates if the form can automatically show or hide scroll bars

AutoScroll is a Boolean property which indicates if the form can automatically show or hide its scroll bars. Set AutoScroll to True to enable scroll bars when the form size does not allow display of its content in its entirety. AutoScroll can only be True when the BorderStyle for the form is bsSizeable or bsSizeToolWin, and may be changed to False at run-time when setting the value in the BorderStyle property to another value.

Specifies which icons appear in the title bar of the form The icons can represent a system menu, minimize/restore/maximize and close buttons, and an What's this button. The border style affects the title bar, border and resize behavior of the form.

Use borderstyle to get or set the appearance of the form's border.

By default it is a sizeable window, but it could, for example, be a dialog form or a tool window, or could be non-sizeable.

This property is slightly different (has a different base type) from the TCustomControl.BorderStyle property. When the form is put into another control the window borders depend on the widget set. There are no borders under GTK.

The control associated with the Cancel action

Determines the control associated with the Cancel action (exit from the modal form without changing anything).

This is usually a button with the caption 'Cancel', but might be an 'Exit' button or anything else the application programmer decides.

This control is selected either by explicitly clicking with the mouse, or by hitting the 'Esc' key.

The text appearing in the title bar The background color for the form The form's background color. The control associated with the default action for this form

This is typically a button such as 'Accept' which is highlighted in some way on-screen to indicate that this is the default action, and is selected either by hitting 'Return' or 'Enter' or by selecting that control with the mouse.

The monitor on which the form will appear

Possible values:

dmDesktop
No attempt to choose specific monitor.
dmPrimary
On the primary monitor.
dmMainForm
On the same monitor as the main form. If there is no main form then use dmPrimary behavior.
dmActiveForm
On the same monitor as the currently active form. If there is no active form use dmMainForm behavior.
The designer object when the form is in design state Value from ShowInTaskBar adjusted for the default taskbar behavior in the application Various state flags for the form Indicates the style for the form

Possible values:

fsNormal
Usual style.
fsStayOnTop
Form is positioned above all application's forms, except those which have fsStayOnTop style.
fsSystemStayOnTop
Form is positioned above all OS windows, except other OS top-level windows.
fsSplash
Form is border-less.
fsMDIForm
MDI parent form.
fsMDIChild
MDI child form.
The name of the help file for the form The Icon associated with this Form (in minimized state) Allows the form to intercept keystrokes in child controls Provides indexed access to MDI child forms, when this is an MDI form Ordinal position for the MDI Child form requested The main menu for this form Drop a TMainMenu on the form to store it here and to show it on the form. Specifies the return value for a modal form (or dialog) The Monitor where the form is shown Tracks changes in the focus for the active form or the control on the current form

LastActiveControl is a read-only TWinControl property used to track a change in the focus for the active form or the control on the current form instance. It is updated when changes are made to the ActiveControl property, or in the SetFocusedControl method.

Defines where popup menus are shown ??? Parent form which owns the current form instance when displayed as a pop-up window

PopupParent is a TCustomForm property which contains the parent form which owns the current form instance when displayed as a pop-up window.

Setting a new value for the property causes the existing pop-up parent form to be removed from the free notifications for the application. A new non-Nil pop-up parent is added to the free notification list, and its PopupMode property is set to pmExplicit.

At run-time, the widget set class is notified of the change in the PopupParent property. The notification is not performed at design-time.

Handler called when the form receives focus

This handler is called when the form receives focus for the first time at application start up, and then subsequently each time focus is changed from another window for the same application to this window.

For focus changes between different applications, the Application.OnActivate event handler is called instead.

TApplication.OnActivate
Handler called when the form is closed. It determines what happens to the form (destroy, hide...). Handler called before the form is closed. It can reject an close request.

An OnCloseQuery handler can check for unsaved information, ask the user whether it's okay to save or discard changes, or simply reject the close request.

Handler called when the form has been created Handler called when the form is deactivated (lost focus) Handler called when the form is destroyed Handler called when files have been dropped You enable this feature by setting AllowDropFiles property. Handler called when Help is requested Handler called when the form is being hidden Handler called when a key is pressed, before further handling of the key The handler can interpret the key as an shortcut and act accordingly. Handler called when the form becomes visible Event handler signalled when modal display of the form has been completed

OnShowModalFinished is a TModalDialogFinished property that implements the event handler signalled when modal display of the form has been completed. An application must implement an object procedure using the signature in TModalDialogFinished, and assign it to the property to respond to the event notification.

Is this a remnant? Not used in ShowModal or CloseModal. It does not appear to be used anywhere in the current LCL version.
Handler called when the form is minimized, maximized or restored The initial placement of the form By default it is in the position that it was placed in the Form Designer The position of the left edge of the form when it is restored (i.e. changes from minimized or maximized) The position of the top edge of the form when it is restored (i.e. changes from minimized or maximized) The width of the form when it is restored (i.e. changes from minimized or maximized) The height of the form when it is restored (i.e. changes from minimized or maximized) How the form is represented in the system Task Bar Whether the form is currently minimized, maximized or normal (restored). Default is 'normal' (i.e. not minimized nor maximized) WSRegisterClass is an overridden class procedure used to register the widget set class used to create new instances of the form. Arranges MDI child forms so they overlap Activates the next child MDI form (fsMDIChild) in the form sequence Activates the previous MDI child form in the form sequence Arranges MDI child forms side by side The version of the LCL as string. Used to distinguish form streams using different versions of the LCL Class of TForm A floating DockSite, usable to make TControls float Makes the client occupy the entire client area (alClient) Closes (releases) the form after the last client has been undocked Disallows docking of an second client Tries to make all child controls dockclients. This is of little use in practice, a floating hostdocksite should have no child controls. Owner for the class instance The popup box containing helpful information that appears when the mouse pointer hovers over an object

Usage:

HintWindow := THintWindow.Create(nil); Rect := HintWindow.CalcHintRect(0,'This is the hint',nil); HintWindow.ActivateHint(Rect,'This is the hint');
True during ActivateHint The timer used to make the hint disappear Adjusts HintRect to fit on the current monitor Used in the implementation of the OffsetHintRect method. Indicates that the width for HintRect should not be decreased Indicates that the height for HintRect should not be decreased Collects the flags for Draw Text formatting

Returns a Cardinal value that contains the Draw Text flags needed for the Alignment and BiDiMode used in the hint window.

Draw Text flags for the hint window New value for the property Hides the hint window when the hint timer has expired

Called when the hint timer expires. Ensures that the internal hint timer is disabled. Hides the hint window by setting the Visible property to False.

New value for the property Sets the value for the HintRectAdjust property New value for the property Treats the whole window as transparent Sets the bounds for the hint window and configures the auto-hide timer

Sets the bounds for the hint window to the values in the HintRect property, and makes the window Visible. The internal auto-hide timer is enabled when AutoHide contains True.

Called from the ActivateHint method.

Updates the Window Region fir the hint window

UpdateRegion calls the SetWindowRgn routine to set the window region for the hint window. The window region contains the area where the system can perform drawing operations; no area outside of the window region can be updated.

Please note: SetWindowRgn requires access to the Handle for the hint window; no actions are performed in the method when HandleAllocated returns False.

When UseBGThemes is enabled, ThemeServices are used to get the theme element details needed for the client rectangle in the hint window.

Sets the value for the Color property New value for the property Indicates if a background from theme services is used when drawing the hint window True when ThemeServices are used for the background Indicates if theme services are used for the foreground rendered for the hint window True when ThemeServices are used to draw the foreground for the hint window System font used to draw text in the hint window TFont instance for the system font provided by the widget set Destructor for the class instance

Destroy is a class destructor. Destroy ensures a reference to the System Font used for hint windows is freed.

Constructor for the class instance

Create is the overridden constructor for the class instance. Create calls the inherited CreateNew constructor, and allocates resources needed in the class instance. This includes an internal timer used when AutoHide is set to True.

Create sets the default values for the following properties:

Parent
Set to Nil
Color
Set to clInfoBk
Font
Uses the Screen.HintFont
Canvas
Uses the brush style bsClear
Alignment
Set to taLeftJustify
BorderStyle
Set to bsNone
Caption
Set to an empty string ('')
HideInterval
Set to 3000 milliseconds (3 seconds)
AutoHide
Set to False

Create uses the default size from the class type for the control to set the initial bounds for the hint window.

Owner of the class instance Shows the specified hint

ActivateHint is an overloaded procedure used to display the Hint text specified in AHint. An overloaded variant allows the display area for the hint window to be specified in the ARect argument.

Please note: No actions are performed in the method if ActivateHint has been previously called with the same hint text and display area.
Text displayed in the hint window TRect with the display area for the hint window Sets the bounds in HintRect and activates the hint window

ActivateWithBounds is a procedure used to update the location and text for the hint window. ActivateWithBounds sets the value in HintRect to the value in the ARect argument. ActivateWithBounds calls ActivateHint using the value in AHint as the text displayed in the hint window.

Rectangle with the bounds assigned to HintRect Text displayed in the hint window An extended version of ActivateHint with additional data used for the hint display

ActivateHintData is an extended version of ActivateHint. It provides the additional AData argument which contains a pointer to values which can be used to construct the text displayed in the hint window.

The implementation in THintWindow does not use the values in AData. The method must be overridden in a descendent class to use the additional hint data in AData.

Display rectangle for the hint text Text displayed in the hint window Pointer to additional data used to construct the hint text Determines the rectangle required for the hint display

CalcHintRect determines the display rectangle required for the hint display. CalcHintRect uses the larger of the values in the length of the hint text, and the width of the hint window.

Display area needed for the hint display Greater than zero, otherwise the full monitor width is used Hint text used to derive the display area Pointer to additional data used to construct the hint text Moves the hint rectangle by the specified amounts True when the hint rectangle was successfully moved by the specified amounts TPoint with the horizontal and vertical offets for the hint display Additional vertical offset applied to the hint rectangle Indicates the width for the hint rectanlge must be maintained Indicates the height for the hint rectanlge must be maintained Indicates if the specified message is relevant to a hint window display Destroys an allocated handle for the widget Text alignment used for the hint window

Alignment is a TAlignment property that indicates the alignment used for the text displayed in the hint window.

The default value for the property is taLeftJustify, as assigned in the Create constructor. The value in Alignment is used to derive the draw text flags required for the BidiMode in the hint display, and passed to to DrawText routine in theme services or widget set classes.

Contains the bounds used to display the text for the hint

HintRect is a TRect property which contains the bounds used to display the hint when it is activated. HintRect is adjusted using the values in HintRectAdjust (when assigned) and the borders drawn around the hint display.

Contains the bounds with additional space used for the hint display Pointer to data used to formulate text displayed in the hint window Does the hint disappear (get hidden) after a while? If AutoHide is TRUE, the hint disappears after an interval specified by HideInterval. The time after which the displayed hint disappears Class of THintWindow For a rendered hint with a child control added by an external provider Constructor for the class instance Owner of the class instance Destructor for the class instance Shows hint contents are rendered by a provider on child control Provides information about a physical monitor

Monitor information is retrieved dynamically from the Operating System, so that all changes are taken into account. TMonitor has properties that reflect its dimensions, use as the primary monitor, and its display density (or Pixels per Inch).

TMonitor is the type returned when reading the TScreen.Monitors property. TMonitor is the type used to implement the TCustomForm.Monitor property.

Retrieves monitor information from the OS or platform

Getinfo is a Boolean function used to get monitor information from the OS or platform hosting the LCL application. Getinfo initializes the Info output parameter to the size required for the TMonitorInfo type, and calls the GetMonitorInfo routine for the widget set.

The return value is True when monitor information is successfully retrieved for the OS or platform. Info contains the size, display rectangle, work area, and flags for the monitor.

True when monitor information was successfully retrieved TMonitorInfo with values retrieved for the OS or platform Gets the value for the Left property Value for the property Gets the value for the PixelsPerInch property Value for the property Handle which identifies this monitor to the system Index of the monitor in the list The leftmost screen coordinate of the display The height of the display The topmost screen coordinate of the display The width of the display The logical dimensions of the monitor, within the desktop. The usable display area, excluding a taskbar etc True if this is the primary monitor of the system Contains the Pixels Per Inch or display density for the monitor A list of all available monitors List notification handler, destroys the Monitor object on removal from the list The monitor object The list operation The indexed list of all Monitors Items is the default property for the monitor list. Ordinal position for a monitor in the list An element of the Cursor list The next list element The list index The OS identifier for this cursor Type of an screen notification handler, for form related events ? TObject for the event notification ? The affected form Type for a screen notification handler, for control related events ? TObject for the event notification The new active control Screen notification events and handler types A form was added A form was removed The focus moved to another control The focus moved to another form The visibility of a form changed The monitor to use when screen coordinates are outside of the physical screen bounds Default to the nearest monitor Default to Nil (no suggested monitor) Default to the primary monitor Provides information about the display and related objects

The virtual screen (desktop) can include multiple physical Monitors. Screen objects are Cursors, Fonts and Forms. For Delphi compatibility, non-visual DataModules are included.

The currently active Form, Control and Cursor also are tracked.

The last active form, used to detect focus changes Removes a cursor from the Cursors property The logical cursor ID Deletes all TCursor instances in the Cursors property Clears the Monitors list The logical cursor ID Internal notification handler, adds a new form to the lists Form instance added in the method Internal notification handler, removes the form from the lists Form instance removed from the list Stores the currently active form and control in the last active members. Notifies all registered handlers of eventual changes. Moves the Focus back to the previously focused control Adds a notification handler The notification (event) type The notification handler Add the handler as the first (True) or last (False) handler Removes a notification handler The notification (event) type The notification handler Adds the specified DataModule to the list Data module instance added in the method Removes the specified DataModule from the list Data module removed in the method Notifies all registered handlers for the given event Event type for the notification Form instance for the notification The ordinal position in CustomForms the requested form The form Index, -1 if not found The Form to which the Index refers The ordinal position in Forms for the requested form The form Index, -1 if not found The Form to which the Index refers The index of the form in the Z dimension (Front to Back)

The return value contains the activation order for the specified form, with the currently active form at index position zero (0).

Moves the specified form to the front of all form lists Raises a GDB exception when the form is being destroyed, or the application is shutting down. Moves the form to the front of the Z-order list (notification only) Raises a GDB exception when the form is being destroyed, or the application is shutting down. Returns the topmost Modal form (i.e. a form that is awaiting a user response). The modal form, or Nil if none is active Returns the index of the topmost modal form in CustomFormsZOrdered[] The index for the form, or -1 if no modal form is active Checks whether the form is visible, and whether modal or not blocked by another modal form ? Finds the named form, excluding designer forms Finds a form by its name Finds the named DataModule, excluding designer modules Finds the named DataModule Builds the list of available monitors Updates the property Adds a notification handler Removes a notification handler Adds a notification handler Removes a notification handler Adds a notification handler Removes a notification handler Adds a notification handler Removes a notification handler Adds a notification handler Removes a notification handler Disable all forms except SkipForm.

Used to show modal forms or dialogs.

The enabled state is determined from the widget, not from LCL properties.

If DisabledList is Nil, a new list is created. Then all disabled forms are added to that list.

When the modal form returns, call EnableForms to restore all forms.

The list containing all disabled forms Don't disable this form (ignored if Nil) The list to update. If Nil, a new list is created and returned Use this method to restore all previously disabled forms. The list containing the forms to enable. The list is destroyed on exit. Find the monitor containing the given screen coordinates The monitor found The screen coordinates to find What to return when no monitor was found Find the monitor containing (most of) the given screen coordinates The monitor found The screen coordinates to find What to return when no monitor was found Finds the monitor containing (most of) the given window handle The monitor found The window handle to use What to return when no monitor was found The control which has the Focus for the screen The custom form which has the Focus The form which has the Focus The current mouse cursor shape Use one of the predefined cursor styles, e.g. crHourGlass. Provides indexed access to the available cursor shapes for the screen Ordinal position for the value requested The number of Custom Forms Provides indexed access to the list of Custom Forms for the screen Ordinal position for the requested form The list of Custom Forms, indexed by Z-order (zero is topmost) CustomFormZOrderCount - the number of forms arranged in Z-plane order (i.e. Front to Back) The leftmost coordinate of the desktop The topmost coordinate of the desktop The total vertical size of the desktop The total horizontal size of the display. The total extent of the desktop, spanning all monitors The form that holds Focus really?what's different from ActiveForm? The number of existing Forms The indexed list of all Forms, in Z-order The number of existing data modules The indexed list of Data Modules The font used to display Hints The Icon font, used with desktop icons ? The font used in menus The default font used for system task dialogs and controls like TSpeedButton The names of the available (installed) fonts The height of the primary monitor The number of available Monitors The indexed list of available monitors. The number of screen pixels for an virtual inch (DPI), in the vertical direction.

The display uses virtual inches, which typically are bigger than physical inches. This requires that text appear bigger on a screen than on a printer.

The primary monitor typically shows the taskbar. The width of the primary monitor The usable display area on the primary monitor, excluding e.g. the taskbar The usable height of the primary monitor The usable left coordinate on the primary monitor The usable top coordinate on the primary monitor The usable width of the primary monitor Handler for a Focus changed notification Handler for a Focus changed notification The type of an handler. Set Cancel to True to prevent a logoff Defines an event handler signalled to perform exception handling in applications

TExceptionEvent is an object procedure type that defines an event handler signalled to perform exception handling in an application. Arguments passed to the event handler identify the application generating the notification, and the exception class instance. Applications must implement an object procedure using the signature for the event, and assign it to an event handler to respond to the notification.

TExceptionEvent is the type used to implement exception handlers in TApplication and TApplicationProperties.

Object instance for the notification Exception instance for the notification Specifies an event handler used to get the handle for the main form in an application

TGetHandleEvent is an object procedure type which defines an event handler signalled to get the handle for the main form in an application. TGetHandleEvent is the type used to implement the OnGetMainFormHandle event handler in TApplication and TApplicationProperties.

Handle for the form instance used as the main form Type of an Idle event handler

Lengthy operations should be broken into smaller parts, to ensure that the application remains responsive. The handlers are called repeatedly, until all signal Done.

Set to True when everything is done Specifies an event handler signalled to respond to user input messages in an application

TOnUserInputEvent is an object procedure type which defines an event handler signalled to respond to user input messages in an application. It is used as a callback which forwards input messages from widget set classes to the current application.

TOnUserInputEvent is the type used for the OnUserInput event handler in TApplication and TApplicationProperties.

The type of an asynchronous callback method The argument passed to the method ? ? The TApplication hint timer state The hint timer is off Waiting to show a hint; used when a hint timer is started Waiting to hide an hint; used when the hint control is changed or the mouse leaevs a hint rectangle Waiting to show the next hint; used when the hide hint timer is started Defines an event handler signalled to perform hint display

TShowHintEvent is an object procedure type which defines an event handler signalled to perform hint display. It is the type used for the TApplication.OnShowHint event handler property.

Stores control and mouse position information for a hint display

THintInfoAtMouse is a record type used to store Control and Mouse position information for a hint display.

?
Application state flags

TApplicationFlag is an enumeration type with values that represent activity or state in an application. TApplicationFlag values are stored in the TApplicationFlags type used to implement the Flags property in TApplication.

Application is in an Idle state and waiting for a message IdleEnd handlers have been notified of message arrival; end the idle state for the application In exception handling Not used in the current LCL version. Suppresses exception display for the application; set when an exception is aborted in the application The application has focus; prevents recursive application activation Shutting down; set when the application instance is freed Skip asynchronous callbacks between handling messages ? Application has been initialized Which keys can be used for the navigation within a form ? The Tab key moves the Focus to the next (or previous) control in TabOrder. The Enter key triggers the default action. The Escape key triggers the Cancel action The F1 key brings up context sensitive help The Arrow keys move the focus ? Types of Application notification handlers Application becoming idle ? Application becoming busy ? Handler for KeyDown events, invoked before interface and LCL handlers ? Default handler for KeyDown events, invoked after interface and LCL handlers ? Handler invoked on application activated ? Handler invoked on application deactivated ? Handler invoked on user input what's this? Handler invoked on handled exception ? Handler invoked on session end what's this? Handler invoked before session ends ? Handler invoked when the application is minimized Handler invoked when a form is shown modally Handler invoked when the last modal form is closed Handler invoked on application restored (from minimized state) Handler invoked on files dropped ? Handler invoked on F1 key (help request) purpose? Handler invoked on Hint request purpose? Handler invoked on Hint becoming visible purpose? Handler provides the Handle for the main form ? application/taskbar window? purpose? what's the purpose for *not* returning MainForm.Handle??? A queued asynchronous callback request node A queued asynchronous callback request node The callback method The method call argument The next list node The preceding list node superfluous, could be removed? The queue head for asynchronous callbacks The first queued method The last queued method Management information for asynchronous callbacks

Two queues are used:

New calls are added to the Next queue.

When the application starts processing the calls, the Next queue becomes the Cur queue, and a new Next queue is created. This simplifies thread-safe addition of further calls.

The critical section for adding and removing queue elements The currently processed queue. Processed entries are removed New calls are added to this queue Identifies the kind of device where the application currently runs

TApplicationType identifies the kind of device where the application currently runs. Note that the same application can run on differing device types if it has a flexible user interface.

?
Enumeration with dialog types for an application

TApplicationExceptionDlg is an enumerated type with values that indicates the type of dialog displayed for an application exception. TApplicationExceptionDlg is the type used to implement the ExceptionDialog property in TApplication and TApplicationProperties.

Exception handler window will be a dialog with Ok/Cancel buttons Exception handler window will be a simple message box Describes the policy for the application of how to show menu and button glyphs

sbgAlways - show glyphs always (despite system preferences)

sbgNever - show glyphs never (despite system preferences)

sbgSystem - use system preferences for glyphs showing

on Button or Tab controls, and menus?
Show glyphs always Show glyphs never Show glyphs according to the platform default How forms are represented in the TaskBar ? Show TaskBar buttons according to the platform default Show buttons for Forms with ShowInTaskBar=stDefault Hide buttons for Forms with ShowInTaskBar=stDefault Enumeration with values used in the DoubleBuffered property in TApplication ? Widget set dependent; for LCL/Win32 it is True, unless in a remote desktop connection. For other widget sets it is False. Application management and configuration for a GUI application.

Provides a message loop, hooks for application event handlers, and more.

Includes the useful function MessageBox, a simple dialog intended for displaying error messages, but also usable as an alternative to the various Message Dialogs.

Other project types have a different Application class.

or no??
Holds the registered notification handlers for the application The list of components marked for release The list of components which currently are released (destroyed) The screen area of the current Hint window The timer for showing and hiding Hints The Hint time mode The current Hint window The Handle for the big application icon The Handle for the small application icon Counter for nested Idle locks, preventing execution of OnIdle handlers Cached key event parameter List of key values for the last KeyDown sender Cached key event parameter The previously installed exception handler The previously installed Exit procedure Queues for asynchronous calls Cached mouse event parameter Cached mouse event parameter Cached mouse event parameter The list of all forms that should be restored to StayOnTop The list is created in RemoveStayOnTop, processed in RestoreStayOnTop. Notifies the OnIdleEnd handlers; called when the application exits Idle state Gets the HelpFile name for the active form, or the Application

GetCurrentHelpFile is a String function used to get the help file name for the active form or application.

GetCurrentHelpFile checks for an active form in the Screen singleton. If a form is active, the file name in its HelpFile property is used as the return value. If a form is not active, the HelpFile in the Application instance is used.

Help file name located in the method Gets the name of the executable for the application

GetExename is a String function used to get the name of the executable file which started the application. The return value contains the first commandline parameter (ordinal position 0) returned from the ParamStrUTF8 routine in LazUtils.

Name of the executable file used to start the application Gets the value for the Handle property Returns the AppHandle property from the WidgetSet singleton. The Handle for the application Determines the main form handle, using all available handlers When no Title was stored, extracts the program name from the commandline arguments Destroys the application icons

FreeIconHandles is a procedure used to free icon handles used in the application. FreeIconHandles ensures that the internal members for the small and large icon handles are destroyed (when assigned). The DestroyIcon routine is called to destroy each of the icon handles using the correct routine for the widget set implementation.

FreeIconHandles is called from the destructor for the class instance, and when an icon for the application has been changed.

Loads the new application icons, notifies the widget set and all forms Handles mouse moving onto a new control Sets Hint to the (new) hint that applies to CurrentControl The control under the mouse Disables the Hint timer Checks for an installed HelpManager True when HelpManager is not Nil Asks the active form and MainForm to handle the action True when the action was handled Adds an application notification handler Removes an application notification handler Encapsulates the application message loop (HandleMessage) Handler for application activation, notifies all activation handlers Handler for application deactivation, notifies all deactivation handlers True when called from the widget set Here: returns False, because this is a GUI application. False for a GUI application Notifies all Idle handlers True when all handlers are done, meaning: wait for next message Notifies all Idle End handlers, when a new message arrived Notifies all Activation handlers Notifies all Deactivation handlers Notifies all CustomForms of Msg arrived The message to process NOP, exists for Delphi compatibility only Always False OnHelp message handler. Tries the OnHelp handlers for the active form, and the Application, as well as application Help handlers. True when the message was handled ? OnMouseMove message handler, updates the Hint Shows or hides the Hint window Is updated with the Hint related information Event handler for timing the duration of hints Starts the timer for display of a hint message Asks the widget set to update the TaskBar entries ? Updates all Actions, hides splash screens Hides the Hint window Calls all methods queued by QueueAsyncCall Ignored, should be zero Destroys all components marked for release Destroys all components

Called from the BeforeFinalization routine which is used as the ExitProc handler in the application instance.

Returns the commandline argument at the specified position The Owner object that invoked this instance of TApplication Destructor for the class instance

Destroy is the overridden destructor for the class instance.

Destroy ensures that the value AppDestroying is included in the Flags for the application, and signals the OnDestroy event handler (when assigned). Destroy calls the ProcessAsyncCallQueue method to process / handle queued asynchronous method calls pending for the application instance.

Hint display is cancelled and suppressed while the application is shutting down. The action component for the application is set to Nil to prevent execution of associated actions during shutdown.

Destroy frees resources allocated in the application instance, including the Icon and any Icon handles currently in use. Handlers added to application instance are also freed.

Destroy calls the inherited destructor, and discards any pending asynchronous calls not previously handled for the application instance. Exception handling is restored to the state on entry to the Create constructor. Finally, the Application class instance is set to Nil.

Destroy calls RaiseGDBException to raise an exception if the current class instance is unassigned (contains Nil). Uses the exception message 'TApplication.Destroy Self=nil'.
? Finds the control under the mouse Updates the LastMouse... info. The control, or Nil if no control is found Clears all references to the destroyed control The Handle of the large application Icon The Handle of the small application Icon Asks the widget set to bring the application's form(s) to the front ? Creates a Form or component, owned by Application Please note: The method name is confusing and kept only for Delphi compatibility. The method can actually create any kind of component.

CreateForm creates a Component instance of the given class, and sets the pointer to the component variable. If it is a form, it will be added to the form list in the application.

A splash form is shown immediately.

and loads the component?
The component class The variable receiving the new component reference When MainForm is Nil, this form becomes the application MainForm The form that may become the MainForm Inserts an asynchronous call into the queue This is thread safe. Exceptions on various inconsistencies of the queue. The method to call asynchronously The argument passed to the method Removes all calls added via QueueAsyncCall This is thread safe. Exceptions on various inconsistencies of the queue. Safe destruction of a component, can be requested by the component itself

Unless the application is shutting down, all requests are queued. Queued requests are processed when the application is not currently processing a message.

The component to destroy Invokes the OnActionExecute handler True when the Action was handled The Action to execute Invokes the OnActionUpdate handler TComponent.UpdateAction HandleException method for handling an exception; attempts to maintain program execution if possible, otherwise exits gracefully

Individual exception handler methods should be supplied by the application programmer, to override place-holder entries declared in ancestor classes. This method checks whether the application is halted when an exception occurs, or invokes the appropriate handler. It also writes details about the exception to the appropriate place for debugging.

Handles all messages, and enters the Idle state Show help Currently relies on OnHelp handlers. CallHelp is not implemented. what? ? Show context sensitive help Request handled ? Show help for a keyword When Sender is a TControl, invoke its ShowHelp method Should be a TControl, else nothing will happen Remove StayOnTop from all forms. Builds a form list for use in RestoreStayOnTop. ? Restores StayOnTop for all forms changed by RemoveStayOnTop ? True if the application is awaiting an event ? True if the application is in AppWaiting state Called when the Hint time has expired, to stop showing the Hint. Hides the Hint window Called when the the mouse is over a control with a Hint Does nothing ?exists for Delphi compatibility only? Initializes the widget set (and more) Display an message dialog with several response buttons

The function is used internally to display messages during the handling of Exceptions, but is also available to application programmers as an alternative to some of the message dialogs found in the Dialogs unit.

The function returns an integer value corresponding to the button that was pressed; its value can be determined by reference to the constants [IDOK..IDHELP].

MessageDlg
Indicates the pressed button

Can be one of the following values:

  • IDOK
  • IDCANCEL
  • IDABORT
  • IDRETRY
  • IDIGNORE
  • IDYES
  • IDNO
  • IDCLOSE
  • IDHELP
The text in the MessageBox The Caption of the MessageBox The icon and buttons appearing in the box.

Several constants are declared in the LCLType unit.

Add (better: OR) an icon constant and a buttons constant. For example:

MB_ABORTRETRYIGNORE + MB_ICONQUESTION

Causes the application to display a query (?) icon in a box with three buttons: ABORT RETRY IGNORE.

Buttons can be one of:

  • MB_OK
  • MB_OKCANCEL
  • MB_ABORTRETRYIGNORE
  • MB_YESNOCANCEL
  • MB_YESNO
  • MB_RETRYCANCEL

The icon can be one of:

  • MB_ICONHAND
  • MB_ICONQUESTION
  • MB_ICONEXCLAMATION
  • MB_ICONASTERISK
  • MB_ICONWARNING = MB_ICONEXCLAMATION
  • MB_ICONERROR = MB_ICONHAND
  • MB_ICONSTOP = MB_ICONHAND
  • MB_ICONINFORMATION = MB_ICONASTERISK
Asks the widget set to minimize the application. Called when a form is shown modally Invokes all OnModalBegin handlers when entering Modal state. Called when a modal form is closed Invokes all OnModalEnd handlers when exiting Modal state. Restores the previously minimized application. Invokes the notification handlers.

Special handling, here: Clears the reference to a removed component, terminates the application when the MainForm is removed.

TComponent.Notification
Call this method during lengthy operations, to keep the GUI responsive Processes all waiting messages, then the queued asynchronous callbacks. Invoked when the application enters the idle state Wait for next message? MainForm is loaded and control is passed to the event loop Shows the exception message and asks the user to abort or continue The exception to show The application is terminated and the component engine is shutdown Blocks Idle handling. Can be called more often, every call must be followed by EnableIdleHandler. what does this mean to application behavior? Resume Idle handling GDB exception when not previously disabled. Notifies all user input handlers of what? Notifies all ahtKeyDownBefore handlers Notifies all ahtKeyDownAfter handlers, eventually reacts on F1 (Help) Handles KeyDown events in a Control, e.g. handles navigation keys Handles KeyUp events in a Control, e.g. handles Enter and Esc keys Adds an application Idle handler Removes an application Idle handler Adds an application IdleEnd handler Removes an application IdleEnd handler Adds an application user input handler Removes an application user input handler Adds an application key down before interface handler Removes an application key down before interface handler Adds an application key down after interface handler Removes an application key down after interface handler Adds an application activation handler Removes an application activation handler Adds an application deactivation handler Removes an application deactivation handler Adds an application exception handler Removes an application exception handler Adds an application logoff handler ? Removes an application logoff handler ? Adds an application logoff query handler Removes an application logoff query handler Adds an application minimizing handler Removes an application minimizing handler Adds an application becoming modal handler Removes an application becoming modal handler Adds an application exiting modal state handler Removes an application exiting modal state handler Adds an application exiting minimized state handler Removes an application exiting minimized state handler Adds an application dropped files handler Removes an application dropped files handler Adds an application Help handler Removes an application Help handler Adds an application Hint handler Removes an application Hint handler Adds an application Hint show handler Removes an application Hint show handler Adds an application MainForm Handle handler Removes an application MainForm Handle handler Removes all handlers implemented in the given object Things to be done before a mouse message is processed Asks all shortcut handlers to handle the key True when the shortcut was handled Called by the interface to confirm the end of a session Asks all QueryEndSession handlers to confirm termination of the application. Called by the interface when the session ends Notifies all OnEndSession handlers. Called by the interface on application activation Notifies all activation handlers. ? Called by the interface on application deactivation ? Called by the interface when the application is minimized Called by the interface when the application is restored Called by the interface when files have been dropped Called by the interface when a theme option has changed Indicates if BiDiMode contains a value other than bdLeftToRight Checks the given language name for use of right-to-left reading True when the language code uses right-to-left reading ISO language code examined in the method Gets the BidiMode value for the specified language name TBiDiMode value for the specified language ISO language name examined in the method Uses arrow keys for navigation, if enabled The control receiving the key The virtual key; becomes VK_UNKNOWN when handled The active modifier keys Uses the Tab key for navigation, if enabled The control receiving the key The virtual key; becomes VK_UNKNOWN when handled Interprets Esc as Cancel action, if applicable The control receiving the key The virtual key; becomes VK_UNKNOWN when handled The active modifier keys Interprets Enter as the default action, if applicable The control receiving the key The virtual key; becomes VK_UNKNOWN when handled The active modifier keys True if the application has the focus The type of the application (i.e. the sort of device for which it is intended)

The type of the application:

Default, Desktop, Handheld, PDA, Smartphone

The bidirectional mode to use Enables exception handling by Application Indicates if the application uses double buffering Default value is adbDefault. Hint: platform specific. See VK_LSHIFT in LCLType for more details. Indicates the dialog type used for an exception in the application

ExceptionDialog is a TApplicationExceptionDlg property which indicates the dialog type displayed for an exception handled by the application instance. The default value for the property is aedOkCancelDialog, as assigned in the Create constructor.

See TApplicationExceptionDlg for more information about values in the enumeration and their meanings.

Enables searching for global components by name ? Application state flags Provides access to the widget set handle for the application instance

Handle is a THandle property which provides access to the widget set handle used for the application instance. Reading the value for the property is redirected to the AppHandle allocated in the widget set class. Setting the value for the property causes the AppHandle in the widget set class to be updated with the new value.

Handle is used to send and receive window messages and state change notifications for the application instance using the LCL interface.

The current Hint text

A hint is a pop-up message that appears briefly while the mouse hovers over a control. It usually displays useful information about how to the UI element, or the type of data that should be entered, etc.

Other properties can be used to customize the delay before a Hint is shown, after the mouse is moved away from the control or form, and how long it will remain visible.

The color of Hint windows How long a Hint stays visible, after an mouse move How long a keystroke extends the time a Hint remains visible (added to HintHidePause) The delay before a Hint is shown Enables the display of keyboard shortcuts (e.g. on menu entries) not implemented? The pause before a different Hint is displayed The icon associated with this application Indicates the layout and sizing policy used for forms and controls in the application Allows to switch between controls by pressing keys

These keys can be enabled for navigation:

  • The Tab key moves the Focus to the next (or previous) control in TabOrder.
  • The Enter key triggers the default action.
  • The Escape key triggers the Cancel action.
  • The F1 key brings up context sensitive help.
  • The Arrow keys move the focus.
The application terminates when this form is closed.

This property is set when the first form is created via Application.CreateForm and it is not FormStyle=fsSplash.

The Handle of the MainForm ? ? The number of modal forms shown Tracks modal forms showing another form modally. Indicates if an active control is focused when a form receives focus

MoveFormFocusToChildren is a Boolean property which indicates if an active control is focused when a form receives focus in the application.

The default value is True. When set to False, the window or form will still receive focus, but a child control is not selected.

Used in TCustomForm.SetActive.

The control currently under the mouse Used to detect mouse entering and leaving a control. How forms are represented in the TaskBar Indicates if application format settings are updated when changed in a widget set class Default handler for unhandled Actions ? Default handler for unhandled Action updates ? Event handler for activation of the application Event handler for deactivation of the application Event handler used to provide a value for the MainFormHandle property

Used in the implementation of the GetMainFormHandle method. Provides the first opportunity to set the handle value before calling the other handlers added to the application.

Event handler for application entering Idle state Event handler for application leaving Idle state Event handler for ending a session of the application or logoff? This event handler can deny to end the session Event handler for application minimized Event handler signalled when a message dialog in the application has been completed Used in the CustomDraw interface. Event handler for a modal form opened (application entering modal mode) Event handler for closing modal forms (application exiting modal mode) Event handler for application restored (from minimized/maximized state) The default handler for dropped files ? Event handler when help is requested Event handler when a hint is requested This event handler can interpret keystrokes as shortcuts, before the normal target handles the key ? Event handler for showing an Hint Event handler signalled for application handler notifications for user input messages Event handler signalled when the application is freed

OnDestroy is signalled from the Destroy destructor prior to freeing resources allocated in the application class instance. It provides the first opportunity to respond to application shutdown after Flags has been updated to include the AppDestroying enumeration value.

Handler invoked when there a circular exception occurs before the application is halted. Allows to override the platform default for glyphs on buttons Some platforms show glyphs on all buttons, others don't. Sets the default policy for showing or hiding glyph images in menus ? Indicates if Hints are displayed for the application

ShowHint is a Boolean property which indicates if Hints are displayed for the application. It is used when tracking the position of the mouse cursor over controls and forms, and determines if the items require a hint display.

Setting the value in ShowHints to False causes an existing THintWindow instance in the application to be freed.

Allows the main form to be shown or hidden when an application is started. Default is True. Indicates if forms and controls in the application can be scaled to different display densities (Pixels per Inch) Contains the default BiDiMode value used for the current LCL version Default value is bdLeftToRight. The default hint window color The default pause before the hint window displays (in milliseconds) The default Hint reshow pause (in milliseconds) The default pause before hint is hidden (in milliseconds) The default pause added to DefHintHidePause (in milliseconds) A component that provides access to the properties for the current application

TApplicationProperties is a non-visual component that provides access to a number of application properties, including:

  • CaptureExceptions
  • HelpFile
  • Hint
  • HintColor
  • HintHidePause
  • HintPause
  • HintShortCuts
  • HintShortPause
  • ShowButtonGlyphs
  • ShowMenuGlyphs
  • ShowHint
  • ShowMainForm
  • Title
  • OnException
  • OnGetMainFormHandle
  • OnIdle
  • OnIdleEnd
  • OnEndSession
  • OnQueryEndSession
  • OnMinimize
  • OnModalBegin
  • OnModalEnd
  • OnRestore
  • OnDropFiles
  • OnHelp
  • OnHint
  • OnShowHint
  • OnUserInput

Values for the properties are assigned in the constructor to the currently assigned values in the Application singleton.

At run-time, changes to the properties are also assigned to the Application singleton. For event handler properties, the previous routine is removed as a handler and the new handler is added to the Application singleton. When the component is freed, the event handlers are removed from the Application singleton. The changed properties are not assigned to Application at design-time.

TApplicationProperties is available on the Additional tab in the Lazarus IDE Component Palette. TApplicationProperties is similar to the TApplicationEvents class in Delphi.

Sets the value for the ExceptionDialog property New value for the property Sets the value for the CaptureExceptions property New value for the property Sets the value for the HelpFile property New value for the property Sets the value for the Hint property New value for the property Sets the value for the HintColor property New value for the property Sets the value for the HintHidePause property New value for the property Sets the value for the HintPause property New value for the property Sets the value for the HintShortCuts property New value for the property Sets the value for the HintShortPause property New value for the property Sets the value for the ShowButtonGlyphs property New value for the property Sets the value for the ShowMenuGlyphs property New value for the property Sets the value for the ShowHint property New value for the property Sets the value for the ShowMainForm property New value for the property Sets the value for the Title property New value for the property Sets the value for the OnActivate property New value for the property Sets the value for the OnDeactivate property New value for the property Sets the value for the OnException property New value for the property Sets the value for the OnGetMainFormHandle property New value for the property Sets the value for the OnIdle property New value for the property Sets the value for the OnIdleEnd property New value for the property Sets the value for the OnEndSession property New value for the property Sets the value for the OnQueryEndSession property New value for the property Sets the value for the OnMinimize property New value for the property Sets the value for the OnModalBegin property New value for the property Sets the value for the OnModalEnd property New value for the property Sets the value for the OnRestore property New value for the property Sets the value for the OnDropFiles property New value for the property Sets the value for the OnHelp property New value for the property Sets the value for the OnHint property New value for the property Sets the value for the OnShowHint property New value for the property Sets the value for the OnUserInput property New value for the property Constructor for the class instance

Create is the constructor for TApplicationProperties. Create calls the inherited Create method, and sets the defaults values when a new application is being designed, or loads local values for an existing application.

TComponent.Create TLCLComponent.Create
Owner of the class instance Destructor for the class instance

Destroy is the overridden destructor for the class instance. Destroy ensures that event handlers in the class instance are removed from the handlers registered in the global TApplication instance.

Please note: Event handlers are not removed from the Application variable at design-time; they were not added at design-time either.

Destroy calls the inherited destructor prior to exiting from the method.

Indicates the dialog type displayed for an exception The default value is aedOkCancelDialog. The abstract base class for visual Form designers

TIDesigner is a TObject descendant which specifies the interface used for visual Form designers . TIDesigner is the type used for the TCustomForm.Designer property.

It is used as the ancestor for TComponentEditorDesigner, and the type expected in the RootDesigner for the Object Inspector and Property editors used in the Lazarus IDE.

IsDesignMsg - receives a message from Sender, and returns True if it is a design message Method when design is Modified Notification that the supplied Operation has been applied to the specified Component ??? PaintGrid - method for painting the grid in the designer ValidateRename - method to validate the Rename process GetShiftState - returns the value of the shift state (whether shifted, Cntl key, Alt key etc) SelectOnlyThisComponent - method to select only the current component in the designer UniqueName - returns a Unique name for the designer, using the BaseName as a starting point TFormPropertyStorage - class for storage of a Form's properties Calls the Restore method. Converts modifier keys from the LParam of a mouse message to a TShiftState The asynchronous keyboard state Converts modifier keys from the LParam keyboard message (WM_KEYUP for example) to a TShiftState ? ? Converts a shift state into a key state value compatible with the key state of a Windows API LParam

The Keys value is of the type PtrUInt and is a or'ed combination of the following constants:

  • MK_Shift
  • MK_Control
  • MK_LButton
  • MK_RButton
  • MK_MButton
  • MK_XBUTTON1
  • MK_XBUTTON2
into what?
? WindowStateToStr - converts a Window state to a string StrToWindowState - converts a string to a Window state Formats various typed values into readable text The formatted value ? Returns the remembered control ? Remembers the control in LastFocusedControl ? TIsFormDesignFunction is a Boolean function type used in the IsFormDesign variable. Returns True when the form has csDesignInstance in its component state OnGetDesignerForm is a TGetDesignerFormEvent variable that contains the event handler signalled to get a form with a design surface for the specified form or control. ? Gets the topmost Form containing the specified Control ? Does a recursive search for the first Parent of type TCustomForm ? Searches for the given virtual key, used as an accelerator

An accelerator consists of an ampersand followed by the accelerator key. Duplicate ampersands are ignored; they denote a literal (displayed) ampersand character (&).

True when the key is used as an accelerator The virtual key (uppercase ASCII) to find The string to scan Invokes all application user input handlers The message to process Returns the short version of a Hint string

A short Hint is separated from the long Hint by a '|' character. When no such character is found, the whole Hint is returned.

The short (or complete) Hint The string containing both a short and long Hint Returns the long version of a Hint string The TApplication singleton The TScreen singleton Variable representing the current exception object in an application

Used in the implementation of the TApplication.HandleException method.

The class used to create hint window instances for an application When True every form must have a resource (e.g. a .res file). An exception is raised if the resource is missing when creating a form.

The form resource is the .lfm file compiled into the executable of your application. For this flag, it does not matter if it was compiled via an .lrs file or via fpcres. The resource is automatically loaded by TForm and its descendants when created using the Create(Owner) method.

If the resource file is missing, there is something wrong with either a resource or the unit which contains the faulty form. If the flag is False, you will see a blank form and probably search a long time what is wrong. If you set this flag to True, you get an exception.

For creating forms without resources, you have 3 options:

  • Create a TForm class (not a descendant).
  • Construct your form using the CreateNew() constructor.
  • It is also possible to disable the exception by setting the global variable RequireDerivedFormResource to False.

History: Before 0.9.31 there was no exception. Therefore some resource-less forms might use the standard constructor Create(Owner) and will now get exceptions. This change is Delphi compatible and compatible with TFrame and TDataModule components.

?
The type used for the MessageBox variable

TMessageBoxFunction is an Integer function type which specifies the routine used to perform a message box or dialog.

Arguments passed to the function identify the content for the message dialog, including:

  • Text displayed in the mesaage dialog
  • Title used on dialog form
  • Flag values that control the buttons and icon for the dialog

The return value contains the modal result returned from the message dialog.

Provides the routine used to display a message dialog in widget set implementations

Normally contains a reference to the DefaultMessageBox function. It may have another function reference assigned to the variable in specific widget set implementations (such as CustomDraw controls).

Maps form border styles to their border icons

DefaultBorderIcons is an array constant with TBorderIcons values indicating the icons available for the various form border styles. Values in the array are indexed by the enumeration values in TFormBorderStyle. Each element in the array contains zero (0) or more values from the TBorderIcon enumeration, and indicates that the icon is used for the form border style.

DefaultBorderIcons contains the following values for the corresponding TFormBorderStyle values:

bsNone
An empty set ([])
bsSingle
[biSystemMenu, biMinimize]
bsSizeable
[biSystemMenu, biMinimize, biMaximize]
bsDialog
[biSystemMenu]
bsToolWindow
[biSystemMenu, biMinimize]
bsSizeToolWin
[biSystemMenu, biMinimize, biMaximize]

DefaultBorderIcons is used in the implementation of the SetFormBorderStyle method in TCustomForm.

Creates the widget set

CreateWidgetset is a procedure used to create the WidgetSet singleton. CreateWidgetset executes the nitialization handlers for the LCL interface.

AWidgetsetClass is the TWidgetsetClass class type used to create the WidgetSet singleton. CreateWidgetset is called from the interfaces.pp unit for a specific widget set implementation (win32, gtk, gtk2, gtk3, qt, qt5, et. al.).

TWidgetsetClass class type for the desired widget set implementation Destroys singletons for the Screen, Application, and WidgetSet

FreeWidgetSet is a procedure used to free resources allocated to the Screen, Application, Clipboards, and WidgetSet singletons.

For Screen, allocated cursors and monitors are destroyed. Application is freed, and set to Nil. All clipboard formats are freed as well. The WidgetSet singleton is freed, and set to Nil.

FreeWidgetSet executes the CallInterfaceFinalizationHandlers routine to perform any finalization handlers installed for the LCL interface.

Registers components declared in this unit

Register is a procedure used to register components declared in the forms.pp unit for use in the Lazarus IDE. The TFrame component is added to the Standard tab. In addition, the TScrollBox and TApplicationProperties components are added to the Additional tab.

Override the Cursor property with a temporary value. Use EndTempCursor to release it. Release the temporary cursor set with BeginTempCursor. Get the Cursor property with taking temporary cursors into account.