Inheritance: Gtk.CellRenderer
 protected override Area GetCellRedrawArea(int cellX, int cellY, double x, double y, int width, IViewModel viewModel)
 {
     if (viewModel is EventTypeTimelineVM)
     {
         return(PlaysCellRenderer.ShouldRedraw(cellX, cellY, y, width, viewModel));
     }
     return(null);
 }
        protected override void SetCellViewModel(CellRenderer cell, TreeIter iter, IViewModel vm)
        {
            PlaysCellRenderer renderer = (cell as PlaysCellRenderer);

            renderer.Item    = vm;
            renderer.Project = Project.Model;
            renderer.Count   = Model.IterNChildren(iter);
        }
示例#3
0
        void RenderElement(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
        {
            var item            = model.GetValue(iter, 0);
            PlaysCellRenderer c = cell as PlaysCellRenderer;

            c.Item  = item;
            c.Count = model.IterNChildren(iter);
        }
示例#4
0
        protected override void RenderPlaylist(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
        {
            var item            = model.GetValue(iter, 0);
            PlaysCellRenderer c = cell as PlaysCellRenderer;

            c.Item  = item;
            c.Count = model.IterNChildren(iter);
        }
示例#5
0
        public PlayListTreeView()
        {
            HeadersVisible = false;
            EnableGridLines = TreeViewGridLines.None;
            EnableTreeLines = false;
            ShowExpanders = false;

            TreeViewColumn custColumn = new TreeViewColumn ();
            CellRenderer cr = new PlaysCellRenderer ();
            custColumn.PackStart (cr, true);
            custColumn.SetCellDataFunc (cr, RenderElement);
            AppendColumn (custColumn);
        }
示例#6
0
        public PlayListTreeView()
        {
            HeadersVisible  = false;
            EnableGridLines = TreeViewGridLines.None;
            EnableTreeLines = false;
            ShowExpanders   = false;

            TreeViewColumn custColumn = new TreeViewColumn();
            CellRenderer   cr         = new PlaysCellRenderer();

            custColumn.PackStart(cr, true);
            custColumn.SetCellDataFunc(cr, RenderElement);
            AppendColumn(custColumn);
        }
示例#7
0
        public ListTreeViewBase()
        {
            Selection.Mode = SelectionMode.Multiple;
            Selection.SelectFunction = SelectFunction;
            RowActivated += new RowActivatedHandler (OnTreeviewRowActivated);
            HeadersVisible = false;
            ShowExpanders = false;

            TreeViewColumn custColumn = new TreeViewColumn ();
            CellRenderer cr = new PlaysCellRenderer ();
            custColumn.PackStart (cr, true);
            custColumn.SetCellDataFunc (cr, RenderElement);

            playsMenu = new PlaysMenu ();
            playsMenu.EditPlayEvent += HandleEditPlayEvent;
            AppendColumn (custColumn);
        }
        public ListTreeViewBase()
        {
            Selection.Mode           = SelectionMode.Multiple;
            Selection.SelectFunction = SelectFunction;
            RowActivated            += new RowActivatedHandler(OnTreeviewRowActivated);
            HeadersVisible           = false;
            ShowExpanders            = false;

            TreeViewColumn custColumn = new TreeViewColumn();
            CellRenderer   cr         = new PlaysCellRenderer();

            custColumn.PackStart(cr, true);
            custColumn.SetCellDataFunc(cr, RenderElement);

            playsMenu = new SportsPlaysMenu();
            playsMenu.EditPlayEvent += HandleEditPlayEvent;
            AppendColumn(custColumn);
        }
        protected override bool ProcessViewModelClicked(IViewModel viewModel, int x, int y, int cellWidth, Gdk.ModifierType state)
        {
            if (viewModel is EventTypeTimelineVM && state.HasFlag(Gdk.ModifierType.None))
            {
                var vm = (EventTypeTimelineVM)viewModel;
                if (vm.Model is SubstitutionEventType)
                {
                    return(false);
                }

                if (PlaysCellRenderer.ClickedPlayButton(x, y, cellWidth))
                {
                    vm.LoadEventType();
                    pathClicked = null;
                    return(true);
                }
            }
            return(false);
        }
示例#10
0
        protected override void CreateViews()
        {
            CellRenderer descCell = new PlaysCellRenderer();

            AppendColumn(null, descCell, RenderPlaylist);
        }