assert (!window.isActive());
if (activeWindow != null) {
- // TODO: see if this assertion is really necessary.
- // assert (activeWindow.getZ() == 0);
-
activeWindow.setActive(false);
// Increment every window Z that is on top of window
&& !keypress.getKey().isCtrl()
) {
// Plain old keystroke, process it
- // TODO: fix document to use ints, not chars
document.addChar(keypress.getKey().getChar());
alignCursor();
} else {
}
}
+ /**
+ * Set the current visible column number. 1-based.
+ *
+ * @return the visible column number. Column 1 is the first column.
+ */
+ public int getVisibleColumnNumber() {
+ return leftColumn + 1;
+ }
+
+ /**
+ * Set the current visible column number. 1-based.
+ *
+ * @param column the new visible column number. Column 1 is the first
+ * column.
+ */
+ public void setVisibleColumnNumber(final int column) {
+ assert (column > 0);
+ if ((column > 0) && (column < document.getLineLengthMax())) {
+ leftColumn = column - 1;
+ alignDocument(true);
+ }
+ }
+
/**
* Get the current editing column number. 1-based.
*
// Clicked on vertical scrollbar
editField.setVisibleRowNumber(getVerticalValue());
}
-
- // TODO: horizontal scrolling
+ if (mouse.isMouse1() && mouseOnHorizontalScroller(mouse)) {
+ // Clicked on horizontal scrollbar
+ editField.setVisibleColumnNumber(getHorizontalValue());
+ setHorizontalValue(editField.getVisibleColumnNumber());
+ }
}
/**
// Clicked/dragged on vertical scrollbar
editField.setVisibleRowNumber(getVerticalValue());
}
-
- // TODO: horizontal scrolling
+ if (mouse.isMouse1() && mouseOnHorizontalScroller(mouse)) {
+ // Clicked/dragged on horizontal scrollbar
+ editField.setVisibleColumnNumber(getHorizontalValue());
+ setHorizontalValue(editField.getVisibleColumnNumber());
+ }
}
}
}
// 00-17, 19, 1C-1F, 20-7E --> put
- // TODO
if (ch <= 0x17) {
+ // We ignore all DCS except sixel.
return;
}
if (ch == 0x19) {
+ // We ignore all DCS except sixel.
return;
}
if ((ch >= 0x1C) && (ch <= 0x1F)) {
+ // We ignore all DCS except sixel.
return;
}
if ((ch >= 0x20) && (ch <= 0x7E)) {
+ // We ignore all DCS except sixel.
return;
}