3 HotkeyString.mcc/HotkeyString.mcc
4 HotkeyString.mcc/MUIA_HotkeyString_Snoop
5 \fHotkeyString.mcc/HotkeyString.mcc
7 HotkeyString.mcc is a subclass of BetterString.mcc, it overloads the input
8 method, and converts inputevents to the alphabetical representation. This is
9 useful when you allow the user to customize keybindings.
11 For feedback write to: Allan Odgaard
15 url: http://www.DIKU.dk/students/duff/
18 MUIA_HotkeyString_IX - Set an InputXpression as string contents
19 MUIA_HotkeyString_Mode - Tell the class wether or not to display standalone
20 qualifiers, only qualifiers etc.
22 \fHotkeyString.mcc/MUIA_HotkeyString_Snoop
25 MUIA_HotkeyString_Snoop -- [.SG], BOOL
28 Normally this stringgadget converts each and every keypress to the
29 alphabetical representation. In some cases this may not be desirable,
30 e.g. if you bind the gadget to a listview.
31 Setting this tag to FALSE will make the gadget behave like a normal
35 /* We have a tbutton, which is a toggle button, a hstring which is our
36 HotkeyString - The tbutton is placed to the right of the string.
38 Setting up the following notify will let the string convert keys
39 only when the tbutton is down - And it will make the tbutton
40 become unpressed, when the user enters his hotkey.
43 DoMethod(tbutton, MUIM_Notify, MUIA_Selected, TRUE,
44 MUIV_Notify_Window, 3, MUIM_Set, MUIA_Window_ActiveObject,
47 DoMethod(tbutton, MUIM_Notify, MUIA_Selected, MUIV_EveryTime, hstring,
48 3, MUIM_Set, MUIA_HotkeyString_Snoop, MUIV_TriggerValue);
50 DoMethod(hstring, MUIM_Notify, MUIA_String_Contents, MUIV_EveryTime,
51 tbutton, 3, MUIM_Set, MUIA_Selected, FALSE);