public CellRendererWidget(PropertyEditorCell cell, ITypeDescriptorContext context)
 {
     this.cell    = cell;
     this.context = context;
     em           = cell.EditorManager;
     this.ModifyBg(StateType.Normal, this.Style.White);
 }
 public CellRendererWidget(PropertyEditorCell cell)
 {
     this.cell     = cell;
     this.obj      = cell.Instance;
     this.property = cell.Property;
     em            = cell.EditorManager;
     this.ModifyBg(Gtk.StateType.Normal, this.Style.White);
 }
        internal void Initialize(Widget container, EditorManager editorManager, ITypeDescriptorContext context)
        {
            this.container     = container;
            this.editorManager = editorManager;

            layout                 = new Pango.Layout(container.PangoContext);
            layout.Width           = -1;
            layout.FontDescription = FontService.SansFont.CopyModified(Ide.Gui.Styles.FontScale11);

            this.context = context;
            Initialize();
        }
        public PropertyGridTable(EditorManager editorManager, PropertyGrid parentGrid)
        {
            GtkWorkarounds.FixContainerLeak(this);

            this.parentGrid    = parentGrid;
            this.editorManager = editorManager;
            WidgetFlags       |= Gtk.WidgetFlags.AppPaintable;
            Events            |= Gdk.EventMask.PointerMotionMask;
            CanFocus           = true;
            resizeCursor       = new Cursor(CursorType.SbHDoubleArrow);
            handCursor         = new Cursor(CursorType.Hand1);
        }
		internal void Initialize (Widget container, EditorManager editorManager, ITypeDescriptorContext context)
		{
			this.container = container;
			this.editorManager = editorManager;
			
			layout = new Pango.Layout (container.PangoContext);
			layout.Width = -1;
			layout.FontDescription = FontService.SansFont.CopyModified (Ide.Gui.Styles.FontScale11);
			
			this.context = context;
			Initialize ();
		}
		public PropertyGridTable (EditorManager editorManager, PropertyGrid parentGrid)
		{
			Mono.TextEditor.GtkWorkarounds.FixContainerLeak (this);

			this.editorManager = editorManager;
			WidgetFlags |= Gtk.WidgetFlags.AppPaintable;
			Events |= Gdk.EventMask.PointerMotionMask;
			CanFocus = true;
			resizeCursor = new Cursor (CursorType.SbHDoubleArrow);
			handCursor = new Cursor (CursorType.Hand1);
			discloseDown = Gdk.Pixbuf.LoadFromResource ("disclose-arrow-down.png");
			discloseUp = Gdk.Pixbuf.LoadFromResource ("disclose-arrow-up.png");
		}
        public PropertyGridTable(EditorManager editorManager, PropertyGrid parentGrid)
        {
            Mono.TextEditor.GtkWorkarounds.FixContainerLeak(this);

            this.editorManager = editorManager;
            WidgetFlags       |= Gtk.WidgetFlags.AppPaintable;
            Events            |= Gdk.EventMask.PointerMotionMask;
            CanFocus           = true;
            resizeCursor       = new Cursor(CursorType.SbHDoubleArrow);
            handCursor         = new Cursor(CursorType.Hand1);
            discloseDown       = Gdk.Pixbuf.LoadFromResource("disclose-arrow-down.png");
            discloseUp         = Gdk.Pixbuf.LoadFromResource("disclose-arrow-up.png");
        }
Beispiel #8
0
		public PropertyGridTree (EditorManager editorManager, PropertyGrid parentGrid)
		{
			this.editorManager = editorManager;
			this.parentGrid = parentGrid;
			
			propertyRows = new Hashtable ();
			
			store = new TreeStore (typeof (string), typeof(object), typeof(bool), typeof(object));
			
			tree = new InternalTree (this, store);

			CellRendererText crt;

			TreeViewColumn col;

			col = new TreeViewColumn ();
			col.Title = Catalog.GetString ("Property");
			crt = new CellRendererPropertyGroup (tree);
			crt.Xpad = 0;
			col.PackStart (crt, true);
			col.SetCellDataFunc (crt, new TreeCellDataFunc (GroupData));
			col.Resizable = true;
			col.Expand = false;
			col.Sizing = TreeViewColumnSizing.Fixed;
			col.FixedWidth = 180;

            tree.AppendColumn (col);

			editorColumn = new TreeViewColumn ();
			editorColumn.Title = Catalog.GetString ("Value");
			
			CellRendererProperty crp = new CellRendererProperty (tree);
			
			editorColumn.PackStart (crp, true);
			editorColumn.SetCellDataFunc (crp, new TreeCellDataFunc (PropertyData));
			editorColumn.Sizing = TreeViewColumnSizing.Fixed;
			editorColumn.Resizable = false;
			editorColumn.Expand = true;
			tree.AppendColumn (editorColumn);
			
			tree.HeadersVisible = false;
			this.ShadowType = Gtk.ShadowType.None;
			
			this.HscrollbarPolicy = Gtk.PolicyType.Never;
			
			Add (tree);
			
			ShowAll ();
			
			tree.Selection.Changed += OnSelectionChanged;
		}
