/* * @author Valentin Simonov / http://va.lent.in/ */ using TouchScript.InputSources; namespace TouchScript.Pointers { /// /// Static factory to create pointers. /// public static class PointerFactory { /// /// Creates a pointer of certain type attached to the input source. /// /// Pointer type to create. /// Input source to attach the pointer to. /// public static Pointer Create(Pointer.PointerType type, IInputSource input) { switch (type) { case Pointer.PointerType.Touch: return new TouchPointer(input); case Pointer.PointerType.Mouse: return new MousePointer(input); case Pointer.PointerType.Pen: return new PenPointer(input); case Pointer.PointerType.Object: return new ObjectPointer(input); } return null; } } }