Line :: Line - Constructur
The constructor provides different ways of attaching a line object to a line in a list, table or tree. When required line could not be located, the constructor returns an invalid line. In order to check, whether the line is valid, one may call Line::isValid().
Implementation overview
- Copy constructor
Line :: Line ( cLine ) - Create line connected to list control
Line :: Line ( cControlContext ) - Create non attached line
Line :: Line (  ) - Attach list item with given key value
Line :: Line ( cControlContext, sKey ) - Attach list item by instance identifier (LOID)
Line :: Line ( cControlContext, iLOID, bRecursive ) - Attach item at position
Line :: Line ( cControlContext, iPosition ) - Attach to list item with given column value
Line :: Line ( cControlContext, sValue, iPosition )
Implementation details
-
Copy constructor
Line  :: Line ( odabagui::Line &cLine )
The function creates a copy from the line object passed in cLine, which is connected with the same control and the same list item as cLine.
- cLine
- Constant line
The line passed may have any state, i.e. it night be attached to a list item or not. The line might even be empty.
to list
- cLine
- Constant line
-
Create line connected to list control
Line  :: Line ( odabagui::ControlContext &cControlContext )
The constructor creates a line connected to a list control passed in cControlContext. The line object is attached to the current line, by default. When the current line changes, the line has to be attached to the new current line again by calling current().
The current line is the data item currently selected in a list or for the line to be filled. When the list, tree or table is empty or when no line is selected, the constructor returns an invalid line.
- cControlContext
- Control context
ControlContext classes are created for field (ADK_Field) as well as for control (ADK_FieldControl) resources.
When referring a field resource, the field context will overload the context implemented for the subordinated field control (control context).
to list
- cControlContext
- Control context
-
Create non attached line
Line  :: Line (  )
The function creates an invalid line, which is not connected with a list control and not attached to a list item, i.e. the line is not accessible, but can be used for further assignment.
to list
-
Attach list item with given key value
Line  :: Line ( odabagui::ControlContext &cControlContext, odaba::String &sKey )
The function attaches the list item with with the key value passed in sKey to the line. When no such list item exists, the constructor returns an invalid line.
Usually, the list item key is identical with the value in the first column. When, however, changing the order in the list, the key might be associated with another column (order column).
- cControlContext
- Control context
ControlContext classes are created for field (ADK_Field) as well as for control (ADK_FieldControl) resources.
When referring a field resource, the field context will overload the context implemented for the subordinated field control (control context).
- sKey
- Key string
The key string is a value to be searched in a list or text field.
to list
- cControlContext
- Control context
-
Attach list item by instance identifier (LOID)
Line  :: Line ( odabagui::ControlContext &cControlContext, int64 iLOID, bool bRecursive )
The function attaches list item with with the database instance identifier (LOID) passed in iLOID. When no such item exists, the function returns an invalid line.
When passing true in bRecursive, the LOID is searched also in all sub-regions.
- cControlContext
- Control context
ControlContext classes are created for field (ADK_Field) as well as for control (ADK_FieldControl) resources.
When referring a field resource, the field context will overload the context implemented for the subordinated field control (control context).
- iLOID
- Instance identifier
Local object instance identifier (LOID) are numbers, which uniquely identify an object instance in the database.
- bRecursive - Call function recursively
to list
- cControlContext
- Control context
-
Attach item at position
Line  :: Line ( odabagui::ControlContext &cControlContext, int32 iPosition )
The function attaches the line at position passed in iPosition. When the control is a tree, the row position is located on top level ignoring items in lower levels. The function cannot be used for locating items on lower levels. When the requested line could not be located, the function returns an invalid line.
In order to attach the last line in a list, -1 may be passed in iPosition.
... toBottom (ControlContext &ctx) {
Line(ctx,-1).setCurrent(); // set to last lint in top region
}
- cControlContext
- Control context
ControlContext classes are created for field (ADK_Field) as well as for control (ADK_FieldControl) resources.
When referring a field resource, the field context will overload the context implemented for the subordinated field control (control context).
- iPosition
- Position in collection
The position of an entry in a collection or list is the number of the entry in the collection beginning with 0 for the first entry.
to list
- cControlContext
- Control context
-
Attach to list item with given column value
Line  :: Line ( odabagui::ControlContext &cControlContext, odaba::String &sValue, int32 iPosition )
The function attaches the list item that contains the value passed in sValue in column at position iPosition (first column is 0) to the line. When no such item exists, the function returns an invalid line.
- cControlContext
- Control context
ControlContext classes are created for field (ADK_Field) as well as for control (ADK_FieldControl) resources.
When referring a field resource, the field context will overload the context implemented for the subordinated field control (control context).
- sValue - String value
- iPosition
- Position in collection
The position of an entry in a collection or list is the number of the entry in the collection beginning with 0 for the first entry.
to list
- cControlContext
- Control context