r3listv
oops/r3listv.h
r3oops
Listview. Allows the user to select one node from a list. Nodes can also be any structures which point to actual objects.
r3Osgadget
R3CLID_OSGADGET
r3Listview
R3CLID_LISTVIEW - 34
List, Top, SelectedString, ObjectOffset, Icon, ReportAllSelections,
int R3RegisterListViewClass(R3APP *app);
R3GLVM_GETSELECTEDPOS
GETSELECTEDPOS
R3GLVM_GETSELECTEDPOS
R3BOOL, TRUE if there is a selected item, FALSE otherwise
rc = obj.GETSELECTEDPOS();
R3GLVM_HIT
HIT
R3GLVM_HIT
R3INT, index of the item or -1 if no item is at a given position
rc = obj.HIT();
returns the index of the item at a given position.
List
List
R3GLVA_List
r3List
R3LIST*
address of a list to be shown
jsobj.SetList(value);
value = jsobj.GetList();
R3LIST* value = ...;
R3SetAttrs(r3obj, R3GLVA_List, value, R3TAG_END);
R3LIST* value;
R3GetAttrs(r3obj, R3GLVA_List, &value, R3TAG_END);
Top
Top
R3GLVA_Top
Integer
R3INT
index of the first showm node (0, 1, ... etc.
jsobj.SetTop(value);
value = jsobj.GetTop();
R3INT value = ...;
R3SetAttrs(r3obj, R3GLVA_Top, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3GLVA_Top, &value, R3TAG_END);
SelectedString
SelectedString
R3GLVA_SelectedString
String
char*
name of the selected node (read only)
value = jsobj.GetSelectedString();
char* value;
R3GetAttrs(r3obj, R3GLVA_SelectedString, &value, R3TAG_END);
ObjectOffset
ObjectOffset
R3GLVA_ObjectOffset
Integer
R3INT
node+offset is the address of the object from whom the icon is fetched, see R3GLVOO_ codes below
jsobj.SetObjectOffset(value);
value = jsobj.GetObjectOffset();
R3INT value = ...;
R3SetAttrs(r3obj, R3GLVA_ObjectOffset, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3GLVA_ObjectOffset, &value, R3TAG_END);
Icon
Icon
R3GLVA_Icon
Object
R3OBJ*
icon to be used if R3GLVA_ObjectOffset is not given
jsobj.SetIcon(value);
value = jsobj.GetIcon();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3GLVA_Icon, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3GLVA_Icon, &value, R3TAG_END);
ReportAllSelections
ReportAllSelections
R3GLVA_ReportAllSelections
Boolean
R3BOOL
if set report selection even when selecting an already selected item
jsobj.SetReportAllSelections(value);
R3BOOL value = ...;
R3SetAttrs(r3obj, R3GLVA_ReportAllSelections, value, R3TAG_END);
codes for ObjectOffset attribute