{ ------------------------------------------------------------- }
{ Purpose : Next Standard 6                                     }
{ By      : Bojan Nikolic                                       }
{ For     : BergSoft                                            }
{ ------------------------------------------------------------- }
{ Copyright (C) BergSoft.net 2018. All Rights Reserved.         }
{ ------------------------------------------------------------- }
{$I NxSuite6.inc}

unit NxConsts6;

interface

uses
  { Standard }
  Types, Classes, Graphics,
  { Next Standard 6 }
  NxTypes6;

const
  { Versions }
  vrNextSuite = '6.3.2';
  vrNextSuiteDesc = vrNextSuite + ' (2.2019)';
  vrNextGrid = '6.3.2';
  vrNextDBGrid = '6.3.2';
  vrNextInspector = '6.3.2';
  vrNextLayout = '6.1.0';
  vrNextCollection = '6.3.2';

const
  EmptyChr = #0;
  CompareEqual = 0;
  LnBreak = #13#10;
  Tab = #9;
  NotFound = -1;
  Undefined = -1;

const
  stUnnamed = '<Unnamed>';

const
  { Padding }
  pdStandard = 2;
  pdDouble = pdStandard * 2;
  pdExtra = pdDouble * 2;
  pdEditToText = 4;
  pdTextToIcon = 4;
  pdHorz = 2;
  pdVert = 1;

  { Spacing }
  spArrowDistance = 10;
  spGrid = 8;
  spDetails = 16;
  spSizingTreshold = 4;

const
  szTrackbarPadding = 6;

const
  { Effects }
  szBevelSize = 1;
  szDropShadowSize = 3;
  szInnerShadowSize = 6;
  szReflectionSize = 20;

const
  szFilterDropButtonWidth = 16;

const
  { MS VisualStudio 2010/11 }
  clVisualStudioActiveBorder = $0065C3E5;
  clVisualStudioBtnFace = $00E7E1DE;
  clVisualStudioBtnBorder = $0065C3E5;
  clVisualStudioDivider = $00A29185;
  clVisualStudioHighlight = $00BBEFFF;

  { Modern }
  clModernBtnFace = $00E1E1E1;
  clModernGray = $00727272;
  clModernHighlight = $00C67200;
  clModernHotLight = $00FAE6F2;

  clValidColor = $0050b000;
  clInvalidColor = clRed;

  { TPen Styles }
  DotDotPenStyle: array [1..2] of DWORD = (0, 2);

const
  { Exceptions }
  exNilParameter = 'Can''t insert nil as Parameter';

const
  stNumericMask = '#,##0.00';

const
  { Themes }
  teButton = 'button';
  teComboBox = 'combobox';
  teHeader = 'header';
  teEdit = 'edit';
  teExplorerBar = 'explorerbar';
  teListView = 'listview';
  teTab = 'tab';
  teToolbar = 'toolbar';
  teTrackBar = 'trackbar';
  teTreeView = 'treeview';
  teProgress = 'progress';
  teRebar = 'rebar';
  teScrollBar = 'scrollbar';
  teSpin = 'spin';

  { teButton }
  tcButton = 1;
  tcCheckBox = 3;
  tcRadioButton = 2;

  { teButton & tcRadioButton (& tcCheckBox) }
  tiRadioNormal = 1;
  tiRadioHover = 2;
  tiRadioDown = 3;
  tiRadioDisabled = 4;

  tiRadioChecked = 5;
  tiRadioCheckedHover = 6;
  tiRadioCheckedDown = 7;
  tiRadioCheckedDisabled = 8;

  tiRadioGrayed = 9;
  tiRadioGrayedHover = 10;
  tiRadioGrayedDown = 11;
  tiRadioGrayedDisabled = 12;

  { teSpin }
  tcSpinUp = 1;
  tcSpinDown = 2;

  { teToolbar }
  tcToolbarRoot = 0;
  tcToolbarButton = 1;
  tcToolbarButtonHover = 2;
  tcToolbarButtonDown = 3;
  tcToolbarButtonDisabled = 4;

  { teTreeView }
  tcExpandingButton = 2;

  tiCollapsed = 1;
  tiExpanded = 2;

  { teHeader }
  tcHeader = 1;
  tiHeaderNormal = 1;
  tiHeaderHover = 2;
  tiHeaderDown = 3;
  tiHeaderPasive = 7;

  { teProgress }
  tcBar = 1;
  tcBarVert = 2;
  tcChunk = 3;
  tcChunkVert = 4;

  { teScrollBar }
  tcHorzGrip = 9;

  { teTab }
  tcTab = 1;
  tcTabPage = 9;

  { tcTab }
  tiTab = 1;
  tiTabActive = 3;

  { teTrackbar }
  tcTrackbarRail = 1;
  tcTrackbarSlider = 4;
  tcTrackbarSliderRectangular = 6;

  { tcTrackBarGrip }
  tiTrackBarSliderNormal = 1;
  tiTrackBarSliderHot = 2;
  tiTrackbarSliderPressed = 3;
  tiTrackbarSliderDisabled = 5;