Beispiel #9
0
        public PropertyGridTree(EditorManager editorManager, PropertyGrid parentGrid)
        {
            this.editorManager = editorManager;
            this.parentGrid    = parentGrid;

            propertyRows = new Hashtable();

            store = new TreeStore(typeof(string), typeof(object), typeof(bool), typeof(object));

            tree = new InternalTree(this, store);

            CellRendererText crt;

            TreeViewColumn col;

            col       = new TreeViewColumn();
            col.Title = Catalog.GetString("Property");
            crt       = new CellRendererPropertyGroup(tree);
            crt.Xpad  = 0;
            col.PackStart(crt, true);
            col.SetCellDataFunc(crt, new TreeCellDataFunc(GroupData));
            col.Resizable  = true;
            col.Expand     = false;
            col.Sizing     = TreeViewColumnSizing.Fixed;
            col.FixedWidth = 180;

            tree.AppendColumn(col);

            editorColumn       = new TreeViewColumn();
            editorColumn.Title = Catalog.GetString("Value");

            CellRendererProperty crp = new CellRendererProperty(tree);

            editorColumn.PackStart(crp, true);
            editorColumn.SetCellDataFunc(crp, new TreeCellDataFunc(PropertyData));
            editorColumn.Sizing    = TreeViewColumnSizing.Fixed;
            editorColumn.Resizable = false;
            editorColumn.Expand    = true;
            tree.AppendColumn(editorColumn);

            tree.HeadersVisible = false;
            this.ShadowType     = Gtk.ShadowType.None;

            this.HscrollbarPolicy = Gtk.PolicyType.Never;

            Add(tree);

            ShowAll();

            tree.Selection.Changed += OnSelectionChanged;
        }
Beispiel #10
0
        internal void Initialize(Widget container, EditorManager editorManager, ITypeDescriptorContext context)
        {
            this.container     = container;
            this.editorManager = editorManager;

            layout       = new Pango.Layout(container.PangoContext);
            layout.Width = -1;

            Pango.FontDescription des = container.Style.FontDescription.Copy();
            layout.FontDescription = des;

            this.context = context;
            Initialize();
        }
		internal void Initialize (Widget container, EditorManager editorManager, ITypeDescriptorContext context)
		{
			this.container = container;
			this.editorManager = editorManager;
			
			layout = new Pango.Layout (container.PangoContext);
			layout.Width = -1;
			
			Pango.FontDescription des = container.Style.FontDescription.Copy();
			layout.FontDescription = des;
			
			this.context = context;
			Initialize ();
		}
        public PropertyGridTable(EditorManager editorManager, PropertyGrid parentGrid)
        {
            GtkWorkarounds.FixContainerLeak(this);

            this.parentGrid    = parentGrid;
            this.editorManager = editorManager;
            WidgetFlags       |= Gtk.WidgetFlags.AppPaintable;
            Events            |= Gdk.EventMask.PointerMotionMask;
            CanFocus           = true;
            resizeCursor       = new Cursor(CursorType.SbHDoubleArrow);
            handCursor         = new Cursor(CursorType.Hand1);
            discloseDown       = Xwt.Drawing.Image.FromResource("disclose-arrow-down-16.png");
            discloseUp         = Xwt.Drawing.Image.FromResource("disclose-arrow-up-16.png");
        }
        internal void Initialize(Widget container, EditorManager editorManager, PropertyDescriptor property, object obj)
        {
            this.container     = container;
            this.editorManager = editorManager;

            layout       = new Pango.Layout(container.PangoContext);
            layout.Width = -1;

            Pango.FontDescription des = container.Style.FontDescription.Copy();
            layout.FontDescription = des;

            this.property = property;
            this.obj      = obj;
            Initialize();
        }
