PHP Classes

File: ob-example.php

Recommend this page to a friend!
  Classes of Stefan Saftescu  >  ObPipeMenu  >  ob-example.php  >  Download  
File: ob-example.php
Role: Example script
Content type: text/plain
Description: An example script that shows pretty much all the features of the class.
Class: ObPipeMenu
Generate menus for OpenBox window manager
Author: By
Last change:
Date: 12 years ago
Size: 633 bytes
 

Contents

Class file image Download
#!/usr/bin/php
<?php

require('ObPipeMenu.class.php');

$pipemenu = new ObPipeMenu();

$pipemenu->addSeparator('Browsers');
$pipemenu->addItem('Open Firefox', 'firefox');
$pipemenu->addItem('Open Opera', 'opera');
$pipemenu->addItem('Open Midori', 'midori')->addSeparator();

$pipemenu->addMenu('Places', 'places-menu')->lastItem()->addItem('Home')->addItem('Downloads')->addItem('Dcouments');
$pipemenu->addMenu('RSS','rss-menu');
$pipemenu->lastItem()->addItem('Ars Technica')->addItem('A List Apart');
$pipemenu->item(5)->addItem('Music');
$pipemenu->lastItem()->addItem('XKCD');

$pipemenu->printMenu();


?>

For more information send a message to info at phpclasses dot org.