mslider.h

Go to the documentation of this file.
00001 
00018 #ifdef _MGNCSCTRL_SLIDER
00019 
00020 #ifndef _MGUI_NCSCTRL_SLIDER_H
00021 #define _MGUI_NCSCTRL_SLIDER_H
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif  /* __cplusplus */
00026 
00032 /*
00033  * \def NCSCTRL_SLIDER
00034  * \brief the name of slider control
00035 */
00036 
00037 #define NCSCTRL_SLIDER   NCSCLASSNAME("slider")
00038 
00039 typedef struct _mSlider            mSlider;
00040 typedef struct _mSliderClass       mSliderClass;
00041 typedef struct _mSliderRenderer    mSliderRenderer;
00042 
00043 #define mSliderHeader(Class) \
00044     mWidgetHeader(Class)
00045 
00052 struct _mSlider
00053 {
00054         mSliderHeader(mSlider)
00055 };
00056 
00057 #define mSliderClassHeader(clsName, parentClass) \
00058         mWidgetClassHeader(clsName, parentClass)
00059 
00066 struct _mSliderClass
00067 {
00068         mSliderClassHeader(mSlider, mWidget)
00069 };
00070 
00077 MGNCS_EXPORT extern mSliderClass g_stmSliderCls;
00078 
00079 #define mSliderRendererHeader(clsName, parentClass)  \
00080         mWidgetRendererHeader(clsName, parentClass)  \
00081         void (*calcSlider)(clsName *, DWORD calc_area); \
00082         void (*drawSlider)(clsName *, HDC hdc);
00083 
00084 enum mSliderArea
00085 {
00086         NCSSLIDER_AREA_INCARROW = 0x01,
00087         NCSSLIDER_AREA_DECARROW = 0x02,
00088         NCSSLIDER_AREA_ARROWS = 0x03,
00089         NCSSLIDER_AREA_SLIDER = 0x04,
00090         NCSSLIDER_AREA_TRACK = 0x08,
00091         NCSSLIDER_AREA_ALL = 0xFFFF //
00092 };
00093 
00100 struct _mSliderRenderer
00101 {
00102         mSliderRendererHeader(mSlider, mWidget)
00103 };
00104 
00110 enum mSliderProp {
00116     NCSP_SLIDER_MAXPOS = NCSP_WIDGET_MAX + 1,  
00122     NCSP_SLIDER_MINPOS,                        
00128     NCSP_SLIDER_CURPOS,                        
00134     NCSP_SLIDER_LINESTEP,                      
00140     NCSP_SLIDER_PAGESTEP,                      
00141     NCSP_SLIDER_MAX
00142 };
00143 
00148 #define NCSS_SLIDER_HORIZONTAL          0x0000L
00149 
00154 #define NCSS_SLIDER_VERTICAL            (0x0001L<<NCSS_WIDGET_SHIFT)
00155 
00156 #define NCSS_SLIDER_SHIFT      (NCSS_WIDGET_SHIFT + 2)
00157 
00158 
00163 enum enumSliderNotify {
00168         NCSN_SLIDER_CHANGED = NCSN_WIDGET_MAX, 
00172         NCSN_SLIDER_REACHMAX,                  
00176         NCSN_SLIDER_REACHMIN,                  
00177         //NCSN_SLIDER_STARTDRAG,                 /**< start to drag it*/
00178         //NCSN_SLIDER_STOPDRAG,                  /**< stop to drag it*/
00179         NCSN_SLIDER_MAX
00180 };
00181 
00186 enum mSliderHitTest{
00187         NCSSLIDER_HT_NONE = 0,
00188         NCSSLIDER_HT_SLIDER ,
00189         NCSSLIDER_HT_TRACK,
00190         NCSSLIDER_HT_INCARROW,
00191         NCSSLIDER_HT_DECARROW
00192 };
00193 #ifdef __cplusplus
00194 }
00195 #endif  /* __cplusplus */
00196 
00197 #endif /* _MGUI_NCSCTRL_SLIDER_H */
00198 #endif //_MGNCSCTRL_SLIDER
Generated on Fri Jun 10 11:18:06 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3