3 HotkeyString.mcc/HotkeyString.mcc
4 HotkeyString.mcc/MUIA_HotkeyString_IX
5 HotkeyString.mcc/MUIA_HotkeyString_Snoop
6 \fHotkeyString.mcc/HotkeyString.mcc
8 *******************************************************************
9 Copyright (C) 2005-2010 by BetterString.mcc Open Source Team
10 $Id: MCC_HotkeyString.doc 242 2010-05-01 07:29:36Z damato $
12 HotkeyString.mcc is a subclass of BetterString.mcc, it overloads
13 the input method, and converts inputevents to the alphabetical
14 representation. This is useful when you allow the user to customize
17 The gadget was originally written in 1997 by Allan Odgaard. As of
18 version released in July 2005, the gadget is maintained by
19 the BetterString.mcc Open Source team.
21 It is released and distributed under the terms of the GNU Lesser
22 General Public License (LGPL) and available free of charge.
24 Please visit http://www.sf.net/projects/bstring-mcc/ for
25 the very latest version and information regarding HotkeyString.mcc
26 *******************************************************************
28 \fHotkeyString.mcc/MUIA_HotkeyString_IX
31 MUIA_HotkeyString_IX -- [IS.], struct InputXpression *
34 Allows to specify a pointer to a standard "struct InputXpression"
35 and sets the contents of the string gadget accordingly to the passed
38 \fHotkeyString.mcc/MUIA_HotkeyString_Snoop
41 MUIA_HotkeyString_Snoop -- [.SG], BOOL
44 Normally this stringgadget converts each and every keypress to the
45 alphabetical representation. In some cases this may not be desirable,
46 e.g. if you bind the gadget to a listview.
47 Setting this tag to FALSE will make the gadget behave like a normal
51 /* We have a tbutton, which is a toggle button, a hstring which is our
52 HotkeyString - The tbutton is placed to the right of the string.
54 Setting up the following notify will let the string convert keys
55 only when the tbutton is down - And it will make the tbutton
56 become unpressed, when the user enters his hotkey.
59 DoMethod(tbutton, MUIM_Notify, MUIA_Selected, TRUE,
60 MUIV_Notify_Window, 3, MUIM_Set, MUIA_Window_ActiveObject,
63 DoMethod(tbutton, MUIM_Notify, MUIA_Selected, MUIV_EveryTime, hstring,
64 3, MUIM_Set, MUIA_HotkeyString_Snoop, MUIV_TriggerValue);
66 DoMethod(hstring, MUIM_Notify, MUIA_String_Contents, MUIV_EveryTime,
67 tbutton, 3, MUIM_Set, MUIA_Selected, FALSE);