// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/xml/xul/box.cpp
// Function: smooth::XML::XUL::Box::Box(smooth::XML::Node*)
S::XML::XUL::Box::Box(Node *node) : Widget(node)
{
	layer = NIL;

	if (node != NIL)
	{
		layer = new GUI::Layer();

		if (node->GetName() == "hbox")		orient = HORIZONTAL;
		else if (node->GetName() == "vbox")	orient = VERTICAL;

		for (Int i = 0; i < node->GetNOfNodes(); i++)
		{
			Node		*nNode	= node->GetNthNode(i);
			XUL::Widget	*widget	= NIL;

			if (nNode->GetName() == "box" || nNode->GetName() == "hbox" || nNode->GetName() == "vbox")
			{
				widget = new XUL::Box(nNode);

				layer->Add(widget->GetWidget());

				widgets.Add(widget);
			}
			else if (nNode->GetName() == "button")
			{
				widget = new XUL::Button(nNode);

				layer->Add(widget->GetWidget());

				widgets.Add(widget);
			}
			else if (nNode->GetName() == "textbox")
			{
				widget = new XUL::TextBox(nNode);

				layer->Add(widget->GetWidget());

				widgets.Add(widget);
			}
			else if (nNode->GetName() == "label")
			{
				widget = new XUL::Label(nNode);

				layer->Add(widget->GetWidget());

				widgets.Add(widget);
			}
			else if (nNode->GetName() == "description")
			{
				widget = new XUL::Description(nNode);

				layer->Add(widget->GetWidget());

				widgets.Add(widget);
			}
		}

		CalculateChildMetrics();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x579a0
leaq 0xb4ef4(%rip), %rax     # 0x169540
movq %rax, (%rbx)
leaq 0x88(%rbx), %r14
movq %r14, %rdi
callq 0x55d90
leaq 0xab19b(%rip), %rax     # 0x15f800
movq %rax, 0xc8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%rbx)
leaq 0xb4f03(%rip), %rax     # 0x169580
movq %rax, 0x88(%rbx)
movq $0x0, 0x80(%rbx)
testq %r15, %r15
je 0xb496f
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x556b0
movq %rax, %r12
movq %rsp, %rdi
xorl %esi, %esi
callq 0x58e20
movq %rsp, %rsi
movq %r12, %rdi
callq 0x56a90
movq %r12, 0x80(%rbx)
movq %rsp, %rdi
callq 0x59200
movq %r15, %rdi
callq 0x57d50
leaq 0x5e3c8(%rip), %rsi     # 0x112aa0
movq %rax, %rdi
callq 0x57ef0
testb %al, %al
je 0xb46ed
movq 0xb7615(%rip), %rax     # 0x16bd00
jmp 0xb470f
movq %r15, %rdi
callq 0x57d50
leaq 0x5e3a9(%rip), %rsi     # 0x112aa5
movq %rax, %rdi
callq 0x57ef0
testb %al, %al
je 0xb4716
movq 0xb74e1(%rip), %rax     # 0x16bbf0
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x56050
cmpl %eax, %ebp
jge 0xb4967
movq %r15, %rdi
movl %ebp, %esi
callq 0x57e20
movq %rax, %r13
movq %rax, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5e35a(%rip), %rsi     # 0x112aa1
callq 0x57ef0
testb %al, %al
jne 0xb4786
movq %r13, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5e33e(%rip), %rsi     # 0x112aa0
callq 0x57ef0
testb %al, %al
jne 0xb4786
movq %r13, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5e328(%rip), %rsi     # 0x112aa5
callq 0x57ef0
testb %al, %al
je 0xb47d2
movl $0xe0, %edi
callq 0x556b0
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
callq 0xb462c
movq 0x80(%rbx), %r13
movq (%r12), %rax
movq %r12, %rdi
callq *0x10(%rax)
movq (%r13), %rcx
movq %r13, %rdi
movq %rax, %rsi
callq *0x30(%rcx)
movq %r12, (%rsp)
movq %r14, %rdi
movq %rsp, %rsi
callq 0x5aed8
incl %ebp
jmp 0xb4718
movq %r13, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5e383(%rip), %rsi     # 0x112b67
callq 0x57ef0
testb %al, %al
je 0xb4834
movl $0x88, %edi
callq 0x556b0
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
callq 0xb4bb0
movq 0x80(%rbx), %r13
movq (%r12), %rax
movq %r12, %rdi
callq *0x10(%rax)
movq (%r13), %rcx
movq %r13, %rdi
movq %rax, %rsi
callq *0x30(%rcx)
movq %r12, (%rsp)
movq %r14, %rdi
movq %rsp, %rsi
callq 0x5aed8
jmp 0xb47cb
movq %r13, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5e264(%rip), %rsi     # 0x112aaa
callq 0x57ef0
testb %al, %al
je 0xb4899
movl $0x88, %edi
callq 0x556b0
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
callq 0xb58a8
movq 0x80(%rbx), %r13
movq (%r12), %rax
movq %r12, %rdi
callq *0x10(%rax)
movq (%r13), %rcx
movq %r13, %rdi
movq %rax, %rsi
callq *0x30(%rcx)
movq %r12, (%rsp)
movq %r14, %rdi
movq %rsp, %rsi
callq 0x5aed8
jmp 0xb47cb
movq %r13, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5e207(%rip), %rsi     # 0x112ab2
callq 0x57ef0
testb %al, %al
je 0xb48fe
movl $0x88, %edi
callq 0x556b0
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
callq 0xb4e64
movq 0x80(%rbx), %r13
movq (%r12), %rax
movq %r12, %rdi
callq *0x10(%rax)
movq (%r13), %rcx
movq %r13, %rdi
movq %rax, %rsi
callq *0x30(%rcx)
movq %r12, (%rsp)
movq %r14, %rdi
movq %rsp, %rsi
callq 0x5aed8
jmp 0xb47cb
movq %r13, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5e1a8(%rip), %rsi     # 0x112ab8
callq 0x57ef0
testb %al, %al
je 0xb47cb
movl $0x88, %edi
callq 0x556b0
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
callq 0xb4d7c
movq 0x80(%rbx), %r13
movq (%r12), %rax
movq %r12, %rdi
callq *0x10(%rax)
movq (%r13), %rcx
movq %r13, %rdi
movq %rax, %rsi
callq *0x30(%rcx)
movq %r12, (%rsp)
movq %r14, %rdi
movq %rsp, %rsi
callq 0x5aed8
jmp 0xb47cb
movq %rbx, %rdi
callq 0xb49de
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb49a0
jmp 0xb49a0
jmp 0xb49a0
movq %rax, %r15
movq %rsp, %rdi
callq 0x59200
jmp 0xb4994
movq %rax, %r15
movl $0x5b8, %esi            # imm = 0x5B8
jmp 0xb49b4
movq %rax, %r15
jmp 0xb49cd
movq %rax, %r15
movl $0x88, %esi
jmp 0xb49b4
jmp 0xb49c2
movq %rax, %r15
movl $0xe0, %esi
movq %r12, %rdi
callq 0x55480
jmp 0xb49c5
jmp 0xb49c2
jmp 0xb49c2
movq %rax, %r15
movq %r14, %rdi
callq 0x5b0ee
movq %rbx, %rdi
callq 0x59020
movq %r15, %rdi
callq 0x57090
nop