Beispiel #14
0
		internal void Initialize (Widget container, EditorManager editorManager, PropertyDescriptor property, object obj)
		{
			this.container = container;
			this.editorManager = editorManager;
			
			layout = new Pango.Layout (container.PangoContext);
			layout.Width = -1;
			
			Pango.FontDescription des = container.Style.FontDescription.Copy();
			layout.FontDescription = des;
			
			this.property = property;
			this.obj = obj;
			Initialize ();
		}
Beispiel #15
0
        public PropertyGridTable(EditorManager editorManager, PropertyGrid parentGrid)
        {
            // TODO: ???
            //Mono.TextEditor.GtkWorkarounds.FixContainerLeak (this);

            this.editorManager = editorManager;
            WidgetFlags       |= Gtk.WidgetFlags.AppPaintable;
            Events            |= Gdk.EventMask.PointerMotionMask;
            CanFocus           = true;
            resizeCursor       = new Cursor(CursorType.SbHDoubleArrow);
            handCursor         = new Cursor(CursorType.Hand1);
            discloseDown       = Gdk.Pixbuf.LoadFromResource("disclose-arrow-down.png");
            discloseUp         = Gdk.Pixbuf.LoadFromResource("disclose-arrow-up.png");
            arrowLeft          = Gdk.Pixbuf.LoadFromResource("arrow-left.png");
            arrowRight         = Gdk.Pixbuf.LoadFromResource("arrow-right.png");

            PropertyContentRightPadding = MG.Framework.Utility.Platform.IsMac ? 10 : 0;
        }
Beispiel #16
0
        public CellRendererWidget(PropertyEditorCell cell)
        {
            this.cell     = cell;
            this.obj      = cell.Instance;
            this.property = cell.Property;
            em            = cell.EditorManager;
            this.ModifyBg(Gtk.StateType.Normal, this.Style.White);

            // HERZUM SPRINT 4.2: TLAB-202
            if (cell != null && cell.Value != null && Buffer != null)
            {
                if ((cell.Value as TraceLabSDK.Component.Config.DirectoryPath) != null)
                {
                    Buffer.Text = (cell.Value as TraceLabSDK.Component.Config.DirectoryPath).Absolute;
                }
                else if ((cell.Value as TraceLabSDK.Component.Config.FilePath) != null)
                {
                    Buffer.Text = (cell.Value as TraceLabSDK.Component.Config.FilePath).Absolute;
                }
            }
            // END HERZUM SPRINT 4.2: TLAB-202
        }
		internal PropertyGrid (EditorManager editorManager)
		{
			this.editorManager = editorManager;
			
			#region Toolbar
			
			PropertyGridToolbar tb = new PropertyGridToolbar ();
			base.PackStart (tb, false, false, 0);
			toolbar = tb;
			
			catButton = new RadioButton ((Gtk.RadioButton)null);
			catButton.DrawIndicator = false;
			catButton.Relief = ReliefStyle.None;
			Gdk.Pixbuf pixbuf = null;
			try {
				pixbuf = new Gdk.Pixbuf (typeof (PropertyGrid).Assembly, "MonoDevelop.Components.PropertyGrid.SortByCat.png");
			} catch (Exception e) {
				NLog.LogManager.GetCurrentClassLogger().Error ("Can't create pixbuf from resource: MonoDevelop.Components.PropertyGrid.SortByCat.png", e);
			}
			if (pixbuf != null) {
				catButton.Image = new Gtk.Image (pixbuf);
				catButton.Image.Show ();
			}
			catButton.TooltipText = Catalog.GetString ("Sort in categories");
			catButton.Toggled += new EventHandler (toolbarClick);
			toolbar.Insert (catButton, 0);
			
			alphButton = new RadioButton (catButton);
			alphButton.DrawIndicator = false;
			alphButton.Relief = ReliefStyle.None;
			alphButton.Image = new Gtk.Image (Stock.SortAscending, IconSize.Menu);
			alphButton.Image.Show ();
			alphButton.TooltipText = Catalog.GetString ("Sort alphabetically");
			alphButton.Clicked += new EventHandler (toolbarClick);
			toolbar.Insert (alphButton, 1);
			
            catButton.Active = true;
			
			toolbar.Insert (new SeparatorToolItem (), 2);
			helpButton = new ToggleButton ();
			helpButton.Relief = ReliefStyle.None;
			helpButton.Image = new Gtk.Image (Gtk.Stock.Help, IconSize.Menu);
			helpButton.TooltipText = Catalog.GetString ("Show help panel");
			helpButton.Clicked += delegate {
				ShowHelp = helpButton.Active;
				//MonoDevelop.Core.PropertyService.Set (PROP_HELP_KEY, helpButton.Active);
			};
			toolbar.Insert (helpButton, 3);
			
			#endregion

			vpaned = new VPaned ();

			tree = new PropertyGridTree (editorManager, this);
			tree.Changed += delegate {
				Update ();
			};

			VBox tbox = new VBox ();
			toolbarSeparator = new HSeparator ();
			toolbarSeparator.Visible = true;
			tbox.PackStart (toolbarSeparator, false, false, 0);
			tbox.PackStart (tree, true, true, 0);
			helpSeparator = new HSeparator ();
			tbox.PackStart (helpSeparator, false, false, 0);
			helpSeparator.NoShowAll = true;
			vpaned.Pack1 (tbox, true, true);
			
			AddPropertyTab (new DefaultPropertyTab ());
			AddPropertyTab (new EventPropertyTab ());

			base.PackEnd (vpaned);
			base.FocusChain = new Gtk.Widget [] { vpaned };
			
			//helpButton.Active = ShowHelp = MonoDevelop.Core.PropertyService.Get<bool> (PROP_HELP_KEY, true);
            helpButton.Active = ShowHelp = false;
			
			Populate ();
			UpdateTabs ();
		}
