Inheritance: MonoReports.ControlView.ControlViewBase
Example #1
0
 public ImageView(MonoReports.Model.Controls.Image image,ImageRenderer renderer, SectionView parentSection)
     : base(image)
 {
     this.ParentSection = parentSection;
     AbsoluteBound = new Rectangle (parentSection.AbsoluteDrawingStartPoint.X + image.Location.X, parentSection.AbsoluteDrawingStartPoint.Y + image.Location.Y, image.Width, image.Height);
     ImageRenderer = renderer;
 }
Example #2
0
 public ImageView(MonoReports.Model.Controls.Image image, SectionView parentSection, PixbufRepository pixbufRepository)
     : base(image)
 {
     this.ParentSection = parentSection;
     AbsoluteBound = new Rectangle (parentSection.AbsoluteDrawingStartPoint.X + image.Location.X, parentSection.AbsoluteDrawingStartPoint.Y + image.Location.Y, image.Width, image.Height);
     ImageRenderer = new ImageRenderer(){ PixbufRepository = pixbufRepository, DesignMode = true};
 }
 public TextBlockView(TextBlock textBlock,TextBlockRenderer textBlockRenderer, SectionView parentSection)
     : base(textBlock)
 {
     this.ParentSection = parentSection;
     TextBlockRenderer = textBlockRenderer;
     invaildateBound();
 }
Example #4
0
 public TextBlockView(TextBlock textBlock,SectionView parentSection)
     : base(textBlock)
 {
     this.ParentSection = parentSection;
     AbsoluteBound = new Rectangle (parentSection.AbsoluteDrawingStartPoint.X + textBlock.Location.X,
                                     parentSection.AbsoluteDrawingStartPoint.Y + textBlock.Location.Y, textBlock.Width, textBlock.Height);
     TextBlockRenderer = new TextBlockRenderer(){ DesignMode = true};
 }
 public SubreportView(MonoReports.Model.Controls.SubReport subreport,SubreportRenderer renderer, SectionView parentSection)
     : base(subreport)
 {
     this.subreport = subreport;
     this.ParentSection = parentSection;
     AbsoluteBound = new Rectangle (parentSection.AbsoluteDrawingStartPoint.X + subreport.Location.X, parentSection.AbsoluteDrawingStartPoint.Y + subreport.Location.Y, subreport.Width, subreport.Height);
     SubreportRenderer = renderer;
 }
Example #6
0
 public override ControlViewBase AddControl(SectionView sectionView, Control control)
 {
     MonoReports.Model.Controls.Image img = control as MonoReports.Model.Controls.Image;
     ImageView imageView = sectionView.AddControl(img) as ImageView;
     sectionView.Section.Controls.Add(img);
     imageView.ParentSection = sectionView;
     designService.SelectedControl = imageView;
     return imageView;
 }
 public override ControlViewBase AddControl(SectionView sectionView, Control control)
 {
     var tb = control as TextBlock;
     TextBlockView textBlockView = sectionView.AddControl(tb) as TextBlockView;
     sectionView.Section.Controls.Add(tb);
     textBlockView.ParentSection = sectionView;
     designService.SelectedControl = textBlockView;
     return textBlockView;
 }
Example #8
0
        public override void CreateNewControl(SectionView sectionView)
        {
            var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);

            MonoReports.Model.Controls.Image img = new MonoReports.Model.Controls.Image(){ Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Width = 50, Height=50};
            ImageView imageView = sectionView.CreateControlView (img) as ImageView;
            sectionView.Section.Controls.Add (img);
            imageView.ParentSection = sectionView;
            designService.SelectedControl = imageView;
        }
Example #9
0
        public override void CreateNewControl(SectionView sectionView)
        {
            var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);

            var tb = new TextBlock { Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Text="text", FontName="Helvetica", FontSize=11, Size = new Size(70,14) };

            TextBlockView textBlockView = sectionView.CreateControlView (tb) as TextBlockView;

            sectionView.Section.Controls.Add (tb);
            textBlockView.ParentSection = sectionView;
            designService.SelectedControl = textBlockView;
        }
