From 4a381a3b07a8775bc6d8fe2c342d7804168569d6 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 5 Aug 2010 16:58:25 +0200 Subject: Docs: some minor new class documentation. --- docs/xml/corelib/fpg_base.xml | 273 ++++++++++++++++++++++++------------------ docs/xml/corelib/fpg_main.xml | 39 ++++-- 2 files changed, 188 insertions(+), 124 deletions(-) (limited to 'docs/xml/corelib') diff --git a/docs/xml/corelib/fpg_base.xml b/docs/xml/corelib/fpg_base.xml index 66c5c4e2..5fa891ba 100644 --- a/docs/xml/corelib/fpg_base.xml +++ b/docs/xml/corelib/fpg_base.xml @@ -1,28 +1,28 @@ - The base unit and starting point of fpGUI -

This unit contains all the abstract classes for the CoreLib code -of fpGUI. It also defines many types and constants used throughout the toolkit. +

This unit contains all the abstract classes for the CoreLib code +of fpGUI. It also defines many types and constants used throughout the toolkit.

-

When implementing support for a completely new windowing system -(eg: Carbon used in Mac OS-X) you would implement all the abstract methods -defined in this unit. +

When implementing support for a completely new windowing system +(eg: Carbon used in Mac OS-X) you would implement all the abstract methods +defined in this unit.

A custom type used to represent X and Y coordinates. - 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. + 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. @@ -30,15 +30,15 @@ underlying type in the future. Example to floating points. Represents a color in integer format. -

TfpgColor is always in RRGGBB (Red, Green, Blue) format, no matter the -operating system. +

TfpgColor is always in RRGGBB (Red, Green, Blue) format, no matter the +operating system.

-

The gfxbase unit also contains definitions of many useful color -constants. It defines the standard predefined Delphi colors (like clRed, -clMagenta etc.), the 140 websafe 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.). +

The gfxbase unit also contains definitions of many useful color +constants. It defines the standard predefined Delphi colors (like clRed, +clMagenta etc.), the 140 websafe 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.).

@@ -46,7 +46,7 @@ etc.). A record structure holding the RGBA values of a color. - + This is now marked as "deprecated". Please use TFPColor instead. @@ -81,7 +81,7 @@ etc.).
- The window being created is a child on another window. This normally + The window being created is a child on another window. This normally means no titlebar or window borders are going to be created. @@ -111,12 +111,12 @@ means no titlebar or window borders are going to be created. - If this attribute is set, the underlying window manager will decide where + If this attribute is set, the underlying window manager will decide where the window will be placed on the screen it it becomes visible for the first time. - If this attribute is set, the window will be centred on the screen when + If this attribute is set, the window will be centred on the screen when it is shown for the first time. @@ -194,6 +194,22 @@ it is shown for the first time. Defines that the gradient must be painted horizontally. + + Represents the type of entry found on the filesystem. + + + + + + + + Denotes a File type + + + + Denotes a Directory type + + Represents the clipboard function being triggered by some keyboard key combination. @@ -201,19 +217,19 @@ it is shown for the first time. - + No clipboard action detected - + Copy to clipboard action detected - + Paste to clipboard action detected - + Cut to clipboard action detected @@ -2679,67 +2695,67 @@ it is shown for the first time. A graphical (pixel based) rectangle structure used throughout fpGUI. -

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 +

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.

-

Think of the pixel screen/grid like the grid of a spreadsheet (or as a magnified look of the top corner of your screen). +

Think of the pixel screen/grid like the grid of a spreadsheet (or as a magnified look of the top corner of your screen).

-
.
-     0   1
-   +---+---+---
-0  | x |   |
-   +---+---+---
-1  |   |   |
-   +---+---+---
-2  |   |   |
-   +---+---+---
-   |   |   |
+          
.
+     0   1
+   +---+---+---
+0  | x |   |
+   +---+---+---
+1  |   |   |
+   +---+---+---
+2  |   |   |
+   +---+---+---
+   |   |   |
 
-

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). +

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).

