#include <selectiondata.h>
Definition at line 44 of file selectiondata.h.
◆ SelectionData() [1/3]
Gtk::SelectionData::SelectionData |
( |
| ) |
|
◆ SelectionData() [2/3]
Gtk::SelectionData::SelectionData |
( |
GtkSelectionData * |
gobject, |
|
|
bool |
make_a_copy = true |
|
) |
| |
|
explicit |
◆ SelectionData() [3/3]
◆ ~SelectionData()
Gtk::SelectionData::~SelectionData |
( |
| ) |
|
◆ get_data()
const guchar* Gtk::SelectionData::get_data |
( |
| ) |
const |
Retrieves the raw data of the selection.
- Returns
- The raw data of the selection.
◆ get_data_as_string()
std::string Gtk::SelectionData::get_data_as_string |
( |
| ) |
const |
◆ get_data_type()
std::string Gtk::SelectionData::get_data_type |
( |
| ) |
const |
◆ get_display() [1/2]
Glib::RefPtr<Gdk::Display> Gtk::SelectionData::get_display |
( |
| ) |
|
Retrieves the display of the selection.
- Returns
- The display of the selection.
◆ get_display() [2/2]
Glib::RefPtr<const Gdk::Display> Gtk::SelectionData::get_display |
( |
| ) |
const |
Retrieves the display of the selection.
- Returns
- The display of the selection.
◆ get_format()
int Gtk::SelectionData::get_format |
( |
| ) |
const |
Retrieves the format of the selection.
- Returns
- The format of the selection.
◆ get_length()
int Gtk::SelectionData::get_length |
( |
| ) |
const |
Retrieves the length of the raw data of the selection.
- Returns
- The length of the data of the selection.
◆ get_pixbuf() [1/2]
Glib::RefPtr<Gdk::Pixbuf> Gtk::SelectionData::get_pixbuf |
( |
| ) |
|
Gets the contents of the selection data as a Gdk::Pixbuf.
- Returns
- If the selection data contained a recognized image type and it could be converted to a Gdk::Pixbuf, a newly allocated pixbuf is returned, otherwise
0
. If the result is non-0
it must be freed with Glib::object_unref().
◆ get_pixbuf() [2/2]
Glib::RefPtr<const Gdk::Pixbuf> Gtk::SelectionData::get_pixbuf |
( |
| ) |
const |
Gets the contents of the selection data as a Gdk::Pixbuf.
- Returns
- If the selection data contained a recognized image type and it could be converted to a Gdk::Pixbuf, a newly allocated pixbuf is returned, otherwise
0
. If the result is non-0
it must be freed with Glib::object_unref().
◆ get_selection()
GdkAtom Gtk::SelectionData::get_selection |
( |
| ) |
const |
Retrieves the selection Gdk::Atom of the selection data.
- Returns
- The selection Gdk::Atom of the selection data.
◆ get_target()
std::string Gtk::SelectionData::get_target |
( |
| ) |
const |
Retrieves the target of the selection.
◆ get_targets()
◆ get_text()
Glib::ustring Gtk::SelectionData::get_text |
( |
| ) |
const |
Gets the contents of the selection data as a UTF-8 string.
- Returns
- If the selection data contained a recognized text type and it could be converted to UTF-8, a string containing the converted text, otherwise an empty string.
◆ get_type()
static GType Gtk::SelectionData::get_type |
( |
| ) |
|
|
static |
Get the GType for this class, for use with the underlying GObject type system.
◆ get_uris()
Glib::StringArrayHandle Gtk::SelectionData::get_uris |
( |
| ) |
const |
Gets the contents of the selection data as a container of URIs.
- Returns
- If the selection data contains a list of URIs, a container containing the URIs, otherwise an empty container.
◆ gobj() [1/2]
Provides access to the underlying C instance.
Definition at line 68 of file selectiondata.h.
◆ gobj() [2/2]
Provides access to the underlying C instance.
Definition at line 71 of file selectiondata.h.
◆ gobj_copy()
Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
◆ operator=()
◆ set() [1/3]
void Gtk::SelectionData::set |
( |
const std::string & |
type, |
|
|
const std::string & |
data |
|
) |
| |
Assign a string of raw data. Store new data into the Gtk::SelectionData object. Should only by called from a selection handler callback.
- Parameters
-
type | The type of the selection. |
data | A string that contains the data (does not have to be text). |
◆ set() [2/3]
void Gtk::SelectionData::set |
( |
const std::string & |
type, |
|
|
int |
format, |
|
|
const guint8 * |
data, |
|
|
int |
length |
|
) |
| |
Assign a memory block of raw data. Store new data into the Gtk::SelectionData object. Should only by called from a selection handler callback. A 0-byte terminates the stored data.
- Parameters
-
type | The type of the selection. |
format | The data format, i.e. the number of bits in a unit. |
data | Pointer to the data (will be copied). |
length | The length of the data block in bytes. |
◆ set() [3/3]
void Gtk::SelectionData::set |
( |
int |
format, |
|
|
const guint8 * |
data, |
|
|
int |
length |
|
) |
| |
◆ set_pixbuf()
bool Gtk::SelectionData::set_pixbuf |
( |
const Glib::RefPtr< Gdk::Pixbuf > & |
pixbuf | ) |
|
Sets the contents of the selection from a Gdk::Pixbuf The pixbuf is converted to the form determined by selection_data->target.
- Parameters
-
- Returns
true
if the selection was successfully set, otherwise false
.
◆ set_text()
bool Gtk::SelectionData::set_text |
( |
const Glib::ustring & |
data | ) |
|
Assign UTF-8 encoded text. Sets the contents of the selection from a UTF-8 encoded string. The string is converted to the form determined by get_target().
- Parameters
-
data | A UTF-8 encoded string. |
- Returns
true
if the selection was successfully set, otherwise false
.
◆ set_uris()
bool Gtk::SelectionData::set_uris |
( |
const Glib::StringArrayHandle & |
uris | ) |
|
Sets the contents of the selection from a list of URIs. The string is converted to the form determined by selection_data->target.
- Parameters
-
uris | A 0 -terminated array of strings holding URIs. |
- Returns
true
if the selection was successfully set, otherwise false
.
◆ swap()
◆ targets_include_image()
bool Gtk::SelectionData::targets_include_image |
( |
bool |
writable = true | ) |
const |
Given a Gtk::SelectionData object holding a list of targets, determines if any of the targets in targets can be used to provide a Gdk::Pixbuf.
- Parameters
-
writable | Whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format. |
- Returns
true
if selection_data holds a list of targets, and a suitable target for images is included, otherwise false
.
◆ targets_include_rich_text()
bool Gtk::SelectionData::targets_include_rich_text |
( |
const Glib::RefPtr< TextBuffer > & |
buffer | ) |
const |
Given a Gtk::SelectionData object holding a list of targets, determines if any of the targets in targets can be used to provide rich text.
- Parameters
-
- Returns
true
if selection_data holds a list of targets, and a suitable target for rich text is included, otherwise false
.
◆ targets_include_text()
bool Gtk::SelectionData::targets_include_text |
( |
| ) |
const |
Given a Gtk::SelectionData object holding a list of targets, determines if any of the targets in targets can be used to provide text.
- Returns
true
if selection_data holds a list of targets, and a suitable target for text is included, otherwise false
.
◆ targets_include_uri()
bool Gtk::SelectionData::targets_include_uri |
( |
| ) |
const |
Given a Gtk::SelectionData object holding a list of targets, determines if any of the targets in targets can be used to provide a list or URIs.
- Returns
true
if selection_data holds a list of targets, and a suitable target for URI lists is included, otherwise false
.
◆ swap()
- Parameters
-
lhs | The left-hand side |
rhs | The right-hand side |
Definition at line 283 of file selectiondata.h.
◆ wrap()
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.
◆ gobject_
The documentation for this class was generated from the following file: