soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SGridLayoutParamStruct.h
1#ifndef __SGRIDLAYOUTPARAMSTRUCT__H__
2#define __SGRIDLAYOUTPARAMSTRUCT__H__
3
4#include "SLayoutSize.h"
5
6SNSBEGIN
7
8enum GridGravity
9{
10 gUndef = -1, /**< 未定义 */
11 gLeft = 0, /**< 左对齐 */
12 gTop = 0, /**< 上对齐 */
13 gCenter = 1, /**< 居中对齐 */
14 gRight = 2, /**< 右对齐 */
15 gBottom = 2, /**< 底对齐 */
16 gFill = 3, /**< 扩展对齐 */
17};
18
19/*
20 * 网格布局单元格参数
21 * remark:
22 * 如果同一行中多个单无格指定了rowWeight,只有最大的那一个有效,相应的同一列中也只有最大的colWeight有效
23 */
24struct SGridLayoutParamStruct
25{
26 int nColSpan; /**< 网格占列数 */
27 int nRowSpan; /**< 网格占行数 */
28 GridGravity layoutGravityX; /**< 网格水平对齐方式 */
29 GridGravity layoutGravityY; /**< 网格垂直对齐方式 */
30 SLayoutSize width; /**< 网格宽度 */
31 SLayoutSize height; /**< 网格高度 */
32 float fColWeight; /**< 网格宽度的加权 */
33 float fRowWeight; /**< 网格高度的加权 */
34};
35
36SNSEND
37#endif // __SGRIDLAYOUTPARAMSTRUCT__H__