mspinbox.h

Go to the documentation of this file.
00001 
00018 #ifdef _MGNCSCTRL_SPINBOX
00019 
00020 #ifndef _MGUI_NCSCTRL_SPINBOX_H
00021 #define _MGUI_NCSCTRL_SPINBOX_H
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif  /* __cplusplus */
00026 
00032 /*
00033  * \def NCSCTRL_SPINBOX
00034  * \brief the name of spinbox control
00035 */
00036 #define NCSCTRL_SPINBOX   NCSCLASSNAME("spinbox")
00037 
00038 #define NCS_LEN_SPINBOX     63
00039 
00040 typedef struct _mSpinBox            mSpinBox;
00041 typedef struct _mSpinBoxClass       mSpinBoxClass;
00042 typedef struct _mSpinBoxRenderer    mSpinBoxRenderer;
00043 
00044 typedef struct _mSpinBoxItemInfo    mSpinBoxItemInfo;
00045 #define mSpinBoxHeader(clsName)     \
00046     mSpinnerHeader(clsName)      \
00047         union {                         \
00048                 char* num_format;           \
00049                 mSpinBoxItemInfo *items;    \
00050         }info;
00051 
00058 struct _mSpinBox
00059 {
00060         mSpinBoxHeader(mSpinBox)
00061 };
00062 
00063 #define mSpinBoxClassHeader(clsName, parentClass)   \
00064         mSpinnerClassHeader(clsName, parentClass)       \
00065     BOOL (*addItem)(clsName *self, char *item);    \
00066     BOOL (*removeItem)(clsName *self, int index);  \
00067     BOOL (*setItem)(clsName *self, int index, char *item);     \
00068     char* (*getItem)(clsName *self, int index);
00069 
00094 struct _mSpinBoxClass
00095 {
00096         mSpinBoxClassHeader(mSpinBox, mSpinner)
00097 };
00098 
00099 MGNCS_EXPORT extern mSpinBoxClass g_stmSpinBoxCls;
00100 
00101 #define mSpinBoxRendererHeader(clsName, parentClass)    \
00102         mSpinnerRendererHeader(clsName, parentClass)
00103 
00110 struct _mSpinBoxRenderer
00111 {
00112         mSpinBoxRendererHeader(mSpinBox, mSpinner)
00113 };
00114 
00116 enum mSpinBoxProp {
00117     NCSP_SPNBOX_MAXPOS = NCSP_SPNR_MAXPOS,      
00118     NCSP_SPNBOX_MINPOS = NCSP_SPNR_MINPOS,      
00119     NCSP_SPNBOX_CURPOS = NCSP_SPNR_CURPOS,      
00120     NCSP_SPNBOX_LINESTEP = NCSP_SPNR_LINESTEP,  
00121     NCSP_SPNBOX_MAX = NCSP_SPNR_MAX
00122 };
00123 
00124 
00129 #define NCSS_SPNBOX_VERTICAL           (NCSS_SPNR_VERTICAL)
00130 
00135 #define NCSS_SPNBOX_HORIZONTAL         (NCSS_SPNR_HORIZONTAL)
00136 
00141 #define NCSS_SPNBOX_AUTOLOOP           (NCSS_SPNR_AUTOLOOP)
00142 
00147 #define NCSS_SPNBOX_NUMBER             (0x0000L<<NCSS_SPNR_SHIFT)
00148 
00153 #define NCSS_SPNBOX_STRING             (0x0001L<<NCSS_SPNR_SHIFT)
00154 
00159 #define NCSS_SPNBOX_SORT               (0x0002L<<NCSS_SPNR_SHIFT)
00160 
00165 #define NCSS_SPNBOX_EDITNOBORDER       (0x0004L<<NCSS_SPNR_SHIFT)
00166 
00171 #define NCSS_SPNBOX_EDITBASELINE       (0x0008L<<NCSS_SPNR_SHIFT)
00172 
00177 #define NCSS_SPNBOX_READONLY           (0x0010L<<NCSS_SPNR_SHIFT)
00178 
00183 #define NCSS_SPNBOX_UPPERCASE          (0x0020L<<NCSS_SPNR_SHIFT)
00184 
00189 #define NCSS_SPNBOX_LOWERCASE          (0x0040L<<NCSS_SPNR_SHIFT)
00190 
00195 #define NCSS_SPNBOX_AUTOFOCUS          (0x0080L<<NCSS_SPNR_SHIFT)
00196 
00197 #define NCSS_SPNBOX_SHIFT      (NCSS_SPNR_SHIFT + 9)
00198 
00199 
00201 enum mSpinBoxNotify {
00202     NCSN_SPNBOX_CHANGED = NCSN_SPNR_CHANGED,    
00203     NCSN_SPNBOX_REACHMAX = NCSN_SPNR_REACHMAX,  
00204     NCSN_SPNBOX_REACHMIN = NCSN_SPNR_REACHMIN,  
00205     NCSN_SPNBOX_MAX = NCSN_SPNR_MAX
00206 };
00207 
00211 
00212 #define NCSST_SPNBOX_NORMAL        0x0000
00213 #define NCSST_SPNBOX_DISABLE       0x0001
00214 #define NCSST_SPNBOX_HILIGHT       0x0002
00215 #define NCSST_SPNBOX_PUSHED        0x0004
00216 
00219 #ifdef __cplusplus
00220 }
00221 #endif  /* __cplusplus */
00222 
00223 #endif /* _MGUI_NCSCTRL_SPINBOX_H */
00224 #endif //_MGNCSCTRL_SPINBOX
Generated on Fri Jun 10 11:18:06 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3