GNU TeXmacsUser manualReferenceAboutEnglish
Extending the graphical user interface

Most of the user interface to TeXmacs is dynamically created from within the interpreted Scheme code. New menus and buttons can be added, or the existing ones reused and rearranged, even the main editor can be embedded anywhere.

Imagine you want to implement some feature which requires interaction with the user. One possible approach is to use the facility interactive, which according to the user's preferences will either popup a dialog or ask in the footer bar, based in metadata you provide inside your tm-define'd function. See “Meta information and logical programming” for more on this topic. However, automatically generated content is not always the best approach, so you might want to explicitly design your interface placing it inside a complicated dialog. The following sections should help you with this. The implementation of the widget language is described in “The Scheme widget language and its interpreter”.

The same widgets are drawn by each graphical port of TeXmacs: Qt, Cocoa (the native port for macOS), Vue (drawn with SDL3) and the older X11/Widkit port; the differences between the ports are noted where they matter, and the ports themselves are described in “Adding new widgets and porting to other toolkits”. When (has-markup-gui?) holds, the dialogs are instead rendered as TeXmacs documents, see “The graphical user interface through markup”. Keyboard shortcuts are defined as explained in “Keyboard bindings”.

Permission is granted to copy, distribute and/or modify this˙document under the terms of the GNU Free Documentation License, Version 1.1 or˙any later version published by the Free Software Foundation; with no Invariant˙Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of˙the license is included in the section entitled "GNU Free Documentation License".