type
  TWebColors = (cnColorName, cnColorValue);
  TWebColor = array[TWebColors] of String;

const
  { Color Names }
  DelphiColorNames: array[0..51] of string = (
    'clBlack',
    'clMaroon',
    'clGreen',
    'clOlive',
    'clNavy',
    'clPurple',
    'clTeal',
    'clGray',
    'clSilver',
    'clRed',
    'clLime',
    'clYellow',
    'clBlue',
    'clFuchsia',
    'clAqua',
    'clWhite',
    'clMoneyGreen',
    'clSkyBlue',
    'clCream',
    'clMedGray',
    'clActiveBorder',
    'clActiveCaption',
    'clAppWorkSpace',
    'clBackground',
    'clBtnFace',
    'clBtnHighlight',
    'clBtnShadow',
    'clBtnText',
    'clCaptionText',
    'clDefault',
    'clGradientActiveCaption',
    'clGradientInactiveCaption',
    'clGrayText',
    'clHighlight',
    'clHighlightText',
    'clHotLight',
    'clInactiveBorder',
    'clInactiveCaption',
    'clInactiveCaptionText',
    'clInfoBk',
    'clInfoText',
    'clMenu',
    'clMenuBar',
    'clMenuHighlight',
    'clMenuText',
    'clNone',
    'clScrollBar',
    'cl3DDkShadow',
    'cl3DLight',
    'clWindow',
    'clWindowFrame',
    'clWindowText');

  WebColors : array[0..140] of TWebColor = (
    ('transparent', '#FFFFFF'),
    ('aliceblue', '#F0F8FF'),
    ('antiquewhite', '#FAEBD7'),
    ('aqua', '#00FFFF'),
    ('aquamarine', '#7FFFD4'),
    ('azure', '#F0FFFF'),
    ('beige', '#F5F5DC'),
    ('bisque', '#FFE4C4'),
    ('black', '#000000'),
    ('blanchedalmond', '#FFEBCD'),
    ('blue', '#0000FF'),
    ('blueviolet', '#8A2BE2'),
    ('brown', '#A52A2A'),
    ('burlywood', '#DEB887'),
    ('cadetblue', '#5F9EA0'),
    ('chartreuse', '#7FFF00'),
    ('chocolate', '#D2691E'),
    ('coral', '#FF7F50'),
    ('cornflowerblue', '#6495ED'),
    ('cornsilk', '#FFF8DC'),
    ('crimson', '#DC143C'),
    ('cyan', '#00FFFF'),
    ('darkblue', '#00008B'),
    ('darkcyan', '#008B8B'),
    ('darkgoldenrod', '#B8860B'),
    ('darkgray', '#A9A9A9'),
    ('darkgreen', '#006400'),
    ('darkkhaki', '#BDB76B'),
    ('darkmagenta', '#8B008B'),
    ('darkolivegreen', '#556B2F'),
    ('darkorange', '#FF8C00'),
    ('darkorchid', '#9932CC'),
    ('darkred', '#8B0000'),
    ('darksalmon', '#E9967A'),
    ('darkseagreen', '#8FBC8B'),
    ('darkslateblue', '#483D8B'),
    ('darkslategray', '#2F4F4F'),
    ('darkturquoise', '#00CED1'),
    ('darkviolet', '#9400D3'),
    ('deeppink', '#FF1493'),
    ('deepskyblue', '#00BFFF'),
    ('dimgray', '#696969'),
    ('dodgerblue', '#1E90FF'),
    ('firebrick', '#B22222'),
    ('floralwhite', '#FFFAF0'),
    ('forestgreen', '#228B22'),
    ('fuchsia', '#FF00FF'),
    ('gainsboro', '#DCDCDC'),
    ('ghostwhite', '#F8F8FF'),
    ('gold', '#FFD700'),
    ('goldenrod', '#DAA520'),
    ('gray', '#808080'),
    ('green', '#008000'),
    ('greenyellow', '#ADFF2F'),
    ('honeydew', '#F0FFF0'),
    ('hotpink', '#FF69B4'),
    ('indianred', '#CD5C5C'),
    ('indigo', '#4B0082'),
    ('ivory', '#FFFFF0'),
    ('khaki', '#F0E68C'),
    ('lavender', '#E6E6FA'),
    ('lavenderblush', '#FFF0F5'),
    ('lawngreen', '#7CFC00'),
    ('lemonchiffon', '#FFFACD'),
    ('lightblue', '#ADD8E6'),
    ('lightcoral', '#F08080'),
    ('lightcyan', '#E0FFFF'),
    ('lightgoldenrodyellow', '#FAFAD2'),
    ('lightgreen', '#90EE90'),
    ('lightgrey', '#D3D3D3'),
    ('lightpink', '#FFB6C1'),
    ('lightsalmon', '#FFA07A'),
    ('lightseagreen', '#20B2AA'),
    ('lightskyblue', '#87CEFA'),
    ('lightslategray', '#778899'),
    ('lightsteelblue', '#B0C4DE'),
    ('lightyellow', '#FFFFE0'),
    ('lime', '#00FF00'),
    ('limegreen', '#32CD32'),
    ('linen', '#FAF0E6'),
    ('magenta', '#FF00FF'),
    ('maroon', '#800000'),
    ('mediumaquamarine', '#66CDAA'),
    ('mediumblue', '#0000CD'),
    ('mediumorchid', '#BA55D3'),
    ('mediumpurple', '#9370DB'),
    ('mediumseagreen', '#3CB371'),
    ('mediumslateblue', '#7B68EE'),
    ('mediumspringgreen', '#00FA9A'),
    ('mediumturquoise', '#48D1CC'),
    ('mediumvioletred', '#C71585'),
    ('midnightblue', '#191970'),
    ('mintcream', '#F5FFFA'),
    ('mistyrose', '#FFE4E1'),
    ('moccasin', '#FFE4B5'),
    ('navajowhite', '#FFDEAD'),
    ('navy', '#000080'),
    ('oldlace', '#FDF5E6'),
    ('olive', '#808000'),
    ('olivedrab', '#6B8E23'),
    ('orange', '#FFA500'),
    ('orangered', '#FF4500'),
    ('orchid', '#DA70D6'),
    ('palegoldenrod', '#EEE8AA'),
    ('palegreen', '#98FB98'),
    ('paleturquoise', '#AFEEEE'),
    ('palevioletred', '#DB7093'),
    ('papayawhip', '#FFEFD5'),
    ('peachpuff', '#FFDAB9'),
    ('peru', '#CD853F'),
    ('pink', '#FFC0CB'),
    ('plum', '#DDA0DD'),
    ('powderblue', '#B0E0E6'),
    ('purple', '#800080'),
    ('red', '#FF0000'),
    ('rosybrown', '#BC8F8F'),
    ('royalblue', '#4169E1'),
    ('saddlebrown', '#8B4513'),
    ('salmon', '#FA8072'),
    ('sandybrown', '#F4A460'),
    ('seagreen', '#2E8B57'),
    ('seashell', '#FFF5EE'),
    ('sienna', '#A0522D'),
    ('silver', '#C0C0C0'),
    ('skyblue', '#87CEEB'),
    ('slateblue', '#6A5ACD'),
    ('slategray', '#708090'),
    ('snow', '#FFFAFA'),
    ('springgreen', '#00FF7F'),
    ('steelblue', '#4682B4'),
    ('tan', '#D2B48C'),
    ('teal', '#008080'),
    ('thistle', '#D8BFD8'),
    ('tomato', '#FF6347'),
    ('turquoise', '#40E0D0'),
    ('violet', '#EE82EE'),
    ('wheat', '#F5DEB3'),
    ('white', '#FFFFFF'),
    ('whitesmoke', '#F5F5F5'),
    ('yellow', '#FFFF00'),
    ('yellowgreen', '#9ACD32'));

