Beispiel #1
0
        // make it big enough for the border
        private void size_requested(object o, SizeRequestedArgs args)
        {
            int width = args.Requisition.Width;
            int height = args.Requisition.Height;

            box.SetSizeRequest (width + 2, height + 2);
        }
Beispiel #2
0
 void HandleSizeRequested(object o, SizeRequestedArgs args)
 {
     if (!main_expander.Expanded)
     {
         container.Position = container.Allocation.Height - main_expander.LabelWidget.HeightRequest;
     }
 }
Beispiel #3
0
		static void Size_Requested (object obj, SizeRequestedArgs args)
		{
			Requisition req = args.Requisition;
			Console.WriteLine ("Requesting 100 x 100");
			req.Width = req.Height = 100;
			args.Requisition = req;
		}
Beispiel #4
0
 private void OnTextViewSizeRequested (object o, SizeRequestedArgs args)
 {
     Pango.FontMetrics metrics = PangoContext.GetMetrics (entry.Style.FontDescription, PangoContext.Language);
     int line_height = ((int)(metrics.Ascent + metrics.Descent) + 512) >> 10; // PANGO_PIXELS(d)
     metrics.Dispose ();
     HeightRequest = (line_height + 2) * 2;
 }
Beispiel #5
0
        static void Size_Requested(object obj, SizeRequestedArgs args)
        {
            Requisition req = args.Requisition;

            Console.WriteLine("Requesting 100 x 100");
            req.Width        = req.Height = 100;
            args.Requisition = req;
        }
Beispiel #6
0
        // This is an awful hack to make the menu invisible without actually
        // "hiding" it according to Gtk because when you hide the main menu,
        // it disables all the keybindings.
        void main_menu_SizeRequested(object o, SizeRequestedArgs args)
        {
            var r = args.Requisition;

            r.Width          = 0;
            r.Height         = 0;
            args.Requisition = r;
        }
Beispiel #7
0
        private void OnTextViewSizeRequested(object o, SizeRequestedArgs args)
        {
            Pango.FontMetrics metrics = PangoContext.GetMetrics(entry.Style.FontDescription, PangoContext.Language);
            int line_height           = ((int)(metrics.Ascent + metrics.Descent) + 512) >> 10; // PANGO_PIXELS(d)

            metrics.Dispose();
            HeightRequest = (line_height + 2) * 2;
        }
Beispiel #8
0
 private void HandleBrowserWindowSizeRequested(object sender, SizeRequestedArgs arguments)
 {
     int width = arguments.Requisition.Width + 15;
     if(width < Screen.Width / 2)
     {
         BrowserWindow.SetSizeRequest(width, BrowserWindow.HeightRequest);
     }
 }
Beispiel #9
0
 private void OnSizeRequested(object sender, SizeRequestedArgs args)
 {
     if (this.child == null)
     {
         return;
     }
     args.Requisition = this.child.SizeRequest();
 }
Beispiel #10
0
        void HandleSizeRequested(object o, SizeRequestedArgs args)
        {
            Requisition req = new Requisition();

            req.Width        = MapWidget.xsize;
            req.Height       = MapWidget.ysize;
            args.Requisition = req;
        }
        void Alignment1SizeRequested(object o, SizeRequestedArgs args)
        {
            var req       = mainBook.SizeRequest();
            var filterReq = filterEntry.SizeRequest();

            req.Width       += filterReq.Width + 10;
            args.Requisition = req;
            args.RetVal      = true;
        }
Beispiel #12
0
    protected void winResize(object o, SizeRequestedArgs a)
    {
        int x, y;

        this.GetSize(out x, out y);
        settings.width  = x;
        settings.height = y;
        return;
    }
Beispiel #13
0
        public void FireSizeRequested(Requisition new_req)
        {
            if (SizeRequested != null)
            {
                SizeRequestedArgs args = new SizeRequestedArgs();
                args.Args = new object[] { new_req };

                SizeRequested(this, args);
            }
        }
