const KeyType & ContainerIterator <KeyType, DerefType>::key () const { assert (_key_proc != 0); return _key_proc (_it); }
/* ********************************************************************************************************************** * _spinbox_ctrl_proc * * author: * * date: 2009-8-4 * * Description: spinboxctrlproc * * parameters: * * return: if success return ERDK_OK * if fail return the number of fail * modify history: ********************************************************************************************************************** */ static int _spinbox_ctrl_proc (__gui_msg_t *msg) { __u32 dwStyle; spinbox_data_t* pData; dwStyle = GUI_WinGetStyle(msg->h_deswin); switch(msg->id) { case GUI_MSG_CREATE: pData = (spinbox_data_t*) esMEMS_Malloc( 0, sizeof(spinbox_data_t) ); if (pData == NULL) { return EPDK_FAIL; } pData->draw_sts = 0; pData->status = 0; pData->draw_flag = 0; pData->hmem = 0; pData->data = (__u32)GUI_WinGetAttr(msg->h_deswin); GUI_CtrlWinSetAddData(msg->h_deswin,(__u32)pData); return 0; case GUI_MSG_DESTROY: pData = (spinbox_data_t*)GUI_CtrlWinGetAddData(msg->h_deswin); esMEMS_Mfree ( 0, (void *)GUI_CtrlWinGetAddData(msg->h_deswin) ); return 0; case GUI_MSG_ENABLE: if (msg->dwAddData1 && (dwStyle & WS_DISABLED)) { dwStyle &= ~WS_DISABLED; GUI_WinSetStyle(msg->h_deswin,dwStyle); } else if (!msg->dwAddData1 && !(dwStyle & WS_DISABLED)) { dwStyle |= WS_DISABLED; GUI_WinSetStyle(msg->h_deswin,dwStyle); } else { return 0; } return 0; case GUI_MSG_SET_UNFOCUS: if(SPINBOX_STATUS(msg->h_deswin) & BST_FOCUS) { SPINBOX_STATUS(msg->h_deswin) &= (~BST_FOCUS); GUI_InvalidateRect (msg->h_deswin, NULL, EPDK_TRUE); } return 0; case GUI_MSG_SET_FOCUS: if(!(SPINBOX_STATUS(msg->h_deswin) & BST_FOCUS)) { SPINBOX_STATUS(msg->h_deswin) |= BST_FOCUS; GUI_InvalidateRect (msg->h_deswin, NULL, EPDK_TRUE); } return 0; case GUI_MSG_KEY: _key_proc(msg); return 0; case GUI_MSG_TOUCH: _touch_proc(msg); return 0; case GUI_MSG_PAINT: _spinbox_ctrl_paint(msg); return 0; default: break; } return GUI_CtrlWinDefaultProc (msg); }