static CellView() { EventHost.MapEvent(WidgetEvent.KeyPressed, typeof(CellView), "OnKeyPressed"); EventHost.MapEvent(WidgetEvent.KeyReleased, typeof(CellView), "OnKeyReleased"); EventHost.MapEvent(WidgetEvent.MouseEntered, typeof(CellView), "OnMouseEntered"); EventHost.MapEvent(WidgetEvent.MouseExited, typeof(CellView), "OnMouseExited"); EventHost.MapEvent(WidgetEvent.ButtonPressed, typeof(CellView), "OnButtonPressed"); EventHost.MapEvent(WidgetEvent.ButtonReleased, typeof(CellView), "OnButtonReleased"); EventHost.MapEvent(WidgetEvent.MouseMoved, typeof(CellView), "OnMouseMoved"); }
/// <summary> /// Maps an event handler of an Xwt component to an event identifier. /// </summary> /// <param name="eventId">The event identifier (must be valid event enum value /// like <see cref="Xwt.Backends.WidgetEvent"/>, identifying component specific events).</param> /// <param name="type">The Xwt component type.</param> /// <param name="methodName">The <see cref="System.Reflection.MethodInfo.Name"/> of the event handler.</param> protected static void MapEvent(object eventId, Type type, string methodName) { EventHost.MapEvent(eventId, type, methodName); }