Main > Free Download Search >

Free prima tutorial 1.20 software for linux

prima tutorial 1.20

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 320
Prima::tutorial 1.20

Prima::tutorial 1.20


Prima::tutorial is an introductory tutorial. more>>
Prima::tutorial is an introductory tutorial.

Programming graphic interfaces is often considered somewhat boring, and not without a cause. It is a small pride in knowing that your buttons and scrollbars work exactly as millions of others buttons and scrollbars do, so whichever GUI toolkit is chosen, it is usually regarded as a tool of small importance, and the less obtrusive, the better.

Given that, and trying to live up to the famous Perl making easy things easy and hard things possible mantra, this manual page is an introductory tutorial meant to show how to write easy things easy. The hard things are explained in the other Prima manual pages ( see Prima ).

<<less
Download (1.4MB)
Added: 2006-08-24 License: Perl Artistic License Price:
1162 downloads
Prima::Utils 1.20

Prima::Utils 1.20


Prima::Utils are miscellanneous routines. more>>
Prima::Utils are miscellanneous routines.

The module contains several helper routines, implemented in both C and perl. Whereas the C-coded parts are accessible only if use Prima; statement was issued prior to the use Prima::Utils invocation, the perl-coded are always available. This makes the module valuable when used without the rest of toolkit code.

API

alarm $TIMEOUT, $SUB, @PARAMS

Calls SUB with PARAMS after TIMEOUT milliseconds.

beep [ FLAGS = mb::Error ]

Invokes the system-depended sound and/or visual bell, corresponding to one of following constants:

mb::Error
mb::Warning
mb::Information
mb::Question

get_gui

Returns one of gui::XXX constants, reflecting the graphic user interface used in the system:
gui::Default
gui::PM
gui::Windows
gui::XLib
gui::OpenLook
gui::Motif

The meaning of the return value is somewhat vague, and might be deprecated in future releases.

get_os

Returns one of apc::XXX constants, reflecting the platfrom. Currently, the list of the supported platforms is:

apc::Os2
apc::Win32
apc::Unix

ceil DOUBLE

Obsolete function.

Returns stdlibs ceil() of DOUBLE

find_image PATH

Converts PATH from perl module notation into a file path, and searches for the file in @INC paths set. If a file is found, its full filename is returned; otherwise undef is returned.

floor DOUBLE

Obsolete function.

Returns stdlibs floor() of DOUBLE

getdir PATH

Reads content of PATH directory and returns array of string pairs, where the first item is a file name, and the second is a file type.

The file type is a string, one of the following:
"fifo" - named pipe
"chr" - character special file
"dir" - directory
"blk" - block special file
"reg" - regular file
"lnk" - symbolic link
"sock" - socket
"wht" - whiteout

This function was implemented for faster directory reading, to avoid successive call of stat for every file.

path [ FILE ]

If called with no parameters, returns path to a directory, usually ~/.prima, that can be used to contain the user settings of a toolkit module or a program. If FILE is specified, appends it to the path and returns the full file name. In the latter case the path is automatically created by File::Path::mkpath unless it already exists.

post $SUB, @PARAMS

Postpones a call to SUB with PARAMS until the next event loop tick.

query_drives_map [ FIRST_DRIVE = "A:" ]

Returns anonymous array to drive letters, used by the system. FIRST_DRIVE can be set to other value to start enumeration from. Some OSes can probe eventual diskette drives inside the drive enumeration routines, so there is a chance to increase responsiveness of the function it might be reasonable to set FIRST_DRIVE to C: string.

If the system supports no drive letters, empty array reference is returned ( unix ).

query_drive_type DRIVE

Returns one of dt::XXX constants, describing the type of drive, where DRIVE is a 1-character string. If there is no such drive, or the system supports no drive letters ( unix ), dt::None is returned.

dt::None
dt::Unknown
dt::Floppy
dt::HDD
dt::Network
dt::CDROM
dt::Memory

sound [ FREQUENCY = 2000, DURATION = 100 ]

Issues a tone of FREQUENCY in Hz with DURATION in milliseconds.

username

Returns the login name of the user. Sometimes is preferred to the perl-provided getlogin ( see "getlogin" in perlfunc ) .

xcolor COLOR

Accepts COLOR string on one of the three formats:

#rgb
#rrggbb
#rrrgggbbb

and returns 24-bit RGB integer value.

<<less
Download (1.4MB)
Added: 2006-08-29 License: Perl Artistic License Price:
1155 downloads
Prima::Buttons 1.20

