From 65c2d49056cf6bdb87b7a6eb45d543ccfce70706 Mon Sep 17 00:00:00 2001 From: kirkpatc Date: Wed, 21 Jan 2009 17:14:59 +0000 Subject: [PATCH] FPDoc - minor correction to StdCtrls.xml; fixed constructors and destructors in Grids.xml git-svn-id: trunk@18376 - --- docs/xml/lcl/grids.xml | 133 +++++++++++++++++++++++++------------- docs/xml/lcl/stdctrls.xml | 2 +- 2 files changed, 90 insertions(+), 45 deletions(-) diff --git a/docs/xml/lcl/grids.xml b/docs/xml/lcl/grids.xml index d5fc33011a..cc1dd8a386 100644 --- a/docs/xml/lcl/grids.xml +++ b/docs/xml/lcl/grids.xml @@ -4276,22 +4276,32 @@ Application developers may use the OnSelection and OnBeforeSelection events to r - - - + + + Create - constructor for TCustomGrid: calls inherited Create, then creates lists of columns and rows, initialises many visual properties and options, creates the various editors and loads any bitmaps required for the display + +

// Inherited create Calls SetBounds->WM_SIZE->VisualChange so

+

// fGrid needs to be created before that

+
- + + +
- - + + + Destroy - destructor for TCustomGrid: frees various resources including editors, columns, rows, font then calls inherited Destroy + - + + + @@ -6705,22 +6715,29 @@ Segunda linea de texto
- - + + + Create - constructor for TGridColumnTitle: calls inherited Create then links the column, creates and configures the default font - + + + - - + + + Destroy - destructor for TGridColumnTitle: frees forn, disconnects alignments, disposes of captions and colours then calls inherited Destroy + - + + + @@ -7459,22 +7476,29 @@ Segunda linea de texto - - + + + Create - constructor for TGridColumn: calls inherited Create, then creates a title and font, initialises a picklist and sets styles - + + + - - + + + Destroy - destructor for TGridColumn: disposes of various local variables, frees picklist, font and title, then calls inherited Destroy + - + + + @@ -7783,11 +7807,14 @@ Segunda linea de texto - - + + + Create - constructor for TGridColumns: calls inherited Create then loads the grid - + + + @@ -10351,22 +10378,30 @@ Segunda linea de texto - - + + + Create - constructor for TCustomDrawGrid: attaches a virtual grid then calls inherited Create + - + + + - - + + + Destroy - destructor for TCustomDrawGrid: frees the grid then calls inherited Destroy + - + + + @@ -11306,11 +11341,14 @@ Segunda linea de texto - - + + + Create - constructor for TStringGridStrings: calls inherited Create and initialises some local variables - + + + @@ -11808,22 +11846,29 @@ Segunda linea de texto - - + + + Create - constructor for TCustomStringGrid: calls inherited Create then sets up default styles, layout and alignment - + + + - - + + + Destroy - destructor for TCustomStringGrid: frees maps of columns and rows, then calls inherited Destroy + - + + + @@ -12427,15 +12472,15 @@ Segunda linea de texto AlternateColor - The user can change the background color appears on alternated rows. This is to allow easy reading of grid rows data. + The user can change the background color that appears on alternate rows. This is to allow easy reading of grid rows data. Color - Sets the primary color used to draw non fixed cells background. + Sets the primary color used to draw non fixed cells' background. FixedColor - The color used to draw fixed cells background. + The color used to draw fixed cells' background. Flat @@ -12487,11 +12532,11 @@ Segunda linea de texto UseXORFeatures - If set, focus rect is drawn using XOR mode so it should make visible the focus rect in combination with any cell color ackground. It also affects the way that moving columns look. + If set, focus rect is drawn using XOR mode so it should make visible the focus rect in combination with any cell color background. It also affects the way that moving columns look. DefaultDrawing - (Boolean). Normally the grids prepare the grid canvas using some properties according to the kind of cell is being painted. If the user has written an OnDrawCell event handler, DefaultDrawing (if set) also paints the cell background; if the user is taking full responsibility for drawing the cell it is better to turn off this property so painting is not duplicated. In a StringGrid, if DefaultDrawing is set it draws the text in each cell. + (Boolean). Normally the grids prepare the grid canvas using some properties according to the kind of cell that is being painted. If the user has written an OnDrawCell event handler, DefaultDrawing (if set) also paints the cell background; if the user is taking full responsibility for drawing the cell it is better to turn off this property so painting is not duplicated. In a StringGrid, if DefaultDrawing is set it draws the text in each cell. AutoAdvance @@ -12519,7 +12564,7 @@ Segunda linea de texto
  • goHeaderHotTracking: if set, the grid will try to show a different look when the mouse cursor is overlying any fixed cell. In order for this to work, desired cell zone needs to be enabled with the property HeaderHotZones. Try combining this option with property TitleStyle=tsNative to get themed hot tracking look.
  • - goHeaderPushedLook: if set, this opton enables a pushed look when clicking any fixed cell. The zone of "pushable" cells is enabled using HeaderPusedZones property.
  • + goHeaderPushedLook: if set, this option enables a pushed look when clicking any fixed cell. The zone of "pushable" cells is enabled using HeaderPushedZones property.

    Description of grid's drawing process @@ -12577,7 +12622,7 @@ Segunda linea de texto Grid's cell selection

    The location of a grid's current (focused) cell (or row) can be changed using keyboard, mouse or through code. In order to change cell focus successfully to another position, we must test the target position to see if it is allowed to receive cell focus. When using the keyboard, AutoAdvance performs part of the process by finding what should be the next focused cell. When using mouse clicks or moving by code, focus will not move from the current cell unless the target cell is permitted to receive focus.

    -

    The grid calls SelectCell to see if a cell is focusable: if this function returns true, then the target cell identified with arguments aCol and aRow is focusable (the current implementation of TCustomGrid simply returns true). TCustomDrawGrid and hence TDrawGrid and TStringGrid override this method and check first if a cell is any wider than 0; normally you don't want a 0 width cell selected so a cell with this characteristics is skipped automatically in the process of finding a suitable cell. The the overriden method SelectCell also calls the user configurable event OnSelectCell: this event receives the cell coordinates as arguments and always returns a default result of True.

    +

    The grid calls SelectCell to see if a cell is focusable: if this function returns true, then the target cell identified with arguments aCol and aRow is focusable (the current implementation of TCustomGrid simply returns true). TCustomDrawGrid and hence TDrawGrid and TStringGrid override this method and check first if a cell is any wider than 0; normally you don't want a 0 width cell selected so a cell with this characteristics is skipped automatically in the process of finding a suitable cell. The overriden method SelectCell also calls the user configurable event OnSelectCell: this event receives the cell coordinates as arguments and always returns a default result of True.

    Once a cell is known to be focusable and we are sure a movement will take place, the method BeforeMoveSelection is called; this in turns triggers the OnBeforeSelection event. This method's arguments are the coordinates for the new focused cell; at this point any visible editor is hidden too. The "before" word means that selection is not yet changed and current focused coordinates can be accessed with grid.Col and grid.Row properties.

    After that, the internal focused cell coordinates are changed and MoveSelection is called; this method's purpose (if set) is to trigger the OnSelection event (this is a notification that the focused cell has changed and the new cell coordinates are available through grid.row and grid.col properties).

    Note that is not good to use the OnSelectCell event to detect cell focus changes, as this event will be triggered several times even for the same cell in the process of finding a suitable cell. Is better to use OnBeforeSelection or OnSelection events for this purpose.

    diff --git a/docs/xml/lcl/stdctrls.xml b/docs/xml/lcl/stdctrls.xml index 9a79fb793d..d672be7be9 100644 --- a/docs/xml/lcl/stdctrls.xml +++ b/docs/xml/lcl/stdctrls.xml @@ -4998,7 +4998,7 @@ Indicates how text is displayed in a text editing control.

    - Create - constructor for TCustomEdit: calls inherite Create then initialises style, colour, size and various other local variables + Create - constructor for TCustomEdit: calls inherited Create then initialises style, colour, size and various other local variables