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/widgets/db_tabs.php

85 lines
1.5 KiB
PHP
Raw Normal View History

<?php
/**
* OpenSQLManager
*
* Free Database manager for Open Source Databases
*
2012-04-20 13:30:27 -04:00
* @package OpenSQLManager
* @author Timothy J. Warren
* @copyright Copyright (c) 2012
* @link https://github.com/aviat4ion/OpenSQLManager
* @license http://philsturgeon.co.uk/code/dbad-license
*/
// --------------------------------------------------------------------------
2012-05-29 14:29:20 -04:00
namespace OpenSQLManager;
/**
* Tabbed Container for database properties
2012-04-20 13:30:27 -04:00
*
* @package OpenSQLManager
* @subpackage Widgets
*/
2012-05-29 14:29:20 -04:00
class DB_tabs extends \wxNotebook {
2012-04-02 16:56:55 -04:00
/**
* Current Tab Widget object
2012-04-19 21:55:44 -04:00
*
2012-04-02 16:56:55 -04:00
* @var DB_Tabs
*/
2012-03-29 16:26:50 -04:00
private static $instance;
2012-04-19 12:29:47 -04:00
/**
* Db Data cache
2012-04-19 21:55:44 -04:00
*
* @var array
2012-04-19 12:29:47 -04:00
*/
2012-04-10 15:42:12 -04:00
private $data;
2012-03-29 16:26:50 -04:00
/**
* 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();
2012-04-10 15:42:12 -04:00
$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();
}
2012-05-29 14:29:20 -04:00
//$this->append_page($widget, new GtkLabel($label));
}
}
2012-05-14 13:25:32 -04:00
// End of db_tabs.php