Inheritance: Gtk.ListStore
Esempio n. 1
0
        public DocumentIconView(Client app) : base()
        {
            this.app = app;

            TooltipColumn = PageListStore.TooltipColumn;
            SelectionMode = SelectionMode.Multiple;
            ColumnSpacing = RowSpacing = Margin;
            Model         = store = new PageListStore();
            Reorderable   = false;
            Spacing       = 0;
            Orientation   = Orientation.Vertical;

            // Properties not bound in Gtk#
            SetProperty("item-padding", new GLib.Value((int)0));

            CanZoomIn = CanZoomOut = true;

            page_renderer = new PageCell(this);
            PackStart(page_renderer, false);
            AddAttribute(page_renderer, "page", PageListStore.PageColumn);

            // TODO enable uri-list as drag source target for drag-out-of-pdfmod-to-extract feature
            EnableModelDragSource(Gdk.ModifierType.None, new TargetEntry [] { move_internal_target, move_external_target, uri_src_target }, Gdk.DragAction.Default | Gdk.DragAction.Move);
            EnableModelDragDest(new TargetEntry [] { move_internal_target, move_external_target, uri_dest_target }, Gdk.DragAction.Default | Gdk.DragAction.Move);

            SizeAllocated    += HandleSizeAllocated;
            PopupMenu        += HandlePopupMenu;
            ButtonPressEvent += HandleButtonPressEvent;
            SelectionChanged += HandleSelectionChanged;
            DragDataReceived += HandleDragDataReceived;
            DragDataGet      += HandleDragDataGet;
            DragBegin        += HandleDragBegin;
            DragLeave        += HandleDragLeave;
        }
Esempio n. 2
0
        public DocumentIconView (Client app) : base ()
        {
            this.app = app;

            TooltipColumn = PageListStore.TooltipColumn;
            SelectionMode = SelectionMode.Multiple;
            ColumnSpacing = RowSpacing = Margin;
            Model = store = new PageListStore ();
            Reorderable = false;
            Spacing = 0;
            Orientation = Orientation.Vertical;

            // Properties not bound in Gtk#
            SetProperty ("item-padding", new GLib.Value ((int)0));

            CanZoomIn = CanZoomOut = true;

            page_renderer = new PageCell (this);
            PackStart (page_renderer, false);
            AddAttribute (page_renderer, "page", PageListStore.PageColumn);

            // TODO enable uri-list as drag source target for drag-out-of-pdfmod-to-extract feature
            EnableModelDragSource (Gdk.ModifierType.None, new TargetEntry [] { move_internal_target, move_external_target, uri_src_target }, Gdk.DragAction.Default | Gdk.DragAction.Move);
            EnableModelDragDest (new TargetEntry [] { move_internal_target, move_external_target, uri_dest_target }, Gdk.DragAction.Default | Gdk.DragAction.Move);

            SizeAllocated += HandleSizeAllocated;
            PopupMenu += HandlePopupMenu;
            ButtonPressEvent += HandleButtonPressEvent;
            SelectionChanged += HandleSelectionChanged;
            DragDataReceived += HandleDragDataReceived;
            DragDataGet += HandleDragDataGet;
            DragBegin += HandleDragBegin;
            DragLeave += HandleDragLeave;
        }