Reference Manual

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

# Inti::Gtk::TargetList Class Reference

A GtkTargetList C++ wrapper class. More...

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

Inheritance diagram for Inti::Gtk::TargetList:

List of all members.

## Public Member Functions

Constructors

- TargetList ()
    Construct an empty target list.
- TargetList (const std::vector< TargetEntry > &targets)
    Construct a target list that contains the target entries in targets.
- TargetList (GtkTargetList *target_list)
    Construct a target list from an exisiting GtkTargetList.
- TargetList (const TargetList &src)
    Copy constructor.
- virtual ~TargetList ()
    Destructor.
- TargetList & operator= (const TargetList &src)
    Assignment operator.

Accessors

- GtkTargetList * gtk_target_list () const
    Get a pointer to the GtkTargetList structure.
- operator GtkTargetList * () const
    Conversion operator; safely converts a TargetList to a GtkTargetList pointer.

Methods

- void add (Gdk::Atom target, unsigned int flags, unsigned int info)
    Adds a target to the TargetList.
- void add (const TargetEntry &entry)
    Adds a TargetEntry to the target list.
- void add (const std::vector< TargetEntry > &targets)
    Adds a vector of TargetEntry to the target list.
- void remove (Gdk::Atom target)
    Removes a target from a target list.
- bool find (Gdk::Atom target, unsigned int *info)
    Looks up a given target in the target list.

## Detailed Description

A GtkTargetList 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 TargetList structure represents a list of data types that are supported when sending or receiving data. TargetList is only useful when you want to manually initiate drag and drop to have dynamic control.

## Constructor & Destructor Documentation

Inti::Gtk::TargetList::TargetList | ( | const std::vector< TargetEntry > & | targets | ) |

  | Construct a target list that contains the target entries in targets. Parameters:
  targets | The vector of TargetEntry to add into the target list.

Inti::Gtk::TargetList::TargetList | ( | GtkTargetList * | target_list | ) | `[explicit]`

  | Construct a target list from an exisiting GtkTargetList. Parameters:
  target_list | An existing GtkTargetList.

Inti::Gtk::TargetList::TargetList | ( | const TargetList & | src | ) |

  | Copy constructor. Parameters:
  src | The source target list.

## Member Function Documentation

void Inti::Gtk::TargetList::add | ( | const std::vector< TargetEntry > & | targets | ) |

  | Adds a vector of TargetEntry to the target list. Parameters:
  targets | The vector of TargetEntry to add.

void Inti::Gtk::TargetList::add | ( | const TargetEntry & | entry | ) |

  | Adds a TargetEntry to the target list. Parameters:
  entry | The TargetEntry to add.

void Inti::Gtk::TargetList::add | ( | Gdk::Atom | target,
|  | unsigned int | flags,
|  | unsigned int | info
| ) |

  | Adds a target to the TargetList. Parameters:
  target | The interned atom representing the target.
  flags | The flags for this target.
  info | An ID that will be passed back to the application.

bool Inti::Gtk::TargetList::find | ( | Gdk::Atom | target,
|  | unsigned int * | info
| ) |

  | Looks up a given target in the target list. Parameters:
  target | An interned atom representing the target to search for.
  info | A pointer to the location to store application info for target.
Returns: true if the target was found, otherwise false.

TargetList& Inti::Gtk::TargetList::operator= | ( | const TargetList & | src | ) |

  | Assignment operator. Parameters:
  src | The source target list.

void Inti::Gtk::TargetList::remove | ( | Gdk::Atom | target | ) |

  | Removes a target from a target list. Parameters:
  target | The interned atom representing the target.

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

- gtk/selection.h

Main Page - Footer