gtkmm: Gdk::ContentFormatsBuilder Class Reference

gtkmm 4.14.0

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Symbols | List of all members
Gdk::ContentFormatsBuilder Class Referencefinal

Helper class for building Gdk::ContentFormats. More...

`#include <gdkmm/contentformatsbuilder.h>`

## Public Member Functions
void | reference () const
| Increment the reference count for this object.
void | unreference () const
| Decrement the reference count for this object.
GdkContentFormatsBuilder * | gobj ()
| Provides access to the underlying C instance.
const GdkContentFormatsBuilder * | gobj () const
| Provides access to the underlying C instance.
GdkContentFormatsBuilder * | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
| ContentFormatsBuilder ()=delete
| ContentFormatsBuilder (const ContentFormatsBuilder &)=delete
ContentFormatsBuilder & | operator= (const ContentFormatsBuilder &)=delete
void | add_formats (const Glib::RefPtr< const ContentFormats > & formats)
| Appends all formats from formats to builder, skipping those that already exist.
void | add_mime_type (const Glib::ustring & mime_type)
| Appends mime_type to builder if it has not already been added.
void | add_gtype (GType gtype)
| Appends gtype to builder if it has not already been added.
Glib::RefPtr< ContentFormats > | to_formats ()
| Creates a new Gdk::ContentFormats.

## Static Public Member Functions
static Glib::RefPtr< ContentFormatsBuilder > | create ()
| Creates a new ContentFormatsBuilder object.

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

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

## Detailed Description

Helper class for building Gdk::ContentFormats.

Since gtkmm 3.94

## Constructor & Destructor Documentation

## ◆ ContentFormatsBuilder() [1/2]

Gdk::ContentFormatsBuilder::ContentFormatsBuilder | ( |  | ) |
| delete

## ◆ ContentFormatsBuilder() [2/2]

Gdk::ContentFormatsBuilder::ContentFormatsBuilder | ( | const ContentFormatsBuilder & |  | ) |
| delete

## Member Function Documentation

## ◆ add_formats()

void Gdk::ContentFormatsBuilder::add_formats | ( | const Glib::RefPtr< const ContentFormats > & | formats | ) |

Appends all formats from formats to builder, skipping those that already exist.

Parameters

  formats | The formats to add.

## ◆ add_gtype()

void Gdk::ContentFormatsBuilder::add_gtype | ( | GType | gtype | ) |

Appends gtype to builder if it has not already been added.

Parameters

  gtype | A `GType`.

## ◆ add_mime_type()

void Gdk::ContentFormatsBuilder::add_mime_type | ( | const Glib::ustring & | mime_type | ) |

Appends mime_type to builder if it has not already been added.

Parameters

  mime_type | A mime type.

## ◆ create()

static Glib::RefPtr< ContentFormatsBuilder > Gdk::ContentFormatsBuilder::create | ( |  | ) |
| static

Creates a new ContentFormatsBuilder object.

The resulting builder would create an empty ContentFormats. Use addition functions to add types to it.

Returns
  A new ContentFormatsBuilder.

## ◆ gobj() [1/2]

GdkContentFormatsBuilder * Gdk::ContentFormatsBuilder::gobj | ( |  | ) |

Provides access to the underlying C instance.

## ◆ gobj() [2/2]

const GdkContentFormatsBuilder * Gdk::ContentFormatsBuilder::gobj | ( |  | ) | const

Provides access to the underlying C instance.

## ◆ gobj_copy()

GdkContentFormatsBuilder * Gdk::ContentFormatsBuilder::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 Gdk::ContentFormatsBuilder::operator delete | ( | void * | ,
|  | std::size_t | )
| protected

## ◆ operator=()

ContentFormatsBuilder & Gdk::ContentFormatsBuilder::operator= | ( | const ContentFormatsBuilder & |  | ) |
| delete

## ◆ reference()

void Gdk::ContentFormatsBuilder::reference | ( |  | ) | const

Increment the reference count for this object.

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

## ◆ to_formats()

Glib::RefPtr< ContentFormats > Gdk::ContentFormatsBuilder::to_formats | ( |  | ) |

Creates a new Gdk::ContentFormats.

The ContentFormatsBuilder is reset once this function returns; you cannot call this function multiple times on the same builder instance.

Returns
  A newly created Gdk::ContentFormats with all the formats added to the builder.

## ◆ unreference()

void Gdk::ContentFormatsBuilder::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< Gdk::ContentFormatsBuilder > wrap | ( | GdkContentFormatsBuilder * | 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.