gtk::rc_get_style
    
     Returns the GtkStyle that will be applied to
     widget.
    
    
     gtk::rc_get_style()  finds all rc styles that will be
     applied to widget and combines them into one
     GtkStyle widget representing the final appearance
     of the widget.
    
    
     
Example 61. Getting the rc style for a widget
<?php
// Create a backgound style to apply to buttons only.
$style = 'style "button" { bg[NORMAL] = "#ff6060" }';
gtk::rc_parse_string($style);
// Create a foreground style that applies to the entire application.
$style = 'style "window" { fg[NORMAL] = "#ffffff" }';
gtk::rc_parse_string($style);
// Create a window and add a button.
$window =& new GtkWindow();
$button =& new GtkButton('Example');
$window->add($button);
// Get the rc style
$rcStyle = gtk::rc_get_style($button);
// Output the style properties.
echo $rcStyle->fg . "\n";  // Will print #ffffff
echo $rcStyle->bg . "\n";  // Will print #ff6060
?>
 |