/usr/share/doc/tklib/html/chatwidget.html is in tklib 0.6-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | <html><head>
<title>chatwidget - Composite widget for chat applications</title>
<style type="text/css"><!--
HTML {
background: #FFFFFF;
color: black;
}
BODY {
background: #FFFFFF;
color: black;
}
DIV.doctools {
margin-left: 10%;
margin-right: 10%;
}
DIV.doctools H1,DIV.doctools H2 {
margin-left: -5%;
}
H1, H2, H3, H4 {
margin-top: 1em;
font-family: sans-serif;
font-size: large;
color: #005A9C;
background: transparent;
text-align: left;
}
H1.title {
text-align: center;
}
UL,OL {
margin-right: 0em;
margin-top: 3pt;
margin-bottom: 3pt;
}
UL LI {
list-style: disc;
}
OL LI {
list-style: decimal;
}
DT {
padding-top: 1ex;
}
UL.toc,UL.toc UL, UL.toc UL UL {
font: normal 12pt/14pt sans-serif;
list-style: none;
}
LI.section, LI.subsection {
list-style: none;
margin-left: 0em;
text-indent: 0em;
padding: 0em;
}
PRE {
display: block;
font-family: monospace;
white-space: pre;
margin: 0%;
padding-top: 0.5ex;
padding-bottom: 0.5ex;
padding-left: 1ex;
padding-right: 1ex;
width: 100%;
}
PRE.example {
color: black;
background: #f5dcb3;
border: 1px solid black;
}
UL.requirements LI, UL.syntax LI {
list-style: none;
margin-left: 0em;
text-indent: 0em;
padding: 0em;
}
DIV.synopsis {
color: black;
background: #80ffff;
border: 1px solid black;
font-family: serif;
margin-top: 1em;
margin-bottom: 1em;
}
UL.syntax {
margin-top: 1em;
border-top: 1px solid black;
}
UL.requirements {
margin-bottom: 1em;
border-bottom: 1px solid black;
}
--></style>
</head>
<! -- Generated from file 'chatwidget.man' by tcllib/doctools with format 'html'
-->
<! -- CVS: $Id$ chatwidget.n
-->
<body><div class="doctools">
<h1 class="title">chatwidget(3tk) 1.0.0 chatwidget "Composite widget for chat applications"</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>chatwidget - Provides a multi-paned view suitable for display of chat room or irc channel information</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">COMMANDS</a></li>
<li class="section"><a href="#section3">WIDGET COMMANDS</a></li>
<li class="section"><a href="#section4">EXAMPLE</a></li>
<li class="section"><a href="#see-also">See Also</a></li>
<li class="section"><a href="#keywords">Keywords</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tk 8.5</b></li>
<li>package require <b class="pkgname">chatwidget <span class="opt">?1.0.0?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::chatwidget::chatwidget</b> <i class="arg">path</i> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#2"><b class="cmd">$widget</b> topic <i class="arg">command</i> <i class="arg">args</i></a></li>
<li><a href="#3"><b class="cmd">$widget</b> name <i class="arg">nick</i> <i class="arg">args</i></a></li>
<li><a href="#4"><b class="cmd">$widget</b> message <i class="arg">text</i> <i class="arg">args</i></a></li>
<li><a href="#5"><b class="cmd">$widget</b> hook <i class="arg">command</i> <i class="arg">args</i></a></li>
<li><a href="#6"><b class="cmd">$widget</b> names <i class="arg">args</i></a></li>
<li><a href="#7"><b class="cmd">$widget</b> entry <i class="arg">args</i></a></li>
<li><a href="#8"><b class="cmd">$widget</b> chat <i class="arg">args</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="section"><h2><a name="section1">Description</a></h2>
<p>This is a composite widget designed to simplify the construction of
chat applications. The widget contains display areas for chat
messages, user names and topic and an entry area. It automatically
handles colourization of messages per nick and manages nick
completion. A system of hooks permit the application author to adjust
display features. The main chat display area may be split for use
displaying history or for searching.</p>
<p>The widget is made up of a number of text widget and panedwindow
widgets so that the size of each part of the display may be adjusted
by the user. All the text widgets may be accessed via widget
passthrough commands if fine adjustment is required. The topic and
names sections can also be hidden if desired.</p>
</div>
<div id="section2" class="section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="definitions">
<dt><a name="1"><b class="cmd">::chatwidget::chatwidget</b> <i class="arg">path</i> <span class="opt">?<i class="arg">options</i>?</span></a></dt>
<dd><p>Create a new chatwidget using the Tk window id <i class="arg">path</i>. Any options
provided are currently passed directly to the main chat text widget.</p></dd>
</dl>
</div>
<div id="section3" class="section"><h2><a name="section3">WIDGET COMMANDS</a></h2>
<dl class="definitions">
<dt><a name="2"><b class="cmd">$widget</b> topic <i class="arg">command</i> <i class="arg">args</i></a></dt>
<dd><p>The chat widget can display a topic string, for instance the topic or
name given to a multi-user chatroom or irc channel.</p>
<dl class="commands">
<dt><b class="cmd">show</b></dt>
<dd><p>Enable display of the topic.</p></dd>
<dt><b class="cmd">hide</b></dt>
<dd><p>Disable display of the topic</p></dd>
<dt><b class="cmd">set <i class="arg">topic</i></b></dt>
<dd><p>Set the topic text to <i class="arg">topic</i>.</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">$widget</b> name <i class="arg">nick</i> <i class="arg">args</i></a></dt>
<dd><p>Control the names and tags associated with names.</p>
<dl class="commands">
<dt><b class="cmd">list <span class="opt">?<i class="arg">-full</i>?</span></b></dt>
<dd><p>Returns a list of all the user names from the names view. If <i class="arg">-full</i> is given then the list returned is a list of lists where each
sublist is made up of the nick followed by any options that have been
set on this nick entry. This may be used to examine any application
specific options that may be applied to a nick when using the
<b class="cmd">add</b> command.</p></dd>
<dt><b class="cmd">add <i class="arg">nick</i> <span class="opt">?<i class="arg">options</i>?</span></b></dt>
<dd></dd>
<dt><b class="cmd">delete <i class="arg">nick</i></b></dt>
<dd></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">$widget</b> message <i class="arg">text</i> <i class="arg">args</i></a></dt>
<dd><p>Add messages to the display. options are -nick, -time, -type, -mark
-tags</p></dd>
<dt><a name="5"><b class="cmd">$widget</b> hook <i class="arg">command</i> <i class="arg">args</i></a></dt>
<dd><p>Manage hooks. add (message, post names_group, names_nick, chatstate), remove, run</p></dd>
<dt><a name="6"><b class="cmd">$widget</b> names <i class="arg">args</i></a></dt>
<dd><p>Passthrough to the name display text widget. See the <b class="cmd">text</b> widget manual
for all available commands. The chatwidget provides two additional
commands <b class="cmd">show</b> and <b class="cmd">hide</b> which are used to control the
display of this element in the widget.</p></dd>
<dt><a name="7"><b class="cmd">$widget</b> entry <i class="arg">args</i></a></dt>
<dd><p>Passthrough to the entry text widget. See the <b class="cmd">text</b> widget manual
for all available commands.</p></dd>
<dt><a name="8"><b class="cmd">$widget</b> chat <i class="arg">args</i></a></dt>
<dd><p>Passthrough to the chat text widget. See the <b class="cmd">text</b> widget manual for
all available commands.</p></dd>
</dl>
</div>
<div id="section4" class="section"><h2><a name="section4">EXAMPLE</a></h2>
<pre class="example">
chatwidget::chatwidget .chat
proc speak {w msg} {$w message $msg -nick user}
.chat hook add post [list speak .chat]
pack .chat -side top -fill both -expand 1
.chat topic show
.chat topic set "Chat widget demo"
.chat name add "admin" -group admin
.chat name add "user" -group users -color tomato
.chat message "Chatwidget ready" -type system
.chat message "Hello, user" -nick admin
.chat message "Hello, admin" -nick user
</pre>
<p>A more extensive example is available by examining the code for the picoirc
program in the tclapps repository which ties the tcllib <b class="package">picoirc</b> package to this
<b class="package">chatwidget</b> package to create a simple irc client.</p>
</div>
<div id="see-also" class="section"><h2><a name="see-also">See Also</a></h2>
<p>text(3tk)</p>
</div>
<div id="keywords" class="section"><h2><a name="keywords">Keywords</a></h2>
<p>chat, chatwidget, composite widget, irc, mega-widget, widget</p>
</div>
</div></body></html>
|