SkkCandidateList

SkkCandidateList — Base abstract class of candidate list.

Synopsis

#define             SKK_TYPE_CANDIDATE_LIST
SkkCandidate *      skk_candidate_list_get              (SkkCandidateList *self,
                                                         gint index);
gboolean            skk_candidate_list_cursor_up        (SkkCandidateList *self);
gboolean            skk_candidate_list_cursor_down      (SkkCandidateList *self);
gboolean            skk_candidate_list_page_up          (SkkCandidateList *self);
gboolean            skk_candidate_list_page_down        (SkkCandidateList *self);
gboolean            skk_candidate_list_next             (SkkCandidateList *self);
gboolean            skk_candidate_list_previous         (SkkCandidateList *self);
guint               skk_candidate_list_get_page_start_cursor_pos
                                                        (SkkCandidateList *self);
gboolean            skk_candidate_list_select_at        (SkkCandidateList *self,
                                                         guint index_in_page);
void                skk_candidate_list_select           (SkkCandidateList *self);
gint                skk_candidate_list_get_cursor_pos   (SkkCandidateList *self);
gint                skk_candidate_list_get_size         (SkkCandidateList *self);
guint               skk_candidate_list_get_page_start   (SkkCandidateList *self);
void                skk_candidate_list_set_page_start   (SkkCandidateList *self,
                                                         guint value);
guint               skk_candidate_list_get_page_size    (SkkCandidateList *self);
void                skk_candidate_list_set_page_size    (SkkCandidateList *self,
                                                         guint value);
gboolean            skk_candidate_list_get_page_visible (SkkCandidateList *self);
struct              SkkCandidateList;
struct              SkkCandidateListClass;

Object Hierarchy

  GObject
   +----SkkCandidateList

Properties

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

Signals

  "populated"                                      : Run Last
  "selected"                                       : Run Last

Description

Details

SKK_TYPE_CANDIDATE_LIST

#define SKK_TYPE_CANDIDATE_LIST (skk_candidate_list_get_type ())

The type for SkkCandidateList.


skk_candidate_list_get ()

SkkCandidate *      skk_candidate_list_get              (SkkCandidateList *self,
                                                         gint index);

Get the current candidate at the given index.

self :

the SkkCandidateList instance

index :

candidate position (-1 for the current cursor position). [in]

Returns :

a Candidate

skk_candidate_list_cursor_up ()

gboolean            skk_candidate_list_cursor_up        (SkkCandidateList *self);

Move cursor to the previous candidate.

self :

the SkkCandidateList instance

Returns :

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

skk_candidate_list_cursor_down ()

gboolean            skk_candidate_list_cursor_down      (SkkCandidateList *self);

Move cursor to the next candidate.

self :

the SkkCandidateList instance

Returns :

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

skk_candidate_list_page_up ()

gboolean            skk_candidate_list_page_up          (SkkCandidateList *self);

Move cursor to the previous page.

self :

the SkkCandidateList instance

Returns :

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

skk_candidate_list_page_down ()

gboolean            skk_candidate_list_page_down        (SkkCandidateList *self);

Move cursor to the next page.

self :

the SkkCandidateList instance

Returns :

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

skk_candidate_list_next ()

gboolean            skk_candidate_list_next             (SkkCandidateList *self);

Move cursor forward.

self :

the SkkCandidateList instance

Returns :

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

skk_candidate_list_previous ()

gboolean            skk_candidate_list_previous         (SkkCandidateList *self);

Move cursor backward.

self :

the SkkCandidateList instance

Returns :

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

skk_candidate_list_get_page_start_cursor_pos ()

guint               skk_candidate_list_get_page_start_cursor_pos
                                                        (SkkCandidateList *self);

Return cursor position of the beginning of the current page.

self :

the SkkCandidateList instance

Returns :

cursor position

skk_candidate_list_select_at ()

gboolean            skk_candidate_list_select_at        (SkkCandidateList *self,
                                                         guint index_in_page);

Select a candidate in the current page.

self :

the SkkCandidateList instance

index_in_page :

cursor position in the page to select. [in]

Returns :

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

skk_candidate_list_select ()

void                skk_candidate_list_select           (SkkCandidateList *self);

Select the current candidate.

self :

the SkkCandidateList instance

skk_candidate_list_get_cursor_pos ()

gint                skk_candidate_list_get_cursor_pos   (SkkCandidateList *self);

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

self :

the SkkCandidateList instance to query

Returns :

the value of the "cursor-pos" property

skk_candidate_list_get_size ()

gint                skk_candidate_list_get_size         (SkkCandidateList *self);

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

self :

the SkkCandidateList instance to query

Returns :

the value of the "size" property

skk_candidate_list_get_page_start ()

