[gvim: vim variant?]
Richard L. Hamilton
rlhamil at smart.net
Sun Mar 26 00:45:24 UTC 2023
> On Mar 25, 2023, at 20:01, raf via macports-users <macports-users at lists.macports.org> wrote:
>
> Ideally, it shouldn't be too mysterious. I remember seeing
> Xresources details in manual entries, but looking at gvim's
> manual entry, I don't see any Xresources specifications. :-(
> It must be unfashionable.
>
> The editres program seems to be a graphical Xresources editor
> that lets you explore the resources of a running program.
> But it looks very cumbersome. I'd prefer documentation and
> manual editing, but you can't always get what you want. :-)
I've rarely seen programs using Xt based libraries (like Athena or Motif) document much more than font selection and a handful more, unless they had explicit code to fetch and use some resource. Nearly all of that is done implicitly by the widgets; and the man pages for the functions composing widget libraries layered on the Xt intrinsics DO generally document their resources.
But you need to know an app's widget tree structure to make much use of that. Editres (with the helper I posted) can fetch that and save it to a file.
I recently installed vim +huge +x11 +xim +motif
and used the shared object of my use_editres.dylib to use editres to dump gvim's widget tree. Each line has two items (none of which is an actual resource name or value, they're documented on the widget's man page): the official widget name (for which there is likely a man page) and the instance name the program assigned to it. Either corresponds to one of the levels of a fully qualified resource name, other than the last level (the resource itself, give or take that some widgets could be built on other widgets). One might want to compose a name with the first name for the program (being more generic) and the second name for each widget level (being more specific), and of course ultimately the resource name as the last level, followed by colon space value, where the requirements for the value are either documented or referenced on the widget man page.
Here's the gvim (Motif) widget tree:
Vim vim
XmForm vimForm
XmRowColumn menuBar
XmCascadeButton subMenu
XmCascadeButton subMenu
XmCascadeButton subMenu
XmCascadeButton subMenu
XmCascadeButton subMenu
XmCascadeButton subMenu
XmCascadeButton subMenu
XmFrame toolBarFrame
XmRowColumn toolBar
XmEnhancedButton Open
XmEnhancedButton Save
XmEnhancedButton SaveAll
XmEnhancedButton Print
XmSeparator -sep1-
XmEnhancedButton Undo
XmEnhancedButton Redo
XmSeparator -sep2-
XmEnhancedButton Cut
XmEnhancedButton Copy
XmEnhancedButton Paste
XmSeparator -sep3-
XmEnhancedButton Replace
XmEnhancedButton FindNext
XmEnhancedButton FindPrev
XmSeparator -sep5-
XmEnhancedButton LoadSesn
XmEnhancedButton SaveSesn
XmEnhancedButton RunScript
XmSeparator -sep6-
XmEnhancedButton Make
XmEnhancedButton RunCtags
XmEnhancedButton TagJump
XmSeparator -sep7-
XmEnhancedButton Help
XmEnhancedButton FindHelp
XmNotebook Vim tabline
XmSpinBox PageScroller
XmTextField NBTextField
XmArrowButtonGadget MajorTabScrollerNext
XmArrowButtonGadget MajorTabScrollerPrevious
XmArrowButtonGadget MinorTabScrollerNext
XmArrowButtonGadget MinorTabScrollerPrevious
XmMenuShell popup_tabline popup
XmRowColumn tabline popup
XmPushButton Close
XmPushButton New Tab
XmPushButton Open tab...
XmForm textAreaForm
XmDrawingArea textArea
XmMenuShell popup_contextMenu
XmRowColumn contextMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmMenuShell popup_contextMenu
XmRowColumn contextMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmMenuShell popup_contextMenu
XmRowColumn contextMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmMenuShell popup_contextMenu
XmRowColumn contextMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmMenuShell popup_contextMenu
XmRowColumn contextMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmMenuShell popup_contextMenu
XmRowColumn contextMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmMenuShell popup_contextMenu
XmRowColumn contextMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmSeparatorGadget subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmPushButton subMenu
XmScrollBar scrollBar
XmScrollBar scrollBar
XmScrollBar scrollBar
TransientShell TipShell
XmLabel TipLabel
More information about the macports-users
mailing list