예제 #1
0
 internal void PushHookup(GroupHookup child, int insertAt)
 {
     m_insertAfter = null;             // default insert at start
     m_insertRunAt = 0;
     if (CurrentHookup != null)
     {
         if (insertAt > 0)
         {
             var prevChild = CurrentHookup.Children[insertAt - 1] as IItemsHookup;
             if (prevChild != null)
             {
                 if (prevChild.LastBox != null && prevChild.LastBox.Container == m_destination)
                 {
                     m_insertAfter = prevChild.LastBox;
                 }
                 var runHookup = prevChild.LastChild as LiteralStringParaHookup;
                 if (runHookup != null && runHookup.ParaBox == m_destination)
                 {
                     m_insertRunAt = runHookup.ClientRunIndex + 1;
                 }
             }
         }
         CurrentHookup.InsertChildHookup(child, insertAt);
     }
     CurrentHookup = child;
 }
예제 #2
0
 internal void AddHookupToRun(TextClientRun run, LiteralStringParaHookup stringHookup)
 {
     run.Hookup = stringHookup;
     stringHookup.ClientRunIndex = stringHookup.ParaBox.Source.ClientRuns.IndexOf(run);
     if (CurrentHookup != null)
     {
         CurrentHookup.InsertChildHookup(run.Hookup, CurrentHookup.Children.Count);
     }
 }