NimfCandidatable 3 NIMF Library
NimfCandidatable

## Functions

void | nimf_candidatable_show ()
void | nimf_candidatable_hide ()
gboolean | nimf_candidatable_is_visible ()
void | nimf_candidatable_clear ()
void | nimf_candidatable_set_page_values ()
void | nimf_candidatable_append ()
gint | nimf_candidatable_get_selected_index ()
gchar * | nimf_candidatable_get_selected_text ()
void | nimf_candidatable_select_first_item_in_page ()
void | nimf_candidatable_select_last_item_in_page ()
void | nimf_candidatable_select_item_by_index_in_page ()
void | nimf_candidatable_select_previous_item ()
void | nimf_candidatable_select_next_item ()
void | nimf_candidatable_set_auxiliary_text ()

## Types and Values

#define | NIMF_TYPE_CANDIDATABLE
struct | NimfCandidatableInterface
| NimfCandidatable

## Object Hierarchy

        GInterface
        ╰── NimfCandidatable

## Prerequisites

NimfCandidatable requires GObject.

## Description

## Functions

### nimf_candidatable_show ()

    void
    nimf_candidatable_show (NimfCandidatable *candidatable,
                            NimfServiceIC *target,
                            gboolean show_entry);

#### Parameters

candidatable | a NimfCandidatable |
target | a NimfServiceIC |
show_entry | `TRUE` if the entry for auxiliary text should be shown |

nimf_candidatable_show

### nimf_candidatable_hide ()

    void
    nimf_candidatable_hide (NimfCandidatable *candidatable);

Hides the candidatable

#### Parameters

candidatable | a NimfCandidatable |

nimf_candidatable_hide

### nimf_candidatable_is_visible ()

    gboolean
    nimf_candidatable_is_visible (NimfCandidatable *candidatable);

#### Parameters

candidatable | a NimfCandidatable |

#### Returns

`TRUE` if the candidatable is visible

nimf_candidatable_is_visible

### nimf_candidatable_clear ()

    void
    nimf_candidatable_clear (NimfCandidatable *candidatable,
                             NimfServiceIC *target);

Clears the contents of the candidatable

#### Parameters

candidatable | a NimfCandidatable |
target | a NimfServiceIC |

nimf_candidatable_clear

### nimf_candidatable_set_page_values ()

    void
    nimf_candidatable_set_page_values (NimfCandidatable *candidatable,
                                       NimfServiceIC *target,
                                       gint page_index,
                                       gint n_pages,
                                       gint page_size);

Sets page values.

#### Parameters

candidatable | a NimfCandidatable |
target | a NimfServiceIC |
page_index | page index |
n_pages | the number of pages |
page_size | page size |

nimf_candidatable_set_page_values

### nimf_candidatable_append ()

    void
    nimf_candidatable_append (NimfCandidatable *candidatable,
                              const gchar *text1,
                              const gchar *text2);

After appending a row, adds text1 to the first column and text2 to the second column.

#### Parameters

candidatable | a NimfCandidatable |
text1 | text for the first column; text1 must be non-`NULL`. |
text2 | text for the second column; text2 allows `NULL`. | [nullable]

nimf_candidatable_append

### nimf_candidatable_get_selected_index ()

    gint
    nimf_candidatable_get_selected_index (NimfCandidatable *candidatable);

#### Parameters

candidatable | a NimfCandidatable |

#### Returns

index of the selected row

nimf_candidatable_get_selected_index

### nimf_candidatable_get_selected_text ()

    gchar *
    nimf_candidatable_get_selected_text (NimfCandidatable *candidatable);

#### Parameters

candidatable | a NimfCandidatable |

#### Returns

text of the first column in the selected row

nimf_candidatable_get_selected_text

### nimf_candidatable_select_first_item_in_page ()

    void
    nimf_candidatable_select_first_item_in_page
                                   (NimfCandidatable *candidatable);

Selects the first item in the page.

#### Parameters

candidatable | a NimfCandidatable |

nimf_candidatable_select_first_item_in_page

### nimf_candidatable_select_last_item_in_page ()

    void
    nimf_candidatable_select_last_item_in_page
                                   (NimfCandidatable *candidatable);

