// File: /workspace/github_cpp_makefile_star2_O2/eiskalteschatten[P]developersnotebook/src/views/DashboardView.cpp
// Function: DashboardView::DashboardView(void*)
DashboardView::DashboardView(void *window_obj) {
    main_window_obj = window_obj;

    const int grid_spacing = 20;

    main_widget = gtk_grid_new();
    gtk_widget_set_halign(main_widget, GTK_ALIGN_FILL);
    gtk_widget_set_valign(main_widget, GTK_ALIGN_FILL);
    gtk_grid_set_column_spacing(GTK_GRID(main_widget), grid_spacing);
    gtk_grid_set_row_spacing(GTK_GRID(main_widget), grid_spacing);
    gtk_container_set_border_width(GTK_CONTAINER(main_widget), grid_spacing);

    gtk_grid_insert_row(GTK_GRID(main_widget), 0);
    gtk_grid_insert_row(GTK_GRID(main_widget), 1);
    gtk_grid_insert_column(GTK_GRID(main_widget), 0);

    // Setup grid for application title, logo, etc
    {
        GtkWidget *title_grid = gtk_grid_new();

        gtk_grid_insert_row(GTK_GRID(title_grid), 0);
        gtk_grid_insert_row(GTK_GRID(title_grid), 1);
        gtk_grid_insert_column(GTK_GRID(title_grid), 0);
        gtk_grid_insert_column(GTK_GRID(title_grid), 1);

        gtk_grid_set_column_spacing(GTK_GRID(title_grid), 10);

        // -- Logo
        GtkWidget *logo = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        gtk_widget_set_size_request(logo, 100, 100);
        gtk_widget_set_name(logo, "dashboard-logo");
        gtk_grid_attach(GTK_GRID(title_grid), logo, 0, 0, 1, 2);

        gchar *markup = nullptr;

        // Title
        GtkWidget *title          = gtk_label_new(NULL);
        const gchar *app_name     = Constants::application_name.c_str();
        const gchar *format_title = "<span font_weight=\"heavy\" font_size=\"xx-large\">\%s</span>";
        markup                    = g_markup_printf_escaped(format_title, app_name);
        gtk_label_set_markup(GTK_LABEL(title), markup);

        g_object_set(title, "hexpand", TRUE, NULL);
        gtk_widget_set_halign(title, GTK_ALIGN_START);
        gtk_grid_attach(GTK_GRID(title_grid), title, 1, 0, 1, 1);

        // Slogan
        GtkWidget *slogan          = gtk_label_new(NULL);
        const gchar *app_slogan    = Constants::application_slogan.c_str();
        const gchar *format_slogan = "<span font_size=\"large\">\%s</span>";
        markup                     = g_markup_printf_escaped(format_slogan, app_slogan);
        gtk_label_set_markup(GTK_LABEL(slogan), markup);

        g_object_set(slogan, "hexpand", TRUE, NULL);
        gtk_widget_set_halign(slogan, GTK_ALIGN_START);
        gtk_widget_set_valign(slogan, GTK_ALIGN_START);
        gtk_grid_attach(GTK_GRID(title_grid), slogan, 1, 1, 1, 1);

        g_free(markup);

        gtk_grid_attach(GTK_GRID(main_widget), title_grid, 0, 0, 2, 1);
    }

    // Projects Ending Soon
    {
        GtkWidget *projects_ending_soon_grid = gtk_grid_new();
        gtk_grid_set_row_spacing(GTK_GRID(projects_ending_soon_grid), 10);

        gtk_grid_insert_row(GTK_GRID(projects_ending_soon_grid), 0);
        gtk_grid_insert_row(GTK_GRID(projects_ending_soon_grid), 1);
        gtk_grid_insert_column(GTK_GRID(projects_ending_soon_grid), 0);

        // Title
        GtkWidget *title          = gtk_label_new(NULL);
        const gchar *format_title = "<span font_weight=\"heavy\" font_size=\"x-large\">\%s</span>";
        const gchar *markup       = g_markup_printf_escaped(format_title, "Projects Ending Soon");
        gtk_label_set_markup(GTK_LABEL(title), markup);

        g_object_set(title, "hexpand", TRUE, NULL);
        gtk_widget_set_halign(title, GTK_ALIGN_START);
        gtk_grid_attach(GTK_GRID(projects_ending_soon_grid), title, 0, 0, 1, 1);

        // Tree View
        setup_projects_ending_soon();
        gtk_grid_attach(GTK_GRID(projects_ending_soon_grid), projects_ending_soon_scrolled_window, 0, 1, 1, 1);

        gtk_grid_attach(GTK_GRID(main_widget), projects_ending_soon_grid, 0, 1, 1, 1);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xe890
movq %r14, 0x28(%rbx)
callq 0x8c60
movq %rax, 0x8(%rbx)
movq %rax, %rdi
xorl %esi, %esi
callq 0x8d60
movq 0x8(%rbx), %rdi
xorl %esi, %esi
callq 0x8ec0
movq 0x8(%rbx), %r15
callq 0x89f0
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x8150
pushq $0x14
popq %rsi
movq %rax, %rdi
callq 0x8210
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8150
pushq $0x14
popq %rsi
movq %rax, %rdi
callq 0x8470
movq 0x8(%rbx), %r15
callq 0x89e0
movq %r15, %rdi
movq %rax, %rsi
callq 0x8150
pushq $0x14
popq %rsi
movq %rax, %rdi
callq 0x9050
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8150
movq %rax, %rdi
xorl %esi, %esi
callq 0x82f0
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8150
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x82f0
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8150
movq %rax, %rdi
xorl %esi, %esi
callq 0x8750
callq 0x8c60
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x8150
movq %rax, %rdi
xorl %esi, %esi
callq 0x82f0
movq %r15, %rdi
movq %r14, %rsi
callq 0x8150
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x82f0
movq %r15, %rdi
movq %r14, %rsi
callq 0x8150
movq %rax, %rdi
xorl %esi, %esi
callq 0x8750
movq %r15, %rdi
movq %r14, %rsi
callq 0x8150
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x8750
movq %r15, %rdi
movq %r14, %rsi
callq 0x8150
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x8210
xorl %edi, %edi
xorl %esi, %esi
callq 0x8fb0
movq %rax, %r12
pushq $0x64
popq %rdx
movq %rax, %rdi
movl %edx, %esi
callq 0x90c0
leaq 0x1323a(%rip), %rsi     # 0x22413
movq %r12, %rdi
callq 0x8230
movq %r15, %rdi
movq %r14, %rsi
callq 0x8150
pushq $0x1
popq %r8
pushq $0x2
popq %r9
movq %rax, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x8b00
xorl %edi, %edi
callq 0x8840
movq %rax, %r13
movq 0x2415c(%rip), %rsi     # 0x33370
leaq 0x13207(%rip), %rdi     # 0x22422
xorl %eax, %eax
callq 0x82a0
movq %rax, %rbp
callq 0x8e10
movq %rax, %r12
movq %r13, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8cb0
leaq 0x12fdc(%rip), %rsi     # 0x22226
pushq $0x1
popq %rdx
movq %r13, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f60
pushq $0x1
popq %rsi
movq %r13, %rdi
callq 0x8d60
movq %r15, %rdi
movq %r14, %rsi
callq 0x8150
pushq $0x1
popq %rdx
movq %rax, %rdi
movq %r13, %rsi
xorl %ecx, %ecx
movl %edx, %r8d
movl %edx, %r9d
callq 0x8b00
xorl %edi, %edi
callq 0x8840
movq %rax, %r13
movq 0x2413a(%rip), %rsi     # 0x333d0
leaq 0x131be(%rip), %rdi     # 0x2245b
xorl %eax, %eax
callq 0x82a0
movq %rax, %rbp
movq %r13, %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8cb0
leaq 0x12f62(%rip), %rsi     # 0x22226
pushq $0x1
popq %rdx
movq %r13, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f60
pushq $0x1
popq %rsi
movq %r13, %rdi
callq 0x8d60
pushq $0x1
popq %rsi
movq %r13, %rdi
callq 0x8ec0
movq %r15, %rdi
movq %r14, %rsi
callq 0x8150
pushq $0x1
popq %rcx
movq %rax, %rdi
movq %r13, %rsi
movl %ecx, %edx
movl %ecx, %r8d
movl %ecx, %r9d
callq 0x8b00
movq %rbp, %rdi
callq 0x9118
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8150
pushq $0x2
popq %r8
pushq $0x1
popq %r9
movq %rax, %rdi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x8b00
callq 0x8c60
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x8150
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x8470
movq %r15, %rdi
movq %r14, %rsi
callq 0x8150
movq %rax, %rdi
xorl %esi, %esi
callq 0x82f0
movq %r15, %rdi
movq %r14, %rsi
callq 0x8150
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x82f0
movq %r15, %rdi
movq %r14, %rsi
callq 0x8150
movq %rax, %rdi
xorl %esi, %esi
callq 0x8750
xorl %edi, %edi
callq 0x8840
movq %rax, %r13
leaq 0x130d9(%rip), %rdi     # 0x2247d
leaq 0x1310a(%rip), %rsi     # 0x224b5
xorl %eax, %eax
callq 0x82a0
movq %rax, %rbp
movq %r13, %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8cb0
leaq 0x12e54(%rip), %rsi     # 0x22226
pushq $0x1
popq %rdx
movq %r13, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f60
pushq $0x1
popq %rsi
movq %r13, %rdi
callq 0x8d60
movq %r15, %rdi
movq %r14, %rsi
callq 0x8150
pushq $0x1
popq %r8
movq %rax, %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r8d, %r9d
callq 0x8b00
movq %rbx, %rdi
callq 0xf48e
movq %r15, %rdi
movq %r14, %rsi
callq 0x8150
movq 0x18(%rbx), %rsi
pushq $0x1
popq %rcx
movq %rax, %rdi
xorl %edx, %edx
movl %ecx, %r8d
movl %ecx, %r9d
callq 0x8b00
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8150
pushq $0x1
popq %rcx
movq %rax, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl %ecx, %r8d
movl %ecx, %r9d
callq 0x8b00
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf47a
jmp 0xf47a
jmp 0xf47a
jmp 0xf47a
jmp 0xf47a
jmp 0xf47a
jmp 0xf47a
jmp 0xf47a
jmp 0xf47a
movq %rax, %r14
movq %rbx, %rdi
callq 0xe896
movq %r14, %rdi
callq 0x87f0
nop