void FalagardFrameWindow::render() { FrameWindow* w = (FrameWindow*)d_window; // do not render anything for the rolled-up state. if (w->isRolledup()) return; // build state name String stateName(w->isDisabled() ? "Disabled" : (w->isActive() ? "Active" : "Inactive")); stateName += w->isTitleBarEnabled() ? "WithTitle" : "NoTitle"; stateName += w->isFrameEnabled() ? "WithFrame" : "NoFrame"; const StateImagery* imagery; try { // get WidgetLookFeel for the assigned look. const WidgetLookFeel& wlf = getLookNFeel(); // try and get imagery for our current state imagery = &wlf.getStateImagery(stateName); } catch (UnknownObjectException&) { // log error so we know imagery is missing, and then quit. return; } // peform the rendering operation. imagery->render(*w); }
Rect FalagardFrameWindow::getUnclippedInnerRect(void) const { FrameWindow* w = (FrameWindow*)d_window; if (w->isRolledup()) return Rect(0,0,0,0); // build name of area to fetch String areaName("Client"); areaName += w->getTitlebar()->isVisible() ? "WithTitle" : "NoTitle"; areaName += w->isFrameEnabled() ? "WithFrame" : "NoFrame"; // get WidgetLookFeel for the assigned look. const WidgetLookFeel& wlf = getLookNFeel(); return wlf.getNamedArea(areaName).getArea().getPixelRect(*w, w->getUnclippedPixelRect()); }