Welcome to awesome bug tracking system.

FS#775 - separation of concerns in widget library

Attached to Project: awesome
Opened by Matthias-Christian (ott) - Tuesday, 01 June 2010, 22:13 GMT
Task Type Feature Request
Category Widgets
Status Unconfirmed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version git/master
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


At the moment there is only rough support for determining the style and layout of widgets, because the drawing, input/event and data logic are combined. I want text-only widgets (like dwm has) without any images and with a custom layout. This is not possible without writing an new widget (e.g. you can't turn off the floating image in the tag list). I suggest to split the widgets into input/event handling, drawing and data tables similar to the MVC design pattern.
This task depends upon

Comment by Uli Schlachter (psychon) - Wednesday, 02 June 2010, 19:22 GMT
Uhm, what?

If you want to place widgets yourself, you can write your own widget layout function. The layout key in the widgets table is just a function which is called to calculate the position of the widgets.
About the rest: Dunno, no idea how one could best do that.
Comment by Matthias-Christian (ott) - Wednesday, 02 June 2010, 19:44 GMT
Maybe it helps if I explain it in German (I guess from your name that you know German):

Zur Zeit werden die Daten, die Eingaben und die Darstellung von einer Klasse behandelt. Das heißt, wenn man beispielsweise die Darstellung eines Widgets verändern möchte, muss man, da die Zeichenmethode lokal ist, das Widget praktisch neu schreiben. Viel besser wäre es jedoch, wenn die Daten, die Eingabeverarbeitung und die Darstellung getrennt und mit einem gut durchdachtem API versehen wären und man dann die jeweiligen Klassen einfach austauschen oder überschreiben könnte. Dafür würde sich das MVC Entwurfsmuster (oder ein ähnliches Entwurfsmuster) anbieten.

Wäre das möglich und gewünscht?
Comment by Gregor Best (farhaven) - Wednesday, 02 June 2010, 19:53 GMT
Sounds like the stuff we do in obvious... we have a widget system that allows creating widgets from data sources. The source provides the data and the widget then decides what it does with that data. Edit: it's mostly Uli's work, so you might want to ask him for the specifics.
Comment by anrxc (anrxc) - Wednesday, 02 June 2010, 20:46 GMT
But this is common knowledge why a bug report? Perhaps he is talking about builting widgets: elements of taglist, elements of tasklist, titlebar buttons.