Sign in Join
FPDoc Onlineexperiment

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

EScrollBarclassException class raised in .
TApplicationclassApplication management and configuration for a GUI application.
TApplicationPropertiesclassA component that provides access to the properties for the current application.
TAsyncCallQueuerecordRepresents an asynchronous callback queue.
TAsyncCallQueueItemrecordRecord used for a queued asynchronous callback request.
TAsyncCallQueuesrecordManagement information for asynchronous callbacks.
TCMHintShowrecordProvides access to members in a CM_HINTSHOW control message.
TCMHintShowPauserecordNot used in the current LCL implementation.
TControlScrollBarclassScroll bar type used in TScrollingWinControl.
TCursorRecrecordContains information about a cursor shape.
TCustomDesignControlclassProvides a designer surface for scaling and layout of its child controls.
TCustomDockFormclassA floating DockSite used to make TControls float.
TCustomFormclassThe base type for TForm classes.
TCustomFrameclassThe base type for TFrame.
TCustomHintActionclassRepresents a standard action used to get a Hint value.
TFormclassImplements a form used in an LCL application.
TFormPropertyStorageclassTFormPropertyStorage - class for storage of a Form's properties.
TFrameclassFrames can be designed like Forms and used like custom controls, without much coding or installation in the IDE.
THintInfoAtMouserecordStores control and mouse position information for a hint display.
THintWindowclassThe pop-up box containing helpful information that appears when the mouse pointer hovers over an object.
THintWindowRenderedclassFor a rendered hint with a child control added by an external provider.
TIDesignerclassThe abstract base class for visual Form designers.
TMonitorclassProvides information about a physical monitor.
TMonitorListclassA list of monitors available on the system.
TScreenclassProvides information about screen displays in an application.
TScrollBoxclassImplements a windowed control with scroll bars.
TScrollingWinControlclassImplements a windowed control with scroll bars.
TWindowMagnetManagerclassImplements a manager for form and screen snapping behavior in an application.
TWindowMagnetOptionsclassImplements options which control magnetic window behavior in form instances.

Procedures and functions

CreateWidgetsetprocedureCreates the widgetset singleton.
dbgsfunctionFormats debugger messages for various types by converting their values into readable text.
FindRootDesignerfunctionGets the designer object for the specified persistent object (or its parent).
FreeWidgetSetprocedureDestroys singletons for the Screen, Application, and WidgetSet.
GetDesignerFormfunctionGets the Form with the designer object for the specified control or persistent object.
GetFirstParentFormfunctionPerforms a recursive search for the first Parent of type TCustomForm.
GetLongHintfunctionReturns the long version of a Hint string.
GetParentDesignControlfunctionGets the control which is the top-most TCustomDesignControl instance for the specified control, or Nil when not a TCustomDesignControl instance.
GetParentFormfunctionGets the form instance for the specified Control.
GetShortHintfunctionReturns the short version of a Hint string.
GetTopFormSkipNonDockedfunctionGets the top-most form which hosts the specified control docksite form instances.
IsAccelfunctionDetermines whether the specified virtual key is used as an accelerator (short cut) in the given caption string.
KeyboardStateToShiftStatefunctionConverts virtual key state codes to TShiftState values.
KeyDataToShiftStatefunctionConverts modifier keys from the LParam in a keyboard message (WM_KEYUP for example) to a TShiftState value.
KeysToShiftStatefunctionConverts modifier keys in the LParam for a mouse message to a TShiftState value.
NeedParentDesignControlfunctionEnsures that a TCustomDesignControl instance is found for the specified control.
NotifyApplicationUserInputprocedureSignals all user input handlers for the application using the specified message.
RegisterprocedureRegisters components declared in this unit.
RestoreFocusStateprocedureRestores the previous focus state for an application to the specified value.
SaveFocusStatefunctionSaves the last focus state (focused control) in an application.
ShiftStateToKeysfunctionConverts a shift state into a key state value compatible with the key state of a Windows API LParam.
StrToWindowStatefunctionConverts a string to a TWindowState enumeration value.
ValidParentFormfunctionGets a valid parent form for the specified control.
WindowStateToStrfunctionConverts a TWindowState enumeration value to its String representation.

Types

