Pango for single-line, width-constrained text
- From: Ney André de Mello Zunino <zunino inf ufsc br>
- To: gtkmm-list gnome org
- Subject: Pango for single-line, width-constrained text
- Date: Thu, 13 Jan 2005 14:06:41 -0300
Hello.
Even though I haven't been very successful in getting responses to my
queries lately, I decided to give it another try with a different
question. Please, if this is not the most appropriate forum, let me
know. I did try searching gmane for a Pango-related newsgroup, but found
none.
In the application I am working on, I draw nodes and edges of a graph
based on data from a knowledge base. I am using Pango layouts to define
and render labels on the nodes. At the moment, the Pango layout bleeds
out over the right edge of the node, when its contents are long. I have
learned from the documentation that Pango supports wrapping, but that is
not what I wish to have. Here is a brief outline of the constraints or
requirements of my idea:
* all the rectangular nodes have a fixed height, tall enough just to
hold one line of text plus a bit of padding;
* all the rectangular nodes must not exceed a given maximum width;
* each rectangular node's width should depend on the width of its
respective label, except when the label is larger than the
pre-established maximum node width;
- for such cases, the label text should be truncated;
- a feature such as tooltips will be employed to reveal the full
contents of long labels.
So, basically, what I want is to have fixes-width Pango layouts with no
wrapping. Any help or references to relevant documentation which might
assist me in implementing my plan?
Thank you,
--
Ney André de Mello Zunino
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]