implementation of various horizontal context menu items and undo/redo