Base class of gesture recognizers (GRs). A GR, that is dynamically instantiated by Grafiti, processes data of a single instance of the class Group for the recognition of a gesture. In case of successful recognition the GR can be enabled to send gesture events to the registered listeners. A GR can be parametrized through a configuration at the time of registration of a handler.
Ejemplo n.º 1
0
 public ToRemoveGR(GestureRecognizer gr, bool terminating)
 {
     this.gr = gr;
     this.terminating = terminating;
 }
Ejemplo n.º 2
0
 private void ClearNonNegativePNArmedBut(GestureRecognizer ex)
 {
     m_armedGRs.RemoveAll(delegate (GestureRecognizer gr)
     {
         if (gr.PriorityNumber >= 0 && gr != ex)
         {
             gr.OnTerminating1();
             return true;
         }
         else
             return false;
     });
 }
Ejemplo n.º 3
0
 private void RemoveArmedGR(GestureRecognizer gr)
 {
     if (m_armedGRs.Remove(gr))
         gr.OnTerminating1();
 }
Ejemplo n.º 4
0
 private void AddUnarmedGR(GestureRecognizer gr)
 {
     int pn = gr.PriorityNumber;
     if (!(m_pns.Contains(pn)))
     {
         m_pns.Add(pn);
         m_pns.Sort();
         m_currentPN = m_pns[0];
         m_unarmedLGRs[pn] = new List<LocalGestureRecognizer>();
         m_unarmedGGRs[pn] = new List<GlobalGestureRecognizer>();
     }
     if (gr is LocalGestureRecognizer)
         m_unarmedLGRs[pn].Add((LocalGestureRecognizer)gr);
     else
         m_unarmedGGRs[pn].Add((GlobalGestureRecognizer)gr);
 }