Gtk2_VarDump
[ class tree: Gtk2_VarDump ] [ index: Gtk2_VarDump ] [ all elements ]

Source for file ColTreeView.php

Documentation is available at ColTreeView.php

  1. <?php
  2. /**
  3. *   Treeview with some extra methods
  4. *
  5. *   @author Christian Weiske <cweiske@php.net>
  6. */
  7. class Gtk2_VarDump_ColTreeView extends GtkTreeView
  8. {
  9.     public function __construct()
  10.     {
  11.         parent::__construct();
  12.     }//public function __construct()
  13.  
  14.  
  15.  
  16.     /**
  17.     *   Creates GtkTreeView columns out of an string array and
  18.     *   appends them to the tree view.
  19.     *   The columns will be resizable and sortable.
  20.     *
  21.     *   @param array        $arColumns  Array of strings which are the titles for the columns
  22.     */
  23.     protected function createColumns($arColumns)
  24.     {
  25.         $cell_renderer = new GtkCellRendererText();
  26.         foreach ($arColumns as $nId => $strTitle{
  27.             $column = new GtkTreeViewColumn($strTitle$cell_renderer"text"$nId);
  28.             $column->set_resizable(true);
  29.             $column->set_sort_column_id($nId);
  30.             $this->append_column($column);
  31.         }
  32.     }//protected function createColumns($arColumns)
  33.  
  34. }//class Gtk2_VarDump_ColTreeView extends GtkTreeView
  35. ?>

Documentation generated on Mon, 11 Mar 2019 15:19:42 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.