Exemple #1
0
 public JsWorker(SharpKit.Html.workers.WorkerContext main, object options)
 {
     _main = main;
     _main.addEventListener("message", HandleMessage, false);
     Settings settings = Settings.FromJson(options);
     _renderer = new ScoreRenderer(settings);
     _renderer.PartialRenderFinished += result => PostMessage(new { cmd = "partialRenderFinished", result = result });
     _renderer.RenderFinished += result => PostMessage(new { cmd = "renderFinished", result = result });
     _renderer.PostRenderFinished += () => PostMessage(new { cmd = "postRenderFinished", boundsLookup = _renderer.BoundsLookup.ToJson() });
     _renderer.PreRender += result => PostMessage(new { cmd = "preRender", result = result  });
 }
Exemple #2
0
 public JsWorker(SharpKit.Html.workers.WorkerContext main, object options)
 {
     _main = main;
     _includeScoreInLoadedEvent = options.Member("scoreInLoadedEvent").As<bool>();
     _main.addEventListener("message", HandleMessage, false);
     Settings settings = Settings.FromJson(options);
     _renderer = new ScoreRenderer(settings, null);
     _renderer.PartialRenderFinished += result => PostMessage(new { cmd = "partialRenderFinished", result = result });
     _renderer.RenderFinished += result => PostMessage(new { cmd = "renderFinished", result = result });
     _renderer.PostRenderFinished += () => PostMessage(new { cmd = "postRenderFinished" });
     _renderer.PreRender += () => PostMessage(new {cmd = "preRender"});
 }
        public AlphaSynthWebWorker(SharpKit.Html.workers.WorkerContext main)
        {
            _main = main;
            _main.addEventListener("message", HandleMessage, false);

            _player = new SynthPlayer();

            _player.PositionChanged += OnPositionChanged;
            _player.PlayerStateChanged += OnPlayerStateChanged;
            _player.Finished += OnFinished;
            _player.SoundFontLoad += OnSoundFontLoad;
            _player.SoundFontLoaded += OnSoundFontLoaded;
            _player.SoundFontLoadFailed += OnSoundFontLoadFailed;
            _player.MidiLoad += OnMidiLoad;
            _player.MidiLoaded += OnMidiLoaded;
            _player.MidiLoadFailed += OnMidiLoadFailed;
            _player.ReadyForPlay += OnReadyForPlay;

            OnReady();
        }
Exemple #4
0
 /// <summary>
 /// Inserts a element after the reference element.
 /// </summary>
 /// <param name="node">Element to insert after the reference.</param>
 public SharpKit.TinyMCE.dom.Element insertAfter(SharpKit.TinyMCE.dom.Element node){return null;}
Exemple #5
0
 /// <summary>
 /// Constucts a new DOM serializer class.
 /// </summary>
 /// <param name="settings">Serializer settings object.</param>
 /// <param name="dom">DOMUtils instance reference.</param>
 /// <param name="schema">Optional schema reference.</param>
 public Serializer(object settings, SharpKit.TinyMCE.dom.DOMUtils dom, SharpKit.TinyMCE.html.Schema schema){}
 /// <summary>
 /// Constructs a new color split button control instance.
 /// </summary>
 /// <param name="id">Control id for the color split button.</param>
 /// <param name="s">Optional name/value settings object.</param>
 /// <param name="ed">The editor instance this button is for.</param>
 public ColorSplitButton(string id, object s, SharpKit.TinyMCE.Editor ed){}
Exemple #7
0
 /// <summary>
 /// Returns the previous node that matches selector or function
 /// </summary>
 /// <param name="node">Node to find siblings from.</param>
 public SharpKit.TinyMCE.html.Node getPrev(SharpKit.TinyMCE.html.Node node){return null;}
Exemple #8
0
 /// <summary>
 /// Adds an editor instance to the editor collection. This will also set it as the active editor.
 /// </summary>
 /// <param name="editor">Editor instance to add to the collection.</param>
 public static SharpKit.TinyMCE.Editor add(SharpKit.TinyMCE.Editor editor){return null;}
 /// <summary>
 /// Constructs a new control manager instance.
 /// Consult the Wiki for more details on this class.
 /// </summary>
 /// <param name="ed">TinyMCE editor instance to add the control to.</param>
 /// <param name="s">Optional settings object for the control manager.</param>
 public ControlManager(SharpKit.TinyMCE.Editor ed, object s){}
