<< Prev | - Up - | Next >> |
This chapter describes functions specific to the binding, i. e., those procedures not covered by the mapping described in Chapter 3.
makeStrArr
{GTK.makeStrArr
+Vs
?ForeignPointer
}
converts the list of virtual strings Vs
to a string array.
getStrArr
{GTK.getStrArr
+ForeignPointer
?Vs
}
converts the string array ForeignPointer
to a list of virtual strings.
freeStrArr
{GTK.freeStrArr
+ForeignPointer
}
deallocates the string array ForeignPointer
, which must have been allocated with GTK.makeStrArr
.
makeArg
{GTK.makeArg
+V
+X
?ForeignPointer
}
creates a GtkArg
structure with the name V
and the value X
. X
can be of type int, float, bool, virtual string and foreign pointer.
getArg
{GTK.getArg
+ForeignPointer
?X
}
retrieves the value stored in ForeignPointer
.
freeArg
{GTK.freeArg
+ForeignPointer
}
deallocates the GtkArg structure, which must have been allocated with GTK.makeArg
.
new
{New GTKCANVAS.canvas new(
+ImageSupportB
)
?CanvasO
}
creates are new canvas widget CanvasO
. ImageSupportB
indicates whether the canvas supports image items; if true
, pushVisual
is called. You are required to call popVisual
after the last image item has been created for that canvas.
Trying to create image items without image support being enabled causes a segmentation violation of the Mozart process due to implementation limitations.
newItem
{CanvasO newItem(
+GroupO
+TypeA
+Ts
?O
)}
creates a new item O
of type TypeA
, belonging to group GroupO
and with properties given by Ts
.
Ts
denotes a list of properties given as pairs NameV
#
X
, where X
is the value assigned to the property named NameV
.
configureItem
{CanvasO configureItem(
+CanvasItemO
+Ts
)}
configures the properties of CanvasItemO
as specified by Ts
.
pushVisual
{CanvasO pushVisual()}
pushes the default visual onto the GTK+ widget stack. This method should not be invoked directly; instead, it should be invoked through the canvas constructor.
popVisual
{CanvasO popVisual()}
pops the default visual from the GTK+ widget stack. This method must be invoked after the last image item has been created in a canvas with image support.
newImageItem
{Canvas newImageItem(
+GroupO
+ImageO
+X_I
+Y_I
+WidthI
+HeightI
+AnchorI
?O
}
creates a new item O
of type image, belonging to group GroupO
and scaled to fit into the rectangle described by X_I
, Y_I
, WidthI
and HeightI
in relation to the anchor +AnchorI
.
<< Prev | - Up - | Next >> |