MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / CsvGrid

Method CsvGrid

src/csvgrid.cpp:40–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38
39
40CsvGrid::CsvGrid(int X,int Y,int W,int H,const char* L) : Fl_Table(X,Y,W,H,L) {
41 DEBUG_PRINTF("#### CsvGrid::CsvGrid: %d, %d, %d, %d\n", X, Y, W, H);
42 text_font_size = TCRUNCHER_INITIAL_FONT_SIZE;
43 callback(&event_callback, (void*)this);
44 when(FL_WHEN_RELEASE);
45 row_height_all(text_font_size + TCRUNCHER_ROW_HEIGHT_ADD);
46 // Create input widget that we'll use whenever user clicks on a cell
47 input = new TCRUNCHER_CSVGRID_INPUT_WIDGET(W/2,H/2,0,0);
48 input->hide();
49 input->callback(input_cb, (void*)this);
50 input->when(FL_WHEN_ENTER_KEY_ALWAYS); // callback triggered when user hits Enter
51 input->maximum_size(TCRUNCHER_MAX_CELL_LENGTH);
52 input->textfont(app.getCustomFont(CsvApplication::FontUsage::TEXT));
53 row_edit = col_edit = 0;
54 end();
55 col_header_color(ColorThemes::getColor(app.getTheme(), "header_row_bg"));
56 row_header_color(ColorThemes::getColor(app.getTheme(), "header_row_bg"));
57 redraw();
58}
59
60
61CsvGrid::~CsvGrid() {

Callers

nothing calls this directly

Calls 3

endFunction · 0.85
getCustomFontMethod · 0.80
getThemeMethod · 0.80

Tested by

no test coverage detected