2012-08-11 05:29:34 +08:00
|
|
|
<TeXmacs|1.0.7.16>
|
2012-04-07 20:02:10 +08:00
|
|
|
|
|
|
|
<style|tmdoc>
|
|
|
|
|
|
|
|
<\body>
|
|
|
|
<tmdoc-title|Widgets reference guide>
|
|
|
|
|
|
|
|
This should be a comprehensive list of all the widgets available to the
|
2012-08-11 05:29:34 +08:00
|
|
|
user, following this schema:
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<scm|some-symbol><explain-synopsis|Some synopsis>
|
|
|
|
<|explain>
|
|
|
|
Some explanation.
|
|
|
|
</explain>
|
2012-04-07 20:02:10 +08:00
|
|
|
|
Features and fixes (Qt):
Support for widgets: texmacs-output, texmacs-input, resize, popup (for help
balloons), buttons in dialogs, tweaks here and there.
Fixes to layouts and sizing, scroll widgets are dummy for most widgets.
Support for side tools as another (floatable) QToolBar. Would a QDockWidget
be better?
Consistent (albeit partial) support for TeXmacs' widget styles.
Support for some more widgets as menu items (i.e. as QActions for QToolBar).
Fix placement of context menus.
New management of ownership of QWidgets.
Cleanup and maintenance (Qt):
Comments. Many, many comments.
Removed unnecessary files.
Grouped common method definitions.
Shifting around of code for consistency.
Documentation regarding widgets and extension of the UI.
XCode: update project for XCode4, new xcconfig for MOC objects fixes linker
warnings.
To do (Qt):
Fine-tune the presentation of QWidgets: remove unnecessary spacing, provide
default alignment policies, add better support for widgets in QToolBars
(see as_qaction()).
Finish the popup widget (timeout, etc.)
Why are texmacs widgets so often wrapped into vertical widgets? This messes
with scrollable_widget.
Understand why QPainter is not properly initialized for output widgets, then
remove the hack in Texmacs/Window/tm_button.cpp.
2012-05-29 06:17:09 +08:00
|
|
|
An excerpt from <verbatim|progs/kernel/gui/menu-define.scm>, as of SVN
|
|
|
|
revision 5238:
|
|
|
|
|
|
|
|
<\scm>
|
|
|
|
(define-table gui-make-table
|
|
|
|
|
|
|
|
\ \ (eval ,gui-make-eval)
|
|
|
|
|
|
|
|
\ \ (dynamic ,gui-make-dynamic)
|
|
|
|
|
|
|
|
\ \ (former ,gui-make-former)
|
|
|
|
|
|
|
|
\ \ (link ,gui-make-link)
|
|
|
|
|
|
|
|
\ \ (let ,gui-make-let)
|
|
|
|
|
|
|
|
\ \ (let* ,gui-make-let)
|
|
|
|
|
|
|
|
\ \ (with ,gui-make-with)
|
|
|
|
|
|
|
|
\ \ (receive ,gui-make-with)
|
|
|
|
|
|
|
|
\ \ (for ,gui-make-for)
|
|
|
|
|
|
|
|
\ \ (cond ,gui-make-cond)
|
|
|
|
|
|
|
|
\ \ (refresh ,gui-make-refresh)
|
|
|
|
|
|
|
|
\ \ (group ,gui-make-group)
|
|
|
|
|
|
|
|
\ \ (text ,gui-make-text)
|
|
|
|
|
|
|
|
\ \ (glue ,gui-make-glue)
|
|
|
|
|
|
|
|
\ \ (color ,gui-make-color)
|
|
|
|
|
|
|
|
\ \ (texmacs-output ,gui-make-texmacs-output)
|
|
|
|
|
|
|
|
\ \ (texmacs-input ,gui-make-texmacs-input)
|
|
|
|
|
|
|
|
\ \ (input ,gui-make-input)
|
|
|
|
|
|
|
|
\ \ (enum ,gui-make-enum)
|
|
|
|
|
|
|
|
\ \ (choice ,gui-make-choice)
|
|
|
|
|
|
|
|
\ \ (choices ,gui-make-choices)
|
|
|
|
|
|
|
|
\ \ (toggle ,gui-make-toggle)
|
|
|
|
|
|
|
|
\ \ (icon ,gui-make-icon)
|
|
|
|
|
|
|
|
\ \ (concat ,gui-make-concat)
|
|
|
|
|
|
|
|
\ \ (verbatim ,gui-make-verbatim)
|
|
|
|
|
|
|
|
\ \ (check ,gui-make-check)
|
|
|
|
|
|
|
|
\ \ (balloon ,gui-make-balloon)
|
|
|
|
|
|
|
|
\ \ (-\<gtr\> ,gui-make-submenu)
|
|
|
|
|
|
|
|
\ \ (=\<gtr\> ,gui-make-top-submenu)
|
|
|
|
|
|
|
|
\ \ (horizontal ,gui-make-horizontal)
|
|
|
|
|
|
|
|
\ \ (vertical ,gui-make-vertical)
|
|
|
|
|
|
|
|
\ \ (hlist ,gui-make-hlist)
|
|
|
|
|
|
|
|
\ \ (vlist ,gui-make-vlist)
|
|
|
|
|
|
|
|
\ \ (aligned ,gui-make-aligned)
|
|
|
|
|
|
|
|
\ \ (item ,gui-make-item)
|
|
|
|
|
|
|
|
\ \ (meti ,gui-make-meti)
|
|
|
|
|
|
|
|
\ \ (tabs ,gui-make-tabs)
|
|
|
|
|
|
|
|
\ \ (tab ,gui-make-tab)
|
|
|
|
|
|
|
|
\ \ (inert ,gui-make-inert)
|
|
|
|
|
|
|
|
\ \ (explicit-buttons ,gui-make-explicit-buttons)
|
|
|
|
|
|
|
|
\ \ (bold ,gui-make-bold)
|
|
|
|
|
|
|
|
\ \ (tile ,gui-make-tile)
|
|
|
|
|
|
|
|
\ \ (scrollable ,gui-make-scrollable)
|
|
|
|
|
|
|
|
\ \ (resize ,gui-make-resize)
|
|
|
|
|
|
|
|
\ \ (hsplit ,gui-make-hsplit)
|
|
|
|
|
|
|
|
\ \ (vsplit ,gui-make-vsplit)
|
|
|
|
|
|
|
|
\ \ (minibar ,gui-make-minibar)
|
|
|
|
|
|
|
|
\ \ (extend ,gui-make-extend)
|
|
|
|
|
|
|
|
\ \ (padded ,gui-make-padded)
|
|
|
|
|
|
|
|
\ \ (centered ,gui-make-centered)
|
|
|
|
|
|
|
|
\ \ (bottom-buttons ,gui-make-bottom-buttons)
|
|
|
|
|
|
|
|
\ \ (assuming ,gui-make-assuming)
|
|
|
|
|
|
|
|
\ \ (if ,gui-make-if)
|
|
|
|
|
|
|
|
\ \ (when ,gui-make-when)
|
|
|
|
|
|
|
|
\ \ (mini ,gui-make-mini)
|
|
|
|
|
|
|
|
\ \ (symbol ,gui-make-symbol)
|
|
|
|
|
|
|
|
\ \ (promise ,gui-make-promise)
|
|
|
|
|
|
|
|
\ \ (ink ,gui-make-ink)
|
|
|
|
|
|
|
|
\ \ (form ,gui-make-form)
|
|
|
|
|
|
|
|
\ \ (form-input ,gui-make-form-input)
|
|
|
|
|
|
|
|
\ \ (form-enum ,gui-make-form-enum)
|
|
|
|
|
|
|
|
\ \ (form-choice ,gui-make-form-choice)
|
|
|
|
|
|
|
|
\ \ (form-choices ,gui-make-form-choices))
|
|
|
|
|
|
|
|
\;
|
|
|
|
|
|
|
|
(tm-define (gui-make x)
|
|
|
|
|
|
|
|
\ \ ;;(display* "x= " x "\\n")
|
|
|
|
|
|
|
|
\ \ (cond ((symbol? x)
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ (cond ((== x '---) '$---)
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ((== x '===) (gui-make '(glue #f #f 0 5)))
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ((== x '======) (gui-make '(glue #f #f 0
|
|
|
|
15)))
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ((== x '/) '$/)
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ((== x '//) (gui-make '(glue #f #f 5 0)))
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ((== x '///) (gui-make '(glue #f #f 15 0)))
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ((== x '\<gtr\>\<gtr\>) (gui-make '(glue #t
|
|
|
|
#f 5 0)))
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ((== x '\<gtr\>\<gtr\>\<gtr\>) (gui-make
|
|
|
|
'(glue #t #f 15 0)))
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ((== x (string-\<gtr\>symbol "\|")) '$/)
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (else
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (texmacs-error "gui-make" "invalid menu
|
|
|
|
item ~S" x))))
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ ((string? x) x)
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ ((and (pair? x) (ahash-ref gui-make-table (car x)))
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ (apply (car (ahash-ref gui-make-table (car x))) (list
|
|
|
|
x)))
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ ((and (pair? x) (or (string? (car x)) (pair? (car x))))
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ \0($\<gtr\> ,(gui-make (car x)) ,@(cdr x)))
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ (else
|
|
|
|
|
|
|
|
\ \ \ \ \ \ \ \ \ \ (texmacs-error "gui-make" "invalid menu item ~S"
|
|
|
|
x))))
|
|
|
|
</scm>
|
|
|
|
|
2012-04-07 20:02:10 +08:00
|
|
|
<tmdoc-copyright|2012|the <TeXmacs> team.>
|
|
|
|
|
|
|
|
<tmdoc-license|Permission is granted to copy, distribute and/or modify
|
|
|
|
this\ndocument under the terms of the GNU Free Documentation License,
|
|
|
|
Version 1.1 or\nany later version published by the Free Software
|
|
|
|
Foundation; with no Invariant\nSections, with no Front-Cover Texts, and
|
|
|
|
with no Back-Cover Texts. A copy of\nthe license is included in the section
|
|
|
|
entitled "GNU Free Documentation License".>
|
|
|
|
</body>
|