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::Completion Class Reference

Main Completion Object. More...

`#include <gtksourceviewmm/completion.h>`

Inheritance diagram for Gsv::Completion:
[legend]

## Public Member Functions
| Completion (Completion&& src) noexcept
Completion& | operator= (Completion&& src) noexcept
| ~Completion () noexceptoverride
GtkSourceCompletion* | gobj ()
| Provides access to the underlying C GObject. More...
const GtkSourceCompletion* | gobj () const
| Provides access to the underlying C GObject. More...
GtkSourceCompletion* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
bool | add_provider (const Glib::RefPtr< CompletionProvider >& provider)
| Add a new CompletionProvider to the completion object. More...
bool | remove_provider (const Glib::RefPtr< CompletionProvider >& provider)
| Remove provider from the completion. More...
std::vector< Glib::RefPtr< CompletionProvider > > | get_providers () const
| Get list of providers registered on completion. More...
bool | show (const std::vector< Glib::RefPtr< CompletionProvider > >& providers, const Glib::RefPtr< CompletionContext >& context)
| Starts a new completion with the specified CompletionContext and a list of potential candidate providers for completion. More...
void | hide ()
| Hides the completion if it is active (visible). More...
CompletionInfo* | get_info_window ()
| Gets the CompletionInfo window. More...
const CompletionInfo* | get_info_window () const
| Gets the CompletionInfo window. More...
View* | get_view ()
| Gets the View associated with completion. More...
const View* | get_view () const
| Gets the View associated with completion. More...
Glib::RefPtr< CompletionContext > | create_context (const Gtk::TextIter& position)
| Create a new CompletionContext for completion. More...
Glib::RefPtr< CompletionContext > | create_context ()
| Create a new CompletionContext for completion. More...
void | move_window (const Gtk::TextIter& iter)
| Move the completion window to a specific iter. More...
void | block_interactive ()
| Block interactive completion. More...
void | unblock_interactive ()
| Unblock interactive completion. More...
Glib::SignalProxy< void > | signal_hide ()
| Emitted when the completion window is hidden. More...
Glib::SignalProxy< void, const Glib::RefPtr< CompletionContext >& > | signal_populate_context ()
| Emitted just before starting to populate the completion with providers. More...
Glib::SignalProxy< void > | signal_show ()
| Emitted when the completion window is shown. More...
Glib::PropertyProxy< guint > | property_accelerators ()
| Number of proposal accelerators to show. More...
Glib::PropertyProxy_ReadOnly< guint > | property_accelerators () const
| Number of proposal accelerators to show. More...
Glib::PropertyProxy< guint > | property_auto_complete_delay ()
| Completion popup delay for interactive completion. More...
Glib::PropertyProxy_ReadOnly< guint > | property_auto_complete_delay () const
| Completion popup delay for interactive completion. More...
Glib::PropertyProxy< guint > | property_proposal_page_size ()
| Proposal scrolling page size. More...
Glib::PropertyProxy_ReadOnly< guint > | property_proposal_page_size () const
| Proposal scrolling page size. More...
Glib::PropertyProxy< guint > | property_provider_page_size ()
| Provider scrolling page size. More...
Glib::PropertyProxy_ReadOnly< guint > | property_provider_page_size () const
| Provider scrolling page size. More...
Glib::PropertyProxy< bool > | property_remember_info_visibility ()
| Remember the last info window visibility state. More...
Glib::PropertyProxy_ReadOnly< bool > | property_remember_info_visibility () const
| Remember the last info window visibility state. More...
Glib::PropertyProxy< bool > | property_select_on_show ()
| Select first proposal when completion is shown. More...
Glib::PropertyProxy_ReadOnly< bool > | property_select_on_show () const
| Select first proposal when completion is shown. More...
Glib::PropertyProxy< bool > | property_show_headers ()
| Show provider headers when proposals from multiple providers are available. More...
Glib::PropertyProxy_ReadOnly< bool > | property_show_headers () const
| Show provider headers when proposals from multiple providers are available. More...
Glib::PropertyProxy< bool > | property_show_icons ()
| Show provider and proposal icons in the completion popup. More...
Glib::PropertyProxy_ReadOnly< bool > | property_show_icons () const
| Show provider and proposal icons in the completion popup. More...
Glib::PropertyProxy_ReadOnly< View* > | property_view () const
| The GtkSourceView bound to the completion. More...
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
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 GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...

