.TH xpostit "" "" "X Application"
.PC "X Window System notes"
\fBxpostit [\fI\-toolkitoptions ...\^\fB] [\fI\-options ...\^\fB]\fR
.PP
.B xpostit
provides a mechanism for manipulating on-screen notes.
It provides an electronic analogue of the popular Post-it\(rg gummed papers.
Six sizes of notes can be displayed, edited, and saved to disk files.
In addition, any on-screen note may be resized to any arbitrary size,
either when it is created or later.
.PP
When you first invoke
.B xpostit
it displays a small window that has a plaid background.
This is the control window.
In addition, any note written into the save directory
is placed onto the screen at its last location and in its last
states (normal, iconic, or hidden).
Each note, when created, creates another window.
.PP
.B xpostit
is controlled through the mouse buttons and a menu.
Each note is controlled through buttons (Command widgets).
.SH Options
.B xpostit
recognizes all of the standard X Toolkit command-line options.
It also recognizes the following command-line options:
.IP "\fB\-bs \fIcharacters\fR"
Set the size of the each note's character buffer to
.IR characters .
A note cannot contain more than this number of characters, including newlines.
The default is 1,024.
.IP "\fB\-dir \fIdirectory\fR"
Store saved notes in
.IR directory .
If
.I directory
begins with a `/' it is taken as is;
if it does not begin with a `/',
.B xpostit
assumes it is relative to directory
.BR $HOME .
.I directory
must already exist before notes can be saved into it.
The default directory is
.BR \&.postitnotes .
.IP \fB\-sb\fR
Enable scroll-bars.
If specified,
.B xposit
attaches a scroll bar to each note.
.IP \fB\-sv\fR
Enable save-on-exit.
When specified, this option tells
.B xpostit
to save every note to disk files when exiting.
If not specified,
.B xpostit
saves only those notes that you had specifically saved.
.SH "Widget Usage"
.B xpostit
uses several widget types to construct the objects it uses.
.PP
The control window is a Plaid widget called
.BR Plaid .
.PP
The menu is a pop-up shell called
.B Menu
that contains a SimpleMenu widget.
.PP
Each note is a pop-up shell called
.BR PostItNote .
This contains a Form widget called
.BR Note ,
which in turn contains a Text widget called
.B NoteText
and four Command widgets respectively named
.BR Save ,
.BR Erase ,
.BR Destroy ,
and
.BR Title .
.PP
The confirmation box is a pop-up shell called
.BR Confirm .
This contains a Form widget called
.BR Buttons ,
which it turn contains two Command widgets called
.B Confirm
and
.BR Cancel .
.PP
The title-change box is a pop-up shell called
.BR Title ,
which contains a Dialog widget called
.BR Dialog .
.SH "Resources"
.B xpostit
understands all of the core X Toolkit resource names and classes.
It also understands the names and classes given below, all of which
are of class
.BR XPostit :
.IP \fB\&.bufSize\fR
Set the size of the character buffer used to store a note.
The default is 1,024.
.IP \fB\&.noteDir\fR
Set the path name of the directory in which to store saved notes.
The default is
.BR \&.postitnotes .
.IP \fB\&.saveNotes\fR
Control the state of the save-on-exit option.
The default is
.BR false .
.IP \fB\&.scrollBar\fR
Control placing scroll bars on a note.
The default is
.BR false .
.SH "Actions"
You can rebind the mouse buttons in the
.B Plaid
widget to perform different functions;
to do so, change the widget's translations.
The following describes the actions, and gives their default bindings:
.IP \fBraise()\fR
Raise all notes.
This is bound to the left-mouse button.
.IP \fBlower()\fR
Lower all notes.
This is bound to the middle-mouse button.
.IP \fBshow()\fR
Map all unmapped notes.
This is bound to the middle-mouse button plus the
.B <ctrl>
key.
.IP \fBhide()\fR
Unmap all visible, non-iconic notes on the screen.
This is bound to the left-mouse button plus the
.B <ctrl>
key.
.IP \fBtearoff()\fR
Create a new note.
This is invoked by holding down the left-mouse button and draggin the
mouse cursor off the
.B Plaid
widget.
.IP
.B tearoff()
has an optional paramter that indicates the size of the note to be
created, e.g.,
.DM
	tearoff(3x5)
.DE
.IP
creates a 3\(mu5-inch note.
If no parameter is given,
.B tearoff()
creates a 1.5\(mu2.0-inch note.
.IP \fBquit()\fR
Exit from
.BR xpostit .
This is bound to the `Q' key,
which is equivalent to selecting
.B Exit
from the menu.
.PP
The menu-raising function is performed by calling the actions
.B "XawPositionSimpleMenu(Menu)"
and
.BR "MenuPopup(Menu)" .
It is bound to the right-mouse button.
.SH "The Control Window"
You can perform the following operations from within
.BR xpostit 's
control window:
.IP \(bu 0.3i
Clicking the left-mouse button raises all notes on the screen to the
foreground.
.IP \(bu
Clicking the middle-mouse button lowers all notes on the screen to the
background.
.IP \(bu
Clicking the left-mouse button while holding down the
.B <ctrl>
key brings into view all hidden notes.
.IP \(bu
Clicking the middle-mouse button while holding down the
.B <ctrl>
key hides all notes on the screen that are not iconified.
.IP \(bu
Pressing the left-mouse button in the control window and dragging it outside
the window creates a new note.
.IP \(bu
Pressing the right-mouse button in the control window raises the
.B xpostit
menu.
.IP \(bu
Pressing the `Q' key in the control window exits the program.
.SH "The Menu"
The
.B xpostit
menu provides the following selections:
.IP "\fBCreate 1.5x2 Note\fR"
Create a new note that is
1.5 inches high by two inches wide.
Normally, you must position the window using the mechanism provided by
your window manager.
.IP "\fBCreate 2x3 Note\fR"
Create a new note that is
two inches high by three inches wide.
.IP "\fBCreate 3x3 Note\fR"
Create a new note that is three inches square.
.IP "\fBCreate 3x4 Note\fR"
Create a new note that is three inches tall by four inches wide.
.IP "\fBCreate 3x5 Note\fR"
Create a new note that is three inches tall by five inches wide.
.IP "\fBCreate 4x6 Note\fR"
Create a new note that is four inches tall by six inches wide.
.IP "\fBRaise All Notes\fR"
Raise every note to the foreground.
This is equivalent to pressing the left-mouse button within the control window.
.IP "\fBLower All Notes\fR"
Lower every note to the background.
This is equivalent to pressing the middle-mouse button within the
control window.
.IP "\fBHide All Notes\fR"
Unmap every note, making it disappear from the screen.
This is equivalent to pressing the middle-mouse button in the control window
while holding down the
.B <ctrl>
key.
To hide a single note, use the window manager to send message
.B WM_DELETE_WINDOW
to the note's window.
Under
.BR twm ,
invoke the function
.BR f.delete .
For details, see the Lexicon entry for
.B twm
in the manual for X Windows for \*(CO.
.IP "\fBShow All Notes\fR"
Map every note, making it reappear if it were hidden.
This is equivalent to pressing the left-mouse button in the control window
while holding down the
.B <ctrl>
key.
.IP "\fBSave All Notes\fR"
Save every note to its own disk file in the save directory.
.IP \fBExit\fR
Exit
.BR xpostit .
If you had invoked
.B xpostit
with the command-line option
.BR \-sv ,
or if the resource
.B saveNotes
is
.B true ,
.B xposit
first saves every note to disk before it exits.
.PP
To select an item from the menu,
drag the mouse cursor to that item and release the mouse button.
.SH "The Note"
Each note consists of five parts (plus an optional scroll bar):
a text window where the text of the note is stored,
and four buttons labeled
.Kr Save ,
.Kr Erase ,
.Kr Destroy ,
and
.Kr Title .
.PP
The title of a note,
which most window managers display in both a title bar and the
icon-name area,
is by default the string ``PostItNote #'' followed by a small integer,
the number of the note.
The procedure for changing this title to something more meaningful is
described below.
.PP
To enter text into a note,
simply move the mouse cursor into the text window and start typing.
Because the text window is actually a Text widget,
all the Text widget translations are accepted.
Essentially, this means you can use most of the
EMACS control keys in the window.
In addition,
it understands the various mouse buttons used to manipulate the selections
and cut buffer.
.PP
After you enter text into the note,
you may wish to save the note into a file.
This way, if the machine goes down,
or if you exit
.BR xpostit ,
the note can be restored when you restart
.BR xpostit .
If the resource
.B saveNotes
is true,
.B xpostit
also automatically saves notes if any of the signals
.BR SIGHUP ,
.BR SIGINT ,
.BR SIGTERM ,
or
.BR SIGQUIT .
To save the note to a disk file,
move the mouse cursor to the button labeled
.K Save
and press the left-mouse button; or press the keyboard sequence
.BR <alt-S> .
.B xpostit
saves the note into file \fBnote\fIn\fR in your save directory,
where
.I n
is some sequence number.
.PP
Note that until you have pressed the
.K Save
button, the data stored in the note are not saved on disk and will be lost if
the system goes down or
.B xpostit
exits.
.PP
To erase the entire contents of the text window,
click the
.K Erase
button.
In reply,
.B xpostit
displays a window that contains two buttons, labelled
.K Confirm
and
.Kr Cancel .
If you click the
.Kr Confirm ,
.B xpostit
erases the text.
If, however, you click
.Kr Cancel ,
.B xpostit
aborts the erasure and nothing happens.
Note that erasing the text in the window
does not affect any contents you had saved onto disk,
unless you click the
.K Save
button again.
.PP
Destroying a note differs from erasing in that it erases all text in
the note's window, closes the window, and removes the note's disk file
(should one exist).
To destroy a note, click the
.K Destroy
button.
.B xpostit
replies by displaying the confirmation window, as described above.
.PP
To change the title of a note,
both in any title bar on the window as well as in the icon for the note,
click the
.K Title
button, or type
.BR <alt-T> .
.B xpostit
displays a dialogue box that contains the current title.
Change or modify the title;
then click
.K Okay
to modify the title, or click
.K Cancel
to discard the change.
You can also simply press \*(RT
to change the title, or 
.B <esc>
to cancel the change.
.SH "See Also"
.B
notes,
X
.R
.SH Notes
The sizes of the notes are only as accurate as permitted by the
display device and server.
You should not expect a high degree of accuracy.
.PP
When you change the title of a note,
some window managers (notably
.BR twm )
do not make the change in the icon name,
as they only look up this datum when a window is mapped.
This can be ``fixed'' by unmapping all notes and mapping them again.
.PP
Post-it\(rg
is a registered trademark of 3M Corporation.
.PP
.II "Curry, David A."
.B xpostit
was written by David A. Curry of Purdue University (davy@ecn.purdue.edu).
.PP
Copyright \(co 1991 by David A. Curry.
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation.
The author makes no representations about the suitability of this software for
any purpose.
It is provided ``as is'' without express or implied warranty.
