Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

Gtk::Style

Class Methods

Gtk::Style.new
Creates a new Gtk::Style.
Gtk::Style.draw_insertion_cursor
  • Returns: self: FIXME

Instance Methods

attached?
Returns whether the style is attached to a window.
  • Returns: true if the style is attached to a window.
copy
Returns a copy object.
  • Returns: a copy object
attach(window)
Attaches a style to a window; this process allocates the colors and creates the GC's for the style - it specializes it to a particular visual and colormap. The process may involve the creation of a new style if the style has already been attached to a window with a different style and colormap.
  • window: a Gdk::Window.
  • Returns: Either style, or a newly-created Gtk::Style. If the style is newly created, the style parameter will be dereferenced, and the new style will have a reference count belonging to the caller.
detach
Detaches the style from the window.
  • Returns: self
set_background(window, state_type)
Sets the background of window to the background color or pixmap specified by style for the given state.
apply_default_background(window, set_bg, state_type, area, x, y, width, height)
Apply default background. This method is for internal use.
  • window: a Gdk::Window
  • set_bg: true if background is enable.
  • state_type: a state (GtkStateType)
  • area: a Gdk::Rectangle to intersect to below x, y, width, height or nil.
  • x:
  • y:
  • width:
  • height:
  • Returns: self
lookup_icon_set(stock_id)
Returns iconset for stock_id.
render_icon(source, direction, state, size, widget, detail)
Renders the icon specified by source at the given size according to the given parameters and returns the result in a pixbuf.
  • source: the Gtk::IconSource specifying the icon to render
  • direction: a text direction
  • state: a state (GtkStateType)
  • size: the size(GtkIconSize) to render the icon at. A size of (Gtk::IconSize)-1 means render at the size of the source and don't scale.
  • widget: the Gtk::Widget
  • detail: a style detail(String)
  • Returns: a newly-created Gdk::Pixbuf containing the rendered icon
paint_arrow(window, state_type, shadow_type, area, widget, detail, arrow_type, fill, x, y, width, height)
paint_box(window, state_type, shadow_type, area, widget, detail, x, y, width, height)
paint_box_gap(window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width)
paint_check(window, state_type, shadow_type, area, widget, detail, x, y, width, height)
paint_diamond(window, state_type, shadow_type, area, widget, detail, x, y, width, height)
paint_extension(window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side)
paint_flat_box(window, state_type, shadow_type, area, widget, detail, x, y, width, height)
paint_focus(window, state_type, area, widget, detail, x, y, width, height)
paint_handle(window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation)
paint_hline(window, state_type, shadow_type, area, widget, detail, x1, x2, y)
Draws a horizontal line from (x1, y) to (x2, y) in window using the given style and state.
  • window: a Gdk::Window
  • state_type: a state type (GtkStateType)
  • area: a Gdk::Rectangle to which the output is clipped
  • widget: a Gtk::Widget
  • detail: a String or nil
  • x1 : the starting x coordinate
  • x2 : the ending x coordinate
  • y : the y coordinate
  • Returns: self
paint_option(window, state_type, shadow_type, area, widget, detail, x, y, width, height)
paint_polygon(window, state_type, shadow_type, area, widget, detail, points, fill)
paint_shadow(window, state_type, shadow_type, area, widget, detail, x, y, width, height)
paint_shadow_gap(window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width)
paint_slider(window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation)
paint_tab(window, state_type, shadow_type, area, widget, detail, x, y, width, height)
paint_vline(window, state_type, area, widget, detail, y1, y2, x)
Draws a vertical line from (x, y1) to (x, y1) in window using the given style and state.
  • window : a Gdk::Window
  • state_type: a state type (GtkStateType)
  • area: a Gdk::Rectangle to which the output is clipped
  • widget: a Gtk::Widget
  • detail: a String or nil
  • y1: the starting y coordinate
  • y2: the ending y coordinate
  • x: the x coordinate
  • Returns: self
paint_expander(window, state_type, area, widget, detail, x, y, expander_style)
paint_layout(window, state_type, use_text, area, widget, detail, x, y, layout)
paint_resize_grip(window, state_type, area, widget, detail, edge, x, y, width, height)
fg(state_type)
Gets the foreground color of the state.
set_fg(state_type, r, g, b)
Sets the foreground color of the state.
  • state_type: a GtkStateType
  • r: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • g: The green component of the color.
  • b: The blue component of the color.
  • Returns: self
bg(state_type)
Gets the background color of the state.
set_bg(state_type, r, g, b)
Sets the background color of the state.
  • state_type: a GtkStateType
  • r: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • g: The green component of the color.
  • b: The blue component of the color.
  • Returns: self
