summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/systray.n24
1 files changed, 17 insertions, 7 deletions
diff --git a/doc/systray.n b/doc/systray.n
index ed89e1a..c215c29 100644
--- a/doc/systray.n
+++ b/doc/systray.n
@@ -10,7 +10,7 @@
.SH NAME
systray \- Creates an icon display in the platform-specific system tray.
.SH SYNOPSIS
-\fBtk systray create \fI-image image\fR \fI?-text text\fR? \fI?-button1 callback?\fR \fI?-button3 callback?\fR
+\fBtk systray create \fI\-image image\fR \fI?\-text text\fR? \fI?\-button1 callback?\fR \fI?\-button3 callback?\fR
.sp
\fBtk systray configure \fI?option? ?value option value ...?\fR
.sp
@@ -21,21 +21,25 @@ systray \- Creates an icon display in the platform-specific system tray.
.BE
.SH DESCRIPTION
.PP
+.\" METHOD: create
The \fBtk systray create\fR command creates an icon in the platform-specific
tray. The widget is configured with a Tk image for the icon display, an
optional string for display in a tooltip, and optional callbacks that are
bound to <Button-1> and <Button-3>.
.PP
+.\" METHOD: configure
The \fBtk systray configure\fR command sets one or more options of the systray
icon. Configurable options are the same as for the \fBcreate\fR subcommand. When
a single option name is given, the command returns the current value of this
option. When no option is given this command returns the list of all options and
their current value.
.PP
+.\" METHOD: exists
The \fBtk systray exists\fR command checks whether a systray icon was created.
It returns a boolean.
.PP
- The \fBtk systray destroy\fR command removes the icon from display and
+.\" METHOD: destroy
+The \fBtk systray destroy\fR command removes the icon from display and
deallocates it.
.PP
From a user-interface standpoint, only one icon per interpreter is
@@ -47,14 +51,20 @@ running instance of Wish will allow additional icons to be displayed.
.PP
Here is an example of the \fBtk systray\fR code:
.CS
- image create photo book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw==
- tk systray create -image book -text "tk systray sample" -button1 {puts "Here is the tk systray output"} -button3 {puts "here is alternate output"}
+image create photo book -data \e
+ R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw==
+tk systray create -image book -text "tk systray sample" \e
+ -button1 {puts "Here is the tk systray output"} \e
+ -button3 {puts "here is alternate output"}
.CE
.PP
Here is an example of modifying the \fBtk systray\fR icon:
.CS
- image create photo book_page -data R0lGODlhCwAPAKIAAP//////AMDAwICAgAAA/wAAAAAAAAAAACwAAAAACwAPAAADMzi6CzAugiAgDGE68aB0RXgRJBFVX0SNpQlUWfahQOvSsgrX7eZJMlQMWBEYj8iQchlKAAA7
- tk systray configure -image book_page -text "Updated sample" -button1 {puts "Different output from the tk systray"} -button3 {puts "and more different output from the tk systray"}
+image create photo book_page -data \e
+ R0lGODlhCwAPAKIAAP//////AMDAwICAgAAA/wAAAAAAAAAAACwAAAAACwAPAAADMzi6CzAugiAgDGE68aB0RXgRJBFVX0SNpQlUWfahQOvSsgrX7eZJMlQMWBEYj8iQchlKAAA7
+tk systray configure -image book_page -text "Updated sample" \e
+ -button1 {puts "Different output from the tk systray"} \e
+ -button3 {puts "and more different output from the tk systray"}
.CE
.SH PLATFORM NOTES
.PP
@@ -63,7 +73,7 @@ dependent on the window manager. The "text" flag, which is implemented as
a tooltip, does not always display if the WM does not support such features;
the systray icon itself may not even display with some window managers.
.PP
-On Windows, the Tk image provided in the \fI-image\fR option must be a
+On Windows, the Tk image provided in the \fB\-image\fR option must be a
photo image. On other platforms either a bitmap image or a photo image
may be provided.
.SH KEYWORDS