Beispiel #18
0
        internal PropertyGrid(EditorManager editorManager)
        {
            this.editorManager = editorManager;

            #region Toolbar

            PropertyGridToolbar tb = new PropertyGridToolbar();
            base.PackStart(tb, false, false, 0);
            toolbar = tb;

            catButton = new RadioButton((Gtk.RadioButton)null);
            catButton.DrawIndicator = false;
            catButton.Relief        = ReliefStyle.None;
            Gdk.Pixbuf pixbuf = null;
            try {
                pixbuf = new Gdk.Pixbuf(typeof(PropertyGrid).Assembly, "MonoDevelop.Components.PropertyGrid.SortByCat.png");
            } catch (Exception e) {
                //LoggingService.LogError ("Can't create pixbuf from resource: MonoDevelop.Components.PropertyGrid.SortByCat.png", e);
            }
            if (pixbuf != null)
            {
                catButton.Image = new Gtk.Image(pixbuf);
                catButton.Image.Show();
            }
            catButton.TooltipText = "Sort in categories";
            catButton.Toggled    += new EventHandler(toolbarClick);
            toolbar.Insert(catButton, 0);

            alphButton = new RadioButton(catButton);
            alphButton.DrawIndicator = false;
            alphButton.Relief        = ReliefStyle.None;
            alphButton.Image         = new Gtk.Image(Stock.SortAscending, IconSize.Menu);
            alphButton.Image.Show();
            alphButton.TooltipText = "Sort alphabetically";
            alphButton.Clicked    += new EventHandler(toolbarClick);
            toolbar.Insert(alphButton, 1);

            catButton.Active = true;

            #endregion

            vpaned = new VPaned();

            tree          = new PropertyGridTable(editorManager, this);
            tree.Changed += delegate {
                Update();
            };

            CompactScrolledWindow sw = new CompactScrolledWindow();
            sw.AddWithViewport(tree);
            ((Gtk.Viewport)sw.Child).ShadowType = Gtk.ShadowType.None;
            sw.ShadowType       = Gtk.ShadowType.None;
            sw.HscrollbarPolicy = PolicyType.Never;
            sw.VscrollbarPolicy = PolicyType.Automatic;

            VBox tbox = new VBox();
            toolbarSeparator         = new HSeparator();
            toolbarSeparator.Visible = true;
            tbox.PackStart(toolbarSeparator, false, false, 0);
            tbox.PackStart(sw, true, true, 0);
            helpSeparator = new HSeparator();
            tbox.PackStart(helpSeparator, false, false, 0);
            helpSeparator.NoShowAll = true;
            vpaned.Pack1(tbox, true, true);

            AddPropertyTab(new DefaultPropertyTab());
            AddPropertyTab(new EventPropertyTab());

            base.PackEnd(vpaned);
            base.FocusChain = new Gtk.Widget [] { vpaned };

            Populate();
            UpdateTabs();
        }
