CL_Label *Options::create_slider_label(CL_Slider *slider) { CL_Label *component = new CL_Label(this); CL_Rect slider_geometry = slider->get_geometry(); component->set_geometry(CL_Rect(slider_geometry.right + 4, slider_geometry.top - 2, CL_Size(256, 17))); component->set_text("##################"); return component; }
CL_Label *Options::create_combobox_label(CL_ComboBox *combo, const char *text) { CL_Label *component = new CL_Label(this); CL_Rect combo_geometry = combo->get_geometry(); component->set_geometry(CL_Rect(combo_geometry.left, combo_geometry.top - 20, CL_Size(256, 17))); component->set_text(text); return component; }
void MessageBoxImpl::createLabel() { static const int MARGIN = 5; CL_Rect clientArea = m_window->get_client_area(); m_label = new CL_Label(m_window); m_label->set_geometry( CL_Rect( clientArea.left + MARGIN, clientArea.top + MARGIN, clientArea.right - MARGIN, clientArea.bottom - MARGIN ) ); m_label->set_alignment(CL_Label::align_center); m_label->set_text("no message set"); }