gtkmm 3.24.10

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Symbols | List of all members
Gtk::TargetList Class Referencefinal

`#include <gtkmm/targetlist.h>`

## Public Member Functions
void | reference () const
| Increment the reference count for this object.
void | unreference () const
| Decrement the reference count for this object.
GtkTargetList * | gobj ()
| Provides access to the underlying C instance.
const GtkTargetList * | gobj () const
| Provides access to the underlying C instance.
GtkTargetList * | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
| TargetList ()=delete
| TargetList (const TargetList &)=delete
TargetList & | operator= (const TargetList &)=delete
void | add (const Glib::ustring & target, TargetFlags flags=TargetFlags(0), guint info=0)
| Appends another target to a Gtk::TargetList.
void | add (const std::vector< TargetEntry > & targets)
void | add_text_targets (guint info)
| Appends the text targets supported by Gtk::SelectionData to the target list.
void | add_rich_text_targets (guint info, bool deserializable, const Glib::RefPtr< TextBuffer > & buffer)
| Appends the rich text targets registered with Gtk::TextBuffer::register_serialize_format() or Gtk::TextBuffer::register_deserialize_format() to the target list.
void | add_image_targets (guint info, bool writable)
| Appends the image targets supported by Gtk::SelectionData to the target list.
void | add_uri_targets (guint info)
| Appends the URI targets supported by Gtk::SelectionData to the target list.
void | remove (const Glib::ustring & target)
| Removes a target from a target list.
bool | find (const Glib::ustring & target, guint * info) const
| Looks up a given target in a Gtk::TargetList.

## Static Public Member Functions
static Glib::RefPtr< Gtk::TargetList > | create (const std::vector< TargetEntry > & targets)

## Protected Member Functions
void | operator delete (void *, std::size_t)

## Related Symbols
(Note that these are not member symbols.)
Glib::RefPtr< Gtk::TargetList > | wrap (GtkTargetList * object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Constructor & Destructor Documentation

## ◆ TargetList() [1/2]

Gtk::TargetList::TargetList | ( |  | ) |
| delete

## ◆ TargetList() [2/2]

Gtk::TargetList::TargetList | ( | const TargetList & |  | ) |
| delete

## Member Function Documentation

## ◆ add() [1/2]

void Gtk::TargetList::add | ( | const Glib::ustring & | target,
|  | TargetFlags | flags = TargetFlags(0),
|  | guint | info = 0 )

Appends another target to a Gtk::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.

## ◆ add() [2/2]

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

## ◆ add_image_targets()

void Gtk::TargetList::add_image_targets | ( | guint | info,
|  | bool | writable )

Appends the image targets supported by Gtk::SelectionData to the target list.

All targets are added with the same info.

Since gtkmm 2.6

Parameters

  info | An ID that will be passed back to the application.
  writable | Whether to add only targets for which GTK+ knows how to convert a pixbuf into the format.

## ◆ add_rich_text_targets()

void Gtk::TargetList::add_rich_text_targets | ( | guint | info,
|  | bool | deserializable,
|  | const Glib::RefPtr< TextBuffer > & | buffer )

Appends the rich text targets registered with Gtk::TextBuffer::register_serialize_format() or Gtk::TextBuffer::register_deserialize_format() to the target list.

All targets are added with the same info.

Since gtkmm 2.10

Parameters

  info | An ID that will be passed back to the application.
  deserializable | If true, then deserializable rich text formats will be added, serializable formats otherwise.
  buffer | A Gtk::TextBuffer.

## ◆ add_text_targets()

void Gtk::TargetList::add_text_targets | ( | guint | info | ) |

Appends the text targets supported by Gtk::SelectionData to the target list.

All targets are added with the same info.

Since gtkmm 2.6

Parameters

  info | An ID that will be passed back to the application.

## ◆ add_uri_targets()

void Gtk::TargetList::add_uri_targets | ( | guint | info | ) |

Appends the URI targets supported by Gtk::SelectionData to the target list.

All targets are added with the same info.

Since gtkmm 2.6

Parameters

  info | An ID that will be passed back to the application.

## ◆ create()

Glib::RefPtr< Gtk::TargetList > Gtk::TargetList::create | ( | const std::vector< TargetEntry > & | targets | ) |
| static

## ◆ find()

bool Gtk::TargetList::find | ( | const Glib::ustring & | target,
|  | guint * | info ) const

Looks up a given target in a Gtk::TargetList.

Parameters

  target | An interned atom representing the target to search for.
  info | A pointer to the location to store application info for target, or nullptr.

Returns
  true if the target was found, otherwise false.

## ◆ gobj() [1/2]

GtkTargetList * Gtk::TargetList::gobj | ( |  | ) |

Provides access to the underlying C instance.

## ◆ gobj() [2/2]

const GtkTargetList * Gtk::TargetList::gobj | ( |  | ) | const

Provides access to the underlying C instance.

## ◆ gobj_copy()

GtkTargetList * Gtk::TargetList::gobj_copy | ( |  | ) | const

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

## ◆ operator delete()

void Gtk::TargetList::operator delete | ( | void * | ,
|  | std::size_t | )
| protected

## ◆ operator=()

TargetList & Gtk::TargetList::operator= | ( | const TargetList & |  | ) |
| delete

## ◆ reference()

void Gtk::TargetList::reference | ( |  | ) | const

Increment the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

## ◆ remove()

void Gtk::TargetList::remove | ( | const Glib::ustring & | target | ) |

Removes a target from a target list.

Parameters

  target | The interned atom representing the target.

## ◆ unreference()

void Gtk::TargetList::unreference | ( |  | ) | const

Decrement the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

## Friends And Related Symbol Documentation

## ◆ wrap()

Glib::RefPtr< Gtk::TargetList > wrap | ( | GtkTargetList * | object,
|  | bool | take_copy = false )
| related

A Glib::wrap() method for this object.

Parameters

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns
  A C++ instance that wraps this C instance.