private StoredCursor createCursorState() { return new StoredCursor( myCursorX, myCursorY, myStyleState.getCurrent().clone(), isAutoWrap(), isOriginMode(), myGraphicSetState); }
@Override public void reset() { myGraphicSetState.resetState(); myStyleState.reset(); myTerminalTextBuffer.clearAll(); myDisplay.setScrollingEnabled(true); initModes(); initMouseModes(); cursorPosition(1, 1); }
@Override public void restoreCursor() { if (myStoredCursor != null) { restoreCursor(myStoredCursor); } else { // If nothing was saved by DECSC setModeEnabled(TerminalMode.OriginMode, false); // Resets origin mode (DECOM) cursorPosition(1, 1); // Moves the cursor to the home position (upper left of screen). myStyleState.reset(); // Turns all character attributes off (normal setting). myGraphicSetState.resetState(); // myGraphicSetState.designateGraphicSet(0, CharacterSet.ASCII);//Maps the ASCII character set // into GL // mapCharsetToGL(0); // myGraphicSetState.designateGraphicSet(1, CharacterSet.DEC_SUPPLEMENTAL); // mapCharsetToGR(1); //and the DEC Supplemental Graphic set into GR } myDisplay.setCursor(myCursorX, myCursorY); }
public void restoreCursor(@NotNull StoredCursor storedCursor) { myCursorX = storedCursor.getCursorX(); myCursorY = storedCursor.getCursorY(); myStyleState.setCurrent(storedCursor.getTextStyle().clone()); setModeEnabled(TerminalMode.AutoWrap, storedCursor.isAutoWrap()); setModeEnabled(TerminalMode.OriginMode, storedCursor.isOriginMode()); CharacterSet[] designations = storedCursor.getDesignations(); for (int i = 0; i < designations.length; i++) { myGraphicSetState.designateGraphicSet(i, designations[i]); } myGraphicSetState.setGL(storedCursor.getGLMapping()); myGraphicSetState.setGR(storedCursor.getGRMapping()); if (storedCursor.getGLOverride() >= 0) { myGraphicSetState.overrideGL(storedCursor.getGLOverride()); } }
@Override public void characterAttributes(final TextStyle textStyle) { myStyleState.setCurrent(textStyle); }