本文整理汇总了PHP中Gtk::rc_parse方法的典型用法代码示例。如果您正苦于以下问题:PHP Gtk::rc_parse方法的具体用法?PHP Gtk::rc_parse怎么用?PHP Gtk::rc_parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk
的用法示例。
在下文中一共展示了Gtk::rc_parse方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @param util.ParamString p
*/
public function __construct($p)
{
// Set up logger
$l = Logger::getInstance();
$this->cat = $l->getCategory();
// Parse rc file if one is set
if (!empty($this->rcfile)) {
Gtk::rc_parse($this->rcfile);
}
// Create main window
$this->create();
$this->window->realize();
// Connect destroy signal
$this->window->connect('destroy', array($this, 'destroy'));
$this->param = $p;
}
示例2: WinMain
$renames[$file] = $file_new;
}
}
foreach($renames AS $key => $value){
if (rename($folder . "/" . $key, $folder . "/" . $value)){
$this->tv_files->get_model()->append(array($value));
}else{
$this->tv_files->get_model()->append(array($key));
}
}
}
}
//Start program.
require_once("knjphpframework/functions_knj_extensions.php");
require_once("knjphpframework/functions_knj_os.php");
require_once("knjphpframework/functions_treeview.php");
if (!knj_dl("gtk2")){
die("Could not load PHP-GTK2-module.\n");
}
if (knj_os::getOS() == "windows"){
//Set Windows-skin if running Windows.
Gtk::rc_parse("gtkrc");
}
$win_main = new WinMain();
Gtk::main();
?>
示例3: ksort
$box2->set_border_width(10);
$scrolled_window->add_with_viewport($box2);
$box2->set_focus_vadjustment($scrolled_window->get_vadjustment());
ksort($buttons);
foreach ($buttons as $label => $function) {
$button =& new GtkButton($label);
if ($function) {
$button->connect('clicked', $function);
} else {
$button->set_sensitive(false);
}
$box2->pack_start($button);
}
$separator =& new GtkHSeparator();
$box1->pack_start($separator, false);
$box2 =& new GtkVBox(false, 10);
$box2->set_border_width(10);
$box1->pack_start($box2, false);
$button =& new GtkButton('close');
$button->connect_object('clicked', array('gtk', 'main_quit'));
$box2->pack_start($button);
$button->set_flags(GTK_CAN_DEFAULT);
$button->grab_default();
$window->show_all();
}
Gtk::rc_parse(dirname($argv[0]) . '/testgtkrc');
create_main_window();
Gtk::main();
?>