예제 #1
0
    Rect FalagardItemListbox::getItemRenderArea(void) const
    {
        ItemListbox* lb = static_cast<ItemListbox*>(d_window);
        // get WidgetLookFeel for the assigned look.
        const WidgetLookFeel& wlf = getLookNFeel();
        bool v_visible = lb->getVertScrollbar()->isVisible(true);
        bool h_visible = lb->getHorzScrollbar()->isVisible(true);

        // if either of the scrollbars are visible, we might want to use another text rendering area
        if (v_visible || h_visible)
        {
            String area_name("ItemRenderArea");

            if (h_visible)
            {
                area_name.push_back('H');
            }
            if (v_visible)
            {
                area_name.push_back('V');
            }
            area_name += "Scroll";

            if (wlf.isNamedAreaDefined(area_name))
            {
                return wlf.getNamedArea(area_name).getArea().getPixelRect(*lb);
            }
        }

        // default to plain ItemRenderArea
        return wlf.getNamedArea("ItemRenderArea").getArea().getPixelRect(*lb);
    }
예제 #2
0
 Rectf FalagardItemListbox::getItemRenderArea(void) const
 {
     ItemListbox* lb = static_cast<ItemListbox*>(d_window);
     return getItemRenderingArea(lb->getHorzScrollbar()->isVisible(),
                                 lb->getVertScrollbar()->isVisible());
 }