guint               skk_candidate_list_get_page_start   (SkkCandidateList *self);

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

self :

the SkkCandidateList instance to query

Returns :

the value of the "page-start" property

skk_candidate_list_set_page_start ()

void                skk_candidate_list_set_page_start   (SkkCandidateList *self,
                                                         guint value);

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

self :

the SkkCandidateList instance to modify

value :

the new value of the "page-start" property

skk_candidate_list_get_page_size ()

guint               skk_candidate_list_get_page_size    (SkkCandidateList *self);

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

self :

the SkkCandidateList instance to query

Returns :

the value of the "page-size" property

skk_candidate_list_set_page_size ()

void                skk_candidate_list_set_page_size    (SkkCandidateList *self,
                                                         guint value);

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

self :

the SkkCandidateList instance to modify

value :

the new value of the "page-size" property

skk_candidate_list_get_page_visible ()

gboolean            skk_candidate_list_get_page_visible (SkkCandidateList *self);

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

self :

the SkkCandidateList instance to query

Returns :

the value of the "page-visible" property

struct SkkCandidateList

struct SkkCandidateList;

Base abstract class of candidate list.


struct SkkCandidateListClass

struct SkkCandidateListClass {
	GObjectClass parent_class;
	SkkCandidate* (*get) (SkkCandidateList* self, gint index);
	void (*clear) (SkkCandidateList* self);
	void (*add_candidates) (SkkCandidateList* self, SkkCandidate** array, int array_length1);
	void (*add_candidates_end) (SkkCandidateList* self);
	gboolean (*cursor_up) (SkkCandidateList* self);
	gboolean (*cursor_down) (SkkCandidateList* self);
	gboolean (*page_up) (SkkCandidateList* self);
	gboolean (*page_down) (SkkCandidateList* self);
	gboolean (*next) (SkkCandidateList* self);
	gboolean (*previous) (SkkCandidateList* self);
	gboolean (*select_at) (SkkCandidateList* self, guint index_in_page);
	void (*select) (SkkCandidateList* self);
	gint (*get_cursor_pos) (SkkCandidateList* self);
	gint (*get_size) (SkkCandidateList* self);
	guint (*get_page_start) (SkkCandidateList* self);
	void (*set_page_start) (SkkCandidateList* self, guint value);
	guint (*get_page_size) (SkkCandidateList* self);
	void (*set_page_size) (SkkCandidateList* self, guint value);
	gboolean (*get_page_visible) (SkkCandidateList* self);
};

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

GObjectClass parent_class;

the parent class structure

get ()

clear ()

add_candidates ()

add_candidates_end ()

cursor_up ()

virtual method called by skk_candidate_list_cursor_up()

cursor_down ()

virtual method called by skk_candidate_list_cursor_down()

page_up ()

virtual method called by skk_candidate_list_page_up()

page_down ()

virtual method called by skk_candidate_list_page_down()

next ()

virtual method called by skk_candidate_list_next()

previous ()

virtual method called by skk_candidate_list_previous()

select_at ()

virtual method called by skk_candidate_list_select_at()

select ()

virtual method called by skk_candidate_list_select()

get_cursor_pos ()

getter method for the abstract property "cursor-pos"

get_size ()

getter method for the abstract property "size"

get_page_start ()

getter method for the abstract property "page-start"

set_page_start ()

setter method for the abstract property "page-start"

get_page_size ()

getter method for the abstract property "page-size"

set_page_size ()

setter method for the abstract property "page-size"

get_page_visible ()

getter method for the abstract property "page-visible"

Property Details

The "cursor-pos" property

  "cursor-pos"               gint                  : Read

Current cursor position.

Default value: 0


The "page-size" property

  "page-size"                guint                 : Read / Write

Page size.

Default value: 0


The "page-start" property

  "page-start"               guint                 : Read / Write

Starting index of paging.

Default value: 0


The "page-visible" property

  "page-visible"             gboolean              : Read

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

Default value: FALSE


The "size" property

  "size"                     gint                  : Read

The number of candidate in the candidate list.

Default value: 0

Signal Details

The "populated" signal

void                user_function                      (SkkCandidateList *candidate_list,
                                                        gpointer          user_data)           : Run Last

Signal emitted when candidates are filled and ready for traversal.

candidate_list :

the SkkCandidateList instance that received the signal

user_data :

user data set when the signal handler was connected.

The "selected" signal

void                user_function                      (SkkCandidateList *candidate_list,
                                                        SkkCandidate     *candidate,
                                                        gpointer          user_data)           : Run Last

Signal emitted when a candidate is selected.

candidate_list :

the SkkCandidateList instance that received the signal

candidate :

selected candidate

user_data :

user data set when the signal handler was connected.