コード例 #1
0
        public VirtualListView()
        {
            this.Build();
            LineLayout = GetLayout();
            int width, height;

            LineLayout.SetMarkup("XYZ");
            LineLayout.GetPixelSize(out width, out height);
            ConstantHeight = height;
            CurrentRow     = 0;
            SelectedRow    = 0;
            SelectionMode  = false;
            DocumentEnd    = true;

            mColumnControl = new ColumnControl();
            vbox1.Add(mColumnControl);

            Gtk.Box.BoxChild boxChild = ((Gtk.Box.BoxChild)(this.vbox1[mColumnControl]));
            boxChild.Position = 0;
            boxChild.Expand   = false;
            boxChild.Fill     = false;
            mColumnControl.Show();

            mColumnControl.ColumnChanged += (o, e) =>
            {
                drawingarea.QueueDraw();
            };
        }
コード例 #2
0
        public VirtualListView()
        {
            this.Build();
            LineLayout = GetLayout();
            int width, height;

            LineLayout.SetMarkup("XYZ");
            LineLayout.GetPixelSize(out width, out height);
            ConstantHeight = height;
            CurrentRow     = 0;
            SelectedRow    = 0;
            SelectionMode  = false;
            DocumentEnd    = true;

            mColumnControl = new ColumnControl(this);
            vbox1.Add(mColumnControl);

            Gtk.Box.BoxChild boxChild = ((Gtk.Box.BoxChild)(this.vbox1[mColumnControl]));
            boxChild.Position = 0;
            boxChild.Expand   = false;
            boxChild.Fill     = false;
            mColumnControl.Show();

            mColumnControl.ColumnChanged += (o, e) =>
            {
                drawingarea.QueueDraw();
            };
            var bc = (Box.BoxChild)vbox1[findwidget];

            bc.Position  = 0;
            Find.Visible = false;

            Find.Escaped += (o, e) =>
            {
                FindBoxInvisible();
            };

            Find.CurrentChanged += (o, e) =>
            {
                SelectionMode = false; // as a workaround to avoid selection with CTRL+F3
            };

            drawingarea.ButtonPressEvent += drawingarea_ButtonPressEvent;
        }
コード例 #3
0
        public VirtualListView()
        {
            this.Build();
            DefaultLayout        = NewLayout(Pango.FontDescription.FromString("Tahoma 10")); // TODO use the same font as the other GUI elements, for example like GTK#'s list control
            CurrentRow           = 0;
            CurrentSelectionMode = SelectionMode.None;
            DocumentEnd          = true;

            mColumnControl = new ColumnControl(this);
            vbox1.Add(mColumnControl);

            Gtk.Box.BoxChild boxChild = ((Gtk.Box.BoxChild)(this.vbox1[mColumnControl]));
            boxChild.Position = 0;
            boxChild.Expand   = false;
            boxChild.Fill     = false;
            mColumnControl.Show();

            mColumnControl.ColumnChanged += (o, e) =>
            {
                drawingarea.QueueDraw();
            };
            var bc = (Box.BoxChild)vbox1[findwidget];

            bc.Position = 0;

            Find.CurrentChanged += (o, e) =>
            {
                CurrentSelectionMode = SelectionMode.None; // as a workaround to avoid selection with CTRL+F3
            };
            FindPossibility = true;

            drawingarea.Events |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.ButtonMotionMask;

            drawingarea.ButtonPressEvent    += drawingarea_ButtonPressEvent;
            drawingarea.ButtonReleaseEvent  += drawingarea_ButtonReleaseEvent;
            drawingarea.MotionNotifyEvent   += drawingarea_MotionNotifyEvent;
            mColumnControl.ButtonPressEvent += not_drawingarea_ButtonPressEvent;
        }
コード例 #4
0
        public VirtualListView()
        {
            this.Build();
             DefaultLayout = NewLayout(Pango.FontDescription.FromString("Tahoma 10")); // TODO use the same font as the other GUI elements, for example like GTK#'s list control
             CurrentRow = 0;
             CurrentSelectionMode = SelectionMode.None;
             DocumentEnd = true;

             mColumnControl = new ColumnControl(this);
             vbox1.Add(mColumnControl);

             Gtk.Box.BoxChild boxChild = ((Gtk.Box.BoxChild)(this.vbox1[mColumnControl]));
             boxChild.Position = 0;
             boxChild.Expand = false;
             boxChild.Fill = false;
             mColumnControl.Show();

             mColumnControl.ColumnChanged += (o, e) =>
             {
            drawingarea.QueueDraw();
             };
             var bc = (Box.BoxChild)vbox1[findwidget];
             bc.Position = 0;

             Find.CurrentChanged += (o, e) =>
             {
            CurrentSelectionMode = SelectionMode.None; // as a workaround to avoid selection with CTRL+F3
            };
             FindPossibility = true;

             drawingarea.Events |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.ButtonMotionMask;

             drawingarea.ButtonPressEvent += drawingarea_ButtonPressEvent;
             drawingarea.ButtonReleaseEvent += drawingarea_ButtonReleaseEvent;
             drawingarea.MotionNotifyEvent += drawingarea_MotionNotifyEvent;
             mColumnControl.ButtonPressEvent += not_drawingarea_ButtonPressEvent;
        }