Prima::Buttons 1.20


Prima::Buttons is a button widgets and grouping widgets. more>>
Prima::Buttons is a button widgets and grouping widgets.

SYNOPSIS

use Prima qw(Application Buttons StdBitmap);

my $window = Prima::MainWindow-> create;
Prima::Button-> new(
owner => $window,
text => Simple button,
pack => {},
);
$window-> insert( Prima::SpeedButton ,
pack => {},
image => Prima::StdBitmap::icon(0),
);

run Prima;

Prima::Buttons provides two separate sets of classes: the button widgets and the grouping widgets. The button widgets include push buttons, check-boxes and radio buttons. The grouping widgets are designed for usage as containers for the check-boxes and radio buttons, however, any widget can be inserted in a grouping widget.

The module provides the following classes:

*Prima::AbstractButton ( derived from Prima::Widget and Prima::MouseScroller )
Prima::Button
Prima::SpeedButton
*Prima::Cluster
Prima::CheckBox
Prima::Radio
Prima::GroupBox ( derived from Prima::Widget )
Prima::RadioGroup ( obsolete )
Prima::CheckBoxGroup ( obsolete )
Note: * - marked classes are abstract.

<<less
Download (1.4MB)
Added: 2006-07-31 License: Perl Artistic License Price:
1184 downloads
Prima::Drawable 1.20

Prima::Drawable 1.20


Prima::Drawable is a 2-D graphic interface. more>>
Prima::Drawable is a 2-D graphic interface.

SYNOPSIS

if ( $object-> isa(Prima::Drawable)) {
$object-> begin_paint;
$object-> color( cl::Black);
$object-> line( 100, 100, 200, 200);
$object-> ellipse( 100, 100, 200, 200);
$object-> end_paint;
}

Prima::Drawable is a descendant of Prima::Component. It provides access to the object-bound graphic context and canvas through its methods and properties. The Prima::Drawable descendants Prima::Widget, Prima::Image, Prima::DeviceBitmap and Prima::Printer are backed by system-dependent routines that allow drawing and painting on the system objects.

<<less
Download (1.4MB)
Added: 2006-07-28 License: Perl Artistic License Price:
1183 downloads
Prima::TextView 1.20

Prima::TextView 1.20


Prima::TextView is a rich text browser widget. more>>
Prima::TextView is a rich text browser widget.

Prima::TextView accepts blocks of formatted text, and provides basic functionality - scrolling and user selection. The text strings are stored as one large text chunk, available by the ::text and ::textRef properties. A block of a formatted text is an array with fixed-length header and the following instructions.

A special package tb:: provides the block constants and simple functions for text block access.

Capabilities

Prima::TextView is mainly the text block functions and helpers. It provides function for wrapping text block, calculating block dimensions, drawing and converting coordinates from (X,Y) to a block position. Prima::TextView is centered around the text functionality, and although any custom graphic of arbitrary complexity can be embedded in a text block, the internal coordinate system is used ( TEXT_OFFSET, BLOCK ), where TEXT_OFFSET is a text offset from the beginning of a block and BLOCK is an index of a block.

The functionality does not imply any text layout - this is up to the class descendants, they must provide they own layout policy. The only policy Prima::TextView requires is that blocks BLK_TEXT_OFFSET field must be strictly increasing, and the block text chunks must not overlap. The text gaps are allowed though.

A text block basic drawing function includes change of color, backColor and font, and the painting of text strings. Other types of graphics can be achieved by supplying custom code.

<<less
Download (1.4MB)
Added: 2006-07-31 License: Perl Artistic License Price:
1183 downloads
Prima::Grids 1.20

Prima::Grids 1.20


Prima::Grids is a Perl module that contains grid widgets. more>>
Prima::Grids is a Perl module that contains grid widgets.

SYNOPSIS

use Prima::Grids;

$grid = Prima::Grid-> create(
cells => [
[qw(1.First 1.Second 1.Third)],
[qw(2.First 2.Second 2.Third)],
[qw(3.First 3.Second 3.Third)],
],
onClick => sub {
print $_[0]-> get_cell_text( $_[0]-> focusedCell), " is selectedn";
}
);

The module provides classes for several abstraction layers of grid representation. The classes hierarchy is as follows:

AbstractGridViewer
AbstractGrid
GridViewer
Grid

