def create_form_twheelform(self): twheelform = xfl.fl_bgn_form(xfl.FL_NO_BOX, 220, 260) pobj = xfl.fl_add_box(xfl.FL_UP_BOX, 0, 0, 220, 260, "") pobj = xfl.fl_add_frame(xfl.FL_ENGRAVED_FRAME, 15, 70, 190, 130, "") self.pvert = xfl.fl_add_thumbwheel(xfl.FL_VERT_THUMBWHEEL, \ 30, 90, 20, 100, "") xfl.fl_set_object_callback(self.pvert, self.valchange_cb, 0) xfl.fl_set_thumbwheel_step(self.pvert, 0.01) self.phor = xfl.fl_add_thumbwheel(xfl.FL_HOR_THUMBWHEEL, \ 60, 130, 120, 23, "") xfl.fl_set_object_callback(self.phor, self.valchange_cb, 0) xfl.fl_set_thumbwheel_step(self.phor, 0.01) self.preport = xfl.fl_add_text(xfl.FL_NORMAL_TEXT, 60, 90, \ 120, 30, "") xfl.fl_set_object_lalign(self.preport, xfl.FL_ALIGN_CENTER | \ xfl.FL_ALIGN_INSIDE) preturnsetting = xfl.fl_add_select(xfl.FL_NORMAL_SELECT, \ 35, 20, 160, 30, "") xfl.fl_set_object_boxtype(preturnsetting, xfl.FL_EMBOSSED_BOX) xfl.fl_set_object_callback(preturnsetting, self.returnchange_cb, 0) xfl.fl_add_select_items(preturnsetting, "End & Changed") xfl.fl_add_select_items(preturnsetting, "Whenever Changed") xfl.fl_add_select_items(preturnsetting, "Always At End") xfl.fl_add_select_items(preturnsetting, "Always") pobj = xfl.fl_add_button(xfl.FL_NORMAL_BUTTON, 120, 215, \ 80, 30, "Enough") xfl.fl_set_object_lalign(pobj, xfl.FL_ALIGN_CENTER) xfl.fl_end_form() return twheelform
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.pthumbwheel = xfl.fl_add_thumbwheel(xfl.FL_VERT_THUMBWHEEL, 140, 30, 40, 160, 'A thumbwheel') xfl.fl_set_object_boxtype(self.pthumbwheel, xfl.FL_RSHADOW_BOX) xfl.fl_set_thumbwheel_bounds(self.pthumbwheel, 10, 100) xfl.fl_set_thumbwheel_value(self.pthumbwheel, 15) xfl.fl_set_thumbwheel_step(self.pthumbwheel, 0.05) xfl.fl_set_object_color(self.pthumbwheel, xfl.FL_DODGERBLUE, xfl.FL_COL1) xfl.fl_set_object_lalign(self.pthumbwheel, xfl.FL_ALIGN_BOTTOM) xfl.fl_set_object_lstyle(self.pthumbwheel, xfl.FL_NORMAL_STYLE) xfl.fl_set_object_lsize(self.pthumbwheel, xfl.FL_DEFAULT_SIZE) xfl.fl_set_object_lcol(self.pthumbwheel, xfl.FL_BLACK) xfl.fl_set_object_resize(self.pthumbwheel, xfl.FL_RESIZE_ALL) xfl.fl_set_object_gravity(self.pthumbwheel, xfl.FL_NoGravity, xfl.FL_NoGravity) xfl.fl_set_object_shortcut(self.pthumbwheel, 'w', 1) xfl.fl_set_object_callback(self.pthumbwheel, self.twheelcb, 5) xfl.fl_set_object_return(self.pthumbwheel, xfl.FL_RETURN_ALWAYS) xfl.fl_end_form()