ROX-CLib: gtksavebox.h File Reference

- Main Page
- Data Structures
- Files
- Related Pages

- File List
- Globals

# gtksavebox.h File Reference

Drag and drop saving widget for GTK+. More...

`#include <gdk/gdk.h>`
`#include <gtk/gtkdialog.h>`
`#include <gtk/gtkselection.h>`

## Data Structures
struct | _GtkSavebox
## Defines
#define | GTK_TARGET_XDS 0x584453
#define | GTK_TYPE_SAVEBOX (gtk_savebox_get_type ())
#define | GTK_SAVEBOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SAVEBOX, GtkSavebox))
#define | GTK_SAVEBOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SAVEBOX, GtkSaveboxClass))
#define | GTK_IS_SAVEBOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SAVEBOX))
#define | GTK_IS_SAVEBOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SAVEBOX))
## Enumerations
enum | { GTK_XDS_SAVED, GTK_XDS_SAVE_ERROR, GTK_XDS_NO_HANDLER }
## Functions
GType | gtk_savebox_get_type (void)
GtkWidget * | gtk_savebox_new (const gchar *action)
void | gtk_savebox_set_icon (GtkSavebox *savebox, GdkPixbuf *pixbuf)
void | gtk_savebox_set_pathname (GtkSavebox *savebox, const gchar *pathname)
void | gtk_savebox_set_has_discard (GtkSavebox *savebox, gboolean setting)
GtkWidget * | gtk_savebox_get_extension_area (GtkSavebox *savebox)

## Detailed Description

Drag and drop saving widget for GTK+.

Author:
  Thomas Leonard

Version:
  Id
    gtksavebox.h,v 1.4 2005/12/07 11:43:12 stephen Exp

## Define Documentation

#define GTK_IS_SAVEBOX | ( | obj |  | ) | (GTK_CHECK_TYPE ((obj), GTK_TYPE_SAVEBOX))

Check a pointer to GtkSavebox

Parameters:

  `[in]` | obj | pointer to object

Returns:
  non-zero if a pointer to a GtkSavebox

#define GTK_IS_SAVEBOX_CLASS | ( | klass |  | ) | (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SAVEBOX))

Check a pointer to a GtkSavebox class

Parameters:

  `[in]` | klass | pointer to object class

Returns:
  non-zero if a pointer to a GtkSavebox class

#define GTK_SAVEBOX | ( | obj |  | ) | (GTK_CHECK_CAST ((obj), GTK_TYPE_SAVEBOX, GtkSavebox))

Cast pointer into a pointer to GtkSavebox only if it is valid, otherwise return `NULL`

Parameters:

  `[in]` | obj | pointer to object

Returns:
  pointer to GtkSavebox or `NULL` for error

#define GTK_SAVEBOX_CLASS | ( | klass |  | ) | (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SAVEBOX, GtkSaveboxClass))

Cast pointer into a pointer to GtkSavebox class only if it is valid, otherwise return `NULL`

Parameters:

  `[in]` | klass | pointer to object class

Returns:
  pointer to GtkSavebox class or `NULL` for error

#define GTK_TARGET_XDS 0x584453

This is for the 'info' value of the GtkTargetList. It's for the XdndDirectSave0 target - ignore requests for this target because they're handled internally by the widget. Don't use this value for anything else!

#define GTK_TYPE_SAVEBOX (gtk_savebox_get_type ())

Returns:
  type code for GtkSavebox

## Enumeration Type Documentation

anonymous enum

Enumerator:

  GTK_XDS_SAVED | Done the save - no problem
  GTK_XDS_SAVE_ERROR | Error during save - reported
  GTK_XDS_NO_HANDLER | Used internally (sanity checking)

## Function Documentation

GtkWidget* gtk_savebox_get_extension_area | ( | GtkSavebox * | savebox | ) |

Return the extension area, a vbox just above the buttons where additional widgets may be placed.

Parameters:

  `[in,out]` | savebox | Save box widget

GType gtk_savebox_get_type | ( | void |  | ) |

Returns:
  type code for GtkSavebox

GtkWidget* gtk_savebox_new | ( | const gchar * | action | ) |

Create and return a new GtkSavebox widget.

Parameters:

  `[in]` | action | Label to use in the Save button

Returns:
  pointer to the widget

void gtk_savebox_set_has_discard | ( | GtkSavebox * | savebox,
|  | gboolean | setting |
| ) |  |  |

Set whether the discard area is show. Normally this is hidden but contains a single "Discard" button.

Parameters:

  `[in,out]` | savebox | Save box widget
  `[in]` | setting | non-zero to show discard area

void gtk_savebox_set_icon | ( | GtkSavebox * | savebox,
|  | GdkPixbuf * | pixbuf |
| ) |  |  |

Set the icon used for dragging the file.

Parameters:

  `[in,out]` | savebox | Save box widget
  `[in]` | pixbuf | image to use for icon

void gtk_savebox_set_pathname | ( | GtkSavebox * | savebox,
|  | const gchar * | pathname |
| ) |  |  |

Set the initial path to show in the widget.

Parameters:

  `[in,out]` | savebox | Save box widget
  `[in]` | pathname | path to use