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