[ Odielib Home | Main Table Of Contents | Table Of Contents | Keyword Index ]

taotk::meta::console(n) 9.1 odielib ""

Name

taotk::meta::console - Class taotk::meta::console

Table Of Contents

Synopsis

Description

Ancestors: taotk::meta::console, taotk::meta::text, taotk::meta::container, taotk::meta::widget, oo::object, tao::moac By the overt act of typing this comment, the author of this code releases it into the public domain. No claim of copyright is made. In place of a legal notice, here is a blessing: May you do good and not evil. May you find forgiveness for yourself and forgive others. May you share freely, never taking more than you give. This file contains code use to implement a simple command-line console for Tcl/Tk.

Methods

addHistory line
B1Leave x y

Called whenever the mouse leaves the boundries of the widget while button 1 is held down.

B1Motion x y

Called whenever the mouse moves while button-1 is held down.

Backspace

Erase the character to the left of the cursor

build_buttons
build_console
Button1 x y

Called when the mouse button is pressed at position $x,$y on the console widget.

cancelMotor

This routine cancels the scrolling motor if it is active

canCut

Return 1 if the selection exists and is contained entirely on the input line. Return 2 if the selection exists but is not entirely on the input line. Return 0 if the selection does not exist.

Clear

Erase everything from the console above the insertion line.

Copy

Do a Copy operation on the stuff currently selected.

Cut

Do a Cut operation if possible. Cuts are only allowed if the current selection is entirely contained on the current input line.

Delete

Erase the character to the right of the cursor

dialog_preferences
EnableEditMenu

Enable or disable entries in the Edit menu

End

Move the cursor to the end of the current line

Enter

Called when "Enter" is pressed. Do something with the line of text that was entered.

EraseEOL

Erase to the end of the line

Home

Move the cursor to the beginning of the current line

Insert a

Insert a single character at the insertion cursor

insert text
Left

Move the cursor one character to the left

motor

This routine is called to automatically scroll the window when the mouse drags offscreen.

nearestBoundry x y

Find the boundry between characters that is nearest to $x,$y

Next

Change the line to the next line

Option_set::font newvalue
Paste

Do a paste opeation.

Prior

Change the line to the previous line

puts t tag

Insert test at the "out" mark. The "out" mark is always before the input line. New text appears on the line prior to the current input line.

redirect_stdout
Right

Move the cursor one character to the right

SaveFile

Prompt the user for the name of a writable file. Then write the entire contents of the console screen to that file.

SelectTo x y

This routine extends the selection to the point specified by {$x,$y}

SetLine line

Change the contents of the entry line

SourceFile

Prompt for the user to select an input file, the source that file.

Widget::create

REFERENCES

AUTHORS

Sean Woods

Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category taotk of the Odielib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.

Keywords

odielib, taotk, taotk::meta::console

Category

Class