Unix and Linux Discussions Tagged with chat |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
2 |
6,334 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
10,058 |
What is on Your Mind? |
|
|
|
23 |
8,786 |
What is on Your Mind? |
|
|
|
48 |
21,296 |
What is on Your Mind? |
|
|
|
0 |
10,093 |
What is on Your Mind? |
|
|
|
17 |
14,320 |
Web Development |
|
|
|
2 |
7,670 |
Web Development |
|
|
|
1 |
2,570 |
What is on Your Mind? |
|
|
|
12 |
3,230 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
1,450 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
3,040 |
IP Networking |
|
|
|
3 |
6,955 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
2,633 |
Linux |
|
|
|
3 |
8,103 |
IP Networking |
|
|
|
1 |
19,627 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
2,907 |
IP Networking |
|
|
|
1 |
2,598 |
Shell Programming and Scripting |
|
|
|
0 |
1,137 |
Software Releases - RSS News |
|
|
|
0 |
1,075 |
Software Releases - RSS News |
|
|
|
0 |
1,196 |
Software Releases - RSS News |
|
|
|
0 |
1,171 |
Software Releases - RSS News |
|
|
|
1 |
2,760 |
Programming |
|
|
|
2 |
3,865 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,614 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
2,969 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
5,370 |
Software Releases - RSS News |
|
|
|
0 |
3,843 |
Software Releases - RSS News |
|
|
|
0 |
3,884 |
Software Releases - RSS News |
|
|
|
0 |
949 |
Software Releases - RSS News |
|
|
|
0 |
4,942 |
Software Releases - RSS News |
|
|
|
0 |
927 |
Software Releases - RSS News |
|
|
|
0 |
1,641 |
Software Releases - RSS News |
|
|
|
0 |
1,188 |
Software Releases - RSS News |
|
|
|
0 |
2,208 |
Software Releases - RSS News |
|
|
|
0 |
4,348 |
Forum Support Area for Unregistered Users & Account Problems |
|
|
|
0 |
2,220 |
UNIX and Linux RSS News |
|
|
|
1 |
3,454 |
Linux |
|
|
|
0 |
1,286 |
Software Releases - RSS News |
|
|
|
0 |
1,967 |
Software Releases - RSS News |
|
|
|
0 |
1,334 |
Software Releases - RSS News |
chatwidget(3tk) Composite widget for chat applications chatwidget(3tk)
__________________________________________________________________________________________________________________________________________________
NAME
chatwidget - Provides a multi-paned view suitable for display of chat room or irc channel information
SYNOPSIS
package require Tk 8.5
package require chatwidget ?1.0.0?
::chatwidget::chatwidget path ?options?
$widget topic command args
$widget name nick args
$widget message text args
$widget hook command args
$widget names args
$widget entry args
$widget chat args
_________________________________________________________________
DESCRIPTION
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.
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.
COMMANDS
::chatwidget::chatwidget path ?options?
Create a new chatwidget using the Tk window id path. Any options provided are currently passed directly to the main chat text wid-
get.
WIDGET COMMANDS
$widget topic command args
The chat widget can display a topic string, for instance the topic or name given to a multi-user chatroom or irc channel.
show Enable display of the topic.
hide Disable display of the topic
set topic
Set the topic text to topic.
$widget name nick args
Control the names and tags associated with names.
list ?-full?
Returns a list of all the user names from the names view. If -full 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 exam-
ine any application specific options that may be applied to a nick when using the add command.
add nick ?options?
delete nick
$widget message text args
Add messages to the display. options are -nick, -time, -type, -mark -tags
$widget hook command args
Manage hooks. add (message, post names_group, names_nick, chatstate), remove, run
$widget names args
Passthrough to the name display text widget. See the text widget manual for all available commands. The chatwidget provides two
additional commands show and hide which are used to control the display of this element in the widget.
$widget entry args
Passthrough to the entry text widget. See the text widget manual for all available commands.
$widget chat args
Passthrough to the chat text widget. See the text widget manual for all available commands.
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
A more extensive example is available by examining the code for the picoirc program in the tclapps repository which ties the tcllib picoirc
package to this chatwidget package to create a simple irc client.
SEE ALSO
text(3tk)
KEYWORDS
chat, chatwidget, composite widget, irc, mega-widget, widget
chatwidget 1.0.0 chatwidget(3tk)