Copie Sequenceur Midi -> Sequenceur OSC
This commit is contained in:
parent
0fd3c6d95c
commit
ec2ab96610
8 changed files with 1236 additions and 0 deletions
341
DMX-2.0/SeqOscUI.cs
Normal file
341
DMX-2.0/SeqOscUI.cs
Normal file
|
|
@ -0,0 +1,341 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (C) Arnaud Houdelette 2012-2014
|
||||||
|
Copyright (C) Emmanuel Langlois 2012-2014
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Gtk;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace DMX2
|
||||||
|
{
|
||||||
|
[System.ComponentModel.ToolboxItem(true)]
|
||||||
|
public partial class SeqOscUI : SequenceurUI
|
||||||
|
{
|
||||||
|
bool fullUpdFlag = true;
|
||||||
|
bool updating;
|
||||||
|
SequenceurOSC sequenceur; /* pointe sur les données */
|
||||||
|
ListStore lsEffets=null; /* liste des effets */
|
||||||
|
//TreeViewColumn nomCol; /* inutile dans le contexte macro */
|
||||||
|
|
||||||
|
bool effetChange = false;
|
||||||
|
public void EffetChange ()
|
||||||
|
{
|
||||||
|
effetChange = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime nextMaj = DateTime.Now;
|
||||||
|
|
||||||
|
void RenamePopup (object sender, ContextMenuEventArgs e)
|
||||||
|
{
|
||||||
|
Menu m = new Menu();
|
||||||
|
MenuItem renameItem = new MenuItem("Renommer le Sequenceur");
|
||||||
|
renameItem.ButtonPressEvent += new ButtonPressEventHandler(OnRenameItemButtonPressed);
|
||||||
|
m.Add(renameItem);
|
||||||
|
m.ShowAll();
|
||||||
|
m.Popup();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void OnRenameItemButtonPressed (object o, ButtonPressEventArgs args)
|
||||||
|
{
|
||||||
|
var dlg = new Dialog ("Nouveau Nom ?", GetAncestor(Gtk.Window.GType) as Gtk.Window , DialogFlags.Modal); var entry = new Entry (sequenceur.Name);
|
||||||
|
dlg.AddButton (Stock.Ok, ResponseType.Ok).GrabDefault(); dlg.AddButton (Stock.Cancel, ResponseType.Cancel);
|
||||||
|
dlg.VBox.Add (entry); dlg.VBox.ShowAll ();
|
||||||
|
entry.ActivatesDefault=true;
|
||||||
|
|
||||||
|
if ((ResponseType)dlg.Run () == ResponseType.Ok) {
|
||||||
|
sequenceur.Name = entry.Text;
|
||||||
|
titreLabel.Text = sequenceur.Name;
|
||||||
|
}
|
||||||
|
dlg.Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region construction et gestion de la matrice d'affichage
|
||||||
|
protected void ConstruitMatrice () /* Matrice d'affichage des effets de la macro */
|
||||||
|
{
|
||||||
|
|
||||||
|
cmdList.EnableGridLines= TreeViewGridLines.Both;
|
||||||
|
|
||||||
|
var idCol = new Gtk.TreeViewColumn ();
|
||||||
|
var idCell = new Gtk.CellRendererText ();
|
||||||
|
|
||||||
|
idCol.Title = "Num";
|
||||||
|
idCol.PackStart (idCell, true);
|
||||||
|
idCol.SetCellDataFunc (idCell, new Gtk.TreeCellDataFunc (RenderMatriceNum));
|
||||||
|
cmdList.AppendColumn (idCol);
|
||||||
|
|
||||||
|
|
||||||
|
var nomCol = new Gtk.TreeViewColumn ();
|
||||||
|
var nomCell = new Gtk.CellRendererText ();
|
||||||
|
nomCol.Title = "Nom";
|
||||||
|
nomCol.PackStart (nomCell, true);
|
||||||
|
nomCol.SetCellDataFunc (nomCell, new Gtk.TreeCellDataFunc (RenderMatriceNom));
|
||||||
|
nomCol.Resizable = true;
|
||||||
|
nomCell.Editable = true;
|
||||||
|
nomCell.Edited += OnNomCellEdited;
|
||||||
|
cmdList.AppendColumn (nomCol);
|
||||||
|
|
||||||
|
var topCol = new Gtk.TreeViewColumn ();
|
||||||
|
var topCell = new Gtk.CellRendererText ();
|
||||||
|
topCol.Title = "Top";
|
||||||
|
topCol.PackStart (topCell, true);
|
||||||
|
topCol.SetCellDataFunc (topCell, new Gtk.TreeCellDataFunc (RenderMatriceTop));
|
||||||
|
topCell.Editable = true;
|
||||||
|
topCell.Edited += OnTopCellEdited;
|
||||||
|
cmdList.AppendColumn (topCol);
|
||||||
|
|
||||||
|
var cmdCol = new Gtk.TreeViewColumn ();
|
||||||
|
var cmdCell = new Gtk.CellRendererText ();
|
||||||
|
cmdCol.Title = "Commande OSC";
|
||||||
|
cmdCol.PackStart (cmdCell, true);
|
||||||
|
cmdCol.SetCellDataFunc (cmdCell, new TreeCellDataFunc (RenderMatriceCmd));
|
||||||
|
cmdCell.Editable = true;
|
||||||
|
cmdCell.Edited += OnCmdCellEdited;
|
||||||
|
cmdList.AppendColumn (cmdCol);
|
||||||
|
|
||||||
|
lsEffets = new Gtk.ListStore(typeof (SequenceurOSC.Ligne));
|
||||||
|
this.cmdList.Model = lsEffets;
|
||||||
|
UpdListeEffets();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderMatriceNum (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
if (Conduite.Courante==null) return;
|
||||||
|
string num=string.Empty;
|
||||||
|
SequenceurOSC.Ligne l = tree_model.GetValue (iter, 0) as SequenceurOSC.Ligne;
|
||||||
|
if( sequenceur.IndexLigneEnCours == sequenceur.Lignes.IndexOf(l) )
|
||||||
|
num+= "->";
|
||||||
|
if( sequenceur.IndexLigneaSuivre == sequenceur.Lignes.IndexOf(l) )
|
||||||
|
num+= "* ";
|
||||||
|
(cell as Gtk.CellRendererText).Text = num + (sequenceur.Lignes.IndexOf(l)+1).ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderMatriceNom (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
if (Conduite.Courante==null) return;
|
||||||
|
SequenceurOSC.Ligne l = tree_model.GetValue (iter, 0) as SequenceurOSC.Ligne;
|
||||||
|
(cell as Gtk.CellRendererText).Text = l.Nom;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderMatriceTop (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
if (Conduite.Courante==null) return;
|
||||||
|
SequenceurOSC.Ligne l = tree_model.GetValue (iter, 0) as SequenceurOSC.Ligne;
|
||||||
|
if (l.Top< TimeSpan.Zero) (cell as Gtk.CellRendererText).Text = string.Empty;
|
||||||
|
else (cell as Gtk.CellRendererText).Text = (l.Top.TotalMilliseconds /100).ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderMatriceCmd (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
if (Conduite.Courante==null) return;
|
||||||
|
SequenceurOSC.Ligne l = tree_model.GetValue (iter, 0) as SequenceurOSC.Ligne;
|
||||||
|
(cell as Gtk.CellRendererText).Text = l.Commande;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnNomCellEdited (object o, EditedArgs args)
|
||||||
|
{
|
||||||
|
Gtk.TreeIter iter;
|
||||||
|
lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path));
|
||||||
|
SequenceurOSC.Ligne l = lsEffets.GetValue(iter,0) as SequenceurOSC.Ligne;
|
||||||
|
l.Nom = args.NewText;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnTopCellEdited (object o, EditedArgs args)
|
||||||
|
{
|
||||||
|
Gtk.TreeIter iter;
|
||||||
|
lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path));
|
||||||
|
SequenceurOSC.Ligne l = lsEffets.GetValue (iter, 0) as SequenceurOSC.Ligne;
|
||||||
|
if (args.NewText.Length == 0)
|
||||||
|
l.Top = TimeSpan.MinValue;
|
||||||
|
else {
|
||||||
|
int val;
|
||||||
|
if(int.TryParse(args.NewText, out val))
|
||||||
|
l.Top = TimeSpan.FromMilliseconds(val *100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnCmdCellEdited (object o, EditedArgs args)
|
||||||
|
{
|
||||||
|
Gtk.TreeIter iter;
|
||||||
|
lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path));
|
||||||
|
SequenceurOSC.Ligne l = lsEffets.GetValue(iter,0) as SequenceurOSC.Ligne;
|
||||||
|
l.Commande = args.NewText;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdListeEffets ()
|
||||||
|
{
|
||||||
|
lsEffets.Clear();
|
||||||
|
foreach (var ligne in sequenceur.Lignes) {
|
||||||
|
lsEffets.AppendValues(ligne);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public SeqOscUI (SequenceurOSC s ) : base (s)
|
||||||
|
{
|
||||||
|
this.Build ();
|
||||||
|
titreLabel.Text = s.Name;
|
||||||
|
sequenceur = s;
|
||||||
|
ConstruitMatrice ();
|
||||||
|
|
||||||
|
|
||||||
|
new ContextMenuHelper(frame1,RenamePopup);
|
||||||
|
new ContextMenuHelper(evBBox,CompteurPopup);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void CompteurPopup (object sender, ContextMenuEventArgs e)
|
||||||
|
{
|
||||||
|
Menu m = new Menu();
|
||||||
|
|
||||||
|
MenuItem item = new MenuItem("Effet Suivant");
|
||||||
|
m.Add(item);
|
||||||
|
item.Submenu = Conduite.Courante.EventManager.GetMenu(null,
|
||||||
|
delegate(object o,string eventId){
|
||||||
|
sequenceur.BindEffetSuivantEvent(eventId);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
item = new MenuItem("Effet Precedent");
|
||||||
|
m.Add(item);
|
||||||
|
item.Submenu = Conduite.Courante.EventManager.GetMenu(null,
|
||||||
|
delegate(object o,string eventId){
|
||||||
|
sequenceur.BindEffetPrecedentEvent(eventId);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
m.ShowAll();
|
||||||
|
m.Popup();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override void Update (bool full)
|
||||||
|
{
|
||||||
|
if (fullUpdFlag || full)
|
||||||
|
FullUpdate ();
|
||||||
|
// UpdateValues (); inutil dans le contexte
|
||||||
|
timeLabel.LabelProp = string.Format (@"{0:0\.0}", sequenceur.TimeStamp.TotalMilliseconds / 100);
|
||||||
|
|
||||||
|
if (effetChange) {
|
||||||
|
//UpdListeEffets();
|
||||||
|
cmdList.QueueDraw();
|
||||||
|
SelectionneEffet (sequenceur.IndexLigneEnCours);
|
||||||
|
posLabel.Text = string.Format("n°{0}",sequenceur.IndexLigneEnCours +1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DateTime.Now > nextMaj ) {
|
||||||
|
nextMaj = DateTime.Now.AddMilliseconds(500);
|
||||||
|
StringBuilder str = new StringBuilder ();
|
||||||
|
actLabel.LabelProp = str.ToString ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SelectionneEffet (int index)
|
||||||
|
{
|
||||||
|
if(index <0 ) return;
|
||||||
|
cmdList.SetCursor( new TreePath( new int[1] {index }) ,null,false);
|
||||||
|
effetChange = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnCloseActionActivated (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void FullUpdate ()
|
||||||
|
{
|
||||||
|
fullUpdFlag = true;
|
||||||
|
|
||||||
|
posLabel.Text = string.Format("n°{0}",sequenceur.IndexLigneEnCours +1);
|
||||||
|
|
||||||
|
fullUpdFlag=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int IndexEffetSelectionne()
|
||||||
|
{
|
||||||
|
var sel = cmdList.Selection.GetSelectedRows();
|
||||||
|
if(sel.Length ==0) return -1;
|
||||||
|
return cmdList.Selection.GetSelectedRows()[0].Indices[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnGoForwardActionActivated (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
sequenceur.LigneSuivante();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnGoBackActionActivated (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (sequenceur.IndexLigneEnCours > 0) {
|
||||||
|
sequenceur.IndexLigneaSuivre = sequenceur.IndexLigneEnCours - 1;
|
||||||
|
sequenceur.LigneSuivante ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnMediaPauseActionActivated (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
sequenceur.Paused = ! sequenceur.Paused;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnBtnAjoutLigneActivated (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
int pos=IndexEffetSelectionne() + 1;
|
||||||
|
sequenceur.AjoutLigne(pos);
|
||||||
|
UpdListeEffets();
|
||||||
|
cmdList.SetCursor( new TreePath( new int[1] {pos }) , cmdList.Columns[1] ,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnRemoveLigneActivated (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
int pos = IndexEffetSelectionne();
|
||||||
|
if (pos==-1) return;
|
||||||
|
sequenceur.RetireLigne(pos);
|
||||||
|
UpdListeEffets();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnCmdListeCursorChanged (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if(effetChange) return;
|
||||||
|
TreeViewColumn col;
|
||||||
|
TreePath path;
|
||||||
|
cmdList.GetCursor (out path, out col);
|
||||||
|
|
||||||
|
if (cmdList.Columns [0] == col) {
|
||||||
|
sequenceur.IndexLigneaSuivre = IndexEffetSelectionne();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected void OnHbox2SizeAllocated (object o, SizeAllocatedArgs args)
|
||||||
|
{
|
||||||
|
actLabel.SetSizeRequest ( Math.Max(50, args.Allocation.Width - posLabel.Allocation.Width - timeLabel.Allocation.Width - 50),-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
484
DMX-2.0/SequenceurOSC.cs
Normal file
484
DMX-2.0/SequenceurOSC.cs
Normal file
|
|
@ -0,0 +1,484 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (C) Arnaud Houdelette 2012-2014
|
||||||
|
Copyright (C) Emmanuel Langlois 2012-2014
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Xml;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace DMX2
|
||||||
|
{
|
||||||
|
public class SequenceurOSC : Sequenceur
|
||||||
|
{
|
||||||
|
public class Ligne {
|
||||||
|
public Ligne(){}
|
||||||
|
string nom = string.Empty;
|
||||||
|
TimeSpan top = TimeSpan.MinValue;
|
||||||
|
|
||||||
|
string commande =null;
|
||||||
|
|
||||||
|
public string Nom {
|
||||||
|
get {
|
||||||
|
return nom;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
nom = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public TimeSpan Top {
|
||||||
|
get {
|
||||||
|
return top;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
top = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Commande {
|
||||||
|
get {
|
||||||
|
return commande;
|
||||||
|
}
|
||||||
|
set{
|
||||||
|
commande = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Save (XmlElement parent)
|
||||||
|
{
|
||||||
|
XmlElement el = parent.OwnerDocument.CreateElement ("Ligne");
|
||||||
|
parent.AppendChild (el);
|
||||||
|
|
||||||
|
el.SetAttribute ("nom", nom);
|
||||||
|
el.SetAttribute ("top", top.ToString ());
|
||||||
|
|
||||||
|
el.SetAttribute ("cmd", commande);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Ligne Load (Conduite c, XmlElement el)
|
||||||
|
{
|
||||||
|
Ligne l = new Ligne();
|
||||||
|
l.nom = el.GetAttribute ("nom");
|
||||||
|
l.top = TimeSpan.Parse(el.GetAttribute("top"));
|
||||||
|
l.commande = el.GetAttribute ("cmd");
|
||||||
|
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<Ligne> lignes = new List<Ligne>();
|
||||||
|
|
||||||
|
Ligne aSuivre = null;
|
||||||
|
Ligne enCours = null;
|
||||||
|
Ligne ligneMaitre = null;
|
||||||
|
|
||||||
|
TimeSpan timeStamp = TimeSpan.Zero;
|
||||||
|
TimeSpan topSuivant = TimeSpan.Zero;
|
||||||
|
bool topPresent = false;
|
||||||
|
|
||||||
|
actionEventTarget goNextEventTarget=null;
|
||||||
|
actionEventTarget goBackEventTarget=null;
|
||||||
|
|
||||||
|
|
||||||
|
SeqOscUI ui = null;
|
||||||
|
bool change = false;
|
||||||
|
|
||||||
|
bool paused=false;
|
||||||
|
|
||||||
|
public bool Paused {
|
||||||
|
get {
|
||||||
|
return paused;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
paused = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public SequenceurOSC ()
|
||||||
|
{
|
||||||
|
|
||||||
|
goNextEventTarget = new actionEventTarget (
|
||||||
|
delegate(EventData data) {
|
||||||
|
if(data.value==255) LigneSuivante();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
goBackEventTarget = new actionEventTarget (
|
||||||
|
delegate(EventData data) {
|
||||||
|
if(data.value==255){
|
||||||
|
if (IndexLigneEnCours > 0) {
|
||||||
|
IndexLigneaSuivre = IndexLigneEnCours - 1;
|
||||||
|
LigneSuivante ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int IndexLigneEnCours
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
if (enCours == null) return -1;
|
||||||
|
return lignes.IndexOf(enCours);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int IndexLigneaSuivre
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
if (aSuivre == null)
|
||||||
|
return -1;
|
||||||
|
return lignes.IndexOf (aSuivre);
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
aSuivre = lignes[value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int AjoutLigne (int pos)
|
||||||
|
{
|
||||||
|
lock (this) {
|
||||||
|
lignes.Insert (pos, new Ligne ());
|
||||||
|
CommandAdd(pos);
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RetireLigne (int pos)
|
||||||
|
{
|
||||||
|
lock (this) {
|
||||||
|
if (lignes [pos] == enCours) {
|
||||||
|
enCours = null;
|
||||||
|
if (pos + 1 < lignes.Count)
|
||||||
|
aSuivre = lignes [pos + 1];
|
||||||
|
}
|
||||||
|
if (lignes [pos] == aSuivre)
|
||||||
|
aSuivre = null;
|
||||||
|
lignes.RemoveAt (pos);
|
||||||
|
CommandRemove(pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public TimeSpan TimeStamp {
|
||||||
|
get {
|
||||||
|
return timeStamp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ReadOnlyCollection<Ligne> Lignes {
|
||||||
|
get {
|
||||||
|
return lignes.AsReadOnly();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int ValeurCircuit (Circuit c)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Tick (TimeSpan time)
|
||||||
|
{
|
||||||
|
if (paused)
|
||||||
|
return;
|
||||||
|
timeStamp += time;
|
||||||
|
|
||||||
|
if (Monitor.TryEnter (this)) {
|
||||||
|
try {
|
||||||
|
if (topPresent) {
|
||||||
|
if (timeStamp > topSuivant) {
|
||||||
|
LigneSuivante ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
Monitor.Exit (this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LigneSuivante ()
|
||||||
|
{
|
||||||
|
lock (this) {
|
||||||
|
if(lignes.Count==0) return;
|
||||||
|
int index;
|
||||||
|
change = true; topPresent = false;
|
||||||
|
if(aSuivre==null) // selection souris
|
||||||
|
{
|
||||||
|
index = IndexLigneEnCours +1; // Premier effet si aucun précédement
|
||||||
|
if(index>= lignes.Count) index = 0; // Boucle si arrivé à la fin
|
||||||
|
|
||||||
|
enCours = lignes[index];
|
||||||
|
|
||||||
|
// Gestion de la Reprise
|
||||||
|
// if(enCours.Circuits.ToLower().Equals("r") && ligneMaitre != null)
|
||||||
|
// enCours = ligneMaitre;
|
||||||
|
|
||||||
|
if(enCours.Nom.Length!=0)
|
||||||
|
{
|
||||||
|
ligneMaitre = enCours;
|
||||||
|
timeStamp = TimeSpan.Zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
enCours = aSuivre;
|
||||||
|
ligneMaitre = enCours;
|
||||||
|
timeStamp = TimeSpan.Zero;
|
||||||
|
|
||||||
|
}
|
||||||
|
index = IndexLigneEnCours+1;
|
||||||
|
if(index<lignes.Count)
|
||||||
|
{
|
||||||
|
// Si top présent - non negatif
|
||||||
|
if(lignes[index].Top>= TimeSpan.Zero)
|
||||||
|
{
|
||||||
|
topPresent = true;
|
||||||
|
topSuivant= lignes[index].Top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
aSuivre = null;
|
||||||
|
LanceCommandeMidi();
|
||||||
|
if(ui!=null)
|
||||||
|
ui.EffetChange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LanceCommandeMidi ()
|
||||||
|
{
|
||||||
|
Console.WriteLine (enCours.Commande);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public bool LigneChange ()
|
||||||
|
{
|
||||||
|
if (change) {
|
||||||
|
change = false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Save (System.Xml.XmlElement parent)
|
||||||
|
{
|
||||||
|
System.Xml.XmlElement el = parent.OwnerDocument.CreateElement ("SequenceurOSC");
|
||||||
|
System.Xml.XmlElement xmlEl;
|
||||||
|
|
||||||
|
parent.AppendChild (el);
|
||||||
|
el.SetAttribute ("id", ID.ToString ());
|
||||||
|
el.SetAttribute ("name", Name);
|
||||||
|
//el.SetAttribute ("master", master.ToString ());
|
||||||
|
|
||||||
|
xmlEl = parent.OwnerDocument.CreateElement ("EffetSuivant");
|
||||||
|
if(Conduite.Courante.EventManager.SaveBindings(xmlEl,goNextEventTarget )) el.AppendChild(xmlEl);
|
||||||
|
|
||||||
|
xmlEl = parent.OwnerDocument.CreateElement ("EffetPrecedent");
|
||||||
|
if(Conduite.Courante.EventManager.SaveBindings(xmlEl,goBackEventTarget )) el.AppendChild(xmlEl);
|
||||||
|
|
||||||
|
foreach (Ligne li in lignes) {
|
||||||
|
li.Save(el);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override SequenceurUI GetUI ()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (ui == null) {
|
||||||
|
ui = new SeqOscUI (this);
|
||||||
|
ui.Destroyed += UiDestroyed;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UiDestroyed (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ui = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BindEffetSuivantEvent (string eventId)
|
||||||
|
{
|
||||||
|
if (eventId.Length == 0) {
|
||||||
|
Conduite.Courante.EventManager.Unbind (goNextEventTarget);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Conduite.Courante.EventManager.Bind(eventId,goNextEventTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BindEffetPrecedentEvent (string eventId)
|
||||||
|
{
|
||||||
|
if (eventId.Length == 0) {
|
||||||
|
Conduite.Courante.EventManager.Unbind (goBackEventTarget);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Conduite.Courante.EventManager.Bind(eventId,goBackEventTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static new SequenceurOSC Load (Conduite conduite, System.Xml.XmlElement el)
|
||||||
|
{
|
||||||
|
SequenceurOSC seq = new SequenceurOSC();
|
||||||
|
seq.LoadSeq(conduite,el);
|
||||||
|
return seq;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadSeq (Conduite conduite, System.Xml.XmlElement el)
|
||||||
|
{
|
||||||
|
ID = int.Parse (el.GetAttribute ("id"));
|
||||||
|
Name = el.GetAttribute ("name");
|
||||||
|
|
||||||
|
XmlElement xmlE;
|
||||||
|
|
||||||
|
|
||||||
|
if ((xmlE = el["EffetSuivant"])!= null)
|
||||||
|
foreach(string id in EventManager.LoadBindings(xmlE))
|
||||||
|
BindEffetSuivantEvent(id);
|
||||||
|
|
||||||
|
if ((xmlE = el["EffetPrecedent"])!= null)
|
||||||
|
foreach(string id in EventManager.LoadBindings(xmlE))
|
||||||
|
BindEffetPrecedentEvent(id);
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var xe in el.GetElementsByTagName("Ligne"))
|
||||||
|
lignes.Add(Ligne.Load(conduite,xe as System.Xml.XmlElement));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static System.Text.RegularExpressions.Regex regexCommand1 = new System.Text.RegularExpressions.Regex(
|
||||||
|
@"(?<effet>\d+)",
|
||||||
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
|
static System.Text.RegularExpressions.Regex regexCommand2 = new System.Text.RegularExpressions.Regex(
|
||||||
|
@"(?<effet>\d+)(?<params>(t\d+)?)?",
|
||||||
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public override void Command (string command)
|
||||||
|
{
|
||||||
|
lock (this) {
|
||||||
|
var cmd = regexCommand1.Match(command);
|
||||||
|
|
||||||
|
if (cmd.Success) {
|
||||||
|
if (cmd.Groups ["effet"].Success) {
|
||||||
|
int effet = int.Parse (cmd.Groups ["effet"].Value) - 1;
|
||||||
|
|
||||||
|
if(effet>=lignes.Count) return;
|
||||||
|
enCours = lignes[effet];
|
||||||
|
ligneMaitre = enCours;
|
||||||
|
timeStamp = TimeSpan.Zero;
|
||||||
|
|
||||||
|
topPresent = false;
|
||||||
|
int index = IndexLigneEnCours+1;
|
||||||
|
if(index<lignes.Count)
|
||||||
|
{
|
||||||
|
// Si top présent - non negatif
|
||||||
|
if(lignes[index].Top>= TimeSpan.Zero)
|
||||||
|
{
|
||||||
|
topPresent = true;
|
||||||
|
topSuivant= lignes[index].Top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
aSuivre = null;
|
||||||
|
|
||||||
|
LanceCommandeMidi();
|
||||||
|
|
||||||
|
if(ui!=null) ui.EffetChange();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommandAdd (int index)
|
||||||
|
{
|
||||||
|
lock (Conduite.Courante.SequenceurMaitre) {
|
||||||
|
string[] commands = Conduite.Courante.SequenceurMaitre.GetCommands (this);
|
||||||
|
|
||||||
|
for (int i = 0; i < commands.Length; i++) {
|
||||||
|
var cmd = regexCommand2.Match(commands[i]);
|
||||||
|
if(cmd.Success){
|
||||||
|
int ef = int.Parse(cmd.Groups["effet"].Value);
|
||||||
|
if (ef-1>index) {
|
||||||
|
ef++;
|
||||||
|
commands[i] = ef.ToString() + cmd.Groups["params"].Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Conduite.Courante.SequenceurMaitre.SetCommands(this,commands);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommandRemove (int index)
|
||||||
|
{
|
||||||
|
lock (Conduite.Courante.SequenceurMaitre) {
|
||||||
|
string[] commands = Conduite.Courante.SequenceurMaitre.GetCommands (this);
|
||||||
|
|
||||||
|
for (int i = 0; i < commands.Length; i++) {
|
||||||
|
var cmd = regexCommand2.Match(commands[i]);
|
||||||
|
if(cmd.Success){
|
||||||
|
int ef = int.Parse(cmd.Groups["effet"].Value);
|
||||||
|
if (ef-1 == index)
|
||||||
|
commands[i] = string.Empty;
|
||||||
|
else if (ef-1>index) {
|
||||||
|
ef--;
|
||||||
|
commands[i] = ef.ToString() + cmd.Groups["params"].Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Conduite.Courante.SequenceurMaitre.SetCommands(this,commands);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommandSwap (int index)
|
||||||
|
{
|
||||||
|
lock (Conduite.Courante.SequenceurMaitre) {
|
||||||
|
string[] commands = Conduite.Courante.SequenceurMaitre.GetCommands (this);
|
||||||
|
|
||||||
|
// numeros a swapper
|
||||||
|
int a = index+1;
|
||||||
|
int b = index+2;
|
||||||
|
|
||||||
|
for (int i = 0; i < commands.Length; i++) {
|
||||||
|
var cmd = regexCommand2.Match(commands[i]);
|
||||||
|
if(cmd.Success){
|
||||||
|
int ef = int.Parse(cmd.Groups["effet"].Value);
|
||||||
|
if (ef == a)
|
||||||
|
commands[i] = b.ToString() + cmd.Groups["params"].Value;
|
||||||
|
if (ef == b)
|
||||||
|
commands[i] = a.ToString() + cmd.Groups["params"].Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Conduite.Courante.SequenceurMaitre.SetCommands(this,commands);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
231
DMX-2.0/gtk-gui/DMX2.SeqOscUI.cs
Normal file
231
DMX-2.0/gtk-gui/DMX2.SeqOscUI.cs
Normal file
|
|
@ -0,0 +1,231 @@
|
||||||
|
|
||||||
|
// This file has been generated by the GUI designer. Do not modify.
|
||||||
|
namespace DMX2
|
||||||
|
{
|
||||||
|
public partial class SeqOscUI
|
||||||
|
{
|
||||||
|
private global::Gtk.UIManager UIManager;
|
||||||
|
|
||||||
|
private global::Gtk.ToggleAction closeAction;
|
||||||
|
|
||||||
|
private global::Gtk.Action circuitsAction;
|
||||||
|
|
||||||
|
private global::Gtk.Action goForwardAction;
|
||||||
|
|
||||||
|
private global::Gtk.Action goBackAction;
|
||||||
|
|
||||||
|
private global::Gtk.Action mediaPauseAction;
|
||||||
|
|
||||||
|
private global::Gtk.Action mediaNextAction;
|
||||||
|
|
||||||
|
private global::Gtk.Action btnAjoutLigne;
|
||||||
|
|
||||||
|
private global::Gtk.Action btnRetireligne;
|
||||||
|
|
||||||
|
private global::Gtk.Action Action;
|
||||||
|
|
||||||
|
private global::Gtk.Frame frame1;
|
||||||
|
|
||||||
|
private global::Gtk.Alignment GtkAlignment;
|
||||||
|
|
||||||
|
private global::Gtk.Alignment alignment1;
|
||||||
|
|
||||||
|
private global::Gtk.VBox vbox2;
|
||||||
|
|
||||||
|
private global::Gtk.HBox hbox1;
|
||||||
|
|
||||||
|
private global::Gtk.VBox vbox3;
|
||||||
|
|
||||||
|
private global::Gtk.EventBox evBBox;
|
||||||
|
|
||||||
|
private global::Gtk.HBox hbox2;
|
||||||
|
|
||||||
|
private global::Gtk.Label posLabel;
|
||||||
|
|
||||||
|
private global::Gtk.Label actLabel;
|
||||||
|
|
||||||
|
private global::Gtk.Label timeLabel;
|
||||||
|
|
||||||
|
private global::Gtk.Toolbar toolbar;
|
||||||
|
|
||||||
|
private global::Gtk.Toolbar toolbar1;
|
||||||
|
|
||||||
|
private global::Gtk.ScrolledWindow scrolledwindow1;
|
||||||
|
|
||||||
|
private global::Gtk.TreeView cmdList;
|
||||||
|
|
||||||
|
private global::Gtk.Label titreLabel;
|
||||||
|
|
||||||
|
protected virtual void Build ()
|
||||||
|
{
|
||||||
|
global::Stetic.Gui.Initialize (this);
|
||||||
|
// Widget DMX2.SeqOscUI
|
||||||
|
Stetic.BinContainer w1 = global::Stetic.BinContainer.Attach (this);
|
||||||
|
this.UIManager = new global::Gtk.UIManager ();
|
||||||
|
global::Gtk.ActionGroup w2 = new global::Gtk.ActionGroup ("Default");
|
||||||
|
this.closeAction = new global::Gtk.ToggleAction ("closeAction", " ", null, "gtk-close");
|
||||||
|
this.closeAction.ShortLabel = " ";
|
||||||
|
w2.Add (this.closeAction, null);
|
||||||
|
this.circuitsAction = new global::Gtk.Action ("circuitsAction", null, "Association des circuits\nau sequenceur", "circuits");
|
||||||
|
w2.Add (this.circuitsAction, null);
|
||||||
|
this.goForwardAction = new global::Gtk.Action ("goForwardAction", null, null, "gtk-go-forward");
|
||||||
|
w2.Add (this.goForwardAction, null);
|
||||||
|
this.goBackAction = new global::Gtk.Action ("goBackAction", null, null, "gtk-go-back");
|
||||||
|
w2.Add (this.goBackAction, null);
|
||||||
|
this.mediaPauseAction = new global::Gtk.Action ("mediaPauseAction", null, null, "gtk-media-pause");
|
||||||
|
w2.Add (this.mediaPauseAction, null);
|
||||||
|
this.mediaNextAction = new global::Gtk.Action ("mediaNextAction", null, null, "gtk-media-next");
|
||||||
|
w2.Add (this.mediaNextAction, null);
|
||||||
|
this.btnAjoutLigne = new global::Gtk.Action ("btnAjoutLigne", null, null, "gtk-add");
|
||||||
|
w2.Add (this.btnAjoutLigne, null);
|
||||||
|
this.btnRetireligne = new global::Gtk.Action ("btnRetireligne", null, null, "gtk-remove");
|
||||||
|
w2.Add (this.btnRetireligne, null);
|
||||||
|
this.Action = new global::Gtk.Action ("Action", null, null, null);
|
||||||
|
w2.Add (this.Action, null);
|
||||||
|
this.UIManager.InsertActionGroup (w2, 0);
|
||||||
|
this.Name = "DMX2.SeqOscUI";
|
||||||
|
// Container child DMX2.SeqOscUI.Gtk.Container+ContainerChild
|
||||||
|
this.frame1 = new global::Gtk.Frame ();
|
||||||
|
this.frame1.Name = "frame1";
|
||||||
|
this.frame1.ShadowType = ((global::Gtk.ShadowType)(1));
|
||||||
|
// Container child frame1.Gtk.Container+ContainerChild
|
||||||
|
this.GtkAlignment = new global::Gtk.Alignment (0F, 0F, 1F, 1F);
|
||||||
|
this.GtkAlignment.Name = "GtkAlignment";
|
||||||
|
this.GtkAlignment.LeftPadding = ((uint)(12));
|
||||||
|
// Container child GtkAlignment.Gtk.Container+ContainerChild
|
||||||
|
this.alignment1 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
|
||||||
|
this.alignment1.Name = "alignment1";
|
||||||
|
// Container child alignment1.Gtk.Container+ContainerChild
|
||||||
|
this.vbox2 = new global::Gtk.VBox ();
|
||||||
|
this.vbox2.Name = "vbox2";
|
||||||
|
this.vbox2.Spacing = 6;
|
||||||
|
// Container child vbox2.Gtk.Box+BoxChild
|
||||||
|
this.hbox1 = new global::Gtk.HBox ();
|
||||||
|
this.hbox1.Name = "hbox1";
|
||||||
|
this.hbox1.Spacing = 6;
|
||||||
|
// Container child hbox1.Gtk.Box+BoxChild
|
||||||
|
this.vbox3 = new global::Gtk.VBox ();
|
||||||
|
this.vbox3.Name = "vbox3";
|
||||||
|
// Container child vbox3.Gtk.Box+BoxChild
|
||||||
|
this.evBBox = new global::Gtk.EventBox ();
|
||||||
|
this.evBBox.Name = "evBBox";
|
||||||
|
// Container child evBBox.Gtk.Container+ContainerChild
|
||||||
|
this.hbox2 = new global::Gtk.HBox ();
|
||||||
|
this.hbox2.WidthRequest = 300;
|
||||||
|
this.hbox2.Name = "hbox2";
|
||||||
|
this.hbox2.Spacing = 6;
|
||||||
|
// Container child hbox2.Gtk.Box+BoxChild
|
||||||
|
this.posLabel = new global::Gtk.Label ();
|
||||||
|
this.posLabel.HeightRequest = 33;
|
||||||
|
this.posLabel.Name = "posLabel";
|
||||||
|
this.posLabel.Xpad = 15;
|
||||||
|
this.posLabel.Xalign = 0F;
|
||||||
|
this.posLabel.LabelProp = "<big>n° 0</big>";
|
||||||
|
this.posLabel.UseMarkup = true;
|
||||||
|
this.hbox2.Add (this.posLabel);
|
||||||
|
global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.posLabel]));
|
||||||
|
w3.Position = 0;
|
||||||
|
w3.Expand = false;
|
||||||
|
w3.Fill = false;
|
||||||
|
// Container child hbox2.Gtk.Box+BoxChild
|
||||||
|
this.actLabel = new global::Gtk.Label ();
|
||||||
|
this.actLabel.Name = "actLabel";
|
||||||
|
this.actLabel.UseMarkup = true;
|
||||||
|
this.actLabel.Wrap = true;
|
||||||
|
this.hbox2.Add (this.actLabel);
|
||||||
|
global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.actLabel]));
|
||||||
|
w4.Position = 1;
|
||||||
|
w4.Fill = false;
|
||||||
|
// Container child hbox2.Gtk.Box+BoxChild
|
||||||
|
this.timeLabel = new global::Gtk.Label ();
|
||||||
|
this.timeLabel.HeightRequest = 33;
|
||||||
|
this.timeLabel.Name = "timeLabel";
|
||||||
|
this.timeLabel.Xpad = 15;
|
||||||
|
this.timeLabel.LabelProp = "<big>00.0</big>";
|
||||||
|
this.timeLabel.UseMarkup = true;
|
||||||
|
this.hbox2.Add (this.timeLabel);
|
||||||
|
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.timeLabel]));
|
||||||
|
w5.PackType = ((global::Gtk.PackType)(1));
|
||||||
|
w5.Position = 2;
|
||||||
|
w5.Expand = false;
|
||||||
|
w5.Fill = false;
|
||||||
|
this.evBBox.Add (this.hbox2);
|
||||||
|
this.vbox3.Add (this.evBBox);
|
||||||
|
global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.evBBox]));
|
||||||
|
w7.Position = 0;
|
||||||
|
w7.Expand = false;
|
||||||
|
w7.Fill = false;
|
||||||
|
// Container child vbox3.Gtk.Box+BoxChild
|
||||||
|
this.UIManager.AddUiFromString (@"<ui><toolbar name='toolbar'><toolitem name='goForwardAction' action='goForwardAction'/><toolitem name='goBackAction' action='goBackAction'/><toolitem name='mediaPauseAction' action='mediaPauseAction'/><toolitem name='btnAjoutLigne' action='btnAjoutLigne'/><toolitem name='btnRetireligne' action='btnRetireligne'/><toolitem name='Action' action='Action'/></toolbar></ui>");
|
||||||
|
this.toolbar = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar")));
|
||||||
|
this.toolbar.Name = "toolbar";
|
||||||
|
this.toolbar.ShowArrow = false;
|
||||||
|
this.toolbar.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
||||||
|
this.toolbar.IconSize = ((global::Gtk.IconSize)(2));
|
||||||
|
this.vbox3.Add (this.toolbar);
|
||||||
|
global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.toolbar]));
|
||||||
|
w8.Position = 1;
|
||||||
|
w8.Expand = false;
|
||||||
|
w8.Fill = false;
|
||||||
|
this.hbox1.Add (this.vbox3);
|
||||||
|
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
|
||||||
|
w9.Position = 0;
|
||||||
|
// Container child hbox1.Gtk.Box+BoxChild
|
||||||
|
this.UIManager.AddUiFromString ("<ui><toolbar name=\'toolbar1\'><toolitem name=\'closeAction\' action=\'closeAction\'/><" +
|
||||||
|
"/toolbar></ui>");
|
||||||
|
this.toolbar1 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar1")));
|
||||||
|
this.toolbar1.Name = "toolbar1";
|
||||||
|
this.toolbar1.Orientation = ((global::Gtk.Orientation)(1));
|
||||||
|
this.toolbar1.ShowArrow = false;
|
||||||
|
this.toolbar1.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
||||||
|
this.toolbar1.IconSize = ((global::Gtk.IconSize)(2));
|
||||||
|
this.hbox1.Add (this.toolbar1);
|
||||||
|
global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.toolbar1]));
|
||||||
|
w10.PackType = ((global::Gtk.PackType)(1));
|
||||||
|
w10.Position = 1;
|
||||||
|
w10.Expand = false;
|
||||||
|
w10.Fill = false;
|
||||||
|
this.vbox2.Add (this.hbox1);
|
||||||
|
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
|
||||||
|
w11.Position = 0;
|
||||||
|
w11.Expand = false;
|
||||||
|
w11.Fill = false;
|
||||||
|
// Container child vbox2.Gtk.Box+BoxChild
|
||||||
|
this.scrolledwindow1 = new global::Gtk.ScrolledWindow ();
|
||||||
|
this.scrolledwindow1.CanFocus = true;
|
||||||
|
this.scrolledwindow1.Name = "scrolledwindow1";
|
||||||
|
this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1));
|
||||||
|
// Container child scrolledwindow1.Gtk.Container+ContainerChild
|
||||||
|
this.cmdList = new global::Gtk.TreeView ();
|
||||||
|
this.cmdList.CanFocus = true;
|
||||||
|
this.cmdList.Name = "cmdList";
|
||||||
|
this.cmdList.RulesHint = true;
|
||||||
|
this.scrolledwindow1.Add (this.cmdList);
|
||||||
|
this.vbox2.Add (this.scrolledwindow1);
|
||||||
|
global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.scrolledwindow1]));
|
||||||
|
w13.Position = 1;
|
||||||
|
this.alignment1.Add (this.vbox2);
|
||||||
|
this.GtkAlignment.Add (this.alignment1);
|
||||||
|
this.frame1.Add (this.GtkAlignment);
|
||||||
|
this.titreLabel = new global::Gtk.Label ();
|
||||||
|
this.titreLabel.Name = "titreLabel";
|
||||||
|
this.titreLabel.LabelProp = "Séquenceur Midi";
|
||||||
|
this.titreLabel.UseMarkup = true;
|
||||||
|
this.frame1.LabelWidget = this.titreLabel;
|
||||||
|
this.Add (this.frame1);
|
||||||
|
if ((this.Child != null)) {
|
||||||
|
this.Child.ShowAll ();
|
||||||
|
}
|
||||||
|
w1.SetUiManager (UIManager);
|
||||||
|
this.Hide ();
|
||||||
|
this.closeAction.Activated += new global::System.EventHandler (this.OnCloseActionActivated);
|
||||||
|
this.goForwardAction.Activated += new global::System.EventHandler (this.OnGoForwardActionActivated);
|
||||||
|
this.goBackAction.Activated += new global::System.EventHandler (this.OnGoBackActionActivated);
|
||||||
|
this.mediaPauseAction.Activated += new global::System.EventHandler (this.OnMediaPauseActionActivated);
|
||||||
|
this.btnAjoutLigne.Activated += new global::System.EventHandler (this.OnBtnAjoutLigneActivated);
|
||||||
|
this.btnRetireligne.Activated += new global::System.EventHandler (this.OnRemoveLigneActivated);
|
||||||
|
this.hbox2.SizeAllocated += new global::Gtk.SizeAllocatedHandler (this.OnHbox2SizeAllocated);
|
||||||
|
this.cmdList.CursorChanged += new global::System.EventHandler (this.OnCmdListeCursorChanged);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
DMX-2.0/icons/midiseq/audio-x-generic.16.png
Normal file
BIN
DMX-2.0/icons/midiseq/audio-x-generic.16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 688 B |
BIN
DMX-2.0/icons/midiseq/audio-x-generic.22.png
Normal file
BIN
DMX-2.0/icons/midiseq/audio-x-generic.22.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 951 B |
BIN
DMX-2.0/icons/midiseq/audio-x-generic.24.png
Normal file
BIN
DMX-2.0/icons/midiseq/audio-x-generic.24.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
DMX-2.0/icons/midiseq/audio-x-generic.32.png
Normal file
BIN
DMX-2.0/icons/midiseq/audio-x-generic.32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
180
DMX-2.0/icons/midiseq/audio-x-generic.svg
Normal file
180
DMX-2.0/icons/midiseq/audio-x-generic.svg
Normal file
|
|
@ -0,0 +1,180 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
sodipodi:docname="audio-x-generic.svg"
|
||||||
|
sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/mimetypes"
|
||||||
|
inkscape:version="0.46"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
id="svg7032"
|
||||||
|
height="48.000000px"
|
||||||
|
width="48.000000px"
|
||||||
|
inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
||||||
|
<defs
|
||||||
|
id="defs3">
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 24 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="48 : 24 : 1"
|
||||||
|
inkscape:persp3d-origin="24 : 16 : 1"
|
||||||
|
id="perspective21" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient2072">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop2074" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop2076" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient2315">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop2317" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop2319" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient2315"
|
||||||
|
id="radialGradient1358"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(1.000000,-2.843321e-17,5.340760e-18,0.509804,5.770894e-16,16.05392)"
|
||||||
|
cx="4.3920336"
|
||||||
|
cy="32.307854"
|
||||||
|
fx="4.3920336"
|
||||||
|
fy="32.307854"
|
||||||
|
r="6.3750000" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient2315"
|
||||||
|
id="radialGradient1360"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(1.000000,-1.083254e-16,1.454372e-17,0.509804,1.185203e-14,16.05392)"
|
||||||
|
cx="4.3920336"
|
||||||
|
cy="32.307854"
|
||||||
|
fx="4.3920336"
|
||||||
|
fy="32.307854"
|
||||||
|
r="6.3750000" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient2072"
|
||||||
|
id="radialGradient2078"
|
||||||
|
cx="23.250000"
|
||||||
|
cy="35.375000"
|
||||||
|
fx="23.250000"
|
||||||
|
fy="35.375000"
|
||||||
|
r="18.500000"
|
||||||
|
gradientTransform="matrix(1.000000,0.000000,0.000000,0.398649,0.000000,21.27280)"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
fill="#9db029"
|
||||||
|
inkscape:window-y="160"
|
||||||
|
inkscape:window-x="219"
|
||||||
|
inkscape:window-height="688"
|
||||||
|
inkscape:window-width="810"
|
||||||
|
inkscape:showpageshadow="false"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
inkscape:cy="27.236229"
|
||||||
|
inkscape:cx="73.976692"
|
||||||
|
inkscape:zoom="4"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
borderopacity="0.22745098"
|
||||||
|
bordercolor="#666666"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
id="base" />
|
||||||
|
<metadata
|
||||||
|
id="metadata4">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title>Generic Audio</dc:title>
|
||||||
|
<dc:creator>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>Jakub Steiner</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:creator>
|
||||||
|
<cc:license
|
||||||
|
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
|
||||||
|
</cc:Work>
|
||||||
|
<cc:License
|
||||||
|
rdf:about="http://creativecommons.org/licenses/publicdomain/">
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||||
|
</cc:License>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
id="layer1">
|
||||||
|
<path
|
||||||
|
sodipodi:type="arc"
|
||||||
|
style="opacity:0.30000000;color:#000000;fill:url(#radialGradient2078);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:2.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||||
|
id="path1344"
|
||||||
|
sodipodi:cx="23.250000"
|
||||||
|
sodipodi:cy="35.375000"
|
||||||
|
sodipodi:rx="18.500000"
|
||||||
|
sodipodi:ry="7.3750000"
|
||||||
|
d="M 41.750000 35.375000 A 18.500000 7.3750000 0 1 1 4.7500000,35.375000 A 18.500000 7.3750000 0 1 1 41.750000 35.375000 z"
|
||||||
|
transform="translate(0.000000,2.834646)" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccccccccccccc"
|
||||||
|
id="path7042"
|
||||||
|
d="M 41.625000,7.7951523 C 41.625000,7.7951523 18.562500,10.629798 18.562500,10.629798 L 18.562500,32.411048 C 16.916545,31.853397 14.630715,31.707619 12.125000,32.223548 C 7.7686860,33.120517 4.6471398,35.523035 5.1250000,37.567298 C 5.6028601,39.611561 9.5186850,40.558018 13.875000,39.661048 C 17.991641,38.813428 21.559123,36.623246 21.477633,34.661048 L 21.633883,15.629798 C 21.633883,15.629798 38.564340,12.734492 38.564340,12.734492 L 38.564340,30.019106 C 28.314340,28.519106 25.272139,32.912342 25.750000,34.956606 C 26.227860,37.000869 30.143686,37.947325 34.500000,37.050356 C 38.365376,36.254471 41.132410,34.287145 41.406250,32.425356 L 41.625000,7.7951523 z "
|
||||||
|
style="color:#000000;fill:#9db029;fill-opacity:1.0000000;fill-rule:nonzero;stroke:#596616;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:block" />
|
||||||
|
<path
|
||||||
|
style="opacity:0.51176471;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:block"
|
||||||
|
d="M 40.729036,8.8956383 C 40.729036,8.8956383 19.547267,11.730284 19.547267,11.730284 L 19.547267,33.568621 C 11.982012,31.663311 5.8141632,35.403030 6.2685944,37.347065 C 6.9730255,40.666100 20.646969,38.449299 20.569474,34.208305 L 20.718063,14.735139 C 20.718063,14.735139 39.568437,11.842807 39.568437,11.842807 L 39.568437,31.279973 C 32.002153,29.353326 26.302939,32.656357 26.757371,34.600393 C 27.336802,37.794428 39.135597,36.713755 40.521011,31.943247 L 40.729036,8.8956383 z "
|
||||||
|
id="path2311"
|
||||||
|
sodipodi:nodetypes="ccccccccccc" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="arc"
|
||||||
|
style="opacity:0.51176471;color:#000000;fill:url(#radialGradient1358);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:block;overflow:visible"
|
||||||
|
id="path2313"
|
||||||
|
sodipodi:cx="5.8750000"
|
||||||
|
sodipodi:cy="32.750000"
|
||||||
|
sodipodi:rx="6.3750000"
|
||||||
|
sodipodi:ry="3.2500000"
|
||||||
|
d="M 12.250000 32.750000 A 6.3750000 3.2500000 0 1 1 -0.50000000,32.750000 A 6.3750000 3.2500000 0 1 1 12.250000 32.750000 z"
|
||||||
|
transform="matrix(0.734516,-0.111645,0.111645,0.734516,3.903362,12.22551)" />
|
||||||
|
<path
|
||||||
|
transform="matrix(0.734516,-0.111645,0.111645,0.734516,23.74587,9.390864)"
|
||||||
|
d="M 12.250000 32.750000 A 6.3750000 3.2500000 0 1 1 -0.50000000,32.750000 A 6.3750000 3.2500000 0 1 1 12.250000 32.750000 z"
|
||||||
|
sodipodi:ry="3.2500000"
|
||||||
|
sodipodi:rx="6.3750000"
|
||||||
|
sodipodi:cy="32.750000"
|
||||||
|
sodipodi:cx="5.8750000"
|
||||||
|
id="path2323"
|
||||||
|
style="opacity:0.51176471;color:#000000;fill:url(#radialGradient1360);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:block;overflow:visible"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 8.7 KiB |
Loading…
Reference in a new issue