---
name: "gk_miniText"
section: "3gk"
platform: "linux"
package: "groupkit"
version: "3.2-1"
release: "Debian 1.3 (Bo)"
platforms: ["linux"]
url: "https://new.carta.tech/gk_miniText"
---

# gk\_miniText(3gk)

Create a miniature text view

## NAME

gk\_miniText - Create a miniature text view

## SYNOPSIS

- **gk\_miniText** *pathName* ?*options*?

  ## STANDARD OPTIONS

```
background	insertBackground	selectBackground	tabs
borderWidth	insertBorderWidth	selectBorderWidth	takeFocus
cursor	insertOffTime	selectForeground	xScrollCommand
exportSelection	insertOnTime	setGrid	yScrollCommand
foreground	insertWidth	spacing1	width
height	padX	spacing2
highlightColor	padY	spacing3
highlightThickness	relief	state
```

**See the \`\`options'' manual entry for details on the standard options.**\
 **See the \`\`text'' manual entry for details on the inherited options.**

## WIDGET-SPECIFIC OPTIONS

```
Name:	adjust
Class:	Adjust
Command-Line Switch:	-adjust
```

-

  Specifies whether or not the view should be adjusted automatically when the local user's highlighted portion is moved.  Valid values are any Tk boolean values, the default value is true.  If the value is true then the local user's highlighted portion is kept in view. If the value is false then the view may or may not contain the local user's highlighted portion.

```
Name:	color
Class:	Color
Command-Line Switch:	-color
```

-

  Specifies the color of the highlighted portion in the miniature view for the local user.  Default value is either the current value stored of *userprefs color*, this is usually specified in the *.groupkitrc* file. Any valid Tk color may be used with this option.

```
Name:	textid
Class:	TextId
Command-Line Switch:	-textid
```

-

  Specifies the identifier for the miniature text environment.  Miniature views used to represent different documents should have different textid values - unexpected results may occur if they are the same. The default value is \`\`gkMiniText''.

```
Name:	viewScroll
Class:	ViewScroll
Command-Line Switch:	-viewscroll
```

-

  Specifies a boolean value that determines whether or not enable the local users view indicator (highlighted portion) can be scrolled/moved.

```
Name:	xScrollCommand
Class:	ScrollCommand
Command-Line Switch:	-xviewscrollcommand
```

-

  Specifies the prefix of a Tcl command to invoke to change the xview in the widget associated with the miniText. When a user requests a view change by manipulating their highlighted portion, a Tcl command is invoked.  The *-viewscroll*  option must be true in order to allow manipulation of the highlighted portion.  The actual Tcl command invoked consists of this option followed by *movto* and a number.  The number is a fraction between 0 and 1, which indicates the position in the document which corresponds to the left side of the highlighted section.  This operates similar to the scrollbar *-command* option.

```
Name:	yScrollCommand
Class:	ScrollCommand
Command-Line Switch:	-yviewscrollcommand
```

-

  Specifies the prefix of a Tcl command to invoke to change the yview in the widget associated with the miniText. When a user requests a view change by manipulating their highlighted portion, a Tcl command is invoked.  The *-viewscroll*  option must be true in order to allow manipulation of the highlighted portion.  The actual Tcl command invoked consists of this option followed by *movto* and a number.  The number is a fraction between 0 and 1, which indicates the position in the document which corresponds to the left side of the highlighted section.  This operates similar to the scrollbar *-command* option.

## DESCRIPTION

The gk\_miniText widget is a specialized text widget that miniaturizes the text and has highlighted portions.  There is a highlighted for each user and they are used to what the user is currently viewing.  Movement of the highlighted sections is controlled by the  widget commands.

## WIDGET COMMAND

The **gk\_miniText** command creates a new Tcl command whose name is *pathName*.  This command may be used to invoke various operations on the widget.  It has the following general form:

-

  *pathName option* ?*arg arg ...*?

*Option* and the *arg*s determine the exact behavior of the command.  Any of the commands that can be used with the Tk text widget may be used, for further details see the \`\`text'' manual entry. The following additional commands are possible for gk\_miniText widgets:

- *pathName* **adduser** *textid userid coordinates*

  Add a user, highlighted portion, to the miniText.  This command is  needed in order to operate with the \`\`gk\_views'' widget and will not be needed in a typical application.  The *textid* is the value of the *-textid* option.  The *userid* is a unique string that identifies a particular user, typically the user number assigned to the user be GroupKit is used.  The *coordinates* are numbers between 0 and 1 that specify where to place the highlighted portion, which correspond respectively to the left top right left  sides of the highlighted portion.  The numbers are fractions like those used by the *xview* and *yview* commands.

- *pathName* **attributechanged**

  - *pathName* **configure** ?*option*? ?*value option value ...*?

  Query or modify the configuration options of the widget. If no *option* is specified, returns a list describing all of the available options for *pathName* (see **Tk\_ConfigureInfo** for information on the format of this list).  If *option* is specified with no *value*, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no *option* is specified).  If one or more *option-value* pairs are specified, then the command modifies the given widget option(s) to have the given value(s);  in this case the command returns an empty string. *Option* may have any of the values accepted by the **gk\_miniText** command.

- *pathName* **cget** *option*

  Returns  the  current value of the configuration option given by option.  Option may have  any  of  the  values accepted by the text command.

- *pathName* **delete** *index1 ?index2?*

  **This command is essentially the Tk text widget** *delete* command. So for its exact  usage refer to the \`\`text'' manual entry.  The difference is that since the miniature views state is normally  disabled this command will first change the state to normal, delete the text, then turn the state back to disabled.

- *pathName* **deleteuser** *textid userid*

  Delete a user, highlighted portion, from the miniText.  This command is  needed in order to operate with the \`\`gk\_views'' widget and will not be needed in a typical application.  The *textid* is the value of the *-textid* option.  The *userid* is a unique string that identifies a particular user, typically the user number assigned to the user be GroupKit is used, and is the same as the one provided in the *adduser* command.

- *pathName* **insert** *index1 chars "tagList chars tagList ...?*

  This command is essentially the Tk text widget *insert* command. So for its exact  usage refer to the \`\`text'' manual entry.  The difference is that since the miniature views state is normally  disabled this command will first change the state to normal, insert the text, then turn the state back to disabled.

- *pathName* **minixview** *?left right?*

  This command is used to query and change the horizontal position of the highlighted portion for the local user.  The operation of this command is much like the *xview* command.  If no arguments are specified then it returns a list containing two elements.  Each element is a real fraction between 0 and 1; together they describe the portion of the highlighted horizontal span.  If the *left* and *right* arguments are specified then the highlighted portion is moved to these position.  *Left* and *right* are expected to be real fractions between 0 and 1, similar to the values passed to scrollbars via the -xscrollcommand option. If the Ileft argument is specified then *right* must be specified too.  Finally, the view is adjusted to make sure that the highlighted portion is always visible.

- *pathName* **miniyview** *?top bottom?*

  This command is used to query and change the vertical position of the highlighted portion for the local user.  The operation of this command is much like the *yview* command.  If no arguments are specified then it returns a list containing two elements.  Each element is a real fraction between 0 and 1; together they describe the portion of the highlighted horizontal span.  If the *top* and *bottom* arguments are specified then the highlighted portion is moved to these position.  *Top* and *bottom* are expected to be real fractions between 0 and 1, similar to the values passed to scrollbars via the -xscrollcommand option. If the Itop argument is specified then *bottom* must be specified too.  Finally, the view is adjusted to make sure that the highlighted portion is always visible.

- *pathName* **moveuser** *textid userid coordinates*

  Move a user, highlighted portion, on the miniText widget.  This command  is needed in order to operate with the \`\`gk\_views'' widget and will not be needed in a typical application.  The *textid* is the value of the *-textid* option.  The *userid* is a unique string that identifies a particular user, typically the user number assigned to the user be GroupKit is used and will be the same as the value given to the *adduser* command.  The *coordinates* are numbers between 0 and 1 that specify where to place the highlighted portion, which correspond respectively to the left top right left  sides of the highlighted portion.  The numbers are fractions like those used by the *xview* and *yview* commands.

- *pathName* **see** *index*

  Adjust the view of the window so that the position given by *index* is completely visible.  If *index* is already visible then the command does nothing.  If *index* is not visible the view is adjusted just enough to make *index* visible at the edge of it.  This differs from the *see* command for the text widget.  This command adjusts the view based on the *index* whereas the text widget adjust the view based on the character given by *index*.

## DEFAULT BINDINGS

Mouse button 1 over a highlighted portion will display the  name of the user associated with the particular highlighted portion. Mouse button 3 controls the scrolling of the highlighed portion for the local users only - this is turned off or on based on the value given for the *-viewscroll* option. Other bindings include the normal Tk text widget bindings, see  the \`\`text'' manual entry for more details.

## NOTE

This widget is built using the GroupKit class builder; see the GroupKit User Manual for more information. This widget also relies on the gk\_views widget for much of it's operation, see the manual page \`\`gk\_views (n)'' for details.

The highlighted portions are implemented with tags.  The background color for tags can only be changed if there is text in that portion of the tag.  This is why the highlighted portions are often have more than one pieced instead of one colored square.  Also tabs in inserted text are treated as a single character instead of n, this can cause some display problems.

Do too the amount of time required to do some of the calculations, the scrolling can be slow.  If this widget is used with a scrollbar it can cause the scrollbar to act like it was moved twice instead of once  In order to prevent this from happening change the *-repeatdelay* option for the scrollbar to something larger, 1000 should work.

## AUTHOR

Shannon Jaeger (jaeger@cpsc.ucalgary.ca)
