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

Class: PEAR_PackageFileManager_GUI_Gtk

Source Location: /PEAR_PackageFileManager_GUI_Gtk-1.0.0rc1/Gtk.php

Class Overview


A Gtk GUI frontend for the PEAR_PackageFileManager class.


Author(s):

  • Scott Mattocks

Version:

  • API: @version@ CVS: $Id:$

Copyright:

  • © (c) Copyright 2005 Scott Mattocks

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 48]
A Gtk GUI frontend for the PEAR_PackageFileManager class.

A PHP-GTK 1 frontend for the PEAR_PackageFileManager class. It makes it easier for developers to create and maintain PEAR package.xml files.

Features:

  • Update existing package files or create new ones
  • Import values from an existing package file
  • Drag-n-Drop package directory into the application for easy loading (requires PEAR::Gtk_FileDrop)
  • Set package level information (package name, description, etc.)
  • Set release level information (version, release notes, etc.)
  • Easily add maintainers
  • Browse package files as a tree and click to add a dependency
  • Add install time global and file replacements
  • Package file preview window
  • Package the package using the new package file
Example: More detail can be found in doc/PEAR_PackageFileManager_GUI_Gtk/example.php

  1.  if (!extension_loaded('gtk')) {
  2.      dl'php_gtk.' . PHP_SHLIB_SUFFIX);
  3.  }
  4.  
  5.  require_once 'PEAR/PackageFileManager/GUI/Gtk.php';
  6.  $pfmGtk =new PEAR_PackageFileManager_GUI_Gtk();
  7.  $pfmGtk->show();
  8.  gtk::main();



[ Top ]


Class Variables

$notebook =

[line 71]

The GtkNotebook used to display the different tasks.

Type:   object


[ Top ]

$previewed =  false

[line 87]

Keep track of whether or not the file has been previewed in its current state.

Type:   boolean


[ Top ]

$previewWindow =

[line 81]

The GtkWindow that will hold the preview information.

Type:   object


[ Top ]

$saved =  false

[line 93]

Keep track of whether or not the file has been saved in its current state.

Type:   boolean


[ Top ]

$warningsArea =

[line 76]

The GtkText that will display the warnings.

Type:   object


[ Top ]

$widget =

[line 66]

The main gtk window.

Type:   object


[ Top ]



Method Detail

PEAR_PackageFileManager_GUI_Gtk (Constructor)   [line 106]

void PEAR_PackageFileManager_GUI_Gtk( [boolean $isMain = true])

Constructor.

Creates the package file manager and then calls the method to create the rest of the application.

  • Access: public

Parameters:

boolean   $isMain   —  Whether or not this class is the main application for this Gtk loop

[ Top ]

about   [line 171]

void about( none 0)

Creates and shows an about window.

The about window contains the package name, current package version number, the list of developers and where to find the latest information for the package.

It would be nice if this window also told the user what version of PEAR_PackageFileManager was being used but I don't know that that information is necessarily part of this package.

  • Access: public

Parameters:

none   0   — 

[ Top ]

checkBeforeQuit   [line 266]

void checkBeforeQuit( boolean $killMainLoop)

Checks to see if the file has been saved before destroying the main window.

The user should save their file before the application closes. If they have not, they will be prompted to save or close any way.

This method will also kill the main gtk loop if told to. If this class is imbedded in another class, you probably don't want to do that. Pass false to the constructor to prevent this from happening.

  • Access: public

Parameters:

boolean   $killMainLoop   — 

[ Top ]

getWidget   [line 150]

&object &getWidget( none 0)

Returns the main application window.

This is a standard PEAR-PHP-GTK method. It has been added for consistency. It would be useful if the PEAR_Frontend_Gtk class had a "New Package" feature. The PEAR_Frontend_Gtk code could just instantiate this class and call getWidget(). It could then show the window when ever it wanted or make some changes to the window itself. It could even pull the child from the window and embed the rest of this application in itself.

  • Access: public

Parameters:

none   0   — 

[ Top ]

show   [line 128]

void show( none 0)

Shows all widgets.

Please note: The regular issues associated with show_all() still apply. show_all() does not always trickle all of the way down to the very last child widget. For more info please see the PHP-GTK website http://gtk.php.net

  • Access: public

Parameters:

none   0   — 

[ Top ]

showWarnings   [line 238]

void showWarnings( [string $message = NULL])

Shows the warnings in the text area.

Each warning will be displayed on its own line.

  • Access: public

Parameters:

string   $message   —  Optional message to add to the warnings.

[ Top ]


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