Esempio n. 1
0
void MYMENU_EditUndo()
{
    if ( editmode == 1 ) {
        SendMessageW( hEdit, EM_UNDO, 0, 0 );
    }
    else {
        history_undo();
        update_selection_rect();
        update_table_view( hwnd );
    }
}
Esempio n. 2
0
void game_undo(void) {
	history_undo(history);
	move_list_undo(&fullalg_list);
	move_list_undo(&san_list);
	move_list_undo(&fan_list);
	if (history->result) {
		free(history->result->reason);
		free(history->result);
		history->result = NULL;
	}
	ui->update(history->view->board, NULL);
}
Esempio n. 3
0
void command_history(doc *d, char **args, int nargs)
{
  int i;
  int command = -1;

  for (i = 0; i < nargs; i++) {
    if(!strcmp(args[i],"-h")||!strcmp(args[i],"--help"))return history_usage();
    if (command != -1) return history_usage();
    if (!strcmp(args[i], "undo")) { command = UNDO; continue; }
    if (!strcmp(args[i], "redo")) { command = REDO; continue; }
    return history_usage();
  }
  if (command == -1) return history_usage();

  switch (command) {
  case UNDO: return history_undo(d);
  case REDO: return history_redo(d);
  }
}
Esempio n. 4
0
static void undo(Sprite* sprite)
{
	history_undo(sprite->history);
}