
GUI_LINEEDIT_CLASS db GUI_LINEEDIT_CLASS_NAME, 0
GUI_LINEEDIT_PROC equ GUI.LineEdit.Proc

;; GUI.LineEdit widget procedure
; @param e is one of CORE.Event family objects
; @returns 0 or error code
;;
proc GUI.LineEdit.Proc obj:DWORD, e:DWORD
	xor	eax, eax
	ret
endp

proc GUI.LineEdit.Create width:DWORD, height:DWORD, text:DWORD
	invoke	mem_alloc, sizeof.GUI.LineEdit
	stdcall GUI.LineEdit.Init, eax, [width], [height], [text]
	ret
endp

proc GUI.LineEdit.Init obj:DWORD, width:DWORD, height:DWORD, text:DWORD
	push	ebx
	mov	ebx, [obj]
	push	[width]
	pop	[ebx + CORE.Widget.rect.width]
	push	[height]
	pop	[ebx + CORE.Widget.rect.height]
	stdcall CORE.String.Create, [text]
	mov	[ebx + GUI.LineEdit.text], eax
	mov	eax, ebx
	pop	ebx
	ret
endp

proc GUI.LineEdit.Destroy obj:DWORD
	mov	eax, [obj]
	stdcall CORE.String.Destroy, [eax + GUI.LineEdit.text]
	invoke	mem_free, [obj]
	ret
endp

proc GUI.LineEdit.GetText obj:DWORD, text:DWORD
	ret
endp

proc GUI.LineEdit.SetText obj:DWORD, text:DWORD
	ret
endp
