diff --git a/src/summarymanager.cpp b/src/summarymanager.cpp index e156dff..6f0bcf9 100644 --- a/src/summarymanager.cpp +++ b/src/summarymanager.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -42,21 +43,24 @@ void SummaryCallback(Fl_Widget * w, void * data) { tabs->redraw(); } - } +} + + SummaryManager::SummaryManager(int x, int y, int w, int h) : Fl_Group(x, y, w, h), tabs(x, y, w, h) { - Fl_Group *grp1 = new Fl_Group(x, y + 30, w, h - 30, "Tab1"); + Fl_Group *grp1 = new Fl_Group(x, y + 30, w, h - 30, "Current Project"); grp1->when(FL_WHEN_CLOSED); { Fl_Window *win1 = new Fl_Window(x, y + 30, w, h - 30, "Tab1W"); std::cout << "here" << std::endl; { - auto butt = new Fl_Button(0, 0, 100, 200, "test"); + project_items = new Fl_Multi_Browser(0,0,100,h-30); + auto butt = new Fl_Button(100, 0, 100, 200, "test"); } win1->end(); - auto butt = new Fl_Button(0, 30, 100, 200, "nyaaa"); + //auto butt = new Fl_Button(0, 30, 100, 200, "nyaaa"); } grp1->end(); // Fl_Group *grp2 = new Fl_Group(20, 30, 280, 170, "Tab2"); @@ -178,7 +182,7 @@ void LoadReport(std::string s, Fl_Text_Buffer * text, Fl_Text_Buffer * style) { -Summary::Summary(ComplexEntry c, int x, int y, int w, int h) : Fl_Group(x, y, w, h, "Loading...") { +Summary::Summary(ComplexEntry c, int x, int y, int w, int h) : Fl_Group(x, y, w, h, "Loading..."), entry(c) { title = c.basic.A.name + "+" + c.basic.B.name + "(" + std::to_string(c.basic.Apercent) + "%," + std::to_string(c.basic.Bpercent) + "%)"; this->label(title.c_str()); this->when(FL_WHEN_CLOSED); @@ -202,6 +206,7 @@ Summary::Summary(ComplexEntry c, int x, int y, int w, int h) : Fl_Group(x, y, w, s2->buffer(s2buff); + // s1style_buff->insert(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); // std::cout << c.A_buf.c_str() << std::endl; @@ -221,6 +226,7 @@ Summary::Summary(ComplexEntry c, int x, int y, int w, int h) : Fl_Group(x, y, w, win->resizable(text_boxes); this->callback(SummaryCallback); + } Summary::~Summary() { diff --git a/src/summarymanager.hpp b/src/summarymanager.hpp index eb4c8f9..64841f3 100644 --- a/src/summarymanager.hpp +++ b/src/summarymanager.hpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -22,6 +23,8 @@ struct Summary : Fl_Group { Fl_Text_Buffer * s1style_buff; Fl_Text_Buffer * s2buff; Fl_Text_Buffer * s2style_buff; + + ComplexEntry entry; Summary(ComplexEntry c, int x, int y, int w, int h); ~Summary(); @@ -31,10 +34,15 @@ struct Summary : Fl_Group { struct SummaryManager : Fl_Group { SummaryManager(int x, int y, int w, int h); Fl_Tabs tabs; + Fl_Multi_Browser * project_items; + + std::vector items; void addComplex(ComplexEntry& c); + void addCurrentTabToComplex(); + }; #endif