mGNCS4Touch API Reference  v1.5.0
A set of mGNCS-compliant controls for devices with a touch screen.
mbuttonpanelpiece.h
1 //
3 // IMPORTANT NOTICE
4 //
5 // The following open source license statement does not apply to any
6 // entity in the Exception List published by FMSoft.
7 //
8 // For more information, please visit:
9 //
10 // https://www.fmsoft.cn/exception-list
11 //
13 #ifndef _MGNCS_BTNPANELPIECE_H
14 #define _MGNCS_BTNPANELPIECE_H
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
19 
20 typedef struct _mButtonPanelPiece mButtonPanelPiece;
21 typedef struct _mButtonPanelPieceClass mButtonPanelPieceClass;
22 
23 enum mButtonPanelPieceState{
24  NCS_BPP_NORMAL = 0,
25 // NCS_BPP_HILIGHT,
26  NCS_BPP_PUSHED,
27 // NCS_BPP_CAPTURED,
28 // NCS_BPP_DISABLED
29 };
30 
31 typedef struct _mStateTable {
32  list_t list;
33  mHotPiece *piece;
34  int propertyId;
35  DWORD propertyValue[2];
36 } mStateTable;
37 
38 #define MSG_BTNPANELPIECE_STATE_CHANGED (MSG_USER + 100)
39 
40 //mShapeTransRoundPiece *backgroundPiece;
41 #define mButtonPanelPieceHeader(clss) \
42  mPanelPieceHeader(clss) \
43  enum mButtonPanelPieceState state; \
44  mColorTable gradientBackgroundColorTable[2]; \
45  list_t stateTable;
46 
47 struct _mButtonPanelPiece
48 {
49  mButtonPanelPieceHeader(mButtonPanelPiece)
50 };
51 
52 //mShapeTransRoundPiece* (*getBkgndPiece)(clss*);
53 #define mButtonPanelPieceClassHeader(clss, superCls) \
54  mPanelPieceClassHeader(clss, superCls) \
55  void (*setStateTable)(clss*, mHotPiece*, int, DWORD, DWORD); \
56  void (*setGradientBackgroundColor)(clss*,\
57  ARGB*, float*, unsigned int, \
58  ARGB*, float*, unsigned int); \
59  void (*clearGradientBackgroundColor)(clss*, BOOL, BOOL); \
60  void (*setStates)(clss*); \
61  void (*useStateChange)(clss*, BOOL); \
62  void (*setGradientBorderColor)(clss*, \
63  ARGB*, float*, unsigned int);
64 
65 struct _mButtonPanelPieceClass
66 {
67  mButtonPanelPieceClassHeader(mButtonPanelPiece, mPanelPiece)
68 };
69 
70 MGNCS_EXPORT extern mButtonPanelPieceClass g_stmButtonPanelPieceCls;
71 
72 #ifdef __cplusplus
73 }
74 #endif /* __cplusplus */
75 
76 #endif /* _MGNCS_BTNPANELPIECE_H */