Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gdk::GCValues Class Reference

A GdkGCValues C++ wrapper class. More...

`#include <gc.h>`

List of all members.

## Public Member Functions

Constructors

- GCValues ()
    Construct a new GCValues object.
- GCValues (const GCValues &src)
    Copy constructor.
- ~GCValues ()
    Destructor.
- GCValues & operator= (const GCValues &src)
    Assignemnt operator.

Accessors

- GdkGCValues * gdk_gc_values () const
    Get a pointer to the GdkGCValues structure.
- GdkGCValuesMask gdk_gc_values_mask () const
    Returns the bit flags that indicate which values are currently set.
- Color foreground () const
    Returns the foreground color.
- bool foreground_set () const
    Returns true if the foreground value is set.
- Color background () const
    Returns the background color.
- bool background_set () const
    Returns true if the background value is set.
- Function function () const
    Returns the bitwise operation used when drawing.
- bool function_set () const
    Returns true if the function value is set.
- Fill fill () const
    Returns the fill style.
- bool fill_set () const
    Returns true if the fill value is set.
- Pixmap * tile () const
    Returns the tile pixmap.
- bool tile_set () const
    Returns true if the tile pixmap is set.
- Bitmap * stipple () const
    Returns the stipple bitmap.
- bool stipple_set () const
    Returns true if the stipple bitmap is set.
- Bitmap * clip_mask () const
    Returns the clip mask bitmap.
- bool clip_mask_set () const
    Returns true if the clip_mask bitmap is set.
- SubwindowMode subwindow_mode () const
    Returns the subwindow mode.
- bool subwindow_mode_set () const
    Returns true if the subwindow_mode value is set.
- int ts_x_origin () const
    Returns the x origin of the tile or stipple.
- bool ts_x_origin_set () const
    Returns true if the ts_x_origin value is set.
- int ts_y_origin () const
    Returns the y origin of the tile or stipple.
- bool ts_y_origin_set () const
    Returns true if the ts_y_origin value is set.
- int clip_x_origin () const
    Returns the x origin of the clip mask.
- bool clip_x_origin_set () const
    Returns true if the clip_x_origin value is set.
- int clip_y_origin () const
    Returns the y origin of the clip mask.
- bool clip_y_origin_set () const
    Returns true if the clip_y_origin value is set.
- bool graphics_exposures () const
    Returns true graphics exposures are enabled.
- bool graphics_exposures_set () const
    Returns true if the graphics_exposures value is set.
- int line_width () const
    Returns the line width.
- bool line_width_set () const
    Returns true if the line_width value is set.
- LineStyle line_style () const
    Returns the way dashed lines are drawn.
- bool line_style_set () const
    Returns true if the line_style value is set.
- CapStyle cap_style () const
    Returns the way the ends of lines are drawn.
- bool cap_style_set () const
    Returns true if the cap_style value is set.
- JoinStyle join_style () const
    Returns the way joins between lines are drawn.
- bool join_style_set () const
    Returns true if the join_style value is set.

Methods

- void reset ()
    Resets the object, freeing any pixmaps and setting the bit flag mask to zero.
- void set_foreground (const Color &color)
    Sets the foreground color for a graphics context.
- void unset_foreground ()
    Unsets the foreground bit flag.
- void set_background (const Color &color)
    Sets the background color for a graphics context.
- void unset_background ()
    Unsets the background bit flag.
- void set_function (Function function)
    Determines how the current pixel values and the pixel values being drawn are combined to produce the final pixel values.
- void unset_function ()
    Unsets the function bit flag.
- void set_fill (Fill fill)
    Set the fill mode for a graphics context.
- void unset_fill ()
    Unsets the fill bit flag.
- void set_tile (Pixmap &tile)
    Set a tile pixmap for a graphics context.
- void unset_tile ()
    Unsets the tile bit flag.
- void set_stipple (Bitmap &stipple)
    Set the stipple bitmap for a graphics context.
- void unset_stipple ()
    Unsets the stipple bit flag.
- void set_clip_mask (Bitmap &mask)
    Sets the clip mask for a graphics context from a bitmap.
