Completion provider interface.
More...
#include <gtksourceviewmm/completionprovider.h>
|
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.
|
|
|
(Note that these are not member symbols.)
|
Glib::RefPtr< Gsv::CompletionProvider > | wrap (GtkSourceCompletionProvider* object, bool take_copy=false) |
| A Glib::wrap() method for this object.
|
|
Completion provider interface.
You must implement this interface to provide proposals to Completion.
- Since gtksourceviewmm 2.10
◆ CompletionProvider() [1/2]
Gsv::CompletionProvider::CompletionProvider |
( |
| ) |
|
|
protected |
You should derive from this class to use it.
◆ CompletionProvider() [2/2]
◆ ~CompletionProvider()
Gsv::CompletionProvider::~CompletionProvider |
( |
| ) |
|
|
overridenoexcept |
◆ activate_proposal()
Activate proposal at iter.
When this functions returns false
, the default activation of proposal will take place which replaces the word at iter with the label of proposal.
- Parameters
-
- Returns
true
to indicate that the proposal activation has been handled, false
otherwise.
- Since gtksourceviewmm 2.10
◆ add_interface()
static void Gsv::CompletionProvider::add_interface |
( |
GType | gtype_implementer | ) |
|
|
static |
◆ get_activation()
◆ get_icon() [1/2]
Glib::RefPtr< Gdk::Pixbuf > Gsv::CompletionProvider::get_icon |
( |
| ) |
|
Get the icon of the provider.
- Returns
- The icon to be used for the provider, or empty Glib::RefPtr if the provider does not have a special icon.
- Since gtksourceviewmm 2.10
◆ get_icon() [2/2]
Glib::RefPtr< const Gdk::Pixbuf > Gsv::CompletionProvider::get_icon |
( |
| ) |
const |
Get the icon of the provider.
- Returns
- The icon to be used for the provider, or empty Glib::RefPtr if the provider does not have a special icon.
- Since gtksourceviewmm 2.10
◆ get_info_widget() [1/2]
Get a customized info widget to show extra information of a proposal.
This allows for customized widgets on a proposal basis, although in general providers will have the same custom widget for all their proposals and proposal can be ignored. The implementation of this function is optional. If implemented, update_info() must also be implemented. If not implemented, the default get_info() will be used to display extra information about a CompletionProposal.
- Parameters
-
- Returns
- A custom Gtk::Widget to show extra information about proposal.
- Since gtksourceviewmm 2.10
◆ get_info_widget() [2/2]
Get a customized info widget to show extra information of a proposal.
This allows for customized widgets on a proposal basis, although in general providers will have the same custom widget for all their proposals and proposal can be ignored. The implementation of this function is optional. If implemented, update_info() must also be implemented. If not implemented, the default get_info() will be used to display extra information about a CompletionProposal.
- Parameters
-
- Returns
- A custom Gtk::Widget to show extra information about proposal.
- Since gtksourceviewmm 2.10
◆ get_interactive_delay()
int Gsv::CompletionProvider::get_interactive_delay |
( |
| ) |
const |
◆ get_name()
Glib::ustring Gsv::CompletionProvider::get_name |
( |
| ) |
const |
Get the name of the provider.
This should be a translatable name for display to the user. For example: _("Document word completion provider").
- Returns
- A new string containing the name of the provider.
◆ get_priority()
int Gsv::CompletionProvider::get_priority |
( |
| ) |
const |
Get the provider priority.
The priority determines the order in which proposals appear in the completion popup. Higher priorities are sorted before lower priorities. The default priority is 0.
- Returns
- The provider priority.
- Since gtksourceviewmm 2.10
◆ get_start_iter()
Get the Gtk::TextIter at which the completion for proposal starts.
When implemented, the completion can use this information to position the completion window accordingly when a proposal is selected in the completion window.
- Parameters
-
- Returns
true
if iter was set for proposal, false
otherwise.
- Since gtksourceviewmm 2.10
◆ get_type()
static GType Gsv::CompletionProvider::get_type |
( |
| ) |
|
|
static |
Get the GType for this class, for use with the underlying GObject type system.
◆ gobj() [1/2]
GtkSourceCompletionProvider * Gsv::CompletionProvider::gobj |
( |
| ) |
|
|
inline |
Provides access to the underlying C GObject.
◆ gobj() [2/2]
const GtkSourceCompletionProvider * Gsv::CompletionProvider::gobj |
( |
| ) |
const |
|
inline |
Provides access to the underlying C GObject.
◆ match()
bool Gsv::CompletionProvider::match |
( |
const Glib::RefPtr< const CompletionContext >& | context | ) |
const |
Get whether the provider match the context of completion detailed in context.
- Parameters
-
- Returns
true
if provider matches the completion context, false
otherwise.
- Since gtksourceviewmm 2.10
◆ operator=()
◆ populate()
void Gsv::CompletionProvider::populate |
( |
const Glib::RefPtr< CompletionContext >& | context | ) |
|
◆ update_info()
Update extra information shown in info for proposal.
This should be implemented if your provider sets a custom info widget for proposal. This function must be implemented when get_info_widget() is implemented.
- Parameters
-
- Since gtksourceviewmm 2.10
◆ 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.