def create_forms(self): self.sample = xfl.fl_bgn_form(xfl.FL_NO_BOX, 320, 250) self.ptrflobj0 = xfl.fl_add_box(xfl.FL_UP_BOX, 0, 0, 320, 250, '') xfl.fl_set_object_color(self.ptrflobj0, xfl.FL_COL1, xfl.FL_COL1) xfl.fl_set_object_lalign(self.ptrflobj0, xfl.FL_ALIGN_CENTER) xfl.fl_set_object_lstyle(self.ptrflobj0, xfl.FL_NORMAL_STYLE) xfl.fl_set_object_lsize(self.ptrflobj0, xfl.FL_DEFAULT_SIZE) xfl.fl_set_object_lcol(self.ptrflobj0, xfl.FL_BLACK) xfl.fl_set_object_resize(self.ptrflobj0, xfl.FL_RESIZE_ALL) xfl.fl_set_object_gravity(self.ptrflobj0, xfl.FL_NoGravity, xfl.FL_NoGravity) self.pcounter = xfl.fl_add_counter(xfl.FL_NORMAL_COUNTER, 30, 50, 260, 70, 'My counter') xfl.fl_set_object_boxtype(self.pcounter, xfl.FL_FLAT_BOX) xfl.fl_set_counter_bounds(self.pcounter, -1000.0000, 1000.0000) xfl.fl_set_counter_value(self.pcounter, 100.0000) xfl.fl_set_object_color(self.pcounter, xfl.FL_WHEAT, xfl.FL_DARKGOLDENROD) xfl.fl_set_object_lalign(self.pcounter, xfl.FL_ALIGN_BOTTOM) xfl.fl_set_object_lstyle(self.pcounter, xfl.FL_NORMAL_STYLE) xfl.fl_set_object_lsize(self.pcounter, xfl.FL_DEFAULT_SIZE) xfl.fl_set_object_lcol(self.pcounter, xfl.FL_BLACK) xfl.fl_set_object_resize(self.pcounter, xfl.FL_RESIZE_ALL) xfl.fl_set_object_gravity(self.pcounter, xfl.FL_NoGravity, xfl.FL_NoGravity) xfl.fl_set_object_shortcut(self.pcounter, 'M', 1) xfl.fl_set_object_callback(self.pcounter, self.countercb, 6) xfl.fl_set_object_return(self.pcounter, xfl.FL_RETURN_END_CHANGED) xfl.fl_end_form()
def create_form_valuatorform(self): fdui = FD_valuatorform() fdui.valuatorform = xfl.fl_bgn_form(xfl.FL_NO_BOX, 431, 211) pobj = xfl.fl_add_box(xfl.FL_FLAT_BOX, 0, 0, 431, 211, "") pobj1 = xfl.fl_add_positioner(xfl.FL_NORMAL_POSITIONER, 280, 50, 82, 72, "") xfl.fl_set_positioner_xvalue(pobj1, 0.679012) xfl.fl_set_positioner_yvalue(pobj1, 0.71831) pobj2 = xfl.fl_add_valslider(xfl.FL_HOR_NICE_SLIDER, 55, 10, 240, 20, "") xfl.fl_set_object_boxtype(pobj2, xfl.FL_FLAT_BOX) xfl.fl_set_object_color(pobj2, xfl.FL_COL1, xfl.FL_RIGHT_BCOL) xfl.fl_set_object_return(pobj2, xfl.FL_RETURN_CHANGED) xfl.fl_set_slider_value(pobj2, 0.87) pobj3 = xfl.fl_add_counter(xfl.FL_NORMAL_COUNTER, 130, 110, 110, 20, "") xfl.fl_set_counter_value(pobj3, -1.0) pobj4 = xfl.fl_add_slider(xfl.FL_VERT_NICE_SLIDER, 10, 30, 20, 160, "") xfl.fl_set_object_boxtype(pobj4, xfl.FL_FLAT_BOX) xfl.fl_set_object_color(pobj4, xfl.FL_COL1, xfl.FL_RED) xfl.fl_set_object_return(pobj4, xfl.FL_RETURN_CHANGED) xfl.fl_set_slider_value(pobj4, 0.49) pobj5 = xfl.fl_add_valslider(xfl.FL_HOR_BROWSER_SLIDER, 70, 170, 150, 21, "") xfl.fl_set_object_return(pobj5, xfl.FL_RETURN_CHANGED) pobj6 = xfl.fl_add_slider(xfl.FL_HOR_FILL_SLIDER, 69, 57, 159, 22, "") xfl.fl_set_object_color(pobj6, xfl.FL_COL1, xfl.FL_SLATEBLUE) xfl.fl_set_object_return(pobj6, xfl.FL_RETURN_CHANGED) xfl.fl_set_slider_value(pobj6, 0.25) pobj7 = xfl.fl_add_dial(xfl.FL_NORMAL_DIAL, 60, 90, 60, 58, "") xfl.fl_set_object_boxtype(pobj7, xfl.FL_UP_BOX) xfl.fl_set_object_return(pobj7, xfl.FL_RETURN_END_CHANGED) pobj8 = xfl.fl_add_scrollbar(xfl.FL_VERT_THIN_SCROLLBAR, 394, 14, 18, 180, "") xfl.fl_set_object_boxtype(pobj8, xfl.FL_DOWN_BOX) xfl.fl_set_object_resize(pobj8, xfl.FL_RESIZE_ALL) xfl.fl_set_scrollbar_size(pobj8, 0.20) pobj9 = xfl.fl_add_scrollbar(xfl.FL_HOR_SCROLLBAR, 238, 158, 140, 16, "") xfl.fl_set_object_resize(pobj9, xfl.FL_RESIZE_ALL) xfl.fl_set_scrollbar_size(pobj9, 0.25) xfl.fl_end_form() return fdui