// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/tools/designer/designer.cpp
// Function: Designer::Designer()
Designer::Designer() : Application("smooth Designer")
{
	dlgcounter = 1;
	active_dlg = NIL;

	wnd		= new GUI::Window(String("smooth Designer v").Append(SMOOTH_VERSION), Point(50, 50), Size(600, 87));
	title		= new Titlebar(TB_MINBUTTON | TB_CLOSEBUTTON);
	menubar		= new Menubar();
	iconbar		= new Menubar();
	statusbar	= new Statusbar("Ready");

	timer1		= new Timer();
	timer1->onInterval.Connect(&Designer::TimerProc, this);

	menu_file	= new PopupMenu();
	menu_dialog	= new PopupMenu();

	menu_widgets		= new PopupMenu();
	menu_widgets_add	= new PopupMenu();
	menu_widgets_add_smooth	= new PopupMenu();

	menubar->AddEntry("File", menu_file);
	menubar->AddEntry("Dialog", menu_dialog);
	menubar->AddEntry("Widgets", menu_widgets);

	menu_file->AddEntry("Exit")->onAction.Connect(&Designer::Close, this);

	menu_dialog->AddEntry("New")->onAction.Connect(&Designer::NewDialog, this);

	menu_widgets->AddEntry("Add", menu_widgets_add);

	menu_widgets_add->AddEntry("smooth controls", menu_widgets_add_smooth);

	menu_widgets_add_smooth->AddEntry("Button")->onAction.Connect(&Designer::AddButton, this);
	menu_widgets_add_smooth->AddEntry("Layer")->onAction.Connect(&Designer::AddLayer, this);
	menu_widgets_add_smooth->AddEntry("Menubar")->onAction.Connect(&Designer::AddMenubar, this);

	Add(wnd);

	wnd->Add(title);
	wnd->Add(menubar);
	wnd->Add(iconbar);
	wnd->Add(statusbar);

	wnd->SetIcon(NIL);

	wnd->doClose.Connect(&Designer::ExitProc, this);

	wnd->Show();

	timer1->Start(100);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x2a1f(%rip), %rsi      # 0x703e
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4350
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4340
leaq 0x8(%rsp), %rdi
callq 0x4200
leaq 0x6070(%rip), %rax      # 0xa6b8
movq %rax, (%rbx)
leaq 0x618(%rbx), %rdi
callq 0x53dc
leaq 0x660(%rbx), %r14
movq %r14, %rdi
callq 0x53e8
movl $0x1, 0x610(%rbx)
andq $0x0, 0x6b8(%rbx)
movl $0x6d8, %edi            # imm = 0x6D8
callq 0x4250
movq %rax, %r12
leaq 0x29c2(%rip), %rsi      # 0x704e
leaq 0x8(%rsp), %rdi
callq 0x4350
leaq 0x29c3(%rip), %rsi      # 0x7060
leaq 0x20(%rsp), %rdi
callq 0x4350
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x40a0
movabsq $0x3200000032, %rcx     # imm = 0x3200000032
leaq 0x40(%rsp), %rdx
movq %rcx, (%rdx)
movabsq $0x5700000258, %rsi     # imm = 0x5700000258
leaq 0x38(%rsp), %rcx
movq %rsi, (%rcx)
movq %r12, %rdi
movq %rax, %rsi
xorl %r8d, %r8d
callq 0x4160
movq %r12, 0x5b8(%rbx)
leaq 0x20(%rsp), %rdi
callq 0x4200
leaq 0x8(%rsp), %rdi
callq 0x4200
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x4250
movq %rax, %r12
pushq $0x5
popq %rsi
movq %rax, %rdi
callq 0x40c0
movq %r12, 0x5c0(%rbx)
movl $0x688, %edi            # imm = 0x688
callq 0x4250
movq %rax, %r12
movq %rax, %rdi
callq 0x4140
movq %r12, 0x5c8(%rbx)
movl $0x688, %edi            # imm = 0x688
callq 0x4250
movq %rax, %r12
movq %rax, %rdi
callq 0x4140
movq %r12, 0x5d0(%rbx)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x4250
movq %rax, %r12
leaq 0x28f9(%rip), %rsi      # 0x7067
leaq 0x8(%rsp), %rdi
callq 0x4350
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x40b0
movq %r12, 0x5d8(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x4200
pushq $0x68
popq %rdi
callq 0x4250
movq %rax, %r12
movq %rax, %rdi
callq 0x4290
movq %r12, 0x608(%rbx)
addq $0x48, %r12
leaq 0x521(%rip), %rsi       # 0x4cdc
movq %r12, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x53fe
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x4250
movq %rax, %r12
movq %rax, %rdi
callq 0x43b0
movq %r12, 0x5e0(%rbx)
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x4250
movq %rax, %r12
movq %rax, %rdi
callq 0x43b0
movq %r12, 0x5e8(%rbx)
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x4250
movq %rax, %r12
movq %rax, %rdi
callq 0x43b0
movq %r12, 0x5f0(%rbx)
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x4250
movq %rax, %r12
movq %rax, %rdi
callq 0x43b0
movq %r12, 0x5f8(%rbx)
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x4250
movq %rax, %r12
movq %rax, %rdi
callq 0x43b0
movq %r12, 0x600(%rbx)
movq 0x5c8(%rbx), %r15
leaq 0x280b(%rip), %rsi      # 0x706d
leaq 0x8(%rsp), %rdi
callq 0x4350
movq 0x5e0(%rbx), %rdx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x549a
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x5c8(%rbx), %r15
leaq 0x27da(%rip), %rsi      # 0x7072
leaq 0x8(%rsp), %rdi
callq 0x4350
movq 0x5e8(%rbx), %rdx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x549a
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x5c8(%rbx), %r15
leaq 0x27ab(%rip), %rsi      # 0x7079
leaq 0x8(%rsp), %rdi
callq 0x4350
movq 0x5f0(%rbx), %rdx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x549a
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x5e0(%rbx), %r15
leaq 0x277d(%rip), %rsi      # 0x7081
leaq 0x8(%rsp), %rdi
callq 0x4350
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x549a
addq $0x478, %rax            # imm = 0x478
leaq 0x4aa(%rip), %rsi       # 0x4dd4
movq %rax, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x53fe
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x5e8(%rbx), %r15
leaq 0x2737(%rip), %rsi      # 0x7086
leaq 0x8(%rsp), %rdi
callq 0x4350
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x549a
addq $0x478, %rax            # imm = 0x478
leaq 0x46b(%rip), %rsi       # 0x4de0
movq %rax, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x53fe
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x5f0(%rbx), %r15
leaq 0x26f0(%rip), %rsi      # 0x708a
leaq 0x8(%rsp), %rdi
callq 0x4350
movq 0x5f8(%rbx), %rdx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x549a
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x5f8(%rbx), %r15
leaq 0x26be(%rip), %rsi      # 0x708e
leaq 0x8(%rsp), %rdi
callq 0x4350
movq 0x600(%rbx), %rdx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x549a
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x600(%rbx), %r15
leaq 0x2698(%rip), %rsi      # 0x709e
leaq 0x8(%rsp), %rdi
callq 0x4350
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x549a
addq $0x478, %rax            # imm = 0x478
leaq 0x4ac(%rip), %rsi       # 0x4ed8
movq %rax, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x53fe
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x600(%rbx), %r15
leaq 0x2654(%rip), %rsi      # 0x70a5
leaq 0x8(%rsp), %rdi
callq 0x4350
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x549a
addq $0x478, %rax            # imm = 0x478
leaq 0x477(%rip), %rsi       # 0x4eee
movq %rax, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x53fe
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x600(%rbx), %r15
leaq 0x260f(%rip), %rsi      # 0x70ab
leaq 0x8(%rsp), %rdi
callq 0x4350
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x549a
addq $0x478, %rax            # imm = 0x478
leaq 0x442(%rip), %rsi       # 0x4f04
movq %rax, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x53fe
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x5b8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movq 0x5b8(%rbx), %rdi
movq 0x5c0(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5b8(%rbx), %rdi
movq 0x5c8(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5b8(%rbx), %rdi
movq 0x5d0(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5b8(%rbx), %rdi
movq 0x5d8(%rbx), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x5b8(%rbx), %r15
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x4390
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x41f0
leaq 0x8(%rsp), %rdi
callq 0x40f0
movl $0x688, %edi            # imm = 0x688
addq 0x5b8(%rbx), %rdi
leaq 0x3a4(%rip), %rsi       # 0x4f1a
xorl %edx, %edx
movq %rbx, %rcx
callq 0x5510
movq 0x5b8(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq 0x608(%rbx), %rdi
pushq $0x64
popq %rsi
callq 0x4030
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x40f0
jmp 0x4cb8
jmp 0x4cb5
jmp 0x4cb5
jmp 0x4cb5
jmp 0x4cb5
jmp 0x4ca6
jmp 0x4cb5
jmp 0x4ca6
jmp 0x4cb5
jmp 0x4cb5
jmp 0x4cb5
jmp 0x4ca6
jmp 0x4cb5
jmp 0x4ca6
jmp 0x4cb5
jmp 0x4ca6
jmp 0x4cb5
jmp 0x4c12
jmp 0x4c12
jmp 0x4c12
jmp 0x4c12
movq %rax, %r15
movl $0x6b8, %esi            # imm = 0x6B8
jmp 0x4c7b
movq %rax, %r15
pushq $0x68
popq %rsi
jmp 0x4c7b
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x4200
jmp 0x4c36
movq %rax, %r15
movl $0x5b8, %esi            # imm = 0x5B8
jmp 0x4c7b
jmp 0x4c3f
movq %rax, %r15
movl $0x688, %esi            # imm = 0x688
jmp 0x4c7b
movq %rax, %r15
movl $0x5c8, %esi            # imm = 0x5C8
jmp 0x4c7b
jmp 0x4c55
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0x4200
jmp 0x4c67
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x4200
jmp 0x4c76
movq %rax, %r15
movl $0x6d8, %esi            # imm = 0x6D8
movq %r12, %rdi
callq 0x4050
jmp 0x4cb8
movq %rax, %r15
jmp 0x4cc0
movq %rax, %r15
jmp 0x4ccc
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x4200
jmp 0x4cd4
jmp 0x4ca6
jmp 0x4ca6
jmp 0x4ca6
jmp 0x4ca6
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x4200
jmp 0x4cb8
movq %rax, %r15
movq %r14, %rdi
callq 0x5546
leaq 0x628(%rbx), %rdi
callq 0x4200
movq %rbx, %rdi
callq 0x4220
movq %r15, %rdi
callq 0x4150