Spec-Zone .ru
спецификации, руководства, описания, API
Spec-Zone .ru
спецификации, руководства, описания, API
Библиотека разработчика Mac Разработчик
Поиск

 

Эта страница руководства для  версии 10.9 Mac OS X

Если Вы выполняете различную версию  Mac OS X, просматриваете документацию локально:

Читать страницы руководства

Страницы руководства предназначаются как справочник для людей, уже понимающих технологию.

  • Чтобы изучить, как руководство организовано или узнать о синтаксисе команды, прочитайте страницу руководства для страниц справочника (5).

  • Для получения дополнительной информации об этой технологии, ищите другую документацию в Библиотеке Разработчика Apple.

  • Для получения общей информации о записи сценариев оболочки, считайте Shell, Пишущий сценарий Учебника для начинающих.



ntextBindings(n)                  Alternative Bindings for the Text Widget                  ntextBindings(n)



____________________________________________________________________________________________________________

NAME
       ntextBindings - Alternative Bindings for the Text Widget

SYNOPSIS
       package require Tcl  8.5

       package require Tk  8.5

       package require ntext  ?0.81?

____________________________________________________________________________________________________________

DESCRIPTION
       The  ntext package provides a binding tag named Ntext for use by text widgets in place of the default
       Text binding tag.

       The Text binding tag provides around one hundred bindings to the text widget  (the  exact  number  is
       platform-dependent).   A  few of these behave in a way that is different from most contemporary text-editing textediting
       editing applications.  Ntext aims to provide more familiar behaviour.

       Features of the Ntext bindings that differ from the default Text bindings:

             Clicking near the end of a (logical) line moves the cursor to the end of that  line  (not  the
              start  of  the next line).  If the widget is in -wrap word mode, the same rule applies to dis-play display
              play lines.

             Double-clicking or dragging near the end of a (logical) line will highlight/select  characters
              from the end of that line (not the next line, or the region at the end of the line where there
              are no characters).  If the widget is in -wrap word mode, the same  rule  applies  to  display
              lines.

             The  End  key  implements "Smart End" (successive keypresses move the cursor to the end of the
              display line, then to the end of the logical line);  the  Home  key  implements  "Smart  Home"
              (which  is  similar  to "Smart End", but also toggles between the beginning and end of leading
              whitespace).

             When a selection exists, a <<Paste>> operation (e.g. <Control-v>) overwrites the selection (as
              most editors do), and does so on all platforms.

             The  <Insert> key toggles between "Insert" and "Overwrite" modes for keyboard input.  (In con-trast, contrast,
              trast, the Text binding tag uses <Insert> as a method to paste the "primary selection", a task
              that can be accomplished instead by mouse middle-click.)

             The <Escape> key clears the selection.

             Selecting with <Shift-Button1> selects from the previous position of the insertion cursor. (In
              the Text binding tag, the selection anchor may be the position of the previous mouse click.)

             <Shift-Button1> operations do not alter the selection anchor. (In the Text binding  tag,  they
              do.)

             By  default,  the  Ntext binding tag does not provide several of the Control-key bindings sup-plied supplied
              plied by the Text binding tag.  Modern keyboards offer alternatives, such as cursor  keys  for
              navigation;  modern  applications  often use the Control-key bindings for other purposes (e.g.
              <Control-p> for "print").

       The last three cases, the behavior of Text is often useful, so Ntext gives you the option of  retain-ing retaining
       ing  it,  by  setting  variables  defined in the ::ntext namespace to 1 (instead of their default 0).
       Explaining these features in more detail:

             If the mouse is clicked at position A, then the keyboard is used to move the cursor to B, then
              shift is held down, and the mouse is clicked at C: the Text binding tag gives a selection from
              A to C; the Ntext gives a selection from B to C.  If you want Ntext to  behave  like  Text  in
              this respect, set ::ntext::classicMouseSelect to 1.

             The  Text  binding  tag  allows  successive <Shift-Button-1> events to change both ends of the
              selection, by moving the selection anchor to the end of the selection furthest from the  mouse
              click.   Instead,  the  Ntext binding tag fixes the anchor, and multiple Shift-Button-1 events
              can only move the non-anchored end of the selection.  If you want Ntext to behave like Text in
              this  respect,  set  ::ntext::classicAnchor to 1.  In both Text and Ntext, keyboard navigation
              with the Shift key held down alters the selection and keeps the selection anchor fixed.

             The following "extra" Text bindings are switched off by default, but can be activated in Ntext
              by  setting  ::ntext::classicExtras  to 1: <Control-a>, <Control-b>, <Control-d>, <Control-e>,
              <Control-f>, <Control-h>, <Control-i>,  <Control-k>,  <Control-n>,  <Control-o>,  <Control-p>,
              <Control-t>, <Control-space>, <Control-Shift-space>.


CONFIGURATION OPTIONS
       Ntext  provides  alternatives to a number of behaviours of the classic Text binding tag.  Where there
       is an option, the Ntext behaviour is switched on by  default,  except  for  display-line  indentation
       which is discussed on a separate page at ntextIndent.

       The behaviour of Ntext may be configured application-wide by setting the values of a number of names-pace namespace
       pace variables:

       ::ntext::classicAnchor

             0 - (default value) selects Ntext behaviour, i.e. the anchor point is fixed

             1 - selects classic Text behaviour, i.e. the anchor point is variable


       ::ntext::classicExtras

             0 - (default value) selects Ntext behaviour, i.e. several "extra" Text bindings  are  de-acti-vated de-activated
              vated

             1 - selects classic Text behaviour, i.e. the "extra" Text bindings are activated


       ::ntext::classicMouseSelect

             0  - (default value) selects Ntext behaviour, i.e. the anchor point for mouse selection opera-tions operations
              tions is moved by keyboard navigation

             1 - selects classic Text behaviour


       ::ntext::overwrite

             0 - (initial value) text typed at the keyboard is inserted into the widget

             1 - text typed at the keyboard overwrites text already in the widget

             The value is toggled by the Insert key.


EXAMPLE
       To use Ntext but keep classic Text 's variable-anchor feature:

       package require ntext
       text .t
       set ::ntext::classicAnchor 1
       bindtags .t {.t Ntext . all}


SEE ALSO
       bindtags, ntext, ntextIndent, text

KEYWORDS
       bindtags, text



ntext                                               0.81                                    ntextBindings(n)

Сообщение о проблемах

Способ сообщить о проблеме с этой страницей руководства зависит от типа проблемы:

Ошибки содержания
Ошибки отчета в содержании этой документации со ссылками на отзыв ниже.
Отчеты об ошибках
Сообщите об ошибках в функциональности описанного инструмента или API через Генератор отчетов Ошибки.
Форматирование проблем
Отчет, форматирующий ошибки в интерактивной версии этих страниц со ссылками на отзыв ниже.