Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gtkTreeModelFilterSetVisibleFunc

gtkTreeModelFilterSetVisibleFunc


Description

Sets the visible function used when filtering the filter to be func. The function should return TRUE if the given row should be visible and FALSE otherwise.

Usage

gtkTreeModelFilterSetVisibleFunc(object, func, data = NULL)

Arguments

object

A GtkTreeModelFilter.

func

A GtkTreeModelFilterVisibleFunc, the visible function.

data

User data to pass to the visible function, or NULL. [ allow-none ]

Details

If the condition calculated by the function changes over time (e.g. because it depends on some global parameters), you must call gtkTreeModelFilterRefilter to keep the visibility information of the model uptodate.

Note that func is called whenever a row is inserted, when it may still be empty. The visible function should therefore take special care of empty rows, like in the example below.

visible_func <- function(model, iter, data)
{
  ## Visible if row is non-empty and first column is "HI"
  visible <- FALSE

  str <- model$get(iter, 0)[[1]]
  if (identical(str, "HI"))
    visible <- TRUE

  return(visible)
}

Since 2.4

Author(s)

Derived by RGtkGen from GTK+ documentation


RGtk2

R Bindings for Gtk 2.8.0 and Above

v2.20.36
GPL
Authors
Michael Lawrence <michafla@gene.com> and Duncan Temple Lang <duncan@wald.ucdavis.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.