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

54 lines
1.0 KiB
PHP
Raw Normal View History

<?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
*/
// --------------------------------------------------------------------------
/**
* Tabbed Container for database properties
*/
class DB_tabs extends GTKNotebook {
/**
* Create the object
*/
public function __construct()
{
parent::__construct();
// Move the tab bar to the bottom
$this->set_tab_pos(Gtk::POS_BOTTOM);
$this->add_tab('Tables');
}
// --------------------------------------------------------------------------
/**
* 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