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.
example pywmphoto rewritten.
modified initializer of pixmap: you can give the name of the pixmap
containing the background/patterns, so you do not need reading it in
advance.
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.
modified the fonts: they start from background colour (None or Black) and go
to full intensity, which ought to be gray100 or white.
the initialization procedure will spread all colour differences between the
requested background and foreground proportionally to the intensity of the
gray char pixel.
most colour code clashes are resolved at initialization stage. there are
only a few things you should not reuse, such as the space for transparency.
just try out the result and make use of the 'debug' parameter which will
cause the function to print the the generated xpm.
l'intenzione sarebbe di riservare i caratteri non alfanumerici ai colori dei font (invece che i soli [ $]).
invece i caratteri alfanumerici ai pattern utente.
magari me ne faccio bastare -diciamo- quattro, di caratteri non alfanumerici per i colori dei font...
tipo
c None (trasparente)
. c grey quasi background
" c grey intermedio
* c grey quasi foreground
$ c foreground
e anzi, a seconda del foreground e del background, potrei sfumare corrispondentemente...
I took one of the font definitions from a running wmCalClock and put it in
the 'background' pixelmask. this works quite good. the name of the
parameter is rather confusing, it's not a background actually but a
collection of templates... but that's an other problem.
removed the definition of defaultRGBFiles from the examples: it is now
hosted in the library.
removed function parseColors from examples. this is done during initPixmap.
added wmdocklib.defaultRGBFileList
removed wmdocklib.setColor (superseded by wmdocklib.initPixmap)
extended wmdocklib.initPixmap:
basic 16 colour palette [basic_colours] from rgb.txt (not hard coded)
alter_palette to (re)define an indexed colour in the xpm.
bg/fg can be a single character or a number [0..15]
' ' as transparent colour.
some debugging 'if 0:' code.
extended wmdocklib.getColorCode:
it reads either the given rgb file or the first accessible file from
defaultRGBFileList
corrected url in setup.py: it used to point to ibo!
this is an important modification. I hope it won't break too many programs
based on this library, or at least not in such a way that will make you
upset with me and my work...
well: the library offers now three charsets and a 16 colours palette.
but: you must use them.
there is no support yet for named colours.
the only working examples are pywmdatetime and pywmhdmon.