private static bool DoesGeckoElementOriginateFromConfigNode(ConfigurableDictionaryNode configNode, GeckoElement element, ConfigurableDictionaryNode topLevelNode) { Guid dummyGuid; GeckoElement dummyElement; var classListForGeckoElement = XhtmlDocView.GetClassListFromGeckoElement(element, out dummyGuid, out dummyElement); classListForGeckoElement.RemoveAt(0); // don't need the top level class var nodeToMatch = DictionaryConfigurationController.FindConfigNode(topLevelNode, classListForGeckoElement); return(Equals(nodeToMatch, configNode)); }
/// <summary> /// Handle a mouse click in the web browser displaying the xhtml. /// </summary> private void OnDomClick(object sender, DomMouseEventArgs e) { XhtmlDocView.CloseContextMenuIfOpen(); var browser = m_mainView.NativeBrowser as GeckoWebBrowser; if (browser == null) { return; } var element = browser.DomDocument.ElementFromPoint(e.ClientX, e.ClientY); if (element == null || element.TagName == "html") { return; } if (e.Button == GeckoMouseButton.Left) { XhtmlDocView.HandleDomLeftClick(Clerk, m_propertyTable, e, element); } else if (e.Button == GeckoMouseButton.Right) { XhtmlDocView.HandleDomRightClick(browser, e, element, m_propertyTable, m_mediator); } }
/// <summary> /// Handle the 'File Print...' menu item click (defined in the Lexicon areaConfiguration.xml) /// </summary> /// <param name="commandObject"></param> /// <returns></returns> public bool OnPrint(object commandObject) { XhtmlDocView.PrintPage(m_mainView); return(true); }