Beispiel #19
0
        internal PropertyGrid(EditorManager editorManager)
        {
            this.editorManager = editorManager;

            #region Toolbar

            PropertyGridToolbar tb = new PropertyGridToolbar();
            base.PackStart(tb, false, false, 0);
            toolbar = tb;

            catButton = new RadioButton((Gtk.RadioButton)null);
            catButton.DrawIndicator = false;
            catButton.Relief        = ReliefStyle.None;
            catButton.Image         = new Gtk.Image(MonoDevelop.Ide.Gui.Stock.GroupByCategory, IconSize.Menu);
            catButton.Image.Show();
            catButton.TooltipText = GettextCatalog.GetString("Sort in categories");
            catButton.Toggled    += new EventHandler(toolbarClick);
            toolbar.Insert(catButton, 0);

            alphButton = new RadioButton(catButton);
            alphButton.DrawIndicator = false;
            alphButton.Relief        = ReliefStyle.None;
            alphButton.Image         = new Gtk.Image(MonoDevelop.Ide.Gui.Stock.SortAlphabetically, IconSize.Menu);
            alphButton.Image.Show();
            alphButton.TooltipText = GettextCatalog.GetString("Sort alphabetically");
            alphButton.Clicked    += new EventHandler(toolbarClick);
            toolbar.Insert(alphButton, 1);

            catButton.Active = true;

            #endregion

            vpaned = new VPaned();

            tree          = new PropertyGridTable(editorManager, this);
            tree.Changed += delegate {
                Update();
            };

            CompactScrolledWindow sw = new CompactScrolledWindow();
            sw.AddWithViewport(tree);
            ((Gtk.Viewport)sw.Child).ShadowType = Gtk.ShadowType.None;
            sw.ShadowType       = Gtk.ShadowType.None;
            sw.HscrollbarPolicy = PolicyType.Never;
            sw.VscrollbarPolicy = PolicyType.Automatic;

            VBox tbox = new VBox();
            toolbarSeparator         = new HSeparator();
            toolbarSeparator.Visible = true;
            tbox.PackStart(toolbarSeparator, false, false, 0);
            tbox.PackStart(sw, true, true, 0);
            helpSeparator = new HSeparator();
            tbox.PackStart(helpSeparator, false, false, 0);
            helpSeparator.NoShowAll = true;
            vpaned.Pack1(tbox, true, true);

            AddPropertyTab(new DefaultPropertyTab());
            AddPropertyTab(new EventPropertyTab());

            base.PackEnd(vpaned);
            base.FocusChain = new Gtk.Widget [] { vpaned };

            Populate();
            UpdateTabs();
        }
Beispiel #20
0
        internal PropertyGrid(EditorManager editorManager)
        {
            this.editorManager = editorManager;

            #region Toolbar

            PropertyGridToolbar tb = new PropertyGridToolbar();
            base.PackStart(tb, false, false, 0);
            toolbar = tb;

            catButton = new RadioButton((Gtk.RadioButton)null);
            catButton.DrawIndicator = false;
            catButton.Relief        = ReliefStyle.None;
            Gdk.Pixbuf pixbuf = null;
            try {
                pixbuf = new Gdk.Pixbuf(typeof(PropertyGrid).Assembly, "MonoDevelop.Components.PropertyGrid.SortByCat.png");
            } catch (Exception e) {
                NLog.LogManager.GetCurrentClassLogger().Error("Can't create pixbuf from resource: MonoDevelop.Components.PropertyGrid.SortByCat.png", e);
            }
            if (pixbuf != null)
            {
                catButton.Image = new Gtk.Image(pixbuf);
                catButton.Image.Show();
            }
            catButton.TooltipText = Catalog.GetString("Sort in categories");
            catButton.Toggled    += new EventHandler(toolbarClick);
            toolbar.Insert(catButton, 0);

            alphButton = new RadioButton(catButton);
            alphButton.DrawIndicator = false;
            alphButton.Relief        = ReliefStyle.None;
            alphButton.Image         = new Gtk.Image(Stock.SortAscending, IconSize.Menu);
            alphButton.Image.Show();
            alphButton.TooltipText = Catalog.GetString("Sort alphabetically");
            alphButton.Clicked    += new EventHandler(toolbarClick);
            toolbar.Insert(alphButton, 1);

            catButton.Active = true;

            toolbar.Insert(new SeparatorToolItem(), 2);
            helpButton             = new ToggleButton();
            helpButton.Relief      = ReliefStyle.None;
            helpButton.Image       = new Gtk.Image(Gtk.Stock.Help, IconSize.Menu);
            helpButton.TooltipText = Catalog.GetString("Show help panel");
            helpButton.Clicked    += delegate {
                ShowHelp = helpButton.Active;
                //MonoDevelop.Core.PropertyService.Set (PROP_HELP_KEY, helpButton.Active);
            };
            toolbar.Insert(helpButton, 3);

            #endregion

            vpaned = new VPaned();

            tree          = new PropertyGridTree(editorManager, this);
            tree.Changed += delegate {
                Update();
            };

            VBox tbox = new VBox();
            toolbarSeparator         = new HSeparator();
            toolbarSeparator.Visible = true;
            tbox.PackStart(toolbarSeparator, false, false, 0);
            tbox.PackStart(tree, true, true, 0);
            helpSeparator = new HSeparator();
            tbox.PackStart(helpSeparator, false, false, 0);
            helpSeparator.NoShowAll = true;
            vpaned.Pack1(tbox, true, true);

            AddPropertyTab(new DefaultPropertyTab());
            AddPropertyTab(new EventPropertyTab());

            base.PackEnd(vpaned);
            base.FocusChain = new Gtk.Widget [] { vpaned };

            //helpButton.Active = ShowHelp = MonoDevelop.Core.PropertyService.Get<bool> (PROP_HELP_KEY, true);
            helpButton.Active = ShowHelp = false;

            Populate();
            UpdateTabs();
        }