-

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. +

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.

-
.
-     0   1
-   +---+---+---
-0  | x | x |
-   +---+---+---
-1  | x | x |
-   +---+---+---
-2  |   |   |
-   +---+---+---
-   |   |   |
+          
.
+     0   1
+   +---+---+---
+0  | x | x |
+   +---+---+---
+1  | x | x |
+   +---+---+---
+2  |   |   |
+   +---+---+---
+   |   |   |
 
-

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. +

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.

-

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. +

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.

-

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 -Spreadsheet program etc. +

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 +Spreadsheet program etc.

-
.
-   0   1   2
-0  +---+---+---
-   | x |   |
-1  +---+---+---
-   |   |   |
-2  +---+---+---
-   |   |   |
-3  +---+---+---
-   |   |   |
+          
.
+   0   1   2
+0  +---+---+---
+   | x |   |
+1  +---+---+---
+   |   |   |
+2  +---+---+---
+   |   |   |
+3  +---+---+---
+   |   |   |
 
@@ -2985,9 +3001,9 @@ Spreadsheet program etc. Abstract class use for representing a Window or Widget - fpGUI is a Windowed toolkit. By that we mean that every component -or widget has a window handle. Widgets are essentially embedded windows without -titlebars or borders inside a main parent window. + fpGUI is a Windowed toolkit. By that we mean that every component +or widget has a window handle. Widgets are essentially embedded windows without +titlebars or borders inside a main parent window. @@ -3157,7 +3173,7 @@ titlebars or borders inside a main parent window. - + Inverts the Image @@ -3171,7 +3187,7 @@ titlebars or borders inside a main parent window. - + Allocates OS resources for the Image @@ -3190,14 +3206,14 @@ titlebars or borders inside a main parent window. - + Allocates OS resources for the Image Mask - + Creates a mask based on the sample point presented by X and Y parameters @@ -3212,7 +3228,7 @@ titlebars or borders inside a main parent window. - + Updates the internal image resources and OS resources from image data @@ -3243,19 +3259,19 @@ titlebars or borders inside a main parent window. - + Width of the image - + Height of the image - + Color depth of the image. Currently 24/32-bit is all that is supported. @@ -3267,7 +3283,7 @@ titlebars or borders inside a main parent window. - + Array property to access a specific color of the image based on X and Y co-ordinates @@ -3491,9 +3507,9 @@ titlebars or borders inside a main parent window. A abstract class representing a base Interpolation filter. - This is used as the base class to implement Interpolation filters like -Gaussian, Sinc etc... These decendant filters are used in the -Canvas.StretchDraw function. + This is used as the base class to implement Interpolation filters like +Gaussian, Sinc etc... These decendant filters are used in the +Canvas.StretchDraw function. @@ -5273,8 +5289,8 @@ Gaussian, Sinc etc... These decendant filters are used in the Returns the text representation of a keycode. - This is mainly used for debugging, but could also be used for Menu Item keyboard -shortcuts etc. + This is mainly used for debugging, but could also be used for Menu Item keyboard +shortcuts etc. @@ -5294,8 +5310,8 @@ shortcuts etc. Detects if the pressed keys represent a Clipboard key shortcut - Detects if the pressed keys represent a Clipboard key shortcut. If it does, it -returns the correct enum type detected. + Detects if the pressed keys represent a Clipboard key shortcut. If it does, it +returns the correct enum type detected. @@ -5315,7 +5331,7 @@ returns the correct enum type detected. Converts the TfpgColor to TRGBTriple type - This function converts the given TfpgColor into a TRGBTriple type. + This function converts the given TfpgColor into a TRGBTriple type. @@ -5333,7 +5349,7 @@ returns the correct enum type detected. Converts the TRGBTriple to TfpgColor type - This function converts the given TRGBTriple into a TfpgColor type. + This function converts the given TRGBTriple into a TfpgColor type. @@ -5411,8 +5427,8 @@ returns the correct enum type detected. Calculates the average color using the two supplied - This function calculates and returns the average color by using AColor1 -and AColor2. The Alpha value also gets taken into account. + This function calculates and returns the average color by using AColor1 +and AColor2. The Alpha value also gets taken into account. @@ -5432,8 +5448,8 @@ and AColor2. The Alpha value also gets taken into account. Returns true if APoint is inside ARect rectangle - This function is used to detect if the point APoint is inside the given -rectangle ARect. If it is, the function returns True, otherwise False. + This function is used to detect if the point APoint is inside the given +rectangle ARect. If it is, the function returns True, otherwise False. @@ -5453,8 +5469,8 @@ rectangle ARect. If it is, the function returns True, otherwise False. Fixes the Top, Bottom and Left, Right to always represent a valid rectangle - 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. + 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. @@ -5483,14 +5499,14 @@ Right. And the Top is always smaller than the Bottom. Draws a line inside a clip rectangle

