コード例 #1
0
ファイル: NUnitCrowWindow.cs プロジェクト: jpbruyere/crow.deb
        void Mouse_ButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (_hoverWidget == null)
            {
                MouseButtonDown.Raise(this, e);
                return;
            }

            GraphicObject g = _hoverWidget;

            while (!g.Focusable)
            {
                g = g.Parent as GraphicObject;
                if (g == null)
                {
                    return;
                }
            }

            _activeWidget = g;
            _activeWidget.onMouseDown(this, e);
        }
コード例 #2
0
ファイル: GraphicObject.cs プロジェクト: slagusev/Crow
		public virtual void onMouseDown(object sender, MouseButtonEventArgs e){
			if (CurrentInterface.eligibleForDoubleClick == this && CurrentInterface.clickTimer.ElapsedMilliseconds < Interface.DoubleClick)
				onMouseDoubleClick (this, e);
			else
				currentInterface.clickTimer.Restart();
			CurrentInterface.eligibleForDoubleClick = null;

			if (CurrentInterface.ActiveWidget == null)
				CurrentInterface.ActiveWidget = this;
			if (this.Focusable && !Interface.FocusOnHover) {
				BubblingMouseButtonEventArg be = e as BubblingMouseButtonEventArg;
				if (be.Focused == null) {
					be.Focused = this;
					CurrentInterface.FocusedWidget = this;
				}
			}
			//bubble event to the top
			GraphicObject p = Parent as GraphicObject;
			if (p != null)
				p.onMouseDown(sender,e);

			MouseDown.Raise (this, e);
		}
コード例 #3
0
ファイル: NUnitCrowWindow.cs プロジェクト: jpbruyere/Crow
		void Mouse_ButtonDown(object sender, MouseButtonEventArgs e)
		{
			if (_hoverWidget == null) {
				MouseButtonDown.Raise (this, e);
				return;
			}

			GraphicObject g = _hoverWidget;
			while (!g.Focusable) {				
				g = g.Parent as GraphicObject;
				if (g == null) {					
					return;
				}
			}

			_activeWidget = g;
			_activeWidget.onMouseDown (this, e);
		}