Package: gtk
Interface gtk:editable
Superclassesgobject:object, common-lisp:standard-object, common-lisp:t Documented SubclassesDirect Slots
None
Details The gtk:editable interface is an interface which should be implemented by text editing widgets, such as the gtk:entry widget and the gtk:spin-button widget.
It contains functions for generically manipulating an editable widget, a large
number of action signals used for key bindings, and several signals that an
application can connect to to modify the behavior of a widget. Examples;; Handler for the "insert-text" signal (setf handlerid (g:signal-connect entry "insert-text" (lambda (editable text length position) (g:signal-handler-block editable handlerid) (gtk:editable-insert-text editable (string-upcase text) (cffi:mem-ref position :intptr)) (g:signal-stop-emission editable "insert-text") (g:signal-handler-unblock editable handlerid)))) Signal DetailsThe "changed" signallambda (editable) :run-lastThe signal is emitted at the end of a single user visible operation on the contents of the gtk:editable widget. E.g., a paste operation that replaces the contents of the selection will cause only one signal emission, even though it is implemented by first deleting the selection, then inserting the new content, and may cause multiple "notify::text" signals to be emitted.
The "delete-text" signallambda (editable start end) :run-lastThe signal is emitted when text is deleted from the widget by the user. The default handler for this signal will normally be responsible for deleting the text, so by connecting to this signal and then stopping the signal with the g:signal-stop-emission function, it is possible to modify the range of deleted text, or prevent it from being deleted entirely. The start and end parameters are interpreted as for the gtk:editable-delete-text function.
The "insert-text" signallambda (editable text length position) :run-lastThe signal is emitted when text is inserted into the widget by the user. The default handler for this signal will normally be responsible for inserting the text, so by connecting to this signal and then stopping the signal with the g:signal-stop-emission function, it is possible to modify the inserted text, or prevent it from being inserted entirely.
| Inherited Slot Access FunctionsSee also |
2023-2-13