Re: States in GailLabel
- From: Bill Haneman <bill haneman sun com>
- To: Brian Cameron <Brian Cameron sun com>, gnome-accessibility-list gnome org
- Subject: Re: States in GailLabel
- Date: Wed, 25 Jul 2001 15:07:18 +0100
Brian Cameron wrote:
>
> GtkLabel's support single-line and multi-line labels. There is no
> direct gtk_label_function to tell if a label is single-line or
> multi-line, but you can tell with a little bit of digging through
> the GtkLabel's pango structures.
>
> Here is the definitions of ATK_STATE_MULTI_LINE and
> ATK_STATE_SINGLE_LINE:
>
> ATK_STATE_MULTI_LINE:
> Indicates this (text) object can contain multiple lines of text
> ATK_STATE_SINGLE_LINE:
> Indicates this (text) object can contain only a single line of text
>
> Since labels are read-only, they do not typically change. They can
> change programmatically, and they could change between a single-line
> label and a multi-line label, though this is probably not very common.
>
> Currently GailLabel just blindly says it is ATK_STATE_MULTI_LINE since
> GtkLabel "can contain multiple lines of text".
>
> However, should it be more dynamic and actually check to see if it
> is single-line or multi-line, and set its value appropriately.
> If this is so, then it will need to possibly update its state value
> each time it generates a "text-changed" signal.
>
> Is there a use-case where knowing if a label has state SINGLE_LINE
> or MULTI_LINE is actually useful?
I would expect that a 'get_text' on a multiline label would (unlike
some situations) might contain newline characters from which one could
determine this trivially. If labels do auto-wordwrap then this might
not be the case, but if multiline labels require explicit newlines on
creation then this simple method might suffice.
> Brian
>
> _______________________________________________
> gnome-accessibility-list mailing list
> gnome-accessibility-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-accessibility-list
--
--------------
Bill Haneman
Gnome Accessibility / Batik SVG Toolkit
Sun Microsystems Ireland
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]