[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-dev] Upgrading to wxWidgets 2.8.4 and Hotkeys



It turns out that the hotkeys do not work with wxWidgets 2.8.4 for a
number of keys. The reason for this is that the file
wxOil/xrc/STANDARD_HOTKEYS.res contains the hard-coded value of the
WXK_* enums. Although the WXK_* enums all still exist in wxWidgets
2.8.4, the actual value they map to has changed. They moved the
WXK_PRIOR/NEXT values from their earlier position in the list to after
WXK_PAGEDOWN.

I'm not sure what the ideal solution to this problem is. It would be
nice to have instead of '0x157' (F2) in the file, have WXK_F2. Maybe
have a function that returns the enum value given a string:

pseudocode:

UINT32 KeyStr2Enum(string key)
{
  if(key=="WXK_F2") return(WXK_F2);
  if(key=="WXK_F3") return(WXK_F3);
.
.
.
}