OMLeafState 类用于设置组件的活动状态。
这个类是在头文件 state.h 中定义的。
component
指定组件。其定义如下所示: OMComponentState* component;