
assert(web.layout.element); 
namespace web.layout.element;

class style{
	ctor(element){
		this.element = element;
	}
	@_meta;
}

namespace style { 

  	var dll = ..web.layout._dll;
  	var GetStyleAttribute = dll.api("HTMLayoutGetStyleAttribute", "int(pointer he, pointer name, pointer& p_value)");
	var SetStyleAttribute = dll.api("HTMLayoutSetStyleAttribute", "int(pointer he, pointer name, pointer value)");
	
	var fromUnicode = ..string.fromUnicode;
  	var toUnicode = ..string.toUnicode;
  	
	_meta = {
		_get = function(k){
			var r,p = GetStyleAttribute(owner.element.handle,k);
			if( r == 0/*_HLDOM_OK*/ ){
				return fromUnicode(p, ,true)
			}
		}
		_set = function(k,v){
			SetStyleAttribute(owner.element.handle,k,v!==null ? toUnicode(tostring(v)):null  );
		};
	}
}

/**intellisense()
!htmlayout_style.visiblity = 可见状态,\n值必须是字符串或null
!htmlayout_style.display = 显示样式,\n值必须是字符串或null
!htmlayout_style.cursor = 鼠标指针,\n值必须是字符串或null
!htmlayout_style.height = 高度,\n值必须是字符串或null
!htmlayout_style.width = 宽度,\n值必须是字符串或null
!htmlayout_style.top = 顶部位置,\n值必须是字符串或null
!htmlayout_style.left = 左侧位置,\n值必须是字符串或null
!htmlayout_style.margin = 外边距,\n值必须是字符串或null
!htmlayout_style.padding = 内边距,\n值必须是字符串或null
!htmlayout_style.color = 字体颜色,\n值必须是字符串或null,例如:\nltEle.style.color = "#F00";
!htmlayout_style.background = 背景样式,\n值必须是字符串或null,例如:\nltEle.style.background = "#FFF";
end intellisense**/