
assert(web.layout.element);
var dll = ..web.layout.dll;

namespace web.layout.element;

class style{
	ctor(element){
		this.element = element;
	}
	@_meta;
}
namespace style{ 
	_meta = {
		_get = function(k){
			var r,p = GetStyleAttribute(owner.element.handle,k);
			if(r==0){
				return ..string.fromUnicode(p, 0,true)
			}
		}
		_set = function(k,v){
			var r = SetStyleAttribute(owner.element.handle,k,..string.toUnicode(v) );
		};
	}
	GetStyleAttribute = dll.api("HTMLayoutGetStyleAttribute", "int(pointer he, pointer name, pointer& p_value)");
	SetStyleAttribute = dll.api("HTMLayoutSetStyleAttribute", "int(pointer he, pointer name, pointer value)");
	EnumElementStyles = dll.api("HTMLayoutEnumElementStyles", "int(pointer he, pointer callback, pointer callback_prm)");
}

/**intellisense()
!htmlayout_style.visiblity = 可见状态
!htmlayout_style.display = 显示样式
!htmlayout_style.cursor = 鼠标指针
!htmlayout_style.height = 高度
!htmlayout_style.width = 宽度
!htmlayout_style.top = 顶部位置
!htmlayout_style.left = 左侧位置
!htmlayout_style.margin = 外边距
!htmlayout_style.padding = 内边距
end intellisense**/