Exemplo n.º 1
0
/// Primary Constructor
/// @param position Zero-based index within the system where the rhythm slash is anchored
/// @param durationType Duration type to set (1 = whole, 2 = half, 4 = quarter, 8 = 8th, 16 = 16th, 32 = 32nd, 64 = 64th)
/// @param dotCount Number of duration dots to set
RhythmSlash::RhythmSlash(wxUint32 position, wxByte durationType, wxByte dotCount) :
    m_position(position), m_beaming(DEFAULT_BEAMING), m_data(DEFAULT_DATA)
{
    //------Last Checked------//
    // - Jan 7, 2005
    wxASSERT(IsValidPosition(position));
    
    SetDurationType(durationType);    
    if (dotCount == 1)
        SetDotted();
    else if (dotCount == 2)
        SetDoubleDotted();
}
Exemplo n.º 2
0
/*--------------------------------------------------------------------------*/
void PegMenuButton::SendOwnerMessage(void)
{
    if (mpSubMenu || !mpOwner || Parent()->Type() == TYPE_MENU_BAR)
    {
        return;
    }
    Presentation()->MoveFocusTree(mpOwner);
            
    if (mwStyle & BF_CHECKABLE)
    {
        if (mwStyle & BF_CHECKED)
        {
            SetChecked(FALSE);
        }
        else
        {
            SetChecked(TRUE);
        }
    }
    else
    {
        if (mwStyle & BF_DOTABLE)
        {
            RemoveSiblingDots();
            SetDotted(TRUE);
        }
        else
        {
            if (Id())
            {
                PegMessage NewMessage(mpOwner, PEG_SIGNAL(Id(), PSF_CLICKED));
                NewMessage.iData = Id();
                NewMessage.pSource = this;
                MessageQueue()->Push(NewMessage);
            }
        }
    }
}