/* Respond to a mouse moving over a barGraph */ void W_BARGRAPH::highlight(W_CONTEXT *psContext) { if (!pTip.isEmpty()) { tipStart(this, pTip, screenPointer->TipFontID, x() + psContext->xOffset, y() + psContext->yOffset, width(), height()); } }
/* Respond to a mouse moving over a label */ void W_LABEL::highlight(W_CONTEXT *psContext) { /* If there is a tip string start the tool tip */ if (!pTip.isEmpty()) { tipStart(this, pTip, screenPointer->TipFontID, x() + psContext->xOffset, y() + psContext->yOffset, width(), height()); } }
/* Respond to a mouse moving over a barGraph */ void barGraphHiLite(W_BARGRAPH *psWidget, W_CONTEXT *psContext) { if (psWidget->pTip) { tipStart((WIDGET *)psWidget, psWidget->pTip, psContext->psScreen->TipFontID, psContext->psForm->aColours, psWidget->x + psContext->xOffset, psWidget->y + psContext->yOffset, psWidget->width, psWidget->height); } }
/* Respond to a mouse moving over a label */ void labelHiLite(W_LABEL *psWidget, W_CONTEXT *psContext) { /* If there is a tip string start the tool tip */ if (psWidget->pTip) { tipStart((WIDGET *)psWidget, psWidget->pTip, psContext->psScreen->TipFontID, psContext->psForm->aColours, psWidget->x + psContext->xOffset, psWidget->y + psContext->yOffset, psWidget->width,psWidget->height); } }
/* Respond to a mouse moving over a label */ void W_LABEL::highlight(W_CONTEXT *psContext) { /* If there is a tip string start the tool tip */ if (pTip) { tipStart(this, pTip, psContext->psScreen->TipFontID, psContext->psForm->aColours, x + psContext->xOffset, y + psContext->yOffset, width, height); } }
/* Respond to a mouse moving over a button */ void W_BUTTON::highlight(W_CONTEXT *psContext) { if ((state & WBUT_HIGHLIGHT) == 0) { state |= WBUT_HIGHLIGHT; dirty = true; } if (AudioCallback) { AudioCallback(HilightAudioID); } /* If there is a tip string start the tool tip */ if (!pTip.empty()) { tipStart(this, pTip, screenPointer->TipFontID, x() + psContext->xOffset, y() + psContext->yOffset, width(), height()); } }
/* Respond to a mouse moving over a button */ void buttonHiLite(W_BUTTON *psWidget, W_CONTEXT *psContext) { psWidget->state |= WBUTS_HILITE; if(psWidget->AudioCallback) { psWidget->AudioCallback(psWidget->HilightAudioID); } /* If there is a tip string start the tool tip */ if (psWidget->pTip) { tipStart((WIDGET *)psWidget, psWidget->pTip, psContext->psScreen->TipFontID, psContext->psForm->aColours, psWidget->x + psContext->xOffset, psWidget->y + psContext->yOffset, psWidget->width, psWidget->height); } }
/* Respond to a mouse moving over a form */ void formHiLite(W_FORM *psWidget, W_CONTEXT *psContext) { W_CLICKFORM *psClickForm; if (psWidget->style & WFORM_CLICKABLE) { psClickForm = (W_CLICKFORM *)psWidget; psClickForm->state |= WCLICK_HILITE; /* If there is a tip string start the tool tip */ if (psClickForm->pTip) { tipStart((WIDGET *)psClickForm, psClickForm->pTip, psContext->psScreen->TipFontID, psContext->psForm->aColours, psWidget->x + psContext->xOffset, psWidget->y + psContext->yOffset, psWidget->width, psWidget->height); } if(psClickForm->AudioCallback) { psClickForm->AudioCallback(psClickForm->HilightAudioID); } } }
/* Run a form widget */ void formRun(W_FORM *psWidget, W_CONTEXT *psContext) { SDWORD mx,my; TAB_POS sTabPos; char *pTip; W_TABFORM *psTabForm; memset(&sTabPos, 0x0, sizeof(TAB_POS)); if(psWidget->style & WFORM_CLICKABLE) { if(((W_CLICKFORM *)psWidget)->state & WCLICK_FLASH) { if (((realTime/250) % 2) == 0) { ((W_CLICKFORM *)psWidget)->state &= ~WCLICK_FLASHON; } else { ((W_CLICKFORM *)psWidget)->state |= WCLICK_FLASHON; } } } if (psWidget->style & WFORM_TABBED) { mx = psContext->mx; my = psContext->my; psTabForm = (W_TABFORM *)psWidget; /* If the mouse is over the form, see if any tabs need to be hilited */ if (mx >= 0 && mx <= psTabForm->width && my >= 0 && my <= psTabForm->height) { if (formPickTab(psTabForm, mx,my, &sTabPos)) { if (psTabForm->tabHiLite != (UWORD)sTabPos.index) { /* Got a new tab - start the tool tip if there is one */ psTabForm->tabHiLite = (UWORD)sTabPos.index; if (sTabPos.index >= psTabForm->numMajor) { pTip = psTabForm->asMajor[psTabForm->majorT]. asMinor[sTabPos.index - psTabForm->numMajor].pTip; } else { pTip = psTabForm->asMajor[sTabPos.index].pTip; } if (pTip) { /* Got a tip - start it off */ tipStart((WIDGET *)psTabForm, pTip, psContext->psScreen->TipFontID, psTabForm->aColours, sTabPos.x + psContext->xOffset, sTabPos.y + psContext->yOffset, sTabPos.width,sTabPos.height); } else { /* No tip - clear any old tip */ tipStop((WIDGET *)psWidget); } } } else { /* No tab - clear the tool tip */ tipStop((WIDGET *)psWidget); /* And clear the hilite */ psTabForm->tabHiLite = (UWORD)(-1); } } } }