Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gdk::Pixmap Class Reference

A GdkPixmap C++ wrapper class. More...

#include <xfc/gdk/pixmap.hh>

Inheritance diagram for Xfc::Gdk::Pixmap:

Xfc::Gdk::Drawable Xfc::G::Object Xfc::G::TypeInstance Xfc::Trackable Xfc::Gdk::Bitmap List of all members.

Public Member Functions

Accessors
Methods

Static Public Member Functions

Constructors
Accessors

Detailed Description

A GdkPixmap C++ wrapper class.

Pixmaps are offscreen drawables. They can be drawn upon with the standard drawing primitives, then copied to another drawable (such as a Gdk::Window) with draw(). The depth of a pixmap is the number of bits per pixels. Bitmaps are simply pixmaps with a depth of 1. (That is, they are monochrome bitmaps, each pixel can be either on or off).

Note: dynamically allocated objects must either be unreferenced or assigned to a smart pointer. Stack objects are automatically unreferenced when they go out of scope.


Constructor & Destructor Documentation

Xfc::Gdk::Pixmap::Pixmap ( GdkPixmap *  pixmap,
bool  owns_reference = true 
) [explicit, protected]

Construct a new Pixmap from an existing GdkPixmap.

Parameters:
pixmap A pointer to a GdkPixmap.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The pixmap can be a newly created GdkPixmap or an existing GdkPixmap. (see G::Object::Object).

Xfc::Gdk::Pixmap::Pixmap ( const Drawable drawable,
int  width,
int  height 
)

Construct a new pixmap with the given size, using window to determine the default values.

Parameters:
drawable The Drawable to use to get the depth.
width The width of the new pixmap in pixels.
height The height of the new pixmap in pixels.
The depth of the new pixmap will be equal to that of the window. Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( int  width,
int  height,
int  depth 
)

Create a new pixmap with the given size and depth.

Parameters:
width The width of the new pixmap in pixels.
height The height of the new pixmap in pixels.
depth The depth (number of bits per pixel) of the new pixmap.
Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( const Drawable drawable,
const char *  data,
int  width,
int  height,
const Color fg,
const Color bg 
)

Create a two colored pixmap from data in XBM format.

Parameters:
drawable The Drawable to use to get the depth.
data A pointer to the data.
width The width of the new pixmap in pixels.
height The height of the new pixmap in pixels.
fg The foreground color.
bg The background color.
Pixmap is created with a reference count of 1 the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( const char *  data,
int  width,
int  height,
int  depth,
const Color fg,
const Color bg 
)

Create a two colored pixmap from data in XBM format using the root window to determine the default values.

Parameters:
data A pointer to the data.
width The width of the new pixmap in pixels.
height The height of the new pixmap in pixels.
depth The depth (number of bits per pixel) of the new pixmap.
fg The foreground color.
bg The background color.
Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( const Drawable drawable,
const String filename,
Pointer< Bitmap > *  mask = 0,
const Color transparent_color = 0 
)

Create a pixmap from a XPM file.

Parameters:
drawable The Drawable whose colormap the pixmap will use.
filename The filename of a file containing XPM data.
mask A smart pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be null, in which case transparency will be ignored.
transparent_color The color to be used for the pixels that are transparent in the input file. Can be null, in which case a default color will be used.
Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( Colormap colormap,
const String filename,
Pointer< Bitmap > *  mask = 0,
const Color transparent_color = 0 
)

Create a pixmap from a XPM file using a particular colormap.

Parameters:
colormap The Colormap that the new pixmap will be use.
filename The filename of a file containing XPM data.
mask A smart pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be null, in which case transparency will be ignored.
transparent_color The color to be used for the pixels that are transparent in the input file. Can be null, in which case a default color will be used.
Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( const Drawable drawable,
const char *const *  data,
Pointer< Bitmap > *  mask = 0,
const Color transparent_color = 0 
)

Create a pixmap from data in XPM format.

Parameters:
drawable The Drawable whose colormap the pixmap will use.
data A pointer to a string containing the XPM data.
mask A smart pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be null, in which case transparency will be ignored.
transparent_color The color to be used for the pixels that are transparent in the input file. Can be null, in which case a default color will be used.
Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( Colormap colormap,
const char *const *  data,
Pointer< Bitmap > *  mask = 0,
const Color transparent_color = 0 
)

Create a pixmap from data in XPM format using a particular colormap.

Parameters:
colormap The Colormap that the new pixmap will be use.
data A pointer to a string containing the XPM data.
mask A smart pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be null, in which case transparency will be ignored.
transparent_color The color to be used for the pixels that are transparent in the input file. Can be null, in which case a default color will be used.
Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( GdkPixmap *  pixmap,
bool  owns_reference = true 
) [explicit, protected]

Construct a new Pixmap from an existing GdkPixmap.

