예제 #1
0
		public void SetPListContainer (PObjectContainer container)
		{
			var summaryScrolledWindow = new PListEditorSection ();
			AppendPage (summaryScrolledWindow, new Label (GettextCatalog.GetString ("Summary")));
			
			var advancedScrolledWindow = new PListEditorSection ();
			AppendPage (advancedScrolledWindow, new Label (GettextCatalog.GetString ("Advanced")));
			
			foreach (var section in handler.GetSections (proj, container)) {
				var expander = new MacExpander () {
					ContentLabel = section.Name,
					Expandable = true,
				};
				expander.SetWidget (section.Widget);
				
				if (section.IsAdvanced) {
					advancedScrolledWindow.AddExpander (expander);
				} else {
					summaryScrolledWindow.AddExpander (expander);
				}
				
				if (section.CheckVisible != null) {
					expander.Visible = section.CheckVisible (container);
					//capture section for closure
					var s = section;
					container.Changed += delegate {
						expander.Visible = s.CheckVisible (container);
					};
				}
			}
			Show ();
		}
예제 #2
0
        public void SetPListContainer(PObjectContainer container)
        {
            var summaryScrolledWindow = new PListEditorSection();

            AppendPage(summaryScrolledWindow, new Label(GettextCatalog.GetString("Summary")));

            var advancedScrolledWindow = new PListEditorSection();

            AppendPage(advancedScrolledWindow, new Label(GettextCatalog.GetString("Advanced")));

            foreach (var section in handler.GetSections(proj, container))
            {
                var expander = new MacExpander()
                {
                    ContentLabel = section.Name,
                    Expandable   = true,
                };
                expander.SetWidget(section.Widget);

                if (section.IsAdvanced)
                {
                    advancedScrolledWindow.AddExpander(expander);
                }
                else
                {
                    summaryScrolledWindow.AddExpander(expander);
                }

                if (section.CheckVisible != null)
                {
                    expander.Visible = section.CheckVisible(container);
                    //capture section for closure
                    var s = section;
                    container.Changed += delegate
                    {
                        expander.Visible = s.CheckVisible(container);
                    };
                }
            }
            Show();
        }
예제 #3
0
			public void AddExpander (MacExpander expander)
			{
				content.PackStart (expander, false, false, 0);
			}
예제 #4
0
 public ExpanderHeader(MacExpander container)
 {
     this.container = container;
     Events        |= EventMask.AllEventsMask;
 }
예제 #5
0
			public ExpanderHeader (MacExpander container)
			{
				this.container = container;
				Events |= EventMask.AllEventsMask;
			}
예제 #6
0
 public void AddExpander(MacExpander expander)
 {
     content.PackStart(expander, false, false, 0);
 }