Exemple #1
0
        /// <summary>
        /// Propagate the BoxClicked event from root container.
        /// </summary>
        protected virtual void OnBoxClicked(BoxClickedEventArgs e)
        {
            var handler = BoxClicked;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemple #2
0
        /// <summary>
        /// Handles the case where a box with the attribute "clickable" has been clicked or double clicked
        /// </summary>
        public void HandleBoxClicked(int clickNb, RPoint location)
        {
            CssBox box = DomUtils.SearchClickedBox(_root, OffsetByScroll(location));

            if (box != null)
            {
                if (BoxClicked != null)
                {
                    var args = new BoxClickedEventArgs(box.GetAttribute("clickable"), clickNb);
                    try {
                        BoxClicked(this, args);
                    } catch (Exception ex) {
                        throw new HtmlLinkClickedException("Error in box clicked intercept", ex);
                    }
                    if (args.Handled)
                    {
                        return;
                    }
                }
            }
        }
Exemple #3
0
 private void OnBoxClicked(object sender, BoxClickedEventArgs e)
 {
     OnBoxClicked(e);
 }
Exemple #4
0
 /// <summary>
 /// Propagate the BoxClicked event from root container.
 /// </summary>
 protected virtual void OnBoxClicked(BoxClickedEventArgs e)
 {
     BoxClicked?.Invoke(this, e);
 }