KkcCandidateList

KkcCandidateList — Object representing a candidate list.

Functions

Properties

gint cursor-pos Read / Write
guint page-size Read / Write
guint page-start Read / Write
gboolean page-visible Read
gboolean round Read / Write
gint size Read

Signals

void populated Run Last
void selected Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── KkcCandidateList

Description

Functions

kkc_candidate_list_get ()

KkcCandidate *
kkc_candidate_list_get (KkcCandidateList *self,
                        gint index);

Get the current candidate at the given index.

Parameters

self

the KkcCandidateList instance

 

index

 .

candidate position (-1 for the current cursor position)

.

[in]

Returns

a Candidate


kkc_candidate_list_select_at ()

gboolean
kkc_candidate_list_select_at (KkcCandidateList *self,
                              guint index_in_page);

Select a candidate in the current page.

Parameters

self

the KkcCandidateList instance

 

index_in_page

 .

cursor position in the page to select

.

[in]

Returns

`true` if a candidate is selected, `false` otherwise


kkc_candidate_list_select ()

void
kkc_candidate_list_select (KkcCandidateList *self);

Select the current candidate.

Parameters

self

the KkcCandidateList instance

 

kkc_candidate_list_first ()

gboolean
kkc_candidate_list_first (KkcCandidateList *self);

Select the first candidate.

Parameters

self

the KkcCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise


kkc_candidate_list_next ()

gboolean
kkc_candidate_list_next (KkcCandidateList *self);

Move cursor forward.

Parameters

self

the KkcCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise


kkc_candidate_list_previous ()

gboolean
kkc_candidate_list_previous (KkcCandidateList *self);

Move cursor backward.

Parameters

self

the KkcCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise


kkc_candidate_list_cursor_up ()

gboolean
kkc_candidate_list_cursor_up (KkcCandidateList *self);

Move cursor to the previous candidate.

Parameters

self

the KkcCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise.


kkc_candidate_list_cursor_down ()

gboolean
kkc_candidate_list_cursor_down (KkcCandidateList *self);

Move cursor to the next candidate.

Parameters

self

the KkcCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise


kkc_candidate_list_page_up ()

gboolean
kkc_candidate_list_page_up (KkcCandidateList *self);

Move cursor to the previous page.

Parameters

self

the KkcCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise


kkc_candidate_list_page_down ()

gboolean
kkc_candidate_list_page_down (KkcCandidateList *self);

Move cursor to the next page.

Parameters

self

the KkcCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise


kkc_candidate_list_new ()

KkcCandidateList *
kkc_candidate_list_new (guint page_start,
                        guint page_size,
                        gboolean round);

Create a new CandidateList.

Parameters

page_start

 .

starting index of pagination

.

[in]

page_size

 .

page size

.

[in]

round

 .

whether to loop over the candidate list

.

[in]

Returns

a new CandidateList


kkc_candidate_list_get_cursor_pos ()

gint
kkc_candidate_list_get_cursor_pos (KkcCandidateList *self);

Get and return the current value of the "cursor-pos" property.

Current cursor position.

Parameters

self

the KkcCandidateList instance to query

 

Returns

the value of the "cursor-pos" property


kkc_candidate_list_set_cursor_pos ()

void
kkc_candidate_list_set_cursor_pos (KkcCandidateList *self,
                                   gint value);

Set the value of the "cursor-pos" property to value .

Current cursor position.

Parameters

self

the KkcCandidateList instance to modify

 

value

the new value of the "cursor-pos" property

 

kkc_candidate_list_get_size ()

gint
kkc_candidate_list_get_size (KkcCandidateList *self);

Get and return the current value of the "size" property.

The number of candidate in the candidate list.

Parameters

self

the KkcCandidateList instance to query

 

Returns

the value of the "size" property


kkc_candidate_list_get_page_start ()

guint
kkc_candidate_list_get_page_start (KkcCandidateList *self);

Get and return the current value of the "page-start" property.

