Kanzi Graphics Engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
kzu_ui_flow_layout.h File Reference

UI flow (wrapping) layout component. More...

Enumerations

enum  KzuFlowLayoutDirection {
  KZU_FLOW_LAYOUT_DIRECTION_LEFT_TO_RIGHT, KZU_FLOW_LAYOUT_DIRECTION_RIGHT_TO_LEFT, KZU_FLOW_LAYOUT_DIRECTION_TOP_TO_BOTTOM, KZU_FLOW_LAYOUT_DIRECTION_BOTTOM_TO_TOP,
  KZU_FLOW_LAYOUT_DIRECTION_NEAR_TO_FAR, KZU_FLOW_LAYOUT_DIRECTION_FAR_TO_NEAR
}
 Direction (or axis) of the layout, used in both primary and secondary direction. More...
 

Functions

kzsError kzuUiFlowLayoutCreate (const struct KzcMemoryManager *memoryManager, kzString name, struct KzuUIDomain *uiDomain, struct KzuUiFlowLayout **out_flowLayout)
 Creates a flow layout with default settings. More...
 
kzsError kzuUiFlowLayoutRegisterToFactory (const struct KzuFactory *factory)
 Registers component type to factory. More...
 
struct KzuUiComponentNodekzuUiFlowLayoutToUiComponentNode (const struct KzuUiFlowLayout *flowLayout)
 Casts from KzuUiFlowLayout to KzuUiComponentNode. More...
 
struct KzuUiFlowLayoutkzuUiFlowLayoutFromUiComponentNode (const struct KzuUiComponentNode *component)
 Casts from KzuUiComponentNode to KzuUiFlowLayout. More...
 
enum KzuFlowLayoutDirection kzuUiFlowLayoutGetPrimaryDirection (const struct KzuUiFlowLayout *flowLayout)
 Get the primary direction of the flow layout from the KZU_PROPERTY_TYPE_FLOW_LAYOUT_PRIMARY_DIRECTION property. More...
 
enum KzuFlowLayoutDirection kzuUiFlowLayoutGetSecondaryDirection (const struct KzuUiFlowLayout *flowLayout)
 Get the secondary direction of the flow layout from the KZU_PROPERTY_TYPE_FLOW_LAYOUT_SECONDARY_DIRECTION property. More...
 

Variables

const KzuObjectType KZU_OBJECT_TYPE_UI_FLOW_LAYOUT
 Object type for flow layout. More...
 

Detailed Description

UI flow (wrapping) layout component.

KzuUiFlowLayout lays out its children in the primary direction as long as there is space, and then moves to a new row in the secondary direction. Not unlike word wrapping in a word processor.

See Also
kzu_flow_layer.h for a 2D version of this component.

Flow Layout Messages

KzuUiFlowLayout does not send any messages.

Flow Layout Properties

KZU_PROPERTY_TYPE_FLOW_LAYOUT_PRIMARY_DIRECTION property specifies the primary layouting direction. Its value type is the enum KzuFlowLayoutDirection. The default value is KZU_FLOW_LAYOUT_DIRECTION_LEFT_TO_RIGHT.

KZU_PROPERTY_TYPE_FLOW_LAYOUT_SECONDARY_DIRECTION property specifies the secondary layouting direction. Its value type is the enum KzuFlowLayoutDirection. The default value is KZU_FLOW_LAYOUT_DIRECTION_TOP_TO_BOTTOM.

KZU_PROPERTY_TYPE_LAYOUT_WIDTH property specifies the extent of the left-to-right and right-to-left (X-axis) direction.

KZU_PROPERTY_TYPE_LAYOUT_HEIGHT property specifies the extent of the top-to-bottom and bottom-to-top (Y-axis) direction.

KZU_PROPERTY_TYPE_LAYOUT_DEPTH property specifies the extent of the near-to-far and far-to-near (Z-axis) direction.

Copyright 2013-2019 by Rightware. All rights reserved.

Enumeration Type Documentation

Direction (or axis) of the layout, used in both primary and secondary direction.

Enumerator
KZU_FLOW_LAYOUT_DIRECTION_LEFT_TO_RIGHT 

Left to right direction.

KZU_FLOW_LAYOUT_DIRECTION_RIGHT_TO_LEFT 

Left to right direction.

KZU_FLOW_LAYOUT_DIRECTION_TOP_TO_BOTTOM 

Top to bottom direction.

KZU_FLOW_LAYOUT_DIRECTION_BOTTOM_TO_TOP 

Bottom to top direction.

KZU_FLOW_LAYOUT_DIRECTION_NEAR_TO_FAR 

Near to far direction.

KZU_FLOW_LAYOUT_DIRECTION_FAR_TO_NEAR 

Far to near direction.

Function Documentation

kzsError kzuUiFlowLayoutCreate ( const struct KzcMemoryManager memoryManager,
kzString  name,
struct KzuUIDomain uiDomain,
struct KzuUiFlowLayout **  out_flowLayout 
)

Creates a flow layout with default settings.

Parameters
memoryManagerThe memory manager to use for memory allocations.
nameName of the flow layout.
uiDomainThe UI domain to use.
out_flowLayoutPointer that is set to point to the new flow layout.
Returns
KZS_SUCCESS on success.
kzsError kzuUiFlowLayoutRegisterToFactory ( const struct KzuFactory factory)

Registers component type to factory.

struct KzuUiComponentNode* kzuUiFlowLayoutToUiComponentNode ( const struct KzuUiFlowLayout flowLayout)
struct KzuUiFlowLayout* kzuUiFlowLayoutFromUiComponentNode ( const struct KzuUiComponentNode component)
enum KzuFlowLayoutDirection kzuUiFlowLayoutGetPrimaryDirection ( const struct KzuUiFlowLayout flowLayout)

Get the primary direction of the flow layout from the KZU_PROPERTY_TYPE_FLOW_LAYOUT_PRIMARY_DIRECTION property.

When there is no more space in the primary direction, additional items flow to the secondary direction.

enum KzuFlowLayoutDirection kzuUiFlowLayoutGetSecondaryDirection ( const struct KzuUiFlowLayout flowLayout)

Get the secondary direction of the flow layout from the KZU_PROPERTY_TYPE_FLOW_LAYOUT_SECONDARY_DIRECTION property.

When there is no more space in the primary direction, additional items flow to the secondary direction.

Variable Documentation

const KzuObjectType KZU_OBJECT_TYPE_UI_FLOW_LAYOUT

Object type for flow layout.