## Protected Member Functions
virtual void | on_hide ()
| This is a default handler for the signal signal_hide(). More...
virtual void | on_populate_context (const Glib::RefPtr< CompletionContext >& context)
| This is a default handler for the signal signal_populate_context(). More...
virtual void | on_show ()
| This is a default handler for the signal signal_show(). More...
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
| ~Object () noexceptoverride
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::Completion > | wrap (GtkSourceCompletion* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members
Public Types inherited from Glib::Object
typedef void(*)(gpointer data | DestroyNotify)
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify

## Detailed Description

Main Completion Object.

Since gtksourceviewmm 2.10:

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

bool Gsv::Completion::add_provider | ( | const Glib::RefPtr< CompletionProvider >& | provider | ) |

Add a new CompletionProvider to the completion object.

This will add a reference provider.

Parameters

  provider | A CompletionProvider.

Returns
  `true` if provider was successfully added, otherwise error is thrown.

Since gtksourceviewmm 2.10:

void Gsv::Completion::block_interactive | ( |  | ) |

Block interactive completion.

This can be used to disable interactive completion when inserting or deleting text from the buffer associated with the completion. Use unblock_interactive() to enable interactive completion again.

Since gtksourceviewmm 2.10:

Glib::RefPtr<CompletionContext> Gsv::Completion::create_context | ( | const Gtk::TextIter & | position | ) |

Create a new CompletionContext for completion.

The position at which the completion using the new context will consider completion can be provided by position.

Parameters

  position | A Gtk::TextIter.

Returns
  A new CompletionContext.

Since gtksourceviewmm 2.10:

Glib::RefPtr<CompletionContext> Gsv::Completion::create_context | ( |  | ) |

Create a new CompletionContext for completion.

The position at which the completion using the new context will consider completion is current cursor position.

Returns
  A new CompletionContext.

Since gtksourceviewmm 2.10:

CompletionInfo* Gsv::Completion::get_info_window | ( |  | ) |

Gets the CompletionInfo window.

The info widget is the window where the completion displays optional extra information of the proposal.

Returns
  The CompletionInfo window.

Since gtksourceviewmm 2.10:

const CompletionInfo* Gsv::Completion::get_info_window | ( |  | ) | const

Gets the CompletionInfo window.

The info widget is the window where the completion displays optional extra information of the proposal.

Returns
  The CompletionInfo window.

Since gtksourceviewmm 2.10:

std::vector<Glib::RefPtr<CompletionProvider> > Gsv::Completion::get_providers | ( |  | ) | const

Get list of providers registered on completion.

Returns
  List of CompletionProvider.

Since gtksourceviewmm 2.10:

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

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

View* Gsv::Completion::get_view | ( |  | ) |

Gets the View associated with completion.

Returns
  The View associated with completion.

Since gtksourceviewmm 2.10:

const View* Gsv::Completion::get_view | ( |  | ) | const

Gets the View associated with completion.

Returns
  The View associated with completion.

Since gtksourceviewmm 2.10:

GtkSourceCompletion* Gsv::Completion::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

const GtkSourceCompletion* Gsv::Completion::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

GtkSourceCompletion* Gsv::Completion::gobj_copy | ( |  | ) |

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

void Gsv::Completion::hide | ( |  | ) |

Hides the completion if it is active (visible).

Since gtksourceviewmm 2.10:

void Gsv::Completion::move_window | ( | const Gtk::TextIter & | iter | ) |

Move the completion window to a specific iter.

Parameters

  iter | A Gtk::TextIter.

Since gtksourceviewmm 2.10:

virtual void Gsv::Completion::on_hide | ( |  | ) |
| protected virtual

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

virtual void Gsv::Completion::on_populate_context | ( | const Glib::RefPtr< CompletionContext >& | context | ) |
| protected virtual

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

virtual void Gsv::Completion::on_show | ( |  | ) |
| protected virtual

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

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

Glib::PropertyProxy< guint > Gsv::Completion::property_accelerators | ( |  | ) |

Number of proposal accelerators to show.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< guint > Gsv::Completion::property_accelerators | ( |  | ) | const

Number of proposal accelerators to show.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< guint > Gsv::Completion::property_auto_complete_delay | ( |  | ) |

Completion popup delay for interactive completion.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< guint > Gsv::Completion::property_auto_complete_delay | ( |  | ) | const

Completion popup delay for interactive completion.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< guint > Gsv::Completion::property_proposal_page_size | ( |  | ) |

Proposal scrolling page size.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< guint > Gsv::Completion::property_proposal_page_size | ( |  | ) | const

Proposal scrolling page size.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< guint > Gsv::Completion::property_provider_page_size | ( |  | ) |

Provider scrolling page size.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< guint > Gsv::Completion::property_provider_page_size | ( |  | ) | const

Provider scrolling page size.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Gsv::Completion::property_remember_info_visibility | ( |  | ) |

Remember the last info window visibility state.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Gsv::Completion::property_remember_info_visibility | ( |  | ) | const

Remember the last info window visibility state.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Gsv::Completion::property_select_on_show | ( |  | ) |

Select first proposal when completion is shown.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Gsv::Completion::property_select_on_show | ( |  | ) | const

Select first proposal when completion is shown.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Gsv::Completion::property_show_headers | ( |  | ) |

Show provider headers when proposals from multiple providers are available.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Gsv::Completion::property_show_headers | ( |  | ) | const

Show provider headers when proposals from multiple providers are available.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Gsv::Completion::property_show_icons | ( |  | ) |

Show provider and proposal icons in the completion popup.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Gsv::Completion::property_show_icons | ( |  | ) | const

Show provider and proposal icons in the completion popup.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< View* > Gsv::Completion::property_view | ( |  | ) | const

The GtkSourceView bound to the completion.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

bool Gsv::Completion::remove_provider | ( | const Glib::RefPtr< CompletionProvider >& | provider | ) |

Remove provider from the completion.

Parameters

  provider | A CompletionProvider.

Returns
  `true` if provider was successfully removed, otherwise error is thrown.

Since gtksourceviewmm 2.10:

bool Gsv::Completion::show | ( | const std::vector< Glib::RefPtr< CompletionProvider > >& | providers,
|  | const Glib::RefPtr< CompletionContext >& | context
| ) |  |

Starts a new completion with the specified CompletionContext and a list of potential candidate providers for completion.

Parameters

  providers | A list of CompletionProvider.
  context | The CompletionContext with which to start the completion.

Returns
  `true` if it was possible to the show completion window.

Since gtksourceviewmm 2.10:

Glib::SignalProxy< void > Gsv::Completion::signal_hide | ( |  | ) |

Emitted when the completion window is hidden.

The default handler will actually hide the window.

Since gtksourceviewmm 2.10:

Slot Prototype:
  `void on_my_hide()`

Emitted when the completion window is hidden. The default handler will actually hide the window.

Glib::SignalProxy< void,const Glib::RefPtr<CompletionContext>& > Gsv::Completion::signal_populate_context | ( |  | ) |

Emitted just before starting to populate the completion with providers.

You can use this signal to add additional attributes in the context.

Handler parameters:
  context The context for current completion.

Since gtksourceviewmm 2.10:

Slot Prototype:
  `void on_my_populate_context(const Glib::RefPtr<CompletionContext>& context)`

Emitted just before starting to populate the completion with providers. You can use this signal to add additional attributes in the context.

Parameters

  context | The Gtk::SourceCompletionContext for the current completion.

Glib::SignalProxy< void > Gsv::Completion::signal_show | ( |  | ) |

Emitted when the completion window is shown.

The default handler will actually show the window.

Since gtksourceviewmm 2.10:

Slot Prototype:
  `void on_my_show()`

Emitted when the completion window is shown. The default handler will actually show the window.

void Gsv::Completion::unblock_interactive | ( |  | ) |

Unblock interactive completion.

This can be used after using block_interactive() to enable interactive completion again.

Since gtksourceviewmm 2.10:

## Friends And Related Function Documentation

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