![]() |
![]() |
![]() |
GtkSourceCompletion Reference Manual | ![]() |
---|---|---|---|---|
#define GSC_PROPOSAL_DEFAULT_PAGE #define GSC_PROPOSAL_DEFAULT_PRIORITY GscProposalPrivate; GscProposal; GscProposal* gsc_proposal_new (const gchar *label, const gchar *info, const 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
GscProposal* gsc_proposal_new (const gchar *label, const gchar *info, const GdkPixbuf *icon);
This function creates a new proposal. By default, when the user selects the proposal, the proposal label will be inserted into the GtkTextView. You can connect to apply and disply-info signals to overwrite the default functions
|
Item label that will be shown in the completion popup. We copy this string |
|
Item info markup that will be shown when the user select to view the item info. We copy this string |
|
Item icon that will be shown in the completion popup |
Returns : |
The new GscProposal |
const gchar* gsc_proposal_get_label (GscProposal *proposal);
|
The GscProposal |
Returns : |
The proposal label that will be shown into the popup |
const GdkPixbuf* gsc_proposal_get_icon (GscProposal *proposal);
|
The GscProposal |
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);
|
|
|
The page name where this proposal will be shown. If NULL the default page will be used. |
const gchar* gsc_proposal_get_page_name (GscProposal *proposal);
|
The GscProposal |
Returns : |
the page name where the proposal will be placed. |
const gchar* gsc_proposal_get_info (GscProposal *proposal);
|
The GscProposal |
Returns : |
The proposal info markup asigned for this proposal. The completion calls this function when the user want to view the proposal info. You can overwrite this function if you need to change the default mechanism |
void gsc_proposal_apply (GscProposal *proposal, GtkTextView *view);
The completion calls this function when the user selects the proposal. This function emits the "apply" signal. The default handler insert the proposal label into the view. You can overwrite this signal.
|
The GscProposal |
|
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
"apply"
signalgboolean user_function (GscProposal *proposal, gpointer view, gpointer user_data) : Run Last / Action
The ::apply signal is emitted when the proposal has been selected and must to be applied.
|
The proposal who emits the signal |
|
The GtkTextView where the proposal must be applied |
|
user data set when the signal handler was connected. |