99 FXIMPLEMENT(
MFXEditableTable, FXTable, MFXEditableTableMap, ARRAYNUMBER(MFXEditableTableMap))
103 FXSelector sel, FXuint opts,
104 FXint x, FXint y, FXint w, FXint h,
105 FXint pl, FXint pr, FXint pt, FXint pb)
106 : FXTable(p, tgt, sel, opts, x, y, w, h, pl, pr, pt, pb),
107 myEditedItem(
nullptr) {
109 new FXTextField((FXComposite*)getParent(), 1,
this,
110 ID_EDITOR, FRAME_NORMAL | LAYOUT_EXPLICIT);
112 flags |= FLAG_ENABLED | FLAG_DROPTARGET;
122 FXTable::onLeftBtnPress(sender, sel, ptr);
129 FXTablePos* e = (FXTablePos*)ptr;
132 if (c == -1 || r == -1) {
135 killSelection(
false);
139 if (c >= 0 && r >= 0) {
150 FXTable::onLeftBtnRelease(sender, sel, ptr);
162 if (item ==
nullptr) {
170 FXTableItem* it = item;
172 FXint x = getColumnX(
myEditedCol) + getRowHeader()->getWidth() + xpos;
173 FXint y = getRowY(
myEditedRow) + getColumnHeader()->getHeight() + ypos;
174 FXIcon* icon = item->getIcon();
176 x += icon->getWidth() + 4;
178 FXint vw = getViewportWidth();
179 if (vertical->shown()) {
180 vw -= vertical->getWidth();
194 }
else if (how ==
'A') {
213 FXString text =
myEditor->getText();
215 if (item->getText() == text) {
218 if (handle(item, FXSEL(SEL_COMMAND,
ID_EDITEND), &text)) {
220 handle(
this, FXSEL(SEL_CHANGED, 0), item);
228 if (!target->handle(
this, FXSEL(SEL_CHANGED,
ID_TEXT_CHANGED), (
void*) &edited)) {
257 FXEvent* e = (FXEvent*)ptr;
280 FXint key = ((FXEvent*)ptr)->code;
281 if ( key == KEY_Return || key == KEY_KP_Enter) {
286 return FXTable::onKeyRelease(sender, sel, ptr);
313 return FXTable::onRightBtnRelease(sender, sel, ptr);
321 return FXScrollArea::onHScrollerChanged(o, s, d);
328 return FXScrollArea::onVScrollerChanged(o, s, d);
335 return FXScrollArea::onHScrollerDragged(o, s, d);
342 return FXScrollArea::onVScrollerDragged(o, s, d);
349 return FXTable::onAutoScroll(o, s, d);
356 return FXTable::onUngrabbed(o, s, d);
363 return FXTable::onRightBtnPress(o, s, d);
370 return FXTable::onKeyPress(o, s, d);
377 return FXTable::onKeyRelease(o, s, d);
384 return FXTable::onFocusIn(o, s, d);
391 return FXTable::onFocusOut(o, s, d);
398 return FXTable::onSelectionLost(o, s, d);
405 return FXTable::onSelectionGained(o, s, d);
412 return FXTable::onSelectionRequest(o, s, d);
419 return FXTable::onClipboardLost(o, s, d);
426 return FXTable::onClipboardGained(o, s, d);
433 return FXTable::onClipboardRequest(o, s, d);
456 return FXTable::onCommand(o, s, d);
463 return FXTable::onUpdHorzGrid(o, s, d);
470 return FXTable::onUpdVertGrid(o, s, d);
477 return FXTable::onCmdHorzGrid(o, s, d);
484 return FXTable::onCmdVertGrid(o, s, d);
540 return FXTable::onCmdMoveLeft(o, s, d);
547 return FXTable::onCmdMoveRight(o, s, d);
554 return FXTable::onCmdMoveUp(o, s, d);
561 return FXTable::onCmdMoveDown(o, s, d);
568 return FXTable::onCmdMoveHome(o, s, d);
575 return FXTable::onCmdMoveEnd(o, s, d);
582 return FXTable::onCmdMoveTop(o, s, d);
589 return FXTable::onCmdMoveBottom(o, s, d);
596 return FXTable::onCmdMovePageDown(o, s, d);
603 return FXTable::onCmdMovePageUp(o, s, d);
611 return FXTable::onCmdSelectRowIndex(o, s, d);
634 return FXTable::onCmdSelectRow(o, s, d);
665 return FXTable::onCmdMark(o, s, d);
672 return FXTable::onCmdExtend(o, s, d);