Skip to content

KVSKBALayoutLineBuffer#

Fields#

Name Type Note
Entry No. Integer
Indentation Integer
LineText Text[1000]
LineText2 Text[1000]

Procedures#

InitLineBuffer() :#

Summary: Initializes the line buffer for layout lines.

procedure InitLineBuffer(): 

Remarks: This procedure initializes the line buffer for layout lines by resetting the record. If the record is temporary, it deletes all existing entries and sets the next line number
to 1. This is typically called at the start of the layout processing to ensure a clean state.

AddLine(Text) : Integer#

Summary: Adds a new line to the layout line buffer with a single column of text.

procedure AddLine(NewLineText: Text): Integer

Parameters:

  • NewLineText: The text for the new line.

Returns: The entry number of the newly added line.

Remarks: This procedure adds a new line to the layout line buffer with a single column of text It calculates the indentation based on the text and stores it in the record. If the buffer is temporary, it initializes the entry number and increments it for each new line added. The procedure returns the entry number of the newly added line, which can be used for further processing or reference.

AddLine(Text, Text) : Integer#

Summary: Adds a new line to the layout line buffer with two columns of text.

procedure AddLine(NewLineText: Text; NewLineText2: Text): Integer

Parameters:

  • NewLineText: The text for the first column of the new line.
  • NewLineText2: The text for the second column of the new line.

Returns: The entry number of the newly added line.

Remarks: This procedure adds a new line to the layout line buffer with two columns of text. It calculates the indentation based on the first column's text and stores both columns in the record. If the buffer is temporary, it initializes the entry number and increments it for each new line added. The procedure returns the entry number of the newly added line, which can be used for further processing or reference.

GetIndentation(Text[1000]) : Integer#

Summary: Calculates the indentation of a new line text.

procedure GetIndentation(NewLineText: Text[1000]): Integer

Parameters:

  • NewLineText: The text of the new line for which to calculate the indentation.

Returns: The calculated indentation as an integer.

Remarks: This procedure calculates the indentation of a new line text by counting the number of leading spaces. It is typically called to determine how much indentation should be applied to a new line in the layout line buffer. The indentation is returned as an integer value.

GetNextLineNo() : Integer#

Summary: Retrieves the next line number for the layout line buffer.

procedure GetNextLineNo(): Integer

Remarks: This procedure returns the current value of the global next line number variable. It is typically called to get the next line number before adding a new line to the buffer. The line number is used to ensure that each line in the buffer has a unique identifier and is incremented each time a new line is added.

SetNextLineNo(Integer) :#

Summary: Sets the next line number for the layout line buffer.

procedure SetNextLineNo(NextLineNo: Integer): 

Parameters:

  • NextLineNo: The next line number to set.

Remarks: This procedure updates the global next line number variable to the specified value. It is typically called to set the next line number before adding a new line to the buffer.