* SeqLinUI.cs: Optimisation de l'affichage des tirettes.
* DMX-2.0.csproj: * gui.stetic: * DMX2.MainWindow.cs: * MainWindow.cs: Nécessaire pour permettre choix futur entre onglets et colonne de sequenceurs Plus diverses choses
This commit is contained in:
parent
e0600e9403
commit
b5edcc497e
5 changed files with 69 additions and 57 deletions
|
|
@ -78,7 +78,7 @@
|
|||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="style.gtkrc">
|
||||
<LogicalName>style.gtkrc</LogicalName>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="html\page.html">
|
||||
<LogicalName>page.html</LogicalName>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ namespace DMX2
|
|||
FileInfo conduiteFile=null;
|
||||
int lastSaveHash=0;
|
||||
|
||||
Gtk.Container seqCtn=null;
|
||||
|
||||
public static MainWindow Win {
|
||||
get { return win; }
|
||||
}
|
||||
|
|
@ -49,6 +51,21 @@ namespace DMX2
|
|||
ctxHelper.AttachToWidget(btnGoBack);
|
||||
ctxHelper.AttachToWidget(masterScale);
|
||||
|
||||
/*
|
||||
Gtk.ScrolledWindow sw = new ScrolledWindow();
|
||||
this.seqCtn = new VBox();
|
||||
this.hpaned2.Add2(sw);
|
||||
sw.AddWithViewport(seqCtn);
|
||||
sw.HscrollbarPolicy = PolicyType.Never;
|
||||
sw.VscrollbarPolicy= PolicyType.Always;
|
||||
this.hpaned2.ShowAll ();
|
||||
*/
|
||||
|
||||
seqCtn = new Gtk.Notebook();
|
||||
hpaned2.Add2(seqCtn);
|
||||
hpaned2.ShowAll();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void EventPopup (object sender, ContextMenuEventArgs e)
|
||||
|
|
@ -498,14 +515,19 @@ namespace DMX2
|
|||
|
||||
void AddSeqUI (Sequenceur s)
|
||||
{
|
||||
onglets.AppendPage(s.GetUI(),new Gtk.Label(s.Name));
|
||||
onglets.ShowAll();
|
||||
if (seqCtn is Gtk.Notebook) {
|
||||
((Gtk.Notebook)seqCtn).AppendPage (s.GetUI (), new Gtk.Label (s.Name));
|
||||
}
|
||||
else if (seqCtn is Gtk.VBox) {
|
||||
((Gtk.VBox)seqCtn).Add(s.GetUI());
|
||||
}
|
||||
seqCtn.ShowAll();
|
||||
}
|
||||
|
||||
protected void OnShowAllActionActivated (object sender, EventArgs e)
|
||||
{
|
||||
foreach (var notebookchild in onglets.Children)
|
||||
notebookchild.Destroy();
|
||||
foreach (var widget in seqCtn.Children)
|
||||
widget.Destroy();
|
||||
|
||||
foreach (Sequenceur s in Conduite.Courante.Sequenceurs)
|
||||
AddSeqUI(s);
|
||||
|
|
@ -547,7 +569,7 @@ namespace DMX2
|
|||
{
|
||||
lblInfo.Text = Info.GetInfo();
|
||||
if(Conduite.Courante==null)return;
|
||||
foreach (var notebookchild in onglets.Children) {
|
||||
foreach (var notebookchild in seqCtn.Children) {
|
||||
SequenceurUI sequi = notebookchild as SequenceurUI;
|
||||
if(sequi != null) sequi.Update(fullUpdateFlag);
|
||||
}
|
||||
|
|
@ -592,7 +614,8 @@ namespace DMX2
|
|||
DetruitMatrice();
|
||||
foreach (var widget in vboxCircuits.Children)
|
||||
vboxCircuits.Remove (widget);
|
||||
foreach (var notebookvbox in onglets.Children)
|
||||
if(seqCtn !=null)
|
||||
foreach (var notebookvbox in seqCtn.Children)
|
||||
notebookvbox.Destroy();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -341,6 +341,8 @@ namespace DMX2
|
|||
|
||||
lastKnownWidth = zoneWid.Allocation.Width;
|
||||
|
||||
GtkScrolledWindow1.VscrollbarPolicy = (Parent is Gtk.VBox)? PolicyType.Never:PolicyType.Automatic;
|
||||
|
||||
if (lastKnownWidth < 50) {
|
||||
fullUpdFlag=false;
|
||||
return;
|
||||
|
|
@ -369,7 +371,7 @@ namespace DMX2
|
|||
fx.X = xpos;
|
||||
fx.Y = ypos;
|
||||
label.Name = "sclTirette";
|
||||
label.Show();
|
||||
//label.Show();
|
||||
label.Justify = Justification.Left;
|
||||
|
||||
tirettes[c] = tirette = NouvelleTirette();
|
||||
|
|
@ -378,7 +380,7 @@ namespace DMX2
|
|||
fx = ( zoneWid[tirette] as Fixed.FixedChild);
|
||||
fx.X = xpos;
|
||||
fx.Y = ypos + 20;
|
||||
tirette.Show();
|
||||
//tirette.Show();
|
||||
tirette.ValueChanged += TiretteActionee;
|
||||
tirette.Data.Add(circuitKey,c);
|
||||
tirette.Data.Add(labKey,label);
|
||||
|
|
@ -394,7 +396,7 @@ namespace DMX2
|
|||
fx.X = xpos-30;
|
||||
fx.Y = ypos+150;
|
||||
label.LabelProp = string.Format( "{0}-{1}", c.ID, c.ShortName);
|
||||
label.Show();
|
||||
//label.Show();
|
||||
|
||||
xpos+=30;
|
||||
if(lastKnownWidth < xpos +30)
|
||||
|
|
@ -404,6 +406,10 @@ namespace DMX2
|
|||
}
|
||||
}
|
||||
|
||||
UpdateValues();
|
||||
|
||||
zoneWid.ShowAll();
|
||||
|
||||
posLabel.Text = string.Format("n°{0}",sequenceur.IndexEffetCourrant +1);
|
||||
|
||||
fullUpdFlag=false;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ namespace DMX2
|
|||
private global::Gtk.HPaned hpaned2;
|
||||
private global::Gtk.ScrolledWindow GtkScrolledWindow2;
|
||||
private global::Gtk.NodeView MatriceUI;
|
||||
private global::Gtk.Notebook onglets;
|
||||
private global::Gtk.ScrolledWindow scrolledwindow2;
|
||||
private global::Gtk.VBox vboxCircuits;
|
||||
private global::Gtk.HSeparator hseparator1;
|
||||
|
|
@ -394,15 +393,9 @@ namespace DMX2
|
|||
this.hpaned2.Add (this.GtkScrolledWindow2);
|
||||
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;
|
||||
this.onglets.Name = "onglets";
|
||||
this.onglets.CurrentPage = 0;
|
||||
this.hpaned2.Add (this.onglets);
|
||||
this.hpaned1.Add (this.hpaned2);
|
||||
global::Gtk.Paned.PanedChild w68 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2]));
|
||||
w68.Resize = false;
|
||||
global::Gtk.Paned.PanedChild w67 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2]));
|
||||
w67.Resize = false;
|
||||
// Container child hpaned1.Gtk.Paned+PanedChild
|
||||
this.scrolledwindow2 = new global::Gtk.ScrolledWindow ();
|
||||
this.scrolledwindow2.WidthRequest = 150;
|
||||
|
|
@ -410,32 +403,32 @@ namespace DMX2
|
|||
this.scrolledwindow2.Name = "scrolledwindow2";
|
||||
this.scrolledwindow2.ShadowType = ((global::Gtk.ShadowType)(1));
|
||||
// Container child scrolledwindow2.Gtk.Container+ContainerChild
|
||||
global::Gtk.Viewport w69 = new global::Gtk.Viewport ();
|
||||
w69.ShadowType = ((global::Gtk.ShadowType)(0));
|
||||
global::Gtk.Viewport w68 = new global::Gtk.Viewport ();
|
||||
w68.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;
|
||||
w69.Add (this.vboxCircuits);
|
||||
this.scrolledwindow2.Add (w69);
|
||||
w68.Add (this.vboxCircuits);
|
||||
this.scrolledwindow2.Add (w68);
|
||||
this.hpaned1.Add (this.scrolledwindow2);
|
||||
global::Gtk.Paned.PanedChild w72 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2]));
|
||||
w72.Resize = false;
|
||||
w72.Shrink = false;
|
||||
global::Gtk.Paned.PanedChild w71 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2]));
|
||||
w71.Resize = false;
|
||||
w71.Shrink = false;
|
||||
this.hbox1.Add (this.hpaned1);
|
||||
global::Gtk.Box.BoxChild w73 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1]));
|
||||
w73.Position = 2;
|
||||
global::Gtk.Box.BoxChild w72 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1]));
|
||||
w72.Position = 2;
|
||||
this.vbox1.Add (this.hbox1);
|
||||
global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1]));
|
||||
w74.Position = 0;
|
||||
global::Gtk.Box.BoxChild w73 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1]));
|
||||
w73.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 w75 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1]));
|
||||
w75.Position = 1;
|
||||
w75.Expand = false;
|
||||
w75.Fill = false;
|
||||
global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1]));
|
||||
w74.Position = 1;
|
||||
w74.Expand = false;
|
||||
w74.Fill = false;
|
||||
// Container child vbox1.Gtk.Box+BoxChild
|
||||
this.hbox4 = new global::Gtk.HBox ();
|
||||
this.hbox4.Name = "hbox4";
|
||||
|
|
@ -446,10 +439,10 @@ namespace DMX2
|
|||
this.toolbar7.Name = "toolbar7";
|
||||
this.toolbar7.ShowArrow = false;
|
||||
this.hbox4.Add (this.toolbar7);
|
||||
global::Gtk.Box.BoxChild w76 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7]));
|
||||
w76.Position = 0;
|
||||
w76.Expand = false;
|
||||
w76.Fill = false;
|
||||
global::Gtk.Box.BoxChild w75 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7]));
|
||||
w75.Position = 0;
|
||||
w75.Expand = false;
|
||||
w75.Fill = false;
|
||||
// Container child hbox4.Gtk.Box+BoxChild
|
||||
this.evInfo = new global::Gtk.EventBox ();
|
||||
this.evInfo.Name = "evInfo";
|
||||
|
|
@ -459,8 +452,8 @@ namespace DMX2
|
|||
this.lblInfo.LabelProp = "info";
|
||||
this.evInfo.Add (this.lblInfo);
|
||||
this.hbox4.Add (this.evInfo);
|
||||
global::Gtk.Box.BoxChild w78 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo]));
|
||||
w78.Position = 1;
|
||||
global::Gtk.Box.BoxChild w77 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo]));
|
||||
w77.Position = 1;
|
||||
// Container child hbox4.Gtk.Box+BoxChild
|
||||
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar8'><toolitem name='newAction' action='newAction'/><toolitem name='openAction' action='openAction'/><toolitem name='saveAction' action='saveAction'/><toolitem name='saveAsAction' action='saveAsAction'/><toolitem name='closeAction' action='closeAction'/><toolitem name='aboutAction' action='aboutAction'/><toolitem name='quitAction' action='quitAction'/></toolbar></ui>");
|
||||
this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8")));
|
||||
|
|
@ -468,15 +461,15 @@ namespace DMX2
|
|||
this.toolbar8.ShowArrow = false;
|
||||
this.toolbar8.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
||||
this.hbox4.Add (this.toolbar8);
|
||||
global::Gtk.Box.BoxChild w79 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8]));
|
||||
global::Gtk.Box.BoxChild w78 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8]));
|
||||
w78.Position = 2;
|
||||
w78.Expand = false;
|
||||
w78.Fill = false;
|
||||
this.vbox1.Add (this.hbox4);
|
||||
global::Gtk.Box.BoxChild w79 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4]));
|
||||
w79.Position = 2;
|
||||
w79.Expand = false;
|
||||
w79.Fill = false;
|
||||
this.vbox1.Add (this.hbox4);
|
||||
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 ();
|
||||
|
|
|
|||
|
|
@ -478,19 +478,9 @@ page</property>
|
|||
<property name="Resize">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Notebook" id="onglets">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="CurrentPage">0</property>
|
||||
<child>
|
||||
<placeholder />
|
||||
</child>
|
||||
<child>
|
||||
<placeholder />
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Resize">False</property>
|
||||
|
|
|
|||
Loading…
Reference in a new issue