public PlaysPositionViewer()
 {
     this.Build();
     field.Tagger.FieldPosition            = FieldPositionType.Field;
     hfield.Tagger.FieldPosition           = FieldPositionType.HalfField;
     goal.Tagger.FieldPosition             = FieldPositionType.Goal;
     field.Tagger.ShowMenuEvent           += HandleShowMenuEvent;
     hfield.Tagger.ShowMenuEvent          += HandleShowMenuEvent;
     goal.Tagger.ShowMenuEvent            += HandleShowMenuEvent;
     Config.EventsBroker.EventLoadedEvent += HandlePlayLoaded;
     menu = new PlaysMenu();
 }
        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);
        }
Exemple #3
0
        public Timeline()
        {
            this.Build();
            this.timerule = new Timerule(new WidgetWrapper(timerulearea));
            this.timeline = new PlaysTimeline(new WidgetWrapper(timelinearea));
            this.labels   = new TimelineLabels(new WidgetWrapper(labelsarea));

            focusbuttonimage.Pixbuf = Helpers.Misc.LoadIcon("longomatch-dash-center-view", Gtk.IconSize.Menu, 0);

            focusbutton.CanFocus        = false;
            focusbutton.Clicked        += HandleFocusClicked;
            focusscale.CanFocus         = false;
            focusscale.Adjustment.Lower = 0;
            focusscale.Adjustment.Upper = 12;
            focusscale.ValueChanged    += HandleValueChanged;
            timerulearea.HeightRequest  = LongoMatch.Drawing.Constants.TIMERULE_HEIGHT;
            leftbox.WidthRequest        = StyleConf.TimelineLabelsWidth;
            labelsarea.SizeRequested   += (o, args) => {
                leftbox.WidthRequest = args.Requisition.Width;
            };
            hbox1.HeightRequest = LongoMatch.Drawing.Constants.TIMERULE_HEIGHT;
            scrolledwindow1.Vadjustment.ValueChanged += HandleScrollEvent;
            scrolledwindow1.Hadjustment.ValueChanged += HandleScrollEvent;
            timeoutID = 0;

            zoominimage.Pixbuf  = LongoMatch.Gui.Helpers.Misc.LoadIcon("longomatch-zoom-in", 14);
            zoomoutimage.Pixbuf = LongoMatch.Gui.Helpers.Misc.LoadIcon("longomatch-zoom-out", 14);

            // Synchronize the zoom widget height with scrolledwindow's scrollbar's.
            scrolledwindow1.HScrollbar.SizeAllocated += (object o, SizeAllocatedArgs args) => {
                int spacing = (int)scrolledwindow1.StyleGetProperty("scrollbar-spacing");
                zoomhbox.HeightRequest = args.Allocation.Height + spacing;
            };

            menu        = new PlaysMenu();
            periodsmenu = new PeriodsMenu();
        }