void reveal_t::measure(extents_t& result) { using adobe::measure; // REVISIT (fbrereto) : hardwired defaults result.width() = 16; result.height() = 17; if (!using_label_m) return; extents_t label_extents; measure(name_m, label_extents); place_data_t label_place; width(label_place) = label_extents.width(); height(label_place) = label_extents.height(); measure_vertical(name_m, label_extents, label_place); result.width() += 4 /* gap */ + label_extents.width(); result.height() = (std::max)(result.height(), label_extents.height()); }
void edit_number_t::measure(extents_t& result) { // REVISIT (fbrereto) : This whole measure/place suite needs better // handling of the baseline alignment issue; we // skirt it currently and we should not. using adobe::measure; measure(edit_text_m, result); if (!using_popup()) return; edit_text_width_m = result.width(); extents_t popup_extents; measure(popup_m, popup_extents); // REVISIT (fbrereto) : constant value result.width() += 4 /*gap*/ + popup_extents.width(); result.height() = (std::max)(result.height(), popup_extents.height()); }