Reference Manual

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

# Inti::Gtk::TargetEntry Class Reference

A GtkTargetEntry C++ wrapper class. More...

`#include <inti/gtk/selection.h>`

List of all members.

## Public Member Functions

Constructors

- TargetEntry ()
    Contruct an empty TargetEntry.
- TargetEntry (const char *target_name, unsigned int unique_id, Gtk::TargetFlagsField drag_flags=0)
    Contruct a TargetEntry with the specified values.

Accessors

- GtkTargetEntry * gtk_target_entry () const
    Get a pointer to the GtkTargetEntry structure.
- const char * target () const
    Returns the string containing the name of the target. The string is owned by the TargetEntry.
- unsigned int flags () const
    Only used in drag-and-drop to indicate a drag-and-drop within the same application or the same widget.
- unsigned int info () const
    An application specific integer that will be passed back through signals later on.

Methods

- void set (const char *target_name, unsigned int unique_id, Gtk::TargetFlagsField drag_flags=0)
    Sets the TargetEntry values.

## Detailed Description

A GtkTargetEntry C++ wrapper class.

The selection mechanism provides the basis for different types of communication between processes. In particular, drag-and-drop and Clipboard work via selections. You will very seldom or never need to use most of the functions in this section directly; Clipboard provides a nicer interface to the same functionality. Some of the datatypes defined this section are used in the Clipboard and drag-and-drop API's as well.

The TargetEntry structure represents an entry in a TargetList of data types that are supported when sending or receiving data.

## Constructor & Destructor Documentation

Inti::Gtk::TargetEntry::TargetEntry | ( | const char * | target_name,
|  | unsigned int | unique_id,
|  | Gtk::TargetFlagsField | drag_flags = 0
| ) |

Contruct a TargetEntry with the specified values.

Parameters:

  target_name | The name of the target.
  unique_id | A unique application-specific integer.
  drag_flags | Either TARGET_SAME_APP or TARGET_SAME_WIDGET.

The drag_flags field is used to restrict the validity of the corresponding target to the same applcaiton of the same widget.

## Member Function Documentation

unsigned int Inti::Gtk::TargetEntry::flags | ( |  | ) | const

Only used in drag-and-drop to indicate a drag-and-drop within the same application or the same widget.

Returns:
  The flags value, either TARGET_SAME_APP or TARGET_SAME_WIDGET.

unsigned int Inti::Gtk::TargetEntry::info | ( |  | ) | const

| An application specific integer that will be passed back through signals later on. This allows additional information to be attached to the target.

void Inti::Gtk::TargetEntry::set | ( | const char * | target_name,
|  | unsigned int | unique_id,
|  | Gtk::TargetFlagsField | drag_flags = 0
| ) |

Sets the TargetEntry values.

Parameters:

  target_name | The name of the target.
  unique_id | A unique application-specific integer.
  drag_flags | Either TARGET_SAME_APP or TARGET_SAME_WIDGET.

The drag_flags field is used to restrict the validity of the corresponding target to the same application of the same widget.

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

- gtk/selection.h

Main Page - Footer