/// <summary>
        /// Initialize a new instance of the KryptonPaletteButtonSpecBase class.
        /// </summary>
        /// <param name="redirector">Palette redirector for sourcing inherited values.</param>
        internal KryptonPaletteButtonSpecBase(PaletteRedirect redirector)
        {
            Debug.Assert(redirector != null);

            // Remember reference to redirector
            _redirector = redirector;

            // Default the generic overridable values
            _style = PaletteButtonStyle.Inherit;
            _orientation = PaletteButtonOrientation.Inherit;
            _edge = PaletteRelativeEdgeAlign.Inherit;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initialize a new instance of the ButtonSpec class.
 /// </summary>
 public ButtonSpec()
 {
     _image = null;
     _toolTipImage = null;
     _colorMap = Color.Empty;
     _imageTransparentColor = Color.Empty;
     _toolTipImageTransparentColor = Color.Empty;
     _text = string.Empty;
     _extraText = string.Empty;
     _uniqueName = CommonHelper.UniqueString;
     _toolTipTitle = string.Empty;
     _toolTipBody = string.Empty;
     _allowInheritImage = true;
     _allowInheritText = true;
     _allowInheritExtraText = true;
     _allowInheritToolTipTitle = true;
     _toolTipStyle = LabelStyle.ToolTip;
     _style = PaletteButtonStyle.Inherit;
     _orientation = PaletteButtonOrientation.Inherit;
     _type = PaletteButtonSpecStyle.Generic;
     _edge = PaletteRelativeEdgeAlign.Inherit;
     _imageStates = new CheckButtonImageStates();
     _imageStates.NeedPaint = new NeedPaintHandler(OnImageStateChanged);
     _contextMenuStrip = null;
     _kryptonContextMenu = null;
     _buttonSpecView = null;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Resets the Orientation property to its default value.
 /// </summary>
 public void ResetOrientation()
 {
     Orientation = PaletteButtonOrientation.Inherit;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Convert from palette specific button orientation to resolved button orientation.
 /// </summary>
 /// <param name="paletteButtonOrientation">Palette specific button orientation.</param>
 /// <returns>Resolved button orientation.</returns>
 protected ButtonOrientation ConvertToButtonOrientation(PaletteButtonOrientation paletteButtonOrientation)
 {
     switch (paletteButtonOrientation)
     {
         case PaletteButtonOrientation.Auto:
             return ButtonOrientation.Auto;
         case PaletteButtonOrientation.FixedBottom:
             return ButtonOrientation.FixedBottom;
         case PaletteButtonOrientation.FixedLeft:
             return ButtonOrientation.FixedLeft;
         case PaletteButtonOrientation.FixedRight:
             return ButtonOrientation.FixedRight;
         case PaletteButtonOrientation.FixedTop:
             return ButtonOrientation.FixedTop;
         default:
             // Should never happen!
             Debug.Assert(false);
             return ButtonOrientation.Auto;
     }
 }