~s-cecilio/lomse/master

« back to all changes in this revision

Viewing changes to src/internal_model/lomse_internal_model.cpp

  • Committer: GitHub
  • Author(s): Cecilio Salmeron
  • Date: 2016-09-15 14:46:58 UTC
  • mfrom: (202.1.10)
  • Revision ID: git-v1:5fa3dc2c55edae65a670f6ee4bd2c5dad932371e
Merge pull request #61 from cecilios/fixes

Improved support for tuplets and some fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
382
382
        m_TypeToName[k_imo_beam_data] = "beam-data";
383
383
        m_TypeToName[k_imo_slur_data] = "slur-data";
384
384
        m_TypeToName[k_imo_tie_data] = "tie-data";
385
 
        m_TypeToName[k_imo_tuplet_data] = "tuplet-data";
386
385
//
387
386
        //ImoCollection(A)
388
387
        m_TypeToName[k_imo_instruments] = "instruments";
3253
3252
            ImoStyle* pStyle = static_cast<ImoStyle*>(ImFactory::inject(k_imo_style, m_pDoc));
3254
3253
        pStyle->set_name("Tuplet numbers");
3255
3254
        pStyle->set_parent_style(pDefStyle);
3256
 
            pStyle->font_size( 11.0f);
 
3255
            pStyle->font_size( 10.0f);
3257
3256
        pStyle->font_style( ImoStyle::k_font_style_italic);
3258
3257
        pStyle->font_weight( ImoStyle::k_font_weight_normal);
3259
3258
        add_style(pStyle);
3834
3833
 
3835
3834
    //Tuplets numbers
3836
3835
    if (m_name == "Tuplet numbers")
3837
 
        return font_size() == 11.0f
 
3836
        return font_size() == 10.0f
3838
3837
            && font_style() == k_font_style_italic
3839
3838
            //inherited defaults:
3840
3839
               //font
4721
4720
}
4722
4721
 
4723
4722
 
4724
 
 
4725
 
//=======================================================================================
4726
 
// ImoTupletData implementation
4727
 
//=======================================================================================
4728
 
ImoTupletData::ImoTupletData(ImoTupletDto* UNUSED(pDto))
4729
 
    : ImoRelDataObj(k_imo_tuplet_data)
4730
 
{
4731
 
}
4732
 
 
4733
 
 
4734
4723
//=======================================================================================
4735
4724
// ImoTupletDto implementation
4736
4725
//=======================================================================================
4737
4726
ImoTupletDto::ImoTupletDto()
4738
4727
    : ImoSimpleObj(k_imo_tuplet_dto)
4739
4728
    , m_tupletType(ImoTupletDto::k_unknown)
4740
 
    , m_nActualNum(0)
4741
 
    , m_nNormalNum(0)
4742
 
    , m_nShowBracket(k_yesno_default)
4743
 
    , m_nPlacement(k_placement_default)
4744
 
    , m_nShowNumber(ImoTuplet::k_number_actual)
4745
 
    , m_fOnlyGraphical(false)
4746
 
    , m_pTupletElm(NULL)
4747
 
    , m_pNR(NULL)
4748
 
{
4749
 
}
4750
 
 
4751
 
//---------------------------------------------------------------------------------------
4752
 
ImoTupletDto::ImoTupletDto(LdpElement* pTupletElm)
4753
 
    : ImoSimpleObj(k_imo_tuplet_dto)
4754
 
    , m_tupletType(ImoTupletDto::k_unknown)
4755
 
    , m_nActualNum(0)
4756
 
    , m_nNormalNum(0)
4757
 
    , m_nShowBracket(k_yesno_default)
4758
 
    , m_nPlacement(k_placement_default)
4759
 
    , m_nShowNumber(ImoTuplet::k_number_actual)
4760
 
    , m_fOnlyGraphical(false)
4761
 
    , m_pTupletElm(pTupletElm)
4762
 
    , m_pNR(NULL)
4763
 
{
4764
 
}
4765
 
 
4766
 
//---------------------------------------------------------------------------------------
4767
 
int ImoTupletDto::get_line_number()
4768
 
{
4769
 
    if (m_pTupletElm)
4770
 
        return m_pTupletElm->get_line_number();
4771
 
    else
4772
 
        return 0;
 
4729
    , m_tupletNum(0)
 
4730
    , m_nActualNum(0)
 
4731
    , m_nNormalNum(0)
 
4732
    , m_nShowBracket(k_yesno_default)
 
4733
    , m_nPlacement(k_placement_default)
 
4734
    , m_nShowNumber(ImoTuplet::k_number_actual)
 
4735
    , m_lineNum(0)
 
4736
    , m_fOnlyGraphical(false)
 
4737
    , m_pNR(NULL)
 
4738
{
4773
4739
}
4774
4740
 
4775
4741