This is Info file pm.info, produced by Makeinfo version 1.68 from the input file bigpm.texi.  File: pm.info, Node: Puppet/LogBody, Next: Puppet/Show, Prev: Puppet/Log, Up: Module List Log facility ************ NAME ==== Puppet::LogBody - Log facility SYNOPSIS ======== use Puppet::LogBody ; my $log = new Puppet::LogBody ( name => 'log test', 'how' => 'print' ) ; $log -> log("hello") ; # printed on STDOUT $log -> log("world",'how' => 'warn') ; # printed on STDERR my @a = $log-> getAll() ; # @a contains ['hello','world'] DESCRIPTION =========== This class implements a log facility which can either print on STDOUT or warn on STDERR (or hide) the log message. But in any case, the log message will be stored in the class so that all log messages can be retrieved later by the user. Constructor =========== new (...) --------- Creates the log object. Parameters are * name: is the log name that will be printed on STDERR or STDOUT at each log. (optional) * how: specifies what to do when a log is sent to the object (either print on STDOUT, warn on STDERR). By default the logs will not be printed or warned. For instance if name is set to 'foo' a call to log('hello') will print: foo: hello Methods ======= As Puppet::LogBody inherits from Puppet::Log, all the parent methods are available. log(text,...) ------------- Will log the passed text Optional parameters are: * how: will supersede the 'how' parameter passed to the constructor. If 'how' is set to undef, the log will not be printed or warned. clear() ------- Clear all stored logs getAll() -------- Return an array made of all stored logs. About Puppet body classes ========================= Puppet classes are a set of utility classes which can be used by any object. If you use directly the Puppet::*Body class, you get the plain functionnality. And if you use the Puppet::* class, you can get the same functionnality and a Tk Gui to manage it. AUTHOR ====== Dominique Dumont, Dominique_Dumont@grenoble.hp.com Copyright (c) 1998-1999 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO ======== perl(1), Puppet::Log(3)  File: pm.info, Node: Puppet/Show, Next: Puppet/Storage, Prev: Puppet/LogBody, Up: Module List Optional Tk Gui for Puppet::Body ******************************** NAME ==== Puppet::Show - Optional Tk Gui for Puppet::Body SYNOPSIS ======== use Puppet::Show ; package myClass ; sub new { my $type = shift ; my $self = {}; # no inheritance, your class contains the Puppet::Show class $self->{body} = new Puppet::Show(cloth => $self, @_) ; bless $self,$type ; } package main; my $mw = MainWindow-> new ; # these 2 parameters are passed to Puppet::Show constructor my $test = new MyTest( name => 'foo', 'topTk' => $mw) ; $test->display; MainLoop ; # Tk's DESCRIPTION =========== Puppet::Show is a utility class that is used (and not inherited like the deprecated Puppet::Any) to manage a *Note Puppet/Body: Puppet/Body, class through an optional GUI. So when you construct a Puppet::Show object, you have all the functionnality of this object without the GUI. Then, when the need arises, you may (or the user class may decide to) open the GUI of Puppet::Show so the user may perform any interactive action. On the other hand, if the need does not arise, you may instanciate a lot of objects (which uses Puppet::Show) without cluttering your display. The user class may use the Puppet::Show Tk widget (actually a Tk::Multi::Toplevel widget) and add its own widget to customize the GUI to its needs. This class features : * A *Note Tk/Multi/Toplevel: Tk/Multi/Toplevel, to show or hide the different display of the Show class (or of the user class) * A menu bar (part of *Note Tk/Multi/Toplevel: Tk/Multi/Toplevel,) * An online help (part of *Note Tk/Multi/Toplevel: Tk/Multi/Toplevel,) * An event log display so user object may log their activity (See *Note Puppet/Log: Puppet/Log,) * A Debug log display so user objects may log their "accidental" activities (See *Note Puppet/Log: Puppet/Log,) * An Object Scanner (See *Note Tk/ObjScanner: Tk/ObjScanner,) to display the attributes of the user object * A set of functions to manage "has-a" relationship between Puppet objects. (See *Note Puppet/Body: Puppet/Body,). The menu bar feature a "content" bar which enabled the user to open the display of all "contained" objects. * A facility to store data on a database file tied to a hash. (part of *Note Puppet/Body: Puppet/Body,) DEFAULT WINDOWS =============== debug log window ---------------- This log window (see *Note Puppet/Log: Puppet/Log,) will get all debug information for this instance of the object. More or less reserved for developers of classes using Puppet::Show. Note that log sent to the 'event' window will also be displayed in the debug window for better clarity. event log window ---------------- This log window (see *Note Puppet/Log: Puppet/Log,) will get all event information for this instance of the object. Constructor =========== new( ... ) ---------- Creates new Puppet::Show object. The constructor uses all `"Constructor"', *Note Puppet/Body: Puppet/Body, parameters plus: topTk The ref of the main Tk window podName The name of the pod file that will be used for the online help. (See *Note Tk/Pod: Tk/Pod,) podSection The name of the pod section that will be used for the online help Methods ======= acquire(...) ------------ Acquire the object ref as a child. Parameters are: * body: Reference of the Puppet::Body object that is to be acquired. * raise: Sub reference or method to call on the user object when the object is raised (generally through the 'content' menu). (Default to call display on the user object) * myRaise: Sub reference or method to call when this object is raised (generally through the 'container' menu). (Default to call $self->display()) For instance if object foo acquires object bar, bar becomes part of foo's content and foo is one of the container of bar. display(...) ------------ Creates a top level display for the user object. Parameters are: * master: Optional. You can set it to 1 if this object will be the master object of your application. In this case, destroying its display (with the File->close menu for instance) will make the application exit. * onDestroy: sub ref to call back when the display is destroyed. Return the *Note Tk/Multi/Toplevel: Tk/Multi/Toplevel, object if a display is actually created, undef otherwise (i.e is the display already exists). myDisplay() ----------- Return the *Note Tk/Multi/Toplevel: Tk/Multi/Toplevel, object created by the display method. closeDisplay() -------------- Close the display. Note that the display can be re-created later. About Puppet body classes ========================= Puppet classes are a set of utility classes which can be used by any object. If you use directly the Puppet::*Body class, you get the plain functionnality. And if you use the Puppet::* class, you can get the same functionnality and a Tk Gui to manage it. AUTHOR ====== Dominique Dumont, Dominique_Dumont@grenoble.hp.com Copyright (c) 1998-1999 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO ======== Tk(3), Puppet::Log(3), Puppet::LogBody(3), Puppet::Body(3), Tk::Multi::Toplevel(3), Tk::Multi::Manager(3)  File: pm.info, Node: Puppet/Storage, Next: Puppet/VcsTools/File, Prev: Puppet/Show, Up: Module List Utility class to handle permanent data ************************************** NAME ==== Puppet::Storage - Utility class to handle permanent data SYNOPSIS ======== use Puppet::Storage ; my $file = 'test.db'; my %db; # you manage the DB file tie %db, 'MLDBM', $file , O_CREAT|O_RDWR, 0640 or die $! ; # translucent attributes Puppet::Storage->dbHash(\%db); Puppet::Storage->keyRoot('key root'); my $foo = new Puppet::Storage (name => 'foo'); my $bar = new Puppet::Storage (name => 'bar'); # store some data in permanent storage $foo->storeDbInfo(toto => 'toto val', dummy => 'null') ; # remove some data from permanent storage $bar->deleteDbInfo('dummy'); # at the end of your program, just to be on the safe side untie %dbhash ; DESCRIPTION =========== Puppet::Storage is a utility class which provides a facility to store data on a database file tied to a hash.(with *Note MLDBM: MLDBM,) Class data ========== These items are translucent attributes (See *Note Perltootc: (perl.info)perltootc, by Tom Christiansen). Using the following method, you may set or query the value for the data class. And these parameters may be overridden with the constructor or by invoking this method by the object rather than by the class. keyRoot See `"Database management"' in this node. dbHash ref of the tied hash. See `"Database management"' in this node. Constructor =========== new(...) -------- Creates new Puppet::Storage object. New() parameters are: name The name of your object (no defaults) spawn(...) ---------- Spawn a new Puppet::Storage object re-using the translucent attribute of the spawner object. parameters are: name The name of your object (no defaults) child(...) ---------- Spawn a new Puppet::Storage object re-using the translucent attribute of the spawner object. On top of that a new keyRoot attribute is defined as ' $description, readHook => \&readHook ) ; my $mw = MainWindow-> new ; $mw->withdraw ; my $he = $mw->LogEditor( 'format' => $ds) ; my $fileO = new Puppet::VcsTools::File ( dbHash => \%dbhash, keyRoot => 'root', vcsClass => 'VcsTools::HmsAgent', vcsArgs => { hmsHost => 'hptnofs', hmsBase => 'test_integ' }, name => $tfile, workDir => $ENV{'PWD'}, dataScanner => $ds, logEditor => $he, 'topTk' => $mw ); $fileO -> display( master => 1); MainLoop ; DESCRIPTION =========== This class provides a GUI to the *Note VcsTools/File: VcsTools/File, class. The widget provides all the functionnalities to edit, archive, lock, unlock, change the mode of a file. The widget also provide an 'open history' menu to call the *Note Puppet/VcsTools/History: Puppet/VcsTools/History, widget which will let you work on the history of a file. Moreover, this widget will let you edit the log a each version of a file, if you want to modify it. CAVEATS ======= The file must contain the `$Revision: 1.3 $' VCS keyword. WIDGET USAGE ============ The File widget contains a sub-window featuring: * A revision label to indicate the revision of the current file. * A 'writable' check button, which indicated the status of the file and is able to change its mode. * A 'locked'check button, which indicated the lock status of the file and is able to change its lock. By default, all these menus and buttons are disabled until the user performs a File->check through the menu. The File menu contains several commands : * open history: Will open the history menu. * check: to get the revision, mode, and lock status of the current file. * archive: to archive the file (Enabled only if the file is writable). * create archive: to create an archive of the file (Enabled only if the file is writable and the archive does not exist). * edit: to edit the file (Enabled only if the file is writable or if the file does not yet exist). The File object will add some functionnalities to the History object while opening it : * A 'merge' global menu: To perform a merge on 2 selected revision. * A 'show diff' global menu: To show a diff between 2 selected revision. * Button 2 is bound to arrows to show the diff between the 2 revisions next to the arrow. * A 'show diff' command is also added to the arrow popup menu. * Button 2 is bound to nodes to show the content of this revision. * An 'edit log' entry is added to the popup menu of the nodes and arrows. Constructor =========== new(...) -------- Will create a new File object. Parameters are those of `"new(...)"', *Note VcsTools/File: VcsTools/File,. plus : * topTk : Tk top window reference. Generic methods =============== See `"check()"', *Note VcsTools/File: VcsTools/File, display() --------- Will launch a widget for this object. archiveFile(...) ---------------- See `"archiveFile(...)"', *Note VcsTools/File: VcsTools/File,. Feature one more parameter : The user may pass a 'auto' parameter set to 1 if an interactive archive is not desired. (default 0) History handling methods ======================== See `"createHistory()"', *Note VcsTools/File: VcsTools/File,, `"edit()"', *Note VcsTools/File: VcsTools/File, `"getRevision()"', *Note VcsTools/File: VcsTools/File,, `"checkWritable()"', *Note VcsTools/File: VcsTools/File,, `"chmodFile(...)"', *Note VcsTools/File: VcsTools/File,, `"writeFile(...)"', *Note VcsTools/File: VcsTools/File, openHistory() ------------- Will create a *Note Puppet/VcsTools/History: Puppet/VcsTools/History, object for this file and open its display. Handling the real file ====================== See `"createLocalAgent()"', *Note VcsTools/File: VcsTools/File,, `"edit()"', *Note VcsTools/File: VcsTools/File,, `"getRevision()"', *Note VcsTools/File: VcsTools/File,, `"checkWritable()"', *Note VcsTools/File: VcsTools/File,, `"chmodFile(...)"', *Note VcsTools/File: VcsTools/File,, `"writeFile(...)"', *Note VcsTools/File: VcsTools/File, Handling the VCS part ===================== See `"createVcsAgent()"', *Note VcsTools/File: VcsTools/File,, `"checkArchive()"', *Note VcsTools/File: VcsTools/File,, `"changeLock(...)"', *Note VcsTools/File: VcsTools/File,, `"checkOut(...)"', *Note VcsTools/File: VcsTools/File,, `"getContent(...)"', *Note VcsTools/File: VcsTools/File,, `"archiveLog(...)"', *Note VcsTools/File: VcsTools/File,, `"getHistory()"', *Note VcsTools/File: VcsTools/File,, `"showDiff(...)"', *Note VcsTools/File: VcsTools/File,, `"checkIn(...)"', *Note VcsTools/File: VcsTools/File, merge(...) ---------- Will open a GUI to merge the 2 revisions. Will use xemacs ediff merge to perform the actual merge. Parameters are : * rev1 : one of the revisions to merge. * rev2: the other. The ancestor of rev1 and rev2 will be computed by the *Note VcsTools/History: VcsTools/History, object. AUTHOR ====== Dominique Dumont, Dominique_Dumont@grenoble.hp.com Copyright (c) 1998 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO ======== perl(1), Tk(3), Puppet::Any(3), VcsTools::DataSpec::HpTnd(3), VcsTools::Version(3), VcsTools::File(3)  File: pm.info, Node: Puppet/VcsTools/GraphWidget, Next: Puppet/VcsTools/History, Prev: Puppet/VcsTools/File, Up: Module List TreeGraph and node list widget ****************************** NAME ==== Puppet::VcsTools::GraphWidget - TreeGraph and node list widget SYNOPSIS ======== use Tk::Multi::Manager; use Puppet::VcsTools::GraphWidget; my $wmgr = $mw -> MultiManager ( 'title' => 'log test' , 'menu' => $w_menu ) -> pack (); $toto = $wmgr -> newSlave ( 'type'=>'MultiVcsGraph', title => 'graph try', 'list' => [1 .. 5 ] ) ; my $ref = [1000..1005]; my ($ox,$oy) = (100,100); $tg -> addNode ( nodeId => '1.0', text => $ref, xref => \$ox, yref => \$oy ) ; DESCRIPTION =========== This composite widget is intented to provide a canvas to draw a VCS revision tree associated with a listbox containing a list of all the revisions of the VCS file. This widget features : * A scrollable Canvas. (See *Note Tk/TreeGraph: Tk/TreeGraph,) * A print button (The shell print command may be modified by setting $printCmd to the appropriate shell command. By default, it is set to 'lp -opostscript') * A clear button * A list box This widget will forward all unrecognized commands to the TreeGraph object. Note that this widget should be created only by *Note Tk/Multi/Manager: Tk/Multi/Manager,. WIDGET-SPECIFIC OPTIONS ======================= title ----- Some text which will be displayed above the test window. menu_button ----------- The log window feature a set of menu items which must be added in a menu. This menu ref must be passed with the menu_button prameter to the object during its instanciation list ---- A reference to a list that will be inserted in the Listbox. (optional) ADVERTISED WIDGET ================= * graph * list * menu WIDGET-SPECIFIC METHODS ======================= addRev( revision ,.. ) ---------------------- Add the passed revision in the revision listbox print() ------- Will raise a popup window with an Entry to modify the actual print command, a print button, a default button (to restore the default print command), and a cancel button. doPrint() --------- Print the label and the content of the text window. The print is invoked by dumping the text content into a piped command. You may want to set up a new command to print correctly on your machine. You may do it by using the setPrintCmd method or by invoking the 'print' method. setPrintCmd('print command') ---------------------------- Will set the $printCmd class variable to the passed string. You may use this method to set the appropriate print command on your machine. Note that using this method will affect all other Tk::Multi::Canvas object since the modified variable is not an instance variable but a class variable. clear() ------- Is just a delete('1.0','end') . Delegated methods ================= By default all widget method are delegated to the Text widget. Excepted : command(...) ------------ Parameters are : * on: either 'menu', 'node' or 'arrow' * label: Label of the Popup menu entry * command: sub ref to run when the menu is invoked If the 'on' parameter is set to 'menu', the command will be delegated to the menu entry managed by the *Note Tk/Multi/Manager: Tk/Multi/Manager,. This will add a new command to the aforementionned menu. Otherwise, the command will be delegated to the TreeGraph widget. See `"command(...)"', *Note Tk/TreeGraph: Tk/TreeGraph, AUTHOR ====== Dominique Dumont, Dominique_Dumont@grenoble.hp.com Copyright (c) 1998-1999 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO ======== perl(1), Tk(3), Tk::Multi::Manager(3), Tk::TreeGraph(3)  File: pm.info, Node: Puppet/VcsTools/History, Next: Puppet/VcsTools/LogEdit, Prev: Puppet/VcsTools/GraphWidget, Up: Module List TK GUI for VcsTools::History **************************** NAME ==== Puppet::VcsTools::History - TK GUI for VcsTools::History SYNOPSIS ======== require VcsTools::DataSpec::HpTnd ; # for instance # could be VcsTools::DataSpec::Rcs my $ds = new VcsTools::DataSpec::HpTnd ; # ditto my $hist = new Puppet::VcsTools::History ( dbHash => \%dbhash, # for permanent data storage keyRoot => 'history root', # key for permanent data storage 'topTk' => $mw, name => 'Foo history', dataScanner => $ds # log analyser ); DESCRIPTION =========== This class provides a GUI to the *Note VcsTools/History: VcsTools/History, class. It contains a GraphWidget to draw the history tree and some key bindings to read the log informations from the tree drawing . WIDGET USAGE ============ The display of the history object is made of : * A canvas to draw a revision tree. * A revision list. If you double click on a revision of this list, History will draw the revision tree starting from this revision. * A text window to display informations related to the revision tree. Nodes ----- Each rectangle in the tree represent a revision (aka a node). The text in the rectangle is bound to some keys : * button-1 selects the node for further operation (See below) * button-3 pops-up a menu * double button-1 redraws the tree from this revision The node popup menu features : * draw from here: Re-draws the tree from this revision * open version object: Opens the display of the *Note Puppet/VcsTools/Version: Puppet/VcsTools/Version, object. Arrows ------ Each arrow is bound to some keys : * button-1 shows the log of this revision * button-3 pops up a menu The arrow popup menu features : * show log: shows the log of this revision * show full log: shows the full log of this revision with all fields. global features --------------- The graph widget features a global menu invoked on the title of the graph widget. It features : * unselect all: unselect all nodes. * reload from archive: Reloads information from the VCS archive. This will also update your local information data base. Use this menu when other people have worked on your VCS files. * show cumulated log: Will show a concatenation of logs between 2 selected revisions. One of this revision must be the ancestor of the other. The VcsTools::File(3) object have also some bindings (See `"WIDGET USAGE"', *Note VcsTools/File: VcsTools/File,) Constructor =========== new(...) -------- Will create a new history object. Parameters are: * All parameter of `"Constructor"', *Note Puppet/Body: Puppet/Body, * dataScanner : VcsTools::DataSpec::HpTnd (or equivalent) object reference * topTk: the ref of the Tk main window Methods ======= All `"Methods"', *Note VcsTools/History: VcsTools/History, plus these ones: addNewVersion(...) ------------------ The call will be delegated to `"addNewVersion(...)"', *Note VcsTools/History: VcsTools/History,, then the drawing will be updated with it. display() --------- Will launch a widget for this object. closeDisplay() -------------- Delegated to the `"closeDisplay"', *Note Puppet/Body: Puppet/Body, method. drawTree(...) ------------- Parameters are: * revision: The tree will start from this revision number. Optional. If not passed the tree will be re-drawn from the revision that was passed the previous time this funcion was called. * nodeId: same as revision. getTreeGraph() -------------- Returns the *Note Tk/TreeGraph: Tk/TreeGraph, ref embedded in History display or undef if the display was not opened. getInfoWidget() --------------- Returns the *Note Tk/ROText: Tk/ROText, ref embedded in History display or undef if the display was not opened. TODO ==== Trigger a history update if the database time stamp is younger than the time of the last history analysis AUTHOR ====== Dominique Dumont, Dominique_Dumont@grenoble.hp.com Copyright (c) 1998-1999 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO ======== perl(1), Tk(3), Puppet::Show(3), VcsTools::DataSpec::HpTnd(3), Puppet::VcsTools::Version(3), Puppet::VcsTools::File(3)  File: pm.info, Node: Puppet/VcsTools/LogEdit, Next: Puppet/VcsTools/Version, Prev: Puppet/VcsTools/History, Up: Module List Tk composite widget to edit a Vcs Log ************************************* NAME ==== Puppet::VcsTools::LogEdit - Tk composite widget to edit a Vcs Log SYNOPSIS ======== my $eh = $widget->LogEditor( name => 'dummy', revision=> '1.1', 'format' => $logDataFormat) ; $eh->Show(info => Storage_object_of_a_VcsTools_Version_object) ; DESCRIPTION =========== This composite Tk Widget is used to edit the log information of a version of a Vcs file. A version of a Vcs file is implemented in the *Note VcsTools/Version: VcsTools/Version, object. And the log information is stored in its associated *Note Puppet/Storage: Puppet/Storage, class. This class must be passed to the Show method so that the editor can modify the log informations. The fields of the editor are set according to the 'format' parameter passed during the widget creation. Each field feature a 'recall' button which will recall the last archived value of the field. You may click several times on the 'recall' button to get older values. Constructor =========== LogEditor() ----------- Parameters are : * format : data format array reference. The LogEditor widget content will match the content of this data structure METHODS ======= Show() ------ This method displays the dialog, waits for the user to click either 'archive' or 'cancel'. If the user cancels the edition, Show returns 0. If the user clicked 'archive', Show will store the edited data in the passed 'info' reference and returns 1. Parameters are : * name: name of the VCS file * revision : revision number of the log version to edit * info: hash ref or Puppet::Storage object which contains the log to edit. If a hash ref is passed, its content will be modified, if a Puppet::Storage object is passed, its permanent data will be modified. * grab: If global is specified a global (rather than local) grab is performed. DESCRIPTION FORMAT ================== See `"DESCRIPTION FORMAT"', *Note VcsTools/LogParser: VcsTools/LogParser, Each item of the description must have a type. According to the type, the LogEditor will create a widget for this type: * line: The editor uses an Entry widget to edit this type. * enum: The editor uses a RadioButton widget to edit this type. The possible values of the Buttons are set by the 'values' parameter of the data format. * array: The editor uses an Entry widget to edit this type. Array element will be separated by a comma or a white space. * text: The editor uses an Text widget to edit this type. AUTHOR ====== Dominique Dumont, Dominique_Dumont@grenoble.hp.com Copyright (c) 1998-1999 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO ======== perl(1), Tk(3), VcsTools::DataSpec::HpTnd(3)  File: pm.info, Node: Puppet/VcsTools/Version, Next: QAccel, Prev: Puppet/VcsTools/LogEdit, Up: Module List Tk GUI to manage a VcsTools::Version object ******************************************* NAME ==== Puppet::VcsTools::Version - Tk GUI to manage a VcsTools::Version object SYNOPSIS ======== No synopsis given. This object is better used with the *Note Puppet/VcsTools/History: Puppet/VcsTools/History, module. DESCRIPTION =========== This class represents one version of a VCS file. It holds all the information relevant to this version including the log of this version, the parent revision, child revision and so on. Its main function is to deal with the History object and its TreeGraph object to draw the history revision tree. The Version object will perform all necessary calls to the drawing methods of TreeGraph to get the correct drawing. The information structure stored in each Version object are described in the dataFormat HASH reference passed to the constructor (See *Note VcsTools/DataSpec/Rcs: VcsTools/DataSpec/Rcs, or *Note VcsTools/DataSpec/HpTnd: VcsTools/DataSpec/HpTnd, for more details). This Object heavily uses *Note Puppet/Show: Puppet/Show,, *Note Puppet/Body: Puppet/Body, and *Note Puppet/Storage: Puppet/Storage,. WIDGET USAGE ============ Well, By itself, the Version widget cannot do much. Future version may be better depending on user inputs. The only function available is to edit the history through the "File->edit log" menu if the 'edit' parameter was specified to the constructor. Constructor =========== new(...) -------- Parameters are those of `"new()"', *Note VcsTools/Version: VcsTools/Version, plus: * editor : LogEditor ref. If specified, the history of this version can be edited by calling the Show() method of the LogEditor. See `"Show()"', *Note Puppet/VcsTools/LogEdit: Puppet/VcsTools/LogEdit,. (optional) Methods ======= All `"Methods"', *Note VcsTools/Version: VcsTools/Version, plus these ones: display(...) ------------ Will launch a widget for this object. All parameters are passed to `"display(...)"', *Note Puppet/Show: Puppet/Show, closeDisplay() -------------- Delegated to the `"closeDisplay"', *Note Puppet/Body: Puppet/Body, method. editLog() --------- Will run the log editor for this version. archiveLog() ------------ Will delegate the call to the history manager. Used to update the VCS base from the log stored in the Version object. Used generally after an editLog. drawTree(tree_graph) -------------------- Will start drawing a tree (from the revision of this Version object) calling History object's graph. Internal Methods ================ Not for faint hearted people. drawSubTree(tree_graph, x, y, width_reference) ---------------------------------------------- Called recursively to draw all nodes, internal method. x,y are the coordinates of the root of the sub-tree. The width will be changed to the actual width (in pixels) of the sub-tree. Note that the width of the sub-tree depends on the number of branches. AUTHOR ====== Dominique Dumont, Dominique_Dumont@grenoble.hp.com Copyright (c) 1998-1999 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO ======== perl(1), Tk(3), Puppet::Show(3), VcsTools::Version(3), VcsTools::History(3)  File: pm.info, Node: QAccel, Next: QApplication, Prev: Puppet/VcsTools/Version, Up: Module List Interface to the Qt QAccel class ******************************** NAME ==== QAccel - Interface to the Qt QAccel class SYNOPSIS ======== `use QAccel;' Inherits QObject. Member functions ---------------- new, clear, connectItem, count, disconnectItem, findKey, insertItem, isEnabled, isItemEnabled, key, removeItem, setEnabled, setItemEnabled DESCRIPTION =========== The complete class is implemented. Do not try to use SIGNAL() or SLOT(). EXPORTED ======== The `%Key' hash is exported into the caller's namespace, the elements represent the values of the Key_* macros in C++ Qt. For example, the `Key_Space' value in C++ would be accessible as `$Key{Space}' in Perl, the `Key_Q' value would be accessible with `$Key{Q}', and so on. The scalar values $SHIFT, $CTRL, $ALT, and $ASCII_ACCEL are also exported, and have the same value and function as their C++ counterparts. SEE ALSO ======== QAccel(3qt) AUTHOR ====== Ashley Winters  File: pm.info, Node: QApplication, Next: QBitmap, Prev: QAccel, Up: Module List Interface to the Qt QApplication class ************************************** NAME ==== QApplication - Interface to the Qt QApplication class SYNOPSIS ======== `use QApplication;' Inherits QObject. Requires QClipboard, QCursor, QEvent, QFont, QFontMetrics, QPalette, QPoint, and QWidget. A QApplication is automatically created when you `use Qt;' and will be automatically exported into your namespace as $qApp. Member functions ---------------- new, beep, clipboard, closingDown, colorMode, desktop, enter_loop, exec, exit, exit_loop, flushX, focusWidget, font, fontMetrics, mainWidget, notify, overrideCursor, palette, postEvent, processEvents, quit, restoreOverrideCursor, sendEvent, setColorMode, setFont, setMainWidget, setOverrideCursor, setPalette, setStyle, startingUp, style, syncX, widgetAt DESCRIPTION =========== What you see is what you get. SEE ALSO ======== QApplication(3qt) QObject(3qt) QObject(3) QGlobal(3) NOTES ===== The Qt class automatically creates and exports a QApplication. None of the other classes in Qt actually uses the Qt class, so if a user's application doesn't 'use Qt;', no QApplication will be created. This is meant to allow sub-classing QApplication or allowing a different interface to use the PerlQt classes, like 'use KDE;'. The QGlobal class is included in all PerlQt classes, instead of Qt. BUGS ==== setColorMode() is interfaced, but I don't think it works. AUTHOR ====== Ashley Winters  File: pm.info, Node: QBitmap, Next: QBrush, Prev: QApplication, Up: Module List Interface to the Qt QBitmap class ********************************* NAME ==== QBitmap - Interface to the Qt QBitmap class SYNOPSIS ======== `use QBitmap;' Inherits QPixmap. Requires QSize and QWMatrix. Member functions ---------------- new, xForm DESCRIPTION =========== What you see is what you get. SEE ALSO ======== QBitmap(3qt) AUTHOR ====== Ashley Winters  File: pm.info, Node: QBrush, Next: QButton, Prev: QBitmap, Up: Module List Interface to the Qt QBrush class ******************************** NAME ==== QBrush - Interface to the Qt QBrush class SYNOPSIS ======== `use QBrush;' Requires QColor and QPixmap. Member functions ---------------- new, color, pixmap, setColor, setPixmap, setStyle, style DESCRIPTION =========== As direct an interface as humanly possible. EXPORTED ======== The `%BrushStyle' hash is exported into the user's namespace. Since there is no chance for namespace pollution, all `%BrushStyle' elements ending in Pattern have been truncated so as to remove the Pattern. SEE ALSO ======== QBrush(3qt) AUTHOR ====== Ashley Winters  File: pm.info, Node: QButton, Next: QButtonGroup, Prev: QBrush, Up: Module List Interface to the Qt QButton class ********************************* NAME ==== QButton - Interface to the Qt QButton class SYNOPSIS ======== `use QButton;' Inherits QWidget. Requires QPixmap. Member functions ---------------- new DESCRIPTION =========== $button = QButton->new(parent = undef, name = undef) Direct interface. SEE ALSO ======== QButton(3qt) AUTHOR ====== Ashley Winters  File: pm.info, Node: QButtonGroup, Next: QCheckBox, Prev: QButton, Up: Module List Interface to the Qt QButtonGroup class ************************************** NAME ==== QButtonGroup - Interface to the Qt QButtonGroup class SYNOPSIS ======== `use QButtonGroup;' Inherits QGroupBox. Requires QButton. Member functions ---------------- new, find, insert, isExclusive, remove, setExclusive DESCRIPTION =========== What you see is what you get. AUTHOR ====== Ashley Winters  File: pm.info, Node: QCheckBox, Next: QClipboard, Prev: QButtonGroup, Up: Module List Interface to the Qt QCheckBox class *********************************** NAME ==== QCheckBox - Interface to the Qt QCheckBox class SYNOPSIS ======== `use QCheckBox;' Inherits QButton. Member functions ---------------- new, isChecked, setChecked DESCRIPTION =========== What you see is what you get. AUTHOR ====== Ashley Winters  File: pm.info, Node: QClipboard, Next: QColor, Prev: QCheckBox, Up: Module List Interface to the Qt QClipboard class ************************************ NAME ==== QClipboard - Interface to the Qt QClipboard class SYNOPSIS ======== `use QClipboard;' Inherits QObject. Requires QPixmap. Member functions ---------------- clear, pixmap, setPixmap, setText, text DESCRIPTION =========== What you see is what you get. SEE ALSO ======== QClipboard(3qt) AUTHOR ====== Ashley Winters  File: pm.info, Node: QColor, Next: QComboBox, Prev: QClipboard, Up: Module List Interface to the Qt QColor class ******************************** NAME ==== QColor - Interface to the Qt QColor class SYNOPSIS ======== `use QColor;' Member functions ---------------- new, alloc, blue, dark, green, hsv, isDirty, isValid, light, pixel, red, rgb, setHsv, setNamedColor, setRgb Static functions ---------------- cleanup, currentAllocContext, destroyAllocContext, enterAllocContext, initialize, lazyAlloc, leaveAllocContext, maxColors, numBitPlanes, setLazyAlloc Related functions ----------------- qBlue, qGray, qGreen, qRed, qRgb DESCRIPTION =========== Every member of QColor, except the operators, has been interfaced through this class. EXPORTED ======== The following QColor objects are exported into the user's namespace: $color0 $color1 $black $white $darkGray $gray $lightGray $red $green $blue $cyan $magenta $yellow $darkRed $darkGreen $darkBlue $darkCyan $darkMagenta $darkYellow The following functions are exported into the user's namespace: `&qBlue', `&qGray', `&qGreen', `&qRed', `&qRgb' SEE ALSO ======== QColor(3qt) AUTHOR ====== Ashley Winters  File: pm.info, Node: QComboBox, Next: QCursor, Prev: QColor, Up: Module List Interface to the Qt QComboBox class *********************************** NAME ==== QComboBox - Interface to the Qt QComboBox class SYNOPSIS ======== `use QComboBox;' Inherits QWidget. Requires QPixmap. Member functions ---------------- new, autoResize, changeItem, count, currentItem, insertionPolicy, insertItem, insertStrList, maxCount, pixmap, removeItem, setAutoResize, setCurrentItem, setInsertionPolicy, setMaxCount, setSizeLimit, sizeLimit, text DESCRIPTION =========== The only significant change is insertStrList(). For obvious reasons, this function cannot be directly converted to Perl because of it's list argument. Perl simplifies the matter greatly by allowing a simple argument-list change to `insertStrList(index, str1, ..., strN)'. Just set the index argument to -1 of you want it the items to be appended. EXPORTED ======== The `%Policy' hash is exported into the user's namespace. It contains all the constants that were referenced through QComboBox:: in C++. CAVEATS ======= If there is sufficient demand, I'm more than willing to change the insertStrList() arguments to make index the last argument and defaulted to -1. This would break scripts, so be warned. AUTHOR ====== Ashley Winters  File: pm.info, Node: QCursor, Next: QDialog, Prev: QComboBox, Up: Module List Interface to the Qt QCursor class ********************************* NAME ==== QCursor - Interface to the Qt QCursor class SYNOPSIS ======== `use QCursor;' Require QBitmap and QPoint. Member functions ---------------- new, bitmap, hotSpot, mask, pos, setPos DESCRIPTION =========== What you see is what you get EXPORTED ======== The `%Cursor' hash is exported into the user's namespace. It contains all of the global cursors (`arrowCursor', `crossCursor', etc..) without the Cursor suffix (`$Cursor{arrow}', `$Cursor{cross}', etc...) SEE ALSO ======== QCursor(3qt) AUTHOR ====== Ashley Winters  File: pm.info, Node: QDialog, Next: QEvent, Prev: QCursor, Up: Module List Interface to the Qt QDialog class ********************************* NAME ==== QDialog - Interface to the Qt QDialog class SYNOPSIS ======== `use QDialog;' Inherits QWidget. Member functions ---------------- new, exec, result DESCRIPTION =========== What you see is what you get. EXPORTED ======== The `%DialogCode' hash is exported into the user's namespace. It just has `Accepted' and `Rejected'. AUTHOR ====== Ashley Winters  File: pm.info, Node: QEvent, Next: QFileDialog, Prev: QDialog, Up: Module List Interface to the Qt QEvent, QMouseEvent, QPaintEvent, QResizeEvent, and QTimerEvent classes ******************************************************************************************* NAME ==== QEvent - Interface to the Qt QEvent, QMouseEvent, QPaintEvent, QResizeEvent, and QTimerEvent classes SYNOPSIS ======== `use QEvent;' QEvent ------ Member functions ---------------- new, type QCloseEvent ----------- Inherits QEvent. Member functions ---------------- new, accept, ignore, isAccepted QFocusEvent ----------- Inherits QEvent. Member functions ---------------- new, gotFocus, lostFocus QKeyEvent --------- Inherits QEvent. Member functions ---------------- new, accept, ascii, ignore, isAccepted, key, state QMouseEvent ----------- Inherits QEvent. Requires QPoint. Member functions ---------------- new, button, pos, state QMoveEvent ---------- Inherits QEvent. Member functions ---------------- new, oldPos, pos QPaintEvent ----------- Inherits QEvent. Requires QRect. Member functions ---------------- new, rect QResizeEvent ------------ Inherits QEvent. Requires QSize. Member functions ---------------- new, oldSize, size QTimerEvent ----------- Inherits QEvent Member functions ---------------- new, timerId DESCRIPTION =========== All QEvent* classes have been completely interfaced except QCustomEvent. It will take a bit of creativity to figure out how to make that work. EXPORTED ======== The following scalars are exported into the user's namespace on behalf of QMouseEvent. $NoButton $LeftButton $RightButton $MidButton $MouseButtonMask $ShiftButton $ControlButton $AltButton $KeyButtonMask The `%Event' hash is exported into the user's namespace, and represents the `Event_*' constants. All `%Event' elements have had their prepending `Event_' removed because of the lack of namespace problems. CAVEATS ======= The exported names are very tempting to stuff into %Button. SEE ALSO ======== QEvent(3qt) AUTHOR ====== Ashley Winters  File: pm.info, Node: QFileDialog, Next: QFont, Prev: QEvent, Up: Module List Interface to the Qt QFileDialog class ************************************* NAME ==== QFileDialog - Interface to the Qt QFileDialog class SYNOPSIS ======== `use QFileDialog;' Inherits QDialog. Member functions ---------------- new, dirPath, getOpenFileName, getSaveFileName, rereadDir, selectedFile, setDir DESCRIPTION =========== What you see is what you get. CAVEATS ======= Implementing QDir is not on my todo list. I may provide a dir-name stub, but nothing good is likely before PerlQt-1.00. Get used to it. AUTHOR ====== Ashley Winters  File: pm.info, Node: QFont, Next: QFontInfo, Prev: QFileDialog, Up: Module List Interface to the Qt QFont class ******************************* NAME ==== QFont - Interface to the Qt QFont class SYNOPSIS ======== `use QFont;' Member functions ---------------- new, bold, charSet, defaultFont, exactMatch, family, fixedPitch, insertSubstitution, italic, pointSize, rawMode, removeSubstitution, setBold, setCharSet, setDefaultFont, setFamily, setFixedPitch, setItalic, setPointSize, setRawMode, setStrikeOut, setStyleHint, setUnderline, setWeight, strikeOut, styleHint, substitute, underline, weight DESCRIPTION =========== What you see is what you get. EXPORTED ======== Three hashes, `%StyleHint', `%Weight', and `%CharSet', are exported into the user's namespace. They correspond to the three enums in the QFont class, and, if combined, contain all the constant values that were accessed through QFont:: in C++. To refresh your memory without requiring you to read `qfont.h', `%StyleHint' elements are font-names (Helvetica, Times, etc), `%Weight' elements are the character's darkness (Light, Bold, etc), `%CharSet' should be obvious enough to anyone who needs it. SEE ALSO ======== QFont(3pl) AUTHOR ====== Ashley Winters  File: pm.info, Node: QFontInfo, Next: QFontMetrics, Prev: QFont, Up: Module List Interface to the Qt QFontInfo class *********************************** NAME ==== QFontInfo - Interface to the Qt QFontInfo class SYNOPSIS ======== `use QFontInfo;' Requires QFont. Member functions ---------------- bold, charSet, exactMatch, family, fixedPitch, font, italic, pointSize, rawMode, strikeOut, styleHint, underline, weight DESCRIPTION =========== This class is fully interfaced. WYSIWYG SEE ALSO ======== QFontInfo(3qt) AUTHOR ====== Ashley Winters  File: pm.info, Node: QFontMetrics, Next: QFrame, Prev: QFontInfo, Up: Module List Interface to the Qt QFontMetrics class ************************************** NAME ==== QFontMetrics - Interface to the Qt QFontMetrics class SYNOPSIS ======== `use QFontMetrics;' Requires QFont and QRect. Member functions ---------------- ascent, boundingRect, descent, font, height, leading, lineSpacing, lineWidth, maxWidth, strikeOutPos, underlinePos, width DESCRIPTION =========== Fully implemented. Very good. SEE ALSO ======== QFontMetrics(3qt) AUTHOR ====== Ashley Winters  File: pm.info, Node: QFrame, Next: QGlobal, Prev: QFontMetrics, Up: Module List Interface to the Qt QFrame class ******************************** NAME ==== QFrame - Interface to the Qt QFrame class SYNOPSIS ======== `use QFrame;' Inherits QWidget. Requires QRect. Member functions ---------------- new, contentsRect, frameRect, frameShadow, frameShape, frameStyle, frameWidth, lineShapesOk, lineWidth, midLineWidth, setFrameStyle, setLineWidth, setMidLineWidth DESCRIPTION =========== As direct an interface as humanly possible. EXPORTED ======== Exports `%QFrame' into the user's namespace. It contains all the constants accessed through QFrame:: in C++ CAVEATS ======= I don't like `%QFrame', and it wouldn't take much for me to move them all into the QFrame namespace and be done with it. SEE ALSO ======== QFrame(3qt) AUTHOR ====== Ashley Winters  File: pm.info, Node: QGlobal, Next: QGroupBox, Prev: QFrame, Up: Module List Internal PerlQt class, required by all other classes **************************************************** NAME ==== QGlobal - Internal PerlQt class, required by all other classes SYNOPSIS ======== `require QGlobal;' `use QGlobal qw(...);' $object = new QClass->setImmortal DESCRIPTION =========== The only relevant function in QGlobal (so far) is setImmortal(). It removes the tendency of Perl to free the memory used by an object when it goes out of scope. If you create say... a button that can live a life of it's own while within a subroutine, that button will be killed at the end of the subroutine without setImmortal(). Reading beyond this point implies that you care about the internals. Everything in here is subject to change at my whim (and probably already has). Object internals ---------------- QGlobal is a repository for constansts requires by more than one independant class, and contains Qt::Hash which is inherited by all Qt classes. The name Qt::Hash is a remnant from when all Qt objects were blessed references to tied hashes. It is no-longer relevant because I sacrificed safety and a bit of convienience in exchange for speed. Every Qt object has two vital elements, THIS and DESTROY. The THIS element holds the actual pointer to the C++ object represented in ram. PerlQt sub-classes all classes for convienience, access to protected members, and garbage-collection. Internally, there are two types of sub-class types, the PClass, and the pClass. The pClass is availble only for classes which have protected members which are accessible via Perl. There is a macro, `pQtTHIS(type)', in `virtual.h' from libperlqt, which automatically typecasts PClass objects into pClass objects. The PClass is the main sub-class type. Every class has a P version, and when a PClass is returned from an XS function, the DESTROY key is created and set to true. Only the existance of DESTROY is necessary to delete the object on destruction. PClass objects are returned from all constructors, and from all classes returning QClass &. Object access ------------- There are two functions that are universally useful and likely to be permanent. They are declared in `pqt.h', and every class requires that header. SV *objectify_ptr(void *ptr, char *clname, int delete_on_destroy = 0) This function is used when you want to convert a class pointer to an object. *NEVER, EVER, EVER* try to convert a pointer to an SV manually!!! The internals are subject to change daily. And believe me, I've done it. This function is automatically used in the typemap. The ptr argument is the object to be accessable in Perl. The clname argument is the name of the class. It is automatically modified so as to strip off any trailing garbage like spaces or *'s. That means macro conversions of pointer-types to strings are acceptable. In fact, that's how the typemap does it. The delete_on_destroy argument is pretty obvious. Just set it to a true value if you want the object to be deleted when it is destroyed. void *extract_ptr(SV *obj, char *clname) This does the opposite conversion from objectify_ptr. It *will* cause the program to croak if passed what it considers an invalid object. Virtual functions ----------------- The way in which virtual function-calls from C++ to Perl are achieved is pretty simple at the moment. For every virtual function to be overridden, a function named QClass_virtualFunction is created in the virtualize class. The virtualize class, in turn, is inherited by all classes which have virtual functions that can be overridden in Perl. Since the PClasses don't inherit each other, the same virtual function must be overridden in all the sub-classes of the class with the virtual function as well, if you want people to sub-class those classes. Since every PClass which implements virtual classes inherits virtualize, all that is needed in the virtual override function is a stub which calls QClass_virtualFunction. The QClass_virtualFunction itself just does a method-call to a perl object which was automatically saved when the object was created. Signals and slots ----------------- Once they are setup, signals and slots are pretty fast and efficient in Perl. The process of getting there is not. The signals and slots for a class are accesible through `%$signals::signals{QClass}' and `%$slots::slots{QClass}'. These are filled in with `use signals' and `use slots'. For every conection to a Perl QObject slot, a dummy pQtSigSlot object is created. It is given the object it is to be an interface to, and the slot-name it is supposed to call. The pQtSigSlot class holds all the stub functions to be used to call Perl methods. Mostly, those stub function just call the main functions, `slot1(SV*)', `slot2(SV*,SV*)', etc, with their arguments converted to their scalar values. For every perl signal, a single dummy XS function is just given a new name. Since the `CV*' of a function is always passed to an XS function, it just sees which function-name it was called as, checks the `%signals' table for the signal to emit, and calls the relevant internal activate*() function. All of the actual code for this is in `QObject.xs' from the main source-tree and `sigslot.xs' from libperlqt. EXPORTED ======== Exports &qRound. EXPORT_OK's a bunch of useful enum values. See `QGlobal.pm' for a list of those. CAVEATS ======= Everything will change. AUTHOR ====== Ashley Winters