Exemplo n.º 1
0
        void InitializeWindow(object _sender, EventArgs ev)
        {
            Gtk.Adjustment h = new Gtk.Adjustment(0, 0, 0, 0, 0, 0);
            Gtk.Adjustment v = new Gtk.Adjustment(0, 0, 0, 0, 0, 0);
            v.Changed += delegate(object sender, EventArgs e) {
                DebugHelper.WriteLine("vertical scroll Changed " + v.Value);
            };
            v.ValueChanged += delegate(object sender, EventArgs e) {
                DebugHelper.WriteLine("vertical scroll ValueChanged " + v.Value);
            };

            widget             = new EmbedWidget(handle, h, v);
            widget.Unrealized += delegate {
                Dispose(true);
            };

            widget.Init();
            webview = new webkit.WebView();

            webview.LoadCommitted       += delegate(object o, webkit.LoadCommittedArgs args) {
            };
            webview.LoadProgressChanged += delegate(object o, webkit.LoadProgressChangedArgs args) {
            };

            webview.SetScrollAdjustments(h, v);
            widget.Add(webview);
            widget.ShowAll();
            initialized = true;
        }
Exemplo n.º 2
0
        void InitializeWindow(object _sender, EventArgs ev)
        {
            Gtk.Adjustment h = new Gtk.Adjustment(0, 0, 0, 0, 0, 0);
            Gtk.Adjustment v = new Gtk.Adjustment(0, 0, 0, 0, 0, 0);
            v.Changed += delegate (object sender, EventArgs e) {
                DebugHelper.WriteLine ("vertical scroll Changed " + v.Value);
            };
            v.ValueChanged += delegate (object sender, EventArgs e) {
                DebugHelper.WriteLine ("vertical scroll ValueChanged " + v.Value);
            };

            widget = new EmbedWidget(handle, h, v);
            widget.Unrealized += delegate {
                Dispose (true);
            };

            widget.Init ();
            webview = new webkit.WebView();

            webview.LoadCommitted += delegate (object o, webkit.LoadCommittedArgs args) {
            };
            webview.LoadProgressChanged += delegate (object o, webkit.LoadProgressChangedArgs args) {
            };

            webview.SetScrollAdjustments (h, v);
            widget.Add (webview);
            widget.ShowAll ();
            initialized = true;
        }