Forms unit
Implements Forms which are the basis for the LCL Graphical User Interface.
forms.pp contains classes, types, and routines used to implement
forms, which are the basis for the graphical user interface in the Lazarus
Component Library (
LCL).
The following components are added to the Lazarus IDE component palette:
Standard Tab
- TFrame
Additional Tab
- TScrollBox
- TApplicationProperties
The unit also includes the TApplication and TScreen
classes used in the Application and Screen singletons.
Classes and records
EScrollBar | class | Exception class raised in . |
TApplication | class | Application management and configuration for a GUI application. |
TApplicationProperties | class | A component that provides access to the properties for the current application. |
TAsyncCallQueue | record | Represents an asynchronous callback queue. |
TAsyncCallQueueItem | record | Record used for a queued asynchronous callback request. |
TAsyncCallQueues | record | Management information for asynchronous callbacks. |
TCMHintShow | record | Provides access to members in a CM_HINTSHOW control message. |
TCMHintShowPause | record | Not used in the current LCL implementation. |
TControlScrollBar | class | Scroll bar type used in TScrollingWinControl. |
TCursorRec | record | Contains information about a cursor shape. |
TCustomDesignControl | class | Provides a designer surface for scaling and layout of its child controls. |
TCustomDockForm | class | A floating DockSite used to make TControls float. |
TCustomForm | class | The base type for TForm classes. |
TCustomFrame | class | The base type for TFrame. |
TCustomHintAction | class | Represents a standard action used to get a Hint value. |
TForm | class | Implements a form used in an LCL application. |
TFormPropertyStorage | class | TFormPropertyStorage - class for storage of a Form's properties. |
TFrame | class | Frames can be designed like Forms and used like custom controls, without much coding or installation in the IDE. |
THintInfoAtMouse | record | Stores control and mouse position information for a hint display. |
THintWindow | class | The pop-up box containing helpful information that appears when the mouse pointer hovers over an object. |
THintWindowRendered | class | For a rendered hint with a child control added by an external provider. |
TIDesigner | class | The abstract base class for visual Form designers. |
TMonitor | class | Provides information about a physical monitor. |
TMonitorList | class | A list of monitors available on the system. |
TScreen | class | Provides information about screen displays in an application. |
TScrollBox | class | Implements a windowed control with scroll bars. |
TScrollingWinControl | class | Implements a windowed control with scroll bars. |
TWindowMagnetManager | class | Implements a manager for form and screen snapping behavior in an application. |
TWindowMagnetOptions | class | Implements options which control magnetic window behavior in form instances. |
Procedures and functions
CreateWidgetset | procedure | Creates the widgetset singleton. |
dbgs | function | Formats debugger messages for various types by converting their values into readable text. |
FindRootDesigner | function | Gets the designer object for the specified persistent object (or its parent). |
FreeWidgetSet | procedure | Destroys singletons for the Screen, Application, and WidgetSet. |
GetDesignerForm | function | Gets the Form with the designer object for the specified control or persistent object. |
GetFirstParentForm | function | Performs a recursive search for the first Parent of type TCustomForm. |
GetLongHint | function | Returns the long version of a Hint string. |
GetParentDesignControl | function | Gets the control which is the top-most TCustomDesignControl instance for the specified control, or Nil when not a TCustomDesignControl instance. |
GetParentForm | function | Gets the form instance for the specified Control. |
GetShortHint | function | Returns the short version of a Hint string. |
GetTopFormSkipNonDocked | function | Gets the top-most form which hosts the specified control docksite form instances. |
IsAccel | function | Determines whether the specified virtual key is used as an accelerator (short cut) in the given caption string. |
KeyboardStateToShiftState | function | Converts virtual key state codes to TShiftState values. |
KeyDataToShiftState | function | Converts modifier keys from the LParam in a keyboard message (WM_KEYUP for example) to a TShiftState value. |
KeysToShiftState | function | Converts modifier keys in the LParam for a mouse message to a TShiftState value. |
NeedParentDesignControl | function | Ensures that a TCustomDesignControl instance is found for the specified control. |
NotifyApplicationUserInput | procedure | Signals all user input handlers for the application using the specified message. |
Register | procedure | Registers components declared in this unit. |
RestoreFocusState | procedure | Restores the previous focus state for an application to the specified value. |
SaveFocusState | function | Saves the last focus state (focused control) in an application. |
ShiftStateToKeys | function | Converts a shift state into a key state value compatible with the key state of a Windows API LParam. |
StrToWindowState | function | Converts a string to a TWindowState enumeration value. |
ValidParentForm | function | Gets a valid parent form for the specified control. |
WindowStateToStr | function | Converts a TWindowState enumeration value to its String representation. |
Types
PAsyncCallQueueItem | type | A queued asynchronous callback request node. |
PCursorRec | type | Contains information about a cursor shape. |
PModalResult | type | Dummy type for the values that can be returned as a modal result. |
TAppHintTimerType | enumeration | Represents TApplication hint timer states. |
TApplicationDoubleBuffered | enumeration | Enumeration with values used in the DoubleBuffered property in TApplication. |
TApplicationExceptionDlg | enumeration | Enumeration with dialog types for an application. |
TApplicationFlag | enumeration | Application state flags. |
TApplicationFlags | set | Set type used to store values from the TApplicationFlag enumeration. |
TApplicationGlyphDrawEffectsEnabled | enumeration | Controls glyph drawing effects for mouse-over and mouse-down events in an application. |
TApplicationHandlerType | enumeration | Types of Application notification handlers. |
TApplicationNavigationOption | enumeration | Which keys can be used for the navigation within a form. |
TApplicationNavigationOptions | set | Which keys can be used for the navigation within a form. |
TApplicationShowGlyphs | enumeration | Indicates the application policy for displaying glyphs on menus and buttons. |
TApplicationType | enumeration | Identifies the kind of device where the application currently runs. |
TBorderIcon | enumeration | Represents a visual element in a window title bar; depends on window manager support. |
TBorderIcons | set | Represents a visual element in a window title bar; depends on window manager support. |
TCloseAction | enumeration | Represents actions that can occur when a form is closed. |
TCloseEvent | procedure type | Type used for an OnClose event handler in a form. |
TCloseQueryEvent | procedure type | Specifies an OnCloseQuery handler event handler. |
TCustomFormClass | type | Class reference for the TCustomForm class. |
TCustomFrameClass | type | Class type used to create new instances of TCustomFrame. |
TDataEvent | procedure type | Specifies the type used for an asynchronous callback method. |
TDefaultMonitor | enumeration | The preferred monitor for showing a form. |
TDropFilesEvent | procedure type | Type used for an OnDropFiles event handler. |
TExceptionEvent | procedure type | Defines an event handler signalled to perform exception handling in an application. |
TFocusState | type | Pointer to focus state information for the last active control in an application. |
TFormClass | type | Class type used to create new TForm instances. |
TFormHandlerType | enumeration | TForm Notification handler types. |
TFormState | set | Set type used to store values from the TFormState enumeration. |
TFormStateType | enumeration | Form state flags. |
TGetDesignerFormEvent | procedure type | Specifies an event handler signalled to get the form with the designer for a persistent object. |
TGetHandleEvent | procedure type | Specifies an event handler used to get the handle for the main form in an application. |
THelpEvent | procedure type | Type used for an OnHelp event handler. |
THintWindowClass | type | Class of THintWindow. |
TIdleEvent | procedure type | Specifies an event handler signalled when an application becomes idle. |
TIsFormDesignFunction | procedure type | Specifies a Boolean function type used to implement the routine assigned to the IsFormDesign variable. |
TLogMessageEvent | procedure type | Defines an event handler signalled to handle log messages written using the TApplication.Log method. |
TMessageBoxFunction | procedure type | The type used for the MessageBox variable. |
TModalDialogFinished | procedure type | Specifies an event handler signalled when a modal message dialog is completed. |
TModalResult | type | Dummy type for the values that can be returned as a modal result. |
TMonitorDefaultTo | enumeration | The monitor to use when screen coordinates are outside of the physical bounds for the screens. |
TOnUserInputEvent | procedure type | Specifies an event handler signalled to respond to user input messages in an application. |
TPopupMode | enumeration | Defines the handling performed for a parent window in forms and dialogs. |
TPosition | enumeration | Represents the Position and Size of a Form on Screen. |
TProcedure | procedure type | Type used for a procedure that takes no arguments. |
TProcedureOfObject | procedure type | Type used for an object procedure that takes no arguments. |
TQueryEndSessionEvent | procedure type | Specifies an event type used to handle a WM_QUERYENDSESSION window message in an application. |
TScreenControlEvent | procedure type | Type for a screen notification handler used for control-related events. |
TScreenFormEvent | procedure type | Type used for a screen notification handler for form-related events. |
TScreenNotification | enumeration | Screen notification events and handler types. |
TScrollBarInc | type | The range for scroll bar increments. |
TScrollBarKind | enumeration | The orientation of a scroll bar. |
TScrollBarStyle | enumeration | Scroll bar style flags. |
TShortCutEvent | procedure type | Type used for an OnShortcut event handler. |
TShowHintEvent | procedure type | Defines an event handler signalled to perform hint display. |
TShowInTaskbar | enumeration | Identifies the display preference for a form on the TaskBar. |
TTaskBarBehavior | enumeration | How forms are represented in the TaskBar. |
TTileMode | enumeration | Values representing the arrangement order for tiled MDI child windows. |
TWindowState | enumeration | Represents the actual State of the window on the screen. |
Constants
DefaultApplicationBiDiMode | constant | Contains the default BiDiMode value used for the current LCL version. |
DefaultBorderIcons | constant | Maps form border styles to their border icons. |
DefHintColor | constant | The default hint window background color. |
DefHintHidePause | constant | The default pause (in milliseconds) before a hint is hidden. |
DefHintHidePausePerChar | constant | The default pause (in milliseconds) added to DefHintHidePause. |
DefHintPause | constant | The default pause before the hint window is displayed (in milliseconds). |
DefHintShortPause | constant | The default pause (in milliseconds) before a Hint is re-displayed. |
Variables
Application | variable | The TApplication singleton. |
ExceptionObject | variable | Variable representing the current exception object in an application. |
HintWindowClass | variable | The class type used to create hint window instances for an application. |
IsFormDesign | variable | Address of the function used to determine if a specified control is a form designer. |
MessageBoxFunction | variable | Provides the routine used to display a message dialog in widgetset implementations. |
OnGetDesignerForm | variable | Event handler signalled to get the designer form for the specified form or control. |
RequireDerivedFormResource | variable | 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. |
Screen | variable | The TScreen singleton for the application. |
Uses
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
