mirror of https://github.com/buggins/dlangide.git
main menu and actions
This commit is contained in:
parent
93102585da
commit
aeb265f224
|
@ -11,19 +11,42 @@ enum IDEActions : int {
|
||||||
FileSave,
|
FileSave,
|
||||||
FileClose,
|
FileClose,
|
||||||
FileExit,
|
FileExit,
|
||||||
|
BuildWorkspace,
|
||||||
|
RebuildWorkspace,
|
||||||
|
CleanWorkspace,
|
||||||
|
BuildProject,
|
||||||
|
RebuildProject,
|
||||||
|
CleanProject,
|
||||||
|
SetStartupProject,
|
||||||
|
ProjectSettings,
|
||||||
DebugStart,
|
DebugStart,
|
||||||
DebugStartNoDebug,
|
DebugStartNoDebug,
|
||||||
|
DebugContinue,
|
||||||
|
DebugStop,
|
||||||
|
DebugPause,
|
||||||
HelpAbout,
|
HelpAbout,
|
||||||
}
|
}
|
||||||
|
|
||||||
__gshared Action ACTION_FILE_NEW = new Action(IDEActions.FileOpen, "MENU_FILE_NEW"c, "document-new", KeyCode.KEY_N, KeyFlag.Control);
|
const Action ACTION_FILE_NEW = new Action(IDEActions.FileOpen, "MENU_FILE_NEW"c, "document-new", KeyCode.KEY_N, KeyFlag.Control);
|
||||||
__gshared Action ACTION_FILE_OPEN = new Action(IDEActions.FileOpen, "MENU_FILE_OPEN"c, "document-open", KeyCode.KEY_O, KeyFlag.Control);
|
const Action ACTION_FILE_OPEN = new Action(IDEActions.FileOpen, "MENU_FILE_OPEN"c, "document-open", KeyCode.KEY_O, KeyFlag.Control);
|
||||||
__gshared Action ACTION_FILE_SAVE = new Action(IDEActions.FileSave, "MENU_FILE_SAVE"c, "document-save", KeyCode.KEY_S, KeyFlag.Control);
|
const Action ACTION_FILE_SAVE = new Action(IDEActions.FileSave, "MENU_FILE_SAVE"c, "document-save", KeyCode.KEY_S, KeyFlag.Control);
|
||||||
__gshared Action ACTION_FILE_EXIT = new Action(IDEActions.FileExit, "MENU_FILE_EXIT"c, "document-close"c, KeyCode.KEY_X, KeyFlag.Alt);
|
const Action ACTION_FILE_EXIT = new Action(IDEActions.FileExit, "MENU_FILE_EXIT"c, "document-close"c, KeyCode.KEY_X, KeyFlag.Alt);
|
||||||
__gshared Action ACTION_DEBUG_START = new Action(IDEActions.DebugStart, "Start Debugging"d, "debug-run"c, KeyCode.F5, 0);
|
const Action ACTION_WORKSPACE_BUILD = new Action(IDEActions.BuildWorkspace, "MENU_BUILD_WORKSPACE_BUILD"c);
|
||||||
__gshared Action ACTION_EDIT_COPY = new Action(EditorActions.Copy, "Copy"d, "edit-copy"c, KeyCode.KEY_C, KeyFlag.Control);
|
const Action ACTION_WORKSPACE_REBUILD = new Action(IDEActions.RebuildWorkspace, "MENU_BUILD_WORKSPACE_REBUILD"c);
|
||||||
__gshared Action ACTION_EDIT_PASTE = new Action(EditorActions.Paste, "Paste"d, "edit-paste"c, KeyCode.KEY_V, KeyFlag.Control);
|
const Action ACTION_WORKSPACE_CLEAN = new Action(IDEActions.CleanWorkspace, "MENU_BUILD_WORKSPACE_CLEAN"c);
|
||||||
__gshared Action ACTION_EDIT_CUT = new Action(EditorActions.Cut, "Cut"d, "edit-cut"c, KeyCode.KEY_X, KeyFlag.Control);
|
const Action ACTION_PROJECT_BUILD = new Action(IDEActions.BuildProject, "MENU_BUILD_PROJECT_BUILD"c, null, KeyCode.F7, 0);
|
||||||
__gshared Action ACTION_EDIT_UNDO = new Action(EditorActions.Undo, "Undo"d, "edit-undo"c, KeyCode.KEY_Z, KeyFlag.Control);
|
const Action ACTION_PROJECT_REBUILD = new Action(IDEActions.RebuildProject, "MENU_BUILD_PROJECT_REBUILD"c, null, KeyCode.F7, KeyFlag.Control);
|
||||||
__gshared Action ACTION_EDIT_REDO = new Action(EditorActions.Redo, "Redo"d, "edit-redo"c, KeyCode.KEY_Z, KeyFlag.Control|KeyFlag.Shift);
|
const Action ACTION_PROJECT_CLEAN = new Action(IDEActions.CleanProject, "MENU_BUILD_PROJECT_CLEAN"c, null);
|
||||||
__gshared Action ACTION_HELP_ABOUT = new Action(IDEActions.HelpAbout, "MENU_HELP_ABOUT"c);
|
const Action ACTION_PROJECT_SET_STARTUP = new Action(IDEActions.SetStartupProject, "MENU_PROJECT_SET_AS_STARTUP"c, null);
|
||||||
|
const Action ACTION_PROJECT_SETTINGS = new Action(IDEActions.ProjectSettings, "MENU_PROJECT_SETTINGS"c, null);
|
||||||
|
const Action ACTION_DEBUG_START = new Action(IDEActions.DebugStart, "MENU_DEBUG_START_DEBUGGING"c, "debug-run"c, KeyCode.F5, 0);
|
||||||
|
const Action ACTION_DEBUG_START_NO_DEBUG = new Action(IDEActions.DebugStartNoDebug, "MENU_DEBUG_START_NO_DEBUGGING"c, null, KeyCode.F5, KeyFlag.Control);
|
||||||
|
const Action ACTION_DEBUG_CONTINUE = new Action(IDEActions.DebugContinue, "MENU_DEBUG_CONTINUE"c);
|
||||||
|
const Action ACTION_DEBUG_STOP = new Action(IDEActions.DebugStop, "MENU_DEBUG_STOP"c);
|
||||||
|
const Action ACTION_DEBUG_PAUSE = new Action(IDEActions.DebugPause, "MENU_DEBUG_PAUSE"c);
|
||||||
|
const Action ACTION_EDIT_COPY = new Action(EditorActions.Copy, "MENU_EDIT_COPY"c, "edit-copy"c, KeyCode.KEY_C, KeyFlag.Control);
|
||||||
|
const Action ACTION_EDIT_PASTE = new Action(EditorActions.Paste, "MENU_EDIT_PASTE"c, "edit-paste"c, KeyCode.KEY_V, KeyFlag.Control);
|
||||||
|
const Action ACTION_EDIT_CUT = new Action(EditorActions.Cut, "MENU_EDIT_CUT"c, "edit-cut"c, KeyCode.KEY_X, KeyFlag.Control);
|
||||||
|
const Action ACTION_EDIT_UNDO = new Action(EditorActions.Undo, "MENU_EDIT_UNDO"c, "edit-undo"c, KeyCode.KEY_Z, KeyFlag.Control);
|
||||||
|
const Action ACTION_EDIT_REDO = new Action(EditorActions.Redo, "MENU_EDIT_REDO"c, "edit-redo"c, KeyCode.KEY_Z, KeyFlag.Control|KeyFlag.Shift);
|
||||||
|
const Action ACTION_HELP_ABOUT = new Action(IDEActions.HelpAbout, "MENU_HELP_ABOUT"c);
|
||||||
|
|
|
@ -198,6 +198,18 @@ class IDEFrame : AppFrame {
|
||||||
editItem.add(ACTION_EDIT_COPY, ACTION_EDIT_PASTE, ACTION_EDIT_CUT, ACTION_EDIT_UNDO, ACTION_EDIT_REDO);
|
editItem.add(ACTION_EDIT_COPY, ACTION_EDIT_PASTE, ACTION_EDIT_CUT, ACTION_EDIT_UNDO, ACTION_EDIT_REDO);
|
||||||
|
|
||||||
editItem.add(new Action(20, "MENU_EDIT_PREFERENCES"));
|
editItem.add(new Action(20, "MENU_EDIT_PREFERENCES"));
|
||||||
|
|
||||||
|
MenuItem projectItem = new MenuItem(new Action(21, "MENU_PROJECT"));
|
||||||
|
projectItem.add(ACTION_PROJECT_SET_STARTUP, ACTION_PROJECT_SETTINGS);
|
||||||
|
|
||||||
|
MenuItem buildItem = new MenuItem(new Action(22, "MENU_BUILD"));
|
||||||
|
buildItem.add(ACTION_WORKSPACE_BUILD, ACTION_WORKSPACE_REBUILD, ACTION_WORKSPACE_CLEAN,
|
||||||
|
ACTION_PROJECT_BUILD, ACTION_PROJECT_REBUILD, ACTION_PROJECT_CLEAN);
|
||||||
|
|
||||||
|
MenuItem debugItem = new MenuItem(new Action(23, "MENU_DEBUG"));
|
||||||
|
debugItem.add(ACTION_DEBUG_START, ACTION_DEBUG_START_NO_DEBUG, ACTION_DEBUG_CONTINUE, ACTION_DEBUG_STOP, ACTION_DEBUG_PAUSE);
|
||||||
|
|
||||||
|
|
||||||
MenuItem windowItem = new MenuItem(new Action(3, "MENU_WINDOW"c));
|
MenuItem windowItem = new MenuItem(new Action(3, "MENU_WINDOW"c));
|
||||||
windowItem.add(new Action(30, "MENU_WINDOW_PREFERENCES"));
|
windowItem.add(new Action(30, "MENU_WINDOW_PREFERENCES"));
|
||||||
MenuItem helpItem = new MenuItem(new Action(4, "MENU_HELP"c));
|
MenuItem helpItem = new MenuItem(new Action(4, "MENU_HELP"c));
|
||||||
|
@ -205,6 +217,9 @@ class IDEFrame : AppFrame {
|
||||||
helpItem.add(ACTION_HELP_ABOUT);
|
helpItem.add(ACTION_HELP_ABOUT);
|
||||||
mainMenuItems.add(fileItem);
|
mainMenuItems.add(fileItem);
|
||||||
mainMenuItems.add(editItem);
|
mainMenuItems.add(editItem);
|
||||||
|
mainMenuItems.add(projectItem);
|
||||||
|
mainMenuItems.add(buildItem);
|
||||||
|
mainMenuItems.add(debugItem);
|
||||||
//mainMenuItems.add(viewItem);
|
//mainMenuItems.add(viewItem);
|
||||||
mainMenuItems.add(windowItem);
|
mainMenuItems.add(windowItem);
|
||||||
mainMenuItems.add(helpItem);
|
mainMenuItems.add(helpItem);
|
||||||
|
|
|
@ -12,6 +12,22 @@ MENU_EDIT_CUT=Cu&t
|
||||||
MENU_EDIT_UNDO=&Undo
|
MENU_EDIT_UNDO=&Undo
|
||||||
MENU_EDIT_REDO=&Redo
|
MENU_EDIT_REDO=&Redo
|
||||||
MENU_EDIT_PREFERENCES=&Preferences
|
MENU_EDIT_PREFERENCES=&Preferences
|
||||||
|
MENU_BUILD=&BUILD
|
||||||
|
MENU_BUILD_WORKSPACE_BUILD=Build Workspace
|
||||||
|
MENU_BUILD_WORKSPACE_REBUILD=Rebuild Workspace
|
||||||
|
MENU_BUILD_WORKSPACE_CLEAN=Clean Workspace
|
||||||
|
MENU_BUILD_PROJECT_BUILD=Build Project
|
||||||
|
MENU_BUILD_PROJECT_REBUILD=Rebuild Project
|
||||||
|
MENU_BUILD_PROJECT_CLEAN=Clean Project
|
||||||
|
MENU_PROJECT=&PROJECT
|
||||||
|
MENU_PROJECT_SET_AS_STARTUP=Set as Startup Project
|
||||||
|
MENU_PROJECT_SETTINGS=Project Settings
|
||||||
|
MENU_DEBUG=&DEBUG
|
||||||
|
MENU_DEBUG_START_DEBUGGING=Start Debugging
|
||||||
|
MENU_DEBUG_START_NO_DEBUGGING=Start Without Debugging
|
||||||
|
MENU_DEBUG_CONTINUE=Continue Debugging
|
||||||
|
MENU_DEBUG_STOP=Stop
|
||||||
|
MENU_DEBUG_PAUSE=Pause
|
||||||
MENU_VIEW=&VIEW
|
MENU_VIEW=&VIEW
|
||||||
MENU_VIEW_LANGUAGE=Interface &Language
|
MENU_VIEW_LANGUAGE=Interface &Language
|
||||||
MENU_VIEW_LANGUAGE_EN=English
|
MENU_VIEW_LANGUAGE_EN=English
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Computes average line length for standard input.
|
// Computes average line length for standard input.
|
||||||
|
|
Loading…
Reference in New Issue