mime-wordsel.h

00001 #ifdef _MGNCSCTRL_IMWORDSEL
00002 
00003 #ifndef _MGUI_IM_WORDSEL_H
00004 #define _MGUI_IM_WORDSEL_H
00005 
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009 
00010 #define NCSCTRL_IMWORDSEL  NCSCLASSNAME("imwordsel")
00011 
00012 typedef struct _mIMWordSelClass mIMWordSelClass;
00013 typedef struct _mIMWordSel      mIMWordSel;
00014 typedef struct _mIMWordSelRenderer mIMWordSelRenderer;
00015 
00016 #define mIMWordSelClassHeader(clss, super)                  \
00017         mWidgetClassHeader(clss, super)                     \
00018         BOOL  (*nextPage)(clss*);                           \
00019         BOOL  (*prevPage)(clss*);                           \
00020         BOOL  (*selNext)(clss*);                            \
00021         BOOL  (*selPrev)(clss*);
00022 
00023 #define mIMWordSelHeader(clss)                              \
00024         mWidgetHeader(clss)                                 \
00025         mIMIterator*  ime_it;                               \
00026     BOOL          isactive;                             \
00027         int           cur_sel;                              \
00028         int           page_start:16;                        \
00029         int           page_end:16;                          \
00030 //      CHARSET_CONVERTER * charset_converter;
00031 
00032 struct _mIMWordSelClass {
00033         mIMWordSelClassHeader(mIMWordSel, mWidget)
00034 };
00035 
00036 struct _mIMWordSel {
00037         mIMWordSelHeader(mIMWordSel)
00038 };
00039 
00040 MGNCS_EXPORT extern mIMWordSelClass g_stmIMWordSelCls;
00041 
00042 #define mIMWordSelRendererHeader(clss, super)         \
00043         mWidgetRendererHeader(clss, super)
00044 
00045 struct _mIMWordSelRenderer {
00046         mIMWordSelRendererHeader(mIMWordSel, mWidget)
00047 };
00048 
00049 enum mIMWordSelProp {
00050         NCSP_IMWS_ITERATOR  = NCSP_WIDGET_MAX + 1,
00051         NCSP_IMWS_CURSEL,
00052         NCSP_IMWS_CURWORD, //return mIMIterator*, whose current value is the word selected
00053         NCSP_IMWS_CURRAWWORD, //raw word, not convert it to the encoding need by application
00054 //      NCSP_IMWS_CHARSETCONVERTER,
00055         NCSP_IMWS_ISEMPTY,
00056     NCSP_IMWS_ISACTIVE,
00057         NCSP_IMWS_MAX
00058 };
00059 
00060 #define mIMWordSel_isEmpty(self)  \
00061         (BOOL)(_c((mIMWordSel*)(self))->getProperty((mIMWordSel*)(self), NCSP_IMWS_ISEMPTY))
00062 
00063 #define mIMWordSel_getCurSel(self)  \
00064         ((int)(NCS_GET_PROP(self, NCSP_IMWS_CURSEL)))
00065 #define mIMWordSel_setCurSel(self, int_v)  \
00066          NCS_SET_PROP(self, NCSP_IMWS_CURSEL,(DWORD)(int_v))
00067 
00068 #define mIMWordSel_getCurWord(self)  \
00069         ((const char*)(NCS_GET_PROP(self, NCSP_IMWS_CURWORD)))
00070 #define mIMWordSel_setCurWord(self, const_char_v) \
00071         NCS_SET_PROP(self, NCSP_IMWS_CURWORD, (DWORD)(const_char_v))
00072 
00073 enum mIMWordSelEvent {
00074         NCSN_IMWS_SELCHANGED = NCSN_WIDGET_MAX + 1,
00075         NCSN_IMWS_MAX
00076 };
00077 
00078 #ifdef __cplusplus
00079 }
00080 #endif
00081 
00082 #endif
00083 #endif          //_MGNCSCTRL_IMWORDSEL
00084 
Generated on Fri Jun 10 11:18:06 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3