diff options
Diffstat (limited to 'docs/xml/corelib/fpg_base.xml')
-rw-r--r-- | docs/xml/corelib/fpg_base.xml | 232 |
1 files changed, 135 insertions, 97 deletions
diff --git a/docs/xml/corelib/fpg_base.xml b/docs/xml/corelib/fpg_base.xml index f052e2f0..3c922712 100644 --- a/docs/xml/corelib/fpg_base.xml +++ b/docs/xml/corelib/fpg_base.xml @@ -3,7 +3,7 @@ <package name="fpGUI"> <descr><p>fpGUI Toolkit is intended for Open Source and Commercial applications. -fpGUI uses the LGPL2 license with the static linking exception - the same as +fpGUI uses the LGPL v2 license with a static linking exception - the same as the Free Pascal Compiler's RTL.</p> <p>fpGUI is an Object Pascal toolkit for cross-platform application development. It provides single-source portability across Linux, MS Windows, *BSD, OpenSolaris and @@ -18,75 +18,70 @@ For more information, see the fpGUI Toolkit website at: <url href="http://fpgui. <descr><p>This unit contains all the abstract classes for the CoreLib code of fpGUI. It also defines many types and constants used throughout the toolkit. </p> - <p>When implementing support for a completely new windowing system -(eg: Carbon used in Mac OS-X) you would implement all the abstract methods + <p>When implementing support for a completely new windowing system +(eg: Carbon used in Mac OSX) you would implement all the abstract methods defined in this unit. </p> </descr> - <!-- alias type Visibility: default --> - <element name="TfpgCoord"> - <short>A custom type used to represent X and Y coordinates.</short> - <descr>Internally TfpgCoord is actually a Integer type. We created a custom -alias type for use in fpGUI in the event that we might want to change the + +<element name="TfpgCoord"> +<short>A custom type used to represent X and Y coordinates.</short> +<descr>Internally TfpgCoord is actually a Integer type. We created a custom +alias type for use in fpGUI in the event that we might want to change the underlying type in the future. Example to floating points. </descr> - <seealso/> - </element> - <!-- alias type Visibility: default --> - <element name="TfpgColor"> - <short>Represents a color in integer format.</short> - <descr> - <p>TfpgColor is always in RRGGBB (Red, Green, Blue) format, no matter the +</element> + +<element name="TfpgColor"> +<short>Represents a color in integer format.</short> +<descr> +<p>TfpgColor is always in AARRGGBB (Alpha, Red, Green, Blue) format, no matter the operating system. </p> - <p>The <var>fpg_base</var> unit also contains definitions of many useful color -constants. It defines the standard predefined Delphi colors (like clRed, -clMagenta etc.), the 140 web safe colors using the defacto standard names as -used by Netscape and Internet Explorer web browsers. As well as some internal -color constants used by many GUI components (like clText, clWindowBackground -etc.). -</p> - </descr> - <seealso/> - </element> - <!-- record type Visibility: default --> - <element name="TRGBTriple"> - <short>A record structure holding the RGBA values of a color</short> - <descr><printshort id="TRGBTriple"/>.</descr> - <seealso/> - </element> - <!-- variable Visibility: default --> - <element name="TRGBTriple.Alpha"> - <short>Alpha support has not really been implemented in fpGUI yet.</short> - <descr/> - <seealso/> - </element> - <!-- enumeration type Visibility: default --> - <element name="TWindowType"> - <short>Enum type defining what types of windows can be created.</short> - <descr/> - <seealso/> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWindowType.wtChild"> - <short>The window being created is a child on another window. This normally +<p>The <var>fpg_base</var> unit also contains definitions of many useful color +constants. It defines the standard predefined Delphi colors (like clRed, +clMagenta etc.), the 140 web safe colors using the defacto standard names as +used by Netscape and Internet Explorer web browsers. As well as some internal +color constants used by many GUI components (like clText, clWindowBackground +etc.).</p></descr> +<seealso> +<link id="fpg_base.TRGBTriple">TRGBTriple</link> +</seealso> +</element> + +<element name="TRGBTriple"> +<short>A record structure holding the RGBA values of a color</short> +<descr><printshort id="TRGBTriple"/>.</descr> +</element> + +<element name="TRGBTriple.Alpha"> +<short>Alpha support has not really been implemented in fpGUI yet.</short> +</element> + +<element name="TWindowType"> +<short>Enum type defining what types of windows can be created.</short> +</element> + +<element name="TWindowType.wtChild"> +<short>The window being created is a child on another window. This normally means no titlebar or window borders are going to be created.</short> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWindowType.wtWindow"> - <short>This would specify a standard window with titlebar and window borders.</short> - <descr>This would specify a standard window with titlebar and window borders. It grabs input focus, and appears in the taskbar.</descr> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWindowType.wtModalForm"> - <short>This windows type is similar to wtWindow, but grabs focus.</short> - <descr>This windows is the same as <link id="#fpgui.fpg_base.TWindowType.wtWindow">wtWindow</link>, but grabs the input focus until it has closed. This window normally doesn't appear in the taskbar.</descr> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWindowType.wtPopup"> - <short>This window will normally not have a titlebar or window borders.</short> - <descr>This window will normally not have a titlebar or window borders and will appear above other windows. It is used for example in the dropdown window of a ComboBox or a tooltip window or popup menus. This type of window does not steal focus.</descr> - </element> +</element> + +<element name="TWindowType.wtWindow"> +<short>This would specify a standard window with titlebar and window borders. It grabs input +focus, and appears in the taskbar.</short> +</element> + +<element name="TWindowType.wtModalForm"> +<short>This windows is similar to <link id="#fpgui.fpg_base.TWindowType.wtWindow">wtWindow</link>, but grabs +the input focus until it has closed. This window normally doesn't appear in the taskbar.</short> +</element> + +<element name="TWindowType.wtPopup"> +<short>This window will normally not have a titlebar or window borders and will appear above other windows. It +is used for example in the dropdown window of a ComboBox or a tooltip window or popup menus. This type of +window does not steal focus.</short> +</element> <element name="TWindowAttribute"> <short>An enum types defining extra attributes of a window.</short> @@ -130,7 +125,7 @@ the first time.</short> <link id="fpg_base.TWindowAttribute">TWindowAttribute</link> </seealso> </element> - + <!-- enumeration type Visibility: default --> <element name="TMouseCursor"> <short>Enum types of the available mouse cursor shapes.</short> @@ -371,7 +366,7 @@ the first time.</short> <element name="TfpgRect"> <short>A graphical (pixel based) rectangle structure used throughout fpGUI.</short> <descr> - <p>Note that this structure is not a class, so static allocations are + <p>Note that this structure is not a class, so static allocations are allowed. This makes it much easier to use in Widgets and in fpGUI internal messages.</p> <p>Think of the pixel screen/grid like the grid of a spreadsheet (or as a magnified look of the top corner of your screen). @@ -387,11 +382,11 @@ messages.</p> +---+---+--- | | | </pre> - <p>x is at (0,0). A pixel is always 1x1, you don't get smaller (we are not using sub-pixels like on LCD screens, because they don't apply to all screens). + <p>x is at (0,0). A pixel is always 1x1, you don't get smaller (we are not using sub-pixels like on LCD screens, because they don't apply to all screens). </p> - <p>So with that example, Width = 1 pixel and Height = 1 pixel. In the case of -Classes.Bounds() the Right and Bottom values are (1,1) which looking at the -above image will be wrong, the pixel only covers one block, so in a screen/pixel + <p>So with that example, Width = 1 pixel and Height = 1 pixel. In the case of +Classes.Bounds() the Right and Bottom values are (1,1) which looking at the +above image will be wrong, the pixel only covers one block, so in a screen/pixel environment, Right, Bottom is also (0,0), the same as Top/Left. This is what TfpgRect.Right and TfpgRect.Bottom will report. </p> @@ -406,20 +401,20 @@ TfpgRect.Right and TfpgRect.Bottom will report. +---+---+--- | | | </pre> - <p>In this example we have a rectangle. Top/Left = (0,0) and Bottom/Right = (1,1). -This means Width = 2 pixels and Height = 2 pixels. Clearly visible in the image + <p>In this example we have a rectangle. Top/Left = (0,0) and Bottom/Right = (1,1). +This means Width = 2 pixels and Height = 2 pixels. Clearly visible in the image above. </p> - <p>But if we call Classes.Bounds(0,0,2,2) it reports Bottom/Right as (2,2) which -is wrong (again looking at the image above as reference). This is my point. + <p>But if we call Classes.Bounds(0,0,2,2) it reports Bottom/Right as (2,2) which +is wrong (again looking at the image above as reference). This is my point. Bounds() cannot be used in this case in a graphical environment. </p> - <p>The reason I don't use a grid layout as shown below, is -because if the mouse is over the rectangle containing x, the OS (graphics system) reports its -position as (0,0). You don't have to have the mouse pointer over the intersecting -lines at (0,0) as indicated in the image below. The whole square containing + <p>The reason I don't use a grid layout as shown below, is +because if the mouse is over the rectangle containing x, the OS (graphics system) reports its +position as (0,0). You don't have to have the mouse pointer over the intersecting +lines at (0,0) as indicated in the image below. The whole square containing the x is referenced as (0,0), hence the grid layout as show in the images above, -and what fpGUI uses. The same grid layout as used in TfpgStringGrid or any +and what fpGUI uses. The same grid layout as used in TfpgStringGrid or any Spreadsheet program etc. </p> <pre>. @@ -646,7 +641,7 @@ redundant calculations, fpGUI allows you to set all the properties, then act on it once you call <var>UpdateWindowPosition</var>. In most cases fpGUI can even reduce the API calls needed, because it could pass for example Width and Height via one API call. In the case of X11, it can actually do all -four values in a single API call. Thus improving efficiency and reduces resize +four values in a single API call. Thus improving efficiency and reduces resize calculations and screen redraws.</p> </descr> </element> @@ -657,7 +652,7 @@ calculations and screen redraws.</p> of the control begins or to reposition the left side of the control. </p> <remark>fpGUI delays acting on the Top, Left, Width and Height properties of a control until the -<var>UpdateWindowPosition</var> method is called. For more information on why this is so, +<var>UpdateWindowPosition</var> method is called. For more information on why this is so, see <link id="#fpgui.fpg_base.TfpgWindowBase.UpdateWindowPosition">UpdateWindowPosition</link> help.</remark></descr> <seealso> @@ -671,7 +666,7 @@ help.</remark></descr> of the control begins or to reposition the top side of the control. </p> <remark>fpGUI delays acting on the Top, Left, Width and Height properties of a control until the -<var>UpdateWindowPosition</var> method is called. For more information on why this +<var>UpdateWindowPosition</var> method is called. For more information on why this is so, see <link id="#fpgui.fpg_base.TfpgWindowBase.UpdateWindowPosition">UpdateWindowPosition</link> help.</remark></descr> <seealso> @@ -687,7 +682,7 @@ controls that have their Align property set to alTop, alBottom or alClient, chan this property at runtime has no effect. </p> <remark>fpGUI delays acting on the Top, Left, Width and Height properties of a control until the -<var>UpdateWindowPosition</var> method is called. For more information on why this is so, +<var>UpdateWindowPosition</var> method is called. For more information on why this is so, see <link id="#fpgui.fpg_base.TfpgWindowBase.UpdateWindowPosition">UpdateWindowPosition</link> help.</remark></descr> <seealso> @@ -703,7 +698,7 @@ controls that have their Align property set to alLeft, alRight or alClient, chan this property at runtime has no effect. </p> <remark>fpGUI delays acting on the Top, Left, Width and Height properties of a control until the -<var>UpdateWindowPosition</var> method is called. For more information on why this +<var>UpdateWindowPosition</var> method is called. For more information on why this is so, see <link id="#fpgui.fpg_base.TfpgWindowBase.UpdateWindowPosition">UpdateWindowPosition</link> help.</remark></descr> <seealso> @@ -769,11 +764,32 @@ you must keep copy of the original image before you call <var>Invert</var>.</des <descr/> </element> - <!-- procedure Visibility: public --> - <element name="TfpgImageBase.UpdateImage"> - <short>Updates the internal image resources and OS resources from image data</short> - <descr/> - </element> +<element name="TfpgImageBase.UpdateImage"> +<short>Updates the internal image resources and OS resources from image data</short> +<descr><printshort id="TfpgImageBase.UpdateImage"/>. This method must always be called <b>after</b> +you populated the <var>ImageData</var> array. Then only does it allocate OS resources.</descr> +<seealso> + <link id="TfpgImageBase.ImageData"/> +</seealso> +</element> + +<element name="TfpgImageBase.ImageData"> +<short>Internal representation of color data of the image</short> +<descr><printshort id="TfpgImageBase.ImageData"/>. This method gives you a pointer to the image date +which is always in the format ARGB. If you update the internal data you <b>always</b> need to call +<var>UpdateImage</var> afterwards.</descr> +<seealso> + <link id="TfpgImageBase.UpdateImage"/> +</seealso> +</element> + +<element name="TfpgImageBase.ImageDataSize"> +<short>Tells you the size of the image data</short> +<descr><printshort id="TfpgImageBase.ImageDataSize"/>. You would need this if you work directly with +the ImageData values.</descr> +</element> + + <!-- property Visibility: public --> <element name="TfpgImageBase.Width"> @@ -807,7 +823,7 @@ you must keep copy of the original image before you call <var>Invert</var>.</des <element name="TfpgBaseInterpolation"> <short>A abstract class representing a base Interpolation filter.</short> <descr>This is used as the base class to implement Interpolation filters like -Gaussian, Sinc etc... These decendant filters are used in the +Gaussian, Sinc etc... These decendant filters are used in the <link id="#fpgui.fpg_base.TfpgCanvasBase.StretchDraw">Canvas.StretchDraw</link> function. </descr> <seealso> @@ -823,9 +839,9 @@ Gaussian, Sinc etc... These decendant filters are used in the <!-- procedure Visibility: public --> <element name="TfpgCanvasBase.DrawLine"> <short>Draws a line</short> - <descr><printshort id="#fpgui.fpg_base.TfpgCanvasBase.DrawLine"/>. This method -draws a line from (x1,y1) to (x2,y2), but does not draw the last pixel. All supported -backends follow the Microsoft API and doesn't draw the last pixel. This optimises + <descr><printshort id="#fpgui.fpg_base.TfpgCanvasBase.DrawLine"/>. This method +draws a line from (x1,y1) to (x2,y2), but does not draw the last pixel. All supported +backends follow the Microsoft API and doesn't draw the last pixel. This optimises consecutive lines being drawn without overlapping pixels.</descr> </element> @@ -897,7 +913,7 @@ returns the correct enum type detected. <!-- function Visibility: default --> <element name="fpgGetAvgColor"> <short>Calculates the average color using the two supplied</short> - <descr>This function calculates and returns the average color by using AColor1 + <descr>This function calculates and returns the average color by using AColor1 and AColor2. The Alpha value also gets taken into account. </descr> </element> @@ -913,7 +929,7 @@ rectangle ARect. If it is, the function returns True, otherwise False. <!-- procedure Visibility: default --> <element name="SortRect"> <short>Fixes the Top, Bottom and Left, Right to always represent a valid rectangle</short> - <descr>This function fixes a rectangle so that the Left point is always smaller than the + <descr>This function fixes a rectangle so that the Left point is always smaller than the Right. And the Top is always smaller than the Bottom. </descr> </element> @@ -929,7 +945,7 @@ Right. And the Top is always smaller than the Bottom. For a detailed explanation see: http://www.nondot.org/~sabre/graphpro/line6.html </p></descr> </element> - + <element name="TfpgCanvasBase.ClipLine"> <short>Clips the line based on AClipRect boundaries.</short> <descr>This does not do any drawing, in only clips the line coordinates. This method is used internally by <link id="TfpgCanvasBase.DrawLineClipped"/>.</descr> @@ -958,7 +974,7 @@ value to draw the arc.</p> <dt>h</dt> <dd>The height of the whole arc</dd> <dt>a1</dt> -<dd>This is the starting point of the arc. A value of 0 is the 3 o'clock +<dd>This is the starting point of the arc. A value of 0 is the 3 o'clock position. A value of 270 is the 6 o'clock position. Positive values move counter-clockwise, and negative values move clockwise.</dd> <dt>a2</dt> @@ -974,7 +990,7 @@ goes counter-clockwise, and a negative values goes clockwise.</dd> <element name="TfpgCanvasBase.FillArc.a1"> -<descr>This is the starting point of the arc. A value of 0 is the 3 o'clock +<descr>This is the starting point of the arc. A value of 0 is the 3 o'clock position. A value of 270 is the 6 o'clock position. Positive values move counter-clockwise, and negative values move clockwise.</descr> </element> @@ -994,7 +1010,7 @@ value to draw and fill the arc.</p> <dt>h</dt> <dd>The height of the whole arc</dd> <dt>a1</dt> -<dd>This is the starting point of the arc. A value of 0 is the 3 o'clock +<dd>This is the starting point of the arc. A value of 0 is the 3 o'clock position. A value of 270 is the 6 o'clock position. Positive values move counter-clockwise, and negative values move clockwise.</dd> <dt>a2</dt> @@ -1125,6 +1141,28 @@ contains the help for the application.</descr> or HelpKeyword as parameter. The default help viewer is fpGUI's DocView.</descr> </element> +<element name="TfpgApplicationBase.MainForm"> +<short>Identifies which form in the application is the main form</short> +<descr><p><printshort id="TfpgApplicationBase.MainForm"/>. Use the MainForm property to +determine the form that acts as the application's main window. The first form that is +show will be assigned as the main form of the application. If the main form closes, +then all other forms are closed too, and the application quits.</p> +<p>There are cases where the first form that was created and show, you don't want to +act as the application's main form. In such a case, simply assign the form you want to +act as the application's main form to the <var>MainForm</var> property.</p></descr> +<seealso> + <link id="TfpgApplicationBase.CreateForm"/> +</seealso> +</element> + +<element name="TfpgApplicationBase.CreateForm"> +<short>Creates a new form</short> +<descr><printshort id="TfpgApplicationBase.CreateForm"/>. Call CreateForm to dynamically create +a form at runtime. CreateForm creates a new form of the type specified by the InstanceClass +parameter and assigns it to the variable given by the Reference parameter. The owner of +the new form is the fpgApplication object.</descr> +</element> + <element name="TfpgBaseTimer.Enabled"> <short>Allows you to enable or disable the timer</short> |