本文整理汇总了PHP中GtkHBox::show_all方法的典型用法代码示例。如果您正苦于以下问题:PHP GtkHBox::show_all方法的具体用法?PHP GtkHBox::show_all怎么用?PHP GtkHBox::show_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GtkHBox
的用法示例。
在下文中一共展示了GtkHBox::show_all方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
/**
* Shows the HBox
*/
public function show()
{
$children = parent::get_children();
if ($children) {
foreach ($children as $child) {
// show child object
$child->show();
}
}
parent::show_all();
}
示例2: __construct
/**
* @name __construct($widget)
* @param GtkWidget $widget Widget para colocar dentro do FFWViewPort
* @return GtkHBox
*/
public function __construct($widget)
{
parent::__construct();
// Cria o frame para criação da borda
$this->__widgets['frame'] = new GtkFrame();
// Cria o scrolledwindow para criação dos scrools
$this->__widgets['scrolled'] = new GtkScrolledWindow();
// Adiciona o scrolled dentro do frame
$this->__widgets['frame']->add($this->__widgets['scrolled']);
// Adiciona o widget ao scrolledwindow
$this->__widgets['scrolled']->add($widget);
// Configura os scrolls como automatico
$this->__widgets['scrolled']->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
// Adiciona o frame ao GtkHBox
parent::pack_start($this->__widgets['frame']);
parent::show_all();
}
示例3: __construct
/**
* Class Constructor
* @param $name = Name of the column in the database
* @param $label = Text label that will be shown in the header
* @param $align = Column align (left, center, right)
* @param $width = Column Width (pixels)
*/
public function __construct($name, $label, $align, $width = NULL)
{
$this->name = $name;
$this->label = $label;
$this->align = $align;
$this->width = (int) $width;
if ($align == 'left') {
$alignment = 0.0;
} else {
if ($align == 'center') {
$alignment = 0.5;
} else {
if ($align == 'right') {
$alignment = 1.0;
}
}
}
parent::__construct();
$this->renderer = new GtkCellRendererText();
if ($width) {
$this->renderer->set_property('width', $width);
parent::set_fixed_width($width);
}
$this->renderer->set_property('xalign', $alignment);
parent::pack_start($this->renderer, true);
parent::set_alignment($alignment);
parent::set_title($label);
$header_hbox = new GtkHBox();
$header_label = new GtkLabel($this->label);
$header_hbox->pack_start($header_label);
$this->sort_up = GtkImage::new_from_stock(GTK::STOCK_GO_UP, Gtk::ICON_SIZE_MENU);
$this->sort_down = GtkImage::new_from_stock(GTK::STOCK_GO_DOWN, Gtk::ICON_SIZE_MENU);
$header_hbox->pack_start($this->sort_up);
$header_hbox->pack_start($this->sort_down);
$header_hbox->show_all();
// hide the ordering images
$this->sort_up->hide();
$this->sort_down->hide();
parent::set_widget($header_hbox);
}
示例4: append
function append($page)
{
$this->remove_background();
$page->Parent = $this;
$page->Owner = $this->Owner;
// Icone + Rotulo
$guide = new GtkHBox();
if ($page->Icon) {
$guide->pack_start(GtkImage::new_from_file(XMONEY_IMAGES . DIRECTORY_SEPARATOR . $page->Icon), false);
}
$guide->pack_start(new GtkLabel(' ' . $page->Title . ' '));
// Fechar
$guide->pack_start($close = new GtkButton());
$close->set_image(GtkImage::new_from_stock(Gtk::STOCK_CLOSE, Gtk::ICON_SIZE_BUTTON));
$guide->show_all();
// Guia
$menu_item = new GtkHBox();
if ($page->Icon) {
$menu_item->pack_start(GtkImage::new_from_file(XMONEY_IMAGES . DIRECTORY_SEPARATOR . $page->Icon), false);
}
$menu_item->pack_start(new GtkLabel(' ' . $page->Title . ' '));
$menu_item->show_all();
$scroll = new GtkScrolledWindow();
$scroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
$scroll->add_with_viewport($page);
$scroll->show_all();
$current = $this->append_page_menu($scroll, $guide, $menu_item);
$this->set_current_page($current);
// Close signal
if ($this->background) {
$close->connect('clicked', array($this, 'xmoney_close_clicked'), $current);
} else {
$close->connect('clicked', array($this, 'close_button'), $current);
}
return $current;
}