Exemple #1
0
 private void ctrl_HT(int n) {
   if (n > 0 && cx >= width) {
     return;
   }
   if (n <= 0 && cx == 0) {
     return;
   }
   int ts = -1;
   for (int i = 0; i < tab_stops.size(); i++) {
     if (cx >= tab_stops.get(i)) {
       ts = i;
     }
   }
   ts += n;
   if (ts < tab_stops.size() && ts >= 0) {
     cursor_set_x(tab_stops.get(ts));
   } else {
     cursor_set_x(width - 1);
   }
 }
Exemple #2
0
 private void csi_HPA(String p) {
   int[] ps = vt100_parse_params(p, new int[] {1});
   cursor_set_x(ps[0] - 1);
 }
Exemple #3
0
 private void ctrl_CR() {
   cursor_set_x(0);
 }
Exemple #4
0
 private void cursor_set(int y, int x) {
   cursor_set_x(x);
   cursor_set_y(y);
 }