00001
00002 #ifndef PIECE_ID_H
00003 #define PIECE_ID_H
00004
00008 enum SysPiecePropsRange{
00009 SYS_PIECE_PROP_BEGIN = 1,
00010 PIECECOMM_PROP_BEGIN = SYS_PIECE_PROP_BEGIN,
00011 PIECECOMM_PROP_ALIGN,
00012 PIECECOMM_PROP_VALIGN,
00013 PIECECOMM_PROP_AUTOWRAP,
00014 PIECECOMM_PROP_WORDBREAK,
00015 PIECECOMM_PROP_DRAWMOD,
00016 PIECECOMM_PROP_DIRECTION,
00017 PIECECOMM_PROP_SPACE,
00018 PIECECOMM_PROP_MARGIN,
00019 PIECECOMM_PROP_MAX,
00020 PIECECOMM_PROP_POS,
00021 PIECECOMM_PROP_MIN,
00022 PIECECOMM_PROP_LINESTEP,
00023 PIECECOMM_PROP_PAGESTEP,
00024 PIECECOMM_PROP_SELECT,
00025 PIECECOMM_PROP_END = PIECECOMM_PROP_BEGIN + 256,
00026
00027 HOTPIECE_PROP_BEGIN,
00028 HOTPIECE_PROP_END,
00029
00030
00031 LABELPIECE_PROP_BEGIN,
00032 LABELPIECE_PROP_END = LABELPIECE_PROP_BEGIN + 10,
00033
00034 LEDLBLPIECE_PROP_BEGIN,
00035 LEDLBLPIECE_PROP_END = LEDLBLPIECE_PROP_BEGIN + 10,
00036
00037 ANIMATEPIECE_PROP_BEGIN,
00038 ANIMATEPIECE_PROP_END = ANIMATEPIECE_PROP_BEGIN + 10,
00039
00040 IMAGEPIECE_PROP_BEGIN,
00041 IMAGEPIECE_PROP_END = IMAGEPIECE_PROP_BEGIN + 10,
00042
00043 IMAGELABELPIECE_PROP_BEGIN,
00044 IMAGELABELPIECE_PROP_END = IMAGELABELPIECE_PROP_BEGIN + 10,
00045
00046 ABP_PROP_BEGIN,
00047 ABP_PROP_END = ABP_PROP_BEGIN + 10,
00048
00049 PAIRPIECE_PROP_BEGIN,
00050 PAIRPIECE_PROP_END = PAIRPIECE_PROP_BEGIN + 10,
00051
00052 SLIDERPIECE_PROP_BEGIN,
00053 SLIDERPIECE_PROP_END = SLIDERPIECE_PROP_BEGIN + 10,
00054
00055 BOXLAYOUTPIECE_PROP_BEGIN,
00056 BOXLAYOUTPIECE_PROP_END = BOXLAYOUTPIECE_PROP_BEGIN + 10,
00057
00058 SPINBOXPIECE_PROP_BEGIN,
00059 SPINBOXPIECE_PROP_END = SPINBOXPIECE_PROP_BEGIN + 10,
00060
00061 GRIDBOXPIECE_PROP_BEGIN,
00062 GRIDBOXPIECE_PROP_END = GRIDBOXPIECE_PROP_BEGIN + 10,
00063
00064 DAYGRIDPIECE_PROP_BEGIN,
00065 DAYGRIDPIECE_PROP_END = DAYGRIDPIECE_PROP_BEGIN + 10,
00066
00067 CHECKBUTTONPIECE_PROP_BEGIN,
00068 CHECKBUTTONPIECE_PROP_END = CHECKBUTTONPIECE_PROP_BEGIN + 10,
00069
00070 WEEKHEADPIECE_PROP_BEGIN,
00071 WEEKHEADPIECE_PROP_END = WEEKHEADPIECE_PROP_BEGIN + 10,
00072
00073 MONTHPIECE_PROP_BEGIN,
00074 MONTHPIECE_PROP_END = MONTHPIECE_PROP_BEGIN + 10,
00075
00076 MLISTSPINNEDPIECE_PROP_BEGIN,
00077 MLISTSPINNEDPIECE_PROP_END = MLISTSPINNEDPIECE_PROP_BEGIN + 10,
00078
00079 TOOLIMAGEPIECE_PROP_BEGIN,
00080 TOOLIMAGEPIECE_PROP_END = TOOLIMAGEPIECE_PROP_BEGIN + 10,
00081
00082 LINELAYOUTPIECE_PROP_BEGIN,
00083 LINELAYOUTPIECE_PROP_END = LINELAYOUTPIECE_PROP_BEGIN + 10,
00084
00085 PROGRESSPIECE_PROP_BEGIN,
00086 PROGRESSPIECE_PROP_END = PROGRESSPIECE_PROP_BEGIN + 10,
00087
00088 RECTPIECE_PROP_BEGIN,
00089 RECTPIECE_PROP_END = RECTPIECE_PROP_BEGIN + 10,
00090
00091 SIMPLELISTPIECE_PROP_BEGIN,
00092 SIMPLELISTPIECE_PROP_END = SIMPLELISTPIECE_PROP_BEGIN + 10,
00093
00094 SYS_PIECE_PROP_END = 10000,
00095 USER_PIECE_PROP_BEGIN
00096 };
00097
00101 enum mSysPieceEventRange
00102 {
00103 SYS_PIECE_EVENT_BEGIN = 1,
00104
00105 ABP_EVENT_BEGIN,
00106
00107 ABP_EVENT_END = ABP_EVENT_BEGIN + 10,
00108
00109 SLIDERPIECE_EVENT_BEGIN,
00110 SLIDERPIECE_EVENT_END = SLIDERPIECE_EVENT_BEGIN + 10,
00111
00112 SPINBOXPIECE_EVENT_BEGIN,
00113 SPINBOXPIECE_EVENT_END = SPINBOXPIECE_EVENT_BEGIN + 10,
00114
00115
00116 MONTHPIECE_EVENT_BEGIN,
00117 MONTHPIECE_EVENT_END = MONTHPIECE_EVENT_BEGIN + 10,
00118
00119
00120 SIMPLELISTPIECE_EVENT_BEGIN,
00121 SIMPLELISTPIECE_EVENT_END = SIMPLELISTPIECE_EVENT_BEGIN + 10,
00122
00123 SYS_PIECE_EVENT_END = 10000,
00124
00125 USER_PIECE_EVENT_BEGIN,
00126 };
00127
00132 enum PieceState{
00133 PIECE_STATE_NORMAL = 0,
00134 PIECE_STATE_HILIGHT,
00135 PIECE_STATE_PUSHED,
00136 PIECE_STATE_CAPTURED,
00137 PIECE_STATE_DISABLE
00138 };
00139
00140 enum PieceCheckState{
00141 PIECE_CHECKSTATE_UNCHECKED = 0,
00142 PIECE_CHECKSTATE_HALFCHECKED,
00143 PIECE_CHECKSTATE_CHECKED
00144 };
00145
00154 #define NCS_PIECE_PAINT_STATE_MASK 0x000F
00155 #define NCS_PIECE_PAINT_CHECK_STATE_MASK 0x00F0
00156 #define NCS_PIECE_PAINT_GET_CHECK(add_data) (((add_data)&NCS_PIECE_PAINT_CHECK_STATE_MASK)>>4)
00157 #define NCS_PIECE_PAINT_MAKE_CHECK(value) \
00158 (((value)&0xF)<<4)
00159
00163 #define NCS_PIECE_PAINT_ARROW_MASK 0x300
00164 #define NCS_PIECE_PAINT_ARROW_SHIFT 8
00165 #define NCS_PIECE_PAINT_ARROW_SHELL 0x400
00166 enum mArrowPieceType {
00167 NCS_ARROWPIECE_LEFT = 0x00,
00168 NCS_ARROWPIECE_RIGHT = 0x100,
00169 NCS_ARROWPIECE_UP = 0x200,
00170 NCS_ARROWPIECE_DOWN = 0x300
00171 };
00175 #define NCS_PIECE_PAINT_FLAT 0x010000 //flat style
00176
00177
00181 enum mLayoutPieceSizeType {
00182 NCS_LAYOUTPIECE_ST_FIXED = 0,
00183 NCS_LAYOUTPIECE_ST_PERCENT,
00184 NCS_LAYOUTPIECE_ST_AUTO
00185 };
00186
00187 #define mLayoutPiece_getSizeType(size) (((size)&0xC000)>>6)
00188 #define mLayoutPiece_setSizeType(size, type) ((size)=((size)&0x3FFF)|((type)<<6))
00189 #define mLayoutPiece_setSize(size, value) ((size)=((size)&0xC000)|((value)&0x3FFF))
00190 #define mLayoutPiece_getSize(size) ((size)&0x3FFF)
00191
00192
00196 #define NCS_PIECE_PAINT_VERT 0x00010000
00197 #define NCS_PIECE_PAINT_TICK 0x00020000
00198
00199 #define NCS_PIECE_PAINT_BLOCK 0x00040000
00200 #define NCS_PIECE_PAINT_PERCENT 0x00080000
00201
00202 #endif
00203