gtksourceview::SourceCompletionProvider Class Reference

Inherits Glib::Interface.

Collaboration diagram for gtksourceview::SourceCompletionProvider:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~SourceCompletionProvider ()
GtkSourceCompletionProvider* gobj ()
 Provides access to the underlying C GObject.
const GtkSourceCompletionProvider* gobj () const
 Provides access to the underlying C GObject.
Glib::ustring get_name () const
 Get the name of the provider.
Glib::RefPtr< Gdk::Pixbufget_icon ()
 Get the icon of the provider.
Glib::RefPtr< const Gdk::Pixbufget_icon () const
 Get the icon of the provider.
void populate (const Glib::RefPtr< SourceCompletionContext >& context)
 Populate context with proposals from provider.
bool match (const Glib::RefPtr< const SourceCompletionContext >& context) const
 Get whether the provider match the context of completion detailed in context.
Gtk::Widgetget_info_widget (const Glib::RefPtr< const SourceCompletionProposal >& proposal) const
 Get a customized info widget to show extra information of a proposal.
void update_info (const Glib::RefPtr< const SourceCompletionProposal >& proposal, const SourceCompletionInfo& info)
 Update extra information shown in info for proposal.
bool get_start_iter (const Glib::RefPtr< const SourceCompletionContext >& context, const Glib::RefPtr< const SourceCompletionProposal >& proposal, Gtk::TextIter& iter)
 Get the Gtk::TextIter at which the completion for proposal starts.
bool activate_proposal (const Glib::RefPtr< SourceCompletionProposal >& proposal, const Gtk::TextIter& iter)
 Activate proposal at iter.
SourceCompletionActivation get_activation () const
 Get with what kind of activation the provider should be activated.
int get_interactive_delay () const
 Get the delay in milliseconds before starting interactive completion for this provider.
int get_priority () const
 Get the provider priority.

Static Public Member Functions

static void add_interface (GType gtype_implementer)

Related Functions

(Note that these are not member functions.)



Glib::RefPtr
< gtksourceview::SourceCompletionProvider
wrap (GtkSourceCompletionProvider* object, bool take_copy=false)
 A Glib::wrap() method for this object.

Constructor & Destructor Documentation

virtual gtksourceview::SourceCompletionProvider::~SourceCompletionProvider (  )  [virtual]

Member Function Documentation

bool gtksourceview::SourceCompletionProvider::activate_proposal ( const Glib::RefPtr< SourceCompletionProposal >&  proposal,
const Gtk::TextIter iter 
)

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:
proposal A Gtk::SourceCompletionProposal.
iter A Gtk::TextIter.
Returns:
true to indicate that the proposal activation has been handled, false otherwise.
static void gtksourceview::SourceCompletionProvider::add_interface ( GType  gtype_implementer  )  [static]
SourceCompletionActivation gtksourceview::SourceCompletionProvider::get_activation (  )  const

Get with what kind of activation the provider should be activated.

Returns:
A combination of Gtk::SourceCompletionActivation.
Glib::RefPtr<const Gdk::Pixbuf> gtksourceview::SourceCompletionProvider::get_icon (  )  const

Get the icon of the provider.

Returns:
The icon to be used for the provider, or 0 if the provider does not have a special icon.
Glib::RefPtr<Gdk::Pixbuf> gtksourceview::SourceCompletionProvider::get_icon (  ) 

Get the icon of the provider.

Returns:
The icon to be used for the provider, or 0 if the provider does not have a special icon.
Gtk::Widget* gtksourceview::SourceCompletionProvider::get_info_widget ( const Glib::RefPtr< const SourceCompletionProposal >&  proposal  )  const

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, gtk_source_completion_provider_update_info MUST also be implemented. If not implemented, the default gtk_source_completion_proposal_get_info will be used to display extra information about a Gtk::SourceCompletionProposal.

Parameters:
proposal The currently selected Gtk::SourceCompletionProposal.
Returns:
A custom Gtk::Widget to show extra information about proposal.
int gtksourceview::SourceCompletionProvider::get_interactive_delay (  )  const

Get the delay in milliseconds before starting interactive completion for this provider.

A value of -1 indicates to use the default value as set by Gtk::SourceCompletion::auto-complete-delay.

Returns:
The interactive delay in milliseconds.
Glib::ustring gtksourceview::SourceCompletionProvider::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:
The name of the provider.
int gtksourceview::SourceCompletionProvider::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.
bool gtksourceview::SourceCompletionProvider::get_start_iter ( const Glib::RefPtr< const SourceCompletionContext >&  context,
const Glib::RefPtr< const SourceCompletionProposal >&  proposal,
Gtk::TextIter 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:
proposal A Gtk::SourceCompletionProposal.
context A Gtk::SourceCompletionContext.
iter A Gtk::TextIter.
Returns:
true if iter was set for proposal, false otherwise.
const GtkSourceCompletionProvider* gtksourceview::SourceCompletionProvider::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

GtkSourceCompletionProvider* gtksourceview::SourceCompletionProvider::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

bool gtksourceview::SourceCompletionProvider::match ( const Glib::RefPtr< const SourceCompletionContext >&  context  )  const

Get whether the provider match the context of completion detailed in context.

Parameters:
context The Gtk::SourceCompletionContext.
Returns:
true if provider matches the completion context, false otherwise.
void gtksourceview::SourceCompletionProvider::populate ( const Glib::RefPtr< SourceCompletionContext >&  context  ) 

Populate context with proposals from provider.

Parameters:
context The Gtk::SourceCompletionContext.
void gtksourceview::SourceCompletionProvider::update_info ( const Glib::RefPtr< const SourceCompletionProposal >&  proposal,
const SourceCompletionInfo 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 gtk_source_completion_provider_get_info_widget is implemented.

Parameters:
proposal A Gtk::SourceCompletionProposal.
info A Gtk::SourceCompletionInfo.

Friends And Related Function Documentation

Glib::RefPtr< gtksourceview::SourceCompletionProvider > wrap ( GtkSourceCompletionProvider *  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.

The documentation for this class was generated from the following file:

Generated on 13 Jan 2010 for gtksourceviewmm by  doxygen 1.6.1