summaryrefslogtreecommitdiffstats
path: root/src/FullPinyinEditor.h
blob: 9e95fa854dbf2c822f8646dba9b2e4b543b073e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef __PY_FULL_PINYIN_EDITOR_H_
#define __PY_FULL_PINYIN_EDITOR_H_

#include "PinyinEditor.h"

namespace PY {

class FullPinyinEditor : public PinyinEditor {

public:
    FullPinyinEditor (PinyinProperties & props);
    ~FullPinyinEditor (void);

public:
    /* virtual functions */
#if 0
    virtual gboolean processKeyEvent (guint keyval, guint keycode, guint modifiers);
#endif
    virtual void reset (void);

protected:
    gboolean insert (gint ch);

    gboolean removeCharBefore (void);
    gboolean removeCharAfter (void);
    gboolean removeWordBefore (void);
    gboolean removeWordAfter (void);

    gboolean moveCursorLeft (void);
    gboolean moveCursorRight (void);
    gboolean moveCursorLeftByWord (void);
    gboolean moveCursorRightByWord (void);
    gboolean moveCursorToBegin (void);
    gboolean moveCursorToEnd (void);

private:
    void updatePinyin (void);

};

};

#endif