| CandidateAll);
}
- // Fill the array "group" by candidates stating from INDEX.
- // INDEX must be a multiple of "column". Set NTIMES to the
- // number of valid candidates in "group". Update "block" if
- // necessary. Return "group".
+ // Fill the array "group" by candidates stating from START.
+ // START must be a multiple of "column". Return the number of
+ // valid candidates in "group".
private int fill_group (int start)
{
col = maxcol;
index = index - Column + col;
}
+
+ public override string ToString ()
+ {
+ return (String.Format ("<candidates row={0} col={1}>", row, index)
+ + Group
+ + "</candidates>");
+ }
}
internal class Selector : Xex.TermValue
private void set_cursor (string prefix, int pos)
{
cursor_pos = pos;
+ if (cursor_pos > 0)
+ candidates = (Candidates) preedit.GetProp (cursor_pos - 1,
+ Mcandidates);
+ else
+ candidates = null;
}
internal void reset ()
changed |= ChangedStatus.Preedit | ChangedStatus.CursorPos;
}
- private void update_candidate ()
+ private void update_candidate (Candidates candidates)
{
object candidate = candidates.Current;
preedit_replace (candidate_from, candidate_to, (int) candidate);
candidate_to = candidate_from + 1;
}
- preedit.PushProp (candidate_from, candidate_to,
- Mcandidates, this);
set_cursor ("update-candidate", candidate_to);
changed |= (ChangedStatus.Preedit | ChangedStatus.CursorPos
| CandidateAll);
{
this.candidates = candidates;
candidate_from = candidate_to = cursor_pos;
- update_candidate ();
+ update_candidate (candidates);
}
internal void select (int n)
if (candidates != null)
{
candidates.Select (n);
- update_candidate ();
+ update_candidate (null);
}
}