Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::Gdk::Pixmap Class Reference

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

#include <inti/gdk/pixmap.h>

Inheritance diagram for Inti::Gdk::Pixmap:

Inti::Gdk::Drawable Inti::G::Object Inti::G::TypeInstance Inti::MemoryHandler Inti::ReferencedBase Inti::Gdk::Bitmap List of all members.

Public Member Functions

Constructors
Accessors
Methods

Static Public Member Functions

Protected Member Functions

Constructors

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).


Constructor & Destructor Documentation

Inti::Gdk::Pixmap::Pixmap GdkPixmap *  pixmap,
bool  reference = true
[explicit, protected]
 

Construct a new Pixmap from an existing GdkPixmap.

Parameters:
pixmap A pointer to a GdkPixmap.
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).

Inti::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.

Inti::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.

Inti::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.

Inti::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.

Inti::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.

Inti::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.

Inti::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.

Inti::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.


Member Function Documentation

void Inti::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.

Pointer<Pixmap> Inti::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.

Pointer<Pixmap> Inti::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.


The documentation for this class was generated from the following file: Main Page - Footer


Generated on Sun Sep 14 20:08:12 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002