PAsyncCallQueueItemtypeA queued asynchronous callback request node.
PCursorRectypeContains information about a cursor shape.
PModalResulttypeDummy type for the values that can be returned as a modal result.
TAppHintTimerTypeenumerationRepresents TApplication hint timer states.
TApplicationDoubleBufferedenumerationEnumeration with values used in the DoubleBuffered property in TApplication.
TApplicationExceptionDlgenumerationEnumeration with dialog types for an application.
TApplicationFlagenumerationApplication state flags.
TApplicationFlagssetSet type used to store values from the TApplicationFlag enumeration.
TApplicationGlyphDrawEffectsEnabledenumerationControls glyph drawing effects for mouse-over and mouse-down events in an application.
TApplicationHandlerTypeenumerationTypes of Application notification handlers.
TApplicationNavigationOptionenumerationWhich keys can be used for the navigation within a form.
TApplicationNavigationOptionssetWhich keys can be used for the navigation within a form.
TApplicationShowGlyphsenumerationIndicates the application policy for displaying glyphs on menus and buttons.
TApplicationTypeenumerationIdentifies the kind of device where the application currently runs.
TBorderIconenumerationRepresents a visual element in a window title bar; depends on window manager support.
TBorderIconssetRepresents a visual element in a window title bar; depends on window manager support.
TCloseActionenumerationRepresents actions that can occur when a form is closed.
TCloseEventprocedure typeType used for an OnClose event handler in a form.
TCloseQueryEventprocedure typeSpecifies an OnCloseQuery handler event handler.
TCustomFormClasstypeClass reference for the TCustomForm class.
TCustomFrameClasstypeClass type used to create new instances of TCustomFrame.
TDataEventprocedure typeSpecifies the type used for an asynchronous callback method.
TDefaultMonitorenumerationThe preferred monitor for showing a form.
TDropFilesEventprocedure typeType used for an OnDropFiles event handler.
TExceptionEventprocedure typeDefines an event handler signalled to perform exception handling in an application.
TFocusStatetypePointer to focus state information for the last active control in an application.
TFormClasstypeClass type used to create new TForm instances.
TFormHandlerTypeenumerationTForm Notification handler types.
TFormStatesetSet type used to store values from the TFormState enumeration.
TFormStateTypeenumerationForm state flags.
TGetDesignerFormEventprocedure typeSpecifies an event handler signalled to get the form with the designer for a persistent object.
TGetHandleEventprocedure typeSpecifies an event handler used to get the handle for the main form in an application.
THelpEventprocedure typeType used for an OnHelp event handler.
THintWindowClasstypeClass of THintWindow.
TIdleEventprocedure typeSpecifies an event handler signalled when an application becomes idle.
TIsFormDesignFunctionprocedure typeSpecifies a Boolean function type used to implement the routine assigned to the IsFormDesign variable.
TLogMessageEventprocedure typeDefines an event handler signalled to handle log messages written using the TApplication.Log method.
TMessageBoxFunctionprocedure typeThe type used for the MessageBox variable.
TModalDialogFinishedprocedure typeSpecifies an event handler signalled when a modal message dialog is completed.
TModalResulttypeDummy type for the values that can be returned as a modal result.
TMonitorDefaultToenumerationThe monitor to use when screen coordinates are outside of the physical bounds for the screens.
TOnUserInputEventprocedure typeSpecifies an event handler signalled to respond to user input messages in an application.
TPopupModeenumerationDefines the handling performed for a parent window in forms and dialogs.
TPositionenumerationRepresents the Position and Size of a Form on Screen.
TProcedureprocedure typeType used for a procedure that takes no arguments.
TProcedureOfObjectprocedure typeType used for an object procedure that takes no arguments.
TQueryEndSessionEventprocedure typeSpecifies an event type used to handle a WM_QUERYENDSESSION window message in an application.
TScreenControlEventprocedure typeType for a screen notification handler used for control-related events.
TScreenFormEventprocedure typeType used for a screen notification handler for form-related events.
TScreenNotificationenumerationScreen notification events and handler types.
TScrollBarInctypeThe range for scroll bar increments.
TScrollBarKindenumerationThe orientation of a scroll bar.
TScrollBarStyleenumerationScroll bar style flags.
TShortCutEventprocedure typeType used for an OnShortcut event handler.
TShowHintEventprocedure typeDefines an event handler signalled to perform hint display.
TShowInTaskbarenumerationIdentifies the display preference for a form on the TaskBar.
TTaskBarBehaviorenumerationHow forms are represented in the TaskBar.
TTileModeenumerationValues representing the arrangement order for tiled MDI child windows.
TWindowStateenumerationRepresents the actual State of the window on the screen.

Constants

DefaultApplicationBiDiModeconstantContains the default BiDiMode value used for the current LCL version.
DefaultBorderIconsconstantMaps form border styles to their border icons.
DefHintColorconstantThe default hint window background color.
DefHintHidePauseconstantThe default pause (in milliseconds) before a hint is hidden.
DefHintHidePausePerCharconstantThe default pause (in milliseconds) added to DefHintHidePause.
DefHintPauseconstantThe default pause before the hint window is displayed (in milliseconds).
DefHintShortPauseconstantThe default pause (in milliseconds) before a Hint is re-displayed.

Variables

ApplicationvariableThe TApplication singleton.
ExceptionObjectvariableVariable representing the current exception object in an application.
HintWindowClassvariableThe class type used to create hint window instances for an application.
IsFormDesignvariableAddress of the function used to determine if a specified control is a form designer.
MessageBoxFunctionvariableProvides the routine used to display a message dialog in widgetset implementations.
OnGetDesignerFormvariableEvent handler signalled to get the designer form for the specified form or control.
RequireDerivedFormResourcevariableWhen 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.
ScreenvariableThe TScreen singleton for the application.

Uses

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.