[Urwid] Showing a dialog on top of a custom widget

Florian Paul Schmidt mista.tapas at gmx.net
Wed Jan 1 15:59:32 EST 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

	I looked through the tutorials and reference documentation for a
while. I'm in early stages of implementing a tracker style midi
sequencer [1][2] (for jack midi, the c++ backend is somewhat complete,
the urwid UI not at all) and while I'm pretty sure about how to
continue for my main pattern view (I will have to handle all input
manually anyways) I'm still not quite sure on how to display an
overlay dialog without that leaking up into the widget hierarchy.

	Just as an example: Let's say the user wants to add a track. He
should then be prompted for the name. So ideally I'd like to "overlay"
a single line text edit over the last line (the menu) where the user
can then enter the name. The overlay widget doesn't seem right, since
the program logic to implement that would then leak down all the way
to the root of the widget hierarchy (in my case there's only one
widget for now ;D). Also it doesn't seem to like the top_w to be None..

So surely I must have overlooked something.

[1] https://github.com/fps/teqqer/teqqer.py
[2] http://i.imgur.com/LzAytf7.jpg

Thanks for your input,
Flo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSxIGuAAoJEA5f4Coltk8Z8EUH/ifWPKlqZmXq7UK/euZV9NXB
QPAeBTWr8f8eY37B0akcFGfy9fio0dxqvXHiCp9OIqBZyuNSzEIFxPE2JSeQRoJi
9/tfC0d5+f2MLNY44n2CyOJRvHA7t+Es36KGEoI7RfN6nYG6eG0egPknXvDiT9D9
WHKYNOJPLPIHbBYB4L45HG8OQ8MqSl4TB/An0RQZ9yJ3p28fdIQnlrpx6TuLS7fB
rxWSomLe1BPlC/JiKkNGYbbqXa0z7wiwDgIMMdG8LzFGQK/Br8TVUuTnQKOH9Hkh
8YExHrTjbvlgB2Bt/wR6hrZy1F0+eLZAByIJIiBLGzzZ5YLqvdT4t5pntFd8fdU=
=aJ7W
-----END PGP SIGNATURE-----



More information about the Urwid mailing list