def __init__(self, lsysargv, sysargv):
     xfl.fl_initialize(lsysargv, sysargv, "FormDemo", None, 0)
     self.fd_form0 = self.create_form_form0()
     # fill-in form initialization code
     xfl.fl_set_form_dblbuffer(self.fd_form0.form0, 1)
     align = xfl.fl_get_object_lalign(self.fd_form0.box) | xfl.FL_ALIGN_INSIDE
     if align != xfl.fl_get_object_lalign(self.fd_form0.box):
         xfl.fl_set_button(self.fd_form0.inside, 1)
     # show the first form
     xfl.fl_show_form(self.fd_form0.form0, xfl.FL_PLACE_FREE, xfl.FL_FULLBORDER, "form0")
     xfl.fl_do_forms()
     sys.exit(0)
 def inside_cb(self, pobj, data):
     if xfl.fl_get_button(pobj):
         newalign = xfl.fl_get_object_lalign(self.fd_form0.box)
         newalign |= xfl.FL_ALIGN_INSIDE
         xfl.fl_set_object_lalign(self.fd_form0.box, newalign)
     else:
         newalign = xfl.fl_get_object_lalign(self.fd_form0.box)
         newalign &= ~xfl.FL_ALIGN_INSIDE
         xfl.fl_set_object_lalign(self.fd_form0.box, newalign)
     if TEST_PIXMAP_ALIGN:
         xfl.fl_set_pixmap_align(self.fd_form0.box, xfl.fl_get_object_lalign(self.fd_form0.box), 3, 3)
     else:
         xfl.fl_redraw_form(self.fd_form0.form0)
 def inside_cb(self, pobj, data):
     align = xfl.fl_get_object_lalign(self.fd_form0.box)
     if xfl.fl_get_button(pobj):
         xfl.fl_set_object_lalign(self.fd_form0.box, \
                 xfl.fl_to_inside_lalign(align))
     else:
         xfl.fl_set_object_lalign(self.fd_form0.box, \
                 xfl.fl_to_outside_lalign(align))
     if TEST_PIXMAP_ALIGN:
         xfl.fl_set_pixmap_align(self.fd_form0.box, \
                 xfl.fl_get_object_lalign(self.fd_form0.box), 3, 3)
     else:
         xfl.fl_redraw_form(self.fd_form0.form0)