- void unset_clip_mask ()
    Unsets the clip_mask bit flag.
- void set_subwindow_mode (SubwindowMode mode)
    Sets how drawing with this graphics context on a window will affect child windows of that window.
- void unset_subwindow_mode ()
    Unsets the subwindow_mode bit flag.
- void set_ts_origin (int x, int y)
    Set the origin when using tiles or stipples with the graphics context.
- void set_ts_x_origin (int x)
    Set the x coordinate of the origin when using tiles or stipples with the graphics context.
- void unset_ts_x_origin ()
    Unsets the ts_x_origin bit flag.
- void set_ts_y_origin (int y)
    Set the y coordinate of the origin when using tiles or stipples with the graphics context.
- void unset_ts_y_origin ()
    Unsets the ts_y_origin bit flag.
- void set_clip_origin (int x, int y)
    Sets the origin of the clip mask.
- void set_clip_x_origin (int x)
    Sets the x coordinate of the origin of the clip mask.
- void unset_clip_x_origin ()
    Unsets the clip_x_origin bit flag.
- void set_clip_y_origin (int y)
    Sets the y coordinate of the origin of the clip mask.
- void unset_clip_y_origin ()
    Unsets the clip_y_origin bit flag.
- void set_graphics_exposures (bool exposures)
    Sets whether copying non-visible portions of a drawable using a graphics context generates exposure events for the corresponding regions of the destination drawable (see Gdk::Drawable::draw_drawable()).
- void unset_graphics_exposures ()
    Unsets the graphics_exposures bit flag.
- void set_line_width (int width)
    Sets the line width.
- void unset_line_width ()
    Unsets the line_width bit flag.
- void set_line_style (LineStyle style)
    Sets the way dashed lines are drawn.
- void unset_line_style ()
    Unsets the line_style bit flag.
- void set_cap_style (CapStyle style)
    Sets the way the ends of lines are drawn.
- void unset_cap_style ()
    Unsets the cap_style bit flag.
- void set_join_style (JoinStyle style)
    Sets the way joins between lines are drawn.
- void unset_join_style ()
    Unsets the join_style bit flag.

## Detailed Description

A GdkGCValues C++ wrapper class.

A graphics context is created with a set of default values. Any of these values can be set individually by calling one of the Gdk::GC methods, such as Gdk::GC::set_foreground or Gdk::GC::set_fill().

The GCValues object allows you to set multiple values at once when constructing or modifying a graphics context. GCValues manages the GdkGCValuesMask bit flags internally, so you don't have to worry. Just set the values you want and then pass your GCValues object to the Gdk::GC constructor, or the Gdk::GC::set_values method if your modifying the graphics context later. You can retreive the currently set values for a Gdk::GC by passing a GCValues object to Gdk::GC::get_values(). If you want to reuse the same GCValues object you can unset individual values by calling the corresponding unset_() method, or you reset the entire object to its intial state by calling reset(). This will free any set pixmaps and reset the bit flags to zero.

## Constructor & Destructor Documentation

Inti::Gdk::GCValues::GCValues | ( | const GCValues & | src | ) |

Copy constructor.

Parameters:

  src | The source GCValues.

## Member Function Documentation

GCValues& Inti::Gdk::GCValues::operator= | ( | const GCValues & | src | ) |

Assignemnt operator.

Parameters:

  src | The source GCValues.

void Inti::Gdk::GCValues::set_background | ( | const Color & | color | ) |

Sets the background color for a graphics context.

Parameters:

  color | The new background color.

void Inti::Gdk::GCValues::set_cap_style | ( | CapStyle | style | ) |

Sets the way the ends of lines are drawn.

Parameters:

  style | The manner in which the ends of lines are drawn.

void Inti::Gdk::GCValues::set_clip_mask | ( | Bitmap & | mask | ) |

Sets the clip mask for a graphics context from a bitmap.

Parameters:

  mask | A bitmap.

The clip mask is interpreted relative to the clip origin (see Gdk::GC::set_clip_origin()).

void Inti::Gdk::GCValues::set_clip_origin | ( | int | x,
|  | int | y
| ) |

