This repository has been archived on 2018-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
OpenSQLManager/sys/common/data_grid.php

72 lines
1.4 KiB
PHP
Raw Normal View History

2012-03-28 15:13:34 -04:00
<?php
/**
* OpenSQLManager
*
* Free Database manager for Open Source Databases
*
* @author Timothy J. Warren
* @copyright Copyright (c) 2012
* @link https://github.com/aviat4ion/OpenSQLManager
* @license http://philsturgeon.co.uk/code/dbad-license
*/
// --------------------------------------------------------------------------
/**
*Class to simplify dealing with GtkTreeView
*/
class Data_Grid extends GtkTreeView {
protected $model;
/**
* Create the object
2012-03-29 16:26:50 -04:00
*
* @param object $model
2012-03-28 15:13:34 -04:00
*/
2012-03-29 16:26:50 -04:00
public function __construct($model = null)
2012-03-28 15:13:34 -04:00
{
2012-03-29 16:26:50 -04:00
$this->model = ( ! is_null($model))
? $model
: new GtkTreeStore(Gobject::TYPE_PHP_VALUE, Gobject::TYPE_PHP_VALUE);
2012-03-28 15:13:34 -04:00
parent::__construct($this->model);
}
// --------------------------------------------------------------------------
/**
* Get the value of the cell at the provided coordinate array
*
* @param array $coord
* @return mixed
*/
public function get(array $coord)
{
// @todo implement
}
2012-03-29 16:26:50 -04:00
// --------------------------------------------------------------------------
/**
* Set the value of the cell at the provided coordinate array
*
* @param array $coord
* @param mixed $val
*/
public function set(array $coord, $val)
{
// @todo implement
}
// --------------------------------------------------------------------------
/**
* Empty the model
2012-03-29 16:26:50 -04:00
*/
public function reset($model = null)
{
$this->model->clear();
2012-03-29 16:26:50 -04:00
}
}
// End of data_grid.php