コード例 #1
0
        public DockToolbarPanel(DockToolbarFrame parentFrame, Placement placement)
        {
            //		ResizeMode = ResizeMode.Immediate;
            Placement = placement;
            switch (placement)
            {
            case Placement.Top:
                this.orientation = Orientation.Horizontal;
                break;

            case Placement.Bottom:
                this.orientation = Orientation.Horizontal;
                break;

            case Placement.Left:
                this.orientation = Orientation.Vertical;
                break;

            case Placement.Right:
                this.orientation = Orientation.Vertical;
                break;
            }

            this.parentFrame = parentFrame;
        }
コード例 #2
0
        public ArrowWindow(DockToolbarFrame frame, Direction dir) : base(Gtk.WindowType.Popup)
        {
            SkipTaskbarHint = true;
            Decorated       = false;
            TransientFor    = frame.TopWindow;

            direction = dir;
            arrow     = CreateArrow();
            if (direction == Direction.Up || direction == Direction.Down)
            {
                width  = PointerWidth;
                height = LineLength + PointerLength + 1;
            }
            else
            {
                height = PointerWidth;
                width  = LineLength + PointerLength + 1;
            }

            // Create the mask for the arrow

            Gdk.Color black, white;
            black       = new Gdk.Color(0, 0, 0);
            black.Pixel = 1;
            white       = new Gdk.Color(255, 255, 255);
            white.Pixel = 0;

            Gdk.Pixmap pm = new Pixmap(this.GdkWindow, width, height, 1);
            Gdk.GC     gc = new Gdk.GC(pm);
            gc.Background = white;
            gc.Foreground = white;
            pm.DrawRectangle(gc, true, 0, 0, width, height);

            gc.Foreground = black;
            pm.DrawPolygon(gc, false, arrow);
            pm.DrawPolygon(gc, true, arrow);

            this.ShapeCombineMask(pm, 0, 0);

            Realize();

            redgc            = new Gdk.GC(GdkWindow);
            redgc.RgbFgColor = new Gdk.Color(255, 0, 0);

            Resize(width, height);
        }
コード例 #3
0
ファイル: ArrowWindow.cs プロジェクト: msiyer/Pinta
		public ArrowWindow (DockToolbarFrame frame, Direction dir): base (Gtk.WindowType.Popup)
		{
			SkipTaskbarHint = true;
			Decorated = false;
			TransientFor = frame.TopWindow;

			direction = dir;
			arrow = CreateArrow ();
			if (direction == Direction.Up || direction == Direction.Down) {
				 width = PointerWidth;
				 height = LineLength + PointerLength + 1;
			} else {
				 height = PointerWidth;
				 width = LineLength + PointerLength + 1;
			}
			
			// Create the mask for the arrow
			
			Gdk.Color black, white;
			black = new Gdk.Color (0, 0, 0);
			black.Pixel = 1;
			white = new Gdk.Color (255, 255, 255);
			white.Pixel = 0;
			
			Gdk.Pixmap pm = new Pixmap (this.GdkWindow, width, height, 1);
			Gdk.GC gc = new Gdk.GC (pm);
			gc.Background = white;
			gc.Foreground = white;
			pm.DrawRectangle (gc, true, 0, 0, width, height);
			
			gc.Foreground = black;
			pm.DrawPolygon (gc, false, arrow);
			pm.DrawPolygon (gc, true, arrow);
			
			this.ShapeCombineMask (pm, 0, 0);
			
			Realize ();
			
			redgc = new Gdk.GC (GdkWindow);
	   		redgc.RgbFgColor = new Gdk.Color (255, 0, 0);
			
			Resize (width, height);
		}
コード例 #4
0
ファイル: DockToolbarPanel.cs プロジェクト: msiyer/Pinta
		public DockToolbarPanel (DockToolbarFrame parentFrame, Placement placement)
		{
	//		ResizeMode = ResizeMode.Immediate;
			Placement = placement;
			switch (placement) {
				case Placement.Top:
					this.orientation = Orientation.Horizontal;
					break;
				case Placement.Bottom:
					this.orientation = Orientation.Horizontal;
					break;
				case Placement.Left:
					this.orientation = Orientation.Vertical;
					break;
				case Placement.Right:
					this.orientation = Orientation.Vertical;
					break;
			}
			
			this.parentFrame = parentFrame;
		}
コード例 #5
0
ファイル: FloatingDock.cs プロジェクト: ywscr/Pinta
 public FloatingDock(DockToolbarFrame frame) : base(Gtk.WindowType.Toplevel)
 {
     SkipTaskbarHint = true;
     Decorated       = false;
     TransientFor    = frame.TopWindow;
 }
コード例 #6
0
ファイル: FloatingPosition.cs プロジェクト: msiyer/Pinta
		internal override void RestorePosition (DockToolbarFrame frame, DockToolbar bar)
		{
			frame.FloatBar (bar, orientation, x, y);
		}
コード例 #7
0
ファイル: DockToolbarPosition.cs プロジェクト: msiyer/Pinta
		internal virtual void RestorePosition (DockToolbarFrame frame, DockToolbar bar) {}
コード例 #8
0
ファイル: FloatingPosition.cs プロジェクト: ywscr/Pinta
 internal override void RestorePosition(DockToolbarFrame frame, DockToolbar bar)
 {
     frame.FloatBar(bar, orientation, x, y);
 }
コード例 #9
0
ファイル: DockedPosition.cs プロジェクト: msiyer/Pinta
		internal override void RestorePosition (DockToolbarFrame frame, DockToolbar bar)
		{
			frame.DockToolbar (bar, placement, dockOffset, dockRow);
		}
コード例 #10
0
ファイル: DockToolbar.cs プロジェクト: msiyer/Pinta
		internal void SetParentFrame (DockToolbarFrame frame)
		{
			parentFrame = frame;
			grip.Show ();
		}
コード例 #11
0
 internal void SetParentFrame(DockToolbarFrame frame)
 {
     parentFrame = frame;
     grip.Show();
 }
コード例 #12
0
 internal virtual void RestorePosition(DockToolbarFrame frame, DockToolbar bar)
 {
 }
コード例 #13
0
ファイル: FloatingDock.cs プロジェクト: msiyer/Pinta
		public FloatingDock (DockToolbarFrame frame): base (Gtk.WindowType.Toplevel)
		{
			SkipTaskbarHint = true;
			Decorated = false;
			TransientFor = frame.TopWindow;
		}
コード例 #14
0
ファイル: DockedPosition.cs プロジェクト: ywscr/Pinta
 internal override void RestorePosition(DockToolbarFrame frame, DockToolbar bar)
 {
     frame.DockToolbar(bar, placement, dockOffset, dockRow);
 }