as requested, the two classes wmoo.Label and wmoo.Button, the method
wmoo.Application.addWidget. widgets can be retrieved as dictionary
entries of the application.
I've almost completely rewritten the program, cleaned up most stuff which
has become useless in the object oriented framework.
the strings are not any more centered, this has not yet been programmed in the library.
modified the buttons, made them again a bit smaller.
moved them around, too.
added callbacks for keypresses
j: next
k: previous
p: play
m: mute
q: stop
space: pause
the pause button blinks while the player is paused.
I've added the two methods addButton and setButtonPattern to the Application class.
the area in the background has to be paintable, not transparent, or the
button will not be displayed nor be sensitive.
patterns are taken from the application and are not stored with the button.
it might be a good idea to introduce an object hierarchy for widgets,
including Labels and Buttons, maybe also flashing buttons, but as far as the
application programmer (of things like the current examples) is concerned,
this is good enough, I'd say.
I've added the class pywmgeneral.Drawable, offering an interface to pixmaps.
this way a wmdocklib application can have more than one drawable: not only
the main window, but as many pixmaps as are necessary.
the first use of pywmgeneral.Drawable is to hold the graphical
representation of the labels in an application. Labels are also new to the
library and the intention is that they substitute the putString methods.
Application.addLabel() is used to create a new named label. the label takes
care of the specified area, or of the area necessary to show the specified
string.
Application.setLabelText() is used to specify a new text for a label. if
necessary, a new pixmap is created. the area taken care of by a label
cannot be modified.
during the update cycle, labels that span an area which is too small for
their text are scrolled a pixel at a time.
pywmradio.py uses this functionality.
livello della cache: blocco alto tre linee.
la barra di contacting/buffering si sposta più lentamente.
scelto un rosso meno scuro.
ancora sul livello della cache:
corretto errore nella espressione regolare (leggeva il carico cpu invece della cache).
aggiunto bordino a barra della cache.
uso dell'indicazione della configurazione per la dimensione della cache.
aggiunto metodo per mettere lo stream in pausa.
lettura del file di configurazione in utf-8.
pyradio, ma quella non è un'applicazione scritta con pywmdockapps)
modificato Application.update, ora ricalcola il livello di riempimento della
cache solo una volta ogni tre cicli (ogni 0.3 secondi), questo per abbassare
il carico di lavoro sulla cpu.
added new example application, on the way to the object oriented library.
the idea is to develop this program within one single source, but clearly
separating the general from the specific. so in this source I will have a
general 'Application' class which will contain no specific 'radio' code.
the radio code will make use of the general application class.
the program is not yet functional.