本文整理汇总了PHP中Gtk::widget_get_default_style方法的典型用法代码示例。如果您正苦于以下问题:PHP Gtk::widget_get_default_style方法的具体用法?PHP Gtk::widget_get_default_style怎么用?PHP Gtk::widget_get_default_style使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk
的用法示例。
在下文中一共展示了Gtk::widget_get_default_style方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Initialize application
*
*/
public function init()
{
$this->window->set_default_size(400, 420);
// File list
$this->files = $this->widget('clist_files');
$this->files->set_row_height(26);
$this->files->set_sort_column(1);
// Sort by type
$this->connect($this->files, 'select_row', 'onEntrySelected');
// Location
$this->location = $this->widget('entry_location');
// Combo
$this->combo = $this->widget('combo_dir');
// Buttons
foreach (array('ok' => 'onClose', 'cancel' => 'onClose', 'up' => 'onUpDirClicked', 'home' => 'onHomeClicked', 'refresh' => 'onRefreshClicked', 'next' => 'onPNClicked', 'prev' => 'onPNClicked') as $n => $callback) {
$this->buttons[$n] = $this->connect($this->widget('button_' . $n), 'clicked', $callback);
}
// Favorites
$this->favorites = $this->widget('bar_favorites');
$this->favorites->set_button_relief(GTK_RELIEF_NONE);
$view = $this->widget('view_favorites');
$style = Gtk::widget_get_default_style();
$style->base[GTK_STATE_NORMAL] = $style->mid[GTK_STATE_NORMAL];
$view->set_style($style);
GTKWidgetUtil::connectChildren($this->widget('bar_favorites'), array(':clicked' => array($this, 'onFavoriteClicked')));
// History
$this->history = array();
$this->history_offset = 0;
// Load pixmaps
$this->pixmaps = array();
$if = new Folder(dirname(__FILE__) . '/icons/');
$loader = new GTKPixmapLoader($this->window->window, $if->uri);
try {
while ($entry = $if->getEntry()) {
if ('.xpm' != substr($entry, -4)) {
continue;
}
$entry = substr($entry, 0, -4);
$this->pixmaps = array_merge($this->pixmaps, $loader->load($entry));
}
$if->close();
} catch (IOException $e) {
$this->cat->error($e);
// Fall through, this is not critical
}
// Read files
$this->setDirectory($this->dir);
}