Class Index | Cross Index | Namespace Index |
A widget to display RGB or grayscale data.
Contained in: Gtk
Derived from:
Gtk::Widget
Derived by:
none
#include <gtk--/preview.h>
public function member index: |
||
explicit | Preview | (GtkPreviewType type); |
void | draw_row | (const guchar* data, gint x, gint y, gint w); |
static Gdk_Colormap | get_cmap | (); |
static GtkPreviewInfo* | get_info | (); |
static Gdk_Visual | get_visual | (); |
GtkPreview* | gtkobj | (); |
const GtkPreview* | gtkobj | () const; |
static bool | isA | (Object* object); |
void | put | (Gdk_Window& window, Gdk_GC& gc, gint srcx, gint srcy, gint destx, gint desty, gint width, gint height); |
static void | reset | (); |
static void | set_color_cube | (guint nred_shades, guint ngreen_shades, guint nblue_shades, guint ngray_shades); |
void | set_dither | (GdkRgbDither dither); |
void | set_expand | (bool expand); |
static void | set_gamma | (double gamma); |
static void | set_install_cmap | (bool install_cmap); |
static void | set_reserved | (gint nreserved); |
void | size | (gint width, gint height); |
static void | uninit | (); |
virtual | ~Preview | (); |
data: The new data for the portion. It should contain w bytes of data if the preview is of type GTK_TYPE_GRAYSCALE, and 3*w bytes of data if the preview is of type GTK_TYPE_COLOR.x: The starting value on the row to set.
y: The row to change.
w: The number of pixels in the row to change.
dither: The dithering mode. There are three values:GDK_RGB_DITHER_NONE: Never use dithering.
GDK_RGB_DITHER_NORMAL: Use dithering in 8 bits per pixel (and below) only.
GDK_RGB_DITHER_MAX: Use dithering in 16 bits per pixel and below.
If expand is FALSE, then the preview's window and buffer will be no larger than the size set with size, and the data set will be centered in the allocation if it is larger. If expand is TRUE then the window and buffer will expand with the allocation; the application is responsible for catching the "size_allocate" signal and providing the data appropriate for this size.expand: Whether the preview's window should expand or not.
will eventually be replaced with a function that sets a per-preview-widget gamma value). The resulting intensity is given by: destination_value * pow (source_value/255, 1/gamma). The gamma value is applied when the data is set with draw_row so changing this value will not affect existing data in preview widgets.gamma: The new gamma value.
signal. The drawing area may actually be allocated a size larger than this depending on how it is packed within the enclosing containers. The effect of this is determined by whether the preview is set to expand or not (see set_expand).width: The new width.
height: The new height.