Beispiel #14
0
        public void FireSizeRequested(Requisition new_req)
        {
            if (SizeRequested != null)
            {
                SizeRequestedArgs a = new SizeRequestedArgs();
                a.Requisition = new_req;

                SizeRequested(this, a);
            }
        }
 void BackgroundImageViewSizeRequested(object o, SizeRequestedArgs args)
 {
     if (args.Requisition.Width <= backgroundImage.Width)
     {
         // Ensure there is a gap between the image and the left hand side of the wizard
         // if the labels have expanded to fit their text.
         args.Requisition = new Requisition {
             Height = args.Requisition.Height,
             Width  = args.Requisition.Width + 30
         };
     }
 }
Beispiel #16
0
        // Handlers :: OnWindowSizeRequested
        public void OnWindowSizeRequested(object o, SizeRequestedArgs args)
        {
            if (geo_no_resize_height.MaxHeight == args.Requisition.Height)
            {
                return;
            }

            geo_no_resize_height.MaxHeight = args.Requisition.Height;

            window.SetGeometryHints
                (window, geo_no_resize_height, Gdk.WindowHints.MaxSize);
        }
Beispiel #17
0
        void ScrolledWindowSizeRequested(object obj, SizeRequestedArgs args)
        {
            Gtk.Requisition req = list.SizeRequest();
            if (req.Width <= 0)
            {
                return;
            }

            Gtk.ScrolledWindow scwin = ((Gtk.ScrolledWindow)obj);
            scwin.SizeRequested -= ScrolledWindowSizeRequested;
            scwin.SetSizeRequest(req.Width, req.Width * 2 / 3);
            ActionArea.BorderWidth = 0;             // has to happen post-realize
        }
Beispiel #18
0
        private void OnAxisSizeRequested(object o, SizeRequestedArgs args)
        {
            IAxis axis = (IAxis)o;

            if (!axis.Visible)
            {
                return;
            }

            axis_requisitions[axis] = args.Requisition;

            CalculateLayout();
            QueueDraw();
        }
Beispiel #19
0
        void HandleSizeRequested(object o, SizeRequestedArgs args)
        {
            Requisition req = args.Requisition;

            if (req.Width < 400)
            {
                req.Width = 400;
            }
            if (req.Height < 64)
            {
                req.Height = 64;
            }
            args.Requisition = req;
        }
Beispiel #20
0
        void OnSizeRequested(object o, SizeRequestedArgs args)
        {
            if (graph != null)
            {
                int width  = args.Requisition.Width;
                int height = args.Requisition.Height;

                graph.GetSizeRequest(out width, out height);
                if (width == -1 || height == -1)
                {
                    width = height = 80;
                }
                SetSizeRequest(width + pad * 2, height + pad * 2);
            }
        }
        void OnSizeReq(object o, SizeRequestedArgs a)
        {
            if (!AllowResize)
            {
                a.RetVal = false;
                QueueDraw();
                return;
            }

            currentSizeRequest = a.Requisition;

            Rectangle alloc = child.Allocation;
            int       nw    = alloc.Width;
            int       nh    = alloc.Height;

            if (a.Requisition.Width > nw)
            {
                nw = a.Requisition.Width;
            }
            if (a.Requisition.Height > nh)
            {
                nh = a.Requisition.Height;
            }

            if (nw != alloc.Width || nh != alloc.Height)
            {
                int ow = child.WidthRequest;
                int oh = child.HeightRequest;
                child.SetSizeRequest(nw, nh);
                if (ow > nw)
                {
                    child.WidthRequest = ow;
                }
                if (oh > nh)
                {
                    child.HeightRequest = oh;
                }
                QueueDraw();
            }
        }
		void Alignment1SizeRequested (object o, SizeRequestedArgs args)
		{
			var req = mainBook.SizeRequest ();
			var filterReq = filterEntry.SizeRequest ();
			req.Width += filterReq.Width + 10;
			args.Requisition = req;
			args.RetVal = true;
		}
 void HandleSizeRequested(object o, SizeRequestedArgs args)
 {
     if (!main_expander.Expanded)
         container.Position = container.Allocation.Height - main_expander.LabelWidget.HeightRequest;
 }
