SeqMidiUI : Ajout Combo et premiers tests

This commit is contained in:
tzim 2018-10-07 00:51:39 +02:00
parent b3eda5f5d9
commit 52f56202bf
3 changed files with 65 additions and 24 deletions

View file

@ -26,12 +26,15 @@ namespace DMX2
[System.ComponentModel.ToolboxItem(true)]
public partial class SeqMidiUI : SequenceurUI
{
bool fullUpdFlag = true;
bool updating;
SequenceurMidi sequenceur; /* pointe sur les données */
ListStore lsEffets=null; /* liste des effets */
//TreeViewColumn nomCol; /* inutile dans le contexte macro */
ListStore lsDest = null;
bool effetChange = false;
public void EffetChange ()
{
@ -186,6 +189,13 @@ namespace DMX2
}
}
void HandleCellLayoutDataFunc(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter)
{
var s = (tree_model.GetValue(iter, 0) as string);
(cell as Gtk.CellRendererText).Text = "<<-- " + s + " -->>";
}
#endregion
public SeqMidiUI (SequenceurMidi s ) : base (s)
@ -196,9 +206,17 @@ namespace DMX2
ConstruitMatrice ();
new ContextMenuHelper(frame1,RenamePopup);
new ContextMenuHelper(evBBox,CompteurPopup);
lsDest = new ListStore(typeof(string));
lsDest.AppendValues("TEST 1");
lsDest.AppendValues("TEST 2");
cbDest.Model = lsDest;
cbDest.SetCellDataFunc(cbDest.Cells[0], HandleCellLayoutDataFunc);
}

View file

@ -44,6 +44,8 @@ namespace DMX2
private global::Gtk.Label timeLabel;
private global::Gtk.ComboBox cbDest;
private global::Gtk.Toolbar toolbar;
private global::Gtk.Toolbar toolbar1;
@ -154,6 +156,14 @@ namespace DMX2
w7.Expand = false;
w7.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild
this.cbDest = global::Gtk.ComboBox.NewText();
this.cbDest.Name = "cbDest";
this.vbox3.Add(this.cbDest);
global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.cbDest]));
w8.Position = 1;
w8.Expand = false;
w8.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";
@ -161,13 +171,13 @@ namespace DMX2
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;
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.toolbar]));
w9.Position = 2;
w9.Expand = false;
w9.Fill = false;
this.hbox1.Add(this.vbox3);
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.vbox3]));
w9.Position = 0;
global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.vbox3]));
w10.Position = 0;
// Container child hbox1.Gtk.Box+BoxChild
this.UIManager.AddUiFromString("<ui><toolbar name=\'toolbar1\'><toolitem name=\'closeAction\' action=\'closeAction\'/><" +
"/toolbar></ui>");
@ -178,16 +188,16 @@ namespace DMX2
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;
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.toolbar1]));
w11.PackType = ((global::Gtk.PackType)(1));
w11.Position = 1;
w11.Expand = false;
w11.Fill = false;
this.vbox2.Add(this.hbox1);
global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
w12.Position = 0;
w12.Expand = false;
w12.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
this.scrolledwindow1 = new global::Gtk.ScrolledWindow();
this.scrolledwindow1.CanFocus = true;
@ -200,8 +210,8 @@ namespace DMX2
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;
global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.scrolledwindow1]));
w14.Position = 1;
// Container child vbox2.Gtk.Box+BoxChild
this.lblText = new global::Gtk.Label();
this.lblText.Name = "lblText";
@ -210,10 +220,10 @@ namespace DMX2
"(ex: N64+127 ou N12-)\nGT : Go To (ex: GT4)\nr: loop";
this.lblText.UseMarkup = true;
this.vbox2.Add(this.lblText);
global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.lblText]));
w14.Position = 2;
w14.Expand = false;
w14.Fill = false;
global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.lblText]));
w15.Position = 2;
w15.Expand = false;
w15.Fill = false;
this.alignment1.Add(this.vbox2);
this.GtkAlignment.Add(this.alignment1);
this.frame1.Add(this.GtkAlignment);

View file

@ -2164,6 +2164,19 @@ au sequenceur</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.ComboBox" id="cbDest">
<property name="MemberName" />
<property name="IsTextCombo">True</property>
<property name="Items" translatable="yes" />
</widget>
<packing>
<property name="Position">1</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.Toolbar" id="toolbar">
<property name="MemberName" />
@ -2180,7 +2193,7 @@ au sequenceur</property>
</node>
</widget>
<packing>
<property name="Position">1</property>
<property name="Position">2</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>