void evol_p(real Q0[Nx][Ny][Nz][3][3]) { if(particle_on!=0){ p_update(); // update particle position, etc. if (p_move!=0) { p_iden_up(Q0); // if particle has displaced, update link points, etc. if (t_current%2==0)p_link_up(); } } }
BOOL cbox_open_droplist(control_t *p_ctrl) { list_update_t p_update = NULL; u32 context = 0; control_t *p_list = _cbox_get_droplist(p_ctrl); control_t *p_sbar = _cbox_get_scrollbar(p_ctrl); u16 page = 0, count = 0; ctrl_cbox_data_t *p_data = NULL; MT_ASSERT(p_ctrl != NULL); p_data = (ctrl_cbox_data_t *)p_ctrl->priv_data; if(p_list == NULL) { return FALSE; } ctrl_process_msg(p_ctrl, MSG_OPEN_LIST, 0, 0); p_ctrl->priv_attr &= (~CBOX_STATUS_MASK); p_ctrl->priv_attr |= CBOX_STATUS_LIST; ctrl_set_attr(p_list, OBJ_ATTR_HL); // update list with cbox page = list_get_page(p_list); count = _cbox_calc_droplist_count(p_ctrl); list_set_count(p_list, count, page); _cbox_update_droplist_focus(p_ctrl); // update list content p_update = list_get_update(p_list, &context); if(p_update != NULL) { p_update(p_list, list_get_valid_pos(p_list), list_get_page(p_list), context); } ctrl_add_rect_to_invrgn(p_list, NULL); if(p_sbar != NULL) { ctrl_set_attr(p_sbar, OBJ_ATTR_ACTIVE); ctrl_add_rect_to_invrgn(p_sbar, NULL); } p_data->is_droplist_opened = TRUE; return TRUE; }
BOOL cbox_update_droplist(control_t *p_ctrl) { list_update_t p_update = NULL; u32 context = 0; control_t *p_list = _cbox_get_droplist(p_ctrl); //control_t *p_sbar = _cbox_get_scrollbar(p_ctrl); u16 page = 0, count = 0; ctrl_cbox_data_t *p_data = NULL; MT_ASSERT(p_ctrl != NULL); p_data = (ctrl_cbox_data_t *)p_ctrl->priv_data; if(p_list == NULL) { return FALSE; } if(!(p_ctrl->priv_attr & CBOX_STATUS_LIST)) { return FALSE; } // update list with cbox page = list_get_page(p_list); count = _cbox_calc_droplist_count(p_ctrl); list_set_count(p_list, count, page); _cbox_update_droplist_focus(p_ctrl); // update list content p_update = list_get_update(p_list, &context); if(p_update != NULL) { p_update(p_list, list_get_valid_pos(p_list), list_get_page(p_list), context); } return TRUE; }