From c4fa446e3b834e37714f321de1f8856dfe070794 Mon Sep 17 00:00:00 2001 From: dsiders Date: Mon, 10 Oct 2022 04:49:15 +0100 Subject: [PATCH] DocsL LCL/dialogres. Adds content for topic templates. --- docs/xml/lcl/dialogres.xml | 130 +++++++++++++++++++++++-------------- 1 file changed, 83 insertions(+), 47 deletions(-) diff --git a/docs/xml/lcl/dialogres.xml b/docs/xml/lcl/dialogres.xml index 6747f69bdf..9eaeb46fe0 100644 --- a/docs/xml/lcl/dialogres.xml +++ b/docs/xml/lcl/dialogres.xml @@ -8,17 +8,16 @@ Contains types and constants used to access scalable dialog images.

-DialogRes.pas contains constants and types used to access scalable images as TIcon or TImage resources used on dialog forms. +DialogRes.pas contains constants and types used to access +scalable images as TIcon or TImage resources used on dialog forms.

DialogRes.pas is part of the Lazarus Component Library (LCL).

-
+ - - @@ -30,49 +29,70 @@ Contains types and constants used to access scalable dialog images. - - - + +Defines a range with image identifiers for glyphs used in dialog resources. + + +

+TDialogImage is a range type with identifiers for the images used +on glyph icons in the LCL. The range is defined using constant values defined +in the LCLType unit. The values are used to access glyph image +names in DialogRes and their index positions in TDialogImageList. +

+
+ + + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +Contains the base names for glyph resources used on dialogs. + + +

+DialogResName is an array constant which contains strings with the +base resource names for glyph images used on dialogs. The array elements are +indexed by the values in the TDialogImage range type. For example: +

+ +sResName := DialogResName[idDialogError] // returns 'dialog_error' + +

+This base resource name can then be combined with a scaling suffix, like +'_150' or '_200', to form the complete name for the desired icon resource. +

+
+ + + + +
- - + +Implements a multi-resolution image list used for a dialog icon loaded from a resource file. + + +

+TDialogImageList is a TLCLGlyphs descendant which +implements an image list for a single dialog icon used in the LCL. It +registers multiple resolutions for the glyph images including 16, 24, 32, 48, +and 64 pixels variants. The default image size is 32x32 pixels. The different +image sizes are loaded by calling the ThemeServices.GetStockImage method when +theme services are available. +

+

+Use the Width and Height properties to assign a different preferred size for +images in the list. +

+

+Use the DialogIcon property to access get the ordinal position in the image +list for an icon using its TDialogImage image identifier. +

+
@@ -86,7 +106,9 @@ Contains types and constants used to access scalable dialog images. - + +Constructor for the class instance. + @@ -95,7 +117,9 @@ Contains types and constants used to access scalable dialog images.
- + +Provides indexed access to images for the dialog icon identified in AIndex. + @@ -104,12 +128,23 @@ Contains types and constants used to access scalable dialog images.
- - - + +Gets the image list with glyph images used on dialogs. + + +

+DialogGlyphs is a TDialogImageList function which +returns the image list with the glyphs used for dialog icons. +

+
+ + +
- + +Returns the TDialogImageList singleton defined in the implementation section. + @@ -117,3 +152,4 @@ Contains types and constants used to access scalable dialog images. +