AG_Spinbox::AG_Spinbox() { Label* label = new Label; label->Set_bounding_rect(Rect(margin, attributes_max_y, 200, 20)); label->Set_text("Spinbox attributes"); Add_widget(label); //Attribute Value New_attribute("Value"); value.Set_bounding_rect(interface::Rect(100-margin, attributes_max_y, 100, 20)); Add_widget(&value); }
Widget_editor::Widget_editor() :widget(NULL) ,editing_attributes(false) ,pressed(false) ,left(false) ,right(false) ,top(false) ,bottom(false) ,move(false) ,selected(false) { float margin = 4; attributes_max_y = 0; attribute_group = new Group; attribute_group->Set_bounding_rect(Rect(0, 0, 200, 400)); Label* label = new Label; label->Set_bounding_rect(Rect(margin, attributes_max_y, 200, 20)); label->Set_text("Base attributes"); attribute_group->Add_widget(label); attributes_max_y += 20; //Attribute Top label = new Label; label->Set_bounding_rect(Rect(margin, attributes_max_y, 100, 20)); label->Set_text("Top"); attribute_group->Add_widget(label); w_top.Set_bounding_rect(interface::Rect(100-margin, attributes_max_y, 100, 20)); attribute_group->Add_widget(&w_top); attributes_max_y += 20; //Attribute Left label = new Label; label->Set_bounding_rect(Rect(margin, attributes_max_y, 100, 20)); label->Set_text("Left"); attribute_group->Add_widget(label); w_left.Set_bounding_rect(interface::Rect(100-margin, attributes_max_y, 100, 20)); attribute_group->Add_widget(&w_left); attributes_max_y += 20; //Attribute Width label = new Label; label->Set_bounding_rect(Rect(margin, attributes_max_y, 100, 20)); label->Set_text("Width"); attribute_group->Add_widget(label); w_width.Set_bounding_rect(interface::Rect(100-margin, attributes_max_y, 100, 20)); attribute_group->Add_widget(&w_width); attributes_max_y += 20; //Attribute Height label = new Label; label->Set_bounding_rect(Rect(margin, attributes_max_y, 100, 20)); label->Set_text("Height"); attribute_group->Add_widget(label); w_height.Set_bounding_rect(interface::Rect(100-margin, attributes_max_y, 100, 20)); attribute_group->Add_widget(&w_height); attributes_max_y += 20; attributes_height = attributes_max_y; }