static void ClickAction(Widget w, XEvent *event, String *params,Cardinal *nparams) { XmTabWidget wid = (XmTabWidget)w; Widget tab_wid; XmTabCallbackStruct call_data; XmTabConstraintRec *tab_constraint; tab_wid = search_tab(wid, event); if(!tab_wid) return; change_tab(wid, tab_wid); draw_tabs(wid); tab_constraint = (XmTabConstraintRec *) tab_wid->core.constraints; call_data.reason = XmCR_VALUE_CHANGED; call_data.tab_child = tab_wid; call_data.event = event; if( tab_constraint->tab.tab_label ) { call_data.tab_label = XmStringCopy(tab_constraint->tab.tab_label); } else { call_data.tab_label = XmStringCreateLocalized(XtName(tab_wid));; } XtCallCallbacks(w, XmNvalueChangedCallback, &call_data); XmStringFree(call_data.tab_label); }
void next_tab(void) { change_tab(1); }
void previous_tab(void) { change_tab(-1); }