Sign in Join
FPDoc Onlineexperiment

TWidgetSet class

In unit InterfaceBase

Provides an application helper class (platform and drawing interface).

Declaration

pascal
TWidgetSet = class(TObject)

Inheritance

  1. TWidgetSet
  2. TObject

Description

TWidgetSet is a TObject descendant which implements an application helper class that provides access to platform-specific operating system and drawing interfaces. A number of methods are declared as abstract virtual, and must be implemented in descendent classes. Other methods are declared as virtual to allow them to be overridden for a specific platform.

TWidgetSet is used as the ancestor for platform-specific implementations like TWin32WidgetSet, TGTKWidgetSet, TQtWidgetSet, TCarbonWidgetSet, TCocoaWidgetSet, et. al.

The WidgetSet variable provides access to the TWidgetSet singleton for the current widgetset implementation.

See also

Properties

AppHandlepublicNative handle for a TApplication instance.
ThemeServicespublicTheme services class instance for the widgetset.

Methods

PassCmdLineOptionsprotectedPasses command line arguments needed for the platform.
CreateThemeServicesprotectedTheme services class instance for the widgetset.
GetAppHandleprotectedGets the value for the AppHandle property.
SetAppHandleprotectedSets the value for the AppHandle property.
CreatepublicConstructor for the class instance.
BeforeDestructionpublicPerforms actions needed before freeing the class instance.
AppInitpublicInitializes the application for the platform, and returns Screen information.
AppRunpublicEnters a state in which the application waits for system messages.
AppWaitMessagepublicWaits for arrival of a message.
AppProcessMessagespublicHandles all pending messages.
AppTerminatepublicTerminates the application.
AppMinimizepublicMinimizes the whole application to the taskbar.
AppRestorepublicRestore application previously minimized to the taskbar.
AppBringToFrontpublicBrings the entire application on top of all other non-topmost programs.
AppSetIconpublicSets the icon in the taskbar.
AppSetTitlepublicSets the title for an application.
AppSetVisiblepublicChanges the visibility of the application window.
AppRemoveStayOnTopFlagspublicResets all StayOnTop windows to NoTopmost.
AppRestoreStayOnTopFlagspublicSets all windows in the StayOnTop list to TopMost.
AppSetMainFormOnTaskBarpublicShows or hides the taskbar icon for the MainForm.
AppSetupMainFormpublicSets the window state for the specified main form to match the CmdShow parameter passed when startted from a shortcut.
BeginMessageProcesspublic
EndMessageProcesspublic
LCLPlatformpublicReturns the name for the widgetset used for the platform.
GetLCLCapabilitypublicChecks whether the widgetset supports the specified LCL capability.
DCGetPixelpublicGets the color for a pixel on the specified device context.
DCSetPixelpublicSets the color for a pixel on the specified device context.
DCRedrawpublicRedraws the device context for the specified canvas handle.
DCSetAntialiasingpublicEnables or disables anti-aliasing for the specified device context.
SetDesigningpublicSets the flag which indicates a designer is active for the specified component.
InitStockFontpublicInitializes a font object to a (predefined) stock font.
IsHelpKeypublicChecks whether the widgetset uses the key to show help.
CreateTimerpublicCreates a timer with the given callback method.
DestroyTimerpublicDestroys the timer with the specified handle.
ArcpublicUse Arc to draw an elliptically curved line with the current Pen.
AngleChordpublicUse AngleChord to draw a filled Chord shape on a canvas.
BeginPaintpublicStart painting in a window.
BitBltpublicCopies part of a source DC into a destination DC, using the specified raster operation.
CallNextHookExpublicCalls the next procedure in the hook chain.
CallWindowProcpublicCalls another Window procedure, to handle a message.
ClientToScreenpublicConverts (relative) Client coordinates into absolute Screen coordinates.
CombineRgnpublicCombines two regions.
CreateBitmappublicCreates a bitmap for the widgetset.
CreateBrushIndirectpublicCreates a logical brush that has the specified style, color, and pattern.
CreateBrushWithRadialGradientpublic
CreateCaretpublicCreates a new shape for the system caret and assigns ownership of the caret to the specified window.
CreateCompatibleBitmappublicCreates a bitmap that is compatible with the given DC.
CreateCompatibleDCpublicCreates a memory Device Context, compatible with the device for the given DC.
CreateDIBitmappublicCreates a Device Dependent Bitmap (DDB) from a Device Independent Bitmap (DIB).
CreateDIBSectionpublicCreates a bitmap into which the application can write.
CreateEllipticRgnpublicCreates an elliptic region, bounded by the given rectangle.
CreateFontIndirectpublicCreates a logical font, selectable into any DC.
CreateFontIndirectExpublicCreates a logical font, selectable into any DC. Allows for a long font name.
CreateIconIndirectpublicCreates an icon or cursor.
CreatePalettepublicCreates a logical palette, selectable into any DC.
CreatePatternBrushpublicCreates a logical brush, selectable into any DC.
CreatePenIndirectpublicCreates a logical Pen, selectable into any DC.
CreatePolygonRgnpublicCreates a polygonal region.
CreateRectRgnpublicCreates a rectangular region.
CreateRoundRectRgnpublicCreates a rectangular region with rounded corners.
DeleteCriticalSectionpublicDeletes an un-owned critical section.
DeleteDCpublicDeletes a Device Context created using CreateDC.
DeleteObjectpublicDeletes a graphic object, freeing all system resources associated with the object.
DestroyCaretpublicDestroys the caret but doesn't free the bitmap.
DestroyCursorpublicDestroys a mouse cursor.
DestroyIconpublicDestroys an icon.
DPtoLPpublicConverts an array of Device Points (coordinates) into Logical Points.
DrawFrameControlpublicDraws a window frame control, of the specified type and style.
DrawFocusRectpublicShows or hides a focus rectangle.
DrawEdgepublicDraws one or more edges of a rectangle.
DrawTextpublicDraws formatted text within a rectangle.
EnableScrollBarpublicEnables or disables the arrows in a scrollbar control, or the scrollbars in a window.
EnableWindowpublicEnables or disables mouse and keyboard input to the specified window or control.
EndPaintpublicEnds a paint operation in a window, started with BeginPaint.
EnterCriticalSectionpublicEnters a critical section.
EnumDisplayMonitorspublicCalls a callback function for every available display monitor.
EnumFontFamiliespublicInvokes a callback function for every font available on a specified device.
EnumFontFamiliesExpublicInvokes a callback function for every available font that matches certain criteria.
EllipsepublicDraws a filled circle or ellipse, bounded by a rectangle.
EqualRgnpublic
ExcludeClipRectpublicExcludes a rectangle from the clipping region, i.e. prevents painting within the rectangle.
ExtCreatePenpublicCreates a logical pen, selectable into any DC.
ExtTextOutpublicDraws a string without formatting (single line).
ExtSelectClipRGNpublicCombines the passed Region with the current clipping region.
FillRectpublicFills a rectangle using the specified brush.
FillRgnpublicFills a region using the specified brush.
FloodFillpublicFills an area of the display surface with the current brush.
FrameRectpublicDraws a border around a rectangle.
GetActiveWindowpublicReturns the Handle of the active window of the calling thread.
GetBitmapBitspublicFills a buffer with the bitmap bits.
GetBkColorpublicReturns the background color of a device context.
GetCapturepublicReturns the window that captures mouse messages.
GetCaretPospublicReturns the caret position, in client coordinates.
GetClientRectpublicReturns the client rectangle of a window.
GetClipBoxpublicReturns the smallest rectangle which includes the entire clipping region of a device context.
GetClipRGNpublicReturns the clipping region of a device context.
GetCompositorExtendedBorderpublic
GetCurrentObjectpublicReturns the currently selected object in a device context.
GetCursorPospublicGets the mouse cursor position, in screen coordinates.
GetCharABCWidthspublicReturns the ABC widths of a range of character codes.
GetDCpublicReturns the handle for the Device Context (DC) in the client area of a window.
GetDeviceCapspublicReturns various device specific information.
GetDIBitspublicFills a buffer with bitmap color bits.
GetDoubleClickTimepublicReturns the double-click time, in milliseconds.
GetFocuspublicReturns the handle of the window that has the focus in the current thread.
GetFontLanguageInfopublicReturns language information about the currently selected font.
GetForegroundWindowpublicReturns the window that the user is currently working with, session wide.
GetIconInfopublicReturns information about an Icon or Cursor.
GetKeyStatepublicThe status of a virtual key.
GetMapModepublicReturns the mapping mode of a device context.
GetMonitorInfopublicReturns information about a display monitor.
GetDpiForMonitorpublic
GetObjectpublicReturns information about a graphics object.
GetPaletteEntriespublicRetrieves a range of color entries from a logical palette.
GetParentpublicReturns the parent window of a window.
GetProppublicRetrieves a property value for a window.
GetRgnBoxpublicReturns the bounding rectangle of a region, containing the entire region.
GetROP2publicThe current Foreground Mixing Mode in a device context.
GetScrollInfopublicReturns all or selected information about a ScrollBar.
GetStockObjectpublicRetrieves a handle to one of the predefined graphic objects.
GetSysColorpublicRetrieves the system color for standard display elements.
GetSysColorBrushpublicRetrieves a system brush for standard display elements.
GetSystemPaletteEntriespublicRetrieves a range of color entries from the system palette for a device.
GetSystemMetricspublicRetrieves various system metrics.
GetTextColorpublicThe current text color in a device context.
GetTextExtentExPointpublicCalculates the number of characters, that fit into some horizontal space.
GetTextExtentPointpublicComputes the display width and height of a string.
GetTextExtentPoint32publicComputes the display width and height for a string.
GetTextMetricspublicRetrieves the metrics for the currently selected font.
GetViewPortExtExpublicReturns the size of the viewport for a device context.
GetViewPortOrgExpublicReturns the origin of the viewport for a device context.
GetWindowExtExpublicReturns the extent of a window, in logical units.
GetWindowLongpublicReturns the attributes of a window.
GetWindowRectpublicRetrieves the bounding rectangle of a window, in screen coordinates.
GetWindowSizepublicReturns the Width and Height of the window.
GetWindowOrgExpublicRetrieves the window origin for a device context in logical units.
GradientFillpublicFills rectangle or triangle areas with gradient colors.
HideCaretpublicRemoves the caret from the screen.
InitializeCriticalSectionpublicInitializes a Critical Section object.
IntersectClipRectpublicShrinks the clipping region of an Device Context to a rectangular boundary, e.g. a text area.
InvalidateRectpublicMarks a display area for repaint.
InvalidateRgnpublicMarks a display area for repaint.
IsDBCSLeadBytepublic
IsIconicpublicTrue when the window is minimized.
IsWindowpublicChecks whether a handle refers to a window.
IsWindowEnabledpublicDetermines whether a window can receive mouse and keyboard input.
IsWindowVisiblepublicThe definite Visible state of a window.
IsZoomedpublicTrue when the window is maximized.
LeaveCriticalSectionpublicReleases a critical section, and allows use by other threads.
LineTopublicDraws a line from the current position up to, but not including, the specified point.
LoadBitmappublic
LoadCursorpublic
LoadIconpublic
LPtoDPpublicConverts logical coordinates into device coordinates.
MaskBltpublicCopies part of a source DC into an destination DC, using the specified foreground and background raster operations.
MessageBoxpublicDisplays a modal dialog message box.
MonitorFromPointpublicFinds a monitor from the screen coordinates.
MonitorFromRectpublicFinds the monitor covering most of a rectangle.
MonitorFromWindowpublicFinds the monitor covering most of a window.
MoveToExpublicMoves the current position to the specified point.
OffsetRgnpublicMoves a region relative.
PaintRgnpublic
PeekMessagepublicChecks the thread's message queue for a message.
PiepublicDraws a filled pie-shaped wedge, from an ellipse and two radials.
PolyBezierpublicDraws Bezier curves.
PolygonpublicDraws a filled Polygon.
PolylinepublicDraws a sequence of lines between the specified points.
PostMessagepublicSends a message to a window, without waiting for the message result.
PtInRegionpublicTests whether a point lies in a region.
RealizePalettepublicMaps palette entries from the current logical palette to the system palette.
RectanglepublicDraws a filled rectangle.
RectInRegionpublic
RectVisiblepublicChecks whether the clipping region contains (part of) a rectangle.
RedrawWindowpublicRedraws (part of) a window.
ReleaseCapturepublicRestores normal mouse input processing, after SetCapture.
ReleaseDCpublicReleases an Device Context obtained by GetDC.
RemoveProppublicRemoves a named property from a window.
RestoreDCpublicRestores an Device Context (DC) to an previously saved state.
RoundRectpublicDraws a filled rectangle with rounded corners.
SaveDCpublicSaves the state of an Device Context in the context stack.
ScreenToClientpublicConverts absolute Screen coordinates into Client relative coordinates.
ScrollWindowExpublicScrolls the content of a window, by a number of pixels.
SelectClipRGNpublicSets the ClipRegion of an DeviceContext.
SelectObjectpublicSelects an object into an device context.
SelectPalettepublicSelects a logical palette into an device context.
SendMessagepublicSends a message to a window.
SetActiveWindowpublicSets focus to the specified window, if the application is on top.
SetBkColorpublicSets the current background color of an device context.
SetBkModepublicSets the background mix mode (transparency) of an device context.
SetCapturepublicSets the mouse capture to the specified window.
SetCaretPospublicMoves the Caret to the specified coordinates.
SetCaretPosExpublicMoves the Caret into a window.
SetCursorpublicChanges the shape of the mouse cursor.
SetCursorPospublicChanges the position of the mouse cursor.
SetFocuspublicSets the keyboard input focus to the specified window.
SetForegroundWindowpublicMoves a window in front of all other windows, and activates it.
SetMapModepublicSets the mapping mode of an device context.
SetMenupublicAssigns a menu to a window.
SetParentpublicChanges the parent of a window.
SetProppublicAdds a property to a window.
SetRectRgnpublic
SetROP2publicSets the Foreground Mixing Mode in a device context.
SetScrollInfopublicSets (selected) parameters of a scroll bar.
SetStretchBltModepublicSets the StrechBlt mode for an device context.
SetSysColorspublicSets the colors for one or more display elements of window borders and desktop.
SetTextCharacterExtrapublicSets extra inter-character spacing in text output.
SetTextColorpublicSets the text color in a device context.
SetWindowLongpublicSets an attribute of a window.
SetViewPortExtExpublicSets the extent of the viewport for a device context.
SetViewPortOrgExpublicSets the device origin corresponding to the window origin (0,0) in a device context.
SetWindowExtExpublicSets the extent of the window for an device context.
SetWindowOrgExpublicSpecifies which window point maps to the viewport origin (0,0).
SetWindowPospublicChanges the size, position, and Z order of a window.
SetWindowRgnpublicRestricts the visible part of the entire window.
ShowCaretpublicShows the Caret (text cursor).
ShowScrollBarpublicShows or hides a ScrollBar.
ShowWindowpublicShows a window in an specific state.
StretchBltpublicCopies a rectangular region to a device context, shrinking or stretching it as needed.
StretchDIBitspublicCopies a rectangular region from a DIB into an device context, shrinking or stretching it as required.
SystemParametersInfopublicRetrieves or sets one of the system-wide parameters.
TextOutpublicDraws an string without formatting (single line).
UpdateWindowpublicForces an immediate repaint of a window, if required.
WindowFromPointpublicFinds the window containing the specified point.
AddEventHandlerpublicAdds an event handler routine for the specified handle.
AddProcessEventHandlerpublicAdds a process handler routine for the specified handle.
AddPipeEventHandlerpublicAdds a pipe handler routine for the specified handle.
AllocateHWndpublicAllocates an invisible window that can be used to receive messages.
AskUserpublicDisplays a dialog box with the specified values, and returns the modal result.
CallDefaultWndHandlerpublicCalls the default window handler to process a message from a control.
ClipboardFormatToMimeTypepublicGets the MIME type for the specified clipboard format.
ClipboardGetDatapublicGets clipboard data for a given format and saves it to the specified stream.
ClipboardGetFormatspublicGets a list of available registered clipboard formats.
ClipboardGetOwnerShippublicSets the requested formats and requests ownership of the clipboard.
ClipboardRegisterFormatpublicRegisters a clipboard format for the specified MIME type.
ClipboardFormatNeedsNullBytepublic
CreateEmptyRegionpublic
CreatePixmapIndirectpublic
CreateRegionCopypublic
CreateRubberBandpublic
CreateStandardCursorpublicCreates one of the standard cursors.
DCClipRegionValidpublic
DeallocateHWndpublicDeletes a window created with AllocateHWnd.
DestroyRubberBandpublic
DrawDefaultDockImagepublicDraws the DockRect during drag-dock operations.
DrawGridpublicDraws a grid lines inside a rectangle with the specified spacing.
ExtUTF8OutpublicDraws an UTF-8 string without formatting (single line).
FontIsMonoSpacepublicDetermines if the typeface in the specified font handle is a mono-spaced font.
Frame3dpublicDraws a 3D frame for a rectangle on a device context using the specified style.
GetAcceleratorStringpublicGets a string representing the specified key and shift modifier.
GetAvailableNativeCanvasTypespublic
GetAvailableNativeHandleTypespublic
GetCaretRespondToFocuspublic
GetClientBoundspublicGets the coordinates for the client area in the specified window handle.
GetCmdLineParamDescForInterfacepublic
GetControlConstraintspublicUpdates the constraints object (e.g. TSizeConstraints) with interface specific bounds.
GetDCOpacitypublic
GetDCOriginRelativeToWindowpublic
GetDesignerDCpublic
GetDeviceSizepublic
GetLCLOwnerObjectpublic
GetNativeCanvaspublic
GetNativeHandlepublic
GetScrollBarSizepublic
GetScrollbarVisiblepublic
GetWindowRelativePositionpublic
InvalidateFramepublic
IsDesignerDCpublic
IsMobilePlatformpublic
IsCDIntfControlpublic
MoveWindowOrgExpublic
PromptUserpublic
PromptUserAtXYpublic
RadialArcpublic
RadialChordpublic
RadialPiepublic
RawImage_CreateBitmapspublic
RawImage_DescriptionFromBitmappublic
RawImage_DescriptionFromDevicepublic
RawImage_FromBitmappublic
RawImage_FromDevicepublic
RawImage_QueryDescriptionpublic
RegroupMenuItempublic
ReleaseDesignerDCpublic
RemoveEventHandlerpublic
RemoveProcessEventHandlerpublic
RemovePipeEventHandlerpublic
RequestInputpublic
SendCachedLCLMessagespublic
SetCanvasScaleFactorpublic
SetCaretRespondToFocuspublic
SetComboMinDropDownSizepublic
SetDCOpacitypublic
SetEventHandlerFlagspublic
SetRubberBandRectpublic
ShowSelectItemDialogpublic
StretchMaskBltpublic
TextUTF8OutpublicWrites UTF-8-encoded text to the specified device context.

Fields

FThemeServicesprotectedTheme services class instance for the widgetset.

Inherited

From TObject (40)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Destroy Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

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