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

Grid list box component for user interface. More...

Enumerations

enum  KzuUiGridListBoxDirection { KZU_GRID_LIST_BOX_DIRECTION_RIGHT, KZU_GRID_LIST_BOX_DIRECTION_DOWN }
 Direction of layout of grid list box. More...
 

Functions

struct KzuUiComponentNodekzuUiGridListBoxToUiComponentNode (const struct KzuUiGridListBox *gridListBox)
 Casts KzuUiGridListBox to KzuUiComponentNode. More...
 
struct KzuUiGridListBoxkzuUiGridListBoxFromUiComponentNode (const struct KzuUiComponentNode *component)
 Casts KzuUiComponentNode to KzuUiGridListBox. More...
 
struct KzuUiListBoxkzuUiGridListBoxToUiListBox (const struct KzuUiGridListBox *gridListBox)
 Casts KzuUiGridListBox to KzuUiListBox. More...
 
struct KzuUiGridListBoxkzuUiGridListBoxFromUiListBox (const struct KzuUiListBox *listBox)
 Casts KzuUiListBox to KzuUiGridListBox. More...
 
kzsError kzuUiGridListBoxRegisterToFactory (const struct KzuFactory *factory)
 Registers object to the factory. More...
 
kzsError kzuUiGridListBoxCreate (const struct KzcMemoryManager *memoryManager, kzString name, struct KzuUIDomain *uiDomain, struct KzuUiGridListBox **out_gridListBox)
 Creates a grid list box. More...
 
struct KzuUiGridLayoutkzuUiGridListBoxGetLayout (const struct KzuUiGridListBox *listBox)
 Gets the internal KzuUiGridLayout corresponding to the grid list box. More...
 

Variables

const KzuObjectType KZU_OBJECT_TYPE_UI_GRID_LIST_BOX
 Object type for grid list box. More...
 

Detailed Description

Grid list box component for user interface.

KzuUiGridListBox is a KzuUiListBox that has its own KzuUiGridLayout, KzuUiScrollView and KzuPresenter. The KzuUiGridLayout lays out the children of KzuUiGridListBox in a grid formation based on the internal KzuPresenter's decisions. The KzuUiScrollView provides scrolling functionality for the KzuUiGridLayout.

KzuUiGridListBox creates the default presenter with kzuGridLayoutPresenterCreate() and it can be replaced with kzuUiListBoxSetPresenter(). The default presenter lays out the children of the KzuUiGridListBox in a similar way to KzuUiFlowLayout, i.e. based on KZU_PROPERTY_TYPE_LAYOUT_WIDTH, KZU_PROPERTY_TYPE_LAYOUT_HEIGHT, KZU_PROPERTY_TYPE_GRID_LIST_BOX_CELL_WIDTH, KZU_PROPERTY_TYPE_GRID_LIST_BOX_CELL_HEIGHT and without the possibility of fixed grid cells (that is, KZU_PROPERTY_TYPE_GRID_LAYOUT_ROW and KZU_PROPERTY_TYPE_GRID_LAYOUT_COLUMN properties are ignored).

Grid List Box Messages

KzuUiGridListBox does not send or receive any messages.

Grid List Box Properties

KZU_PROPERTY_TYPE_GRID_LIST_BOX_DIRECTION integer property can be set to change the internal KzuUiGridLayout's KZU_PROPERTY_TYPE_GRID_LAYOUT_DIRECTION property. Its valid values are KZU_GRID_LAYOUT_DIRECTION_RIGHT and KZU_GRID_LAYOUT_DIRECTION_DOWN. This property specifies whether the internal KzuPresenter lays out the items first left to right and then top to bottom (KZU_GRID_LAYOUT_DIRECTION_RIGHT), or first top to bottom and then left to right (KZU_GRID_LAYOUT_DIRECTION_DOWN). The default value is KZU_GRID_LAYOUT_DIRECTION_RIGHT.

KZU_PROPERTY_TYPE_GRID_LIST_BOX_SCROLL_AXIS KzcVector2 property can be set to change the internal KzuUiScrollView's KZU_PROPERTY_TYPE_SCROLL_VIEW_SCROLL_AXIS property. The property specifies what is the direction of the scroll view's X-axis. This has an effect on the coordinates sent out from the scroll view. The default value is {1.0, 0}.

KZU_PROPERTY_TYPE_GRID_LIST_BOX_RECOGNITION_THRESHOLD float property can be set to change the internal KzuUiScrollView's KZU_PROPERTY_TYPE_SCROLL_VIEW_RECOGNITION_THRESHOLD property. It specifies how much the pointing device has to move before the scrolling starts. The default value is 5.0.

KZU_PROPERTY_TYPE_GRID_LIST_BOX_SENSITIVITY float property can be set to change the internal KzuUiScrollView's KZU_PROPERTY_TYPE_SCROLL_VIEW_SENSITIVITY property. It acts as a multiplier for the scrolling distance relative to the pointing device movement. The default value is 1.0.