Starting index of paging.

Parameters

self

the KkcCandidateList instance to query

 

Returns

the value of the "page-start" property


kkc_candidate_list_set_page_start ()

void
kkc_candidate_list_set_page_start (KkcCandidateList *self,
                                   guint value);

Set the value of the "page-start" property to value .

Starting index of paging.

Parameters

self

the KkcCandidateList instance to modify

 

value

the new value of the "page-start" property

 

kkc_candidate_list_get_page_size ()

guint
kkc_candidate_list_get_page_size (KkcCandidateList *self);

Get and return the current value of the "page-size" property.

Page size.

Parameters

self

the KkcCandidateList instance to query

 

Returns

the value of the "page-size" property


kkc_candidate_list_set_page_size ()

void
kkc_candidate_list_set_page_size (KkcCandidateList *self,
                                  guint value);

Set the value of the "page-size" property to value .

Page size.

Parameters

self

the KkcCandidateList instance to modify

 

value

the new value of the "page-size" property

 

kkc_candidate_list_get_round ()

gboolean
kkc_candidate_list_get_round (KkcCandidateList *self);

Get and return the current value of the "round" property.

Flag to indicate whether to loop over the candidates.

Parameters

self

the KkcCandidateList instance to query

 

Returns

the value of the "round" property


kkc_candidate_list_set_round ()

void
kkc_candidate_list_set_round (KkcCandidateList *self,
                              gboolean value);

Set the value of the "round" property to value .

Flag to indicate whether to loop over the candidates.

Parameters

self

the KkcCandidateList instance to modify

 

value

the new value of the "round" property

 

kkc_candidate_list_get_page_visible ()

gboolean
kkc_candidate_list_get_page_visible (KkcCandidateList *self);

Get and return the current value of the "page-visible" property.

Flag to indicate whether page (lookup table) is visible.

Parameters

self

the KkcCandidateList instance to query

 

Returns

the value of the "page-visible" property

Types and Values

KKC_TYPE_CANDIDATE_LIST

#define KKC_TYPE_CANDIDATE_LIST (kkc_candidate_list_get_type ())

The type for KkcCandidateList.


struct KkcCandidateList

struct KkcCandidateList;

Object representing a candidate list.


struct KkcCandidateListClass

struct KkcCandidateListClass {
	GObjectClass parent_class;
	gboolean (*next) (KkcCandidateList* self);
	gboolean (*previous) (KkcCandidateList* self);
};

The class structure for KKC_TYPE_CANDIDATE_LIST. All the fields in this structure are private and should never be accessed directly.

Members

next ()

virtual method called by kkc_candidate_list_next()

 

previous ()

virtual method called by kkc_candidate_list_previous()

 

Property Details

The “cursor-pos” property

  “cursor-pos”               gint

Current cursor position.

Flags: Read / Write

Default value: 0


The “page-size” property

  “page-size”                guint

Page size.

Flags: Read / Write

Default value: 0


The “page-start” property

  “page-start”               guint

Starting index of paging.

Flags: Read / Write

Default value: 0


The “page-visible” property

  “page-visible”             gboolean

Flag to indicate whether page (lookup table) is visible.

Flags: Read

Default value: FALSE


The “round” property

  “round”                    gboolean

Flag to indicate whether to loop over the candidates.

Flags: Read / Write

Default value: FALSE


The “size” property

  “size”                     gint

The number of candidate in the candidate list.

Flags: Read

Default value: 0

Signal Details

The “populated” signal

void
user_function (KkcCandidateList *candidate_list,
               gpointer          user_data)

Signal emitted when candidates are filled and ready for traversal.

Parameters

candidate_list

the KkcCandidateList instance that received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “selected” signal

void
user_function (KkcCandidateList *candidate_list,
               KkcCandidate     *candidate,
               gpointer          user_data)

Signal emitted when a candidate is selected.

Parameters

candidate_list

the KkcCandidateList instance that received the signal

 

candidate

 .

selected candidate

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last