GtkStyle::bg_pixmap

GtkStyle::bg_pixmap

Access: Read Write
Type: Array

Returns an array of 5 pixmaps, one for each state a widget can reach. You can set it the following way:

$bookicon = array("16 16 6 1",
"       c None s None",".      c black","X      c red","o      c yellow","O      c #808080",
"#      c white","                ","       ..       ","     ..XX.      ","   ..XXXXX.     ",
" ..XXXXXXXX.    ",".ooXXXXXXXXX.   ","..ooXXXXXXXXX.  ",".X.ooXXXXXXXXX. ",".XX.ooXXXXXX..  ",
" .XX.ooXXX..#O  ","  .XX.oo..##OO. ","   .XX..##OO..  ","    .X.#OO..    ","     ..O..      ",
"      ..        ","                ");
$transparent = &new GdkColor(0, 0, 0);
list( $pixmap, $mask) = Gdk::pixmap_create_from_xpm_d($window->window, $transparent, $bookicon);

$style	= &new GtkStyle;
$style->bg_pixmap[GTK_STATE_NORMAL]	= $pixmap;

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.