def hide_it(self, pobj, alln):
     if xfl.fl_object_is_visible(self.fd_canvasform.canvas):
         xfl.fl_hide_object(self.fd_canvasform.canvas)
         xfl.fl_set_object_label(pobj, "ShowCanvas")
     else:
         xfl.fl_show_object(self.fd_canvasform.canvas)
         xfl.fl_set_object_label(pobj, "HideCanvas")
 def load_file(self, fname, pvdata):
     #ldata = xfl.fls_convert_ptrvoid_to_ptrlongc(pvdata).contents.value
     #print("ldata", ldata)
     if not fname or not os.path.exists(fname):
         print("Missing file name\n")
         return 0
     fnameonly = os.path.basename(fname)
     if os.path.isdir(fname):
         xfl.fl_set_directory(fname)
     else:   # a file
         p, ext = os.path.splitext(fnameonly)
         if not ext:
             print("Missing file extension\n")
             return 0
         else:
             if fname.endswith(b".xpm"):
                 xfl.fl_hide_object(self.fd_ttt.bm)
                 xfl.fl_free_pixmap_pixmap(self.fd_ttt.pm)
                 xfl.fl_set_pixmap_file(self.fd_ttt.pm, fname)
                 xfl.fl_show_object(self.fd_ttt.pm)
             elif fname.endswith(b".xbm"):
                 xfl.fl_hide_object(self.fd_ttt.pm)
                 xfl.fl_set_bitmap_file(self.fd_ttt.bm, fname)
                 xfl.fl_show_object(self.fd_ttt.bm)
             else:
                 message = "Invalid file extension, neither" \
                         ".xpm nor .xbm file: %s\n" % ext
                 print(message)
                 return 0
     return 1
 def hide_cb(self, pobj, data):
     if xfl.fl_object_is_visible(self.fd_scb.hor_thin):
         xfl.fl_set_object_label(self.fd_scb.hide, "Show")
         xfl.fl_hide_object(self.fd_scb.hor_thin)
     else:
         xfl.fl_set_object_label(self.fd_scb.hide, "Hide")
         xfl.fl_show_object(self.fd_scb.hor_thin)
 def hide_show_cb(self, pobj, data):
     if data:
         xfl.fl_show_object(self.fd_mainform.folder)
     else:
         xfl.fl_hide_object(self.fd_mainform.folder)
def show_group(pobj, data):
    for i in range(0, NGROUP+1):
        if i == data:
            xfl.fl_show_object(fd_objsform.group[i])
        else:
            xfl.fl_hide_object(fd_objsform.group[i])
 def push_cb(self, pobj, n):
     if xfl.fl_get_button(pobj):
         xfl.fl_show_object(self.pabox[n])
     else:
         xfl.fl_hide_object(self.pabox[n])
 def hide_show(self, pobj, data):
     if xfl.fl_object_is_visible(self.pbr):
         xfl.fl_hide_object(self.pbr)
     else:
         xfl.fl_show_object(self.pbr)