set_orientation


Description:

public bool set_orientation (Orientation orientation)

Tries to change the orientation of the layout of Workspace on the Screen this is watching.

Since no more than one application should set this property of a Screen at a time, setting the layout is not guaranteed to work.

If orientation is HORIZONTAL, the Workspace will be laid out in rows, with the first Workspace in the top left corner.

If orientation is VERTICAL, the Workspace will be laid out in columns, with the first Workspace in the top left corner.

For example, if the layout contains one row, but the orientation of the layout is vertical, the Pager will display a column of Workspace.

Note that setting the orientation will have an effect on the geometry management: if orientation is HORIZONTAL, WIDTH_FOR_HEIGHT will be used as request mode; if orientation is VERTICAL, GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH will be used instead.

If this has not been added to a widget hierarchy, the call will fail because this can't know the screen on which to modify the orientation.

Parameters:

this

a Pager.

orientation

orientation to use for the layout of Workspace on the Screen this is watching.

Returns:

true if the layout of Workspace has been successfully changed or did not need to be changed, false otherwise.




2022 vala-language.org