KZU_PROPERTY_TYPE_GRID_LIST_BOX_SLIDING_ACCELERATION_COEFFICIENT float property can be set to change the internal KzuUiScrollView's KZU_PROPERTY_TYPE_SCROLL_VIEW_SLIDING_ACCELERATION_COEFFICIENT property. It specifies how fast scrolling accelerates when sliding. The default value is 40.0.

KZU_PROPERTY_TYPE_GRID_LIST_BOX_SLIDING_DRAG_COEFFICIENT float property can be set to change the internal KzuUiScrollView's KZU_PROPERTY_TYPE_SCROLL_VIEW_SLIDING_DRAG_COEFFICIENT property. It specifies how much drag affects scrolling when sliding. The default value is 80.0.

KZU_PROPERTY_TYPE_GRID_LIST_BOX_DRAGGING_ACCELERATION_COEFFICIENT float property can be set to change the internal KzuUiScrollView's KZU_PROPERTY_TYPE_SCROLL_VIEW_DRAGGING_ACCELERATION_COEFFICIENT property. The value specifies how fast scrolling accelerates when dragging. The value should be in the range [0, 500.0]. The default value is 80.0.

KZU_PROPERTY_TYPE_GRID_LIST_BOX_DRAGGING_DRAG_COEFFICIENT float property can be set to change the internal KzuUiScrollView's KZU_PROPERTY_TYPE_SCROLL_VIEW_DRAGGING_DRAG_COEFFICIENT property. The value specifies how much drag affects scrolling when dragging. The value should be in the range [0, 500.0]. The default value is 150.0.

KZU_PROPERTY_TYPE_GRID_LIST_BOX_DRAGGING_IMPULSE_FACTOR float property can be set to change the internal KzuUiScrollView's KZU_PROPERTY_TYPE_SCROLL_VIEW_DRAGGING_IMPULSE_FACTOR property. The value specifies how much impulse is generated by the pointing device movement when dragging. The default value is 2.0.

KZU_PROPERTY_TYPE_GRID_LIST_BOX_SWIPE_DISTANCE float property can be set to change the internal KzuUiScrollView's KZU_PROPERTY_TYPE_SCROLL_VIEW_SWIPE_DISTANCE property. It specifies how much a swipe affects the scrolling distance, relative to the speed of the swipe. The default value is 0.005.

KZU_PROPERTY_TYPE_GRID_LIST_BOX_CELL_WIDTH float property specifies the width of each cell in the grid. Notice that the cell width is not affected by the content of the grid list box, this property is the only way to specify it. The default value is 1.0.

KZU_PROPERTY_TYPE_GRID_LIST_BOX_CELL_HEIGHT float property specifies the height of each cell in the grid. Notice that the cell height is not affected by the content of the grid list box, this property is the only way to specify it. The default value is 1.0.

KZU_PROPERTY_TYPE_GRID_LIST_BOX_ITEM_AREA_BEGIN float property specifies a proportional offset from the beginning of the list box to where the first item will return (with a spring-like animation) if the first item is scrolled beyond the offset. The default value is 0 (meaning the beginning of the list box). The value should be in the range [0, 1.0].

KZU_PROPERTY_TYPE_GRID_LIST_BOX_ITEM_AREA_END float property specifies a proportional offset from the beginning of the list box to where the last item will return (with a spring-like animation) if the last item is scrolled beyond the offset. The default value is 1.0 (meaning the end of the list box). The value should be in the range [0, 1.0].

See Also
kzu_ui_list_box.h, kzu_ui_scroll_view.h, kzu_ui_grid_layout.h, kzu_grid_layout_presenter.h.

Copyright 2008-2019 by Rightware. All rights reserved.

Enumeration Type Documentation

Direction of layout of grid list box.

Enumerator
KZU_GRID_LIST_BOX_DIRECTION_RIGHT 

Layout first right, then down.

KZU_GRID_LIST_BOX_DIRECTION_DOWN 

Layout first down, then right.

Function Documentation

struct KzuUiComponentNode* kzuUiGridListBoxToUiComponentNode ( const struct KzuUiGridListBox gridListBox)
struct KzuUiGridListBox* kzuUiGridListBoxFromUiComponentNode ( const struct KzuUiComponentNode component)
struct KzuUiListBox* kzuUiGridListBoxToUiListBox ( const struct KzuUiGridListBox gridListBox)
struct KzuUiGridListBox* kzuUiGridListBoxFromUiListBox ( const struct KzuUiListBox listBox)
kzsError kzuUiGridListBoxRegisterToFactory ( const struct KzuFactory factory)

Registers object to the factory.

kzsError kzuUiGridListBoxCreate ( const struct KzcMemoryManager memoryManager,
kzString  name,
struct KzuUIDomain uiDomain,
struct KzuUiGridListBox **  out_gridListBox 
)

Creates a grid list box.

struct KzuUiGridLayout* kzuUiGridListBoxGetLayout ( const struct KzuUiGridListBox listBox)

Gets the internal KzuUiGridLayout corresponding to the grid list box.

Variable Documentation

const KzuObjectType KZU_OBJECT_TYPE_UI_GRID_LIST_BOX

Object type for grid list box.