Inheritance: Gtk.Alignment
Beispiel #1
0
        public MainSidebar()
        {
            FadingAlignment alignment;

            // TOP ITEMS
            topItemsStore = new ListStore(typeof (ISidebarItem));

            topItemsTree = MakeTreeView();
            topItemsTree.Model = topItemsStore;
            this.PackStart(topItemsTree, false, false, 0);
            this.PackStart(new HSeparator(), false, false, 0);

            // SEARCH HEADER

            alignment = new FadingAlignment();
            alignment.Add(new Label("Searches"));
            this.PackStart(alignment, false, false, 0);
            alignment.ShowAll();

            // SEARCH ITEMS

            searchItemsModel = new ListStore(typeof(ISidebarItem));

            ScrolledWindow scrolledWindow = new ScrolledWindow();
            scrolledWindow.VscrollbarPolicy = PolicyType.Never;

            searchItemsTree = MakeTreeView();
            searchItemsTree.ButtonPressEvent += searchItemsTree_ButtonPressEvent;
            scrolledWindow.Add(searchItemsTree);
            searchItemsTree.Model = searchItemsModel;
            this.PackStart(scrolledWindow, true, true, 0);

            this.PackStart(new HSeparator(), false, false, 0);

            // SPACER
            alignment = new FadingAlignment();
            alignment.HeightRequest = 5;
            this.PackStart(alignment, false, false, 0);
            alignment.ShowAll();

            // BOTTOM ITEMS

            bottomItemsStore = new ListStore(typeof(ISidebarItem));

            bottomItemsTree = MakeTreeView();
            bottomItemsTree.Model = bottomItemsStore;
            this.PackStart(bottomItemsTree, false, false, 0);
        }