void CMD_JumpPrev() { BSet main = GetBSet(PrimaryWindowID); JumpToLastValidView(main.window); NextActiveWindowID = main.window->id; } RegisterCommand(CMD_JumpPrev, "ctrl-tab", "Go to the previous open view in primary window"); void CMD_Prev() { BSet main = GetBSet(PrimaryWindowID); main.window->skip_checkpoint = true; JumpBack(main.window); NextActiveWindowID = main.window->id; } RegisterCommand(CMD_Prev, "alt-q | mousex1", "Go to previous position (either previous view that was open or caret position) in the primary window"); void CMD_Next() { BSet main = GetBSet(PrimaryWindowID); main.window->skip_checkpoint = true; JumpForward(main.window); NextActiveWindowID = main.window->id; } RegisterCommand(CMD_Next, "alt-shift-q | mousex2", "Go to next position, after backtracking, in the primary window"); void CMD_FocusLeftWindow() { NextActiveWindowID = SwitchWindow(DIR_LEFT)->id; } RegisterCommand(CMD_FocusLeftWindow, "alt-left", "Switch the window focus to the window on the left position of current one"); void CMD_FocusRightWindow() { NextActiveWindowID = SwitchWindow(DIR_RIGHT)->id; } RegisterCommand(CMD_FocusRightWindow, "alt-right", "Switch the window focus to the window on the right position of current one"); void CMD_FocusWindow1() { NextActiveWindowID = GetOverlappingWindow({0,0}, GetWindow(ActiveWindowID))->id; } RegisterCommand(CMD_FocusWindow1, "ctrl-1", "Select the left-most window"); void CMD_FocusWindow2() { Window *first = GetOverlappingWindow({0,0}, GetWindow(ActiveWindowID)); Vec2I p = GetSideOfWindow(first, DIR_RIGHT); NextActiveWindowID = GetOverlappingWindow(p, GetWindow(ActiveWindowID))->id; } RegisterCommand(CMD_FocusWindow2, "ctrl-2", "Select the window to the right of left-most window"); void CMD_FocusWindow3() { Window *first = GetOverlappingWindow({0,0}); if (first) { Window *second = GetOverlappingWindow(GetSideOfWindow(first, DIR_RIGHT)); if (second) { Window *third = GetOverlappingWindow(GetSideOfWindow(second, DIR_RIGHT)); if (third) { NextActiveWindowID = third->id; } } } } RegisterCommand(CMD_FocusWindow3, "ctrl-3", "Select the 3rd window, counting from left"); void CMD_FocusWindow4() { Window *first = GetOverlappingWindow({0,0}); if (first) { Window *second = GetOverlappingWindow(GetSideOfWindow(first, DIR_RIGHT)); if (second) { Window *third = GetOverlappingWindow(GetSideOfWindow(second, DIR_RIGHT)); if (third) { Window *fourth = GetOverlappingWindow(GetSideOfWindow(third, DIR_RIGHT)); if (fourth) NextActiveWindowID = fourth->id; } } } } RegisterCommand(CMD_FocusWindow4, "ctrl-4", "Select the 4th window, counting from left"); void CMD_NewWindow() { CreateWind(); } RegisterCommand(CMD_NewWindow, "ctrl-backslash", "Creates a new window"); void CMD_CloseWindow() { Close(PrimaryWindowID); } RegisterCommand(CMD_CloseWindow, "", "Close the last active primary window"); void CMD_GotoNextInList() { BSet main = GetBSet(PrimaryWindowID); GotoNextInList(main.window, 1); } RegisterCommand(CMD_GotoNextInList, "ctrl-e", "For example: when jumping from build panel to build error, a jump point is setup, user can click this button to go over to the next compiler error"); void CMD_GotoPrevInList() { BSet main = GetBSet(PrimaryWindowID); GotoNextInList(main.window, -1); } RegisterCommand(CMD_GotoPrevInList, "alt-e", "For example: when jumping from build panel to build error, a jump point is setup, user can click this button to go over to the previous compiler error");