Exemple #10
0
 /// <summary>
 /// Replaces the current node with the specified one.
 /// </summary>
 /// <param name="node">Node to replace the current node with.</param>
 public SharpKit.TinyMCE.html.Node replace(SharpKit.TinyMCE.html.Node node){return null;}
Exemple #11
0
 /// <summary>
 /// Constructs a new split button control instance.
 /// </summary>
 /// <param name="id">Control id for the split button.</param>
 /// <param name="s">Optional name/value settings object.</param>
 /// <param name="ed">Optional the editor instance this button is for.</param>
 public MenuButton(string id, object s, SharpKit.TinyMCE.Editor ed){}
Exemple #12
0
 /// <summary>
 /// Renders the control to the specified container element.
 /// </summary>
 /// <param name="n">HTML DOM element to add control to.</param>
 public object renderTo(SharpKit.TinyMCE.dom.Element n){return null;}
Exemple #13
0
 /// <summary>
 /// Appends a new node as a child of the current node.
 /// </summary>
 /// <param name="node">Node to append as a child of the current one.</param>
 public SharpKit.TinyMCE.html.Node append(SharpKit.TinyMCE.html.Node node){return null;}
Exemple #14
0
 /// <summary>
 /// Constructs a new DomParser instance.
 /// </summary>
 /// <param name="settings">Name/value collection of settings. comment, cdata, text, start and end are callbacks.</param>
 /// <param name="schema">HTML Schema class to use when parsing.</param>
 public DomParser(object settings, SharpKit.TinyMCE.html.Schema schema){}
Exemple #15
0
 /// <summary>
 /// Find the common ancestor of two elements. This is a shorter method than using the DOM Range logic.
 /// </summary>
 /// <param name="a">Element to find common ancestor of.</param>
 /// <param name="b">Element to find common ancestor of.</param>
 public SharpKit.TinyMCE.dom.Element findCommonAncestor(SharpKit.TinyMCE.dom.Element a, SharpKit.TinyMCE.dom.Element b){return null;}
Exemple #16
0
 /// <summary>
 /// Splits an element into two new elements and places the specified split
 /// element or element between the new ones. For example splitting the paragraph at the bold element in
 /// this example <p>abc<b>abc</b>123</p> would produce <p>abc</p><b>abc</b><p>123</p>.
 /// </summary>
 /// <param name="pe">Parent element to split.</param>
 /// <param name="e">Element to split at.</param>
 /// <param name="re">Optional replacement element to replace the split element by.</param>
 public SharpKit.TinyMCE.dom.Element split(SharpKit.TinyMCE.dom.Element pe, SharpKit.TinyMCE.dom.Element e, SharpKit.TinyMCE.dom.Element re){return null;}
Exemple #17
0
 /// <summary>
 /// Replaces the specified element or elements with the specified element, the new element will
 /// be cloned if multiple inputs elements are passed.
 /// </summary>
 /// <param name="n">New element to replace old ones with.</param>
 /// <param name="k">Optional keep children state, if set to true child nodes from the old object will be added to new ones.</param>
 public object replace(SharpKit.TinyMCE.dom.Element n, bool k){return null;}
Exemple #18
0
 /// <summary>
 /// Renames the specified element to a new name and keep it's attributes and children.
 /// </summary>
 /// <param name="elm">Element to rename.</param>
 /// <param name="name">Name of the new element.</param>
 public object rename(SharpKit.TinyMCE.dom.Element elm, string name){return null;}
