public static void OnPostedContentChange() { in_content_change = false; SciterValue sv = App.AppHost.EvalScript("View.omnidata.dom_tree_disable"); if (sv.Get(false) == false) { DOMTree.Rebuild(); } if (g_el_inspected != null) { // element might have been removed, so restore selection to its closest parent from its parent stack (g_parentstack) SciterElement el_sel = null; if (g_parentstack != null) { foreach (var item in g_parentstack) { IntPtr hwnd; if (SciterX.API.SciterGetElementHwnd(item._he, out hwnd, true) == SciterXDom.SCDOM_RESULT.SCDOM_OK) { el_sel = item; break; } } } if (el_sel != null) { //if(el_sel==g_el_inspected) // PageElemHighlight(el_sel);// something to test out, it is anoying PageElemInspect(el_sel, true); } } }
public static void UserPageElemInspect(SciterElement el) { App.AppHost.CallFunction("Inspector.ShowInspector", new SciterValue(0)); // tree not constructed? SciterValue sv = App.AppHost.EvalScript("View.omnidata.dom_tree_disable"); if (sv.Get(false) == true) { DOMTree.Rebuild(); } /*wstring tag = el.get_tagname(); - why I had this? commented... * if(tag=="text") * { * if(cast(int) el.parent) * el = el.parent; * else * return; * }*/ PageElemInspect(el, true); PageElemHighlight(el); }
public static void PageElemInspect(SciterElement el, bool tree_nav) { Debug.Assert(el != null); g_el_inspected = el; g_parentstack = DOMTree.TreeNavigateTo(el, tree_nav); }
static public void Reload() { Reset(); DOMTree.Clear(); }