CanvasWidget


Description:

[ CCode ( has_construct_function = false , type = "GooCanvasItem*" ) ]
public CanvasWidget (CanvasItem? parent, Widget widget, double x, double y, double width, double height, ...)

Creates a new widget item.

Here's an example showing how to create an entry widget centered at (100.0, 100.0):

<informalexample><programlisting> GtkWidget *entry = gtk_entry_new (); GooCanvasItem *witem = goo_canvas_widget_new ( mygroup, entry, 100, 100, -1, -1, "anchor", GOO_CANVAS_ANCHOR_CENTER, NULL); </programlisting></informalexample>

Parameters:

parent

the parent item, or null. If a parent is specified, it will assume ownership of the item, and the item will automatically be freed when it is removed from the parent. Otherwise call unref to free it.

widget

the widget.

x

the x coordinate of the item.

y

the y coordinate of the item.

width

the width of the item, or -1 to use the widget's requested width.

height

the height of the item, or -1 to use the widget's requested height.

...

optional pairs of property names and values, and a terminating null.

Returns:

a new widget item.




2022 vala-language.org