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

Method startEditing

src/csvgrid.cpp:430–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428
429
430void CsvGrid::startEditing(int R, int C) {
431 DEBUG_PRINTF("#### CsvGrid::startEditing\n");
432 row_edit = R; // Now editing this row/col
433 col_edit = C;
434 int X,Y,W,H;
435 find_cell(CONTEXT_CELL, R,C, X,Y,W,H); // Find X/Y/W/H of cell
436 input->resize(X,Y,W,H); // Move CODE_INPUT_WIDGET widget there
437 #ifdef DEBUG
438 std::cerr << "startEditing/getCell(" << R << "," << C << ")" << std::endl;
439 #endif
440 strncpy(input_buffer, dataTable->getCell(R,C).c_str(), TCRUNCHER_MAX_CELL_LENGTH );
441 input->value(input_buffer);
442 input->textsize(text_font_size);
443 input->insert_position(0,strlen(input_buffer)); // select entire input field
444 input->show(); // Show the input widget, now that we've positioned it
445 input->take_focus();
446}
447
448
449void CsvGrid::doneEditing(bool save) {

Callers

nothing calls this directly

Calls 3

resizeMethod · 0.80
getCellMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected