r3packer

r3rowcol

r3packer

Class

oops/r3packer.h

Library

r3oops

Description:

The Packer class is a geometry manager that places its slaves from left to right or top to bottom. The slaves can have different attributes to change behaviour in case there is more than the minimum space available.

See Also

oops/r3gmanag.h

Super Class

r3Gmanager

R3CLID_GMANAGER

JavaScript

r3Packer

Class Identifier

R3CLID_PACKER - 22

Methods

GETFIRSTSLAVE, GETSLAVEBYPOSITION, GETSLAVESNEARPOSITION, ADD,

Attributes

Orientation, SlaveList,

Registration

int R3RegisterPackerClass(R3APP *app);

R3PAM_GETFIRSTSLAVE

Method

GETFIRSTSLAVE

Identifier

R3PAM_GETFIRSTSLAVE

Return

R3OBJ*, the slave

JavaScript

rc = obj.GETFIRSTSLAVE();

Description

Return the first slave in the packing order.

R3PAM_GETSLAVEBYPOSITION

Method

GETSLAVEBYPOSITION

Identifier

R3PAM_GETSLAVEBYPOSITION

Return

R3OBJ*, slave before the position.

JavaScript

rc = obj.GETSLAVEBYPOSITION();

Description

Gets previous slave for position.

R3PAM_GETSLAVESNEARPOSITION

Method

GETSLAVESNEARPOSITION

Identifier

R3PAM_GETSLAVESNEARPOSITION

Return

R3OBJ*, slave at the position

Param 1:

R3OBJ**, prev slave

Param 2:

R3OBJ**, next slave

JavaScript

rc = obj.GETSLAVESNEARPOSITION(p1, p2, 0);

Description

Gets slaves at, before, and after a position.

R3PAM_ADD

Method

ADD

Identifier

R3PAM_ADD

Param 1:

R3INT, pack flags

Param 2:

R3INT, alignment flags

Param 3:

R3OBJ*, slave,

JavaScript

obj.ADD(p1, p2, p3);

Description

Add new slave with given pack and anchor flags.

Orientation

Attribute

Orientation

Identifier

R3PA_Orientation

JavaScript type

Integer

C type

R3INT

Description

R3RM_CREATE, R3PAOF_VERTICAL/R3PAOF_HORIZONTAL

Syntax


jsobj.SetOrientation(value);
value = jsobj.GetOrientation();


R3INT value = ...;
R3SetAttrs(r3obj, R3PA_Orientation, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3PA_Orientation, &value, R3TAG_END);

SlaveList

Attribute

SlaveList

Identifier

R3PA_SlaveList

JavaScript type

r3List

C type

R3LIST*

Description

R3RM_GET, get the list of slaves

Syntax


value = jsobj.GetSlaveList();


R3LIST* value;
R3GetAttrs(r3obj, R3PA_SlaveList, &value, R3TAG_END);

Values for R3PA_Orientation tag

R3PAOF_VERTICAL
R3PAOF_HORIZONTAL

Values for R3PA_PackFlags tag

R3PAPF_EXPAND
R3PAPF_FILLX
R3PAPF_FILLY

Values for R3PA_Anchor tag

R3PAAF_CENTER
R3PAAF_N
R3PAAF_NE
R3PAAF_E
R3PAAF_SE
R3PAAF_S
R3PAAF_SW
R3PAAF_W
R3PAAF_NW
R3PAAF_ALIGN

Special value for R3GA_Slave

R3PAIF_GAP

Tags

Tags

R3PA_PackFlags
R3PA_Anchor
R3PA_PadX
R3PA_PadY
R3PA_IPadX
R3PA_IPadY
R3PA_InsertAfter