@@ -20,32 +20,34 @@ Changes:
2020 are two different keys that can be handled independently. This is a big
2121 backward-incompatibility, because the `Enter` key is `ControlM`, not
2222 `ControlJ`. So, now that we stopped translating \r into \n, it could be that
23-  custom key bindings for `Enter` don't work anymore. Make sure to use
24-  `Keys.Enter` instead of `Keys.ControlJ` in the key bindings for handling the
25-  `Enter` key.
23+  custom key bindings for `Enter` don't work anymore. Make sure to bind
24+  `Keys.Enter` instead of `Keys.ControlJ` for handling the `Enter` key.
2625
2726- The `CommandLineInterface` and the `Application` classes are merged. First,
2827 `CommandLineInterface` contained all the I/O objects (like the input, output
2928 and event loop), while the `Application` contained everything else. There was
3029 no practical reason to keep this separation. (`CommandLineInterface` was
3130 mostly a proxy to `Application`.)
3231
33-  A consequence is that all almost code which received a
32+  A consequence is that all almost code which used to  received a
3433 `CommandLineInterface`, will now receive an `Application`. Usually, where we
3534 had an attribute `cli`, we'll now have an attribute `app`.
3635
3736 * `CLIFilter` will now take an `Application`, so it was renamed to `AppFilter`.
3837 * `to_cli_filter` was renamed to `to_app_filter`.
3938
39+  (For backwards-compatibility, we have aliases to the old names, whenever
40+  possible.)
41+ 
4042- The `buffers` dictionary (`CommandLineInterface.buffers`) does not exist
4143 anymore. Further, `buffers` was a `BufferMapping` that keeps track of which
4244 buffer has the focus. This significantly reduces the freedom for creating
4345 complex applications. We wanted to move toward a layout that can be defined
44-  as a collection of and relation between  user widgets. A user widget does not
45-  need  to have a `Buffer` underneath and any widget should be focussable .
46+  as a (hierarchical)  collection of user widgets. A user widget does not need 
47+  to have a `Buffer` underneath and any widget should be focusable .
4648
47-  * `layout.focus.Focus ` was introduced and `Application.focussed_control` was 
48-  added .
49+  * `layout.Layout ` was introduced to contain the root layout widget and keep 
50+  track of the focus .
4951
5052- The key bindings were refactored. It became much more flexible to combine
5153 sets of key bindings.
@@ -63,6 +65,15 @@ Changes:
6365 * `KeyBindingManager` has been removed completely.
6466 * `input_processor` was renamed to `key_processor`.
6567
68+  Further:
69+ 
70+  * The `Key` class does not exist anymore. Every key is a string and it's
71+  considered fine to use string literals in the key bindings. This is more
72+  readible, but we still have run-time validation. The `Keys` enum still
73+  exist (for backwards-compatibility, but also to have an overview of which
74+  keys are supported.)
75+  * 'enter' and 'tab' are key aliases for 'c-m' and 'c-i'.
76+ 
6677- User controls can define key bindings, which are active when the user control
6778 is focussed.
6879
@@ -76,7 +87,7 @@ Changes:
7687 (TOP/CENTER/BOTTOM/JUSTIFY) or (LEFT/CENTER/RIGHT/JUSTIFY).
7788 * `Float` now takes `allow_cover_cursor` and `attach_to_window` arguments.
7889 * `Window` got an `Align` argument. This can be used for the alignment of the
79-  content. `TokenListControl` does not have an allignment  argument anymore.
90+  content. `TokenListControl` does not have an alignment  argument anymore.
8091 * `Window` got a `token` and `get_token` argument. This is used to fill the
8192 window's background using the given `Token`. That way, a window can for
8293 instance be given a background color.
@@ -90,17 +101,31 @@ Changes:
90101
91102 * `BufferControl` now takes a `input_processor` as argument. (Singular
92103 instead of plural). If you want to combine multiple, they have to be merged
93-  together using `merge_input_processors`.
104+  together using `merge_input_processors`. (Similar to `merge_key_bindings`.) 
94105
95106 * The `InputProcessor` class has been refactored. The `apply_transformation`
96-  method should now accept  a `TransformationInput` object.
107+  method should now takes  a `TransformationInput` object as input .
97108
98109 * The text `(reverse-i-search)` is now displayed through a processor. (See
99110 the `shortcuts` module for an example of the usage.)
100111
112+ - `widgets` and `dialogs` modules:
113+ 
114+  * A small collection of widgets was added. These are more complex collections
115+  of user controls that are ready to embed in a layout. A `shortcuts.dialogs`
116+  module was added with shortcuts for displaying input, confirmation and
117+  message dialogs.
118+ 
119+  * Every class that exposes a ``__pt_container__`` method (which is supposed
120+  to return a ``Container`` instance) is considered a widget. The
121+  ``to_container`` shortcut will call this method in situations where a
122+  ``Container`` object is expected. This avoids inheritance from other
123+  ``Container`` types, but also having to unpack the container object from
124+  the widget, in case we would have used composition.
125+ 
101126- Changes related to `shortcuts.prompt`:
102127
103-  * There is now a class `Prompt` that  which has a method `prompt`. Both the
128+  * There is now a class `Prompt` which also  has a method `prompt`. Both the
104129 class and the method take about the same arguments. This can be used to
105130 create a session. Every `prompt` call of the same instance will reuse all
106131 the arguments given to the class itself. This can be used for instance to
@@ -111,6 +136,7 @@ Changes:
111136
112137 * The `prompt` function now takes an `extra_key_bindings` argument instead of
113138 `key_bindings_registry`. This should only contain the additional bindings.
139+  (The default bindings are always included.)
114140
115141- Changes to the event loops:
116142
@@ -123,9 +149,9 @@ Changes:
123149 event loop until the `Future` is set and returns that result.
124150
125151 * The asyncio adaptors (like the asyncio event loop integration) now require
126-  Python 3.5.
152+  Python 3.5. (We use the async/await syntax internally.) 
127153
128-  * The `Input` and `Output` classes has  some changes. (Not really important.)
154+  * The `Input` and `Output` classes have  some changes. (Not really important.)
129155
130156- Changes to the `filters` module:
131157
@@ -153,14 +179,9 @@ Changes:
153179
154180 * `to_container` and `to_window` utilities were added.
155181
156-  * Added a small collection of widgets. These are more complex collections of
157-  user controls that are ready to embed in a layout.
158- 
159182****
160183- `run_sub_applications` returns a future instead of taking a callback.
161184
162- - Key() object does not exist anymore. Keys are all strings.
163- 
164185
165186
166187- Deprecated 
0 commit comments