Esempio n. 1
0
 public ListWidget(DropDownBoxListWindow win)
 {
     this.win    = win;
     this.Events = Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.PointerMotionMask | Gdk.EventMask.LeaveNotifyMask;
     layout      = new Pango.Layout(this.PangoContext);
     CalcRowHeight();
 }
Esempio n. 2
0
 protected override bool OnButtonPressEvent(Gdk.EventButton e)
 {
     if (e.Button == 3)
     {
         StatusBox.ShowNavigationBarContextMenu();
         return(true);
     }
     if (e.Type == Gdk.EventType.ButtonPress)
     {
         if (window != null)
         {
             DestroyWindow();
         }
         else
         {
             this.GrabFocus();
             if (DataProvider != null)
             {
                 DataProvider.Reset();
                 if (DataProvider.IconCount > 0)
                 {
                     window = new DropDownBoxListWindow(this);
                     PositionListWindow();
                     window.SelectItem(CurrentItem);
                 }
             }
         }
     }
     return(base.OnButtonPressEvent(e));
 }
Esempio n. 3
0
 internal void DestroyWindow()
 {
     if (window != null)
     {
         window.Destroy();
         window = null;
         QueueDraw();
     }
 }
			public ListWidget (DropDownBoxListWindow win)
			{
				this.win = win;
				this.Events = Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.PointerMotionMask | Gdk.EventMask.LeaveNotifyMask;
				layout = new Pango.Layout (this.PangoContext);
				CalcRowHeight ();
			}
		protected override bool OnButtonPressEvent (Gdk.EventButton e)
		{
			if (e.Button == 3) {
				StatusBox.ShowNavigationBarContextMenu ();
				return true;
			}
			if (e.Type == Gdk.EventType.ButtonPress) {
				if (window != null) {
					DestroyWindow ();
				} else {
					this.GrabFocus ();
					if (DataProvider != null) {
						DataProvider.Reset ();
						if (DataProvider.IconCount > 0) {
							window = new DropDownBoxListWindow (this);
							PositionListWindow ();
							window.SelectItem (CurrentItem);
						}
					}
				}
			}
			return base.OnButtonPressEvent (e);
		}
		internal void DestroyWindow ()
		{
			if (window != null) {
				window.Destroy ();
				window = null;
				QueueDraw ();
			}
		}