def search_rgb(self, pobj, q): top = xfl.fl_get_browser_topline(self.pcolbr) r = int(xfl.fl_get_slider_value(self.prs)) g = int(xfl.fl_get_slider_value(self.pgs)) b = int(xfl.fl_get_slider_value(self.pbs)) xfl.fl_freeze_form(self.pcl) xfl.fl_mapcolor(xfl.FL_FREE_COL4, r, g, b) #xfl.fl_redraw_object(self.prescol) i = self.search_entry(r, g, b) # change topline only if necessary if i < top or i > (top + 15): xfl.fl_set_browser_topline(self.pcolbr, i - 8) xfl.fl_select_browser_line(self.pcolbr, i + 1) xfl.fl_unfreeze_form(self.pcl)
def test_fl_get_browser_topline(self): """fl_get_browser_topline(ptr_flobject) -> linenum""" xfl.fl_get_browser_topline(15899, 4.5, 4, )