示例#1
0
UIDrawObjectCanvas* Button::getDrawnDrawObject(void) const
{
    if(getEnabled())
    {
        //if(getFocused())
        //{
        //    return getFocusedDrawObject();
        //}
        if(getActive())
        {
            return getActiveDrawObject();
        }
        else if(_MouseInComponentLastMouse)
        {
            return getRolloverDrawObject();
        }
        else
        {
            return getDrawObject();
        }
    }
    else
    {
        return getDisabledDrawObject();
    }
}
示例#2
0
void Button::changed(ConstFieldMaskArg whichField, 
                            UInt32            origin,
                            BitVector         details)
{
    Inherited::changed(whichField, origin, details);

    //Do not respond to changes that have a Sync origin
    if(origin & ChangedOrigin::Sync)
    {
        return;
    }

    if(whichField & DrawObjectFieldMask &&
        getDrawObject() != NULL)
    {
        getDrawObject()->setSize(getDrawObject()->getRequestedSize());
    }
    
    if(whichField & ActiveDrawObjectFieldMask &&
        getActiveDrawObject() != NULL)
    {
        getActiveDrawObject()->setSize(getActiveDrawObject()->getRequestedSize());
    }
    
    if(whichField & RolloverDrawObjectFieldMask &&
        getRolloverDrawObject() != NULL)
    {
        getRolloverDrawObject()->setSize(getRolloverDrawObject()->getRequestedSize());
    }
    
    if(whichField & DisabledDrawObjectFieldMask &&
        getDisabledDrawObject() != NULL)
    {
        getDisabledDrawObject()->setSize(getDisabledDrawObject()->getRequestedSize());
    }
    
    if(whichField & FocusedDrawObjectFieldMask &&
        getFocusedDrawObject() != NULL)
    {
        getFocusedDrawObject()->setSize(getFocusedDrawObject()->getRequestedSize());
    }
}
示例#3
0
void Button::changed(ConstFieldMaskArg whichField, 
                            UInt32            origin,
                            BitVector         details)
{
    Inherited::changed(whichField, origin, details);

	if(whichField & DrawObjectFieldMask &&
		getDrawObject() != NULL)
	{
			getDrawObject()->setSize(getDrawObject()->getPreferredSize());
	}
	
	if(whichField & ActiveDrawObjectFieldMask &&
		getActiveDrawObject() != NULL)
	{
			getActiveDrawObject()->setSize(getActiveDrawObject()->getPreferredSize());
	}
	
	if(whichField & RolloverDrawObjectFieldMask &&
		getRolloverDrawObject() != NULL)
	{
			getRolloverDrawObject()->setSize(getRolloverDrawObject()->getPreferredSize());
	}
	
	if(whichField & DisabledDrawObjectFieldMask &&
		getDisabledDrawObject() != NULL)
	{
			getDisabledDrawObject()->setSize(getDisabledDrawObject()->getPreferredSize());
	}
	
	if(whichField & FocusedDrawObjectFieldMask &&
		getFocusedDrawObject() != NULL)
	{
			getFocusedDrawObject()->setSize(getFocusedDrawObject()->getPreferredSize());
	}
}
示例#4
0
UIDrawObjectCanvas* ProgressBar::getDrawnDrawObject(void) const
{
    if(getEnabled())
    {
        if(getFocused())
        {
            return getFocusedDrawObject();
        }
        else if(_MouseInComponentLastMouse)
        {
            return getRolloverDrawObject();
        }
        else
        {
            return getDrawObject();
        }
    }
    else
    {
        return getDisabledDrawObject();
    }
}
示例#5
0
UIDrawObjectCanvas* Button::getBaseDrawObject(void) const
{
    return getDrawObject();
}