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.ppixmap = xfl.fl_add_pixmap(xfl.FL_NORMAL_PIXMAP, 40, 40, 240, 90, 'one\ndemo\npixmap') xfl.fl_set_object_boxtype(self.ppixmap, xfl.FL_FRAME_BOX) xfl.fl_set_pixmap_align(self.ppixmap, xfl.FL_ALIGN_RIGHT|xfl.FL_ALIGN_INSIDE, 3, 3) xfl.fl_set_pixmap_file(self.ppixmap, 'crab45.xpm') xfl.fl_set_object_color(self.ppixmap, xfl.FL_COL1, xfl.FL_COL1) xfl.fl_set_object_lalign(self.ppixmap, xfl.FL_ALIGN_BOTTOM) xfl.fl_set_object_lstyle(self.ppixmap, xfl.FL_NORMAL_STYLE) xfl.fl_set_object_lsize(self.ppixmap, xfl.FL_DEFAULT_SIZE) xfl.fl_set_object_lcol(self.ppixmap, xfl.FL_BLACK) xfl.fl_set_object_resize(self.ppixmap, xfl.FL_RESIZE_ALL) xfl.fl_set_object_gravity(self.ppixmap, xfl.FL_NoGravity, xfl.FL_NoGravity) xfl.fl_set_object_shortcut(self.ppixmap, 'm', 1) xfl.fl_set_object_callback(self.ppixmap, self.pmapcb, 0) xfl.fl_end_form()
def __init__(self, lsysargv, sysargv): xfl.fl_set_border_width(-2) xfl.fl_initialize(lsysargv, sysargv, "FormDemo", None, 0) pform = xfl.fl_bgn_form(xfl.FL_UP_BOX, 350, 250) pobj = xfl.fl_add_pixmap(xfl.FL_NORMAL_PIXMAP, 60, 70, 100, 100, "") xfl.fl_set_object_boxtype(pobj, xfl.FL_DOWN_BOX) xfl.fl_set_pixmap_file(pobj, "porsche.xpm") ppos = xfl.fl_add_positioner(xfl.FL_OVERLAY_POSITIONER, 60, 70, \ 100, 100, "") xfl.fl_set_positioner_xbounds(ppos, 0, 1) xfl.fl_set_positioner_ybounds(ppos, 0, 1) xfl.fl_set_object_callback(ppos, self.positioner_cb, 0) self.pxval = xfl.fl_add_box(xfl.FL_DOWN_BOX, 230, 40, 100, 30, "") xfl.fl_set_object_color(self.pxval, xfl.FL_COL1, xfl.FL_COL1) self.pyval = xfl.fl_add_box(xfl.FL_DOWN_BOX, 230, 90, 100, 30, "") xfl.fl_set_object_color(self.pyval, xfl.FL_COL1, xfl.FL_COL1) xfl.fl_add_button(xfl.FL_NORMAL_BUTTON, 230, 200, 100, 30, \ "Exit") xfl.fl_end_form() xfl.fl_show_form(pform, xfl.FL_PLACE_CENTER, xfl.FL_TRANSIENT, \ "XOR Positioner") self.positioner_cb(ppos, 0) xfl.fl_do_forms() xfl.fl_hide_form(pform) xfl.fl_finish() sys.exit(0)
def create_form_form0(self): fdui = FD_form0() fdui.form0 = xfl.fl_bgn_form(xfl.FL_NO_BOX, 351, 180) pobj = xfl.fl_add_box(xfl.FL_UP_BOX, 0, 0, 351, 180, "") if not TEST_PIXMAP_ALIGN: fdui.box = xfl.fl_add_box(xfl.FL_UP_BOX, 190, 40, 90, 55, "This is\na label") else: fdui.box = xfl.fl_add_pixmap(xfl.FL_NORMAL_PIXMAP, 190, 35, \ 90, 60, "") xfl.fl_set_pixmap_file(fdui.box, "crab.xpm") xfl.fl_set_object_boxtype(fdui.box, xfl.FL_UP_BOX) fdui.inside = xfl.fl_add_lightbutton(xfl.FL_PUSH_BUTTON, 20, 125, \ 90, 30, "Inside") xfl.fl_set_button(fdui.inside, 1) xfl.fl_set_object_callback(fdui.inside, self.inside_cb, 0) xfl.fl_bgn_group() pobj = xfl.fl_add_button(xfl.FL_RADIO_BUTTON, 20, 20, 30, 30, "@#7->") xfl.fl_set_object_lcol(pobj, xfl.FL_BLUE) xfl.fl_set_object_callback(pobj, self.align_cb, xfl.FL_ALIGN_LEFT_TOP) pobj = xfl.fl_add_button(xfl.FL_RADIO_BUTTON, 50, 20, 30, 30, "@#8->") xfl.fl_set_object_lcol(pobj, xfl.FL_BLUE) xfl.fl_set_object_callback(pobj, self.align_cb, xfl.FL_ALIGN_TOP) pobj = xfl.fl_add_button(xfl.FL_RADIO_BUTTON, 80, 20, 30, 30, "@#9->") xfl.fl_set_object_lcol(pobj, xfl.FL_BLUE) xfl.fl_set_object_callback(pobj, self.align_cb, \ xfl.FL_ALIGN_RIGHT_TOP) pobj = xfl.fl_add_button(xfl.FL_RADIO_BUTTON, 80, 50, 30, 30, "@#->") xfl.fl_set_object_lcol(pobj, xfl.FL_BLUE) xfl.fl_set_object_callback(pobj, self.align_cb, xfl.FL_ALIGN_RIGHT) fdui.center_ = xfl.fl_add_button(xfl.FL_RADIO_BUTTON, 50, 50, 30, 30, "@circle") xfl.fl_set_object_lcol(fdui.center_, xfl.FL_RED) xfl.fl_set_object_callback(fdui.center_, self.align_cb, \ xfl.FL_ALIGN_CENTER) pobj = xfl.fl_add_button(xfl.FL_RADIO_BUTTON, 20, 50, 30, 30, "@#<-") xfl.fl_set_object_lcol(pobj, xfl.FL_BLUE) xfl.fl_set_object_callback(pobj, self.align_cb, xfl.FL_ALIGN_LEFT) pobj = xfl.fl_add_button(xfl.FL_RADIO_BUTTON, 20, 80, 30, 30, "@#1->") xfl.fl_set_object_lcol(pobj, xfl.FL_BLUE) xfl.fl_set_object_callback(pobj, self.align_cb, \ xfl.FL_ALIGN_LEFT_BOTTOM) pobj = xfl.fl_add_button(xfl.FL_RADIO_BUTTON, 50, 80, 30, 30, "@#2->") xfl.fl_set_object_lcol(pobj, xfl.FL_BLUE) xfl.fl_set_object_callback(pobj, self.align_cb, xfl.FL_ALIGN_BOTTOM) pobj = xfl.fl_add_button(xfl.FL_RADIO_BUTTON, 80, 80, 30, 30, "@#3->") xfl.fl_set_object_lcol(pobj, xfl.FL_BLUE) xfl.fl_set_object_callback(pobj, self.align_cb, \ xfl.FL_ALIGN_RIGHT_BOTTOM) xfl.fl_end_group() pobj = xfl.fl_add_button(xfl.FL_NORMAL_BUTTON, 200, 135, 70, 30, \ "Done") xfl.fl_end_form() return fdui
def create_form_ttt(self): fdui = FD_ttt() fdui.ttt = xfl.fl_bgn_form(xfl.FL_NO_BOX, 330, 320) pobj = xfl.fl_add_box(xfl.FL_UP_BOX, 0, 0, 330, 320, "") fdui.bm = xfl.fl_add_bitmap(xfl.FL_NORMAL_BITMAP, 30, 20, 270, \ 240, "") xfl.fl_set_object_boxtype(fdui.bm, xfl.FL_FLAT_BOX) fdui.pm = xfl.fl_add_pixmap(xfl.FL_NORMAL_PIXMAP, 30, 20, 270, \ 240, "") xfl.fl_set_object_boxtype(fdui.pm, xfl.FL_FLAT_BOX) fdui.done = xfl.fl_add_button(xfl.FL_NORMAL_BUTTON, 220, 280, \ 90, 30, "Done") xfl.fl_set_object_lalign(fdui.done, xfl.FL_ALIGN_CENTER) xfl.fl_set_object_callback(fdui.done,self. done, 0) fdui.load = xfl.fl_add_button(xfl.FL_NORMAL_BUTTON, 20, 280, \ 90, 30, "Load") xfl.fl_set_button_shortcut(fdui.load, "L", 1) xfl.fl_set_object_lalign(fdui.load, xfl.FL_ALIGN_CENTER) xfl.fl_set_object_callback(fdui.load, self.reloadfile, 0) xfl.fl_end_form() return fdui
def create_form_staticform(self): fdui = FD_staticform() fdui.staticform = xfl.fl_bgn_form(xfl.FL_NO_BOX, 431, 211) pobj = xfl.fl_add_box(xfl.FL_FLAT_BOX, 0, 0, 431, 211, "") xfl.fl_set_object_color(pobj, xfl.FL_INDIANRED, xfl.FL_INDIANRED) xfl.fl_set_object_lcolor(pobj, xfl.FL_INDIANRED) pobj1 = xfl.fl_add_box(xfl.FL_UP_BOX, 40, 40, 60, 45, "A Box") pobj2 = xfl.fl_add_labelframe(xfl.FL_ENGRAVED_FRAME, 130, 30, 120, 55, "LabelFrame") xfl.fl_set_object_color(pobj2, xfl.FL_BLACK, xfl.FL_INDIANRED) xfl.fl_set_object_lstyle(pobj2, xfl.FL_BOLD_STYLE) fdui.chart = xfl.fl_add_chart(xfl.FL_PIE_CHART, 270, 20, 130, 105, "") xfl.fl_set_object_color(fdui.chart, xfl.FL_INDIANRED, xfl.FL_COL1) pobj3 = xfl.fl_add_clock(xfl.FL_ANALOG_CLOCK, 30, 100, 85, 85, "") xfl.fl_set_object_color(pobj3, xfl.FL_COL1, xfl.FL_RIGHT_BCOL) pobj4 = xfl.fl_add_bitmap(xfl.FL_NORMAL_BITMAP, 150, 140, 30, 25, "") xfl.fl_set_bitmap_file(pobj4, "srs.xbm") pobj5 = xfl.fl_add_pixmap(xfl.FL_NORMAL_PIXMAP, 210, 120, 60, 60, "") xfl.fl_set_pixmap_file(pobj5, "porsche.xpm") pobj6 = xfl.fl_add_text(xfl.FL_NORMAL_TEXT, 310, 150, 70, 25, "Text") xfl.fl_set_object_boxtype(pobj6, xfl.FL_BORDER_BOX) xfl.fl_end_form() return fdui
def create_form_objsform(): fdui = FD_objsform() fdui.objsform = xfl.fl_bgn_form(xfl.FL_NO_BOX, 456, 361) xfl.fl_add_box(xfl.FL_FLAT_BOX, 0, 0, 456, 361, "") xfl.fl_add_box(xfl.FL_UP_BOX, 0, 0, 455, 360, "") xfl.fl_add_box(xfl.FL_UP_BOX, 0, 0, 456, 70, "") fdui.button[0] = xfl.fl_add_button(xfl.FL_RADIO_BUTTON, 15, 20, 75, \ 30, "Static") xfl.fl_set_object_lsize(fdui.button[0], xfl.FL_NORMAL_SIZE) xfl.fl_set_object_lstyle(fdui.button[0], xfl.FL_TIMESBOLD_STYLE) xfl.fl_set_object_callback(fdui.button[0], show_group, 0) fdui.button[1] = xfl.fl_add_button( xfl.FL_RADIO_BUTTON, 90, 20, 75, \ 30, "Button") xfl.fl_set_object_lsize(fdui.button[1], xfl.FL_NORMAL_SIZE) xfl.fl_set_object_lstyle(fdui.button[1], xfl.FL_TIMESBOLD_STYLE) xfl.fl_set_object_callback(fdui.button[1], show_group, 1) fdui.button[2] = xfl.fl_add_button( xfl.FL_RADIO_BUTTON, 165, 20, 70, \ 30, "Valuator") xfl.fl_set_object_lsize(fdui.button[2], xfl.FL_NORMAL_SIZE) xfl.fl_set_object_lstyle(fdui.button[2], xfl.FL_TIMESBOLD_STYLE) xfl.fl_set_object_callback(fdui.button[2], show_group, 2) fdui.button[3] = xfl.fl_add_button( xfl.FL_RADIO_BUTTON, 235, 20, 70, \ 30, "Input") xfl.fl_set_object_lsize(fdui.button[3], xfl.FL_NORMAL_SIZE) xfl.fl_set_object_lstyle(fdui.button[3], xfl.FL_TIMESBOLD_STYLE) xfl.fl_set_object_callback(fdui.button[3], show_group, 3) fdui.button[4] = xfl.fl_add_button( xfl.FL_RADIO_BUTTON, 305, 20, 70, \ 30, "Other") xfl.fl_set_object_lsize(fdui.button[4], xfl.FL_NORMAL_SIZE) xfl.fl_set_object_lstyle(fdui.button[4], xfl.FL_TIMESBOLD_STYLE) xfl.fl_set_object_callback(fdui.button[4], show_group, 4) xfl.fl_add_box(xfl.FL_UP_BOX, 0, 70, 456, 291, "") xfl.fl_add_box(xfl.FL_DOWN_BOX, 9, 90, 435, 260, "") fdui.group[2] = xfl.fl_bgn_group() pobj = xfl.fl_add_text(xfl.FL_NORMAL_TEXT, 260, 140, 80, 30, "Text") xfl.fl_set_object_lalign(pobj, xfl.fl_to_inside_lalign(xfl.FL_ALIGN_LEFT)) xfl.fl_add_slider(xfl.FL_HOR_BROWSER_SLIDER, 60, 120, 170, 25, "") pobj = xfl.fl_add_slider(xfl.FL_HOR_FILL_SLIDER, 60, 160, 170, 30, "") xfl.fl_set_slider_value(pobj, 0.54) pobj = xfl.fl_add_slider(xfl.FL_VERT_SLIDER, 390, 110, 30, 170, "") xfl.fl_set_slider_value(pobj, 0.48) xfl.fl_add_valslider(xfl.FL_VERT_SLIDER, 350, 110, 30, 170, "") pobj = xfl.fl_add_dial(xfl.FL_FILL_DIAL, 50, 220, 90, 70, "") xfl.fl_set_object_color(pobj, xfl.FL_COL1, xfl.FL_BLUE) xfl.fl_add_positioner(xfl.FL_NORMAL_POSITIONER, 150, 210, 120, 100, "") xfl.fl_add_counter(xfl.FL_NORMAL_COUNTER, 300, 300, 130, 30, "") xfl.fl_end_group() fdui.group[1] = xfl.fl_bgn_group() fdui.bitbutton = xfl.fl_add_bitmapbutton(xfl.FL_NORMAL_BUTTON, 60, 250, \ 50, 40, "") fdui.pixbutton = xfl.fl_add_pixmapbutton(xfl.FL_NORMAL_BUTTON, 85, 120, \ 80, 80, "") xfl.fl_add_button(xfl.FL_NORMAL_BUTTON, 290, 270, 90, 35, "Button") pobj = xfl.fl_add_round3dbutton(xfl.FL_PUSH_BUTTON, 260, 95, 60, 40, \ "Round3DButton") xfl.fl_set_object_color(pobj, xfl.FL_COL1, xfl.FL_MAGENTA) xfl.fl_add_roundbutton(xfl.FL_PUSH_BUTTON, 220, 140, 60, 40, \ "RoundButton") pobj = xfl.fl_add_checkbutton(xfl.FL_PUSH_BUTTON, 190, 230, 50, 40, \ "CheckButton") xfl.fl_set_object_color(pobj, xfl.FL_COL1, xfl.FL_BLUE) xfl.fl_add_lightbutton(xfl.FL_PUSH_BUTTON, 290, 200, 100, 30, \ "LightButton") pobj = xfl.fl_add_button(xfl.FL_PUSH_BUTTON, 120, 290, 100, 35, \ "Button") xfl.fl_set_object_boxtype(pobj, xfl.FL_ROUNDED3D_UPBOX) xfl.fl_end_group() fdui.group[0] = xfl.fl_bgn_group() pobj = xfl.fl_add_box(xfl.FL_UP_BOX, 40, 120, 70, 70, "A Box") xfl.fl_set_object_lsize(pobj, xfl.FL_NORMAL_SIZE) xfl.fl_set_object_lstyle(pobj, xfl.FL_TIMESBOLD_STYLE) fdui.bit = xfl.fl_add_bitmap(xfl.FL_NORMAL_BITMAP, 30, 220, 80, 70, \ "bitmap") xfl.fl_add_clock(xfl.FL_ANALOG_CLOCK, 330, 240, 90, 80, "") pobj = xfl.fl_add_frame(xfl.FL_ENGRAVED_FRAME, 130, 120, 80, 70, \ "A Frame") xfl.fl_set_object_lsize(pobj, xfl.FL_NORMAL_SIZE) xfl.fl_set_object_lstyle(pobj, xfl.FL_TIMESBOLD_STYLE) fdui.pix = xfl.fl_add_pixmap(xfl.FL_NORMAL_PIXMAP, 340, 110, 90, 70, \ "pixmap") fdui.chart = xfl.fl_add_chart(xfl.FL_PIE_CHART, 160, 210, 130, 110, \ "chart") pobj = xfl.fl_add_text(xfl.FL_NORMAL_TEXT, 240, 130, 100, 30, \ "Text stuff\nand more stuff") xfl.fl_set_object_lalign(pobj, \ xfl.fl_to_inside_lalign(xfl.FL_ALIGN_CENTER)) xfl.fl_end_group() fdui.group[3] = xfl.fl_bgn_group() xfl.fl_add_input(xfl.FL_NORMAL_INPUT, 140, 120, 150, 30, "Input") xfl.fl_add_input(xfl.FL_MULTILINE_INPUT, 60, 170, 320, 130, "") xfl.fl_end_group() fdui.quit = xfl.fl_add_button(xfl.FL_NORMAL_BUTTON, 385, 20, 60, 30, \ "Quit") fdui.group[4] = xfl.fl_bgn_group() fdui.menu = xfl.fl_add_nmenu(xfl.FL_NORMAL_NMENU, 190, 110, 40, 19, \ "Menu") xfl.fl_set_object_boxtype(fdui.menu, xfl.FL_FLAT_BOX) fdui.choice = xfl.fl_add_select(xfl.FL_NORMAL_SELECT, 290, 110, 120, \ 30, "") fdui.browser = xfl.fl_add_browser(xfl.FL_NORMAL_BROWSER, 30, 140, \ 140, 150, "") fdui.xyplot = xfl.fl_add_xyplot( xfl.FL_IMPULSE_XYPLOT, 190, 150, \ 240, 180, "") xfl.fl_set_object_lsize(fdui.xyplot, xfl.FL_DEFAULT_SIZE) xfl.fl_end_group() xfl.fl_end_form() return fdui
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.ppixmap = xfl.fl_add_pixmap(xfl.FL_NORMAL_PIXMAP, 40, 40, 240, 90, "one\ndemo\npixmap") xfl.fl_set_object_boxtype(self.ppixmap, xfl.FL_FRAME_BOX) xfl.fl_set_pixmap_align(self.ppixmap, xfl.FL_ALIGN_RIGHT | xfl.FL_ALIGN_INSIDE, 3, 3) crab = [ "28 28 6 2 ", ". c None m white s s_SkyBlue ", "x c orange m black s s_orange ", "* c #ff72c2 m black s s_#ff72c2 ", "+ c SteelBlue m white s s_SteelBlue ", "G c black m black s s_black ", "a c LightGrey m white s s_LightGrey ", ". . . . . . * * * * . . . . . . . . . * * * * . . . . . ", ". . . . + * x x * . . . . . . . . . . + * x x * . . . . ", ". . . + * x x * . . . . . . . . . . . . + * x x * . . . ", ". . + * x * . . . * . . . . . . . . . * . . + * x * . . ", ". . + * x * . . + * . . . . . . . . + * . . + * x * . . ", ". . + * x * . + * * . . . . . . . . + * * . + * x * . . ", ". . + * x * + * * . . . . . . . . . . + * * + * x * . . ", ". . + * x * * * . . . . . . . . . . . . + * * x x * . . ", ". . . + * x * . . + * . . . . . . + * . . + * x * . . . ", ". . . + * x . . + * . + * * . * * . + * . . + x * . . . ", ". . . . + x . . + * . + * * . * * . + * . . + x . . . . ", ". . . . + x . . . + * + * * * * * + * . . . + x . . . . ", ". . . . + * x . . + * * * * * * * * * . . + x * . . . . ", ". . . . . + * x * * * * x x x x x * * * * x * . . . . . ", ". . . . + + + * * x x x x x x x x x x x x * . . . . . . ", ". . + + * x x x x x x x x x x x x x x x x x x * x . . . ", ". + * x x a + * * x x x x x x x x x x x * * a G * x * . ", "+ * x . . . + * * x x x x x x x x x x x * * G . . . x * ", ". . . . . . + * * x x x x x x x x x x x * * . . . . . . ", ". . . . . + * * x x x x x x x x x x x x x * * . . . . . ", ". . . + * x x x * x x x x x x x x x x x * x x x * . . . ", ". . + * x a a + * * x x x x x x x x x * * a a a x * . . ", ". + * x G G G + * * x x x x x x x x x * * a G G G x * . ", ". + * G . . . + * x * x x x x x x x * x * a G . . . * . ", ". . . . . . + * x a * * * x x x * * * a x * G . . . . . ", ". . . . . + * x a G a a * * * * * a a G a x * G . . . . ", ". . . . . + x a G . G G a a a a a G G . G G x a G . . . ", ". . . . . + x a G . . . G G G G G . . . . . x a G . . . ", ] xfl.fl_set_pixmap_data(self.ppixmap, crab) xfl.fl_set_object_color(self.ppixmap, xfl.FL_COL1, xfl.FL_COL1) xfl.fl_set_object_lalign(self.ppixmap, xfl.FL_ALIGN_BOTTOM) xfl.fl_set_object_lstyle(self.ppixmap, xfl.FL_NORMAL_STYLE) xfl.fl_set_object_lsize(self.ppixmap, xfl.FL_DEFAULT_SIZE) xfl.fl_set_object_lcol(self.ppixmap, xfl.FL_BLACK) xfl.fl_set_object_resize(self.ppixmap, xfl.FL_RESIZE_ALL) xfl.fl_set_object_gravity(self.ppixmap, xfl.FL_NoGravity, xfl.FL_NoGravity) xfl.fl_set_object_shortcut(self.ppixmap, "m", 1) xfl.fl_set_object_callback(self.ppixmap, self.pmapcb, 0) xfl.fl_end_form()
def setUp(self): #invoked before each test self.statusmsg = "" self.form0 = xfl.fl_bgn_form(xfl.FL_NO_BOX, 800, 600) self.pxmobj0 = xfl.fl_add_pixmap(xfl.FL_NORMAL_PIXMAP, 200, \ 250, 120, 120, "My Pixmap")
def test_fl_add_pixmap__fail3(self): # failing: 3rd arg of unfit type self.statusmsg = "%s: should fail." % sys._getframe().f_code.co_name bitobj = xfl.fl_add_pixmap(xfl.FL_NORMAL_PIXMAP, 200, "bingo", \ 120, 120, "My pixmap")
def test_fl_add_pixmap__fail2(self): # failing: 5th arg missing self.statusmsg = "%s: should fail." % sys._getframe().f_code.co_name pxmobj = xfl.fl_add_pixmap(xfl.FL_NORMAL_PIXMAP, 200, 250, \ 120, "My pixmap")
def test_fl_add_pixmap__fail1(self): # failing: 1st arg out-of-range value self.statusmsg = "%s: should fail." % sys._getframe().f_code.co_name pxmobj = xfl.fl_add_pixmap(150, 200, 250, 120, 120, \ "My pixmap")
def test_fl_add_pixmap__ok(self): # test should NOT fail self.statusmsg = "%s: should NOT fail." % \ sys._getframe().f_code.co_name pxmtobj = xfl.fl_add_pixmap(xfl.FL_NORMAL_PIXMAP, 200, 250, \ 120, 120, "My pixmap")