public SetAttribute ( |
||
attr | ||
return | void |
public DomElement GetTitleNode(DomElement hostNode) { //------------------------------------- if (titleNode != null) return titleNode; //create dom node var ownerdoc = hostNode.OwnerDocument; this.titleNode = ownerdoc.CreateElement("div"); titleNode.SetAttribute("style", "display:inline"); titleNode.AddChild("span", span => { if (PageTitle == null) { span.AddTextContent(""); } else { span.AddTextContent(this.PageTitle); } span.AttachMouseDownEvent(e => { if (this.OwnerContainer != null) { this.OwnerContainer.ChildNotifyTabMouseDown(this); } }); }); ////mouse down on title //titleNode.AttachMouseDownEvent(e => //{ //}); //------------------------------------- return titleNode; }
public override DomElement GetPresentationDomNode(WebDom.Impl.HtmlDocument htmldoc) { if (pnode != null) return pnode; //create primary presentation node pnode = htmldoc.CreateElement("div"); pnode.SetAttribute("style", "font:10pt tahoma"); int j = treeNodes.Count; for (int i = 0; i < j; ++i) { pnode.AddChild(treeNodes[i].GetPrimaryPresentationNode(pnode)); } return pnode; }
public override DomElement GetPresentationDomNode(WebDom.Impl.HtmlDocument htmldoc) { if (pnode != null) return pnode; //---------------------------------- pnode = htmldoc.CreateElement("div"); pnode.SetAttribute("style", "display:inline-block;width:" + Width + "px;height:" + this.Height + "px;"); pnode.AddChild("div", div2 => { //init div2.SetAttribute("style", "padding:5px;background-color:#dddddd;"); div2.AddChild("span", span => { span.AddTextContent(this.buttonText); }); //------------------------------ div2.AttachMouseDownEvent(e => { #if DEBUG div2.dbugMark = 1; #endif // div2.SetAttribute("style", "padding:5px;background-color:#aaaaaa;"); EaseScriptElement ee = new EaseScriptElement(div2); ee.ChangeBackgroundColor(Color.FromArgb(0xaa, 0xaa, 0xaa)); //div2.SetAttribute("style", "padding:5px;background-color:#aaaaaa;"); e.StopPropagation(); }); div2.AttachMouseUpEvent(e => { #if DEBUG div2.dbugMark = 2; #endif //div2.SetAttribute("style", "padding:5px;background-color:#dddddd;"); EaseScriptElement ee = new EaseScriptElement(div2); ee.ChangeBackgroundColor(Color.FromArgb(0xdd, 0xdd, 0xdd)); e.StopPropagation(); }); }); return pnode; }
public override DomElement GetPresentationDomNode(WebDom.Impl.HtmlDocument htmldoc) { if (pnode != null) return pnode; this.htmldoc = htmldoc; pnode = htmldoc.CreateElement("div"); //TODO: review IsLandPart again, this is temp fixed if (!this.IsLandPart) { pnode.SetAttribute("style", "position:absolute;width:100px;height:200px"); } if (menuItems != null) { int j = menuItems.Count; for (int i = 0; i < j; ++i) { pnode.AddChild(menuItems[i].GetPresentationDomNode(pnode)); } } return pnode; }
public DomElement GetPrimaryPresentationNode(DomElement hostNode) { if (this.pnode != null) return pnode; //--------------------------------- var ownerdoc = hostNode.OwnerDocument; pnode = ownerdoc.CreateElement("div"); //--------------------------------- //bar part pnode.AddChild("div", node_bar => { this.nodeBar = node_bar; node_bar.AddChild("img", node_icon => { this.nodeIcon = node_icon; SetupNodeIconBehaviour(node_icon); }); node_bar.AddChild("span", node_span => { this.nodeSpan = node_span; if (this.nodeString != null) { node_span.AddTextContent(this.nodeString); } }); }); //--------------------------------- //content part //indent pnode.AddChild("div", node_body => { this.nodeBody = node_body; node_body.SetAttribute("style", "padding-left:17px"); node_body.AddChild("div", node_content => { this.nodeContent = node_content; if (childNodes != null) { nodeContent.SetAttribute("style", "padding-left:0px"); int j = childNodes.Count; for (int i = 0; i < j; ++i) { var childnode = childNodes[i].GetPrimaryPresentationNode(nodeContent); node_content.AddChild(childnode); } } }); }); return pnode; }
public override WebDom.DomElement GetPresentationDomNode(WebDom.Impl.HtmlDocument htmldoc) { if (pnode != null) return pnode; //------------------------------ pnode = htmldoc.CreateElement("div"); pnode.SetAttribute("style", "font:10pt tahoma"); //------------------------------ titleBar = htmldoc.CreateElement("div"); titleBar.AddTextContent("hello tabPage"); pnode.AddChild(titleBar); //------------------------------ tabTitleList = htmldoc.CreateElement("div"); pnode.AddChild(tabTitleList); //------------------------------ contentNode = htmldoc.CreateElement("div"); pnode.AddChild(contentNode); //------------------------------ return pnode; }