| 1 |
============== |
|---|
| 2 |
PyGtkImageView |
|---|
| 3 |
============== |
|---|
| 4 |
|
|---|
| 5 |
Copyright © 2007 Björn Lindqvist <bjourne@gmail.com> |
|---|
| 6 |
|
|---|
| 7 |
This is the README file for PyGtkImageView. |
|---|
| 8 |
|
|---|
| 9 |
PyGtkImageView is the Python language binding for the GTK widget |
|---|
| 10 |
GtkImageView. |
|---|
| 11 |
|
|---|
| 12 |
Compilation |
|---|
| 13 |
=========== |
|---|
| 14 |
|
|---|
| 15 |
Compilation requires that gtkimageview and pygtk are installed. And |
|---|
| 16 |
then: |
|---|
| 17 |
|
|---|
| 18 |
$ ./configure --prefix=/some/prefix |
|---|
| 19 |
$ make |
|---|
| 20 |
$ make install |
|---|
| 21 |
|
|---|
| 22 |
Note that you should have gtkimageview-1.5.0 installed. Older versions |
|---|
| 23 |
may also work, but there is no guarantee. |
|---|
| 24 |
|
|---|
| 25 |
Example |
|---|
| 26 |
======= |
|---|
| 27 |
|
|---|
| 28 |
import gtkimageview |
|---|
| 29 |
import gtk |
|---|
| 30 |
from gtk import gdk |
|---|
| 31 |
|
|---|
| 32 |
view = gtkimageview.ImageView() |
|---|
| 33 |
view.set_pixbuf(gdk.pixbuf_new_from_file("yourimage.png")) |
|---|
| 34 |
win = gtk.Window() |
|---|
| 35 |
win.add(view) |
|---|
| 36 |
win.show_all() |
|---|
| 37 |
gtk.main() |
|---|
| 38 |
|
|---|
| 39 |
More example code exists in the ./tests/demo??.py files. |
|---|
| 40 |
|
|---|
| 41 |
Tests |
|---|
| 42 |
===== |
|---|
| 43 |
Unit tests exist in the directory ./tests. To run them you must have |
|---|
| 44 |
nosetests installed. Run the tests by typing: |
|---|
| 45 |
|
|---|
| 46 |
nosetests -w tests |
|---|
| 47 |
|
|---|
| 48 |
in the root directory. The package must first be installed for this to |
|---|
| 49 |
work. |
|---|
| 50 |
|
|---|
| 51 |
Documentation |
|---|
| 52 |
============= |
|---|
| 53 |
Documentation can be found in the ./docs directory. HTML and PDF |
|---|
| 54 |
documentation is generated by the bash script makedocs.sh. For it to |
|---|
| 55 |
work, you need to have: |
|---|
| 56 |
|
|---|
| 57 |
* epydoc 3.0 beta (install from source) |
|---|
| 58 |
* latex (the packages tetex-bin and tetex-extra on Ubuntu) |
|---|
| 59 |
* docutils |
|---|
| 60 |
|
|---|
| 61 |
Then just run the script from the ./docs dir: |
|---|
| 62 |
|
|---|
| 63 |
./makedocs.sh |
|---|
| 64 |
|
|---|
| 65 |
The source for the documentation is found in the |
|---|
| 66 |
./docs/gtkimageview.py file. |
|---|
| 67 |
|
|---|
| 68 |
Download & Links |
|---|
| 69 |
================ |
|---|
| 70 |
Check it out from Subversion: |
|---|
| 71 |
|
|---|
| 72 |
svn co http://publicsvn.bjourne.webfactional.com/pygtkimageview |
|---|
| 73 |
|
|---|
| 74 |
Or download the latest release tarball: |
|---|
| 75 |
|
|---|
| 76 |
http://trac.bjourne.webfactional.com/attachment/wiki/WikiStart/pygtkimageview-1.1.0.tar.gz?format=raw |
|---|
| 77 |
|
|---|
| 78 |
Project website: http://trac.bjourne.webfactional.com |
|---|
| 79 |
|
|---|
| 80 |
Announcement |
|---|
| 81 |
============ |
|---|
| 82 |
This is the announcement to post to python-announce-list@python.org |
|---|
| 83 |
and pygtk@daa.com.au. |
|---|
| 84 |
|
|---|
| 85 |
Subject: [ANN] PyGtkImageView 1.1.0 -- Image viewer widget for PyGTK |
|---|
| 86 |
|
|---|
| 87 |
I'm pleased to finally announce PyGtkImageView 1.1.0! |
|---|
| 88 |
|
|---|
| 89 |
Description |
|---|
| 90 |
----------- |
|---|
| 91 |
GtkImageView is a simple image viewer widget for GTK+. Similar to the |
|---|
| 92 |
image viewer panes in gThumb or Eye of Gnome. It makes writing image |
|---|
| 93 |
viewing and editing applications easy. Among its features are: |
|---|
| 94 |
|
|---|
| 95 |
* Mouse and keyboard zooming. |
|---|
| 96 |
* Scrolling and dragging. |
|---|
| 97 |
* Adjustable interpolation. |
|---|
| 98 |
* Fullscreen mode. |
|---|
| 99 |
* GIF animation support. |
|---|
| 100 |
* Ability to make selections. |
|---|
| 101 |
* Extensible using a tool system. |
|---|
| 102 |
|
|---|
| 103 |
PyGtkImageView is the Python bindings for GtkImageView. |
|---|
| 104 |
|
|---|
| 105 |
PyGtkImageView Download |
|---|
| 106 |
----------------------- |
|---|
| 107 |
Subversion: svn co http://publicsvn.bjourne.webfactional.com/pygtkimageview |
|---|
| 108 |
Tarball: http://trac.bjourne.webfactional.com/attachment/wiki/WikiStart/pygtkimageview-1.1.0.tar.gz |
|---|
| 109 |
API doc: http://trac.bjourne.webfactional.com/chrome/common/pygtkimageview-docs/ |
|---|
| 110 |
PDF: http://trac.bjourne.webfactional.com/attachment/wiki/WikiStart/pygtkimageview-1.1.0-api.pdf |
|---|
| 111 |
|
|---|
| 112 |
Project website: http://trac.bjourne.webfactional.com |
|---|
| 113 |
|
|---|
| 114 |
Examples |
|---|
| 115 |
-------- |
|---|
| 116 |
Here is the canonical example for using the widget:: |
|---|
| 117 |
|
|---|
| 118 |
import gtk |
|---|
| 119 |
import gtk.gdk |
|---|
| 120 |
import gtkimageview |
|---|
| 121 |
|
|---|
| 122 |
view = gtkimageview.ImageView() |
|---|
| 123 |
scroll = gtkimageview.ImageScrollWin(view) |
|---|
| 124 |
|
|---|
| 125 |
# Where "box" is a gtk.Box already part of your layout. |
|---|
| 126 |
box.pack_start(scroll) |
|---|
| 127 |
pixbuf = gtk.gdk.pixbuf_new_from_file("someimage.png") |
|---|
| 128 |
view.set_pixbuf(pixbuf) |
|---|
| 129 |
|
|---|