[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-dev] Colored text...
From: |
Martin Bickel |
Subject: |
[paragui-dev] Colored text... |
Date: |
Sat, 11 Feb 2006 17:52:04 +0100 |
Hi,
there is still one feature missing in Paragui which I'd like to add,
but I'm not sure which way is the best: .
If I have a button or a menu entry with a text, I wan't to have one
letter in a different color than the others indicating the key that is
to be pressed for activating this widget.
I see two ways to add that to Paragui:
Way A: right into the heart
Implementing this directly in PG_Widget. It will accept two colors for
SetTextColor and at PG_Application a character can be registered for
separating the parts (like "e~x~it application"). PG_Widget then
renders the x with the second color. PG_ThemeWidget will be exteneded
to read the second color from themes.
Default would of course be character 0 which would have this feature
disabled.
Way B: keeping it out
A different approach would be to define a class PG_TextRenderer, of
which one instance will be registered at PG_Application. PG_Widget will
then use this intance to render its text. A basic one for single-color
text will be active by default.
An application can then register its more sophicated TextRenderers and
PG_Widget will subsequently use them.
Do you have any preferences? If this is considered a universally
usefull feature, I would go Way A.
Regards,
Martin
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-dev] Colored text...,
Martin Bickel <=