The root class, Prima::AbstractGridViewer, provides common interface, while by itself it is not directly usable. The main differences between classes are centered around the way the cell data are stored. The simplest organization of a text-only cell, provided by Prima::Grid, stores data as a two-dimensional array of text scalars. More elaborated storage and representation types are not realized, and the programmer is urged to use the more abstract classes to derive own mechanisms. To organize an item storage, different from Prima::Grid, it is usually enough to overload either the Stringify, Measure, and DrawCell events, or their method counterparts: get_cell_text, columnWidth, rowHeight, and draw_items.

The grid widget is designed to contain cells of variable extents, of two types, normal and indent. The indent rows and columns are displayed in grid margins, and their cell are drawn with distinguished colors. An example use for a bottom indent row is a sum row in a spreadsheet application; the top indent row can be used for displaying columns headers. The normal cells can be selected by the user, scrolled, and selected. The cell selection can only contain rectangular areas, and therefore is operated with two integer pairs with the beginning and the end of the selection.

The widget operates in two visual scrolling modes; when the space allows, the scrollbars affect the leftmost and the topmost cell. When the widget is not large enough to accommodate at least one cell and all indent cells, the layout is scrolled pixel-wise. These modes are named cell and pixel, after the scrolling units.

The widget allows the interactive changing of cell widths and heights by dragging the grid lines between the cells.

Prima::AbstractGridViewer

Prima::AbstractGridViewer, the base for all grid widgets in the module, provides interface to generic grid browsing functionality, plus functionality for text-oriented grids. The class is not usable directly.

Prima::AbstractGridViewer is a descendant of Prima::GroupScroller, and some properties are not described here. See "Prima::GroupScroller" in Prima::IntUtils.

<<less
Download (1.4MB)
Added: 2006-08-24 License: Perl Artistic License Price:
1156 downloads
Album::Tutorial 1.05

Album::Tutorial 1.05


Album::Tutorial is a Perl module on how to use the Album program. more>>
Album::Tutorial is a Perl module on how to use the Album program.

SYNOPSIS

This tutorial describes the basic use of the Album program to create and maintain browser based photo albums.

Getting started

To get started, create a new directory and cd to it. Create a subdirectory large and put some pictures there. If you have installed the album tool in your execution path, you can now execute it as follows:

$ album -v
No info.dat, adding images from large
info.dat: Cannot update (does not exist)
Number of entries = 7 (7 added)
mkdir thumbnails
mkdir icons
mkdir css
Creating icons: first-gr.png first.png ... sound.png movie.jpg
Creating style sheets: common.css index.css ... journal.css
im023.jpg: thumbnail OK
im024.jpg: thumbnail OK
im025.jpg: thumbnail OK
im026.jpg: thumbnail OK
im027.jpg: thumbnail OK
im028.jpg: thumbnail OK
im029.jpg: thumbnail OK
Creating pages for 7 images
(Needed to write 7 image pages)
Creating pages for 1 index
(Needed to write 1 index page)

Your results will vary, but be similar to this example run. What you can see is that album found 7 images in the large directory, created thumbnails, icons and css directories, created thumbnails by resizing the images, and finally created the HTML pages. You can inspect your first photo album by opening file index.html with your favorite browser. You can click on any image to see the larger version. Navigation buttons are provided to the left of the image.

It is interesting to run album again:

$ album -v
No info.dat, adding images from large
info.dat: Cannot update (does not exist)
Number of entries = 7 (7 added)
.......[7]
Creating pages for 7 images
(No image pages needed updating)
Creating pages for 1 index
(No index pages needed updating)

album tries to avoid doing unnecessary work as much as possible. In this case, all thumbnails and image and index pages are up to date. The line of periods shows progress, one period for each image processed.

<<less
Download (0.049MB)
Added: 2006-11-17 License: Perl Artistic License Price:
1071 downloads
IPTables-tutorial 1.2.2

IPTables-tutorial 1.2.2


IPTables-tutorials aim is to explain iptables in a complete and simple way. more>>
IPTables-tutorials aim is to explain iptables in a complete and simple way. The iptables-tutorial is currently rather stable, and contains information on all the currently available matches and targets (in kernel), as well as a couple of complete example scripts and explanations. It contains a complete section on iptables syntax, as well as other interesting commands such as iptables-save and iptables-restore.

The tutorial has recently been under heavy scrutiny and updating, as can be seen in this, the latest version of the tutorial. It is now also available in bookform from Lulu.com. If you feel like contributing or donating to the author of this tutorial, please do buy the book! Thank you!

