1c9e2be55Smrg
2c9e2be55Smrg!	Examples of customizing xmh with resource specifications.
3c9e2be55Smrg!	These can be copied to your private X resource file or to
4c9e2be55Smrg!	a private Xmh application defaults file.
5c9e2be55Smrg
6c9e2be55Smrg
7c9e2be55Smrg
8c9e2be55Smrg!	To create command buttons in the middle of the main window:
9c9e2be55Smrg
10c9e2be55SmrgXmh*CommandButtonCount:		8
11c9e2be55Smrg
12c9e2be55SmrgXmh*commandBox.button1.label:	inc
13c9e2be55SmrgXmh*commandBox.button1.translations: #override\
14c9e2be55Smrg	<Btn1Down>,<Btn1Up>: XmhIncorporateNewMail() unset()
15c9e2be55Smrg
16c9e2be55SmrgXmh*commandBox.button2.label:	compose
17c9e2be55SmrgXmh*commandBox.button2.translations: #override\
18c9e2be55Smrg	<Btn1Down>,<Btn1Up>: XmhComposeMessage() unset()
19c9e2be55Smrg
20c9e2be55SmrgXmh*commandBox.button3.label:	next
21c9e2be55SmrgXmh*commandBox.button3.translations: #override\
22c9e2be55Smrg	<Btn1Down>,<Btn1Up>: XmhViewNextMessage() unset()
23c9e2be55Smrg
24c9e2be55SmrgXmh*commandBox.button4.label:	prev
25c9e2be55SmrgXmh*commandBox.button4.translations: #override\
26c9e2be55Smrg	<Btn1Down>,<Btn1Up>: XmhViewPreviousMessage() unset()
27c9e2be55Smrg
28c9e2be55SmrgXmh*commandBox.button5.label:	commit
29c9e2be55SmrgXmh*commandBox.button5.translations: #override\
30c9e2be55Smrg	<Btn1Down>,<Btn1Up>: XmhCommitChanges() unset()
31c9e2be55Smrg
32c9e2be55SmrgXmh*commandBox.button6.label:	delete
33c9e2be55SmrgXmh*commandBox.button6.translations: #override\
34c9e2be55Smrg	<Btn1Down>,<Btn1Up>: XmhMarkDelete() unset()
35c9e2be55Smrg
36c9e2be55SmrgXmh*commandBox.button7.label:	move
37c9e2be55SmrgXmh*commandBox.button7.translations: #override\
38c9e2be55Smrg	<Btn1Down>,<Btn1Up>: XmhMarkMove() unset()
39c9e2be55Smrg
40c9e2be55SmrgXmh*commandBox.button8.label:	reply to viewed msg
41c9e2be55SmrgXmh*commandBox.button8.translations: #override\
42c9e2be55Smrg	<Btn1Down>,<Btn1Up>: XmhViewReply() unset()
43c9e2be55Smrg
44c9e2be55Smrg
45c9e2be55Smrg!	To use popup menus on the title bars of the main window,
46c9e2be55Smrg!	have them popup with the pointer over the previously selected item,
47c9e2be55Smrg!	and not be clipped by the screen boundary:
48c9e2be55Smrg
49c9e2be55SmrgXmh*stickyMenu:	True
50c9e2be55SmrgXmh*messageMenu.MenuOnScreen: True
51c9e2be55Smrg
52c9e2be55SmrgXmh*folderTitlebar.translations: #override\n\
53c9e2be55Smrg<BtnDown>: XawPositionSimpleMenu(folderMenu)MenuPopup(folderMenu)\n
54d859ff80Smrg
55c9e2be55SmrgXmh*tocTitlebar.translations: #override\n\
56c9e2be55Smrg<Btn2Down>: XawPositionSimpleMenu(messageMenu)MenuPopup(messageMenu)\n\
57c9e2be55Smrg<BtnDown>: XawPositionSimpleMenu(tocMenu)MenuPopup(tocMenu)\n
58c9e2be55Smrg
59c9e2be55SmrgXmh.Paned.viewTitlebar.translations: #override\n\
60c9e2be55Smrg<Btn2Down>: XawPositionSimpleMenu(sequenceMenu)MenuPopup(sequenceMenu)\n\
61c9e2be55Smrg<BtnDown>: XawPositionSimpleMenu(viewMenu)MenuPopup(viewMenu)\n
62c9e2be55Smrg
63c9e2be55Smrg
64c9e2be55Smrg! To redefine the accelerator bindings to exclude modifier keys,
65c9e2be55Smrg! and add a translation for Compose Message:
66c9e2be55Smrg
67c9e2be55SmrgXmh*tocMenu.accelerators: #override\n\
68c9e2be55Smrg	!:<Key>I:	XmhIncorporateNewMail()\n\
69c9e2be55Smrg	!:<Key>C: 	XmhCommitChanges()\n\
70c9e2be55Smrg	!:<Key>R:	XmhForceRescan()\n\
71c9e2be55Smrg	!:<Key>P:	XmhPackFolder()\n\
72c9e2be55Smrg	!:<Key>S:	XmhSortFolder()\n
73c9e2be55SmrgXmh*messageMenu.accelerators: #override\n\
74c9e2be55Smrg	!:<Key>M:	XmhComposeMessage()\n\
75c9e2be55Smrg	!<Key>space:    XmhViewNextMessage()\n\
76c9e2be55Smrg	!:<Key>c:	XmhMarkCopy()\n\
77c9e2be55Smrg	!:<Key>d:	XmhMarkDelete()\n\
78c9e2be55Smrg	!:<Key>f:	XmhForward()\n\
79c9e2be55Smrg	!:<Key>m:	XmhMarkMove()\n\
80c9e2be55Smrg	!:<Key>n:	XmhViewNextMessage()\n\
81c9e2be55Smrg	!:<Key>p:	XmhViewPreviousMessage()\n\
82c9e2be55Smrg	!:<Key>r:	XmhReply()\n\
83c9e2be55Smrg	!:<Key>u:	XmhUnmark()\n
84c9e2be55Smrg
85c9e2be55Smrg
86c9e2be55Smrg!	Here is an example of some miscellaneous accelerators:
87c9e2be55Smrg!	("clients/xmh" is a subfolder; it must be existing.)
88c9e2be55Smrg
89c9e2be55SmrgXmh*toc.accelerators: #override\n\
90c9e2be55Smrg	<Key>F1:	XmhOpenFolder(inbox)XmhOpenSequence(all)\n\
91c9e2be55Smrg	<Key>F2:	XmhOpenFolder(drafts)\n\
92c9e2be55Smrg	<Key>F3:	XmhOpenFolder(clients/xmh)\n\
93c9e2be55Smrg	<Key>F4:	XmhViewInNewWindow()\n\
94c9e2be55Smrg	<Key>F5:	XmhPickMessages()\n
95c9e2be55Smrg
96c9e2be55Smrg
97c9e2be55Smrg!	Define Meta-S in the Compose window to do a send and close.
98c9e2be55Smrg
99c9e2be55SmrgXmh*comp.translations: #override\n\
100c9e2be55Smrg	!:Meta<Key>S:	XmhSend()XmhCloseView()
101c9e2be55Smrg
102c9e2be55Smrg
103c9e2be55Smrg
104c9e2be55Smrg
105c9e2be55Smrg
106c9e2be55Smrg
107c9e2be55Smrg
108c9e2be55Smrg
109