ComponentFactory.Krypton.Ribbon.ViewLayoutRibbonGalleryItems.ViewLayoutRibbonGalleryItems C# (CSharp) Method

ViewLayoutRibbonGalleryItems() public method

Initialize a new instance of the ViewLayoutRibbonGalleryItems class.
public ViewLayoutRibbonGalleryItems ( IPalette palette, ComponentFactory.Krypton.Ribbon.KryptonGallery gallery, NeedPaintHandler needPaint, ViewDrawRibbonGalleryButton buttonUp, ViewDrawRibbonGalleryButton buttonDown, ViewDrawRibbonGalleryButton buttonContext ) : System
palette IPalette Reference to palette for display values.
gallery ComponentFactory.Krypton.Ribbon.KryptonGallery Reference to owning gallery.
needPaint NeedPaintHandler Delegate for requesting paints.
buttonUp ViewDrawRibbonGalleryButton Reference to the up button.
buttonDown ViewDrawRibbonGalleryButton Reference to the down button.
buttonContext ViewDrawRibbonGalleryButton Reference to the context button.
return System
        public ViewLayoutRibbonGalleryItems(IPalette palette,
                                            KryptonGallery gallery,
                                            NeedPaintHandler needPaint,
                                            ViewDrawRibbonGalleryButton buttonUp,
                                            ViewDrawRibbonGalleryButton buttonDown,
                                            ViewDrawRibbonGalleryButton buttonContext)
        {
            Debug.Assert(palette != null);
            Debug.Assert(gallery != null);
            Debug.Assert(needPaint != null);
            Debug.Assert(buttonUp != null);
            Debug.Assert(buttonDown != null);
            Debug.Assert(buttonContext != null);

            _gallery = gallery;
            _needPaint = needPaint;
            _buttonUp = buttonUp;
            _buttonDown = buttonDown;
            _buttonContext = buttonContext;
            _bringIntoView = -1;
            _scrollIntoView = true;

            // Need to know when any button is clicked
            _buttonUp.Click += new MouseEventHandler(OnButtonUp);
            _buttonDown.Click += new MouseEventHandler(OnButtonDown);
            _buttonContext.Click += new MouseEventHandler(OnButtonContext);

            // Create triple that can be used by the draw button
            _style = ButtonStyle.LowProfile;
            _triple = new PaletteTripleToPalette(palette,
                                                 PaletteBackStyle.ButtonLowProfile,
                                                 PaletteBorderStyle.ButtonLowProfile,
                                                 PaletteContentStyle.ButtonLowProfile);

            // Setup timer to use for scrolling lines
            _scrollTimer = new Timer();
            _scrollTimer.Interval = 40;
            _scrollTimer.Tick += new EventHandler(OnScrollTick);
        }