prompt-toolkit / prompt-toolkit/python-prompt-toolkit

FloatContainer and Floats with mouse positioning and resizing - a la TurboVision

Open
#2,038 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

I'd like to use a FloatContainer as a 'desktop' motif (MDI container), with the floats resizable and movable via the mouse. I'm going for the look and feel of character graphics applications from the DOS era.
Currently, enabling mouse support only allows one to focus a container, but not move it.

I think at least with existing features, it would be possible to at least have dynamic Window movement and resizing using arrow keys. The keybind callback would write to the top/left arguments to the focused Float somehow. A similar feature was available in TurboVision from a menu pick.

Here's an example of what I have so far in prompt toolkit.

Image

And here are some examples of the type of user interface I'm trying to emulate. The Windows in these applications are movable using the mouse and keyboard.

VB 1.0 for DOS
Image

Borland's TurboVision (C++) Demo Application
Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing FloatContainer, its mouse-support behavior, and the keybind callback described in the issue. Determine how focused floats receive positioning and resizing events. Done means floats in a FloatContainer can be moved and resized with the mouse and keyboard in a TurboVision-style desktop layout.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.