type
  TNxColorSchemeElement = (
    seAppWorkSpace,
    seBtnFace,
    seBtnFaceChecked,
    seBtnFacePressed,
    seBtnFrame,
    seBtnFramePressed,
    seDivider,
    seHighlight,
    seMenu,
    seTabFace,
    seTabFaceHot,
    seTabText,
    seTabBtnFace,
    seStatusWindow,
    seStatusBtnFace,
    seStatusBtnFacePressed,
    seStatusText,
    seTrackBar,
    seWindowFrame
  );

{$IFDEF DELPHI6}
const
  {$EXTERNALSYM WM_NCMOUSEHOVER}
  WM_NCMOUSEHOVER     = $02A0;
  {$EXTERNALSYM WM_NCMOUSELEAVE}
  WM_NCMOUSELEAVE     = $02A2;
  {$EXTERNALSYM WM_THEMECHANGED}
  WM_THEMECHANGED     = $031A;
{$ENDIF}

var
  SchemeColor: array[TNxColorScheme, TNxColorSchemeElement] of TColor;
  ColorScheme: TNxColorSchemes = csOutlook;

function ColorOf(E: TNxColorSchemeElement; Scheme: TNxColorScheme = csDefault): TColor;

implementation

function ColorOf(E: TNxColorSchemeElement; Scheme: TNxColorScheme = csDefault): TColor;
begin
  if Scheme = csDefault then Scheme := ColorScheme;
  Result := SchemeColor[Scheme, E];
