98 FXIMPLEMENT(
MFXEditableTable, FXTable, MFXEditableTableMap, ARRAYNUMBER(MFXEditableTableMap))
102 FXSelector sel, FXuint opts,
103 FXint x, FXint y, FXint w, FXint h,
104 FXint pl, FXint pr, FXint pt, FXint pb)
105 : FXTable(p, tgt, sel, opts, x, y, w, h, pl, pr, pt, pb),
106 myEditedItem(
nullptr) {
108 new FXTextField((FXComposite*)getParent(), 1,
this,
109 ID_EDITOR, FRAME_NORMAL | LAYOUT_EXPLICIT);
111 flags |= FLAG_ENABLED | FLAG_DROPTARGET;
121 FXTable::onLeftBtnPress(sender, sel, ptr);
128 FXTablePos* e = (FXTablePos*)ptr;
131 if (c == -1 || r == -1) {
134 killSelection(
false);
138 if (c >= 0 && r >= 0) {
149 FXTable::onLeftBtnRelease(sender, sel, ptr);
161 if (item ==
nullptr) {
169 FXTableItem* it = item;
171 FXint x = getColumnX(
myEditedCol) + getRowHeader()->getWidth() + xpos;
172 FXint y = getRowY(
myEditedRow) + getColumnHeader()->getHeight() + ypos;
173 FXIcon* icon = item->getIcon();
175 x += icon->getWidth() + 4;
177 FXint vw = getViewportWidth();
178 if (vertical->shown()) {
179 vw -= vertical->getWidth();
193 }
else if (how ==
'A') {
212 FXString text =
myEditor->getText();
214 if (item->getText() == text) {
217 if (handle(item, FXSEL(SEL_COMMAND,
ID_EDITEND), &text)) {
219 handle(
this, FXSEL(SEL_CHANGED, 0), item);
227 if (!target->handle(
this, FXSEL(SEL_CHANGED,
ID_TEXT_CHANGED), (
void*) &edited)) {
256 FXEvent* e = (FXEvent*)ptr;
279 FXint key = ((FXEvent*)ptr)->code;
280 if ( key == KEY_Return || key == KEY_KP_Enter) {
285 return FXTable::onKeyRelease(sender, sel, ptr);
312 return FXTable::onRightBtnRelease(sender, sel, ptr);
320 return FXScrollArea::onHScrollerChanged(o, s, d);
327 return FXScrollArea::onVScrollerChanged(o, s, d);
334 return FXScrollArea::onHScrollerDragged(o, s, d);
341 return FXScrollArea::onVScrollerDragged(o, s, d);
348 return FXTable::onAutoScroll(o, s, d);
355 return FXTable::onUngrabbed(o, s, d);
362 return FXTable::onRightBtnPress(o, s, d);
369 return FXTable::onKeyPress(o, s, d);
376 return FXTable::onKeyRelease(o, s, d);
383 return FXTable::onFocusIn(o, s, d);
390 return FXTable::onFocusOut(o, s, d);
397 return FXTable::onSelectionLost(o, s, d);
404 return FXTable::onSelectionGained(o, s, d);
411 return FXTable::onSelectionRequest(o, s, d);
418 return FXTable::onClipboardLost(o, s, d);
425 return FXTable::onClipboardGained(o, s, d);
432 return FXTable::onClipboardRequest(o, s, d);
455 return FXTable::onCommand(o, s, d);
462 return FXTable::onUpdHorzGrid(o, s, d);
469 return FXTable::onUpdVertGrid(o, s, d);
476 return FXTable::onCmdHorzGrid(o, s, d);
483 return FXTable::onCmdVertGrid(o, s, d);
539 return FXTable::onCmdMoveLeft(o, s, d);
546 return FXTable::onCmdMoveRight(o, s, d);
553 return FXTable::onCmdMoveUp(o, s, d);
560 return FXTable::onCmdMoveDown(o, s, d);
567 return FXTable::onCmdMoveHome(o, s, d);
574 return FXTable::onCmdMoveEnd(o, s, d);
581 return FXTable::onCmdMoveTop(o, s, d);
588 return FXTable::onCmdMoveBottom(o, s, d);
595 return FXTable::onCmdMovePageDown(o, s, d);
602 return FXTable::onCmdMovePageUp(o, s, d);
610 return FXTable::onCmdSelectRowIndex(o, s, d);
633 return FXTable::onCmdSelectRow(o, s, d);
664 return FXTable::onCmdMark(o, s, d);
671 return FXTable::onCmdExtend(o, s, d);