Re: Support for flexible labels under place constraints

On Tue, 2011-10-04 at 08:30 +0200, Markus Elfring wrote:
> > No, though I don't see why it would not be possible.
> I would like to describe my use case from another perspective.
> Now I am looking for a reusable widget which deals with requirements like the
> following.
> - Ideogram
>   It can be implemented as an icon (raster image/vector graphic) or as an
> Unicode character (with eventually a special font).
> - Text with varying length (abbreviation, short or full label)
> - The display should adapt to the available visual space like it is provided by
> a row/column header.
>   The more space will be reduced (to an useful minimum height/width) the widget
> should only attempt to display the label part which still fits. The user can
> choose if there is a personal preference for the ideogram in combination with
> the textual description.
> - Both data components should belong to a common translation unit.

I'm sure this can be done as a custom widget using pangomm or cairomm
(or librsvgmm) to do the drawing/text rendering, etc.  I've not done
anything like this myself but it doesn't sound difficult to do.  There
is a chapter in the online book on custom widgets that could help in
this aspect though possibly someone else might be able to offer you
something they've done that is similar to what you're asking about:

> Regards,
> Markus


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]