Exemplo n.º 1
0
        public void TestResultsWindowIsBelowMainWindow()
        {
            Gtk.Window main    = new Gtk.Window("Test Main Window");
            Gtk.Window results = new Gtk.Window("Test Results Window");

            main.Resize(200, 100);
            results.Resize(200, 100);

            Gdk.Rectangle resultsOffset = new Gdk.Rectangle(0, 10, 0, 0);

            var positioner = new PositionWindow(main, results);

            positioner.UpdatePosition(10, Pane.First, resultsOffset);

            // Drain the event loop
            while (Gtk.Global.EventsPending)
            {
                Gtk.Main.Iteration();
            }

            int main_x, main_y;
            int results_x, results_y;

            main.GetPosition(out main_x, out main_y);
            results.GetPosition(out results_x, out results_y);
            Assert.Greater(results_y, main_y + 100);
        }
Exemplo n.º 2
0
        public void Summon()
        {
            int width, height;

            GetSize(out width, out height);

            pw.UpdatePosition(0, Pane.First, new Gdk.Rectangle(((int)(bezel_drawing_area.WindowWidth - bezel_glass_results.WidthRequest) / 2), -10, 0, 0));
            Show();
            bezel_glass_window.Show();
            Interface.Windowing.PresentWindow(this);
        }