Beispiel #21
0
        internal PropertyGrid(EditorManager editorManager)
        {
            this.editorManager = editorManager;

            #region Toolbar

            PropertyGridToolbar tb = new PropertyGridToolbar ();
            base.PackStart (tb, false, false, 0);
            toolbar = tb;

            catButton = new RadioButton ((Gtk.RadioButton)null);
            catButton.DrawIndicator = false;
            catButton.Relief = ReliefStyle.None;
            catButton.Image = new Gtk.Image (MonoDevelop.Ide.Gui.Stock.GroupByCategory, IconSize.Menu);
            catButton.Image.Show ();
            catButton.TooltipText = GettextCatalog.GetString ("Sort in categories");
            catButton.Toggled += new EventHandler (toolbarClick);
            toolbar.Insert (catButton, 0);

            alphButton = new RadioButton (catButton);
            alphButton.DrawIndicator = false;
            alphButton.Relief = ReliefStyle.None;
            alphButton.Image = new Gtk.Image (MonoDevelop.Ide.Gui.Stock.SortAlphabetically, IconSize.Menu);
            alphButton.Image.Show ();
            alphButton.TooltipText = GettextCatalog.GetString ("Sort alphabetically");
            alphButton.Clicked += new EventHandler (toolbarClick);
            toolbar.Insert (alphButton, 1);

            catButton.Active = true;

            #endregion

            vpaned = new VPaned ();

            tree = new PropertyGridTable (editorManager, this);
            tree.Changed += delegate {
                Update ();
            };

            CompactScrolledWindow sw = new CompactScrolledWindow ();
            sw.AddWithViewport (tree);
            ((Gtk.Viewport)sw.Child).ShadowType = Gtk.ShadowType.None;
            sw.ShadowType = Gtk.ShadowType.None;
            sw.HscrollbarPolicy = PolicyType.Never;
            sw.VscrollbarPolicy = PolicyType.Automatic;

            VBox tbox = new VBox ();
            toolbarSeparator = new HSeparator ();
            toolbarSeparator.Visible = true;
            tbox.PackStart (toolbarSeparator, false, false, 0);
            tbox.PackStart (sw, true, true, 0);
            helpSeparator = new HSeparator ();
            tbox.PackStart (helpSeparator, false, false, 0);
            helpSeparator.NoShowAll = true;
            vpaned.Pack1 (tbox, true, true);

            AddPropertyTab (new DefaultPropertyTab ());
            AddPropertyTab (new EventPropertyTab ());

            base.PackEnd (vpaned);
            base.FocusChain = new Gtk.Widget [] { vpaned };

            Populate ();
            UpdateTabs ();
        }
		public CellRendererWidget (PropertyEditorCell cell, ITypeDescriptorContext context)
		{
			this.cell = cell;
			this.context = context;
			em = cell.EditorManager;
			this.ModifyBg (StateType.Normal, this.Style.White);
		}