If you need help, you are better off by asking the netfilter mailing list which you can reach at netfilter at lists.netfilter.org. For more information on this, visit the netfilter mailinglist page. You may also contact the linuxsecurity mailing list at security-discuss AT linuxsecurity dotcom. Both are fairly large, and should be able to help you much much better than I can.

<<less
Download (9.0MB)
Added: 2006-11-22 License: (FDL) GNU Free Documentation License Price:
669 downloads
yagg::Tutorial 1.4001

yagg::Tutorial 1.4001


yagg::Tutorial is a Perl module that contains a tutorial for yagg. more>>
yagg::Tutorial is a Perl module that contains a tutorial for yagg.

SYNOPSIS

# To use the generator
./yagg -m nonterminals.yg terminals.lg
./output/progs/generate 5

This tutorial will show you how to use yagg, by way of two examples. In the first example, we create a simple logical expression generator from scratch. In the second example, we create a more sophisticated logical expression generator from existing parser/lexer input files, such as those used by YACC/Bison and LEX/FLEX. These examples, plus another more sophisticated fault tree generator are included with the distribution in the examples/ directory.

It is assumed that the reader knows a little about formal grammars. Ideally, the reader would have some experience writing grammars for input to parser generators like YACC and Bison.

<<less
Download (0.21MB)
Added: 2007-07-05 License: Perl Artistic License Price:
845 downloads
Imager::Tutorial 0.54

Imager::Tutorial 0.54


Imager::Tutorial is an introduction to Imager. more>>
Imager::Tutorial is an introduction to Imager.

Before you start

If you have the necessary knowledge, install the image format libraries you want Imager image file support for, and Imager itself, otherwise arrange to have it done.
You will also want some sort of image viewer tool, whether an image editor like Photoshop or the GIMP, or a web browser.

Hello Boxes! - A Simple Start

As with any perl program its useful to start with a #! line, and to enable strict mode:

#!/usr/bin/perl -w
# you might to use warnings; instead of the -w above
use strict;

These lines will be omitted in further examples.

As with any module, you need to load it:

use Imager;

Now create a image to draw on:

my $image = Imager->new(xsize => 100, ysize => 100);

and draw a couple of filled rectangles on it:

$image->box(xmin => 0, ymin => 0, xmax => 99, ymax => 99,
filled => 1, color => blue);
$image->box(xmin => 20, ymin => 20, xmax => 79, ymax => 79,
filled => 1, color => green);

Since the first box fills the whole image, it can be simplified to:

$image->box(filled => 1, color => blue);

and save it to a file:

$image->write(file=>tutorial1.ppm)
or die Cannot save tutorial1.ppm: , $image->errstr;

So our completed program is:

use Imager;

my $image = Imager->new(xsize => 100, ysize => 100);

$image->box(filled => 1, color => blue);
$image->box(xmin => 20, ymin => 20, xmax => 79, ymax => 79,
filled => 1, color => green);

$image->write(file=>tutorial1.ppm)
or die Cannot save tutorial1.ppm: , $image->errstr;

<<less
Download (0.83MB)
Added: 2006-10-27 License: Perl Artistic License Price:
1094 downloads
Tkx::Tutorial 1.04

Tkx::Tutorial 1.04


Tkx::Tutorial Perl module contains a tutorial about how to use Tkx. more>>
Tkx::Tutorial Perl module contains a tutorial about how to use Tkx.

Tk is a toolkit that allows you to create applications with graphical interfaces for Windows, Mac OS X and X11. The Tk toolkit is native to the Tcl programming language, but its ease of use and cross-platform availability has made it the GUI toolkit of choice for many other dynamic languages as well.

Tkx is a Perl module that makes the Tk toolkit available to Perl programs. By loading the Tkx module Perl programs can create windows and fill them with text, images, buttons and other controls that make up the user interface of the application.

Hello World

Lets start with the mandatory exercise of creating an application that greats the world. Here we make the application window contain a single button which will shut down the application if clicked. The code to make this happen is:

use Tkx;

Tkx::button(".b",
-text => "Hello, world",
-command => sub { Tkx::destroy("."); },
);
Tkx::pack(".b");

Tkx::MainLoop()

