From aec9901fcc3d29c82fd549cae3cac951891dfa0a Mon Sep 17 00:00:00 2001 From: John Lindal Date: Thu, 28 Dec 2023 13:03:19 -0800 Subject: [PATCH] upgrade to auto-wrapping of const char* --- libj2dplot/code/J2DPlotWidget.cpp | 2 +- libj2dplot/code/JX2DPlotWidget-Cursor-enum.h | 19 ++++++++ libj2dplot/code/JX2DPlotWidget-Cursor.h | 15 ++----- libj2dplot/code/JX2DPlotWidget-Cursor.jxm | 10 ++--- .../code/JX2DPlotWidget-CurveOptions-enum.h | 20 +++++++++ libj2dplot/code/JX2DPlotWidget-CurveOptions.h | 12 +---- .../code/JX2DPlotWidget-CurveOptions.jxm | 10 ++--- libj2dplot/code/JX2DPlotWidget-Options-enum.h | 22 ++++++++++ libj2dplot/code/JX2DPlotWidget-Options.h | 18 ++------ libj2dplot/code/JX2DPlotWidget-Options.jxm | 10 ++--- .../testui/code/PlotDirector-Actions-enum.h | 16 +++++++ libj2dplot/testui/code/PlotDirector-Actions.h | 12 ++--- .../testui/code/PlotDirector-Actions.jxm | 8 ++-- libj2dplot/testui/code/main.cpp | 10 ++--- libjcore/code/JFileArray.cpp | 4 +- libjcore/code/JSpellChecker.cpp | 4 +- libjcore/code/JString.cpp | 5 ++- libjcore/code/JString.h | 1 + libjcore/code/jGlobals_UNIX.cpp | 6 +-- libjcore/code/jProcessUtil.cpp | 2 +- libjcore/code/jTextUtil.cpp | 2 +- libjcore/code/jVCSUtil.cpp | 2 +- libjcore/strings/jcore_strings | 2 + libjexpr/code/JExprEditor.cpp | 2 +- libjexpr/code/JFunctionWithArgs.cpp | 4 +- libjexpr/code/JNegation.cpp | 4 +- libjexpr/code/JSummation.cpp | 8 ++-- libjexpr/code/JXExprEditor-Edit-enum.h | 17 +++++++ libjexpr/code/JXExprEditor-Edit.h | 13 ++---- libjexpr/code/JXExprEditor-Edit.jxm | 4 +- libjexpr/code/JXExprEditor-Font-enum.h | 13 ++++++ libjexpr/code/JXExprEditor-Font.h | 9 ++-- libjexpr/code/JXExprEditor-Font.jxm | 4 +- libjexpr/code/JXExprEditor-Function-enum.h | 39 ++++++++++++++++ libjexpr/code/JXExprEditor-Function.h | 31 +------------ libjexpr/code/JXExprEditor-Function.jxm | 10 ++--- libjexpr/code/JXExprEditor-Math-enum.h | 21 +++++++++ libjexpr/code/JXExprEditor-Math.h | 17 ++----- libjexpr/code/JXExprEditor-Math.jxm | 6 +-- libjexpr/code/JXExprInput-Font-enum.h | 13 ++++++ libjexpr/code/JXExprInput-Font.h | 9 ++-- libjexpr/code/JXExprInput-Font.jxm | 6 +-- libjx/code/JXAcceptLicenseDialog.cpp | 1 + libjx/code/JXCharInput.cpp | 4 +- libjx/code/JXChooseColorDialog.cpp | 8 ++++ libjx/code/JXChooseFileDialog.cpp | 7 ++- libjx/code/JXChooseFontSizeDialog.cpp | 1 + libjx/code/JXChoosePathDialog.cpp | 8 +++- libjx/code/JXEPSPrintSetupDialog.cpp | 1 + libjx/code/JXEditWWWPrefsDialog.cpp | 4 ++ libjx/code/JXErrorDialog.cpp | 2 + libjx/code/JXFixLenPGDirector.cpp | 1 + libjx/code/JXFontSizeMenu.cpp | 2 +- libjx/code/JXGetStringDialog.cpp | 1 + libjx/code/JXGoToLineDialog.cpp | 1 + libjx/code/JXHelpManager.cpp | 2 +- libjx/code/JXInputField-Context-enum.h | 17 +++++++ libjx/code/JXInputField-Context.h | 9 +--- libjx/code/JXInputField-Context.jxm | 2 +- libjx/code/JXInputField.cpp | 2 +- libjx/code/JXMessageDialog.cpp | 2 + libjx/code/JXOKToCloseDialog.cpp | 1 + libjx/code/JXPGMessageDirector.cpp | 1 + libjx/code/JXPSPageSetupDialog.cpp | 3 ++ libjx/code/JXPSPrintSetupDialog.cpp | 5 +++ libjx/code/JXPTPageSetupDialog.cpp | 5 ++- libjx/code/JXPTPrintSetupDialog.cpp | 5 +++ libjx/code/JXSaveFileDialog.cpp | 9 +++- libjx/code/JXSearchTextDialog.cpp | 24 +++++++--- libjx/code/JXSpellCheckerDialog.cpp | 2 + libjx/code/JXStaticText.cpp | 2 +- libjx/code/JXStringCompletionMenu.cpp | 2 +- libjx/code/JXStyleMenu-Style-enum.h | 28 ++++++++++++ libjx/code/JXStyleMenu-Style.h | 22 +--------- libjx/code/JXTEBase-AdjustMargins-enum.h | 16 +++++++ libjx/code/JXTEBase-AdjustMargins.h | 8 +--- libjx/code/JXTEBase-CheckSpelling-enum.h | 13 ++++++ libjx/code/JXTEBase-CheckSpelling.h | 5 +-- libjx/code/JXTEBase-CleanWhitespace-enum.h | 16 +++++++ libjx/code/JXTEBase-CleanWhitespace.h | 8 +--- libjx/code/JXTEBase-Edit-enum.h | 18 ++++++++ libjx/code/JXTEBase-Edit.h | 12 +---- libjx/code/JXTEBase-ReadOnly-enum.h | 12 +++++ libjx/code/JXTEBase-ReadOnly.h | 4 +- libjx/code/JXTEBase-Replace-enum.h | 25 +++++++++++ libjx/code/JXTEBase-Replace.h | 19 +------- libjx/code/JXTEBase-Search-enum.h | 20 +++++++++ libjx/code/JXTEBase-Search.h | 14 +----- libjx/code/JXTEBase.cpp | 7 +-- libjx/code/JXTipOfTheDayDialog.cpp | 3 ++ libjx/code/JXToolBar.cpp | 4 +- libjx/code/JXToolBarEditDialog.cpp | 1 + libjx/code/JXWDManager-Windows-enum.h | 13 ++++++ libjx/code/JXWDManager-Windows.h | 7 +-- libjx/code/JXWarningDialog.cpp | 2 + libjx/code/JXWindow.cpp | 2 +- libjx/libjx.fd | 6 +-- .../code/TestAnyTableDirector-File-enum.h | 14 ++++++ libjx/testui/code/TestAnyTableDirector-File.h | 10 ++--- .../testui/code/TestAnyTableDirector-File.jxm | 6 +-- libjx/testui/code/TestDirector-About-enum.h | 17 +++++++ libjx/testui/code/TestDirector-About.h | 13 ++---- libjx/testui/code/TestDirector-About.jxm | 10 ++--- .../code/TestDirector-ChooseSaveFile-enum.h | 17 +++++++ .../testui/code/TestDirector-ChooseSaveFile.h | 9 +--- .../code/TestDirector-ChooseSaveFile.jxm | 10 ++--- .../code/TestDirector-PrintPostscript-enum.h | 13 ++++++ .../code/TestDirector-PrintPostscript.h | 5 +-- .../code/TestDirector-PrintPostscript.jxm | 6 +-- .../code/TestDirector-ProgressDisplay-enum.h | 15 +++++++ .../code/TestDirector-ProgressDisplay.h | 7 +-- .../code/TestDirector-ProgressDisplay.jxm | 10 ++--- libjx/testui/code/TestDirector-Test-enum.h | 44 +++++++++++++++++++ libjx/testui/code/TestDirector-Test.h | 40 ++--------------- libjx/testui/code/TestDirector-Test.jxm | 10 ++--- .../code/TestDirector-UserNotification-enum.h | 14 ++++++ .../code/TestDirector-UserNotification.h | 6 +-- .../code/TestDirector-UserNotification.jxm | 6 +-- libjx/testui/code/TestDirector.cpp | 10 ++--- .../code/TestFileListDirector-File-enum.h | 15 +++++++ libjx/testui/code/TestFileListDirector-File.h | 11 ++--- .../testui/code/TestFileListDirector-File.jxm | 10 ++--- libjx/testui/code/TestFileListDirector.cpp | 2 +- libjx/testui/code/TestFloatTable-Table-enum.h | 19 ++++++++ libjx/testui/code/TestFloatTable-Table.h | 15 ++----- libjx/testui/code/TestFloatTable-Table.jxm | 6 +-- .../testui/code/TestImageDirector-File-enum.h | 23 ++++++++++ libjx/testui/code/TestImageDirector-File.h | 19 ++------ libjx/testui/code/TestImageDirector-File.jxm | 10 ++--- libjx/testui/code/TestInputFieldsDialog.cpp | 4 +- .../code/TestPartitionDirector-Horiz-enum.h | 14 ++++++ .../testui/code/TestPartitionDirector-Horiz.h | 10 ++--- .../code/TestPartitionDirector-Horiz.jxm | 10 ++--- .../code/TestPartitionDirector-Vert-enum.h | 12 +++++ .../testui/code/TestPartitionDirector-Vert.h | 8 ++-- .../code/TestPartitionDirector-Vert.jxm | 10 ++--- .../code/TestStringTable-BorderWidth-enum.h | 17 +++++++ .../testui/code/TestStringTable-BorderWidth.h | 9 +--- .../code/TestStringTable-BorderWidth.jxm | 4 +- .../testui/code/TestStringTable-Table-enum.h | 27 ++++++++++++ libjx/testui/code/TestStringTable-Table.h | 23 ++-------- libjx/testui/code/TestStringTable-Table.jxm | 8 ++-- .../code/TestTextEditDocument-Emulator-enum.h | 13 ++++++ .../code/TestTextEditDocument-Emulator.h | 7 +-- .../code/TestTextEditDocument-Emulator.jxm | 8 ++-- .../code/TestTextEditDocument-File-enum.h | 22 ++++++++++ libjx/testui/code/TestTextEditDocument-File.h | 16 +------ .../testui/code/TestTextEditDocument-File.jxm | 8 ++-- libjx/testui/code/TestTextEditDocument.cpp | 2 +- libjx/testui/code/TestTextEditor-Edit-enum.h | 16 +++++++ libjx/testui/code/TestTextEditor-Edit.h | 8 +--- libjx/testui/code/TestTextEditor-Edit.jxm | 8 ++-- libjx/testui/code/TestWidget-Actions-enum.h | 23 ++++++++++ libjx/testui/code/TestWidget-Actions.h | 19 ++------ libjx/testui/code/TestWidget-Actions.jxm | 8 ++-- libjx/testui/code/TestWidget-Points-enum.h | 17 +++++++ libjx/testui/code/TestWidget-Points.h | 9 +--- libjx/testui/code/TestWidget-Points.jxm | 2 +- libjx/testui/code/TestWidget-Secret-enum.h | 19 ++++++++ libjx/testui/code/TestWidget-Secret.h | 11 +---- libjx/testui/code/TestWidget-Secret.jxm | 12 ++--- libjx/testui/code/TestWidget.cpp | 4 +- libjx/testui/strings/TestWidget-Secret | 4 +- tools/jx_layout_editor/code/App-Help-enum.h | 17 +++++++ tools/jx_layout_editor/code/App-Help.h | 13 ++---- tools/jx_layout_editor/code/App-Help.jxm | 2 +- .../code/LayoutContainer-Edit.h | 2 +- .../code/LayoutContainer-Edit.jxm | 2 +- .../code/LayoutDocument-File-enum.h | 22 ++++++++++ .../code/LayoutDocument-File.h | 18 ++------ .../code/LayoutDocument-File.jxm | 2 +- .../code/LayoutDocument-Preferences-enum.h | 14 ++++++ .../code/LayoutDocument-Preferences.h | 10 ++--- .../code/LayoutDocument-Preferences.jxm | 6 +-- tools/jx_layout_editor/code/MDIServer.cpp | 2 +- .../strings/LayoutDocument-File | 2 +- .../code/All-Preferences-enum.h | 15 +++++++ .../jx_memory_debugger/code/All-Preferences.h | 11 ++--- .../code/All-Preferences.jxm | 10 ++--- tools/jx_memory_debugger/code/App-Help-enum.h | 17 +++++++ tools/jx_memory_debugger/code/App-Help.h | 13 ++---- tools/jx_memory_debugger/code/App-Help.jxm | 10 ++--- .../code/RecordDirector-File-enum.h | 16 +++++++ .../code/RecordDirector-File.h | 12 ++--- .../code/RecordDirector-File.jxm | 10 ++--- .../code/StatsDirector-Data-enum.h | 21 +++++++++ .../code/StatsDirector-Data.h | 17 ++----- .../code/StatsDirector-Data.jxm | 10 ++--- .../code/StatsDirector-File-enum.h | 12 +++++ .../code/StatsDirector-File.h | 8 ++-- .../code/StatsDirector-File.jxm | 4 +- tools/jx_menu_editor/code/App-Help.h | 2 +- tools/jx_menu_editor/code/MDIServer.cpp | 2 +- .../code/MenuDocument-File-enum.h | 22 ++++++++++ tools/jx_menu_editor/code/MenuDocument-File.h | 16 +------ .../jx_menu_editor/code/MenuDocument-File.jxm | 2 +- .../code/MenuDocument-Preferences-enum.h | 15 +++++++ .../code/MenuDocument-Preferences.h | 11 ++--- .../code/MenuDocument-Preferences.jxm | 8 ++-- tools/jx_menu_editor/code/MenuDocument.cpp | 10 +++-- .../code/MenuTable-Table-enum.h | 14 ++++++ tools/jx_menu_editor/code/MenuTable-Table.h | 10 ++--- tools/jx_menu_editor/code/MenuTable-Table.jxm | 2 +- .../jx_menu_editor/code/MenuTable-Type-enum.h | 14 ++++++ tools/jx_menu_editor/code/MenuTable-Type.h | 6 +-- tools/jx_menu_editor/code/MenuTable-Type.jxm | 2 +- tools/jx_menu_editor/code/MenuTable.cpp | 2 +- tools/jx_menu_editor/strings/strings | 2 +- .../app_template/code/App-Help-enum.h | 17 +++++++ .../app_template/code/App-Help.h | 13 ++---- .../app_template/code/App-Help.jxm | 8 ++-- .../code/MainDirector-File-enum.h | 12 +++++ .../app_template/code/MainDirector-File.h | 8 ++-- .../app_template/code/MainDirector-File.jxm | 4 +- .../code/MainDirector-Preferences-enum.h | 16 +++++++ .../code/MainDirector-Preferences.h | 12 ++--- .../code/MainDirector-Preferences.jxm | 10 ++--- tools/jx_project_wizard/code/MainDialog.cpp | 6 +-- tools/jxlayout/jxlayout.cpp | 2 +- .../02-MenuHello/MenuHelloDir-Text-enum.h | 13 ++++++ tutorial/02-MenuHello/MenuHelloDir-Text.h | 9 ++-- tutorial/02-MenuHello/MenuHelloDir-Text.jxm | 8 ++-- .../03-DialogHello/DialogHelloDir-Text-enum.h | 13 ++++++ tutorial/03-DialogHello/DialogHelloDir-Text.h | 9 ++-- .../03-DialogHello/DialogHelloDir-Text.jxm | 4 +- .../SelectionTable-Table-enum.h | 14 ++++++ .../10-SelectionTable/SelectionTable-Table.h | 10 ++--- .../SelectionTable-Table.jxm | 4 +- tutorial/11-EditTable/EditTable-Table-enum.h | 14 ++++++ tutorial/11-EditTable/EditTable-Table.h | 10 ++--- tutorial/11-EditTable/EditTable-Table.jxm | 4 +- .../12-Clipboard/ClipboardDir-Text-enum.h | 13 ++++++ tutorial/12-Clipboard/ClipboardDir-Text.h | 9 ++-- tutorial/12-Clipboard/ClipboardDir-Text.jxm | 4 +- .../12-Clipboard/ClipboardWidget-Edit-enum.h | 13 ++++++ tutorial/12-Clipboard/ClipboardWidget-Edit.h | 9 ++-- .../12-Clipboard/ClipboardWidget-Edit.jxm | 4 +- tutorial/13-Undo/UndoWidgetDir-Actions-enum.h | 14 ++++++ tutorial/13-Undo/UndoWidgetDir-Actions.h | 10 ++--- tutorial/13-Undo/UndoWidgetDir-Actions.jxm | 4 +- 240 files changed, 1550 insertions(+), 863 deletions(-) create mode 100644 libj2dplot/code/JX2DPlotWidget-Cursor-enum.h create mode 100644 libj2dplot/code/JX2DPlotWidget-CurveOptions-enum.h create mode 100644 libj2dplot/code/JX2DPlotWidget-Options-enum.h create mode 100644 libj2dplot/testui/code/PlotDirector-Actions-enum.h create mode 100644 libjexpr/code/JXExprEditor-Edit-enum.h create mode 100644 libjexpr/code/JXExprEditor-Font-enum.h create mode 100644 libjexpr/code/JXExprEditor-Function-enum.h create mode 100644 libjexpr/code/JXExprEditor-Math-enum.h create mode 100644 libjexpr/code/JXExprInput-Font-enum.h create mode 100644 libjx/code/JXInputField-Context-enum.h create mode 100644 libjx/code/JXStyleMenu-Style-enum.h create mode 100644 libjx/code/JXTEBase-AdjustMargins-enum.h create mode 100644 libjx/code/JXTEBase-CheckSpelling-enum.h create mode 100644 libjx/code/JXTEBase-CleanWhitespace-enum.h create mode 100644 libjx/code/JXTEBase-Edit-enum.h create mode 100644 libjx/code/JXTEBase-ReadOnly-enum.h create mode 100644 libjx/code/JXTEBase-Replace-enum.h create mode 100644 libjx/code/JXTEBase-Search-enum.h create mode 100644 libjx/code/JXWDManager-Windows-enum.h create mode 100644 libjx/testui/code/TestAnyTableDirector-File-enum.h create mode 100644 libjx/testui/code/TestDirector-About-enum.h create mode 100644 libjx/testui/code/TestDirector-ChooseSaveFile-enum.h create mode 100644 libjx/testui/code/TestDirector-PrintPostscript-enum.h create mode 100644 libjx/testui/code/TestDirector-ProgressDisplay-enum.h create mode 100644 libjx/testui/code/TestDirector-Test-enum.h create mode 100644 libjx/testui/code/TestDirector-UserNotification-enum.h create mode 100644 libjx/testui/code/TestFileListDirector-File-enum.h create mode 100644 libjx/testui/code/TestFloatTable-Table-enum.h create mode 100644 libjx/testui/code/TestImageDirector-File-enum.h create mode 100644 libjx/testui/code/TestPartitionDirector-Horiz-enum.h create mode 100644 libjx/testui/code/TestPartitionDirector-Vert-enum.h create mode 100644 libjx/testui/code/TestStringTable-BorderWidth-enum.h create mode 100644 libjx/testui/code/TestStringTable-Table-enum.h create mode 100644 libjx/testui/code/TestTextEditDocument-Emulator-enum.h create mode 100644 libjx/testui/code/TestTextEditDocument-File-enum.h create mode 100644 libjx/testui/code/TestTextEditor-Edit-enum.h create mode 100644 libjx/testui/code/TestWidget-Actions-enum.h create mode 100644 libjx/testui/code/TestWidget-Points-enum.h create mode 100644 libjx/testui/code/TestWidget-Secret-enum.h create mode 100644 tools/jx_layout_editor/code/App-Help-enum.h create mode 100644 tools/jx_layout_editor/code/LayoutDocument-File-enum.h create mode 100644 tools/jx_layout_editor/code/LayoutDocument-Preferences-enum.h create mode 100644 tools/jx_memory_debugger/code/All-Preferences-enum.h create mode 100644 tools/jx_memory_debugger/code/App-Help-enum.h create mode 100644 tools/jx_memory_debugger/code/RecordDirector-File-enum.h create mode 100644 tools/jx_memory_debugger/code/StatsDirector-Data-enum.h create mode 100644 tools/jx_memory_debugger/code/StatsDirector-File-enum.h create mode 100644 tools/jx_menu_editor/code/MenuDocument-File-enum.h create mode 100644 tools/jx_menu_editor/code/MenuDocument-Preferences-enum.h create mode 100644 tools/jx_menu_editor/code/MenuTable-Table-enum.h create mode 100644 tools/jx_menu_editor/code/MenuTable-Type-enum.h create mode 100644 tools/jx_project_wizard/app_template/code/App-Help-enum.h create mode 100644 tools/jx_project_wizard/app_template/code/MainDirector-File-enum.h create mode 100644 tools/jx_project_wizard/app_template/code/MainDirector-Preferences-enum.h create mode 100644 tutorial/02-MenuHello/MenuHelloDir-Text-enum.h create mode 100644 tutorial/03-DialogHello/DialogHelloDir-Text-enum.h create mode 100644 tutorial/10-SelectionTable/SelectionTable-Table-enum.h create mode 100644 tutorial/11-EditTable/EditTable-Table-enum.h create mode 100644 tutorial/12-Clipboard/ClipboardDir-Text-enum.h create mode 100644 tutorial/12-Clipboard/ClipboardWidget-Edit-enum.h create mode 100644 tutorial/13-Undo/UndoWidgetDir-Actions-enum.h diff --git a/libj2dplot/code/J2DPlotWidget.cpp b/libj2dplot/code/J2DPlotWidget.cpp index 2791dc8d4..93e59af1e 100644 --- a/libj2dplot/code/J2DPlotWidget.cpp +++ b/libj2dplot/code/J2DPlotWidget.cpp @@ -4405,7 +4405,7 @@ J2DPlotWidget::DrawCursorLabels } JSize labelHeight = p.GetLineHeight(); JSize cursorHeight = GetCursorLabelHeight(p); - JSize strwidth = p.GetStringWidth(JString("x1 = 0000000000", JString::kNoCopy)); + JSize strwidth = p.GetStringWidth("x1 = 0000000000"); JSize totalWidth = 3 * strwidth + 2 * kCursorValueBuffer; JSize axisWidth = itsXAxisEnd - itsXAxisStart; JCoordinate startx = itsXAxisStart; diff --git a/libj2dplot/code/JX2DPlotWidget-Cursor-enum.h b/libj2dplot/code/JX2DPlotWidget-Cursor-enum.h new file mode 100644 index 000000000..9745bf951 --- /dev/null +++ b/libj2dplot/code/JX2DPlotWidget-Cursor-enum.h @@ -0,0 +1,19 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JX2DPlotWidget_Cursor_enum +#define _H_JX2DPlotWidget_Cursor_enum + +enum { + kXCursorCmd=1, + kYCursorCmd, + kDualCursorsCmd, + kMarkCursorCmd, + kMarkAllVisCursorsCmd, + kRemoveMarkIndex, + kRemoveAllMarksCmd, + kShowMarkWindowCmd, +}; + +#endif diff --git a/libj2dplot/code/JX2DPlotWidget-Cursor.h b/libj2dplot/code/JX2DPlotWidget-Cursor.h index bce2d4352..4daa85927 100644 --- a/libj2dplot/code/JX2DPlotWidget-Cursor.h +++ b/libj2dplot/code/JX2DPlotWidget-Cursor.h @@ -16,21 +16,12 @@ static const JUtf8Byte* kCursorMenuStr = "|* %i __ShowMarkWindow::JX2DPlotWidget" ; -enum { - kXCursorCmd=1, - kYCursorCmd, - kDualCursorsCmd, - kMarkCursorCmd, - kMarkAllVisCursorsCmd, - kRemoveMarkIndex, - kRemoveAllMarksCmd, - kShowMarkWindowCmd, -}; +#include "JX2DPlotWidget-Cursor-enum.h" static void ConfigureCursorMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#c", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#c"); } }; diff --git a/libj2dplot/code/JX2DPlotWidget-Cursor.jxm b/libj2dplot/code/JX2DPlotWidget-Cursor.jxm index 1f88ad92a..ac65b1d0f 100644 --- a/libj2dplot/code/JX2DPlotWidget-Cursor.jxm +++ b/libj2dplot/code/JX2DPlotWidget-Cursor.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +791 305 "JX2DPlotWidget" "Cursor" 'c 40 40 +148 100 -100 -100 -100 -100 +43 +156 +160 75 0 diff --git a/libj2dplot/code/JX2DPlotWidget-CurveOptions-enum.h b/libj2dplot/code/JX2DPlotWidget-CurveOptions-enum.h new file mode 100644 index 000000000..1da6f12bd --- /dev/null +++ b/libj2dplot/code/JX2DPlotWidget-CurveOptions-enum.h @@ -0,0 +1,20 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JX2DPlotWidget_CurveOptions_enum +#define _H_JX2DPlotWidget_CurveOptions_enum + +enum { + kToggleCurveVisibleCmd=1, + kShowAllCurvesCmd, + kHideAllOtherCurvesCmd, + kPointsCmd, + kSymbolsCmd, + kLinesCmd, + kLinesSymbolsCmd, + kXErrorsCmd, + kYErrorsCmd, +}; + +#endif diff --git a/libj2dplot/code/JX2DPlotWidget-CurveOptions.h b/libj2dplot/code/JX2DPlotWidget-CurveOptions.h index 4853e49e7..4580fd0fd 100644 --- a/libj2dplot/code/JX2DPlotWidget-CurveOptions.h +++ b/libj2dplot/code/JX2DPlotWidget-CurveOptions.h @@ -17,17 +17,7 @@ static const JUtf8Byte* kCurveOptionsMenuStr = "|* %b %i __YErrors::JX2DPlotWidget" ; -enum { - kToggleCurveVisibleCmd=1, - kShowAllCurvesCmd, - kHideAllOtherCurvesCmd, - kPointsCmd, - kSymbolsCmd, - kLinesCmd, - kLinesSymbolsCmd, - kXErrorsCmd, - kYErrorsCmd, -}; +#include "JX2DPlotWidget-CurveOptions-enum.h" static void ConfigureCurveOptionsMenu(JXTextMenu* menu, const int offset = 0) { diff --git a/libj2dplot/code/JX2DPlotWidget-CurveOptions.jxm b/libj2dplot/code/JX2DPlotWidget-CurveOptions.jxm index bd687f407..fc3fca4eb 100644 --- a/libj2dplot/code/JX2DPlotWidget-CurveOptions.jxm +++ b/libj2dplot/code/JX2DPlotWidget-CurveOptions.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -671 327 +718 324 "JX2DPlotWidget" "CurveOptions" ' 40 40 +117 100 -100 -100 -100 -100 +40 +107 +170 75 0 diff --git a/libj2dplot/code/JX2DPlotWidget-Options-enum.h b/libj2dplot/code/JX2DPlotWidget-Options-enum.h new file mode 100644 index 000000000..95a005dc6 --- /dev/null +++ b/libj2dplot/code/JX2DPlotWidget-Options-enum.h @@ -0,0 +1,22 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JX2DPlotWidget_Options_enum +#define _H_JX2DPlotWidget_Options_enum + +enum { + kScaleCmd=1, + kResetScaleCmd, + kShowFrameCmd, + kShowGridCmd, + kShowLegendCmd, + kCopyScaleToRangeCmd, + kChangeRangeCmd, + kClearRangeCmd, + kChangeLabelsCmd, + kCurveOptionsCmd, + kRemoveCurveCmd, +}; + +#endif diff --git a/libj2dplot/code/JX2DPlotWidget-Options.h b/libj2dplot/code/JX2DPlotWidget-Options.h index 5d69b8dd3..f5e48cbd1 100644 --- a/libj2dplot/code/JX2DPlotWidget-Options.h +++ b/libj2dplot/code/JX2DPlotWidget-Options.h @@ -19,24 +19,12 @@ static const JUtf8Byte* kOptionsMenuStr = "|* %i __RemoveCurve::JX2DPlotWidget" ; -enum { - kScaleCmd=1, - kResetScaleCmd, - kShowFrameCmd, - kShowGridCmd, - kShowLegendCmd, - kCopyScaleToRangeCmd, - kChangeRangeCmd, - kClearRangeCmd, - kChangeLabelsCmd, - kCurveOptionsCmd, - kRemoveCurveCmd, -}; +#include "JX2DPlotWidget-Options-enum.h" static void ConfigureOptionsMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#o", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#o"); } }; diff --git a/libj2dplot/code/JX2DPlotWidget-Options.jxm b/libj2dplot/code/JX2DPlotWidget-Options.jxm index fda158eab..0e349f0dc 100644 --- a/libj2dplot/code/JX2DPlotWidget-Options.jxm +++ b/libj2dplot/code/JX2DPlotWidget-Options.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -671 373 +809 367 "JX2DPlotWidget" "Options" 'o 40 40 +155 100 -100 -100 -100 -100 +44 +157 +169 75 0 diff --git a/libj2dplot/testui/code/PlotDirector-Actions-enum.h b/libj2dplot/testui/code/PlotDirector-Actions-enum.h new file mode 100644 index 000000000..873129094 --- /dev/null +++ b/libj2dplot/testui/code/PlotDirector-Actions-enum.h @@ -0,0 +1,16 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_PlotDirector_Actions_enum +#define _H_PlotDirector_Actions_enum + +enum { + kPSPageSetupCmd=1, + kPrintPSCmd, + kPrintPlotEPSCmd, + kPrintMarksEPSCmd, + kQuitCmd, +}; + +#endif diff --git a/libj2dplot/testui/code/PlotDirector-Actions.h b/libj2dplot/testui/code/PlotDirector-Actions.h index c06b42b81..fc3160d5d 100644 --- a/libj2dplot/testui/code/PlotDirector-Actions.h +++ b/libj2dplot/testui/code/PlotDirector-Actions.h @@ -13,13 +13,7 @@ static const JUtf8Byte* kActionsMenuStr = "|* %i __Quit::PlotDirector" ; -enum { - kPSPageSetupCmd=1, - kPrintPSCmd, - kPrintPlotEPSCmd, - kPrintMarksEPSCmd, - kQuitCmd, -}; +#include "PlotDirector-Actions-enum.h" #ifndef _H_jx_af_image_jx_jx_file_print #define _H_jx_af_image_jx_jx_file_print @@ -27,8 +21,8 @@ enum { #endif static void ConfigureActionsMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#a", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#a"); } menu->SetItemImage(kPrintPSCmd + offset, jx_file_print); }; diff --git a/libj2dplot/testui/code/PlotDirector-Actions.jxm b/libj2dplot/testui/code/PlotDirector-Actions.jxm index 9c38ff55a..fccdedd8c 100644 --- a/libj2dplot/testui/code/PlotDirector-Actions.jxm +++ b/libj2dplot/testui/code/PlotDirector-Actions.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +764 249 "PlotDirector" "Actions" 'a @@ -7,9 +7,9 @@ jx_menu_editor 0 40 153 100 -100 -100 -100 +36 +154 +140 75 0 diff --git a/libj2dplot/testui/code/main.cpp b/libj2dplot/testui/code/main.cpp index 71b69db9f..b615e3e54 100644 --- a/libj2dplot/testui/code/main.cpp +++ b/libj2dplot/testui/code/main.cpp @@ -101,7 +101,7 @@ TestData ok = data->SetYErrors(yPErr, yMErr); assert( ok ); - plot->AddCurve(data, true, JString("sin(x)", JString::kNoCopy), true, true); + plot->AddCurve(data, true, "sin(x)", true, true); x.RemoveAll(); y.RemoveAll(); @@ -114,7 +114,7 @@ TestData } JIndex i; - plot->AddCurve(x, y, false, JString("cos(x)", JString::kNoCopy), &i, true, false); + plot->AddCurve(x, y, false, "cos(x)", &i, true, false); plot->SetTitle(JGetString("DataTitle::main")); } @@ -145,7 +145,7 @@ TestLogData } JIndex i; - plot->AddCurve(x, y, false, JString("log2(x)", JString::kNoCopy), &i, true, false); + plot->AddCurve(x, y, false, "log2(x)", &i, true, false); x.RemoveAll(); y.RemoveAll(); @@ -156,7 +156,7 @@ TestLogData y.AppendItem((i*delta)*(i*delta)); } - plot->AddCurve(x, y, false, JString("x^2", JString::kNoCopy), &i, true, false); + plot->AddCurve(x, y, false, "x^2", &i, true, false); plot->SetYScale(0.1, 1000, 0, false); plot->SetTitle(JGetString("LogDataTitle::main")); @@ -188,7 +188,7 @@ TestVector data->AddElement(0.8+x, 5.0+y, x,y); } - plot->AddCurve(data, true, JString("vector", JString::kNoCopy)); + plot->AddCurve(data, true, "vector"); plot->SetTitle(JGetString("VectorTitle::main")); } diff --git a/libjcore/code/JFileArray.cpp b/libjcore/code/JFileArray.cpp index 7ef11681c..fc201f83a 100644 --- a/libjcore/code/JFileArray.cpp +++ b/libjcore/code/JFileArray.cpp @@ -93,7 +93,7 @@ #include "jStreamUtil.h" #include "jFileUtil.h" #include "jDirUtil.h" -#include "JMinMax.h" +#include "jGlobals.h" #include "jAssert.h" const JFileVersion JFileArray::kInitialVersion = 0; @@ -381,7 +381,7 @@ JFileArray::OKToCreateEmbedded } else if (!fileIndex->EmbeddedFileIsClosed(index)) { - return FileAlreadyOpen(JString("embedded file", JString::kNoCopy)); + return FileAlreadyOpen(JGetString("EmbeddedFile::JFileArray")); } } diff --git a/libjcore/code/JSpellChecker.cpp b/libjcore/code/JSpellChecker.cpp index ab04dde3b..b82685fc8 100644 --- a/libjcore/code/JSpellChecker.cpp +++ b/libjcore/code/JSpellChecker.cpp @@ -36,13 +36,13 @@ JSpellChecker::JSpellChecker() } int toFD, fromFD; - JError err = JProcess::Create(&itsProcess, JString("aspell -a", JString::kNoCopy), + JError err = JProcess::Create(&itsProcess, "aspell -a", kJCreatePipe, &toFD, kJCreatePipe, &fromFD, kJTossOutput, nullptr); if (!err.OK()) { - err = JProcess::Create(&itsProcess, JString("ispell -a", JString::kNoCopy), + err = JProcess::Create(&itsProcess, "ispell -a", kJCreatePipe, &toFD, kJCreatePipe, &fromFD, kJTossOutput, nullptr); diff --git a/libjcore/code/JString.cpp b/libjcore/code/JString.cpp index 5045a43bb..d0b5d1da1 100644 --- a/libjcore/code/JString.cpp +++ b/libjcore/code/JString.cpp @@ -37,8 +37,9 @@ #include "jAssert.h" JSize JString::theDefaultMinLgSize = 5; // 2^5 = 32 bytes -const JString JString::empty("", JString::kNoCopy); -const JString JString::newline("\n", JString::kNoCopy); +const JString JString::empty(""); +const JString JString::space(" "); +const JString JString::newline("\n"); static thread_local JString* theCurrentlyConstructingObject; static thread_local UCollator* theCaseSensitiveCollator; diff --git a/libjcore/code/JString.h b/libjcore/code/JString.h index a29bafad3..035fe2a4c 100644 --- a/libjcore/code/JString.h +++ b/libjcore/code/JString.h @@ -60,6 +60,7 @@ class JString }; static const JString empty; + static const JString space; static const JString newline; public: diff --git a/libjcore/code/jGlobals_UNIX.cpp b/libjcore/code/jGlobals_UNIX.cpp index 8b08b30ee..a670b515a 100644 --- a/libjcore/code/jGlobals_UNIX.cpp +++ b/libjcore/code/jGlobals_UNIX.cpp @@ -41,7 +41,7 @@ JGetDataDirectories { if (systemDataFileDir.IsEmpty()) { - if (JProgramAvailable(JString("brew", JString::kNoCopy))) + if (JProgramAvailable("brew")) { const JUtf8Byte* argv[] = { "brew", "--prefix", nullptr }; JProcess* p; @@ -67,11 +67,11 @@ JGetDataDirectories else { JString s1, s2; - const JError err = JGetSymbolicLinkTarget(JString("/proc/self/exe", JString::kNoCopy), &s1); + const JError err = JGetSymbolicLinkTarget("/proc/self/exe", &s1); if (err.OK()) { JSplitPathAndName(s1, &systemDataFileDir, &s2); - systemDataFileDir = JCombinePathAndName(systemDataFileDir, JString("..", JString::kNoCopy)); + systemDataFileDir = JCombinePathAndName(systemDataFileDir, ".."); systemDataFileDir = JCombinePathAndName(systemDataFileDir, kSystemDataFileDir); } } diff --git a/libjcore/code/jProcessUtil.cpp b/libjcore/code/jProcessUtil.cpp index 7a37796a0..58b9e8816 100644 --- a/libjcore/code/jProcessUtil.cpp +++ b/libjcore/code/jProcessUtil.cpp @@ -120,7 +120,7 @@ JParseArgsForExec } if (c == ';') { - argList->Append(JString(";", JString::kNoCopy)); + argList->Append(";"); } iter.BeginMatch(); } diff --git a/libjcore/code/jTextUtil.cpp b/libjcore/code/jTextUtil.cpp index 28e00b480..769004db6 100644 --- a/libjcore/code/jTextUtil.cpp +++ b/libjcore/code/jTextUtil.cpp @@ -358,7 +358,7 @@ JPasteUNIXTerminalOutput if (substr.IsEmpty()) { cmdList.CleanOut(); - cmdList.Append(JString("0", JString::kNoCopy)); + cmdList.Append("0"); } else { diff --git a/libjcore/code/jVCSUtil.cpp b/libjcore/code/jVCSUtil.cpp index f08af53a8..fc4f42dd5 100644 --- a/libjcore/code/jVCSUtil.cpp +++ b/libjcore/code/jVCSUtil.cpp @@ -438,7 +438,7 @@ JGetVCSRepositoryPath { int fromFD; const JError err = JExecute(origPath, - JString("svn info --show-item url", JString::kNoCopy), nullptr, + "svn info --show-item url", nullptr, kJIgnoreConnection, nullptr, kJCreatePipe, &fromFD); if (err.OK()) diff --git a/libjcore/strings/jcore_strings b/libjcore/strings/jcore_strings index 34fd2ab91..58f970ef1 100644 --- a/libjcore/strings/jcore_strings +++ b/libjcore/strings/jcore_strings @@ -106,6 +106,8 @@ FileAlreadyOpen::JFileArray "\"$name\" is already open." WrongSignature::JFileArray "\"$name\" has the wrong signature." NotEmbeddedFile::JFileArray "The specified element ($index) is not an embedded JFileArray." +EmbeddedFile::JFileArray "embedded file" + # JPrefsManager WrongVersion::JPrefsManager "The preferences file has the wrong version." diff --git a/libjexpr/code/JExprEditor.cpp b/libjexpr/code/JExprEditor.cpp index 238ff4eb2..668ed5dc5 100644 --- a/libjexpr/code/JExprEditor.cpp +++ b/libjexpr/code/JExprEditor.cpp @@ -2546,7 +2546,7 @@ JExprEditor::GetSpaceWidth ) const { - return GetStringWidth(fontSize, JString(" ", JString::kNoCopy)); + return GetStringWidth(fontSize, JString::space); } JSize diff --git a/libjexpr/code/JFunctionWithArgs.cpp b/libjexpr/code/JFunctionWithArgs.cpp index f79e3fbb7..c91f290bd 100644 --- a/libjexpr/code/JFunctionWithArgs.cpp +++ b/libjexpr/code/JFunctionWithArgs.cpp @@ -150,7 +150,7 @@ JFunctionWithArgs::Layout // get rectangle for each argument JPoint argUpperLeft(ourRect.right, ourRect.top); - const JSize sepWidth = renderer.GetStringWidth(fontSize, JString(", ", JString::kNoCopy)); + const JSize sepWidth = renderer.GetStringWidth(fontSize, ", "); const JSize argCount = GetArgCount(); { @@ -259,7 +259,7 @@ JFunctionWithArgs::Render } if (i < argCount) { - renderer.DrawString(argRect.right, ourMidline, fontSize, JString(",", JString::kNoCopy)); + renderer.DrawString(argRect.right, ourMidline, fontSize, ","); } else { diff --git a/libjexpr/code/JNegation.cpp b/libjexpr/code/JNegation.cpp index 9dd19e4cf..7605124ce 100644 --- a/libjexpr/code/JNegation.cpp +++ b/libjexpr/code/JNegation.cpp @@ -158,7 +158,7 @@ JNegation::Layout // intialize our rectangle JPoint argUpperLeft = upperLeft; - argUpperLeft.x += renderer.GetStringWidth(fontSize, JString("-", JString::kNoCopy)); + argUpperLeft.x += renderer.GetStringWidth(fontSize, "-"); JFunction* arg = GetArg(); if (dynamic_cast(arg) != nullptr) @@ -216,7 +216,7 @@ JNegation::Render // draw ourselves - renderer.DrawString(ourRect.left, ourMidline, fontSize, JString("-", JString::kNoCopy)); + renderer.DrawString(ourRect.left, ourMidline, fontSize, "-"); const JFunction* arg = GetArg(); arg->Render(renderer, rectList); diff --git a/libjexpr/code/JSummation.cpp b/libjexpr/code/JSummation.cpp index 795e1ebe2..6d9e78ed8 100644 --- a/libjexpr/code/JSummation.cpp +++ b/libjexpr/code/JSummation.cpp @@ -198,8 +198,8 @@ JSummation::Layout // get rectangle for each argument const JSize spaceWidth = renderer.GetSpaceWidth(fontSize); - const JSize plusWidth = renderer.GetStringWidth(fontSize, JString("+", JString::kNoCopy)); - const JSize minusWidth = renderer.GetStringWidth(fontSize, JString("-", JString::kNoCopy)); + const JSize plusWidth = renderer.GetStringWidth(fontSize, "+"); + const JSize minusWidth = renderer.GetStringWidth(fontSize, "-"); const JSize argCount = GetArgCount(); { @@ -309,13 +309,13 @@ JSummation::Render const auto* neg = dynamic_cast(arg); if (neg != nullptr) { - renderer.DrawString(h, ourMidline, fontSize, JString("-", JString::kNoCopy)); + renderer.DrawString(h, ourMidline, fontSize, "-"); f = arg; arg = neg->GetArg(); } else if (i > 1) { - renderer.DrawString(h, ourMidline, fontSize, JString("+", JString::kNoCopy)); + renderer.DrawString(h, ourMidline, fontSize, "+"); } arg->Render(renderer, rectList); diff --git a/libjexpr/code/JXExprEditor-Edit-enum.h b/libjexpr/code/JXExprEditor-Edit-enum.h new file mode 100644 index 000000000..7b2a92a31 --- /dev/null +++ b/libjexpr/code/JXExprEditor-Edit-enum.h @@ -0,0 +1,17 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXExprEditor_Edit_enum +#define _H_JXExprEditor_Edit_enum + +enum { + __Undo=1, + __Cut, + __Copy, + __Paste, + __Clear, + __SelectAll, +}; + +#endif diff --git a/libjexpr/code/JXExprEditor-Edit.h b/libjexpr/code/JXExprEditor-Edit.h index e31f7c704..5acb5d0cc 100644 --- a/libjexpr/code/JXExprEditor-Edit.h +++ b/libjexpr/code/JXExprEditor-Edit.h @@ -14,14 +14,7 @@ static const JUtf8Byte* kEditMenuStr = "|* %i SelectAll::JX" ; -enum { - __Undo=1, - __Cut, - __Copy, - __Paste, - __Clear, - __SelectAll, -}; +#include "JXExprEditor-Edit-enum.h" #ifndef _H_jx_af_image_jx_jx_edit_undo #define _H_jx_af_image_jx_jx_edit_undo @@ -45,8 +38,8 @@ enum { #endif static void ConfigureEditMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#e", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#e"); } menu->SetItemImage(__Undo + offset, jx_edit_undo); menu->SetItemImage(__Cut + offset, jx_edit_cut); diff --git a/libjexpr/code/JXExprEditor-Edit.jxm b/libjexpr/code/JXExprEditor-Edit.jxm index df343c58e..12085020b 100644 --- a/libjexpr/code/JXExprEditor-Edit.jxm +++ b/libjexpr/code/JXExprEditor-Edit.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +615 268 "JXExprEditor" "Edit" 'e @@ -7,7 +7,7 @@ jx_menu_editor 0 40 100 100 -100 +39 100 100 75 diff --git a/libjexpr/code/JXExprEditor-Font-enum.h b/libjexpr/code/JXExprEditor-Font-enum.h new file mode 100644 index 000000000..e399ffb5f --- /dev/null +++ b/libjexpr/code/JXExprEditor-Font-enum.h @@ -0,0 +1,13 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXExprEditor_Font_enum +#define _H_JXExprEditor_Font_enum + +enum { + ____Normal=1, + ____Greek, +}; + +#endif diff --git a/libjexpr/code/JXExprEditor-Font.h b/libjexpr/code/JXExprEditor-Font.h index b7534b4d6..e12c717d8 100644 --- a/libjexpr/code/JXExprEditor-Font.h +++ b/libjexpr/code/JXExprEditor-Font.h @@ -10,15 +10,12 @@ static const JUtf8Byte* kFontMenuStr = "|* %r %i __Greek::JXExprEditor" ; -enum { - ____Normal=1, - ____Greek, -}; +#include "JXExprEditor-Font-enum.h" static void ConfigureFontMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#f", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#f"); } }; diff --git a/libjexpr/code/JXExprEditor-Font.jxm b/libjexpr/code/JXExprEditor-Font.jxm index 8712b8101..4e9f5473a 100644 --- a/libjexpr/code/JXExprEditor-Font.jxm +++ b/libjexpr/code/JXExprEditor-Font.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +624 191 "JXExprEditor" "Font" 'f @@ -7,7 +7,7 @@ jx_menu_editor 0 40 100 100 -100 +37 100 100 75 diff --git a/libjexpr/code/JXExprEditor-Function-enum.h b/libjexpr/code/JXExprEditor-Function-enum.h new file mode 100644 index 000000000..d72b3414d --- /dev/null +++ b/libjexpr/code/JXExprEditor-Function-enum.h @@ -0,0 +1,39 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXExprEditor_Function_enum +#define _H_JXExprEditor_Function_enum + +enum { + ____absoluteValue=1, + ____squareRoot, + ____logarithmAnyBase, + ____naturalLogarithm, + ____sine, + ____cosine, + ____tangent, + ____inverseSine, + ____inverseCosine, + ____inverseTangent, + ____inverseTangentYX, + ____hyperbolicSine, + ____hyperbolicCosine, + ____hyperbolicTangent, + ____inverseHyperbolicSine, + ____inverseHyperbolicCosine, + ____inverseHyperbolicTangent, + ____realPart, + ____imaginaryPart, + ____phaseAngle, + ____complexConjugate, + ____rotateZAngle, + ____minimum, + ____maximum, + ____parallel, + ____algebraicSign, + ____roundToInteger, + ____truncateToInteger, +}; + +#endif diff --git a/libjexpr/code/JXExprEditor-Function.h b/libjexpr/code/JXExprEditor-Function.h index c2cba9b07..435788916 100644 --- a/libjexpr/code/JXExprEditor-Function.h +++ b/libjexpr/code/JXExprEditor-Function.h @@ -36,36 +36,7 @@ static const JUtf8Byte* kFunctionMenuStr = "|* %i __truncateToInteger::JXExprEditor" ; -enum { - ____absoluteValue=1, - ____squareRoot, - ____logarithmAnyBase, - ____naturalLogarithm, - ____sine, - ____cosine, - ____tangent, - ____inverseSine, - ____inverseCosine, - ____inverseTangent, - ____inverseTangentYX, - ____hyperbolicSine, - ____hyperbolicCosine, - ____hyperbolicTangent, - ____inverseHyperbolicSine, - ____inverseHyperbolicCosine, - ____inverseHyperbolicTangent, - ____realPart, - ____imaginaryPart, - ____phaseAngle, - ____complexConjugate, - ____rotateZAngle, - ____minimum, - ____maximum, - ____parallel, - ____algebraicSign, - ____roundToInteger, - ____truncateToInteger, -}; +#include "JXExprEditor-Function-enum.h" static void ConfigureFunctionMenu(JXTextMenu* menu, const int offset = 0) { diff --git a/libjexpr/code/JXExprEditor-Function.jxm b/libjexpr/code/JXExprEditor-Function.jxm index eec0e8b17..530dad593 100644 --- a/libjexpr/code/JXExprEditor-Function.jxm +++ b/libjexpr/code/JXExprEditor-Function.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -675 728 +871 725 "JXExprEditor" "Function" ' 40 40 +170 100 -100 -100 -100 -100 +43 +176 +199 75 0 diff --git a/libjexpr/code/JXExprEditor-Math-enum.h b/libjexpr/code/JXExprEditor-Math-enum.h new file mode 100644 index 000000000..c0f6b92fc --- /dev/null +++ b/libjexpr/code/JXExprEditor-Math-enum.h @@ -0,0 +1,21 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXExprEditor_Math_enum +#define _H_JXExprEditor_Math_enum + +enum { + kEvaluateItemIndex=1, + ____PrintToEPS, + ____Negate, + kApplyFnToSelIndex, + ____AddArgument, + ____MoveLeft, + ____MoveRight, + ____GroupLeft, + ____GroupRight, + ____Ungroup, +}; + +#endif diff --git a/libjexpr/code/JXExprEditor-Math.h b/libjexpr/code/JXExprEditor-Math.h index d983bb377..559a48711 100644 --- a/libjexpr/code/JXExprEditor-Math.h +++ b/libjexpr/code/JXExprEditor-Math.h @@ -18,23 +18,12 @@ static const JUtf8Byte* kMathMenuStr = "|* %i __Ungroup::JXExprEditor" ; -enum { - kEvaluateItemIndex=1, - ____PrintToEPS, - ____Negate, - kApplyFnToSelIndex, - ____AddArgument, - ____MoveLeft, - ____MoveRight, - ____GroupLeft, - ____GroupRight, - ____Ungroup, -}; +#include "JXExprEditor-Math-enum.h" static void ConfigureMathMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#m", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#m"); } }; diff --git a/libjexpr/code/JXExprEditor-Math.jxm b/libjexpr/code/JXExprEditor-Math.jxm index fef4d740b..894331466 100644 --- a/libjexpr/code/JXExprEditor-Math.jxm +++ b/libjexpr/code/JXExprEditor-Math.jxm @@ -7,9 +7,9 @@ jx_menu_editor 0 40 100 100 -100 -100 -100 +38 +109 +135 75 0 diff --git a/libjexpr/code/JXExprInput-Font-enum.h b/libjexpr/code/JXExprInput-Font-enum.h new file mode 100644 index 000000000..a98d719a9 --- /dev/null +++ b/libjexpr/code/JXExprInput-Font-enum.h @@ -0,0 +1,13 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXExprInput_Font_enum +#define _H_JXExprInput_Font_enum + +enum { + kNormalFontCmd=1, + kGreekFontCmd, +}; + +#endif diff --git a/libjexpr/code/JXExprInput-Font.h b/libjexpr/code/JXExprInput-Font.h index 0510b9c6e..8303baf03 100644 --- a/libjexpr/code/JXExprInput-Font.h +++ b/libjexpr/code/JXExprInput-Font.h @@ -10,15 +10,12 @@ static const JUtf8Byte* kFontMenuStr = "|* %r %i __Greek::JXExprInput" ; -enum { - kNormalFontCmd=1, - kGreekFontCmd, -}; +#include "JXExprInput-Font-enum.h" static void ConfigureFontMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#f", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#f"); } }; diff --git a/libjexpr/code/JXExprInput-Font.jxm b/libjexpr/code/JXExprInput-Font.jxm index 4ac99d0bf..47cc52d50 100644 --- a/libjexpr/code/JXExprInput-Font.jxm +++ b/libjexpr/code/JXExprInput-Font.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +636 184 "JXExprInput" "Font" 'f @@ -7,9 +7,9 @@ jx_menu_editor 0 40 100 100 +39 100 -100 -100 +114 75 0 diff --git a/libjx/code/JXAcceptLicenseDialog.cpp b/libjx/code/JXAcceptLicenseDialog.cpp index 815b89cb7..37c321dd2 100644 --- a/libjx/code/JXAcceptLicenseDialog.cpp +++ b/libjx/code/JXAcceptLicenseDialog.cpp @@ -61,6 +61,7 @@ JXAcceptLicenseDialog::BuildWindow() auto* scrollbarSet = jnew JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kVElastic, 20,20, 470,500); + assert( scrollbarSet != nullptr ); // end JXLayout diff --git a/libjx/code/JXCharInput.cpp b/libjx/code/JXCharInput.cpp index 2699d77fd..0f6c29be8 100644 --- a/libjx/code/JXCharInput.cpp +++ b/libjx/code/JXCharInput.cpp @@ -29,7 +29,7 @@ JXCharInput::JXCharInput : JXInputField(enclosure, hSizing, vSizing, x,y, w,h) { - GetText()->SetText(JString(" ", JString::kNoCopy)); + GetText()->SetText(JString::space); SetLengthLimits(1,1); } @@ -110,7 +110,7 @@ JXCharInput::HandleKeyPress JXInputField::HandleKeyPress(c, keySym, modifiers); if (GetText()->IsEmpty()) { - GetText()->SetText(JString(" ", JString::kNoCopy)); + GetText()->SetText(JString::space); } if (!willDie) { diff --git a/libjx/code/JXChooseColorDialog.cpp b/libjx/code/JXChooseColorDialog.cpp index 4fe7bc9d8..f7888472e 100644 --- a/libjx/code/JXChooseColorDialog.cpp +++ b/libjx/code/JXChooseColorDialog.cpp @@ -97,18 +97,22 @@ JXChooseColorDialog::BuildWindow itsHSlider = jnew JXSlider(window, JXWidget::kHElastic, JXWidget::kFixedTop, 340,70, 150,20); + assert( itsHSlider != nullptr ); itsSSlider = jnew JXSlider(window, JXWidget::kHElastic, JXWidget::kFixedTop, 340,90, 150,20); + assert( itsSSlider != nullptr ); itsVSlider = jnew JXSlider(window, JXWidget::kHElastic, JXWidget::kFixedTop, 340,110, 150,20); + assert( itsVSlider != nullptr ); itsColorSample = jnew JXFlatRect(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 400,20, 30,30); + assert( itsColorSample != nullptr ); auto* redLabel = jnew JXStaticText(JGetString("redLabel::JXChooseColorDialog::JXLayout"), window, @@ -131,14 +135,17 @@ JXChooseColorDialog::BuildWindow itsRInput = jnew JXIntegerInput(window, JXWidget::kHElastic, JXWidget::kFixedTop, 420,140, 70,20); + assert( itsRInput != nullptr ); itsGInput = jnew JXIntegerInput(window, JXWidget::kHElastic, JXWidget::kFixedTop, 420,160, 70,20); + assert( itsGInput != nullptr ); itsBInput = jnew JXIntegerInput(window, JXWidget::kHElastic, JXWidget::kFixedTop, 420,180, 70,20); + assert( itsBInput != nullptr ); auto* redRangeLabel = jnew JXStaticText(JGetString("redRangeLabel::JXChooseColorDialog::JXLayout"), window, @@ -161,6 +168,7 @@ JXChooseColorDialog::BuildWindow itsColorWheel = jnew JXColorWheel(window, JXWidget::kHElastic, JXWidget::kVElastic, 20,20, 250,220); + assert( itsColorWheel != nullptr ); // end JXLayout diff --git a/libjx/code/JXChooseFileDialog.cpp b/libjx/code/JXChooseFileDialog.cpp index 5a4ad825e..f29c76aca 100644 --- a/libjx/code/JXChooseFileDialog.cpp +++ b/libjx/code/JXChooseFileDialog.cpp @@ -156,6 +156,7 @@ JXChooseFileDialog::BuildWindow auto* scrollbarSet = jnew JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,140, 180,190); + assert( scrollbarSet != nullptr ); auto* filterLabel = jnew JXStaticText(JGetString("filterLabel::JXChooseFileDialog::JXLayout"), window, @@ -171,18 +172,22 @@ JXChooseFileDialog::BuildWindow auto* pathInput = jnew JXPathInput(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,20, 200,20); + assert( pathInput != nullptr ); auto* filterInput = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,50, 200,20); + assert( filterInput != nullptr ); auto* pathHistory = jnew JXPathHistoryMenu(1, JString::empty, window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,20, 30,20); + assert( pathHistory != nullptr ); auto* filterHistory = jnew JXStringHistoryMenu(1, JString::empty, window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,50, 30,20); + assert( filterHistory != nullptr ); auto* upButton = jnew JXTextButton(JGetString("upButton::JXChooseFileDialog::JXLayout"), window, @@ -195,7 +200,7 @@ JXChooseFileDialog::BuildWindow assert( selectAllButton != nullptr ); auto* currPathMenu = - jnew JXCurrentPathMenu(JString("/", JString::kNoCopy), window, + jnew JXCurrentPathMenu("/", window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,110, 180,20); assert( currPathMenu != nullptr ); diff --git a/libjx/code/JXChooseFontSizeDialog.cpp b/libjx/code/JXChooseFontSizeDialog.cpp index 61f2c89fe..a22509b94 100644 --- a/libjx/code/JXChooseFontSizeDialog.cpp +++ b/libjx/code/JXChooseFontSizeDialog.cpp @@ -68,6 +68,7 @@ JXChooseFontSizeDialog::BuildWindow itsFontSize = jnew JXIntegerInput(window, JXWidget::kHElastic, JXWidget::kFixedTop, 120,20, 40,20); + assert( itsFontSize != nullptr ); auto* fontSizeLabel = jnew JXStaticText(JGetString("fontSizeLabel::JXChooseFontSizeDialog::JXLayout"), window, diff --git a/libjx/code/JXChoosePathDialog.cpp b/libjx/code/JXChoosePathDialog.cpp index c7c9079c1..35aa0b6f6 100644 --- a/libjx/code/JXChoosePathDialog.cpp +++ b/libjx/code/JXChoosePathDialog.cpp @@ -118,6 +118,7 @@ JXChoosePathDialog::BuildWindow auto* scrollbarSet = jnew JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,140, 180,190); + assert( scrollbarSet != nullptr ); auto* selectButton = jnew JXTextButton(JGetString("selectButton::JXChoosePathDialog::JXLayout"), window, @@ -127,6 +128,7 @@ JXChoosePathDialog::BuildWindow auto* pathInput = jnew JXPathInput(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,20, 200,20); + assert( pathInput != nullptr ); auto* showHiddenCB = jnew JXTextCheckbox(JGetString("showHiddenCB::JXChoosePathDialog::JXLayout"), window, @@ -142,6 +144,7 @@ JXChoosePathDialog::BuildWindow auto* filterInput = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,50, 200,20); + assert( filterInput != nullptr ); auto* explanText = jnew JXStaticText(JGetString("explanText::JXChoosePathDialog::JXLayout"), window, @@ -152,10 +155,12 @@ JXChoosePathDialog::BuildWindow auto* pathHistory = jnew JXPathHistoryMenu(1, JString::empty, window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,20, 30,20); + assert( pathHistory != nullptr ); auto* filterHistory = jnew JXStringHistoryMenu(1, JString::empty, window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,50, 30,20); + assert( filterHistory != nullptr ); auto* upButton = jnew JXTextButton(JGetString("upButton::JXChoosePathDialog::JXLayout"), window, @@ -165,9 +170,10 @@ JXChoosePathDialog::BuildWindow auto* newDirButton = jnew JXNewDirButton(window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,190, 70,20); + assert( newDirButton != nullptr ); auto* currPathMenu = - jnew JXCurrentPathMenu(JString("/", JString::kNoCopy), window, + jnew JXCurrentPathMenu("/", window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,110, 180,20); assert( currPathMenu != nullptr ); diff --git a/libjx/code/JXEPSPrintSetupDialog.cpp b/libjx/code/JXEPSPrintSetupDialog.cpp index 02f8170b8..fd53677f4 100644 --- a/libjx/code/JXEPSPrintSetupDialog.cpp +++ b/libjx/code/JXEPSPrintSetupDialog.cpp @@ -107,6 +107,7 @@ JXEPSPrintSetupDialog::BuildWindow itsFileInput = jnew JXFileInput(window, JXWidget::kHElastic, JXWidget::kFixedTop, 100,20, 250,20); + assert( itsFileInput != nullptr ); // end JXLayout diff --git a/libjx/code/JXEditWWWPrefsDialog.cpp b/libjx/code/JXEditWWWPrefsDialog.cpp index b9cee760f..207e3c16c 100644 --- a/libjx/code/JXEditWWWPrefsDialog.cpp +++ b/libjx/code/JXEditWWWPrefsDialog.cpp @@ -64,18 +64,22 @@ JXEditWWWPrefsDialog::BuildWindow itsShowURLCmdInput = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedTop, 250,20, 250,20); + assert( itsShowURLCmdInput != nullptr ); itsShowFileContentCmdInput = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedTop, 250,80, 250,20); + assert( itsShowFileContentCmdInput != nullptr ); itsShowFileLocationCmdInput = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedTop, 250,140, 250,20); + assert( itsShowFileLocationCmdInput != nullptr ); itsComposeMailCmdInput = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedTop, 250,200, 250,20); + assert( itsComposeMailCmdInput != nullptr ); auto* cancelButton = jnew JXTextButton(JGetString("cancelButton::JXEditWWWPrefsDialog::JXLayout"), window, diff --git a/libjx/code/JXErrorDialog.cpp b/libjx/code/JXErrorDialog.cpp index 3cee50929..4beb73a6f 100644 --- a/libjx/code/JXErrorDialog.cpp +++ b/libjx/code/JXErrorDialog.cpp @@ -67,10 +67,12 @@ JXErrorDialog::BuildWindow auto* icon = jnew JXImageWidget(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 40,40); + assert( icon != nullptr ); auto* text = jnew JXStaticText(JString::empty, true, true, false, nullptr, window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,20, 250,50); + assert( text != nullptr ); // end JXLayout diff --git a/libjx/code/JXFixLenPGDirector.cpp b/libjx/code/JXFixLenPGDirector.cpp index 34c4fb13c..5217b31b9 100644 --- a/libjx/code/JXFixLenPGDirector.cpp +++ b/libjx/code/JXFixLenPGDirector.cpp @@ -76,6 +76,7 @@ JXFixLenPGDirector::BuildWindow auto* indicator = jnew JXProgressIndicator(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,50, 230,10); + assert( indicator != nullptr ); // end JXLayout diff --git a/libjx/code/JXFontSizeMenu.cpp b/libjx/code/JXFontSizeMenu.cpp index 06eee8c65..8ba1f47e4 100644 --- a/libjx/code/JXFontSizeMenu.cpp +++ b/libjx/code/JXFontSizeMenu.cpp @@ -228,7 +228,7 @@ JXFontSizeMenu::BuildMenu ShowSeparatorAfter(GetItemCount()); AppendItem(JGetString("VariableSizeLabel::JXFontSizeMenu"), kRadioType, JString::empty, JString::empty, - JString("OtherFontSize::JX", JString::kNoCopy)); + "OtherFontSize::JX"); itsVarSizeIndex = GetItemCount(); } SetUpdateAction(kDisableNone); diff --git a/libjx/code/JXGetStringDialog.cpp b/libjx/code/JXGetStringDialog.cpp index 6a3394db9..b41fdd711 100644 --- a/libjx/code/JXGetStringDialog.cpp +++ b/libjx/code/JXGetStringDialog.cpp @@ -87,6 +87,7 @@ JXGetStringDialog::BuildWindow itsInputField = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedTop, 20,40, 270,20); + assert( itsInputField != nullptr ); auto* promptDisplay = jnew JXStaticText(JGetString("promptDisplay::JXGetStringDialog::JXLayout"), window, diff --git a/libjx/code/JXGoToLineDialog.cpp b/libjx/code/JXGoToLineDialog.cpp index deb5f8dbc..81d13f7ff 100644 --- a/libjx/code/JXGoToLineDialog.cpp +++ b/libjx/code/JXGoToLineDialog.cpp @@ -73,6 +73,7 @@ JXGoToLineDialog::BuildWindow itsLineNumber = jnew JXIntegerInput(window, JXWidget::kHElastic, JXWidget::kFixedTop, 110,20, 40,20); + assert( itsLineNumber != nullptr ); auto* gotoLineLabel = jnew JXStaticText(JGetString("gotoLineLabel::JXGoToLineDialog::JXLayout"), window, diff --git a/libjx/code/JXHelpManager.cpp b/libjx/code/JXHelpManager.cpp index a89fcff12..8042194a0 100644 --- a/libjx/code/JXHelpManager.cpp +++ b/libjx/code/JXHelpManager.cpp @@ -51,7 +51,7 @@ JXHelpManager::ShowSection JString url(name); if (!url.Contains("://")) { - url = JGetString("HELP_URL") + JString("#", JString::kNoCopy) + url; + url = JGetString("HELP_URL") + "#" + url; } JGetWebBrowser()->ShowURL(url); diff --git a/libjx/code/JXInputField-Context-enum.h b/libjx/code/JXInputField-Context-enum.h new file mode 100644 index 000000000..aaa93b468 --- /dev/null +++ b/libjx/code/JXInputField-Context-enum.h @@ -0,0 +1,17 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXInputField_Context_enum +#define _H_JXInputField_Context_enum + +enum { + __Undo=1, + __Cut, + __Copy, + __Paste, + __Clear, + __SelectAll, +}; + +#endif diff --git a/libjx/code/JXInputField-Context.h b/libjx/code/JXInputField-Context.h index 025afde4b..c92a319e3 100644 --- a/libjx/code/JXInputField-Context.h +++ b/libjx/code/JXInputField-Context.h @@ -14,14 +14,7 @@ static const JUtf8Byte* kContextMenuStr = "|* %i SelectAll::JXInputField" ; -enum { - __Undo=1, - __Cut, - __Copy, - __Paste, - __Clear, - __SelectAll, -}; +#include "JXInputField-Context-enum.h" #ifndef _H_jx_af_image_jx_jx_edit_undo #define _H_jx_af_image_jx_jx_edit_undo diff --git a/libjx/code/JXInputField-Context.jxm b/libjx/code/JXInputField-Context.jxm index f5215a5ee..60dff3e54 100644 --- a/libjx/code/JXInputField-Context.jxm +++ b/libjx/code/JXInputField-Context.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +628 268 "JXInputField" "Context" ' diff --git a/libjx/code/JXInputField.cpp b/libjx/code/JXInputField.cpp index ca454cb07..3f7fb9a7f 100644 --- a/libjx/code/JXInputField.cpp +++ b/libjx/code/JXInputField.cpp @@ -132,7 +132,7 @@ JString JXInputField::ToString() const { - return JXTEBase::ToString() + JString(": ", JString::kNoCopy) + GetText().GetText(); + return JXTEBase::ToString() + ": " + GetText().GetText(); } /****************************************************************************** diff --git a/libjx/code/JXMessageDialog.cpp b/libjx/code/JXMessageDialog.cpp index a72ae28a8..378b4f010 100644 --- a/libjx/code/JXMessageDialog.cpp +++ b/libjx/code/JXMessageDialog.cpp @@ -67,10 +67,12 @@ JXMessageDialog::BuildWindow auto* icon = jnew JXImageWidget(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 40,40); + assert( icon != nullptr ); auto* text = jnew JXStaticText(JString::empty, true, true, false, nullptr, window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,20, 250,50); + assert( text != nullptr ); // end JXLayout diff --git a/libjx/code/JXOKToCloseDialog.cpp b/libjx/code/JXOKToCloseDialog.cpp index c5d189201..2166f4940 100644 --- a/libjx/code/JXOKToCloseDialog.cpp +++ b/libjx/code/JXOKToCloseDialog.cpp @@ -78,6 +78,7 @@ JXOKToCloseDialog::BuildWindow auto* icon = jnew JXImageWidget(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 40,40); + assert( icon != nullptr ); auto* cancelButton = jnew JXTextButton(JGetString("cancelButton::JXOKToCloseDialog::JXLayout"), window, diff --git a/libjx/code/JXPGMessageDirector.cpp b/libjx/code/JXPGMessageDirector.cpp index 77e0223ff..ff336aefe 100644 --- a/libjx/code/JXPGMessageDirector.cpp +++ b/libjx/code/JXPGMessageDirector.cpp @@ -61,6 +61,7 @@ JXPGMessageDirector::BuildWindow() auto* scrollbarSet = jnew JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 500,170); + assert( scrollbarSet != nullptr ); itsSaveButton = jnew JXTextButton(JGetString("itsSaveButton::JXPGMessageDirector::JXLayout"), window, diff --git a/libjx/code/JXPSPageSetupDialog.cpp b/libjx/code/JXPSPageSetupDialog.cpp index dec30b5d5..dd98589ee 100644 --- a/libjx/code/JXPSPageSetupDialog.cpp +++ b/libjx/code/JXPSPageSetupDialog.cpp @@ -148,14 +148,17 @@ JXPSPageSetupDialog::BuildWindow itsOrientation = jnew JXRadioGroup(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 95,65, 94,54); + assert( itsOrientation != nullptr ); auto* portraitRB = jnew JXImageRadioButton(1, itsOrientation, JXWidget::kFixedLeft, JXWidget::kFixedTop, 5,5, 40,40); + assert( portraitRB != nullptr ); auto* landscapeRB = jnew JXImageRadioButton(2, itsOrientation, JXWidget::kFixedLeft, JXWidget::kFixedTop, 45,5, 40,40); + assert( landscapeRB != nullptr ); itsPaperTypeMenu = jnew JXTextMenu(JGetString("itsPaperTypeMenu::JXPSPageSetupDialog::JXLayout"), window, diff --git a/libjx/code/JXPSPrintSetupDialog.cpp b/libjx/code/JXPSPrintSetupDialog.cpp index f0d6d0852..51ae6c16d 100644 --- a/libjx/code/JXPSPrintSetupDialog.cpp +++ b/libjx/code/JXPSPrintSetupDialog.cpp @@ -125,6 +125,7 @@ JXPSPrintSetupDialog::BuildWindow itsDestination = jnew JXRadioGroup(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 135,20, 139,39); + assert( itsDestination != nullptr ); auto* printerLabel = jnew JXTextRadioButton(1, JGetString("printerLabel::JXPSPrintSetupDialog::JXLayout"), itsDestination, @@ -141,6 +142,7 @@ JXPSPrintSetupDialog::BuildWindow itsPrintCmd = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedTop, 100,70, 250,20); + assert( itsPrintCmd != nullptr ); itsChooseFileButton = jnew JXTextButton(JGetString("itsChooseFileButton::JXPSPrintSetupDialog::JXLayout"), window, @@ -151,6 +153,7 @@ JXPSPrintSetupDialog::BuildWindow itsCopyCount = jnew JXIntegerInput(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 170,110, 40,20); + assert( itsCopyCount != nullptr ); itsBWCheckbox = jnew JXTextCheckbox(JGetString("itsBWCheckbox::JXPSPrintSetupDialog::JXLayout"), window, @@ -161,10 +164,12 @@ JXPSPrintSetupDialog::BuildWindow itsFirstPageIndex = jnew JXIntegerInput(window, JXWidget::kFixedRight, JXWidget::kFixedTop, 230,150, 40,20); + assert( itsFirstPageIndex != nullptr ); itsLastPageIndex = jnew JXIntegerInput(window, JXWidget::kFixedRight, JXWidget::kFixedTop, 290,150, 40,20); + assert( itsLastPageIndex != nullptr ); itsPrintAllCB = jnew JXTextCheckbox(JGetString("itsPrintAllCB::JXPSPrintSetupDialog::JXLayout"), window, diff --git a/libjx/code/JXPTPageSetupDialog.cpp b/libjx/code/JXPTPageSetupDialog.cpp index 08851ee1a..c75da2fb1 100644 --- a/libjx/code/JXPTPageSetupDialog.cpp +++ b/libjx/code/JXPTPageSetupDialog.cpp @@ -105,10 +105,12 @@ JXPTPageSetupDialog::BuildWindow itsPrintCmd = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedTop, 110,20, 240,20); + assert( itsPrintCmd != nullptr ); itsWidth = jnew JXIntegerInput(window, JXWidget::kHElastic, JXWidget::kFixedTop, 90,60, 40,20); + assert( itsWidth != nullptr ); auto* widthLabel = jnew JXStaticText(JGetString("widthLabel::JXPTPageSetupDialog::JXLayout"), window, @@ -125,6 +127,7 @@ JXPTPageSetupDialog::BuildWindow itsHeight = jnew JXIntegerInput(window, JXWidget::kHElastic, JXWidget::kFixedTop, 90,80, 40,20); + assert( itsHeight != nullptr ); auto* charsLabel = jnew JXStaticText(JGetString("charsLabel::JXPTPageSetupDialog::JXLayout"), window, @@ -294,7 +297,7 @@ JXPTPageSetupDialog::PrintTestPage() } output.close(); - const JString sysCmd = itsPrintCmd->GetText()->GetText() + JString(" ", JString::kNoCopy) + JPrepArgForExec(fileName); + const JString sysCmd = itsPrintCmd->GetText()->GetText() + JString::space + JPrepArgForExec(fileName); err = JExecute(sysCmd, nullptr); err.ReportIfError(); diff --git a/libjx/code/JXPTPrintSetupDialog.cpp b/libjx/code/JXPTPrintSetupDialog.cpp index 9f57ae9db..5d1ff23ab 100644 --- a/libjx/code/JXPTPrintSetupDialog.cpp +++ b/libjx/code/JXPTPrintSetupDialog.cpp @@ -123,6 +123,7 @@ JXPTPrintSetupDialog::BuildWindow itsDestination = jnew JXRadioGroup(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 135,20, 139,39); + assert( itsDestination != nullptr ); auto* printerLabel = jnew JXTextRadioButton(1, JGetString("printerLabel::JXPTPrintSetupDialog::JXLayout"), itsDestination, @@ -139,6 +140,7 @@ JXPTPrintSetupDialog::BuildWindow itsPrintCmd = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedTop, 100,70, 250,20); + assert( itsPrintCmd != nullptr ); itsChooseFileButton = jnew JXTextButton(JGetString("itsChooseFileButton::JXPTPrintSetupDialog::JXLayout"), window, @@ -149,14 +151,17 @@ JXPTPrintSetupDialog::BuildWindow itsCopyCount = jnew JXIntegerInput(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 140,110, 40,20); + assert( itsCopyCount != nullptr ); itsFirstPageIndex = jnew JXIntegerInput(window, JXWidget::kFixedRight, JXWidget::kFixedTop, 230,150, 40,20); + assert( itsFirstPageIndex != nullptr ); itsLastPageIndex = jnew JXIntegerInput(window, JXWidget::kFixedRight, JXWidget::kFixedTop, 290,150, 40,20); + assert( itsLastPageIndex != nullptr ); itsPrintAllCB = jnew JXTextCheckbox(JGetString("itsPrintAllCB::JXPTPrintSetupDialog::JXLayout"), window, diff --git a/libjx/code/JXSaveFileDialog.cpp b/libjx/code/JXSaveFileDialog.cpp index ed5358d35..e10b0d7fd 100644 --- a/libjx/code/JXSaveFileDialog.cpp +++ b/libjx/code/JXSaveFileDialog.cpp @@ -148,6 +148,7 @@ JXSaveFileDialog::BuildWindow auto* scrollbarSet = jnew JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,140, 180,140); + assert( scrollbarSet != nullptr ); auto* saveButton = jnew JXTextButton(JGetString("saveButton::JXSaveFileDialog::JXLayout"), window, @@ -174,10 +175,12 @@ JXSaveFileDialog::BuildWindow auto* fileNameInput = jnew JXSaveFileInput(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,310, 180,20); + assert( fileNameInput != nullptr ); auto* pathInput = jnew JXPathInput(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,20, 200,20); + assert( pathInput != nullptr ); auto* showHiddenCB = jnew JXTextCheckbox(JGetString("showHiddenCB::JXSaveFileDialog::JXLayout"), window, @@ -199,14 +202,17 @@ JXSaveFileDialog::BuildWindow auto* filterInput = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,50, 200,20); + assert( filterInput != nullptr ); auto* pathHistory = jnew JXPathHistoryMenu(1, JString::empty, window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,20, 30,20); + assert( pathHistory != nullptr ); auto* filterHistory = jnew JXStringHistoryMenu(1, JString::empty, window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,50, 30,20); + assert( filterHistory != nullptr ); auto* upButton = jnew JXTextButton(JGetString("upButton::JXSaveFileDialog::JXLayout"), window, @@ -216,9 +222,10 @@ JXSaveFileDialog::BuildWindow auto* newDirButton = jnew JXNewDirButton(window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,190, 70,20); + assert( newDirButton != nullptr ); auto* currPathMenu = - jnew JXCurrentPathMenu(JString("/", JString::kNoCopy), window, + jnew JXCurrentPathMenu("/", window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,110, 180,20); assert( currPathMenu != nullptr ); diff --git a/libjx/code/JXSearchTextDialog.cpp b/libjx/code/JXSearchTextDialog.cpp index 941ec61c7..6cf7c5d68 100644 --- a/libjx/code/JXSearchTextDialog.cpp +++ b/libjx/code/JXSearchTextDialog.cpp @@ -309,10 +309,12 @@ JXSearchTextDialog::BuildWindow() itsPrevReplaceMenu = jnew JXStringHistoryMenu(kHistoryLength, JString::empty, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 245,118, 30,20); + assert( itsPrevReplaceMenu != nullptr ); itsPrevSearchMenu = jnew JXStringHistoryMenu(kHistoryLength, JString::empty, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 245,43, 30,20); + assert( itsPrevSearchMenu != nullptr ); itsHelpButton = jnew JXTextButton(JGetString("itsHelpButton::JXSearchTextDialog::JXLayout"), window, @@ -358,10 +360,12 @@ JXSearchTextDialog::BuildWindow() itsFindBackButton = jnew JXSearchTextButton(false, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 300,20, 20,20); + assert( itsFindBackButton != nullptr ); itsFindFwdButton = jnew JXSearchTextButton(true, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 420,20, 20,20); + assert( itsFindFwdButton != nullptr ); auto* replaceFindLabel = jnew JXStaticText(JGetString("replaceFindLabel::JXSearchTextDialog::JXLayout"), window, @@ -372,10 +376,12 @@ JXSearchTextDialog::BuildWindow() itsReplaceFindBackButton = jnew JXSearchTextButton(false, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 300,80, 20,20); + assert( itsReplaceFindBackButton != nullptr ); itsReplaceFindFwdButton = jnew JXSearchTextButton(true, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 420,80, 20,20); + assert( itsReplaceFindFwdButton != nullptr ); itsReplaceAllInSelButton = jnew JXTextButton(JGetString("itsReplaceAllInSelButton::JXSearchTextDialog::JXLayout"), window, @@ -395,10 +401,12 @@ JXSearchTextDialog::BuildWindow() itsSearchInput = jnew JXInputField(true, false, window, JXWidget::kHElastic, JXWidget::kFixedTop, 20,30, 220,45); + assert( itsSearchInput != nullptr ); itsReplaceInput = jnew JXInputField(true, false, window, JXWidget::kHElastic, JXWidget::kFixedTop, 20,105, 220,45); + assert( itsReplaceInput != nullptr ); itsReplaceAllButton = jnew JXTextButton(JGetString("itsReplaceAllButton::JXSearchTextDialog::JXLayout"), window, @@ -558,17 +566,19 @@ JXSearchTextDialog::SetObjects modifiers.SetState(kJXShiftKeyIndex, true); window->InstallShortcut(itsFindBackButton, JXCtrl('M'), modifiers); - modifiers.SetState(kJXControlKeyIndex, true); - itsReplaceIsRegexCB->SetShortcuts(JGetString("ReplaceIsRegexShorcut::JXSearchTextDialog")); - window->ClearShortcuts(itsReplaceIsRegexCB); - window->InstallShortcut(itsReplaceIsRegexCB, 'x', modifiers); - window->InstallShortcut(itsReplaceIsRegexCB, 'X', modifiers); - if (JXMenu::GetDisplayStyle() == JXMenu::kMacintoshStyle) { modifiers.SetState(kJXMetaKeyIndex, true); - modifiers.SetState(kJXControlKeyIndex, false); } + else + { + modifiers.SetState(kJXControlKeyIndex, true); + } + + itsReplaceIsRegexCB->SetShortcuts(JGetString("ReplaceIsRegexShorcut::JXSearchTextDialog")); + window->ClearShortcuts(itsReplaceIsRegexCB); + window->InstallShortcut(itsReplaceIsRegexCB, 'x', modifiers); + window->InstallShortcut(itsReplaceIsRegexCB, 'X', modifiers); window->InstallShortcut(itsFindBackButton, 'g', modifiers); window->InstallShortcut(itsFindBackButton, 'G', modifiers); diff --git a/libjx/code/JXSpellCheckerDialog.cpp b/libjx/code/JXSpellCheckerDialog.cpp index 469fe5a13..593b1e04d 100644 --- a/libjx/code/JXSpellCheckerDialog.cpp +++ b/libjx/code/JXSpellCheckerDialog.cpp @@ -148,10 +148,12 @@ JXSpellCheckerDialog::BuildWindow() itsFirstGuess = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedTop, 105,45, 230,20); + assert( itsFirstGuess != nullptr ); auto* set = jnew JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kVElastic, 105,75, 230,180); + assert( set != nullptr ); itsIgnoreButton = jnew JXTextButton(JGetString("itsIgnoreButton::JXSpellCheckerDialog::JXLayout"), window, diff --git a/libjx/code/JXStaticText.cpp b/libjx/code/JXStaticText.cpp index 43e1136e2..d99f1d88c 100644 --- a/libjx/code/JXStaticText.cpp +++ b/libjx/code/JXStaticText.cpp @@ -117,7 +117,7 @@ JString JXStaticText::ToString() const { - return JXTEBase::ToString() + JString(": ", JString::kNoCopy) + GetText().GetText(); + return JXTEBase::ToString() + ": " + GetText().GetText(); } /****************************************************************************** diff --git a/libjx/code/JXStringCompletionMenu.cpp b/libjx/code/JXStringCompletionMenu.cpp index ffd4c2d95..ae4e2b542 100644 --- a/libjx/code/JXStringCompletionMenu.cpp +++ b/libjx/code/JXStringCompletionMenu.cpp @@ -38,7 +38,7 @@ JXStringCompletionMenu::JXStringCompletionMenu const bool allowTabChar ) : - JXTextMenu(JString("*", JString::kNoCopy), te, kFixedLeft, kFixedTop, 0,0, 10,10), + JXTextMenu("*", te, kFixedLeft, kFixedTop, 0,0, 10,10), itsAllowTabChar(allowTabChar) { itsTE = te; diff --git a/libjx/code/JXStyleMenu-Style-enum.h b/libjx/code/JXStyleMenu-Style-enum.h new file mode 100644 index 000000000..9ac40af5c --- /dev/null +++ b/libjx/code/JXStyleMenu-Style-enum.h @@ -0,0 +1,28 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXStyleMenu_Style_enum +#define _H_JXStyleMenu_Style_enum + +enum { + __PlainStyle=1, + __BoldStyle, + __ItalicStyle, + __UnderlineStyle, + __DblUnderlineStyle, + __StrikeStyle, + __BlackStyle, + __GrayStyle, + __BrownStyle, + __OrangeStyle, + __RedStyle, + __DarkRedStyle, + __GreenStyle, + __BlueStyle, + __LightBlueStyle, + __PinkStyle, + __OtherColorStyle, +}; + +#endif diff --git a/libjx/code/JXStyleMenu-Style.h b/libjx/code/JXStyleMenu-Style.h index 29bc391db..6c7825e7e 100644 --- a/libjx/code/JXStyleMenu-Style.h +++ b/libjx/code/JXStyleMenu-Style.h @@ -25,30 +25,12 @@ static const JUtf8Byte* kStyleMenuStr = "|* %r %i OtherColorStyle::JX" ; -enum { - __PlainStyle=1, - __BoldStyle, - __ItalicStyle, - __UnderlineStyle, - __DblUnderlineStyle, - __StrikeStyle, - __BlackStyle, - __GrayStyle, - __BrownStyle, - __OrangeStyle, - __RedStyle, - __DarkRedStyle, - __GreenStyle, - __BlueStyle, - __LightBlueStyle, - __PinkStyle, - __OtherColorStyle, -}; +#include "JXStyleMenu-Style-enum.h" static void ConfigureStyleMenu(JXTextMenu* menu, const int offset = 0) { if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#y", JString::kNoCopy)); + menu->SetShortcuts("#y"); } }; diff --git a/libjx/code/JXTEBase-AdjustMargins-enum.h b/libjx/code/JXTEBase-AdjustMargins-enum.h new file mode 100644 index 000000000..caa0a6f61 --- /dev/null +++ b/libjx/code/JXTEBase-AdjustMargins-enum.h @@ -0,0 +1,16 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXTEBase_AdjustMargins_enum +#define _H_JXTEBase_AdjustMargins_enum + +enum { + __CleanRightMarginCmd=1, + __CoerceRightMarginCmd, + __ShiftSelLeftCmd, + __ShiftSelRightCmd, + __ForceShiftSelLeftCmd, +}; + +#endif diff --git a/libjx/code/JXTEBase-AdjustMargins.h b/libjx/code/JXTEBase-AdjustMargins.h index bd922607e..cb25b3d44 100644 --- a/libjx/code/JXTEBase-AdjustMargins.h +++ b/libjx/code/JXTEBase-AdjustMargins.h @@ -13,13 +13,7 @@ static const JUtf8Byte* kAdjustMarginsMenuStr = "|* %i ForceShiftSelLeftCmd::JXTEBase" ; -enum { - __CleanRightMarginCmd=1, - __CoerceRightMarginCmd, - __ShiftSelLeftCmd, - __ShiftSelRightCmd, - __ForceShiftSelLeftCmd, -}; +#include "JXTEBase-AdjustMargins-enum.h" #ifndef _H_jx_af_image_jx_jx_edit_clean_right_margin #define _H_jx_af_image_jx_jx_edit_clean_right_margin diff --git a/libjx/code/JXTEBase-CheckSpelling-enum.h b/libjx/code/JXTEBase-CheckSpelling-enum.h new file mode 100644 index 000000000..c7b9c5d8e --- /dev/null +++ b/libjx/code/JXTEBase-CheckSpelling-enum.h @@ -0,0 +1,13 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXTEBase_CheckSpelling_enum +#define _H_JXTEBase_CheckSpelling_enum + +enum { + __CheckAllSpellingCmd=1, + __CheckSpellingSelCmd, +}; + +#endif diff --git a/libjx/code/JXTEBase-CheckSpelling.h b/libjx/code/JXTEBase-CheckSpelling.h index b6f2feef1..5746d0217 100644 --- a/libjx/code/JXTEBase-CheckSpelling.h +++ b/libjx/code/JXTEBase-CheckSpelling.h @@ -10,10 +10,7 @@ static const JUtf8Byte* kCheckSpellingMenuStr = "|* %i CheckSpellingSelCmd::JX" ; -enum { - __CheckAllSpellingCmd=1, - __CheckSpellingSelCmd, -}; +#include "JXTEBase-CheckSpelling-enum.h" #ifndef _H_jx_af_image_jx_jx_spell_check #define _H_jx_af_image_jx_jx_spell_check diff --git a/libjx/code/JXTEBase-CleanWhitespace-enum.h b/libjx/code/JXTEBase-CleanWhitespace-enum.h new file mode 100644 index 000000000..934b2cdca --- /dev/null +++ b/libjx/code/JXTEBase-CleanWhitespace-enum.h @@ -0,0 +1,16 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXTEBase_CleanWhitespace_enum +#define _H_JXTEBase_CleanWhitespace_enum + +enum { + __ShowWhitespaceCmd=1, + __CleanAllWhitespaceCmd, + __CleanWhitespaceSelCmd, + __CleanAllWSAlignCmd, + __CleanWSAlignSelCmd, +}; + +#endif diff --git a/libjx/code/JXTEBase-CleanWhitespace.h b/libjx/code/JXTEBase-CleanWhitespace.h index 341ab6119..ad6eb9a45 100644 --- a/libjx/code/JXTEBase-CleanWhitespace.h +++ b/libjx/code/JXTEBase-CleanWhitespace.h @@ -13,13 +13,7 @@ static const JUtf8Byte* kCleanWhitespaceMenuStr = "|* %i CleanWSAlignSelCmd::JXTEBase" ; -enum { - __ShowWhitespaceCmd=1, - __CleanAllWhitespaceCmd, - __CleanWhitespaceSelCmd, - __CleanAllWSAlignCmd, - __CleanWSAlignSelCmd, -}; +#include "JXTEBase-CleanWhitespace-enum.h" #ifndef _H_jx_af_image_jx_jx_show_whitespace #define _H_jx_af_image_jx_jx_show_whitespace diff --git a/libjx/code/JXTEBase-Edit-enum.h b/libjx/code/JXTEBase-Edit-enum.h new file mode 100644 index 000000000..90ba4aaaf --- /dev/null +++ b/libjx/code/JXTEBase-Edit-enum.h @@ -0,0 +1,18 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXTEBase_Edit_enum +#define _H_JXTEBase_Edit_enum + +enum { + __Undo=1, + __Redo, + __Cut, + __Copy, + __Paste, + __Clear, + __SelectAll, +}; + +#endif diff --git a/libjx/code/JXTEBase-Edit.h b/libjx/code/JXTEBase-Edit.h index 76d5efbf7..fb928929a 100644 --- a/libjx/code/JXTEBase-Edit.h +++ b/libjx/code/JXTEBase-Edit.h @@ -15,15 +15,7 @@ static const JUtf8Byte* kEditMenuStr = "|* %i SelectAll::JX" ; -enum { - __Undo=1, - __Redo, - __Cut, - __Copy, - __Paste, - __Clear, - __SelectAll, -}; +#include "JXTEBase-Edit-enum.h" #ifndef _H_jx_af_image_jx_jx_edit_undo #define _H_jx_af_image_jx_jx_edit_undo @@ -52,7 +44,7 @@ enum { static void ConfigureEditMenu(JXTextMenu* menu, const int offset = 0) { if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#e", JString::kNoCopy)); + menu->SetShortcuts("#e"); } menu->SetItemImage(__Undo + offset, jx_edit_undo); menu->SetItemImage(__Redo + offset, jx_edit_redo); diff --git a/libjx/code/JXTEBase-ReadOnly-enum.h b/libjx/code/JXTEBase-ReadOnly-enum.h new file mode 100644 index 000000000..493afda75 --- /dev/null +++ b/libjx/code/JXTEBase-ReadOnly-enum.h @@ -0,0 +1,12 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXTEBase_ReadOnly_enum +#define _H_JXTEBase_ReadOnly_enum + +enum { + __ToggleReadOnlyCmd=1, +}; + +#endif diff --git a/libjx/code/JXTEBase-ReadOnly.h b/libjx/code/JXTEBase-ReadOnly.h index bc47cac26..61e396a9c 100644 --- a/libjx/code/JXTEBase-ReadOnly.h +++ b/libjx/code/JXTEBase-ReadOnly.h @@ -9,9 +9,7 @@ static const JUtf8Byte* kReadOnlyMenuStr = "* %b %i ToggleReadOnlyCmd::JXTEBase" ; -enum { - __ToggleReadOnlyCmd=1, -}; +#include "JXTEBase-ReadOnly-enum.h" #ifndef _H_jx_af_image_jx_jx_edit_read_only #define _H_jx_af_image_jx_jx_edit_read_only diff --git a/libjx/code/JXTEBase-Replace-enum.h b/libjx/code/JXTEBase-Replace-enum.h new file mode 100644 index 000000000..af42c69b1 --- /dev/null +++ b/libjx/code/JXTEBase-Replace-enum.h @@ -0,0 +1,25 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXTEBase_Replace_enum +#define _H_JXTEBase_Replace_enum + +enum { + __FindDialog_Replace=1, + __FindPrevious_Replace, + __FindNext_Replace, + __EnterSearchText_Replace, + __EnterReplaceText_Replace, + __FindSelectionBackwards_Replace, + __FindSelectionForward_Replace, + __FindClipboardBackwards_Replace, + __FindClipboardForward_Replace, + __ReplaceSelection_Replace, + __ReplaceFindPrev_Replace, + __ReplaceFindNext_Replace, + __ReplaceAll_Replace, + __ReplaceAllInSelection_Replace, +}; + +#endif diff --git a/libjx/code/JXTEBase-Replace.h b/libjx/code/JXTEBase-Replace.h index 4fae132db..eeb082e06 100644 --- a/libjx/code/JXTEBase-Replace.h +++ b/libjx/code/JXTEBase-Replace.h @@ -22,22 +22,7 @@ static const JUtf8Byte* kReplaceMenuStr = "|* %i ReplaceAllInSelection::JX" ; -enum { - __FindDialog_Replace=1, - __FindPrevious_Replace, - __FindNext_Replace, - __EnterSearchText_Replace, - __EnterReplaceText_Replace, - __FindSelectionBackwards_Replace, - __FindSelectionForward_Replace, - __FindClipboardBackwards_Replace, - __FindClipboardForward_Replace, - __ReplaceSelection_Replace, - __ReplaceFindPrev_Replace, - __ReplaceFindNext_Replace, - __ReplaceAll_Replace, - __ReplaceAllInSelection_Replace, -}; +#include "JXTEBase-Replace-enum.h" #ifndef _H_jx_af_image_jx_jx_find #define _H_jx_af_image_jx_jx_find @@ -66,7 +51,7 @@ enum { static void ConfigureReplaceMenu(JXTextMenu* menu, const int offset = 0) { if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#s", JString::kNoCopy)); + menu->SetShortcuts("#s"); } menu->SetItemImage(__FindDialog_Replace + offset, jx_find); menu->SetItemImage(__FindPrevious_Replace + offset, jx_find_previous); diff --git a/libjx/code/JXTEBase-Search-enum.h b/libjx/code/JXTEBase-Search-enum.h new file mode 100644 index 000000000..abcdb01f6 --- /dev/null +++ b/libjx/code/JXTEBase-Search-enum.h @@ -0,0 +1,20 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXTEBase_Search_enum +#define _H_JXTEBase_Search_enum + +enum { + __FindDialog_Search=1, + __FindPrevious_Search, + __FindNext_Search, + __EnterSearchText_Search, + __EnterReplaceText_Search, + __FindSelectionBackwards_Search, + __FindSelectionForward_Search, + __FindClipboardBackwards_Search, + __FindClipboardForward_Search, +}; + +#endif diff --git a/libjx/code/JXTEBase-Search.h b/libjx/code/JXTEBase-Search.h index ff7bf31f6..7aad12072 100644 --- a/libjx/code/JXTEBase-Search.h +++ b/libjx/code/JXTEBase-Search.h @@ -17,17 +17,7 @@ static const JUtf8Byte* kSearchMenuStr = "|* %i FindClipboardForward::JX" ; -enum { - __FindDialog_Search=1, - __FindPrevious_Search, - __FindNext_Search, - __EnterSearchText_Search, - __EnterReplaceText_Search, - __FindSelectionBackwards_Search, - __FindSelectionForward_Search, - __FindClipboardBackwards_Search, - __FindClipboardForward_Search, -}; +#include "JXTEBase-Search-enum.h" #ifndef _H_jx_af_image_jx_jx_find #define _H_jx_af_image_jx_jx_find @@ -52,7 +42,7 @@ enum { static void ConfigureSearchMenu(JXTextMenu* menu, const int offset = 0) { if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#s", JString::kNoCopy)); + menu->SetShortcuts("#s"); } menu->SetItemImage(__FindDialog_Search + offset, jx_find); menu->SetItemImage(__FindPrevious_Search + offset, jx_find_previous); diff --git a/libjx/code/JXTEBase.cpp b/libjx/code/JXTEBase.cpp index 84c54b733..c5109842d 100644 --- a/libjx/code/JXTEBase.cpp +++ b/libjx/code/JXTEBase.cpp @@ -486,11 +486,8 @@ JXTEBase::GetDNDAskActions askActionList->AppendItem(dndMgr->GetDNDActionCopyXAtom()); askActionList->AppendItem(dndMgr->GetDNDActionMoveXAtom()); - auto* s = jnew JString("CopyDescription::JXTEBase", JString::kNoCopy); - askDescriptionList->Append(s); - - s = jnew JString("MoveDescription::JXTEBase", JString::kNoCopy); - askDescriptionList->Append(s); + askDescriptionList->Append("CopyDescription::JXTEBase"); + askDescriptionList->Append("MoveDescription::JXTEBase"); } /****************************************************************************** diff --git a/libjx/code/JXTipOfTheDayDialog.cpp b/libjx/code/JXTipOfTheDayDialog.cpp index 5d72e65d4..f58298055 100644 --- a/libjx/code/JXTipOfTheDayDialog.cpp +++ b/libjx/code/JXTipOfTheDayDialog.cpp @@ -98,6 +98,7 @@ JXTipOfTheDayDialog::BuildWindow auto* sideBar = jnew JXFlatRect(window, JXWidget::kFixedLeft, JXWidget::kVElastic, 10,10, 50,200); + assert( sideBar != nullptr ); sideBar->SetColor(JColorManager::GetInactiveLabelColor()); itsCloseButton = @@ -114,10 +115,12 @@ JXTipOfTheDayDialog::BuildWindow auto* icon = jnew JXImageWidget(sideBar, JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,15, 30,30); + assert( icon != nullptr ); auto* scrollbarSet = jnew JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kVElastic, 60,60, 340,150); + assert( scrollbarSet != nullptr ); auto* title = jnew JXStaticText(JGetString("title::JXTipOfTheDayDialog::JXLayout"), window, diff --git a/libjx/code/JXToolBar.cpp b/libjx/code/JXToolBar.cpp index 70992434e..ec464b638 100644 --- a/libjx/code/JXToolBar.cpp +++ b/libjx/code/JXToolBar.cpp @@ -419,9 +419,7 @@ JXToolBar::ExtractItemNodes JTree* JXToolBar::BuildTree() { - auto* base = jnew JNamedTreeNode(nullptr, JString("BASE", JString::kNoCopy)); - assert( base != nullptr ); - + auto* base = jnew JNamedTreeNode(nullptr, "BASE"); auto* tree = jnew JTree(base); const JSize count = itsMenuBar->GetMenuCount(); diff --git a/libjx/code/JXToolBarEditDialog.cpp b/libjx/code/JXToolBarEditDialog.cpp index 4e03c43f6..51f9b2236 100644 --- a/libjx/code/JXToolBarEditDialog.cpp +++ b/libjx/code/JXToolBarEditDialog.cpp @@ -90,6 +90,7 @@ JXToolBarEditDialog::BuildWindow() auto* scrollbarSet = jnew JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kVElastic, 15,100, 290,290); + assert( scrollbarSet != nullptr ); auto* cancelButton = jnew JXTextButton(JGetString("cancelButton::JXToolBarEditDialog::JXLayout"), window, diff --git a/libjx/code/JXWDManager-Windows-enum.h b/libjx/code/JXWDManager-Windows-enum.h new file mode 100644 index 000000000..806e4d5f5 --- /dev/null +++ b/libjx/code/JXWDManager-Windows-enum.h @@ -0,0 +1,13 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_JXWDManager_Windows_enum +#define _H_JXWDManager_Windows_enum + +enum { + kRaiseAllCmd=1, + kCloseAllCmd, +}; + +#endif diff --git a/libjx/code/JXWDManager-Windows.h b/libjx/code/JXWDManager-Windows.h index 49caebda5..d9cb2f7d1 100644 --- a/libjx/code/JXWDManager-Windows.h +++ b/libjx/code/JXWDManager-Windows.h @@ -10,15 +10,12 @@ static const JUtf8Byte* kWindowsMenuStr = "|* %i CloseAllOtherWindows::JX %l" ; -enum { - kRaiseAllCmd=1, - kCloseAllCmd, -}; +#include "JXWDManager-Windows-enum.h" static void ConfigureWindowsMenu(JXTextMenu* menu, const int offset = 0) { if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#w", JString::kNoCopy)); + menu->SetShortcuts("#w"); } }; diff --git a/libjx/code/JXWarningDialog.cpp b/libjx/code/JXWarningDialog.cpp index 04eaf2473..eb94e5e69 100644 --- a/libjx/code/JXWarningDialog.cpp +++ b/libjx/code/JXWarningDialog.cpp @@ -75,10 +75,12 @@ JXWarningDialog::BuildWindow auto* icon = jnew JXImageWidget(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 40,40); + assert( icon != nullptr ); auto* text = jnew JXStaticText(JString::empty, true, true, false, nullptr, window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,20, 250,50); + assert( text != nullptr ); // end JXLayout diff --git a/libjx/code/JXWindow.cpp b/libjx/code/JXWindow.cpp index 426c37a70..ef2bfdf75 100644 --- a/libjx/code/JXWindow.cpp +++ b/libjx/code/JXWindow.cpp @@ -1366,7 +1366,7 @@ JXWindow::AnalyzeWindowManager auto* dir = jnew JXWindowDirector(JXGetApplication()); assert( dir != nullptr ); - auto* w = jnew JXWindow(dir, 100, 100, JString("Testing Window Manager", JString::kNoCopy)); + auto* w = jnew JXWindow(dir, 100, 100, "Testing Window Manager"); assert( w != nullptr ); w->itsExpandTask->Cancel(); w->itsExpandTask = nullptr; diff --git a/libjx/libjx.fd b/libjx/libjx.fd index 3f819adaa..c8c80672a 100644 --- a/libjx/libjx.fd +++ b/libjx/libjx.fd @@ -1378,7 +1378,7 @@ resize: FL_RESIZE_NONE gravity: FL_South FL_NoGravity name: (currPathMenu) callback: -argument: JString("/", JString::kNoCopy) +argument: "/" -------------------- class: FL_BUTTON @@ -1708,7 +1708,7 @@ resize: FL_RESIZE_NONE gravity: FL_South FL_NoGravity name: (currPathMenu) callback: -argument: JString("/", JString::kNoCopy) +argument: "/" -------------------- class: FL_BUTTON @@ -2038,7 +2038,7 @@ resize: FL_RESIZE_NONE gravity: FL_South FL_NoGravity name: (currPathMenu) callback: -argument: JString("/", JString::kNoCopy) +argument: "/" -------------------- class: FL_BUTTON diff --git a/libjx/testui/code/TestAnyTableDirector-File-enum.h b/libjx/testui/code/TestAnyTableDirector-File-enum.h new file mode 100644 index 000000000..754564f21 --- /dev/null +++ b/libjx/testui/code/TestAnyTableDirector-File-enum.h @@ -0,0 +1,14 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestAnyTableDirector_File_enum +#define _H_TestAnyTableDirector_File_enum + +enum { + kPageSetupCmd=1, + kPrintCmd, + kCloseCmd, +}; + +#endif diff --git a/libjx/testui/code/TestAnyTableDirector-File.h b/libjx/testui/code/TestAnyTableDirector-File.h index da3407ae3..26fd807a1 100644 --- a/libjx/testui/code/TestAnyTableDirector-File.h +++ b/libjx/testui/code/TestAnyTableDirector-File.h @@ -11,11 +11,7 @@ static const JUtf8Byte* kFileMenuStr = "|* %i __Close::TestAnyTableDirector" ; -enum { - kPageSetupCmd=1, - kPrintCmd, - kCloseCmd, -}; +#include "TestAnyTableDirector-File-enum.h" #ifndef _H_jx_af_image_jx_jx_file_print #define _H_jx_af_image_jx_jx_file_print @@ -23,8 +19,8 @@ enum { #endif static void ConfigureFileMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#f", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#f"); } menu->SetItemImage(kPrintCmd + offset, jx_file_print); }; diff --git a/libjx/testui/code/TestAnyTableDirector-File.jxm b/libjx/testui/code/TestAnyTableDirector-File.jxm index 1f3b77abc..0f2ab9bce 100644 --- a/libjx/testui/code/TestAnyTableDirector-File.jxm +++ b/libjx/testui/code/TestAnyTableDirector-File.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +652 209 "TestAnyTableDirector" "File" 'f @@ -7,9 +7,9 @@ jx_menu_editor 0 40 100 100 +41 100 -100 -100 +114 75 0 diff --git a/libjx/testui/code/TestDirector-About-enum.h b/libjx/testui/code/TestDirector-About-enum.h new file mode 100644 index 000000000..681f3e1cd --- /dev/null +++ b/libjx/testui/code/TestDirector-About-enum.h @@ -0,0 +1,17 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestDirector_About_enum +#define _H_TestDirector_About_enum + +enum { + kAboutCmd=1, + kHelpCmd, + kTipCmd, + kPrintPSMenuCmd, + kPrintEPSCmd, + kQuitCmd, +}; + +#endif diff --git a/libjx/testui/code/TestDirector-About.h b/libjx/testui/code/TestDirector-About.h index 0a35e0307..97547c68d 100644 --- a/libjx/testui/code/TestDirector-About.h +++ b/libjx/testui/code/TestDirector-About.h @@ -14,19 +14,12 @@ static const JUtf8Byte* kAboutMenuStr = "|* %i __Quit::TestDirector" ; -enum { - kAboutCmd=1, - kHelpCmd, - kTipCmd, - kPrintPSMenuCmd, - kPrintEPSCmd, - kQuitCmd, -}; +#include "TestDirector-About-enum.h" static void ConfigureAboutMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#?", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#?"); } }; diff --git a/libjx/testui/code/TestDirector-About.jxm b/libjx/testui/code/TestDirector-About.jxm index 587ba3c47..63f66347b 100644 --- a/libjx/testui/code/TestDirector-About.jxm +++ b/libjx/testui/code/TestDirector-About.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +678 273 "TestDirector" "About" '? 40 40 +113 100 -100 -100 -100 -100 +38 +122 +129 75 0 diff --git a/libjx/testui/code/TestDirector-ChooseSaveFile-enum.h b/libjx/testui/code/TestDirector-ChooseSaveFile-enum.h new file mode 100644 index 000000000..1cfd9648a --- /dev/null +++ b/libjx/testui/code/TestDirector-ChooseSaveFile-enum.h @@ -0,0 +1,17 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestDirector_ChooseSaveFile_enum +#define _H_TestDirector_ChooseSaveFile_enum + +enum { + kChooseFileCmd=1, + kChooseFileCustomCmd, + kSaveFileCmd, + kSaveFileCustomCmd, + kChooseRPathCmd, + kChooseRWPathCmd, +}; + +#endif diff --git a/libjx/testui/code/TestDirector-ChooseSaveFile.h b/libjx/testui/code/TestDirector-ChooseSaveFile.h index f7ad9fe2c..650ea136d 100644 --- a/libjx/testui/code/TestDirector-ChooseSaveFile.h +++ b/libjx/testui/code/TestDirector-ChooseSaveFile.h @@ -14,14 +14,7 @@ static const JUtf8Byte* kChooseSaveFileMenuStr = "|* %i __ChooseWritableDirectory::TestDirector" ; -enum { - kChooseFileCmd=1, - kChooseFileCustomCmd, - kSaveFileCmd, - kSaveFileCustomCmd, - kChooseRPathCmd, - kChooseRWPathCmd, -}; +#include "TestDirector-ChooseSaveFile-enum.h" static void ConfigureChooseSaveFileMenu(JXTextMenu* menu, const int offset = 0) { diff --git a/libjx/testui/code/TestDirector-ChooseSaveFile.jxm b/libjx/testui/code/TestDirector-ChooseSaveFile.jxm index 859e990af..011f7465d 100644 --- a/libjx/testui/code/TestDirector-ChooseSaveFile.jxm +++ b/libjx/testui/code/TestDirector-ChooseSaveFile.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +849 273 "TestDirector" "ChooseSaveFile" ' 40 40 +177 100 -100 -100 -100 -100 +48 +179 +163 75 0 diff --git a/libjx/testui/code/TestDirector-PrintPostscript-enum.h b/libjx/testui/code/TestDirector-PrintPostscript-enum.h new file mode 100644 index 000000000..db1c2aae6 --- /dev/null +++ b/libjx/testui/code/TestDirector-PrintPostscript-enum.h @@ -0,0 +1,13 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestDirector_PrintPostscript_enum +#define _H_TestDirector_PrintPostscript_enum + +enum { + kPSPageSetupCmd=1, + kPrintPSCmd, +}; + +#endif diff --git a/libjx/testui/code/TestDirector-PrintPostscript.h b/libjx/testui/code/TestDirector-PrintPostscript.h index baebb13f9..6c6ac3b47 100644 --- a/libjx/testui/code/TestDirector-PrintPostscript.h +++ b/libjx/testui/code/TestDirector-PrintPostscript.h @@ -10,10 +10,7 @@ static const JUtf8Byte* kPrintPostscriptMenuStr = "|* %i __Print::TestDirector" ; -enum { - kPSPageSetupCmd=1, - kPrintPSCmd, -}; +#include "TestDirector-PrintPostscript-enum.h" #ifndef _H_jx_af_image_jx_jx_file_print #define _H_jx_af_image_jx_jx_file_print diff --git a/libjx/testui/code/TestDirector-PrintPostscript.jxm b/libjx/testui/code/TestDirector-PrintPostscript.jxm index 772b49b50..021a1eba2 100644 --- a/libjx/testui/code/TestDirector-PrintPostscript.jxm +++ b/libjx/testui/code/TestDirector-PrintPostscript.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +644 193 "TestDirector" "PrintPostscript" ' @@ -7,9 +7,9 @@ jx_menu_editor 0 40 100 100 +35 100 -100 -100 +128 75 0 diff --git a/libjx/testui/code/TestDirector-ProgressDisplay-enum.h b/libjx/testui/code/TestDirector-ProgressDisplay-enum.h new file mode 100644 index 000000000..e007ee564 --- /dev/null +++ b/libjx/testui/code/TestDirector-ProgressDisplay-enum.h @@ -0,0 +1,15 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestDirector_ProgressDisplay_enum +#define _H_TestDirector_ProgressDisplay_enum + +enum { + kFixLenFGCmd=1, + kVarLenFGCmd, + kFixLenBGCmd, + kVarLenBGCmd, +}; + +#endif diff --git a/libjx/testui/code/TestDirector-ProgressDisplay.h b/libjx/testui/code/TestDirector-ProgressDisplay.h index a01e6f495..bbf90c44d 100644 --- a/libjx/testui/code/TestDirector-ProgressDisplay.h +++ b/libjx/testui/code/TestDirector-ProgressDisplay.h @@ -12,12 +12,7 @@ static const JUtf8Byte* kProgressDisplayMenuStr = "|* %i __VariableLengthBackground::TestDirector" ; -enum { - kFixLenFGCmd=1, - kVarLenFGCmd, - kFixLenBGCmd, - kVarLenBGCmd, -}; +#include "TestDirector-ProgressDisplay-enum.h" static void ConfigureProgressDisplayMenu(JXTextMenu* menu, const int offset = 0) { diff --git a/libjx/testui/code/TestDirector-ProgressDisplay.jxm b/libjx/testui/code/TestDirector-ProgressDisplay.jxm index d54ad825d..7449a4e63 100644 --- a/libjx/testui/code/TestDirector-ProgressDisplay.jxm +++ b/libjx/testui/code/TestDirector-ProgressDisplay.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +796 228 "TestDirector" "ProgressDisplay" ' 40 40 +176 100 -100 -100 -100 -100 +42 +184 +109 75 0 diff --git a/libjx/testui/code/TestDirector-Test-enum.h b/libjx/testui/code/TestDirector-Test-enum.h new file mode 100644 index 000000000..02c24e052 --- /dev/null +++ b/libjx/testui/code/TestDirector-Test-enum.h @@ -0,0 +1,44 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestDirector_Test_enum +#define _H_TestDirector_Test_enum + +enum { + kNewTestDirectorCmd=1, + kTestUserNotifyMenuCmd, + kTestChooseSaveFileMenuCmd, + kTestPGMenuCmd, + kTestInputCmd, + kTestButtonsCmd, + kTestPopupChoiceCmd, + kTestSliderCmd, + kTestPartitionsCmd, + kTestTabGroupCmd, + kTestStrTableCmd, + kTestNumTableCmd, + kTestTextEditorCmd, + kTestLinkedDocCmd, + kTestDNDTextCmd, + kTestImageViewCmd, + kTestFileListCmd, + kSendEmailCmd, + kShowFileContentCmd, + kShowWebPageCmd, + kTestDisabledMenuCmd, + kTestZombieProcessCmd, + kTestPlaceWindow0Cmd, + kTestPlaceWindow30Cmd, + kTestPlaceWindow100Cmd, + kTestMoveWindowCmd, + kRaiseAllWindowsCmd, + kPrintWMConfigCmd, + kTestIdleTaskMutexCmd, + kTestBrokenPipeCmd, + kTestUncaughtXErrorCmd, + kLockUpToTestMDICmd, + kTimeFontSubCmd, +}; + +#endif diff --git a/libjx/testui/code/TestDirector-Test.h b/libjx/testui/code/TestDirector-Test.h index 79c5d6753..7a10aa36c 100644 --- a/libjx/testui/code/TestDirector-Test.h +++ b/libjx/testui/code/TestDirector-Test.h @@ -41,46 +41,12 @@ static const JUtf8Byte* kTestMenuStr = "|* %i __TimingForFontSubstitution::TestDirector" ; -enum { - kNewTestDirectorCmd=1, - kTestUserNotifyMenuCmd, - kTestChooseSaveFileMenuCmd, - kTestPGMenuCmd, - kTestInputCmd, - kTestButtonsCmd, - kTestPopupChoiceCmd, - kTestSliderCmd, - kTestPartitionsCmd, - kTestTabGroupCmd, - kTestStrTableCmd, - kTestNumTableCmd, - kTestTextEditorCmd, - kTestLinkedDocCmd, - kTestDNDTextCmd, - kTestImageViewCmd, - kTestFileListCmd, - kSendEmailCmd, - kShowFileContentCmd, - kShowWebPageCmd, - kTestDisabledMenuCmd, - kTestZombieProcessCmd, - kTestPlaceWindow0Cmd, - kTestPlaceWindow30Cmd, - kTestPlaceWindow100Cmd, - kTestMoveWindowCmd, - kRaiseAllWindowsCmd, - kPrintWMConfigCmd, - kTestIdleTaskMutexCmd, - kTestBrokenPipeCmd, - kTestUncaughtXErrorCmd, - kLockUpToTestMDICmd, - kTimeFontSubCmd, -}; +#include "TestDirector-Test-enum.h" static void ConfigureTestMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#t", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#t"); } }; diff --git a/libjx/testui/code/TestDirector-Test.jxm b/libjx/testui/code/TestDirector-Test.jxm index bcf20c025..38fe31484 100644 --- a/libjx/testui/code/TestDirector-Test.jxm +++ b/libjx/testui/code/TestDirector-Test.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -686 837 +1050 839 "TestDirector" "Test" 't 40 40 +247 100 -100 -100 -100 -100 +48 +248 +205 75 0 diff --git a/libjx/testui/code/TestDirector-UserNotification-enum.h b/libjx/testui/code/TestDirector-UserNotification-enum.h new file mode 100644 index 000000000..f0da64a5e --- /dev/null +++ b/libjx/testui/code/TestDirector-UserNotification-enum.h @@ -0,0 +1,14 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestDirector_UserNotification_enum +#define _H_TestDirector_UserNotification_enum + +enum { + kTestMessageCmd=1, + kTestWarningCmd, + kTestErrorCmd, +}; + +#endif diff --git a/libjx/testui/code/TestDirector-UserNotification.h b/libjx/testui/code/TestDirector-UserNotification.h index ed7b40e14..fa4e4ce87 100644 --- a/libjx/testui/code/TestDirector-UserNotification.h +++ b/libjx/testui/code/TestDirector-UserNotification.h @@ -11,11 +11,7 @@ static const JUtf8Byte* kUserNotificationMenuStr = "|* %i __Error::TestDirector" ; -enum { - kTestMessageCmd=1, - kTestWarningCmd, - kTestErrorCmd, -}; +#include "TestDirector-UserNotification-enum.h" static void ConfigureUserNotificationMenu(JXTextMenu* menu, const int offset = 0) { diff --git a/libjx/testui/code/TestDirector-UserNotification.jxm b/libjx/testui/code/TestDirector-UserNotification.jxm index 09f52a647..db99d7ac9 100644 --- a/libjx/testui/code/TestDirector-UserNotification.jxm +++ b/libjx/testui/code/TestDirector-UserNotification.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +666 215 "TestDirector" "UserNotification" ' @@ -7,9 +7,9 @@ jx_menu_editor 0 40 100 100 +48 100 -100 -100 +128 75 0 diff --git a/libjx/testui/code/TestDirector.cpp b/libjx/testui/code/TestDirector.cpp index 1085d5d22..0b337a172 100644 --- a/libjx/testui/code/TestDirector.cpp +++ b/libjx/testui/code/TestDirector.cpp @@ -621,15 +621,15 @@ TestDirector::HandleTestMenu else if (index == kSendEmailCmd) { - JXGetWebBrowser()->ShowURL(JString("mailto:me@example.com", JString::kNoCopy)); + JXGetWebBrowser()->ShowURL("mailto:me@example.com"); } else if (index == kShowFileContentCmd) { - JXGetWebBrowser()->ShowURL(JString("file:/etc/hosts", JString::kNoCopy)); + JXGetWebBrowser()->ShowURL("file:/etc/hosts"); } else if (index == kShowWebPageCmd) { - JXGetWebBrowser()->ShowURL(JString("http://example.com", JString::kNoCopy)); + JXGetWebBrowser()->ShowURL("http://example.com"); } else if (index == kTestDisabledMenuCmd) @@ -641,7 +641,7 @@ TestDirector::HandleTestMenu { pid_t pid; std::cout << std::endl; - const JError err = JExecute(JString("ls", JString::kNoCopy), &pid); + const JError err = JExecute("ls", &pid); std::cout << std::endl; if (err.OK()) { @@ -881,7 +881,7 @@ TestDirector::HandleCSFMenu } else if (index == kChooseFileCustomCmd) { - auto* dlog = JXChooseFileDialog::Create(JXChooseFileDialog::kSelectSingleFile, JString("./about_owner_docs", JString::kNoCopy), JString::empty, JGetString("CustomChooseFileInstructions::TestDirector")); + auto* dlog = JXChooseFileDialog::Create(JXChooseFileDialog::kSelectSingleFile, "./about_owner_docs", JString::empty, JGetString("CustomChooseFileInstructions::TestDirector")); ok = dlog->DoDialog(); if (ok) { diff --git a/libjx/testui/code/TestFileListDirector-File-enum.h b/libjx/testui/code/TestFileListDirector-File-enum.h new file mode 100644 index 000000000..1f9f42038 --- /dev/null +++ b/libjx/testui/code/TestFileListDirector-File-enum.h @@ -0,0 +1,15 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestFileListDirector_File_enum +#define _H_TestFileListDirector_File_enum + +enum { + kShowLocationCmd=1, + kUseWildcardCmd, + kUseRegexCmd, + kCloseCmd, +}; + +#endif diff --git a/libjx/testui/code/TestFileListDirector-File.h b/libjx/testui/code/TestFileListDirector-File.h index f9e92c59f..5e5aafb36 100644 --- a/libjx/testui/code/TestFileListDirector-File.h +++ b/libjx/testui/code/TestFileListDirector-File.h @@ -12,12 +12,7 @@ static const JUtf8Byte* kFileMenuStr = "|* %i __Close::TestFileListDirector" ; -enum { - kShowLocationCmd=1, - kUseWildcardCmd, - kUseRegexCmd, - kCloseCmd, -}; +#include "TestFileListDirector-File-enum.h" #ifndef _H_jx_af_image_jx_jx_filter_wildcard #define _H_jx_af_image_jx_jx_filter_wildcard @@ -29,8 +24,8 @@ enum { #endif static void ConfigureFileMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#f", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#f"); } menu->SetItemImage(kUseWildcardCmd + offset, jx_filter_wildcard); menu->SetItemImage(kUseRegexCmd + offset, jx_filter_regex); diff --git a/libjx/testui/code/TestFileListDirector-File.jxm b/libjx/testui/code/TestFileListDirector-File.jxm index b1a24b60f..054075041 100644 --- a/libjx/testui/code/TestFileListDirector-File.jxm +++ b/libjx/testui/code/TestFileListDirector-File.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +901 239 "TestFileListDirector" "File" 'f 40 40 +215 100 -100 -100 -100 -100 +47 +219 +130 75 0 diff --git a/libjx/testui/code/TestFileListDirector.cpp b/libjx/testui/code/TestFileListDirector.cpp index b654f14d1..80369afb3 100644 --- a/libjx/testui/code/TestFileListDirector.cpp +++ b/libjx/testui/code/TestFileListDirector.cpp @@ -38,7 +38,7 @@ TestFileListDirector::TestFileListDirector AddDirectory("./test-file-list"); JString s1, s2; - if (JConvertToAbsolutePath(JString("../Make.header", JString::kNoCopy), JString::empty, &s1) && + if (JConvertToAbsolutePath("../Make.header", JString::empty, &s1) && JGetTrueName(s1, &s2)) { itsFLSet->GetTable()->AddFile(s2); diff --git a/libjx/testui/code/TestFloatTable-Table-enum.h b/libjx/testui/code/TestFloatTable-Table-enum.h new file mode 100644 index 000000000..e39bf32d0 --- /dev/null +++ b/libjx/testui/code/TestFloatTable-Table-enum.h @@ -0,0 +1,19 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestFloatTable_Table_enum +#define _H_TestFloatTable_Table_enum + +enum { + kInsertRow=1, + kDuplicateRow, + kMoveRow, + kRemoveRow, + kInsertCol, + kDuplicateCol, + kMoveCol, + kRemoveCol, +}; + +#endif diff --git a/libjx/testui/code/TestFloatTable-Table.h b/libjx/testui/code/TestFloatTable-Table.h index e5205a2c4..fb706ec5e 100644 --- a/libjx/testui/code/TestFloatTable-Table.h +++ b/libjx/testui/code/TestFloatTable-Table.h @@ -16,21 +16,12 @@ static const JUtf8Byte* kTableMenuStr = "|* %r %i __RemoveColumn::TestFloatTable" ; -enum { - kInsertRow=1, - kDuplicateRow, - kMoveRow, - kRemoveRow, - kInsertCol, - kDuplicateCol, - kMoveCol, - kRemoveCol, -}; +#include "TestFloatTable-Table-enum.h" static void ConfigureTableMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#t", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#t"); } }; diff --git a/libjx/testui/code/TestFloatTable-Table.jxm b/libjx/testui/code/TestFloatTable-Table.jxm index 53ee27e8d..5d6ff138b 100644 --- a/libjx/testui/code/TestFloatTable-Table.jxm +++ b/libjx/testui/code/TestFloatTable-Table.jxm @@ -5,10 +5,10 @@ jx_menu_editor 0 't 40 40 +120 100 -100 -100 -100 +46 +120 100 75 diff --git a/libjx/testui/code/TestImageDirector-File-enum.h b/libjx/testui/code/TestImageDirector-File-enum.h new file mode 100644 index 000000000..c4ea0cc64 --- /dev/null +++ b/libjx/testui/code/TestImageDirector-File-enum.h @@ -0,0 +1,23 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestImageDirector_File_enum +#define _H_TestImageDirector_File_enum + +enum { + kOpenImageCmd=1, + kSaveGIFCmd, + kSavePNGCmd, + kSaveJPEGCmd, + kSaveXPMCmd, + kSaveMaskXBMCmd, + kCopyImageCmd, + kPasteImageCmd, + kPageSetupCmd, + kPrintPSCmd, + kPrintEPSCmd, + kCloseCmd, +}; + +#endif diff --git a/libjx/testui/code/TestImageDirector-File.h b/libjx/testui/code/TestImageDirector-File.h index 9ef991498..523d5bd54 100644 --- a/libjx/testui/code/TestImageDirector-File.h +++ b/libjx/testui/code/TestImageDirector-File.h @@ -20,20 +20,7 @@ static const JUtf8Byte* kFileMenuStr = "|* %i __Close::TestImageDirector" ; -enum { - kOpenImageCmd=1, - kSaveGIFCmd, - kSavePNGCmd, - kSaveJPEGCmd, - kSaveXPMCmd, - kSaveMaskXBMCmd, - kCopyImageCmd, - kPasteImageCmd, - kPageSetupCmd, - kPrintPSCmd, - kPrintEPSCmd, - kCloseCmd, -}; +#include "TestImageDirector-File-enum.h" #ifndef _H_jx_af_image_jx_jx_file_open #define _H_jx_af_image_jx_jx_file_open @@ -53,8 +40,8 @@ enum { #endif static void ConfigureFileMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#f", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#f"); } menu->SetItemImage(kOpenImageCmd + offset, jx_file_open); menu->SetItemImage(kCopyImageCmd + offset, jx_edit_copy); diff --git a/libjx/testui/code/TestImageDirector-File.jxm b/libjx/testui/code/TestImageDirector-File.jxm index dbe914475..a6ec6759c 100644 --- a/libjx/testui/code/TestImageDirector-File.jxm +++ b/libjx/testui/code/TestImageDirector-File.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -685 392 +755 392 "TestImageDirector" "File" 'f 40 40 +145 100 -100 -100 -100 -100 +42 +141 +137 75 0 diff --git a/libjx/testui/code/TestInputFieldsDialog.cpp b/libjx/testui/code/TestInputFieldsDialog.cpp index 64e8dd7ca..6e446b40a 100644 --- a/libjx/testui/code/TestInputFieldsDialog.cpp +++ b/libjx/testui/code/TestInputFieldsDialog.cpp @@ -306,14 +306,14 @@ TestInputFieldsDialog::BuildWindow() pwInput->SetHint(JGetString("PasswordHint::TestInputFieldsDialog")); itsPathInput->SetBasePath(JGetCurrentDirectory()); - itsPathInput->GetText()->SetText(JString("~", JString::kNoCopy)); + itsPathInput->GetText()->SetText("~"); ListenTo(itsChoosePathButton, std::function([this](const JXButton::Pushed&) { itsPathInput->ChoosePath(); })); itsFileInput->SetBasePath(JGetCurrentDirectory()); - itsFileInput->GetText()->SetText(JString("./testjx", JString::kNoCopy)); + itsFileInput->GetText()->SetText("./testjx"); ListenTo(itsChooseFileButton, std::function([this](const JXButton::Pushed&) { itsFileInput->ChooseFile(); diff --git a/libjx/testui/code/TestPartitionDirector-Horiz-enum.h b/libjx/testui/code/TestPartitionDirector-Horiz-enum.h new file mode 100644 index 000000000..258f58001 --- /dev/null +++ b/libjx/testui/code/TestPartitionDirector-Horiz-enum.h @@ -0,0 +1,14 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestPartitionDirector_Horiz_enum +#define _H_TestPartitionDirector_Horiz_enum + +enum { + kPrependHorizCmd=1, + kAppendHorizCmd, + kSetHorizElasticIndexCmd, +}; + +#endif diff --git a/libjx/testui/code/TestPartitionDirector-Horiz.h b/libjx/testui/code/TestPartitionDirector-Horiz.h index d0004e46b..2a6808e6e 100644 --- a/libjx/testui/code/TestPartitionDirector-Horiz.h +++ b/libjx/testui/code/TestPartitionDirector-Horiz.h @@ -11,16 +11,12 @@ static const JUtf8Byte* kHorizMenuStr = "|* %i __SetElasticCompartment::TestPartitionDirector" ; -enum { - kPrependHorizCmd=1, - kAppendHorizCmd, - kSetHorizElasticIndexCmd, -}; +#include "TestPartitionDirector-Horiz-enum.h" static void ConfigureHorizMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#h", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#h"); } }; diff --git a/libjx/testui/code/TestPartitionDirector-Horiz.jxm b/libjx/testui/code/TestPartitionDirector-Horiz.jxm index e3be44e3c..21cffe694 100644 --- a/libjx/testui/code/TestPartitionDirector-Horiz.jxm +++ b/libjx/testui/code/TestPartitionDirector-Horiz.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +829 214 "TestPartitionDirector" "Horiz" 'h 40 40 +155 100 -100 -100 -100 -100 +43 +171 +174 75 0 diff --git a/libjx/testui/code/TestPartitionDirector-Vert-enum.h b/libjx/testui/code/TestPartitionDirector-Vert-enum.h new file mode 100644 index 000000000..6f0b57670 --- /dev/null +++ b/libjx/testui/code/TestPartitionDirector-Vert-enum.h @@ -0,0 +1,12 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestPartitionDirector_Vert_enum +#define _H_TestPartitionDirector_Vert_enum + +enum { + kSetVertElasticIndexCmd=1, +}; + +#endif diff --git a/libjx/testui/code/TestPartitionDirector-Vert.h b/libjx/testui/code/TestPartitionDirector-Vert.h index 1b7695c7f..c80293f15 100644 --- a/libjx/testui/code/TestPartitionDirector-Vert.h +++ b/libjx/testui/code/TestPartitionDirector-Vert.h @@ -9,14 +9,12 @@ static const JUtf8Byte* kVertMenuStr = "* %i __SetElasticCompartment::TestPartitionDirector" ; -enum { - kSetVertElasticIndexCmd=1, -}; +#include "TestPartitionDirector-Vert-enum.h" static void ConfigureVertMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#v", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#v"); } }; diff --git a/libjx/testui/code/TestPartitionDirector-Vert.jxm b/libjx/testui/code/TestPartitionDirector-Vert.jxm index 8c1c5d0d6..2a0d455eb 100644 --- a/libjx/testui/code/TestPartitionDirector-Vert.jxm +++ b/libjx/testui/code/TestPartitionDirector-Vert.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +817 167 "TestPartitionDirector" "Vert" 'v 40 40 +154 100 -100 -100 -100 -100 +53 +169 +162 75 0 diff --git a/libjx/testui/code/TestStringTable-BorderWidth-enum.h b/libjx/testui/code/TestStringTable-BorderWidth-enum.h new file mode 100644 index 000000000..bfbfd32d1 --- /dev/null +++ b/libjx/testui/code/TestStringTable-BorderWidth-enum.h @@ -0,0 +1,17 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestStringTable_BorderWidth_enum +#define _H_TestStringTable_BorderWidth_enum + +enum { + ____0=1, + ____1, + ____2, + ____3, + ____4, + ____5, +}; + +#endif diff --git a/libjx/testui/code/TestStringTable-BorderWidth.h b/libjx/testui/code/TestStringTable-BorderWidth.h index 57046fae6..da6258358 100644 --- a/libjx/testui/code/TestStringTable-BorderWidth.h +++ b/libjx/testui/code/TestStringTable-BorderWidth.h @@ -14,14 +14,7 @@ static const JUtf8Byte* kBorderWidthMenuStr = "|* %r %i __5::TestStringTable" ; -enum { - ____0=1, - ____1, - ____2, - ____3, - ____4, - ____5, -}; +#include "TestStringTable-BorderWidth-enum.h" static void ConfigureBorderWidthMenu(JXTextMenu* menu, const int offset = 0) { diff --git a/libjx/testui/code/TestStringTable-BorderWidth.jxm b/libjx/testui/code/TestStringTable-BorderWidth.jxm index 382b77726..5a8ed05ec 100644 --- a/libjx/testui/code/TestStringTable-BorderWidth.jxm +++ b/libjx/testui/code/TestStringTable-BorderWidth.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +638 276 "TestStringTable" "BorderWidth" ' @@ -7,7 +7,7 @@ jx_menu_editor 0 40 100 100 -100 +49 100 100 75 diff --git a/libjx/testui/code/TestStringTable-Table-enum.h b/libjx/testui/code/TestStringTable-Table-enum.h new file mode 100644 index 000000000..b2783795e --- /dev/null +++ b/libjx/testui/code/TestStringTable-Table-enum.h @@ -0,0 +1,27 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestStringTable_Table_enum +#define _H_TestStringTable_Table_enum + +enum { + kInsertRow=1, + kDuplicateRow, + kMoveRow, + kRemoveRow, + kChangeRowBorderWidthCmd, + kInsertCol, + kDuplicateCol, + kMoveCol, + kRemoveCol, + kChangeColBorderWidthCmd, + kSelectCells, + kSelectRows, + kSelectCols, + kTestSelectionIteratorByRow, + kTestSelectionIteratorByCol, + kAdd4000Rows, +}; + +#endif diff --git a/libjx/testui/code/TestStringTable-Table.h b/libjx/testui/code/TestStringTable-Table.h index 04859a6fb..f77784bf6 100644 --- a/libjx/testui/code/TestStringTable-Table.h +++ b/libjx/testui/code/TestStringTable-Table.h @@ -24,29 +24,12 @@ static const JUtf8Byte* kTableMenuStr = "|* %i __Add4000RowsEnumMouseActionIsInHeaderFile::TestStringTable" ; -enum { - kInsertRow=1, - kDuplicateRow, - kMoveRow, - kRemoveRow, - kChangeRowBorderWidthCmd, - kInsertCol, - kDuplicateCol, - kMoveCol, - kRemoveCol, - kChangeColBorderWidthCmd, - kSelectCells, - kSelectRows, - kSelectCols, - kTestSelectionIteratorByRow, - kTestSelectionIteratorByCol, - kAdd4000Rows, -}; +#include "TestStringTable-Table-enum.h" static void ConfigureTableMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#t", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#t"); } }; diff --git a/libjx/testui/code/TestStringTable-Table.jxm b/libjx/testui/code/TestStringTable-Table.jxm index 66f21e756..fc3281fb3 100644 --- a/libjx/testui/code/TestStringTable-Table.jxm +++ b/libjx/testui/code/TestStringTable-Table.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -778 479 +1032 473 "TestStringTable" "Table" 't @@ -7,9 +7,9 @@ jx_menu_editor 0 40 198 100 -100 -100 -100 +48 +314 +195 75 0 diff --git a/libjx/testui/code/TestTextEditDocument-Emulator-enum.h b/libjx/testui/code/TestTextEditDocument-Emulator-enum.h new file mode 100644 index 000000000..e648b1e06 --- /dev/null +++ b/libjx/testui/code/TestTextEditDocument-Emulator-enum.h @@ -0,0 +1,13 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestTextEditDocument_Emulator_enum +#define _H_TestTextEditDocument_Emulator_enum + +enum { + kNoEmulatorCmd=1, + kVIEmulatorCmd, +}; + +#endif diff --git a/libjx/testui/code/TestTextEditDocument-Emulator.h b/libjx/testui/code/TestTextEditDocument-Emulator.h index bc15107b8..523a9563f 100644 --- a/libjx/testui/code/TestTextEditDocument-Emulator.h +++ b/libjx/testui/code/TestTextEditDocument-Emulator.h @@ -10,15 +10,12 @@ static const JUtf8Byte* kEmulatorMenuStr = "|* %r %i __vi::TestTextEditDocument" ; -enum { - kNoEmulatorCmd=1, - kVIEmulatorCmd, -}; +#include "TestTextEditDocument-Emulator-enum.h" static void ConfigureEmulatorMenu(JXTextMenu* menu, const int offset = 0) { if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#e", JString::kNoCopy)); + menu->SetShortcuts("#e"); } }; diff --git a/libjx/testui/code/TestTextEditDocument-Emulator.jxm b/libjx/testui/code/TestTextEditDocument-Emulator.jxm index a0753d3d6..023a30420 100644 --- a/libjx/testui/code/TestTextEditDocument-Emulator.jxm +++ b/libjx/testui/code/TestTextEditDocument-Emulator.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +639 194 "TestTextEditDocument" "Emulator" 'e @@ -7,9 +7,9 @@ jx_menu_editor 0 40 100 100 -100 -100 -100 +49 +59 +132 75 0 diff --git a/libjx/testui/code/TestTextEditDocument-File-enum.h b/libjx/testui/code/TestTextEditDocument-File-enum.h new file mode 100644 index 000000000..7bbf32c07 --- /dev/null +++ b/libjx/testui/code/TestTextEditDocument-File-enum.h @@ -0,0 +1,22 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestTextEditDocument_File_enum +#define _H_TestTextEditDocument_File_enum + +enum { + kNewFileCmd=1, + kOpenFileCmd, + kSaveFileCmd, + kSaveFileAsCmd, + kSaveCopyAsCmd, + kRevertCmd, + kReadPrivateFmtCmd, + kWritePrivateFmtCmd, + kPageSetupCmd, + kPrintCmd, + kCloseCmd, +}; + +#endif diff --git a/libjx/testui/code/TestTextEditDocument-File.h b/libjx/testui/code/TestTextEditDocument-File.h index 89d152326..50fb98da1 100644 --- a/libjx/testui/code/TestTextEditDocument-File.h +++ b/libjx/testui/code/TestTextEditDocument-File.h @@ -19,19 +19,7 @@ static const JUtf8Byte* kFileMenuStr = "|* %i __Close::TestTextEditDocument" ; -enum { - kNewFileCmd=1, - kOpenFileCmd, - kSaveFileCmd, - kSaveFileAsCmd, - kSaveCopyAsCmd, - kRevertCmd, - kReadPrivateFmtCmd, - kWritePrivateFmtCmd, - kPageSetupCmd, - kPrintCmd, - kCloseCmd, -}; +#include "TestTextEditDocument-File-enum.h" #ifndef _H_jx_af_image_jx_jx_file_new #define _H_jx_af_image_jx_jx_file_new @@ -56,7 +44,7 @@ enum { static void ConfigureFileMenu(JXTextMenu* menu, const int offset = 0) { if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#f", JString::kNoCopy)); + menu->SetShortcuts("#f"); } menu->SetItemImage(kNewFileCmd + offset, jx_file_new); menu->SetItemImage(kOpenFileCmd + offset, jx_file_open); diff --git a/libjx/testui/code/TestTextEditDocument-File.jxm b/libjx/testui/code/TestTextEditDocument-File.jxm index e513ee4e9..b1e301694 100644 --- a/libjx/testui/code/TestTextEditDocument-File.jxm +++ b/libjx/testui/code/TestTextEditDocument-File.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -672 388 +705 371 "TestTextEditDocument" "File" 'f @@ -7,9 +7,9 @@ jx_menu_editor 0 40 100 100 -100 -100 -100 +50 +138 +144 75 0 diff --git a/libjx/testui/code/TestTextEditDocument.cpp b/libjx/testui/code/TestTextEditDocument.cpp index 32afe7211..f16521f7c 100644 --- a/libjx/testui/code/TestTextEditDocument.cpp +++ b/libjx/testui/code/TestTextEditDocument.cpp @@ -51,7 +51,7 @@ TestTextEditDocument::TestTextEditDocument // start with some challenging glyphs - itsText->SetText(JString("ABC Ж Җ ζ Ǽ ậ ϖ Ӝ ἆ Ɽ 转 燜 ㄊ 먄 욶 א ݣ ﺺ Բարեւ", JString::kNoCopy)); + itsText->SetText("ABC Ж Җ ζ Ǽ ậ ϖ Ӝ ἆ Ɽ 转 燜 ㄊ 먄 욶 א ݣ ﺺ Բարեւ"); } TestTextEditDocument::TestTextEditDocument diff --git a/libjx/testui/code/TestTextEditor-Edit-enum.h b/libjx/testui/code/TestTextEditor-Edit-enum.h new file mode 100644 index 000000000..a8cd336b4 --- /dev/null +++ b/libjx/testui/code/TestTextEditor-Edit-enum.h @@ -0,0 +1,16 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestTextEditor_Edit_enum +#define _H_TestTextEditor_Edit_enum + +enum { + ____AutoIndent=1, + ____UndoDepth1, + ____UndoDepth2, + ____UndoDepth3, + ____UndoDepth100, +}; + +#endif diff --git a/libjx/testui/code/TestTextEditor-Edit.h b/libjx/testui/code/TestTextEditor-Edit.h index 82b5f57e7..be6d673a9 100644 --- a/libjx/testui/code/TestTextEditor-Edit.h +++ b/libjx/testui/code/TestTextEditor-Edit.h @@ -13,13 +13,7 @@ static const JUtf8Byte* kEditMenuStr = "|* %r %i __UndoDepth100::TestTextEditor" ; -enum { - ____AutoIndent=1, - ____UndoDepth1, - ____UndoDepth2, - ____UndoDepth3, - ____UndoDepth100, -}; +#include "TestTextEditor-Edit-enum.h" static void ConfigureEditMenu(JXTextMenu* menu, const int offset = 0) { diff --git a/libjx/testui/code/TestTextEditor-Edit.jxm b/libjx/testui/code/TestTextEditor-Edit.jxm index 66ecf2d4d..67d553a86 100644 --- a/libjx/testui/code/TestTextEditor-Edit.jxm +++ b/libjx/testui/code/TestTextEditor-Edit.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +676 258 "TestTextEditor" "Edit" ' @@ -7,9 +7,9 @@ jx_menu_editor 0 40 100 100 -100 -100 -100 +48 +118 +128 75 0 diff --git a/libjx/testui/code/TestWidget-Actions-enum.h b/libjx/testui/code/TestWidget-Actions-enum.h new file mode 100644 index 000000000..f67733990 --- /dev/null +++ b/libjx/testui/code/TestWidget-Actions-enum.h @@ -0,0 +1,23 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestWidget_Actions_enum +#define _H_TestWidget_Actions_enum + +enum { + kChangeSizeCmd=1, + kToggleFillCmd, + kPointMenuCmd, + kShowHideCmd, + kActDeactCmd, + kShowHideQuitCmd, + kActDeactQuitCmd, + kPrintSelectionTargetsCmd, + kPrintOldSelectionTargetsCmd, + kAdviceMenuCmd, + kXlsfontsMenuCmd, + kEmptyMenuCmd, +}; + +#endif diff --git a/libjx/testui/code/TestWidget-Actions.h b/libjx/testui/code/TestWidget-Actions.h index 92bdb2f06..137286c11 100644 --- a/libjx/testui/code/TestWidget-Actions.h +++ b/libjx/testui/code/TestWidget-Actions.h @@ -20,25 +20,12 @@ static const JUtf8Byte* kActionsMenuStr = "|* %i __empty::TestWidget" ; -enum { - kChangeSizeCmd=1, - kToggleFillCmd, - kPointMenuCmd, - kShowHideCmd, - kActDeactCmd, - kShowHideQuitCmd, - kActDeactQuitCmd, - kPrintSelectionTargetsCmd, - kPrintOldSelectionTargetsCmd, - kAdviceMenuCmd, - kXlsfontsMenuCmd, - kEmptyMenuCmd, -}; +#include "TestWidget-Actions-enum.h" static void ConfigureActionsMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#a", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#a"); } }; diff --git a/libjx/testui/code/TestWidget-Actions.jxm b/libjx/testui/code/TestWidget-Actions.jxm index b1263836c..9eee7e272 100644 --- a/libjx/testui/code/TestWidget-Actions.jxm +++ b/libjx/testui/code/TestWidget-Actions.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 409 +839 392 "TestWidget" "Actions" 'a @@ -7,9 +7,9 @@ jx_menu_editor 0 40 100 100 -100 -100 -100 +47 +220 +192 75 0 diff --git a/libjx/testui/code/TestWidget-Points-enum.h b/libjx/testui/code/TestWidget-Points-enum.h new file mode 100644 index 000000000..097f04ad3 --- /dev/null +++ b/libjx/testui/code/TestWidget-Points-enum.h @@ -0,0 +1,17 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestWidget_Points_enum +#define _H_TestWidget_Points_enum + +enum { + ____10=1, + ____20, + ____30, + ____40, + ____50, + ____60, +}; + +#endif diff --git a/libjx/testui/code/TestWidget-Points.h b/libjx/testui/code/TestWidget-Points.h index 0fa1c12b3..40218f5e6 100644 --- a/libjx/testui/code/TestWidget-Points.h +++ b/libjx/testui/code/TestWidget-Points.h @@ -14,14 +14,7 @@ static const JUtf8Byte* kPointsMenuStr = "|* %r %i __60::TestWidget" ; -enum { - ____10=1, - ____20, - ____30, - ____40, - ____50, - ____60, -}; +#include "TestWidget-Points-enum.h" static void ConfigurePointsMenu(JXTextMenu* menu, const int offset = 0) { diff --git a/libjx/testui/code/TestWidget-Points.jxm b/libjx/testui/code/TestWidget-Points.jxm index f7b7d9a15..86c6d2de6 100644 --- a/libjx/testui/code/TestWidget-Points.jxm +++ b/libjx/testui/code/TestWidget-Points.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +671 264 "TestWidget" "Points" ' diff --git a/libjx/testui/code/TestWidget-Secret-enum.h b/libjx/testui/code/TestWidget-Secret-enum.h new file mode 100644 index 000000000..746b6480f --- /dev/null +++ b/libjx/testui/code/TestWidget-Secret-enum.h @@ -0,0 +1,19 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_TestWidget_Secret_enum +#define _H_TestWidget_Secret_enum + +enum { + ____Congratulations=1, + ____YouFoundTheSecretMenu, + ____IfYouHaveToUseSuchMenus, + ____PickMe, + ____baXAAha, + ____baB, + ____baXA, + ____baXa, +}; + +#endif diff --git a/libjx/testui/code/TestWidget-Secret.h b/libjx/testui/code/TestWidget-Secret.h index b8472a82e..bc2ec8976 100644 --- a/libjx/testui/code/TestWidget-Secret.h +++ b/libjx/testui/code/TestWidget-Secret.h @@ -16,16 +16,7 @@ static const JUtf8Byte* kSecretMenuStr = "|* %i __baXa::TestWidget" ; -enum { - ____Congratulations=1, - ____YouFoundTheSecretMenu, - ____IfYouHaveToUseSuchMenus, - ____PickMe, - ____baXAAha, - ____baB, - ____baXA, - ____baXa, -}; +#include "TestWidget-Secret-enum.h" static void ConfigureSecretMenu(JXTextMenu* menu, const int offset = 0) { diff --git a/libjx/testui/code/TestWidget-Secret.jxm b/libjx/testui/code/TestWidget-Secret.jxm index daf83eb71..2a7083865 100644 --- a/libjx/testui/code/TestWidget-Secret.jxm +++ b/libjx/testui/code/TestWidget-Secret.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +981 311 "TestWidget" "Secret" ' 40 40 +198 100 100 -100 -100 -100 +193 +210 75 0 @@ -78,7 +78,7 @@ jx_menu_editor 0 0 "" "ba x-a" "" -'a +' "__baXA" "____baXA" 0 @@ -88,7 +88,7 @@ jx_menu_editor 0 0 "" "ba xa" "" -'a +' "__baXa" "____baXa" 0 diff --git a/libjx/testui/code/TestWidget.cpp b/libjx/testui/code/TestWidget.cpp index 2621f372f..d921e010b 100644 --- a/libjx/testui/code/TestWidget.cpp +++ b/libjx/testui/code/TestWidget.cpp @@ -466,7 +466,7 @@ JIndex i; p.SetPenColor(JColorManager::GetRedColor()); p.Rect(its2Rect); p.SetFontStyle(JColorManager::GetRedColor()); - p.String(its2Rect.topLeft(), JString("2", JString::kNoCopy), + p.String(its2Rect.topLeft(), "2", its2Rect.width(), JPainter::HAlign::kCenter, its2Rect.height(), JPainter::VAlign::kCenter); @@ -474,7 +474,7 @@ JIndex i; p.SetPenColor(JColorManager::GetBlueColor()); p.Rect(its3Rect); p.SetFontStyle(JColorManager::GetBlueColor()); - p.String(its3Rect.topLeft(), JString("3", JString::kNoCopy), + p.String(its3Rect.topLeft(), "3", its3Rect.width(), JPainter::HAlign::kCenter, its3Rect.height(), JPainter::VAlign::kCenter); diff --git a/libjx/testui/strings/TestWidget-Secret b/libjx/testui/strings/TestWidget-Secret index 2c91522ce..c00cb1418 100644 --- a/libjx/testui/strings/TestWidget-Secret +++ b/libjx/testui/strings/TestWidget-Secret @@ -12,5 +12,5 @@ __IfYouHaveToUseSuchMenus::TestWidget "If you have to use such menus" __PickMe::TestWidget "Pick me! %k Ctrl-plus" __baXAAha::TestWidget "ba x-a aha %h a" __baB::TestWidget "ba b %h b" -__baXA::TestWidget "ba x-a %h a" -__baXa::TestWidget "ba xa %h a" +__baXA::TestWidget "ba x-a" +__baXa::TestWidget "ba xa" diff --git a/tools/jx_layout_editor/code/App-Help-enum.h b/tools/jx_layout_editor/code/App-Help-enum.h new file mode 100644 index 000000000..a4858fcf1 --- /dev/null +++ b/tools/jx_layout_editor/code/App-Help-enum.h @@ -0,0 +1,17 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_App_Help_enum +#define _H_App_Help_enum + +enum { + kHelpAboutCmd=1, + kHelpTOCCmd, + kHelpOverviewCmd, + kHelpWindowCmd, + kHelpChangeLogCmd, + kHelpCreditsCmd, +}; + +#endif diff --git a/tools/jx_layout_editor/code/App-Help.h b/tools/jx_layout_editor/code/App-Help.h index 97b84864a..b5afcd344 100644 --- a/tools/jx_layout_editor/code/App-Help.h +++ b/tools/jx_layout_editor/code/App-Help.h @@ -14,14 +14,7 @@ static const JUtf8Byte* kHelpMenuStr = "|* %i __Credits::App" ; -enum { - kHelpAboutCmd=1, - kHelpTOCCmd, - kHelpOverviewCmd, - kHelpWindowCmd, - kHelpChangeLogCmd, - kHelpCreditsCmd, -}; +#include "App-Help-enum.h" #ifndef _H_jx_af_image_jx_jx_help_toc #define _H_jx_af_image_jx_jx_help_toc @@ -33,8 +26,8 @@ enum { #endif static void ConfigureHelpMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#h", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#h"); } menu->SetItemImage(kHelpTOCCmd + offset, jx_help_toc); menu->SetItemImage(kHelpWindowCmd + offset, jx_help_specific); diff --git a/tools/jx_layout_editor/code/App-Help.jxm b/tools/jx_layout_editor/code/App-Help.jxm index 52c90e983..1dd0822c4 100644 --- a/tools/jx_layout_editor/code/App-Help.jxm +++ b/tools/jx_layout_editor/code/App-Help.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +670 269 "App" "Help" 'h diff --git a/tools/jx_layout_editor/code/LayoutContainer-Edit.h b/tools/jx_layout_editor/code/LayoutContainer-Edit.h index 0168cd0b8..83bd93777 100644 --- a/tools/jx_layout_editor/code/LayoutContainer-Edit.h +++ b/tools/jx_layout_editor/code/LayoutContainer-Edit.h @@ -29,7 +29,7 @@ static const JUtf8Byte* kEditMenuStr = static void ConfigureEditMenu(JXTextMenu* menu, const int offset = 0) { if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#e", JString::kNoCopy)); + menu->SetShortcuts("#e"); } menu->SetItemImage(kUndoCmd + offset, jx_edit_undo); menu->SetItemImage(kRedoCmd + offset, jx_edit_redo); diff --git a/tools/jx_layout_editor/code/LayoutContainer-Edit.jxm b/tools/jx_layout_editor/code/LayoutContainer-Edit.jxm index 1ba2b99f6..dbfabc43a 100644 --- a/tools/jx_layout_editor/code/LayoutContainer-Edit.jxm +++ b/tools/jx_layout_editor/code/LayoutContainer-Edit.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +671 224 "LayoutContainer" "Edit" 'e diff --git a/tools/jx_layout_editor/code/LayoutDocument-File-enum.h b/tools/jx_layout_editor/code/LayoutDocument-File-enum.h new file mode 100644 index 000000000..00570c5ee --- /dev/null +++ b/tools/jx_layout_editor/code/LayoutDocument-File-enum.h @@ -0,0 +1,22 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_LayoutDocument_File_enum +#define _H_LayoutDocument_File_enum + +enum { + kNewCmd=1, + kOpenCmd, + kRecentMenuCmd, + kSaveCmd, + kSaveAsCmd, + kSaveCopyAsCmd, + kRevertCmd, + kSaveAllCmd, + kShowInFileMgrCmd, + kCloseCmd, + kQuitCmd, +}; + +#endif diff --git a/tools/jx_layout_editor/code/LayoutDocument-File.h b/tools/jx_layout_editor/code/LayoutDocument-File.h index a97f5e5fa..e32bf0225 100644 --- a/tools/jx_layout_editor/code/LayoutDocument-File.h +++ b/tools/jx_layout_editor/code/LayoutDocument-File.h @@ -19,19 +19,7 @@ static const JUtf8Byte* kFileMenuStr = "|* %i Quit::LayoutDocument" ; -enum { - kNewCmd=1, - kOpenCmd, - kRecentMenuCmd, - kSaveCmd, - kSaveAsCmd, - kSaveCopyAsCmd, - kRevertCmd, - kSaveAllCmd, - kShowInFileMgrCmd, - kCloseCmd, - kQuitCmd, -}; +#include "LayoutDocument-File-enum.h" #ifndef _H_jx_af_image_jx_jx_file_new #define _H_jx_af_image_jx_jx_file_new @@ -55,8 +43,8 @@ enum { #endif static void ConfigureFileMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#f", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#f"); } menu->SetItemImage(kNewCmd + offset, jx_file_new); menu->SetItemImage(kOpenCmd + offset, jx_file_open); diff --git a/tools/jx_layout_editor/code/LayoutDocument-File.jxm b/tools/jx_layout_editor/code/LayoutDocument-File.jxm index 44074397a..536678704 100644 --- a/tools/jx_layout_editor/code/LayoutDocument-File.jxm +++ b/tools/jx_layout_editor/code/LayoutDocument-File.jxm @@ -18,7 +18,7 @@ jx_menu_editor 0 1 "jx_file_new.xpm" "New..." "Ctrl-N" -'s +'n "New" "kNewCmd" 1 diff --git a/tools/jx_layout_editor/code/LayoutDocument-Preferences-enum.h b/tools/jx_layout_editor/code/LayoutDocument-Preferences-enum.h new file mode 100644 index 000000000..78eac3372 --- /dev/null +++ b/tools/jx_layout_editor/code/LayoutDocument-Preferences-enum.h @@ -0,0 +1,14 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_LayoutDocument_Preferences_enum +#define _H_LayoutDocument_Preferences_enum + +enum { + kEditToolBarCmd=1, + kFilePrefsCmd, + kEditMacWinPrefsCmd, +}; + +#endif diff --git a/tools/jx_layout_editor/code/LayoutDocument-Preferences.h b/tools/jx_layout_editor/code/LayoutDocument-Preferences.h index a71759176..f4134f15f 100644 --- a/tools/jx_layout_editor/code/LayoutDocument-Preferences.h +++ b/tools/jx_layout_editor/code/LayoutDocument-Preferences.h @@ -11,16 +11,12 @@ static const JUtf8Byte* kPreferencesMenuStr = "|* %i __MacWinXEmulation::LayoutDocument" ; -enum { - kEditToolBarCmd=1, - kFilePrefsCmd, - kEditMacWinPrefsCmd, -}; +#include "LayoutDocument-Preferences-enum.h" static void ConfigurePreferencesMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#p", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#p"); } }; diff --git a/tools/jx_layout_editor/code/LayoutDocument-Preferences.jxm b/tools/jx_layout_editor/code/LayoutDocument-Preferences.jxm index c7b9a0d68..b7356b368 100644 --- a/tools/jx_layout_editor/code/LayoutDocument-Preferences.jxm +++ b/tools/jx_layout_editor/code/LayoutDocument-Preferences.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -756 328 +874 196 "LayoutDocument" "Preferences" 'p @@ -8,8 +8,8 @@ jx_menu_editor 0 207 100 100 -186 -100 +141 +144 75 0 diff --git a/tools/jx_layout_editor/code/MDIServer.cpp b/tools/jx_layout_editor/code/MDIServer.cpp index 67373b63e..a35ef9070 100644 --- a/tools/jx_layout_editor/code/MDIServer.cpp +++ b/tools/jx_layout_editor/code/MDIServer.cpp @@ -84,7 +84,7 @@ MDIServer::ChooseFiles() { auto* dlog = JXChooseFileDialog::Create( JXChooseFileDialog::kSelectMultipleFiles, - JString::empty, JString("*.jxl *.fd", JString::kNoCopy)); + JString::empty, "*.jxl *.fd"); if (dlog->DoDialog()) { diff --git a/tools/jx_layout_editor/strings/LayoutDocument-File b/tools/jx_layout_editor/strings/LayoutDocument-File index 2c90a7809..ba13bbf9f 100644 --- a/tools/jx_layout_editor/strings/LayoutDocument-File +++ b/tools/jx_layout_editor/strings/LayoutDocument-File @@ -6,7 +6,7 @@ MenuTitle::LayoutDocument_File "File" -New::LayoutDocument "New... %k Ctrl-N %h s" +New::LayoutDocument "New... %k Ctrl-N %h n" Open::LayoutDocument "Open... %k Ctrl-O %h o" Recent::LayoutDocument "Recent" Save::LayoutDocument "Save %k Ctrl-S %h s" diff --git a/tools/jx_memory_debugger/code/All-Preferences-enum.h b/tools/jx_memory_debugger/code/All-Preferences-enum.h new file mode 100644 index 000000000..8f1058166 --- /dev/null +++ b/tools/jx_memory_debugger/code/All-Preferences-enum.h @@ -0,0 +1,15 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_All_Preferences_enum +#define _H_All_Preferences_enum + +enum { + kPrefsCmd=1, + kEditToolBarCmd, + kEditMacWinPrefsCmd, + kSaveWindSizeCmd, +}; + +#endif diff --git a/tools/jx_memory_debugger/code/All-Preferences.h b/tools/jx_memory_debugger/code/All-Preferences.h index 811256284..ef785289f 100644 --- a/tools/jx_memory_debugger/code/All-Preferences.h +++ b/tools/jx_memory_debugger/code/All-Preferences.h @@ -12,17 +12,12 @@ static const JUtf8Byte* kPreferencesMenuStr = "|* %i __SaveWindowSetupAsDefault::All" ; -enum { - kPrefsCmd=1, - kEditToolBarCmd, - kEditMacWinPrefsCmd, - kSaveWindSizeCmd, -}; +#include "All-Preferences-enum.h" static void ConfigurePreferencesMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#p", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#p"); } }; diff --git a/tools/jx_memory_debugger/code/All-Preferences.jxm b/tools/jx_memory_debugger/code/All-Preferences.jxm index 81c5f6a99..48002bc09 100644 --- a/tools/jx_memory_debugger/code/All-Preferences.jxm +++ b/tools/jx_memory_debugger/code/All-Preferences.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +849 229 "All" "Preferences" 'p 40 40 +191 100 -100 -100 -100 -100 +40 +194 +146 75 0 diff --git a/tools/jx_memory_debugger/code/App-Help-enum.h b/tools/jx_memory_debugger/code/App-Help-enum.h new file mode 100644 index 000000000..a4858fcf1 --- /dev/null +++ b/tools/jx_memory_debugger/code/App-Help-enum.h @@ -0,0 +1,17 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_App_Help_enum +#define _H_App_Help_enum + +enum { + kHelpAboutCmd=1, + kHelpTOCCmd, + kHelpOverviewCmd, + kHelpWindowCmd, + kHelpChangeLogCmd, + kHelpCreditsCmd, +}; + +#endif diff --git a/tools/jx_memory_debugger/code/App-Help.h b/tools/jx_memory_debugger/code/App-Help.h index bcdae5262..91ef976fe 100644 --- a/tools/jx_memory_debugger/code/App-Help.h +++ b/tools/jx_memory_debugger/code/App-Help.h @@ -14,14 +14,7 @@ static const JUtf8Byte* kHelpMenuStr = "|* %i __Credits::App" ; -enum { - kHelpAboutCmd=1, - kHelpTOCCmd, - kHelpOverviewCmd, - kHelpWindowCmd, - kHelpChangeLogCmd, - kHelpCreditsCmd, -}; +#include "App-Help-enum.h" #ifndef _H_jx_af_image_jx_jx_help_toc #define _H_jx_af_image_jx_jx_help_toc @@ -33,8 +26,8 @@ enum { #endif static void ConfigureHelpMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#h", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#h"); } menu->SetItemImage(kHelpTOCCmd + offset, jx_help_toc); menu->SetItemImage(kHelpWindowCmd + offset, jx_help_specific); diff --git a/tools/jx_memory_debugger/code/App-Help.jxm b/tools/jx_memory_debugger/code/App-Help.jxm index 8bb58ecde..a69eb9746 100644 --- a/tools/jx_memory_debugger/code/App-Help.jxm +++ b/tools/jx_memory_debugger/code/App-Help.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +703 265 "App" "Help" 'h 40 40 +128 100 -100 -100 -100 -100 +41 +113 +143 75 0 diff --git a/tools/jx_memory_debugger/code/RecordDirector-File-enum.h b/tools/jx_memory_debugger/code/RecordDirector-File-enum.h new file mode 100644 index 000000000..335778617 --- /dev/null +++ b/tools/jx_memory_debugger/code/RecordDirector-File-enum.h @@ -0,0 +1,16 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_RecordDirector_File_enum +#define _H_RecordDirector_File_enum + +enum { + kOpenSelCmd=1, + kPageSetupCmd, + kPrintCmd, + kCloseCmd, + kQuitCmd, +}; + +#endif diff --git a/tools/jx_memory_debugger/code/RecordDirector-File.h b/tools/jx_memory_debugger/code/RecordDirector-File.h index 5b00c77c4..be528254d 100644 --- a/tools/jx_memory_debugger/code/RecordDirector-File.h +++ b/tools/jx_memory_debugger/code/RecordDirector-File.h @@ -13,13 +13,7 @@ static const JUtf8Byte* kFileMenuStr = "|* %i Quit::JX" ; -enum { - kOpenSelCmd=1, - kPageSetupCmd, - kPrintCmd, - kCloseCmd, - kQuitCmd, -}; +#include "RecordDirector-File-enum.h" #ifndef _H_jx_af_image_jx_jx_file_print #define _H_jx_af_image_jx_jx_file_print @@ -27,8 +21,8 @@ enum { #endif static void ConfigureFileMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#f", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#f"); } menu->SetItemImage(kPrintCmd + offset, jx_file_print); }; diff --git a/tools/jx_memory_debugger/code/RecordDirector-File.jxm b/tools/jx_memory_debugger/code/RecordDirector-File.jxm index 9e6a3d67b..6ee1cc79a 100644 --- a/tools/jx_memory_debugger/code/RecordDirector-File.jxm +++ b/tools/jx_memory_debugger/code/RecordDirector-File.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +752 250 "RecordDirector" "File" 'f 40 40 +134 100 -100 -100 -100 -100 +42 +188 +110 75 0 diff --git a/tools/jx_memory_debugger/code/StatsDirector-Data-enum.h b/tools/jx_memory_debugger/code/StatsDirector-Data-enum.h new file mode 100644 index 000000000..2e6edeec1 --- /dev/null +++ b/tools/jx_memory_debugger/code/StatsDirector-Data-enum.h @@ -0,0 +1,21 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_StatsDirector_Data_enum +#define _H_StatsDirector_Data_enum + +enum { + kGetRecordsCmd=1, + kSaveSnapshotCmd, + kDiffSnapshotCmd, + kShowAppRecordsCmd, + kShowBucket1RecordsCmd, + kShowBucket2RecordsCmd, + kShowBucket3RecordsCmd, + kShowLibraryRecordsCmd, + kShowIntervalRecordsCmd, + kShowUnknownRecordsCmd, +}; + +#endif diff --git a/tools/jx_memory_debugger/code/StatsDirector-Data.h b/tools/jx_memory_debugger/code/StatsDirector-Data.h index 63a7bc198..0cf15a16b 100644 --- a/tools/jx_memory_debugger/code/StatsDirector-Data.h +++ b/tools/jx_memory_debugger/code/StatsDirector-Data.h @@ -18,23 +18,12 @@ static const JUtf8Byte* kDataMenuStr = "|* %b %i ShowUnknownRecordsAction::MDStatsDirector" ; -enum { - kGetRecordsCmd=1, - kSaveSnapshotCmd, - kDiffSnapshotCmd, - kShowAppRecordsCmd, - kShowBucket1RecordsCmd, - kShowBucket2RecordsCmd, - kShowBucket3RecordsCmd, - kShowLibraryRecordsCmd, - kShowIntervalRecordsCmd, - kShowUnknownRecordsCmd, -}; +#include "StatsDirector-Data-enum.h" static void ConfigureDataMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#d", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#d"); } }; diff --git a/tools/jx_memory_debugger/code/StatsDirector-Data.jxm b/tools/jx_memory_debugger/code/StatsDirector-Data.jxm index 11a6e54ea..7a022f341 100644 --- a/tools/jx_memory_debugger/code/StatsDirector-Data.jxm +++ b/tools/jx_memory_debugger/code/StatsDirector-Data.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -686 418 +994 352 "StatsDirector" "Data" 'd 40 40 +187 100 -100 -100 -162 -100 +39 +299 +187 75 0 diff --git a/tools/jx_memory_debugger/code/StatsDirector-File-enum.h b/tools/jx_memory_debugger/code/StatsDirector-File-enum.h new file mode 100644 index 000000000..abebcad8c --- /dev/null +++ b/tools/jx_memory_debugger/code/StatsDirector-File-enum.h @@ -0,0 +1,12 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_StatsDirector_File_enum +#define _H_StatsDirector_File_enum + +enum { + kQuitCmd=1, +}; + +#endif diff --git a/tools/jx_memory_debugger/code/StatsDirector-File.h b/tools/jx_memory_debugger/code/StatsDirector-File.h index cafe22508..8f68984ca 100644 --- a/tools/jx_memory_debugger/code/StatsDirector-File.h +++ b/tools/jx_memory_debugger/code/StatsDirector-File.h @@ -9,14 +9,12 @@ static const JUtf8Byte* kFileMenuStr = "* %i Quit::JX" ; -enum { - kQuitCmd=1, -}; +#include "StatsDirector-File-enum.h" static void ConfigureFileMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#f", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#f"); } }; diff --git a/tools/jx_memory_debugger/code/StatsDirector-File.jxm b/tools/jx_memory_debugger/code/StatsDirector-File.jxm index 62c83a172..3327a81cc 100644 --- a/tools/jx_memory_debugger/code/StatsDirector-File.jxm +++ b/tools/jx_memory_debugger/code/StatsDirector-File.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +629 166 "StatsDirector" "File" 'f @@ -7,7 +7,7 @@ jx_menu_editor 0 40 100 100 -100 +37 100 100 75 diff --git a/tools/jx_menu_editor/code/App-Help.h b/tools/jx_menu_editor/code/App-Help.h index 280317094..b5afcd344 100644 --- a/tools/jx_menu_editor/code/App-Help.h +++ b/tools/jx_menu_editor/code/App-Help.h @@ -27,7 +27,7 @@ static const JUtf8Byte* kHelpMenuStr = static void ConfigureHelpMenu(JXTextMenu* menu, const int offset = 0) { if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#h", JString::kNoCopy)); + menu->SetShortcuts("#h"); } menu->SetItemImage(kHelpTOCCmd + offset, jx_help_toc); menu->SetItemImage(kHelpWindowCmd + offset, jx_help_specific); diff --git a/tools/jx_menu_editor/code/MDIServer.cpp b/tools/jx_menu_editor/code/MDIServer.cpp index 1bbfe677a..c63541ad3 100644 --- a/tools/jx_menu_editor/code/MDIServer.cpp +++ b/tools/jx_menu_editor/code/MDIServer.cpp @@ -85,7 +85,7 @@ MDIServer::ChooseFiles() { auto* dlog = JXChooseFileDialog::Create( JXChooseFileDialog::kSelectMultipleFiles, - JString::empty, JString("*.jxm", JString::kNoCopy)); + JString::empty, "*.jxm"); if (dlog->DoDialog()) { diff --git a/tools/jx_menu_editor/code/MenuDocument-File-enum.h b/tools/jx_menu_editor/code/MenuDocument-File-enum.h new file mode 100644 index 000000000..337469960 --- /dev/null +++ b/tools/jx_menu_editor/code/MenuDocument-File-enum.h @@ -0,0 +1,22 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_MenuDocument_File_enum +#define _H_MenuDocument_File_enum + +enum { + kNewCmd=1, + kOpenCmd, + kRecentMenuCmd, + kSaveCmd, + kSaveAsCmd, + kSaveCopyAsCmd, + kRevertCmd, + kSaveAllCmd, + kShowInFileMgrCmd, + kCloseCmd, + kQuitCmd, +}; + +#endif diff --git a/tools/jx_menu_editor/code/MenuDocument-File.h b/tools/jx_menu_editor/code/MenuDocument-File.h index 6f49397d5..de5d78b7f 100644 --- a/tools/jx_menu_editor/code/MenuDocument-File.h +++ b/tools/jx_menu_editor/code/MenuDocument-File.h @@ -19,19 +19,7 @@ static const JUtf8Byte* kFileMenuStr = "|* %i Quit::MenuDocument" ; -enum { - kNewCmd=1, - kOpenCmd, - kRecentMenuCmd, - kSaveCmd, - kSaveAsCmd, - kSaveCopyAsCmd, - kRevertCmd, - kSaveAllCmd, - kShowInFileMgrCmd, - kCloseCmd, - kQuitCmd, -}; +#include "MenuDocument-File-enum.h" #ifndef _H_jx_af_image_jx_jx_file_new #define _H_jx_af_image_jx_jx_file_new @@ -56,7 +44,7 @@ enum { static void ConfigureFileMenu(JXTextMenu* menu, const int offset = 0) { if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#f", JString::kNoCopy)); + menu->SetShortcuts("#f"); } menu->SetItemImage(kNewCmd + offset, jx_file_new); menu->SetItemImage(kOpenCmd + offset, jx_file_open); diff --git a/tools/jx_menu_editor/code/MenuDocument-File.jxm b/tools/jx_menu_editor/code/MenuDocument-File.jxm index 480b42870..6d2bcaad0 100644 --- a/tools/jx_menu_editor/code/MenuDocument-File.jxm +++ b/tools/jx_menu_editor/code/MenuDocument-File.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -730 362 +701 363 "MenuDocument" "File" 'f diff --git a/tools/jx_menu_editor/code/MenuDocument-Preferences-enum.h b/tools/jx_menu_editor/code/MenuDocument-Preferences-enum.h new file mode 100644 index 000000000..924c1867a --- /dev/null +++ b/tools/jx_menu_editor/code/MenuDocument-Preferences-enum.h @@ -0,0 +1,15 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_MenuDocument_Preferences_enum +#define _H_MenuDocument_Preferences_enum + +enum { + kEditToolBarCmd=1, + kFilePrefsCmd, + kEditMacWinPrefsCmd, + kSaveLayoutPrefsCmd, +}; + +#endif diff --git a/tools/jx_menu_editor/code/MenuDocument-Preferences.h b/tools/jx_menu_editor/code/MenuDocument-Preferences.h index 1d1be20f2..c67f85885 100644 --- a/tools/jx_menu_editor/code/MenuDocument-Preferences.h +++ b/tools/jx_menu_editor/code/MenuDocument-Preferences.h @@ -12,17 +12,12 @@ static const JUtf8Byte* kPreferencesMenuStr = "|* %i __SaveTableLayoutAsDefault::MenuDocument" ; -enum { - kEditToolBarCmd=1, - kFilePrefsCmd, - kEditMacWinPrefsCmd, - kSaveLayoutPrefsCmd, -}; +#include "MenuDocument-Preferences-enum.h" static void ConfigurePreferencesMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#p", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#p"); } }; diff --git a/tools/jx_menu_editor/code/MenuDocument-Preferences.jxm b/tools/jx_menu_editor/code/MenuDocument-Preferences.jxm index f392fd292..e1349e8a2 100644 --- a/tools/jx_menu_editor/code/MenuDocument-Preferences.jxm +++ b/tools/jx_menu_editor/code/MenuDocument-Preferences.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -756 328 +842 228 "MenuDocument" "Preferences" 'p 40 40 -207 -100 +183 100 +39 186 -100 +150 75 0 diff --git a/tools/jx_menu_editor/code/MenuDocument.cpp b/tools/jx_menu_editor/code/MenuDocument.cpp index a1414eefc..32ed195c8 100644 --- a/tools/jx_menu_editor/code/MenuDocument.cpp +++ b/tools/jx_menu_editor/code/MenuDocument.cpp @@ -49,6 +49,7 @@ MenuDocument::Create ) { *doc = jnew MenuDocument(GetDocumentManager()->GetNewFileName(), false); + (**doc).DataReverted(); (**doc).Activate(); return true; } @@ -87,6 +88,7 @@ MenuDocument::Create { *doc = jnew MenuDocument(fullName, true); (**doc).ReadFile(input); + (**doc).DataReverted(); (**doc).Activate(); return true; } @@ -571,7 +573,7 @@ MenuDocument::GenerateCode() // strings - JString stringsFullName = JCombinePathAndName(projRoot, JString("strings", JString::kNoCopy)); + JString stringsFullName = JCombinePathAndName(projRoot, "strings"); stringsFullName = JCombinePathAndName(stringsFullName, root); JEditVCS(stringsFullName); @@ -605,21 +607,21 @@ MenuDocument::FindProjectRoot JString p = path, n; do { - n = JCombinePathAndName(p, JString("Makefile", JString::kNoCopy)); + n = JCombinePathAndName(p, "Makefile"); if (JFileExists(n)) { *root = p; return true; } - n = JCombinePathAndName(p, JString("Make.header", JString::kNoCopy)); + n = JCombinePathAndName(p, "Make.header"); if (JFileExists(n)) { *root = p; return true; } - n = JCombinePathAndName(p, JString("CMakeLists.txt", JString::kNoCopy)); + n = JCombinePathAndName(p, "CMakeLists.txt"); if (JFileExists(n)) { *root = p; diff --git a/tools/jx_menu_editor/code/MenuTable-Table-enum.h b/tools/jx_menu_editor/code/MenuTable-Table-enum.h new file mode 100644 index 000000000..b07d51c59 --- /dev/null +++ b/tools/jx_menu_editor/code/MenuTable-Table-enum.h @@ -0,0 +1,14 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_MenuTable_Table_enum +#define _H_MenuTable_Table_enum + +enum { + kAppendCmd=1, + kDuplicateCmd, + kImportCmd, +}; + +#endif diff --git a/tools/jx_menu_editor/code/MenuTable-Table.h b/tools/jx_menu_editor/code/MenuTable-Table.h index 72108ec25..ec4937ed2 100644 --- a/tools/jx_menu_editor/code/MenuTable-Table.h +++ b/tools/jx_menu_editor/code/MenuTable-Table.h @@ -11,16 +11,12 @@ static const JUtf8Byte* kTableMenuStr = "|* %i Import::MenuTable" ; -enum { - kAppendCmd=1, - kDuplicateCmd, - kImportCmd, -}; +#include "MenuTable-Table-enum.h" static void ConfigureTableMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#t", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#t"); } }; diff --git a/tools/jx_menu_editor/code/MenuTable-Table.jxm b/tools/jx_menu_editor/code/MenuTable-Table.jxm index 2888641b7..8a4e76285 100644 --- a/tools/jx_menu_editor/code/MenuTable-Table.jxm +++ b/tools/jx_menu_editor/code/MenuTable-Table.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -732 300 +684 206 "MenuTable" "Table" 't diff --git a/tools/jx_menu_editor/code/MenuTable-Type-enum.h b/tools/jx_menu_editor/code/MenuTable-Type-enum.h new file mode 100644 index 000000000..14e306baf --- /dev/null +++ b/tools/jx_menu_editor/code/MenuTable-Type-enum.h @@ -0,0 +1,14 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_MenuTable_Type_enum +#define _H_MenuTable_Type_enum + +enum { + kPlainCmd=1, + kCheckboxCmd, + kRadioCmd, +}; + +#endif diff --git a/tools/jx_menu_editor/code/MenuTable-Type.h b/tools/jx_menu_editor/code/MenuTable-Type.h index ac7aced8d..e7b9db2c6 100644 --- a/tools/jx_menu_editor/code/MenuTable-Type.h +++ b/tools/jx_menu_editor/code/MenuTable-Type.h @@ -11,11 +11,7 @@ static const JUtf8Byte* kTypeMenuStr = "|* %r %i __RadioButton::MenuTable" ; -enum { - kPlainCmd=1, - kCheckboxCmd, - kRadioCmd, -}; +#include "MenuTable-Type-enum.h" static void ConfigureTypeMenu(JXTextMenu* menu, const int offset = 0) { diff --git a/tools/jx_menu_editor/code/MenuTable-Type.jxm b/tools/jx_menu_editor/code/MenuTable-Type.jxm index 4da61875f..1c079fe5a 100644 --- a/tools/jx_menu_editor/code/MenuTable-Type.jxm +++ b/tools/jx_menu_editor/code/MenuTable-Type.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +619 206 "MenuTable" "Type" ' diff --git a/tools/jx_menu_editor/code/MenuTable.cpp b/tools/jx_menu_editor/code/MenuTable.cpp index e685105a8..839712d74 100644 --- a/tools/jx_menu_editor/code/MenuTable.cpp +++ b/tools/jx_menu_editor/code/MenuTable.cpp @@ -1172,7 +1172,7 @@ MenuTable::BuildIconMenu() if (itsDoc->ExistsOnDisk() && MenuDocument::FindProjectRoot(itsDoc->GetFilePath(), &iconPath)) { - iconPath = JCombinePathAndName(iconPath, JString("image-build", JString::kNoCopy)); + iconPath = JCombinePathAndName(iconPath, "image-build"); if (JDirInfo::Create(iconPath, &info)) { info->ShowDirs(false); diff --git a/tools/jx_menu_editor/strings/strings b/tools/jx_menu_editor/strings/strings index 082583e81..afaefe942 100644 --- a/tools/jx_menu_editor/strings/strings +++ b/tools/jx_menu_editor/strings/strings @@ -123,7 +123,7 @@ ConfigureMenuHeader::MenuTable ConfigureShortcut::MenuTable " if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString(\"#$key\", JString::kNoCopy)); + menu->SetShortcuts(\"#$key\"); } " diff --git a/tools/jx_project_wizard/app_template/code/App-Help-enum.h b/tools/jx_project_wizard/app_template/code/App-Help-enum.h new file mode 100644 index 000000000..a4858fcf1 --- /dev/null +++ b/tools/jx_project_wizard/app_template/code/App-Help-enum.h @@ -0,0 +1,17 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_App_Help_enum +#define _H_App_Help_enum + +enum { + kHelpAboutCmd=1, + kHelpTOCCmd, + kHelpOverviewCmd, + kHelpWindowCmd, + kHelpChangeLogCmd, + kHelpCreditsCmd, +}; + +#endif diff --git a/tools/jx_project_wizard/app_template/code/App-Help.h b/tools/jx_project_wizard/app_template/code/App-Help.h index 97b84864a..b5afcd344 100644 --- a/tools/jx_project_wizard/app_template/code/App-Help.h +++ b/tools/jx_project_wizard/app_template/code/App-Help.h @@ -14,14 +14,7 @@ static const JUtf8Byte* kHelpMenuStr = "|* %i __Credits::App" ; -enum { - kHelpAboutCmd=1, - kHelpTOCCmd, - kHelpOverviewCmd, - kHelpWindowCmd, - kHelpChangeLogCmd, - kHelpCreditsCmd, -}; +#include "App-Help-enum.h" #ifndef _H_jx_af_image_jx_jx_help_toc #define _H_jx_af_image_jx_jx_help_toc @@ -33,8 +26,8 @@ enum { #endif static void ConfigureHelpMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#h", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#h"); } menu->SetItemImage(kHelpTOCCmd + offset, jx_help_toc); menu->SetItemImage(kHelpWindowCmd + offset, jx_help_specific); diff --git a/tools/jx_project_wizard/app_template/code/App-Help.jxm b/tools/jx_project_wizard/app_template/code/App-Help.jxm index 52c90e983..0028da05d 100644 --- a/tools/jx_project_wizard/app_template/code/App-Help.jxm +++ b/tools/jx_project_wizard/app_template/code/App-Help.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +668 276 "App" "Help" 'h 40 40 +115 100 +40 100 -100 -100 -100 +139 75 0 diff --git a/tools/jx_project_wizard/app_template/code/MainDirector-File-enum.h b/tools/jx_project_wizard/app_template/code/MainDirector-File-enum.h new file mode 100644 index 000000000..40b3864b4 --- /dev/null +++ b/tools/jx_project_wizard/app_template/code/MainDirector-File-enum.h @@ -0,0 +1,12 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_MainDirector_File_enum +#define _H_MainDirector_File_enum + +enum { + kQuitCmd=1, +}; + +#endif diff --git a/tools/jx_project_wizard/app_template/code/MainDirector-File.h b/tools/jx_project_wizard/app_template/code/MainDirector-File.h index f55daa3e9..aaea5ba83 100644 --- a/tools/jx_project_wizard/app_template/code/MainDirector-File.h +++ b/tools/jx_project_wizard/app_template/code/MainDirector-File.h @@ -9,14 +9,12 @@ static const JUtf8Byte* kFileMenuStr = "* %i Quit::MainDirector" ; -enum { - kQuitCmd=1, -}; +#include "MainDirector-File-enum.h" static void ConfigureFileMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#f", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#f"); } }; diff --git a/tools/jx_project_wizard/app_template/code/MainDirector-File.jxm b/tools/jx_project_wizard/app_template/code/MainDirector-File.jxm index 1067755cd..d8afe3e97 100644 --- a/tools/jx_project_wizard/app_template/code/MainDirector-File.jxm +++ b/tools/jx_project_wizard/app_template/code/MainDirector-File.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +632 165 "MainDirector" "File" 'f @@ -7,7 +7,7 @@ jx_menu_editor 0 40 100 100 -100 +36 100 100 75 diff --git a/tools/jx_project_wizard/app_template/code/MainDirector-Preferences-enum.h b/tools/jx_project_wizard/app_template/code/MainDirector-Preferences-enum.h new file mode 100644 index 000000000..427f88007 --- /dev/null +++ b/tools/jx_project_wizard/app_template/code/MainDirector-Preferences-enum.h @@ -0,0 +1,16 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_MainDirector_Preferences_enum +#define _H_MainDirector_Preferences_enum + +enum { + kPrefsCmd=1, + kEditToolBarCmd, + kEditFileWebPrefsCmd, + kEditMacWinPrefsCmd, + kSaveWindSizeCmd, +}; + +#endif diff --git a/tools/jx_project_wizard/app_template/code/MainDirector-Preferences.h b/tools/jx_project_wizard/app_template/code/MainDirector-Preferences.h index ac188e668..47d9cb2c6 100644 --- a/tools/jx_project_wizard/app_template/code/MainDirector-Preferences.h +++ b/tools/jx_project_wizard/app_template/code/MainDirector-Preferences.h @@ -13,18 +13,12 @@ static const JUtf8Byte* kPreferencesMenuStr = "|* %i __SaveWindowSetupAsDefault::MainDirector" ; -enum { - kPrefsCmd=1, - kEditToolBarCmd, - kEditFileWebPrefsCmd, - kEditMacWinPrefsCmd, - kSaveWindSizeCmd, -}; +#include "MainDirector-Preferences-enum.h" static void ConfigurePreferencesMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#p", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#p"); } }; diff --git a/tools/jx_project_wizard/app_template/code/MainDirector-Preferences.jxm b/tools/jx_project_wizard/app_template/code/MainDirector-Preferences.jxm index caaaab68c..fc8ae0f18 100644 --- a/tools/jx_project_wizard/app_template/code/MainDirector-Preferences.jxm +++ b/tools/jx_project_wizard/app_template/code/MainDirector-Preferences.jxm @@ -1,15 +1,15 @@ jx_menu_editor 0 -670 300 +853 248 "MainDirector" "Preferences" 'p 40 40 +188 100 -100 -100 -100 -100 +37 +195 +151 75 0 diff --git a/tools/jx_project_wizard/code/MainDialog.cpp b/tools/jx_project_wizard/code/MainDialog.cpp index 1720c5a6b..a572ab41f 100644 --- a/tools/jx_project_wizard/code/MainDialog.cpp +++ b/tools/jx_project_wizard/code/MainDialog.cpp @@ -371,7 +371,7 @@ MainDialog::WriteTemplate() tmplDirOK = itsTemplateDir->GetPath(&templateDir); assert( tmplDirOK ); - const JString testFile = JCombinePathAndName(templateDir, JString("_Binary_.fd", JString::kNoCopy)); + const JString testFile = JCombinePathAndName(templateDir, "_Binary_.fd"); if (!JFileExists(testFile)) { JGetUserNotification()->ReportError(JGetString("InvalidTmplDirError::MainDialog")); @@ -429,7 +429,7 @@ MainDialog::WriteTemplate() value.Append(currentYear); value.Append(itsDevEmail->GetText()->GetText()); value.Append(itsDevURL->GetText()->GetText()); - value.Append(itsNeedsMDICB->IsChecked() ? JString("-DUSE_MDI", JString::kNoCopy) : JString::empty); + value.Append(itsNeedsMDICB->IsChecked() ? "-DUSE_MDI" : JString::empty); value.Append(itsBinaryName->GetText()->GetText()); value.Append(dirName); value.Append(jxPath); @@ -479,7 +479,7 @@ MainDialog::CopyAndAdjustTemplateFiles { return; } - info->SetWildcardFilter(JString("*~ #*#", JString::kNoCopy), true); + info->SetWildcardFilter("*~ #*#", true); const JSize count = info->GetEntryCount(); JString prefix; diff --git a/tools/jxlayout/jxlayout.cpp b/tools/jxlayout/jxlayout.cpp index e9c101559..6b19bd869 100644 --- a/tools/jxlayout/jxlayout.cpp +++ b/tools/jxlayout/jxlayout.cpp @@ -1392,7 +1392,7 @@ ApplyOptions id.Print(output); output << "\"));" << std::endl; - stringMgr->SetItem(id, JString("Times", JString::kNoCopy), JPtrArrayT::kDelete); + stringMgr->SetItem(id, "Times", JPtrArrayT::kDelete); } if (flSize != "FL_NORMAL_SIZE") diff --git a/tutorial/02-MenuHello/MenuHelloDir-Text-enum.h b/tutorial/02-MenuHello/MenuHelloDir-Text-enum.h new file mode 100644 index 000000000..f6c70bd5d --- /dev/null +++ b/tutorial/02-MenuHello/MenuHelloDir-Text-enum.h @@ -0,0 +1,13 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_MenuHelloDir_Text_enum +#define _H_MenuHelloDir_Text_enum + +enum { + kHello=1, + kGoodbye, +}; + +#endif diff --git a/tutorial/02-MenuHello/MenuHelloDir-Text.h b/tutorial/02-MenuHello/MenuHelloDir-Text.h index 65e62fb70..4d8802144 100644 --- a/tutorial/02-MenuHello/MenuHelloDir-Text.h +++ b/tutorial/02-MenuHello/MenuHelloDir-Text.h @@ -10,15 +10,12 @@ static const JUtf8Byte* kTextMenuStr = "|* %i __GoodbyeCruelWorld::MenuHelloDir" ; -enum { - kHello=1, - kGoodbye, -}; +#include "MenuHelloDir-Text-enum.h" static void ConfigureTextMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#t", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#t"); } }; diff --git a/tutorial/02-MenuHello/MenuHelloDir-Text.jxm b/tutorial/02-MenuHello/MenuHelloDir-Text.jxm index 7929fdb16..ec1592587 100644 --- a/tutorial/02-MenuHello/MenuHelloDir-Text.jxm +++ b/tutorial/02-MenuHello/MenuHelloDir-Text.jxm @@ -1,14 +1,14 @@ jx_menu_editor 0 -670 300 +690 188 "MenuHelloDir" "Text" 't 40 40 +132 100 -100 -100 -100 +38 +139 100 75 diff --git a/tutorial/03-DialogHello/DialogHelloDir-Text-enum.h b/tutorial/03-DialogHello/DialogHelloDir-Text-enum.h new file mode 100644 index 000000000..21025bee2 --- /dev/null +++ b/tutorial/03-DialogHello/DialogHelloDir-Text-enum.h @@ -0,0 +1,13 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_DialogHelloDir_Text_enum +#define _H_DialogHelloDir_Text_enum + +enum { + kChangeText=1, + kQuit, +}; + +#endif diff --git a/tutorial/03-DialogHello/DialogHelloDir-Text.h b/tutorial/03-DialogHello/DialogHelloDir-Text.h index dc42d8297..9f321c702 100644 --- a/tutorial/03-DialogHello/DialogHelloDir-Text.h +++ b/tutorial/03-DialogHello/DialogHelloDir-Text.h @@ -10,15 +10,12 @@ static const JUtf8Byte* kTextMenuStr = "|* %i __Quit::DialogHelloDir" ; -enum { - kChangeText=1, - kQuit, -}; +#include "DialogHelloDir-Text-enum.h" static void ConfigureTextMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#t", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#t"); } }; diff --git a/tutorial/03-DialogHello/DialogHelloDir-Text.jxm b/tutorial/03-DialogHello/DialogHelloDir-Text.jxm index a6cf6865e..0f691ec9d 100644 --- a/tutorial/03-DialogHello/DialogHelloDir-Text.jxm +++ b/tutorial/03-DialogHello/DialogHelloDir-Text.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +629 190 "DialogHelloDir" "Text" 't @@ -7,7 +7,7 @@ jx_menu_editor 0 40 100 100 -100 +40 100 100 75 diff --git a/tutorial/10-SelectionTable/SelectionTable-Table-enum.h b/tutorial/10-SelectionTable/SelectionTable-Table-enum.h new file mode 100644 index 000000000..0fddda631 --- /dev/null +++ b/tutorial/10-SelectionTable/SelectionTable-Table-enum.h @@ -0,0 +1,14 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_SelectionTable_Table_enum +#define _H_SelectionTable_Table_enum + +enum { + kInsertCmd=1, + kRemoveCmd, + kQuitCmd, +}; + +#endif diff --git a/tutorial/10-SelectionTable/SelectionTable-Table.h b/tutorial/10-SelectionTable/SelectionTable-Table.h index 7313969c3..1f9aa89ca 100644 --- a/tutorial/10-SelectionTable/SelectionTable-Table.h +++ b/tutorial/10-SelectionTable/SelectionTable-Table.h @@ -11,16 +11,12 @@ static const JUtf8Byte* kTableMenuStr = "|* %i __Quit::SelectionTable" ; -enum { - kInsertCmd=1, - kRemoveCmd, - kQuitCmd, -}; +#include "SelectionTable-Table-enum.h" static void ConfigureTableMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#t", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#t"); } }; diff --git a/tutorial/10-SelectionTable/SelectionTable-Table.jxm b/tutorial/10-SelectionTable/SelectionTable-Table.jxm index 573ee8fb4..04750c36d 100644 --- a/tutorial/10-SelectionTable/SelectionTable-Table.jxm +++ b/tutorial/10-SelectionTable/SelectionTable-Table.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +629 215 "SelectionTable" "Table" 't @@ -7,7 +7,7 @@ jx_menu_editor 0 40 100 100 -100 +38 100 100 75 diff --git a/tutorial/11-EditTable/EditTable-Table-enum.h b/tutorial/11-EditTable/EditTable-Table-enum.h new file mode 100644 index 000000000..a084f9f57 --- /dev/null +++ b/tutorial/11-EditTable/EditTable-Table-enum.h @@ -0,0 +1,14 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_EditTable_Table_enum +#define _H_EditTable_Table_enum + +enum { + kInsertCmd=1, + kRemoveCmd, + kQuitCmd, +}; + +#endif diff --git a/tutorial/11-EditTable/EditTable-Table.h b/tutorial/11-EditTable/EditTable-Table.h index b30bac93b..aa1c2cae3 100644 --- a/tutorial/11-EditTable/EditTable-Table.h +++ b/tutorial/11-EditTable/EditTable-Table.h @@ -11,16 +11,12 @@ static const JUtf8Byte* kTableMenuStr = "|* %i __Quit::EditTable" ; -enum { - kInsertCmd=1, - kRemoveCmd, - kQuitCmd, -}; +#include "EditTable-Table-enum.h" static void ConfigureTableMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#t", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#t"); } }; diff --git a/tutorial/11-EditTable/EditTable-Table.jxm b/tutorial/11-EditTable/EditTable-Table.jxm index 3bf827956..bbcb707a6 100644 --- a/tutorial/11-EditTable/EditTable-Table.jxm +++ b/tutorial/11-EditTable/EditTable-Table.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +623 212 "EditTable" "Table" 't @@ -7,7 +7,7 @@ jx_menu_editor 0 40 100 100 -100 +41 100 100 75 diff --git a/tutorial/12-Clipboard/ClipboardDir-Text-enum.h b/tutorial/12-Clipboard/ClipboardDir-Text-enum.h new file mode 100644 index 000000000..a43d3a5f0 --- /dev/null +++ b/tutorial/12-Clipboard/ClipboardDir-Text-enum.h @@ -0,0 +1,13 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_ClipboardDir_Text_enum +#define _H_ClipboardDir_Text_enum + +enum { + kChangeText=1, + kQuit, +}; + +#endif diff --git a/tutorial/12-Clipboard/ClipboardDir-Text.h b/tutorial/12-Clipboard/ClipboardDir-Text.h index 3d9678432..6e7341798 100644 --- a/tutorial/12-Clipboard/ClipboardDir-Text.h +++ b/tutorial/12-Clipboard/ClipboardDir-Text.h @@ -10,15 +10,12 @@ static const JUtf8Byte* kTextMenuStr = "|* %i __Quit::ClipboardDir" ; -enum { - kChangeText=1, - kQuit, -}; +#include "ClipboardDir-Text-enum.h" static void ConfigureTextMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#t", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#t"); } }; diff --git a/tutorial/12-Clipboard/ClipboardDir-Text.jxm b/tutorial/12-Clipboard/ClipboardDir-Text.jxm index b6a161f56..e2c060972 100644 --- a/tutorial/12-Clipboard/ClipboardDir-Text.jxm +++ b/tutorial/12-Clipboard/ClipboardDir-Text.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +616 188 "ClipboardDir" "Text" 't @@ -7,7 +7,7 @@ jx_menu_editor 0 40 100 100 -100 +35 100 100 75 diff --git a/tutorial/12-Clipboard/ClipboardWidget-Edit-enum.h b/tutorial/12-Clipboard/ClipboardWidget-Edit-enum.h new file mode 100644 index 000000000..20a8c57ac --- /dev/null +++ b/tutorial/12-Clipboard/ClipboardWidget-Edit-enum.h @@ -0,0 +1,13 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_ClipboardWidget_Edit_enum +#define _H_ClipboardWidget_Edit_enum + +enum { + kCopyCmd=1, + kPasteCmd, +}; + +#endif diff --git a/tutorial/12-Clipboard/ClipboardWidget-Edit.h b/tutorial/12-Clipboard/ClipboardWidget-Edit.h index f6d256f77..fc761116b 100644 --- a/tutorial/12-Clipboard/ClipboardWidget-Edit.h +++ b/tutorial/12-Clipboard/ClipboardWidget-Edit.h @@ -10,15 +10,12 @@ static const JUtf8Byte* kEditMenuStr = "|* %i __Paste::ClipboardWidget" ; -enum { - kCopyCmd=1, - kPasteCmd, -}; +#include "ClipboardWidget-Edit-enum.h" static void ConfigureEditMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#e", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#e"); } }; diff --git a/tutorial/12-Clipboard/ClipboardWidget-Edit.jxm b/tutorial/12-Clipboard/ClipboardWidget-Edit.jxm index 3067dee9a..6764b5baa 100644 --- a/tutorial/12-Clipboard/ClipboardWidget-Edit.jxm +++ b/tutorial/12-Clipboard/ClipboardWidget-Edit.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +618 185 "ClipboardWidget" "Edit" 'e @@ -7,7 +7,7 @@ jx_menu_editor 0 40 100 100 -100 +37 100 100 75 diff --git a/tutorial/13-Undo/UndoWidgetDir-Actions-enum.h b/tutorial/13-Undo/UndoWidgetDir-Actions-enum.h new file mode 100644 index 000000000..146ef4224 --- /dev/null +++ b/tutorial/13-Undo/UndoWidgetDir-Actions-enum.h @@ -0,0 +1,14 @@ +// This file was automatically generated by jx_menu_editor. +// Do not edit it directly! +// Any changes you make will be silently overwritten. + +#ifndef _H_UndoWidgetDir_Actions_enum +#define _H_UndoWidgetDir_Actions_enum + +enum { + kUndo=1, + kRedo, + kQuit, +}; + +#endif diff --git a/tutorial/13-Undo/UndoWidgetDir-Actions.h b/tutorial/13-Undo/UndoWidgetDir-Actions.h index 71a4a6c15..a21f65ff8 100644 --- a/tutorial/13-Undo/UndoWidgetDir-Actions.h +++ b/tutorial/13-Undo/UndoWidgetDir-Actions.h @@ -11,16 +11,12 @@ static const JUtf8Byte* kActionsMenuStr = "|* %i __Quit::UndoWidgetDir" ; -enum { - kUndo=1, - kRedo, - kQuit, -}; +#include "UndoWidgetDir-Actions-enum.h" static void ConfigureActionsMenu(JXTextMenu* menu, const int offset = 0) { - if (menu->IsEmpty() && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { - menu->SetShortcuts(JString("#a", JString::kNoCopy)); + if (offset == 0 && JXMenu::GetDisplayStyle() == JXMenu::kWindowsStyle) { + menu->SetShortcuts("#a"); } }; diff --git a/tutorial/13-Undo/UndoWidgetDir-Actions.jxm b/tutorial/13-Undo/UndoWidgetDir-Actions.jxm index ec5d09ec5..2ef4c5c92 100644 --- a/tutorial/13-Undo/UndoWidgetDir-Actions.jxm +++ b/tutorial/13-Undo/UndoWidgetDir-Actions.jxm @@ -1,5 +1,5 @@ jx_menu_editor 0 -670 300 +627 208 "UndoWidgetDir" "Actions" 'a @@ -7,7 +7,7 @@ jx_menu_editor 0 40 100 100 -100 +40 100 100 75