布局大小类
More...
#include <SLayoutSize.h>
|
enum | Unit {
unknow = -1
, px = 0
, dp
, dip = dp
,
sp
} |
| 布局大小单位枚举 More...
|
|
布局大小类
Definition at line 10 of file SLayoutSize.h.
◆ Unit
◆ SLayoutSize() [1/2]
SLayoutSize::SLayoutSize |
( |
float | fSize = 0.0f | ) |
|
◆ SLayoutSize() [2/2]
SLayoutSize::SLayoutSize |
( |
float | fSize, |
|
|
Unit | unit ) |
◆ fequal()
bool SLayoutSize::fequal |
( |
float | a, |
|
|
float | b ) |
|
static |
比较两个浮点数是否相等
- Parameters
-
- Returns
- 如果相等返回TRUE,否则返回FALSE
Definition at line 34 of file SLayoutSize.cpp.
◆ fromString()
◆ isMatchParent()
bool SLayoutSize::isMatchParent |
( |
| ) |
const |
检查是否为匹配父容器大小
- Returns
- 如果为匹配父容器大小返回TRUE,否则返回FALSE
Definition at line 54 of file SLayoutSize.cpp.
◆ isSpecifiedSize()
bool SLayoutSize::isSpecifiedSize |
( |
| ) |
const |
检查是否为指定大小
- Returns
- 如果为指定大小返回TRUE,否则返回FALSE
Definition at line 80 of file SLayoutSize.cpp.
◆ isValid()
bool SLayoutSize::isValid |
( |
| ) |
const |
◆ isWrapContent()
bool SLayoutSize::isWrapContent |
( |
| ) |
const |
检查是否为包裹内容大小
- Returns
- 如果为包裹内容大小返回TRUE,否则返回FALSE
Definition at line 64 of file SLayoutSize.cpp.
◆ isZero()
bool SLayoutSize::isZero |
( |
| ) |
const |
◆ operator=()
◆ parseString()
void SLayoutSize::parseString |
( |
const SStringW & | strSize | ) |
|
◆ setInvalid()
void SLayoutSize::setInvalid |
( |
| ) |
|
◆ setMatchParent()
void SLayoutSize::setMatchParent |
( |
| ) |
|
◆ setSize()
void SLayoutSize::setSize |
( |
float | fSize, |
|
|
Unit | unit ) |
◆ setWrapContent()
void SLayoutSize::setWrapContent |
( |
| ) |
|
◆ toPixelSize()
int SLayoutSize::toPixelSize |
( |
int | scale | ) |
const |
◆ toString()
SStringW SLayoutSize::toString |
( |
| ) |
const |
◆ unitFromString()
◆ valueEqual()
bool SLayoutSize::valueEqual |
( |
float | value | ) |
|
比较大小值是否相等
- Parameters
-
- Returns
- 如果大小值相等返回TRUE,否则返回FALSE
Definition at line 39 of file SLayoutSize.cpp.
◆ defUnit
◆ fSize
◆ unit
The documentation for this class was generated from the following files: