void MythUIButton::CopyFrom(MythUIType *base) { MythUIButton *button = dynamic_cast(base); if (!button) { VERBOSE(VB_IMPORTANT, "ERROR, bad parsing"); return; } *arrowPix = (*button->arrowPix); arrowPix->UpRef(); *checkNonePix = (*button->checkNonePix); checkNonePix->UpRef(); *checkHalfPix = (*button->checkHalfPix); checkHalfPix->UpRef(); *checkFullPix = (*button->checkFullPix); checkFullPix->UpRef(); *itemRegPix = (*button->itemRegPix); itemRegPix->UpRef(); *itemSelActPix = (*button->itemSelActPix); itemSelActPix->UpRef(); *itemSelInactPix = (*button->itemSelInactPix); itemSelInactPix->UpRef(); m_FontProps = button->m_FontProps; m_State = button->m_State; m_TextRect = button->m_TextRect; m_PaddingMargin = button->m_PaddingMargin; m_textFlags = button->m_textFlags; MythUIType::CopyFrom(base); } void MythUIButton::CreateCopy(MythUIType *parent) { MythUIButton *button = new MythUIButton(parent, name()); button->CopyFrom(this); }