74 void MHEG5sliderPrint(
MHEG5Slider *slider,
char *out)
76 MHEG5visiblePrint(&slider->visible, out);
77 MHEG5interactiblePrint(&slider->interactible, out);
81 MHEG_PRINT(out,
":Orientation: ");
82 switch (slider->orientation)
85 MHEG_PRINT(out,
"LEFT");
88 MHEG_PRINT(out,
"RIGHT");
91 MHEG_PRINT(out,
"UP");
94 MHEG_PRINT(out,
"DOWN");
97 MHEG_PRINT(out,
"<Internal Error>");
103 MHEG_PRINT(out,
":InitialValue ");
104 MHEG5intPrint(slider->initialValue, out);
108 MHEG_PRINT(out,
":OriginalMinValue: ");
109 MHEG5intPrint(slider->originalMinValue, out);
113 MHEG_PRINT(out,
":OriginalMaxValue: ");
114 MHEG5intPrint(slider->originalMaxValue, out);
118 MHEG_PRINT(out,
":InitialPortion: ");
119 MHEG5intPrint(slider->initialPortion, out);
123 MHEG_PRINT(out,
":OriginalStepSize: ");
124 MHEG5intPrint(slider->originalStepSize, out);
128 MHEG_PRINT(out,
":SliderStyle: ");
129 switch (slider->sliderStyle)
132 MHEG_PRINT(out,
"NORMAL");
134 case MHEG5THERMOMETER:
135 MHEG_PRINT(out,
"THERMOMETER");
137 case MHEG5PROPORTIONAL:
138 MHEG_PRINT(out,
"PROPORTIONAL");
141 MHEG_PRINT(out,
"<Internal Error>");
147 MHEG_PRINT(out,
"SliderRefColour: ");
148 MHEG5colourPrint(slider->sliderRefColour, out);
153 MHEG_PRINT(out,
"// Value:\t");
154 MHEG5intPrint(slider->sliderValue, out);
158 MHEG_PRINT(out,
"// Portion:\t");
159 MHEG5intPrint(slider->portion, out);
163 MHEG_PRINT(out,
"// MinValue:\t");
164 MHEG5intPrint(slider->minValue, out);
168 MHEG_PRINT(out,
"// MaxValue:\t");
169 MHEG5intPrint(slider->maxValue, out);
173 MHEG_PRINT(out,
"// StepSize:\t");
174 MHEG5intPrint(slider->stepSize, out);
200 slider->initialValue = 1;
201 slider->originalMinValue = 1;
202 slider->originalStepSize = 1;
219 MHEG5colourDestruct(&slider->sliderRefColour);
239 slider->sliderValue = slider->initialValue;
240 slider->portion = slider->initialPortion;
241 slider->minValue = slider->originalMinValue;
242 slider->maxValue = slider->originalMaxValue;
243 slider->stepSize = slider->originalStepSize;
261 if (!slider->visible.ingredient.root.availabilityStatus)
297 MHEG5interactibleDestruct(&slider->interactible);
315 MHEG5Int nSteps, newValue;
320 if (target->clazz != MHEG5SLIDER)
321 return MHEG5ERR_WRONGTARGET;
325 return MHEG5ERR_WRONGNUMBEROFPARAMS;
326 MHEG5resolveGenericInteger(params, &nSteps);
328 newValue = slider->stepSize * nSteps + slider->sliderValue;
329 if (newValue < slider->minValue)
330 newValue = slider->minValue;
331 if ((newValue + slider->portion) > slider->maxValue)
332 return MHEG5ERR_NOERROR;
333 slider->sliderValue = newValue;
340 return MHEG5ERR_NOERROR;
360 if (target->clazz != MHEG5SLIDER)
361 return MHEG5ERR_WRONGTARGET;
365 return MHEG5ERR_WRONGNUMBEROFPARAMS;
366 MHEG5resolveGenericInteger(params, &newValue);
367 if (newValue < slider->minValue)
368 return MHEG5ERR_NOERROR;
369 if ((newValue + slider->portion) > slider->maxValue)
370 return MHEG5ERR_NOERROR;
372 slider->sliderValue = newValue;
379 return MHEG5ERR_NOERROR;
399 if (target->clazz != MHEG5SLIDER)
400 return MHEG5ERR_WRONGTARGET;
404 return MHEG5ERR_WRONGNUMBEROFPARAMS;
405 MHEG5resolveORef(params, &intVar);
407 return MHEG5ERR_WRONGNUMBEROFPARAMS;
408 if (intVar->clazz != MHEG5INTEGERVARIABLE)
409 return MHEG5ERR_WRONGPARAM;
410 if (!intVar->runningStatus)
411 return MHEG5ERR_PARAMNOTACTIVE;
414 rc->value = slider->sliderValue;
416 return MHEG5ERR_NOERROR;
433 if (target->clazz != MHEG5SLIDER)
434 return MHEG5ERR_WRONGTARGET;
438 return MHEG5ERR_WRONGNUMBEROFPARAMS;
439 MHEG5resolveGenericInteger(params, &newPortion);
441 if (newPortion > (slider->maxValue - slider->sliderValue))
442 return MHEG5ERR_NOERROR;
444 slider->portion = newPortion;
451 return MHEG5ERR_NOERROR;
472 if (target->clazz != MHEG5SLIDER)
473 return MHEG5ERR_WRONGTARGET;
477 return MHEG5ERR_WRONGNUMBEROFPARAMS;
478 MHEG5resolveORef(params, &intVar);
480 return MHEG5ERR_WRONGPARAM;
481 if (intVar->clazz != MHEG5INTEGERVARIABLE)
482 return MHEG5ERR_WRONGPARAM;
483 if (!intVar->runningStatus)
484 return MHEG5ERR_PARAMNOTACTIVE;
487 rc->value = slider->portion;
489 return MHEG5ERR_NOERROR;
505 MHEG5Int newMinValue;
506 MHEG5Int newMaxValue;
507 MHEG5Int newStepSize;
512 if (target->clazz != MHEG5SLIDER)
513 return MHEG5ERR_WRONGTARGET;
517 return MHEG5ERR_WRONGNUMBEROFPARAMS;
518 thirdParam = MHEG5resolveGenericInteger(params, &newMinValue);
521 return MHEG5ERR_WRONGNUMBEROFPARAMS;
522 fourthParam = MHEG5resolveGenericInteger(thirdParam, &newMaxValue);
525 return MHEG5ERR_WRONGNUMBEROFPARAMS;
526 MHEG5resolveGenericInteger(fourthParam, &newStepSize);
528 if (newMinValue >= newMaxValue)
529 return MHEG5ERR_NOERROR;
530 if (((newMaxValue - newMinValue) % newStepSize) != 0)
531 return MHEG5ERR_NOERROR;
532 if ((newMaxValue - newMinValue) < slider->portion)
533 return MHEG5ERR_NOERROR;
535 slider->sliderValue = newMinValue;
536 slider->minValue = newMinValue;
537 slider->maxValue = newMaxValue;
538 slider->stepSize = newStepSize;
545 return MHEG5ERR_NOERROR;
556 switch (slider->orientation)
559 newValue = slider->sliderValue + slider->stepSize;
562 newValue = slider->sliderValue - slider->stepSize;
568 if (newValue < slider->minValue)
570 newValue = slider->minValue;
572 if ((newValue + slider->portion) > slider->maxValue)
576 slider->sliderValue = newValue;
592 switch (slider->orientation)
595 newValue = slider->sliderValue + slider->stepSize;
598 newValue = slider->sliderValue - slider->stepSize;
604 if (newValue < slider->minValue)
606 newValue = slider->minValue;
608 if ((newValue + slider->portion) > slider->maxValue)
612 slider->sliderValue = newValue;
628 switch (slider->orientation)
631 newValue = slider->sliderValue + slider->stepSize;
634 newValue = slider->sliderValue - slider->stepSize;
640 if (newValue < slider->minValue)
642 newValue = slider->minValue;
644 if ((newValue + slider->portion) > slider->maxValue)
648 slider->sliderValue = newValue;
664 switch (slider->orientation)
667 newValue = slider->sliderValue + slider->stepSize;
670 newValue = slider->sliderValue - slider->stepSize;
676 if (newValue < slider->minValue)
678 newValue = slider->minValue;
680 if ((newValue + slider->portion) > slider->maxValue)
684 slider->sliderValue = newValue;
703 slider->interactible.interactionStatus = MHEG5FALSE;
704 scene->currentInteractible = 0;
706 MHEG5interactibleInteractionCompleted(&slider->interactible, (
MHEG5Root *)slider);
720 slider->interactible.interactionStatus = MHEG5FALSE;
721 scene->currentInteractible = 0;
723 MHEG5interactibleInteractionCompleted(&slider->interactible, (
MHEG5Root *)slider);
void MHEG5visibleActivate(MHEG5Visible *visible)
Apply the activation behaviour of the visible class. Apply the activation behaviour off the visible c...
MHEG5ErrorCode MHEG5getSliderValue(MHEG5Root *target, MHEG5GList *params)
This action retrieves the SliderValue from the target and stores it in the variable, passed as the second parameter of this action. Implementation of the GetSliderValue (Target, SliderValueVar) action of the slider class.
void MHEG5sliderInit(MHEG5Slider *slider)
<Function description>="">
void MHEG5sliderLEFT(MHEG5Slider *slider)
Perform action of left arrow key on interacting Slider.
void MHEG5visibleFree(MHEG5Visible *visible)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
void MHEG5sliderEXIT(MHEG5Slider *slider)
Perform action of exit key on interacting Slider.
void MHEG5sliderUP(MHEG5Slider *slider)
Perform action of up arrow key on interacting Slider.
void MHEG5visiblePrepare(MHEG5Visible *visible)
Apply the preparation behaviour off the visible class Apply the preparation behaviour of the visible ...
Implement the MHEG5 Slider Class. Slider Class. Defines the behaviour of sliders. Base class: Visible...
void MHEG5sliderActivate(MHEG5Slider *slider)
Apply the activation behaviour of the slider class. As this class has no own activation behaviour thi...
void MHEG5sliderDOWN(MHEG5Slider *slider)
Perform action of down arrow key on interacting Slider.
Implement the MHEG5 Variable Class 21 Variable Class Defines a variable within the context of a Group...
void MHEG5visibleDestruct(MHEG5Visible *visible)
Destruct a visible object.
void MHEG5interactibleDeactivate(MHEG5Interactible *interactible)
Implementation of the deactivation behaviour of the interactible class. This behaviour was introduced...
void MHEG5sliderPrepare(MHEG5Slider *slider)
Apply the preparation behaviour of the slider class Apply the preparation behaviour of the slider cla...
MHEG5ErrorCode MHEG5setSliderParameters(MHEG5Root *target, MHEG5GList *params)
The effect of this action is to set the MinValue, MaxValue and StepSize to the given values...
MHEG5ErrorCode MHEG5setSliderValue(MHEG5Root *target, MHEG5GList *params)
The effect of this action is to set the SliderValue to the given value. Implementation of the SetSlid...
MHEG5ErrorCode MHEG5step(MHEG5Root *target, MHEG5GList *params)
The effect of this action is to modify the SliderValue of the target by the number given...
Event handling. Implementation of a combined queue for events and actions. This is the eventsystem wh...
void MHEG5sliderDestruct(MHEG5Slider *slider)
Destruct a slider object.
void MHEG5sliderRIGHT(MHEG5Slider *slider)
Perform action of right arrow key on interacting Slider.
Implement functions to retrieve MHEG5objects by GroupID and ID.
Implementation of the MHEG5 Application Class Defines a set of Ingredient objects, which are shared within an application scope. Base class: Group Subclasses: None Status: Concrete class.
Implementation of the MHEG5 Scene Class Scene Class Defines a set of Ingredient objects to be activat...
Mheg5 logging and debug printing.
void MHEG5interactibleInit(MHEG5Interactible *interactible)
<Function description>="">
MHEG5Scene * MHEG5getCurrentScene(void)
<Function description>="">
void MHEG5sendEvent(MHEG5Root *source, MHEG5EventType event, MHEG5Int data)
Store an event in the asynchronous event queue.
MHEG5ErrorCode MHEG5getPortion(MHEG5Root *target, MHEG5GList *params)
This action retrieves the size of the slider portion and stores it in the PortionVar, which is passed to this action as the second parameter. Implementation of the GetPortion (Target, PortionVar) action of the slider class.
void MHEG5sliderFree(MHEG5Slider *slider)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
void MHEG5interactibleFree(MHEG5Interactible *interactible)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
MHEG5ErrorCode MHEG5setPortion(MHEG5Root *target, MHEG5GList *params)
This action sets the portion of the slider to a new value, given as the second parameter to this acti...
void MHEG5sliderDeactivate(MHEG5Slider *slider)
Apply the deactivation behaviour of the slider class. As this class has no own deactivation behaviour...
Implement generic MHEG5-display functions - independent from the OSD These are generic functions used...
void MHEG5visibleDeactivate(MHEG5Visible *visible)
Apply the deactivation behaviour of the visible class. As this class has no own deactivation behaviou...
void MHEG5interactiblePrepare(MHEG5Interactible *interactible)
Sets all internal attributes for the specified object to their default values.
void MHEG5sliderSELECT(MHEG5Slider *slider)
Perform action of select key on interacting Slider.
void MHEG5visibleInit(MHEG5Visible *visible)
Initialise a visible object with default values.