85 lines
1.5 KiB
PHP
85 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* OpenSQLManager
|
|
*
|
|
* Free Database manager for Open Source Databases
|
|
*
|
|
* @package OpenSQLManager
|
|
* @author Timothy J. Warren
|
|
* @copyright Copyright (c) 2012
|
|
* @link https://github.com/aviat4ion/OpenSQLManager
|
|
* @license https://timshomepage.net/dbaj.txt
|
|
*/
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
namespace OpenSQLManager;
|
|
|
|
/**
|
|
* Tabbed Container for database properties
|
|
*
|
|
* @package OpenSQLManager
|
|
* @subpackage Widgets
|
|
*/
|
|
class DB_tabs extends \wxNotebook {
|
|
|
|
/**
|
|
* Current Tab Widget object
|
|
*
|
|
* @var DB_Tabs
|
|
*/
|
|
private static $instance;
|
|
|
|
/**
|
|
* Db Data cache
|
|
*
|
|
* @var array
|
|
*/
|
|
private $data;
|
|
|
|
/**
|
|
* Return the db tabs object if it exists, or create and return
|
|
*
|
|
* @return DB_tabs
|
|
*/
|
|
public static function &get_instance()
|
|
{
|
|
if (empty(self::$instance))
|
|
{
|
|
self::$instance = new DB_tabs();
|
|
}
|
|
|
|
return self::$instance;
|
|
}
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
/**
|
|
* Create the object
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->data = new StdClass();
|
|
}
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
/**
|
|
* Add a new tab with the provided label
|
|
*
|
|
* @param string $label
|
|
* @param GObject $widget
|
|
* @return void
|
|
*/
|
|
public function add_tab($label, $widget = NULL)
|
|
{
|
|
if (is_null($widget))
|
|
{
|
|
$widget = new Data_Grid();
|
|
}
|
|
|
|
//$this->append_page($widget, new GtkLabel($label));
|
|
}
|
|
}
|
|
// End of db_tabs.php
|