Beispiel #23
0
		public CellRendererWidget (PropertyEditorCell cell)
		{
			this.cell = cell;
			this.obj = cell.Instance;
			this.property = cell.Property;
			em = cell.EditorManager;
			this.ModifyBg (Gtk.StateType.Normal, this.Style.White);

            // HERZUM SPRINT 4.2: TLAB-202
            if (cell != null && cell.Value != null && Buffer != null){
                if ((cell.Value as TraceLabSDK.Component.Config.DirectoryPath) != null)
                    Buffer.Text = (cell.Value as TraceLabSDK.Component.Config.DirectoryPath).Absolute;
                else if ((cell.Value as TraceLabSDK.Component.Config.FilePath) != null)
                    Buffer.Text = (cell.Value as TraceLabSDK.Component.Config.FilePath).Absolute;
            }
            // END HERZUM SPRINT 4.2: TLAB-202
		}
		internal PropertyGrid (EditorManager editorManager)
		{
			this.editorManager = editorManager;
			
			#region Toolbar
			
			PropertyGridToolbar tb = new PropertyGridToolbar ();
			base.PackStart (tb, false, false, 0);
			toolbar = tb;
			
			catButton = new RadioButton ((Gtk.RadioButton)null);
			catButton.DrawIndicator = false;
			catButton.Relief = ReliefStyle.None;
			Gdk.Pixbuf pixbuf = null;
			try {
				pixbuf = new Gdk.Pixbuf (typeof (PropertyGrid).Assembly, "MonoDevelop.Components.PropertyGrid.SortByCat.png");
			} catch (Exception e) {
				LoggingService.LogError ("Can't create pixbuf from resource: MonoDevelop.Components.PropertyGrid.SortByCat.png", e);
			}
			if (pixbuf != null) {
				catButton.Image = new Gtk.Image (pixbuf);
				catButton.Image.Show ();
			}
			catButton.TooltipText = GettextCatalog.GetString ("Sort in categories");
			catButton.Toggled += new EventHandler (toolbarClick);
			toolbar.Insert (catButton, 0);
			
			alphButton = new RadioButton (catButton);
			alphButton.DrawIndicator = false;
			alphButton.Relief = ReliefStyle.None;
			alphButton.Image = new Gtk.Image (Stock.SortAscending, IconSize.Menu);
			alphButton.Image.Show ();
			alphButton.TooltipText = GettextCatalog.GetString ("Sort alphabetically");
			alphButton.Clicked += new EventHandler (toolbarClick);
			toolbar.Insert (alphButton, 1);
			
			catButton.Active = true;
			
			#endregion

			vpaned = new VPaned ();

			tree = new PropertyGridTable (editorManager, this);
			tree.Changed += delegate {
				Update ();
			};

			CompactScrolledWindow sw = new CompactScrolledWindow ();
			sw.AddWithViewport (tree);
			((Gtk.Viewport)sw.Child).ShadowType = Gtk.ShadowType.None;
			sw.ShadowType = Gtk.ShadowType.None;
			sw.HscrollbarPolicy = PolicyType.Never;
			sw.VscrollbarPolicy = PolicyType.Automatic;

			VBox tbox = new VBox ();
			toolbarSeparator = new HSeparator ();
			toolbarSeparator.Visible = true;
			tbox.PackStart (toolbarSeparator, false, false, 0);
			tbox.PackStart (sw, true, true, 0);
			helpSeparator = new HSeparator ();
			tbox.PackStart (helpSeparator, false, false, 0);
			helpSeparator.NoShowAll = true;
			vpaned.Pack1 (tbox, true, true);
			
			AddPropertyTab (new DefaultPropertyTab ());
			AddPropertyTab (new EventPropertyTab ());

			base.PackEnd (vpaned);
			base.FocusChain = new Gtk.Widget [] { vpaned };
			
			Populate ();
			UpdateTabs ();
		}
 public CellRendererWidget(PropertyEditorCell cell)
 {
     this.cell = cell;
     this.obj = cell.Instance;
     this.property = cell.Property;
     em = cell.EditorManager;
     this.ModifyBg (Gtk.StateType.Normal, this.Style.White);
 }
        public void TestProbeForItemProperty(Type testType, Type expectedCollectionType)
        {
            var collectionType = EditorManager.GetCollectionItemType(testType);

            Assert.AreEqual(expectedCollectionType, collectionType);
        }