Example #1
0
        /// <summary>
        /// Initialize a new instance of the PaletteForm class.
        /// </summary>
        /// <param name="inheritForm">Source for inheriting palette defaulted values.</param>
        /// <param name="inheritHeader">Source for inheriting header defaulted values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteForm(PaletteFormRedirect inheritForm,
                           PaletteTripleMetricRedirect inheritHeader,
                           NeedPaintHandler needPaint)
            : base(inheritForm, needPaint)
        {
            Debug.Assert(inheritForm != null);
            Debug.Assert(inheritHeader != null);

            // Remember the inheritance
            _inherit = inheritForm;

            // Create the palette storage
            _paletteHeader = new PaletteTripleMetric(inheritHeader, needPaint);
        }
Example #2
0
        /// <summary>
        /// Initialize a new instance of the VisualPopupTooltip class.
        /// </summary>
        /// <param name="redirector">Redirector for recovering palette values.</param>
        /// <param name="contentValues">Source of content values.</param>
        /// <param name="renderer">Drawing renderer.</param>
        /// <param name="backStyle">Style for the tooltip background.</param>
        /// <param name="borderStyle">Style for the tooltip border.</param>
        /// <param name="contentStyle">Style for the tooltip content.</param>
        public VisualPopupToolTip(PaletteRedirect redirector,
                                  IContentValues contentValues,
                                  IRenderer renderer,
                                  PaletteBackStyle backStyle,
                                  PaletteBorderStyle borderStyle,
                                  PaletteContentStyle contentStyle)
            : base(renderer, true)
        {
            Debug.Assert(contentValues != null);

            // Remember references needed later
            _contentValues = contentValues;

            // Create the triple redirector needed by view elements
            _palette = new PaletteTripleMetricRedirect(redirector, backStyle, borderStyle, contentStyle, NeedPaintDelegate);

            // Our view contains background and border with content inside
            _drawDocker  = new ViewDrawDocker(_palette.Back, _palette.Border, null);
            _drawContent = new ViewDrawContent(_palette.Content, _contentValues, VisualOrientation.Top);
            _drawDocker.Add(_drawContent, ViewDockStyle.Fill);

            // Create the view manager instance
            ViewManager = new ViewManager(this, _drawDocker);
        }
Example #3
0
 /// <summary>
 /// Sets the inheritence parent.
 /// </summary>
 public void SetInherit(PaletteTripleMetricRedirect inherit)
 {
     base.SetInherit(inherit);
     _inherit = inherit;
 }