Exemple #19
0
 /// <summary>
 /// Inserts a node at a specific position as a child of the current node.
 /// </summary>
 /// <param name="node">Node to insert as a child of the current node.</param>
 /// <param name="ref_node">Reference node to set node before/after.</param>
 /// <param name="before">Optional state to insert the node before the reference node.</param>
 public SharpKit.TinyMCE.html.Node insert(SharpKit.TinyMCE.html.Node node, SharpKit.TinyMCE.html.Node ref_node, bool before){return null;}
 /// <summary>
 /// Constructs a new window manager instance.
 /// </summary>
 /// <param name="ed">Editor instance that the windows are bound to.</param>
 public WindowManager(SharpKit.TinyMCE.Editor ed){}
Exemple #21
0
 /// <summary>
 /// Removes a specific sub menu or menu item from the drop menu.
 /// </summary>
 /// <param name="o">Menu item or menu to remove from drop menu.</param>
 public SharpKit.TinyMCE.ui.Control remove(SharpKit.TinyMCE.ui.Control o){return null;}
Exemple #22
0
 /// <summary>
 /// Matches the current selection or specified node against the specified format name.
 /// </summary>
 /// <param name="name">Name of format to match.</param>
 /// <param name="vars">Optional list of variables to replace before checking it.</param>
 /// <param name="node">Optional node to check.</param>
 public bool match(string name, object vars, SharpKit.TinyMCE.html.Node node){return false;}
Exemple #23
0
 /// <summary>
 /// Removes a editor instance from the collection.
 /// </summary>
 /// <param name="e">Editor instance to remove.</param>
 public static SharpKit.TinyMCE.Editor remove(SharpKit.TinyMCE.Editor e){return null;}
Exemple #24
0
 /// <summary>
 /// Return true/false if the specified node has the specified format.
 /// </summary>
 /// <param name="node">Node to check the format on.</param>
 /// <param name="name">Format name to check.</param>
 /// <param name="vars">Optional list of variables to replace before checking it.</param>
 /// <param name="similar">Match format that has similar properties.</param>
 public object matchNode(SharpKit.TinyMCE.html.Node node, string name, object vars, bool similar){return null;}
Exemple #25
0
 /// <summary>
 /// Adds a control to the control collection inside the manager.
 /// </summary>
 /// <param name="Control">instance to add to collection.</param>
 public SharpKit.TinyMCE.ui.Control add(SharpKit.TinyMCE.ui.Control Control){return null;}
Exemple #26
0
 /// <summary>
 /// Toggles the specified format on/off.
 /// </summary>
 /// <param name="name">Name of format to apply/remove.</param>
 /// <param name="vars">Optional list of variables to replace within format before applying/removing it.</param>
 /// <param name="node">Optional node to apply the format to or remove from. Defaults to current selection.</param>
 public object toggle(string name, object vars, SharpKit.TinyMCE.html.Node node){return null;}
Exemple #27
0
 /// <summary>
 /// Initializes the plugin, this will be executed after the plugin has been created.
 /// This call is done before the editor instance has finished it's initialization so use the onInit event
 /// of the editor instance to intercept that event.
 /// </summary>
 /// <param name="ed">Editor instance that the plugin is initialized in.</param>
 /// <param name="url">Absolute URL to where the plugin is located.</param>
 public object init(SharpKit.TinyMCE.Editor ed, string url){return null;}
Exemple #28
0
 /// <summary>
 /// Constructs a new listbox control instance.
 /// </summary>
 /// <param name="id">Control id for the list box.</param>
 /// <param name="s">Optional name/value settings object.</param>
 /// <param name="ed">Optional the editor instance this button is for.</param>
 public ListBox(string id, object s, SharpKit.TinyMCE.Editor ed){}
 /// <summary>
 /// Create a new KeyboardNavigation instance to handle the focus for a specific element.
 /// </summary>
 /// <param name="settings">the settings object to define how keyboard navigation works.</param>
 /// <param name="dom">the DOMUtils instance to use.</param>
 public KeyboardNavigation(object settings, SharpKit.TinyMCE.dom.DOMUtils dom){}
Exemple #30
0
 /// <summary>
 /// Returns the absolute x, y position of a node. The position will be returned in a object with x, y fields.
 /// </summary>
 /// <param name="ro">Optional root element to stop calculations at.</param>
 public object getPos(SharpKit.TinyMCE.dom.Element ro){return null;}