mod/maxgui.mod/fltkmaxgui.mod/src/Fl_Text_Editor.cxx
int Fl_Text_Editor::kf_ctrl_move(int c, Fl_Text_Editor* e) {
  if (!e->buffer()->selected())
    e->dragPos = e->insert_position();
  if (c != FL_Up && c != FL_Down) {
    e->buffer()->unselect();
    e->show_insert_position();
  }
  switch (c) {
    case FL_Home:
      e->insert_position(0);
      e->scroll(0, 0);
      break;
    case FL_End:
      e->insert_position(e->buffer()->length());
      e->scroll(e->count_lines(0, e->buffer()->length(), 1), 0);
      break;
    case FL_Left:
      e->previous_word();
      break;
    case FL_Right:
      e->next_word();
      break;
    case FL_Up:
      e->scroll(e->mTopLineNum-1, e->mHorizOffset);
      break;
    case FL_Down:
      e->scroll(e->mTopLineNum+1, e->mHorizOffset);
      break;
    case FL_Page_Up:
      e->insert_position(e->mLineStarts[0]);
      break;
    case FL_Page_Down:
      e->insert_position(e->mLineStarts[e->mNVisibleLines-2]);
      break;
  }
  return 1;
}
/** Moves the current text cursor in the direction indicated by control key */
Moves the current text cursor in the direction indicated by control key
Moves the current text cursor in the direction indicated by control key
int Fl_Text_Editor::kf_ctrl_move(int c, Fl_Text_Editor* e) {
  if (!e->buffer()->selected())
    e->dragPos = e->insert_position();
  if (c != FL_Up && c != FL_Down) {
    e->buffer()->unselect();
    e->show_insert_position();
  }
  switch (c) {
    case FL_Home:
      e->insert_position(0);
      e->scroll(0, 0);
      break;
    case FL_End:
      e->insert_position(e->buffer()->length());
      e->scroll(e->count_lines(0, e->buffer()->length(), 1), 0);
      break;
    case FL_Left:
      e->previous_word();
      break;
    case FL_Right:
      e->next_word();
      break;
    case FL_Up:
      e->scroll(e->mTopLineNum-1, e->mHorizOffset);
      break;
    case FL_Down:
      e->scroll(e->mTopLineNum+1, e->mHorizOffset);
      break;
    case FL_Page_Up:
      e->insert_position(e->mLineStarts[0]);
      break;
    case FL_Page_Down:
      e->insert_position(e->mLineStarts[e->mNVisibleLines-2]);
      break;
  }
  return 1;
}
int Fl_Text_Editor :: kf_ctrl_move ( int c , Fl_Text_Editor * e ) { if ( ! e -> buffer ( ) -> selected ( ) ) e -> dragPos = e -> insert_position ( ) ; if ( c != FL_Up && c != FL_Down ) { e -> buffer ( ) -> unselect ( ) ; e -> show_insert_position ( ) ; } switch ( c ) { case FL_Home : e -> insert_position ( 0 ) ; e -> scroll ( 0 , 0 ) ; break ; case FL_End : e -> insert_position ( e -> buffer ( ) -> length ( ) ) ; e -> scroll ( e -> count_lines ( 0 , e -> buffer ( ) -> length ( ) , 1 ) , 0 ) ; break ; case FL_Left : e -> previous_word ( ) ; break ; case FL_Right : e -> next_word ( ) ; break ; case FL_Up : e -> scroll ( e -> mTopLineNum - 1 , e -> mHorizOffset ) ; break ; case FL_Down : e -> scroll ( e -> mTopLineNum + 1 , e -> mHorizOffset ) ; break ; case FL_Page_Up : e -> insert_position ( e -> mLineStarts [ 0 ] ) ; break ; case FL_Page_Down : e -> insert_position ( e -> mLineStarts [ e -> mNVisibleLines - 2 ] ) ; break ; } return 1 ; }
Moves the current text cursor in the direction indicated by control key
Moves the current text cursor in the direction indicated by control key