plinitbutton(2) [plan9 man page]
PLINITBUTTON(2) System Calls Manual PLINITBUTTON(2) NAME
plinitbutton, plinitcanvas, plinitcheckbutton, plinitedit, plinitentry, plinitframe, plinitgroup, plinitidollist, plinitlabel, plinitlist, plinitmenu, plinitmessage, plinitpopup, plinitpulldown, plinitradiobutton, plinitscrollbar, plinitslider, plinittextview - panel reinitial- ization functions SYNOPSIS
#include <u.h> #include <libg.h> #include <panel.h> void plinitbutton(Panel*, int, Icon*, void (*)(Panel*, int)) void plinitcanvas(Panel*, int, void (*)(Panel*, Mouse*)) void plinitcheckbutton(Panel*, int, Icon*, void (*)(Panel*, int, int)) void plinitedit(Panel*, int, Point, Rune*, int, void (*)(Panel *)) void plinitentry(Panel*, int, int, char*, void (*)(Panel*, char*)) void plinitframe(Panel*, int) void plinitgroup(Panel*, int) void plinitlabel(Panel*, int, Icon*) void plinitlist(Panel*, int, char *(*)(int), int, void(*)(Panel*, int, int)) void plinitmenu(Panel*, int, Icon**, int, void (*)(int, int)) void plinitmessage(Panel*, int, int, char*) void plinitpopup(Panel*, int, Panel*, Panel*, Panel*) void plinitpulldown(Panel*, int, Icon*, Panel*, int) void plinitradiobutton(Panel*, int, Icon*, void (*)(Panel*, int, int)) void plinitscrollbar(Panel*, int) void plinitslider(Panel*, int, Point, void(*)(Panel*, int, int, int)) void plinittextview(Panel*, int, Point, Rtext*, void (*)(Panel*, int, Rtext*)) DESCRIPTION
Corresponding to each Panel-creation function (see plbutton(2)) is a function that reinitializes the parameters of that kind of panel. The reinitialization functions are all named by inserting the string init after the creation function's initial pl. For example, plinitbutton will reinitialize a panel created by plbutton. Their argument lists are identical to the corresponding creation function, except that the first argument is a pointer to the panel to be reinitialized, rather than its parent. SOURCE
/sys/src/libpanel SEE ALSO
plinit(2), plbutton(2), graphics(2) Tom Duff, ``A quick introduction to the panel library''. PLINITBUTTON(2)
Check Out this Related Man Page
Ace::Graphics::Track(3pm) User Contributed Perl Documentation Ace::Graphics::Track(3pm) NAME
Ace::Graphics::Track - PNG graphics of Ace::Sequence::Feature objects SYNOPSIS
use Ace::Sequence; use Ace::Graphics::Panel; my $db = Ace->connect(-host=>'brie2.cshl.org',-port=>2005) or die; my $cosmid = Ace::Sequence->new(-seq=>'Y16B4A', -db=>$db,-start=>-15000,-end=>15000) or die; my @transcripts = $cosmid->transcripts; my $panel = Ace::Graphics::Panel->new( -segment => $cosmid, -width => 800 ); my $track = $panel->add_track('transcript' -fillcolor => 'wheat', -fgcolor => 'black', -bump => +1, -height => 10, -label => 1); foreach (@transcripts) { $track->add_feature($_); } my $boxes = $panel->boxes; print $panel->png; DESCRIPTION
The Ace::Graphics::Track class is used by Ace::Graphics::Panel to lay out a set of sequence features using a uniform glyph type. You will ordinarily work with panels rather than directly with tracks. METHODS
This section describes the class and object methods for Ace::Graphics::Panel. CONSTRUCTORS There is only one constructor, the new() method. It is ordinarily called by Ace::Graphics::Panel, and not in end-developer code. $track = Ace::Graphics::Track->new($glyph_name,$features,@options) The new() method creates a new track object from the provided glyph name and list of features. The arguments are similar to those in Ace::Graphics::Panel->new(). If successful new() will return a new Ace::Graphics::Track. Otherwise, it will return undef. If the specified glyph name is not a valid one, new() will throw an exception. OBJECT METHODS Once a track is created, the following methods can be invoked. $track->add_feature($feature) This adds a new feature to the track. The feature can either be a single object that implements the Bio::SeqFeatureI interface (such as an Ace::Sequence::Feature or Das::Segment::Feature), or can be an anonymous array containing a set of related features. In the latter case, the track will attempt to keep the features in the same horizontal band and will not allow any other features to overlap. $track->add_group($group) This behaves the same as add_feature(), but requires that its argument be an array reference containing a list of grouped features. $track->draw($gd,$left,$top) Render the track on a previously-created GD::Image object. The $left and $top arguments indicate the position at which to start rendering. $boxes = $track->boxes($left,$top) @boxes = $track->boxes($left,$top) Return an array of array references indicating glyph coordinates for each of the render features. $left and $top indicate the offset for the track on the image plane. In a scalar context, this method returns an array reference of glyph coordinates. In a list context, it returns the list itself. See Ace::Graphics::Panel->boxes() for the format of the result. ACCESSORS The following accessor methods provide access to various attributes of the track object. Called with no arguments, they each return the current value of the attribute. Called with a single argument, they set the attribute and return its previous value. Note that in most cases you must change attributes before the track's layout() method is called. Accessor Name Description ------------- ----------- scale() Get/set the track scale, measured in pixels/bp lineheight() Get/set the height of each glyph, pixels width() Get/set the width of the track bump() Get/set the bump direction INTERNAL METHODS The following methods are used internally, but may be useful for those implementing new glyph types. $glyphs = $track->layout Layout the features, and return an anonymous array of Ace::Graphics::Glyph objects that have been created and correctly positioned. Because layout is an expensive operation, calling this method several times will return the previously-cached result, ignoring any changes to track attributes. $height = $track->height Invokes layout() and returns the height of the track. $glyphs = $track->glyphs Returns the glyph cache. Returns undef before layout() and a reference to an array of glyphs after layout(). $factory = $track->make_factory(@options) Given a set of options (argument/value pairs), returns a Ace::Graphics::GlyphFactory for use in creating the glyphs with the desired settings. BUGS
Please report them. SEE ALSO
Ace::Sequence,Ace::Sequence::Feature,Ace::Graphics::Panel, Ace::Graphics::GlyphFactory,Ace::Graphics::Glyph AUTHOR
Lincoln Stein <lstein@cshl.org>. Copyright (c) 2001 Cold Spring Harbor Laboratory This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty. perl v5.14.2 2001-09-17 Ace::Graphics::Track(3pm)