![]() |
![]() |
![]() |
GtkSourceCompletion 2.0 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
GscProposalPrivate; GscProposalClass; GscProposal; GscProposal * gsc_proposal_new (const gchar *label
,const gchar *info
,GdkPixbuf *icon
); const gchar * gsc_proposal_get_label (GscProposal *proposal
); const GdkPixbuf * gsc_proposal_get_icon (GscProposal *proposal
); void gsc_proposal_set_page_name (GscProposal *self
,const gchar *page_name
); const gchar * gsc_proposal_get_page_name (GscProposal *proposal
); const gchar * gsc_proposal_get_info (GscProposal *proposal
); void gsc_proposal_apply (GscProposal *proposal
,GtkTextView *view
);
"icon" gpointer : Read / Write "info" gchar* : Read / Write "label" gchar* : Read / Write "page-name" gchar* : Read / Write
Every proposal is an item into the popup. It controls the label to be shown, the help (info) and the apply when the user selects the proposal.
typedef struct { GObjectClass parent_class; gboolean (*apply) (GscProposal *proposal, GtkTextView *view); const gchar* (*get_info) (GscProposal *proposal); } GscProposalClass;
GscProposal * gsc_proposal_new (const gchar *label
,const gchar *info
,GdkPixbuf *icon
);
This function creates a new GscProposal. By default, when the user selects the proposal, the proposal label will be inserted into the GtkTextView. You can overwrite the apply and disply-info functions to overwrite the default.
|
Item label that will be shown in the completion popup. |
|
Item info markup that will be shown when the user select to view the item info. |
|
Item icon that will be shown in the completion popup |
Returns : |
A new GscProposal |
const gchar * gsc_proposal_get_label (GscProposal *proposal
);
|
|
Returns : |
The proposal label that will be shown into the popup |
const GdkPixbuf * gsc_proposal_get_icon (GscProposal *proposal
);
Gets the icon of this proposal
that will be shown into the popup.
|
|
Returns : |
the icon of this proposal that will be shown into the popup
|
void gsc_proposal_set_page_name (GscProposal *self
,const gchar *page_name
);
Sets the name of the page where this proposal will be shown.
If page_name
is NULL
the default page will be used.
|
The GscProposal |
|
The name for the page |
const gchar * gsc_proposal_get_page_name (GscProposal *proposal
);
Gets the page name where the proposal
will be placed.
|
|
Returns : |
the page name where the proposal will be placed.
|
const gchar * gsc_proposal_get_info (GscProposal *proposal
);
The completion calls this function when the user wants to see the proposal info. You can overwrite this function if you need to change the default mechanism.
|
|
Returns : |
The proposal info markup asigned for this proposal or NULL; |
void gsc_proposal_apply (GscProposal *proposal
,GtkTextView *view
);
The completion calls this function when the user selects the proposal. The default handler insert the proposal label into the view. You can overwrite this function.
|
|
|
The GtkTextView |
"info"
property"info" gchar* : Read / Write
Info to be shown for this proposal
Default value: NULL
"label"
property"label" gchar* : Read / Write
Label to be shown for this proposal
Default value: NULL
"page-name"
property"page-name" gchar* : Read / Write
Page name for this proposal
Default value: NULL