NAME
gk_views - A controller for a group graphical environment.
SYNOPSIS
- gk_views pathName groupId
- gk_viewsGetCoords groupId userId
- gk_viewsSetCoords groupId userId coords
- gk_viewsGetAttribute groupId userId attribute
- gk_viewsSetAttribute groupId userId attribute value
- gk_viewsAttributes groupId userId
- gk_viewsUsers groupId
DESCRIPTION
This command sets-up a shared environment, for more information on environments see the gk_newenv manual page. The shared environment maintains user information, in particular what a particular user is viewing in a given application as well as some other user attribute information. An example of what might be stored in the user attribute is the user's color. Gk_views does not automatically initialize the coordinates nor the attributes, therefore, this must be done by the application if it is required.
The information is controlled with the various commands. The interaction between the environment and an application is two-way. The application changes and queries the environment through the various supplied commands. In the other direction the environment informs the application of changes by calling particular procedures that are supplied by the application, see the default bindings section for more information.
COMMANDS
- gk_views pathName groupId
-
Creates the shared environment and necessary procedures. Also sets-up the default environment bindings. This must be done before any of the other commands can be used. The pathName refers to the window pathName that has the expected subcommands - adduser, deleteuser, moveuser, and changedAttribute.
The groupId is any identification that will distinguish your views environment from any other views environment, different applications should have different groupId's unless the information is intended to be shared between them.
- gk_viewsAttributes groupId userId
-
Returns the list of attributes for the user.
- gk_viewsCopy pathName oldGroupId newGroupId
-
Copies all of the information stored in the old group to the new group. If the new group does not currently exist then it is created, including the default bindings. The pathName refers to the window path name that has the expected subcommands. The group identifiers, oldGroupId and newGroupId, are for the group being copied from and the group being copied to, respectively.
- gk_viewsDelete groupId ?userId?
-
Removes a user or a group users from the views environment. If the user identification is specified then that user is the only one removed from the environment. However, if it is not specified the entire group of user's associated with the given groupId are removed and the default bindings are also removed.
- gk_viewsGetAttribute groupId userId attribute
-
Returns the stored attribute information foruserId. The format of the attribute may vary, it depends on the value given to the gk_viewsSetAttribute command. The groupId is the one specified in the gk_views command and the userId is any identification that will uniquely determine different users, typically the value used by GroupKit is used, i.e. users local.usernum
- gk_viewsGetCoords groupId userId
-
Returns the current location of userId. The format of the returned coordinates is varied, it depends on the value given to the gk_viewsSetCoords command. The groupId is the one specified in the gk_views command and the userId is any identification that will uniquely determine different users, typically the value used by GroupKit is used, i.e. users local.usernum
- gk_viewsSetAttribute groupId userId attribute value
-
Sets the attribute(s) of a particular user. The attribute may be in any format as long as it is a single item. The groupId is the one specified in the gk_views command and the userId is any identification that will uniquely determine different users, typically the value used by GroupKit is used, i.e. users local.usernum
- gk_viewsSetCoords groupId userId coords
-
Set the coordinates of a particular user. The coordinates may be in any format, however, they should be in a format that is useful to the particular application. The groupId is the one specified in the gk_views command and the userId is any identification that will uniquely determine different users, typically the value used by GroupKit is used, i.e. users local.usernum
- gk_viewsUsers groupId
-
Returns the list of users currently in the environment, the list is sorted so it should be consistent between different users. The groupId is the one specified in the gk_views command.
DEFAULT BINDINGS
The environment used allows bindings to the environment. There are default bindings made to events that occur within an application and within the environment themselves. Some of these binding call the widget subcommand for the window provided by to the gk_views command. The subcommand is invoked only if the event is ``interesting'' to the particular widget. An event is interesting if and only if the event contains the groupId that was supplied to the gk_views command.
Besides the bindings to the widget's subcommands there is one additional binding. This one binds the given window path name to Configure to handle resizing of the window. This bind will destroy any current bindings for Configure for the given widget.
- pathName adduser groupId user coordinates
-
Allows the application to act on the addition of new information to the views environment. When the addInfo event occurs within the views environment it executes the procedure the subcommand adduser for the window pathName supplied to the gk_views command. An error will occur if this subcommand does not exist for the widget.
- pathName moveuser groupId user coordinates
-
Allows the application to act on a change to the user's coordinates within the views environment. When the changeInfo event occurs within the views environment and a change in the coordinates has caused the event to occur this subcommand will be invoked. An error will occur if this subcommand does not exist for the widget.
- pathName deleteuser groupId user
-
Allows the application take action when information is removed from the environment. When the deleteInfo event occurs within the views environment it executes this subcommand. An error will occur if this subcommand does not exist for the widget.
- pathName changeattribute groupId user attribute value
-
Allows the application to act on a change to the user's attribute within the views environment. When the changeInfo event occurs within the views environment and a change to the attribute has caused the event to occur this subcommand will be invoked. An error will occur if this subcommand does not exist for the widget.
NOTE
There is a possibility of strange results if the groupId is not unique between gk_views associated with different objects.
There are two elements in the environment, tags and deltag, for each user. They store environment binding tags so that they can be removed if need be. Changes to these elments should never cause any of the subcommands to be invoked, to the user they should appear to not exist.
BUGS
For some unknown reason current users are not always informed about new entrants. This is probably due to the fact that the environment can generate events before a conference/application knows what to do with the events.
SEE ALSO
gk_newenv(n) and gk_event(n)
gk_scrollbar.tcl and gk_miniText.tcl
AUTHOR
Shannon Jaeger ([email protected])