PEAR_Frontend_Gtk
[ class tree: PEAR_Frontend_Gtk ] [ index: PEAR_Frontend_Gtk ] [ all elements ]

Source for file Info.php

Documentation is available at Info.php

  1. <?php
  2. /*
  3.   +----------------------------------------------------------------------+
  4.   | PHP Version 4                                                        |
  5.   +----------------------------------------------------------------------+
  6.   | Copyright (c) 1997-2003 The PHP Group                                |
  7.   +----------------------------------------------------------------------+
  8.   | This source file is subject to version 2.02 of the PHP license,      |
  9.   | that is bundled with this package in the file LICENSE, and is        |
  10.   | available at through the world-wide-web at                           |
  11.   | http://www.php.net/license/2_02.txt.                                 |
  12.   | If you did not receive a copy of the PHP license and are unable to   |
  13.   | obtain it through the world-wide-web, please send a note to          |
  14.   | license@php.net so we can mail you a copy immediately.               |
  15.   +----------------------------------------------------------------------+
  16.   | Author: Alan Knowles <alan@akbkhome.com>                             |
  17.   +----------------------------------------------------------------------+
  18.  
  19.   $Id: Info.php,v 1.5 2005/03/14 07:20:37 alan_k Exp $
  20. */
  21.  
  22. /**
  23.  * Gtk Frontend - Pop up messages at present
  24.  *
  25.  * @author Alan Knowles <alan@akbkhome.com>
  26.  */
  27.  
  28.  
  29. class PEAR_Frontend_Gtk_Info {
  30.     var $ui// main interface
  31.     /**
  32.     * holder for the icon
  33.     *
  34.     * @var object GtkVbox 
  35.     */
  36.     var $iconholder;
  37.     /**
  38.     * The text of the message
  39.     *
  40.     * @var object GtkLabel 
  41.     */
  42.     var $label;
  43.    /**
  44.     * The Top pulldown
  45.     *
  46.     * @var object GtkOptionMenu 
  47.     */
  48.     var $window;
  49.     
  50.     
  51.     var $_message ""// the current message
  52.     
  53.     /**
  54.     * Constructor
  55.     *
  56.     * @param object PEAR_Frontend_Gtk 
  57.     */
  58.     
  59.     function PEAR_Frontend_Gtk_Info(&$ui{
  60.         $this->ui &$ui;
  61.     }
  62.     
  63.     
  64.     function show($message{
  65.         $this->_message .= $message "\n";
  66.         $this->window->set_title("MESSAGE");
  67.         $this->label->insert(NULLNULLNULL$this->_message);
  68.         $this->label->set_line_wrap(false);
  69.         $this->window->show();
  70.         $this->isShow = TRUE; 
  71.         while(gtk::events_pending()) gtk::main_iteration();
  72.  
  73.     }
  74.     
  75.     function close({
  76.         $this->label->delete_text(0,-1);
  77.         $this->window->hide();
  78.         $this->_message "";
  79.         return TRUE;
  80.     }
  81. }
  82. ?>

Documentation generated on Mon, 11 Mar 2019 14:28:56 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.