import jexer.bits.CellAttributes;
import jexer.bits.GraphicsChars;
import jexer.bits.MnemonicString;
+import jexer.bits.StringUtils;
import jexer.event.TKeypressEvent;
import jexer.event.TMouseEvent;
import static jexer.TKeypress.*;
// Tools menu
public static final int MID_REPAINT = 1;
public static final int MID_VIEW_IMAGE = 2;
- public static final int MID_CHANGE_FONT = 3;
+ public static final int MID_SCREEN_OPTIONS = 3;
// File menu
public static final int MID_NEW = 10;
public static final int MID_TABLE_FILE_SAVE_CSV = 116;
public static final int MID_TABLE_FILE_SAVE_TEXT = 117;
+ // Miscellaneous
+ public static final int MID_SPLIT_VERTICAL = 200;
+ public static final int MID_SPLIT_HORIZONTAL = 201;
+
// ------------------------------------------------------------------------
// Variables --------------------------------------------------------------
// ------------------------------------------------------------------------
assert (mnemonic.getShortcutIdx() >= 0);
// Recompute width and height to reflect an empty menu
- setWidth(getTitle().length() + 4);
+ setWidth(StringUtils.width(getTitle()) + 4);
setHeight(2);
setActive(false);
* @return the new menu item
*/
public TMenuItem addItem(final int id, final String label) {
- assert (id >= 1024);
return addItemInternal(id, label, null);
}
label = i18n.getString("menuViewImage");
break;
- case MID_CHANGE_FONT:
- label = i18n.getString("menuChangeFont");
+ case MID_SCREEN_OPTIONS:
+ label = i18n.getString("menuScreenOptions");
break;
case MID_NEW:
label = i18n.getString("menuTableFileSaveText");
break;
+ case MID_SPLIT_VERTICAL:
+ label = i18n.getString("menuSplitVertical");
+ break;
+ case MID_SPLIT_HORIZONTAL:
+ label = i18n.getString("menuSplitHorizontal");
+ break;
+
default:
throw new IllegalArgumentException("Invalid menu ID: " + id);
}