Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

wxSize wxPropertyGrid::GetImageSize ( wxPGId  id = wxPGIdGen((wxPGProperty*)NULL) ) const

Returns size of the custom paint image in front of property. If no argument is given, returns preferred size.

Definition at line 7868 of file propgrid.cpp.

Referenced by wxPGProperty::SetValueImage().

{
    if ( wxPGIdIsOk(id) )
    {
        wxSize cis = wxPGIdToPtr(id)->GetImageSize();

        if ( cis.x < 0 )
        {
            if ( cis.x <= -1 )
                cis.x = wxPG_CUSTOM_IMAGE_WIDTH;
        }
        if ( cis.y <= 0 )
        {
            if ( cis.y >= -1 )
                cis.y = wxPG_STD_CUST_IMAGE_HEIGHT(m_lineHeight);
            else
                cis.y = -cis.y;
        }
        return cis;
    }
    // If called with NULL property, then return default image
    // size for properties that use image.
    return wxSize(wxPG_CUSTOM_IMAGE_WIDTH,wxPG_STD_CUST_IMAGE_HEIGHT(m_lineHeight));
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index