wxWidgets/demos/poem/wxpoem.txt

122 lines
4.2 KiB
Plaintext
Raw Normal View History

wxPoem 1.0
----------
by Julian Smart
---------------
Fancy a little intellectual stimulation after long hours spent staring
at spreadsheets or reports? Does your brain long for something a little
more fulfilling than Tetris or fiddling with the WIN.INI file? Then you
could go out and buy a poetry book... or alternatively, if you just
can't drag yourself away from the screen, click on the wxPoem icon.
wxPoem is a simple Windows application which picks poems from a file at
random, or finds poems according to a string criterion, and formats them
nicely in a window. A displayed poem can be copied to the Windows clipboard
ready for inclusion in that more imaginative report...
It's small, it's free and it's totally harmless, so far as I know.
No responsibility accepted, though, for any problems it might cause with
your setup.
wxPoem was converted to use the wxWindows toolkit, from the original
WinPoem which received a favourable review from Windows Shareware 500.
Since it now uses wxWindows, wxPoem may be compiled on a variety
of platforms such as X (XView or Motif), Windows and NT.
Files
-----
The main data file is winpoem.dat, and an index file winpoem.idx is
supplied or can be (re)built by deleting winpoem.idx and rerunning
wxPoem. Source code is also provided in source.zip, but wxWindows is
required to build it. The original WinPoem is much leaner (40K
instead of 400K!) and can be compiled under Windows without wxWindows.
Installation
------------
Windows
=======
Copy ctl3dv2.dll to windows\system, and delete the original
ctl3dv2.dll or wxPoem will not run.
wxPoem can be put in the Startup folder in the Program Manager, so that
a random poem will pop up every time Windows is run.
UNIX
====
wxPoem comes in Open Look and Motif versions for the Sun, and a
Linux Open Look version. For other platforms, you will need to
recompile the source.
Use
---
Simply run the program, and a random poem will be displayed.
You can optionally give a filename on the command line, without a suffix
(e.g. winpoem).
The simplest way of operating wxPoem is to keep pressing the space bar
for new poems (or pages for multi-page poems).
Clicking the right mouse button (or selecting the wxPoem Options menu
item from the system menu) gives a choice of the following facilities:
Next poem/page (Page down) Display next poem (or next page)
Previous page (Page up) Display previous page (multi-line poems only)
Search (S) Allows user to enter a search string
Next match (N) Gives next search match
Copy to clipboard Allows poems to be pasted into other applications
Bigger text Increases text size
Smaller text Decreases text size
About wxPoem About wxPoem
Exit (Esc) Quit wxPoem
When wxPoem is closed, the font, text height and window position are
remembered (stored in WIN.INI) for next time. Under X, the values
are not written (since they are stored in .Xdefaults), so you may
want to edit the following resources by hand:
wxPoem.X ; X position
wxPoem.Y ; Y position
wxPoem.FontSize ; Font size in points (default 12)
The data file
-------------
The winpoem.dat file contains poems separated by a #, with optional
@ codes denoting title (@T) author (@A) and page break (@P). Any
unrecognized codes will cause the rest of the line to be ignored, so
the user can add lines (e.g. @S for subject) which will be searched on but
not displayed.
The data file contains a mixture of 20th century and earlier poetry,
subject to copyright constraints. Apologies if any copyrights have
inadvertently been infringed, though I have tried to avoid it.
Implementation
--------------
The original WinPoem program was my `Windows learning application', i.e.
a vehicle for getting stuck into Windows programming, whilst (possibly)
affording others a modicum of amusement. Therefore the code is pretty
ugly. So don't look if you're squeamish!
License
-------
Copyright Julian Smart, released into the public domain, October 1994.
Julian Smart
Artificial Intelligence Applications Institute
University of Edinburgh
80 South Bridge
Einburgh
EH1 1HN
J.Smart@ed.ac.uk