Sets the origin of the clip mask.

Parameters:

  x | The X coordinate of the origin.
  y | The Y coordinate of the origin.

The coordinates are interpreted relative to the upper-left corner of the destination drawable of the current operation.

void Inti::Gdk::GCValues::set_clip_x_origin | ( | int | x | ) |

Sets the x coordinate of the origin of the clip mask.

Parameters:

  x | The X coordinate of the origin.

The x coordinate is interpreted relative to the upper-left corner of the destination drawable of the current operation.

void Inti::Gdk::GCValues::set_clip_y_origin | ( | int | y | ) |

Sets the y coordinate of the origin of the clip mask.

Parameters:

  y | The Y coordinate of the origin.

The y coordinate is interpreted relative to the upper-left corner of the destination drawable of the current operation.

void Inti::Gdk::GCValues::set_fill | ( | Fill | fill | ) |

Set the fill mode for a graphics context.

Parameters:

  fill | The new fill mode.

void Inti::Gdk::GCValues::set_foreground | ( | const Color & | color | ) |

Sets the foreground color for a graphics context.

Parameters:

  color | The new foreground color.

void Inti::Gdk::GCValues::set_function | ( | Function | function | ) |

Determines how the current pixel values and the pixel values being drawn are combined to produce the final pixel values.

Parameters:

  function | The bitwise operation to use when drawing.

void Inti::Gdk::GCValues::set_graphics_exposures | ( | bool | exposures | ) |

Sets whether copying non-visible portions of a drawable using a graphics context generates exposure events for the corresponding regions of the destination drawable (see Gdk::Drawable::draw_drawable()).

Parameters:

  exposures | If true, exposure events will be generated.

void Inti::Gdk::GCValues::set_join_style | ( | JoinStyle | style | ) |

Sets the way joins between lines are drawn.

Parameters:

  style | The manner in which lines are joined together.

void Inti::Gdk::GCValues::set_line_style | ( | LineStyle | style | ) |

Sets the way dashed lines are drawn.

Parameters:

  style | The dash-style for lines.

void Inti::Gdk::GCValues::set_line_width | ( | int | width | ) |

Sets the line width.

Parameters:

  width | The width of lines.

void Inti::Gdk::GCValues::set_stipple | ( | Bitmap & | stipple | ) |

Set the stipple bitmap for a graphics context.

Parameters:

  stipple | The new stipple bitmap.

The stipple will only be used if the fill mode is Gdk::STIPPLED or Gdk::OPAQUE_STIPPLED.

void Inti::Gdk::GCValues::set_subwindow_mode | ( | SubwindowMode | mode | ) |

Sets how drawing with this graphics context on a window will affect child windows of that window.

Parameters:

  mode | The subwindow mode.

void Inti::Gdk::GCValues::set_tile | ( | Pixmap & | tile | ) |

Set a tile pixmap for a graphics context.

Parameters:

  tile | The new tile pixmap.

This will only be used if the fill mode is Gdk::TILED.

void Inti::Gdk::GCValues::set_ts_origin | ( | int | x,
|  | int | y
| ) |

Set the origin when using tiles or stipples with the graphics context.

Parameters:

  x | The X coordinate of the origin.
  y | The Y coordinate of the origin.

The tile or stipple will be aligned such that the upper left corner of the tile or stipple will coincide with this point.

void Inti::Gdk::GCValues::set_ts_x_origin | ( | int | x | ) |

Set the x coordinate of the origin when using tiles or stipples with the graphics context.

Parameters:

  x | The X coordinate of the origin.

The tile or stipple will be aligned such that the upper left corner of the tile or stipple will coincide with this x coordinate.

void Inti::Gdk::GCValues::set_ts_y_origin | ( | int | y | ) |

Set the y coordinate of the origin when using tiles or stipples with the graphics context.

Parameters:

  y | The Y coordinate of the origin.

The tile or stipple will be aligned such that the upper left corner of the tile or stipple will coincide with this y coordinate.

The documentation for this class was generated from the following file:

- gdk/gc.h

Main Page - Footer