- . This procedure clips a line to the AClipRect boundaries and - then calls the DrawLine procedure with the clipped coordinates. If the line - lies completely outside of the clip boundary, then the Line routine is not - called. This procedure uses the well known Cohen-Sutherland line clipping - algorithm to clip each coordinate. + . This procedure clips a line to the AClipRect boundaries and + then calls the DrawLine procedure with the clipped coordinates. If the line + lies completely outside of the clip boundary, then the Line routine is not + called. This procedure uses the well known Cohen-Sutherland line clipping + algorithm to clip each coordinate.

-

Use this if you did not what to change the Canvas.ClipRegion for some reason. - For a detailed explanation see: http://www.nondot.org/~sabre/graphpro/line6.html +

Use this if you did not what to change the Canvas.ClipRegion for some reason. + For a detailed explanation see: http://www.nondot.org/~sabre/graphpro/line6.html

@@ -5498,7 +5514,34 @@ Right. And the Top is always smaller than the Bottom. Clips the line based on AClipRect boundaries. This does not do any drawing, in only clips the line coordinates. This method is used internally by .
+ + A simple data object representing a file + + . Some properties are OS dependant. + + + Name of a file + + + The extension of a file + + + Size of a file in bytes + + + Is this item a symbolic link (on unix-type OSes) + + + If it is a symbolic link, LinkTarget is what it points too + + + Last modified timestamp + + + A record structure holding the RGBA values of a color. + This is the same declaration as the one found in FPImage (include with Free Pascal Compiler). In future when FPImage is integrated with fpGUI, I will remove this declaration. + - + \ No newline at end of file diff --git a/docs/xml/corelib/fpg_main.xml b/docs/xml/corelib/fpg_main.xml index 73728f15..b40a2867 100644 --- a/docs/xml/corelib/fpg_main.xml +++ b/docs/xml/corelib/fpg_main.xml @@ -1,19 +1,22 @@ - - - - + The main unit that ties everything together from CoreLib + +

+ . This unit contain the higher level classes that the end-user will use to build applications. +

+

This unit also contains the global objects instances used to start an application, or helper functions used through a a fpGUI based application. eg: , .

+
Posts a message to the event queue fpgPostMessage posts a message to the event queue, but doesn't wait for it to compelete. It returns immediately. - - + +
@@ -21,10 +24,28 @@ fpgSendMessage sends a message to the event queue and waits for it to complete before it returns. - - + +
+
+ + Convert a color to RGB values of that color + + . Not all TfpgColor values are in RGB format. For example you are "named" colors too. eg: clWindowBackground + + + Returns a "named" TfpgColor based on a RGB color + + + Define a new "named" color + + + Return a TStringList of "named" fonts + + + Defined a new "named" font + + . Because fpGUI is a cross-platform toolkit, the same fonts might not be available on all systems. For this reason fpGUI supports "named" or "alias names" for fonts. You can specify a font description, and then give that font description a name. Then any component that has a FontDesc property you can pass the full font description, or the "named" font name. An example of a named font is '#Edit1' which is the default font used for TfpgEdit. - -- cgit v1.2.3-70-g09d2