r3listv

r3listv

Class

oops/r3listv.h

Library

r3oops

Description:

Listview. Allows the user to select one node from a list. Nodes can also be any structures which point to actual objects.

See Also

oops/r3osgdgt.h

See Also

oops/r3mxgad.h

Super Class

r3Osgadget

R3CLID_OSGADGET

JavaScript

r3Listview

Class Identifier

R3CLID_LISTVIEW - 34

Methods

GETSELECTEDPOS, HIT,

Attributes

List, Top, SelectedString, ObjectOffset, Icon, ReportAllSelections,

Registration

int R3RegisterListViewClass(R3APP *app);

R3GLVM_GETSELECTEDPOS

Method

GETSELECTEDPOS

Identifier

R3GLVM_GETSELECTEDPOS

Return

R3BOOL, TRUE if there is a selected item, FALSE otherwise

JavaScript

rc = obj.GETSELECTEDPOS();

Description

R3GLVM_HIT

Method

HIT

Identifier

R3GLVM_HIT

Return

R3INT, index of the item or -1 if no item is at a given position

JavaScript

rc = obj.HIT();

Description

returns the index of the item at a given position.

List

Attribute

List

Identifier

R3GLVA_List

JavaScript type

r3List

C type

R3LIST*

Description

address of a list to be shown

Syntax


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

Attribute

Top

Identifier

R3GLVA_Top

JavaScript type

Integer

C type

R3INT

Description

index of the first showm node (0, 1, ... etc.

Syntax


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

Attribute

SelectedString

Identifier

R3GLVA_SelectedString

JavaScript type

String

C type

char*

Description

name of the selected node (read only)

Syntax


value = jsobj.GetSelectedString();


char* value;
R3GetAttrs(r3obj, R3GLVA_SelectedString, &value, R3TAG_END);

ObjectOffset

Attribute

ObjectOffset

Identifier

R3GLVA_ObjectOffset

JavaScript type

Integer

C type

R3INT

Description

node+offset is the address of the object from whom the icon is fetched, see R3GLVOO_ codes below

Syntax


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

Attribute

Icon

Identifier

R3GLVA_Icon

JavaScript type

Object

C type

R3OBJ*

Description

icon to be used if R3GLVA_ObjectOffset is not given

Syntax


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

Attribute

ReportAllSelections

Identifier

R3GLVA_ReportAllSelections

JavaScript type

Boolean

C type

R3BOOL

Description

if set report selection even when selecting an already selected item

Syntax


jsobj.SetReportAllSelections(value);


R3BOOL value = ...;
R3SetAttrs(r3obj, R3GLVA_ReportAllSelections, value, R3TAG_END);

codes for ObjectOffset attribute

R3GLVOO_NOICON
R3GLVOO_OBJECT