end;

initialization
  { ColorSchemes }
  SchemeColor[csOutlook, seAppWorkSpace] := $00ffffff;
  SchemeColor[csOutlook, seMenu] := $00c67200;
  SchemeColor[csOutlook, seBtnFace] := $00f7e6cd;
  SchemeColor[csOutlook, seBtnFrame] := $00ababab; { shared }
  SchemeColor[csOutlook, seBtnFramePressed] := $00d48d2a;
  SchemeColor[csOutlook, seBtnFacePressed] := $00e0c092;
  SchemeColor[csOutlook, seBtnFaceChecked] := $00f0d6b1;
  SchemeColor[csOutlook, seDivider] := $00e1e1e1; { shared }
  SchemeColor[csOutlook, seHighlight] := $00f7e6cd;
  SchemeColor[csOutlook, seTabBtnFace] := $00ffffff;
  SchemeColor[csOutlook, seTabFace] := $00ffffff;
  SchemeColor[csOutlook, seTabFaceHot] := $00f7e6cd;
  SchemeColor[csOutlook, seTabText] := $00000000;
  SchemeColor[csOutlook, seStatusWindow] := SchemeColor[csOutlook, seMenu];
  SchemeColor[csOutlook, seStatusText] := clWhite;
  SchemeColor[csOutlook, seStatusBtnFace] := $00d48a2a;
  SchemeColor[csOutlook, seStatusBtnFacePressed] := $00b06700;
  SchemeColor[csOutlook, seTrackBar] := clLime;
  SchemeColor[csOutlook, seWindowFrame] := $00b5aca5;

  SchemeColor[csWord, seAppWorkSpace] := $00ffffff;
  SchemeColor[csWord, seMenu] := $009a572b; //
  SchemeColor[csWord, seBtnFace] := $00f2e1d5; //       $00F2E1D5
  SchemeColor[csWord, seBtnFrame] := $00ababab; { shared }
  SchemeColor[csWord, seBtnFramePressed] := $00b56d3e; //
  SchemeColor[csWord, seBtnFacePressed] := $00e3bda3; //      $00E3BDA3
  SchemeColor[csWord, seBtnFaceChecked] := $00f2d5c2; // $00F2D5C2
  SchemeColor[csWord, seDivider] := $00e1e1e1; { shared }
  SchemeColor[csWord, seHighlight] := $00f2e1d5; //
  SchemeColor[csWord, seTabBtnFace] := $00ffffff;
  SchemeColor[csWord, seTabFace] := $00ffffff;
  SchemeColor[csWord, seTabFaceHot] := $00f2e1d5;
  SchemeColor[csWord, seTabText] := $00000000;
  SchemeColor[csWord, seStatusWindow] := SchemeColor[csWord, seMenu];
  SchemeColor[csWord, seStatusBtnFace] := $00b56d3e;
  SchemeColor[csWord, seStatusBtnFacePressed] := $008a4719;
  SchemeColor[csWord, seStatusText] := clWhite;
  SchemeColor[csWord, seTrackBar] := $00d9b298;
  SchemeColor[csWord, seWindowFrame] := $00b5aca5;    //b5aca5

  SchemeColor[csPowerPoint, seAppWorkSpace] := $00ffffff;
  SchemeColor[csPowerPoint, seMenu] := $002647d2; //
  SchemeColor[csPowerPoint, seBtnFace] := $00dce4fc; //
  SchemeColor[csPowerPoint, seBtnFrame] := $00ababab; { shared }
  SchemeColor[csPowerPoint, seBtnFramePressed] := $009dbaf5;
  SchemeColor[csPowerPoint, seBtnFacePressed] := $009dbaf5; //
  SchemeColor[csPowerPoint, seBtnFaceChecked] := $00b6cdfc; //
  SchemeColor[csPowerPoint, seDivider] := $00e1e1e1; { shared }
  SchemeColor[csPowerPoint, seHighlight] := $00dce4fc; //
  SchemeColor[csPowerPoint, seTabBtnFace] := $00ffffff;
  SchemeColor[csPowerPoint, seTabFace] := $00ffffff;
  SchemeColor[csPowerPoint, seTabFaceHot] := $00dce4fc;
  SchemeColor[csPowerPoint, seTabText] := $00000000;
  SchemeColor[csPowerPoint, seStatusWindow] := SchemeColor[csPowerPoint, seMenu];
  SchemeColor[csPowerPoint, seStatusBtnFace] := $003e62f0;
  SchemeColor[csPowerPoint, seStatusBtnFacePressed] := $001d3bb8;
  SchemeColor[csPowerPoint, seStatusText] := clWhite;
  SchemeColor[csPowerPoint, seTrackBar] := clLime;
  SchemeColor[csPowerPoint, seWindowFrame] := $00b5aca5;

  SchemeColor[csExcel, seAppWorkSpace] := $00ffffff;
  SchemeColor[csExcel, seMenu] := $00467321;
  SchemeColor[csExcel, seBtnFace] := $00e0f0d3;
  SchemeColor[csExcel, seBtnFrame] := $00ababab; { shared }
  SchemeColor[csExcel, seBtnFramePressed] := $00679443;
  SchemeColor[csExcel, seBtnFacePressed] := $00a0bf86;
  SchemeColor[csExcel, seBtnFaceChecked] := $00b7d59f;
  SchemeColor[csExcel, seDivider] := $00e1e1e1; { shared }
  SchemeColor[csExcel, seHighlight] := $00dce4fc;
  SchemeColor[csExcel, seTabBtnFace] := $00ffffff;
  SchemeColor[csExcel, seTabFace] := $00ffffff;
  SchemeColor[csExcel, seTabFaceHot] := $00e0f0d3;
  SchemeColor[csExcel, seTabText] := $00000000;
  SchemeColor[csExcel, seStatusWindow] := SchemeColor[csExcel, seMenu];
  SchemeColor[csExcel, seStatusBtnFace] := $00679443;
  SchemeColor[csExcel, seStatusBtnFacePressed] := $0032630a;
  SchemeColor[csExcel, seStatusText] := clWhite;
  SchemeColor[csExcel, seTrackBar] := $00b0cc99;
  SchemeColor[csExcel, seWindowFrame] := $00b5aca5;

  SchemeColor[csVisualStudioBlue, seAppWorkSpace] := $00553929;
  SchemeColor[csVisualStudioBlue, seMenu] := $00553929;
  SchemeColor[csVisualStudioBlue, seBtnFace] := $00bff4fd;
  SchemeColor[csVisualStudioBlue, seBtnFrame] := $0065c3e5;
  SchemeColor[csVisualStudioBlue, seBtnFramePressed] := $0065c3e5;
  SchemeColor[csVisualStudioBlue, seBtnFacePressed] := $009df2ff;
  SchemeColor[csVisualStudioBlue, seBtnFaceChecked] := $009df2ff;
  SchemeColor[csVisualStudioBlue, seDivider] := $00e1e1e1; { shared }
  SchemeColor[csVisualStudioBlue, seHighlight] := $00bff4fd;
  SchemeColor[csVisualStudioBlue, seStatusWindow] := $00cc7a00;
  SchemeColor[csVisualStudioBlue, seStatusBtnFace] := $00d69533;
  SchemeColor[csVisualStudioBlue, seStatusBtnFacePressed] := $00975a00; { Not yet found }
  SchemeColor[csVisualStudioBlue, seStatusText] := clWhite;
  SchemeColor[csVisualStudioBlue, seTabFace] := $006f4e36;
  SchemeColor[csVisualStudioBlue, seTabFaceHot] := $0099715b;
  SchemeColor[csVisualStudioBlue, seTabText] := $00ffffff;
  SchemeColor[csVisualStudioBlue, seTabBtnFace] := $00f4fcff;
  SchemeColor[csVisualStudioBlue, seTrackBar] := clWhite;
  SchemeColor[csVisualStudioBlue, seWindowFrame] := $00b5aca5;

finalization

end.
