xfr
This commit is contained in:
parent
6463d11913
commit
55d7c91e5e
2 changed files with 19 additions and 5 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <FL/Fl.H>
|
||||
#include <FL/Fl_Button.H>
|
||||
#include <FL/Fl_Group.H>
|
||||
#include <FL/Fl_Multi_Browser.H>
|
||||
#include <FL/Fl_Tabs.H>
|
||||
#include <FL/Fl_Text_Buffer.H>
|
||||
#include <FL/Fl_Text_Display.H>
|
||||
|
|
@ -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);
|
||||
|
|
@ -203,6 +207,7 @@ Summary::Summary(ComplexEntry c, int x, int y, int w, int h) : Fl_Group(x, y, w,
|
|||
|
||||
|
||||
|
||||
|
||||
// s1style_buff->insert(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
|
||||
// std::cout << c.A_buf.c_str() << std::endl;
|
||||
// s1->insert(c.A_buf.c_str());
|
||||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <FL/Fl_Text_Buffer.H>
|
||||
#include <FL/Fl_Window.H>
|
||||
#include <FL/Fl_Text_Display.H>
|
||||
#include <FL/Fl_Multi_Browser.H>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
@ -23,6 +24,8 @@ struct Summary : Fl_Group {
|
|||
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<Summary*> items;
|
||||
|
||||
void addComplex(ComplexEntry& c);
|
||||
|
||||
void addCurrentTabToComplex();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue