gtksourceviewmm 3.21.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gsv::CompletionProposal Class Reference

Completion proposal object. More...

`#include <gtksourceviewmm/completionproposal.h>`

Inheritance diagram for Gsv::CompletionProposal:
[legend]

## Public Member Functions
| CompletionProposal (CompletionProposal&& src) noexcept
CompletionProposal& | operator= (CompletionProposal&& src) noexcept
| ~CompletionProposal () noexceptoverride
GtkSourceCompletionProposal* | gobj ()
| Provides access to the underlying C GObject. More...
const GtkSourceCompletionProposal* | gobj () const
| Provides access to the underlying C GObject. More...
Glib::ustring | get_label () const
| Gets the label of a proposal. More...
Glib::ustring | get_markup () const
| Gets the label of a proposal with markup. More...
Glib::ustring | get_text () const
| Gets the text of a proposal. More...
Glib::RefPtr< Gdk::Pixbuf > | get_icon ()
| Gets the icon of a proposal. More...
Glib::RefPtr< const Gdk::Pixbuf > | get_icon () const
| Gets the icon of a proposal. More...
Glib::ustring | get_info () const
| Gets extra information associated to the proposal. More...
void | changed ()
| Emits the "changed" signal on a proposal. More...
guint | hash () const
| Get the hash value of a proposal. More...
bool | equal (const Glib::RefPtr< const CompletionProposal >& other) const
| Get whether two proposal objects are the same. More...
Glib::SignalProxy< void > | signal_changed ()
| Emitted when the proposal has changed. More...
Public Member Functions inherited from Glib::Interface
| Interface ()
| Interface (Interface &&src) noexcept
Interface & | operator= (Interface &&src) noexcept
| Interface (const Glib::Interface_Class &interface_class)
| Interface (GObject *castitem)
| ~Interface () noexceptoverride
| Interface (const Interface &)=delete
Interface & | operator= (const Interface &)=delete
GObject * | gobj ()
const GObject * | gobj () const
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void > &&slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, sigc::slot< void > &&slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const
Public Member Functions inherited from sigc::trackable
| trackable () noexcept
| trackable (const trackable &src) noexcept
| trackable (trackable &&src)
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src)
void | remove_destroy_notify_callback (void *data) const

## Static Public Member Functions
static void | add_interface (GType gtype_implementer)
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...

## Protected Member Functions
| CompletionProposal ()
| You should derive from this class to use it. More...
virtual void | on_changed ()
| This is a default handler for the signal signal_changed(). More...
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gsv::CompletionProposal > | wrap (GtkSourceCompletionProposal* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify

## Detailed Description

Completion proposal object.

The proposal interface represents a completion item in the completion window. It provides information on how to display the completion item and what action should be taken when the completion item is activated.

Since gtksourceviewmm 2.10:

## Constructor & Destructor Documentation

Gsv::CompletionProposal::CompletionProposal | ( |  | ) |
| protected

You should derive from this class to use it.

Gsv::CompletionProposal::CompletionProposal | ( | CompletionProposal&& | src | ) |
| noexcept

Gsv::CompletionProposal::~CompletionProposal | ( |  | ) |
| override noexcept

## Member Function Documentation

static void Gsv::CompletionProposal::add_interface | ( | GType | gtype_implementer | ) |
| static

void Gsv::CompletionProposal::changed | ( |  | ) |

Emits the "changed" signal on a proposal.

This should be called by implementations whenever the name, icon or info of the proposal has changed.

Since gtksourceviewmm 2.10:

bool Gsv::CompletionProposal::equal | ( | const Glib::RefPtr< const CompletionProposal >& | other | ) | const

Get whether two proposal objects are the same.

This is used to (together with hash()) to match proposals in the completion model. By default, it uses direct equality.

Parameters

  other | A CompletionProposal.

Returns
  `true` if a proposal and other are the same proposal.

Since gtksourceviewmm 2.10:

Glib::RefPtr<Gdk::Pixbuf> Gsv::CompletionProposal::get_icon | ( |  | ) |

Gets the icon of a proposal.

Returns
  The icon of a proposal.

Since gtksourceviewmm 2.10:

Glib::RefPtr<const Gdk::Pixbuf> Gsv::CompletionProposal::get_icon | ( |  | ) | const

Gets the icon of a proposal.

Returns
  The icon of a proposal.

Since gtksourceviewmm 2.10:

Glib::ustring Gsv::CompletionProposal::get_info | ( |  | ) | const

Gets extra information associated to the proposal.

This information will be used to present the user with extra, detailed information about the selected proposal.

Returns
  The extra information of a proposal or empty string if no extra information is associated to a proposal.

Since gtksourceviewmm 2.10:

Glib::ustring Gsv::CompletionProposal::get_label | ( |  | ) | const

Gets the label of a proposal.

The label is shown in the list of proposals as plain text. If you need any markup (such as bold or italic text), you have to implement get_markup().

Returns
  The label of a proposal.

Since gtksourceviewmm 2.10:

Glib::ustring Gsv::CompletionProposal::get_markup | ( |  | ) | const

Gets the label of a proposal with markup.

The label is shown in the list of proposals and may contain markup. This will be used instead of get_label() if implemented.

Returns
  The label of a proposal with markup.

Since gtksourceviewmm 2.10:

Glib::ustring Gsv::CompletionProposal::get_text | ( |  | ) | const

Gets the text of a proposal.

The text that is inserted into the text buffer when the proposal is activated by the default activation. You are free to implement a custom activation handler in the provider and not implement this function.

Returns
  The text of a proposal.

Since gtksourceviewmm 2.10:

static GType Gsv::CompletionProposal::get_type | ( |  | ) |
| static

Get the GType for this class, for use with the underlying GObject type system.

GtkSourceCompletionProposal* Gsv::CompletionProposal::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

const GtkSourceCompletionProposal* Gsv::CompletionProposal::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

guint Gsv::CompletionProposal::hash | ( |  | ) | const

Get the hash value of a proposal.

This is used to (together with equal()) to match proposals in the completion model. By default, it uses a direct hash.

Returns
  The hash value of a proposal.

Since gtksourceviewmm 2.10:

virtual void Gsv::CompletionProposal::on_changed | ( |  | ) |
| protected virtual

This is a default handler for the signal signal_changed().

CompletionProposal& Gsv::CompletionProposal::operator= | ( | CompletionProposal&& | src | ) |
| noexcept

Glib::SignalProxy< void > Gsv::CompletionProposal::signal_changed | ( |  | ) |

Emitted when the proposal has changed.

The completion popup will react to this by updating the shown information.

Since gtksourceviewmm 2.10:

Slot Prototype:
  `void on_my_changed()`

Emitted when the proposal has changed. The completion popup will react to this by updating the shown information.

## Friends And Related Function Documentation

Glib::RefPtr< Gsv::CompletionProposal > wrap | ( | GtkSourceCompletionProposal * | 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.