4
namespace Stetic.Editor
6
public class IconSelectorMenuItem: Gtk.MenuItem
8
IconSelectorItem selector;
10
public event IconEventHandler IconSelected;
12
public IconSelectorMenuItem (IconSelectorItem item)
18
protected override bool OnButtonPressEvent (Gdk.EventButton ev)
20
if (IconSelected != null)
21
IconSelected (this, new IconEventArgs (selector.SelectedIcon));
23
return base.OnButtonPressEvent (ev);
26
protected override bool OnEnterNotifyEvent (Gdk.EventCrossing ev)
31
protected override bool OnLeaveNotifyEvent (Gdk.EventCrossing ev)
33
selector.ProcessLeaveNotifyEvent (ev);
37
protected override bool OnMotionNotifyEvent (Gdk.EventMotion ev)
39
selector.ProcessMotionEvent ((int)ev.X - selector.Allocation.X + Allocation.X, (int)ev.Y - selector.Allocation.Y + Allocation.Y);
44
public delegate void IconEventHandler (object s, IconEventArgs args);
46
public class IconEventArgs: EventArgs
50
public IconEventArgs (string iconId)
55
public string IconId {
56
get { return iconId; }