Project: Add multi-tab display and switching functions

For Students

  • Expected Code Percentage
    • Scheme Code >= 60%
    • C++ Code <= 40%
  • Selection Criteria
    1. One pull request to add C++ unit tests to the Mogan repo
    2. One pull request to add Scheme unit tests to the Mogan repo
    3. Make sure your can compile mogan
    4. Change one of the icons in this area so that we know you have a basic idea of how UI works.

Project Info

  • Name: Add multi-tab display and switching functions
  • Mentor: @Oyyko
  • Difficulty: Basic

Project Description

The multi-tab function is a feature possessed by many modern software. For example chrome and vscode. Our goal is to add multi-tab functionality to GNU TeXmacs/Mogan.

Like this:

There have been some attempts, but they have not solved all the problems. You can find some previous attempts by people to achieve this problem in mogan’s github repository. Your implementation should ensure that it can run in three environments: windows, macos, and linux. (You don’t have to own these three machines, other members of the community can help you test the operation in other environments)

Project Output Requirements

  • Implement multi-tab display and switching functions

  • Implement multi-line display for situations where there are many tab pages. Like this:

  • Implement using control/command+W to close the current tab instead of closing the entire program.

  • Add testing.

Project Technical Requirements

  • Scheme, Xmake, C++
  • Understand UI in Mogan

Project Repository

3 Likes

For users of macOS 13 or above, it’s important to note that the multi-tab functionalities in TeXmacs 2.1.1 or newer are already available. However, this feature is only accessible when specific options are enabled:

  • Ensure that the option Always is selected under Desktop & Dock → Prefer tabs when opening documents in the macOS System Settings.
  • Additionally, within TeXmacs, navigate to Edit → Preferences → General → Buffer Management and ensure that Documents in separate windows is selected.
1 Like

Do you think adding multiple tabs makes Mogan/TeXmacs ugly?

As I commented in the proposal:

For chrome-like tabs in Qt, we need to make a border-less window in Qt, see https://github.com/antonypro/QGoodWindow

If you add this to the project output requirements, this project should be marked as hard. And it would make Mogan/TeXmacs much more beautiful.

And hiding the menu like Firefox on Linux might be a good idea to reduce the height of the toolbar and menubar areas. It is related to this project and off-topic: https://github.com/XmacsLabs/mogan/issues/47
The ugly menubar exists on macOS for a long time, and we haven’t fixed the crash issue when setting it to native menubar on macOS. Just hiding it might be the solution.

I think it’s a good idea to use QGoodWindow. I can add this to the project output requirements.