Gtk2::C...rerText(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

πŸ’– Gtk2::CellRendererText πŸ’–

okay bestie, gather round, because today we're talking about Gtk2::CellRendererText β€” the wrapper for GtkCellRendererText πŸŽ€ that lives in the User Contributed Perl Documentation. Yeah it's one of those pages, but lowkey it's iconic.


✨ NAME ✨

Gtk2::CellRendererText β€” it's a wrapper for GtkCellRendererText. that's it, that's the whole vibe πŸ¦‹


🌸 HIERARCHY 🌸

the family tree, and yes she comes from a long line of distinguished ancestors:

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::CellRenderer
               +----Gtk2::CellRendererText

look at that lineage. main character energy from the very top πŸ‘‘


πŸ’… METHODS πŸ’…

cellrenderer = Gtk2::CellRendererText->new

the classic. you make one, it exists, slay. periodt ✨

$renderer->set_fixed_height_from_font ($number_of_rows)

sets the fixed height from the font, using:

  • $number_of_rows (integer) β€” yeah it's an integer, don't overthink it πŸ“

πŸ¦‹ PROPERTIES πŸ¦‹

every single one, no skips, no cuts, fr fr. the format is type : default : flags and I am NOT trimming a single character of it πŸ’œ

  • 'align-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects the alignment mode
  • 'alignment' β€” Pango::Alignment : default "left" : readable / writable / private / static-nick / static-blurb β†’ How to align the lines
  • 'attributes' β€” Pango::AttrList : default undef : readable / writable / private / static-nick / static-blurb β†’ A list of style attributes to apply to the text of the renderer
  • 'background' β€” string : default undef : writable / private / static-nick / static-blurb β†’ Background color as a string
  • 'background-gdk' β€” Gtk2::Gdk::Color : default undef : readable / writable / private / static-nick / static-blurb β†’ Background color as a GdkColor
  • 'background-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects the background color
  • 'editable' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether the text can be modified by the user
  • 'editable-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects text editability
  • 'ellipsize' β€” Pango::EllipsizeMode : default "none" : readable / writable / private / static-nick / static-blurb β†’ The preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string
  • 'ellipsize-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects the ellipsize mode
  • 'family' β€” string : default undef : readable / writable / private / static-nick / static-blurb β†’ Name of the font family, e.g. Sans, Helvetica, Times, Monospace
  • 'family-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects the font family
  • 'font' β€” string : default undef : readable / writable / private / static-nick / static-blurb β†’ Font description as a string, e.g. "Sans Italic 12"
  • 'font-desc' β€” Pango::FontDescription : default undef : readable / writable / private / static-nick / static-blurb β†’ Font description as a PangoFontDescription struct
  • 'foreground' β€” string : default undef : writable / private / static-nick / static-blurb β†’ Foreground color as a string
  • 'foreground-gdk' β€” Gtk2::Gdk::Color : default undef : readable / writable / private / static-nick / static-blurb β†’ Foreground color as a GdkColor
  • 'foreground-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects the foreground color
  • 'language' β€” string : default undef : readable / writable / private / static-nick / static-blurb β†’ The language this text is in, as an ISO code. Pango can use this as a hint when rendering the text. If you don't understand this parameter, you probably don't need it
  • 'language-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects the language the text is rendered as
  • 'markup' β€” string : default undef : writable / private / static-nick / static-blurb β†’ Marked up text to render
  • 'rise' β€” integer : default 0 : readable / writable / private / static-nick / static-blurb β†’ Offset of text above the baseline (below the baseline if rise is negative)
  • 'rise-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects the rise
  • 'scale' β€” double : default 1 : readable / writable / private / static-nick / static-blurb β†’ Font scaling factor
  • 'scale-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag scales the font size by a factor
  • 'single-paragraph-mode' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether or not to keep all text in a single paragraph
  • 'size' β€” integer : default 0 : readable / writable / private / static-nick / static-blurb β†’ Font size
  • 'size-points' β€” double : default 0 : readable / writable / private / static-nick / static-blurb β†’ Font size in points
  • 'size-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects the font size
  • 'stretch' β€” Pango::Stretch : default "normal" : readable / writable / private / static-nick / static-blurb β†’ Font stretch
  • 'stretch-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects the font stretch
  • 'strikethrough' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether to strike through the text
  • 'strikethrough-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects strikethrough
  • 'style' β€” Pango::Style : default "normal" : readable / writable / private / static-nick / static-blurb β†’ Font style
  • 'style-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects the font style
  • 'text' β€” string : default undef : readable / writable / private / static-nick / static-blurb β†’ Text to render
  • 'underline' β€” Pango::Underline : default "none" : readable / writable / private / static-nick / static-blurb β†’ Style of underline for this text
  • 'underline-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects underlining
  • 'variant' β€” Pango::Variant : default "normal" : readable / writable / private / static-nick / static-blurb β†’ Font variant
  • 'variant-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects the font variant
  • 'weight' β€” integer : default 400 : readable / writable / private / static-nick / static-blurb β†’ Font weight
  • 'weight-set' β€” boolean : default false : readable / writable / private / static-nick / static-blurb β†’ Whether this tag affects the font weight
  • 'width-chars' β€” integer : default -1 : readable / writable / private / static-nick / static-blurb β†’ The desired width of the label, in characters
  • 'wrap-mode' β€” Pango::WrapMode : default "char" : readable / writable / private / static-nick / static-blurb β†’ How to break the string into multiple lines, if the cell renderer does not have enough room to display the entire string
  • 'wrap-width' β€” integer : default -1 : readable / writable / private / static-nick / static-blurb β†’ The width at which the text is wrapped
not me listing every single one πŸ’€ but like, they ALL matter, okay?? no cap.

πŸ”₯ SIGNALS πŸ”₯

  • edited (Gtk2::CellRendererText, string, string)

🌈 ENUMS AND FLAGS 🌈

enum Pango::Alignment

  • 'left' / 'PANGO_ALIGN_LEFT'
  • 'center' / 'PANGO_ALIGN_CENTER'
  • 'right' / 'PANGO_ALIGN_RIGHT'

enum Pango::EllipsizeMode

  • 'none' / 'PANGO_ELLIPSIZE_NONE'
  • 'start' / 'PANGO_ELLIPSIZE_START'
  • 'middle' / 'PANGO_ELLIPSIZE_MIDDLE'
  • 'end' / 'PANGO_ELLIPSIZE_END'

enum Pango::Stretch

  • 'ultra-condensed' / 'PANGO_STRETCH_ULTRA_CONDENSED'
  • 'extra-condensed' / 'PANGO_STRETCH_EXTRA_CONDENSED'
  • 'condensed' / 'PANGO_STRETCH_CONDENSED'
  • 'semi-condensed' / 'PANGO_STRETCH_SEMI_CONDENSED'
  • 'normal' / 'PANGO_STRETCH_NORMAL'
  • 'semi-expanded' / 'PANGO_STRETCH_SEMI_EXPANDED'
  • 'expanded' / 'PANGO_STRETCH_EXPANDED'
  • 'extra-expanded' / 'PANGO_STRETCH_EXTRA_EXPANDED'
  • 'ultra-expanded' / 'PANGO_STRETCH_ULTRA_EXPANDED'

enum Pango::Style

  • 'normal' / 'PANGO_STYLE_NORMAL'
  • 'oblique' / 'PANGO_STYLE_OBLIQUE'
  • 'italic' / 'PANGO_STYLE_ITALIC'

enum Pango::Underline

  • 'none' / 'PANGO_UNDERLINE_NONE'
  • 'single' / 'PANGO_UNDERLINE_SINGLE'
  • 'double' / 'PANGO_UNDERLINE_DOUBLE'
  • 'low' / 'PANGO_UNDERLINE_LOW'
  • 'error' / 'PANGO_UNDERLINE_ERROR'
  • 'single-line' / 'PANGO_UNDERLINE_SINGLE_LINE'
  • 'double-line' / 'PANGO_UNDERLINE_DOUBLE_LINE'
  • 'error-line' / 'PANGO_UNDERLINE_ERROR_LINE'

enum Pango::Variant

  • 'normal' / 'PANGO_VARIANT_NORMAL'
  • 'small-caps' / 'PANGO_VARIANT_SMALL_CAPS'
  • 'all-small-caps' / 'PANGO_VARIANT_ALL_SMALL_CAPS'
  • 'petite-caps' / 'PANGO_VARIANT_PETITE_CAPS'
  • 'all-petite-caps' / 'PANGO_VARIANT_ALL_PETITE_CAPS'
  • 'unicase' / 'PANGO_VARIANT_UNICASE'
  • 'title-caps' / 'PANGO_VARIANT_TITLE_CAPS'

enum Pango::WrapMode

  • 'word' / 'PANGO_WRAP_WORD'
  • 'char' / 'PANGO_WRAP_CHAR'
  • 'word-char' / 'PANGO_WRAP_WORD_CHAR'
  • 'none' / 'PANGO_WRAP_NONE'

🫢 SEE ALSO 🫢

go read these next, they're the whole friend group:

  • Gtk2
  • Glib::Object
  • Glib::InitiallyUnowned
  • Gtk2::Object
  • Gtk2::CellRenderer

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.


and that's the page, bestie πŸ’– this was Gtk2::C...rerText(3) from perl v5.42.0, dated 2025-07-25 β€” go forth and render some text, you absolute icon 🌟

πŸ“¦ where this page comes from