void MHSetColour::Perform(MHEngine *engine) { MHObjectRef target; m_Target.GetValue(target, engine); // Get the item to set. MHColour newColour; switch (m_ColourType) { case CT_None: { // If the colour is not specified use "transparent". newColour.SetFromString("\000\000\000\377", 4); break; } case CT_Absolute: { MHOctetString colour; m_Absolute.GetValue(colour, engine); newColour.m_ColStr.Copy(colour); break; } case CT_Indexed: newColour.m_nColIndex = m_Indexed.GetValue(engine); } SetColour(newColour, engine); // Set the colour of the appropriate portion of the visible }
void MHEngine::GetDefaultSliderRefColour(MHColour &colour) { MHApplication *pApp = CurrentApp(); if (pApp && pApp->m_SliderRefColour.IsSet()) { colour.Copy(pApp->m_SliderRefColour); } else { colour.SetFromString("\377\377\377\000", 4); // '=FF=FF=FF=00' UK MHEG Default - white } }
void MHEngine::GetDefaultButtonRefColour(MHColour &colour) { MHApplication *pApp = CurrentApp(); if (pApp && pApp->m_ButtonRefColour.IsSet()) { colour.Copy(pApp->m_ButtonRefColour); } else { colour.SetFromString("\377\377\377\000", 4); // '=FF=FF=FF=00' ??? Not specified in UK MHEG } }
void MHEngine::GetDefaultBGColour(MHColour &colour) { MHApplication *pApp = CurrentApp(); if (pApp && pApp->m_BGColour.IsSet()) { colour.Copy(pApp->m_BGColour); } else { colour.SetFromString("\000\000\000\377", 4); // '=00=00=00=FF' Default - transparent } }