#include "precomp.h" #include "form_view.h" ///////////////////////////////////////////////////////////////////////////// // FormView construction: FormView::FormView(const CL_Rect &pos, CL_Component *parent) : CL_Component(pos, parent) { slots.connect(sig_paint(), this, &FormView::on_paint); } FormView::~FormView() { } ///////////////////////////////////////////////////////////////////////////// // FormView attributes: ///////////////////////////////////////////////////////////////////////////// // FormView operations: ///////////////////////////////////////////////////////////////////////////// // FormView implementation: void FormView::on_paint() { int width = get_width(); int height = get_height(); CL_Display::fill_rect(CL_Rect(1, 1, width-1, 20), CL_Color(240,240,240)); CL_Display::fill_rect(CL_Rect(1, 1, 20, height-1), CL_Color(240,240,240)); CL_Display::draw_line(20, 20, width-1, 20, CL_Color(128, 142, 159)); CL_Display::draw_line(20, 20, 20, height-1, CL_Color(128, 142, 159)); for (int x=0; x