MCPcopy Create free account
hub / github.com/dillo-browser/dillo / UI

Method UI

src/ui.cc:652–704  ·  view source on GitHub ↗

* User Interface constructor */

Source from the content-addressed store, hash-verified

650 * User Interface constructor
651 */
652UI::UI(int x, int y, int ui_w, int ui_h, const char* label, const UI *cur_ui) :
653 CustGroupVertical(x, y, ui_w, ui_h, label)
654{
655 LocBar = NavBar = StatusBar = NULL;
656
657 Tabs = NULL;
658 TopGroup = this;
659 TopGroup->box(FL_NO_BOX);
660 clear_flag(SHORTCUT_LABEL);
661
662 PanelTemporary = false;
663 if (cur_ui) {
664 PanelSize = cur_ui->PanelSize;
665 Small_Icons = cur_ui->Small_Icons;
666 Panelmode = cur_ui->Panelmode;
667 } else {
668 // Set some default values
669 PanelSize = prefs.panel_size;
670 Small_Icons = prefs.small_icons;
671 Panelmode = (prefs.fullwindow_start) ? UI_HIDDEN : UI_NORMAL;
672 }
673
674 // Control panel
675 TopGroup->begin();
676 make_panel(ui_w);
677
678 // Render area
679 Main = new Fl_Group(0,0,0,0,"Welcome..."); // size is set by rearrange()
680 Main->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
681 Main->box(FL_FLAT_BOX);
682 Main->labelfont(FL_HELVETICA_BOLD_ITALIC);
683 Main->labelsize(36);
684 Main->labeltype(FL_SHADOW_LABEL);
685 TopGroup->add(Main);
686 TopGroup->resizable(Main);
687 MainIdx = TopGroup->find(Main);
688
689 // Find text bar
690 FindBar = new Findbar(ui_w, fh);
691 TopGroup->add(FindBar);
692
693 // Status Panel
694 make_status_bar(ui_w, ui_h);
695 TopGroup->add(StatusBar);
696 TopGroup->end();
697 TopGroup->rearrange();
698
699 customize();
700
701 if (Panelmode == UI_HIDDEN) {
702 panels_toggle();
703 }
704}
705
706/**
707 * UI destructor

Callers

nothing calls this directly

Calls 3

findMethod · 0.80
addMethod · 0.45
rearrangeMethod · 0.45

Tested by

no test coverage detected