Selects the last item in the page.

#### Parameters

candidatable | a NimfCandidatable |

nimf_candidatable_select_last_item_in_page

### nimf_candidatable_select_item_by_index_in_page ()

    void
    nimf_candidatable_select_item_by_index_in_page
                                   (NimfCandidatable *candidatable,
                                    gint index);

Selects an item by the index in the page.

#### Parameters

candidatable | a NimfCandidatable |
index | a gint |

nimf_candidatable_select_item_by_index_in_page

### nimf_candidatable_select_previous_item ()

    void
    nimf_candidatable_select_previous_item
                                   (NimfCandidatable *candidatable);

Selects the previous item.

#### Parameters

candidatable | a NimfCandidatable |

nimf_candidatable_select_previous_item

### nimf_candidatable_select_next_item ()

    void
    nimf_candidatable_select_next_item (NimfCandidatable *candidatable);

Selects the next item.

#### Parameters

candidatable | a NimfCandidatable |

nimf_candidatable_select_next_item

### nimf_candidatable_set_auxiliary_text ()

    void
    nimf_candidatable_set_auxiliary_text (NimfCandidatable *candidatable,
                                          const gchar *text,
                                          gint cursor_pos);

Sets auxiliary text.

#### Parameters

candidatable | a NimfCandidatable |
text | text |
cursor_pos | cursor position within text |

nimf_candidatable_set_auxiliary_text

## Types and Values

### NIMF_TYPE_CANDIDATABLE

    #define NIMF_TYPE_CANDIDATABLE nimf_candidatable_get_type ()

NIMF_TYPE_CANDIDATABLE

### struct NimfCandidatableInterface

    struct NimfCandidatableInterface {
      GTypeInterface parent;

      void     (* show)                         (NimfCandidatable *candidatable,
                                                 NimfServiceIC    *target,
                                                 gboolean          show_entry);
      void     (* hide)                         (NimfCandidatable *candidatable);
      gboolean (* is_visible)                   (NimfCandidatable *candidatable);
      void     (* clear)                        (NimfCandidatable *candidatable,
                                                 NimfServiceIC    *target);
      void     (* set_page_values)              (NimfCandidatable *candidatable,
                                                 NimfServiceIC    *target,
                                                 gint              page_index,
                                                 gint              n_pages,
                                                 gint              page_size);
      void     (* append)                       (NimfCandidatable *candidatable,
                                                 const gchar      *item1,
                                                 const gchar      *item2);
      gint     (* get_selected_index)           (NimfCandidatable *candidatable);
      gchar *  (* get_selected_text)            (NimfCandidatable *candidatable);
      void     (* select_first_item_in_page)    (NimfCandidatable *candidatable);
      void     (* select_last_item_in_page)     (NimfCandidatable *candidatable);
      void     (* select_item_by_index_in_page) (NimfCandidatable *candidatable,
                                                 gint              index);
      void     (* select_previous_item)         (NimfCandidatable *candidatable);
      void     (* select_next_item)             (NimfCandidatable *candidatable);
      void     (* set_auxiliary_text)           (NimfCandidatable *candidatable,
                                                 const gchar      *text,
                                                 gint              cursor_pos);
    };

Provides an interface for candidate window.

#### Members

GTypeInterface parent; | The parent interface. |
show () | Shows the candidatable. |
hide () | Hides the candidatable. |
is_visible () | Determines whether the candidatable is visible. |
clear () | Clears the contents of the candidatable. |
set_page_values () | Sets page values. |
append () | Appends a new candidate. |
get_selected_index () | Gets the index of the selected candidatable. |
get_selected_text () | Gets the text of the selected candidatable. |
select_first_item_in_page () | Selects first item in page. |
select_last_item_in_page () | Selects last item in page. |
select_item_by_index_in_page () | Selects item in page with the index given as the argument. |
select_previous_item () | Selects previus item. |
select_next_item () | Selects a next item. |
set_auxiliary_text () | Selects auxiliary text. |

NimfCandidatableInterface

### NimfCandidatable

    typedef struct _NimfCandidatable NimfCandidatable;

NimfCandidatable