diff --git a/DMX-2.0/Conduite.cs b/DMX-2.0/Conduite.cs index c47e956..135f4ab 100644 --- a/DMX-2.0/Conduite.cs +++ b/DMX-2.0/Conduite.cs @@ -40,16 +40,19 @@ namespace DMX2 string _name; // Nom de la conduite int master=100; - List circuits = new List(); - List univers = new List(); - List drivers = new List(); - List sequenceurs= new List(); + readonly List circuits = new List(); + readonly List univers = new List(); + readonly List drivers = new List(); + readonly List sequenceurs= new List(); - SequenceurMaitre seqmaitre = new SequenceurMaitre(); + readonly SequenceurMaitre seqmaitre = new SequenceurMaitre(); - EventManager eventManager = new EventManager(); // Gestion des fournisseurs d'evenements + readonly EventManager eventManager = new EventManager(); // Gestion des fournisseurs d'evenements actionEventTarget masterEventTarget; // Recepteur d'evenements pour le master + readonly MidiEventProvider midip=null; + + bool running=true; public Conduite (): this(true) @@ -74,7 +77,7 @@ namespace DMX2 u.Nom = "Univers par Défaut"; // La conduite peux recevoir des evenements midi - /*MidiEventProvider midip = */new MidiEventProvider (eventManager); + midip = new MidiEventProvider (eventManager); masterEventTarget = new actionEventTarget ( delegate(EventData data) { @@ -95,13 +98,19 @@ namespace DMX2 } + public MidiEventProvider Midi { + get { + return midip; + } + } + public EventManager EventManager { get { return eventManager; } - set { + /* set { eventManager = value; - } + }*/ } diff --git a/DMX-2.0/GestionMidiUI.cs b/DMX-2.0/GestionMidiUI.cs index f3d1d69..8fda22f 100644 --- a/DMX-2.0/GestionMidiUI.cs +++ b/DMX-2.0/GestionMidiUI.cs @@ -45,6 +45,10 @@ namespace DMX2 Destroyed+= HandleDestroyed; + + spinNbPage.Value = MidiEventProvider.Maxpage; + chkNoChanZero.Active = MidiEventProvider.UnpaginatedChannels.Contains(0); + } void HandleDestroyed (object sender, EventArgs e) @@ -104,7 +108,12 @@ namespace DMX2 protected void OnListKnownCursorChanged (object sender, EventArgs e) { - btnDesactiv.Sensitive = (listKnown.Selection.CountSelectedRows() >0); + chkFB.Sensitive = btnDesactiv.Sensitive = (listKnown.Selection.CountSelectedRows() >0); + TreeIter iter; + if(!listKnown.Selection.GetSelected(out iter)) return; + MidiEventProvider.MidiDev dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiDev ; + chkFB.Active = dev.HasFeedback; + } protected void OnBtnActivClicked (object sender, EventArgs e) @@ -127,7 +136,32 @@ namespace DMX2 FillLsDetect () ; FillLsKnown(); + } + + + protected void OnChkFBToggled (object sender, EventArgs e) + { + TreeIter iter; + if(!listKnown.Selection.GetSelected(out iter)) return; + MidiEventProvider.MidiDev dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiDev ; + dev.HasFeedback = chkFB.Active; + + MidiEventProvider.RefreshFeedback(dev.Name); + } + protected void OnChkNoChanZeroToggled (object sender, EventArgs e) + { + MidiEventProvider.UnpaginatedChannels.Clear(); + if(chkNoChanZero.Active) + MidiEventProvider.UnpaginatedChannels.Add(0); + } + + protected void OnSpinNbPageValueChanged (object sender, EventArgs e) + { + MidiEventProvider.Maxpage = (uint) spinNbPage.ValueAsInt; + } + + } } diff --git a/DMX-2.0/MainWindow.cs b/DMX-2.0/MainWindow.cs index 7630a2c..d238fe9 100644 --- a/DMX-2.0/MainWindow.cs +++ b/DMX-2.0/MainWindow.cs @@ -553,6 +553,9 @@ namespace DMX2 } MajCircuits(fullUpdateFlag); timeLabel.LabelProp = string.Format (@"{0:0\.0}", Conduite.Courante.SequenceurMaitre.TimeStamp.TotalMilliseconds / 100); + + lblPage.LabelProp = Conduite.Courante.Midi.CurrentPage.ToString(); + if(fullUpdateFlag) ConstruitMatriceSeqColumns(); if( Conduite.Courante.SequenceurMaitre.EffetChange() )MatriceUI.QueueDraw(); fullUpdateFlag=false; @@ -777,7 +780,8 @@ namespace DMX2 mDlg.Destroyed += delegate { mDlg= null; }; - } + } + } diff --git a/DMX-2.0/MidiEventProvider.cs b/DMX-2.0/MidiEventProvider.cs index a45bd7f..0aef281 100644 --- a/DMX-2.0/MidiEventProvider.cs +++ b/DMX-2.0/MidiEventProvider.cs @@ -30,7 +30,7 @@ namespace DMX2 readonly string internalName; bool bound=false; - readonly int page; + readonly uint page; readonly int midiEvCode; public bool Bound { @@ -48,7 +48,7 @@ namespace DMX2 } } - public int Page { + public uint Page { get { return page; } @@ -61,16 +61,16 @@ namespace DMX2 } - public internalEvent(string _id, int _page, int _evHCode) + public internalEvent(string _id, uint _page, int _evHCode) { internalName=_id; page=_page; midiEvCode = _evHCode; } - byte lastknownvalue; + int lastknownvalue=-1; - public byte LastKnownValue { + public int LastKnownValue { get { return lastknownvalue; } @@ -89,7 +89,6 @@ namespace DMX2 } } } - abstract class feedbackinfo : IFeedbackInfo { MidiEventProvider prov; readonly internalEvent iev; @@ -116,8 +115,7 @@ namespace DMX2 if (prov.CurrentPage == iev.Page || iev.Page == 0) { prov.SendEvent (ev); foreach (int srcid in MidiEventProvider.feedbacksources) { - int lnvk = srcid ^ iev.MidiEvCode; - prov.lastKnownValues[lnvk] = data; + prov.lastValueOfSrc[CombineHash( srcid , iev.MidiEvCode)] = data; } } @@ -125,7 +123,6 @@ namespace DMX2 } #endregion } - class ctrlfeedbackinfo : feedbackinfo { public ctrlfeedbackinfo(MidiEventProvider _prov, internalEvent _iev, byte channel,uint param) :base(_prov,_iev) @@ -144,7 +141,6 @@ namespace DMX2 return true; } } - class pitchbendfeedbackinfo : feedbackinfo { public pitchbendfeedbackinfo(MidiEventProvider _prov, internalEvent _iev, byte channel) :base(_prov,_iev) @@ -180,11 +176,29 @@ namespace DMX2 } + /// + /// Etat interne des evenements midi paginés. + /// readonly Dictionary eventlist = new Dictionary(); + + /// + /// Liste des peripheriques connus (presents ou non) + /// static readonly Dictionary knowndevices = new Dictionary(); + + /// + /// Liste des ports connectés avec feedback + /// static readonly List feedbacksources = new List(); - readonly List unpaginatedchannels = new List(); - readonly Dictionary lastKnownValues = new Dictionary(); + + //static readonly Dictionary srcidToDev = new Dictionary(); + static readonly List unpaginatedchannels = new List(); + + /// + /// Derniere valeur connue pour une evenement sur source donnée : + /// Soit recue, soit envoyée (feedback / changement de page) + /// + readonly Dictionary lastValueOfSrc = new Dictionary(); EventData last; @@ -193,21 +207,29 @@ namespace DMX2 static bool guirefreshflag=false; - int page=1; + uint page=1; + static uint maxpage=8; - public int CurrentPage { + public uint CurrentPage { get { return page; } set { - if(value<1 || value > 255) return; + if(value<1 || value > maxpage) return; page = value; Refresh(); - Console.WriteLine(page); } } - public List UnpaginatedChannels { + public static uint Maxpage { + get { + return maxpage; + } + set { + maxpage = value; + } + } + public static List UnpaginatedChannels { get { return unpaginatedchannels; } @@ -222,12 +244,27 @@ namespace DMX2 return false; } } + + static public void ConnectDevice (string name) { knowndevices.Add(name,new MidiDev(name)); AutoConnect(); } + static public void RefreshFeedback (string name) + { + foreach (int port in knowndevices[name].ConnectedPorts) { + if(knowndevices[name].HasFeedback){ + if(!feedbacksources.Contains(port)) + feedbacksources.Add(port); + }else{ + if(feedbacksources.Contains(port)) + feedbacksources.Remove(port); + } + } + } + public static void DisconnectDevice (MidiEventProvider.MidiDev dev) { if (!knowndevices.ContainsKey (dev.Name)) @@ -296,7 +333,6 @@ namespace DMX2 guirefreshflag=true; string fullportname = cli.Name + ':' + p.Name; - Console.WriteLine(fullportname); if(knowndevices.ContainsKey(fullportname)){ int srcid = p.ClientId <<8 + p.PortId; if(knowndevices[fullportname].ConnectedPorts.Contains(srcid)) @@ -320,7 +356,6 @@ namespace DMX2 int srcid = clientId << 8 + portId; if (connect) { string fpname= AlsaSeqLib.GetClientByID(clientId).Name + ":"+ AlsaSeqLib.GetPortByIDs (clientId, portId).Name; - Console.WriteLine("PortConnect {0}",fpname); if (!knowndevices.ContainsKey(fpname)) return; if (knowndevices [fpname].ConnectedPorts.Contains (srcid)) return; @@ -328,12 +363,17 @@ namespace DMX2 if(knowndevices [fpname].HasFeedback) feedbacksources.Add (srcid); guirefreshflag=true; + + //srcidToDev[srcid] = knowndevices [fpname]; + return; } foreach (var dev in knowndevices.Values) { if(dev.ConnectedPorts.Contains (srcid)) { + /*if(srcidToDev.ContainsKey(srcid)) + srcidToDev.Remove(srcid);*/ dev.ConnectedPorts.Remove(srcid); guirefreshflag=true; return; @@ -342,6 +382,13 @@ namespace DMX2 } + static int CombineHash (int hash1, int hash2) + { + unchecked { + return hash1 * 33 + hash2; + } + } + protected bool HasFeedback (int source) { return feedbacksources.Contains(source); @@ -358,8 +405,9 @@ namespace DMX2 if (ievent.Page == page){ SendEvent(ievent.StoredEvent); foreach(int src in feedbacksources){ - int lnvk = src ^ ievent.MidiEvCode; - lastKnownValues[lnvk] = ievent.LastKnownValue; + int lnvk = CombineHash(src, ievent.MidiEvCode); + if(ievent.LastKnownValue!=-1) + lastValueOfSrc[lnvk] = (byte)ievent.LastKnownValue; } } } @@ -381,7 +429,7 @@ namespace DMX2 if (! eventlist.ContainsKey (eventId)) { var res = regexEventID.Match (eventId); if (!res.Success) return false; - int _page = byte.Parse (res.Groups ["page"].Value); + uint _page = uint.Parse (res.Groups ["page"].Value); int _evHC = res.Groups["id"].Value.GetHashCode(); eventlist.Add (eventId, new internalEvent (eventId,_page,_evHC )); } @@ -403,15 +451,15 @@ namespace DMX2 Gtk.Menu retmenu = new Gtk.Menu (); if (levent != null) { // Creation du sous menu "Dernier" - Gtk.MenuItem lmenuitem = new Gtk.MenuItem ("Dernier"); + /*Gtk.MenuItem lmenuitem = new Gtk.MenuItem ("Dernier"); retmenu.Add (lmenuitem); Gtk.Menu lmenu = new Gtk.Menu (); - lmenuitem.Submenu = lmenu; + lmenuitem.Submenu = lmenu;*/ Gtk.MenuItem item = new Gtk.MenuItem(GetDescription(levent.InternalName)); item.Data[EventManager.EventIdKey] = levent.InternalName; item.Data[EventManager.StateKey] = state; item.ButtonPressEvent += handler; - lmenu.Add (item); + retmenu.Add (item); } Gtk.MenuItem evmenuitem = new Gtk.MenuItem ("Events"); // Creation du sous menu "Events" @@ -438,7 +486,7 @@ namespace DMX2 void IEventProvider.ProcessEvents (EventManagerCallback callback) { AlsaSeqLib.snd_seq_event_t evS; - int evpage; + uint evpage; // Tant qu'il y des evenements midi en attente while (AlsaSeqLib.GetEvent(out evS)) { @@ -511,39 +559,44 @@ namespace DMX2 if(id!=null) { - + // Hashcode de l'ev Midi, non pagine int evHC = id.GetHashCode(); + int srcid = evS.source.client <<8 + evS.source.port; + int lnvk = CombineHash( srcid , evHC); if(channel == 255 || unpaginatedchannels.Contains(channel)) evpage= 0; else evpage= page; + // Construction de l'ID evenement id = string.Format("MIDI-PAGE{0}-{1}",evpage,id); - + // Creation de l'objet interne si innexistant if(!eventlist.ContainsKey(id)) eventlist.Add(id,new internalEvent(id,page,evHC)); levent= eventlist[id]; //Dernier Evenement recu conserve pour menu - int srcid = evS.source.client <<8 + evS.source.port; - int lnvk = srcid ^ evHC; - if(!lastKnownValues.ContainsKey(lnvk)) - lastKnownValues[lnvk]= (byte)value; + if(!lastValueOfSrc.ContainsKey(lnvk)) + lastValueOfSrc[lnvk]= (byte)value; + EventData evData = new EventData(); evData.id = id; evData.value = (byte)value; - evData.prev_value = lastKnownValues[lnvk]; - - lastKnownValues[lnvk] = (byte)value; - + evData.prev_value = lastValueOfSrc[lnvk]; if(evData.Equals(last)) continue; last = evData; if(eventlist[id].Bound) { callback(evData); } + + lastValueOfSrc[lnvk] = (byte)value; + + eventlist[id].StoredEvent = evS; + eventlist[id].LastKnownValue = (byte)value; + } } } @@ -564,8 +617,34 @@ namespace DMX2 @"MIDI-PAGE(?\d+)-PB-C(?\d+)", System.Text.RegularExpressions.RegexOptions.Compiled); + static System.Text.RegularExpressions.Regex regexNoteEventID = new System.Text.RegularExpressions.Regex( + @"MIDI-PAGE(?\d+)-NOTE-C(?\d+)N(?\d+)", + System.Text.RegularExpressions.RegexOptions.Compiled); + string GetDescription (string eventId) { + if(!eventlist.ContainsKey(eventId)) return null; + + var res = regexCtrlEventID.Match (eventId); + if (res.Success) { + uint page = uint.Parse(res.Groups ["page"].Value); + byte chan = byte.Parse (res.Groups ["chan"].Value); + uint param = uint.Parse (res.Groups ["param"].Value); + return string.Format("Page {2} => Control-Change C({0}) Param-{1}",chan+1,param,page); + } + res = regexPbEventID.Match (eventId); + if (res.Success) { + uint page = uint.Parse(res.Groups ["page"].Value); + byte chan = byte.Parse (res.Groups ["chan"].Value); + return string.Format("Page {1} => PitchBend C({0})",chan+1,page); + } + res = regexNoteEventID.Match (eventId); + if (res.Success) { + uint page = uint.Parse(res.Groups ["page"].Value); + byte chan = byte.Parse (res.Groups ["chan"].Value); + byte note = byte.Parse (res.Groups ["note"].Value); + return string.Format("Page {2} => Note C({0}) Note-{1}",chan+1,note,page); + } return eventId; } @@ -575,16 +654,13 @@ namespace DMX2 var res = regexCtrlEventID.Match (eventId); if (res.Success) { - Console.WriteLine("Succes"); byte chan = byte.Parse (res.Groups ["chan"].Value); uint param = uint.Parse (res.Groups ["param"].Value); return new ctrlfeedbackinfo (this, eventlist[eventId],chan, param); } res = regexPbEventID.Match (eventId); if (res.Success) { - Console.WriteLine("Succes"); byte chan = byte.Parse (res.Groups ["chan"].Value); - return new pitchbendfeedbackinfo (this, eventlist[eventId], chan); } return null; diff --git a/DMX-2.0/SequenceurLineaire.cs b/DMX-2.0/SequenceurLineaire.cs index d92d4bd..3ce0ea7 100644 --- a/DMX-2.0/SequenceurLineaire.cs +++ b/DMX-2.0/SequenceurLineaire.cs @@ -127,6 +127,7 @@ namespace DMX2 Dictionary valeursrecues= new Dictionary(); SequenceurLineaire seq; int max=0;//, signe=-2; + bool nofeedback = false; bool attache; @@ -160,7 +161,9 @@ namespace DMX2 return true; } + nofeedback = true; seq.ChangeValeur(circuit,max); + nofeedback = false; attache = true; return true; } @@ -186,6 +189,7 @@ namespace DMX2 } public void FeedBack(byte data){ + if(nofeedback) return; Attache = false; foreach (var fb in feedbacks) fb.FeedBack(data); diff --git a/DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs b/DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs index 0e17a86..f93a774 100644 --- a/DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs +++ b/DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs @@ -9,14 +9,14 @@ namespace DMX2 private global::Gtk.Alignment GtkAlignment3; private global::Gtk.VBox vbox4; private global::Gtk.HBox hbox1; - private global::Gtk.SpinButton spinbutton1; + private global::Gtk.SpinButton spinNbPage; private global::Gtk.Label label3; - private global::Gtk.CheckButton checkbutton2; + private global::Gtk.CheckButton chkNoChanZero; private global::Gtk.Label GtkLabel5; private global::Gtk.Frame frame3; private global::Gtk.Alignment GtkAlignment2; private global::Gtk.VBox vbox5; - private global::Gtk.CheckButton checkbutton1; + private global::Gtk.CheckButton chkFB; private global::Gtk.Label GtkLabel3; private global::Gtk.HButtonBox hbuttonbox2; private global::Gtk.Button btnActiv; @@ -64,15 +64,15 @@ namespace DMX2 this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild - this.spinbutton1 = new global::Gtk.SpinButton (0, 100, 1); - this.spinbutton1.CanFocus = true; - this.spinbutton1.Name = "spinbutton1"; - this.spinbutton1.Adjustment.PageIncrement = 10; - this.spinbutton1.ClimbRate = 1; - this.spinbutton1.Numeric = true; - this.spinbutton1.Value = 8; - this.hbox1.Add (this.spinbutton1); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.spinbutton1])); + this.spinNbPage = new global::Gtk.SpinButton (1, 32, 1); + this.spinNbPage.CanFocus = true; + this.spinNbPage.Name = "spinNbPage"; + this.spinNbPage.Adjustment.PageIncrement = 10; + this.spinNbPage.ClimbRate = 1; + this.spinNbPage.Numeric = true; + this.spinNbPage.Value = 8; + this.hbox1.Add (this.spinNbPage); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.spinNbPage])); w2.PackType = ((global::Gtk.PackType)(1)); w2.Position = 0; w2.Expand = false; @@ -94,14 +94,14 @@ namespace DMX2 w4.Expand = false; w4.Fill = false; // Container child vbox4.Gtk.Box+BoxChild - this.checkbutton2 = new global::Gtk.CheckButton (); - this.checkbutton2.CanFocus = true; - this.checkbutton2.Name = "checkbutton2"; - this.checkbutton2.Label = "Ne pas paginer\nle canal midi 1"; - this.checkbutton2.DrawIndicator = true; - this.checkbutton2.UseUnderline = true; - this.vbox4.Add (this.checkbutton2); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.checkbutton2])); + this.chkNoChanZero = new global::Gtk.CheckButton (); + this.chkNoChanZero.CanFocus = true; + this.chkNoChanZero.Name = "chkNoChanZero"; + this.chkNoChanZero.Label = "Ne pas paginer\nle canal midi 1"; + this.chkNoChanZero.DrawIndicator = true; + this.chkNoChanZero.UseUnderline = true; + this.vbox4.Add (this.chkNoChanZero); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.chkNoChanZero])); w5.Position = 1; w5.Expand = false; w5.Fill = false; @@ -129,14 +129,15 @@ namespace DMX2 this.vbox5.Name = "vbox5"; this.vbox5.Spacing = 6; // Container child vbox5.Gtk.Box+BoxChild - this.checkbutton1 = new global::Gtk.CheckButton (); - this.checkbutton1.CanFocus = true; - this.checkbutton1.Name = "checkbutton1"; - this.checkbutton1.Label = "Feedback\n(interface motorisée)"; - this.checkbutton1.DrawIndicator = true; - this.checkbutton1.UseUnderline = true; - this.vbox5.Add (this.checkbutton1); - global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.checkbutton1])); + this.chkFB = new global::Gtk.CheckButton (); + this.chkFB.Sensitive = false; + this.chkFB.CanFocus = true; + this.chkFB.Name = "chkFB"; + this.chkFB.Label = "Feedback\n(interface motorisée)"; + this.chkFB.DrawIndicator = true; + this.chkFB.UseUnderline = true; + this.vbox5.Add (this.chkFB); + global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.chkFB])); w9.Position = 0; w9.Expand = false; w9.Fill = false; @@ -312,6 +313,9 @@ namespace DMX2 this.listDetect.CursorChanged += new global::System.EventHandler (this.OnListDetectCursorChanged); this.btnActiv.Clicked += new global::System.EventHandler (this.OnBtnActivClicked); this.btnDesactiv.Clicked += new global::System.EventHandler (this.OnBtnDesactivClicked); + this.chkFB.Toggled += new global::System.EventHandler (this.OnChkFBToggled); + this.spinNbPage.ValueChanged += new global::System.EventHandler (this.OnSpinNbPageValueChanged); + this.chkNoChanZero.Toggled += new global::System.EventHandler (this.OnChkNoChanZeroToggled); this.buttonClose.Clicked += new global::System.EventHandler (this.OnButtonCloseClicked); } } diff --git a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs index 10b26ef..3208ae8 100644 --- a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs +++ b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs @@ -27,6 +27,7 @@ namespace DMX2 private global::Gtk.Action aboutAction; private global::Gtk.Action midiAction; private global::Gtk.Action connectAction1; + private global::Gtk.Action selectColorAction1; private global::Gtk.VBox vbox1; private global::Gtk.HBox hbox1; private global::Gtk.VBox vbox2; @@ -39,6 +40,10 @@ namespace DMX2 private global::Gtk.EventBox evBBox; private global::Gtk.Label timeLabel; private global::Gtk.VScale masterScale; + private global::Gtk.EventBox evBBox1; + private global::Gtk.VBox vbox3; + private global::Gtk.Label lblPage; + private global::Gtk.Label lblpagesmall; private global::Gtk.VSeparator vseparator1; private global::Gtk.HPaned hpaned1; private global::Gtk.HPaned hpaned2; @@ -127,6 +132,8 @@ namespace DMX2 this.connectAction1 = new global::Gtk.Action ("connectAction1", "Connection Midi", null, "gtk-connect"); this.connectAction1.ShortLabel = "Connection Midi"; w1.Add (this.connectAction1, null); + this.selectColorAction1 = new global::Gtk.Action ("selectColorAction1", null, null, "gtk-select-color"); + w1.Add (this.selectColorAction1, null); this.UIManager.InsertActionGroup (w1, 0); this.AddAccelGroup (this.UIManager.AccelGroup); this.Name = "DMX2.MainWindow"; @@ -326,19 +333,51 @@ namespace DMX2 this.vbox2.Add (this.masterScale); global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.masterScale])); w58.Position = 7; - this.hbox1.Add (this.vbox2); - global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2])); + // Container child vbox2.Gtk.Box+BoxChild + this.evBBox1 = new global::Gtk.EventBox (); + this.evBBox1.Name = "evBBox1"; + // Container child evBBox1.Gtk.Container+ContainerChild + this.vbox3 = new global::Gtk.VBox (); + this.vbox3.Name = "vbox3"; + this.vbox3.Spacing = 6; + // Container child vbox3.Gtk.Box+BoxChild + this.lblPage = new global::Gtk.Label (); + this.lblPage.Name = "lblPage"; + this.lblPage.LabelProp = "0"; + this.vbox3.Add (this.lblPage); + global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.lblPage])); w59.Position = 0; w59.Expand = false; w59.Fill = false; + // Container child vbox3.Gtk.Box+BoxChild + this.lblpagesmall = new global::Gtk.Label (); + this.lblpagesmall.HeightRequest = 28; + this.lblpagesmall.Name = "lblpagesmall"; + this.lblpagesmall.LabelProp = "midi\npage"; + this.lblpagesmall.UseMarkup = true; + this.vbox3.Add (this.lblpagesmall); + global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.lblpagesmall])); + w60.Position = 1; + w60.Fill = false; + this.evBBox1.Add (this.vbox3); + this.vbox2.Add (this.evBBox1); + global::Gtk.Box.BoxChild w62 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.evBBox1])); + w62.Position = 8; + w62.Expand = false; + w62.Fill = false; + this.hbox1.Add (this.vbox2); + global::Gtk.Box.BoxChild w63 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2])); + w63.Position = 0; + w63.Expand = false; + w63.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.vseparator1 = new global::Gtk.VSeparator (); this.vseparator1.Name = "vseparator1"; this.hbox1.Add (this.vseparator1); - global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vseparator1])); - w60.Position = 1; - w60.Expand = false; - w60.Fill = false; + global::Gtk.Box.BoxChild w64 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vseparator1])); + w64.Position = 1; + w64.Expand = false; + w64.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.hpaned1 = new global::Gtk.HPaned (); this.hpaned1.CanFocus = true; @@ -360,8 +399,8 @@ namespace DMX2 this.MatriceUI.RulesHint = true; this.GtkScrolledWindow2.Add (this.MatriceUI); this.hpaned2.Add (this.GtkScrolledWindow2); - global::Gtk.Paned.PanedChild w62 = ((global::Gtk.Paned.PanedChild)(this.hpaned2 [this.GtkScrolledWindow2])); - w62.Resize = false; + global::Gtk.Paned.PanedChild w66 = ((global::Gtk.Paned.PanedChild)(this.hpaned2 [this.GtkScrolledWindow2])); + w66.Resize = false; // Container child hpaned2.Gtk.Paned+PanedChild this.onglets = new global::Gtk.Notebook (); this.onglets.CanFocus = true; @@ -369,8 +408,8 @@ namespace DMX2 this.onglets.CurrentPage = 0; this.hpaned2.Add (this.onglets); this.hpaned1.Add (this.hpaned2); - global::Gtk.Paned.PanedChild w64 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2])); - w64.Resize = false; + global::Gtk.Paned.PanedChild w68 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2])); + w68.Resize = false; // Container child hpaned1.Gtk.Paned+PanedChild this.scrolledwindow2 = new global::Gtk.ScrolledWindow (); this.scrolledwindow2.WidthRequest = 150; @@ -378,32 +417,32 @@ namespace DMX2 this.scrolledwindow2.Name = "scrolledwindow2"; this.scrolledwindow2.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child scrolledwindow2.Gtk.Container+ContainerChild - global::Gtk.Viewport w65 = new global::Gtk.Viewport (); - w65.ShadowType = ((global::Gtk.ShadowType)(0)); + global::Gtk.Viewport w69 = new global::Gtk.Viewport (); + w69.ShadowType = ((global::Gtk.ShadowType)(0)); // Container child GtkViewport1.Gtk.Container+ContainerChild this.vboxCircuits = new global::Gtk.VBox (); this.vboxCircuits.Name = "vboxCircuits"; this.vboxCircuits.Spacing = 2; - w65.Add (this.vboxCircuits); - this.scrolledwindow2.Add (w65); + w69.Add (this.vboxCircuits); + this.scrolledwindow2.Add (w69); this.hpaned1.Add (this.scrolledwindow2); - global::Gtk.Paned.PanedChild w68 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2])); - w68.Resize = false; - w68.Shrink = false; + global::Gtk.Paned.PanedChild w72 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2])); + w72.Resize = false; + w72.Shrink = false; this.hbox1.Add (this.hpaned1); - global::Gtk.Box.BoxChild w69 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1])); - w69.Position = 2; + global::Gtk.Box.BoxChild w73 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1])); + w73.Position = 2; this.vbox1.Add (this.hbox1); - global::Gtk.Box.BoxChild w70 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1])); - w70.Position = 0; + global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1])); + w74.Position = 0; // Container child vbox1.Gtk.Box+BoxChild this.hseparator1 = new global::Gtk.HSeparator (); this.hseparator1.Name = "hseparator1"; this.vbox1.Add (this.hseparator1); - global::Gtk.Box.BoxChild w71 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1])); - w71.Position = 1; - w71.Expand = false; - w71.Fill = false; + global::Gtk.Box.BoxChild w75 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1])); + w75.Position = 1; + w75.Expand = false; + w75.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox4 = new global::Gtk.HBox (); this.hbox4.Name = "hbox4"; @@ -414,10 +453,10 @@ namespace DMX2 this.toolbar7.Name = "toolbar7"; this.toolbar7.ShowArrow = false; this.hbox4.Add (this.toolbar7); - global::Gtk.Box.BoxChild w72 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7])); - w72.Position = 0; - w72.Expand = false; - w72.Fill = false; + global::Gtk.Box.BoxChild w76 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7])); + w76.Position = 0; + w76.Expand = false; + w76.Fill = false; // Container child hbox4.Gtk.Box+BoxChild this.evInfo = new global::Gtk.EventBox (); this.evInfo.Name = "evInfo"; @@ -427,8 +466,8 @@ namespace DMX2 this.lblInfo.LabelProp = "info"; this.evInfo.Add (this.lblInfo); this.hbox4.Add (this.evInfo); - global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo])); - w74.Position = 1; + global::Gtk.Box.BoxChild w78 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo])); + w78.Position = 1; // Container child hbox4.Gtk.Box+BoxChild this.UIManager.AddUiFromString (""); this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8"))); @@ -436,15 +475,15 @@ namespace DMX2 this.toolbar8.ShowArrow = false; this.toolbar8.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); this.hbox4.Add (this.toolbar8); - global::Gtk.Box.BoxChild w75 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8])); - w75.Position = 2; - w75.Expand = false; - w75.Fill = false; + global::Gtk.Box.BoxChild w79 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8])); + w79.Position = 2; + w79.Expand = false; + w79.Fill = false; this.vbox1.Add (this.hbox4); - global::Gtk.Box.BoxChild w76 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4])); - w76.Position = 2; - w76.Expand = false; - w76.Fill = false; + global::Gtk.Box.BoxChild w80 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4])); + w80.Position = 2; + w80.Expand = false; + w80.Fill = false; this.Add (this.vbox1); if ((this.Child != null)) { this.Child.ShowAll (); @@ -470,6 +509,7 @@ namespace DMX2 this.aguiAction.Activated += new global::System.EventHandler (this.OnInfoActionActivated); this.aboutAction.Activated += new global::System.EventHandler (this.OnAboutActionActivated); this.midiAction.Activated += new global::System.EventHandler (this.OnMidiActionActivated); + this.selectColorAction1.Activated += new global::System.EventHandler (this.OnSelectColorActionActivated); this.btnGo.Clicked += new global::System.EventHandler (this.OnBtnGoClicked); this.btnGoBack.Clicked += new global::System.EventHandler (this.OnBtnGoBackClicked); this.btnAjoutLigne.Clicked += new global::System.EventHandler (this.OnBtnAjoutLigneClicked); diff --git a/DMX-2.0/gtk-gui/gui.stetic b/DMX-2.0/gtk-gui/gui.stetic index 8f51ae4..b8bbaeb 100644 --- a/DMX-2.0/gtk-gui/gui.stetic +++ b/DMX-2.0/gtk-gui/gui.stetic @@ -226,6 +226,12 @@ Connection Midi gtk-connect + + Action + + gtk-select-color + + MainWindow @@ -393,6 +399,49 @@ celle selectionnée False + + + evBBox + + + + 6 + + + + 0 + + + 0 + True + False + False + + + + + + 28 + midi +page + True + + + 1 + False + False + + + + + + + 8 + True + False + False + + 0 @@ -3118,15 +3167,17 @@ trames DMX (ms) 6 - + True - 100 + 1 + 32 10 1 1 True 8 + End @@ -3159,7 +3210,7 @@ trames DMX (ms) - + True Ne pas paginer @@ -3167,6 +3218,7 @@ le canal midi 1 True True True + 1 @@ -3220,14 +3272,16 @@ le canal midi 1 6 - + + False True Feedback (interface motorisée) True True True + 0 diff --git a/DMX-2.0/style.gtkrc b/DMX-2.0/style.gtkrc index 514000c..3fb9e43 100644 --- a/DMX-2.0/style.gtkrc +++ b/DMX-2.0/style.gtkrc @@ -104,6 +104,19 @@ style "counter" font_name = "DejaVu Sans Mono Bold 12" } +style "page" +{ + fg[NORMAL] = "#FFFF00" + bg[NORMAL] = "#000000" + font_name = "DejaVu Sans Mono Bold 32" +} +style "pagesmall" +{ + fg[NORMAL] = "#FFFF00" + bg[NORMAL] = "#000000" + font_name = "DejaVu Sans Mono Bold 6" +} + style "actmacro" { fg[NORMAL] = "#FFFF00" @@ -128,6 +141,11 @@ widget "*.timeLabel" style "counter" widget "*.actLabel" style "actmacro" widget "*.evBBox" style "counter" +widget "*.evBBox1" style "counter" + +widget "*.lblPage" style "page" +widget "*.lblpagesmall" style "pagesmall" + widget "*.lblTirette" style "lbtirette" widget "*.sclTirette" style "tirettes" widget "*.sclTiretteC" style "tirettesc"