light(state_type)
Gets the light color of the state.
set_light(state_type, r, g, b)
Sets the light color of the state.
  • state_type: a GtkStateType
  • r: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • g: The green component of the color.
  • b: The blue component of the color.
  • Returns: self
dark(state_type)
Gets the dark color of the state.
set_dark(state_type, r, g, b)
Sets the dark color of the state.
  • state_type: a GtkStateType
  • r: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • g: The green component of the color.
  • b: The blue component of the color.
  • Returns: self
mid(state_type)
Gets the mid color of the state.
set_mid(state_type, r, g, b)
Sets the mid color of the state.
  • state_type: a GtkStateType
  • r: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • g: The green component of the color.
  • b: The blue component of the color.
  • Returns: self
text(state_type)
Gets the text color of the state.
set_text(state_type, r, g, b)
Sets the text color of the state.
  • state_type: a GtkStateType
  • r: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • g: The green component of the color.
  • b: The blue component of the color.
  • Returns: self
base(state_type)
Gets the base color of the state.
set_base(state_type, r, g, b)
Sets the base color of the state.
  • state_type: a GtkStateType
  • r: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • g: The green component of the color.
  • b: The blue component of the color.
  • Returns: self
text_aa(state_type)
Gets the text_aa(Halfway between text/base) color of the state.
set_text_aa(state_type, r, g, b)
Sets the text_aa color of the state.
  • state_type: a GtkStateType
  • r: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
  • g: The green component of the color.
  • b: The blue component of the color.
  • Returns: self
black
Gets the black color of this style.
set_black(r, g, b)
Sets the black color value of this style.
  • r: Red (0 - 65535)
  • g: Green (0 - 65535)
  • b: blue (0 - 65535)
  • Returns: self
white
Gets the white color of this style.
set_white(r, g, b)
Sets the white color value of this style.
  • r: Red (0 - 65535)
  • g: Green (0 - 65535)
  • b: blue (0 - 65535)
  • Returns: self
font_desc
Gets the font description.
font_desc=(font_desc)
Sets the font description.
set_font_desc(font_desc)
Same as Gtk::Style#font_desc=.
  • Returns: self
xthickness
Gets the xthickness.
  • Returns: xthickness
xthickness=(xthickness)
Sets the xthickness.
  • Returns: xthickness
set_xthickness(xthickness)
Sets the xthickness.
  • Returns: self
ythickness
Gets the ythickness.
  • Returns: ythickness
ythickness=(ythickness)
Sets the ythickness.
  • Returns: ythickness
set_ythickness(ythickness)
Sets the ythickness.
  • Returns: self
fg_gc(state_type)
Gets the Gdk::GC value of the foreground color.
set_fg_gc(state_type, gc)
Sets the Gdk::GC value of the foreground color.
bg_gc(state_type)
Gets the Gdk::GC value of the background color.
set_bg_gc(state_type, gc)
Sets the Gdk::GC value of the background color.
light_gc(state_type)
Gets the Gdk::GC value of the light color.
set_light_gc(state_type, gc)
Sets the Gdk::GC value of the light color.
dark_gc(state_type)
Gets the Gdk::GC value of the dark color.
set_dark_gc(state_type, gc)
Sets the Gdk::GC value of the dark color.
mid_gc(state_type)
Gets the Gdk::GC value of the mid color.
set_mid_gc(state_type, gc)
Sets the Gdk::GC value of the mid color.
text_gc(state_type)
Gets the Gdk::GC value of the text color.
set_text_gc(state_type, gc)
Sets the Gdk::GC value of the text color.
base_gc(state_type)
Gets the Gdk::GC value of the base color.
set_base_gc(state_type, gc)
Sets the Gdk::GC value of the base color.
text_aa_gc(state_type)
Gets the Gdk::GC value of the text_aa(Halfway between text/base) color.
set_text_aa_gc(state_type, gc)
Sets the Gdk::GC value of the text_aa color.
black_gc
Gets the Gdk::GC value of black color.
black_gc=(gc)
Sets the Gdk::GC value of black color.
set_black_gc(gc)
Same as Gtk::Style#black_gc=.
white_gc
Gets the Gdk::GC value of white color.
  • Returns: the Gdk::GC?
white_gc=(gc)
Sets the Gdk::GC value of white color.
set_white_gc(gc)
Same as Gtk::Style#white_gc=.
bg_pixmap(state_type)
Gets the background pixmap.
set_bg_pixmap(state_type, pixmap)
Sets the Gdk::GC value of the text_aa color.
clone
Copy the object.
  • Returns: a copied object.
dup
Copy the object.
  • Returns: a copied object.
lookup_color
  • Returns: self: FIXME