Beispiel #24
0
 private void vpanedMain_SizeRequested(object o, SizeRequestedArgs args)
 {
     mainWidgetHeight = (((Gtk.Paned)(o)).Child2).Allocation.Bottom;
 }
Beispiel #25
0
 private void OnItemListPanedResized(object o, SizeRequestedArgs args)
 {
     Gdk.Rectangle rect = ((Paned)o).Allocation;
     swItemsShelf.SetSizeRequest (rect.Width, rect.Height);
 }
		void OnSizeReq (object o, SizeRequestedArgs a)
		{
			if (!AllowResize) {
				a.RetVal = false;
				QueueDraw ();
				return;
			}

			currentSizeRequest = a.Requisition;
			
			Rectangle alloc = child.Allocation;
			int nw = alloc.Width;
			int nh = alloc.Height;
			
			if (a.Requisition.Width > nw) nw = a.Requisition.Width;
			if (a.Requisition.Height > nh) nh = a.Requisition.Height;
			
			if (nw != alloc.Width || nh != alloc.Height) {
				int ow = child.WidthRequest;
				int oh = child.HeightRequest;
				child.SetSizeRequest (nw, nh);
				if (ow > nw)
					child.WidthRequest = ow;
				if (oh > nh)
					child.HeightRequest = oh;
				QueueDraw ();
			}
		}
Beispiel #27
0
 private void OnAxesSizeRequested(object o, SizeRequestedArgs args)
 {
     RecalculateLayout();
 }
Beispiel #28
0
        void ScrolledWindowSizeRequested(object obj, SizeRequestedArgs args)
        {
            Gtk.Requisition req = list.SizeRequest ();
            if (req.Width <= 0)
                return;

            Gtk.ScrolledWindow scwin = ((Gtk.ScrolledWindow)obj);
            scwin.SizeRequested -= ScrolledWindowSizeRequested;
            scwin.SetSizeRequest (req.Width, req.Width * 2 / 3);
            ActionArea.BorderWidth = 0; // has to happen post-realize
        }
Beispiel #29
0
 // This is an awful hack to make the menu invisible without actually
 // "hiding" it according to Gtk because when you hide the main menu,
 // it disables all the keybindings.
 void main_menu_SizeRequested(object o, SizeRequestedArgs args)
 {
     var r = args.Requisition;
     r.Width = 0;
     r.Height = 0;
     args.Requisition = r;
 }
Beispiel #30
0
 private void OnSizeRequested(object sender, SizeRequestedArgs args)
 {
     if ((_child != null)) {
         args.Requisition = _child.SizeRequest ();
     }
 }
			static void SuppressSize (object o, SizeRequestedArgs args)
			{
				args.Requisition = Requisition.Zero;
				args.RetVal = true;
			}
Beispiel #32
0
 //resize the progress bar
 private void title_resized(object o, SizeRequestedArgs args)
 {
     progress.WidthRequest = args.Requisition.Width;
     progress.HeightRequest = 5;
 }
Beispiel #33
0
 void HandleSizeRequested(object o, SizeRequestedArgs args)
 {
     Requisition req = args.Requisition;
     if (req.Width< 400) req.Width = 400;
     if (req.Height< 64) req.Height = 64;
     args.Requisition = req;
 }
Beispiel #34
0
 void HandleSizeRequested(object o, SizeRequestedArgs args)
 {
     Requisition req = new Requisition ();
     req.Width = MapWidget.xsize;
     req.Height = MapWidget.ysize;
     args.Requisition = req;
 }