Save this to a file called hello.pl and then run perl hello.pl to start up the application. A window with the text "Hello, world" should appear on your screen.
After the Tkx module has been loaded by the use Tkx statement the application will show an empty window called ".". We create a button with the name ".b" and tell the window to display the button with the call to Tkx::pack(). After the layout of the window has been set up we need to pass control back to Tk so that it can draw the window and invoke our callback if the button is clicked. This is achieved by the Tkx::MainLoop() call at the end. Clicking the button will invoke the subroutine registered with the -command option of the button. In this case the callback simply destroys the window, which in turn will terminate the application.

<<less
Download (0.024MB)
Added: 2007-07-21 License: Perl Artistic License Price:
836 downloads
Prima::image-load 1.20

Prima::image-load 1.20


Prima::image-load is a Perl module using image subsystem. more>>
Prima::image-load is a Perl module using image subsystem.

Simple loading

Simplest case, loading a single image would look like:

my $x = Prima::Image-> load( filename.duf);
die "$@" unless $x;

Image functions can work being either invoked from package, or from existing Prima::Image object, in latter case the caller object itself is changing. The code above could be also written as

my $x = Prima::Image-> create;
die "$@" unless $x-> load( filename.duf);

In both cases $x contains image data upon success. Error is returned into $@ variable ( see perldoc perlvar for more info).

<<less
Download (1.4MB)
Added: 2006-10-27 License: Perl Artistic License Price:
1093 downloads
RiveScript::Tutorial 1.02

RiveScript::Tutorial 1.02


RiveScript::Tutorial is a beginners guide to creating their first RiveScript brain. more>>
RiveScript::Tutorial is a beginners guide to creating their first RiveScript brain.

This tutorial outlines the various capabilities of the RiveScript specification and offers some recommended pointers for creating a well-formed RiveScript brain. What you do with this knowledge is up to you; be creative!

Be sure to skim over the RiveScript manpage first, because this tutorial jumps right in to using the various RiveScript commands without always explaining what each of them do.

A Simple RiveScript Interpreter

Here is a simple Perl script for running a RiveScript interpreter. This assumes that the brains RS files will be stored in a directory called "tutorial", local to the Perl script. Youd want to edit certain parameters in this code if you see fit.

#!/usr/bin/perl -w

use strict;
use warnings;
use RiveScript;

# Create the RiveScript interpreter.
my $rive = new RiveScript();

# Load the RS tutorial brain.
$rive->loadDirectory ("./tutorial");

# Sort them.
$rive->sortReplies;

# Go into a chatting loop.
while (1) {
print "User> ";
my $msg = ;
chomp $msg;

# Grab a reply.
my @reply = $rive->reply (user,$msg);
print " Bot> $_n" foreach(@reply);
}

<<less
Download (0.20MB)
Added: 2006-12-06 License: Perl Artistic License Price:
1064 downloads
Prima::PodView 1.20

Prima::PodView 1.20


Prima::PodView is Perl module for POD browser widget. more>>
Prima::PodView is Perl module for POD browser widget.

SYNOPSIS

use Prima qw(Application);
use Prima::PodView;

my $window = Prima::MainWindow-> create;
my $podview = $window-> insert( Prima::PodView,
pack => { fill => both, expand => 1 }
);
$podview-> open_read;
$podview-> read("=head1 NAMEnnIm also a pod!nn");
$podview-> close_read;

run Prima;

Prima::PodView contains a formatter ( in terms of perlpod ) and viewer of POD content. It heavily employs its ascendant class Prima::TextView, and is in turn base for the toolkits default help viewer Prima::HelpViewer.

<<less
Download (1.4MB)
Added: 2006-09-01 License: Perl Artistic License Price:
1150 downloads
Prima::Printer 1.20

Prima::Printer 1.20


Prima::Printer is a system printing services. more>>
Prima::Printer is a system printing services.

SYNOPSIS

my $printer = $::application-> get_printer;
print "printing to ", $printer->printer, "...n";
$p-> options( Orientation => Landscape, PaperSize => A4);
if ( $p-> begin_doc) {
$p-> bar( 0, 0, 100, 100);
print "another page...n";
$p-> new_page;
$p-> ellipse( 100, 100, 200, 200);
(time % 1) ? # depending on the moon phase, print it or cancel out
$p-> end_doc :
$p-> abort_doc;
} else {
print "failedn";
}

Prima::Printer is a descendant of Prima::Drawable class. It provides access to the system printing services, where available. If the system provides no graphics printing, the default PostScript (tm) interface module Prima::PS::Printer is used instead.

<<less
Download (1.4MB)
Added: 2006-07-31 License: Perl Artistic License Price:
1180 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5