Example #10
0
        public override void CreateNewControl(SectionView sectionView)
        {
            var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);

            var subreport = new SubReport {
                Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y),
                Size = new Size(50,20),
                BackgroundColor = new MonoReports.Model.Color(0.5,0.5,0.5)
            };
            SubreportView subreportView = sectionView.CreateControlView (subreport) as SubreportView;
            sectionView.Section.Controls.Add (subreport);
            subreportView.ParentSection = sectionView;
            designService.SelectedControl = subreportView;
        }
 public ControlViewBase CreateControlView(MonoReports.Model.Controls.Control control, SectionView sectionView)
 {
     return controlViewDictionary[control.GetType()](control,sectionView);
 }
Example #12
0
 public LineView(Line line,SectionView parentSection)
     : base(line)
 {
     this.ParentSection = parentSection;
 }
Example #13
0
 public override ControlViewBase AddControl(SectionView sectionView, Control control)
 {
     var l = control as Line;
     var lineView = sectionView.AddControl(l);
     sectionView.Section.Controls.Add(l);
     lineView.ParentSection = sectionView;
     designService.SelectedControl = lineView;
     return lineView;
 }
Example #14
0
 public override ControlViewBase CreateNewControl(SectionView sectionView)
 {
     var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);
     var l = createLine(startPoint.X,startPoint.Y);
     return AddControl(sectionView, l);
 }
Example #15
0
 public virtual ControlViewBase CreateNewControl(SectionView sectionView)
 {
     return null;
 }
Example #16
0
 public virtual ControlViewBase AddControl(SectionView sectionView, Control control)
 {
     return null;
 }
Example #17
0
 public override ControlViewBase CreateNewControl(SectionView sectionView)
 {
     var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);
     MonoReports.Model.Controls.Image img = new MonoReports.Model.Controls.Image(){ Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Width = 2.cm(), Height=1.cm()};
     return AddControl(sectionView,img);
 }
Example #18
0
 public override ControlViewBase CreateNewControl(SectionView sectionView)
 {
     var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);
     var tb = new TextBlock { Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Text=Catalog.GetString("text") };
     return AddControl(sectionView, tb);
 }
Example #19
0
        public override void OnMouseDown()
        {
            currentSection = designService.SelectedControl != null ? designService.SelectedControl.ParentSection : null;
            if (designService.SelectedControl != null) {
                lineDistance = 6 - designService.Zoom;
                line = designService.SelectedControl.ControlModel as Line;
                var location = line.Location;
                var startPoint = currentSection.PointInSectionByAbsolutePoint (designService.StartPressPoint);

                Cairo.PointD startDistance = new Cairo.PointD ( location.X - startPoint.X,  location.Y - startPoint.Y);
                Cairo.PointD endDistance = new Cairo.PointD (line.End.X - startPoint.X,line.End.Y - startPoint.Y);

                if (startDistance.X < lineDistance && startDistance.X > -lineDistance && startDistance.Y < lineDistance && startDistance.Y > -lineDistance) {
                    startPointHit = true;
                } else {
                    if (endDistance.X < lineDistance && endDistance.X > -lineDistance && endDistance.Y < lineDistance && endDistance.Y > -lineDistance)
                        endPointHit = true;
                }
            }
        }
Example #20
0
 private void addSectionView(Section section)
 {
     Cairo.PointD sectionSpan;
     if (sectionViews.Count > 0) {
         var previousSection = sectionViews [sectionViews.Count - 1];
         sectionSpan = new Cairo.PointD (0, previousSection.AbsoluteBound.Y + previousSection.AbsoluteBound.Height);
     } else {
         sectionSpan = new Cairo.PointD (0, 0);
     }
     var sectionView = new SectionView (controlViewFactory, section, sectionSpan);
     sectionViews.Add (sectionView);
     Height = sectionView.AbsoluteBound.Y + sectionView.AbsoluteBound.Height;
 }
Example #21
0
 public virtual void CreateNewControl(SectionView sectionView)
 {
 }
Example #22
0
 public override void OnMouseDown()
 {
     currentSection = designService.SelectedControl as SectionView;
 }
Example #23
0
        public override void CreateNewControl(SectionView sectionView)
        {
            var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);

            var l = createLine(startPoint.X,startPoint.Y);
            var lineView = sectionView.CreateControlView (l);
            sectionView.Section.Controls.Add (l);
            lineView.ParentSection = sectionView;
            designService.SelectedControl = lineView;
        }
Example #24
0
 public LineView(Line line,LineRenderer renderer,SectionView parentSection)
     : base(line)
 {
     this.LineRenderer = renderer;
     this.ParentSection = parentSection;
 }