]> www.wagner.pp.ru Git - sites/home_page.git/blob - software/tcl/textprops.html
fixed errordocument
[sites/home_page.git] / software / tcl / textprops.html
1 <HTML><HEAD>
2 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=koi8-r">
3 <TITLE>Textprops package</TITLE>
4 <META NAME="description" CONTENT="Right-click menus for text and entry
5 Tk widgets">
6 </HEAD><BODY>
7
8 <H1>Textprops package</H1>
9 <H3>Right-click menus for entry and text
10 widgets</H3>
11
12 Tk by default doesn't provide right-click bindings for <b>entry</b> and
13 <b>text</b> widgets. But user typically expect that right click on the
14 edit area would bring up a menu with common edit operations.
15
16 <p>
17 <A HREF="textprops.tcl">textprops</a> package fixes this problem.
18 Loading this file create bindings for Text and Entry bindtags which 
19 bring up <b>tk_popup</b> with common edit operations.
20 <p>
21 Even more, bindings check state of widget and system clipboard and
22 disable some entries appropriately.
23 <p>
24 It also has function <b>textprops::StdEditMenu</b> which allows to fill
25 previously created menu with standard edit commands and adds a
26 <b>-postcommand</b> which control their state.
27
28 <pre>
29 ::textprops::StdEditMenu menu text-widget
30 </pre>
31 where <i>text widget</i> is the name of text widget which should be
32 controlled by the menu. Variable and command substitution can be used in
33 the text-widget name. So it is possible to use single edit menu for
34 multiple text windows if you figure out how to pick current one.
35 <p>
36 Package uses msgcat package to localize menu entries. Currently no .msg
37 files provided and no mcload is called. Russian localization is built
38 directly into package code (.i.e mcmset command).
39 <p>
40 <b>Limitations</b> 
41 <ol>
42 <li>Undo/Redo are missing for entry widget, because tk lacks undo stack
43 on entry widgets
44 <li>Redo is always enabled for text widgets with enabled undo mechanism,
45 because  I couldn't find way to check whether redo is possible
46 <li>No support for switching encodings on the fly. Inserted files are
47 always assumed to be in system encoding
48 <li>No support for per-widget setting of filetypes allowed to be
49 inserted
50
51 </ol>
52 </BODY>
53 </HTML>