Exemplo n.º 1
0
void zfSkinSetDefault(ZF_IN const zfchar *key, ZF_IN ZFStyleable *value)
{
    if(key && value)
    {
        if(!value->classData()->classIsTypeOf(ZFSerializable::ClassData()))
        {
            zfCoreCriticalMessage(zfTextA("skin value must be type of %s"), zfsCoreZ2A(ZFSerializable::ClassData()->className()));
            return ;
        }

        ZFCoreMutexLocker();
        _ZFP_ZFSkinMapType &m = _ZFP_ZFSkinMapGlobal;
        _ZFP_ZFSkinMapType::iterator it = m.find(key);
        if(it == m.end())
        {
            m[key] = zfautoObjectCreateMarkCached(value->toObject());
        }
    }
}
Exemplo n.º 2
0
void zfSkinSet(ZF_IN const zfchar *key, ZF_IN ZFStyleable *value)
{
    if(key != zfnull)
    {
        ZFCoreMutexLocker();
        if(value == zfnull)
        {
            _ZFP_ZFSkinMapGlobal.erase(key);
        }
        else
        {
            if(value->classData()->classIsTypeOf(ZFSerializable::ClassData()))
            {
                _ZFP_ZFSkinMapGlobal[key] = zfautoObjectCreateMarkCached(value->toObject());
            }
            else
            {
                zfCoreCriticalMessage(zfTextA("skin value must be type of %s"), zfsCoreZ2A(ZFSerializable::ClassData()->className()));
            }
        }
    }
}
Exemplo n.º 3
0
void ZFUIRootView::viewOnRemoveFromParent(ZF_IN ZFUIView *parent)
{
    zfCoreCriticalMessage(zfTextA("you must not add ZFUIRootView to another parent, parent: %s"), zfsCoreZ2A(ZFObjectInfo(parent).cString()));
}
Exemplo n.º 4
0
void ZFUIRootView::viewOnRemoveFromParent(ZF_IN ZFUIView *parent)
{
    zfCoreCriticalMessage(zfTextA("you must not add ZFUIRootView to another parent"));
}