Parameters:
pixmap A pointer to a GdkPixmap.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The pixmap can be a newly created GdkPixmap or an existing GdkPixmap. (see G::Object::Object).

Xfc::Gdk::Pixmap::Pixmap ( const Drawable drawable,
int  width,
int  height 
)

Construct a new pixmap with the given size, using window to determine the default values.

Parameters:
drawable The Drawable to use to get the depth.
width The width of the new pixmap in pixels.
height The height of the new pixmap in pixels.
The depth of the new pixmap will be equal to that of the window. Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( int  width,
int  height,
int  depth 
)

Create a new pixmap with the given size and depth.

Parameters:
width The width of the new pixmap in pixels.
height The height of the new pixmap in pixels.
depth The depth (number of bits per pixel) of the new pixmap.
Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( const Drawable drawable,
const char *  data,
int  width,
int  height,
const Color fg,
const Color bg 
)

Create a two colored pixmap from data in XBM format.

Parameters:
drawable The Drawable to use to get the depth.
data A pointer to the data.
width The width of the new pixmap in pixels.
height The height of the new pixmap in pixels.
fg The foreground color.
bg The background color.
Pixmap is created with a reference count of 1 the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( const char *  data,
int  width,
int  height,
int  depth,
const Color fg,
const Color bg 
)

Create a two colored pixmap from data in XBM format using the root window to determine the default values.

Parameters:
data A pointer to the data.
width The width of the new pixmap in pixels.
height The height of the new pixmap in pixels.
depth The depth (number of bits per pixel) of the new pixmap.
fg The foreground color.
bg The background color.
Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( const Drawable drawable,
const String filename,
Pointer< Bitmap > *  mask = 0,
const Color transparent_color = 0 
)

Create a pixmap from a XPM file.

Parameters:
drawable The Drawable whose colormap the pixmap will use.
filename The filename of a file containing XPM data.
mask A smart pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be null, in which case transparency will be ignored.
transparent_color The color to be used for the pixels that are transparent in the input file. Can be null, in which case a default color will be used.
Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( Colormap colormap,
const String filename,
Pointer< Bitmap > *  mask = 0,
const Color transparent_color = 0 
)

Create a pixmap from a XPM file using a particular colormap.

Parameters:
colormap The Colormap that the new pixmap will be use.
filename The filename of a file containing XPM data.
mask A smart pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be null, in which case transparency will be ignored.
transparent_color The color to be used for the pixels that are transparent in the input file. Can be null, in which case a default color will be used.
Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( const Drawable drawable,
const char *const *  data,
Pointer< Bitmap > *  mask = 0,
const Color transparent_color = 0 
)

Create a pixmap from data in XPM format.

Parameters:
drawable The Drawable whose colormap the pixmap will use.
data A pointer to a string containing the XPM data.
mask A smart pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be null, in which case transparency will be ignored.
transparent_color The color to be used for the pixels that are transparent in the input file. Can be null, in which case a default color will be used.
Pixmap is created with a reference count of 1 that the caller owns.

Xfc::Gdk::Pixmap::Pixmap ( Colormap colormap,
const char *const *  data,
Pointer< Bitmap > *  mask = 0,
const Color transparent_color = 0 
)

Create a pixmap from data in XPM format using a particular colormap.

Parameters:
colormap The Colormap that the new pixmap will be use.
data A pointer to a string containing the XPM data.
mask A smart pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be null, in which case transparency will be ignored.
transparent_color The color to be used for the pixels that are transparent in the input file. Can be null, in which case a default color will be used.
Pixmap is created with a reference count of 1 that the caller owns.


Member Function Documentation

static Pointer<Pixmap> Xfc::Gdk::Pixmap::create ( GdkNativeWindow  anid,
const Display display = 0 
) [static]

Wraps a native pixmap in a Gdk::Pixmap.

Parameters:
anid A native pixmap handle.
display The Display where anid is located, or null for the default display.
Returns:
A smart pointer to the newly-created Gdk::Pixmap wrapper for the native pixmap, or null if the pixmap has been destroyed.
In the X backend, a native pixmap handle is an Xlib XID. This method fail if the pixmap has been destroyed.

static Pointer<Pixmap> Xfc::Gdk::Pixmap::lookup ( GdkNativeWindow  anid,
const Display display = 0 
) [static]

Looks up the Gdk::Pixmap that wraps the given native pixmap handle.

Parameters:
anid A native pixmap handle.
display The Display associated with anid, or null for the default display.
Returns:
The Gdk::Pixmap wrapper for the native pixmap, or null if there is none.
In the X backend, a native pixmap handle is an Xlib XID.

void Xfc::Gdk::Pixmap::clear ( GC gc,
const Color color 
)

Clears a pixmap with the color specified.

Parameters:
gc A graphics context.
color The color to clear the pixmap with.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3