diff --git a/internal/2.4.4/1/Demos/Customizer/Customizer.dpr b/internal/2.4.4/1/Demos/Customizer/Customizer.dpr new file mode 100644 index 0000000..0202e78 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/Customizer.dpr @@ -0,0 +1,15 @@ +program Customizer; + +uses + Forms, + Unit1 in 'Unit1.pas' {Form1}, + Unit2 in 'Unit2.pas' {Form2}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.CreateForm(TForm2, Form2); + Application.Run; +end. diff --git a/internal/2.4.4/1/Demos/Customizer/Unit1.dfm b/internal/2.4.4/1/Demos/Customizer/Unit1.dfm new file mode 100644 index 0000000..49d0b7f --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/Unit1.dfm @@ -0,0 +1,1602 @@ +object Form1: TForm1 + Left = 281 + Top = 159 + Caption = 'Form1' + ClientHeight = 487 + ClientWidth = 748 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [] + OldCreateOrder = False + ShowHint = True + OnCreate = FormCreate + OnDestroy = FormDestroy + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object SpTBXSplitter1: TSpTBXSplitter + Left = 142 + Top = 75 + Height = 347 + Cursor = crSizeWE + end + object SpTBXSplitter2: TSpTBXSplitter + Left = 614 + Top = 75 + Height = 347 + Cursor = crSizeWE + Align = alRight + end + object SpTBXTabControl1: TSpTBXTabControl + Left = 147 + Top = 75 + Width = 467 + Height = 347 + Align = alClient + Font.Charset = ANSI_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Courier New' + Font.Style = [] + ParentFont = False + ActiveTabIndex = 0 + HiddenItems = <> + object SpTBXTabItem1: TSpTBXTabItem + Caption = 'FAQ.txt' + Checked = True + end + object SpTBXTabItem2: TSpTBXTabItem + Caption = 'Advanced Techniques.txt' + end + object SpTBXTabItem3: TSpTBXTabItem + Caption = 'Translations.txt' + end + object SpTBXTabSheet3: TSpTBXTabSheet + Left = 0 + Top = 23 + Width = 467 + Height = 324 + Caption = 'Translations.txt' + ImageIndex = -1 + TabItem = 'SpTBXTabItem3' + object Memo4: TMemo + Left = 2 + Top = 0 + Width = 461 + Height = 320 + Align = alClient + BorderStyle = bsNone + ScrollBars = ssVertical + TabOrder = 0 + end + end + object SpTBXTabSheet2: TSpTBXTabSheet + Left = 0 + Top = 23 + Width = 467 + Height = 324 + Caption = 'Advanced Techniques.txt' + ImageIndex = -1 + TabItem = 'SpTBXTabItem2' + object Memo3: TMemo + Left = 2 + Top = 0 + Width = 461 + Height = 320 + Align = alClient + BorderStyle = bsNone + ScrollBars = ssVertical + TabOrder = 0 + end + end + object SpTBXTabSheet1: TSpTBXTabSheet + Left = 0 + Top = 23 + Width = 467 + Height = 324 + Caption = 'FAQ.txt' + ImageIndex = -1 + TabItem = 'SpTBXTabItem1' + object Memo2: TMemo + Left = 2 + Top = 0 + Width = 461 + Height = 320 + Align = alClient + BorderStyle = bsNone + ScrollBars = ssVertical + TabOrder = 0 + end + end + end + object SpTBXDock1: TSpTBXDock + Left = 0 + Top = 0 + Width = 748 + Height = 75 + PopupMenu = SpTBXPopupMenu1 + object tbStandard: TSpTBXToolbar + Left = 0 + Top = 23 + DockPos = 0 + DockRow = 1 + Images = ImageList1 + ShrinkMode = tbsmNone + TabOrder = 1 + Caption = 'Standard' + object tNew: TSpTBXItem + Caption = 'New' + ImageIndex = 14 + ShortCut = 16462 + OnClick = ActionsExecute + end + object tOpen: TSpTBXItem + Caption = 'Open' + ImageIndex = 15 + ShortCut = 16463 + OnClick = ActionsExecute + end + object tSave: TSpTBXItem + Caption = 'Save' + ImageIndex = 16 + ShortCut = 16467 + OnClick = ActionsExecute + end + object SpTBXSeparatorItem7: TSpTBXSeparatorItem + end + object tCut: TSpTBXItem + Caption = 'Cut' + ImageIndex = 10 + ShortCut = 16472 + OnClick = ActionsExecute + end + object tCopy: TSpTBXItem + Caption = 'Copy' + ImageIndex = 9 + ShortCut = 16451 + OnClick = ActionsExecute + end + object tPaste: TSpTBXItem + Caption = 'Paste' + DisplayMode = nbdmImageAndText + ImageIndex = 11 + ShortCut = 16470 + OnClick = ActionsExecute + end + object SpTBXSeparatorItem9: TSpTBXSeparatorItem + end + object tFind: TSpTBXItem + Caption = 'Find' + DisplayMode = nbdmImageAndText + ImageIndex = 12 + ShortCut = 16454 + OnClick = ActionsExecute + end + object SpTBXSeparatorItem12: TSpTBXSeparatorItem + end + object tSkins: TSpTBXSubmenuItem + Caption = 'Skins' + Options = [tboDropdownArrow] + object SpTBXSkinGroupItem1: TSpTBXSkinGroupItem + end + end + object SpTBXSeparatorItem13: TSpTBXSeparatorItem + end + object TBControlItem1: TTBControlItem + Control = tLanguages + end + object tLanguages: TSpTBXComboBox + Left = 282 + Top = 0 + Width = 145 + Height = 21 + Style = csDropDownList + ItemHeight = 13 + TabOrder = 0 + OnClick = tLanguagesItemClick + AutoDropDownWidth = True + end + end + object tbFormat: TSpTBXToolbar + Left = 0 + Top = 49 + DockPos = 0 + DockRow = 2 + Images = ImageList1 + ShrinkMode = tbsmNone + TabOrder = 3 + Caption = 'Format' + object TBControlItem2: TTBControlItem + Control = tFont + end + object TBControlItem3: TTBControlItem + Control = tFontSize + end + object TBControlItem5: TTBControlItem + Control = SpTBXColorEdit1 + end + object SpTBXSeparatorItem8: TSpTBXSeparatorItem + end + object tBold: TSpTBXItem + Caption = 'Bold' + DisplayMode = nbdmImageAndText + ImageIndex = 4 + ShortCut = 16450 + OnClick = ActionsExecute + end + object tItalic: TSpTBXItem + Caption = 'Italic' + ImageIndex = 5 + ShortCut = 16457 + OnClick = ActionsExecute + end + object tUnderline: TSpTBXItem + Caption = 'Underline' + ImageIndex = 6 + ShortCut = 16469 + OnClick = ActionsExecute + end + object tFont: TSpTBXComboBox + Left = 0 + Top = 0 + Width = 120 + Height = 21 + ItemHeight = 13 + TabOrder = 0 + Text = 'Verdana' + Items.Strings = ( + 'Arial' + 'Times New Roman' + 'Courier New') + end + object tFontSize: TSpTBXComboBox + Left = 120 + Top = 0 + Width = 70 + Height = 21 + ItemHeight = 13 + TabOrder = 1 + Text = '12' + Items.Strings = ( + '8' + '9' + '10' + '14' + '16' + '20') + end + object SpTBXColorEdit1: TSpTBXColorEdit + Left = 190 + Top = 0 + Width = 99 + Height = 21 + TabOrder = 2 + SelectedColor = clBlack + SelectedFormat = cttHTML + end + end + object tbMenuBar: TSpTBXToolbar + Left = 0 + Top = 0 + CloseButton = False + DockPos = 0 + FullSize = True + Images = ImageList1 + ProcessShortCuts = True + ShrinkMode = tbsmWrap + TabOrder = 0 + Caption = 'Menu' + Customizable = False + MenuBar = True + object mFile: TSpTBXSubmenuItem + Caption = '&File' + object mNew: TSpTBXItem + Caption = 'New' + ImageIndex = 14 + ShortCut = 16462 + OnClick = ActionsExecute + end + object mOpen: TSpTBXItem + Caption = 'Open...' + ImageIndex = 15 + ShortCut = 16463 + OnClick = ActionsExecute + end + object mSave: TSpTBXItem + Caption = 'Save' + ImageIndex = 16 + ShortCut = 16467 + OnClick = ActionsExecute + end + object mPrint: TSpTBXItem + Caption = 'Print' + ImageIndex = 17 + OnClick = ActionsExecute + end + object SpTBXSeparatorItem1: TSpTBXSeparatorItem + end + object mExit: TSpTBXItem + Caption = 'Exit' + OnClick = ActionsExecute + end + end + object mEdit: TSpTBXSubmenuItem + Caption = '&Edit' + object mCut: TSpTBXItem + Caption = 'Cut' + ImageIndex = 10 + ShortCut = 16472 + OnClick = ActionsExecute + end + object mCopy: TSpTBXItem + Caption = 'Copy' + ImageIndex = 9 + ShortCut = 16451 + OnClick = ActionsExecute + end + object mPaste: TSpTBXItem + Caption = 'Paste' + ImageIndex = 11 + ShortCut = 16470 + OnClick = ActionsExecute + end + object SpTBXSeparatorItem2: TSpTBXSeparatorItem + end + object mSelectAll: TSpTBXItem + Caption = 'Select All' + ShortCut = 16449 + OnClick = ActionsExecute + end + object SpTBXSeparatorItem3: TSpTBXSeparatorItem + end + object mFind: TSpTBXItem + Caption = 'Find' + ImageIndex = 12 + ShortCut = 16454 + OnClick = ActionsExecute + end + end + object SpTBXSubmenuItem1: TSpTBXSubmenuItem + Caption = '&Format' + object mBold: TSpTBXItem + Caption = 'Bold' + ImageIndex = 4 + ShortCut = 16450 + OnClick = ActionsExecute + end + object mItalic: TSpTBXItem + Caption = 'Italic' + ImageIndex = 5 + ShortCut = 16457 + OnClick = ActionsExecute + end + object mUnderline: TSpTBXItem + Caption = 'Underline' + ImageIndex = 6 + ShortCut = 16469 + OnClick = ActionsExecute + end + object SpTBXSeparatorItem5: TSpTBXSeparatorItem + end + object mLeftJustify: TSpTBXItem + Caption = 'Left Justify' + ImageIndex = 0 + OnClick = ActionsExecute + end + object mCentered: TSpTBXItem + Caption = 'Centered' + ImageIndex = 1 + OnClick = ActionsExecute + end + object mRightJustify: TSpTBXItem + Caption = 'Right Justify' + ImageIndex = 2 + OnClick = ActionsExecute + end + object SpTBXSeparatorItem6: TSpTBXSeparatorItem + end + object mBullets: TSpTBXItem + Caption = 'Bullets' + ImageIndex = 7 + OnClick = ActionsExecute + end + object mNumberedBullets: TSpTBXItem + Caption = 'Numbered Bullets' + ImageIndex = 8 + OnClick = ActionsExecute + end + end + object mView: TSpTBXSubmenuItem + Caption = '&View' + object mSidebar: TSpTBXSubmenuItem + Caption = '&Sidebar' + object mCommandsLog: TSpTBXItem + Caption = '&Commands Log' + Control = dpLog + end + object mOptions: TSpTBXItem + Caption = '&Options' + Control = dpOptions + end + object mmHelp: TSpTBXItem + Caption = '&Help' + Control = dpHelp + end + end + object mToolbars: TSpTBXSubmenuItem + Caption = '&Toolbars' + object mStandardToolbar: TSpTBXItem + Caption = '&Standard Toolbar' + Control = tbStandard + end + object tLayoutsToolbar: TSpTBXItem + Caption = '&Layouts Toolbar' + Control = tbLayouts + end + object mFormattingToolbar: TSpTBXItem + Caption = '&Formatting Toolbar' + Control = tbFormat + end + object mNavigationToolbar: TSpTBXItem + Caption = '&Navigation Toolbar' + Control = tbNavigation + end + end + end + object mHelp: TSpTBXSubmenuItem + Caption = '&Help' + object mmmHelp: TSpTBXItem + Caption = '&Help' + end + object mAbout: TSpTBXItem + Caption = '&About' + Enabled = False + end + end + end + object tbLayouts: TSpTBXToolbar + Left = 437 + Top = 23 + DockPos = 433 + DockRow = 1 + Images = ImageList1 + ShrinkMode = tbsmNone + TabOrder = 2 + Caption = 'Layouts' + Customizable = False + object SpTBXLabelItem1: TSpTBXLabelItem + Caption = 'Layouts' + end + object TBControlItem4: TTBControlItem + Control = tLayouts + end + object tLayoutSave: TSpTBXItem + Caption = 'Save' + OnClick = tLayoutSaveClick + end + object tLayouts: TSpTBXComboBox + Left = 48 + Top = 0 + Width = 100 + Height = 21 + Style = csDropDownList + ItemHeight = 13 + TabOrder = 0 + OnClick = tLayoutsItemClick + end + end + end + object SpTBXMultiDock1: TSpTBXMultiDock + Left = 0 + Top = 75 + Width = 142 + Height = 347 + object dpLog: TSpTBXDockablePanel + Left = 0 + Top = 156 + Width = 142 + Height = 191 + Caption = 'Commands Log' + DockPos = 156 + TabOrder = 0 + object Memo1: TMemo + Left = 0 + Top = 19 + Width = 138 + Height = 168 + Align = alClient + BorderStyle = bsNone + ReadOnly = True + ScrollBars = ssVertical + TabOrder = 1 + end + end + object dpOptions: TSpTBXDockablePanel + Left = 0 + Top = 0 + Width = 142 + Height = 156 + Caption = 'Customizer Options' + DockPos = 0 + TabOrder = 1 + end + end + object SpTBXMultiDock2: TSpTBXMultiDock + Left = 619 + Top = 75 + Width = 129 + Height = 347 + Position = dpxRight + object dpHelp: TSpTBXDockablePanel + Left = 0 + Top = 0 + Width = 129 + Height = 347 + Caption = 'Help' + DockPos = 0 + TabOrder = 0 + DesignSize = ( + 125 + 343) + object SpTBXLabel1: TSpTBXLabel + Left = 7 + Top = 32 + Width = 111 + Height = 81 + Caption = 'Right click the toolbars to customize them' + Anchors = [akLeft, akTop, akRight] + AutoSize = False + Wrapping = twWrap + end + end + end + object SpTBXDock2: TSpTBXDock + Left = 0 + Top = 422 + Width = 748 + Height = 39 + PopupMenu = SpTBXPopupMenu1 + Position = dpBottom + object tbNavigation: TSpTBXToolbar + Left = 0 + Top = 0 + Images = ImageList1 + Options = [tboImageAboveCaption, tboSameWidth] + TabOrder = 0 + Caption = 'Navigation' + DisplayMode = tbdmImageAboveCaption + object tBack: TSpTBXItem + Caption = 'Back' + ImageIndex = 20 + OnClick = ActionsExecute + end + object tForward: TSpTBXItem + Caption = 'Forward' + ImageIndex = 21 + OnClick = ActionsExecute + end + object tRefresh: TSpTBXItem + Caption = 'Refresh' + ImageIndex = 23 + OnClick = ActionsExecute + end + object tStop: TSpTBXItem + Caption = 'Stop' + ImageIndex = 22 + OnClick = ActionsExecute + end + object tSearch: TSpTBXItem + Caption = 'Search' + ImageIndex = 24 + OnClick = ActionsExecute + end + end + end + object SpTBXStatusBar1: TSpTBXStatusBar + Left = 0 + Top = 461 + Width = 748 + Height = 26 + end + object ImageList1: TImageList + Left = 192 + Top = 352 + Bitmap = { + 494C01011A001D00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 0000000000003600000028000000400000007000000001002000000000000070 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000CE00009CFF000000CE00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000084840000FF00000084840000FF00000084840000000000000000 + CE0063CEFF006300FF000000CE00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000009C31000063 + 31000063310000840000848400000000000000000000000000000000000063CE + FF006300FF000000CE000000000000000000006363009CFFFF0000CEFF0000CE + FF0000CEFF0000CEFF00009CCE0000CEFF00009CCE0000CEFF00009CCE00009C + CE00639C9C00009CCE0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000009C310063CE310063CE + 3100009C3100009C31004A4A4A0084848400CE9C3100CE9C31009C6331000000 + 00000000CE00000000000000000000000000006363009CFFFF0000CEFF0000CE + FF0000CEFF0000CEFF0000CEFF00FF00000000CEFF00009CCE0000CEFF00009C + CE00009CCE00639C9C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000009C310063FF310063FF + 310063CE31004A4A4A0084848400FFCE9C00FFCE3100FFCE3100CE9C31009C63 + 310000000000000000000000000000000000006363009CFFFF009CFFFF0000CE + FF0000CEFF00FF00000000CEFF00FF00000000CEFF00FF000000009CCE0000CE + FF00009CCE00009CCE0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000009C31009CFFCE0063FF310063CE + 3100008400004A4A4A00FFCE9C00FFFFCE00FFFF9C00FFFF9C00FFCE3100CE9C + 3100000000009C0031000000000000000000006363009CFFFF0000CEFF009CFF + FF0000CEFF0000CEFF00FF000000FF000000FF00000000CEFF0000CEFF00009C + CE0000CEFF00009CCE0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000009C31009CFFCE0063FF3100009C + 3100FF9C00004A4A4A00FFCE9C00FFFFFF00FFFFCE00FFFF9C00FFCE3100CE9C + 310000000000FF0000000000000000000000006363009CFFFF00FFFFFF0000CE + FF00FF000000FF000000FF00000000FFFF00FF000000FF000000FF00000000CE + FF00009CCE00009CCE0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000009C3100009C3100009C3100FFCE + 3100FFCE31004A4A4A0084848400FFFFFF00FFFFFF00FFFFCE00FFCE9C008484 + 840000000000FF6331000000000000000000006363009CFFFF0000CEFF00FFFF + FF0000CEFF0000CEFF00FF000000FF000000FF00000000CEFF0000CEFF00009C + CE0000CEFF00009CCE0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF633100FFFFCE00FFFF3100FFCE + 3100FFCE3100FF9C00004A4A4A0084848400FFCE9C00FFCE9C00848484000000 + 0000FF633100FF6331000000000000000000006363009CFFFF00FFFFFF0000CE + FF00FFFFFF00FF00000000CEFF00FF00000000CEFF00FF00000000CEFF0000CE + FF00009CCE00009CCE0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF633100FFFFCE00FF9C00000084 + 000000840000FFCE3100FF9C00004A4A4A004A4A4A004A4A4A004A4A4A00FF9C + 0000FF6331009C0031000000000000000000006363009CFFFF0000CEFF00FFFF + FF0000CEFF00FFFFFF0000CEFF00FF00000000CEFF0000CEFF0000CEFF0000CE + FF0000CEFF00009CCE0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF6331000084000063CE + 3100009C3100FF633100FF9C0000FF9C0000FF9C0000FF633100FF9C0000FF63 + 3100FF000000000000000000000000000000006363009CFFFF009CFFFF009CFF + FF009CFFFF009CFFFF009CFFFF009CFFFF009CFFFF009CFFFF009CFFFF009CFF + FF009CFFFF009CFFFF0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000006331009CFFCE0063FF + 310063CE310000840000FF633100FF9C0000FF9C0000FF9C0000FF633100FF9C + 0000FF6331000000000000000000000000000063630000636300006363000063 + 6300006363000063630000636300006363000063630000636300006363000063 + 6300006363000063630000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000006331009CFF + CE0063FF310063CE3100009C31000084000000840000FF6331009C9C0000FF63 + 31000000000000000000000000000000000000000000006363009CFFFF009CFF + FF009CFFFF009CFFFF009CFFFF00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000063 + 31000063310063FF310063FF310063CE3100009C310000840000FF633100FF63 + 3100000000000000000000000000000000000000000000000000006363000063 + 6300006363000063630000636300000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000633100006331000063310000633100FF633100000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000009C0000009C0000009C0000009C0000009C0000009C000000 + 000000000000000000000000000000000000000000000000000084848400CECE + CE00CECECE00CECECE00CECECE00CECECE00CECECE00CECECE00CECECE00CECE + CE00CECECE00CECECE0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000009C000000 + CE000000CE000000CE000000CE000000CE000000CE000000CE0000009C000000 + 9C0000009C00000000000000000000000000000000000000000084848400FFFF + FF00FFFFFF009CFFFF00FFFFFF009CFFFF00009C31009CFFFF00FFFFFF009CFF + FF00FFFFFF00CECECE0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000009C000000CE000063 + FF003100FF003100FF003100FF003100FF003100FF000000CE000000CE000000 + CE0000009C0000009C000000000000000000000000000000000084848400FFFF + FF009CFFFF00FFFFFF009CFFFF00009C3100009C3100FFFFFF009CFFFF00FFFF + FF009CFFFF00CECECE0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000009C000063FF003100 + FF003100FF003100FF003100FF003100FF003100FF003100FF003100FF000000 + CE000000CE0000009C000000000000000000000000000000000084848400FFFF + FF00FFFFFF009CFFFF00009C3100009C3100009C3100009C3100009C31009CFF + FF00FFFFFF00CECECE0000000000000000000000000000000000000000000000 + 000000000000FF9C310000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FF6331000000 + 00000000000000000000000000000000000000009C006363FF000063FF003100 + FF003100FF003100FF003100FF003100FF003100FF003100FF003100FF003100 + FF000000CE0000009C0000009C0000000000000000000000000084848400FFFF + FF009CFFFF00FFFFFF009CFFFF00009C3100009C3100FFFFFF00639C00006363 + 00009CFFFF00CECECE0000000000000000000000000000000000000000000000 + 0000FF9C3100FF9C310000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FF9C3100FF63 + 31000000000000000000000000000000000000009C006363FF00319CFF003100 + FF003100FF00FFFFFF00FFFFFF003100FF003100FF00FFFFFF00FFFFFF003100 + FF000000CE000000CE0000009C0000000000000000000000000084848400FFFF + FF00FFFFFF009CFFFF00FFFFFF009CFFFF00009C31009CFFFF00FFFFFF006363 + 0000FFFFFF00CECECE000000000000000000000000000000000000000000FF9C + 3100FFCE3100FF9C3100FF9C3100FF9C3100FF9C3100FF9C3100FF9C3100FF9C + 3100FF9C31000000000000000000000000000000000000000000FF633100FF9C + 3100FF9C3100FF9C3100FF9C3100FF9C3100FF9C3100FF9C3100FF9C3100FFCE + 3100FF63310000000000000000000000000000009C006363FF00319CFF003100 + FF003100FF003100FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF003100FF003100 + FF003100FF000000CE0000009C0000000000000000000000000084848400FFFF + FF009CFFFF00636300009CFFFF00FFFFFF009CFFFF00FFFFFF009CFFFF006363 + 00009CFFFF00CECECE0000000000000000000000000000000000FF633100FFFF + 9C00FFFF9C00FFFF9C00FFFF9C00FFFF9C00FFFF9C00FFFF9C00FFFF9C00FFFF + 9C00FF9C31000000000000000000000000000000000000000000FF633100FFFF + CE00FFFFCE00FFFFCE00FFFFCE00FFFFCE00FFFFCE00FFFFCE00FFFFCE00FFFF + 9C00FFCE310000000000000000000000000000009C006363FF00319CFF003100 + FF003100FF003100FF003100FF00FFFFFF00FFFFFF003100FF003100FF003100 + FF003100FF000000CE0000009C0000000000000000000000000084848400FFFF + FF00FFFFFF0063630000FFFFFF009CFFFF00009C31009CFFFF00FFFFFF009CFF + FF00FFFFFF00CECECE000000000000000000000000000000000000000000FF63 + 3100FFFF9C00FFFF9C0000000000FF633100FF633100FF633100FF633100FF63 + 3100FF6331000000000000000000000000000000000000000000FF633100FF63 + 3100FF633100FF633100FF633100FF633100FF633100FF633100FFFFCE00FFCE + 31000000000000000000000000000000000000009C006363FF00319CFF000063 + FF003100FF003100FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF003100FF003100 + FF003100FF000000CE0000009C0000000000000000000000000084848400FFFF + FF009CFFFF0063630000639C0000FFFFFF00009C3100009C31009CFFFF00FFFF + FF009CFFFF00CECECE0000000000000000000000000000000000000000000000 + 0000FF633100FFFF9C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF633100FFCE31000000 + 00000000000000000000000000000000000000009C006363CE00319CFF000063 + FF003100FF00FFFFFF00FFFFFF003100FF003100FF00FFFFFF00FFFFFF003100 + FF003100FF000000CE0000009C0000000000000000000000000084848400FFFF + FF00FFFFFF009CFFFF00009C3100009C3100009C3100009C3100009C31009CFF + FF00FFFFFF00CECECE0000000000000000000000000000000000000000000000 + 000000000000FF63310000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF633100000000000000 + 0000000000000000000000000000000000000000000000009C006363FF00319C + FF000063FF003100FF003100FF003100FF003100FF003100FF003100FF003100 + FF003100FF000000CE000000000000000000000000000000000084848400FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00009C3100009C31009CFFFF00FFFF + FF00CECECE00CECECE0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF633100000000000000 + 0000000000000000000000000000000000000000000000009C006363CE00319C + FF00319CFF000063FF000063FF003100FF003100FF003100FF003100FF003100 + FF003100FF0000009C000000000000000000000000000000000084848400FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00009C31009CFFFF00FFFFFF000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000009C006363 + CE006363FF00319CFF00319CFF000063FF000063FF003100FF003100FF003100 + FF000000CE00000000000000000000000000000000000000000084848400FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF009CFFFF00FFFFFF009CFFFF008484 + 8400FFFFFF000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 9C0000009C006363CE006363FF006363FF006363FF006363FF000000CE000000 + 000000000000000000000000000000000000000000000000000084848400FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484 + 8400000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000009C0000009C0000009C0000009C0000009C0000009C000000 + 0000000000000000000000000000000000000000000000000000848484008484 + 8400848484008484840084848400848484008484840084848400848484008484 + 8400000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008484840084848400848484008484 + 8400848484008484840084848400848484008484840084848400848484008484 + 8400848484008484840084848400848484000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000008400 + 0000840000008400000084000000840000008400000084000000840000008400 + 0000840000008400000084000000000000008484840000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000848484000000000000000000008484000084 + 8400000000000000000000000000000000000000000000000000C6C6C600C6C6 + C600000000000084840000000000000000000000000000000000C6C6C600C6C6 + C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 + 0000C6C6C6000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008484840000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000848484000000000000000000008484000084 + 8400000000000000000000000000000000000000000000000000C6C6C600C6C6 + C600000000000084840000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000C6C6C60000000000000000000000000000000000000000008400 + 0000840000008400000084000000840000000000000000000000000000008400 + 0000840000008400000084000000000000008484840084848400848484008484 + 8400848484008484840084848400848484008484840084848400848484008484 + 8400848484008484840084848400848484000000000000000000008484000084 + 8400000000000000000000000000000000000000000000000000C6C6C600C6C6 + C6000000000000848400000000000000000000000000C6C6C600C6C6C600C6C6 + C600C6C6C600C6C6C600C6C6C60000FFFF0000FFFF0000FFFF00C6C6C600C6C6 + C600000000000000000000000000000000000000000000000000000000000000 + 0000000000008400000084000000000000000000000000000000000000000000 + 0000840000008400000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000008484000084 + 8400000000000000000000000000000000000000000000000000000000000000 + 00000000000000848400000000000000000000000000C6C6C600C6C6C600C6C6 + C600C6C6C600C6C6C600C6C6C600848484008484840084848400C6C6C600C6C6 + C60000000000C6C6C60000000000000000000000000000000000000000000000 + 0000000000000000000084000000840000000000000000000000000000000000 + 0000840000008400000000000000000000008400000084000000840000008400 + 0000000000000000000000000000840000008400000084000000840000008400 + 0000840000000000000000000000000000000000000000000000008484000084 + 8400008484000084840000848400008484000084840000848400008484000084 + 8400008484000084840000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000C6C6C600C6C6C60000000000FF000000FF000000FF000000FF00 + 0000FF0000000000000000000000840000008400000084000000840000008400 + 0000840000008400000000000000000000000000000084848400840000000000 + 0000000000000000000000000000000000008484840084000000840000008484 + 8400000000000000000000000000000000000000000000000000008484000084 + 8400000000000000000000000000000000000000000000000000000000000000 + 00000084840000848400000000000000000000000000C6C6C600C6C6C600C6C6 + C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000 + 0000C6C6C60000000000C6C6C600000000000000000000000000FF000000FF00 + 0000000000000000000000000000000000008400000084000000000000000000 + 0000840000008400000000000000000000000000000000000000840000008400 + 0000000000000000000000000000000000008484840084000000840000000000 + 0000000000000000000000000000000000000000000000000000008484000000 + 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6 + C600000000000084840000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000C6C6 + C60000000000C6C6C6000000000000000000000000000000000000000000FF00 + 0000FF0000000000000000000000000000000000000084000000840000000000 + 0000840000008400000000000000000000000000000000000000848484008400 + 0000000000000000000000000000000000008400000084000000848484000000 + 0000000000000000000000000000000000000000000000000000008484000000 + 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6 + C60000000000008484000000000000000000000000000000000000000000FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 + 0000C6C6C60000000000C6C6C600000000000000000000000000000000000000 + 0000FF000000FF000000FF000000FF000000FF000000FF000000840000008400 + 0000840000008400000000000000000000000000000000000000000000008400 + 0000840000008400000084000000840000008400000084000000000000000000 + 0000000000000000000000000000000000000000000000000000008484000000 + 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6 + C600000000000084840000000000000000000000000000000000000000000000 + 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000FF000000FF0000000000000000000000FF000000FF0000008400 + 0000840000008400000000000000000000000000000000000000000000008484 + 8400840000000000000000000000840000008400000084848400000000000000 + 0000000000000000000000000000000000000000000000000000008484000000 + 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6 + C600000000000084840000000000000000000000000000000000000000000000 + 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000FF000000FF00000000000000FF000000FF0000000000 + 0000840000008400000000000000000000000000000000000000000000000000 + 0000840000008400000000000000840000008400000000000000000000000000 + 0000000000000000000000000000000000000000000000000000008484000000 + 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6 + C600000000000000000000000000000000000000000000000000000000000000 + 000000000000FFFFFF000000000000000000000000000000000000000000FFFF + FF00000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF000000FF000000FF000000FF0000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000848484008400000084000000840000008484840000000000000000000000 + 0000000000000000000000000000000000000000000000000000008484000000 + 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6 + C60000000000C6C6C60000000000000000000000000000000000000000000000 + 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF000000FF000000FF0000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000008400000084000000840000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF000000FF0000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000008484840084000000848484000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000084000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF00000000000000000000000000000000000000000084000000840000008400 + 0000840000000000000000000000000000008400000084000000840000008400 + 000084000000840000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00000000000000000000000000000000000000000000000000008484000084 + 8400008484000084840000848400008484000084840000848400008484000000 + 00000000000000000000000000000000000000000000FFFFFF00000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF00000000000000000000000000000000000000000000000000848484008400 + 0000000000000000000000000000000000000000000084848400840000008400 + 000084848400000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00000000000000000000000000000000000000000000FFFF00000000000084 + 8400008484000084840000848400008484000084840000848400008484000084 + 8400000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000008400 + 0000840000000000000000000000000000000000000084848400840000008400 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF000000000000000000000000000000000000000000FFFFFF0000FFFF000000 + 0000008484000084840000848400008484000084840000848400008484000084 + 8400008484000000000000000000000000000000000000000000FFFFFF000000 + 00000000000000000000000000000000000000000000FFFFFF00000000000000 + 0000000000000000000000000000000000000000000000000000000000008484 + 8400840000000000000000000000000000000000000084000000840000008484 + 840000000000000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00000000000000000000000000000000000000000000FFFF00FFFFFF0000FF + FF00000000000084840000848400008484000084840000848400008484000084 + 8400008484000084840000000000000000000000000000000000FFFFFF000000 + 00000000000000000000000000000000000000000000FFFFFF00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000840000008400000084000000840000008400000084000000840000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF + FF0000FFFF000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FFFFFF000000 + 00000000000000000000000000000000000000000000FFFFFF00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000848484008400000000000000000000008400000084000000848484000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00000000000000000000000000000000000000000000FFFF00FFFFFF0000FF + FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000008400000084000000000000008400000084000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF + FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF000000000000000000000000000000000000000000FFFFFF00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000008484840084000000840000008400000084848400000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00000000000000000000000000000000000000000000FFFF00FFFFFF0000FF + FF00000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000084000000840000008400000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000084848400840000008484840000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000840000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000084000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000840000008400000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000084000000840000008400000084000000840000008400 + 0000840000008400000084000000840000000000000000000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000084000000840000008400000084000000840000008400 + 0000840000008400000084000000000000000000000000000000000000008400 + 0000000000000000000084000000000000000000000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00840000000000000084000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000008400 + 0000000000000000000084000000000000008400000000000000000000008400 + 0000000000000000000000000000000000000000000084848400008484008484 + 8400008484008484840084000000FFFFFF008400000084000000840000008400 + 00008400000084000000FFFFFF00840000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000084000000FFFFFF000000000000000000000000000000 + 000000000000FFFFFF0084000000000000000000000000000000000000008400 + 0000000000000000000084000000000000008400000000000000000000008400 + 0000000000000000000000000000000000000000000000848400848484000084 + 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00840000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 + 0000840000008400000084000000000000008400000000000000000000008400 + 0000000000000000000000000000000000000000000084848400008484008484 + 8400008484008484840084000000FFFFFF00840000008400000084000000FFFF + FF00840000008400000084000000840000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000000000000000 + 000000000000FFFFFF0084000000000000000000000000000000000000000000 + 0000000000000000000084000000000000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000848400848484000084 + 8400848484000084840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF0084000000FFFFFF0084000000000000000000000084000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00000000000000 + 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF0084000000000000000000000000000000000000000000 + 0000000000000000000084000000000000008400000000000000000000000000 + 0000000000000000000000000000000000000000000084848400008484008484 + 8400008484008484840084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00840000008400000000000000000000000000000000000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF0084000000FFFFFF000000000000000000FFFFFF008400 + 0000840000008400000084000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000848400848484000084 + 8400848484000084840084000000840000008400000084000000840000008400 + 0000840000000000000000000000000000008400000084000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00000000000000 + 0000000000000000000084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 + 0000FFFFFF008400000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000084848400008484008484 + 8400008484008484840000848400848484000084840084848400008484008484 + 8400008484000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF0084000000FFFFFF00FFFFFF00FFFFFF00FFFFFF008400 + 0000840000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000848400848484000000 + 0000000000000000000000000000000000000000000000000000000000008484 + 8400848484000000000000000000000000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00000000000000 + 0000FFFFFF000000000084000000840000008400000084000000840000008400 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000084848400848484000000 + 0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600000000008484 + 8400008484000000000000000000000000000000000084000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000848400848484000084 + 84000000000000FFFF00000000000000000000FFFF0000000000848484000084 + 8400848484000000000000000000000000008400000084000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000FFFF0000FFFF000000000000000000000000000000 + 0000000000000000000000000000000000000000000084000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000848484000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000008484840000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000084848400000000008484840000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008484840000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000084848400000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000084848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000848484000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000848484000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000084000000840000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000424D3E000000000000003E000000 + 2800000040000000700000000100010000000000800300000000000000000000 + 000000000000000000000000FFFFFF00FFF9FFFF00000000F830FFFF00000000 + E000000100000000C00100010000000080030001000000008003000100000000 + 0001000100000000000100010000000000010001000000000001000100000000 + 000100010000000080030001000000008003000100000000C00780FF00000000 + E00FC1FF00000000F83FFFFF00000000FFFFFFFFF81FC001FFFFFFFFE007C001 + FFFFFFFFC003C001FDFFFFBF8001C001F9FFFF9F8001C001F1FFFF8F0000C001 + E003C0070000C001C003C0030000C001C003C0030000C001E003C0070000C001 + F1FFFF8F0000C001F9FFFF9F8001C001FDFFFFBF8001C001FFFFFFFFC003C003 + FFFFFFFFE007C007FFFFFFFFF81FC00FFFFFFFFFFFFF0000C001C007E0017FFE + 80018003FFFF7FFE80010001E0E1000080010001F9F3FFFF80010001FCF30E07 + 8001000006039F0F80010000CF33CF1F80018000E793CF1F8001C000F003E03F + 8001E001F983E63F8001E007FC93F27F8001F007FE1FF07F8001F003FF1FF8FF + 8001F803FF9FF8FFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + 07C1FFFFC007001F07C18703C007000F07C1CF87C00700070101E78FC0070003 + 0001E78FC00700010201F01FC00700000201F31FC007001F8003F93FC007001F + C107F83FC007001FC107FC7FC0078FF1E38FFC7FC00FFFF9E38FFEFFC01FFF75 + E38FFFFFC03FFF8FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3FFFFFFFF3FFFC00 + DFFFFC01ED9F8000B803FC01ED6F00001FFFFC01ED6F0000FFFF0001F16F0000 + 1FFF0001FD1F0001BFFF0001FC7F0003D8030001FEFF00033FFF0003FC7F0003 + FFFF0007FD7F00031FFF000FF93F0003BFFF00FFFBBF0003380301FFFBBF8007 + BFFF03FFFBBFF87FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFF1FFFFFFFFFFFE00F1803E01FE07FFFFF1FFFF18FF8FFF83FFFFF + F18FF8FFF11FFFFFF18FFC7FF39F1FFFF01FFC7FF39F1803F18FFE3FF39F1FFF + F18FFE3FF39FFFFFF18FFF1FF39FFFFFE01FFE0FF39F1FFFFFFFFFFFE10F1803 + FFFFFFFFFFFF1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFF003FC00FF0030003FFFFFFFFFFFFFFFF0003000300030003 + FFFFFFFFFFFFFFFF003FC00FF0030003FFFFFFFFFFFFFFFF0003000300030003 + FFFFFFFFFFFFFFFF003FC00FF0030003FFFFFFFFFFFFFFFF0003000300030003 + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 + 000000000000} + end + object SpTBXPopupMenu1: TSpTBXPopupMenu + Left = 224 + Top = 352 + object pGroupItem1: TTBGroupItem + LinkSubitems = mToolbars + end + object SpTBXSeparatorItem10: TSpTBXSeparatorItem + end + object pCustomize: TSpTBXItem + Caption = 'Customize...' + OnClick = aCustomizeExecute + end + object pEmbeddedCustomize: TSpTBXItem + Caption = 'Embedded Customize...' + OnClick = aEmbeddedCustomizeExecute + end + end + object SpTBXCustomizer1: TSpTBXCustomizer + Images = ImageList1 + MenuBar = tbMenuBar + OnCreateCustomizeForm = SpTBXCustomizer1CreateCustomizeForm + Left = 192 + Top = 384 + object cPrint: TSpTBXItem + Caption = 'Print' + ImageIndex = 17 + OnClick = ActionsExecute + end + object cLeftJustify: TSpTBXItem + Caption = 'Left Justify' + ImageIndex = 0 + OnClick = ActionsExecute + end + object cCentered: TSpTBXItem + Caption = 'Centered' + ImageIndex = 1 + OnClick = ActionsExecute + end + object cRightJustify: TSpTBXItem + Caption = 'Right Justify' + ImageIndex = 2 + OnClick = ActionsExecute + end + object cBullets: TSpTBXItem + Caption = 'Bullets' + ImageIndex = 7 + OnClick = ActionsExecute + end + object cNumBullets: TSpTBXItem + Caption = 'Numbered Bullets' + ImageIndex = 8 + OnClick = ActionsExecute + end + object cSelectAll: TSpTBXItem + Caption = 'Select All' + ShortCut = 16449 + OnClick = ActionsExecute + end + object cExit: TSpTBXItem + Caption = 'Exit' + OnClick = ActionsExecute + end + end +end diff --git a/internal/2.4.4/1/Demos/Customizer/Unit1.pas b/internal/2.4.4/1/Demos/Customizer/Unit1.pas new file mode 100644 index 0000000..ecf61ea --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/Unit1.pas @@ -0,0 +1,363 @@ +unit Unit1; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, Menus, ImgList, ActnList, ComCtrls, + {$IFNDEF UNICODE} + TntActnList, TntDialogs, TntStdCtrls, TntSystem, TntForms, + {$ENDIF} + { TB2K } + TB2Dock, TB2Toolbar, TB2Item, TB2ExtItems, + SpTBXSkins, SpTBXItem, SpTBXControls, SpTBXDkPanels, SpTBXTabs, SpTBXEditors, + SpTBXExtEditors, SpTBXCustomizer, + { gettext } + gnugettext; + +type + TForm1 = class(TForm) + ImageList1: TImageList; + SpTBXDock1: TSpTBXDock; + SpTBXMultiDock1: TSpTBXMultiDock; + SpTBXMultiDock2: TSpTBXMultiDock; + SpTBXDock2: TSpTBXDock; + dpLog: TSpTBXDockablePanel; + dpHelp: TSpTBXDockablePanel; + tbStandard: TSpTBXToolbar; + tbFormat: TSpTBXToolbar; + tbMenuBar: TSpTBXToolbar; + tbNavigation: TSpTBXToolbar; + mFile: TSpTBXSubmenuItem; + mEdit: TSpTBXSubmenuItem; + mView: TSpTBXSubmenuItem; + mHelp: TSpTBXSubmenuItem; + mNew: TSpTBXItem; + mOpen: TSpTBXItem; + mSave: TSpTBXItem; + SpTBXSeparatorItem1: TSpTBXSeparatorItem; + mExit: TSpTBXItem; + mCut: TSpTBXItem; + mCopy: TSpTBXItem; + mPaste: TSpTBXItem; + SpTBXSeparatorItem2: TSpTBXSeparatorItem; + mSelectAll: TSpTBXItem; + SpTBXSeparatorItem3: TSpTBXSeparatorItem; + mFind: TSpTBXItem; + mLeftJustify: TSpTBXItem; + mUnderline: TSpTBXItem; + mItalic: TSpTBXItem; + mBold: TSpTBXItem; + SpTBXSeparatorItem5: TSpTBXSeparatorItem; + mRightJustify: TSpTBXItem; + mCentered: TSpTBXItem; + SpTBXSeparatorItem6: TSpTBXSeparatorItem; + mBullets: TSpTBXItem; + mNumberedBullets: TSpTBXItem; + mSidebar: TSpTBXSubmenuItem; + mOptions: TSpTBXItem; + mmHelp: TSpTBXItem; + mToolbars: TSpTBXSubmenuItem; + SpTBXPopupMenu1: TSpTBXPopupMenu; + mStandardToolbar: TSpTBXItem; + mFormattingToolbar: TSpTBXItem; + mNavigationToolbar: TSpTBXItem; + mCommandsLog: TSpTBXItem; + dpOptions: TSpTBXDockablePanel; + mmmHelp: TSpTBXItem; + mAbout: TSpTBXItem; + tNew: TSpTBXItem; + tOpen: TSpTBXItem; + tSave: TSpTBXItem; + tCut: TSpTBXItem; + tCopy: TSpTBXItem; + tPaste: TSpTBXItem; + tBold: TSpTBXItem; + SpTBXSeparatorItem8: TSpTBXSeparatorItem; + tItalic: TSpTBXItem; + tUnderline: TSpTBXItem; + mPrint: TSpTBXItem; + SpTBXSeparatorItem7: TSpTBXSeparatorItem; + SpTBXSeparatorItem9: TSpTBXSeparatorItem; + tFind: TSpTBXItem; + tStop: TSpTBXItem; + tRefresh: TSpTBXItem; + tForward: TSpTBXItem; + tBack: TSpTBXItem; + tSearch: TSpTBXItem; + pGroupItem1: TTBGroupItem; + SpTBXSeparatorItem10: TSpTBXSeparatorItem; + pCustomize: TSpTBXItem; + tbLayouts: TSpTBXToolbar; + tLayoutSave: TSpTBXItem; + SpTBXLabelItem1: TSpTBXLabelItem; + tLayoutsToolbar: TSpTBXItem; + SpTBXCustomizer1: TSpTBXCustomizer; + cPrint: TSpTBXItem; + cLeftJustify: TSpTBXItem; + cCentered: TSpTBXItem; + cNumBullets: TSpTBXItem; + cBullets: TSpTBXItem; + cRightJustify: TSpTBXItem; + cExit: TSpTBXItem; + cSelectAll: TSpTBXItem; + Memo1: TMemo; + SpTBXSubmenuItem1: TSpTBXSubmenuItem; + SpTBXTabControl1: TSpTBXTabControl; + SpTBXTabItem1: TSpTBXTabItem; + SpTBXTabSheet1: TSpTBXTabSheet; + SpTBXTabItem2: TSpTBXTabItem; + SpTBXTabSheet2: TSpTBXTabSheet; + Memo2: TMemo; + Memo3: TMemo; + SpTBXSeparatorItem12: TSpTBXSeparatorItem; + tSkins: TSpTBXSubmenuItem; + SpTBXSkinGroupItem1: TSpTBXSkinGroupItem; + pEmbeddedCustomize: TSpTBXItem; + SpTBXLabel1: TSpTBXLabel; + SpTBXSeparatorItem13: TSpTBXSeparatorItem; + SpTBXTabItem3: TSpTBXTabItem; + SpTBXTabSheet3: TSpTBXTabSheet; + Memo4: TMemo; + SpTBXSplitter1: TSpTBXSplitter; + SpTBXSplitter2: TSpTBXSplitter; + tLanguages: TSpTBXComboBox; + TBControlItem1: TTBControlItem; + tFont: TSpTBXComboBox; + TBControlItem2: TTBControlItem; + tFontSize: TSpTBXComboBox; + TBControlItem3: TTBControlItem; + tLayouts: TSpTBXComboBox; + TBControlItem4: TTBControlItem; + SpTBXStatusBar1: TSpTBXStatusBar; + SpTBXColorEdit1: TSpTBXColorEdit; + TBControlItem5: TTBControlItem; + procedure ActionsExecute(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure tLayoutSaveClick(Sender: TObject); + procedure tLayoutsItemClick(Sender: TObject); + procedure aCustomizeExecute(Sender: TObject); + procedure aEmbeddedCustomizeExecute(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure tLanguagesItemClick(Sender: TObject); + procedure SpTBXCustomizer1CreateCustomizeForm(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + FAppPath: string; + FIniPath: string; + procedure FillLayoutList(CurrentLayout: string = ''); + end; + +var + Form1: TForm1; + +implementation + +uses + Unit2; + +{$R *.dfm} + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Form } + +procedure TForm1.FormShow(Sender: TObject); +begin + FAppPath := IncludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName)); + FIniPath := FAppPath + 'Options.ini'; + + // Load the text files + Memo2.Lines.LoadFromFile(FAppPath + 'faq.txt'); + Memo3.Lines.LoadFromFile(FAppPath + 'advanced.txt'); + Memo4.Lines.LoadFromFile(FAppPath + 'translations.txt'); + + // Load the items positions and the last layout from the ini file + SpTBXCustomizer1.Load(FIniPath); + + // Load the layout list + FillLayoutList('LastLayout'); + + SpTBXCustomizer1.MenuBar := tbMenuBar; +end; + +procedure TForm1.FormDestroy(Sender: TObject); +begin + // Save the items positions and the current layout to the Ini file + SpTBXCustomizer1.Save(FIniPath); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Layouts UI } + +procedure TForm1.FillLayoutList(CurrentLayout: string); +var + I: integer; +begin + // Fill the tLayouts combobox + tLayouts.Items.Clear; + for I := 0 to SpTBXCustomizer1.Layouts.Count - 1 do + tLayouts.Items.Add(SpTBXCustomizer1.Layouts[I]); + I := tLayouts.Items.IndexOf(CurrentLayout); + if I > -1 then + tLayouts.ItemIndex := I; +end; + +procedure TForm1.tLayoutsItemClick(Sender: TObject); +begin + if tLayouts.ItemIndex > -1 then + SpTBXCustomizer1.LoadLayout(FIniPath, tLayouts.Items[tLayouts.ItemIndex]); +end; + +procedure TForm1.tLayoutSaveClick(Sender: TObject); +var + S: string; +begin + {$IFNDEF UNICODE} + S := TntDialogs.WideInputBox(_('Save Layout'), _('Save current layout as:'), ''); + {$ELSE} + S := InputBox(_('Save Layout'), _('Save current layout as:'), ''); + {$ENDIF} + if S <> '' then begin + SpTBXCustomizer1.SaveLayout(FIniPath, S); + FillLayoutList(S); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Actions } + +procedure TForm1.ActionsExecute(Sender: TObject); +begin + if Sender is TSpTBXItem then + Memo1.Lines.Add(TSpTBXItem(Sender).Caption); +end; + +procedure TForm1.aCustomizeExecute(Sender: TObject); +begin + SpTBXCustomizer1.Show; +end; + +procedure TForm1.aEmbeddedCustomizeExecute(Sender: TObject); +begin + if not Form2.Visible and not SpTBXCustomizer1.Showing then begin + SpTBXCustomizer1.ShowEmbedded(Form2.ClientPanel); + Form2.Show; + Form2.tCustomize.Click; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Languages } + +function MyWideCustomLoadResString(ResStringRec: PResStringRec; var Value: WideString): Boolean; +begin + Result := True; + Value := GnuGetText.LoadResStringW(ResStringRec); +end; + +procedure SpDxGetTextInitialize(LanguageCode: string; AComponents: array of TComponent; ShellFont, UnicodeResourceStrings: Boolean); +// LanguageCode can be an ISO language code: 'en', 'es', 'ko' +// And also can be the ISO code plus a description: '[en] English', '[es] Spanish', '[ko] Korean' +var + I, L: Integer; +begin + // Get the ISO language code + L := Length(LanguageCode); + if (L > 2) and (LanguageCode[1] = '[') then begin + I := Pos(']', LanguageCode); + if (I > 0) then + LanguageCode := Copy(LanguageCode, 2, I - 2); + end; + + {$IFNDEF UNICODE} + // Override Delphi's automatic ResourceString conversion to Ansi + if UnicodeResourceStrings then begin + TntSystem.InstallTntSystemUpdates; + // Override TNT's LoadResString function + // This is necessary because dxGetText uses a different + // way to access the translated ResourceStrings. + TntSystem.WideCustomLoadResString := MyWideCustomLoadResString; + end; + {$ENDIF} + + if ShellFont then begin + if (Win32Platform = VER_PLATFORM_WIN32_NT) and (Win32MajorVersion >= 5) then + DefFontData.Name := 'MS Shell Dlg 2' + else + DefFontData.Name := 'MS Shell Dlg'; + end; + + gnugettext.TP_GlobalIgnoreClassProperty(TAction,'Category'); + gnugettext.TP_GlobalIgnoreClassProperty(TControl,'HelpKeyword'); + gnugettext.TP_GlobalIgnoreClassProperty(TControl,'ImeName'); + gnugettext.TP_GlobalIgnoreClass(Graphics.TFont); + gnugettext.TP_GlobalIgnoreClass(TSpTBXTabSheet); + + gnugettext.UseLanguage(LanguageCode); + for I := Low(AComponents) to High(AComponents) do + gnugettext.TranslateComponent(AComponents[I]); +end; + +procedure SpDxGetTextChangeLanguage(LanguageCode: string; AComponents: array of TComponent); +// LanguageCode can be an ISO language code: 'en', 'es', 'ko' +// And also can be the ISO code plus a description: '[en] English', '[es] Spanish', '[ko] Korean' +var + I, L: Integer; + C: TComponent; +begin + // Get the ISO language code + L := Length(LanguageCode); + if (L > 2) and (LanguageCode[1] = '[') then begin + I := Pos(']', LanguageCode); + if (I > 0) then + LanguageCode := Copy(LanguageCode, 2, I - 2); + end; + + if LanguageCode <> gnugettext.GetCurrentLanguage then begin + gnugettext.UseLanguage(LanguageCode); + for I := Low(AComponents) to High(AComponents) do begin + C := AComponents[I]; + SpBeginUpdateAllToolbars(C); + try + gnugettext.ReTranslateComponent(C); + finally + SpEndUpdateAllToolbars(C); + end; + end; + end; +end; + +procedure TForm1.tLanguagesItemClick(Sender: TObject); +var + I: integer; +begin + I := tLanguages.ItemIndex; + if I > -1 then begin + tLanguages.Text := tLanguages.Items[I]; + // Change language and retranslate + if SpTBXCustomizer1.Showing then + SpDxGetTextChangeLanguage(tLanguages.Text, [Self, Form2, SpTBXCustomizer1.CustomizeForm]) + else + SpDxGetTextChangeLanguage(tLanguages.Text, [Self, Form2]); + end; +end; + +procedure TForm1.SpTBXCustomizer1CreateCustomizeForm(Sender: TObject); +begin + // Don't translate the skins combobox + gnugettext.TP_Ignore(SpTBXCustomizer1.CustomizeForm, 'cbSkins'); + // Make sure the Customizer form is translated + gnugettext.TranslateComponent(SpTBXCustomizer1.CustomizeForm); +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin + SpDxGetTextInitialize('en', [Self], True, True); + tLanguages.Items.LoadFromFile('langcodes.txt'); + tLanguages.ItemIndex := 2; +end; + +end. diff --git a/internal/2.4.4/1/Demos/Customizer/Unit2.dfm b/internal/2.4.4/1/Demos/Customizer/Unit2.dfm new file mode 100644 index 0000000..954ddc4 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/Unit2.dfm @@ -0,0 +1,1230 @@ +object Form2: TForm2 + Left = 279 + Top = 214 + BorderIcons = [biSystemMenu] + Caption = 'Options' + ClientHeight = 425 + ClientWidth = 456 + Color = clBtnFace + Constraints.MinHeight = 454 + Constraints.MinWidth = 464 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [] + OldCreateOrder = False + Position = poScreenCenter + OnClose = FormClose + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object SpTBXDock1: TSpTBXDock + Left = 0 + Top = 0 + Width = 86 + Height = 425 + BoundLines = [blTop, blBottom, blLeft, blRight] + Position = dpLeft + object SpTBXToolbar1: TSpTBXToolbar + Left = 0 + Top = 0 + DockMode = dmCannotFloatOrChangeDocks + DragHandleStyle = dhNone + Images = ImageList1 + Options = [tboImageAboveCaption, tboSameWidth] + ShrinkMode = tbsmNone + Stretch = True + TabOrder = 0 + Caption = 'SpTBXToolbar1' + Customizable = False + DisplayMode = tbdmImageAboveCaption + object tProperties: TSpTBXItem + Caption = 'Properties' + GroupIndex = 1 + ImageIndex = 0 + OnClick = SideBarClick + CustomWidth = 80 + CustomHeight = 75 + end + object tPageSetup: TSpTBXItem + Caption = 'Page Setup' + GroupIndex = 1 + ImageIndex = 1 + OnClick = SideBarClick + CustomWidth = 80 + CustomHeight = 75 + end + object tHistory: TSpTBXItem + Caption = 'History' + GroupIndex = 1 + ImageIndex = 2 + OnClick = SideBarClick + CustomWidth = 80 + CustomHeight = 75 + end + object tFavorites: TSpTBXItem + Caption = 'Favorites' + GroupIndex = 1 + ImageIndex = 3 + OnClick = SideBarClick + CustomWidth = 80 + CustomHeight = 75 + end + object tCustomize: TSpTBXItem + Caption = 'Customizer' + GroupIndex = 1 + ImageIndex = 4 + OnClick = SideBarClick + CustomWidth = 80 + CustomHeight = 75 + end + end + end + object LeftPanel: TPanel + Left = 86 + Top = 0 + Width = 370 + Height = 425 + Align = alClient + BevelOuter = bvNone + TabOrder = 1 + object ClientPanel: TPanel + Left = 0 + Top = 28 + Width = 370 + Height = 360 + Align = alClient + BevelOuter = bvNone + TabOrder = 0 + end + object TitlePanel: TSpTBXLabel + Left = 0 + Top = 0 + Width = 370 + Height = 28 + Caption = 'Customizer' + Color = clGray + Align = alTop + AutoSize = False + Font.Charset = ANSI_CHARSET + Font.Color = clSilver + Font.Height = -19 + Font.Name = 'Tahoma' + Font.Style = [fsBold] + ParentFont = False + end + object ButtonsPanel: TSpTBXPanel + Left = 0 + Top = 388 + Width = 370 + Height = 37 + Align = alBottom + TabOrder = 2 + Borders = False + TBXStyleBackground = True + DesignSize = ( + 370 + 37) + object SpTBXButton1: TSpTBXButton + Left = 124 + Top = 7 + Width = 75 + Height = 25 + Caption = 'OK' + Anchors = [akRight, akBottom] + TabOrder = 0 + OnClick = ButtonClick + end + object SpTBXButton2: TSpTBXButton + Left = 207 + Top = 7 + Width = 75 + Height = 25 + Caption = 'Cancel' + Anchors = [akRight, akBottom] + TabOrder = 1 + OnClick = ButtonClick + end + object SpTBXButton3: TSpTBXButton + Left = 287 + Top = 7 + Width = 75 + Height = 25 + Caption = 'Apply' + Anchors = [akRight, akBottom] + TabOrder = 2 + OnClick = ButtonClick + end + end + end + object ImageList1: TImageList + Height = 32 + Width = 32 + Left = 112 + Top = 392 + Bitmap = { + 494C010105000900040020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 0000000000003600000028000000800000004000000001002000000000000080 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000B55A0000B55A0000B55A0000B55A0000B55A0000B55A0000B55A + 0000B55A0000B55A0000B55A0000B55A0000B55A0000B55A0000B55A0000B55A + 0000B55A0000B55A0000B55A0000B55A0000B55A0000B55A0000B55A00000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000B55A0000F7ADA500F7ADA500F7ADA500F7ADA500F7ADA500F7AD + A500F7ADA500F7ADA500F7ADA500F7ADA500F7ADA500F7ADA500F7ADA500F7AD + A500F7ADA500F7ADA500F7ADA500F7ADA500F7ADA500F7ADA500B55A00000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000CE630000FFC6C600FFC6C600FFC6C600FFC6C60084848400FFC6 + C600FFC6C600FFC6C600FFC6C600FFC6C60084848400FFC6C600FFC6C600FFC6 + C600FFC6C600FFC6C60084848400FFC6C600FFC6C600FFC6C600CE6300000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000E7730000FFDEDE0084848400FFDEDE00FFDEDE0084848400FFDE + DE00FFDEDE0084848400FFDEDE00FFDEDE0084848400FFDEDE00FFDEDE008484 + 8400FFDEDE00FFDEDE0084848400FFDEDE00FFDEDE0084848400E77300000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000E7730000E7730000E7730000E7730000E7730000E7730000E773 + 0000E7730000E7730000E7730000E7730000E7730000E7730000E7730000E773 + 0000E7730000E7730000E7730000E7730000E7730000E7730000E77300000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000B55A0000B55A0000B55A0000B55A + 0000B55A0000B55A0000B55A0000B55A0000B55A0000B55A0000B55A0000B55A + 0000B55A0000B55A000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000FFDEDE00F7ADA500F7ADA500F7AD + A500F7ADA500F7ADA500F7ADA500F7ADA500F7ADA500F7ADA500F7ADA500F7AD + A500B55A00000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000FFDEDE00FFC6C600FFC6C600FFC6 + C600FFC6C6002D2D2D0058534E009C9C9C00FFC6C600FFC6C600F7ADA500B55A + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000FFDEDE00FFC6C600B55A0000B55A + 0000B55A000058534E00373C3E005160610052636B00F7ADA500B55A00000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000FFDEDE00FFC6C600CE6300000000 + 0000B55A0000D6D6D60054777B00428CDE0018556F008A5B5200000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000FFDEDE00FFC6C600CE630000B55A + 0000FFC6C600FFC6C60054777B0029799A008D787F00D47719008A5B52000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000FFDEDE00FFC6C600B55A0000FFC6 + C600FFC6C600FFC6C600848484007C707800F9C08600F8B26600D47719008A5B + 5200000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000FFDEDE00FFC6C600FFC6C600FFC6 + C600FFC6C600F7ADA500B55A000085787C00FBCA9500F9C08600F8B26600D477 + 19008A5B52000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000FFDEDE00FFC6C600FFC6C600FFC6 + C600F7ADA500B55A00000000000000000000AD7B7300FBD3A900F9C08600F8B2 + 6600D47719008A5B520000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000FFDEDE00FFC6C600FFC6C600F7AD + A500B55A000000000000000000000000000000000000AD7B7300FBD3A900F9C0 + 8600F8B26600D47719008A5B5200000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000FFDEDE00FFC6C600F7ADA500B55A + 0000000000000000000000000000000000000000000000000000AD7B7300FBD3 + A900F9C08600F8B26600D47719008A5B52000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000FFDEDE00F7ADA500B55A00000000 + 000000000000000000000000000000000000000000000000000000000000AD7B + 7300FBCA9500B9858500299CEF004ABDFF000A62A00000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000FFDEDE00B55A0000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000AD7B7300299CEF004ABDFF00299CEF00021EAA0000009A00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A0000B55A000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000004ABDFF00299CEF000936C9001029D6000316AC000018C6000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B55A00000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000018C6006D8AFD00106BFF000018C600000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000018C6000018C60000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000AD7B7B00B5848400B5848400B5848400B584 + 8400B5848400B5848400B5848400B5848400B5848400B5848400B5848400B584 + 8400B5848400B5848400B5848400B5848400B5848400B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000948C8C00948C8C00948C8C00948C8C00948C8C00948C8C000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000087BAD00087BAD000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000087BAD00087BAD00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000AD7B7B00EFDEC600F7E7C600F7DEBD00F7DE + B500F7D6B500F7D6AD00F7D6A500EFCE9C00EFCE9C00EFCE9400EFCE9400EFCE + 9400EFCE9400EFCE9400EFCE9400EFCE9400EFCE9400B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000E7C6AD00A57B6300A57B6300A57B6300A57B6300A57B6300A57B6300A57B + 6300A57B6300A57B6300A57B6300A57B6300A57B6300A57B6300000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000009C9C + 9C009C9C9C009C9C9C00A5A5A500ADADAD00A5A5A500A5A5A5009C9C9C00948C + 8C00948C8C000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000218CB50063C6E70031A5CE00087B + AD00000000000000000000000000000000000000000000000000000000000000 + 0000107BAD0021ADD60029BDE700107BAD000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000AD7B7B00EFDEC600F7E7CE00F7DEC600F7DE + BD00F7D6B500F7D6AD00F7D6AD00EFCEA500EFCE9C00EFCE9C00EFCE9400EFCE + 9400EFCE9400EFCE9400EFCE9400EFCE9400EFCE9400B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000FFDED600F7CEBD00F7CEBD00F7CEBD00F7CEBD00F7CEBD00F7CEBD00F7CE + BD00F7CEBD00F7CEBD00F7CEBD00F7CEBD00F7CEBD00DEAD8C00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000009C9C9C00948C8C00B5AD + AD00CECECE00D6D6D600C6C6C600BDBDBD00BDBDBD00C6BDBD00CEC6C600CEC6 + C600B5ADAD00948C8C00948C8C00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000001884B50084DEF70073EFFF0042B5 + D600087BAD000000000000000000000000000000000000000000000000001084 + B50039C6E700FFFFFF0031C6EF00087BAD000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000AD7B7B00F7DECE00F7E7CE00F7DEC600F7DE + C600F7DEBD00F7D6B500F7D6AD00F7D6AD00EFCEA500EFCE9C00EFCE9C00EFCE + 9400EFCE9400EFCE9400EFCE9400EFCE9400EFCE9400B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000FFDED600F7CEBD008C6B5200F7CEBD00F7CEBD008C6B5200F7CEBD00F7CE + BD008C6B5200F7CEBD00F7CEBD008C6B5200F7CEBD00DEAD8C00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000009C9C9C00A5A5A500D6D6D600E7E7 + E700B5B5B5008C8484008C847B009C9484009C948400948C7B00847B73009C94 + 9400D6C6C600D6C6C600AD9C9C00948C8C000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000087BAD0052B5D6006BE7FF0073E7 + FF0042BDDE00087BAD00000000000000000000000000000000001884B5004ACE + EF00FFFFFF0042E7FF00189CC600087BAD000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000AD7B7B00F7E7CE00F7E7D600F7E7CE00F7DE + C600F7DEBD00F7DEBD00F7D6B500F7D6AD00F7D6AD00EFCEA500EFCE9C00EFCE + 9C00EFCE9400EFCE9400EFCE9400EFCE9400EFCE9400B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000E7C6AD00E7C6AD00E7C6AD00E7C6AD00E7C6AD00E7C6AD00E7C6AD00E7C6 + AD00E7C6AD00E7C6AD00E7C6AD00E7C6AD00E7C6AD00E7C6AD00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000009C9C9C00ADADAD00EFEFEF00D6D6D6008C8C + 8400A59C8C00D6D6BD00FFF7E700CECEF700849CF700FFF7E700E7E7CE00ADAD + 94007B736B00B5A5A500E7CECE00B5A5A500948C8C0000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000087BAD0073DEF7005AE7 + FF007BEFFF0052C6E700087BAD000000000000000000218CB5006BDEF700FFFF + FF0042E7FF0031C6EF00107BAD00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000AD7B7B00F7E7D600F7EFDE00F7E7D600F7E7 + CE00F7DEC600F7DEC600F7DEBD00F7D6B500F7D6AD00F7D6AD00EFCEA500EFCE + 9C00EFCE9C00EFCE9400EFCE9400EFCE9400EFCE9400B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000E7C6AD00A57B6300A57B6300A57B + 6300000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000009C9C9C00A5A5A500EFEFEF00D6D6D6008C8C8400CEC6 + B500FFFFEF00FFF7E700FFE7C600D6BDBD00AD9CBD00FFE7CE00FFF7EF00FFFF + FF00E7E7CE00847B6B00AD949400EFCECE00AD9C9C00948C8C00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000087BAD0063C6E70052E7 + FF0063E7FF007BEFFF0063CEE7001084B500188CBD0073DEF700FFFFFF005AE7 + FF004AE7FF0021ADD600087BAD00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000AD847B00F7E7DE00F7EFDE00F7E7D600F7E7 + CE00F7E7CE00F7DEC600F7DEC600F7DEBD00F7D6B500F7D6AD00F7D6AD00EFCE + A500EFCE9C00EFCE9C00EFCE9400EFCE9400EFCE9400B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD00F7CEBD00DEAD + 8C0000000000B5848400B5848400B5848400B5848400B5848400B5848400B584 + 8400B5848400B5848400B5848400B5848400B5848400B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000009C9C9C00D6DED60042944A00427B4200D6D6BD00FFFF + EF00FFE7C600F7D6A500F7C69400F7C68400F7C68400EFBD8400F7D6AD00FFF7 + DE00FFFFFF00F7F7E700847B6B00BDA5A500E7C6C600948C8C00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000399CC60063E7 + FF004ADEFF0063E7FF0084EFFF0073DEF7007BE7F700FFFFFF007BEFFF006BE7 + FF0052DEFF00108CB50000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000AD847B00F7EFE700F7EFE700292921005A52 + 42005A5242005A5242005A5242005A524200F7DEBD00F7D6B500F7D6AD00F7D6 + AD00EFCEA500EFCE9C00EFCE9C00EFCE9400EFCE9400B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD008C6B5200DEAD + 8C0000000000C6A59C00FFEFD600F7E7C600F7DEBD00F7DEB500F7D6AD00F7D6 + A500EFCE9C00EFCE9400EFCE9400EFCE9400F7D69C00B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000009C9C9C00B5B5B5006BA56B0031AD4A00219C39009CC69400FFF7 + CE00FFEFC600FFE7BD00F7DEB500F7D6AD00F7C69400F7C68C00F7CE9C00F7DE + B500FFF7CE00FFFFFF00E7DECE00736B6300E7C6C600BDADAD00948C8C000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000107BAD0063CE + E70042DEFF004ADEFF0063E7FF0084EFFF0094EFFF009CEFFF008CEFFF007BEF + FF004AC6E700087BAD0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B58C7B00F7EFE700FFF7EF0018181800DECE + CE008494EF000842FF00394AAD00524A4200F7DEBD00F7DEBD00F7D6B500F7D6 + AD00F7D6AD00EFCEA500EFCE9C00EFCE9C00EFCE9400B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD00F7CEBD00DEAD + 8C0000000000C6A59C00FFEFD600F7E7CE00F7DEC600F7DEBD00F7D6B500F7D6 + A500EFCE9C00EFCE9C00EFCE9400EFCE9400EFCE9C00B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000009C9C9C0084B58400219C39005AE78C0052DE8400218C2900B5D6 + 9C00FFFFD600FFFFD600FFFFD600FFF7CE00FFE7B500F7D6A500F7C69400F7CE + 9C00F7CE9C00FFE7C600FFFFFF00A59C8C00A58C8C00E7C6C600948C8C000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000087B + AD004ADEFF0039DEFF0052DEFF0063E7FF007BEFFF0094EFFF009CEFFF0084EF + FF00087BAD000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000B58C8400F7EFEF00FFF7EF00292929007384 + D6004263F700A5ADE7001039E7004A424A00F7DEC600F7DEBD00F7DEBD00F7D6 + B500F7D6AD00F7D6AD00EFCEA500EFCE9C00EFCE9400B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD00F7CEBD00DEAD + 8C0000000000C6ADA500FFEFE700F7E7D600F7E7CE00F7DEC600F7DEBD00F7D6 + B500F7D6AD00EFCE9C00EFCE9C00EFCE9400EFCE9C00B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00009C9C9C0052845200108C210042D66B0052DE7B005AE78C0052DE7B00298C + 3100DEEFBD00FFFFD600FFFFD600FFFFDE00FFFFD600FFEFC600F7D6A500F7C6 + 9400EFBD8400F7C68C00FFF7E700DEDEC6007B736300EFC6C600A59C9C00A59C + 9C00000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000087BAD001084B50021B5 + DE0021D6FF0029D6FF0042DEFF0052DEFF006BE7FF0084EFFF0094EFFF0094EF + FF0042ADCE00087BAD0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000BD8C8400F7F7F700FFFFF700181818009494 + B500C6C6CE00DECECE004A63CE00214AD600F7DECE00F7DEC600F7DEC600F7DE + BD00F7D6B500F7D6AD00F7D6AD00EFCEA500EFCE9C00B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD008C6B5200DEAD + 8C0000000000C6ADA500FFF7E700F7E7D600F7E7CE00F7E7C600F7DEC600F7DE + B500F7D6B500F7D6AD00EFCE9C00EFCE9C00EFCE9400B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00009C9C9C00108C180029BD420039CE5A0042CE63004AD67B005AE78C004AD6 + 7B0031943900DEEFBD00FFFFD600E7E7C600CEC6B500FFFFD600FFF7CE00FFDE + A500F7C68C00EFB57B00FFE7C600FFFFE7007B736300E7BDBD00B5A5A500A59C + 9C00000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000073AD002994C60052CEEF0042DE + FF0021D6FF0018CEFF0029D6FF0042DEFF0052DEFF006BE7FF0084EFFF009CEF + FF009CEFFF0063C6E700188CB500000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000BD948400F7F7F700FFFFFF00424242004242 + 4200424242004242390042424A001842D600738CEF0084848400F7DEC600F7DE + BD00F7DEBD00F7D6B500F7D6AD00F7D6AD00EFCEA500B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD00F7CEBD00DEAD + 8C0000000000CEB5AD00FFFFF700FFEFE700F7E7D600F7E7D600F7E7CE00F7DE + C600F7DEBD00F7D6B500F7D6AD00EFCE9C00EFCE9C00B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000730800109C180018A5290029BD420031C6520042CE630029A5420029A5 + 4200188C2900398C3900E7EFC6008C847B0063636B0073736B009C9C8C00948C + 7B009C846B00EFB57B00D6BDB500ADBDF700847B7300E7BDBD00BDADAD00A59C + 9C00000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000087BAD001884B50063BDDE008CE7FF0073E7FF0052DE + FF0039DEFF0021D6FF0018D6FF0029D6FF0042DEFF005AE7FF006BE7FF0084EF + FF009CEFFF009CF7FF007BE7F70031A5CE00087BAD0000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000C6948400F7F7F700FFFFFF00F7F7F700F7EF + EF00F7EFE700F7EFE700F7E7DE00DED6D600426BF7004A6BEF009CA5DE00F7DE + C600F7DEBD00F7DEBD00F7D6B500F7D6AD00EFCEA500B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD00F7CEBD00DEAD + 8C0000000000D6B5AD00FFFFFF00FFF7EF00FFEFE700F7E7D600F7E7CE00F7E7 + C600F7DEC600F7DEBD00F7D6AD00F7D6A500F7D6A500B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000007308004A8C52002184290018AD310029BD420031C65200298C2900B5D6 + B500BDD6AD00B5D69C00DEEFBD008C8C8400737373002121290052524A005252 + 4A00635A4A00EFBD8400BDADB500738CEF00847B7300E7BDBD00BDADAD00A59C + 9C00000000000000000000000000000000000000000000000000000000000000 + 000000000000087BAD0042A5C600ADE7F700CEFFFF00ADF7FF008CE7FF006BE7 + FF0052DEFF0039DEFF0021D6FF0018D6FF0029D6FF0042DEFF005AE7FF0073E7 + FF008CE7FF009CEFFF0094EFFF0084EFFF0052C6E700087BAD00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000C69C8400F7F7F700FFFFFF00FFFFFF00FFFF + FF00FFF7F700FFF7EF00F7EFE700F7EFE700F7E7DE0094A5EF00637BEF00F7E7 + CE00F7DEC600F7DEBD00F7DEBD00F7D6B500F7D6AD00B58C7B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD008C6B5200DEAD + 8C0000000000D6BDB500FFFFFF00FFF7F700FFF7EF00FFEFDE00F7E7D600F7E7 + CE00F7E7C600F7DEC600F7DEBD00F7D6B500F7D6AD00B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00009C9C9C00ADADAD0073AD7300109C180021B5390021B5390042944200FFFF + FF00FFFFFF00FFFFE700FFFFD600E7E7C600ADAD9400424242006B6B6300FFF7 + CE00FFDEAD00EFBD8400F7DEB500FFF7DE00847B6B00E7C6C600B5A5A500A59C + 9C00000000000000000000000000000000000000000000000000000000000000 + 0000107BAD008CCEE700DEFFFF00DEFFFF00D6FFFF00CEFFFF00B5F7FF009CEF + FF0084EFFF0063E7FF0039DEFF0018D6FF0018D6FF0031DEFF004ADEFF0063E7 + FF0073E7FF0094EFFF009CEFFF008CEFFF0084EFFF0063E7FF00087BAD000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000C69C8400F7F7F700FFFFFF00848484008484 + 840084848400848484008484840084848400F7EFE700F7EFDE00F7E7D600F7E7 + CE00F7E7CE00F7DEC600F7DEBD00F7DEBD00DEC6A5009C847B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD00F7CEBD00DEAD + 8C0000000000D6BDB500FFFFFF00FFFFFF00FFF7F700FFF7EF00FFEFE700F7E7 + D600F7E7CE00F7DEC600F7DEBD00F7DEB500F7DEB500B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00009C9C9C009C9C9C00B5D6B500088C100010AD210018AD3100298C3100F7FF + F700FFFFFF00FFFFFF00FFFFE700FFFFDE00FFFFDE00D6D6BD00424242006B6B + 6300F7DEB500F7CE9C00FFEFD600D6D6BD008C7B7B00EFC6C600A59C9C00A59C + 9C00000000000000000000000000000000000000000000000000000000000000 + 000000000000087BAD00087BAD00087BAD00087BAD00087BAD00087BAD00087B + AD00087BAD0073BDDE0073E7FF0029D6FF0018D6FF0018D6FF0021ADD600087B + AD00087BAD00087BAD00087BAD00087BAD00087BAD00087BAD00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000CE9C8C00FFF7F700FFFFFF00080808008C8C + 8C00ADB5B500848CAD005A637B0042424200F7EFE700F7EFE700F7EFDE00F7E7 + D600F7E7CE00F7E7CE00EFD6BD00CEBDAD00B5AD94009C847B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD00F7CEBD00DEAD + 8C0000000000DEBDB500FFFFFF00FFFFFF00FFFFFF00FFF7F700FFEFE700FFEF + DE00F7E7D600F7E7CE00F7DEC600F7DEC600F7D6B500B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000094949400D6D6D600298C2900109C180010AD2100108C1800ADCE + AD00FFFFFF00FFFFFF00FFFFFF00FFFFF700FFFFDE00FFFFDE00E7E7C6004A4A + 4200524A4200E7CEAD00FFFFE700A5A58C00B59C9C00E7C6C600A59C9C000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000087BAD008CE7FF004ADEFF0031DEFF0018CEFF000884B5000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000CEA58C00FFF7F700FFFFFF0018181800EFEF + EF00CED6F700295AFF00526BBD005A5A5A00F7F7EF00F7EFE700F7EFE700F7EF + DE00F7EFDE00E7DECE00CEBDAD00BDB5A500B5AD9C009C847B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD008C6B5200DEAD + 8C0000000000DEC6B500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFEF + E700FFEFDE00FFEFDE00FFEFD600E7DEC600C6BDAD00B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000094949400B5ADAD0084B58400088C100010AD2100109C1800298C + 3100E7EFDE00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFEF00FFFFEF00E7E7 + C60052525200BDBDB500E7E7C6008C848400EFC6C600B5A5A500A59C9C000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000087BAD009CE7FF0063E7FF004ADEFF0029CEF700087BAD000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000D6A58C00FFF7F700FFFFFF00292929007B94 + DE003163FF00849CFF001039E7004A4A5200FFF7F700FFF7EF00FFF7E700EFDE + D600B5847300AD847300AD7B7300AD7B7300AD7B7300AD847300000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD00F7CEBD00DEAD + 8C0000000000E7C6B500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7 + EF00FFF7EF00F7E7D600C6A59400B5948C00B58C8400B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000094949400CECECE0042944A000894180010AD2100109C + 1800218C29007BB57B00CEE7CE00F7FFF700FFFFFF00FFFFFF00FFFFFF00FFFF + EF00FFF7DE00E7EFC60094948C00CEB5B500DEC6C600948C8C00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000087BAD009CDEF70084EFFF0063E7FF0039C6E700087BAD000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000DEAD8C00FFF7F700FFFFFF00181818009CA5 + C600CED6EF00FFFFFF004A6BE700314AC600FFFFF700FFF7F700FFF7EF00E7CE + C600B5847300E7B58400E7AD6B00EFA55200EFA53900B5848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD00F7CEBD00DEAD + 8C0000000000E7C6B500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFF700E7CECE00BD8C7300EFB57300EFA54A00C6846B00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000949494009C9C9C00D6DED600398C4200088C1000109C + 180008A51800089418000884100018842100218431004A9C4A00FFFFFF00FFFF + EF00E7E7C600A59C9400C6ADAD00E7C6C600A59C9C0094949400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000087BAD009CD6E7009CEFFF007BEFFF0039B5DE00087BAD000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000DEAD8C00FFF7F700FFFFFF00292929004242 + 42004242420042424200313952001039E7009CB5FF00FFFFFF00FFFFF700E7CE + C600B5847300EFC68C00F7BD6B00FFB55200B584840000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD008C6B5200DEAD + 8C0000000000EFCEBD00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00E7D6CE00C6947B00FFC67300CE94730000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000094949400A5A5A500D6DED6007BAD8400398C + 390018842100108C1800188C2900298C31004294520094BD8C00E7EFDE00C6C6 + B500A59C9C00CEBDBD00E7C6C600AD9C9C009494940000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000087BAD00087BAD00C6F7FF0094EFFF00087BAD00087BAD000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000DEAD8C00FFF7F700FFFFFF00EFEFEF00EFEF + EF00EFEFEF00EFEFEF00EFEFEF00CED6EF003163FF006B8CFF00C6CEFF00E7D6 + CE00B5847300EFC68C00F7BD6B00B58484000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFDED600F7CEBD00F7CEBD00DEAD + 8C0000000000E7C6B500FFF7F700FFF7EF00FFF7EF00FFF7EF00FFF7EF00FFF7 + EF00FFF7EF00E7CECE00C6947B00CE9C84000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000949494009C9C9C00CECECE00E7E7 + E700CECECE00BDBDB500BDB5AD00CEBDAD00CEBDAD00BDB5AD00B5ADAD00C6B5 + B500DEC6C600D6BDBD00A59C9C00949494000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000087BAD00DEFFFF00ADF7FF00087BAD00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000DEAD8C00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00EFEFFF006B8CFF00426BFF00E7D6 + D600B5847300EFC68C00B5848400000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000E7C6AD00E7C6AD00E7C6AD00DEAD + 8C0000000000E7C6B500EFCEB500EFCEB500EFCEB500EFCEB500E7C6B500E7C6 + B500EFCEB500D6BDB500BD847B00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000009494940094949400A5A5 + A500C6C6C600D6D6D600CECECE00C6C6C600C6C6C600C6C6C600CEC6C600C6BD + BD00A5A5A5009494940094949400000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000087BAD00F7FFFF00C6F7FF00087BAD00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000DEAD8C00E7CEBD00EFD6BD00EFD6BD00EFCE + C600E7CEBD00E7CEBD00E7CEBD00E7CEBD00DEC6BD00DEC6BD00DEC6BD00CEAD + A500B5847300B584840000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000009494 + 940094949400949494009C9C9C00A5A5A500A5A5A500A59C9C00949494009494 + 9400949494000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000087BAD009CCEE70073BDDE00087BAD00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000DEA58400D6A58400D6A58400D6A58400D6A5 + 8400D69C7B00CE9C7B00CE947B00C6947B00C6947B00C68C7B00BD8C7300B584 + 7300B58484000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000948C8C00948C8C00948C8C00948C8C00948C8C00948C8C000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000087BAD00087BAD0000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000424D3E000000000000003E000000 + 2800000080000000400000000100010000000000000400000000000000000000 + 000000000000000000000000FFFFFF00FFFFFFFF000000000000000000000000 + FFFFFFFF000000000000000000000000FFFFFFFF000000000000000000000000 + FFFFFFFF000000000000000000000000FFFFFFFF000000000000000000000000 + F800001F000000000000000000000000F800001F000000000000000000000000 + F800001F000000000000000000000000F800001F000000000000000000000000 + F800001F000000000000000000000000FFFFFFFF000000000000000000000000 + FE0003FF000000000000000000000000FE0007FF000000000000000000000000 + FE000FFF000000000000000000000000FE001FFF000000000000000000000000 + FE103FFF000000000000000000000000FE001FFF000000000000000000000000 + FE000FFF000000000000000000000000FE0007FF000000000000000000000000 + FE0303FF000000000000000000000000FE0781FF000000000000000000000000 + FE0FC0FF000000000000000000000000FE1FE07F000000000000000000000000 + FE3FF03F000000000000000000000000FE7FF81F000000000000000000000000 + FEFFFC3F000000000000000000000000FFFFFE7F000000000000000000000000 + FFFFFFFF000000000000000000000000FFFFFFFF000000000000000000000000 + FFFFFFFF000000000000000000000000FFFFFFFF000000000000000000000000 + FFFFFFFF000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE00003FFFFFFFFFFFF81FFFFF9FF9FF + FE00003FFFF0003FFFE007FFFF0FF0FFFE00003FFFF0003FFF8001FFFF07E0FF + FE00003FFFF0003FFF0000FFFF03C0FFFE00003FFFF0003FFE00007FFF8181FF + FE00003FFF0FFFFFFC00003FFF8001FFFE00003FFF08003FFC00003FFFC003FF + FE00003FFF08003FF800001FFFC003FFFE00003FFF08003FF800001FFFE007FF + FE00003FFF08003FF000000FFF8003FFFE00003FFF08003FF000000FFF0001FF + FE00003FFF08003FF000000FFC00007FFE00003FFF08003FF000000FF800003F + FE00003FFF08003FF000000FF000001FFE00003FFF08003FF000000FF800003F + FE00003FFF08003FF800001FFFF81FFFFE00003FFF08003FF800001FFFF81FFF + FE00003FFF08003FFC00003FFFF81FFFFE00003FFF08003FFC00003FFFF81FFF + FE00007FFF08007FFE00007FFFF81FFFFE0000FFFF0800FFFF0000FFFFFC3FFF + FE0001FFFF0801FFFF8001FFFFFC3FFFFE0003FFFFFFFFFFFFE007FFFFFC3FFF + FE0007FFFFFFFFFFFFF81FFFFFFE7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 + 000000000000} + end +end diff --git a/internal/2.4.4/1/Demos/Customizer/Unit2.pas b/internal/2.4.4/1/Demos/Customizer/Unit2.pas new file mode 100644 index 0000000..dfb6414 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/Unit2.pas @@ -0,0 +1,78 @@ +unit Unit2; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ImgList, ExtCtrls, + { gettext } + gnugettext, + { TB2K } + TB2Item, TB2Dock, TB2Toolbar, SpTBXItem, SpTBXControls, SpTBXDkPanels; + +type + TForm2 = class(TForm) + SpTBXDock1: TSpTBXDock; + SpTBXToolbar1: TSpTBXToolbar; + SpTBXButton1: TSpTBXButton; + SpTBXButton2: TSpTBXButton; + SpTBXButton3: TSpTBXButton; + ImageList1: TImageList; + tProperties: TSpTBXItem; + tPageSetup: TSpTBXItem; + tHistory: TSpTBXItem; + tFavorites: TSpTBXItem; + tCustomize: TSpTBXItem; + ClientPanel: TPanel; + LeftPanel: TPanel; + TitlePanel: TSpTBXLabel; + ButtonsPanel: TSpTBXPanel; + procedure SideBarClick(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure ButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form2: TForm2; + +implementation + +uses + Unit1; + +{$R *.dfm} + +procedure TForm2.ButtonClick(Sender: TObject); +begin + Close; +end; + +procedure TForm2.SideBarClick(Sender: TObject); +var + Item: TSpTBXItem; +begin + if Sender is TSpTBXItem then begin + Item := Sender as TSpTBXItem; + Item.Checked := True; + TitlePanel.Caption := Item.Caption; + ClientPanel.Visible := Item = tCustomize; + end; +end; + +procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction); +begin + // We need to close the customizer form manually here + Form1.SpTBXCustomizer1.Close; +end; + +procedure TForm2.FormCreate(Sender: TObject); +begin + gnugettext.TranslateComponent(Self); +end; + +end. diff --git a/internal/2.4.4/1/Demos/Customizer/advanced.txt b/internal/2.4.4/1/Demos/Customizer/advanced.txt new file mode 100644 index 0000000..bed4456 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/advanced.txt @@ -0,0 +1,55 @@ + +Advanced Techniques: + +1) How can I embed the customizer? + +You can embed the customizer to another control, but the form of this control cannot be modal or the drag & drop will not work. +You also need to close the customizer explicitly by calling the Close method. + +SpTBXCustomizer1.ShowEmbedded(Panel1); + +2) How can I store more options related to the items customizations? + +To load and store your custom data use the OnLoad and OnSave events: + +procedure TForm1.SpTBXCustomizer1Save(Sender: TObject; + LayoutName: String; ExtraOptions: TStringList); +begin + // Save the Form's font size + ExtraOptions.Values['FontSize'] := IntToStr(Font.Size); +end; + +procedure TForm1.SpTBXCustomizer1Load(Sender: +TObject; LayoutName: String; ExtraOptions: TStringList); +var + S: string; +begin + // Restore the Form's font size + S := ExtraOptions.Values['FontSize']; + if S <> '' then + Font.Size := StrToInt(S); +end; + +3) How can I store more options related to a specific layout? + +The layout is just the position and visibility of the toolbars and dockable panels, but you can store more options related to a layout. +To load and store your custom data use the OnLayoutLoad and OnLayoutSave events: + +procedure TForm1.SpTBXCustomizer1LayoutSave(Sender: +TObject; + LayoutName: String; ExtraOptions: TStringList); +begin + // Save the Form's WindowState + ExtraOptions.Values['MyOption'] := IntToStr(Ord(WindowState)); +end; + +procedure TForm1.SpTBXCustomizer1LayoutLoad(Sender: +TObject; LayoutName: String; ExtraOptions: TStringList); +var + S: string; +begin + // Restore the Form's WindowState + S := ExtraOptions.Values['MyOption']; + if S <> '' then + WindowState := TWindowState(StrToInt(S)); +end; \ No newline at end of file diff --git a/internal/2.4.4/1/Demos/Customizer/faq.txt b/internal/2.4.4/1/Demos/Customizer/faq.txt new file mode 100644 index 0000000..d6adc52 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/faq.txt @@ -0,0 +1,33 @@ + +TSpTBXCustomizer FAQ: + +1) What is it? + +TSpTBXCustomizer is a SpTBXLib toolbar customization component. +It allows you to save the toolbars and dockable panels layout and customize the toolbars items. + +2) How do I start using it? + +Double click the TSpTBXCustomizer or use the Items property to add your custom commands. +Use the ImageList property to hook the images to the commands, and the Menubar property to fill the shortcuts list. +To show the customizer at runtime use the Show method. + +3) How do I load and save the items customizations? + +You can load and save to the Registry or to an Ini file, call the Load method from the Form.OnShow event, and the Save method from the Form.OnDestroy event: + +SpTBXCustomizer1.Load('C:\Options.ini'); + +SpTBXCustomizer1.Save('C:\Options.ini'); + +SpTBXCustomizer1.Load(HKEY_CURRENT_USER, +'Software\Silverpointdev\CustomizerDemo'); + +SpTBXCustomizer1.Save(HKEY_CURRENT_USER, +'Software\Silverpointdev\CustomizerDemo'); + +4) How do I load a specific layout? + +Once the toolbar layouts are loaded you can access the available layouts through the Layouts property. +To load a specific layout use the LoadLayout method. +To save the current layout use the SaveLayout method. \ No newline at end of file diff --git a/internal/2.4.4/1/Demos/Customizer/gnugettext.pas b/internal/2.4.4/1/Demos/Customizer/gnugettext.pas new file mode 100644 index 0000000..bcc3054 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/gnugettext.pas @@ -0,0 +1,2995 @@ +{*------------------------------------------------------------------------------ + GNU gettext translation system for Delphi, Kylix, C++ Builder and others. + All parts of the translation system are kept in this unit. + + @author Lars B. Dybdahl and others + @version $LastChangedRevision$ + @see http://dybdahl.dk/dxgettext/ +-------------------------------------------------------------------------------} +unit gnugettext; +(**************************************************************) +(* *) +(* (C) Copyright by Lars B. Dybdahl and others *) +(* E-mail: Lars@dybdahl.dk, phone +45 70201241 *) +(* *) +(* Contributors: Peter Thornqvist, Troy Wolbrink, *) +(* Frank Andreas de Groot, Igor Siticov, *) +(* Jacques Garcia Vazquez, Igor Gitman *) +(* *) +(* See http://dybdahl.dk/dxgettext/ for more information *) +(* *) +(**************************************************************) + +// Information about this file: +// $LastChangedDate$ +// $LastChangedRevision$ +// $HeadURL$ + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// The names of any contributor may not be used to endorse or promote +// products derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +interface + +// If the conditional define DXGETTEXTDEBUG is defined, debugging log is activated. +// Use DefaultInstance.DebugLogToFile() to write the log to a file. +{ $define DXGETTEXTDEBUG} + +{$ifdef VER140} + // Delphi 6 + {$DEFINE DELPHI2007OROLDER} +{$ifdef MSWINDOWS} + {$DEFINE DELPHI6OROLDER} +{$endif} +{$endif} +{$ifdef VER150} + // Delphi 7 + {$DEFINE DELPHI2007OROLDER} +{$endif} +{$ifdef VER160} + // Delphi 8 + {$DEFINE DELPHI2007OROLDER} +{$endif} +{$ifdef VER170} + // Delphi 2005 + {$DEFINE DELPHI2007OROLDER} +{$endif} +{$ifdef VER180} + // Delphi 2006 + {$DEFINE DELPHI2007OROLDER} +{$endif} +{$ifdef VER190} + // Delphi 2007 + {$DEFINE DELPHI2007OROLDER} +{$endif} +{$ifdef VER200} + // Delphi 2009 with Unicode +{$endif} + +uses +{$ifdef MSWINDOWS} + Windows, +{$else} + Libc, +{$ifdef FPC} + CWString, +{$endif} +{$endif} + Classes, StrUtils, SysUtils, TypInfo; + +(*****************************************************************************) +(* *) +(* MAIN API *) +(* *) +(*****************************************************************************) + +type + {$IFNDEF UNICODE} + UnicodeString=WideString; + RawUtf8String=AnsiString; + RawByteString=Ansistring; + {$ELSE} + RawUtf8String=RawByteString; + {$ENDIF} + DomainString=string; + LanguageString=string; + ComponentNameString=string; + FilenameString=string; + MsgIdString=UnicodeString; + TranslatedUnicodeString=UnicodeString; + +// Main GNU gettext functions. See documentation for instructions on how to use them. +function _(const szMsgId: MsgIdString): TranslatedUnicodeString; +function gettext(const szMsgId: MsgIdString): TranslatedUnicodeString; +function dgettext(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString; +function dngettext(const szDomain: DomainString; const singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString; +function ngettext(const singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString; +procedure textdomain(const szDomain: DomainString); +function getcurrenttextdomain: DomainString; +procedure bindtextdomain(const szDomain: DomainString; const szDirectory: FilenameString); + +// Set language to use +procedure UseLanguage(LanguageCode: LanguageString); +function GetCurrentLanguage:LanguageString; + +// Translates a component (form, frame etc.) to the currently selected language. +// Put TranslateComponent(self) in the OnCreate event of all your forms. +// See the manual for documentation on these functions +type + TTranslator=procedure (obj:TObject) of object; + +procedure TP_Ignore(AnObject:TObject; const name:ComponentNameString); +procedure TP_IgnoreClass (IgnClass:TClass); +procedure TP_IgnoreClassProperty (IgnClass:TClass;const propertyname:ComponentNameString); +procedure TP_GlobalIgnoreClass (IgnClass:TClass); +procedure TP_GlobalIgnoreClassProperty (IgnClass:TClass;const propertyname:ComponentNameString); +procedure TP_GlobalHandleClass (HClass:TClass;Handler:TTranslator); +procedure TranslateComponent(AnObject: TComponent; const TextDomain:DomainString=''); +procedure RetranslateComponent(AnObject: TComponent; const TextDomain:DomainString=''); + +// Add more domains that resourcestrings can be extracted from. If a translation +// is not found in the default domain, this domain will be searched, too. +// This is useful for adding mo files for certain runtime libraries and 3rd +// party component libraries +procedure AddDomainForResourceString (const domain:DomainString); +procedure RemoveDomainForResourceString (const domain:DomainString); + +// Unicode-enabled way to get resourcestrings, automatically translated +// Use like this: ws:=LoadResStringW(@NameOfResourceString); +function LoadResString(ResStringRec: PResStringRec): widestring; +function LoadResStringW(ResStringRec: PResStringRec): UnicodeString; + +// This returns an empty string if not translated or translator name is not specified. +function GetTranslatorNameAndEmail:TranslatedUnicodeString; + + +(*****************************************************************************) +(* *) +(* ADVANCED FUNCTIONALITY *) +(* *) +(*****************************************************************************) + +const + DefaultTextDomain = 'default'; + +var + ExecutableFilename:FilenameString; // This is set to paramstr(0) or the name of the DLL you are creating. + +const + PreferExternal=false; // Set to true, to prefer external *.mo over embedded translation + +const + // Subversion source code version control version information + VCSVersion='$LastChangedRevision$'; + +type + EGnuGettext=class(Exception); + EGGProgrammingError=class(EGnuGettext); + EGGComponentError=class(EGnuGettext); + EGGIOError=class(EGnuGettext); + EGGAnsi2WideConvError=class(EGnuGettext); + +// This function will turn resourcestring hooks on or off, eventually with BPL file support. +// Please do not activate BPL file support when the package is in design mode. +const AutoCreateHooks=true; +procedure HookIntoResourceStrings (enabled:boolean=true; SupportPackages:boolean=false); + + + + +(*****************************************************************************) +(* *) +(* CLASS based implementation. *) +(* Use TGnuGettextInstance to have more than one language *) +(* in your application at the same time *) +(* *) +(*****************************************************************************) + +{$ifdef MSWINDOWS} +{$ifndef DELPHI6OROLDER} +{$WARN UNSAFE_TYPE OFF} +{$WARN UNSAFE_CODE OFF} +{$WARN UNSAFE_CAST OFF} +{$endif} +{$endif} + +type + TOnDebugLine = Procedure (Sender: TObject; const Line: String; var Discard: Boolean) of Object; // Set Discard to false if output should still go to ordinary debug log + TGetPluralForm=function (Number:Longint):Integer; + TDebugLogger=procedure (line: ansistring) of object; + +{*------------------------------------------------------------------------------ + Handles .mo files, in separate files or inside the exe file. + Don't use this class. It's for internal use. +-------------------------------------------------------------------------------} + TMoFile= + class /// Threadsafe. Only constructor and destructor are writing to memory + private + doswap: boolean; + public + Users:Integer; /// Reference count. If it reaches zero, this object should be destroyed. + constructor Create (filename:FilenameString;Offset,Size:int64); + destructor Destroy; override; + function gettext(const msgid: RawUtf8String;var found:boolean): RawUtf8String; // uses mo file and utf-8 + property isSwappedArchitecture:boolean read doswap; + private + N, O, T: Cardinal; /// Values defined at http://www.linuxselfhelp.com/gnu/gettext/html_chapter/gettext_6.html + startindex,startstep:integer; + {$ifdef mswindows} + mo: THandle; + momapping: THandle; + {$endif} + momemoryHandle:PAnsiChar; + momemory: PAnsiChar; + function autoswap32(i: cardinal): cardinal; + function CardinalInMem(baseptr: PAnsiChar; Offset: Cardinal): Cardinal; + end; + +{*------------------------------------------------------------------------------ + Handles all issues regarding a specific domain. + Don't use this class. It's for internal use. +-------------------------------------------------------------------------------} + TDomain= + class + private + Enabled:boolean; + vDirectory: FilenameString; + procedure setDirectory(const dir: FilenameString); + public + DebugLogger:TDebugLogger; + Domain: DomainString; + property Directory: FilenameString read vDirectory write setDirectory; + constructor Create; + destructor Destroy; override; + // Set parameters + procedure SetLanguageCode (const langcode:LanguageString); + procedure SetFilename (const filename:FilenameString); // Bind this domain to a specific file + // Get information + procedure GetListOfLanguages(list:TStrings); + function GetTranslationProperty(Propertyname: ComponentNameString): TranslatedUnicodeString; + function gettext(const msgid: RawUtf8String): RawUtf8String; // uses mo file and utf-8 + private + mofile:TMoFile; + SpecificFilename:FilenameString; + curlang: LanguageString; + OpenHasFailedBefore: boolean; + procedure OpenMoFile; + procedure CloseMoFile; + end; + +{*------------------------------------------------------------------------------ + Helper class for invoking events. +-------------------------------------------------------------------------------} + TExecutable= + class + procedure Execute; virtual; abstract; + end; + +{*------------------------------------------------------------------------------ + The main translation engine. +-------------------------------------------------------------------------------} + TGnuGettextInstance= + class + private + fOnDebugLine:TOnDebugLine; + CreatorThread:Cardinal; /// Only this thread can use LoadResString + public + Enabled:Boolean; /// Set this to false to disable translations + DesignTimeCodePage:Integer; /// See MultiByteToWideChar() in Win32 API for documentation + constructor Create; + destructor Destroy; override; + procedure UseLanguage(LanguageCode: LanguageString); + procedure GetListOfLanguages (const domain:DomainString; list:TStrings); // Puts list of language codes, for which there are translations in the specified domain, into list + {$ifndef UNICODE} + function gettext(const szMsgId: ansistring): TranslatedUnicodeString; overload; virtual; + function ngettext(const singular,plural:ansistring;Number:longint):TranslatedUnicodeString; overload; virtual; + {$endif} + function gettext(const szMsgId: MsgIdString): TranslatedUnicodeString; overload; virtual; + function gettext_NoExtract(const szMsgId: MsgIdString): TranslatedUnicodeString; + function ngettext(const singular,plural:MsgIdString;Number:longint):TranslatedUnicodeString; overload; virtual; + function ngettext_NoExtract(const singular,plural:MsgIdString;Number:longint):TranslatedUnicodeString; + function GetCurrentLanguage:LanguageString; + function GetTranslationProperty (const Propertyname:ComponentNameString):TranslatedUnicodeString; + function GetTranslatorNameAndEmail:TranslatedUnicodeString; + + // Form translation tools, these are not threadsafe. All TP_ procs must be called just before TranslateProperites() + procedure TP_Ignore(AnObject:TObject; const name:ComponentNameString); + procedure TP_IgnoreClass (IgnClass:TClass); + procedure TP_IgnoreClassProperty (IgnClass:TClass;propertyname:ComponentNameString); + procedure TP_GlobalIgnoreClass (IgnClass:TClass); + procedure TP_GlobalIgnoreClassProperty (IgnClass:TClass;propertyname:ComponentNameString); + procedure TP_GlobalHandleClass (HClass:TClass;Handler:TTranslator); + procedure TranslateProperties(AnObject: TObject; textdomain:DomainString=''); + procedure TranslateComponent(AnObject: TComponent; const TextDomain:DomainString=''); + procedure RetranslateComponent(AnObject: TComponent; const TextDomain:DomainString=''); + + // Multi-domain functions + {$ifndef UNICODE} + function dgettext(const szDomain: DomainString; const szMsgId: ansistring): TranslatedUnicodeString; overload; virtual; + function dngettext(const szDomain: DomainString; const singular,plural:ansistring;Number:longint):TranslatedUnicodeString; overload; virtual; + {$endif} + function dgettext(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString; overload; virtual; + function dgettext_NoExtract(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString; + function dngettext(const szDomain: DomainString; const singular,plural:MsgIdString;Number:longint):TranslatedUnicodeString; overload; virtual; + function dngettext_NoExtract(const szDomain: DomainString; const singular,plural:MsgIdString;Number:longint):TranslatedUnicodeString; + procedure textdomain(const szDomain: DomainString); + function getcurrenttextdomain: DomainString; + procedure bindtextdomain(const szDomain: DomainString; const szDirectory: FilenameString); + procedure bindtextdomainToFile (const szDomain: DomainString; const filename: FilenameString); // Also works with files embedded in exe file + + // Windows API functions + function LoadResString(ResStringRec: PResStringRec): UnicodeString; + + // Output all log info to this file. This may only be called once. + procedure DebugLogToFile (const filename:FilenameString; append:boolean=false); + procedure DebugLogPause (PauseEnabled:boolean); + property OnDebugLine: TOnDebugLine read fOnDebugLine write fOnDebugLine; // If set, all debug output goes here + {$ifndef UNICODE} + // Conversion according to design-time character set + function ansi2wideDTCP (const s:AnsiString):MsgIdString; // Convert using Design Time Code Page + {$endif} + protected + procedure TranslateStrings (sl:TStrings;const TextDomain:DomainString); + + // Override these three, if you want to inherited from this class + // to create a new class that handles other domain and language dependent + // issues + procedure WhenNewLanguage (const LanguageID:LanguageString); virtual; // Override to know when language changes + procedure WhenNewDomain (const TextDomain:DomainString); virtual; // Override to know when text domain changes. Directory is purely informational + procedure WhenNewDomainDirectory (const TextDomain:DomainString;const Directory:FilenameString); virtual; // Override to know when any text domain's directory changes. It won't be called if a domain is fixed to a specific file. + private + curlang: LanguageString; + curGetPluralForm:TGetPluralForm; + curmsgdomain: DomainString; + savefileCS: TMultiReadExclusiveWriteSynchronizer; + savefile: TextFile; + savememory: TStringList; + DefaultDomainDirectory:FilenameString; + domainlist: TStringList; /// List of domain names. Objects are TDomain. + TP_IgnoreList:TStringList; /// Temporary list, reset each time TranslateProperties is called + TP_ClassHandling:TList; /// Items are TClassMode. If a is derived from b, a comes first + TP_GlobalClassHandling:TList; /// Items are TClassMode. If a is derived from b, a comes first + TP_Retranslator:TExecutable; /// Cast this to TTP_Retranslator + {$ifdef DXGETTEXTDEBUG} + DebugLogCS:TMultiReadExclusiveWriteSynchronizer; + DebugLog:TStream; + DebugLogOutputPaused:Boolean; + {$endif} + function TP_CreateRetranslator:TExecutable; // Must be freed by caller! + procedure FreeTP_ClassHandlingItems; + {$ifdef DXGETTEXTDEBUG} + procedure DebugWriteln(line: ansistring); + {$endif} + procedure TranslateProperty(AnObject: TObject; PropInfo: PPropInfo; + TodoList: TStrings; const TextDomain:DomainString); + function Getdomain(const domain:DomainString; const DefaultDomainDirectory:FilenameString; const CurLang: LanguageString): TDomain; // Translates a single property of an object + end; + +const + LOCALE_SISO639LANGNAME = $59; // Used by Lazarus software development tool + LOCALE_SISO3166CTRYNAME = $5A; // Used by Lazarus software development tool + +var + DefaultInstance:TGnuGettextInstance; /// Default instance of the main API for singlethreaded applications. + +implementation + +{$ifndef MSWINDOWS} +{$ifndef LINUX} + 'This version of gnugettext.pas is only meant to be compiled with Kylix 3,' + 'Delphi 6, Delphi 7 and later versions. If you use other versions, please' + 'get the gnugettext.pas version from the Delphi 5 directory.' +{$endif} +{$endif} + +(**************************************************************************) +// Some comments on the implementation: +// This unit should be independent of other units where possible. +// It should have a small footprint in any way. +(**************************************************************************) +// TMultiReadExclusiveWriteSynchronizer is used instead of TCriticalSection +// because it makes this unit independent of the SyncObjs unit +(**************************************************************************) + +{$B-,R+,I+,Q+} + +type + TTP_RetranslatorItem= + class + obj:TObject; + Propname:ComponentNameString; + OldValue:TranslatedUnicodeString; + end; + TTP_Retranslator= + class (TExecutable) + TextDomain:DomainString; + Instance:TGnuGettextInstance; + constructor Create; + destructor Destroy; override; + procedure Remember (obj:TObject; PropName:ComponentNameString; OldValue:TranslatedUnicodeString); + procedure Execute; override; + private + list:TList; + end; + TEmbeddedFileInfo= + class + offset,size:int64; + end; + TFileLocator= + class // This class finds files even when embedded inside executable + constructor Create; + destructor Destroy; override; + procedure Analyze; // List files embedded inside executable + function FileExists (filename:FilenameString):boolean; + function GetMoFile (filename:FilenameString;DebugLogger:TDebugLogger):TMoFile; + procedure ReleaseMoFile (mofile:TMoFile); + private + basedirectory:FilenameString; + filelist:TStringList; //Objects are TEmbeddedFileInfo. Filenames are relative to .exe file + MoFilesCS:TMultiReadExclusiveWriteSynchronizer; + MoFiles:TStringList; // Objects are filenames+offset, objects are TMoFile + function ReadInt64 (str:TStream):int64; + end; + TGnuGettextComponentMarker= + class (TComponent) + public + LastLanguage:LanguageString; + Retranslator:TExecutable; + destructor Destroy; override; + end; + TClassMode= + class + HClass:TClass; + SpecialHandler:TTranslator; + PropertiesToIgnore:TStringList; // This is ignored if Handler is set + constructor Create; + destructor Destroy; override; + end; + TRStrinfo = record + strlength, stroffset: cardinal; + end; + TStrInfoArr = array[0..10000000] of TRStrinfo; + PStrInfoArr = ^TStrInfoArr; + TCharArray5=array[0..4] of ansichar; + THook= // Replaces a runtime library procedure with a custom procedure + class + public + constructor Create (OldProcedure, NewProcedure: pointer; FollowJump:boolean=false); + destructor Destroy; override; // Restores unhooked state + procedure Reset (FollowJump:boolean=false); // Disables and picks up patch points again + procedure Disable; + procedure Enable; + private + oldproc,newproc:Pointer; + Patch:TCharArray5; + Original:TCharArray5; + PatchPosition:PAnsiChar; + procedure Shutdown; // Same as destroy, except that object is not destroyed + end; + +var + // System information + Win32PlatformIsUnicode:boolean=False; + + // Information about files embedded inside .exe file + FileLocator:TFileLocator; + + // Hooks into runtime library functions + ResourceStringDomainListCS:TMultiReadExclusiveWriteSynchronizer; + ResourceStringDomainList:TStringList; + HookLoadResString:THook; + HookLoadStr:THook; + HookFmtLoadStr:THook; + +function GGGetEnvironmentVariable(const Name:widestring):widestring; +var + Len: integer; + W : WideString; +begin + Result := ''; + SetLength(W,1); + Len := Windows.GetEnvironmentVariableW(PWideChar(Name), PWideChar(W), 1); + if Len > 0 then begin + SetLength(Result, Len - 1); + Windows.GetEnvironmentVariableW(PWideChar(Name), PWideChar(Result), Len); + end; +end; + +function StripCRRawMsgId (s:RawUtf8String):RawUtf8String; +var + i:integer; +begin + i:=1; + while i<=length(s) do begin + if s[i]=#13 then delete (s,i,1) else inc (i); + end; + Result:=s; +end; + +function EnsureLineBreakInTranslatedString (s:RawUtf8String):RawUtf8String; +{$ifdef MSWINDOWS} +var + i:integer; +{$endif} +begin + {$ifdef MSWINDOWS} + Assert (sLinebreak=ansistring(#13#10)); + i:=1; + while i<=length(s) do begin + if (s[i]=#10) and (MidStr(s,i-1,1)<>#13) then begin + insert (#13,s,i); + inc (i,2); + end else + inc (i); + end; + {$endif} + Result:=s; +end; + +function IsWriteProp(Info: PPropInfo): Boolean; +begin + Result := Assigned(Info) and (Info^.SetProc <> nil); +end; + +function ResourceStringGettext(MsgId: MsgIdString): TranslatedUnicodeString; +var + i:integer; +begin + if (MsgID='') or (ResourceStringDomainListCS=nil) then begin + // This only happens during very complicated program startups that fail, + // or when Msgid='' + Result:=MsgId; + exit; + end; + ResourceStringDomainListCS.BeginRead; + try + for i:=0 to ResourceStringDomainList.Count-1 do begin + Result:=dgettext(ResourceStringDomainList.Strings[i], MsgId); + if Result<>MsgId then + break; + end; + finally + ResourceStringDomainListCS.EndRead; + end; +end; + +function gettext(const szMsgId: MsgIdString): TranslatedUnicodeString; +begin + Result:=DefaultInstance.gettext(szMsgId); +end; + +{*------------------------------------------------------------------------------ + This is the main translation procedure used in programs. It takes a parameter, + looks it up in the translation dictionary, and returns the translation. + If no translation is found, the parameter is returned. + + @param szMsgId The text, that should be displayed if no translation is found. +-------------------------------------------------------------------------------} +function _(const szMsgId: MsgIdString): TranslatedUnicodeString; +begin + Result:=DefaultInstance.gettext(szMsgId); +end; + +{*------------------------------------------------------------------------------ + Translates a text, using a specified translation domain. + If no translation is found, the parameter is returned. + + @param szDomain Which translation domain that should be searched for a translation. + @param szMsgId The text, that should be displayed if no translation is found. +-------------------------------------------------------------------------------} +function dgettext(const szDomain: DomainString; const szMsgId: MsgIdString): TranslatedUnicodeString; +begin + Result:=DefaultInstance.dgettext(szDomain, szMsgId); +end; + +function dngettext(const szDomain: DomainString; const singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString; +begin + Result:=DefaultInstance.dngettext(szDomain,singular,plural,Number); +end; + +function ngettext(const singular,plural: MsgIdString; Number:longint): TranslatedUnicodeString; +begin + Result:=DefaultInstance.ngettext(singular,plural,Number); +end; + +procedure textdomain(const szDomain: Domainstring); +begin + DefaultInstance.textdomain(szDomain); +end; + +procedure SetGettextEnabled (enabled:boolean); +begin + DefaultInstance.Enabled:=enabled; +end; + +function getcurrenttextdomain: DomainString; +begin + Result:=DefaultInstance.getcurrenttextdomain; +end; + +procedure bindtextdomain(const szDomain: DomainString; const szDirectory: FilenameString); +begin + DefaultInstance.bindtextdomain(szDomain, szDirectory); +end; + +procedure TP_Ignore(AnObject:TObject; const name:FilenameString); +begin + DefaultInstance.TP_Ignore(AnObject, name); +end; + +procedure TP_GlobalIgnoreClass (IgnClass:TClass); +begin + DefaultInstance.TP_GlobalIgnoreClass(IgnClass); +end; + +procedure TP_IgnoreClass (IgnClass:TClass); +begin + DefaultInstance.TP_IgnoreClass(IgnClass); +end; + +procedure TP_IgnoreClassProperty (IgnClass:TClass;const propertyname:ComponentNameString); +begin + DefaultInstance.TP_IgnoreClassProperty(IgnClass,propertyname); +end; + +procedure TP_GlobalIgnoreClassProperty (IgnClass:TClass;const propertyname:ComponentNameString); +begin + DefaultInstance.TP_GlobalIgnoreClassProperty(IgnClass,propertyname); +end; + +procedure TP_GlobalHandleClass (HClass:TClass;Handler:TTranslator); +begin + DefaultInstance.TP_GlobalHandleClass (HClass, Handler); +end; + +procedure TranslateComponent(AnObject: TComponent; const TextDomain:DomainString=''); +begin + DefaultInstance.TranslateComponent(AnObject, TextDomain); +end; + +procedure RetranslateComponent(AnObject: TComponent; const TextDomain:DomainString=''); +begin + DefaultInstance.RetranslateComponent(AnObject, TextDomain); +end; + +{$ifdef MSWINDOWS} + +// These constants are only used in Windows 95 +// Thanks to Frank Andreas de Groot for this table +const + IDAfrikaans = $0436; IDAlbanian = $041C; + IDArabicAlgeria = $1401; IDArabicBahrain = $3C01; + IDArabicEgypt = $0C01; IDArabicIraq = $0801; + IDArabicJordan = $2C01; IDArabicKuwait = $3401; + IDArabicLebanon = $3001; IDArabicLibya = $1001; + IDArabicMorocco = $1801; IDArabicOman = $2001; + IDArabicQatar = $4001; IDArabic = $0401; + IDArabicSyria = $2801; IDArabicTunisia = $1C01; + IDArabicUAE = $3801; IDArabicYemen = $2401; + IDArmenian = $042B; IDAssamese = $044D; + IDAzeriCyrillic = $082C; IDAzeriLatin = $042C; + IDBasque = $042D; IDByelorussian = $0423; + IDBengali = $0445; IDBulgarian = $0402; + IDBurmese = $0455; IDCatalan = $0403; + IDChineseHongKong = $0C04; IDChineseMacao = $1404; + IDSimplifiedChinese = $0804; IDChineseSingapore = $1004; + IDTraditionalChinese = $0404; IDCroatian = $041A; + IDCzech = $0405; IDDanish = $0406; + IDBelgianDutch = $0813; IDDutch = $0413; + IDEnglishAUS = $0C09; IDEnglishBelize = $2809; + IDEnglishCanadian = $1009; IDEnglishCaribbean = $2409; + IDEnglishIreland = $1809; IDEnglishJamaica = $2009; + IDEnglishNewZealand = $1409; IDEnglishPhilippines = $3409; + IDEnglishSouthAfrica = $1C09; IDEnglishTrinidad = $2C09; + IDEnglishUK = $0809; IDEnglishUS = $0409; + IDEnglishZimbabwe = $3009; IDEstonian = $0425; + IDFaeroese = $0438; IDFarsi = $0429; + IDFinnish = $040B; IDBelgianFrench = $080C; + IDFrenchCameroon = $2C0C; IDFrenchCanadian = $0C0C; + IDFrenchCotedIvoire = $300C; IDFrench = $040C; + IDFrenchLuxembourg = $140C; IDFrenchMali = $340C; + IDFrenchMonaco = $180C; IDFrenchReunion = $200C; + IDFrenchSenegal = $280C; IDSwissFrench = $100C; + IDFrenchWestIndies = $1C0C; IDFrenchZaire = $240C; + IDFrisianNetherlands = $0462; IDGaelicIreland = $083C; + IDGaelicScotland = $043C; IDGalician = $0456; + IDGeorgian = $0437; IDGermanAustria = $0C07; + IDGerman = $0407; IDGermanLiechtenstein = $1407; + IDGermanLuxembourg = $1007; IDSwissGerman = $0807; + IDGreek = $0408; IDGujarati = $0447; + IDHebrew = $040D; IDHindi = $0439; + IDHungarian = $040E; IDIcelandic = $040F; + IDIndonesian = $0421; IDItalian = $0410; + IDSwissItalian = $0810; IDJapanese = $0411; + IDKannada = $044B; IDKashmiri = $0460; + IDKazakh = $043F; IDKhmer = $0453; + IDKirghiz = $0440; IDKonkani = $0457; + IDKorean = $0412; IDLao = $0454; + IDLatvian = $0426; IDLithuanian = $0427; + IDMacedonian = $042F; IDMalaysian = $043E; + IDMalayBruneiDarussalam = $083E; IDMalayalam = $044C; + IDMaltese = $043A; IDManipuri = $0458; + IDMarathi = $044E; IDMongolian = $0450; + IDNepali = $0461; IDNorwegianBokmol = $0414; + IDNorwegianNynorsk = $0814; IDOriya = $0448; + IDPolish = $0415; IDBrazilianPortuguese = $0416; + IDPortuguese = $0816; IDPunjabi = $0446; + IDRhaetoRomanic = $0417; IDRomanianMoldova = $0818; + IDRomanian = $0418; IDRussianMoldova = $0819; + IDRussian = $0419; IDSamiLappish = $043B; + IDSanskrit = $044F; IDSerbianCyrillic = $0C1A; + IDSerbianLatin = $081A; IDSesotho = $0430; + IDSindhi = $0459; IDSlovak = $041B; + IDSlovenian = $0424; IDSorbian = $042E; + IDSpanishArgentina = $2C0A; IDSpanishBolivia = $400A; + IDSpanishChile = $340A; IDSpanishColombia = $240A; + IDSpanishCostaRica = $140A; IDSpanishDominicanRepublic = $1C0A; + IDSpanishEcuador = $300A; IDSpanishElSalvador = $440A; + IDSpanishGuatemala = $100A; IDSpanishHonduras = $480A; + IDMexicanSpanish = $080A; IDSpanishNicaragua = $4C0A; + IDSpanishPanama = $180A; IDSpanishParaguay = $3C0A; + IDSpanishPeru = $280A; IDSpanishPuertoRico = $500A; + IDSpanishModernSort = $0C0A; IDSpanish = $040A; + IDSpanishUruguay = $380A; IDSpanishVenezuela = $200A; + IDSutu = $0430; IDSwahili = $0441; + IDSwedishFinland = $081D; IDSwedish = $041D; + IDTajik = $0428; IDTamil = $0449; + IDTatar = $0444; IDTelugu = $044A; + IDThai = $041E; IDTibetan = $0451; + IDTsonga = $0431; IDTswana = $0432; + IDTurkish = $041F; IDTurkmen = $0442; + IDUkrainian = $0422; IDUrdu = $0420; + IDUzbekCyrillic = $0843; IDUzbekLatin = $0443; + IDVenda = $0433; IDVietnamese = $042A; + IDWelsh = $0452; IDXhosa = $0434; + IDZulu = $0435; + +function GetWindowsLanguage: WideString; +var + langid: Cardinal; + langcode: WideString; + CountryName: array[0..4] of widechar; + LanguageName: array[0..4] of widechar; + works: boolean; +begin + // The return value of GetLocaleInfo is compared with 3 = 2 characters and a zero + works := 3 = GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME, LanguageName, SizeOf(LanguageName)); + works := works and (3 = GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, CountryName, SizeOf(CountryName))); + if works then begin + // Windows 98, Me, NT4, 2000, XP and newer + LangCode := PWideChar(@(LanguageName[0])); + if lowercase(LangCode)='no' then LangCode:='nb'; + LangCode:=LangCode + '_' + PWideChar(@CountryName[0]); + end else begin + // This part should only happen on Windows 95. + langid := GetThreadLocale; + case langid of + IDBelgianDutch: langcode := 'nl_BE'; + IDBelgianFrench: langcode := 'fr_BE'; + IDBrazilianPortuguese: langcode := 'pt_BR'; + IDDanish: langcode := 'da_DK'; + IDDutch: langcode := 'nl_NL'; + IDEnglishUK: langcode := 'en_GB'; + IDEnglishUS: langcode := 'en_US'; + IDFinnish: langcode := 'fi_FI'; + IDFrench: langcode := 'fr_FR'; + IDFrenchCanadian: langcode := 'fr_CA'; + IDGerman: langcode := 'de_DE'; + IDGermanLuxembourg: langcode := 'de_LU'; + IDGreek: langcode := 'el_GR'; + IDIcelandic: langcode := 'is_IS'; + IDItalian: langcode := 'it_IT'; + IDKorean: langcode := 'ko_KO'; + IDNorwegianBokmol: langcode := 'nb_NO'; + IDNorwegianNynorsk: langcode := 'nn_NO'; + IDPolish: langcode := 'pl_PL'; + IDPortuguese: langcode := 'pt_PT'; + IDRussian: langcode := 'ru_RU'; + IDSpanish, IDSpanishModernSort: langcode := 'es_ES'; + IDSwedish: langcode := 'sv_SE'; + IDSwedishFinland: langcode := 'sv_FI'; + else + langcode := 'C'; + end; + end; + Result := langcode; +end; +{$endif} + +{$ifndef UNICODE} +function LoadResStringA(ResStringRec: PResStringRec): ansistring; +begin + Result:=DefaultInstance.LoadResString(ResStringRec); +end; +{$endif} + +function GetTranslatorNameAndEmail:TranslatedUnicodeString; +begin + Result:=DefaultInstance.GetTranslatorNameAndEmail; +end; + +procedure UseLanguage(LanguageCode: LanguageString); +begin + DefaultInstance.UseLanguage(LanguageCode); +end; + +type + PStrData = ^TStrData; + TStrData = record + Ident: Integer; + Str: String; + end; + +function SysUtilsEnumStringModules(Instance: Longint; Data: Pointer): Boolean; +{$IFDEF MSWINDOWS} +var + Buffer: array [0..1023] of Char; // WideChar in Delphi 2008, AnsiChar before that +begin + with PStrData(Data)^ do begin + SetString(Str, Buffer, + LoadString(Instance, Ident, @Buffer[0], sizeof(Buffer))); + Result := Str = ''; + end; +end; +{$ENDIF} +{$IFDEF LINUX} +var + rs:TResStringRec; + Module:HModule; +begin + Module:=Instance; + rs.Module:=@Module; + with PStrData(Data)^ do begin + rs.Identifier:=Ident; + Str:=System.LoadResString(@rs); + Result:=Str=''; + end; +end; +{$ENDIF} + +function SysUtilsFindStringResource(Ident: Integer): string; +var + StrData: TStrData; +begin + StrData.Ident := Ident; + StrData.Str := ''; + EnumResourceModules(SysUtilsEnumStringModules, @StrData); + Result := StrData.Str; +end; + +function SysUtilsLoadStr(Ident: Integer): string; +begin + {$ifdef DXGETTEXTDEBUG} + DefaultInstance.DebugWriteln ('Sysutils.LoadRes('+IntToStr(ident)+') called'); + {$endif} + Result := ResourceStringGettext(SysUtilsFindStringResource(Ident)); +end; + +function SysUtilsFmtLoadStr(Ident: Integer; const Args: array of const): string; +begin + {$ifdef DXGETTEXTDEBUG} + DefaultInstance.DebugWriteln ('Sysutils.FmtLoadRes('+IntToStr(ident)+',Args) called'); + {$endif} + FmtStr(Result, ResourceStringGettext(SysUtilsFindStringResource(Ident)),Args); +end; + +function LoadResString(ResStringRec: PResStringRec): widestring; +begin + Result:=DefaultInstance.LoadResString(ResStringRec); +end; + +function LoadResStringW(ResStringRec: PResStringRec): UnicodeString; +begin + Result:=DefaultInstance.LoadResString(ResStringRec); +end; + + + +function GetCurrentLanguage:LanguageString; +begin + Result:=DefaultInstance.GetCurrentLanguage; +end; + +{ TDomain } + +procedure TDomain.CloseMoFile; +begin + if mofile<>nil then begin + FileLocator.ReleaseMoFile(mofile); + mofile:=nil; + end; + OpenHasFailedBefore:=False; +end; + +destructor TDomain.Destroy; +begin + CloseMoFile; + inherited; +end; + +{$ifdef mswindows} +function GetLastWinError:widestring; +var + errcode:Cardinal; +begin + SetLength (Result,2000); + errcode:=GetLastError(); + Windows.FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM,nil,errcode,0,PWideChar(Result),2000,nil); + Result:=PWideChar(Result); +end; +{$endif} + +procedure TDomain.OpenMoFile; +var + filename: FilenameString; +begin + // Check if it is already open + if mofile<>nil then + exit; + + // Check if it has been attempted to open the file before + if OpenHasFailedBefore then + exit; + + if SpecificFilename<>'' then begin + filename:=SpecificFilename; + {$ifdef DXGETTEXTDEBUG} + DebugLogger ('Domain '+domain+' is bound to specific file '+filename); + {$endif} + end else begin + filename := Directory + curlang + PathDelim + 'LC_MESSAGES' + PathDelim + domain + '.mo'; + if (not FileLocator.FileExists(filename)) and (not fileexists(filename)) then begin + {$ifdef DXGETTEXTDEBUG} + DebugLogger ('Domain '+domain+': File does not exist, neither embedded or in file system: '+filename); + {$endif} + filename := Directory + MidStr(curlang, 1, 2) + PathDelim + 'LC_MESSAGES' + PathDelim + domain + '.mo'; + {$ifdef DXGETTEXTDEBUG} + DebugLogger ('Domain '+domain+' will attempt to use this file: '+filename); + {$endif} + end else begin + {$ifdef DXGETTEXTDEBUG} + if FileLocator.FileExists(filename) then + DebugLogger ('Domain '+domain+' will attempt to use this embedded file: '+filename) + else + DebugLogger ('Domain '+domain+' will attempt to use this file that was found on the file system: '+filename); + {$endif} + end; + end; + if (not FileLocator.FileExists(filename)) and (not fileexists(filename)) then begin + {$ifdef DXGETTEXTDEBUG} + DebugLogger ('Domain '+domain+' failed to locate the file: '+filename); + {$endif} + OpenHasFailedBefore:=True; + exit; + end; + {$ifdef DXGETTEXTDEBUG} + DebugLogger ('Domain '+domain+' now accesses the file.'); + {$endif} + mofile:=FileLocator.GetMoFile(filename, DebugLogger); + + {$ifdef DXGETTEXTDEBUG} + if mofile.isSwappedArchitecture then + DebugLogger ('.mo file is swapped (comes from another CPU architecture)'); + {$endif} + + // Check, that the contents of the file is utf-8 + if pos('CHARSET=UTF-8',uppercase(GetTranslationProperty('Content-Type')))=0 then begin + CloseMoFile; + {$ifdef DXGETTEXTDEBUG} + DebugLogger ('The translation for the language code '+curlang+' (in '+filename+') does not have charset=utf-8 in its Content-Type. Translations are turned off.'); + {$endif} + {$ifdef MSWINDOWS} + MessageBoxW(0,PWideChar(widestring('The translation for the language code '+curlang+' (in '+filename+') does not have charset=utf-8 in its Content-Type. Translations are turned off.')),'Localization problem',MB_OK); + {$else} + writeln (stderr,'The translation for the language code '+curlang+' (in '+filename+') does not have charset=utf-8 in its Content-Type. Translations are turned off.'); + {$endif} + Enabled:=False; + end; +end; + +{$IFDEF UNICODE} +function utf8decode (s:RawByteString):UnicodeString; inline; +begin + Result:=UTF8ToWideString(s); +end; +{$endif} + +function TDomain.GetTranslationProperty( + Propertyname: ComponentNameString): TranslatedUnicodeString; +var + sl:TStringList; + i:integer; + s:string; +begin + Propertyname:=uppercase(Propertyname)+': '; + sl:=TStringList.Create; + try + sl.Text:=utf8decode(gettext('')); + for i:=0 to sl.Count-1 do begin + s:=sl.Strings[i]; + if uppercase(MidStr(s,1,length(Propertyname)))=Propertyname then begin + Result:=trim(MidStr(s,length(PropertyName)+1,maxint)); + + {$ifdef DXGETTEXTDEBUG} + DebugLogger ('GetTranslationProperty('+PropertyName+') returns '''+Result+'''.'); + {$endif} + exit; + end; + end; + finally + FreeAndNil (sl); + end; + Result:=''; + {$ifdef DXGETTEXTDEBUG} + DebugLogger ('GetTranslationProperty('+PropertyName+') did not find any value. An empty string is returned.'); + {$endif} +end; + +procedure TDomain.setDirectory(const dir: FilenameString); +begin + vDirectory := IncludeTrailingPathDelimiter(dir); + SpecificFilename:=''; + CloseMoFile; +end; + +procedure AddDomainForResourceString (const domain:DomainString); +begin + {$ifdef DXGETTEXTDEBUG} + DefaultInstance.DebugWriteln ('Extra domain for resourcestring: '+domain); + {$endif} + ResourceStringDomainListCS.BeginWrite; + try + if ResourceStringDomainList.IndexOf(domain)=-1 then + ResourceStringDomainList.Add (domain); + finally + ResourceStringDomainListCS.EndWrite; + end; +end; + +procedure RemoveDomainForResourceString (const domain:DomainString); +var + i:integer; +begin + {$ifdef DXGETTEXTDEBUG} + DefaultInstance.DebugWriteln ('Remove domain for resourcestring: '+domain); + {$endif} + ResourceStringDomainListCS.BeginWrite; + try + i:=ResourceStringDomainList.IndexOf(domain); + if i<>-1 then + ResourceStringDomainList.Delete (i); + finally + ResourceStringDomainListCS.EndWrite; + end; +end; + +procedure TDomain.SetLanguageCode(const langcode: LanguageString); +begin + CloseMoFile; + curlang:=langcode; +end; + +function GetPluralForm2EN(Number: Integer): Integer; +begin + Number:=abs(Number); + if Number=1 then Result:=0 else Result:=1; +end; + +function GetPluralForm1(Number: Integer): Integer; +begin + Result:=0; +end; + +function GetPluralForm2FR(Number: Integer): Integer; +begin + Number:=abs(Number); + if (Number=1) or (Number=0) then Result:=0 else Result:=1; +end; + +function GetPluralForm3LV(Number: Integer): Integer; +begin + Number:=abs(Number); + if (Number mod 10=1) and (Number mod 100<>11) then + Result:=0 + else + if Number<>0 then Result:=1 + else Result:=2; +end; + +function GetPluralForm3GA(Number: Integer): Integer; +begin + Number:=abs(Number); + if Number=1 then Result:=0 + else if Number=2 then Result:=1 + else Result:=2; +end; + +function GetPluralForm3LT(Number: Integer): Integer; +var + n1,n2:byte; +begin + Number:=abs(Number); + n1:=Number mod 10; + n2:=Number mod 100; + if (n1=1) and (n2<>11) then + Result:=0 + else + if (n1>=2) and ((n2<10) or (n2>=20)) then Result:=1 + else Result:=2; +end; + +function GetPluralForm3PL(Number: Integer): Integer; +var + n1,n2:byte; +begin + Number:=abs(Number); + n1:=Number mod 10; + n2:=Number mod 100; + + if Number=1 then Result:=0 + else if (n1>=2) and (n1<=4) and ((n2<10) or (n2>=20)) then Result:=1 + else Result:=2; +end; + +function GetPluralForm3RU(Number: Integer): Integer; +var + n1,n2:byte; +begin + Number:=abs(Number); + n1:=Number mod 10; + n2:=Number mod 100; + if (n1=1) and (n2<>11) then + Result:=0 + else + if (n1>=2) and (n1<=4) and ((n2<10) or (n2>=20)) then Result:=1 + else Result:=2; +end; + +function GetPluralForm3SK(Number: Integer): Integer; +begin + Number:=abs(Number); + if number=1 then Result:=0 + else if (number<5) and (number<>0) then Result:=1 + else Result:=2; +end; + +function GetPluralForm4SL(Number: Integer): Integer; +var + n2:byte; +begin + Number:=abs(Number); + n2:=Number mod 100; + if n2=1 then Result:=0 + else + if n2=2 then Result:=1 + else + if (n2=3) or (n2=4) then Result:=2 + else + Result:=3; +end; + +procedure TDomain.GetListOfLanguages(list: TStrings); +var + sr:TSearchRec; + more:boolean; + filename, path:FilenameString; + langcode:LanguageString; + i, j:integer; +begin + list.Clear; + + // Iterate through filesystem + more:=FindFirst (Directory+'*',faAnyFile,sr)=0; + try + while more do begin + if (sr.Attr and faDirectory<>0) and (sr.name<>'.') and (sr.name<>'..') then begin + filename := Directory + sr.Name + PathDelim + 'LC_MESSAGES' + PathDelim + domain + '.mo'; + if fileexists(filename) then begin + langcode:=lowercase(sr.name); + if list.IndexOf(langcode)=-1 then + list.Add(langcode); + end; + end; + more:=FindNext (sr)=0; + end; + finally + FindClose (sr); + end; + + // Iterate through embedded files + for i:=0 to FileLocator.filelist.Count-1 do begin + filename:=FileLocator.basedirectory+FileLocator.filelist.Strings[i]; + path:=Directory; + {$ifdef MSWINDOWS} + path:=uppercase(path); + filename:=uppercase(filename); + {$endif} + j:=length(path); + if MidStr(filename,1,j)=path then begin + path:=PathDelim + 'LC_MESSAGES' + PathDelim + domain + '.mo'; + {$ifdef MSWINDOWS} + path:=uppercase(path); + {$endif} + if MidStr(filename,length(filename)-length(path)+1,length(path))=path then begin + langcode:=lowercase(MidStr(filename,j+1,length(filename)-length(path)-j)); + langcode:=LeftStr(langcode,3)+uppercase(MidStr(langcode,4,maxint)); + if list.IndexOf(langcode)=-1 then + list.Add(langcode); + end; + end; + end; +end; + +procedure TDomain.SetFilename(const filename: FilenameString); +begin + CloseMoFile; + vDirectory := ''; + SpecificFilename:=filename; +end; + +function TDomain.gettext(const msgid: RawUtf8String): RawUtf8String; +var + found:boolean; +begin + if not Enabled then begin + Result:=msgid; + exit; + end; + if (mofile=nil) and (not OpenHasFailedBefore) then + OpenMoFile; + if mofile=nil then begin + {$ifdef DXGETTEXTDEBUG} + DebugLogger('.mo file is not open. Not translating "'+msgid+'"'); + {$endif} + Result := msgid; + end else begin + Result:=mofile.gettext(msgid,found); + {$ifdef DXGETTEXTDEBUG} + if found then + DebugLogger ('Found in .mo ('+Domain+'): "'+utf8encode(msgid)+'"->"'+utf8encode(Result)+'"') + else + DebugLogger ('Translation not found in .mo file ('+Domain+') : "'+utf8encode(msgid)+'"'); + {$endif} + end; +end; + +constructor TDomain.Create; +begin + inherited Create; + Enabled:=True; +end; + +{ TGnuGettextInstance } + +procedure TGnuGettextInstance.bindtextdomain(const szDomain:DomainString; + const szDirectory: FilenameString); +var + dir:FilenameString; +begin + dir:=IncludeTrailingPathDelimiter(szDirectory); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Text domain "'+szDomain+'" is now located at "'+dir+'"'); + {$endif} + getdomain(szDomain,DefaultDomainDirectory,CurLang).Directory := dir; + WhenNewDomainDirectory (szDomain, szDirectory); +end; + +constructor TGnuGettextInstance.Create; +begin + CreatorThread:=GetCurrentThreadId; + {$ifdef MSWindows} + DesignTimeCodePage:=CP_ACP; + {$endif} + {$ifdef DXGETTEXTDEBUG} + DebugLogCS:=TMultiReadExclusiveWriteSynchronizer.Create; + DebugLog:=TMemoryStream.Create; + DebugWriteln('Debug log started '+DateTimeToStr(Now)); + DebugWriteln('GNU gettext module version: '+VCSVersion); + DebugWriteln(''); + {$endif} + curGetPluralForm:=GetPluralForm2EN; + Enabled:=True; + curmsgdomain:=DefaultTextDomain; + savefileCS := TMultiReadExclusiveWriteSynchronizer.Create; + domainlist := TStringList.Create; + TP_IgnoreList:=TStringList.Create; + TP_IgnoreList.Sorted:=True; + TP_GlobalClassHandling:=TList.Create; + TP_ClassHandling:=TList.Create; + + // Set some settings + DefaultDomainDirectory := IncludeTrailingPathDelimiter(extractfilepath(ExecutableFilename))+'locale'; + + UseLanguage(''); + + bindtextdomain(DefaultTextDomain, DefaultDomainDirectory); + textdomain(DefaultTextDomain); + + // Add default properties to ignore + TP_GlobalIgnoreClassProperty(TComponent,'Name'); + TP_GlobalIgnoreClassProperty(TCollection,'PropName'); +end; + +destructor TGnuGettextInstance.Destroy; +begin + if savememory <> nil then begin + savefileCS.BeginWrite; + try + CloseFile(savefile); + finally + savefileCS.EndWrite; + end; + FreeAndNil(savememory); + end; + FreeAndNil (savefileCS); + FreeAndNil (TP_IgnoreList); + while TP_GlobalClassHandling.Count<>0 do begin + TObject(TP_GlobalClassHandling.Items[0]).Free; + TP_GlobalClassHandling.Delete(0); + end; + FreeAndNil (TP_GlobalClassHandling); + FreeTP_ClassHandlingItems; + FreeAndNil (TP_ClassHandling); + while domainlist.Count <> 0 do begin + domainlist.Objects[0].Free; + domainlist.Delete(0); + end; + FreeAndNil(domainlist); + {$ifdef DXGETTEXTDEBUG} + FreeAndNil (DebugLog); + FreeAndNil (DebugLogCS); + {$endif} + inherited; +end; + +{$ifndef UNICODE} +function TGnuGettextInstance.dgettext(const szDomain: DomainString; const szMsgId: ansistring): TranslatedUnicodeString; +begin + Result:=dgettext(szDomain, ansi2wideDTCP(szMsgId)); +end; +{$endif} + +function TGnuGettextInstance.dgettext(const szDomain: DomainString; + const szMsgId: MsgIdString): TranslatedUnicodeString; +begin + if not Enabled then begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Translation has been disabled. Text is not being translated: '+szMsgid); + {$endif} + Result:=szMsgId; + end else begin + Result:=UTF8Decode(EnsureLineBreakInTranslatedString(getdomain(szDomain,DefaultDomainDirectory,CurLang).gettext(StripCRRawMsgId(utf8encode(szMsgId))))); + + {$ifdef DXGETTEXTDEBUG} + if (szMsgId<>'') and (Result='') then + DebugWriteln (Format('Error: Translation of %s was an empty string. This may never occur.',[szMsgId])); + {$endif} + end; +end; + +function TGnuGettextInstance.dgettext_NoExtract(const szDomain: DomainString; + const szMsgId: MsgIdString): TranslatedUnicodeString; +begin + // This one is very useful for translating text in variables. + // This can sometimes be necessary, and by using this function, + // the source code scanner will not trigger warnings. + Result:=dgettext(szDomain,szMsgId); +end; + +function TGnuGettextInstance.GetCurrentLanguage: LanguageString; +begin + Result:=curlang; +end; + +function TGnuGettextInstance.getcurrenttextdomain: DomainString; +begin + Result := curmsgdomain; +end; + +{$ifndef UNICODE} +function TGnuGettextInstance.gettext( + const szMsgId: ansistring): TranslatedUnicodeString; +begin + Result := dgettext(curmsgdomain, szMsgId); +end; +{$endif} + +function TGnuGettextInstance.gettext( + const szMsgId: MsgIdString): TranslatedUnicodeString; +begin + Result := dgettext(curmsgdomain, szMsgId); +end; + +function TGnuGettextInstance.gettext_NoExtract( + const szMsgId: MsgIdString): TranslatedUnicodeString; +begin + // This one is very useful for translating text in variables. + // This can sometimes be necessary, and by using this function, + // the source code scanner will not trigger warnings. + Result:=gettext (szMsgId); +end; + +procedure TGnuGettextInstance.textdomain(const szDomain: DomainString); +begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Changed text domain to "'+szDomain+'"'); + {$endif} + curmsgdomain := szDomain; + WhenNewDomain (szDomain); +end; + +function TGnuGettextInstance.TP_CreateRetranslator : TExecutable; +var + ttpr:TTP_Retranslator; +begin + ttpr:=TTP_Retranslator.Create; + ttpr.Instance:=self; + TP_Retranslator:=ttpr; + Result:=ttpr; + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('A retranslator was created.'); + {$endif} +end; + +procedure TGnuGettextInstance.TP_GlobalHandleClass(HClass: TClass; + Handler: TTranslator); +var + cm:TClassMode; + i:integer; +begin + for i:=0 to TP_GlobalClassHandling.Count-1 do begin + cm:=TObject(TP_GlobalClassHandling.Items[i]) as TClassMode; + if cm.HClass=HClass then + raise EGGProgrammingError.Create ('You cannot set a handler for a class that has already been assigned otherwise.'); + if HClass.InheritsFrom(cm.HClass) then begin + // This is the place to insert this class + cm:=TClassMode.Create; + cm.HClass:=HClass; + cm.SpecialHandler:=Handler; + TP_GlobalClassHandling.Insert(i,cm); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('A handler was set for class '+HClass.ClassName+'.'); + {$endif} + exit; + end; + end; + cm:=TClassMode.Create; + cm.HClass:=HClass; + cm.SpecialHandler:=Handler; + TP_GlobalClassHandling.Add(cm); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('A handler was set for class '+HClass.ClassName+'.'); + {$endif} +end; + +procedure TGnuGettextInstance.TP_GlobalIgnoreClass(IgnClass: TClass); +var + cm:TClassMode; + i:integer; +begin + for i:=0 to TP_GlobalClassHandling.Count-1 do begin + cm:=TObject(TP_GlobalClassHandling.Items[i]) as TClassMode; + if cm.HClass=IgnClass then + raise EGGProgrammingError.Create ('You cannot add a class to the ignore list that is already on that list: '+IgnClass.ClassName+'. You should keep all TP_Global functions in one place in your source code.'); + if IgnClass.InheritsFrom(cm.HClass) then begin + // This is the place to insert this class + cm:=TClassMode.Create; + cm.HClass:=IgnClass; + TP_GlobalClassHandling.Insert(i,cm); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Globally, class '+IgnClass.ClassName+' is being ignored.'); + {$endif} + exit; + end; + end; + cm:=TClassMode.Create; + cm.HClass:=IgnClass; + TP_GlobalClassHandling.Add(cm); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Globally, class '+IgnClass.ClassName+' is being ignored.'); + {$endif} +end; + +procedure TGnuGettextInstance.TP_GlobalIgnoreClassProperty( + IgnClass: TClass; propertyname: ComponentNameString); +var + cm:TClassMode; + i,idx:integer; +begin + propertyname:=uppercase(propertyname); + for i:=0 to TP_GlobalClassHandling.Count-1 do begin + cm:=TObject(TP_GlobalClassHandling.Items[i]) as TClassMode; + if cm.HClass=IgnClass then begin + if Assigned(cm.SpecialHandler) then + raise EGGProgrammingError.Create ('You cannot ignore a class property for a class that has a handler set.'); + if not cm.PropertiesToIgnore.Find(propertyname,idx) then + cm.PropertiesToIgnore.Add(propertyname); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Globally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.'); + {$endif} + exit; + end; + if IgnClass.InheritsFrom(cm.HClass) then begin + // This is the place to insert this class + cm:=TClassMode.Create; + cm.HClass:=IgnClass; + cm.PropertiesToIgnore.Add(propertyname); + TP_GlobalClassHandling.Insert(i,cm); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Globally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.'); + {$endif} + exit; + end; + end; + cm:=TClassMode.Create; + cm.HClass:=IgnClass; + cm.PropertiesToIgnore.Add(propertyname); + TP_GlobalClassHandling.Add(cm); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Globally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.'); + {$endif} +end; + +procedure TGnuGettextInstance.TP_Ignore(AnObject: TObject; + const name: ComponentNameString); +begin + TP_IgnoreList.Add(uppercase(name)); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('On object with class name '+AnObject.ClassName+', ignore is set on '+name); + {$endif} +end; + +procedure TGnuGettextInstance.TranslateComponent(AnObject: TComponent; + const TextDomain: DomainString); +var + comp:TGnuGettextComponentMarker; +begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('======================================================================'); + DebugWriteln ('TranslateComponent() was called for a component with name '+AnObject.Name+'.'); + {$endif} + comp:=AnObject.FindComponent('GNUgettextMarker') as TGnuGettextComponentMarker; + if comp=nil then begin + comp:=TGnuGettextComponentMarker.Create (nil); + comp.Name:='GNUgettextMarker'; + comp.Retranslator:=TP_CreateRetranslator; + TranslateProperties (AnObject, TextDomain); + AnObject.InsertComponent(comp); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('This is the first time, that this component has been translated. A retranslator component has been created for this component.'); + {$endif} + end else begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('This is not the first time, that this component has been translated.'); + {$endif} + if comp.LastLanguage<>curlang then begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('ERROR: TranslateComponent() was called twice with different languages. This indicates an attempt to switch language at runtime, but by using TranslateComponent every time. This API has changed - please use RetranslateComponent() instead.'); + {$endif} + {$ifdef mswindows} + MessageBox (0,'This application tried to switch the language, but in an incorrect way. The programmer needs to replace a call to TranslateComponent with a call to RetranslateComponent(). The programmer should see the changelog of gnugettext.pas for more information.','Error',MB_OK); + {$else} + writeln (stderr,'This application tried to switch the language, but in an incorrect way. The programmer needs to replace a call to TranslateComponent with a call to RetranslateComponent(). The programmer should see the changelog of gnugettext.pas for more information.'); + {$endif} + end else begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('ERROR: TranslateComponent has been called twice, but with the same language chosen. This is a mistake, but in order to prevent that the application breaks, no exception is raised.'); + {$endif} + end; + end; + comp.LastLanguage:=curlang; + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('======================================================================'); + {$endif} +end; + +procedure TGnuGettextInstance.TranslateProperty (AnObject:TObject; PropInfo:PPropInfo; TodoList:TStrings; const TextDomain:DomainString); +var + ppi:PPropInfo; + ws: TranslatedUnicodeString; + old: TranslatedUnicodeString; + compmarker:TComponent; + obj:TObject; + Propname:ComponentNameString; +begin + PropName:=string(PropInfo^.Name); + try + // Translate certain types of properties + case PropInfo^.PropType^.Kind of + {$IFDEF UNICODE} + // All dfm files returning tkUString + tkString, tkLString, tkWString, tkUString: + {$ELSE} + tkString, tkLString, tkWString: + {$ENDIF} + begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Translating '+AnObject.ClassName+'.'+PropName); + {$endif} + case PropInfo^.PropType^.Kind of + tkString, tkLString : + old := GetStrProp(AnObject, PropName); + tkWString : + old := GetWideStrProp(AnObject, PropName); + {$IFDEF UNICODE} + tkUString : + old := GetUnicodeStrProp(AnObject, PropName); + {$ENDIF} + else + raise Exception.Create ('Internal error: Illegal property type. This problem needs to be solved by a programmer, try to find a workaround.'); + end; + {$ifdef DXGETTEXTDEBUG} + if old='' then + DebugWriteln ('(Empty, not translated)') + else + DebugWriteln ('Old value: "'+old+'"'); + {$endif} + if (old <> '') and (IsWriteProp(PropInfo)) then begin + if TP_Retranslator<>nil then + (TP_Retranslator as TTP_Retranslator).Remember(AnObject, PropName, old); + ws := dgettext(textdomain,old); + if ws <> old then begin + ppi:=GetPropInfo(AnObject, Propname); + if ppi<>nil then begin + SetWideStrProp(AnObject, ppi, ws); + end else begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('ERROR: Property disappeared: '+Propname+' for object of type '+AnObject.ClassName); + {$endif} + end; + end; + end; + end { case item }; + tkClass: + begin + obj:=GetObjectProp(AnObject, PropName); + if obj<>nil then begin + if obj is TComponent then begin + compmarker := TComponent(obj).FindComponent('GNUgettextMarker'); + if Assigned(compmarker) then + exit; + end; + TodoList.AddObject ('',obj); + end; + end { case item }; + end { case }; + except + on E:Exception do + raise EGGComponentError.Create ('Property cannot be translated.'+sLineBreak+ + 'Add TP_GlobalIgnoreClassProperty('+AnObject.ClassName+','''+PropName+''') to your source code or use'+sLineBreak+ + 'TP_Ignore (self,''.'+PropName+''') to prevent this message.'+sLineBreak+ + 'Reason: '+e.Message); + end; +end; + +procedure TGnuGettextInstance.TranslateProperties(AnObject: TObject; textdomain:DomainString=''); +var + TodoList:TStringList; // List of Name/TObject's that is to be processed + DoneList:TStringList; // List of hex codes representing pointers to objects that have been done + i, j, Count: integer; + PropList: PPropList; + UPropName: ComponentNameString; + PropInfo: PPropInfo; + compmarker, + comp:TComponent; + cm, + currentcm:TClassMode; // currentcm is nil or contains special information about how to handle the current object + ObjectPropertyIgnoreList:TStringList; + objid:string; + Name:ComponentNameString; +begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('----------------------------------------------------------------------'); + DebugWriteln ('TranslateProperties() was called for an object of class '+AnObject.ClassName+' with domain "'+textdomain+'".'); + {$endif} + if textdomain='' then + textdomain:=curmsgdomain; + if TP_Retranslator<>nil then + (TP_Retranslator as TTP_Retranslator).TextDomain:=textdomain; + {$ifdef FPC} + DoneList:=TCSStringList.Create; + TodoList:=TCSStringList.Create; + ObjectPropertyIgnoreList:=TCSStringList.Create; + {$else} + DoneList:=TStringList.Create; + TodoList:=TStringList.Create; + ObjectPropertyIgnoreList:=TStringList.Create; + {$endif} + try + TodoList.AddObject('', AnObject); + DoneList.Sorted:=True; + ObjectPropertyIgnoreList.Sorted:=True; + ObjectPropertyIgnoreList.Duplicates:=dupIgnore; + ObjectPropertyIgnoreList.CaseSensitive:=False; + DoneList.Duplicates:=dupError; + DoneList.CaseSensitive:=True; + + while TodoList.Count<>0 do begin + AnObject:=TodoList.Objects[0]; + Name:=TodoList.Strings[0]; + TodoList.Delete(0); + if (AnObject<>nil) and (AnObject is TPersistent) then begin + // Make sure each object is only translated once + Assert (sizeof(integer)=sizeof(TObject)); + objid:=IntToHex(integer(AnObject),8); + if DoneList.Find(objid,i) then begin + continue; + end else begin + DoneList.Add(objid); + end; + + ObjectPropertyIgnoreList.Clear; + + // Find out if there is special handling of this object + currentcm:=nil; + // First check the local handling instructions + for j:=0 to TP_ClassHandling.Count-1 do begin + cm:=TObject(TP_ClassHandling.Items[j]) as TClassMode; + if AnObject.InheritsFrom(cm.HClass) then begin + if cm.PropertiesToIgnore.Count<>0 then begin + ObjectPropertyIgnoreList.AddStrings(cm.PropertiesToIgnore); + end else begin + // Ignore the entire class + currentcm:=cm; + break; + end; + end; + end; + // Then check the global handling instructions + if currentcm=nil then + for j:=0 to TP_GlobalClassHandling.Count-1 do begin + cm:=TObject(TP_GlobalClassHandling.Items[j]) as TClassMode; + if AnObject.InheritsFrom(cm.HClass) then begin + if cm.PropertiesToIgnore.Count<>0 then begin + ObjectPropertyIgnoreList.AddStrings(cm.PropertiesToIgnore); + end else begin + // Ignore the entire class + currentcm:=cm; + break; + end; + end; + end; + if currentcm<>nil then begin + ObjectPropertyIgnoreList.Clear; + // Ignore or use special handler + if Assigned(currentcm.SpecialHandler) then begin + currentcm.SpecialHandler (AnObject); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Special handler activated for '+AnObject.ClassName); + {$endif} + end else begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Ignoring object '+AnObject.ClassName); + {$endif} + end; + continue; + end; + + Count := GetPropList(AnObject, PropList); + try + for j := 0 to Count - 1 do begin + PropInfo := PropList[j]; + {$IFDEF UNICODE} + if not (PropInfo^.PropType^.Kind in [tkString, tkLString, tkWString, tkClass, tkUString]) then + {$ELSE} + if not (PropInfo^.PropType^.Kind in [tkString, tkLString, tkWString, tkClass]) then + {$ENDIF} + continue; + UPropName:=uppercase(string(PropInfo^.Name)); + // Ignore properties that are meant to be ignored + if ((currentcm=nil) or (not currentcm.PropertiesToIgnore.Find(UPropName,i))) and + (not TP_IgnoreList.Find(Name+'.'+UPropName,i)) and + (not ObjectPropertyIgnoreList.Find(UPropName,i)) then begin + TranslateProperty (AnObject,PropInfo,TodoList,TextDomain); + end; // if + end; // for + finally + if Count<>0 then + FreeMem (PropList); + end; + if AnObject is TStrings then begin + if ((AnObject as TStrings).Text<>'') and (TP_Retranslator<>nil) then + (TP_Retranslator as TTP_Retranslator).Remember(AnObject, 'Text', (AnObject as TStrings).Text); + TranslateStrings (AnObject as TStrings,TextDomain); + end; + // Check for TCollection + if AnObject is TCollection then begin + for i := 0 to (AnObject as TCollection).Count - 1 do begin + // Only add the object if it's not totally ignored already + if not Assigned(currentcm) or not AnObject.InheritsFrom(currentcm.HClass) then + TodoList.AddObject('',(AnObject as TCollection).Items[i]); + end; + end; + if AnObject is TComponent then begin + for i := 0 to TComponent(AnObject).ComponentCount - 1 do begin + comp:=TComponent(AnObject).Components[i]; + if (not TP_IgnoreList.Find(uppercase(comp.Name),j)) then begin + // Only add the object if it's not totally ignored or translated already + if not Assigned(currentcm) or not AnObject.InheritsFrom(currentcm.HClass) then begin + compmarker := comp.FindComponent('GNUgettextMarker'); + if not Assigned(compmarker) then + TodoList.AddObject(uppercase(comp.Name),comp); + end; + end; + end; + end; + end { if AnObject<>nil }; + end { while todolist.count<>0 }; + finally + FreeAndNil (todolist); + FreeAndNil (ObjectPropertyIgnoreList); + FreeAndNil (DoneList); + end; + FreeTP_ClassHandlingItems; + TP_IgnoreList.Clear; + TP_Retranslator:=nil; + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('----------------------------------------------------------------------'); + {$endif} +end; + +procedure TGnuGettextInstance.UseLanguage(LanguageCode: LanguageString); +var + i,p:integer; + dom:TDomain; + l2:string; +begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln('UseLanguage('''+LanguageCode+'''); called'); + {$endif} + + if LanguageCode='' then begin + LanguageCode:=GGGetEnvironmentVariable('LANG'); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('LANG env variable is '''+LanguageCode+'''.'); + {$endif} + {$ifdef MSWINDOWS} + if LanguageCode='' then begin + LanguageCode:=GetWindowsLanguage; + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Found Windows language code to be '''+LanguageCode+'''.'); + {$endif} + end; + {$endif} + p:=pos('.',LanguageCode); + if p<>0 then + LanguageCode:=LeftStr(LanguageCode,p-1); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Language code that will be set is '''+LanguageCode+'''.'); + {$endif} + end; + + curlang := LanguageCode; + for i:=0 to domainlist.Count-1 do begin + dom:=domainlist.Objects[i] as TDomain; + dom.SetLanguageCode (curlang); + end; + + l2:=lowercase(LeftStr(curlang,2)); + if (l2='en') or (l2='de') then curGetPluralForm:=GetPluralForm2EN else + if (l2='hu') or (l2='ko') or (l2='zh') or (l2='ja') or (l2='tr') then curGetPluralForm:=GetPluralForm1 else + if (l2='fr') or (l2='fa') or (lowercase(curlang)='pt_br') then curGetPluralForm:=GetPluralForm2FR else + if (l2='lv') then curGetPluralForm:=GetPluralForm3LV else + if (l2='ga') then curGetPluralForm:=GetPluralForm3GA else + if (l2='lt') then curGetPluralForm:=GetPluralForm3LT else + if (l2='ru') or (l2='uk') or (l2='hr') then curGetPluralForm:=GetPluralForm3RU else + if (l2='cs') or (l2='sk') then curGetPluralForm:=GetPluralForm3SK else + if (l2='pl') then curGetPluralForm:=GetPluralForm3PL else + if (l2='sl') then curGetPluralForm:=GetPluralForm4SL else begin + curGetPluralForm:=GetPluralForm2EN; + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Plural form for the language was not found. English plurality system assumed.'); + {$endif} + end; + + WhenNewLanguage (curlang); + + {$ifdef DXGETTEXTDEBUG} + DebugWriteln(''); + {$endif} +end; + +procedure TGnuGettextInstance.TranslateStrings(sl: TStrings;const TextDomain:DomainString); +var + line: string; + i: integer; + s:TStringList; +begin + if sl.Count > 0 then begin + sl.BeginUpdate; + try + s:=TStringList.Create; + try + s.Assign (sl); + for i:=0 to s.Count-1 do begin + line:=s.Strings[i]; + if line<>'' then + s.Strings[i]:=dgettext(TextDomain,line); + end; + sl.Assign(s); + finally + FreeAndNil (s); + end; + finally + sl.EndUpdate; + end; + end; +end; + +function TGnuGettextInstance.GetTranslatorNameAndEmail: TranslatedUnicodeString; +begin + Result:=GetTranslationProperty('LAST-TRANSLATOR'); +end; + +function TGnuGettextInstance.GetTranslationProperty( + const Propertyname: ComponentNameString): TranslatedUnicodeString; +begin + Result:=getdomain(curmsgdomain,DefaultDomainDirectory,CurLang).GetTranslationProperty (Propertyname); +end; + +function TGnuGettextInstance.dngettext(const szDomain: DomainString; const singular, plural: MsgIdString; + Number: Integer): TranslatedUnicodeString; +var + org:MsgIdString; + trans:TranslatedUnicodeString; + idx:integer; + p:integer; +begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('dngettext translation (domain '+szDomain+', number is '+IntTostr(Number)+') of '+singular+'/'+plural); + {$endif} + org:=singular+#0+plural; + trans:=dgettext(szDomain,org); + if org=trans then begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Translation was equal to english version. English plural forms assumed.'); + {$endif} + idx:=GetPluralForm2EN(Number) + end else + idx:=curGetPluralForm(Number); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Index '+IntToStr(idx)+' will be used'); + {$endif} + while true do begin + p:=pos(#0,trans); + if p=0 then begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Last translation used: '+utf8encode(trans)); + {$endif} + Result:=trans; + exit; + end; + if idx=0 then begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Translation found: '+utf8encode(trans)); + {$endif} + Result:=LeftStr(trans,p-1); + exit; + end; + delete (trans,1,p); + dec (idx); + end; +end; + +function TGnuGettextInstance.dngettext_NoExtract(const szDomain: DomainString; + const singular, plural: MsgIdString; + Number: Integer): TranslatedUnicodeString; +begin + // This one is very useful for translating text in variables. + // This can sometimes be necessary, and by using this function, + // the source code scanner will not trigger warnings. + Result:=dngettext(szDomain,singular,plural,Number); +end; + +{$ifndef UNICODE} +function TGnuGettextInstance.ngettext(const singular, plural: ansistring; + Number: Integer): TranslatedUnicodeString; +begin + Result := dngettext(curmsgdomain, singular, plural, Number); +end; +{$endif} + +function TGnuGettextInstance.ngettext(const singular, plural: MsgIdString; + Number: Integer): TranslatedUnicodeString; +begin + Result := dngettext(curmsgdomain, singular, plural, Number); +end; + +function TGnuGettextInstance.ngettext_NoExtract(const singular, + plural: MsgIdString; Number: Integer): TranslatedUnicodeString; +begin + // This one is very useful for translating text in variables. + // This can sometimes be necessary, and by using this function, + // the source code scanner will not trigger warnings. + Result:=ngettext(singular,plural,Number); +end; + +procedure TGnuGettextInstance.WhenNewDomain(const TextDomain: DomainString); +begin + // This is meant to be empty. +end; + +procedure TGnuGettextInstance.WhenNewLanguage(const LanguageID: LanguageString); +begin + // This is meant to be empty. +end; + +procedure TGnuGettextInstance.WhenNewDomainDirectory(const TextDomain:DomainString; const Directory: FilenameString); +begin + // This is meant to be empty. +end; + +procedure TGnuGettextInstance.GetListOfLanguages(const domain: DomainString; + list: TStrings); +begin + getdomain(Domain,DefaultDomainDirectory,CurLang).GetListOfLanguages(list); +end; + +procedure TGnuGettextInstance.bindtextdomainToFile(const szDomain:DomainString; const filename: FilenameString); +begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Text domain "'+szDomain+'" is now bound to file named "'+filename+'"'); + {$endif} + getdomain(szDomain,DefaultDomainDirectory,CurLang).SetFilename (filename); +end; + +procedure TGnuGettextInstance.DebugLogPause(PauseEnabled: boolean); +begin + {$ifdef DXGETTEXTDEBUG} + DebugLogOutputPaused:=PauseEnabled; + {$endif} +end; + +procedure TGnuGettextInstance.DebugLogToFile(const filename: FilenameString; append:boolean=false); +{$ifdef DXGETTEXTDEBUG} +var + fs:TFileStream; + marker:ansistring; +{$endif} +begin + {$ifdef DXGETTEXTDEBUG} + // Create the file if needed + if (not fileexists(filename)) or (not append) then + fileclose (filecreate (filename)); + + // Open file + fs:=TFileStream.Create (filename,fmOpenWrite or fmShareDenyWrite); + if append then + fs.Seek(0,soFromEnd); + + // Write header if appending + if fs.Position<>0 then begin + marker:=sLineBreak+'==========================================================================='+sLineBreak; + fs.WriteBuffer(marker[1],length(marker)); + end; + + // Copy the memorystream contents to the file + DebugLog.Seek(0,soFromBeginning); + fs.CopyFrom(DebugLog,0); + + // Make DebugLog point to the filestream + FreeAndNil (DebugLog); + DebugLog:=fs; + {$endif} +end; + +{$ifdef DXGETTEXTDEBUG} +procedure TGnuGettextInstance.DebugWriteln(line: ansistring); +Var + Discard: Boolean; +begin + Assert (DebugLogCS<>nil); + Assert (DebugLog<>nil); + + DebugLogCS.BeginWrite; + try + if DebugLogOutputPaused then + exit; + + if Assigned (fOnDebugLine) then begin + Discard := True; + fOnDebugLine (Self, Line, Discard); + If Discard then Exit; + end; + + line:=line+sLineBreak; + + // Ensure that memory usage doesn't get too big. + if (DebugLog is TMemoryStream) and (DebugLog.Position>1000000) then begin + line:=sLineBreak+sLineBreak+sLineBreak+sLineBreak+sLineBreak+ + 'Debug log halted because memory usage grew too much.'+sLineBreak+ + 'Specify a filename to store the debug log in or disable debug loggin in gnugettext.pas.'+ + sLineBreak+sLineBreak+sLineBreak+sLineBreak+sLineBreak; + DebugLogOutputPaused:=True; + end; + DebugLog.WriteBuffer(line[1],length(line)); + finally + DebugLogCS.EndWrite; + end; +end; +{$endif} + +function TGnuGettextInstance.Getdomain(const domain:DomainString; const DefaultDomainDirectory:FilenameString; const CurLang: LanguageString): TDomain; +// Retrieves the TDomain object for the specified domain. +// Creates one, if none there, yet. +var + idx: integer; +begin + idx := domainlist.IndexOf(Domain); + if idx = -1 then begin + Result := TDomain.Create; + {$ifdef DXGETTEXTDEBUG} + Result.DebugLogger:=DebugWriteln; + {$endif} + Result.Domain := Domain; + Result.Directory := DefaultDomainDirectory; + Result.SetLanguageCode(curlang); + domainlist.AddObject(Domain, Result); + end else begin + Result := domainlist.Objects[idx] as TDomain; + end; +end; + +function TGnuGettextInstance.LoadResString( + ResStringRec: PResStringRec): UnicodeString; +{$ifdef MSWINDOWS} +var + Len: Integer; + {$IFDEF UNICODE} + Buffer: array [0..1023] of widechar; + {$else} + Buffer: array [0..1023] of ansichar; + {$endif} +{$endif} +{$ifdef LINUX } +const + ResStringTableLen = 16; +type + ResStringTable = array [0..ResStringTableLen-1] of LongWord; +var + Handle: TResourceHandle; + Tab: ^ResStringTable; + ResMod: HMODULE; +{$endif } +begin + if ResStringRec=nil then + exit; + if ResStringRec.Identifier>=64*1024 then begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('LoadResString was given an invalid ResStringRec.Identifier'); + {$endif} + Result:='ERROR'; + exit; + end else begin + {$ifdef LINUX} + // This works with Unicode if the Linux has utf-8 character set + // Result:=System.LoadResString(ResStringRec); + ResMod:=FindResourceHInstance(ResStringRec^.Module^); + Handle:=FindResource(ResMod, + PAnsiChar(ResStringRec^.Identifier div ResStringTableLen), PAnsiChar(6)); // RT_STRING + Tab:=Pointer(LoadResource(ResMod, Handle)); + if Tab=nil then + Result:='' + else + Result:=PWideChar(PAnsiChar(Tab)+Tab[ResStringRec^.Identifier mod ResStringTableLen]); + {$endif} + {$ifdef MSWINDOWS} + if not Win32PlatformIsUnicode then begin + SetString(Result, Buffer, + LoadString(FindResourceHInstance(ResStringRec.Module^), + ResStringRec.Identifier, Buffer, SizeOf(Buffer))) + end else begin + Result := ''; + Len := 0; + While Length(Result)<=Len+1 do begin + if Length(Result) = 0 then + SetLength(Result, 1024) + else + SetLength(Result, Length(Result) * 2); + Len := LoadStringW(FindResourceHInstance(ResStringRec.Module^), + ResStringRec.Identifier, PWideChar(Result), Length(Result)); + end; + SetLength(Result, Len); + end; + {$endif} + end; + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Loaded resourcestring: '+utf8encode(Result)); + {$endif} + if CreatorThread<>GetCurrentThreadId then begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('LoadResString was called from an invalid thread. Resourcestring was not translated.'); + {$endif} + end else + Result:=ResourceStringGettext(Result); +end; + +procedure TGnuGettextInstance.RetranslateComponent(AnObject: TComponent; + const TextDomain: DomainString); +var + comp:TGnuGettextComponentMarker; +begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('======================================================================'); + DebugWriteln ('RetranslateComponent() was called for a component with name '+AnObject.Name+'.'); + {$endif} + comp:=AnObject.FindComponent('GNUgettextMarker') as TGnuGettextComponentMarker; + if comp=nil then begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Retranslate was called on an object that has not been translated before. An Exception is being raised.'); + {$endif} + raise EGGProgrammingError.Create ('Retranslate was called on an object that has not been translated before. Please use TranslateComponent() before RetranslateComponent().'); + end else begin + if comp.LastLanguage<>curlang then begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('The retranslator is being executed.'); + {$endif} + comp.Retranslator.Execute; + end else begin + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('The language has not changed. The retranslator is not executed.'); + {$endif} + end; + end; + comp.LastLanguage:=curlang; + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('======================================================================'); + {$endif} +end; + +procedure TGnuGettextInstance.TP_IgnoreClass(IgnClass: TClass); +var + cm:TClassMode; + i:integer; +begin + for i:=0 to TP_ClassHandling.Count-1 do begin + cm:=TObject(TP_ClassHandling.Items[i]) as TClassMode; + if cm.HClass=IgnClass then + raise EGGProgrammingError.Create ('You cannot add a class to the ignore list that is already on that list: '+IgnClass.ClassName+'.'); + if IgnClass.InheritsFrom(cm.HClass) then begin + // This is the place to insert this class + cm:=TClassMode.Create; + cm.HClass:=IgnClass; + TP_ClassHandling.Insert(i,cm); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Locally, class '+IgnClass.ClassName+' is being ignored.'); + {$endif} + exit; + end; + end; + cm:=TClassMode.Create; + cm.HClass:=IgnClass; + TP_ClassHandling.Add(cm); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Locally, class '+IgnClass.ClassName+' is being ignored.'); + {$endif} +end; + +procedure TGnuGettextInstance.TP_IgnoreClassProperty(IgnClass: TClass; + propertyname: ComponentNameString); +var + cm:TClassMode; + i:integer; +begin + propertyname:=uppercase(propertyname); + for i:=0 to TP_ClassHandling.Count-1 do begin + cm:=TObject(TP_ClassHandling.Items[i]) as TClassMode; + if cm.HClass=IgnClass then begin + if Assigned(cm.SpecialHandler) then + raise EGGProgrammingError.Create ('You cannot ignore a class property for a class that has a handler set.'); + cm.PropertiesToIgnore.Add(propertyname); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Globally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.'); + {$endif} + exit; + end; + if IgnClass.InheritsFrom(cm.HClass) then begin + // This is the place to insert this class + cm:=TClassMode.Create; + cm.HClass:=IgnClass; + cm.PropertiesToIgnore.Add(propertyname); + TP_ClassHandling.Insert(i,cm); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Locally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.'); + {$endif} + exit; + end; + end; + cm:=TClassMode.Create; + cm.HClass:=IgnClass; + cm.PropertiesToIgnore.Add(propertyname); + TP_GlobalClassHandling.Add(cm); + {$ifdef DXGETTEXTDEBUG} + DebugWriteln ('Locally, the '+propertyname+' property of class '+IgnClass.ClassName+' is being ignored.'); + {$endif} +end; + +procedure TGnuGettextInstance.FreeTP_ClassHandlingItems; +begin + while TP_ClassHandling.Count<>0 do begin + TObject(TP_ClassHandling.Items[0]).Free; + TP_ClassHandling.Delete(0); + end; +end; + +{$ifndef UNICODE} +function TGnuGettextInstance.ansi2wideDTCP(const s: ansistring): MsgIdString; +{$ifdef MSWindows} +var + len:integer; +{$endif} +begin +{$ifdef MSWindows} + if DesignTimeCodePage=CP_ACP then begin + // No design-time codepage specified. Using runtime codepage instead. +{$endif} + Result:=s; +{$ifdef MSWindows} + end else begin + len:=length(s); + if len=0 then + Result:='' + else begin + SetLength (Result,len); + len:=MultiByteToWideChar(DesignTimeCodePage,0,pansichar(s),len,pwidechar(Result),len); + if len=0 then + raise EGGAnsi2WideConvError.Create ('Cannot convert string to widestring:'+sLineBreak+s); + SetLength (Result,len); + end; + end; +{$endif} +end; +{$endif} + +{$ifndef UNICODE} +function TGnuGettextInstance.dngettext(const szDomain: DomainString; const singular, + plural: ansistring; Number: Integer): TranslatedUnicodeString; +begin + Result:=dngettext (szDomain, ansi2wideDTCP(singular), ansi2wideDTCP(plural), Number); +end; +{$endif} + +{ TClassMode } + +constructor TClassMode.Create; +begin + PropertiesToIgnore:=TStringList.Create; + PropertiesToIgnore.Sorted:=True; + PropertiesToIgnore.Duplicates:=dupError; + PropertiesToIgnore.CaseSensitive:=False; +end; + +destructor TClassMode.Destroy; +begin + FreeAndNil (PropertiesToIgnore); + inherited; +end; + +{ TFileLocator } + +procedure TFileLocator.Analyze; +var + s:RawByteString; + i:integer; + offset:int64; + fs:TFileStream; + fi:TEmbeddedFileInfo; + filename:FilenameString; + filename8bit:RawByteString; +const + arrch:array[0..43] of ansichar='6637DB2E-62E1-4A60-AC19-C23867046A89'#0#0#0#0#0#0#0#0; +begin + // Copy byte by byte, compatible with Delphi 2009 and older + SetLength (s,high(arrch)-low(arrch)+1); + for i:=0 to 43 do + s[i+1]:=arrch[i]; + + s:=MidStr(s,length(s)-7,8); + offset:=0; + for i:=8 downto 1 do + offset:=offset shl 8+ord(s[i]); + if offset=0 then + exit; + BaseDirectory:=ExtractFilePath(ExecutableFilename); + try + fs:=TFileStream.Create(ExecutableFilename,fmOpenRead or fmShareDenyNone); + try + while true do begin + fs.Seek(offset,soFromBeginning); + offset:=ReadInt64(fs); + if offset=0 then + exit; + fi:=TEmbeddedFileInfo.Create; + try + fi.Offset:=ReadInt64(fs); + fi.Size:=ReadInt64(fs); + SetLength (filename8bit, offset-fs.position); + fs.ReadBuffer (filename8bit[1],offset-fs.position); + filename:=trim(utf8decode(filename8bit)); + if PreferExternal and sysutils.fileexists(basedirectory+filename) then begin + // Disregard the internal version and use the external version instead + FreeAndNil (fi); + end else + filelist.AddObject(filename,fi); + except + FreeAndNil (fi); + raise; + end; + end; + finally + FreeAndNil (fs); + end; + except + {$ifdef DXGETTEXTDEBUG} + raise; + {$endif} + end; +end; + +constructor TFileLocator.Create; +begin + MoFilesCS:=TMultiReadExclusiveWriteSynchronizer.Create; + MoFiles:=TStringList.Create; + filelist:=TStringList.Create; + {$ifdef LINUX} + filelist.Duplicates:=dupError; + filelist.CaseSensitive:=True; + {$endif} + MoFiles.Sorted:=True; + MoFiles.Duplicates:=dupError; + MoFiles.CaseSensitive:=False; + {$ifdef MSWINDOWS} + filelist.Duplicates:=dupError; + filelist.CaseSensitive:=False; + {$endif} + filelist.Sorted:=True; +end; + +destructor TFileLocator.Destroy; +begin + while filelist.count<>0 do begin + filelist.Objects[0].Free; + filelist.Delete (0); + end; + FreeAndNil (filelist); + FreeAndNil (MoFiles); + FreeAndNil (MoFilesCS); + inherited; +end; + +function TFileLocator.FileExists(filename: FilenameString): boolean; +var + idx:integer; +begin + if LeftStr(filename,length(basedirectory))=basedirectory then begin + // Cut off basedirectory if the file is located beneath that base directory + filename:=MidStr(filename,length(basedirectory)+1,maxint); + end; + Result:=filelist.Find(filename,idx); +end; + +function TFileLocator.GetMoFile(filename: FilenameString; DebugLogger:TDebugLogger): TMoFile; +var + fi:TEmbeddedFileInfo; + idx:integer; + idxname:FilenameString; + Offset, Size: Int64; + realfilename:FilenameString; +begin + // Find real filename + offset:=0; + size:=0; + realfilename:=filename; + if LeftStr(filename,length(basedirectory))=basedirectory then begin + filename:=MidStr(filename,length(basedirectory)+1,maxint); + idx:=filelist.IndexOf(filename); + if idx<>-1 then begin + fi:=filelist.Objects[idx] as TEmbeddedFileInfo; + realfilename:=ExecutableFilename; + offset:=fi.offset; + size:=fi.size; + {$ifdef DXGETTEXTDEBUG} + DebugLogger ('Instead of '+filename+', using '+realfilename+' from offset '+IntTostr(offset)+', size '+IntToStr(size)); + {$endif} + end; + end; + + + {$ifdef DXGETTEXTDEBUG} + DebugLogger ('Reading .mo data from file '''+filename+''''); + {$endif} + + // Find TMoFile object + MoFilesCS.BeginWrite; + try + idxname:=realfilename+' //\\ '+IntToStr(offset); + if MoFiles.Find(idxname, idx) then begin + Result:=MoFiles.Objects[idx] as TMoFile; + end else begin + Result:=TMoFile.Create (realfilename, Offset, Size); + MoFiles.AddObject(idxname, Result); + end; + Inc (Result.Users); + finally + MoFilesCS.EndWrite; + end; +end; + +function TFileLocator.ReadInt64(str: TStream): int64; +begin + Assert (sizeof(Result)=8); + str.ReadBuffer(Result,8); +end; + +procedure TFileLocator.ReleaseMoFile(mofile: TMoFile); +var + i:integer; +begin + Assert (mofile<>nil); + + MoFilesCS.BeginWrite; + try + dec (mofile.Users); + if mofile.Users<=0 then begin + i:=MoFiles.Count-1; + while i>=0 do begin + if MoFiles.Objects[i]=mofile then begin + MoFiles.Delete(i); + FreeAndNil (mofile); + break; + end; + dec (i); + end; + end; + finally + MoFilesCS.EndWrite; + end; +end; + +{ TTP_Retranslator } + +constructor TTP_Retranslator.Create; +begin + list:=TList.Create; +end; + +destructor TTP_Retranslator.Destroy; +var + i:integer; +begin + for i:=0 to list.Count-1 do + TObject(list.Items[i]).Free; + FreeAndNil (list); + inherited; +end; + +procedure TTP_Retranslator.Execute; +var + i:integer; + sl:TStrings; + item:TTP_RetranslatorItem; + newvalue:TranslatedUnicodeString; + comp:TGnuGettextComponentMarker; + ppi:PPropInfo; +begin + for i:=0 to list.Count-1 do begin + item:=TObject(list.items[i]) as TTP_RetranslatorItem; + if item.obj is TComponent then begin + comp:=TComponent(item.obj).FindComponent('GNUgettextMarker') as TGnuGettextComponentMarker; + if Assigned(comp) and (self<>comp.Retranslator) then begin + comp.Retranslator.Execute; + Continue; + end; + end; + if item.obj is TStrings then begin + // Since we don't know the order of items in sl, and don't have + // the original .Objects[] anywhere, we cannot anticipate anything + // about the current sl.Strings[] and sl.Objects[] values. We therefore + // have to discard both values. We can, however, set the original .Strings[] + // value into the list and retranslate that. + sl:=TStringList.Create; + try + sl.Text:=item.OldValue; + Instance.TranslateStrings(sl,textdomain); + (item.obj as TStrings).BeginUpdate; + try + (item.obj as TStrings).Text:=sl.Text; + finally + (item.obj as TStrings).EndUpdate; + end; + finally + FreeAndNil (sl); + end; + end else begin + newValue:=instance.dgettext(textdomain,item.OldValue); + ppi:=GetPropInfo(item.obj, item.Propname); + if ppi<>nil then begin + SetWideStrProp(item.obj, ppi, newValue); + end else begin + {$ifdef DXGETTEXTDEBUG} + Instance.DebugWriteln ('ERROR: On retranslation, property disappeared: '+item.Propname+' for object of type '+item.obj.ClassName); + {$endif} + end; + end; + end; +end; + +procedure TTP_Retranslator.Remember(obj: TObject; PropName: ComponentNameString; + OldValue: TranslatedUnicodeString); +var + item:TTP_RetranslatorItem; +begin + item:=TTP_RetranslatorItem.Create; + item.obj:=obj; + item.Propname:=Propname; + item.OldValue:=OldValue; + list.Add(item); +end; + +{ TGnuGettextComponentMarker } + +destructor TGnuGettextComponentMarker.Destroy; +begin + FreeAndNil (Retranslator); + inherited; +end; + +{ THook } + +constructor THook.Create(OldProcedure, NewProcedure: pointer; FollowJump:boolean=false); +{ Idea and original code from Igor Siticov } +{ Modified by Jacques Garcia Vazquez and Lars Dybdahl } +begin + {$ifndef CPU386} + raise Exception.Create ('This procedure only works on Intel i386 compatible processors.'); + {$endif} + + oldproc:=OldProcedure; + newproc:=NewProcedure; + + Reset (FollowJump); +end; + +destructor THook.Destroy; +begin + Shutdown; + inherited; +end; + +procedure THook.Disable; +begin + Assert (PatchPosition<>nil,'Patch position in THook was nil when Disable was called'); + PatchPosition[0]:=Original[0]; + PatchPosition[1]:=Original[1]; + PatchPosition[2]:=Original[2]; + PatchPosition[3]:=Original[3]; + PatchPosition[4]:=Original[4]; +end; + +procedure THook.Enable; +begin + Assert (PatchPosition<>nil,'Patch position in THook was nil when Enable was called'); + PatchPosition[0]:=Patch[0]; + PatchPosition[1]:=Patch[1]; + PatchPosition[2]:=Patch[2]; + PatchPosition[3]:=Patch[3]; + PatchPosition[4]:=Patch[4]; +end; + +procedure THook.Reset(FollowJump: boolean); +var + offset:integer; + {$ifdef LINUX} + p:pointer; + pagesize:integer; + {$endif} + {$ifdef MSWindows} + ov: cardinal; + {$endif} +begin + if PatchPosition<>nil then + Shutdown; + + patchPosition := OldProc; + if FollowJump and (Word(OldProc^) = $25FF) then begin + // This finds the correct procedure if a virtual jump has been inserted + // at the procedure address + Inc(Integer(patchPosition), 2); // skip the jump + patchPosition := pansiChar(Pointer(pointer(patchPosition)^)^); + end; + offset:=integer(NewProc)-integer(pointer(patchPosition))-5; + + Patch[0] := ansichar($E9); + Patch[1] := ansichar(offset and 255); + Patch[2] := ansichar((offset shr 8) and 255); + Patch[3] := ansichar((offset shr 16) and 255); + Patch[4] := ansichar((offset shr 24) and 255); + + Original[0]:=PatchPosition[0]; + Original[1]:=PatchPosition[1]; + Original[2]:=PatchPosition[2]; + Original[3]:=PatchPosition[3]; + Original[4]:=PatchPosition[4]; + + {$ifdef MSWINDOWS} + if not VirtualProtect(Pointer(PatchPosition), 5, PAGE_EXECUTE_READWRITE, @ov) then + RaiseLastOSError; + {$endif} + {$ifdef LINUX} + pageSize:=sysconf (_SC_PAGE_SIZE); + p:=pointer(PatchPosition); + p:=pointer((integer(p) + PAGESIZE-1) and not (PAGESIZE-1) - pageSize); + if mprotect (p, pageSize, PROT_READ + PROT_WRITE + PROT_EXEC) <> 0 then + RaiseLastOSError; + {$endif} +end; + +procedure THook.Shutdown; +begin + Disable; + PatchPosition:=nil; +end; + +procedure HookIntoResourceStrings (enabled:boolean=true; SupportPackages:boolean=false); +begin + HookLoadResString.Reset (SupportPackages); + HookLoadStr.Reset (SupportPackages); + HookFmtLoadStr.Reset (SupportPackages); + if enabled then begin + HookLoadResString.Enable; + HookLoadStr.Enable; + HookFmtLoadStr.Enable; + end; +end; + +{ TMoFile } + +function TMoFile.autoswap32(i: cardinal): cardinal; +var + cnv1, cnv2: + record + case integer of + 0: (arr: array[0..3] of byte); + 1: (int: cardinal); + end; +begin + if doswap then begin + cnv1.int := i; + cnv2.arr[0] := cnv1.arr[3]; + cnv2.arr[1] := cnv1.arr[2]; + cnv2.arr[2] := cnv1.arr[1]; + cnv2.arr[3] := cnv1.arr[0]; + Result := cnv2.int; + end else + Result := i; +end; + +function TMoFile.CardinalInMem(baseptr: PansiChar; Offset: Cardinal): Cardinal; +var pc:^Cardinal; +begin + inc (baseptr,offset); + pc:=Pointer(baseptr); + Result:=pc^; + if doswap then + autoswap32(Result); +end; + +constructor TMoFile.Create(filename: FilenameString; Offset,Size:int64); +var + i:cardinal; + nn:integer; + {$ifdef linux} + mofile:TFileStream; + {$endif} +begin + if sizeof(i) <> 4 then + raise EGGProgrammingError.Create('TDomain in gnugettext is written for an architecture that has 32 bit integers.'); + + {$ifdef mswindows} + // Map the mo file into memory and let the operating system decide how to cache + mo:=createfile (PChar(filename),GENERIC_READ,FILE_SHARE_READ,nil,OPEN_EXISTING,0,0); + if mo=INVALID_HANDLE_VALUE then + raise EGGIOError.Create ('Cannot open file '+filename); + momapping:=CreateFileMapping (mo, nil, PAGE_READONLY, 0, 0, nil); + if momapping=0 then + raise EGGIOError.Create ('Cannot create memory map on file '+filename); + momemoryHandle:=MapViewOfFile (momapping,FILE_MAP_READ,0,0,0); + if momemoryHandle=nil then begin + raise EGGIOError.Create ('Cannot map file '+filename+' into memory. Reason: '+GetLastWinError); + end; + momemory:=momemoryHandle+offset; + {$endif} + {$ifdef linux} + // Read the whole file into memory + mofile:=TFileStream.Create (filename, fmOpenRead or fmShareDenyNone); + try + if size=0 then + size:=mofile.Size; + Getmem (momemoryHandle,size); + momemory:=momemoryHandle; + mofile.Seek(offset,soFromBeginning); + mofile.ReadBuffer(momemory^,size); + finally + FreeAndNil (mofile); + end; + {$endif} + + // Check the magic number + doswap:=False; + i:=CardinalInMem(momemory,0); + if (i <> $950412DE) and (i <> $DE120495) then + raise EGGIOError.Create('This file is not a valid GNU gettext mo file: ' + filename); + doswap := (i = $DE120495); + + + // Find the positions in the file according to the file format spec + CardinalInMem(momemory,4); // Read the version number, but don't use it for anything. + N:=CardinalInMem(momemory,8); // Get string count + O:=CardinalInMem(momemory,12); // Get offset of original strings + T:=CardinalInMem(momemory,16); // Get offset of translated strings + + // Calculate start conditions for a binary search + nn := N; + startindex := 1; + while nn <> 0 do begin + nn := nn shr 1; + startindex := startindex shl 1; + end; + startindex := startindex shr 1; + startstep := startindex shr 1; +end; + +destructor TMoFile.Destroy; +begin + {$ifdef mswindows} + UnMapViewOfFile (momemoryHandle); + CloseHandle (momapping); + CloseHandle (mo); + {$endif} + {$ifdef linux} + FreeMem (momemoryHandle); + {$endif} + inherited; +end; + +function TMoFile.gettext(const msgid: RawUtf8String;var found:boolean): RawUtf8String; +var + i, step: cardinal; + offset, pos: cardinal; + CompareResult:integer; + msgidptr,a,b:PAnsiChar; + abidx:integer; + size, msgidsize:integer; +begin + found:=false; + msgidptr:=PAnsiChar(msgid); + msgidsize:=length(msgid); + + // Do binary search + i:=startindex; + step:=startstep; + while true do begin + // Get string for index i + pos:=O+8*(i-1); + offset:=CardinalInMem (momemory,pos+4); + size:=CardinalInMem (momemory,pos); + a:=msgidptr; + b:=momemory+offset; + abidx:=size; + if msgidsize0 do begin + CompareResult:=integer(byte(a^))-integer(byte(b^)); + if CompareResult<>0 then + break; + dec (abidx); + inc (a); + inc (b); + end; + if CompareResult=0 then + CompareResult:=msgidsize-size; + if CompareResult=0 then begin // msgid=s + // Found the msgid + pos:=T+8*(i-1); + offset:=CardinalInMem (momemory,pos+4); + size:=CardinalInMem (momemory,pos); + SetString (Result,momemory+offset,size); + found:=True; + break; + end; + if step=0 then begin + // Not found + Result:=msgid; + break; + end; + if CompareResult<0 then begin // msgids + i := i + step; + if i > N then + i := N; + step := step shr 1; + end; + end; +end; + +var + param0:string; + +initialization + {$ifdef DXGETTEXTDEBUG} + {$ifdef MSWINDOWS} + MessageBox (0,'gnugettext.pas debugging is enabled. Turn it off before releasing this piece of software.','Information',MB_OK); + {$endif} + {$ifdef LINUX} + writeln (stderr,'gnugettext.pas debugging is enabled. Turn it off before releasing this piece of software.'); + {$endif} + {$endif} + {$ifdef FPC} + {$ifdef LINUX} + SetLocale(LC_ALL, ''); + SetCWidestringManager; + {$endif LINUX} + {$endif FPC} + if IsLibrary then begin + // Get DLL/shared object filename + SetLength (ExecutableFilename,300); + {$ifdef MSWINDOWS} + SetLength (ExecutableFilename,GetModuleFileName(FindClassHInstance(TGnuGettextInstance), PChar(ExecutableFilename), length(ExecutableFilename))); + {$else} + SetLength (ExecutableFilename,GetModuleFileName(0, PAnsiChar(ExecutableFilename), length(ExecutableFilename))); + {$endif} + end else + ExecutableFilename:=Paramstr(0); + FileLocator:=TFileLocator.Create; + FileLocator.Analyze; + ResourceStringDomainList:=TStringList.Create; + ResourceStringDomainList.Add(DefaultTextDomain); + ResourceStringDomainListCS:=TMultiReadExclusiveWriteSynchronizer.Create; + DefaultInstance:=TGnuGettextInstance.Create; + {$ifdef MSWINDOWS} + Win32PlatformIsUnicode := (Win32Platform = VER_PLATFORM_WIN32_NT); + {$endif} + + // replace Borlands LoadResString with gettext enabled version: + {$ifdef UNICODE} + HookLoadResString:=THook.Create (@system.LoadResString, @LoadResStringW); + {$else} + HookLoadResString:=THook.Create (@system.LoadResString, @LoadResStringA); + {$endif} + HookLoadStr:=THook.Create (@sysutils.LoadStr, @SysUtilsLoadStr); + HookFmtLoadStr:=THook.Create (@sysutils.FmtLoadStr, @SysUtilsFmtLoadStr); + param0:=lowercase(extractfilename(paramstr(0))); + if (param0<>'delphi32.exe') and (param0<>'kylix') and (param0<>'bds.exe') then + HookIntoResourceStrings (AutoCreateHooks,false); + param0:=''; + +finalization + FreeAndNil (DefaultInstance); + FreeAndNil (ResourceStringDomainListCS); + FreeAndNil (ResourceStringDomainList); + FreeAndNil (HookFmtLoadStr); + FreeAndNil (HookLoadStr); + FreeAndNil (HookLoadResString); + FreeAndNil (FileLocator); + +end. + diff --git a/internal/2.4.4/1/Demos/Customizer/langcodes.txt b/internal/2.4.4/1/Demos/Customizer/langcodes.txt new file mode 100644 index 0000000..fd86faf --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/langcodes.txt @@ -0,0 +1,16 @@ +[ar] Arabic +[de] German +[en] English +[es] Spanish +[fi] Finnish +[fr] French +[ja] Japanese +[ko] Korean +[nl] Dutch +[pt_BR] Brazilian Portuguese +[ru] Russian +[sr_Cyrillic] Serbian Cyrillic +[sr_Latin] Serbian Latin +[sv] Swedish +[tr] Turkish +[zh_CN] Chinese \ No newline at end of file diff --git a/internal/2.4.4/1/Demos/Customizer/locale/ar/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/ar/LC_MESSAGES/default.mo new file mode 100644 index 0000000..028d50b Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/ar/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/ar/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/ar/LC_MESSAGES/default.po new file mode 100644 index 0000000..79d04ed --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/ar/LC_MESSAGES/default.po @@ -0,0 +1,561 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Ammar I , 2009. +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-12 17:42-0300\n" +"Last-Translator: \n" +"Language-Team: Sptbxlib\n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" +"X-Generator: Virtaal 0.4.0\n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "قياسي" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "جديد" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "ÙØªØ­" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "Ø­ÙØ¸" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "قص" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "نسخ" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "لصق" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "بحث" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "سمات" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "تنسيق" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "اسم الخط" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "حجم الخط" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "عريض" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "مائل" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "خط سÙلي" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "قائمة" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "&ملÙ" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "ÙØªØ­..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "طباعة" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "اغلاق" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "&تحرير" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "تحديد الكل" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "&تنسيق" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "محاذاة لليسار" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "توسيط" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "محاذاة لليمين" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "كرات" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "كرات مرقمة" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "&عرض" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "الشريط ال&جانبي" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "&سجل الاوامر" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "&خيارات" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "&مساعدة" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "ا&شرطة الادوات" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "شريط ادوات &قياسي" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "شريط ادوات الت&صاميم" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "&تنسيق شريط الادوات" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "شريط الادوات الا&ستكشاÙ" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "&حول" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "التصميم" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "سجل الاوامر" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "خيارات المخصص" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "مساعدة" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "انقر بالزر اليميني على شريط الادوات للبدء" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "استكشاÙ" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "للخلÙ" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "للامام" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "تحديث" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "توقÙ" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "بحث" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "Ù…Ù„ÙØ§Øª" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "تحرير" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "تخصيص" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "تخصيص شريط الادوات" + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "تخصيص مضمن.." + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "خيارات" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "خصائص" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "اعداد Ø§Ù„ØµÙØ­Ø©" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "التاريخ" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "Ø§Ù„Ù…ÙØ¶Ù„Ø©" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "المخصص" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "مواÙÙ‚" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "الغاء" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "تطبيق" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "Ø­ÙØ¸ التصميم" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "Ø­ÙØ¸ التصميم الحالي باسم :" + +# Customizer Form +msgid "Toolbars" +msgstr "اشرطة الادوات" + +msgid "Commands" +msgstr "الاوامر" + +msgid "Shortcuts" +msgstr "الاختصارات" + +msgid "&Default Options" +msgstr "استعادة الا&ÙØªØ±Ø§Ø¶ÙŠ" + +msgid "&Close" +msgstr "ا&غلاق" + +msgid "&Visible" +msgstr "&ظاهر" + +msgid "T&ext Options" +msgstr "خيارات ال&نص" + +msgid "Icons + Selective Text" +msgstr "الايقونات + النص المنتقى" + +msgid "Icons" +msgstr "الايقونات" + +msgid "Icons + Text" +msgstr "الايقونات والنص" + +msgid "Text" +msgstr "النص" + +msgid "&Icon Options" +msgstr "خيارات ال&ايقونات" + +msgid "Large Icons" +msgstr "ايقونات كبيرة" + +msgid "Small Icons" +msgstr "ايقونات صغيرة" + +msgid "&Skins" +msgstr "&سمات" + +msgid "C&hange" +msgstr "&تغيير" + +msgid "[ Separator ]" +msgstr "[ شريط ÙØ§ØµÙ„ ]" + +msgid "[ Blank Separator ]" +msgstr "[ شريط ÙØ§ØµÙ„ ÙØ§Ø±Øº ]" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "Ù„Ø§Ø¶Ø§ÙØ© ازرار اوامر, اسحب الامر (من اللائحة) ثم اÙلته ÙÙŠ شريط الادوات. لازالة ازرار الاوامر, اسحبه خارج شريط الادوات Ùˆ اÙلتة ÙÙŠ لائحة الاوامر." + +msgid "Change Shortcut" +msgstr "تغيير الاختصار" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "الاختصار مستخدم الآن بواسطة الامر \"%s\" , هل تريد اعادة نسبة الى الامر \"%s\" ØŸ" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "لون Ø´ÙØ§Ù" + +msgid "Color Picker" +msgstr "منتخب الالوان" + +msgid "Drag && Drop" +msgstr "اسحب && اÙلت" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/de/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/de/LC_MESSAGES/default.mo new file mode 100644 index 0000000..1469abf Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/de/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/de/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/de/LC_MESSAGES/default.po new file mode 100644 index 0000000..656caa9 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/de/LC_MESSAGES/default.po @@ -0,0 +1,558 @@ +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:53-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "Standard" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "Neu" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "Öffnen" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "Speichern" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "Ausschneiden" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "Kopieren" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "Einfügen" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "Suchen" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "Themen" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "Format" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "Schriftname" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "Schriftgröße" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "Fett" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "Kursiv" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "Unterstrichen" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "Menü" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "&Datei" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "Öffnen..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "Drucken" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "Beenden" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "B&earbeiten" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "Alles markieren" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "&Format" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "Links ausrichten" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "Zentriert" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "Rechts ausrichten" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "Aufzählungszeichen" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "Sortierte Aufzählungszeichen" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "&Ansicht" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "&Navigationsbereich einrichten" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "&Kommandoprotokoll" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "&Optionen" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "&Hilfe" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "&Toolbars" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "&Standardleiste" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "&Layoutleiste" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "&Formatleiste" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "&Navigationsleiste" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "&Info" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "Layouts" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "Kommandoprotokoll" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "Anpassungsoptionen" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "Hilfe" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "Rechtsklick auf die Leiste, um das Abspielen zu beginnen" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "Navigation" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "Zurück" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "Vor" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "Aktualisieren" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "Stop" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "Suchen" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "Dateien" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "Bearbeiten" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "Anpassung" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "Anpassen..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "Eingebettetes Anpassen..." + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "Optionen" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "Eigenschaften" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "Druckereinstellungen" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "Chronik" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "Favoriten" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "Anpassungsprogramm" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "OK" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "Abbrechen" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "Übernehmen" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "Speichere Layout" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "Speichere aktuelles Layout als:" + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "S&chließen" + +msgid "&Visible" +msgstr "&Sichtbar" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "Große Symbole" + +msgid "Small Icons" +msgstr "Kleine Symbole" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "Transparent" + +msgid "Color Picker" +msgstr "Farbwähler" + +msgid "Drag && Drop" +msgstr "Drag und Drop" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/default.po b/internal/2.4.4/1/Demos/Customizer/locale/default.po new file mode 100644 index 0000000..f0cd02a --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/default.po @@ -0,0 +1,561 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-04 22:58-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "" + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "" + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "" + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "" + +msgid "&Visible" +msgstr "" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "" + +msgid "Small Icons" +msgstr "" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "" + +msgid "Color Picker" +msgstr "" + +msgid "Drag && Drop" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/es/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/es/LC_MESSAGES/default.mo new file mode 100644 index 0000000..d0162af Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/es/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/es/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/es/LC_MESSAGES/default.po new file mode 100644 index 0000000..b487600 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/es/LC_MESSAGES/default.po @@ -0,0 +1,558 @@ +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:54-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "Estándar" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "Nuevo" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "Abrir" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "Guardar" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "Cortar" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "Copiar" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "Pegar" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "Buscar" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "Temas" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "Formato" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "Fuente" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "Tamaño" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "Negrita" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "Italica" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "Subrayado" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "Menu" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "&Archivo" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "Abrir..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "Imprimir" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "Salir" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "&Editar" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "Seleccionar todo" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "&Formato" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "Justificar texto a la izquierda" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "Centrado" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "Justificar texto a la derecha" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "Viñetas" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "Viñetas numeradas" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "&Vista" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "&Barras laterales" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "Registro de &comandos" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "&Opciones" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "A&yuda" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "&Barra de herramientas" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "Barra &estándar" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "Barra de &disposición" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "Barra de &formato" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "Barra de &navegación" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "&Acerca de..." + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "Disposición" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "Registro de comandos" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "Opciones de personalizador" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "Ayuda" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "Click derecho en las barras de herramientas para modificarlas" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "Navegación" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "Atrás" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "Adelante" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "Actualizar" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "Detener" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "Buscar" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "Archivos" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "Editar" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "Personalización de barra de herramientas" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "Personalizar..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "Personalizar incrustado..." + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "Opciones" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "Propiedades" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "Configurar página" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "Historial" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "Favoritos" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "Personalizador" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "Aceptar" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "Cancelar" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "Aplicar" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "Guardar disposición" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "Guardar disposición como:" + +# Customizer Form +msgid "Toolbars" +msgstr "Barra de herramientas" + +msgid "Commands" +msgstr "Comandos" + +msgid "Shortcuts" +msgstr "Atajos" + +msgid "&Default Options" +msgstr "Opciones por &Defecto" + +msgid "&Close" +msgstr "&Cerrar" + +msgid "&Visible" +msgstr "&Visible" + +msgid "T&ext Options" +msgstr "Opciones de T&exto" + +msgid "Icons + Selective Text" +msgstr "Iconos + Texto Selectivo" + +msgid "Icons" +msgstr "Iconos" + +msgid "Icons + Text" +msgstr "Iconos + Texto" + +msgid "Text" +msgstr "Texto" + +msgid "&Icon Options" +msgstr "Opciones de &Iconos" + +msgid "Large Icons" +msgstr "Iconos Grandes" + +msgid "Small Icons" +msgstr "Iconos Pequeños" + +msgid "&Skins" +msgstr "&Pieles" + +msgid "C&hange" +msgstr "&Modificar" + +msgid "[ Separator ]" +msgstr "[ Separador ]" + +msgid "[ Blank Separator ]" +msgstr "[ Separador en Blanco ]" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "Para agregar comandos arrastrarlos a la barra de herramientas. Para quitar comandos arrastrarlos desde la barra de herramientas a la lista de comandos." + +msgid "Change Shortcut" +msgstr "Modificar Atajo" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "El atajo esta siendo usado por el comando \"%s\". Desea reasignarlo al comando \"%s\"?" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "Color Transparente" + +msgid "Color Picker" +msgstr "Selector de Color" + +msgid "Drag && Drop" +msgstr "Arrastrar y Soltar" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/fi/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/fi/LC_MESSAGES/default.mo new file mode 100644 index 0000000..711ace5 Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/fi/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/fi/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/fi/LC_MESSAGES/default.po new file mode 100644 index 0000000..4a374ea --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/fi/LC_MESSAGES/default.po @@ -0,0 +1,558 @@ +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:54-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "Vakio" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "Uusi" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "Avaa" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "Tallenna" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "Leikkaa" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "Kopioi" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "Liitä" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "Etsi" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "Teemat" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "Muotoilu" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "Fontin nimi" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "Fontin koko" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "Lihavoitu" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "Keno" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "Alleviivattu" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "Valikko" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "&Tiedosto" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "Avaa..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "Tulosta" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "Poistu" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "&Muokkaa" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "Valitse kaikki" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "&Muotoile" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "Tasaa vasemmalle" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "Keskitetty" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "Tasaa oikealle" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "luettelomerkit" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "Numeroidut luettelomerkit" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "&Näytä" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "Sivupalkki" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "&Komentoloki" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "&Asetukset" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "&Ohje" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "&Työkalurivit" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "&Vakio työkalurivi" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "&Asettelu työkalurivi" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "&Muotoilu työkalurivi" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "&Navigointi työkalurivi" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "&Tietoja" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "Asettelut" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "Komentoloki" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "Mukautuksen asetukset" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "Ohje" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "Aloita pelaaminen oikeaklikkaamalla työkalurivejä" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "Navigointi" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "Takaisin" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "Eteenpäin" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "Päivitä" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "Lopeta" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "Etsi" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "Tiedostot" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "Muokkaa" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "Mukautus" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "Mukauta..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "Liitetty mukautus" + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "Asetukset" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "Ominaisuudet" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "Sivun asetukset" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "Historia" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "Kirjanmerkit" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "Mukauttaja" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "OK" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "Peruuta" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "Käytä" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "Tallenna asettelu" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "Tallenna nykyinen asettelu nimellä:" + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "" + +msgid "&Visible" +msgstr "" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "" + +msgid "Small Icons" +msgstr "" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "" + +msgid "Color Picker" +msgstr "" + +msgid "Drag && Drop" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/fr/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/fr/LC_MESSAGES/default.mo new file mode 100644 index 0000000..8ecb197 Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/fr/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/fr/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/fr/LC_MESSAGES/default.po new file mode 100644 index 0000000..62f1978 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/fr/LC_MESSAGES/default.po @@ -0,0 +1,558 @@ +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:54-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "Standard" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "Nouveau" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "Ouvrir" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "Enregistrer" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "Couper" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "Copier" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "Coller" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "Chercher" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "Thèmes" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "Format" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "Nom" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "Taille" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "Gras" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "Italique" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "Souligné" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "Menu" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "&Fichier" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "Ouvrir..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "Imprimer" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "Quitter" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "&Édition" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "Tout sélectionner" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "&Format" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "Aligné a gauche" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "Centré" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "Aligné a droite" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "Puces" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "Numérotation" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "&Affichage" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "Barre &latérale" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "Log Commandes" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "&Options" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "&Aide" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "&Barres d'outils" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "Barre d'outil &Standard" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "Barre d'outil &Disposition" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "Barre d'outil &Format" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "Barre d'outil &Navigation" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "À &propos..." + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "Disposition" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "Log commandes" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "Options de personnalisation" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "Aide" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "Cliquer avec le bouton droit sur une barre d'outil pour la personnaliser" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "Navigation" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "Précédent" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "Suivant" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "Rafraîchir" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "Arrêter" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "Chercher" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "Fichiers" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "Édition" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "Personnalisation" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "Personnaliser..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "" + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "Options" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "Propriétés" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "Configurer l'impression" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "Historique" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "Favoris" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "Personnalisation" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "OK" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "Annuler" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "Appliquer" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "Enregistrer disposition" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "Enregistrer disposition sous:" + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "" + +msgid "&Visible" +msgstr "" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "" + +msgid "Small Icons" +msgstr "" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "" + +msgid "Color Picker" +msgstr "" + +msgid "Drag && Drop" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/ignore.po b/internal/2.4.4/1/Demos/Customizer/locale/ignore.po new file mode 100644 index 0000000..eec136a --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/ignore.po @@ -0,0 +1,62 @@ +#. Form1..SpTBXTabControl1..SpTBXTabItem2..CaptionW +#: Unit1.dfm:445 +#. Form1..SpTBXTabControl1..SpTBXTabSheet2..Caption +#: Unit1.dfm:452 +msgid "Advanced Techniques.txt" +msgstr "" + +#. Form1..SpTBXTabControl1..SpTBXTabItem1..CaptionW +#: Unit1.dfm:441 +#. Form1..SpTBXTabControl1..SpTBXTabSheet1..Caption +#: Unit1.dfm:471 +msgid "FAQ.txt" +msgstr "" + +# Doesn't look like text +#. Form1..Caption +#: Unit1.dfm:6 +msgid "Form1" +msgstr "" + +# Seems like a Font.Name extract +#. Form1..Font.Name +#: Unit1.dfm:11 +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..LinkFont.Name +#: Unit1.dfm:387 +#. Form2..Font.Name +#: Unit2.dfm:14 +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..LinkFont.Name +#: Unit2.dfm:129 +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..LinkFont.Name +#: Unit2.dfm:144 +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..LinkFont.Name +#: Unit2.dfm:159 +#. Form2..LeftPanel..TitlePanel..LinkFont.Name +#: Unit2.dfm:182 +msgid "MS Shell Dlg 2" +msgstr "" + +# Doesn't look like text +#. Form1..SpTBXTabControl1..SpTBXTabSheet1..TabItem +#: Unit1.dfm:473 +msgid "SpTBXTabItem1" +msgstr "" + +# Doesn't look like text +#. Form1..SpTBXTabControl1..SpTBXTabSheet2..TabItem +#: Unit1.dfm:454 +msgid "SpTBXTabItem2" +msgstr "" + +# Doesn't look like text +#. Form2..SpTBXDock1..SpTBXToolbar1..Caption +#: Unit2.dfm:32 +msgid "SpTBXToolbar1" +msgstr "" + +# Seems like a Font.Name extract +#. Form2..LeftPanel..TitlePanel..Font.Name +#: Unit2.dfm:175 +msgid "Tahoma" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/ja/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/ja/LC_MESSAGES/default.mo new file mode 100644 index 0000000..f1a39da Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/ja/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/ja/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/ja/LC_MESSAGES/default.po new file mode 100644 index 0000000..f448e00 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/ja/LC_MESSAGES/default.po @@ -0,0 +1,557 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:54-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "標準" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "æ–°è¦" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "é–‹ã" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "ä¿å­˜" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "切りå–り" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "コピー" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "貼り付ã‘" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "検索" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "テーマ" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "書å¼" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "フォントå" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "フォントサイズ" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "太字" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "斜体" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "下線" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "メニュー" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "ファイル(&F)" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "é–‹ã..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "å°åˆ·" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "終了" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "編集(&E)" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "ã™ã¹ã¦é¸æŠž" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "書å¼(&F)" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "左寄ã›" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "中央" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "å³å¯„ã›" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "ç®‡æ¡æ›¸ã" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "段è½ç•ªå·" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "表示(&V)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "サイドãƒãƒ¼(&S)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "コマンドログ(&C)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "オプション(&O)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "ヘルプ(&H)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "ツールãƒãƒ¼(&T)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "標準ãƒãƒ¼(&S)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "レイアウトãƒãƒ¼(&L)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "書å¼ãƒãƒ¼(&F)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "ナビゲーションãƒãƒ¼(&N)" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "情報(&A)" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "レイアウト" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "コマンド ログ" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "カスタマイザ オプション" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "ヘルプ" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "ãƒãƒ¼ã‚’å³ã‚¯ãƒªãƒƒã‚¯ã§é–‹å§‹ã—ã¾ã™" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "ナビゲーション" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "戻る" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "進む" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "リフレッシュ" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "åœæ­¢" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "検索" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "ファイル" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "編集" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "カスタマイゼーション" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "カスタマイズ..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "カスタマイズ 埋ã‚è¾¼ã¿..." + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "オプション" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "プロパティ" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "プリンタã®è¨­å®š" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "履歴" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "ãŠæ°—ã«å…¥ã‚Š" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "カスタマイザ" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "OK" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "キャンセル" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "é©ç”¨" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "レイアウトä¿å­˜" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "レイアウトã«åå‰ã‚’付ã‘ã¦ä¿å­˜" + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "" + +msgid "&Visible" +msgstr "" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "" + +msgid "Small Icons" +msgstr "" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "" + +msgid "Color Picker" +msgstr "" + +msgid "Drag && Drop" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/ko/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/ko/LC_MESSAGES/default.mo new file mode 100644 index 0000000..f440ac0 Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/ko/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/ko/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/ko/LC_MESSAGES/default.po new file mode 100644 index 0000000..7fd678b --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/ko/LC_MESSAGES/default.po @@ -0,0 +1,557 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-10-10 18:05-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "표준" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "새로운" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "열기" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "저장" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "잘ë¼ë‚´ê¸°" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "복사" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "붙여넣기" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "찾기" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "테마" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "형ì‹" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "글꼴 ì´ë¦„" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "ê¸€ìž í¬ê¸°" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "굵게" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "기울임" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "밑줄" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "메뉴" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "파ì¼(&F)" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "열기(&O)" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "ì¸ì‡„" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "닫기" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "편집(&E)" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "ëª¨ë‘ ì„ íƒ" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "형ì‹(&F)" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "왼쪽으로 ì •ë ¬" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "ê°€ìš´ë° ì •ë ¬" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "오른쪽으로 ì •ë ¬" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "글머리 기호" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "문단 번호" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "보기(&V)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "가장ìžë¦¬ì¤„(&S)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "명령 로그(&C)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "옵션(&O)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "ë„움ë§(&H)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "ë„구 모ìŒ(&T)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "주 ë„구 모ìŒ" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "ë ˆì´ì•„웃 ë„구 모ìŒ" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "í…스트 ë„구 모ìŒ" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "검색 ë„구 모ìŒ" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "ì •ë³´(&A)" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "ë ˆì´ì•„웃" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "명령 로그" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "ì‚¬ìš©ìž ì •ì˜ ì˜µì…˜" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "ë„움ë§" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "툴바를 ì‚¬ìš©ìž ì •ì˜í•˜ë ¤ë©´ 툴바 위ì—서 오른쪽 ë²„íŠ¼ì„ í´ë¦­í•˜ì‹­ì‹œì˜¤." + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "íƒìƒ‰" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "뒤로" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "앞으로" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "새로고침" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "멈추기" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "검색" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "파ì¼" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "편집" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "ì‚¬ìš©ìž ì •ì˜" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "ì‚¬ìš©ìž ì •ì˜..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "임베디드 ì •ì˜..." + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "옵션" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "ì†ì„±" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "페ì´ì§€ 설정" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "히스토리" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "책갈피" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "ì‚¬ìš©ìž ì •ì˜" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "확ì¸" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "취소" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "ì ìš©" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "ë ˆì´ì•„웃 저장" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "다른 ì´ë¦„으로 현재 ë ˆì´ì•„웃 저장" + +# Customizer Form +msgid "Toolbars" +msgstr "ë„구 모ìŒ" + +msgid "Commands" +msgstr "명령" + +msgid "Shortcuts" +msgstr "단축키" + +msgid "&Default Options" +msgstr "기본 옵션(&D)" + +msgid "&Close" +msgstr "닫기(&C)" + +msgid "&Visible" +msgstr "ë³´ì´ê¸°(&V)" + +msgid "T&ext Options" +msgstr "í…스트 옵션(&E)" + +msgid "Icons + Selective Text" +msgstr "ì•„ì´ì½˜ ì˜†ì— í…스트" + +msgid "Icons" +msgstr "ì•„ì´ì½˜" + +msgid "Icons + Text" +msgstr "ì•„ì´ì½˜ + í…스트" + +msgid "Text" +msgstr "í…스트" + +msgid "&Icon Options" +msgstr "ì•„ì´ì½˜ 옵션(&I)" + +msgid "Large Icons" +msgstr "í° ì•„ì´ì½˜" + +msgid "Small Icons" +msgstr "ìž‘ì€ ì•„ì´ì½˜" + +msgid "&Skins" +msgstr "스킨(&S)" + +msgid "C&hange" +msgstr "변경" + +msgid "[ Separator ]" +msgstr "[ êµ¬ë¶„ìž ]" + +msgid "[ Blank Separator ]" +msgstr "[ êµ¬ë¶„ìž ]" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "명령 ë²„íŠ¼ì„ ì¶”ê°€í•˜ë ¤ë©´, ëª…ë ¹ì„ íˆ´ë°”ë¡œ 드래그 && 드ëží•˜ì‹­ì‹œì˜¤. 명령 ë²„íŠ¼ì„ ì‚­ì œí•˜ë ¤ë©´, 툴바ì—서 명령 ë²„íŠ¼ì„ ë“œëž˜ê·¸í•˜ì—¬ 명령 목ë¡ì— 드ëží•˜ì‹­ì‹œì˜¤." + +msgid "Change Shortcut" +msgstr "단축키 변경" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "ì´ë¯¸ 단축키가 \"%s\" 명령ì—서 사용중입니다. 단축키를 \"%s\" ëª…ë ¹ì— ìž¬ì„¤ì •í•˜ì‹œê² ìŠµë‹ˆê¹Œ?" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "투명한 색" + +msgid "Color Picker" +msgstr "ìƒ‰ìƒ ì„ íƒê¸°" + +msgid "Drag && Drop" +msgstr "드래그 && 드롭" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/nl/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/nl/LC_MESSAGES/default.mo new file mode 100644 index 0000000..c41a0ce Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/nl/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/nl/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/nl/LC_MESSAGES/default.po new file mode 100644 index 0000000..b3847a9 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/nl/LC_MESSAGES/default.po @@ -0,0 +1,557 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:56-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "Standaard" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "Nieuw" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "Open" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "Opslaan" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "Knippen" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "Kopiëren" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "Plakken" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "Zoeken" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "Thema's" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "Opmaak" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "Font Naam" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "Font Grootte" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "Vet" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "Cursief" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "Onderstreept" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "Menu" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "&Bestand" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "Open..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "Afdrukken" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "Afsluiten" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "Be&werken" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "Alles Selecteren" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "&Opmaak" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "Links Uitlijnen" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "Centreren" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "Rechts Uitlijnen" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "Opsommingstekens" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "Nummering" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "Beel&d" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "&Zijbalk" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "&Commando's Log" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "&Opties" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "&Help" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "&Werkbalken" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "&Standaard Werkbalk" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "&Weergave Werkbalk" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "&Opmaak Werkbalk" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "&Navigatie Werkbalk" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "&Over" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "Weergaven" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "Opdrachtenlog" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "Opties voor Aanpassingen" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "Help" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "Rechtsklik op de werkbalk om af te spelen" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "Navigatie" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "Terug" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "Vooruit" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "Vernieuwen" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "Stoppen" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "Zoeken" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "Bestanden" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "Bewerken" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "Aanpassingen" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "Aanpassen..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "Geïntegreerd Aanpassen..." + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "Opties" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "Eigenschappen" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "Pagina Instellingen" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "Geschiedenis" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "Favorieten" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "Aanpassen" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "OK" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "Annuleren" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "Toepassen" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "Weergave Opslaan" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "Huidige weergave opslaan als:" + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "" + +msgid "&Visible" +msgstr "" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "" + +msgid "Small Icons" +msgstr "" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "" + +msgid "Color Picker" +msgstr "" + +msgid "Drag && Drop" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/pt_BR/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/pt_BR/LC_MESSAGES/default.mo new file mode 100644 index 0000000..4352dcb Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/pt_BR/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/pt_BR/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/pt_BR/LC_MESSAGES/default.po new file mode 100644 index 0000000..88d2358 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/pt_BR/LC_MESSAGES/default.po @@ -0,0 +1,558 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:56-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "Padrão" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "Novo" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "Abrir" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "Salvar" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "Recortar" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "Copiar" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "Colar" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "Localizar" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "Temas" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "Formatação" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "Fonte" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "Tamanho" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "Negrito" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "Itálico" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "Sublinhado" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "Menu" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "&Arquivo" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "Abrir..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "Imprimir" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "Sair" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "&Editar" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "Selecionar Tudo" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "&Formatar" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "Alinhar à esquerda" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "Centralizar" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "Alinhar à direita" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "Marcadores" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "Numeração" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "&Exibir" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "Barra &Lateral" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "Registro de &Comandos" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "&Opções" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "Aj&uda" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "&Barras de Ferramentas" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "Barra &Padrão" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "Barra de &Disposições" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "Barra de &Formatação" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "Barra de &Navegação" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "&Sobre" + +# Though unusual, Disposição is a good translation in this case. Some editors keep the English term, others may prefer Arranjo, Ãrea de Trabalho or even Leiaute (Houaiss, c1965) +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "Disposições" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "Registro de Comandos" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "Opções de Personalização" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "Ajuda" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "Clique nas barras com o botão direito para inciar animação" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "Navegação" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "Voltar" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "Avançar" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "Atualizar" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "Parar" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "Pesquisar" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "Arquivos" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "Editar" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "Personalização" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "Personalizar..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "Personalizar encaixado..." + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "Opções" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "Propriedades" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "Configurar página" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "Histórico" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "Favoritos" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "Personalização" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "OK" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "Cancelar" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "Aplicar" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "Salvar disposição" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "Salvar disposição atual como:" + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "" + +msgid "&Visible" +msgstr "" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "" + +msgid "Small Icons" +msgstr "" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "" + +msgid "Color Picker" +msgstr "" + +msgid "Drag && Drop" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/ru/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/ru/LC_MESSAGES/default.mo new file mode 100644 index 0000000..13808d3 Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/ru/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/ru/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/ru/LC_MESSAGES/default.po new file mode 100644 index 0000000..2f209fb --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/ru/LC_MESSAGES/default.po @@ -0,0 +1,557 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:56-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "Стандартное" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "Ðовый" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "Открыть" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "Сохранить" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "Вырезать" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "Копировать" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "Ð’Ñтавить" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "ПоиÑк" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "Темы" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "Формат" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "Шрифт" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "Размер шрифта" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "Полужирный" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "КурÑив" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "Подчёркнутый" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "Меню" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "&Файл" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "Открыть..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "Печать" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "Выйти" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "&Правка" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "Выделить вÑÑ‘" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "&Формат" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "По ширине" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "По центру" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "По ширине" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "СпиÑок" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "Ðумерованный ÑпиÑок" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "&Вид" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "Панель &задач" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "ИÑÑ‚Ð¾Ñ€Ð¸Ñ &команд" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "&Параметры" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "&Справка" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "Панели &инÑтрументов" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "&СтандартнаÑ" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "&РаÑположение" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "&Форматирование" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "&ÐавигациÑ" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "&О программе" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "РаÑположениÑ" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "ИÑÑ‚Ð¾Ñ€Ð¸Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð½Ð°Ñтройки" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "Справка" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "ИÑпользуйте контекÑтное меню панелей инÑтрументов" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "ÐавигациÑ" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "Ðазад" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "Вперёд" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "Обновить" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "Стоп" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "ПоиÑк" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr " файлы" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "Правка" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "ÐаÑтройка" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "ÐаÑтройка..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "Ð’ÑÑ‚Ñ€Ð¾ÐµÐ½Ð½Ð°Ñ Ð½Ð°Ñтройка..." + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "Параметры" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "СвойÑтва" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "Параметры Ñтраницы" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "ИÑториÑ" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "Избранное" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "ÐаÑтройщик" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "OK" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "Отмена" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "Применить" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "Сохранить раÑположение" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "Сохранить текущее раÑположение как..." + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "" + +msgid "&Visible" +msgstr "" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "" + +msgid "Small Icons" +msgstr "" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "" + +msgid "Color Picker" +msgstr "" + +msgid "Drag && Drop" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/sr_Cyrillic/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/sr_Cyrillic/LC_MESSAGES/default.mo new file mode 100644 index 0000000..4884490 Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/sr_Cyrillic/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/sr_Cyrillic/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/sr_Cyrillic/LC_MESSAGES/default.po new file mode 100644 index 0000000..499d328 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/sr_Cyrillic/LC_MESSAGES/default.po @@ -0,0 +1,557 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:58-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "Стандардно" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "Ðово" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "Отвори" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "Сачувај" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "ИÑеци" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "Копирај" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "Ðалепи" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "Ðађи" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "Тема" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "Формат" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "Име фонта" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "Величина фонта" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "Подебљано" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "КоÑо" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "Подвучено" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "Мени" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "&Фајл" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "Отвори..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "Штампај" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "Изађи" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "Ур&еђивање" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "Селектуј Ñве" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "&Формат" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "Поравнато лево" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "Центрирано" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "Поравнато деÑно" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "Тачке" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "Бројеви" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "&Изглед" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "&Помоћни панели" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "&Дневник команди" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "&Опције" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "&Помоћ" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "&Палете алата" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "&Стандардна палета" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "Па&лета изгледа" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "Палета за &форматирање" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "&Ðавигациона палета" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "О прогр&аму" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "Изгледи" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "Дневник команди" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "Опције алата за прилагођавање" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "Помоћ" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "Кликните деÑним таÑтером на палете алата да биÑте почели Ñа игром" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "Ðавигација" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "Ðазад" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "Ðапред" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "ОÑвежи" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "Стани" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "Тражи" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "Фајлови" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "Уређивање" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "Прилагођавање" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "Прилагоди..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "Прилагоди (угњеждено)..." + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "Опције" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "СвојÑтва" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "Подешавање Ñтране" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "ИÑторија" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "Омиљено" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "Ðлат за прилагођавање" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "У реду" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "Поништи" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "Примени" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "Сачувај изглед" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "Сачувај тренутни изглед као:" + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "" + +msgid "&Visible" +msgstr "" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "" + +msgid "Small Icons" +msgstr "" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "" + +msgid "Color Picker" +msgstr "" + +msgid "Drag && Drop" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/sr_Latin/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/sr_Latin/LC_MESSAGES/default.mo new file mode 100644 index 0000000..5c99634 Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/sr_Latin/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/sr_Latin/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/sr_Latin/LC_MESSAGES/default.po new file mode 100644 index 0000000..b15ae0c --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/sr_Latin/LC_MESSAGES/default.po @@ -0,0 +1,557 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:58-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "Standardno" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "Novo" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "Otvori" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "SaÄuvaj" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "Iseci" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "Kopiraj" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "Nalepi" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "NaÄ‘i" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "Teme" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "Format" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "Ime fonta" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "VeliÄina fonta" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "Podebljano" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "Koso" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "PodvuÄeno" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "Meni" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "&Fajl" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "Otvori..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "Å tampaj" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "IzaÄ‘i" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "Ur&eÄ‘ivanje" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "Selektuj sve" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "&Format" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "Poravnato levo" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "Centrirano" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "Poravnato Desno" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "TaÄke" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "Brojevi" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "&Izgled" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "&Pomoćni paneli" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "&Dnevnik komandi" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "&Opcije" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "&Pomoć" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "&Palete alata" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "&Standardna paleta" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "Pa&leta izgleda" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "Paleta za &formatiranje" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "&Navigaciona paleta" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "O progr&amu" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "Izgledi" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "Dnevnik komandi" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "Opcije alata za prilagoÄ‘avanje" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "Pomoć" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "Kliknite desnim tasterom na palete alata da biste poÄeli sa igrom" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "Navigacija" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "Nazad" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "Napred" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "Osveži" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "Stani" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "Traži" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "Fajlovi" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "UreÄ‘ivanje" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "PrilagoÄ‘avanje" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "Prilagodi..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "Prilagodi (ugnježdeno)..." + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "Opcije" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "Svojstva" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "PodeÅ¡avanje strane" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "Istorija" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "Omiljeno" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "Alat za prilagoÄ‘avanje" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "U redu" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "PoniÅ¡ti" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "Primeni" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "SaÄuvaj izgled" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "SaÄuvaj trenutni izgled kao:" + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "" + +msgid "&Visible" +msgstr "" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "" + +msgid "Small Icons" +msgstr "" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "" + +msgid "Color Picker" +msgstr "" + +msgid "Drag && Drop" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/sv/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/sv/LC_MESSAGES/default.mo new file mode 100644 index 0000000..1e50a70 Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/sv/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/sv/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/sv/LC_MESSAGES/default.po new file mode 100644 index 0000000..0dc5c2c --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/sv/LC_MESSAGES/default.po @@ -0,0 +1,557 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:57-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "Standard" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "Nytt" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "Öppna" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "Spara" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "Klipp ut" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "Kopiera" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "Klistra in" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "Sök" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "Teman" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "Formatera" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "Teckensnitt" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "Storlek" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "Fet" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "Kursiv" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "Understreck" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "Meny" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "&Arkiv" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "Öppna..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "Skriv ut" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "Avsluta" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "&Redigera" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "Markera allt" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "&Formatera" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "Vänsterjustera" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "Centrera" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "Högerjustera" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "Punktlista" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "Numrerad lista" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "&Visa" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "&Sidpanel" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "&Kommandohistorik" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "&Alternativ" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "&Hjälp" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "&Verktygsfält" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "&Standardfält" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "&Layoutfält" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "&Anpassa Verktygsfält" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "&Navigationsfält" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "&Om" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "Layouter" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "Kommandohistorik" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "Alternativ" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "Hjälp" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "Högerklicka pÃ¥ verktygsfälten för att komma igÃ¥ng" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "Navigation" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "Tillbaka" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "FramÃ¥t" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "Uppdatera" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "Avbryt" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "Sök" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "Arkiv" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "Redigera" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "Anpassning" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "Anpassa..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "Inbyggd Anpassning..." + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "Alternativ" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "Egenskaper" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "Sidlayout" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "Historik" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "Favoriter" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "Anpassa" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "OK" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "Avbryt" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "Verkställ" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "Spara Layout" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "Spara nuvarande layout som:" + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "" + +msgid "&Visible" +msgstr "" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "" + +msgid "Small Icons" +msgstr "" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "" + +msgid "Color Picker" +msgstr "" + +msgid "Drag && Drop" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/tr/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/tr/LC_MESSAGES/default.mo new file mode 100644 index 0000000..9647d3d Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/tr/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/tr/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/tr/LC_MESSAGES/default.po new file mode 100644 index 0000000..21bdcf7 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/tr/LC_MESSAGES/default.po @@ -0,0 +1,557 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:59-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "Standart" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mNew..CaptionW +#. Form1..TntActionList1..aNew..Caption +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "Yeni" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "Aç" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mFile..mSave..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayoutSave..CaptionW +#. Form1..TntActionList1..aSave..Caption +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "Kaydet" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCut..CaptionW +#. Form1..TntActionList1..aCut..Caption +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "Kes" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mCopy..CaptionW +#. Form1..TntActionList1..aCopy..Caption +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "Kopyala" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mPaste..CaptionW +#. Form1..TntActionList1..aPaste..Caption +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "Yapıştır" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mFind..CaptionW +#. Form1..TntActionList1..aFind..Caption +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "Ara" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "Temalar" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aBold..Category +#. Form1..TntActionList1..aItalic..Category +#. Form1..TntActionList1..aUnderline..Category +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aRightJustify..Category +#. Form1..TntActionList1..aCentered..Category +#. Form1..TntActionList1..aBullets..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "Biçim" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "Yazı Tipi Adı" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "Yazı Tipi Boyutu" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBold..CaptionW +#. Form1..TntActionList1..aBold..Caption +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "Kalın" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mItalic..CaptionW +#. Form1..TntActionList1..aItalic..Caption +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "İtalik" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mUnderline..CaptionW +#. Form1..TntActionList1..aUnderline..Caption +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "Altı Çizgili" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "Menü" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "&Dosya" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#. Form1..TntActionList1..aOpen..Caption +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "Aç..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#. Form1..TntActionList1..aPrint..Caption +#. Form1..SpTBXCustomizer1..cPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "Yazdır" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#. Form1..TntActionList1..aExit..Caption +#. Form1..SpTBXCustomizer1..cExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "Çıkış" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "&Düzelt" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#. Form1..TntActionList1..aSelectAll..Caption +#. Form1..SpTBXCustomizer1..cSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "Hepsini Seç" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "&Biçim" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#. Form1..TntActionList1..aLeftJustify..Caption +#. Form1..SpTBXCustomizer1..cLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "Sola Dayalı" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#. Form1..TntActionList1..aCentered..Caption +#. Form1..SpTBXCustomizer1..cCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "Ortalanmış" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#. Form1..TntActionList1..aRightJustify..Caption +#. Form1..SpTBXCustomizer1..cRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "SaÄŸa Dayalı" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#. Form1..TntActionList1..aBullets..Caption +#. Form1..SpTBXCustomizer1..cBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "Simgeler" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#. Form1..TntActionList1..aNumberedBullets..Caption +#. Form1..SpTBXCustomizer1..cNumBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "Numaralandırılmış Simgeler" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "&Görünüm" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "&Kenar Paneli" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "&Komut Günlüğü" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "&Seçenekler" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..CaptionW +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mmmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "&Yardım" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "&Araç Çubukları" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "&Standart Araç ÇubuÄŸu" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "&Araç ÇubuÄŸu Düzeni" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "&Araç ÇubuÄŸu Biçimlendiriliyor" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "&Gezinim Araç ÇubuÄŸu" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "&Hakkında" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#. Form1..SpTBXDock1..tbLayouts..Layouts..SpTBXLabelItem1..CaptionW +#. Form1..SpTBXDock1..tbLayouts..Layouts..tLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "Düzenler" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "Komut Günlüğü" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "Seçenek Düzenleyicisi" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "Yardım" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "Çalmaya baÅŸlamak için araç çubuÄŸuna mouse ile saÄŸ tıklayın" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aBack..Category +#. Form1..TntActionList1..aForward..Category +#. Form1..TntActionList1..aStop..Category +#. Form1..TntActionList1..aRefresh..Category +#. Form1..TntActionList1..aSearch..Category +#. Form1..TntActionList1..aFavs..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "Gezinim" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#. Form1..TntActionList1..aBack..Caption +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "Geri" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#. Form1..TntActionList1..aForward..Caption +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "İleri" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#. Form1..TntActionList1..aRefresh..Caption +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "Yenile" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#. Form1..TntActionList1..aStop..Caption +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "Dur" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#. Form1..TntActionList1..aSearch..Caption +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "Ara" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aOpen..Category +#. Form1..TntActionList1..aSave..Category +#. Form1..TntActionList1..aExit..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr "Dosyalar" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aCopy..Category +#. Form1..TntActionList1..aPaste..Category +#. Form1..TntActionList1..aSelectAll..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "Düzelt" + +#. Form1..TntActionList1..aCustomize..Category +#. Form1..TntActionList1..aEmbeddedCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "ÖzelleÅŸtirmek" + +#. Form1..TntActionList1..aCustomize..Caption +#. Form1..SpTBXPopupMenu1..pCustomize..CaptionW +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "ÖzelleÅŸtir..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#. Form1..SpTBXPopupMenu1..pEmbeddedCustomize..CaptionW +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "Gömülü BileÅŸenleri ÖzelleÅŸtir" + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "Seçenekler" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "Özellikler" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "Sayfa Düzeni" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "GeçmiÅŸ" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "Favoriler" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#. Form2..LeftPanel..TitlePanel..Caption +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "ÖzelleÅŸtir" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "Tamam" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "Vazgeç" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "Uygula" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "Düzeni Kaydet" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "Geçerli düzeni kaydet:" + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "" + +msgid "&Visible" +msgstr "" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "" + +msgid "Small Icons" +msgstr "" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "" + +msgid "Color Picker" +msgstr "" + +msgid "Drag && Drop" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/locale/zh_CN/LC_MESSAGES/default.mo b/internal/2.4.4/1/Demos/Customizer/locale/zh_CN/LC_MESSAGES/default.mo new file mode 100644 index 0000000..3060db2 Binary files /dev/null and b/internal/2.4.4/1/Demos/Customizer/locale/zh_CN/LC_MESSAGES/default.mo differ diff --git a/internal/2.4.4/1/Demos/Customizer/locale/zh_CN/LC_MESSAGES/default.po b/internal/2.4.4/1/Demos/Customizer/locale/zh_CN/LC_MESSAGES/default.po new file mode 100644 index 0000000..91d6097 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/locale/zh_CN/LC_MESSAGES/default.po @@ -0,0 +1,491 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: Customizer Demo\n" +"POT-Creation-Date: 2005-08-09 16:55\n" +"PO-Revision-Date: 2009-09-10 22:59-0300\n" +"Last-Translator: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: dxgettext 1.2\n" +"Language-Team: \n" + +#. Form1..SpTBXDock1..tbStandard..Caption +#: Unit1.dfm:29 +msgid "Standard" +msgstr "标准" + +#. Form1..SpTBXDock1..tbStandard..tNew..CaptionW +#: Unit1.dfm:37 +#: Unit1.dfm:159 +#: Unit1.dfm:1559 +msgid "New" +msgstr "新建" + +#. Form1..SpTBXDock1..tbStandard..tOpen..CaptionW +#: Unit1.dfm:41 +msgid "Open" +msgstr "打开" + +#. Form1..SpTBXDock1..tbStandard..tSave..CaptionW +#: Unit1.dfm:45 +#: Unit1.dfm:167 +#: Unit1.dfm:318 +#: Unit1.dfm:1573 +msgid "Save" +msgstr "ä¿å­˜" + +#. Form1..SpTBXDock1..tbStandard..tCut..CaptionW +#: Unit1.dfm:51 +#: Unit1.dfm:184 +#: Unit1.dfm:1585 +msgid "Cut" +msgstr "剪切" + +#. Form1..SpTBXDock1..tbStandard..tCopy..CaptionW +#: Unit1.dfm:55 +#: Unit1.dfm:188 +#: Unit1.dfm:1592 +msgid "Copy" +msgstr "å¤åˆ¶" + +#. Form1..SpTBXDock1..tbStandard..tPaste..CaptionW +#: Unit1.dfm:60 +#: Unit1.dfm:192 +#: Unit1.dfm:1599 +msgid "Paste" +msgstr "粘贴" + +#. Form1..SpTBXDock1..tbStandard..tFind..CaptionW +#: Unit1.dfm:67 +#: Unit1.dfm:206 +#: Unit1.dfm:1612 +msgid "Find" +msgstr "查找" + +#. Form1..SpTBXDock1..tbStandard..tThemes..CaptionW +#: Unit1.dfm:73 +msgid "Themes" +msgstr "主题" + +#. Form1..SpTBXDock1..tbFormat..Caption +#. Form1..TntActionList1..aLeftJustify..Category +#. Form1..TntActionList1..aNumberedBullets..Category +#: Unit1.dfm:99 +#: Unit1.dfm:1618 +#: Unit1.dfm:1625 +#: Unit1.dfm:1632 +#: Unit1.dfm:1639 +#: Unit1.dfm:1645 +#: Unit1.dfm:1651 +#: Unit1.dfm:1657 +#: Unit1.dfm:1663 +msgid "Format" +msgstr "æ ¼å¼" + +#. Form1..SpTBXDock1..tbFormat..tFont..Caption +#: Unit1.dfm:106 +msgid "Font Name" +msgstr "字体" + +#. Form1..SpTBXDock1..tbFormat..tFontSize..Caption +#: Unit1.dfm:116 +msgid "Font Size" +msgstr "字体大å°" + +#. Form1..SpTBXDock1..tbFormat..tBold..CaptionW +#: Unit1.dfm:132 +#: Unit1.dfm:213 +#: Unit1.dfm:1619 +msgid "Bold" +msgstr "粗体" + +#. Form1..SpTBXDock1..tbFormat..tItalic..CaptionW +#: Unit1.dfm:136 +#: Unit1.dfm:217 +#: Unit1.dfm:1626 +msgid "Italic" +msgstr "斜体" + +#. Form1..SpTBXDock1..tbFormat..tUnderline..CaptionW +#: Unit1.dfm:140 +#: Unit1.dfm:221 +#: Unit1.dfm:1633 +msgid "Underline" +msgstr "下划线" + +#. Form1..SpTBXDock1..tbMenuBar..Caption +#: Unit1.dfm:146 +msgid "Menu" +msgstr "èœå•" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..CaptionW +#: Unit1.dfm:156 +msgid "&File" +msgstr "文件(&F)" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mOpen..CaptionW +#: Unit1.dfm:163 +#: Unit1.dfm:1566 +msgid "Open..." +msgstr "打开..." + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mPrint..CaptionW +#: Unit1.dfm:171 +#: Unit1.dfm:1670 +#: Unit1.dfm:1744 +msgid "Print" +msgstr "打å°" + +#. Form1..SpTBXDock1..tbMenuBar..mFile..mExit..CaptionW +#: Unit1.dfm:177 +#: Unit1.dfm:1580 +#: Unit1.dfm:1776 +msgid "Exit" +msgstr "退出" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..CaptionW +#: Unit1.dfm:181 +msgid "&Edit" +msgstr "编辑(&E)" + +#. Form1..SpTBXDock1..tbMenuBar..mEdit..mSelectAll..CaptionW +#: Unit1.dfm:198 +#: Unit1.dfm:1606 +#: Unit1.dfm:1772 +msgid "Select All" +msgstr "全选" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..CaptionW +#: Unit1.dfm:210 +msgid "&Format" +msgstr "æ ¼å¼(&F)" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mLeftJustify..CaptionW +#: Unit1.dfm:227 +#: Unit1.dfm:1640 +#: Unit1.dfm:1748 +msgid "Left Justify" +msgstr "文本两端对é½" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mCentered..CaptionW +#: Unit1.dfm:231 +#: Unit1.dfm:1652 +#: Unit1.dfm:1752 +msgid "Centered" +msgstr "居中" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mRightJustify..CaptionW +#: Unit1.dfm:235 +#: Unit1.dfm:1646 +#: Unit1.dfm:1756 +msgid "Right Justify" +msgstr "文本两端对é½" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mBullets..CaptionW +#: Unit1.dfm:241 +#: Unit1.dfm:1658 +#: Unit1.dfm:1760 +msgid "Bullets" +msgstr "项目符å·" + +#. Form1..SpTBXDock1..tbMenuBar..SpTBXSubmenuItem1..mNumberedBullets..CaptionW +#: Unit1.dfm:245 +#: Unit1.dfm:1664 +#: Unit1.dfm:1764 +msgid "Numbered Bullets" +msgstr "æ•°å­—ç¼–å·" + +#. Form1..SpTBXDock1..tbMenuBar..mView..CaptionW +#: Unit1.dfm:249 +msgid "&View" +msgstr "查看(&V)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..CaptionW +#: Unit1.dfm:251 +msgid "&Sidebar" +msgstr "ä¾§è¾¹æ (&S)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mCommandsLog..CaptionW +#: Unit1.dfm:254 +msgid "&Commands Log" +msgstr "命令日志(&C)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mOptions..CaptionW +#: Unit1.dfm:258 +msgid "&Options" +msgstr "选项(&O)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mSidebar..mmHelp..CaptionW +#: Unit1.dfm:262 +#: Unit1.dfm:286 +#: Unit1.dfm:288 +msgid "&Help" +msgstr "帮助(&H)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..CaptionW +#: Unit1.dfm:266 +msgid "&Toolbars" +msgstr "工具æ (&T)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mStandardToolbar..CaptionW +#: Unit1.dfm:269 +msgid "&Standard Toolbar" +msgstr "标准工具æ (&S)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..tLayoutsToolbar..CaptionW +#: Unit1.dfm:273 +msgid "&Layouts Toolbar" +msgstr "布局工具æ (&L)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mFormattingToolbar..CaptionW +#: Unit1.dfm:277 +msgid "&Formatting Toolbar" +msgstr "æ ¼å¼å·¥å…·æ (&F)" + +#. Form1..SpTBXDock1..tbMenuBar..mView..mToolbars..mNavigationToolbar..CaptionW +#: Unit1.dfm:281 +msgid "&Navigation Toolbar" +msgstr "导航工具æ (&N)" + +#. Form1..SpTBXDock1..tbMenuBar..mHelp..mAbout..CaptionW +#: Unit1.dfm:291 +msgid "&About" +msgstr "关于(&A)" + +#. Form1..SpTBXDock1..tbLayouts..Caption +#: Unit1.dfm:298 +#: Unit1.dfm:305 +#: Unit1.dfm:308 +msgid "Layouts" +msgstr "布局" + +#. Form1..SpTBXMultiDock1..dpLog..Caption +#: Unit1.dfm:332 +msgid "Commands Log" +msgstr "命令日志" + +#. Form1..SpTBXMultiDock1..dpOptions..Caption +#: Unit1.dfm:352 +msgid "Customizer Options" +msgstr "自定义选项" + +#. Form1..SpTBXMultiDock2..dpHelp..Caption +#: Unit1.dfm:368 +msgid "Help" +msgstr "帮助" + +#. Form1..SpTBXMultiDock2..dpHelp..SpTBXLabel1..Caption +#: Unit1.dfm:380 +msgid "Right click the toolbars to customize them" +msgstr "在工具æ ä¸Šå•击å³é”®è¿›è¡Œè‡ªå®šä¹‰" + +#. Form1..SpTBXDock2..tbNavigation..Caption +#. Form1..TntActionList1..aRefresh..Category +#: Unit1.dfm:402 +#: Unit1.dfm:1675 +#: Unit1.dfm:1681 +#: Unit1.dfm:1687 +#: Unit1.dfm:1693 +#: Unit1.dfm:1699 +#: Unit1.dfm:1705 +msgid "Navigation" +msgstr "导航" + +#. Form1..SpTBXDock2..tbNavigation..tBack..CaptionW +#: Unit1.dfm:409 +#: Unit1.dfm:1676 +msgid "Back" +msgstr "åŽé€€" + +#. Form1..SpTBXDock2..tbNavigation..tForward..CaptionW +#: Unit1.dfm:413 +#: Unit1.dfm:1682 +msgid "Forward" +msgstr "å‰è¿›" + +#. Form1..SpTBXDock2..tbNavigation..tRefresh..CaptionW +#: Unit1.dfm:417 +#: Unit1.dfm:1694 +msgid "Refresh" +msgstr "刷新" + +#. Form1..SpTBXDock2..tbNavigation..tStop..CaptionW +#: Unit1.dfm:421 +#: Unit1.dfm:1688 +msgid "Stop" +msgstr "åœæ­¢" + +#. Form1..SpTBXDock2..tbNavigation..tSearch..CaptionW +#: Unit1.dfm:425 +#: Unit1.dfm:1700 +msgid "Search" +msgstr "æœç´¢" + +#. Form1..TntActionList1..aNew..Category +#. Form1..TntActionList1..aPrint..Category +#: Unit1.dfm:1558 +#: Unit1.dfm:1565 +#: Unit1.dfm:1572 +#: Unit1.dfm:1579 +#: Unit1.dfm:1669 +msgid "Files" +msgstr " 文件" + +#. Form1..TntActionList1..aCut..Category +#. Form1..TntActionList1..aFind..Category +#: Unit1.dfm:1584 +#: Unit1.dfm:1591 +#: Unit1.dfm:1598 +#: Unit1.dfm:1605 +#: Unit1.dfm:1611 +msgid "Edit" +msgstr "编辑" + +#. Form1..TntActionList1..aCustomize..Category +#: Unit1.dfm:1711 +#: Unit1.dfm:1716 +msgid "Customization" +msgstr "自定义" + +#. Form1..TntActionList1..aCustomize..Caption +#: Unit1.dfm:1712 +#: Unit1.dfm:1731 +msgid "Customize..." +msgstr "自定义..." + +#. Form1..TntActionList1..aEmbeddedCustomize..Caption +#: Unit1.dfm:1717 +#: Unit1.dfm:1735 +msgid "Embedded Customize..." +msgstr "嵌入å¼è‡ªå®šä¹‰..." + +#. Form2..Caption +#: Unit2.dfm:7 +msgid "Options" +msgstr "选项" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tProperties..CaptionW +#: Unit2.dfm:49 +msgid "Properties" +msgstr "属性" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tPageSetup..CaptionW +#: Unit2.dfm:58 +msgid "Page Setup" +msgstr "页é¢è®¾ç½®" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tHistory..CaptionW +#: Unit2.dfm:67 +msgid "History" +msgstr "历å²" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tFavorites..CaptionW +#: Unit2.dfm:76 +msgid "Favorites" +msgstr "æ”¶è—" + +#. Form2..SpTBXDock1..SpTBXToolbar1..tCustomize..CaptionW +#: Unit2.dfm:85 +#: Unit2.dfm:168 +msgid "Customizer" +msgstr "自定义" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton1..Caption +#: Unit2.dfm:122 +msgid "OK" +msgstr "确定" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton2..Caption +#: Unit2.dfm:137 +msgid "Cancel" +msgstr "å–æ¶ˆ" + +#. Form2..LeftPanel..ButtonsPanel..SpTBXButton3..Caption +#: Unit2.dfm:152 +msgid "Apply" +msgstr "应用" + +#: Unit1.pas:235 +msgid "Save Layout" +msgstr "ä¿å­˜å¸ƒå±€" + +#: Unit1.pas:235 +msgid "Save current layout as:" +msgstr "将当å‰å¸ƒå±€ä¿å­˜ä¸ºï¼š" + +# Customizer Form +msgid "Toolbars" +msgstr "" + +msgid "Commands" +msgstr "" + +msgid "Shortcuts" +msgstr "" + +msgid "&Default Options" +msgstr "" + +msgid "&Close" +msgstr "" + +msgid "&Visible" +msgstr "" + +msgid "T&ext Options" +msgstr "" + +msgid "Icons + Selective Text" +msgstr "" + +msgid "Icons" +msgstr "" + +msgid "Icons + Text" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "&Icon Options" +msgstr "" + +msgid "Large Icons" +msgstr "" + +msgid "Small Icons" +msgstr "" + +msgid "&Skins" +msgstr "" + +msgid "C&hange" +msgstr "" + +msgid "[ Separator ]" +msgstr "" + +msgid "[ Blank Separator ]" +msgstr "" + +msgid "To add command buttons, drag and drop commands onto a toolbar. To remove command buttons, drag them off the toolbar and drop them on the commands list." +msgstr "" + +msgid "Change Shortcut" +msgstr "" + +msgid "The shortcut is already being used by the \"%s\" command. Do you want to reassign it to the \"%s\" command?" +msgstr "" + +# ColorEdit Form +msgid "Transparent Color" +msgstr "" + +msgid "Color Picker" +msgstr "" + +msgid "Drag && Drop" +msgstr "" + diff --git a/internal/2.4.4/1/Demos/Customizer/translations.txt b/internal/2.4.4/1/Demos/Customizer/translations.txt new file mode 100644 index 0000000..82aa654 --- /dev/null +++ b/internal/2.4.4/1/Demos/Customizer/translations.txt @@ -0,0 +1,28 @@ + +The Customizer Demo uses dxgettext (http://dxgettext.po.dk) to translate the strings to various languages. +Unfortunately the translations are not complete: + +ar (Arabic): 100% translated (Ammar I) +de (German): 73% translated (Thomas Speck) +es (Spanish): 100% translated (Robert Lee) +fi (Finnish): 73% translated (Tapio Saarikumpu) +fr (French): 73% translated (Bob Baudewyns) +ja (Japanese): 73% translated (Minoru Yoshida) +ko (Korean): 100% translated (Hyeonwoo Oh) +nl (Dutch): 73% translated (Alfred Vink) +pt_BR (Brazilian): 73% translated (Mauricio Magnani) +ru (Russian): 73% translated (Alexey Naumov) +sr_Cyrillic (Serbian): 73% translated (Marko Binic) +sr_Latin (Serbian): 73% translated (Marko Binic) +sv (Swedish): 73% translated (Mattias Andersson) +tr (Turkish): 73% translated (Zylar) +zh_CN (Chinese): 73% translated (Beta Xiong) + +You can edit the translations with Notepad, just open the corresponding po file of the language. +For example to edit the Chinese translation open the \locale\zh_CN\LC_MESSAGES\default.po file with Notepad and edit the msgstr entries. +You can also use a PoEdit (http://poedit.sourceforge.net) to edit the files. + +To create a new translation for a different language use the default.po file template located in the locale directory. + +If you improve one of the translations please send it to me, my mail address is on: +http://www.silverpointdevelopment.com/sptbxlib/support.htm \ No newline at end of file diff --git a/internal/2.4.4/1/Demos/FormPopupMenu/FormPopupMenu.dpr b/internal/2.4.4/1/Demos/FormPopupMenu/FormPopupMenu.dpr new file mode 100644 index 0000000..be00fa9 --- /dev/null +++ b/internal/2.4.4/1/Demos/FormPopupMenu/FormPopupMenu.dpr @@ -0,0 +1,17 @@ +program FormPopupMenu; + +uses + Forms, + Unit1 in 'Unit1.pas' {Form1}, + Unit2 in 'Unit2.pas' {Form2}, + Unit3 in 'Unit3.pas' {Form3}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.CreateForm(TForm2, Form2); + Application.CreateForm(TForm3, Form3); + Application.Run; +end. diff --git a/internal/2.4.4/1/Demos/FormPopupMenu/Unit1.dfm b/internal/2.4.4/1/Demos/FormPopupMenu/Unit1.dfm new file mode 100644 index 0000000..e026cd8 --- /dev/null +++ b/internal/2.4.4/1/Demos/FormPopupMenu/Unit1.dfm @@ -0,0 +1,200 @@ +object Form1: TForm1 + Left = 312 + Top = 215 + Caption = 'Form1' + ClientHeight = 387 + ClientWidth = 531 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [] + OldCreateOrder = False + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object SpTBXTitleBar1: TSpTBXTitleBar + Left = 0 + Top = 0 + Width = 531 + Height = 387 + Caption = 'Form1' + DesignSize = ( + 531 + 387) + object SpTBXSubmenuItem2: TSpTBXSubmenuItem + Caption = 'Skins' + Options = [tboDropdownArrow] + OnDrawItem = SpTBXSubmenuItem2DrawItem + LinkSubitems = SpTBXSubmenuItem3 + end + object SpTBXStatusBar1: TSpTBXStatusBar + Left = 4 + Top = 360 + Width = 523 + Height = 23 + object SpTBXLabelItem1: TSpTBXLabelItem + Caption = 'Panel 1' + end + object SpTBXSeparatorItem2: TSpTBXSeparatorItem + end + object SpTBXLabelItem2: TSpTBXLabelItem + Caption = 'Panel 2' + end + end + object SpTBXDock2: TSpTBXDock + Left = 4 + Top = 26 + Width = 523 + Height = 23 + object SpTBXToolbar2: TSpTBXToolbar + Left = 0 + Top = 0 + CloseButton = False + DockPos = -8 + FullSize = True + MenuBar = True + ProcessShortCuts = True + ShrinkMode = tbsmWrap + Stretch = True + TabOrder = 0 + Caption = 'SpTBXToolbar2' + object SpTBXSubmenuItem1: TSpTBXSubmenuItem + Tag = 100 + Caption = '&File' + object SpTBXItem1: TSpTBXItem + Caption = '&New' + end + object SpTBXItem2: TSpTBXItem + Caption = '&Open' + end + object SpTBXSeparatorItem1: TSpTBXSeparatorItem + end + object SpTBXItem3: TSpTBXItem + Caption = '&Exit' + end + end + object SpTBXSubmenuItem3: TSpTBXSubmenuItem + Caption = '&Skins' + object SpTBXSkinGroupItem1: TSpTBXSkinGroupItem + end + end + end + end + object SpTBXMultiDock1: TSpTBXMultiDock + Left = 4 + Top = 49 + Width = 178 + Height = 311 + object SpTBXDockablePanel1: TSpTBXDockablePanel + Left = 0 + Top = 0 + Width = 178 + Height = 311 + Caption = 'Form Popup Options' + DockPos = 0 + TabOrder = 0 + Options.Close = False + object SpTBXRadioGroup1: TSpTBXRadioGroup + Left = 7 + Top = 56 + Width = 161 + Height = 97 + Caption = 'BorderStyle' + TabOrder = 1 + OnClick = SpTBXRadioGroup1Click + ItemIndex = 3 + Items.Strings = ( + 'pbsFrame' + 'pbsSizeable' + 'pbsSizeableBottom' + 'pbsSizeableRightBottom') + end + object SpTBXCheckBox1: TSpTBXCheckBox + Left = 11 + Top = 32 + Width = 69 + Height = 21 + Caption = 'Set focus' + TabOrder = 2 + OnClick = SpTBXCheckBox1Click + end + end + end + object SpTBXGroupBox1: TSpTBXGroupBox + Left = 192 + Top = 64 + Width = 329 + Height = 73 + Caption = 'Calendar Popup' + Anchors = [akLeft, akTop, akRight] + TabOrder = 4 + object SpTBXButtonEdit1: TSpTBXButtonEdit + Left = 16 + Top = 33 + Width = 121 + Height = 21 + TabOrder = 0 + EditButton.Left = 97 + EditButton.Top = 0 + EditButton.Width = 20 + EditButton.Height = 17 + EditButton.Align = alRight + EditButton.DropDownMenu = SpTBXFormPopupMenu1 + end + object SpTBXButton1: TSpTBXButton + Left = 184 + Top = 32 + Width = 121 + Height = 25 + Caption = 'Date' + TabOrder = 1 + DropDownMenu = SpTBXFormPopupMenu1 + end + end + object SpTBXGroupBox2: TSpTBXGroupBox + Left = 192 + Top = 168 + Width = 329 + Height = 81 + Caption = 'Treeview Popup' + Anchors = [akLeft, akTop, akRight] + TabOrder = 5 + object SpTBXButtonEdit2: TSpTBXButtonEdit + Left = 16 + Top = 33 + Width = 121 + Height = 21 + TabOrder = 0 + EditButton.Left = 97 + EditButton.Top = 0 + EditButton.Width = 20 + EditButton.Height = 17 + EditButton.Align = alRight + EditButton.DropDownMenu = SpTBXFormPopupMenu2 + end + object SpTBXButton2: TSpTBXButton + Left = 184 + Top = 32 + Width = 121 + Height = 25 + Caption = 'Colors' + TabOrder = 1 + DropDownMenu = SpTBXFormPopupMenu2 + end + end + end + object SpTBXFormPopupMenu1: TSpTBXFormPopupMenu + BorderStyle = pbsSizeableRightBottom + OnBeforeClosePopup = SpTBXFormPopupMenu1BeforeClosePopup + Left = 200 + Top = 304 + end + object SpTBXFormPopupMenu2: TSpTBXFormPopupMenu + BorderStyle = pbsSizeableRightBottom + OnBeforeClosePopup = SpTBXFormPopupMenu2BeforeClosePopup + Left = 240 + Top = 304 + end +end diff --git a/internal/2.4.4/1/Demos/FormPopupMenu/Unit1.pas b/internal/2.4.4/1/Demos/FormPopupMenu/Unit1.pas new file mode 100644 index 0000000..07f5a3c --- /dev/null +++ b/internal/2.4.4/1/Demos/FormPopupMenu/Unit1.pas @@ -0,0 +1,123 @@ +unit Unit1; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, ImgList, Menus, ComCtrls, + TB2Dock, TB2Toolbar, TB2Item, TB2ExtItems, + SpTBXSkins, SpTBXItem, SpTBXControls, SpTBXEditors, SpTBXFormPopupMenu, + SpTBXDkPanels; + +type + TForm1 = class(TForm) + SpTBXDock2: TSpTBXDock; + SpTBXToolbar2: TSpTBXToolbar; + SpTBXSubmenuItem1: TSpTBXSubmenuItem; + SpTBXStatusBar1: TSpTBXStatusBar; + SpTBXTitleBar1: TSpTBXTitleBar; + SpTBXSubmenuItem2: TSpTBXSubmenuItem; + SpTBXItem1: TSpTBXItem; + SpTBXItem2: TSpTBXItem; + SpTBXSeparatorItem1: TSpTBXSeparatorItem; + SpTBXItem3: TSpTBXItem; + SpTBXMultiDock1: TSpTBXMultiDock; + SpTBXDockablePanel1: TSpTBXDockablePanel; + SpTBXRadioGroup1: TSpTBXRadioGroup; + SpTBXCheckBox1: TSpTBXCheckBox; + SpTBXGroupBox1: TSpTBXGroupBox; + SpTBXGroupBox2: TSpTBXGroupBox; + SpTBXButtonEdit1: TSpTBXButtonEdit; + SpTBXButton1: TSpTBXButton; + SpTBXButtonEdit2: TSpTBXButtonEdit; + SpTBXButton2: TSpTBXButton; + SpTBXFormPopupMenu1: TSpTBXFormPopupMenu; + SpTBXFormPopupMenu2: TSpTBXFormPopupMenu; + SpTBXSubmenuItem3: TSpTBXSubmenuItem; + SpTBXSkinGroupItem1: TSpTBXSkinGroupItem; + SpTBXLabelItem1: TSpTBXLabelItem; + SpTBXSeparatorItem2: TSpTBXSeparatorItem; + SpTBXLabelItem2: TSpTBXLabelItem; + procedure SpTBXSubmenuItem2DrawItem(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); + procedure SpTBXCheckBox1Click(Sender: TObject); + procedure SpTBXRadioGroup1Click(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure SpTBXFormPopupMenu1BeforeClosePopup(Sender: TObject; + Selected: Boolean); + procedure SpTBXFormPopupMenu2BeforeClosePopup(Sender: TObject; + Selected: Boolean); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +{$R *.dfm} + +uses + Unit2, Unit3; + +{ TForm1 } + +procedure TForm1.FormShow(Sender: TObject); +begin + SpTBXFormPopupMenu1.PopupForm := Form2; + SpTBXFormPopupMenu2.PopupForm := Form3; +end; + +procedure TForm1.SpTBXCheckBox1Click(Sender: TObject); +begin + SpTBXFormPopupMenu1.PopupFocus := SpTBXCheckBox1.Checked; + SpTBXFormPopupMenu2.PopupFocus := SpTBXCheckBox1.Checked; +end; + +procedure TForm1.SpTBXRadioGroup1Click(Sender: TObject); +var + I: Integer; +begin + I := SpTBXRadioGroup1.ItemIndex; + if I > -1 then begin + SpTBXFormPopupMenu1.BorderStyle := TSpTBXPopupBorderStyleType(I); + SpTBXFormPopupMenu2.BorderStyle := TSpTBXPopupBorderStyleType(I); + end; +end; + +procedure TForm1.SpTBXSubmenuItem2DrawItem(Sender: TObject; + ACanvas: TCanvas; ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + // Don't draw the items background + if (PaintStage = pstPrePaint) and (CurrentSkin.SkinName = 'Default') then + PaintDefault := False; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Popups } + +procedure TForm1.SpTBXFormPopupMenu1BeforeClosePopup(Sender: TObject; + Selected: Boolean); +begin + if Selected then begin + SpTBXButton1.Caption := DateTimeToStr(Form2.MonthCalendar1.Date); + SpTBXButtonEdit1.Text := DateTimeToStr(Form2.MonthCalendar1.Date); + end; +end; + +procedure TForm1.SpTBXFormPopupMenu2BeforeClosePopup(Sender: TObject; + Selected: Boolean); +begin + if Selected then begin + SpTBXButton2.Caption := Form3.TreeView1.Selected.Text; + SpTBXButtonEdit2.Text := Form3.TreeView1.Selected.Text; + end; +end; + +end. + diff --git a/internal/2.4.4/1/Demos/FormPopupMenu/Unit2.dfm b/internal/2.4.4/1/Demos/FormPopupMenu/Unit2.dfm new file mode 100644 index 0000000..4828692 --- /dev/null +++ b/internal/2.4.4/1/Demos/FormPopupMenu/Unit2.dfm @@ -0,0 +1,27 @@ +object Form2: TForm2 + Left = 0 + Top = 0 + Caption = 'Form2' + ClientHeight = 166 + ClientWidth = 180 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object MonthCalendar1: TMonthCalendar + Left = 0 + Top = 0 + Width = 180 + Height = 166 + Align = alClient + AutoSize = True + Date = 38924.819285115740000000 + TabOrder = 0 + end +end diff --git a/internal/2.4.4/1/Demos/FormPopupMenu/Unit2.pas b/internal/2.4.4/1/Demos/FormPopupMenu/Unit2.pas new file mode 100644 index 0000000..89faf97 --- /dev/null +++ b/internal/2.4.4/1/Demos/FormPopupMenu/Unit2.pas @@ -0,0 +1,50 @@ +unit Unit2; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, ComCtrls, CommCtrl, ExtCtrls, SpTBXFormPopupMenu; + +type + TForm2 = class(TForm) + MonthCalendar1: TMonthCalendar; + procedure FormCreate(Sender: TObject); + private + { Private declarations } + FOldWndProc: TWndMethod; + procedure NewWndProc(var Message: TMessage); + public + { Public declarations } + end; + +var + Form2: TForm2; + +implementation + +{$R *.dfm} + +procedure TForm2.FormCreate(Sender: TObject); +begin + // We can't use the MonthCalendar.OnClick event because + // it gets fired even when clicking on the Prev/Next month + // buttons. We have to subclass it and handle the + // MCN_SELECT notification + MonthCalendar1.DoubleBuffered := True; + FOldWndProc := MonthCalendar1.WindowProc; + MonthCalendar1.WindowProc := NewWndProc; +end; + +procedure TForm2.NewWndProc(var Message: TMessage); +begin + FOldWndProc(Message); // default WndProc + if Message.Msg = CN_NOTIFY then + if TWMNotify(Message).NMHdr^.code = MCN_SELECT then begin + // Inform the ActiveFormPopupMenu that a selection was made. + if Assigned(ActiveFormPopupMenu) then + ActiveFormPopupMenu.ClosePopup(True); + end; +end; + +end. diff --git a/internal/2.4.4/1/Demos/FormPopupMenu/Unit3.dfm b/internal/2.4.4/1/Demos/FormPopupMenu/Unit3.dfm new file mode 100644 index 0000000..21fa118 --- /dev/null +++ b/internal/2.4.4/1/Demos/FormPopupMenu/Unit3.dfm @@ -0,0 +1,36 @@ +object Form3: TForm3 + Left = 0 + Top = 0 + Caption = 'Form3' + ClientHeight = 105 + ClientWidth = 174 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object TreeView1: TTreeView + Left = 0 + Top = 0 + Width = 174 + Height = 105 + Align = alClient + BorderStyle = bsNone + HideSelection = False + HotTrack = True + Images = ImageList1 + Indent = 19 + StateImages = ImageList1 + TabOrder = 0 + OnMouseUp = TreeView1MouseUp + end + object ImageList1: TImageList + Left = 48 + Top = 64 + end +end diff --git a/internal/2.4.4/1/Demos/FormPopupMenu/Unit3.pas b/internal/2.4.4/1/Demos/FormPopupMenu/Unit3.pas new file mode 100644 index 0000000..584a423 --- /dev/null +++ b/internal/2.4.4/1/Demos/FormPopupMenu/Unit3.pas @@ -0,0 +1,102 @@ +unit Unit3; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ComCtrls, ImgList, SpTBXFormPopupMenu; + +type + TForm3 = class(TForm) + TreeView1: TTreeView; + ImageList1: TImageList; + procedure FormCreate(Sender: TObject); + procedure TreeView1MouseUp(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); + private + { Private declarations } + public + { Public declarations } + function AddIcon(Fill: TColor; Circular: Boolean = False): Integer; + procedure CreateNodesProc(const S: string); + end; + +var + Form3: TForm3; + +implementation + +{$R *.dfm} + +function TForm3.AddIcon(Fill: TColor; Circular: Boolean = False): Integer; +var + B: TBitmap; + R: TRect; +begin + B := TBitmap.Create; + try + B.Width := 16; + B.Height := 16; + B.Canvas.Brush.Color := Fill; + R := Rect(0, 0, B.Width, B.Height); + InflateRect(R, -1, -1); + if Circular then + B.Canvas.Ellipse(R) + else + B.Canvas.Rectangle(R); + Result := ImageList1.Add(B, nil); + finally + B.Free; + end; +end; + +procedure TForm3.CreateNodesProc(const S: string); +var + ParentNode: TTreeNode; + C: TColor; +begin + // Add the color node + C := StringToColor(S); + ParentNode := TreeView1.Items.GetFirstNode; + if C < 0 then + ParentNode := ParentNode.getNextSibling; + with TreeView1.Items.AddChildObject(ParentNode, S, Pointer(C)) do begin + ImageIndex := AddIcon(C); + SelectedIndex := ImageIndex; + end; +end; + +procedure TForm3.FormCreate(Sender: TObject); +var + I: Integer; +begin + I := AddIcon(clWhite, True); + // Add the parent nodes to the TreeView + with TreeView1.Items.Add(nil, 'Standard Colors') do begin + ImageIndex := I; + SelectedIndex := ImageIndex; + end; + with TreeView1.Items.Add(nil, 'System Colors') do begin + ImageIndex := I; + SelectedIndex := ImageIndex; + end; + // Add the color nodes + GetColorValues(CreateNodesProc); +end; + +procedure TForm3.TreeView1MouseUp(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +var + Node: TTreeNode; +begin + if Button = mbLeft then begin + Node := TreeView1.GetNodeAt(X, Y); + if Assigned(Node) and Node.Selected and (Node.Level > 0) then begin + // Inform the ActiveFormPopupMenu that a selection was made. + if Assigned(ActiveFormPopupMenu) then + ActiveFormPopupMenu.ClosePopup(True); + end; + end; +end; + +end. diff --git a/internal/2.4.4/1/Demos/Overview/Overview.dpr b/internal/2.4.4/1/Demos/Overview/Overview.dpr new file mode 100644 index 0000000..5ead0c3 --- /dev/null +++ b/internal/2.4.4/1/Demos/Overview/Overview.dpr @@ -0,0 +1,13 @@ +program Overview; + +uses + Forms, + Unit1 in 'Unit1.pas' {Form1}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/internal/2.4.4/1/Demos/Overview/Skins/WMP11.skn b/internal/2.4.4/1/Demos/Overview/Skins/WMP11.skn new file mode 100644 index 0000000..74985f9 --- /dev/null +++ b/internal/2.4.4/1/Demos/Overview/Skins/WMP11.skn @@ -0,0 +1,380 @@ +; =============================================================================================================== +; +; Syntax: +; [Component] +; State.Part = Value +; +; Component can be: +; Single state components: Dock, DockablePanel, DockablePanelTitleBar, Gutter, MenuBar, OpenToolbarItem, +; Panel, Popup, Separator, Splitter, StatusBar, StatusBarGrip, TabBackground, +; TabToolbar, Toolbar, ToolbarGrip, Window, WindowTitleBar +; Multiple state componentes: MenuBarItem, MenuItem, ToolbarItem, Button, CheckBox, EditButton, EditFrame, +; Header, Label, ListItem, ProgressBar, RadioButton, Tab, TrackBar, TrackBarButton +; +; State can be: Normal, Disabled, HotTrack, Pushed, Checked, CheckedAndHotTrack +; +; Part can be: Body, Borders, TextColor +; +; =============================================================================================================== +; +; Value syntax: +; +; Body = GradientType, GradientColor1, GradientColor2, GradientColor3, GradientColor4 +; Body represents the controls client area, GradientType can be one of the +; following values: +; 0 (Solid, uses Color1) +; 1 (Vertical Gradient, uses 2 colors) +; 2 (Horizontal Gradient, uses 2 colors) +; 3 (Vertical Glass Gradient, uses 4 colors) +; 4 (Horizontal Glass Gradient, uses 4 colors) +; 5 (Vertical Mirror Gradient, uses 4 colors) +; 6 (Horizontal Mirror Gradient, uses 4 colors) +; 7 (Vertical 1/3 Mirror Gradient, uses 4 colors) +; 8 (Horizontal 1/3 Mirror Gradient, uses 4 colors) +; 9 (Vertical Office 2007 Gradient, uses 4 colors) +; 10 (Horizontal Office 2007 Gradient, uses 4 colors) +; +; Example, this will draw a white/gray vertical gradient on the buttons normal state: +; [Button] +; Normal.Body = 1, clWhite, $DCD8D0 +; +; +; Borders = BorderType, TopLeftColor, BottomRightColor, Internal TopLeftColor, Internal BottomRightColor +; Borders represents the controls borders, BorderType can be one of the +; following values: +; 0 (Rectangle border) +; 1 (Rounded border) +; 2 (Double rounded) +; +; Example, this will draw a white/black rounded beveled border on the buttons normal state: +; [Button] +; Normal.Borders = 1, clWhite, clBlack +; +; =============================================================================================================== +; +; Notes: +; +; 1) Colors must be in Delphi notation, for example: clWhite or $FFFFFF are valid +; 2) clNone is used as the empty fill color +; 3) Non used colors can be omited + + +[Skin] +Name=WMP11 +Author = Ricardo Cardona +ColorBtnFace=clSilver +OfficeStatusBar=0 +OfficeIcons=0 +TitleBarBorderSize=4 + +[Dock] +Normal.Body=0, clBlack, clNone, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clWhite + +[DockablePanel] +Normal.Body=1, $007F665C, $007F665C, clNone, clNone +Normal.Borders=0, clBlack, clBlack, clNone, clNone +Normal.TextColor=clWhite + +[DockablePanelTitleBar] +Normal.Body=3, $00130F0D, $00080606, $00423630, $0082695F +Normal.Borders=1, $00765E56, clBlack, clNone, clNone +Normal.TextColor=clWhite + +[MenuBar] +Normal.Body=1, clSilver, $000E0B0A, clNone, clNone +Normal.Borders=2, $00B0B0B0, $00B0B0B0, clNone, clNone +Normal.TextColor=clWhite + +[Panel] +Normal.Body=0, $007F665C, clBlack, clNone, clNone +Normal.Borders=2, clGray, clGray, $00ADA492, clGray +Normal.TextColor=clWhite + +[Popup] +Normal.Body=0, $007F665C, clNone, clNone, clNone +Normal.Borders=0, clSilver, clSilver, clNone, clNone +Normal.TextColor=clWhite + +[Separator] +Normal.Body=0, clBlack, $007F665C, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clNone + +[Splitter] +Normal.Body=2, $007F665C, $007F665C, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clNone + +[StatusBar] +Normal.Body=1, $00131211, $00744C42, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clWhite + +[StatusBarGrip] +Normal.Body=1, clBlack, $007F665C, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clWhite + +[TabBackground] +Normal.Body=3, clBlack, clBlack, clBlack, $007F665C +Normal.Borders=0, clGray, clGray, clNone, clNone +Normal.TextColor=clNone + +[Toolbar] +Normal.Body=1, clBlack, $007F665C, clNone, clNone +Normal.Borders=2, clNone, clNone, clNone, clNone +Normal.TextColor=clWhite + +[ToolbarGrip] +Normal.Body=1, clBlack, $007F665C, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clWhite + +[Window] +Normal.Body=1, clBlack, $007F665C, clNone, clNone +Normal.Borders=0, clGray, clGray, clSilver, $007F665C +Normal.TextColor=clWhite + +[WindowTitleBar] +Normal.Body=1, clBlack, $007F665C, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clWhite + +[MenuBarItem] +Normal.Body=0, clNone, clNone, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clWhite +Disabled.Body=0, clNone, clNone, clNone, clNone +Disabled.Borders=0, clNone, clNone, clNone, clNone +Disabled.TextColor=clSilver +HotTrack.Body=5, $00D1D1D1, $00ADA492, $00603518, clBlack +HotTrack.Borders=1, $00909090, $00909090, clNone, clNone +HotTrack.TextColor=clWhite +Pushed.Body=1, clBlack, $00603518, clNone, clNone +Pushed.Borders=1, clGray, clGray, $00ADA492, $00E8E19D +Pushed.TextColor=clWhite +Checked.Body=3, clWhite, clBlack, clBlack, $00765F55 +Checked.Borders=1, clGray, clGray, $00B0D4DF, clSilver +Checked.TextColor=clWhite +CheckedAndHotTrack.Body=3, clBlack, $00603518, $00ADA492, clWhite +CheckedAndHotTrack.Borders=1, clGray, clGray, $00ADA492, $00E8E19D +CheckedAndHotTrack.TextColor=clWhite + +[MenuItem] +Normal.Body=0, clNone, clNone, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clWhite +Disabled.Body=0, clNone, clNone, clNone, clNone +Disabled.Borders=0, clNone, clNone, clNone, clNone +Disabled.TextColor=clSilver +HotTrack.Body=5, clWhite, $00ADA492, $00603518, clBlack +HotTrack.Borders=1, $00909090, $00909090, clNone, clNone +HotTrack.TextColor=clWhite +Pushed.Body=1, clSilver, clWhite, clNone, clNone +Pushed.Borders=1, $00909090, $00909090, clNone, clNone +Pushed.TextColor=clWhite +Checked.Body=5, clBlack, $00765F55, $00765F55, clBlack +Checked.Borders=1, clGray, clGray, $00B0D4DF, $00F0FDFF +Checked.TextColor=clWhite +CheckedAndHotTrack.Body=5, clBlack, $00603518, $00ADA492, clWhite +CheckedAndHotTrack.Borders=1, clGray, clGray, $00ADA492, $00E8E19D +CheckedAndHotTrack.TextColor=clWhite + +[ToolbarItem] +Normal.Body=0, clNone, clNone, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clWhite +Disabled.Body=0, clNone, $00392E2B, $005A4A44, $00866E65 +Disabled.Borders=0, clNone, clNone, clNone, clNone +Disabled.TextColor=clSilver +HotTrack.Body=5, clWhite, $00ADA492, $00603518, clBlack +HotTrack.Borders=1, $00909090, $00909090, clNone, clNone +HotTrack.TextColor=clWhite +Pushed.Body=5, clGray, clBlack, clBlack, clGray +Pushed.Borders=1, $00909090, $00909090, clNone, clNone +Pushed.TextColor=clWhite +Checked.Body=5, clGray, clBlack, clBlack, clGray +Checked.Borders=1, clGray, clGray, $00B0D4DF, $00F0FDFF +Checked.TextColor=clWhite +CheckedAndHotTrack.Body=5, clBlack, $00603518, $00ADA492, clWhite +CheckedAndHotTrack.Borders=1, clGray, clGray, $00ADA492, $00E8E19D +CheckedAndHotTrack.TextColor=clWhite + +[Button] +Normal.Body=3, clWhite, clBlack, clBlack, $00765F55 +Normal.Borders=1, $00909090, $00909090, $00909090, $00909090 +Normal.TextColor=clWhite +Disabled.Body=1, clBlack, $009E9E9E, clNone, clNone +Disabled.Borders=1, $00909090, $00909090, clNone, clNone +Disabled.TextColor=clSilver +HotTrack.Body=5, clWhite, $00ADA492, $00603518, clBlack +HotTrack.Borders=1, $00909090, $00909090, clNone, clNone +HotTrack.TextColor=clWhite +Pushed.Body=5, clBlack, $00603518, $00ADA492, clWhite +Pushed.Borders=1, $00909090, $00909090, clNone, clNone +Pushed.TextColor=clWhite +Checked.Body=5, $00765F55, clBlack, clBlack, $00765F55 +Checked.Borders=1, clGray, clGray, $00B0D4DF, $00F0FDFF +Checked.TextColor=clWhite +CheckedAndHotTrack.Body=5, clBlack, $00550000, $007B7B7B, clWhite +CheckedAndHotTrack.Borders=1, clGray, clGray, $00ADA492, $00E8E19D +CheckedAndHotTrack.TextColor=clWhite + +[CheckBox] +Normal.Body=0, clBlack, clNone, clNone, clNone +Normal.Borders=0, clGray, clGray, clNone, clNone +Normal.TextColor=clWhite +Disabled.Body=0, clNone, clNone, clNone, clNone +Disabled.Borders=0, $0099A8AC, $0099A8AC, clNone, clNone +Disabled.TextColor=clSilver +HotTrack.Body=5, clWhite, $00ADA492, $00603518, clBlack +HotTrack.Borders=1, $00909090, $00909090, $000E0B0A, $00090706 +HotTrack.TextColor=clWhite +Pushed.Body=5, $00E8E19D, $00603518, $00ADA492, clWhite +Pushed.Borders=1, $00E8E19D, $00603518, $00ADA492, clWhite +Pushed.TextColor=clWhite +Checked.Body=0, $00010101, $00F0FDFF, clNone, clNone +Checked.Borders=1, clGray, clGray, clBlack, clBlack +Checked.TextColor=clWhite +CheckedAndHotTrack.Body=5, clWhite, $00ADA492, $00603518, clBlack +CheckedAndHotTrack.Borders=0, clGray, clGray, $00ADA492, $00E8E19D +CheckedAndHotTrack.TextColor=clWhite + +[EditButton] +Normal.Body=5, clWhite, clBlack, clBlack, $00765F55 +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clWhite +HotTrack.Body=5, clWhite, $00ADA492, $00603518, clBlack +HotTrack.Borders=1, $00909090, $00909090, clNone, clNone +HotTrack.TextColor=clWhite +Pushed.Body=5, $00E8E19D, $00603518, $00ADA492, clWhite +Pushed.Borders=1, $00909090, $00909090, clNone, clNone +Pushed.TextColor=clNone +Checked.Body=5, $00D2F9FF, $00F0FDFF, clNone, clNone +Checked.Borders=1, clGray, clGray, $00B0D4DF, $00F0FDFF +Checked.TextColor=clNone +CheckedAndHotTrack.Body=5, clWhite, $00E8E19D, clNone, clNone +CheckedAndHotTrack.Borders=1, clGray, clGray, $00ADA492, $00E8E19D +CheckedAndHotTrack.TextColor=clNone + +[EditFrame] +Normal.Body=0, clNone, clNone, clNone, clNone +Normal.Borders=1, clNone, clNone, $00D0D0D0, $00D0D0D0 +Normal.TextColor=clNone +Disabled.Body=0, clNone, clNone, clNone, clNone +Disabled.Borders=1, clNone, clNone, $0099A8AC, $0099A8AC +Disabled.TextColor=clNone +HotTrack.Body=0, clNone, clNone, clNone, clNone +HotTrack.Borders=1, clNone, clNone, $00909090, $00909090 +HotTrack.TextColor=clNone + +[Label] +Normal.Body=0, clNone, clNone, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clWhite +Disabled.Body=0, clNone, clNone, clNone, clNone +Disabled.Borders=0, clNone, clNone, clNone, clNone +Disabled.TextColor=clSilver +HotTrack.Body=0, clNone, clNone, clNone, clNone +HotTrack.Borders=0, clNone, clNone, clNone, clNone +HotTrack.TextColor=clWhite +Pushed.Body=0, clNone, clNone, clNone, clNone +Pushed.Borders=0, clNone, clNone, clNone, clNone +Pushed.TextColor=clWhite + +[ListItem] +Normal.Body=0, $00765F55, clNone, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clNone +Disabled.Body=0, $00765F55, clNone, clNone, clNone +Disabled.Borders=0, clNone, clNone, clNone, clNone +Disabled.TextColor=clSilver +HotTrack.Body=0, $00765F55, $00E5E2DB, clNone, clNone +HotTrack.Borders=1, $00909090, $00909090, clNone, clNone +HotTrack.TextColor=clWhite +Pushed.Body=0, $00765F55, clWhite, clNone, clNone +Pushed.Borders=1, $00909090, $00909090, clNone, clNone +Pushed.TextColor=clNone +Checked.Body=0, $00765F55, $00F0FDFF, clNone, clNone +Checked.Borders=1, clGray, clGray, $00B0D4DF, $00F0FDFF +Checked.TextColor=clNone +CheckedAndHotTrack.Body=0, $00765F55, $00E8E19D, clNone, clNone +CheckedAndHotTrack.Borders=1, clGray, clGray, $00ADA492, $00E8E19D +CheckedAndHotTrack.TextColor=clNone + +[ProgressBar] +Normal.Body=2, $007F665C, $007F665C, clNone, clNone +Normal.Borders=2, $005E4B44, $00765F55, clNone, clNone +Normal.TextColor=clNone +HotTrack.Body=3, $00FFC584, $00CD410F, $00FF966E, $00866E65 +HotTrack.Borders=2, $005E4B44, $00765F55, clNone, clNone +HotTrack.TextColor=clNone + +[RadioButton] +Normal.Body=0, clNone, clNone, clNone, clNone +Normal.Borders=0, clGray, clGray, clNone, clNone +Normal.TextColor=clWhite +Disabled.Body=0, clNone, clNone, clNone, clNone +Disabled.Borders=0, $0099A8AC, $0099A8AC, clNone, clNone +Disabled.TextColor=clSilver +HotTrack.Body=5, clWhite, $00ADA492, $00603518, clBlack +HotTrack.Borders=1, clWhite, clWhite, clWhite, clWhite +HotTrack.TextColor=clWhite +Pushed.Body=0, clNone, clWhite, clNone, clNone +Pushed.Borders=1, $00909090, $00909090, clNone, clNone +Pushed.TextColor=clWhite +Checked.Body=0, clNone, $00F0FDFF, clNone, clNone +Checked.Borders=1, clGray, clGray, $00B0D4DF, $00F0FDFF +Checked.TextColor=clWhite +CheckedAndHotTrack.Body=5, $00E8E19D, $00603518, $00ADA492, clBlack +CheckedAndHotTrack.Borders=1, clWhite, clWhite, clWhite, clWhite +CheckedAndHotTrack.TextColor=clWhite + +[Tab] +Normal.Body=0, clNone, clNone, clNone, clNone +Normal.Borders=0, clNone, clNone, clNone, clNone +Normal.TextColor=clSilver +HotTrack.Body=5, clWhite, $00ADA492, $00603518, clBlack +HotTrack.Borders=1, $00A0A0A0, $00A0A0A0, clNone, clNone +HotTrack.TextColor=clWhite +Pushed.Body=0, clNone, clWhite, clNone, clNone +Pushed.Borders=1, $00909090, $00909090, clNone, clNone +Pushed.TextColor=clWhite +Checked.Body=3, clWhite, clBlack, clBlack, clBlack +Checked.Borders=1, $00ADA492, $00ADA492, $00603518, clBlack +Checked.TextColor=clWhite +CheckedAndHotTrack.Body=5, clWhite, $00ADA492, $00603518, clBlack +CheckedAndHotTrack.Borders=1, clGray, clGray, $00ADA492, $00E8E19D +CheckedAndHotTrack.TextColor=clWhite + +[TrackBar] +Normal.Body=3, $00FFC584, $00CD410F, $00FF966E, $00866E65 +Normal.Borders=2, $005E4B44, $00765F55, clNone, clNone +Normal.TextColor=clNone +HotTrack.Body=1, clWhite, clBlack, clNone, clNone +HotTrack.Borders=2, clNone, clNone, clNone, clNone +HotTrack.TextColor=clNone + +[TrackBarButton] +Normal.Body=3, clWhite, clBlack, clBlack, $00765F55 +Normal.Borders=2, $00909090, $00909090, clNone, clNone +Normal.TextColor=clNone +HotTrack.Body=5, clWhite, $00ADA492, $00603518, $00E8E19D +HotTrack.Borders=0, clNone, clNone, clNone, clNone +HotTrack.TextColor=clNone +Pushed.Body=5, $00765F55, clBlack, clBlack, clWhite +Pushed.Borders=2, clGray, clGray, $00F0D4DF, clNone +Pushed.TextColor=clNone + +[Header] +Normal.Body=3, clWhite, clBlack, clBlack, $00765F55 +Normal.Borders=0, $00D0D0D0, $00909090, clNone, clNone +Normal.TextColor=clWhite +HotTrack.Body=5, clWhite, $00ADA492, $00603518, clBlack +HotTrack.Borders=0, $00909090, $00909090, clNone, clNone +HotTrack.TextColor=clWhite +Pushed.Body=5, $00E8E19D, $00603518, $00ADA492, clWhite +Pushed.Borders=0, $00909090, $00909090, clNone, clNone +Pushed.TextColor=clWhite \ No newline at end of file diff --git a/internal/2.4.4/1/Demos/Overview/Unit1.dfm b/internal/2.4.4/1/Demos/Overview/Unit1.dfm new file mode 100644 index 0000000..1d2b7b8 --- /dev/null +++ b/internal/2.4.4/1/Demos/Overview/Unit1.dfm @@ -0,0 +1,1901 @@ +object Form1: TForm1 + Left = 279 + Top = 147 + Caption = 'SpTBXLib Demo' + ClientHeight = 555 + ClientWidth = 716 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [] + OldCreateOrder = False + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object SpTBXSplitter1: TSpTBXSplitter + Left = 273 + Top = 72 + Height = 457 + Cursor = crSizeWE + end + object SpTBXSplitter2: TSpTBXSplitter + Left = 575 + Top = 72 + Height = 457 + Cursor = crSizeWE + Align = alRight + end + object SpTBXMultiDock1: TSpTBXMultiDock + Left = 0 + Top = 72 + Width = 273 + Height = 457 + object SpTBXDockablePanel1: TSpTBXDockablePanel + Left = 0 + Top = 0 + Width = 273 + Height = 303 + Caption = 'Options Panel' + DockPos = 0 + TabOrder = 0 + object SpTBXSubmenuItem1: TSpTBXSubmenuItem + Options = [tboDropdownArrow] + CustomHeight = 15 + LinkSubitems = subSkins + end + object SpTBXTabControl2: TSpTBXTabControl + Left = 0 + Top = 19 + Width = 269 + Height = 280 + Align = alClient + OnResize = SpTBXTabControl2Resize + ActiveTabIndex = 0 + HiddenItems = <> + object SpTBXTabItem1: TSpTBXTabItem + Caption = 'Controls' + Checked = True + end + object SpTBXTabItem6: TSpTBXTabItem + Caption = 'Editors' + end + object SpTBXTabItem3: TSpTBXTabItem + Caption = 'Misc' + end + object SpTBXTabSheet3: TSpTBXTabSheet + Left = 0 + Top = 23 + Width = 269 + Height = 257 + Caption = 'Misc' + ImageIndex = -1 + DesignSize = ( + 269 + 257) + TabItem = 'SpTBXTabItem3' + object SpTBXGroupBox5: TSpTBXGroupBox + Left = 8 + Top = 8 + Width = 252 + Height = 177 + Caption = 'Links' + Anchors = [akLeft, akTop, akRight] + TabOrder = 0 + object SpTBXLabel2: TSpTBXLabel + Left = 8 + Top = 24 + Width = 151 + Height = 19 + Caption = 'Go to Silverpoint Development' + LinkText = 'http://www.silverpointdevelopment.com' + end + object SpTBXLabel3: TSpTBXLabel + Left = 8 + Top = 48 + Width = 156 + Height = 19 + Caption = 'Go to Toolbar2000 newsgroups' + LinkText = 'news://news.jrsoftware.org' + end + object SpTBXLabel4: TSpTBXLabel + Left = 8 + Top = 72 + Width = 128 + Height = 19 + Caption = 'Open the Windows folder' + end + object SpTBXLabel7: TSpTBXLabel + Left = 8 + Top = 144 + Width = 105 + Height = 19 + Cursor = crHandPoint + Caption = 'View the sourcecode' + LinkText = 'notepad.exe' + end + object SpTBXLabel5: TSpTBXLabel + Left = 8 + Top = 96 + Width = 106 + Height = 19 + Caption = 'Open it with the tree' + end + object SpTBXLabel6: TSpTBXLabel + Left = 8 + Top = 120 + Width = 74 + Height = 19 + Caption = 'Open WinAmp' + end + end + end + object SpTBXTabSheet6: TSpTBXTabSheet + Left = 0 + Top = 23 + Width = 269 + Height = 257 + Caption = 'Editors' + ImageIndex = -1 + DesignSize = ( + 269 + 257) + TabItem = 'SpTBXTabItem6' + object SpTBXPanel2: TSpTBXPanel + Left = 8 + Top = 112 + Width = 252 + Height = 124 + Anchors = [akLeft, akTop, akRight, akBottom] + TabOrder = 4 + HotTrack = True + object Memo2: TMemo + Left = 2 + Top = 22 + Width = 248 + Height = 100 + Align = alClient + BorderStyle = bsNone + Lines.Strings = ( + 'To add hottrack borders to your controls:' + '1) Drop a TSpTBXPanel and set HotTrack to true' + '2) Drop a control inside' + '3) Set the control Align to alClient' + '4) Set the control BorderStyle to bsNone' + '4) Change the skin to other than Default') + TabOrder = 0 + end + object Panel2: TPanel + Left = 2 + Top = 2 + Width = 248 + Height = 20 + Align = alTop + BevelOuter = bvNone + TabOrder = 1 + object SpTBXSpeedButton1: TSpTBXSpeedButton + Left = 0 + Top = 0 + Width = 81 + Height = 20 + Caption = 'Column 1' + Align = alLeft + OnDraw = SpTBXSpeedButton1Draw + end + object SpTBXSpeedButton2: TSpTBXSpeedButton + Left = 81 + Top = 0 + Width = 96 + Height = 20 + Caption = 'Column 2' + Align = alLeft + OnDraw = SpTBXSpeedButton1Draw + end + object SpTBXSpeedButton3: TSpTBXSpeedButton + Left = 177 + Top = 0 + Width = 71 + Height = 20 + Caption = 'Column 3' + Align = alClient + OnDraw = SpTBXSpeedButton1Draw + end + end + end + object SpTBXButtonEdit1: TSpTBXButtonEdit + Left = 8 + Top = 48 + Width = 121 + Height = 21 + TabOrder = 2 + Text = 'SpTBXButtonEdit' + EditButton.Left = 97 + EditButton.Top = 0 + EditButton.Width = 20 + EditButton.Height = 17 + EditButton.Caption = '...' + EditButton.Align = alRight + end + object SpTBXComboBox2: TSpTBXComboBox + Left = 136 + Top = 16 + Width = 121 + Height = 21 + ItemHeight = 13 + TabOrder = 1 + Text = 'SpTBXComboBox' + end + object SpTBXEdit1: TSpTBXEdit + Left = 8 + Top = 16 + Width = 121 + Height = 21 + TabOrder = 0 + Text = 'SpTBXEdit' + end + object SpTBXSpinEdit1: TSpTBXSpinEdit + Left = 136 + Top = 48 + Width = 121 + Height = 21 + TabOrder = 3 + SpinButton.Left = 100 + SpinButton.Top = 0 + SpinButton.Width = 17 + SpinButton.Height = 17 + SpinButton.Align = alRight + end + object SpTBXColorEdit1: TSpTBXColorEdit + Left = 8 + Top = 80 + Width = 121 + Height = 21 + TabOrder = 5 + SelectedColor = clBlack + end + object SpTBXFontComboBox1: TSpTBXFontComboBox + Left = 136 + Top = 80 + Width = 121 + Height = 21 + ItemHeight = 23 + ItemIndex = 0 + TabOrder = 6 + Text = 'Arial' + SelectedFont = 'Arial' + end + end + object SpTBXTabSheet1: TSpTBXTabSheet + Left = 0 + Top = 23 + Width = 269 + Height = 257 + Caption = 'Controls' + ImageIndex = -1 + DesignSize = ( + 269 + 257) + TabItem = 'SpTBXTabItem1' + object progressAnimate: TSpTBXButton + Left = 80 + Top = 98 + Width = 65 + Height = 25 + Caption = 'Animate' + TabOrder = 5 + OnClick = progressAnimateClick + end + object progressInc: TSpTBXButton + Left = 48 + Top = 98 + Width = 33 + Height = 25 + Caption = '+' + TabOrder = 4 + OnClick = progressIncClick + Repeating = True + end + object SpTBXGroupBox6: TSpTBXGroupBox + Left = 8 + Top = 52 + Width = 252 + Height = 17 + Caption = 'ProgressBar' + Anchors = [akLeft, akTop, akRight] + TabOrder = 2 + Borders = False + end + object SpTBXGroupBox1: TSpTBXGroupBox + Left = 8 + Top = 8 + Width = 252 + Height = 17 + Caption = 'Button' + Anchors = [akLeft, akTop, akRight] + TabOrder = 0 + Borders = False + end + object SpTBXGroupBox2: TSpTBXGroupBox + Left = 8 + Top = 130 + Width = 252 + Height = 17 + Caption = 'Trackbar' + Anchors = [akLeft, akTop, akRight] + TabOrder = 8 + Borders = False + end + object SpTBXButton1: TSpTBXButton + Left = 110 + Top = 24 + Width = 75 + Height = 25 + Caption = 'Button' + TabOrder = 1 + end + object progressDec: TSpTBXButton + Left = 16 + Top = 98 + Width = 33 + Height = 25 + Caption = '-' + TabOrder = 3 + OnClick = progressDecClick + Repeating = True + end + object progressFiles: TSpTBXCheckBox + Left = 160 + Top = 102 + Width = 85 + Height = 21 + Caption = 'File progress' + TabOrder = 6 + OnClick = progressFilesClick + end + object SpTBXProgressBar1: TSpTBXProgressBar + Left = 80 + Top = 71 + Width = 150 + Height = 17 + Caption = '30%' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [fsBold] + ParentFont = False + Position = 30 + OnProgressChange = SpTBXProgressBar1ProgressChange + end + object SpTBXTrackBar1: TSpTBXTrackBar + Left = 72 + Top = 147 + Width = 150 + Height = 45 + TabOrder = 9 + end + object trackTickmarks: TSpTBXRadioGroup + Left = 13 + Top = 194 + Width = 241 + Height = 49 + Caption = 'Tickmarks' + Anchors = [akLeft, akTop, akRight] + TabOrder = 10 + TabStop = True + OnClick = TrackbarTickMarksRadioClick + Columns = 4 + ItemIndex = 0 + Items.Strings = ( + 'Bottom' + 'Top' + 'Both' + 'Center') + end + end + end + end + object SpTBXDockablePanel2: TSpTBXDockablePanel + Left = 0 + Top = 303 + Width = 273 + Height = 154 + Caption = 'Skins Options' + DockPos = 303 + TabOrder = 1 + DesignSize = ( + 269 + 150) + object rgSkinType: TSpTBXRadioGroup + Left = 8 + Top = 32 + Width = 252 + Height = 105 + Caption = 'Skin Type' + Anchors = [akLeft, akTop, akRight] + TabOrder = 1 + TabStop = True + OnClick = rgSkinTypeClick + ItemIndex = 2 + Items.Strings = ( + '&None' + '&Windows' + '&Skins') + end + object skinButton: TSpTBXSpeedButton + Left = 70 + Top = 111 + Width = 86 + Height = 18 + Caption = 'Load Skin ...' + OnClick = skinButtonClick + end + end + end + object SpTBXDock1: TSpTBXDock + Left = 0 + Top = 0 + Width = 716 + Height = 72 + object SpTBXToolbar1: TSpTBXToolbar + Left = 0 + Top = 0 + ShrinkMode = tbsmNone + Stretch = True + TabOrder = 0 + Caption = 'SpTBXToolbar1' + object SpTBXLabelItem4: TSpTBXLabelItem + Caption = 'Options:' + end + object subLang: TSpTBXSubmenuItem + Caption = 'Languages' + Options = [tboDropdownArrow] + end + object subSkins: TSpTBXSubmenuItem + Caption = 'Skins' + Options = [tboDropdownArrow] + object SpTBXSkinGroupItem1: TSpTBXSkinGroupItem + end + end + object subColor: TSpTBXSubmenuItem + Caption = 'Color' + Options = [tboDropdownArrow, tboToolbarStyle] + ToolBoxPopup = True + object SpTBXColorPalette1: TSpTBXColorPalette + end + object SpTBXSeparatorItem1: TSpTBXSeparatorItem + end + object SpTBXItem5: TSpTBXItem + Caption = 'More Colors...' + end + end + object SpTBXSeparatorItem8: TSpTBXSeparatorItem + end + object SpTBXItem2: TSpTBXItem + Caption = 'Options Panel' + Control = SpTBXDockablePanel1 + end + object SpTBXItem7: TSpTBXItem + Caption = 'TabControl' + Control = SpTBXTabControl1 + end + end + object SpTBXToolbar3: TSpTBXToolbar + Left = 0 + Top = 23 + DockPos = 0 + DockRow = 1 + ShrinkMode = tbsmNone + Stretch = True + TabOrder = 1 + Caption = 'SpTBXToolbar3' + DesignSize = ( + 706 + 22) + object SpTBXLabelItem3: TSpTBXLabelItem + Caption = '&Address:' + Control = SpTBXComboBox1 + end + object TBControlItem3: TTBControlItem + Control = SpTBXComboBox1 + end + object SpTBXSeparatorItem6: TSpTBXSeparatorItem + Blank = True + end + object SpTBXItem1: TSpTBXItem + Caption = 'Go' + DisplayMode = nbdmImageAndText + ImageIndex = 1 + Images = ImageList1 + end + object SpTBXComboBox1: TSpTBXComboBox + Left = 53 + Top = 0 + Width = 605 + Height = 21 + Anchors = [akLeft, akTop, akRight] + ItemHeight = 13 + TabOrder = 0 + Text = + 'The AccelChar (Alt+A) of the Address label will focus the ComboB' + + 'ox control' + end + end + object SpTBXToolbar2: TSpTBXToolbar + Left = 0 + Top = 49 + DockPos = 8 + DockRow = 2 + ShrinkMode = tbsmNone + Stretch = True + TabOrder = 2 + Caption = 'SpTBXToolbar2' + object SpTBXItem3: TSpTBXItem + Caption = 'Custom Sized Item (Width = 200)' + CustomWidth = 200 + end + object SpTBXSeparatorItem7: TSpTBXSeparatorItem + end + object SpTBXItem4: TSpTBXItem + Caption = 'Anchored Item' + Anchored = True + CustomWidth = 497 + end + end + end + object SpTBXMultiDock3: TSpTBXMultiDock + Left = 580 + Top = 72 + Width = 136 + Height = 457 + Position = dpxRight + object DP1: TSpTBXDockablePanel + Left = 0 + Top = 0 + Width = 136 + Height = 159 + Caption = 'Panel1' + DockPos = 0 + TabOrder = 0 + Images = ImageList1 + Options.Close = False + Options.Minimize = True + Options.Maximize = True + object SpTBXLabel1: TSpTBXLabel + Left = 8 + Top = 32 + Width = 0 + Height = 33 + Caption = 'Panel Properties:' + Wrapping = twWrap + Underline = True + UnderlineColor = clBlue + end + object SpTBXLabel8: TSpTBXLabel + Left = 8 + Top = 48 + Width = 58 + Height = 19 + Caption = '- Resizable' + end + object SpTBXLabel9: TSpTBXLabel + Left = 8 + Top = 64 + Width = 74 + Height = 19 + Caption = '- Can minimize' + end + object SpTBXLabel10: TSpTBXLabel + Left = 8 + Top = 80 + Width = 78 + Height = 19 + Caption = '- Can maximize' + end + end + object DP2: TSpTBXDockablePanel + Left = 0 + Top = 159 + Width = 136 + Height = 134 + Caption = 'Panel2' + DockPos = 159 + TabOrder = 1 + Images = ImageList1 + Options.ButtonBorders = False + Options.Close = False + Options.Minimize = True + Options.MinimizeImageIndex = 5 + Options.MaximizeImageIndex = 8 + Options.RestoreImageIndex = 6 + object SpTBXLabel11: TSpTBXLabel + Left = 8 + Top = 32 + Width = 0 + Height = 33 + Caption = 'Panel Properties:' + Wrapping = twWrap + Underline = True + UnderlineColor = clBlue + end + object SpTBXLabel12: TSpTBXLabel + Left = 8 + Top = 48 + Width = 58 + Height = 19 + Caption = '- Resizable' + end + object SpTBXLabel13: TSpTBXLabel + Left = 8 + Top = 64 + Width = 74 + Height = 19 + Caption = '- Can minimize' + end + end + object DP3: TSpTBXDockablePanel + Left = 0 + Top = 293 + Width = 136 + Height = 164 + Caption = 'Panel3' + DockPos = 293 + TabOrder = 2 + Images = ImageList1 + Options.ButtonBorders = False + Options.Close = False + Options.Minimize = True + Options.MinimizeImageIndex = 5 + Options.MaximizeImageIndex = 8 + Options.RestoreImageIndex = 6 + object SpTBXLabel15: TSpTBXLabel + Left = 8 + Top = 32 + Width = 0 + Height = 33 + Caption = 'Panel Properties:' + Wrapping = twWrap + Underline = True + UnderlineColor = clBlue + end + object SpTBXLabel16: TSpTBXLabel + Left = 8 + Top = 48 + Width = 58 + Height = 19 + Caption = '- Resizable' + end + object SpTBXLabel17: TSpTBXLabel + Left = 8 + Top = 64 + Width = 74 + Height = 19 + Caption = '- Can minimize' + end + end + end + object Panel1: TPanel + Left = 278 + Top = 72 + Width = 297 + Height = 457 + Align = alClient + BevelOuter = bvNone + TabOrder = 2 + object Image1: TImage + Left = 16 + Top = 248 + Width = 100 + Height = 72 + AutoSize = True + Picture.Data = { + 07544269746D617096540000424D965400000000000036000000280000006400 + 000048000000010018000000000060540000C40E0000C40E0000000000000000 + 0000CAE0DCCAE0DCC8DFDCC7DFDBC6DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDB + C5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DE + DBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5 + DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDB + C5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DE + DBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5 + DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDB + C5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DE + DBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5DEDBC5 + DEDBC5DEDBC5DEDBC4DEDBC2DCD9CACFD0B0B4B5B3BABAE4EEEFE0EDEFDFECEF + DFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFEC + EFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDF + ECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEF + DFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFEC + EFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDF + ECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEF + DFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFEC + EFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDF + ECEFDFECEFDFECEFDFECEFDFECEFDFECEFDFECEFDEECEEDAE9EBC5C6C1C3C5C0 + C2C5C0C0C4C0BEC3BFBEC3BFBEC3BFBEC3BFBEC3BFBEC3BFBEC3BFBEC3BFBFC5 + C1DFE6E7DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DBE2E2DFE5E5DF + E5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5 + DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5 + E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DF + E5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5 + DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE5E5DFE6E7DDE4E5DFE6E8DFE6E8DFE6 + E8DFE6E8DFE6E8DFE6E8DFE6E8DFE6E8DFE6E8DFE6E8DFE6E8C1C6C3BEC3BFBE + C3BFBEC3BFBEC3BFBEC3BFBEC3BFBEC3BFBEC3BFBEC3BFBEC3BFBEC3BFBEC3BF + BACCC9B4CBC6B7B3A8B7B3A8B7B3A8B7B3A8B7B3A8B7B3A8B7B3A8B7B3A8B7B3 + A8B7B3A8B7B3A8B7B3A8BAB7ADFFFEFD92887F91877EA1968BA0968BCBBDB0B9 + ADA1A69B90968C82B2A69A9F948AAFA398A99E93FFEEDDFFEEDDFFEEDDFFEEDD + FFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEE + DDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFF + EEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDD + FFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFFA + F5FAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFBEBAB1B7B3A8B7B3A8B7B3A8B7B3A8B7B3A8B7B3A8B7B3A8B7B3A8 + B7B3A8B7B3A8B7B3A8B7B3A8BBCDC4B1CBC1B8B4A9B8B4A9B8B4A9B8B4A9B8B4 + A9B8B4A9B8B4A9B8B4A9B8B4A9B8B4A9B8B4A9B8B4A9BBB7ADFFFEFEFFFAF5FF + FAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5 + FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFA + F5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FFFAF5FF + FAF5FFFAF5FFFAF5FFFAF5F9F4EFEFEBE5EFEBE5EFEBE5EFEBE5EFEBE5EFEBE5 + EFEBE5EFEBE5EFEBE5EFEBE5EFEBE5EFEBE5EFEBE5EFEBE5EFEBE5EFEBE5EFEB + E5EFEBE5F8F4EFFFFAF5FFFDFCFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBEBBB1B8B4A9B8B4A9B8B4A9B8B4A9 + B8B4A9B8B4A9B8B4A9B8B4A9B8B4A9B8B4A9B8B4A9B8B4A9E1E6E4EFF3F3B9B5 + AAB9B5AAB9B5AAB9B5AAB9B5AAB9B5AAB9B5AAB9B5AAB9B5AAB9B5AAB9B5AAB9 + B5AABCB8AEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2F3F2EFF3F4EFF3F4 + EFF3F4EFF3F4EFF3F4EFF3F4EFF3F4EFF3F4EFF3F4EFF3F4EFF3F4EFF3F4EFF3 + F4EFF3F4EFF3F4EFF3F4EFF3F4EFF3F4EDEEEEFFFFFFFFFFFFFAFAFAFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFBCB2 + B9B5AAB9B5AAB9B5AAB9B5AAB9B5AAB9B5AAB9B5AAB9B5AAB9B5AAB9B5AAB9B5 + AAB9B5AAE6EAE9F7FAFABAB7ACBAB7ACBAB7ACBAB7ACBAB7ACBAB7ACBAB7ACBA + B7ACBAB7ACBAB7ACBAB7ACBAB7ACBDB9B0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFF2F3F2EEF3F4EAE8CBEBECDBCED2D3DBE0E1D6DBDCD6DBDCD1D6D7D3D7 + D8D4D8D9D6DADBD4D8D9ECF1F2EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4ECEEEEFF + FFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFC0BDB4BAB7ACBAB7ACBAB7ACBAB7ACBAB7ACBAB7ACBAB7 + ACBAB7ACBAB7ACBAB7ACBAB7ACBAB7ACE6EAE9F7FAFAB9B7ACB9B7ACB9B7ACB9 + B7ACB9B7ACB9B7ACB9B7ACB9B7ACB9B7ACB9B7ACB9B7ACB9B7ACBCBAB0FFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2F3F2EEF3F4C9B598E0D2BBC8CDCDC0C4 + C5C1C5C6C9CECEC4C8C9C2C6C6CED3D3CBCFD0CBCFD0EBF0F1EEF3F4EEF3F4EE + F3F4EEF3F4EEF3F4ECEEEEFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFBDB4B9B7ACB9B7ACB9B7 + ACB9B7ACB9B7ACB9B7ACB9B7ACB9B7ACB9B7ACB9B7ACB9B7ACB9B7ACE6EAEAF7 + FAFABAB8ADBAB8ADBAB8ADBAB8ADBAB8ADBAB8ADBAB8ADBAB8ADBAB8ADBAB8AD + BAB8ADBAB8ADBDBBB1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2F3F2EEF3 + F4EBEFF0ECF1F1EBF0F1EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4EE + F3F4EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4ECEEEEFFFFFFFFFFFFFAFAFA + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFC0BEB5BAB8ADBAB8ADBAB8ADBAB8ADBAB8ADBAB8ADBAB8ADBAB8ADBAB8ADBA + B8ADBAB8ADBAB8ADE6EAEAF7FAFABCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAF + BCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBEBCB2FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFF2F3F2EEF3F4EAEBEBE1E4E4ABAFB0AEB2B2B3B7B7B4B8B9B5 + B9BAA5A8A9B7BBBCBDC1C2EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4 + ECEEEEFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFC1BFB6BCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBC + BAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFE6EAEAF7FAFABCBAAFBCBAAF + BCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBEBD + B3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2F3F2EEF3F4E9EDEEEBEFF0EE + F3F4EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4EEF3F4 + EEF3F4EEF3F4EEF3F4EEF3F4ECEEEEFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC2C0B7BCBAAFBC + BAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAFBCBAAF + E6EBEAF7FAFABEBCB1BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1BEBC + B1BEBCB1BEBCB1BEBCB1C0BEB4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2 + F3F2EFF3F4E3E1DCDBDBD8CBCFD0CFD2D3C1C5C6C6CACBE5EAEAEFF3F4EEF3F4 + EEF3F4EFF3F4EEF3F4EFF3F4EEF3F4EFF3F4EFF3F4EFF3F4EDEEEEFFFFFFFFFF + FFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFC3C1B8BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1 + BEBCB1BEBCB1BEBCB1BEBCB1E7EBEAF7FAFABEBCB1BEBCB1BEBCB1BEBCB1BEBC + B1BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1C0BFB5FFFFFFF0F0F0D5 + D5D5D5D5D5D8D8D8CDCDCDD0D0D0E4E4E4D5D5D5EBEBEBD0D0D0C9C9C9D6D6D6 + D2D2D2D4D4D4E9E9E9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFF3F3F2F1F4F5E2E1DCE1E2DEDFE2E3DFE2E3E9EDED + DEE1E2EFF2F3F0F4F5F0F4F5F0F4F5F1F4F5F0F4F5F0F4F5F1F4F5F0F4F5F0F4 + F5F1F4F5EDEEEEFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC3C2B8BEBCB1BEBCB1BEBCB1BEBCB1 + BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1BEBCB1E7EBEAF7FAFAC0BE + B3C0BEB3C0BEB3C0BEB3C0BEB3C0BEB3C0BEB3C0BEB3C0BEB3C0BEB3C0BEB3C0 + BEB3C1C0B6FFFFFFFAFAFAE4E4E4D6D6D6E3E3E3D0D0D0DBDBDBE1E1E1E3E3E3 + E5E5E5D6D6D6D1D1D1DADADAE5E5E5EEEEEEF2F2F2FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3F3F2F3F6F6E7E5DF + E8E7E3EAEDEEE2E5E6E4E6E7F1F4F5F3F6F6F3F5F6F3F5F6F3F5F6F3F5F6F3F5 + F6F3F5F6F3F5F6F3F5F6F3F5F6F3F6F6EDEFEEFFFFFFFFFFFFFAFAFAFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC4C3B9 + C0BEB3C0BEB3C0BEB3C0BEB3C0BEB3C0BEB3C0BEB3C0BEB3C0BEB3C0BEB3C0BE + B3C0BEB3E7EBEAF7FAFAC1BFB4C1BFB4C1BFB4C1BFB4C1BFB4C1BFB4C1BFB4C1 + BFB4C1BFB4C1BFB4C1BFB4C1BFB4C3C1B7FFFFFFF3F3F3D7D7D7DDDDDDE3E3E3 + E0E0E0D9D9D9DADADAE5E5E5EFEFEFD8D8D8DEDEDEE2E2E2D7D7D7FDFDFDFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFF3F3F2F5F7F7BFCBB1CACCBECDCECFD7D8D9CFD0D0EDEEEFF5F7F7F5F7 + F7F5F7F7F5F7F7F5F7F7F5F7F7F5F7F7F5F7F7F5F7F7F5F7F7F5F7F7EDEFEEFF + FFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFC6C4BBC1BFB4C1BFB4C1BFB4C1BFB4C1BFB4C1BFB4C1BF + B4C1BFB4C1BFB4C1BFB4C1BFB4C1BFB4E7EBEBF7FAFAC2C0B5C2C0B5C2C0B5C2 + C0B5C2C0B5C2C0B5C2C0B5C2C0B5C2C0B5C2C0B5C2C0B5C2C0B5C4C2B8FFFFFF + F1F1F1CFCFCFCDCDCDBFBFBFCECECEDCDCDCCCCCCCC5C5C5C3C3C3CACACAD8D8 + D8D3D3D3C8C8C8C4C4C4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4F4F3F8F8F9F7F8F8F8F9F8F7F8F9F8F8 + F9F7F8F9F8F8F9F8F8F9F8F8F8F8F8F9F7F8F8F7F8F8F8F8F8F7F8F9F8F8F9F8 + F8F8F8F8F9F8F8F9EEEFEEFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7C5BCC2C0B5C2C0B5C2C0 + B5C2C0B5C2C0B5C2C0B5C2C0B5C2C0B5C2C0B5C2C0B5C2C0B5C2C0B5E7EBEBF7 + FAFAC3C1B7C3C1B7C3C1B7C3C1B7C3C1B7C3C1B7C3C1B7C3C1B7C3C1B7C3C1B7 + C3C1B7C3C1B7C4C3BAFEFEFEBFBFBFC7C7C7CFCFCFC5C5C5E8E8E8C7C7C7C7C7 + C7CDCDCDC5C5C5DCDCDCD3D3D3C2C2C2D8D8D8D7D7D7D5D5D5C4C4C4C9C9C9C1 + C1C1CACACAFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4F4F3FAF9 + FACACACAACACACA1A1A1DADADAFAF9FAFAFAFAFAFAFAFAFAFAFAF9FAFAFAFAFA + FAFAFAF9FAFAFAFAFAFAFAFAF9FAFAF9FAFAF9FAEEEFEEFFFFFFFFFFFFFAFAFA + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFC7C5BDC3C1B7C3C1B7C3C1B7C3C1B7C3C1B7C3C1B7C3C1B7C3C1B7C3C1B7C3 + C1B7C3C1B7C3C1B7E7EBEBF7FAFAC4C2B8C4C2B8C4C2B8C4C2B8C4C2B8C4C2B8 + C4C2B8C4C2B8C4C2B8C4C2B8C4C2B8C4C2B8C5C4BAFFFFFFF1F1F1E9E9E9D6D6 + D6DFDFDFDDDDDDD9D9D9D0D0D0E8E8E8D0D0D0D5D5D5DCDCDCD9D9D9E3E3E3EC + ECECD1D1D1F1F1F1CECECEDFDFDFCBCBCBF2F2F2E4E4E4DEDEDEECECECDBDBDB + DADADAD9D9D9E7E7E7D5D5D5E0E0E0E9E9E9E0E0E0DEDEDEE0E0E0FFFFFFFFFF + FFFFFFFFFFFFFFF4F4F3FCFBFAE9E7E8DCDADBDBDADAEEEDEDFCFBFAFCFBFBFC + FBFBFCFBFBFCFBFBFCFBFBFCFBFAFCFBFAFCFAFBFCFBFBFCFBFBFCFBFBFCFBFB + EEEFEEFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFC8C6BEC4C2B8C4C2B8C4C2B8C4C2B8C4C2B8C4 + C2B8C4C2B8C4C2B8C4C2B8C4C2B8C4C2B8C4C2B8E8ECEBF7FAFAC5C3B8C5C3B8 + C5C3B8C5C3B8C5C3B8C5C3B8C5C3B8C5C3B8C5C3B8C5C3B8C5C3B8C5C3B8C6C4 + BBFFFFFFFAFAFABFBFBFE1E1E1D4D4D4DCDCDCD7D7D7E7E7E7DADADAD7D7D7DA + DADADCDCDCECECECF2F2F2F7F7F7F1F1F1F5F5F5ECECECEFEFEFE4E4E4F4F4F4 + DADADAE7E7E7E9E9E9E7E7E7ECECECEEEEEEF6F6F6F2F2F2EAEAEAEDEDEDE6E6 + E6EAEAEAE0E0E0FFFFFFFFFFFFFFFFFFFFFFFFF5F4F3FDFBFBFDFBFBFDFBFBFD + FBFCFDFBFBFDFBFBFDFBFBFDFBFCFDFBFBFDFBFBFDFBFBFDFBFBFDFCFBFDFCFB + FDFBFBFDFBFBFDFBFBFDFBFBEEEFEFFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC9C7BEC5C3B8C5 + C3B8C5C3B8C5C3B8C5C3B8C5C3B8C5C3B8C5C3B8C5C3B8C5C3B8C5C3B8C5C3B8 + E8ECEBF7FAFAC6C4BAC6C4BAC6C4BAC6C4BAC6C4BAC6C4BAC6C4BAC6C4BAC6C4 + BAC6C4BAC6C4BAC6C4BAC7C5BCFFFFFFEEEEEEB8B8B8CBCBCBD0D0D0B8B8B8CE + CECEEAEAEADADADADBDBDBD9D9D9E4E4E4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5 + F4F3EDEBEBDBD9D9DEDCDCE8E6E6E1E5E4DBE4E4DAE4E4D8E3E4D7E3E3D6E3E3 + D5E2E3D4E2E3D3E2E3D2E1E3D1E1E2D0E1E2CFE0E2CEE0E2EAF2F3FFFFFFFFFF + FFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFCAC8BFC6C4BAC6C4BAC6C4BAC6C4BAC6C4BAC6C4BAC6C4BAC6C4BA + C6C4BAC6C4BAC6C4BAC6C4BAE8ECECF7FAFAC7C5BBC7C5BBC7C5BBC7C5BBC7C5 + BBC7C5BBC7C5BBC7C5BBC7C5BBC7C5BBC7C5BBC7C5BBC8C7BEFFFFFFBBBBBBCC + CCCCCACACAD8D8D8C4C4C4DCDCDCC9C9C9CDCDCDBCBCBCCACACACDCDCDDFDFDF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFEAEEF3BFCBDDB1BED0B5C2D3BDCADCDCE4EAEBF0F0 + E9F0F0E8EFF0E6EFF0E4EFEFE3EEEFE1EEEFE0EDEFDEECEFDCECEFDBEBEED9EB + EED7EAEEEEF6F8FFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCBC9C1C7C5BBC7C5BBC7C5BBC7C5BB + C7C5BBC7C5BBC7C5BBC7C5BBC7C5BBC7C5BBC7C5BBC7C5BBE8ECECF7FAFAC8C6 + BCC8C6BCC8C6BCC8C6BCC8C6BCC8C6BCC8C6BCC8C6BCC8C6BCC8C6BCC8C6BCC8 + C6BCC9C7BEFFFEFEE8E4DFE5E1DDECE8E3E9E4E0F2EDE8F0EBE6ECE8E3EDE8E4 + E6E2DEEDE9E4F3EEE9E9E5E0ECE8E3F0EBE6EFEAE6E7E3DEECE8E3E7E3DFEBE7 + E2EBE7E2EBE7E2F5F0EBF0EBE7EAE6E1E5E1DCE7E3DEEBE6E2F0ECE7EBE6E2EE + EAE5FFF9F3FFF9F3FFF9F3FFF9F3FFF9F3FFF9F3FFF9F3FBF6F2EDEDEEEDEDEE + EDEDEEEDEDEEF7F4F0FCF6F1FBF6F1FBF6F1FBF6F1FAF6F0FAF6F0FAF6F0FAF6 + F0F9F6F0F9F6F0F9F5F0F8F5F0F8F5F0FCF7F2FFF9F3FFFDFBFAFAFAFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCCCAC2 + C8C6BCC8C6BCC8C6BCC8C6BCC8C6BCC8C6BCC8C6BCC8C6BCC8C6BCC8C6BCC8C6 + BCC8C6BCE8ECECF7FAFAC9C7BDC9C7BDC9C7BDC9C7BDC9C7BDC9C7BDC9C7BDC9 + C7BDC9C7BDC9C7BDC9C7BDC9C7BDCAC8BFFFFEFDCDC0B2AA9F93B2A69AD3C5B7 + D3C5B7B6AA9EB2A69AB2A69AACA095C4B7AAD2C4B6BBAEA2BBAFA2B5A89CB5A9 + 9DABA094AEA296A0958ABEB1A4A79C91B6AA9ED9CBBCC8BBADB5A99DB5A99DBD + B0A3AFA398C7BAADA0958BD8CABBFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDD + FFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEE + DDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFFEEDDFF + EEDDFFFAF5FAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFCDCBC3C9C7BDC9C7BDC9C7BDC9C7BDC9C7BDC9C7BDC9C7 + BDC9C7BDC9C7BDC9C7BDC9C7BDC9C7BDE8ECECF7FAFACBC9BFCBC9BFCBC9BFCB + C9BFCBC9BFCBC9BFCBC9BFCBC9BFCBC9BFCBC9BFCBC9BFCBC9BFCBC9C1FFFEFE + FFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFE + FEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFF + FEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFE + FFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFDFDFCF9F9 + F9F8F9F8F8F9F8F8F9F9F8F9F9F8F9F9F8F9F9F9F9F9F8F9F9F8F9F9FAFBFAFF + FEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFAFAFAFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCECCC4CBC9BFCBC9BFCBC9 + BFCBC9BFCBC9BFCBC9BFCBC9BFCBC9BFCBC9BFCBC9BFCBC9BFCBC9BFE8EDECF7 + FAFACCCAC0CCCAC0CCCAC0CCCAC0CCCAC0CCCAC0CCCAC0CCCAC0CCCAC0CCCAC0 + CCCAC0CCCAC0CCCBC2FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFF9F9F9E9EAEAE4E5E5E4E5E5E4E5E5E4E5E5E4E5E5E4E5E5E4 + E5E5E4E5E5E4E5E5E1E3E4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAFAFA + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFCFCDC5CCCAC0CCCAC0CCCAC0CCCAC0CCCAC0CCCAC0CCCAC0CCCAC0CCCAC0CC + CAC0CCCAC0CCCAC0E9EDECF7FAFACDCBC1CDCBC1CDCBC1CDCBC1CDCBC1CDCBC1 + CDCBC1CDCBC1CDCBC1CDCBC1CDCBC1CDCBC1CDCBC2FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8F8F8F6F6F6F6F6F6F6F6F6BC + BCBCC4C4C4C9C9C9BBBBBBDEDEDEF6F6F6F6F6F6E4E5E5FFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFCFCEC5CDCBC1CDCBC1CDCBC1CDCBC1CDCBC1CD + CBC1CDCBC1CDCBC1CDCBC1CDCBC1CDCBC1CDCBC1E9EDEDF7FAFACECCC2CECCC2 + CECCC2CECCC2CECCC2CECCC2CECCC2CECCC2CECCC2CECCC2CECCC2CECCC2CECC + C4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8 + F8F8F6F6F6F6F6F6F6F6F6EDEDEDF3F3F3F6F6F6F6F6F6F3F3F3F6F6F6F6F6F6 + E5E5E6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0CFC6CECCC2CE + CCC2CECCC2CECCC2CECCC2CECCC2CECCC2CECCC2CECCC2CECCC2CECCC2CECCC2 + E9EDEDF7FAFACECDC3CECDC3CECDC3CECDC3CECDC3CECDC3CECDC3CECDC3CECD + C3CECDC3CECDC3CECDC3CECDC4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFF8F8F8F7F7F7F7F7F7F7F7F7C9C9C9C7C7C7C4C4C4 + E4E4E4F7F7F7F7F7F7F7F7F7E5E5E6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFD0CFC7CECDC3CECDC3CECDC3CECDC3CECDC3CECDC3CECDC3CECDC3 + CECDC3CECDC3CECDC3CECDC3E9EDEDF7FAFACFCEC4CFCEC4CFCEC4CFCEC4CFCE + C4CFCEC4CFCEC4CFCEC4CFCEC4CFCEC4CFCEC4CFCEC4CFCEC5FFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8F8F8F6F6F6F6F6F6 + F6F6F6E8E8E8F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6E6E6E6FFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD1D0C8CFCEC4CFCEC4CFCEC4CFCEC4 + CFCEC4CFCEC4CFCEC4CFCEC4CFCEC4CFCEC4CFCEC4CFCEC4E9EDEDF7FAFAD0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFF8F8F8F7F7F7F7F7F7F7F7F7D3D3D3CFCFCFE0E0E0F7F7F7F7F7F7F7F7 + F7F7F7F7E6E6E6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAFAFAFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD2D1C9 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5E9EDEDF7FAFAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8F8F8F6F6F6F6F6F6F6F6F6F6F6F6F6F6 + F6F2F2F2F6F6F6F6F6F6F6F6F6F6F6F6E7E6E6FFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFD2D1C9D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5E9EDEDF7FAFAD0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6FFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8F8F8F7F7 + F7F7F7F7F7F7F7E7E7E7EFEFEFD8D8D8F2F2F2F7F7F7F7F7F7F7F7F7E7E7E7FF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD2D1C9D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5E9EDEDF7 + FAFAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFF8F8F8F6F6F6F6F6F6F6F6F6DBDBDBDBDBDBDEDEDEECECECF6 + F6F6F6F6F6F6F6F6E8E7E7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAFAFA + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFD2D1C9D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5E9EDEDF7FAFAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8F8F8F7F7F7F7F7F7F7F7F7F1 + F1F1DBDBDBDEDEDEEEEEEEF7F7F7F7F7F7F7F7F7E8E7E7FFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFD2D1C9D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5E9EDEDF7FAFAD0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8 + F8F8F7F7F7F7F7F7F7F7F7B3B3B39C9C9CA6A6A6D4D4D4F7F7F7F7F7F7F7F7F7 + E9E7E7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD2D1C9D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + E9EDEDF7FAFAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFF8F8F8F6F6F6F6F6F6F6F6F6E4E4E4F4F4F4EBEBEB + EDEDEDF6F6F6F6F6F6F6F6F6E5E5E5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFD2D1C9D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5E9EDEDF7FAFAD0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6FFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8F8F8F7F7F7F7F7F7 + F7F7F7ABABABB8B8B8A4A4A4BDBDBDF7F7F7F7F7F7F7F7F7E9E8E8FFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD2D1C9D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5E9EDEDF7FAFAD0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC6FFFFFFF3F3F3C2C2C2CDCDCDD0D0D0CECECEC8C8C8E6E6E6CBCBCB + C4C4C4C2C2C2CECECECECECEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFF8F7F7F1DCA3F5E8B2E9C37DE8BF78E8BF78E8BF78E8BF78E8BF78E8BF + 78E9C483E0E0DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAFAFAFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD2D1C9 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5E9EDEDF7FAFAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6FFFFFFF0F0F0DCDCDCCDCDCDE1E1E1 + D0D0D0CDCDCDD9D9D9CFCFCFEEEEEECBCBCBD9D9D9E4E4E4FFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8F8F8E9C775EDD790E3A73AE8B967E8B5 + 5CE9B760E8B459E2A232E2A232E4A942E4E4E4FFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFD2D1C9D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5E9EDEDF7FAFAD0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6FFFFFF + F7F7F7DDDDDDD3D3D3DBDBDBE0E0E0D8D8D8E6E6E6D4D4D4E4E4E4D8D8D8EAEA + EAF7F7F7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8F8F8F0DA + B6F2E0C4EBCB94ECCD97EDD09DEDD09EEBCB93EACA90EACA90EBCD98E6E5C4FF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD2D1C9D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5C0D1CAB1 + CAC1D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC6FFFFFFF6F6F6CBCBCBE2E2E2D3D3D3DBDBDBD2D2D2E8E8 + E8CECECEDBDBDBE8E8E8FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4F4 + F4FEFEFEFFFFFFF8F8F8F7F7F7F7F7F7F7F7F7BBBBBBB8B8B8B6B6B6CDCDCDF7 + F7F7F7F7F7F7F7F7D2C39BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6F6F6 + F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9 + F9D2D1C8D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5B2C9BE94B7AAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6FFFFFFF1F1F1CFCFCFCDCD + CDBFBFBFCECECEDCDCDCBABABAD2D2D2DCDCDCCDCDCDD3D3D3FFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFF5F5F5BEBEBEFAFAFAFFFFFFF8F8F8F6F6F6F6F6F6F6F6F6EE + EEEEF6F6F6EAEAEAF2F2F2F6F6F6F6F6F6F6F6F6CECBC9FFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFEDEDECD3CEC3CDC7BAB8AF9BC9C2B4CCC7B9E1DFD9ECEB + EAECEBEAECEBEAECEBEAECEBEAD1D0C7D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5B1C9BE93B7AAD0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C6FFFFFFF1F1F1DADADACDCDCDC3C3C3CECECED8D8D8CCCCCCC8C8C8C7C7C7C1 + C1C1D8D8D8D3D3D3C8C8C8C7C7C7FAFAFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5F5F5E2E2E2FFFFFFFFFFFFF7 + F7F7F6F6F6F6F6F6F6F6F6C7C7C7B0B0B0BEBEBEE9E9E9F6F6F6F6F6F6F6F6F6 + ABC0BAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBEBEADFDED8E6E6E3E5E4 + E0E5E5E1E3E2DDE5E4E0E9E9E7E9E9E7E9E9E7E9E9E7E9E9E7D1D0C7D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + B1C9BE93B7AAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC6FFFFFFF3F3F3BDBDBDD6D6D6D0D0D0C7C7C7D6 + D6D6EBEBEBDEDEDEDADADAFFFFFFFFFFFFFFFFFFFFFFFFFBFBFBFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFF1F1F1F1F1F1F1F1F1F1F1F1E0E0E0E7E7E7E3E3E3 + F0F0F0F1F1F1F1F1F1F1F1F1B5C1BDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFEDECEBD2CEC3D1CCC1C8C2B4CFCABFCAC4B6D7D3CACFCABECBC5B8D0CCC0C6 + C0B1E6E6E2D1D0C7D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5B1C9BE93B7AAD0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6FFFFFFF8F8F8C1 + C1C1D6D6D6D4D4D4C4C4C4D9D9D9E0E0E0D0D0D0DADADAF3F3F3F4F4F4FFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8F8F8E3E3E3E7E7E7 + DADADAE0E0E0E6E6E6ECECECD6D6D6D1D1D1C9C9C9DFDFDFF6F6F6FFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFECECEBDBD8D0E4E3DFDDDBD3E6E5E1E2E1DBE2 + E0DBDEDCD5DCDAD2E4E3DEE3E2DDE8E8E5D1D0C7D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5B2C9BE94B7AAD0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC6FFFFFFEDEDEDB1B1B1C6C6C6CBCBCBB1B1B1CACACAEAEAEAD2D2D2 + CECECED5D5D5DDDDDDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFF6F6F6BEBEBEBEBEBEB1B1B1BDBDBDCBCBCBE4E4E4DBDBDBE0E0E0E5E5 + E5E1E1E1F5F5F5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBEBEAD5D1C8D0 + CBC1CDC8BCCAC4B6D1CDC3C8C2B4CBC5B8E8E7E5E9E9E8E9E9E8E9E9E8D1D0C7 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5B2C9BE94B7AAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6FFFEFED9D2CBD3CCC6D4CDC6D1CAC4 + CCC6C0D6CFC8ECE4DCD8D1CACAC4BED3CCC5CBC4BEE9E1D9D6CFC9D7D0C9D6CF + C8DED7CFDED6CFCBC5BFD0C9C3D8D1CADAD3CBFFF5EBFFF5EBFFF5EBFFF5EBFF + F5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EB + FFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5 + EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFFF5EBFF + F5EBFFFCF9EDECEBDAD7CFE2E0DAE0DED7D9D5CCE2E0DBE2E0DBD8D5CBEAEAE7 + EBEBE8EBEBE8EBEBE8D1D0C7D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5B2C9BE94B7AAD0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6FFFEFE + C8BEB4C9BFB5D5CABFD4C9BEC0B6ADCBC1B7D9CDC2DBD0C4C2B8AFCDC3B8CFC5 + BAD8CDC2CDC2B8D2C7BCD5CABFD9CEC3D5CABFC9BFB5D6CBC0D2C7BCD9CEC3FF + F1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3 + FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1 + E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FFF1E3FF + F1E3FFF1E3FFF1E3FFF1E3FFF1E3FFFBF7EBEBEAD8D5CDCFCABFD5D1C8D1CCC2 + D7D3CBCAC5B8E9E9E7E9E9E7E9E9E7E9E9E7E9E9E7D1D0C7D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5B2C9BE94 + B7AAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFECECEA + D9D6CDDDDBD4CFCABED1CDC1DDDAD3D0CBBFEAEAE7EAEAE7EAEAE7EAEAE7EAEA + E7D1D0C7D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5B2C9BE94B7AAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6EEEEEED7D7D7E2E2E2DEDE + DEDBDBDBE4E4E4DFDFDFE0E0E0E9E9E9DCDCDCD9D9D9E6E6E6DEDEDEDFDFDFD6 + D6D6DDDDDDD2D2D2CBCBCBEEEEEEE0E0E0F4F4F4DCDCDCEBEBEBDEDEDEDEDEDE + D4D4D4DBDBDBD7D7D7DFDFDFE0E0E0EAEAEAE8E8E8D3D3D3D8D8D8EAEAEADBDB + DBE3E3E3E4E4E4D8D8D8D9D9D9DEDEDEDADADADADADAD7D7D7DCDCDCD5D5D5E4 + E4E4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFECECEBDDDBD5D4D1C7D2CEC4D9D6CEEAEAE9EAEAE9EAEA + E9EAEAE9EAEAE9EAEAE9EAEAE9D1D0C7D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5B1C9BE93B7AAD0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C6EFEFEFEDEDEDDADADAE8E8E8EBEBEBEBEBEBF0F0F0F6F6F6F2F2F2F5F5F5E4 + E4E4EDEDEDEFEFEFF2F2F2F3F3F3E9E9E9F2F2F2EDEDEDE9E9E9ECECECE9E9E9 + E1E1E1EFEFEFEFEFEFECECECEDEDEDF0F0F0EEEEEEE7E7E7F1F1F1F1F1F1F2F2 + F2E7E7E7E7E7E7ECECECE7E7E7EDEDEDE8E8E8E2E2E2F3F3F3ECECECF2F2F2E1 + E1E1EDEDEDF0F0F0EBEBEBF2F2F2FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFECECEAD5D2C8D8D4CBD6D2 + C8DBD8D0EAE9E7EAE9E7EAE9E7EAE9E7EAE9E7EAE9E7EAE9E7D1D0C7D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + B1CABF93B8ABD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC6FAFAFAFAFAFAD5D5D5FAFAFAFAFAFAFAFAFAFA + FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA + FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA + FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA + FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA + FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA + FAF8F9F8F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9F9 + F9F9F9F9F9D2D1C8D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5B2CAC095B9ACD0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6D3D3D371717173 + 73739999999A9A9AA3A3A37979799D9D9D9595957979798686868787879A9A9A + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD2D1C9D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5B2C9BE94B7AAD0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC6AEAEAE6F6F6FADADADADADAD626262777777565656898989989898 + 8888889F9F9F737373B6B6B6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD2D1C9 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5B2C9BE94B7AAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9F9F9F8F8F8FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFD2D1C9D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5B1C9BE93B7AAD0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC6FEFEFE + E4E4E4E3E3E3E2E2E2F0F0F0F8F8F8EAEAEAE4E4E4E7E7E7E7E7E7EAEAEAE0E0 + E0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD2D1C9D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5B1C9BE93 + B7AAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5EBEAE7E7E7E4EBEAE7EBEAE7EBEAE7E8E8E5E5E5E1E9E9 + E6E2E2DFE8E7E4E7E7E4E7E7E4EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EB + EAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7 + EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEA + E7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EB + EAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7 + EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEAE7EBEA + E7D1D0C7D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5B1C9BE93B7AAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5B2C9BE94B7AAD0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5C5C4BAC6C5BBD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5CBCAC0C0BFB5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + B2C9BE94B7AAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5A5A49C7877719F9F97 + 91918A8E8D867D7D77B6B5AD7A79738F8F88888881908F88545450A3A29A6F6F + 69A7A69E898982888881888881888781AEADA5BDBDB36D6C678C8C859E9D9579 + 7872ADACA4797973A8A79F7776708E8D869998916E6E6899989145444193938C + 93928B8888818888818E8D867B7A748888818E8D86A7A69E8A8982D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5B2C9BE94B7AAD0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5A5A49C4F4F4B7776716565605454505A5A5661615C3A393764645F4241 + 3E7C7B7559585441403D71706B62625D5757533D3D3A4D4D49484844BEBDB4B1 + B0A775746E52514D5756524A4A465B5B5661605B5655514D4D4964645F4C4C48 + 73726C61605B5454504A49464545413A3A374645424646424A494653534F3F3F + 3C72716C8D8C85D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5B2C9BE94B7AAD0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5A09F9871716B9A9992919089676762C0BF + B6BCBBB2BAB9B0C3C2B9B8B7AEBAB9B0B0AFA6CAC9C0B1B0A8CBCAC08C8B84B6 + B5ACBEBEB474746EC2C1B7B8B7AE5D5C5875756FC8C7BEB5B4ABB9B8AFC5C4BB + C3C2B8B1B0A8908F88A6A59DB0AFA7C9C8BFB0AFA6C1C0B7B3B2AABCBBB2BAB9 + B0C3C2B8BABAB1BBBAB1BAB9B096958EA1A098D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5B2C9BE94B7AAD0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5B8CEC49FBFB3D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0 + CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5 + D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CF + C5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5D0CFC5BDCFC7AE + C8BED0D4CECDD1CCCED2CDCED2CDCDD2CDCDD1CCCED2CDCED2CDCDD1CCCDD2CD + CDD2CCCDD2CDCDD2CDCCD1CCCDD2CDCDD2CDCDD2CCCDD2CDC5CEC7C4CDC6C4CD + C6C4CDC6C4CDC6C4CDC6C4CDC6C4CDC6C4CDC6C4CDC6C4CDC6C4CDC6C4CDC6C4 + CDC6C4CDC6C4CDC6C4CDC6C4CDC6C4CDC6C4CDC6C4CDC6C4CDC6C4CDC6C4CDC6 + C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CD + C6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3 + CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6C3CDC6 + C2CDC6C2CDC6C2CDC6C2CDC6C2CDC6C2CDC6C2CDC6C2CDC6C9D1CCC8CFCAC9D1 + CCC9D1CCC9D1CCC2CDC6C2CDC6C2CDC6C2CDC6C2CDC6C2CDC6C2CDC6C2CDC6C2 + CDC6C2CDC6C2CDC6BACFCAB6CCC8DBE0E0C0C4C4E0E6E6E2E8E8D5DADAC0C4C4 + E2E9EAE1E5E6E4B39CE0B19EE1E8E8CDD1D1DAE1E2A7AFB0A4AEC0C5E0D080BD + 8DDCE7E8E4E3DDEDD3C6EFEFEFCDCDCDCFCFCFCECECECACACAD8D8D8C9C9C9B9 + B9B9CECECEC9C9C9D7D7D7C9C9C9CFCFCFCDCDCDC5C5C5C4C4C4C7C7C7CACACA + D0D0D0C8C8C8C5C5C5D2D2D2C2C2C2CFCFCFC1C1C1D4D4D4DADADACBCBCBF9F9 + F9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB1CA + C0A1C1B6CBDADDA9BDA9CAD2D2B0C0C3CCDFE2DAD0BDCDC8C1E2E2E2FFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD5E5E6E7E9E9D1D3D2 + E6EAE9E4E8E7E3E6E5CCCFCEE7ECEBE5E7E6F1D9CEE3BAAAEAEFEEE1E5E4E4E9 + E9CCAD9FC9C5C2DBE5E7C2DDD7D7E1E3E4E7E1EBDDD4EAEEEDE3E7E6EFF3F2E3 + E7E6E8ECEAE9EDECE9EDECE7EBEAEFF3F2E5EAE8F0F4F3EDF1F0E9EDECE7EBE9 + EFF3F1EDF1F0E7ECEAE6EAE8EFF4F2E8EDEBE1E6E4EEF2F0DDE1E0E5E9E7E8EC + EAF0F4F3E7ECEAE8EDEBF5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5 + F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8 + F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9 + F8F5F9F8F5F9F8F5F9F8BBD2C8ACC9BED3E4E7B7CEC3CCD8DAC4D6D8D5E8EBD7 + D4C2CBD4CFF5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8F5F9F8 + F5F9F8D2E4E4EBEEEDE9ECEBE9ECEBE9ECEBE9ECEBE8ECEBE8ECEBE8ECEBE8EC + EBE7ECEBE7ECEBE7ECEBE7ECEBE7ECEBE7EBEBE6EBEBE6EBEBE6EBEBE4EAE9E3 + EAE9E3E9E9E3E9E9E3E9E9E2E9E9E2E9E9E1E9E9E1E9E9CADEE2CADDE2E1E9E9 + DBE3E2D3D9D9DBE4E8D3DCE7DBE4E7E0E9E9DFE9E9DFE8E8DFE8E8DFE8E8DEE8 + E8DEE8E8DEE8E8DDE8E8DDE8E8DDE8E8DDE8E8DDE8E8DCE8E8DCE8E8DCE8E8DC + E7E8DBE7E8DBE7E8DBE7E8DBE7E8DAE7E8DAE7E8DAE7E8DAE7E8DAE7E8D9E7E8 + D9E7E8D9E7E8D9E7E8D8E7E8D8E6E8D8E7E8D8E6E8D8E6E8D7E6E8D7E6E8D7E6 + E8D7E6E8D7E6E8D6E6E8D6E6E8D6E6E7D5E6E7D5E6E7D5E6E8D5E6E8D7E7E9D7 + E7E9D6E7E9D6E6E9D6E6E9D3E5E7D3E5E7D3E5E7D3E5E7D2E5E7D2E5E7D2E4E7 + D2E4E7D1E4E7D1E4E7D1E4E7CFE3E6C7DBDFDFDEDDA8A7A6DCDBDAF4F4F29F9E + 9DBBBAB9F4F4F2B6B6B5B9B9B8DCDDDCF2F3F2A4A5A4E4E5E4DADBDAA9A9A9B3 + B4B3BBBCBBABACABC8C9C9F0F2F2C6C8C8B7B8B8BBBDBCEFF2F1B4B6B5A2A4A3 + D9DCDBBBDDE7B4C5C3DCE6E8AEC0C7C6BBB8DBDFF1A7B1F5D5DAEDECF1F1EBF1 + F1EBF0F0EBF0F1EAF0F1EAF0F1EAF0F0EAF0F0E9F0F0E9F0F0E8F0F0E8F0F0E8 + F0F0E7F0F0E7F0F0E7EFF0E6EFF0E6EFF0E6EFF0E6EFF0E5EFF0E5EFF0E4EFF0 + E4EEF0E4EFF0E4EEF0E3EEF0E3EEF0E3EEF0E2EEF0E2EEF0E2EEF0E2EEF0E1ED + F0E1EDF0E1EDF0E0EDEFE0EDEFE0EDEFE0EDEFDFEDEFDFEDEFDFECEFDEEDEFDE + ECEFDEECEFDDECEFDDECEFDCECEFDCECEFDCECEFDBECEFDBEBEFDBEBEFDAEBEF + DAEBEEDAEBEFDAEBEFDAEBEED9EBEED9EBEED8EBEED3DFE1C5C7D3CAD8DCF2F2 + F0EFEFEDF0F1EFF0F1EFF0F1EEEFF0EDF0F1EEF0F1EFEFF1EFEFF1EFEFF1EFEF + F1EFEFF0EFEEF0EEEEF0EFECEEEDEEF0EFECEFEDEDF0EEEDF0EEEDF0EEEDF0EE + EAEEECECEFEEEBEFEEEAEDECEBEFEEE4E9E8E0CDC3E9EDEDC7D7E0DBE1E1E9EF + EED6DCEFE9EFEEE9EEEEE9EEEDE8EEEEE8EEEEE8EEEEE7EEEDE7EEEDE7EEEDE6 + EEEDE6EDEDE6EDEDE6EDEDE5EDEDE5EDEDE5EDEDE4EDEDE4EDEDE4EDEDE4EDED + E3ECEDE3EDEDE3ECEDE3ECEDE2ECEDE2ECEDE2ECEDE2ECEDE1ECEDE1ECEDE1EC + ECE1EBECE1EBEDE0EBEDE0EBECE0EBECDFEBECDFEBECDFEBECDEEBECDEEBECDE + EBECDDEAECDDEAECDDEAECDDEAECDCEAECDCEAECDCEAECDCEAECDBEAECDBEAEC + DBEAECDAE9ECDAE9ECDAE9ECDAE9ECD9E9ECD9E9EBD9E9ECD8E9EBD8E9EBD8E8 + EBD1DDDED8E8EBCFDFE25884A0709CA398C0B696BCB38CB2AB94B9B292B6AF94 + BAB28EB8AE95BBB392B8B08BB2AB94B8B199BAB493B9B18AB2AA92BBB18DBDB0 + 97BBB393B8B18CB5AC95B9B292BBB18DB8AE91B7AF8FB7AF91B7AF8DBEB18EBF + B18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18E + BFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB1 + 8EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBF + B18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18E + BFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB1 + 8EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBFB18EBF + B18EBFB193BFB289B2A696BBAF87B0A386A6C56D8EB46D95A48EAB9AA4C9C09F + C4BB9CC4B99BC3B99CC4B99EC5BB9AC3B8A5C8BF9BC4B99BC3B8A0C5BB9EC5BA + 9DC5BA9AC3B89DC5BA91BEB1A2C7BE99C2B7A1C6BC9CC2B89FC7BC99BFB69CC4 + B99EC3BA9CC4B990BEB191BEB191BEB191BEB191BEB191BEB191BEB190BEB190 + BEB190BEB190BEB190BEB190BEB190BEB190BEB190BEB190BEB190BEB190BEB1 + 90BEB190BEB190BEB190BEB190BEB190BEB190BEB190BEB190BEB190BEB190BE + B190BEB190BEB190BEB190BEB190BEB190BEB190BEB190BEB190BEB190BDB190 + BDB190BDB190BDB190BDB190BDB190BDB190BDB190BDB190BDB190BDB190BDB1 + 90BDB190BDB190BDB190BDB190BDB190BDB190BDB190BDB190BDB190BDB190BD + B190BDB190BDB190BDB190BDB190BDB19EC6BA9FC4B8B0CEC5ADCCC3A8C1D980 + 9CC0} + Visible = False + end + object SpTBXTabControl1: TSpTBXTabControl + Left = 0 + Top = 0 + Width = 297 + Height = 457 + Align = alClient + ActiveTabIndex = -1 + Images = ImageList1 + HiddenItems = <> + object SpTBXRightAlignSpacerItem1: TSpTBXRightAlignSpacerItem + CustomWidth = 210 + end + object SpTBXSubmenuItem2: TSpTBXSubmenuItem + Options = [tboDropdownArrow] + LinkSubitems = subLang + end + object tabLeft: TSpTBXItem + Action = Action1 + ImageIndex = 3 + end + object tabRight: TSpTBXItem + Action = Action2 + ImageIndex = 4 + end + object tabClose: TSpTBXItem + ImageIndex = 2 + OnClick = tabCloseClick + end + end + end + object SpTBXStatusBar1: TSpTBXStatusBar + Left = 0 + Top = 529 + Width = 716 + Height = 26 + ParentShowHint = False + ShowHint = True + object TBControlItem2: TTBControlItem + Control = SpTBXProgressBar2 + end + object SpTBXSeparatorItem2: TSpTBXSeparatorItem + end + object hintLabel: TSpTBXLabelItem + Caption = 'Custom painted hint' + OnDrawHint = hintLabelDrawHint + end + object SpTBXSeparatorItem4: TSpTBXSeparatorItem + end + object SpTBXLabelItem6: TSpTBXLabelItem + Caption = 'C:\Mozilla' + ImageIndex = 0 + Images = ImageList1 + end + object SpTBXSeparatorItem3: TSpTBXSeparatorItem + end + object subLang2: TSpTBXSubmenuItem + Caption = 'Languages' + Options = [tboDropdownArrow] + LinkSubitems = subLang + end + object SpTBXSeparatorItem5: TSpTBXSeparatorItem + end + object SpTBXSpinEditItem1: TSpTBXSpinEditItem + end + object SpTBXProgressBar2: TSpTBXProgressBar + Left = 0 + Top = 1 + Width = 140 + Height = 19 + Caption = '30%' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [fsBold] + ParentFont = False + Position = 30 + end + end + object LangListBox: TSpTBXListBox + Left = 336 + Top = 424 + Width = 177 + Height = 81 + ItemHeight = 16 + Items.Strings = ( + 'English' + 'Espa'#241'ol' + #54620#44397#50612 + #26085#26412#35486 + #20013#22269#30340 + #1506#1489#1512#1497#1514 + #1593#1585#1576#1609 + #1056#1091#1089#1089#1082#1080#1081 + #917#955#955#951#957#953#954#940) + TabOrder = 5 + Visible = False + end + object ActionList1: TActionList + OnUpdate = ActionList1Update + Left = 376 + Top = 352 + object Action1: TAction + OnExecute = Action1Execute + end + object Action2: TAction + OnExecute = Action2Execute + end + end + object ImageList1: TImageList + Left = 408 + Top = 352 + Bitmap = { + 494C01010A000E00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 0000000000003600000028000000400000003000000001002000000000000030 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 + 0000B7CEC400C5DED600C3DAD100C5DBD200C4DAD100C2DAD200C7E2DA000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000B7CEC400BCD1C500C6D8CE00CBDBD300CBDBD300C6D8CE00BDD2C700B8D0 + C500000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF0084B58400107310001873 + 18001873180018731800187B1800187B1800107B1000107B1000087B0800087B + 0800007B0000007300007BB57B00FFFFFF00000000000000000000000000BFD5 + CA00C8D9CF00DDE7E100E7EEEA00EEF3F000EBF1EE00E0E9E400CCDBD300B7CD + C00000000000000000000000000000000000000000000000000000000000B8CE + C100D4E2DB00E9F1EE00F0F6F400F0F6F500EFF5F300EDF3F100E4EDE900D0DF + D700BACFC3000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF0010841000218C21002994 + 2900319431003194310029942900299C2900219C210018A5180018A5180010A5 + 100008A5080000940000006B0000FFFFFF000000000000000000BBD0C400DBE6 + E000F7F9F800FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FDFEFD00E7EE + EA00C2D4CA000000000000000000000000000000000000000000BACFC300E0EA + E500F7FAFA00F6F9F800F7FAFA00F7FAFA00F6F9F800F4F8F700F1F6F500EEF4 + F200D8E5DF00BBD0C50000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF00188C180029942900399C + 3900399C3900399C3900FFFFFF00A5D6A5004AA54A004AA54A004AA54A0029A5 + 290018A51800009C0000007B0000FFFFFF0000000000BCD1C600DDE7E100FDFE + FD00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00F1F5F300C3D5CB00000000000000000000000000B8CDC100E3ECE700FBFC + FC00FBFCFC00FBFCFC00FDFEFE001C674B00FDFEFE00FBFCFC00F8FBFA00F3F8 + F700EFF5F300D8E4DE00B9CFC300000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF0021942100399C390042A5 + 420042A5420042A54200FFFFFF00FFFFFF00A5D6A5004AA54A004AA54A0039A5 + 390021A5210008A50800087B0800FFFFFF00C2DAD200D1DFD800FBFCFC00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00ECF2EF00B9CEC20000000000BED5CB00D3E1D900FDFEFD00FEFF + FE00FEFFFE00FFFFFF001C674B001C674B001C674B00FFFFFF00FDFEFE00FAFC + FC00F4F8F700EDF3F100C9DAD100BBD6CC000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF0029942900429C42004AA5 + 4A0052A552004AA54A00FFFFFF00FFFFFF00FFFFFF00A5D6A5004AA54A0039A5 + 390021A5210010A5100008840800FFFFFF00BFD5C900EBF1EE00FFFFFF00FFFF + FF001C674B001C674B00FFFFFF00FFFFFF00FFFFFF001C674B001C674B00FFFF + FF00FEFFFE00FDFEFE00D1DFD700BED8CE00BCD1C600EEF3F000FFFFFF00FFFF + FF00FFFFFF001C674B001C674B00FFFFFF001C674B001C674B00FFFFFF00FDFE + FE00F9FBFB00F3F8F700DDE8E300BAD2C9000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF00319C31004AA54A0052A5 + 52004AA54A004AA54A00FFFFFF00FFFFFF00FFFFFF00FFFFFF00A5D6A50039A5 + 390021A5210018A5180010841000FFFFFF00C7D8CE00F9FBFA00FFFFFF00FFFF + FF00FFFFFF001C674B001C674B00FFFFFF001C674B001C674B00FFFFFF00FFFF + FF00FEFFFE00FBFCFC00E4EDE900BBD3CA00C4D6CC00FBFCFC00FFFFFF00FFFF + FF001C674B001C674B00FFFFFF00FFFFFF00FFFFFF001C674B001C674B00FEFF + FE00FBFCFC00F6F9F800E7EFEC00BCD3C8000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF00429C420052A552004AA5 + 4A004AA54A004AA54A00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00A5D6 + A500219C2100219C210018841800FFFFFF00CDDCD300FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF001C674B001C674B001C674B00FFFFFF00FFFFFF00FFFF + FF00FDFEFE00FAFCFC00EAF1EE00BCD2C900CCDBD300FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF001C674B00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FCFDFD00F9FBFB00EBF1EF00BED5CA000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF0042A5420052A5520052A5 + 52004AA54A004AA54A00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00A5D6 + A500219C2100219C2100217B2100FFFFFF00CCDBD300FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF001C674B00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FCFDFD00F9FBFB00EBF1EF00BED5CA00CDDCD300FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF001C674B001C674B001C674B00FFFFFF00FFFFFF00FFFF + FF00FDFEFE00FAFCFC00EAF1EE00BCD2C9000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF0052A552005AAD5A005AAD + 5A0052A552004AA54A00FFFFFF00FFFFFF00FFFFFF00FFFFFF00A5D6A5003194 + 31002994290029942900217B2100FFFFFF00C4D6CC00FBFCFC00FFFFFF00FFFF + FF001C674B001C674B00FFFFFF00FFFFFF00FFFFFF001C674B001C674B00FEFF + FE00FBFCFC00F6F9F800E7EFEC00BCD3C800C7D8CE00F9FBFA00FFFFFF00FFFF + FF00FFFFFF001C674B001C674B00FFFFFF001C674B001C674B00FFFFFF00FFFF + FF00FEFFFE00FBFCFC00E4EDE900BBD3CA000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF0052A552006BB56B006BB5 + 6B005AAD5A0052AD5200FFFFFF00FFFFFF00FFFFFF00A5D6A500399C39003194 + 31002994290029942900217B2100FFFFFF00BCD1C600EEF3F000FFFFFF00FFFF + FF00FFFFFF001C674B001C674B00FFFFFF001C674B001C674B00FFFFFF00FDFE + FE00F9FBFB00F3F8F700DDE8E300BAD2C900BFD5C900EBF1EE00FFFFFF00FFFF + FF001C674B001C674B00FFFFFF00FFFFFF00FFFFFF001C674B001C674B00FFFF + FF00FEFFFE00FDFEFE00D1DFD700BED8CE000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF005AAD5A007BBD7B0073BD + 730063AD63005AAD5A00FFFFFF00FFFFFF00A5D6A500429C4200429C4200399C + 39003194310031943100217B2100FFFFFF00BED5CB00D3E1D900FDFEFD00FEFF + FE00FEFFFE00FFFFFF001C674B001C674B001C674B00FFFFFF00FDFEFE00FAFC + FC00F4F8F700EDF3F100C9DAD100BBD6CC00C2DAD200D1DFD800FBFCFC00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00ECF2EF00B9CEC200000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF006BB56B008CC68C007BBD + 7B006BB56B0063B56300FFFFFF00A5D6A5005AAD5A0052A552004AA54A0042A5 + 4200399C390031943100217B2100FFFFFF0000000000B8CDC100E3ECE700FBFC + FC00FBFCFC00FBFCFC00FDFEFE001C674B00FDFEFE00FBFCFC00F8FBFA00F3F8 + F700EFF5F300D8E4DE00B9CFC3000000000000000000BCD1C600DDE7E100FDFE + FD00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00F1F5F300C3D5CB0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF0073BD73009CCE9C008CC6 + 8C007BBD7B0073BD73006BB56B0063B5630063AD63005AAD5A0052AD52004AA5 + 4A0042A542003194310018731800FFFFFF000000000000000000BACFC300E0EA + E500F7FAFA00F6F9F800F7FAFA00F7FAFA00F6F9F800F4F8F700F1F6F500EEF4 + F200D8E5DF00BBD0C50000000000000000000000000000000000BBD0C400DBE6 + E000F7F9F800FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FDFEFD00E7EE + EA00C2D4CA000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FFFFFF00B5DEB50073BD730063B5 + 63005AAD5A0052A5520052A552004AA54A004AA54A0042A54200429C4200399C + 390031943100218C21008CBD8C00FFFFFF00000000000000000000000000B8CE + C100D4E2DB00E9F1EE00F0F6F400F0F6F500EFF5F300EDF3F100E4EDE900D0DF + D700BACFC300000000000000000000000000000000000000000000000000BFD5 + CA00C8D9CF00DDE7E100E7EEEA00EEF3F000EBF1EE00E0E9E400CCDBD300B7CD + C000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 + 0000B7CEC400BCD1C500C6D8CE00CBDBD300CBDBD300C6D8CE00BDD2C700B8D0 + C500000000000000000000000000000000000000000000000000000000000000 + 0000B7CEC400C5DED600C3DAD100C5DBD200C4DAD100C2DAD200C7E2DA000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 + 0000B8BDBD000000870000007600110000006565650000000000000000000000 + 000000000000000000000000000000000000FFFFFF0084B58400107310001873 + 18001873180018731800187B1800187B1800107B1000107B1000087B0800087B + 0800007B0000007300007BB57B00FFFFFF00FFFFFF0052ADFF0018529400185A + 9C00185A9C00185A9C00185AA500185AA500185A9C00185A9C00185294001852 + 940018528C00184A84004AADFF00FFFFFF00FFFFFF0084B58400107310001873 + 18001873180018731800187B1800187B1800107B1000107B1000087B0800087B + 0800007B0000007300007BB57B00FFFFFF000000000000000000B8BDBD003232 + 32000000A9000000FF000000DD00000043005454540000000000000000000000 + 000000000000000000000000000000000000FFFFFF0010841000218C21002994 + 2900319431003194310029942900299C2900219C210018A5180018A5180010A5 + 100008A5080000940000006B0000FFFFFF00FFFFFF00185AA500186BBD001873 + CE001873CE001873CE001873CE001873CE001873CE001873CE001873CE00186B + C600186BBD00185AA500104A7B00FFFFFF00FFFFFF0010841000218C21002994 + 2900319431003194310029942900299C2900219C210018A5180018A5180010A5 + 100008A5080000940000006B0000FFFFFF000000000000000000767676000000 + 43000000FF000000FF0000008700003298002121210000000000000000000000 + 000000000000000000000000000000000000FFFFFF00188C180029942900399C + 3900399C3900399C390039A53900A5D6A500FFFFFF0021AD210018AD180010B5 + 100008AD0800009C0000007B0000FFFFFF00FFFFFF001863AD001873CE00187B + DE00187BDE00187BE7001884E700188CF700188CF700188CF700188CF700187B + DE00186BC6001863AD0018528C00FFFFFF00FFFFFF00188C180029942900399C + 3900399C3900399C390039A539004AA54A00A5D6A500FFFFFF004AA54A0031A5 + 310018A51800009C0000007B0000FFFFFF000000000088898900B8BDBE000000 + 4300000087000000EE000000FF000000CC000000320076767600000000000000 + 000000000000000000000000000000000000FFFFFF0021942100399C390042A5 + 42004AA54A0042A5420042A54200FFFFFF00FFFFFF00FFFFFF0021B5210018B5 + 180010AD100008A50800087B0800FFFFFF00FFFFFF00186BC600187BDE001884 + EF00FFFFFF0084C6FF00188CF700188CF700188CF700188CF70084C6FF00FFFF + FF001873CE00186BBD0018529400FFFFFF00FFFFFF0021942100399C390042A5 + 420042A5420042A542004AA54A00A5D6A500FFFFFF00FFFFFF004AA54A0039A5 + 390021A5210008A50800087B0800FFFFFF000000000000000000001100000000 + A9000000FF000000FF000000FF000000DD001111110000002100545454007676 + 76003200980000323200A0A2A20000000000FFFFFF0029942900429C42004AA5 + 4A0052A552004AA54A0042A5420042AD4200FFFFFF00FFFFFF00FFFFFF0018B5 + 180010AD100010A5100008840800FFFFFF00FFFFFF001873CE001884E700188C + F700188CFF00FFFFFF0084C6FF00188CF700188CF70084C6FF00FFFFFF001884 + E7001873D600186BC600185A9C00FFFFFF00FFFFFF0029942900429C42004AA5 + 4A0052A552004AA54A00A5D6A500FFFFFF00FFFFFF00FFFFFF004AA54A0039A5 + 390021A5210010A5100008840800FFFFFF0000000000B9BEBF00110000000000 + 87000000FF000000CC000000EE0000008700000087000000FF000000BA000000 + 870000006500767676000021000065656500FFFFFF00319C31004AA54A0052A5 + 520052A552004AA54A004AA54A0042A5420039AD3900FFFFFF00FFFFFF00FFFF + FF0018AD180018A5180010841000FFFFFF00FFFFFF00187BDE00188CF700188C + FF00188CF700188CF700FFFFFF0084C6FF0084C6FF00FFFFFF00188CF7001884 + E7001873D6001873CE00185AA500FFFFFF00FFFFFF00319C31004AA54A0052A5 + 52004AA54A00A5D6A500FFFFFF00FFFFFF00FFFFFF00FFFFFF004AA54A0039A5 + 390021A5210018A5180010841000FFFFFF000000000021212100000021000000 + A9000000FF0000004300000087000000FF000000FF0000007600000043000000 + 430076767600323265000000A90000006500FFFFFF00429C420052A55200FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00219C210018841800FFFFFF00FFFFFF001884E700188CFF00188C + F700188CF700188CF700188CF700FFFFFF0084C6FF00188CF7001884EF00187B + DE001873CE001873CE001863AD00FFFFFF00FFFFFF00429C420052A552004AA5 + 4A00A5D6A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0042A5420031A5 + 3100219C2100219C210018841800FFFFFF000000000088888800000098000000 + FF000000EE00000076000000EE000000FF000000EE0000003200110000005454 + 54000000EE000000FF000000DD0032326500FFFFFF0042A542005AAD5A00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00219C2100217B2100FFFFFF00FFFFFF001884EF00188CFF00188C + FF00188CF700188CF70084C6FF00FFFFFF00FFFFFF0084C6FF001884E7001873 + D6001873CE001873CE001863AD00FFFFFF00FFFFFF0042A5420052A5520052A5 + 5200A5D6A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00399C3900299C + 2900219C2100219C2100217B2100FFFFFF000000000011000000000043000032 + CC000000FF00000098000000FF000000FF000000EE00000076000000A9000000 + CC000000FF000000FF000000A90021212100FFFFFF0052A5520063AD630063AD + 63005AAD5A0052A552004AA54A00429C4200399C3900FFFFFF00FFFFFF00FFFF + FF00299C290029942900217B2100FFFFFF00FFFFFF00188CFF002194FF002194 + FF00188CFF0084C6FF00FFFFFF001884F7001884EF00FFFFFF0084C6FF001873 + CE001873CE001873CE001863AD00FFFFFF00FFFFFF0052A552005AAD5A005AAD + 5A0052A55200A5D6A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00399C39003194 + 31002994290029942900217B2100FFFFFF000000000088898900000000000000 + A9000000FF000000EE0000007600000054000032CC000000A9000000EE000000 + EE000000BA0000006500BABEBE0000000000FFFFFF0052A552006BB56B006BB5 + 6B005AAD5A0052A552004AA54A00429C4200FFFFFF00FFFFFF00FFFFFF002994 + 29002994290029942900217B2100FFFFFF00FFFFFF00188CFF0039A5FF0039A5 + FF0084C6FF00FFFFFF00188CFF00188CFF001884EF001884E700FFFFFF0084C6 + FF001873CE001873CE001863AD00FFFFFF00FFFFFF0052A552006BB56B006BB5 + 6B005AAD5A0052AD5200A5D6A500FFFFFF00FFFFFF00FFFFFF00399C39003194 + 31002994290029942900217B2100FFFFFF000000000000000000000000000000 + 54000000FF000000BA000032CC000000A900000076003200CC00545454002121 + 21000000A900000000000000000000000000FFFFFF005AAD5A007BBD7B0073BD + 730063AD63005AAD5A0052A55200FFFFFF00FFFFFF00FFFFFF00319C3100319C + 31003194310031943100217B2100FFFFFF00FFFFFF002194FF0052ADFF004AAD + FF00FFFFFF002194FF002194FF001894FF00188CF7001884EF001884E700FFFF + FF001873CE001873CE001863AD00FFFFFF00FFFFFF005AAD5A007BBD7B0073BD + 730063AD63005AAD5A005AAD5A00A5D6A500FFFFFF00FFFFFF00429C4200399C + 39003194310031943100217B2100FFFFFF0000000000A0A2A200000000000000 + 54000000A90000005400000076000032FF000000760000005400212121000000 + 110000000000000000000000000000000000FFFFFF006BB56B008CC68C007BBD + 7B006BB56B0063B5630063AD6300B5DEB500FFFFFF004AA54A004AA54A0042A5 + 4200399C390031943100217B2100FFFFFF00FFFFFF0039A5FF006BBDFF0052AD + FF0039A5FF00319CFF00299CFF00299CFF002194FF00188CFF001884F7001884 + EF00187BDE001873CE001863AD00FFFFFF00FFFFFF006BB56B008CC68C007BBD + 7B006BB56B0063B5630063AD630063AD6300A5D6A500FFFFFF004AA54A0042A5 + 4200399C390031943100217B2100FFFFFF000000000000000000000000003232 + 3200000043000000CC000000A9000000DD00000065000000430000004300BBBF + BF0000000000000000000000000000000000FFFFFF0073BD73009CCE9C008CC6 + 8C007BBD7B0073BD73006BB56B0063B5630063AD63005AAD5A0052AD52004AA5 + 4A0042A542003194310018731800FFFFFF00FFFFFF004AADFF0084C6FF006BBD + FF0052ADFF004AADFF0039A5FF00319CFF00299CFF002194FF001894FF00188C + F7001884EF001873CE00185A9C00FFFFFF00FFFFFF0073BD73009CCE9C008CC6 + 8C007BBD7B0073BD73006BB56B0063B5630063AD63005AAD5A0052AD52004AA5 + 4A0042A542003194310018731800FFFFFF000000000000000000000000000000 + 00008888880021212100000043003232320089898900BDC0C100000000000000 + 000000000000000000000000000000000000FFFFFF00B5DEB50073BD730063B5 + 63005AAD5A0052A5520052A552004AA54A004AA54A0042A54200429C4200399C + 390031943100218C21008CBD8C00FFFFFF00FFFFFF00ADDEFF004AADFF00319C + FF002194FF00188CFF00188CFF00188CF700188CF7001884EF001884E700187B + DE001873CE00186BBD0063B5FF00FFFFFF00FFFFFF00B5DEB50073BD730063B5 + 63005AAD5A0052A5520052A552004AA54A004AA54A0042A54200429C4200399C + 390031943100218C21008CBD8C00FFFFFF000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF0000000000424D3E000000000000003E000000 + 2800000040000000300000000100010000000000800100000000000000000000 + 000000000000000000000000FFFFFF00FFFFFFFF00000000FFFFFFFF00000000 + FFFFFFFF00000000F00FF03F00000000F7EFF7BF00000000F7EFF7BF00000000 + F7EFF78F00000000F7EFF02F00000000F7EFF02F00000000F00FFDEF00000000 + F00FFC0F00000000FFFFFC0F00000000FFFFFFFF00000000FFFFFFFF00000000 + FFFFFFFF00000000FFFFFFFF000000008001F01FF00FFFFF0000E00FE007FFFF + 0000C007C003FFFF000080038001FFFF000000010000F81F000000000000F81F + 000000000000FFFF000000000000FFFF000000000000FFFF000000000000FFFF + 000000000000FFFF000000000001FFFF000080018003FFFF0000C003C007FFFF + 0000E007E00FFFFF8001F00FF01FFFFFFFFF800180018001F07F000000000000 + C07F000000000000C07F000000000000003F0000000000008001000000000000 + 0000000000000000800000000000000000000000000000008000000000000000 + 00010000000000008007000000000000800F000000000000E00F000000000000 + F03F000000000000FFFF80018001800100000000000000000000000000000000 + 000000000000} + end + object Timer1: TTimer + Enabled = False + Interval = 50 + OnTimer = Timer1Timer + Left = 344 + Top = 384 + end + object OpenDialog1: TOpenDialog + Filter = 'Skin files|*.skn' + Left = 344 + Top = 352 + end +end diff --git a/internal/2.4.4/1/Demos/Overview/Unit1.pas b/internal/2.4.4/1/Demos/Overview/Unit1.pas new file mode 100644 index 0000000..1dcf388 --- /dev/null +++ b/internal/2.4.4/1/Demos/Overview/Unit1.pas @@ -0,0 +1,431 @@ +unit Unit1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, ExtCtrls, StdCtrls, ActnList, ImgList, ExtDlgs, ComCtrls, + // TB2K + TB2Item, TB2Toolbar, TB2Dock, TB2ExtItems, + // SpTBXLib + SpTBXSkins, SpTBXItem, SpTBXDkPanels, SpTBXTabs, SpTBXEditors, SpTBXControls, + SpTBXExtEditors; + +type + TForm1 = class(TForm) + SpTBXDock1: TSpTBXDock; + SpTBXMultiDock1: TSpTBXMultiDock; + SpTBXMultiDock3: TSpTBXMultiDock; + SpTBXDockablePanel1: TSpTBXDockablePanel; + SpTBXToolbar1: TSpTBXToolbar; + Panel1: TPanel; + SpTBXTabControl1: TSpTBXTabControl; + SpTBXRightAlignSpacerItem1: TSpTBXRightAlignSpacerItem; + tabClose: TSpTBXItem; + SpTBXSubmenuItem1: TSpTBXSubmenuItem; + SpTBXSubmenuItem2: TSpTBXSubmenuItem; + SpTBXItem2: TSpTBXItem; + tabRight: TSpTBXItem; + tabLeft: TSpTBXItem; + SpTBXToolbar3: TSpTBXToolbar; + SpTBXLabelItem3: TSpTBXLabelItem; + SpTBXItem7: TSpTBXItem; + subColor: TSpTBXSubmenuItem; + SpTBXLabelItem4: TSpTBXLabelItem; + subLang: TSpTBXSubmenuItem; + subSkins: TSpTBXSubmenuItem; + SpTBXSkinGroupItem1: TSpTBXSkinGroupItem; + SpTBXTabControl2: TSpTBXTabControl; + SpTBXTabItem1: TSpTBXTabItem; + SpTBXTabSheet1: TSpTBXTabSheet; + ActionList1: TActionList; + Action1: TAction; + Action2: TAction; + SpTBXButton1: TSpTBXButton; + SpTBXStatusBar1: TSpTBXStatusBar; + SpTBXSeparatorItem2: TSpTBXSeparatorItem; + hintLabel: TSpTBXLabelItem; + SpTBXSeparatorItem3: TSpTBXSeparatorItem; + ImageList1: TImageList; + SpTBXLabelItem6: TSpTBXLabelItem; + SpTBXSeparatorItem4: TSpTBXSeparatorItem; + subLang2: TSpTBXSubmenuItem; + Image1: TImage; + SpTBXSeparatorItem5: TSpTBXSeparatorItem; + SpTBXSeparatorItem8: TSpTBXSeparatorItem; + SpTBXTabItem3: TSpTBXTabItem; + SpTBXTabSheet3: TSpTBXTabSheet; + SpTBXGroupBox5: TSpTBXGroupBox; + SpTBXLabel2: TSpTBXLabel; + SpTBXLabel3: TSpTBXLabel; + SpTBXLabel4: TSpTBXLabel; + SpTBXLabel7: TSpTBXLabel; + SpTBXLabel5: TSpTBXLabel; + SpTBXToolbar2: TSpTBXToolbar; + SpTBXItem1: TSpTBXItem; + SpTBXSeparatorItem6: TSpTBXSeparatorItem; + SpTBXItem3: TSpTBXItem; + SpTBXItem4: TSpTBXItem; + SpTBXSeparatorItem7: TSpTBXSeparatorItem; + SpTBXLabel6: TSpTBXLabel; + DP1: TSpTBXDockablePanel; + DP2: TSpTBXDockablePanel; + DP3: TSpTBXDockablePanel; + SpTBXLabel1: TSpTBXLabel; + SpTBXLabel8: TSpTBXLabel; + SpTBXLabel9: TSpTBXLabel; + SpTBXLabel10: TSpTBXLabel; + SpTBXLabel11: TSpTBXLabel; + SpTBXLabel12: TSpTBXLabel; + SpTBXLabel13: TSpTBXLabel; + SpTBXLabel15: TSpTBXLabel; + SpTBXLabel16: TSpTBXLabel; + SpTBXLabel17: TSpTBXLabel; + Timer1: TTimer; + SpTBXGroupBox6: TSpTBXGroupBox; + progressDec: TSpTBXButton; + progressInc: TSpTBXButton; + progressAnimate: TSpTBXButton; + SpTBXProgressBar1: TSpTBXProgressBar; + progressFiles: TSpTBXCheckBox; + SpTBXProgressBar2: TSpTBXProgressBar; + TBControlItem2: TTBControlItem; + SpTBXTrackBar1: TSpTBXTrackBar; + SpTBXComboBox1: TSpTBXComboBox; + TBControlItem3: TTBControlItem; + SpTBXPanel2: TSpTBXPanel; + Memo2: TMemo; + SpTBXSplitter1: TSpTBXSplitter; + SpTBXSplitter2: TSpTBXSplitter; + SpTBXTabItem6: TSpTBXTabItem; + SpTBXTabSheet6: TSpTBXTabSheet; + SpTBXButtonEdit1: TSpTBXButtonEdit; + SpTBXComboBox2: TSpTBXComboBox; + SpTBXEdit1: TSpTBXEdit; + SpTBXSpinEdit1: TSpTBXSpinEdit; + LangListBox: TSpTBXListBox; + rgSkinType: TSpTBXRadioGroup; + SpTBXGroupBox1: TSpTBXGroupBox; + SpTBXGroupBox2: TSpTBXGroupBox; + trackTickmarks: TSpTBXRadioGroup; + skinButton: TSpTBXSpeedButton; + SpTBXDockablePanel2: TSpTBXDockablePanel; + OpenDialog1: TOpenDialog; + SpTBXSeparatorItem1: TSpTBXSeparatorItem; + SpTBXColorPalette1: TSpTBXColorPalette; + SpTBXItem5: TSpTBXItem; + SpTBXSpinEditItem1: TSpTBXSpinEditItem; + Panel2: TPanel; + SpTBXSpeedButton1: TSpTBXSpeedButton; + SpTBXSpeedButton2: TSpTBXSpeedButton; + SpTBXSpeedButton3: TSpTBXSpeedButton; + SpTBXColorEdit1: TSpTBXColorEdit; + SpTBXFontComboBox1: TSpTBXFontComboBox; + procedure FormShow(Sender: TObject); + procedure tabCloseClick(Sender: TObject); + procedure ActionList1Update(Action: TBasicAction; + var Handled: Boolean); + procedure Action1Execute(Sender: TObject); + procedure Action2Execute(Sender: TObject); + procedure SpTBXTabControl2Resize(Sender: TObject); + procedure rgSkinTypeClick(Sender: TObject); + procedure hintLabelDrawHint(Sender: TObject; + AHintBitmap: TBitmap; var AHint: WideString; + var PaintDefault: Boolean); + procedure progressDecClick(Sender: TObject); + procedure progressIncClick(Sender: TObject); + procedure progressAnimateClick(Sender: TObject); + procedure Timer1Timer(Sender: TObject); + procedure SpTBXProgressBar1ProgressChange(Sender: TObject; + NewPosition: Integer); + procedure progressFilesClick(Sender: TObject); + procedure TrackbarTickMarksRadioClick(Sender: TObject); + procedure skinButtonClick(Sender: TObject); + procedure SpTBXSpeedButton1Draw(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); + private + { Private declarations } + procedure LangClick(Sender: TObject); + public + AppPath: String; + end; + +var + Form1: TForm1; + +implementation + +uses + Registry; + +{$R *.dfm} + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Utility functions } + +function SpGetWindowsDir: String; +var + Z: Cardinal; +begin + Z := GetWindowsDirectory(nil, 0); + if Z > 0 then begin + SetLength(Result, Z); + GetWindowsDirectory(PChar(Result), Z); + Result := IncludeTrailingPathDelimiter(Result); + end + else + Result := ''; +end; + +function SpGetWinAmpDir: String; +var + Registry: TRegistry; +begin + Registry := TRegistry.Create; + try + Registry.RootKey := HKEY_CURRENT_USER; + // False because we do not want to create it if it doesn't exist + Registry.OpenKey('\Software\Winamp', False); + Result := Registry.ReadString(''); + if Length(Result) > 0 then + Result := IncludeTrailingPathDelimiter(Result); + finally + Registry.Free; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Form } + +procedure TForm1.FormShow(Sender: TObject); +var + A: TSpTBXItem; + D: String; + I: Integer; +begin + // Set skin type to sknTBX + SkinManager.ChangeControlSkinType(Self, sknSkin); + + // Add the Languages to the Languages menu item and TabControl + for I := 0 to LangListBox.Items.Count - 1 do begin + A := TSpTBXItem.Create(nil); + try + A.Caption := LangListBox.Items[I]; + A.GroupIndex := 100; + A.AutoCheck := True; + A.Tag := I; + A.OnClick := LangClick; + subLang.Add(A); + with SpTBXTabControl1.Add(LangListBox.Items[I]) do + Tag := I; + except + A.Free; + end; + end; + + // Select the first Language + subLang.Items[0].Click; + SpTBXTabControl1.ActiveTabIndex := 0; + SpTBXTabControl2.ActiveTabIndex := 0; + + // Load default button Skin + AppPath := IncludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName)); + + // Initialize the link labels + D := SpGetWindowsDir; + if Length(D) > 0 then begin + SpTBXLabel4.LinkText := D; + SpTBXLabel5.LinkText := 'explorer.exe'; + SpTBXLabel5.LinkTextParams := '/e, ' + D; + end; + D := SpGetWinAmpDir; + if Length(D) > 0 then + SpTBXLabel6.LinkText := D + 'winamp.exe'; + if FileExists(AppPath + 'unit1.pas') then + SpTBXLabel7.LinkTextParams := '"' + AppPath + 'unit1.pas' + '"'; +end; + +procedure TForm1.LangClick(Sender: TObject); +var + A: TSpTBXItem; +begin + A := Sender as TSpTBXItem; + subLang.Caption := A.Caption; + subLang2.Caption := A.Caption; + SpTBXTabControl1.ActiveTabIndex := subLang.IndexOf(A); +end; + +procedure TForm1.tabCloseClick(Sender: TObject); +begin + SpTBXTabControl1.Visible := False; +end; + +procedure TForm1.ActionList1Update(Action: TBasicAction; var Handled: Boolean); +var + L, R: Boolean; +begin + SpTBXTabControl1.ScrollState(L, R); + Action1.Enabled := L; + Action2.Enabled := R; +end; + +procedure TForm1.Action1Execute(Sender: TObject); +begin + SpTBXTabControl1.ScrollLeft; +end; + +procedure TForm1.Action2Execute(Sender: TObject); +begin + SpTBXTabControl1.ScrollRight; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Options Panel } + +procedure TForm1.rgSkinTypeClick(Sender: TObject); +begin + SkinManager.ChangeControlSkinType(Self, TSpTBXSkinType(rgSkinType.ItemIndex)); +end; + +procedure TForm1.skinButtonClick(Sender: TObject); +var + S: string; + I: Integer; +begin + S := AppPath + 'Skins'; + if DirectoryExists(S) then + OpenDialog1.InitialDir := S; + + if OpenDialog1.Execute then + if FileExists(OpenDialog1.FileName) then begin + // Load the skin file and add it to the SkinList + I := SkinManager.SkinsList.AddSkinFromFile(OpenDialog1.FileName); + if I > -1 then begin + // Set the new skin + SkinManager.SetSkin(SkinManager.SkinsList[I]); + // Recreate the SkinGroupItem + SpTBXSkinGroupItem1.Recreate; + end; + end; +end; + +procedure TForm1.SpTBXTabControl2Resize(Sender: TObject); +begin + SpTBXButton1.Left := (SpTBXTabControl2.Width - SpTBXButton1.Width) div 2; + SpTBXProgressBar1.Left := (SpTBXTabControl2.Width - SpTBXProgressBar1.Width) div 2; + SpTBXTrackBar1.Left := (SpTBXTabControl2.Width - SpTBXTrackBar1.Width) div 2; +end; + +procedure TForm1.SpTBXSpeedButton1Draw(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +var + SB: TSpTBXSpeedButton; +begin + if PaintStage = pstPrePaint then begin + PaintDefault := False; + SB := TSpTBXSpeedButton(Sender); + SpDrawXPHeader(ACanvas, ARect, SB.MouseInControl, SB.Pushed, sknSkin); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ StatusBar } + +procedure TForm1.hintLabelDrawHint(Sender: TObject; + AHintBitmap: TBitmap; var AHint: WideString; var PaintDefault: Boolean); +var + R, GR, TR: TRect; + WS: WideString; +begin + PaintDefault := False; + AHintBitmap.Width := Image1.Picture.Bitmap.Width + 115; + AHintBitmap.Height := Image1.Picture.Bitmap.Height + 30; + with AHintBitmap.Canvas do begin + Brush.Color := clInfoBk; + Font.Color := clInfoText; + R := Rect(0, 0, AHintBitmap.Width, AHintBitmap.Height); + FillRect(R); + + GR := Bounds(5, 5, Image1.Picture.Bitmap.Width, Image1.Picture.Bitmap.Height); + Draw(GR.Left, GR.Top, Image1.Picture.Bitmap); + + WS := 'Language: ' + subLang.Caption + #13#10 + + 'Skin: ' + SkinManager.CurrentSkinName + #13#10 + + 'Time: ' + TimeToStr(Now); + TR := Rect(GR.Right + 5, 10, R.Right, R.Bottom); + SpDrawXPText(AHintBitmap.Canvas, WS, TR, DT_WORDBREAK); + + Font.Color := clBlue; + Font.Style := [fsUnderline]; + TR := Rect(GR.Left, GR.Bottom + 5, R.Right, R.Bottom); + WS := 'http://www.silverpointdevelopment.com'; + SpDrawXPText(AHintBitmap.Canvas, WS, TR, DT_WORDBREAK); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ ProgressBar } + +procedure TForm1.progressDecClick(Sender: TObject); +begin + SpTBXProgressBar1.StepIt(-10); + SpTBXProgressBar2.StepIt(-10); +end; + +procedure TForm1.progressIncClick(Sender: TObject); +begin + SpTBXProgressBar1.StepIt(10); + SpTBXProgressBar2.StepIt(10); +end; + +procedure TForm1.progressAnimateClick(Sender: TObject); +begin + SpTBXProgressBar1.Position := 0; + SpTBXProgressBar2.Position := 0; + Timer1.Enabled := True; +end; + +procedure TForm1.Timer1Timer(Sender: TObject); +begin + SpTBXProgressBar1.StepIt; + SpTBXProgressBar2.StepIt; + if SpTBXProgressBar1.Position >= SpTBXProgressBar1.Max then + Timer1.Enabled := False; +end; + +procedure TForm1.SpTBXProgressBar1ProgressChange(Sender: TObject; + NewPosition: Integer); +var + I: Integer; + WS: WideString; +begin + if progressFiles.Checked then begin + I := (NewPosition div 10) - 1; + if I < 0 then I := 0; + if I > LangListBox.Items.Count - 1 then I := LangListBox.Items.Count - 1; + WS := 'C:\Lang\' + LangListBox.Items[I] + '.txt'; + SpTBXProgressBar1.Caption := WS; + SpTBXProgressBar2.Caption := WS; + end; +end; + +procedure TForm1.ProgressFilesClick(Sender: TObject); +begin + if progressFiles.Checked then + SpTBXProgressBar1.CaptionType := pctDefault + else + SpTBXProgressBar1.CaptionType := pctPercentage; + SpTBXProgressBar2.CaptionType := SpTBXProgressBar1.CaptionType; + SpTBXProgressBar1ProgressChange(SpTBXProgressBar1, SpTBXProgressBar1.Position); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TrackBar } + +procedure TForm1.TrackbarTickMarksRadioClick(Sender: TObject); +begin + SpTBXTrackBar1.TickMarks := TSpTBXTickMark(trackTickmarks.ItemIndex); +end; + +end. diff --git a/internal/2.4.4/1/Demos/Overview/hint.bmp b/internal/2.4.4/1/Demos/Overview/hint.bmp new file mode 100644 index 0000000..3d32889 Binary files /dev/null and b/internal/2.4.4/1/Demos/Overview/hint.bmp differ diff --git a/internal/2.4.4/1/LICENSE.txt b/internal/2.4.4/1/LICENSE.txt new file mode 100644 index 0000000..79e0329 --- /dev/null +++ b/internal/2.4.4/1/LICENSE.txt @@ -0,0 +1,9 @@ +Use and/or distribution of the files requires compliance with the +SpTBXLib License, found in SpTBXLib-LICENSE.txt or at: + + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, at your option, the files may be used and/or distributed under +the terms of the Mozilla Public License Version 1.1, found in MPL-LICENSE.txt or at: + + http://www.mozilla.org/MPL \ No newline at end of file diff --git a/internal/2.4.4/1/Lib/D11/SpTBXColorPickerForm.dcu b/internal/2.4.4/1/Lib/D11/SpTBXColorPickerForm.dcu new file mode 100644 index 0000000..13e39c2 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXColorPickerForm.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXColorPickerForm.dfm b/internal/2.4.4/1/Lib/D11/SpTBXColorPickerForm.dfm new file mode 100644 index 0000000..5ca6585 --- /dev/null +++ b/internal/2.4.4/1/Lib/D11/SpTBXColorPickerForm.dfm @@ -0,0 +1,3025 @@ +object SpTBXColorPickerForm: TSpTBXColorPickerForm + Left = 156 + Top = 89 + ClientHeight = 193 + ClientWidth = 213 + Color = clBtnFace + Constraints.MinHeight = 211 + Constraints.MinWidth = 217 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [] + OldCreateOrder = False + Position = poDesigned + OnCreate = FormCreate + OnDestroy = FormDestroy + OnResize = FormResize + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object SpTBXTabControl1: TSpTBXTabControl + Left = 0 + Top = 26 + Width = 213 + Height = 167 + Align = alClient + ActiveTabIndex = 0 + Images = ImageList1 + OnActiveTabChange = SpTBXTabControl1ActiveTabChange + HiddenItems = <> + object SpTBXTabItem1: TSpTBXTabItem + Checked = True + ImageIndex = 2 + end + object SpTBXTabItem2: TSpTBXTabItem + ImageIndex = 3 + end + object SpTBXTabItem3: TSpTBXTabItem + ImageIndex = 4 + end + object SpTBXTabSheet2: TSpTBXTabSheet + Left = 0 + Top = 26 + Width = 213 + Height = 141 + ImageIndex = 3 + DesignSize = ( + 213 + 141) + TabItem = 'SpTBXTabItem2' + object SpTBXColorListBox1: TSpTBXColorListBox + Left = 5 + Top = 5 + Width = 200 + Height = 127 + Style = [clbsSystemColors, clbsIncludeNone, clbsIncludeDefault, clbsPrettyNames, clbsNoneAsTransparent] + Anchors = [akLeft, akTop, akRight, akBottom] + ItemHeight = 16 + TabOrder = 0 + OnClick = SpTBXColorListBox1Click + Selected = clActiveBorder + end + end + object SpTBXTabSheet3: TSpTBXTabSheet + Left = 0 + Top = 26 + Width = 213 + Height = 141 + ImageIndex = 4 + DesignSize = ( + 213 + 141) + TabItem = 'SpTBXTabItem3' + object imgColorPicker: TImage + Left = 2 + Top = 0 + Width = 207 + Height = 137 + Align = alClient + Visible = False + end + object btnColorPicker: TSpTBXSpeedButton + Left = 48 + Top = 58 + Width = 113 + Height = 22 + Caption = 'Click && Drag' + Anchors = [] + DragMode = dmAutomatic + OnEndDrag = btnColorPickerEndDrag + OnStartDrag = btnColorPickerStartDrag + end + end + object SpTBXTabSheet1: TSpTBXTabSheet + Left = 0 + Top = 26 + Width = 213 + Height = 141 + ImageIndex = 2 + TabItem = 'SpTBXTabItem1' + object imgPalette: TImage + Left = 5 + Top = 4 + Width = 200 + Height = 137 + Cursor = crHandPoint + AutoSize = True + Picture.Data = { + 07544269746D61704E410100424D4E410100000000003600000028000000C800 + 000089000000010018000000000018410100130B0000130B0000000000000000 + 0000010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101080942 + 080942080942080942080C42080F42081142081342071642071843071A43071C + 43071E43072043072243062444062644062844062A44062C45052D45052F4505 + 3145053345043446043646043846043946043946043946043946033B46033C46 + 033E47023F4702414702424701444702434602424403424203414003403E043F + 3C043F3A053E38053D36053C33063C31063B2E073A2C07392908382608382308 + 372009361C0935180A34140A340F0A33080B32010B31000B30000C30000C2F00 + 0C2F000C2F000C2E000D2E000D2D000D2C000D2C000F2C00112C00132C00152C + 00162C00182C001A2B001C2B001D2B001F2B00212B00232B00252B00262B0028 + 2B002A2B002C2B002D2B002F2B00312B00332A00342A00362A00372A00392A00 + 3A2A003C2A003D2A003F29004029004229004128004027003F26003F25003E24 + 003D22003C21003B20003A1F00391E00381C00371B0036190035180034160033 + 1500321300311100300F002F0E002E0B002D09002C07002C05002B03002A0100 + 29000228000427000527000726000825000A25000A25000D2500102500132500 + 1624001824001A24001D24001F23002123002323002523002722002922002B22 + 002D22002F21003121003221003421003621003720003920003A20003C20003E + 20003F1F00411F00421F00431F00451E00461D00461D00461C00451B00451A00 + 451A004519004518004518004517004416004415004414004414004413014412 + 02431102431103431004430F04430E05430E06430D06430C07420C07420B0842 + 0A08420A08420909420809420809420101010101010C0C5C0C0C5C0C0C5C0C0C + 5C0C115C0C155C0C195C0B1C5D0B1F5D0B225D0B255E0A285E0A2A5E092D5E09 + 305F09335F083660083860073B60073E61064061064362054562044862044A63 + 034C63024E63025164025164025164025164015364005564005765005965005B + 65005D66005F66005E64005D61005C5F005B5D015A5A02595703585504575205 + 564F06554C0854490953460A52420B513F0C4F3B0D4E370D4D340E4C300F4B2B + 104A2611492111471B1246131245091344001443001442001442001442001441 + 00154000153F00163E00163D00193D001B3D001E3D00203D00223D00243D0027 + 3E00293E002B3E002E3E00303E00333E00353E00373E003A3E003C3E003E3E00 + 413E00433E00453E00483E004A3E004C3E004E3E00503E00523E00543E00563E + 00593E005A3E005C3E005B3D005A3C00593A0058390057370056360055350054 + 3300523200513000502E004F2D004E2B004C29004B28004A2600482400472200 + 462000441E00431C00421A004118003F16003E14003D12003C0F003B0D023A0A + 0539080738050937020B37020B36021136021636011A36011E36002135002435 + 002735002A35002D34003034003234003634003833003B33003D330040320042 + 32004532004732004932004B31004E3100503100523100543100563100583000 + 5A30005C30005D2F005F2E005F2D005F2C005F2B005F2A005F29005E28005E26 + 005E25005E24005E23005E22005E21015E1F025D1E035D1D045D1C055D1B055D + 1A065D18075D17085D16095D15095C140A5C130A5C120B5C100B5C0F0B5C0E0C + 5C0D0C5C0C0C5C010101010101100E74100E74100E74100E74101475101A750F + 1F750F23760F27760E2B760E2F770D33770D36780C3A780B3D790A41790A447A + 09487A084B7B074F7B06527C04557D03587D025B7E015E7E00617F00647F0067 + 80006780006780006780006A80006C81006F8100718200748200778300798300 + 788000777D00757A00747700737400727100706D026F6A046E66066C63086B5F + 0A695B0C68570D67530F654E10644A116246136140145F3B155E35165C2F175B + 281859201958171956071A55001B54001B54001B54001C52001C51001D50001D + 4F001E4D00214D00244D00274E002A4E002C4E002F4E00324E00354E00384E00 + 3B4F003E4F00414F00444F00474F004A4F004D4F005050005350005650005950 + 005B50005E50006150006350006651006951006B51006E510071510073510075 + 5100745000734E00724C00704B006F49006D47006C46006B4400694200684000 + 663E00653C00633A006138006036005E34005D32005B3000592E00582B005629 + 005427005325005122005020004E1D004D1B004C19004A160349140648110A46 + 0E0D460E0D460D15460D1B460C20460B25450A2945092D450831450735440639 + 44053C44044043034343024743004A42004D4200504200534200564100594100 + 5C41005F41006140006440006640006940006C40006E4000704000733F00753E + 00773D00773B00773A0077390077370077360077340077330077310077300076 + 2F00762D00762B01762A02762803762704762505762406762207752108751F09 + 751D0A751C0A751A0B75190B75170C75160C75140D74130D74120E74100E7401 + 0101010101130E8B130E8B130E8B130E8B13178B131E8C12248C12298D112E8D + 11338E10388E0F3C8F0E418F0E45900D49910B4E910A5292085693075A93055E + 94036295026695006996006D97007197007498007899007B99007B99007B9900 + 7B99007E9A00829B00859B00889C008B9D008E9D00919E00909A008E97008D93 + 008B9000898C00888800868400858000837C038177068073097E6E0C7C6A0E7A + 6511795F13775A14755516744F1772491970431A6E3C1B6C341D6B2B1E69211F + 6712206600216400216400216400216200226100235F00245E00245C00285C00 + 2B5C002F5C00325C00365D00395D003D5D00405D00435D00475E004A5E004E5E + 00525E00555F00595F005C5F00605F006360006660006A60006D600070600074 + 61007761007A61007D61008061008361008762008962008C62008B6000895E00 + 885C00865A008459008357008155008053007E50007C4E007A4C00784A007748 + 007545007343007140006F3E006D3C006B3900693600673400653100632F0061 + 2C005F29005E27005C24005B2100591F00581C0556190A54160E54160E541518 + 54151F54142654132C53133153123653113B52103F520E43520D47510C4B510A + 5051085450065750055B50035F4F01634F00664F00694F006D4E00704E00734E + 00764E00794E007D4D00804D00824D00854D00884D008B4B008E4A008E48008E + 46008D45008D43008D41008D40008D3E008D3C008D3A008D39008D37008D3500 + 8D33018C31028C2F038C2E048C2C058C2A068C28078C26088C24098C220A8C20 + 0B8B1E0B8B1D0C8B1B0C8B190D8B170D8B150E8B130E8B010101010101160CA1 + 160CA1160CA1160CA11618A21521A21529A3142FA41335A4123BA51140A51046 + A60F4BA70E50A80D55A80B5AA9095FAA0664AB0468AC016DAD0072AD0076AE00 + 7AAF007FB00083B10087B2008BB2008FB3008FB3008FB3008FB30093B40097B5 + 009AB6009EB600A2B700A5B800A9B900A7B500A5B000A3AC00A2A800A0A4009E + 9F009C9A009A9600989100968C01948705928109907C0D8E76118C70138A6A16 + 886518865E1A84571C824F1E7F481F7D3F217B3522792A23771A247500257300 + 257300257300267100277000286E00296C002A6A002E6A00326A00366B003A6B + 003E6B00426B00466B004A6C004E6C00526C00566D005B6D005F6D00626E0067 + 6E006B6E006F6F00736F00776F007B6F007F70008270008670008A70008E7100 + 9171009571009871009C72009F7200A37200A170009F6E009D6C009C6A009A67 + 00986500966300946100925E00905C008E59008C5700895400875100854F0083 + 4C008049007E46007C4400794100773E00753B007338007135006E32006D2F00 + 6B2C0069290067260065230463200A621C0F621C0F611C1B611B24611A2C611A + 3360193960183E6016445F15495F144E5E13525E12575E105C5D0E615D0C655D + 0A695C076E5C05725C02765C007A5B007E5B00825B00855B00895A008C5A0090 + 5A00935A00975A009A5A009E5900A15700A45600A45400A45200A45000A44E00 + A44C00A34A00A34800A34600A34400A34200A34000A33E00A33C00A33900A337 + 00A33500A33301A33102A22E04A22C05A22A05A22807A22507A22308A22109A2 + 1F0AA21D0AA21B0BA2180CA2160CA10101010101011807B71807B71807B71807 + B71718B81723B9162DB91534BA143BBB1342BB1248BC114FBD0F54BE0D5ABF0B + 60BF0866C1056BC20271C20076C3007CC50081C60086C6008BC80090C90095CA + 0099CA009ECB00A2CC00A2CC00A2CC00A2CC00A7CD00ABCE00AFCF00B4D000B8 + D100BCD200C0D300BECE00BCC900BAC500B8C000B5BB00B3B600B1B000AFAB00 + ADA500AAA000A89A00A69404A38E0AA1870F9E80139C79169A7319976C1C9564 + 1E925B209053228E49248B3E2589322786222884002982002982002982002B80 + 002C7E002D7C002E79002F77003377003878003D78004178004679004A79004F + 7900547900587A005D7A00617A00667B006B7B006F7C00747C00797C007D7D00 + 827D00867E008B7E008F7E00937F00987F009C7F00A08000A48000A88000AC81 + 00B18100B48100B88100B67F00B47D00B27A00B07800AE7500AC7300A97000A7 + 6E00A56B00A26800A065009E62009B6000995D00965A009356009154008E5000 + 8C4D00894A008646008443008140007F3D007C39007A3600783300762F00742C + 0072290370250B6E21116E21116D211F6D20296D1F326C1E396C1D406C1C466B + 1B4C6B1A526B19586A175D6A16626A146869126D691072680D76680A7C680780 + 67048567018967008E67009266009666009A66009E6600A36600A66500AA6500 + AE6500B26500B66300B96100B95F00B95D00B95A00B95800B95600B95400B952 + 00B94F00B94D00B94B00B94800B94600B94300B94100B93F00B93C00B83A00B8 + 3700B83400B83200B82F00B82D01B82A02B82802B82503B82304B82005B81E05 + B81B06B81807B70101010101011900CD1900CD1900CD1900CD1817CE1825CE17 + 31CF1639D01541D11349D11250D21057D30E5ED40B64D5086AD60472D70178D9 + 007EDA0084DB008ADC0090DD0095DE009BE000A1E100A6E200ABE300B0E400B5 + E500B5E500B5E500B5E500BBE600BFE700C4E900C9EA00CEEB00D2EC00D7ED00 + D4E700D2E200CFDD00CDD700CAD200C8CC00C5C600C3C000C0B900BEB300BBAC + 00B8A600B69F03B3970BB09011AD8815AB8119A8791CA5701FA36722A05E249D + 53269A4728983A2A95292B93072D90002D90002D90002E8E002F8B0030890032 + 86003384003884003E84004385004885004D85005286005786005C8600618700 + 6687006B88007188007689007B8900808A00868A008B8B00908B00958B009A8C + 009F8C00A38D00A88D00AD8D00B28E00B68E00BB8F00BF8F00C48F00C89000CD + 9000CA8D00C88B00C68800C38500C18300BF8000BC7D00B97A00B77700B47400 + B27100AF6E00AC6A00A96700A66400A36000A15D009E5A009B5600985200954F + 00924B008F47008C4400894000873C008439008235008031007D2E047B2A0D79 + 251379251378252378242E78233877224077214777204E761F55761E5B761C61 + 751B6775196D75177374157974137E731083730D8973098E7204937201987200 + 9E7200A27100A77100AB7100B07100B57000B97000BD7000C17000C67000CA6D + 00CE6B00CE6900CE6700CE6400CE6200CE6000CE5D00CE5B00CE5800CE5600CE + 5300CE5000CE4E00CE4B00CE4800CE4600CE4300CE4000CE3D00CE3A00CE3700 + CE3400CD3100CD2E00CD2C00CD2900CD2600CD2300CD2000CD1D00CD1900CD01 + 01010101011A00E21A00E21A00E21A00E21916E31827E41734E5163EE51547E6 + 134FE71158E80F60E90C67EA086EEB0475EC007DEE0084EF008AF00091F20098 + F3009EF400A4F600AAF700B1F800B7FA00BCFB00C2FC00C7FD00C7FD00C7FD00 + C7FD00CEFF00D3FF00D8FF00DDFF00E3FF00E8FF00EDFF00EAFF00E7FA00E4F4 + 00E2EE00DFE800DCE100D9DB00D6D400D3CD00D1C600CEBE00CBB700C8AF00C5 + A704C29F0DBE9713BC8F18B9861CB67C20B27323AF6826AC5D28A9502AA6422C + A3302EA10F309E00309E00309E00319B003398003496003593003690003D9000 + 4391004991004E91005492005992005F93006593006A94007094007594007C95 + 008196008796008C97009397009898009D9800A39900A99900AE9A00B39A00B8 + 9B00BD9B00C39B00C89C00CD9C00D29D00D79D00DC9D00E09E00DE9B00DB9800 + D99500D69200D48F00D18C00CE8900CB8600C88300C57F00C27C00BF7800BC75 + 00B97100B66E00B26A00B06600AC6200A95F00A55A00A256009F53009C4F0099 + 4A00964600934200903E008D3A008B3600883206862E10832917832917832827 + 82283382273E82264681254E81245681225D80216480206B801E717F1C777F1A + 7E7F18847E158A7E12907E0E967D0A9C7D05A17D00A77C00AD7C00B27C00B77B + 00BC7B00C17B00C67B00CB7B00D07A00D47A00D97A00DE7700E27500E27300E2 + 7000E26E00E36B00E36900E36600E36300E36100E35E00E35B00E35800E35500 + E35200E34F00E34C00E34900E34600E34300E34000E33C00E23900E23600E233 + 00E22F00E22C00E22900E22500E22200E21E00E21A00E20101010101012A3DE5 + 2A3DE52A3DE52A3DE52B45E62B4CE72B54E82C5BE92C62EA2C68EB2C70EC2D76 + ED2D7CEE2D82EF2D88F02D8FF12D94F22D9AF32D9FF42DA5F52DAAF72CAFF82C + B5F92BBAFA2ABFFB2AC4FC29C9FD28CEFE28CEFE28CEFE28CEFE27D3FF26D8FF + 24DCFF23E1FF21E6FF1FEAFF1DEEFF21ECFF24EAFB27E7F629E5F12CE2EB2EE0 + E530DDE032DBDA34D8D436D6CE37D3C839D1C13ACEBB3CCCB43DC9AD3EC6A63F + C4A040C19942BF9143BC8944B98145B67845B36F46B16647AE5C48AB5049A944 + 49A94449A94449A6354AA41E4AA1004B9F004C9C00519D00569D005C9D00619E + 00669E006B9F00719F0076A0007BA00080A00085A1008BA10090A20095A2009A + A3009FA300A4A400A9A400ADA500B3A500B7A600BCA600C0A600C5A700CAA700 + CEA800D3A800D7A800DCA900E0A900E4A900E2A700DFA400DDA100DB9E00D89C + 00D69900D39600D19300CE9000CC8C00C98900C68600C48300C17F00BE7C00BB + 7800B87500B57200B26E00AF6A00AC660CA96318A65F1FA35B25A0572A9D532E + 9A4F32974B3595473892433A8F3F3C8D3B3E8D3B3E8D3B478D3B4E8C3B568C3B + 5D8C3B638C3B698C3B708C3B768C3B7B8C3B818B3B878B3B8D8B3B928B3B978B + 3B9C8B3BA18B3AA68B3AAB8B3AB08B3AB58B3ABA8A3ABE8A3AC38A39C78A39CC + 8A39D08A39D58A39D98A38DD8A38E18838E58538E58339E68139E67E39E67C3A + E6793AE6763AE6743AE6713BE66E3BE66B3BE6693BE6663BE6633BE6603CE65D + 3CE65A3CE6573CE6543CE6503CE64D3CE64A3CE6463CE6433CE6403CE63C3CE6 + 393CE6353CE6323CE52E3DE52A3DE5010101010101405FE9405FE9405FE9405F + E94164EA426AEB4370EC4476EC457BED4680EE4786EF488BF04990F14A95F24B + 9AF34C9FF44DA4F54DA9F64EADF74FB2F850B7F950BBF951BFFA51C4FB52C9FC + 52CDFD53D1FE53D5FF53D5FF53D5FF53D5FF54D9FF54DDFF54E1FF55E4FF55E9 + FF55EDFF56F0FF56EEFF57ECFC58EAF858E8F359E6EE59E4EA5AE2E55AE0E05B + DEDB5CDCD65CD9D05CD7CB5DD5C65DD3C05ED1BB5ECEB55ECCB05FCAAA5FC8A4 + 60C69E60C39760C19060BE8A61BC8261BA7B61B77461B56C61B56C61B56C62B3 + 6362B05A62AE5062AC4562A93967AA376CAA3671AB3476AB337AAB317FAC2F83 + AC2D88AD2B8DAD2991AD2796AE249BAE219FAF1DA3AF1AA8B016ADB010B1B109 + B5B100B9B100BEB200C2B200C5B200C9B300CDB300D1B400D5B400D9B400DCB5 + 00E1B500E4B500E8B600E6B300E4B000E2AE00E0AB00DEA900DBA600D9A308D7 + A015D59E1DD29B23D09829CE952DCB9231C98F35C68C39C4893CC2863EBF8341 + BD7F44BA7C46B77949B4754BB2724DAF6E4FAC6A51A96752A66354A45F55A15C + 579E58589C545999505B99505B99516199516699526D9952729953789A547D9A + 54829A55879A558C9A56919A57959A579B9A589F9A58A49A59A89A59AD9A5AB2 + 9A5AB69B5BBA9B5BBF9B5CC39B5CC79B5DCB9B5DCE9B5ED29B5ED69B5FDA9B5F + DD9B60E29B60E59961E99761E99561E99261E99061E98D61E98B61E98861E986 + 60E98360E98160E97E60E97B60E97960E97660E97360E97160E96E60E96B60E9 + 6860E96460E96160E95E5FE95B5FE9585FE9545FE9515FE94E5FE94A5FE9475F + E9435FE9405FE90101010101015A7DED5A7DED5A7DED5A7DED5C81EE5D86EF5F + 8BF0608FF06194F16398F2649CF365A0F466A4F468A8F569ACF66AB0F76BB4F7 + 6CB8F86DBCF96EBFFA6FC3FA70C6FB71CAFC72CEFD73D2FD74D5FE75D8FF76DC + FF76DCFF76DCFF76DCFF76DFFF77E2FF78E5FF79E9FF79ECFF7AF0FF7BF3FF7B + F1FF7BEFFD7BEEF97BECF57CEAF17CE8ED7CE7E97CE5E57CE3E17CE1DD7CE0D9 + 7CDED47CDCD07CDACC7CD8C77CD7C27CD5BF7CD3BA7CD1B57CCFB07CCEAB7CCC + A67CCAA17CC89C7CC6967CC4917CC28B7CC28B7CC28B7CC0857CBE7F7CBC787C + BA727CB86B80B86A84B96A89B9698CB96890BA6894BA6798BB679CBB66A0BB65 + A4BC64A7BC64ACBC63AFBD62B3BD62B6BD61BABE60BDBE5FC1BE5EC4BF5EC8BF + 5DCCC05CCFC05BD2C05AD5C059D9C159DCC158DFC157E2C256E6C255E9C254EC + C353EAC055E9BE56E7BC58E5B959E3B75BE1B45CDFB25DDEB05EDCAD60DAAA61 + D8A862D6A564D4A365D2A066D09D67CE9B68CC9869CA956AC7936BC5906CC38D + 6DC18A6DBE876EBC846FBA8170B77D71B57A72B27772B07473AE7074AB6D75A9 + 6975A96975A96A7AA96B7FA96C84A96D89AA6E8DAA6F91AA6F96AA709AAA719E + AB72A2AB73A6AB74AAAB74AEAB75B2AB76B6AC77B9AC77BDAC78C1AC79C4AC7A + C8AD7BCCAD7BCFAD7CD2AD7DD6AD7DD9AD7EDCAE7FE0AE7FE3AE80E6AE81EAAC + 81EDAA81EDA881EDA681EDA381EDA181ED9F81ED9C81ED9A80ED9880ED9580ED + 9380ED9080ED8E80ED8B80ED8980ED877FED847FED817FED7F7FED7C7FED797F + ED767EED737EED707EED6D7EED6A7EED677EED647DED617DED5E7DED5A7DED01 + 01010101017999F27999F27999F27999F27A9DF27BA0F37DA4F47EA7F47FABF5 + 81AEF582B1F683B4F784B7F785BAF886BDF888C1F989C4F98AC6FA8BC9FB8CCC + FB8DCFFC8ED2FC8FD5FD90D8FE91DBFE92DDFF93E0FF94E3FF94E3FF94E3FF94 + E3FF95E5FF96E8FF97EAFF97EDFF98F0FF99F3FF9AF5FF9AF4FF9AF3FD9AF1FA + 9AF0F79AEFF49AEDF19AECEE9AEAEB9AE9E799E8E499E6E199E5DD99E3DA99E2 + D699E0D399DFCF99DECC98DCC898DBC598D9C198D8BD98D6B998D5B598D3B197 + D2AD97D0A997CFA597CFA597CFA597CDA197CB9D96CA9896C89496C78F99C78F + 9CC78EA0C88EA4C88EA7C88DAAC98DADC98DB0C98CB3C98CB6CA8CB9CA8BBCCA + 8BBFCB8AC2CB8AC5CB8AC8CC89CACC89CDCC89D0CC88D3CD88D6CD87D9CD87DB + CD87DECE86E0CE86E3CE85E6CF85E8CF85EBCF84EECF84F0D083EFCE84EDCC84 + ECC985EAC785E9C586E7C386E6C187E4BF87E3BD87E1BB88E0B988DEB689DCB4 + 89DBB28AD9B08AD7AD8AD6AB8BD4A98BD2A68BD1A48CCFA28CCD9F8CCB9D8DC9 + 9A8DC7988DC6958EC4938EC2908EC08D8FBE8B8FBC888FBA8590BA8590BA8693 + BA8797BB889BBB899FBB8AA2BB8BA6BC8BA9BC8CACBC8DB0BC8EB3BC8FB6BD90 + BABD91BDBD91C0BD92C3BE93C6BE94C9BE95CCBE95CFBF96D2BF97D5BF98D8BF + 99DBBF99DDC09AE0C09BE3C09CE6C09CE8C09DEBC19EEEBF9EF1BD9EF1BB9EF1 + B99EF1B79EF1B59EF1B39EF1B19DF1AF9DF1AD9DF1AB9DF1A99DF1A69DF1A49C + F1A29CF1A09CF19E9CF19B9CF1999CF1979BF2949BF2929BF2909BF28D9BF28B + 9BF2889AF2869AF2839AF2819AF27E9AF27B9AF27999F20101010101019AB5F6 + 9AB5F69AB5F69AB5F69BB7F79CBAF79DBCF79EBEF89FC0F8A0C3F8A1C6F9A2C8 + F9A3CAFAA4CCFAA5CEFBA6D1FBA7D3FBA8D5FCA9D7FCAADAFDABDCFDACDEFDAD + E0FEAEE2FEAFE4FFAFE6FFB0E8FFB1EAFFB1EAFFB1EAFFB1EAFFB2ECFFB3EEFF + B4F0FFB5F2FFB6F4FFB6F6FFB7F8FFB7F7FFB7F6FEB7F5FCB7F4F9B6F3F7B6F2 + F5B6F1F2B6F0F0B6EFEDB6EEEBB6EDE9B5ECE6B5EBE4B5EAE1B5E8DEB5E7DCB5 + E6D9B4E5D7B4E4D4B4E3D1B4E2CFB4E1CCB3E0C9B3DFC7B3DEC4B3DDC1B3DBBE + B3DBBEB3DBBEB2DABBB2D9B8B2D8B5B2D7B2B2D6AFB4D6AFB6D6AFB8D6AFBBD7 + AFBDD7AEBFD7AEC2D7AEC4D8AEC7D8AEC9D8ADCBD8ADCDD8ADCFD9ADD1D9ADD3 + D9ACD6D9ACD8DAACDADAACDCDAABDEDAABE0DAABE2DBABE4DBABE6DBABE9DBAA + EBDCAAEDDCAAEFDCAAF1DCA9F2DCA9F4DDA9F3DBA9F2D9A9F1D8A9F0D6A9EFD4 + A9EED3AAECD1AAEBCFAAEACEAAE9CCAAE8CAAAE6C8AAE5C7AAE4C5AAE3C3AAE1 + C1AAE0C0AADFBEAADEBCABDCBAABDBB8ABDAB6ABD8B5ABD7B3ABD6B1ABD4AFAB + D3ADABD2ABABD0A9ABCFA7ABCDA5ABCCA3ABCCA3ABCCA4AECCA4B1CDA5B3CDA6 + B6CDA7B8CDA8BBCEA9BECEA9C0CEAAC3CEABC5CFACC8CFACCACFADCCCFAECFCF + AED1D0AFD4D0B0D6D0B1D8D0B1DBD0B2DDD1B3DFD1B4E1D1B4E3D1B5E5D2B6E8 + D2B7EAD2B7ECD2B8EED2B9F1D3B9F3D1BAF5CFBAF5CEB9F5CCB9F5CBB9F5C9B9 + F5C7B9F5C6B9F5C4B9F5C2B8F5C1B8F5BFB8F5BDB8F5BBB8F5BAB8F5B8B8F5B6 + B7F5B4B7F6B3B7F6B1B7F6AFB7F6ADB7F6ABB6F6A9B6F6A7B6F6A6B6F6A4B6F6 + A2B6F6A0B5F69EB5F69CB5F69AB5F6010101010101BBCFFABBCFFABBCFFABBCF + FABCD0FABDD2FABDD3FBBED5FBBFD6FBC0D8FBC1DAFCC1DBFCC2DDFCC3DEFCC4 + DFFCC4E1FDC5E2FDC6E3FDC6E5FEC7E6FEC8E8FEC8E9FEC9EAFFCAECFFCAEDFF + CBEEFFCCEFFFCCF1FFCCF1FFCCF1FFCCF1FFCDF3FFCEF4FFCFF5FFCFF7FFD0F8 + FFD1F9FFD1FAFFD1FAFFD1F9FED1F8FDD1F8FBD0F7FAD0F6F8D0F6F6D0F5F5D0 + F4F3D0F4F2D0F3F0CFF2EFCFF2EDCFF1EBCFF0EACFF0E8CFEFE6CFEEE5CEEDE3 + CEEDE1CEECE0CEEBDECEEBDCCEEADACDE9D9CDE8D7CDE8D5CDE8D5CDE8D5CDE7 + D3CDE6D2CDE6D0CCE5CECCE4CCCEE4CCCFE4CCD1E5CCD2E5CCD4E5CCD5E5CCD7 + E5CBD9E5CBDAE6CBDBE6CBDDE6CBDEE6CBE0E6CBE1E6CBE2E6CBE4E7CBE5E7CA + E6E7CAE8E7CAE9E7CAEAE7CAECE7CAEDE7CAEEE8CAF0E8CAF2E8C9F3E8C9F4E8 + C9F6E8C9F7E9C9F8E9C9F7E8C9F7E6C9F6E5C9F5E4C9F4E3C9F3E2C9F3E0C9F2 + DFC8F1DEC8F0DDC8F0DCC8EFDBC8EED9C8EDD8C8ECD7C8EBD6C8EBD4C8EAD3C8 + E9D2C8E8D1C8E7CFC8E6CEC8E6CDC8E5CCC8E4CAC7E3C9C7E2C8C7E1C6C7E0C5 + C7DFC4C7DFC3C7DEC1C7DEC1C7DEC2C9DEC2CADEC3CCDEC3CEDFC4CFDFC5D1DF + C5D3DFC6D5DFC7D7DFC7D8E0C8DAE0C8DBE0C9DDE0C9DEE0CAE0E0CAE2E1CBE3 + E1CCE5E1CCE6E1CDE8E1CDE9E1CEEBE2CEECE2CFEDE2D0F0E2D0F1E2D1F3E2D1 + F4E3D2F5E3D2F7E2D3F8E0D3F8DFD2F9DED2F9DDD2F9DCD2F9DBD2F9D9D2F9D8 + D2F9D7D2F9D6D1F9D5D1F9D3D1F9D2D1F9D1D1F9D0D1F9CFD1F9CDD1F9CCD1F9 + CBD0F9C9D0F9C8D0F9C7D0F9C6D0F9C4D0F9C3D0FAC2D0FAC0CFFABFCFFABECF + FABCCFFABBCFFA010101010101DDE8FDDDE8FDDDE8FDDDE8FDDDE8FDDEE9FDDE + EAFDDEEAFDDFEBFDDFECFDE0ECFEE0EDFEE0EEFEE1EEFEE1EFFEE2F0FEE2F0FE + E2F1FEE3F2FFE3F3FFE4F4FFE4F4FFE4F5FFE5F6FFE5F6FFE6F7FFE6F8FFE6F8 + FFE6F8FFE6F8FFE6F8FFE7F9FFE7FAFFE7FAFFE8FBFFE8FBFFE9FCFFE9FDFFE9 + FCFFE9FCFFE9FCFEE9FBFDE9FBFCE8FBFCE8FAFBE8FAFAE8FAF9E8F9F8E8F9F8 + E8F9F7E8F8F6E8F8F5E8F8F4E8F7F4E7F7F3E7F7F2E7F6F1E7F6F0E7F6F0E7F5 + EFE7F5EEE7F5EDE7F4ECE7F4ECE7F4EBE7F4EBE7F4EBE6F3EAE6F3E9E6F3E8E6 + F2E7E6F2E7E7F2E7E8F2E7E8F2E7E9F2E7EAF2E6EAF2E6EBF2E6ECF2E6ECF3E6 + EDF3E6EEF3E6EEF3E6EFF3E6F0F3E6F0F3E6F2F3E6F2F3E6F3F3E6F4F3E6F4F3 + E6F5F3E6F6F4E6F6F4E6F7F4E6F8F4E5F8F4E5F9F4E5FAF4E5FAF4E5FBF4E5FC + F4E5FBF4E5FBF3E5FBF2E5FAF2E5FAF1E5F9F0E5F9F0E5F8EFE5F8EFE5F8EEE5 + F7EDE5F7EDE4F6ECE4F6EBE4F6EBE4F5EAE4F5EAE4F4E9E4F4E8E4F4E8E4F3E7 + E4F3E6E4F2E6E4F2E5E4F2E4E4F1E4E4F1E3E3F0E3E3F0E2E3EFE1E3EFE1E3EF + E0E3EFE0E3EFE0E4EFE1E5EFE1E5EFE1E6EFE1E7EFE2E8EFE2E9EFE2E9EFE3EA + F0E3EBF0E3ECF0E4EDF0E4EDF0E4EEF0E5EFF0E5F0F0E5F1F0E6F2F0E6F3F1E6 + F3F1E7F4F1E7F5F1E7F6F1E8F7F1E8F7F1E8F8F1E8F9F1E9FAF1E9FAF1E9FBF1 + EAFCF0EAFCF0E9FCEFE9FCEEE9FCEEE9FCEDE9FCECE9FCECE9FCEBE9FCEBE9FC + EAE9FCE9E9FCE9E9FCE8E9FCE7E9FCE7E9FCE6E9FCE5E8FCE5E8FCE4E8FCE4E8 + FDE3E8FDE2E8FDE2E8FDE1E8FDE0E8FDE0E8FDDFE8FDDEE8FDDEE8FDDDE8FD01 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101FF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0000000000000000 + 00000000000000000000000000000000000000000000FF0099FF0099FF0099FF + 0099FF0099FF0099FF0099FF0099FF0099010101FF3399FF3399FF3399FF3399 + FF3399FF3399FF3399FF3399FF3399010101FF6699FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF6699010101FF9999FF9999FF9999FF9999FF9999FF + 9999FF9999FF9999FF9999010101FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99 + FFCC99FFCC99FFCC99010101FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99010101FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CC010101FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF33CC010101FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66 + CC010101FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC01 + 0101FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC010101 + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC010101FF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF010101FF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF010101FF66FFFF66FF + FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF010101FF99FFFF99FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF010101FFCCFFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF010101FFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF010101010101FF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FF00000000000000000000000000000000 + 0000000000000000000000000000FF0099FF0099FF0099FF0099FF0099FF0099 + FF0099FF0099FF0099010101FF3399FF3399FF3399FF3399FF3399FF3399FF33 + 99FF3399FF3399010101FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF6699010101FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999 + FF9999010101FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC + 99010101FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF9901 + 0101FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC010101 + FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC010101FF66 + CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CC010101FF99CCFF + 99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC010101FFCCCCFFCCCC + FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC010101FFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC010101FF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FF010101FF33FFFF33FFFF33FFFF33FF + FF33FFFF33FFFF33FFFF33FFFF33FF010101FF66FFFF66FFFF66FFFF66FFFF66 + FFFF66FFFF66FFFF66FFFF66FF010101FF99FFFF99FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99FFFF99FF010101FFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF + FFCCFFFFCCFFFFCCFF010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFF010101010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FF000000000000000000000000000000000000000000000000 + 000000000000FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF00 + 99010101FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF339901 + 0101FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699010101 + FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999010101FFCC + 99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99010101FFFF99FF + FF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99010101FF00CCFF00CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC010101FF33CCFF33CCFF33 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC010101FF66CCFF66CCFF66CCFF + 66CCFF66CCFF66CCFF66CCFF66CCFF66CC010101FF99CCFF99CCFF99CCFF99CC + FF99CCFF99CCFF99CCFF99CCFF99CC010101FFCCCCFFCCCCFFCCCCFFCCCCFFCC + CCFFCCCCFFCCCCFFCCCCFFCCCC010101FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF + FFCCFFFFCCFFFFCCFFFFCC010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FF010101FF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33 + FFFF33FFFF33FF010101FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF + 66FFFF66FF010101FF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF + FF99FF010101FFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC + FF010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF01 + 0101010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + 000000000000000000000000000000000000000000000000000000000000FF00 + 99FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099010101FF3399FF + 3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399010101FF6699FF6699 + FF6699FF6699FF6699FF6699FF6699FF6699FF6699010101FF9999FF9999FF99 + 99FF9999FF9999FF9999FF9999FF9999FF9999010101FFCC99FFCC99FFCC99FF + CC99FFCC99FFCC99FFCC99FFCC99FFCC99010101FFFF99FFFF99FFFF99FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99010101FF00CCFF00CCFF00CCFF00CCFF00 + CCFF00CCFF00CCFF00CCFF00CC010101FF33CCFF33CCFF33CCFF33CCFF33CCFF + 33CCFF33CCFF33CCFF33CC010101FF66CCFF66CCFF66CCFF66CCFF66CCFF66CC + FF66CCFF66CCFF66CC010101FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99 + CCFF99CCFF99CC010101FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF + CCCCFFCCCC010101FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC + FFFFCC010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FF010101FF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF01 + 0101FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF010101 + FF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF010101FFCC + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF010101FFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF010101010101FF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0000000000000000 + 00000000000000000000000000000000000000000000FF0099FF0099FF0099FF + 0099FF0099FF0099FF0099FF0099FF0099010101FF3399FF3399FF3399FF3399 + FF3399FF3399FF3399FF3399FF3399010101FF6699FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF6699010101FF9999FF9999FF9999FF9999FF9999FF + 9999FF9999FF9999FF9999010101FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99 + FFCC99FFCC99FFCC99010101FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99010101FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CC010101FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF33CC010101FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66 + CC010101FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC01 + 0101FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC010101 + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC010101FF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF010101FF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF010101FF66FFFF66FF + FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF010101FF99FFFF99FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF010101FFCCFFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF010101FFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF010101010101FF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FF00000000000000000000000000000000 + 0000000000000000000000000000FF0099FF0099FF0099FF0099FF0099FF0099 + FF0099FF0099FF0099010101FF3399FF3399FF3399FF3399FF3399FF3399FF33 + 99FF3399FF3399010101FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF6699010101FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999 + FF9999010101FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC + 99010101FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF9901 + 0101FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC010101 + FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC010101FF66 + CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CC010101FF99CCFF + 99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC010101FFCCCCFFCCCC + FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC010101FFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC010101FF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FF010101FF33FFFF33FFFF33FFFF33FF + FF33FFFF33FFFF33FFFF33FFFF33FF010101FF66FFFF66FFFF66FFFF66FFFF66 + FFFF66FFFF66FFFF66FFFF66FF010101FF99FFFF99FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99FFFF99FF010101FFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF + FFCCFFFFCCFFFFCCFF010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFF010101010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FF000000000000000000000000000000000000000000000000 + 000000000000FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF00 + 99010101FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF339901 + 0101FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699010101 + FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999010101FFCC + 99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99010101FFFF99FF + FF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99010101FF00CCFF00CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC010101FF33CCFF33CCFF33 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC010101FF66CCFF66CCFF66CCFF + 66CCFF66CCFF66CCFF66CCFF66CCFF66CC010101FF99CCFF99CCFF99CCFF99CC + FF99CCFF99CCFF99CCFF99CCFF99CC010101FFCCCCFFCCCCFFCCCCFFCCCCFFCC + CCFFCCCCFFCCCCFFCCCCFFCCCC010101FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF + FFCCFFFFCCFFFFCCFFFFCC010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FF010101FF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33 + FFFF33FFFF33FF010101FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF + 66FFFF66FF010101FF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF + FF99FF010101FFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC + FF010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF01 + 0101010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + 000000000000000000000000000000000000000000000000000000000000FF00 + 99FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099010101FF3399FF + 3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399010101FF6699FF6699 + FF6699FF6699FF6699FF6699FF6699FF6699FF6699010101FF9999FF9999FF99 + 99FF9999FF9999FF9999FF9999FF9999FF9999010101FFCC99FFCC99FFCC99FF + CC99FFCC99FFCC99FFCC99FFCC99FFCC99010101FFFF99FFFF99FFFF99FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99010101FF00CCFF00CCFF00CCFF00CCFF00 + CCFF00CCFF00CCFF00CCFF00CC010101FF33CCFF33CCFF33CCFF33CCFF33CCFF + 33CCFF33CCFF33CCFF33CC010101FF66CCFF66CCFF66CCFF66CCFF66CCFF66CC + FF66CCFF66CCFF66CC010101FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99 + CCFF99CCFF99CC010101FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF + CCCCFFCCCC010101FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC + FFFFCC010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FF010101FF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF01 + 0101FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF010101 + FF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF010101FFCC + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF010101FFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF010101010101FF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0000000000000000 + 00000000000000000000000000000000000000000000FF0099FF0099FF0099FF + 0099FF0099FF0099FF0099FF0099FF0099010101FF3399FF3399FF3399FF3399 + FF3399FF3399FF3399FF3399FF3399010101FF6699FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF6699010101FF9999FF9999FF9999FF9999FF9999FF + 9999FF9999FF9999FF9999010101FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99 + FFCC99FFCC99FFCC99010101FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99010101FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CC010101FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF33CC010101FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66 + CC010101FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC01 + 0101FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC010101 + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC010101FF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF010101FF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF010101FF66FFFF66FF + FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF010101FF99FFFF99FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF010101FFCCFFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF010101FFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0101010101010101010101010101010101 + 0101010101010101010101010101010100000000000000000000000000000000 + 0000000000000000000000000000010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 01010101010101010101010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00000000000000000000000000000000000000000000000000 + 000000000000CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC00 + 99010101CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC339901 + 0101CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699010101 + CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999010101CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99010101CCFF99CC + FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99010101CC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CC010101CC33CCCC33CCCC33 + CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC010101CC66CCCC66CCCC66CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CC010101CC99CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC99CC010101CCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCC010101CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC + FFCCCCFFCCCCFFCCCCFFCC010101CC00FFCC00FFCC00FFCC00FFCC00FFCC00FF + CC00FFCC00FFCC00FF010101CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33 + FFCC33FFCC33FF010101CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66FFCC66FF010101CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF + CC99FF010101CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC + FF010101CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFF01 + 0101010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + 000000000000000000000000000000000000000000000000000000000000CC00 + 99CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099010101CC3399CC + 3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399010101CC6699CC6699 + CC6699CC6699CC6699CC6699CC6699CC6699CC6699010101CC9999CC9999CC99 + 99CC9999CC9999CC9999CC9999CC9999CC9999010101CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC99CCCC99010101CCFF99CCFF99CCFF99CCFF99 + CCFF99CCFF99CCFF99CCFF99CCFF99010101CC00CCCC00CCCC00CCCC00CCCC00 + CCCC00CCCC00CCCC00CCCC00CC010101CC33CCCC33CCCC33CCCC33CCCC33CCCC + 33CCCC33CCCC33CCCC33CC010101CC66CCCC66CCCC66CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CC010101CC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99 + CCCC99CCCC99CC010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCC010101CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCC + CCFFCC010101CC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00 + FF010101CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FF01 + 0101CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FF010101 + CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF010101CCCC + FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF010101CCFFFFCC + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFF010101010101FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF000000000000000000 + 00000000000000000000000000000000000000000000CC0099CC0099CC0099CC + 0099CC0099CC0099CC0099CC0099CC0099010101CC3399CC3399CC3399CC3399 + CC3399CC3399CC3399CC3399CC3399010101CC6699CC6699CC6699CC6699CC66 + 99CC6699CC6699CC6699CC6699010101CC9999CC9999CC9999CC9999CC9999CC + 9999CC9999CC9999CC9999010101CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99 + CCCC99CCCC99CCCC99010101CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF + 99CCFF99CCFF99010101CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC + 00CCCC00CC010101CC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC + CC33CC010101CC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66 + CC010101CC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CC01 + 0101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC010101 + CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCC010101CC00 + FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FF010101CC33FFCC + 33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FF010101CC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FF010101CC99FFCC99FFCC99 + FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF010101CCCCFFCCCCFFCCCCFFCC + CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF010101CCFFFFCCFFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFF010101010101FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF0000000000000000000000000000000000 + 0000000000000000000000000000CC0099CC0099CC0099CC0099CC0099CC0099 + CC0099CC0099CC0099010101CC3399CC3399CC3399CC3399CC3399CC3399CC33 + 99CC3399CC3399010101CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC + 6699CC6699010101CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999 + CC9999010101CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC + 99010101CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF9901 + 0101CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CC010101 + CC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC010101CC66 + CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CC010101CC99CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CC010101CCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC010101CCFFCCCCFFCCCCFF + CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCC010101CC00FFCC00FFCC00FFCC + 00FFCC00FFCC00FFCC00FFCC00FFCC00FF010101CC33FFCC33FFCC33FFCC33FF + CC33FFCC33FFCC33FFCC33FFCC33FF010101CC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66FFCC66FF010101CC99FFCC99FFCC99FFCC99FFCC99FFCC + 99FFCC99FFCC99FFCC99FF010101CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF + CCCCFFCCCCFFCCCCFF010101CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF + FFCCFFFFCCFFFF010101010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00000000000000000000000000000000000000000000000000 + 000000000000CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC00 + 99010101CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC339901 + 0101CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699010101 + CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999010101CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99010101CCFF99CC + FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99010101CC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CC010101CC33CCCC33CCCC33 + CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC010101CC66CCCC66CCCC66CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CC010101CC99CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC99CC010101CCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCC010101CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC + FFCCCCFFCCCCFFCCCCFFCC010101CC00FFCC00FFCC00FFCC00FFCC00FFCC00FF + CC00FFCC00FFCC00FF010101CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33 + FFCC33FFCC33FF010101CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66FFCC66FF010101CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF + CC99FF010101CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC + FF010101CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFF01 + 0101010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + 000000000000000000000000000000000000000000000000000000000000CC00 + 99CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099010101CC3399CC + 3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399010101CC6699CC6699 + CC6699CC6699CC6699CC6699CC6699CC6699CC6699010101CC9999CC9999CC99 + 99CC9999CC9999CC9999CC9999CC9999CC9999010101CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC99CCCC99010101CCFF99CCFF99CCFF99CCFF99 + CCFF99CCFF99CCFF99CCFF99CCFF99010101CC00CCCC00CCCC00CCCC00CCCC00 + CCCC00CCCC00CCCC00CCCC00CC010101CC33CCCC33CCCC33CCCC33CCCC33CCCC + 33CCCC33CCCC33CCCC33CC010101CC66CCCC66CCCC66CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CC010101CC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99 + CCCC99CCCC99CC010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCC010101CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCC + CCFFCC010101CC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00 + FF010101CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FF01 + 0101CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FF010101 + CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF010101CCCC + FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF010101CCFFFFCC + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFF010101010101FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF000000000000000000 + 00000000000000000000000000000000000000000000CC0099CC0099CC0099CC + 0099CC0099CC0099CC0099CC0099CC0099010101CC3399CC3399CC3399CC3399 + CC3399CC3399CC3399CC3399CC3399010101CC6699CC6699CC6699CC6699CC66 + 99CC6699CC6699CC6699CC6699010101CC9999CC9999CC9999CC9999CC9999CC + 9999CC9999CC9999CC9999010101CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99 + CCCC99CCCC99CCCC99010101CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF + 99CCFF99CCFF99010101CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC + 00CCCC00CC010101CC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC + CC33CC010101CC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66 + CC010101CC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CC01 + 0101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC010101 + CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCC010101CC00 + FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FF010101CC33FFCC + 33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FF010101CC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FF010101CC99FFCC99FFCC99 + FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF010101CCCCFFCCCCFFCCCCFFCC + CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF010101CCFFFFCCFFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFF010101010101FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF0000000000000000000000000000000000 + 0000000000000000000000000000CC0099CC0099CC0099CC0099CC0099CC0099 + CC0099CC0099CC0099010101CC3399CC3399CC3399CC3399CC3399CC3399CC33 + 99CC3399CC3399010101CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC + 6699CC6699010101CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999 + CC9999010101CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC + 99010101CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF9901 + 0101CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CC010101 + CC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC010101CC66 + CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CC010101CC99CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CC010101CCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC010101CCFFCCCCFFCCCCFF + CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCC010101CC00FFCC00FFCC00FFCC + 00FFCC00FFCC00FFCC00FFCC00FFCC00FF010101CC33FFCC33FFCC33FFCC33FF + CC33FFCC33FFCC33FFCC33FFCC33FF010101CC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66FFCC66FF010101CC99FFCC99FFCC99FFCC99FFCC99FFCC + 99FFCC99FFCC99FFCC99FF010101CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF + CCCCFFCCCCFFCCCCFF010101CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF + FFCCFFFFCCFFFF010101010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00000000000000000000000000000000000000000000000000 + 000000000000CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC00 + 99010101CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC339901 + 0101CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699010101 + CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999010101CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99010101CCFF99CC + FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99010101CC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CC010101CC33CCCC33CCCC33 + CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC010101CC66CCCC66CCCC66CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CC010101CC99CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC99CC010101CCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCC010101CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC + FFCCCCFFCCCCFFCCCCFFCC010101CC00FFCC00FFCC00FFCC00FFCC00FFCC00FF + CC00FFCC00FFCC00FF010101CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33 + FFCC33FFCC33FF010101CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66FFCC66FF010101CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF + CC99FF010101CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC + FF010101CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFF01 + 0101010101010101010101010101010101010101010101010101010101010101 + 0000000000000000000000000000000000000000000000000000000000000101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 010101010101010101010101010101010101010101010101010101010100FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0000000000000000 + 0000000000000000000000000000000000000000000099009999009999009999 + 0099990099990099990099990099990099010101993399993399993399993399 + 9933999933999933999933999933990101019966999966999966999966999966 + 9999669999669999669999669901010199999999999999999999999999999999 + 999999999999999999999901010199CC9999CC9999CC9999CC9999CC9999CC99 + 99CC9999CC9999CC9901010199FF9999FF9999FF9999FF9999FF9999FF9999FF + 9999FF9999FF990101019900CC9900CC9900CC9900CC9900CC9900CC9900CC99 + 00CC9900CC0101019933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC + 9933CC0101019966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966 + CC0101019999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC01 + 010199CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC010101 + 99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC0101019900 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF0101019933FF99 + 33FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF0101019966FF9966FF + 9966FF9966FF9966FF9966FF9966FF9966FF9966FF0101019999FF9999FF9999 + FF9999FF9999FF9999FF9999FF9999FF9999FF01010199CCFF99CCFF99CCFF99 + CCFF99CCFF99CCFF99CCFF99CCFF99CCFF01010199FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99FFFF99FFFF99FFFF01010101010100FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000000000000000000000 + 0000000000000000000000000000990099990099990099990099990099990099 + 9900999900999900990101019933999933999933999933999933999933999933 + 9999339999339901010199669999669999669999669999669999669999669999 + 6699996699010101999999999999999999999999999999999999999999999999 + 99999901010199CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC + 9901010199FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9901 + 01019900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC010101 + 9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC0101019966 + CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC0101019999CC99 + 99CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC01010199CCCC99CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC01010199FFCC99FFCC99FF + CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC0101019900FF9900FF9900FF99 + 00FF9900FF9900FF9900FF9900FF9900FF0101019933FF9933FF9933FF9933FF + 9933FF9933FF9933FF9933FF9933FF0101019966FF9966FF9966FF9966FF9966 + FF9966FF9966FF9966FF9966FF0101019999FF9999FF9999FF9999FF9999FF99 + 99FF9999FF9999FF9999FF01010199CCFF99CCFF99CCFF99CCFF99CCFF99CCFF + 99CCFF99CCFF99CCFF01010199FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF + FF99FFFF99FFFF01010101010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF000000000000000000000000000000000000000000000000 + 0000000000009900999900999900999900999900999900999900999900999900 + 9901010199339999339999339999339999339999339999339999339999339901 + 0101996699996699996699996699996699996699996699996699996699010101 + 99999999999999999999999999999999999999999999999999999901010199CC + 9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9901010199FF9999 + FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF990101019900CC9900CC + 9900CC9900CC9900CC9900CC9900CC9900CC9900CC0101019933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933CC9933CC0101019966CC9966CC9966CC99 + 66CC9966CC9966CC9966CC9966CC9966CC0101019999CC9999CC9999CC9999CC + 9999CC9999CC9999CC9999CC9999CC01010199CCCC99CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC01010199FFCC99FFCC99FFCC99FFCC99FFCC99 + FFCC99FFCC99FFCC99FFCC0101019900FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF9900FF0101019933FF9933FF9933FF9933FF9933FF9933FF9933 + FF9933FF9933FF0101019966FF9966FF9966FF9966FF9966FF9966FF9966FF99 + 66FF9966FF0101019999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF + 9999FF01010199CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC + FF01010199FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF01 + 010101010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 0000000000000000000000000000000000000000000000000000000000009900 + 9999009999009999009999009999009999009999009999009901010199339999 + 3399993399993399993399993399993399993399993399010101996699996699 + 9966999966999966999966999966999966999966990101019999999999999999 + 9999999999999999999999999999999999999901010199CC9999CC9999CC9999 + CC9999CC9999CC9999CC9999CC9999CC9901010199FF9999FF9999FF9999FF99 + 99FF9999FF9999FF9999FF9999FF990101019900CC9900CC9900CC9900CC9900 + CC9900CC9900CC9900CC9900CC0101019933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933CC9933CC0101019966CC9966CC9966CC9966CC9966CC9966CC + 9966CC9966CC9966CC0101019999CC9999CC9999CC9999CC9999CC9999CC9999 + CC9999CC9999CC01010199CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99 + CCCC99CCCC01010199FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC + 99FFCC0101019900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900 + FF0101019933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF01 + 01019966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF010101 + 9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF01010199CC + FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF01010199FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF01010101010100FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0000000000000000 + 0000000000000000000000000000000000000000000099009999009999009999 + 0099990099990099990099990099990099010101993399993399993399993399 + 9933999933999933999933999933990101019966999966999966999966999966 + 9999669999669999669999669901010199999999999999999999999999999999 + 999999999999999999999901010199CC9999CC9999CC9999CC9999CC9999CC99 + 99CC9999CC9999CC9901010199FF9999FF9999FF9999FF9999FF9999FF9999FF + 9999FF9999FF990101019900CC9900CC9900CC9900CC9900CC9900CC9900CC99 + 00CC9900CC0101019933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC + 9933CC0101019966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966 + CC0101019999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC01 + 010199CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC010101 + 99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC0101019900 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF0101019933FF99 + 33FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF0101019966FF9966FF + 9966FF9966FF9966FF9966FF9966FF9966FF9966FF0101019999FF9999FF9999 + FF9999FF9999FF9999FF9999FF9999FF9999FF01010199CCFF99CCFF99CCFF99 + CCFF99CCFF99CCFF99CCFF99CCFF99CCFF01010199FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99FFFF99FFFF99FFFF01010101010100FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000000000000000000000 + 0000000000000000000000000000990099990099990099990099990099990099 + 9900999900999900990101019933999933999933999933999933999933999933 + 9999339999339901010199669999669999669999669999669999669999669999 + 6699996699010101999999999999999999999999999999999999999999999999 + 99999901010199CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC + 9901010199FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9901 + 01019900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC010101 + 9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC0101019966 + CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC0101019999CC99 + 99CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC01010199CCCC99CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC01010199FFCC99FFCC99FF + CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC0101019900FF9900FF9900FF99 + 00FF9900FF9900FF9900FF9900FF9900FF0101019933FF9933FF9933FF9933FF + 9933FF9933FF9933FF9933FF9933FF0101019966FF9966FF9966FF9966FF9966 + FF9966FF9966FF9966FF9966FF0101019999FF9999FF9999FF9999FF9999FF99 + 99FF9999FF9999FF9999FF01010199CCFF99CCFF99CCFF99CCFF99CCFF99CCFF + 99CCFF99CCFF99CCFF01010199FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF + FF99FFFF99FFFF01010101010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF000000000000000000000000000000000000000000000000 + 0000000000009900999900999900999900999900999900999900999900999900 + 9901010199339999339999339999339999339999339999339999339999339901 + 0101996699996699996699996699996699996699996699996699996699010101 + 99999999999999999999999999999999999999999999999999999901010199CC + 9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9901010199FF9999 + FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF990101019900CC9900CC + 9900CC9900CC9900CC9900CC9900CC9900CC9900CC0101019933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933CC9933CC0101019966CC9966CC9966CC99 + 66CC9966CC9966CC9966CC9966CC9966CC0101019999CC9999CC9999CC9999CC + 9999CC9999CC9999CC9999CC9999CC01010199CCCC99CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC01010199FFCC99FFCC99FFCC99FFCC99FFCC99 + FFCC99FFCC99FFCC99FFCC0101019900FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF9900FF0101019933FF9933FF9933FF9933FF9933FF9933FF9933 + FF9933FF9933FF0101019966FF9966FF9966FF9966FF9966FF9966FF9966FF99 + 66FF9966FF0101019999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF + 9999FF01010199CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC + FF01010199FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF01 + 010101010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 0000000000000000000000000000000000000000000000000000000000009900 + 9999009999009999009999009999009999009999009999009901010199339999 + 3399993399993399993399993399993399993399993399010101996699996699 + 9966999966999966999966999966999966999966990101019999999999999999 + 9999999999999999999999999999999999999901010199CC9999CC9999CC9999 + CC9999CC9999CC9999CC9999CC9999CC9901010199FF9999FF9999FF9999FF99 + 99FF9999FF9999FF9999FF9999FF990101019900CC9900CC9900CC9900CC9900 + CC9900CC9900CC9900CC9900CC0101019933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933CC9933CC0101019966CC9966CC9966CC9966CC9966CC9966CC + 9966CC9966CC9966CC0101019999CC9999CC9999CC9999CC9999CC9999CC9999 + CC9999CC9999CC01010199CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99 + CCCC99CCCC01010199FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC + 99FFCC0101019900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900 + FF0101019933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF01 + 01019966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF010101 + 9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF01010199CC + FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF01010199FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF01010101010100FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0000000000000000 + 0000000000000000000000000000000000000000000099009999009999009999 + 0099990099990099990099990099990099010101993399993399993399993399 + 9933999933999933999933999933990101019966999966999966999966999966 + 9999669999669999669999669901010199999999999999999999999999999999 + 999999999999999999999901010199CC9999CC9999CC9999CC9999CC9999CC99 + 99CC9999CC9999CC9901010199FF9999FF9999FF9999FF9999FF9999FF9999FF + 9999FF9999FF990101019900CC9900CC9900CC9900CC9900CC9900CC9900CC99 + 00CC9900CC0101019933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC + 9933CC0101019966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966 + CC0101019999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC01 + 010199CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC010101 + 99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC0101019900 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF0101019933FF99 + 33FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF0101019966FF9966FF + 9966FF9966FF9966FF9966FF9966FF9966FF9966FF0101019999FF9999FF9999 + FF9999FF9999FF9999FF9999FF9999FF9999FF01010199CCFF99CCFF99CCFF99 + CCFF99CCFF99CCFF99CCFF99CCFF99CCFF01010199FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99FFFF99FFFF99FFFF0101010101010101010101010101010101 + 0101010101010101010101010101010100000000000000000000000000000000 + 0000000000000000000000000000010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 01010101010101010101010101FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0000000000000000000000000000000000000000000000000000 + 0000000000006600996600996600996600996600996600996600996600996600 + 9901010166339966339966339966339966339966339966339966339966339901 + 0101666699666699666699666699666699666699666699666699666699010101 + 66999966999966999966999966999966999966999966999966999901010166CC + 9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9901010166FF9966 + FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF990101016600CC6600CC + 6600CC6600CC6600CC6600CC6600CC6600CC6600CC0101016633CC6633CC6633 + CC6633CC6633CC6633CC6633CC6633CC6633CC0101016666CC6666CC6666CC66 + 66CC6666CC6666CC6666CC6666CC6666CC0101016699CC6699CC6699CC6699CC + 6699CC6699CC6699CC6699CC6699CC01010166CCCC66CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CCCC66CCCC01010166FFCC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66FFCC0101016600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600FF6600FF0101016633FF6633FF6633FF6633FF6633FF6633FF6633 + FF6633FF6633FF0101016666FF6666FF6666FF6666FF6666FF6666FF6666FF66 + 66FF6666FF0101016699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF01010166CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CC + FF01010166FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF01 + 0101010101FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 + 0000000000000000000000000000000000000000000000000000000000006600 + 9966009966009966009966009966009966009966009966009901010166339966 + 3399663399663399663399663399663399663399663399010101666699666699 + 6666996666996666996666996666996666996666990101016699996699996699 + 9966999966999966999966999966999966999901010166CC9966CC9966CC9966 + CC9966CC9966CC9966CC9966CC9966CC9901010166FF9966FF9966FF9966FF99 + 66FF9966FF9966FF9966FF9966FF990101016600CC6600CC6600CC6600CC6600 + CC6600CC6600CC6600CC6600CC0101016633CC6633CC6633CC6633CC6633CC66 + 33CC6633CC6633CC6633CC0101016666CC6666CC6666CC6666CC6666CC6666CC + 6666CC6666CC6666CC0101016699CC6699CC6699CC6699CC6699CC6699CC6699 + CC6699CC6699CC01010166CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66 + CCCC66CCCC01010166FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66FFCC0101016600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600 + FF0101016633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF01 + 01016666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF010101 + 6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF01010166CC + FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF01010166FFFF66 + FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF010101010101FF0000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00000000000000000000 + 0000000000000000000000000000000000000000000066009966009966009966 + 0099660099660099660099660099660099010101663399663399663399663399 + 6633996633996633996633996633990101016666996666996666996666996666 + 9966669966669966669966669901010166999966999966999966999966999966 + 999966999966999966999901010166CC9966CC9966CC9966CC9966CC9966CC99 + 66CC9966CC9966CC9901010166FF9966FF9966FF9966FF9966FF9966FF9966FF + 9966FF9966FF990101016600CC6600CC6600CC6600CC6600CC6600CC6600CC66 + 00CC6600CC0101016633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC + 6633CC0101016666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666 + CC0101016699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC01 + 010166CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC010101 + 66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC0101016600 + FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF0101016633FF66 + 33FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF0101016666FF6666FF + 6666FF6666FF6666FF6666FF6666FF6666FF6666FF0101016699FF6699FF6699 + FF6699FF6699FF6699FF6699FF6699FF6699FF01010166CCFF66CCFF66CCFF66 + CCFF66CCFF66CCFF66CCFF66CCFF66CCFF01010166FFFF66FFFF66FFFF66FFFF + 66FFFF66FFFF66FFFF66FFFF66FFFF010101010101FF0000FF0000FF0000FF00 + 00FF0000FF0000FF0000FF0000FF000000000000000000000000000000000000 + 0000000000000000000000000000660099660099660099660099660099660099 + 6600996600996600990101016633996633996633996633996633996633996633 + 9966339966339901010166669966669966669966669966669966669966669966 + 6699666699010101669999669999669999669999669999669999669999669999 + 66999901010166CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC + 9901010166FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9901 + 01016600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC010101 + 6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC0101016666 + CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC0101016699CC66 + 99CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC01010166CCCC66CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC01010166FFCC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC0101016600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600FF6600FF0101016633FF6633FF6633FF6633FF + 6633FF6633FF6633FF6633FF6633FF0101016666FF6666FF6666FF6666FF6666 + FF6666FF6666FF6666FF6666FF0101016699FF6699FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF01010166CCFF66CCFF66CCFF66CCFF66CCFF66CCFF + 66CCFF66CCFF66CCFF01010166FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF + FF66FFFF66FFFF010101010101FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0000000000000000000000000000000000000000000000000000 + 0000000000006600996600996600996600996600996600996600996600996600 + 9901010166339966339966339966339966339966339966339966339966339901 + 0101666699666699666699666699666699666699666699666699666699010101 + 66999966999966999966999966999966999966999966999966999901010166CC + 9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9901010166FF9966 + FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF990101016600CC6600CC + 6600CC6600CC6600CC6600CC6600CC6600CC6600CC0101016633CC6633CC6633 + CC6633CC6633CC6633CC6633CC6633CC6633CC0101016666CC6666CC6666CC66 + 66CC6666CC6666CC6666CC6666CC6666CC0101016699CC6699CC6699CC6699CC + 6699CC6699CC6699CC6699CC6699CC01010166CCCC66CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CCCC66CCCC01010166FFCC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66FFCC0101016600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600FF6600FF0101016633FF6633FF6633FF6633FF6633FF6633FF6633 + FF6633FF6633FF0101016666FF6666FF6666FF6666FF6666FF6666FF6666FF66 + 66FF6666FF0101016699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF01010166CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CC + FF01010166FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF01 + 0101010101FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 + 0000000000000000000000000000000000000000000000000000000000006600 + 9966009966009966009966009966009966009966009966009901010166339966 + 3399663399663399663399663399663399663399663399010101666699666699 + 6666996666996666996666996666996666996666990101016699996699996699 + 9966999966999966999966999966999966999901010166CC9966CC9966CC9966 + CC9966CC9966CC9966CC9966CC9966CC9901010166FF9966FF9966FF9966FF99 + 66FF9966FF9966FF9966FF9966FF990101016600CC6600CC6600CC6600CC6600 + CC6600CC6600CC6600CC6600CC0101016633CC6633CC6633CC6633CC6633CC66 + 33CC6633CC6633CC6633CC0101016666CC6666CC6666CC6666CC6666CC6666CC + 6666CC6666CC6666CC0101016699CC6699CC6699CC6699CC6699CC6699CC6699 + CC6699CC6699CC01010166CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66 + CCCC66CCCC01010166FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66FFCC0101016600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600 + FF0101016633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF01 + 01016666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF010101 + 6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF01010166CC + FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF01010166FFFF66 + FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF010101010101FF0000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00000000000000000000 + 0000000000000000000000000000000000000000000066009966009966009966 + 0099660099660099660099660099660099010101663399663399663399663399 + 6633996633996633996633996633990101016666996666996666996666996666 + 9966669966669966669966669901010166999966999966999966999966999966 + 999966999966999966999901010166CC9966CC9966CC9966CC9966CC9966CC99 + 66CC9966CC9966CC9901010166FF9966FF9966FF9966FF9966FF9966FF9966FF + 9966FF9966FF990101016600CC6600CC6600CC6600CC6600CC6600CC6600CC66 + 00CC6600CC0101016633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC + 6633CC0101016666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666 + CC0101016699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC01 + 010166CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC010101 + 66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC0101016600 + FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF0101016633FF66 + 33FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF0101016666FF6666FF + 6666FF6666FF6666FF6666FF6666FF6666FF6666FF0101016699FF6699FF6699 + FF6699FF6699FF6699FF6699FF6699FF6699FF01010166CCFF66CCFF66CCFF66 + CCFF66CCFF66CCFF66CCFF66CCFF66CCFF01010166FFFF66FFFF66FFFF66FFFF + 66FFFF66FFFF66FFFF66FFFF66FFFF010101010101FF0000FF0000FF0000FF00 + 00FF0000FF0000FF0000FF0000FF000000000000000000000000000000000000 + 0000000000000000000000000000660099660099660099660099660099660099 + 6600996600996600990101016633996633996633996633996633996633996633 + 9966339966339901010166669966669966669966669966669966669966669966 + 6699666699010101669999669999669999669999669999669999669999669999 + 66999901010166CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC + 9901010166FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9901 + 01016600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC010101 + 6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC0101016666 + CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC0101016699CC66 + 99CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC01010166CCCC66CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC01010166FFCC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC0101016600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600FF6600FF0101016633FF6633FF6633FF6633FF + 6633FF6633FF6633FF6633FF6633FF0101016666FF6666FF6666FF6666FF6666 + FF6666FF6666FF6666FF6666FF0101016699FF6699FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF01010166CCFF66CCFF66CCFF66CCFF66CCFF66CCFF + 66CCFF66CCFF66CCFF01010166FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF + FF66FFFF66FFFF010101010101FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0000000000000000000000000000000000000000000000000000 + 0000000000006600996600996600996600996600996600996600996600996600 + 9901010166339966339966339966339966339966339966339966339966339901 + 0101666699666699666699666699666699666699666699666699666699010101 + 66999966999966999966999966999966999966999966999966999901010166CC + 9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9901010166FF9966 + FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF990101016600CC6600CC + 6600CC6600CC6600CC6600CC6600CC6600CC6600CC0101016633CC6633CC6633 + CC6633CC6633CC6633CC6633CC6633CC6633CC0101016666CC6666CC6666CC66 + 66CC6666CC6666CC6666CC6666CC6666CC0101016699CC6699CC6699CC6699CC + 6699CC6699CC6699CC6699CC6699CC01010166CCCC66CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CCCC66CCCC01010166FFCC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66FFCC0101016600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600FF6600FF0101016633FF6633FF6633FF6633FF6633FF6633FF6633 + FF6633FF6633FF0101016666FF6666FF6666FF6666FF6666FF6666FF6666FF66 + 66FF6666FF0101016699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF01010166CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CC + FF01010166FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF01 + 0101010101010101010101010101010101010101010101010101010101010101 + 0000000000000000000000000000000000000000000000000000000000000101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 010101010101010101010101010101010101010101010101010101010100FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF000000000000000000 + 0000000000000000000000000000000000000000000033009933009933009933 + 0099330099330099330099330099330099010101333399333399333399333399 + 3333993333993333993333993333990101013366993366993366993366993366 + 9933669933669933669933669901010133999933999933999933999933999933 + 999933999933999933999901010133CC9933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933CC9901010133FF9933FF9933FF9933FF9933FF9933FF9933FF + 9933FF9933FF990101013300CC3300CC3300CC3300CC3300CC3300CC3300CC33 + 00CC3300CC0101013333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC + 3333CC0101013366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366 + CC0101013399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC01 + 010133CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC010101 + 33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC0101013300 + FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF0101013333FF33 + 33FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF0101013366FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3366FF0101013399FF3399FF3399 + FF3399FF3399FF3399FF3399FF3399FF3399FF01010133CCFF33CCFF33CCFF33 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF01010133FFFF33FFFF33FFFF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF01010101010100FF0000FF0000FF0000FF + 0000FF0000FF0000FF0000FF0000FF0000000000000000000000000000000000 + 0000000000000000000000000000330099330099330099330099330099330099 + 3300993300993300990101013333993333993333993333993333993333993333 + 9933339933339901010133669933669933669933669933669933669933669933 + 6699336699010101339999339999339999339999339999339999339999339999 + 33999901010133CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC + 9901010133FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9901 + 01013300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC010101 + 3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC0101013366 + CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC0101013399CC33 + 99CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC01010133CCCC33CCCC + 33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC01010133FFCC33FFCC33FF + CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC0101013300FF3300FF3300FF33 + 00FF3300FF3300FF3300FF3300FF3300FF0101013333FF3333FF3333FF3333FF + 3333FF3333FF3333FF3333FF3333FF0101013366FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF3366FF0101013399FF3399FF3399FF3399FF3399FF33 + 99FF3399FF3399FF3399FF01010133CCFF33CCFF33CCFF33CCFF33CCFF33CCFF + 33CCFF33CCFF33CCFF01010133FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF + FF33FFFF33FFFF01010101010100FF0000FF0000FF0000FF0000FF0000FF0000 + FF0000FF0000FF00000000000000000000000000000000000000000000000000 + 0000000000003300993300993300993300993300993300993300993300993300 + 9901010133339933339933339933339933339933339933339933339933339901 + 0101336699336699336699336699336699336699336699336699336699010101 + 33999933999933999933999933999933999933999933999933999901010133CC + 9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9901010133FF9933 + FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF990101013300CC3300CC + 3300CC3300CC3300CC3300CC3300CC3300CC3300CC0101013333CC3333CC3333 + CC3333CC3333CC3333CC3333CC3333CC3333CC0101013366CC3366CC3366CC33 + 66CC3366CC3366CC3366CC3366CC3366CC0101013399CC3399CC3399CC3399CC + 3399CC3399CC3399CC3399CC3399CC01010133CCCC33CCCC33CCCC33CCCC33CC + CC33CCCC33CCCC33CCCC33CCCC01010133FFCC33FFCC33FFCC33FFCC33FFCC33 + FFCC33FFCC33FFCC33FFCC0101013300FF3300FF3300FF3300FF3300FF3300FF + 3300FF3300FF3300FF0101013333FF3333FF3333FF3333FF3333FF3333FF3333 + FF3333FF3333FF0101013366FF3366FF3366FF3366FF3366FF3366FF3366FF33 + 66FF3366FF0101013399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF + 3399FF01010133CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF01010133FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF01 + 010101010100FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 + 0000000000000000000000000000000000000000000000000000000000003300 + 9933009933009933009933009933009933009933009933009901010133339933 + 3399333399333399333399333399333399333399333399010101336699336699 + 3366993366993366993366993366993366993366990101013399993399993399 + 9933999933999933999933999933999933999901010133CC9933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933CC9901010133FF9933FF9933FF9933FF99 + 33FF9933FF9933FF9933FF9933FF990101013300CC3300CC3300CC3300CC3300 + CC3300CC3300CC3300CC3300CC0101013333CC3333CC3333CC3333CC3333CC33 + 33CC3333CC3333CC3333CC0101013366CC3366CC3366CC3366CC3366CC3366CC + 3366CC3366CC3366CC0101013399CC3399CC3399CC3399CC3399CC3399CC3399 + CC3399CC3399CC01010133CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33 + CCCC33CCCC01010133FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC + 33FFCC0101013300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300 + FF0101013333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF01 + 01013366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF010101 + 3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF01010133CC + FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF01010133FFFF33 + FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF01010101010100FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF000000000000000000 + 0000000000000000000000000000000000000000000033009933009933009933 + 0099330099330099330099330099330099010101333399333399333399333399 + 3333993333993333993333993333990101013366993366993366993366993366 + 9933669933669933669933669901010133999933999933999933999933999933 + 999933999933999933999901010133CC9933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933CC9901010133FF9933FF9933FF9933FF9933FF9933FF9933FF + 9933FF9933FF990101013300CC3300CC3300CC3300CC3300CC3300CC3300CC33 + 00CC3300CC0101013333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC + 3333CC0101013366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366 + CC0101013399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC01 + 010133CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC010101 + 33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC0101013300 + FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF0101013333FF33 + 33FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF0101013366FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3366FF0101013399FF3399FF3399 + FF3399FF3399FF3399FF3399FF3399FF3399FF01010133CCFF33CCFF33CCFF33 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF01010133FFFF33FFFF33FFFF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF01010101010100FF0000FF0000FF0000FF + 0000FF0000FF0000FF0000FF0000FF0000000000000000000000000000000000 + 0000000000000000000000000000330099330099330099330099330099330099 + 3300993300993300990101013333993333993333993333993333993333993333 + 9933339933339901010133669933669933669933669933669933669933669933 + 6699336699010101339999339999339999339999339999339999339999339999 + 33999901010133CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC + 9901010133FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9901 + 01013300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC010101 + 3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC0101013366 + CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC0101013399CC33 + 99CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC01010133CCCC33CCCC + 33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC01010133FFCC33FFCC33FF + CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC0101013300FF3300FF3300FF33 + 00FF3300FF3300FF3300FF3300FF3300FF0101013333FF3333FF3333FF3333FF + 3333FF3333FF3333FF3333FF3333FF0101013366FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF3366FF0101013399FF3399FF3399FF3399FF3399FF33 + 99FF3399FF3399FF3399FF01010133CCFF33CCFF33CCFF33CCFF33CCFF33CCFF + 33CCFF33CCFF33CCFF01010133FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF + FF33FFFF33FFFF01010101010100FF0000FF0000FF0000FF0000FF0000FF0000 + FF0000FF0000FF00000000000000000000000000000000000000000000000000 + 0000000000003300993300993300993300993300993300993300993300993300 + 9901010133339933339933339933339933339933339933339933339933339901 + 0101336699336699336699336699336699336699336699336699336699010101 + 33999933999933999933999933999933999933999933999933999901010133CC + 9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9901010133FF9933 + FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF990101013300CC3300CC + 3300CC3300CC3300CC3300CC3300CC3300CC3300CC0101013333CC3333CC3333 + CC3333CC3333CC3333CC3333CC3333CC3333CC0101013366CC3366CC3366CC33 + 66CC3366CC3366CC3366CC3366CC3366CC0101013399CC3399CC3399CC3399CC + 3399CC3399CC3399CC3399CC3399CC01010133CCCC33CCCC33CCCC33CCCC33CC + CC33CCCC33CCCC33CCCC33CCCC01010133FFCC33FFCC33FFCC33FFCC33FFCC33 + FFCC33FFCC33FFCC33FFCC0101013300FF3300FF3300FF3300FF3300FF3300FF + 3300FF3300FF3300FF0101013333FF3333FF3333FF3333FF3333FF3333FF3333 + FF3333FF3333FF0101013366FF3366FF3366FF3366FF3366FF3366FF3366FF33 + 66FF3366FF0101013399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF + 3399FF01010133CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF01010133FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF01 + 010101010100FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 + 0000000000000000000000000000000000000000000000000000000000003300 + 9933009933009933009933009933009933009933009933009901010133339933 + 3399333399333399333399333399333399333399333399010101336699336699 + 3366993366993366993366993366993366993366990101013399993399993399 + 9933999933999933999933999933999933999901010133CC9933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933CC9901010133FF9933FF9933FF9933FF99 + 33FF9933FF9933FF9933FF9933FF990101013300CC3300CC3300CC3300CC3300 + CC3300CC3300CC3300CC3300CC0101013333CC3333CC3333CC3333CC3333CC33 + 33CC3333CC3333CC3333CC0101013366CC3366CC3366CC3366CC3366CC3366CC + 3366CC3366CC3366CC0101013399CC3399CC3399CC3399CC3399CC3399CC3399 + CC3399CC3399CC01010133CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33 + CCCC33CCCC01010133FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC + 33FFCC0101013300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300 + FF0101013333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF01 + 01013366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF010101 + 3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF01010133CC + FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF01010133FFFF33 + FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF01010101010100FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF000000000000000000 + 0000000000000000000000000000000000000000000033009933009933009933 + 0099330099330099330099330099330099010101333399333399333399333399 + 3333993333993333993333993333990101013366993366993366993366993366 + 9933669933669933669933669901010133999933999933999933999933999933 + 999933999933999933999901010133CC9933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933CC9901010133FF9933FF9933FF9933FF9933FF9933FF9933FF + 9933FF9933FF990101013300CC3300CC3300CC3300CC3300CC3300CC3300CC33 + 00CC3300CC0101013333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC + 3333CC0101013366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366 + CC0101013399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC01 + 010133CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC010101 + 33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC0101013300 + FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF0101013333FF33 + 33FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF0101013366FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3366FF0101013399FF3399FF3399 + FF3399FF3399FF3399FF3399FF3399FF3399FF01010133CCFF33CCFF33CCFF33 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF01010133FFFF33FFFF33FFFF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF0101010101010101010101010101010101 + 0101010101010101010101010101010100000000000000000000000000000000 + 0000000000000000000000000000010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 010101010101010101010101010000FF0000FF0000FF0000FF0000FF0000FF00 + 00FF0000FF0000FF000000000000000000000000000000000000000000000000 + 0000000000000000990000990000990000990000990000990000990000990000 + 9901010100339900339900339900339900339900339900339900339900339901 + 0101006699006699006699006699006699006699006699006699006699010101 + 00999900999900999900999900999900999900999900999900999901010100CC + 9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9901010100FF9900 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF990101010000CC0000CC + 0000CC0000CC0000CC0000CC0000CC0000CC0000CC0101010033CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0033CC0101010066CC0066CC0066CC00 + 66CC0066CC0066CC0066CC0066CC0066CC0101010099CC0099CC0099CC0099CC + 0099CC0099CC0099CC0099CC0099CC01010100CCCC00CCCC00CCCC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC01010100FFCC00FFCC00FFCC00FFCC00FFCC00 + FFCC00FFCC00FFCC00FFCC0101010000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0000FF0101010033FF0033FF0033FF0033FF0033FF0033FF0033 + FF0033FF0033FF0101010066FF0066FF0066FF0066FF0066FF0066FF0066FF00 + 66FF0066FF0101010099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF + 0099FF01010100CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC + FF01010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF01 + 01010101010000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000000000000000000000000000000000000000000000000000000000000000 + 9900009900009900009900009900009900009900009900009901010100339900 + 3399003399003399003399003399003399003399003399010101006699006699 + 0066990066990066990066990066990066990066990101010099990099990099 + 9900999900999900999900999900999900999901010100CC9900CC9900CC9900 + CC9900CC9900CC9900CC9900CC9900CC9901010100FF9900FF9900FF9900FF99 + 00FF9900FF9900FF9900FF9900FF990101010000CC0000CC0000CC0000CC0000 + CC0000CC0000CC0000CC0000CC0101010033CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0033CC0101010066CC0066CC0066CC0066CC0066CC0066CC + 0066CC0066CC0066CC0101010099CC0099CC0099CC0099CC0099CC0099CC0099 + CC0099CC0099CC01010100CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00 + CCCC00CCCC01010100FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC + 00FFCC0101010000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 + FF0101010033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF01 + 01010066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF010101 + 0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF01010100CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF01010100FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0101010101010000FF + 0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000 + 0000000000000000000000000000000000000000000000009900009900009900 + 0099000099000099000099000099000099010101003399003399003399003399 + 0033990033990033990033990033990101010066990066990066990066990066 + 9900669900669900669900669901010100999900999900999900999900999900 + 999900999900999900999901010100CC9900CC9900CC9900CC9900CC9900CC99 + 00CC9900CC9900CC9901010100FF9900FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF990101010000CC0000CC0000CC0000CC0000CC0000CC0000CC00 + 00CC0000CC0101010033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC + 0033CC0101010066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066 + CC0101010099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC01 + 010100CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC010101 + 00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC0101010000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0101010033FF00 + 33FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0101010066FF0066FF + 0066FF0066FF0066FF0066FF0066FF0066FF0066FF0101010099FF0099FF0099 + FF0099FF0099FF0099FF0099FF0099FF0099FF01010100CCFF00CCFF00CCFF00 + CCFF00CCFF00CCFF00CCFF00CCFF00CCFF01010100FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF0101010101010000FF0000FF0000FF0000 + FF0000FF0000FF0000FF0000FF0000FF00000000000000000000000000000000 + 0000000000000000000000000000000099000099000099000099000099000099 + 0000990000990000990101010033990033990033990033990033990033990033 + 9900339900339901010100669900669900669900669900669900669900669900 + 6699006699010101009999009999009999009999009999009999009999009999 + 00999901010100CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC + 9901010100FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9901 + 01010000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC010101 + 0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0101010066 + CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0101010099CC00 + 99CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC01010100CCCC00CCCC + 00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC01010100FFCC00FFCC00FF + CC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC0101010000FF0000FF0000FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0101010033FF0033FF0033FF0033FF + 0033FF0033FF0033FF0033FF0033FF0101010066FF0066FF0066FF0066FF0066 + FF0066FF0066FF0066FF0066FF0101010099FF0099FF0099FF0099FF0099FF00 + 99FF0099FF0099FF0099FF01010100CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CCFF00CCFF01010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF0101010101010000FF0000FF0000FF0000FF0000FF0000FF00 + 00FF0000FF0000FF000000000000000000000000000000000000000000000000 + 0000000000000000990000990000990000990000990000990000990000990000 + 9901010100339900339900339900339900339900339900339900339900339901 + 0101006699006699006699006699006699006699006699006699006699010101 + 00999900999900999900999900999900999900999900999900999901010100CC + 9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9901010100FF9900 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF990101010000CC0000CC + 0000CC0000CC0000CC0000CC0000CC0000CC0000CC0101010033CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0033CC0101010066CC0066CC0066CC00 + 66CC0066CC0066CC0066CC0066CC0066CC0101010099CC0099CC0099CC0099CC + 0099CC0099CC0099CC0099CC0099CC01010100CCCC00CCCC00CCCC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC01010100FFCC00FFCC00FFCC00FFCC00FFCC00 + FFCC00FFCC00FFCC00FFCC0101010000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0000FF0101010033FF0033FF0033FF0033FF0033FF0033FF0033 + FF0033FF0033FF0101010066FF0066FF0066FF0066FF0066FF0066FF0066FF00 + 66FF0066FF0101010099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF + 0099FF01010100CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC + FF01010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF01 + 01010101010000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000000000000000000000000000000000000000000000000000000000000000 + 9900009900009900009900009900009900009900009900009901010100339900 + 3399003399003399003399003399003399003399003399010101006699006699 + 0066990066990066990066990066990066990066990101010099990099990099 + 9900999900999900999900999900999900999901010100CC9900CC9900CC9900 + CC9900CC9900CC9900CC9900CC9900CC9901010100FF9900FF9900FF9900FF99 + 00FF9900FF9900FF9900FF9900FF990101010000CC0000CC0000CC0000CC0000 + CC0000CC0000CC0000CC0000CC0101010033CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0033CC0101010066CC0066CC0066CC0066CC0066CC0066CC + 0066CC0066CC0066CC0101010099CC0099CC0099CC0099CC0099CC0099CC0099 + CC0099CC0099CC01010100CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00 + CCCC00CCCC01010100FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC + 00FFCC0101010000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 + FF0101010033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF01 + 01010066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF010101 + 0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF01010100CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF01010100FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0101010101010000FF + 0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000 + 0000000000000000000000000000000000000000000000009900009900009900 + 0099000099000099000099000099000099010101003399003399003399003399 + 0033990033990033990033990033990101010066990066990066990066990066 + 9900669900669900669900669901010100999900999900999900999900999900 + 999900999900999900999901010100CC9900CC9900CC9900CC9900CC9900CC99 + 00CC9900CC9900CC9901010100FF9900FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF990101010000CC0000CC0000CC0000CC0000CC0000CC0000CC00 + 00CC0000CC0101010033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC + 0033CC0101010066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066 + CC0101010099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC01 + 010100CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC010101 + 00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC0101010000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0101010033FF00 + 33FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0101010066FF0066FF + 0066FF0066FF0066FF0066FF0066FF0066FF0066FF0101010099FF0099FF0099 + FF0099FF0099FF0099FF0099FF0099FF0099FF01010100CCFF00CCFF00CCFF00 + CCFF00CCFF00CCFF00CCFF00CCFF00CCFF01010100FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF0101010101010000FF0000FF0000FF0000 + FF0000FF0000FF0000FF0000FF0000FF00000000000000000000000000000000 + 0000000000000000000000000000000099000099000099000099000099000099 + 0000990000990000990101010033990033990033990033990033990033990033 + 9900339900339901010100669900669900669900669900669900669900669900 + 6699006699010101009999009999009999009999009999009999009999009999 + 00999901010100CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC + 9901010100FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9901 + 01010000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC010101 + 0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0101010066 + CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0101010099CC00 + 99CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC01010100CCCC00CCCC + 00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC01010100FFCC00FFCC00FF + CC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC0101010000FF0000FF0000FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0101010033FF0033FF0033FF0033FF + 0033FF0033FF0033FF0033FF0033FF0101010066FF0066FF0066FF0066FF0066 + FF0066FF0066FF0066FF0066FF0101010099FF0099FF0099FF0099FF0099FF00 + 99FF0099FF0099FF0099FF01010100CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CCFF00CCFF01010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF0101010101010000FF0000FF0000FF0000FF0000FF0000FF00 + 00FF0000FF0000FF000000000000000000000000000000000000000000000000 + 0000000000000000990000990000990000990000990000990000990000990000 + 9901010100339900339900339900339900339900339900339900339900339901 + 0101006699006699006699006699006699006699006699006699006699010101 + 00999900999900999900999900999900999900999900999900999901010100CC + 9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9901010100FF9900 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF990101010000CC0000CC + 0000CC0000CC0000CC0000CC0000CC0000CC0000CC0101010033CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0033CC0101010066CC0066CC0066CC00 + 66CC0066CC0066CC0066CC0066CC0066CC0101010099CC0099CC0099CC0099CC + 0099CC0099CC0099CC0099CC0099CC01010100CCCC00CCCC00CCCC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC01010100FFCC00FFCC00FFCC00FFCC00FFCC00 + FFCC00FFCC00FFCC00FFCC0101010000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0000FF0101010033FF0033FF0033FF0033FF0033FF0033FF0033 + FF0033FF0033FF0101010066FF0066FF0066FF0066FF0066FF0066FF0066FF00 + 66FF0066FF0101010099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF + 0099FF01010100CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC + FF01010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF01 + 0101010101010101010101010101010101010101010101010101010101010101 + 0000000000000000000000000000000000000000000000000000000000000101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101FFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000 + 00000000000000000000000000000000000000000000FF0000FF0000FF0000FF + 0000FF0000FF0000FF0000FF0000FF0000010101FF3300FF3300FF3300FF3300 + FF3300FF3300FF3300FF3300FF3300010101FF6600FF6600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600010101FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF9900FF9900010101FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00 + FFCC00FFCC00FFCC00010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00010101FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF + 0033FF0033010101FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333 + FF3333010101FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF66 + 33010101FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF993301 + 0101FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33010101 + FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33010101FF00 + 66FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066010101FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366010101FF6666FF6666 + FF6666FF6666FF6666FF6666FF6666FF6666FF6666010101FF9966FF9966FF99 + 66FF9966FF9966FF9966FF9966FF9966FF9966010101FFCC66FFCC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66010101FFFF66FFFF66FFFF66FFFF66 + FFFF66FFFF66FFFF66FFFF66FFFF66010101010101FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 + 0000000000000000000000000000FF0000FF0000FF0000FF0000FF0000FF0000 + FF0000FF0000FF0000010101FF3300FF3300FF3300FF3300FF3300FF3300FF33 + 00FF3300FF3300010101FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600010101FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900 + FF9900010101FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC + 00010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0001 + 0101FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033010101 + FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333010101FF66 + 33FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633010101FF9933FF + 9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933010101FFCC33FFCC33 + FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33010101FFFF33FFFF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33010101FF0066FF0066FF0066FF + 0066FF0066FF0066FF0066FF0066FF0066010101FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF3366FF3366010101FF6666FF6666FF6666FF6666FF66 + 66FF6666FF6666FF6666FF6666010101FF9966FF9966FF9966FF9966FF9966FF + 9966FF9966FF9966FF9966010101FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66010101FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF + 66FFFF66FFFF66010101010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000 + 000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 + 00010101FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF330001 + 0101FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600010101 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900010101FFCC + 00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00010101FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00010101FF0033FF0033 + FF0033FF0033FF0033FF0033FF0033FF0033FF0033010101FF3333FF3333FF33 + 33FF3333FF3333FF3333FF3333FF3333FF3333010101FF6633FF6633FF6633FF + 6633FF6633FF6633FF6633FF6633FF6633010101FF9933FF9933FF9933FF9933 + FF9933FF9933FF9933FF9933FF9933010101FFCC33FFCC33FFCC33FFCC33FFCC + 33FFCC33FFCC33FFCC33FFCC33010101FFFF33FFFF33FFFF33FFFF33FFFF33FF + FF33FFFF33FFFF33FFFF33010101FF0066FF0066FF0066FF0066FF0066FF0066 + FF0066FF0066FF0066010101FF3366FF3366FF3366FF3366FF3366FF3366FF33 + 66FF3366FF3366010101FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF + 6666FF6666010101FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966 + FF9966010101FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66010101FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF6601 + 0101010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + 000000000000000000000000000000000000000000000000000000000000FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000010101FF3300FF + 3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300010101FF6600FF6600 + FF6600FF6600FF6600FF6600FF6600FF6600FF6600010101FF9900FF9900FF99 + 00FF9900FF9900FF9900FF9900FF9900FF9900010101FFCC00FFCC00FFCC00FF + CC00FFCC00FFCC00FFCC00FFCC00FFCC00010101FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00010101FF0033FF0033FF0033FF0033FF00 + 33FF0033FF0033FF0033FF0033010101FF3333FF3333FF3333FF3333FF3333FF + 3333FF3333FF3333FF3333010101FF6633FF6633FF6633FF6633FF6633FF6633 + FF6633FF6633FF6633010101FF9933FF9933FF9933FF9933FF9933FF9933FF99 + 33FF9933FF9933010101FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FF + CC33FFCC33010101FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33 + FFFF33010101FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF00 + 66010101FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF336601 + 0101FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666010101 + FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966010101FFCC + 66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66010101FFFF66FF + FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66010101010101FFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000 + 00000000000000000000000000000000000000000000FF0000FF0000FF0000FF + 0000FF0000FF0000FF0000FF0000FF0000010101FF3300FF3300FF3300FF3300 + FF3300FF3300FF3300FF3300FF3300010101FF6600FF6600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600010101FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF9900FF9900010101FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00 + FFCC00FFCC00FFCC00010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00010101FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF + 0033FF0033010101FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333 + FF3333010101FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF66 + 33010101FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF993301 + 0101FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33010101 + FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33010101FF00 + 66FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066010101FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366010101FF6666FF6666 + FF6666FF6666FF6666FF6666FF6666FF6666FF6666010101FF9966FF9966FF99 + 66FF9966FF9966FF9966FF9966FF9966FF9966010101FFCC66FFCC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66010101FFFF66FFFF66FFFF66FFFF66 + FFFF66FFFF66FFFF66FFFF66FFFF66010101010101FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 + 0000000000000000000000000000FF0000FF0000FF0000FF0000FF0000FF0000 + FF0000FF0000FF0000010101FF3300FF3300FF3300FF3300FF3300FF3300FF33 + 00FF3300FF3300010101FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600010101FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900 + FF9900010101FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC + 00010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0001 + 0101FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033010101 + FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333010101FF66 + 33FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633010101FF9933FF + 9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933010101FFCC33FFCC33 + FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33010101FFFF33FFFF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33010101FF0066FF0066FF0066FF + 0066FF0066FF0066FF0066FF0066FF0066010101FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF3366FF3366010101FF6666FF6666FF6666FF6666FF66 + 66FF6666FF6666FF6666FF6666010101FF9966FF9966FF9966FF9966FF9966FF + 9966FF9966FF9966FF9966010101FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66010101FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF + 66FFFF66FFFF66010101010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000 + 000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 + 00010101FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF330001 + 0101FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600010101 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900010101FFCC + 00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00010101FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00010101FF0033FF0033 + FF0033FF0033FF0033FF0033FF0033FF0033FF0033010101FF3333FF3333FF33 + 33FF3333FF3333FF3333FF3333FF3333FF3333010101FF6633FF6633FF6633FF + 6633FF6633FF6633FF6633FF6633FF6633010101FF9933FF9933FF9933FF9933 + FF9933FF9933FF9933FF9933FF9933010101FFCC33FFCC33FFCC33FFCC33FFCC + 33FFCC33FFCC33FFCC33FFCC33010101FFFF33FFFF33FFFF33FFFF33FFFF33FF + FF33FFFF33FFFF33FFFF33010101FF0066FF0066FF0066FF0066FF0066FF0066 + FF0066FF0066FF0066010101FF3366FF3366FF3366FF3366FF3366FF3366FF33 + 66FF3366FF3366010101FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF + 6666FF6666010101FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966 + FF9966010101FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66010101FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF6601 + 0101010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + 000000000000000000000000000000000000000000000000000000000000FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000010101FF3300FF + 3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300010101FF6600FF6600 + FF6600FF6600FF6600FF6600FF6600FF6600FF6600010101FF9900FF9900FF99 + 00FF9900FF9900FF9900FF9900FF9900FF9900010101FFCC00FFCC00FFCC00FF + CC00FFCC00FFCC00FFCC00FFCC00FFCC00010101FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00010101FF0033FF0033FF0033FF0033FF00 + 33FF0033FF0033FF0033FF0033010101FF3333FF3333FF3333FF3333FF3333FF + 3333FF3333FF3333FF3333010101FF6633FF6633FF6633FF6633FF6633FF6633 + FF6633FF6633FF6633010101FF9933FF9933FF9933FF9933FF9933FF9933FF99 + 33FF9933FF9933010101FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FF + CC33FFCC33010101FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33 + FFFF33010101FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF00 + 66010101FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF336601 + 0101FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666010101 + FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966010101FFCC + 66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66010101FFFF66FF + FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66010101010101FFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000 + 00000000000000000000000000000000000000000000FF0000FF0000FF0000FF + 0000FF0000FF0000FF0000FF0000FF0000010101FF3300FF3300FF3300FF3300 + FF3300FF3300FF3300FF3300FF3300010101FF6600FF6600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600010101FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF9900FF9900010101FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00 + FFCC00FFCC00FFCC00010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00010101FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF + 0033FF0033010101FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333 + FF3333010101FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF66 + 33010101FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF993301 + 0101FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33010101 + FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33010101FF00 + 66FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066010101FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366010101FF6666FF6666 + FF6666FF6666FF6666FF6666FF6666FF6666FF6666010101FF9966FF9966FF99 + 66FF9966FF9966FF9966FF9966FF9966FF9966010101FFCC66FFCC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66010101FFFF66FFFF66FFFF66FFFF66 + FFFF66FFFF66FFFF66FFFF66FFFF660101010101010101010101010101010101 + 0101010101010101010101010101010100000000000000000000000000000000 + 0000000000000000000000000000010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 01010101010101010101010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCC000000000000000000000000000000000000000000000000 + 000000000000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC00 + 00010101CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC330001 + 0101CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600010101 + CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900010101CCCC + 00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00010101CCFF00CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00010101CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0033CC0033010101CC3333CC3333CC33 + 33CC3333CC3333CC3333CC3333CC3333CC3333010101CC6633CC6633CC6633CC + 6633CC6633CC6633CC6633CC6633CC6633010101CC9933CC9933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933010101CCCC33CCCC33CCCC33CCCC33CCCC + 33CCCC33CCCC33CCCC33CCCC33010101CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF33CCFF33CCFF33CCFF33010101CC0066CC0066CC0066CC0066CC0066CC0066 + CC0066CC0066CC0066010101CC3366CC3366CC3366CC3366CC3366CC3366CC33 + 66CC3366CC3366010101CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC + 6666CC6666010101CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966 + CC9966010101CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC + 66010101CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF6601 + 0101010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + 000000000000000000000000000000000000000000000000000000000000CC00 + 00CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000010101CC3300CC + 3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300010101CC6600CC6600 + CC6600CC6600CC6600CC6600CC6600CC6600CC6600010101CC9900CC9900CC99 + 00CC9900CC9900CC9900CC9900CC9900CC9900010101CCCC00CCCC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC00CCCC00010101CCFF00CCFF00CCFF00CCFF00 + CCFF00CCFF00CCFF00CCFF00CCFF00010101CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0033CC0033010101CC3333CC3333CC3333CC3333CC3333CC + 3333CC3333CC3333CC3333010101CC6633CC6633CC6633CC6633CC6633CC6633 + CC6633CC6633CC6633010101CC9933CC9933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933010101CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC + CC33CCCC33010101CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33 + CCFF33010101CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC00 + 66010101CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC336601 + 0101CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666010101 + CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966010101CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66010101CCFF66CC + FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66010101010101CCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC0000000000000000 + 00000000000000000000000000000000000000000000CC0000CC0000CC0000CC + 0000CC0000CC0000CC0000CC0000CC0000010101CC3300CC3300CC3300CC3300 + CC3300CC3300CC3300CC3300CC3300010101CC6600CC6600CC6600CC6600CC66 + 00CC6600CC6600CC6600CC6600010101CC9900CC9900CC9900CC9900CC9900CC + 9900CC9900CC9900CC9900010101CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00 + CCCC00CCCC00CCCC00010101CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CCFF00010101CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC + 0033CC0033010101CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333 + CC3333010101CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC66 + 33010101CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC993301 + 0101CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33010101 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33010101CC00 + 66CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066010101CC3366CC + 3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366010101CC6666CC6666 + CC6666CC6666CC6666CC6666CC6666CC6666CC6666010101CC9966CC9966CC99 + 66CC9966CC9966CC9966CC9966CC9966CC9966010101CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CCCC66CCCC66CCCC66010101CCFF66CCFF66CCFF66CCFF66 + CCFF66CCFF66CCFF66CCFF66CCFF66010101010101CCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC00000000000000000000000000000000 + 0000000000000000000000000000CC0000CC0000CC0000CC0000CC0000CC0000 + CC0000CC0000CC0000010101CC3300CC3300CC3300CC3300CC3300CC3300CC33 + 00CC3300CC3300010101CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC + 6600CC6600010101CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900 + CC9900010101CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC + 00010101CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF0001 + 0101CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033010101 + CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333010101CC66 + 33CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633010101CC9933CC + 9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933010101CCCC33CCCC33 + CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33010101CCFF33CCFF33CCFF + 33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33010101CC0066CC0066CC0066CC + 0066CC0066CC0066CC0066CC0066CC0066010101CC3366CC3366CC3366CC3366 + CC3366CC3366CC3366CC3366CC3366010101CC6666CC6666CC6666CC6666CC66 + 66CC6666CC6666CC6666CC6666010101CC9966CC9966CC9966CC9966CC9966CC + 9966CC9966CC9966CC9966010101CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66 + CCCC66CCCC66CCCC66010101CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF + 66CCFF66CCFF66010101010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCC000000000000000000000000000000000000000000000000 + 000000000000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC00 + 00010101CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC330001 + 0101CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600010101 + CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900010101CCCC + 00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00010101CCFF00CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00010101CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0033CC0033010101CC3333CC3333CC33 + 33CC3333CC3333CC3333CC3333CC3333CC3333010101CC6633CC6633CC6633CC + 6633CC6633CC6633CC6633CC6633CC6633010101CC9933CC9933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933010101CCCC33CCCC33CCCC33CCCC33CCCC + 33CCCC33CCCC33CCCC33CCCC33010101CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF33CCFF33CCFF33CCFF33010101CC0066CC0066CC0066CC0066CC0066CC0066 + CC0066CC0066CC0066010101CC3366CC3366CC3366CC3366CC3366CC3366CC33 + 66CC3366CC3366010101CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC + 6666CC6666010101CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966 + CC9966010101CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC + 66010101CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF6601 + 0101010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + 000000000000000000000000000000000000000000000000000000000000CC00 + 00CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000010101CC3300CC + 3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300010101CC6600CC6600 + CC6600CC6600CC6600CC6600CC6600CC6600CC6600010101CC9900CC9900CC99 + 00CC9900CC9900CC9900CC9900CC9900CC9900010101CCCC00CCCC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC00CCCC00010101CCFF00CCFF00CCFF00CCFF00 + CCFF00CCFF00CCFF00CCFF00CCFF00010101CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0033CC0033010101CC3333CC3333CC3333CC3333CC3333CC + 3333CC3333CC3333CC3333010101CC6633CC6633CC6633CC6633CC6633CC6633 + CC6633CC6633CC6633010101CC9933CC9933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933010101CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC + CC33CCCC33010101CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33 + CCFF33010101CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC00 + 66010101CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC336601 + 0101CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666010101 + CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966010101CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66010101CCFF66CC + FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66010101010101CCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC0000000000000000 + 00000000000000000000000000000000000000000000CC0000CC0000CC0000CC + 0000CC0000CC0000CC0000CC0000CC0000010101CC3300CC3300CC3300CC3300 + CC3300CC3300CC3300CC3300CC3300010101CC6600CC6600CC6600CC6600CC66 + 00CC6600CC6600CC6600CC6600010101CC9900CC9900CC9900CC9900CC9900CC + 9900CC9900CC9900CC9900010101CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00 + CCCC00CCCC00CCCC00010101CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CCFF00010101CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC + 0033CC0033010101CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333 + CC3333010101CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC66 + 33010101CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC993301 + 0101CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33010101 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33010101CC00 + 66CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066010101CC3366CC + 3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366010101CC6666CC6666 + CC6666CC6666CC6666CC6666CC6666CC6666CC6666010101CC9966CC9966CC99 + 66CC9966CC9966CC9966CC9966CC9966CC9966010101CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CCCC66CCCC66CCCC66010101CCFF66CCFF66CCFF66CCFF66 + CCFF66CCFF66CCFF66CCFF66CCFF66010101010101CCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC00000000000000000000000000000000 + 0000000000000000000000000000CC0000CC0000CC0000CC0000CC0000CC0000 + CC0000CC0000CC0000010101CC3300CC3300CC3300CC3300CC3300CC3300CC33 + 00CC3300CC3300010101CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC + 6600CC6600010101CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900 + CC9900010101CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC + 00010101CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF0001 + 0101CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033010101 + CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333010101CC66 + 33CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633010101CC9933CC + 9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933010101CCCC33CCCC33 + CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33010101CCFF33CCFF33CCFF + 33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33010101CC0066CC0066CC0066CC + 0066CC0066CC0066CC0066CC0066CC0066010101CC3366CC3366CC3366CC3366 + CC3366CC3366CC3366CC3366CC3366010101CC6666CC6666CC6666CC6666CC66 + 66CC6666CC6666CC6666CC6666010101CC9966CC9966CC9966CC9966CC9966CC + 9966CC9966CC9966CC9966010101CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66 + CCCC66CCCC66CCCC66010101CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF + 66CCFF66CCFF66010101010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCC000000000000000000000000000000000000000000000000 + 000000000000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC00 + 00010101CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC330001 + 0101CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600010101 + CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900010101CCCC + 00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00010101CCFF00CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00010101CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0033CC0033010101CC3333CC3333CC33 + 33CC3333CC3333CC3333CC3333CC3333CC3333010101CC6633CC6633CC6633CC + 6633CC6633CC6633CC6633CC6633CC6633010101CC9933CC9933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933010101CCCC33CCCC33CCCC33CCCC33CCCC + 33CCCC33CCCC33CCCC33CCCC33010101CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF33CCFF33CCFF33CCFF33010101CC0066CC0066CC0066CC0066CC0066CC0066 + CC0066CC0066CC0066010101CC3366CC3366CC3366CC3366CC3366CC3366CC33 + 66CC3366CC3366010101CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC + 6666CC6666010101CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966 + CC9966010101CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC + 66010101CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF6601 + 0101010101010101010101010101010101010101010101010101010101010101 + 0000000000000000000000000000000000000000000000000000000000000101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101999999 + 9999999999999999999999999999999999999999999999990000000000000000 + 0000000000000000000000000000000000000000000099000099000099000099 + 0000990000990000990000990000990000010101993300993300993300993300 + 9933009933009933009933009933000101019966009966009966009966009966 + 0099660099660099660099660001010199990099990099990099990099990099 + 990099990099990099990001010199CC0099CC0099CC0099CC0099CC0099CC00 + 99CC0099CC0099CC0001010199FF0099FF0099FF0099FF0099FF0099FF0099FF + 0099FF0099FF0001010199003399003399003399003399003399003399003399 + 0033990033010101993333993333993333993333993333993333993333993333 + 9933330101019966339966339966339966339966339966339966339966339966 + 3301010199993399993399993399993399993399993399993399993399993301 + 010199CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC33010101 + 99FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF330101019900 + 6699006699006699006699006699006699006699006699006601010199336699 + 3366993366993366993366993366993366993366993366010101996666996666 + 9966669966669966669966669966669966669966660101019999669999669999 + 6699996699996699996699996699996699996601010199CC6699CC6699CC6699 + CC6699CC6699CC6699CC6699CC6699CC6601010199FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF6699FF660101010101019999999999999999999999 + 9999999999999999999999999999999900000000000000000000000000000000 + 0000000000000000000000000000990000990000990000990000990000990000 + 9900009900009900000101019933009933009933009933009933009933009933 + 0099330099330001010199660099660099660099660099660099660099660099 + 6600996600010101999900999900999900999900999900999900999900999900 + 99990001010199CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC + 0001010199FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0001 + 0101990033990033990033990033990033990033990033990033990033010101 + 9933339933339933339933339933339933339933339933339933330101019966 + 3399663399663399663399663399663399663399663399663301010199993399 + 993399993399993399993399993399993399993399993301010199CC3399CC33 + 99CC3399CC3399CC3399CC3399CC3399CC3399CC3301010199FF3399FF3399FF + 3399FF3399FF3399FF3399FF3399FF3399FF3301010199006699006699006699 + 0066990066990066990066990066990066010101993366993366993366993366 + 9933669933669933669933669933660101019966669966669966669966669966 + 6699666699666699666699666601010199996699996699996699996699996699 + 996699996699996699996601010199CC6699CC6699CC6699CC6699CC6699CC66 + 99CC6699CC6699CC6601010199FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF6699FF6601010101010199999999999999999999999999999999999999 + 9999999999999999000000000000000000000000000000000000000000000000 + 0000000000009900009900009900009900009900009900009900009900009900 + 0001010199330099330099330099330099330099330099330099330099330001 + 0101996600996600996600996600996600996600996600996600996600010101 + 99990099990099990099990099990099990099990099990099990001010199CC + 0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0001010199FF0099 + FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF00010101990033990033 + 9900339900339900339900339900339900339900330101019933339933339933 + 3399333399333399333399333399333399333301010199663399663399663399 + 6633996633996633996633996633996633010101999933999933999933999933 + 99993399993399993399993399993301010199CC3399CC3399CC3399CC3399CC + 3399CC3399CC3399CC3399CC3301010199FF3399FF3399FF3399FF3399FF3399 + FF3399FF3399FF3399FF33010101990066990066990066990066990066990066 + 9900669900669900660101019933669933669933669933669933669933669933 + 6699336699336601010199666699666699666699666699666699666699666699 + 6666996666010101999966999966999966999966999966999966999966999966 + 99996601010199CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC + 6601010199FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6601 + 0101010101999999999999999999999999999999999999999999999999999999 + 0000000000000000000000000000000000000000000000000000000000009900 + 0099000099000099000099000099000099000099000099000001010199330099 + 3300993300993300993300993300993300993300993300010101996600996600 + 9966009966009966009966009966009966009966000101019999009999009999 + 0099990099990099990099990099990099990001010199CC0099CC0099CC0099 + CC0099CC0099CC0099CC0099CC0099CC0001010199FF0099FF0099FF0099FF00 + 99FF0099FF0099FF0099FF0099FF000101019900339900339900339900339900 + 3399003399003399003399003301010199333399333399333399333399333399 + 3333993333993333993333010101996633996633996633996633996633996633 + 9966339966339966330101019999339999339999339999339999339999339999 + 3399993399993301010199CC3399CC3399CC3399CC3399CC3399CC3399CC3399 + CC3399CC3301010199FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF33 + 99FF330101019900669900669900669900669900669900669900669900669900 + 6601010199336699336699336699336699336699336699336699336699336601 + 0101996666996666996666996666996666996666996666996666996666010101 + 99996699996699996699996699996699996699996699996699996601010199CC + 6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6601010199FF6699 + FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF66010101010101999999 + 9999999999999999999999999999999999999999999999990000000000000000 + 0000000000000000000000000000000000000000000099000099000099000099 + 0000990000990000990000990000990000010101993300993300993300993300 + 9933009933009933009933009933000101019966009966009966009966009966 + 0099660099660099660099660001010199990099990099990099990099990099 + 990099990099990099990001010199CC0099CC0099CC0099CC0099CC0099CC00 + 99CC0099CC0099CC0001010199FF0099FF0099FF0099FF0099FF0099FF0099FF + 0099FF0099FF0001010199003399003399003399003399003399003399003399 + 0033990033010101993333993333993333993333993333993333993333993333 + 9933330101019966339966339966339966339966339966339966339966339966 + 3301010199993399993399993399993399993399993399993399993399993301 + 010199CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC33010101 + 99FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF330101019900 + 6699006699006699006699006699006699006699006699006601010199336699 + 3366993366993366993366993366993366993366993366010101996666996666 + 9966669966669966669966669966669966669966660101019999669999669999 + 6699996699996699996699996699996699996601010199CC6699CC6699CC6699 + CC6699CC6699CC6699CC6699CC6699CC6601010199FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF6699FF660101010101019999999999999999999999 + 9999999999999999999999999999999900000000000000000000000000000000 + 0000000000000000000000000000990000990000990000990000990000990000 + 9900009900009900000101019933009933009933009933009933009933009933 + 0099330099330001010199660099660099660099660099660099660099660099 + 6600996600010101999900999900999900999900999900999900999900999900 + 99990001010199CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC + 0001010199FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0001 + 0101990033990033990033990033990033990033990033990033990033010101 + 9933339933339933339933339933339933339933339933339933330101019966 + 3399663399663399663399663399663399663399663399663301010199993399 + 993399993399993399993399993399993399993399993301010199CC3399CC33 + 99CC3399CC3399CC3399CC3399CC3399CC3399CC3301010199FF3399FF3399FF + 3399FF3399FF3399FF3399FF3399FF3399FF3301010199006699006699006699 + 0066990066990066990066990066990066010101993366993366993366993366 + 9933669933669933669933669933660101019966669966669966669966669966 + 6699666699666699666699666601010199996699996699996699996699996699 + 996699996699996699996601010199CC6699CC6699CC6699CC6699CC6699CC66 + 99CC6699CC6699CC6601010199FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF6699FF6601010101010199999999999999999999999999999999999999 + 9999999999999999000000000000000000000000000000000000000000000000 + 0000000000009900009900009900009900009900009900009900009900009900 + 0001010199330099330099330099330099330099330099330099330099330001 + 0101996600996600996600996600996600996600996600996600996600010101 + 99990099990099990099990099990099990099990099990099990001010199CC + 0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0001010199FF0099 + FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF00010101990033990033 + 9900339900339900339900339900339900339900330101019933339933339933 + 3399333399333399333399333399333399333301010199663399663399663399 + 6633996633996633996633996633996633010101999933999933999933999933 + 99993399993399993399993399993301010199CC3399CC3399CC3399CC3399CC + 3399CC3399CC3399CC3399CC3301010199FF3399FF3399FF3399FF3399FF3399 + FF3399FF3399FF3399FF33010101990066990066990066990066990066990066 + 9900669900669900660101019933669933669933669933669933669933669933 + 6699336699336601010199666699666699666699666699666699666699666699 + 6666996666010101999966999966999966999966999966999966999966999966 + 99996601010199CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC + 6601010199FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6601 + 0101010101999999999999999999999999999999999999999999999999999999 + 0000000000000000000000000000000000000000000000000000000000009900 + 0099000099000099000099000099000099000099000099000001010199330099 + 3300993300993300993300993300993300993300993300010101996600996600 + 9966009966009966009966009966009966009966000101019999009999009999 + 0099990099990099990099990099990099990001010199CC0099CC0099CC0099 + CC0099CC0099CC0099CC0099CC0099CC0001010199FF0099FF0099FF0099FF00 + 99FF0099FF0099FF0099FF0099FF000101019900339900339900339900339900 + 3399003399003399003399003301010199333399333399333399333399333399 + 3333993333993333993333010101996633996633996633996633996633996633 + 9966339966339966330101019999339999339999339999339999339999339999 + 3399993399993301010199CC3399CC3399CC3399CC3399CC3399CC3399CC3399 + CC3399CC3301010199FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF33 + 99FF330101019900669900669900669900669900669900669900669900669900 + 6601010199336699336699336699336699336699336699336699336699336601 + 0101996666996666996666996666996666996666996666996666996666010101 + 99996699996699996699996699996699996699996699996699996601010199CC + 6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6601010199FF6699 + FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF66010101010101999999 + 9999999999999999999999999999999999999999999999990000000000000000 + 0000000000000000000000000000000000000000000099000099000099000099 + 0000990000990000990000990000990000010101993300993300993300993300 + 9933009933009933009933009933000101019966009966009966009966009966 + 0099660099660099660099660001010199990099990099990099990099990099 + 990099990099990099990001010199CC0099CC0099CC0099CC0099CC0099CC00 + 99CC0099CC0099CC0001010199FF0099FF0099FF0099FF0099FF0099FF0099FF + 0099FF0099FF0001010199003399003399003399003399003399003399003399 + 0033990033010101993333993333993333993333993333993333993333993333 + 9933330101019966339966339966339966339966339966339966339966339966 + 3301010199993399993399993399993399993399993399993399993399993301 + 010199CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC33010101 + 99FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF330101019900 + 6699006699006699006699006699006699006699006699006601010199336699 + 3366993366993366993366993366993366993366993366010101996666996666 + 9966669966669966669966669966669966669966660101019999669999669999 + 6699996699996699996699996699996699996601010199CC6699CC6699CC6699 + CC6699CC6699CC6699CC6699CC6699CC6601010199FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF6699FF660101010101010101010101010101010101 + 0101010101010101010101010101010100000000000000000000000000000000 + 0000000000000000000000000000010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010166666666666666666666666666666666666666 + 6666666666666666000000000000000000000000000000000000000000000000 + 0000000000006600006600006600006600006600006600006600006600006600 + 0001010166330066330066330066330066330066330066330066330066330001 + 0101666600666600666600666600666600666600666600666600666600010101 + 66990066990066990066990066990066990066990066990066990001010166CC + 0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0001010166FF0066 + FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF00010101660033660033 + 6600336600336600336600336600336600336600330101016633336633336633 + 3366333366333366333366333366333366333301010166663366663366663366 + 6633666633666633666633666633666633010101669933669933669933669933 + 66993366993366993366993366993301010166CC3366CC3366CC3366CC3366CC + 3366CC3366CC3366CC3366CC3301010166FF3366FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF33010101660066660066660066660066660066660066 + 6600666600666600660101016633666633666633666633666633666633666633 + 6666336666336601010166666666666666666666666666666666666666666666 + 6666666666010101669966669966669966669966669966669966669966669966 + 66996601010166CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC + 6601010166FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6601 + 0101010101666666666666666666666666666666666666666666666666666666 + 0000000000000000000000000000000000000000000000000000000000006600 + 0066000066000066000066000066000066000066000066000001010166330066 + 3300663300663300663300663300663300663300663300010101666600666600 + 6666006666006666006666006666006666006666000101016699006699006699 + 0066990066990066990066990066990066990001010166CC0066CC0066CC0066 + CC0066CC0066CC0066CC0066CC0066CC0001010166FF0066FF0066FF0066FF00 + 66FF0066FF0066FF0066FF0066FF000101016600336600336600336600336600 + 3366003366003366003366003301010166333366333366333366333366333366 + 3333663333663333663333010101666633666633666633666633666633666633 + 6666336666336666330101016699336699336699336699336699336699336699 + 3366993366993301010166CC3366CC3366CC3366CC3366CC3366CC3366CC3366 + CC3366CC3301010166FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF33 + 66FF330101016600666600666600666600666600666600666600666600666600 + 6601010166336666336666336666336666336666336666336666336666336601 + 0101666666666666666666666666666666666666666666666666666666010101 + 66996666996666996666996666996666996666996666996666996601010166CC + 6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6601010166FF6666 + FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF66010101010101666666 + 6666666666666666666666666666666666666666666666660000000000000000 + 0000000000000000000000000000000000000000000066000066000066000066 + 0000660000660000660000660000660000010101663300663300663300663300 + 6633006633006633006633006633000101016666006666006666006666006666 + 0066660066660066660066660001010166990066990066990066990066990066 + 990066990066990066990001010166CC0066CC0066CC0066CC0066CC0066CC00 + 66CC0066CC0066CC0001010166FF0066FF0066FF0066FF0066FF0066FF0066FF + 0066FF0066FF0001010166003366003366003366003366003366003366003366 + 0033660033010101663333663333663333663333663333663333663333663333 + 6633330101016666336666336666336666336666336666336666336666336666 + 3301010166993366993366993366993366993366993366993366993366993301 + 010166CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC33010101 + 66FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF330101016600 + 6666006666006666006666006666006666006666006666006601010166336666 + 3366663366663366663366663366663366663366663366010101666666666666 + 6666666666666666666666666666666666666666660101016699666699666699 + 6666996666996666996666996666996666996601010166CC6666CC6666CC6666 + CC6666CC6666CC6666CC6666CC6666CC6601010166FF6666FF6666FF6666FF66 + 66FF6666FF6666FF6666FF6666FF660101010101016666666666666666666666 + 6666666666666666666666666666666600000000000000000000000000000000 + 0000000000000000000000000000660000660000660000660000660000660000 + 6600006600006600000101016633006633006633006633006633006633006633 + 0066330066330001010166660066660066660066660066660066660066660066 + 6600666600010101669900669900669900669900669900669900669900669900 + 66990001010166CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC + 0001010166FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0001 + 0101660033660033660033660033660033660033660033660033660033010101 + 6633336633336633336633336633336633336633336633336633330101016666 + 3366663366663366663366663366663366663366663366663301010166993366 + 993366993366993366993366993366993366993366993301010166CC3366CC33 + 66CC3366CC3366CC3366CC3366CC3366CC3366CC3301010166FF3366FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3301010166006666006666006666 + 0066660066660066660066660066660066010101663366663366663366663366 + 6633666633666633666633666633660101016666666666666666666666666666 + 6666666666666666666666666601010166996666996666996666996666996666 + 996666996666996666996601010166CC6666CC6666CC6666CC6666CC6666CC66 + 66CC6666CC6666CC6601010166FF6666FF6666FF6666FF6666FF6666FF6666FF + 6666FF6666FF6601010101010166666666666666666666666666666666666666 + 6666666666666666000000000000000000000000000000000000000000000000 + 0000000000006600006600006600006600006600006600006600006600006600 + 0001010166330066330066330066330066330066330066330066330066330001 + 0101666600666600666600666600666600666600666600666600666600010101 + 66990066990066990066990066990066990066990066990066990001010166CC + 0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0001010166FF0066 + FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF00010101660033660033 + 6600336600336600336600336600336600336600330101016633336633336633 + 3366333366333366333366333366333366333301010166663366663366663366 + 6633666633666633666633666633666633010101669933669933669933669933 + 66993366993366993366993366993301010166CC3366CC3366CC3366CC3366CC + 3366CC3366CC3366CC3366CC3301010166FF3366FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF33010101660066660066660066660066660066660066 + 6600666600666600660101016633666633666633666633666633666633666633 + 6666336666336601010166666666666666666666666666666666666666666666 + 6666666666010101669966669966669966669966669966669966669966669966 + 66996601010166CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC + 6601010166FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6601 + 0101010101666666666666666666666666666666666666666666666666666666 + 0000000000000000000000000000000000000000000000000000000000006600 + 0066000066000066000066000066000066000066000066000001010166330066 + 3300663300663300663300663300663300663300663300010101666600666600 + 6666006666006666006666006666006666006666000101016699006699006699 + 0066990066990066990066990066990066990001010166CC0066CC0066CC0066 + CC0066CC0066CC0066CC0066CC0066CC0001010166FF0066FF0066FF0066FF00 + 66FF0066FF0066FF0066FF0066FF000101016600336600336600336600336600 + 3366003366003366003366003301010166333366333366333366333366333366 + 3333663333663333663333010101666633666633666633666633666633666633 + 6666336666336666330101016699336699336699336699336699336699336699 + 3366993366993301010166CC3366CC3366CC3366CC3366CC3366CC3366CC3366 + CC3366CC3301010166FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF33 + 66FF330101016600666600666600666600666600666600666600666600666600 + 6601010166336666336666336666336666336666336666336666336666336601 + 0101666666666666666666666666666666666666666666666666666666010101 + 66996666996666996666996666996666996666996666996666996601010166CC + 6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6601010166FF6666 + FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF66010101010101666666 + 6666666666666666666666666666666666666666666666660000000000000000 + 0000000000000000000000000000000000000000000066000066000066000066 + 0000660000660000660000660000660000010101663300663300663300663300 + 6633006633006633006633006633000101016666006666006666006666006666 + 0066660066660066660066660001010166990066990066990066990066990066 + 990066990066990066990001010166CC0066CC0066CC0066CC0066CC0066CC00 + 66CC0066CC0066CC0001010166FF0066FF0066FF0066FF0066FF0066FF0066FF + 0066FF0066FF0001010166003366003366003366003366003366003366003366 + 0033660033010101663333663333663333663333663333663333663333663333 + 6633330101016666336666336666336666336666336666336666336666336666 + 3301010166993366993366993366993366993366993366993366993366993301 + 010166CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC33010101 + 66FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF330101016600 + 6666006666006666006666006666006666006666006666006601010166336666 + 3366663366663366663366663366663366663366663366010101666666666666 + 6666666666666666666666666666666666666666660101016699666699666699 + 6666996666996666996666996666996666996601010166CC6666CC6666CC6666 + CC6666CC6666CC6666CC6666CC6666CC6601010166FF6666FF6666FF6666FF66 + 66FF6666FF6666FF6666FF6666FF660101010101016666666666666666666666 + 6666666666666666666666666666666600000000000000000000000000000000 + 0000000000000000000000000000660000660000660000660000660000660000 + 6600006600006600000101016633006633006633006633006633006633006633 + 0066330066330001010166660066660066660066660066660066660066660066 + 6600666600010101669900669900669900669900669900669900669900669900 + 66990001010166CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC + 0001010166FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0001 + 0101660033660033660033660033660033660033660033660033660033010101 + 6633336633336633336633336633336633336633336633336633330101016666 + 3366663366663366663366663366663366663366663366663301010166993366 + 993366993366993366993366993366993366993366993301010166CC3366CC33 + 66CC3366CC3366CC3366CC3366CC3366CC3366CC3301010166FF3366FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3301010166006666006666006666 + 0066660066660066660066660066660066010101663366663366663366663366 + 6633666633666633666633666633660101016666666666666666666666666666 + 6666666666666666666666666601010166996666996666996666996666996666 + 996666996666996666996601010166CC6666CC6666CC6666CC6666CC6666CC66 + 66CC6666CC6666CC6601010166FF6666FF6666FF6666FF6666FF6666FF6666FF + 6666FF6666FF6601010101010166666666666666666666666666666666666666 + 6666666666666666000000000000000000000000000000000000000000000000 + 0000000000006600006600006600006600006600006600006600006600006600 + 0001010166330066330066330066330066330066330066330066330066330001 + 0101666600666600666600666600666600666600666600666600666600010101 + 66990066990066990066990066990066990066990066990066990001010166CC + 0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0001010166FF0066 + FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF00010101660033660033 + 6600336600336600336600336600336600336600330101016633336633336633 + 3366333366333366333366333366333366333301010166663366663366663366 + 6633666633666633666633666633666633010101669933669933669933669933 + 66993366993366993366993366993301010166CC3366CC3366CC3366CC3366CC + 3366CC3366CC3366CC3366CC3301010166FF3366FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF33010101660066660066660066660066660066660066 + 6600666600666600660101016633666633666633666633666633666633666633 + 6666336666336601010166666666666666666666666666666666666666666666 + 6666666666010101669966669966669966669966669966669966669966669966 + 66996601010166CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC + 6601010166FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6601 + 0101010101010101010101010101010101010101010101010101010101010101 + 0000000000000000000000000000000000000000000000000000000000000101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101333333 + 3333333333333333333333333333333333333333333333330000000000000000 + 0000000000000000000000000000000000000000000033000033000033000033 + 0000330000330000330000330000330000010101333300333300333300333300 + 3333003333003333003333003333000101013366003366003366003366003366 + 0033660033660033660033660001010133990033990033990033990033990033 + 990033990033990033990001010133CC0033CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0001010133FF0033FF0033FF0033FF0033FF0033FF0033FF + 0033FF0033FF0001010133003333003333003333003333003333003333003333 + 0033330033010101333333333333333333333333333333333333333333333333 + 3333330101013366333366333366333366333366333366333366333366333366 + 3301010133993333993333993333993333993333993333993333993333993301 + 010133CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC33010101 + 33FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF330101013300 + 6633006633006633006633006633006633006633006633006601010133336633 + 3366333366333366333366333366333366333366333366010101336666336666 + 3366663366663366663366663366663366663366660101013399663399663399 + 6633996633996633996633996633996633996601010133CC6633CC6633CC6633 + CC6633CC6633CC6633CC6633CC6633CC6601010133FF6633FF6633FF6633FF66 + 33FF6633FF6633FF6633FF6633FF660101010101013333333333333333333333 + 3333333333333333333333333333333300000000000000000000000000000000 + 0000000000000000000000000000330000330000330000330000330000330000 + 3300003300003300000101013333003333003333003333003333003333003333 + 0033330033330001010133660033660033660033660033660033660033660033 + 6600336600010101339900339900339900339900339900339900339900339900 + 33990001010133CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC + 0001010133FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0001 + 0101330033330033330033330033330033330033330033330033330033010101 + 3333333333333333333333333333333333333333333333333333330101013366 + 3333663333663333663333663333663333663333663333663301010133993333 + 993333993333993333993333993333993333993333993301010133CC3333CC33 + 33CC3333CC3333CC3333CC3333CC3333CC3333CC3301010133FF3333FF3333FF + 3333FF3333FF3333FF3333FF3333FF3333FF3301010133006633006633006633 + 0066330066330066330066330066330066010101333366333366333366333366 + 3333663333663333663333663333660101013366663366663366663366663366 + 6633666633666633666633666601010133996633996633996633996633996633 + 996633996633996633996601010133CC6633CC6633CC6633CC6633CC6633CC66 + 33CC6633CC6633CC6601010133FF6633FF6633FF6633FF6633FF6633FF6633FF + 6633FF6633FF6601010101010133333333333333333333333333333333333333 + 3333333333333333000000000000000000000000000000000000000000000000 + 0000000000003300003300003300003300003300003300003300003300003300 + 0001010133330033330033330033330033330033330033330033330033330001 + 0101336600336600336600336600336600336600336600336600336600010101 + 33990033990033990033990033990033990033990033990033990001010133CC + 0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0001010133FF0033 + FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF00010101330033330033 + 3300333300333300333300333300333300333300330101013333333333333333 + 3333333333333333333333333333333333333301010133663333663333663333 + 6633336633336633336633336633336633010101339933339933339933339933 + 33993333993333993333993333993301010133CC3333CC3333CC3333CC3333CC + 3333CC3333CC3333CC3333CC3301010133FF3333FF3333FF3333FF3333FF3333 + FF3333FF3333FF3333FF33010101330066330066330066330066330066330066 + 3300663300663300660101013333663333663333663333663333663333663333 + 6633336633336601010133666633666633666633666633666633666633666633 + 6666336666010101339966339966339966339966339966339966339966339966 + 33996601010133CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC + 6601010133FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6601 + 0101010101333333333333333333333333333333333333333333333333333333 + 0000000000000000000000000000000000000000000000000000000000003300 + 0033000033000033000033000033000033000033000033000001010133330033 + 3300333300333300333300333300333300333300333300010101336600336600 + 3366003366003366003366003366003366003366000101013399003399003399 + 0033990033990033990033990033990033990001010133CC0033CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0001010133FF0033FF0033FF0033FF00 + 33FF0033FF0033FF0033FF0033FF000101013300333300333300333300333300 + 3333003333003333003333003301010133333333333333333333333333333333 + 3333333333333333333333010101336633336633336633336633336633336633 + 3366333366333366330101013399333399333399333399333399333399333399 + 3333993333993301010133CC3333CC3333CC3333CC3333CC3333CC3333CC3333 + CC3333CC3301010133FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF33 + 33FF330101013300663300663300663300663300663300663300663300663300 + 6601010133336633336633336633336633336633336633336633336633336601 + 0101336666336666336666336666336666336666336666336666336666010101 + 33996633996633996633996633996633996633996633996633996601010133CC + 6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6601010133FF6633 + FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF66010101010101333333 + 3333333333333333333333333333333333333333333333330000000000000000 + 0000000000000000000000000000000000000000000033000033000033000033 + 0000330000330000330000330000330000010101333300333300333300333300 + 3333003333003333003333003333000101013366003366003366003366003366 + 0033660033660033660033660001010133990033990033990033990033990033 + 990033990033990033990001010133CC0033CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0001010133FF0033FF0033FF0033FF0033FF0033FF0033FF + 0033FF0033FF0001010133003333003333003333003333003333003333003333 + 0033330033010101333333333333333333333333333333333333333333333333 + 3333330101013366333366333366333366333366333366333366333366333366 + 3301010133993333993333993333993333993333993333993333993333993301 + 010133CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC33010101 + 33FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF330101013300 + 6633006633006633006633006633006633006633006633006601010133336633 + 3366333366333366333366333366333366333366333366010101336666336666 + 3366663366663366663366663366663366663366660101013399663399663399 + 6633996633996633996633996633996633996601010133CC6633CC6633CC6633 + CC6633CC6633CC6633CC6633CC6633CC6601010133FF6633FF6633FF6633FF66 + 33FF6633FF6633FF6633FF6633FF660101010101013333333333333333333333 + 3333333333333333333333333333333300000000000000000000000000000000 + 0000000000000000000000000000330000330000330000330000330000330000 + 3300003300003300000101013333003333003333003333003333003333003333 + 0033330033330001010133660033660033660033660033660033660033660033 + 6600336600010101339900339900339900339900339900339900339900339900 + 33990001010133CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC + 0001010133FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0001 + 0101330033330033330033330033330033330033330033330033330033010101 + 3333333333333333333333333333333333333333333333333333330101013366 + 3333663333663333663333663333663333663333663333663301010133993333 + 993333993333993333993333993333993333993333993301010133CC3333CC33 + 33CC3333CC3333CC3333CC3333CC3333CC3333CC3301010133FF3333FF3333FF + 3333FF3333FF3333FF3333FF3333FF3333FF3301010133006633006633006633 + 0066330066330066330066330066330066010101333366333366333366333366 + 3333663333663333663333663333660101013366663366663366663366663366 + 6633666633666633666633666601010133996633996633996633996633996633 + 996633996633996633996601010133CC6633CC6633CC6633CC6633CC6633CC66 + 33CC6633CC6633CC6601010133FF6633FF6633FF6633FF6633FF6633FF6633FF + 6633FF6633FF6601010101010133333333333333333333333333333333333333 + 3333333333333333000000000000000000000000000000000000000000000000 + 0000000000003300003300003300003300003300003300003300003300003300 + 0001010133330033330033330033330033330033330033330033330033330001 + 0101336600336600336600336600336600336600336600336600336600010101 + 33990033990033990033990033990033990033990033990033990001010133CC + 0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0001010133FF0033 + FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF00010101330033330033 + 3300333300333300333300333300333300333300330101013333333333333333 + 3333333333333333333333333333333333333301010133663333663333663333 + 6633336633336633336633336633336633010101339933339933339933339933 + 33993333993333993333993333993301010133CC3333CC3333CC3333CC3333CC + 3333CC3333CC3333CC3333CC3301010133FF3333FF3333FF3333FF3333FF3333 + FF3333FF3333FF3333FF33010101330066330066330066330066330066330066 + 3300663300663300660101013333663333663333663333663333663333663333 + 6633336633336601010133666633666633666633666633666633666633666633 + 6666336666010101339966339966339966339966339966339966339966339966 + 33996601010133CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC + 6601010133FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6601 + 0101010101333333333333333333333333333333333333333333333333333333 + 0000000000000000000000000000000000000000000000000000000000003300 + 0033000033000033000033000033000033000033000033000001010133330033 + 3300333300333300333300333300333300333300333300010101336600336600 + 3366003366003366003366003366003366003366000101013399003399003399 + 0033990033990033990033990033990033990001010133CC0033CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0001010133FF0033FF0033FF0033FF00 + 33FF0033FF0033FF0033FF0033FF000101013300333300333300333300333300 + 3333003333003333003333003301010133333333333333333333333333333333 + 3333333333333333333333010101336633336633336633336633336633336633 + 3366333366333366330101013399333399333399333399333399333399333399 + 3333993333993301010133CC3333CC3333CC3333CC3333CC3333CC3333CC3333 + CC3333CC3301010133FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF33 + 33FF330101013300663300663300663300663300663300663300663300663300 + 6601010133336633336633336633336633336633336633336633336633336601 + 0101336666336666336666336666336666336666336666336666336666010101 + 33996633996633996633996633996633996633996633996633996601010133CC + 6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6601010133FF6633 + FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF66010101010101333333 + 3333333333333333333333333333333333333333333333330000000000000000 + 0000000000000000000000000000000000000000000033000033000033000033 + 0000330000330000330000330000330000010101333300333300333300333300 + 3333003333003333003333003333000101013366003366003366003366003366 + 0033660033660033660033660001010133990033990033990033990033990033 + 990033990033990033990001010133CC0033CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0001010133FF0033FF0033FF0033FF0033FF0033FF0033FF + 0033FF0033FF0001010133003333003333003333003333003333003333003333 + 0033330033010101333333333333333333333333333333333333333333333333 + 3333330101013366333366333366333366333366333366333366333366333366 + 3301010133993333993333993333993333993333993333993333993333993301 + 010133CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC33010101 + 33FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF330101013300 + 6633006633006633006633006633006633006633006633006601010133336633 + 3366333366333366333366333366333366333366333366010101336666336666 + 3366663366663366663366663366663366663366660101013399663399663399 + 6633996633996633996633996633996633996601010133CC6633CC6633CC6633 + CC6633CC6633CC6633CC6633CC6633CC6601010133FF6633FF6633FF6633FF66 + 33FF6633FF6633FF6633FF6633FF660101010000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010100000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000330000330000330000330000330000330000330000330000330001 + 0101006600006600006600006600006600006600006600006600006600010101 + 00990000990000990000990000990000990000990000990000990001010100CC + 0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0001010100FF0000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00010101000033000033 + 0000330000330000330000330000330000330000330101010033330033330033 + 3300333300333300333300333300333300333301010100663300663300663300 + 6633006633006633006633006633006633010101009933009933009933009933 + 00993300993300993300993300993301010100CC3300CC3300CC3300CC3300CC + 3300CC3300CC3300CC3300CC3301010100FF3300FF3300FF3300FF3300FF3300 + FF3300FF3300FF3300FF33010101000066000066000066000066000066000066 + 0000660000660000660101010033660033660033660033660033660033660033 + 6600336600336601010100666600666600666600666600666600666600666600 + 6666006666010101009966009966009966009966009966009966009966009966 + 00996601010100CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC + 6601010100FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6601 + 0101000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000330000 + 3300003300003300003300003300003300003300003300010101006600006600 + 0066000066000066000066000066000066000066000101010099000099000099 + 0000990000990000990000990000990000990001010100CC0000CC0000CC0000 + CC0000CC0000CC0000CC0000CC0000CC0001010100FF0000FF0000FF0000FF00 + 00FF0000FF0000FF0000FF0000FF000101010000330000330000330000330000 + 3300003300003300003300003301010100333300333300333300333300333300 + 3333003333003333003333010101006633006633006633006633006633006633 + 0066330066330066330101010099330099330099330099330099330099330099 + 3300993300993301010100CC3300CC3300CC3300CC3300CC3300CC3300CC3300 + CC3300CC3301010100FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF33 + 00FF330101010000660000660000660000660000660000660000660000660000 + 6601010100336600336600336600336600336600336600336600336600336601 + 0101006666006666006666006666006666006666006666006666006666010101 + 00996600996600996600996600996600996600996600996600996601010100CC + 6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6601010100FF6600 + FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF66010101000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000003300003300003300003300 + 0033000033000033000033000033000101010066000066000066000066000066 + 0000660000660000660000660001010100990000990000990000990000990000 + 990000990000990000990001010100CC0000CC0000CC0000CC0000CC0000CC00 + 00CC0000CC0000CC0001010100FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0001010100003300003300003300003300003300003300003300 + 0033000033010101003333003333003333003333003333003333003333003333 + 0033330101010066330066330066330066330066330066330066330066330066 + 3301010100993300993300993300993300993300993300993300993300993301 + 010100CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC33010101 + 00FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF330101010000 + 6600006600006600006600006600006600006600006600006601010100336600 + 3366003366003366003366003366003366003366003366010101006666006666 + 0066660066660066660066660066660066660066660101010099660099660099 + 6600996600996600996600996600996600996601010100CC6600CC6600CC6600 + CC6600CC6600CC6600CC6600CC6600CC6601010100FF6600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600FF660101010000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000033000033000033000033000033000033000033 + 0000330000330001010100660000660000660000660000660000660000660000 + 6600006600010101009900009900009900009900009900009900009900009900 + 00990001010100CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC + 0001010100FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0001 + 0101000033000033000033000033000033000033000033000033000033010101 + 0033330033330033330033330033330033330033330033330033330101010066 + 3300663300663300663300663300663300663300663300663301010100993300 + 993300993300993300993300993300993300993300993301010100CC3300CC33 + 00CC3300CC3300CC3300CC3300CC3300CC3300CC3301010100FF3300FF3300FF + 3300FF3300FF3300FF3300FF3300FF3300FF3301010100006600006600006600 + 0066000066000066000066000066000066010101003366003366003366003366 + 0033660033660033660033660033660101010066660066660066660066660066 + 6600666600666600666600666601010100996600996600996600996600996600 + 996600996600996600996601010100CC6600CC6600CC6600CC6600CC6600CC66 + 00CC6600CC6600CC6601010100FF6600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600FF6601010100000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000330000330000330000330000330000330000330000330000330001 + 0101006600006600006600006600006600006600006600006600006600010101 + 00990000990000990000990000990000990000990000990000990001010100CC + 0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0001010100FF0000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00010101000033000033 + 0000330000330000330000330000330000330000330101010033330033330033 + 3300333300333300333300333300333300333301010100663300663300663300 + 6633006633006633006633006633006633010101009933009933009933009933 + 00993300993300993300993300993301010100CC3300CC3300CC3300CC3300CC + 3300CC3300CC3300CC3300CC3301010100FF3300FF3300FF3300FF3300FF3300 + FF3300FF3300FF3300FF33010101000066000066000066000066000066000066 + 0000660000660000660101010033660033660033660033660033660033660033 + 6600336600336601010100666600666600666600666600666600666600666600 + 6666006666010101009966009966009966009966009966009966009966009966 + 00996601010100CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC + 6601010100FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6601 + 0101000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000330000 + 3300003300003300003300003300003300003300003300010101006600006600 + 0066000066000066000066000066000066000066000101010099000099000099 + 0000990000990000990000990000990000990001010100CC0000CC0000CC0000 + CC0000CC0000CC0000CC0000CC0000CC0001010100FF0000FF0000FF0000FF00 + 00FF0000FF0000FF0000FF0000FF000101010000330000330000330000330000 + 3300003300003300003300003301010100333300333300333300333300333300 + 3333003333003333003333010101006633006633006633006633006633006633 + 0066330066330066330101010099330099330099330099330099330099330099 + 3300993300993301010100CC3300CC3300CC3300CC3300CC3300CC3300CC3300 + CC3300CC3301010100FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF33 + 00FF330101010000660000660000660000660000660000660000660000660000 + 6601010100336600336600336600336600336600336600336600336600336601 + 0101006666006666006666006666006666006666006666006666006666010101 + 00996600996600996600996600996600996600996600996600996601010100CC + 6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6601010100FF6600 + FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF66010101000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000003300003300003300003300 + 0033000033000033000033000033000101010066000066000066000066000066 + 0000660000660000660000660001010100990000990000990000990000990000 + 990000990000990000990001010100CC0000CC0000CC0000CC0000CC0000CC00 + 00CC0000CC0000CC0001010100FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0001010100003300003300003300003300003300003300003300 + 0033000033010101003333003333003333003333003333003333003333003333 + 0033330101010066330066330066330066330066330066330066330066330066 + 3301010100993300993300993300993300993300993300993300993300993301 + 010100CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC33010101 + 00FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF330101010000 + 6600006600006600006600006600006600006600006600006601010100336600 + 3366003366003366003366003366003366003366003366010101006666006666 + 0066660066660066660066660066660066660066660101010099660099660099 + 6600996600996600996600996600996600996601010100CC6600CC6600CC6600 + CC6600CC6600CC6600CC6600CC6600CC6601010100FF6600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600FF660101010000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000033000033000033000033000033000033000033 + 0000330000330001010100660000660000660000660000660000660000660000 + 6600006600010101009900009900009900009900009900009900009900009900 + 00990001010100CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC + 0001010100FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0001 + 0101000033000033000033000033000033000033000033000033000033010101 + 0033330033330033330033330033330033330033330033330033330101010066 + 3300663300663300663300663300663300663300663300663301010100993300 + 993300993300993300993300993300993300993300993301010100CC3300CC33 + 00CC3300CC3300CC3300CC3300CC3300CC3300CC3301010100FF3300FF3300FF + 3300FF3300FF3300FF3300FF3300FF3300FF3301010100006600006600006600 + 0066000066000066000066000066000066010101003366003366003366003366 + 0033660033660033660033660033660101010066660066660066660066660066 + 6600666600666600666600666601010100996600996600996600996600996600 + 996600996600996600996601010100CC6600CC6600CC6600CC6600CC6600CC66 + 00CC6600CC6600CC6601010100FF6600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600FF6601010100000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000330000330000330000330000330000330000330000330000330001 + 0101006600006600006600006600006600006600006600006600006600010101 + 00990000990000990000990000990000990000990000990000990001010100CC + 0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0001010100FF0000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00010101000033000033 + 0000330000330000330000330000330000330000330101010033330033330033 + 3300333300333300333300333300333300333301010100663300663300663300 + 6633006633006633006633006633006633010101009933009933009933009933 + 00993300993300993300993300993301010100CC3300CC3300CC3300CC3300CC + 3300CC3300CC3300CC3300CC3301010100FF3300FF3300FF3300FF3300FF3300 + FF3300FF3300FF3300FF33010101000066000066000066000066000066000066 + 0000660000660000660101010033660033660033660033660033660033660033 + 6600336600336601010100666600666600666600666600666600666600666600 + 6666006666010101009966009966009966009966009966009966009966009966 + 00996601010100CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC + 6601010100FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6601 + 0101000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000001010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101} + OnMouseDown = imgPaletteMouseDown + OnMouseMove = imgPaletteMouseMove + end + end + end + object SpTBXPanel1: TSpTBXPanel + Left = 0 + Top = 0 + Width = 213 + Height = 26 + Caption = 'SpTBXPanel1' + Align = alTop + TabOrder = 1 + OnDrawBackground = SpTBXPanel1DrawBackground + DesignSize = ( + 213 + 26) + object btnColorNone: TSpTBXSpeedButton + Left = 170 + Top = 3 + Width = 20 + Height = 20 + Anchors = [akTop, akRight] + OnClick = btnColorNoneClick + OnMouseEnter = btnColorNoneMouseEnter + OnMouseLeave = btnColorNoneMouseLeave + Images = ImageList1 + ImageIndex = 1 + OnDraw = btnColorDialogDraw + end + object btnColorDialog: TSpTBXSpeedButton + Left = 190 + Top = 3 + Width = 20 + Height = 20 + Anchors = [akTop, akRight] + OnClick = btnColorDialogClick + OnMouseEnter = btnColorDialogMouseEnter + OnMouseLeave = btnColorDialogMouseLeave + Images = ImageList1 + ImageIndex = 0 + OnDraw = btnColorDialogDraw + end + object btnColor: TSpTBXSpeedButton + Left = 2 + Top = 2 + Width = 50 + Height = 22 + OnDraw = btnColorDraw + end + object btnLabel: TSpTBXLabel + Left = 58 + Top = 3 + Width = 47 + Height = 19 + Caption = 'btnLabel' + end + end + object Timer1: TTimer + Enabled = False + Interval = 25 + OnTimer = Timer1Timer + Left = 112 + Top = 152 + end + object ImageList1: TImageList + Left = 72 + Top = 152 + Bitmap = { + 494C010105000A00040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600 + 0000000000003600000028000000400000002000000001002000000000000020 + 00000000000000000000000000000000000000000000A1A1A100000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000A5A5A500FBF6F200A5A5A500A5A5 + A500000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000AAAAAA00F6EDE400F3E6 + D900AAAAAA000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000AFAFAF00FBF6F200F5EB + E100F3E6D900AFAFAF0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000B4B4B400FBF6 + F200F5EBE100F3E6D900B4B4B400000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000BABA + BA00FBF6F200F5EBE100F3E6D900BABABA000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000BFBFBF00FBF6F200F5EBE100F4E7DC00AC8E8400954A2F00974B2D000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000C4C4C400FBF6F200D0AD9F009B523700C6835600C67D4A00984B + 2F00000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000B5978C00A0593D00D4A07A00D3996A00C7834A00A259 + 3700000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000A25B3C00DBB29200DDB18A00D59C6C00CC884F00C77D + 4300A75D39000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000AD684600DFB39000E7C4A900E1B69200D3915B00D088 + 4C00CC834900AC64400000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000AD684700C0876B00E3BDA000E1B08A00D793 + 5A00D48E5300D08A5100B6704700000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000C48E7000E4BB9C00E1B1 + 8800D8965F00D7935900D5915900B47453000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000C9957700E8C1 + 9F00E4B58A00DD9E6800DA9A6200B97B58000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000D6AB + 8E00E8C2A200E6BA9200C98E6700000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000C2856000C1845F0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000E1818F00D1496C00C92B6300C72D7700CF519F00DF8DCB000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000E87C + 7A00D6121900E1405900EE638400F373A100F071B200E45AB600D236B400C41B + BB00DC91E1000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000040404000404 + 0400040404000404040004040400040404000404040004040400040404000404 + 0400040404000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000EB6E5100E952 + 4000F8858400FF969F00FF749100FF609A00FF60B700FF78D800FC92EF00E871 + EA00B632CC00BC6ED90000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000161616001616 + 1600222222001616160016161600222222001616160016161600161616001616 + 160016161600000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFF + FF00FFFFFF0000000000000000000000000000000000F69E6D00F0774400FCA6 + 9200FF7B6F00FF515800FF5A7900FF5E9B00FF5CBC00FF57DA00FF4CF700F17B + FF00D685F1009734CF00BA90E400000000000000000000000000B07A5800B07A + 5800B07A580000000000DD9BD900DD9BD900DD9BD90000000000B177FF00B177 + FF00B177FF000000000000000000000000000000000000000000000033000033 + 3300003333000033330033330000333300003333000033000000330033003300 + 330033003300000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFF + FF00FFFFFF0000000000000000000000000000000000F87E0F00FBB98E00FF97 + 6A00FF795B00FF716B00FF768900FF7CAD00FF7BCD00FF71ED00F763FF00D952 + FF00CF7CFF00B373EC00661AD000000000000000000000000000B07A5800B07A + 5800B07A580000000000DD9BD900DD9BD900DD9BD90000000000B177FF00B177 + FF00B177FF000000000000000000000000000000000000000000000066000033 + 6600006666000066330033660000666600006633000066000000660033006600 + 660033006600000000000000000000000000000000000000000000000000C0C0 + C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0 + C000C0C0C000000000000000000000000000FDC86100FDBE6000FFD09C00FFA5 + 5B00FFA27100FF9A8400FF979B00FF9FBF00FF9FE000FE92FB00E77CFF00C966 + FF00A84FFF00BE95FD007240DD00A086E7000000000000000000B07A5800B07A + 5800B07A580000000000DD9BD900DD9BD900DD9BD90000000000B177FF00B177 + FF00B177FF000000000000000000000000000000000000000000003399000066 + 9900009999000099660066990000999900009933000099000000990066009900 + 990033009900000000000000000000000000000000000000000000000000C0C0 + C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0 + C000C0C0C000000000000000000000000000F7CA3200FEDD8000FFD16C00FFC7 + 6B00FFC78500FFC49E00FFBDB300FFBFD000FFBFF100F4B0FF00D696FF00B679 + FF00955EFF009977FF008265EC00664BDD000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000033CC000066 + CC0000CCCC0000CC660066CC0000CCCC0000CC660000CC000000CC006600CC00 + CC006600CC00000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFF + FF00FFFFFF00000000000000000000000000F2DC1B00FFF29000FFE96200FFE8 + 7600FFE79300FFE7B000FFE6CA00FFE5E500FCDEFD00E1C6FF00C2A6FF00A184 + FF007E66FF007664FF00887BF6003D2EDB000000000000000000B2EBD000B2EB + D000B2EBD000000000006DCC50006DCC50006DCC500000000000EBB06000EBB0 + 6000EBB0600000000000000000000000000000000000000000000033FF000066 + FF0000FFFF0000FF660099FF0000FFFF0000FF660000FF000000FF009900CC00 + FF006600FF00000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFF + FF00FFFFFF00000000000000000000000000EBED1800F9FA9200FAFD6400FAFD + 7B00F9FD9800FAFDB500FAFED300FAFEEF00EFF3FF00D0D5FF00AFB3FF008D91 + FF006C6FFF006769FF008283FB002C2FDE000000000000000000B2EBD000B2EB + D000B2EBD000000000006DCC50006DCC50006DCC500000000000EBB06000EBB0 + 6000EBB0600000000000000000000000000000000000000000000033FF003399 + FF0033FFFF0033FF990099FF3300FFFF3300FF993300FF333300FF339900FF33 + FF006633FF00000000000000000000000000000000000000000000000000C0C0 + C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0 + C000C0C0C000000000000000000000000000D4ED3000E4F58200E5FF6F00E0FF + 7900E0FF9500DFFFAF00DCFFC700DCFFE000D9FEFA00C5E9FF00A7CAFF0087AA + FF00698BFF00788EFF007386FB00475AE6000000000000000000B2EBD000B2EB + D000B2EBD000000000006DCC50006DCC50006DCC500000000000EBB06000EBB0 + 6000EBB0600000000000000000000000000000000000000000003366FF006699 + FF0066FFFF0066FF9900CCFF6600FFFF6600FF996600FF666600FF66CC00FF66 + FF009966FF00000000000000000000000000000000000000000000000000C0C0 + C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0 + C000C0C0C000000000000000000000000000CBEE5700C6EB6700DDFF9B00C5FF + 6F00C3FF8C00BEFFA100B9FFB300BDFFCF00BDFFEE00B0F8FF0099DEFF007EC2 + FF0063A3FF009EBDFF005983F8007792EF000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000807CFF0099CC + FF0099FFFF0099FFCC00CCFF9900FFFF9900FFCC9900FF999900FF99CC00FF99 + FF009999FF00000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFF + FF00FFFFFF0000000000000000000000000000000000A0E13800CBF69700AEFF + 6C00A4FF7A009DFF8D009BFFA300A4FFC400A2FFDF0097FFF80085EFFF006ED3 + FF0078C5FF0092C5FC001C73F4000000000000000000000000006B6FFE006B6F + FE006B6FFE000000000073AAFF0073AAFF0073AAFF000000000067D5F00067D5 + F00067D5F00000000000000000000000000000000000000000009999FF0099CC + FF0099FFFF0099FFCC00CCFF9900FFFF9900FFCCCC00FFCCCC00FF99CC00FF99 + FF00CC99FF00000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFF + FF00FFFFFF0000000000000000000000000000000000A1E5550094E25700BBF9 + 9D008AFF6E0079FF760082FF970089FFB60087FFD1007EFFEC006DFBFE0076E8 + FF009BDFFC0054BAFB0075B9FA000000000000000000000000006B6FFE006B6F + FE006B6FFE000000000073AAFF0073AAFF0073AAFF000000000067D5F00067D5 + F00067D5F0000000000000000000000000000000000000000000CCCCFF00CCCC + FF00CCFFFF00CCFFCC00CCFFCC00FFFFCC00FFCCCC00FFCCCC00FFCCCC00FFCC + FF00CCCCFF000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000006EDD3B0074E1 + 5800A1F699009EFFA6007BFF9E0070FFAE0070FFC7007CFFE300A5FFFA0098F4 + FB0055D8F50052CCFB00000000000000000000000000000000006B6FFE006B6F + FE006B6FFE000000000073AAFF0073AAFF0073AAFF000000000067D5F00067D5 + F00067D5F0000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000000000066DF + 56003AD73D006AE67C0088F3AA0096F9C40097FBD30087F7DB0068EFE0001EE7 + E6006DE6F3000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000058DF740037D96E0022D67A0025D892003BDFB20065E8D3000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000424D3E000000000000003E000000 + 2800000040000000200000000100010000000000000100000000000000000000 + 000000000000000000000000FFFFFF00BFFF0000000000000FFF000000000000 + 87FF00000000000083FF000000000000C1FF000000000000E0FF000000000000 + F01F000000000000F80F000000000000FC0F000000000000FC07000000000000 + FC03000000000000FE01000000000000FF80000000000000FFC0000000000000 + FFE1000000000000FFF3000000000000FFFFFFFFF81FFFFFFFFFFFFFE007FFFF + C007C003C003FFFFC007C0038001C447C007C0038001C447C007C0030000C447 + C007C0030000FFFFC007C0030000C447C007C0030000C447C007C0030000C447 + C007C0030000FFFFC007C0038001C447C007C0038001C447C007C003C003C447 + FFFFFFFFE007FFFFFFFFFFFFF81FFFFF} + end + object ColorDialog1: TColorDialog + Options = [cdFullOpen] + Left = 144 + Top = 152 + end +end diff --git a/internal/2.4.4/1/Lib/D11/SpTBXControls.dcu b/internal/2.4.4/1/Lib/D11/SpTBXControls.dcu new file mode 100644 index 0000000..012c2bd Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXControls.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXCustomizer.dcu b/internal/2.4.4/1/Lib/D11/SpTBXCustomizer.dcu new file mode 100644 index 0000000..926ad09 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXCustomizer.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXCustomizerForm.dcu b/internal/2.4.4/1/Lib/D11/SpTBXCustomizerForm.dcu new file mode 100644 index 0000000..0dd8048 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXCustomizerForm.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXCustomizerForm.dfm b/internal/2.4.4/1/Lib/D11/SpTBXCustomizerForm.dfm new file mode 100644 index 0000000..a3afc67 --- /dev/null +++ b/internal/2.4.4/1/Lib/D11/SpTBXCustomizerForm.dfm @@ -0,0 +1,282 @@ +object SpTBXCustomizeForm: TSpTBXCustomizeForm + Left = 219 + Top = 115 + Caption = 'Customize...' + ClientHeight = 321 + ClientWidth = 347 + Color = clBtnFace + Constraints.MinHeight = 355 + Constraints.MinWidth = 355 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [] + FormStyle = fsStayOnTop + KeyPreview = True + OldCreateOrder = False + Position = poDesigned + OnCreate = FormCreate + OnKeyDown = FormKeyDown + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object SpTBXTabControl1: TSpTBXTabControl + Left = 0 + Top = 0 + Width = 347 + Height = 286 + Align = alClient + ActiveTabIndex = 0 + HiddenItems = <> + object tabToolbars: TSpTBXTabItem + Caption = 'Toolbars' + Checked = True + end + object tabCommands: TSpTBXTabItem + Caption = 'Commands' + end + object tabShortcuts: TSpTBXTabItem + Caption = 'Shortcuts' + end + object SpTBXTabSheet2: TSpTBXTabSheet + Left = 0 + Top = 23 + Width = 347 + Height = 263 + Caption = 'Shortcuts' + ImageIndex = -1 + DesignSize = ( + 347 + 263) + TabItem = 'tabShortcuts' + object SpTBXPanel5: TSpTBXPanel + Left = 8 + Top = 227 + Width = 247 + Height = 22 + Anchors = [akLeft, akRight, akBottom] + TabOrder = 1 + HotTrack = True + object Panel1: TPanel + Left = 2 + Top = 2 + Width = 243 + Height = 18 + Align = alClient + BevelOuter = bvNone + TabOrder = 0 + DesignSize = ( + 243 + 18) + object HotKey1: THotKey + Left = -2 + Top = -2 + Width = 249 + Height = 23 + Anchors = [akLeft, akTop, akRight, akBottom] + HotKey = 0 + Modifiers = [] + TabOrder = 0 + end + end + end + object ChangeShortcut: TSpTBXButton + Left = 261 + Top = 226 + Width = 75 + Height = 25 + Caption = 'C&hange' + Anchors = [akRight, akBottom] + TabOrder = 2 + OnClick = ChangeShortcutClick + end + object lbShortcuts: TSpTBXListBox + Left = 8 + Top = 8 + Width = 330 + Height = 208 + Anchors = [akLeft, akTop, akRight, akBottom] + ItemHeight = 16 + TabOrder = 0 + OnClick = lbShortcutsClick + OnDrawItem = lbShortcutsDrawItem + end + end + object SpTBXTabSheet3: TSpTBXTabSheet + Left = 0 + Top = 23 + Width = 347 + Height = 263 + Caption = 'Commands' + ImageIndex = -1 + DesignSize = ( + 347 + 263) + TabItem = 'tabCommands' + object SpTBXLabel3: TSpTBXLabel + Left = 8 + Top = 213 + Width = 330 + Height = 44 + Caption = + 'To add command buttons, drag and drop commands onto a toolbar. T' + + 'o remove command buttons, drag them off the toolbar and drop the' + + 'm on the commands list.' + Anchors = [akLeft, akRight, akBottom] + AutoSize = False + Wrapping = twWrap + end + object lbCommands: TSpTBXListBox + Left = 8 + Top = 8 + Width = 330 + Height = 202 + Anchors = [akLeft, akTop, akRight, akBottom] + DragMode = dmAutomatic + ItemHeight = 16 + TabOrder = 0 + OnDragDrop = lbCommandsDragDrop + OnDragOver = lbCommandsDragOver + OnDrawItem = lbCommandsDrawItem + OnEndDrag = lbCommandsEndDrag + OnStartDrag = lbCommandsStartDrag + end + end + object SpTBXTabSheet1: TSpTBXTabSheet + Left = 0 + Top = 23 + Width = 347 + Height = 263 + Caption = 'Toolbars' + ImageIndex = -1 + DesignSize = ( + 347 + 263) + TabItem = 'tabToolbars' + object SpTBXGroupBox1: TSpTBXGroupBox + Left = 175 + Top = 2 + Width = 161 + Height = 191 + Caption = 'Options' + Anchors = [akTop, akRight, akBottom] + TabOrder = 1 + object cbText: TSpTBXComboBox + Left = 6 + Top = 66 + Width = 149 + Height = 21 + Style = csDropDownList + ItemHeight = 13 + TabOrder = 1 + OnClick = cbTextClick + Items.Strings = ( + 'Icons + Selective Text' + 'Icons' + 'Icons + Text' + 'Text') + end + object cbIcon: TSpTBXComboBox + Left = 6 + Top = 114 + Width = 149 + Height = 21 + Style = csDropDownList + ItemHeight = 13 + TabOrder = 2 + Items.Strings = ( + 'Large images' + 'Small images') + end + object cbTextLabel: TSpTBXLabel + Left = 6 + Top = 45 + Width = 68 + Height = 19 + Caption = 'T&ext Options' + FocusControl = cbText + end + object cbIconLabel: TSpTBXLabel + Left = 6 + Top = 95 + Width = 67 + Height = 19 + Caption = '&Icon Options' + FocusControl = cbIcon + end + object checkVisible: TSpTBXCheckBox + Left = 6 + Top = 21 + Width = 53 + Height = 21 + Caption = '&Visible' + TabOrder = 0 + OnClick = checkVisibleClick + end + end + object SpTBXGroupBox2: TSpTBXGroupBox + Left = 175 + Top = 200 + Width = 161 + Height = 49 + Caption = '&Skins' + Anchors = [akRight, akBottom] + TabOrder = 2 + object cbSkins: TSpTBXComboBox + Left = 6 + Top = 20 + Width = 149 + Height = 21 + Style = csDropDownList + ItemHeight = 13 + TabOrder = 0 + OnClick = cbSkinsClick + end + end + object lbToolbars: TSpTBXCheckListBox + Left = 8 + Top = 8 + Width = 158 + Height = 241 + OnClickCheck = lbToolbarsClickCheck + Anchors = [akLeft, akTop, akRight, akBottom] + ItemHeight = 20 + TabOrder = 0 + OnClick = lbToolbarsClick + end + end + end + object ClosePanel: TSpTBXPanel + Left = 0 + Top = 286 + Width = 347 + Height = 35 + Align = alBottom + TabOrder = 1 + Borders = False + TBXStyleBackground = True + DesignSize = ( + 347 + 35) + object CloseButton: TSpTBXButton + Left = 264 + Top = 4 + Width = 78 + Height = 25 + Caption = '&Close' + Anchors = [akRight, akBottom] + TabOrder = 0 + OnClick = CloseButtonClick + end + object ResetButton: TSpTBXButton + Left = 7 + Top = 4 + Width = 130 + Height = 25 + Caption = '&Default Options' + TabOrder = 1 + OnClick = ResetButtonClick + end + end +end diff --git a/internal/2.4.4/1/Lib/D11/SpTBXDefaultSkins.dcu b/internal/2.4.4/1/Lib/D11/SpTBXDefaultSkins.dcu new file mode 100644 index 0000000..a589ce0 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXDefaultSkins.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXDkPanels.dcu b/internal/2.4.4/1/Lib/D11/SpTBXDkPanels.dcu new file mode 100644 index 0000000..b852cc1 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXDkPanels.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXEditors.dcu b/internal/2.4.4/1/Lib/D11/SpTBXEditors.dcu new file mode 100644 index 0000000..6038b99 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXEditors.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXExtEditors.dcu b/internal/2.4.4/1/Lib/D11/SpTBXExtEditors.dcu new file mode 100644 index 0000000..f868a82 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXExtEditors.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXFormPopupMenu.dcu b/internal/2.4.4/1/Lib/D11/SpTBXFormPopupMenu.dcu new file mode 100644 index 0000000..66a4146 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXFormPopupMenu.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXGlyphs.res b/internal/2.4.4/1/Lib/D11/SpTBXGlyphs.res new file mode 100644 index 0000000..ce753b7 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXGlyphs.res differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXItem.dcu b/internal/2.4.4/1/Lib/D11/SpTBXItem.dcu new file mode 100644 index 0000000..1cd2020 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXItem.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXLibDsgn_d11.bpl b/internal/2.4.4/1/Lib/D11/SpTBXLibDsgn_d11.bpl new file mode 100644 index 0000000..7eb930c Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXLibDsgn_d11.bpl differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXLibDsgn_d11.dcp b/internal/2.4.4/1/Lib/D11/SpTBXLibDsgn_d11.dcp new file mode 100644 index 0000000..4b1bff7 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXLibDsgn_d11.dcp differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXLibDsgn_d11.dcu b/internal/2.4.4/1/Lib/D11/SpTBXLibDsgn_d11.dcu new file mode 100644 index 0000000..5db1f6d Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXLibDsgn_d11.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXLib_d11.bpl b/internal/2.4.4/1/Lib/D11/SpTBXLib_d11.bpl new file mode 100644 index 0000000..2970cf3 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXLib_d11.bpl differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXLib_d11.dcp b/internal/2.4.4/1/Lib/D11/SpTBXLib_d11.dcp new file mode 100644 index 0000000..b02cc2f Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXLib_d11.dcp differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXLib_d11.dcu b/internal/2.4.4/1/Lib/D11/SpTBXLib_d11.dcu new file mode 100644 index 0000000..14f7f3e Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXLib_d11.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXMDIMRU.dcu b/internal/2.4.4/1/Lib/D11/SpTBXMDIMRU.dcu new file mode 100644 index 0000000..c3c8141 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXMDIMRU.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXPageScroller.dcu b/internal/2.4.4/1/Lib/D11/SpTBXPageScroller.dcu new file mode 100644 index 0000000..28715b5 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXPageScroller.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXReg.dcu b/internal/2.4.4/1/Lib/D11/SpTBXReg.dcu new file mode 100644 index 0000000..05ee2cc Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXReg.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXSkins.dcu b/internal/2.4.4/1/Lib/D11/SpTBXSkins.dcu new file mode 100644 index 0000000..250c50b Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXSkins.dcu differ diff --git a/internal/2.4.4/1/Lib/D11/SpTBXTabs.dcu b/internal/2.4.4/1/Lib/D11/SpTBXTabs.dcu new file mode 100644 index 0000000..9ef42a6 Binary files /dev/null and b/internal/2.4.4/1/Lib/D11/SpTBXTabs.dcu differ diff --git a/internal/2.4.4/1/MPL-LICENSE.txt b/internal/2.4.4/1/MPL-LICENSE.txt new file mode 100644 index 0000000..04d4a55 --- /dev/null +++ b/internal/2.4.4/1/MPL-LICENSE.txt @@ -0,0 +1,469 @@ + MOZILLA PUBLIC LICENSE + Version 1.1 + + --------------- + +1. Definitions. + + 1.0.1. "Commercial Use" means distribution or otherwise making the + Covered Code available to a third party. + + 1.1. "Contributor" means each entity that creates or contributes to + the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Code, prior Modifications used by a Contributor, and the Modifications + made by that particular Contributor. + + 1.3. "Covered Code" means the Original Code or Modifications or the + combination of the Original Code and Modifications, in each case + including portions thereof. + + 1.4. "Electronic Distribution Mechanism" means a mechanism generally + accepted in the software development community for the electronic + transfer of data. + + 1.5. "Executable" means Covered Code in any form other than Source + Code. + + 1.6. "Initial Developer" means the individual or entity identified + as the Initial Developer in the Source Code notice required by Exhibit + A. + + 1.7. "Larger Work" means a work which combines Covered Code or + portions thereof with code not governed by the terms of this License. + + 1.8. "License" means this document. + + 1.8.1. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means any addition to or deletion from the + substance or structure of either the Original Code or any previous + Modifications. When Covered Code is released as a series of files, a + Modification is: + A. Any addition to or deletion from the contents of a file + containing Original Code or previous Modifications. + + B. Any new file that contains any part of the Original Code or + previous Modifications. + + 1.10. "Original Code" means Source Code of computer software code + which is described in the Source Code notice required by Exhibit A as + Original Code, and which, at the time of its release under this + License is not already Covered Code governed by this License. + + 1.10.1. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. + + 1.11. "Source Code" means the preferred form of the Covered Code for + making modifications to it, including all modules it contains, plus + any associated interface definition files, scripts used to control + compilation and installation of an Executable, or source code + differential comparisons against either the Original Code or another + well known, available Covered Code of the Contributor's choice. The + Source Code can be in a compressed or archival form, provided the + appropriate decompression or de-archiving software is widely available + for no charge. + + 1.12. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, this + License or a future version of this License issued under Section 6.1. + For legal entities, "You" includes any entity which controls, is + controlled by, or is under common control with You. For purposes of + this definition, "control" means (a) the power, direct or indirect, + to cause the direction or management of such entity, whether by + contract or otherwise, or (b) ownership of more than fifty percent + (50%) of the outstanding shares or beneficial ownership of such + entity. + +2. Source Code License. + + 2.1. The Initial Developer Grant. + The Initial Developer hereby grants You a world-wide, royalty-free, + non-exclusive license, subject to third party intellectual property + claims: + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Code (or portions thereof) with or without Modifications, and/or + as part of a Larger Work; and + + (b) under Patents Claims infringed by the making, using or + selling of Original Code, to make, have made, use, practice, + sell, and offer for sale, and/or otherwise dispose of the + Original Code (or portions thereof). + + (c) the licenses granted in this Section 2.1(a) and (b) are + effective on the date Initial Developer first distributes + Original Code under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: 1) for code that You delete from the Original Code; 2) + separate from the Original Code; or 3) for infringements caused + by: i) the modification of the Original Code or ii) the + combination of the Original Code with other software or devices. + + 2.2. Contributor Grant. + Subject to third party intellectual property claims, each Contributor + hereby grants You a world-wide, royalty-free, non-exclusive license + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor, to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof) either on an + unmodified basis, with other Modifications, as Covered Code + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or + selling of Modifications made by that Contributor either alone + and/or in combination with its Contributor Version (or portions + of such combination), to make, use, sell, offer for sale, have + made, and/or otherwise dispose of: 1) Modifications made by that + Contributor (or portions thereof); and 2) the combination of + Modifications made by that Contributor with its Contributor + Version (or portions of such combination). + + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are + effective on the date Contributor first makes Commercial Use of + the Covered Code. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: 1) for any code that Contributor has deleted from the + Contributor Version; 2) separate from the Contributor Version; + 3) for infringements caused by: i) third party modifications of + Contributor Version or ii) the combination of Modifications made + by that Contributor with other software (except as part of the + Contributor Version) or other devices; or 4) under Patent Claims + infringed by Covered Code in the absence of Modifications made by + that Contributor. + +3. Distribution Obligations. + + 3.1. Application of License. + The Modifications which You create or to which You contribute are + governed by the terms of this License, including without limitation + Section 2.2. The Source Code version of Covered Code may be + distributed only under the terms of this License or a future version + of this License released under Section 6.1, and You must include a + copy of this License with every copy of the Source Code You + distribute. You may not offer or impose any terms on any Source Code + version that alters or restricts the applicable version of this + License or the recipients' rights hereunder. However, You may include + an additional document offering the additional rights described in + Section 3.5. + + 3.2. Availability of Source Code. + Any Modification which You create or to which You contribute must be + made available in Source Code form under the terms of this License + either on the same media as an Executable version or via an accepted + Electronic Distribution Mechanism to anyone to whom you made an + Executable version available; and if made available via Electronic + Distribution Mechanism, must remain available for at least twelve (12) + months after the date it initially became available, or at least six + (6) months after a subsequent version of that particular Modification + has been made available to such recipients. You are responsible for + ensuring that the Source Code version remains available even if the + Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. + You must cause all Covered Code to which You contribute to contain a + file documenting the changes You made to create that Covered Code and + the date of any change. You must include a prominent statement that + the Modification is derived, directly or indirectly, from Original + Code provided by the Initial Developer and including the name of the + Initial Developer in (a) the Source Code, and (b) in any notice in an + Executable version or related documentation in which You describe the + origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters + (a) Third Party Claims. + If Contributor has knowledge that a license under a third party's + intellectual property rights is required to exercise the rights + granted by such Contributor under Sections 2.1 or 2.2, + Contributor must include a text file with the Source Code + distribution titled "LEGAL" which describes the claim and the + party making the claim in sufficient detail that a recipient will + know whom to contact. If Contributor obtains such knowledge after + the Modification is made available as described in Section 3.2, + Contributor shall promptly modify the LEGAL file in all copies + Contributor makes available thereafter and shall take other steps + (such as notifying appropriate mailing lists or newsgroups) + reasonably calculated to inform those who received the Covered + Code that new knowledge has been obtained. + + (b) Contributor APIs. + If Contributor's Modifications include an application programming + interface and Contributor has knowledge of patent licenses which + are reasonably necessary to implement that API, Contributor must + also include this information in the LEGAL file. + + (c) Representations. + Contributor represents that, except as disclosed pursuant to + Section 3.4(a) above, Contributor believes that Contributor's + Modifications are Contributor's original creation(s) and/or + Contributor has sufficient rights to grant the rights conveyed by + this License. + + 3.5. Required Notices. + You must duplicate the notice in Exhibit A in each file of the Source + Code. If it is not possible to put such notice in a particular Source + Code file due to its structure, then You must include such notice in a + location (such as a relevant directory) where a user would be likely + to look for such a notice. If You created one or more Modification(s) + You may add your name as a Contributor to the notice described in + Exhibit A. You must also duplicate this License in any documentation + for the Source Code where You describe recipients' rights or ownership + rights relating to Covered Code. You may choose to offer, and to + charge a fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Code. However, You + may do so only on Your own behalf, and not on behalf of the Initial + Developer or any Contributor. You must make it absolutely clear than + any such warranty, support, indemnity or liability obligation is + offered by You alone, and You hereby agree to indemnify the Initial + Developer and every Contributor for any liability incurred by the + Initial Developer or such Contributor as a result of warranty, + support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. + You may distribute Covered Code in Executable form only if the + requirements of Section 3.1-3.5 have been met for that Covered Code, + and if You include a notice stating that the Source Code version of + the Covered Code is available under the terms of this License, + including a description of how and where You have fulfilled the + obligations of Section 3.2. The notice must be conspicuously included + in any notice in an Executable version, related documentation or + collateral in which You describe recipients' rights relating to the + Covered Code. You may distribute the Executable version of Covered + Code or ownership rights under a license of Your choice, which may + contain terms different from this License, provided that You are in + compliance with the terms of this License and that the license for the + Executable version does not attempt to limit or alter the recipient's + rights in the Source Code version from the rights set forth in this + License. If You distribute the Executable version under a different + license You must make it absolutely clear that any terms which differ + from this License are offered by You alone, not by the Initial + Developer or any Contributor. You hereby agree to indemnify the + Initial Developer and every Contributor for any liability incurred by + the Initial Developer or such Contributor as a result of any such + terms You offer. + + 3.7. Larger Works. + You may create a Larger Work by combining Covered Code with other code + not governed by the terms of this License and distribute the Larger + Work as a single product. In such a case, You must make sure the + requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. + + If it is impossible for You to comply with any of the terms of this + License with respect to some or all of the Covered Code due to + statute, judicial order, or regulation then You must: (a) comply with + the terms of this License to the maximum extent possible; and (b) + describe the limitations and the code they affect. Such description + must be included in the LEGAL file described in Section 3.4 and must + be included with all distributions of the Source Code. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Application of this License. + + This License applies to code to which the Initial Developer has + attached the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions. + Netscape Communications Corporation ("Netscape") may publish revised + and/or new versions of the License from time to time. Each version + will be given a distinguishing version number. + + 6.2. Effect of New Versions. + Once Covered Code has been published under a particular version of the + License, You may always continue to use it under the terms of that + version. You may also choose to use such Covered Code under the terms + of any subsequent version of the License published by Netscape. No one + other than Netscape has the right to modify the terms applicable to + Covered Code created under this License. + + 6.3. Derivative Works. + If You create or use a modified version of this License (which you may + only do in order to apply it to code which is not already Covered Code + governed by this License), You must (a) rename Your license so that + the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", + "MPL", "NPL" or any confusingly similar phrase do not appear in your + license (except to note that your license differs from this License) + and (b) otherwise make it clear that Your version of the license + contains terms which differ from the Mozilla Public License and + Netscape Public License. (Filling in the name of the Initial + Developer, Original Code or Contributor in the notice described in + Exhibit A shall not of themselves be deemed to be modifications of + this License.) + +7. DISCLAIMER OF WARRANTY. + + COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF + DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. + THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE + IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, + YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE + COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER + OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. TERMINATION. + + 8.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to cure + such breach within 30 days of becoming aware of the breach. All + sublicenses to the Covered Code which are properly granted shall + survive any termination of this License. Provisions which, by their + nature, must remain in effect beyond the termination of this License + shall survive. + + 8.2. If You initiate litigation by asserting a patent infringement + claim (excluding declatory judgment actions) against Initial Developer + or a Contributor (the Initial Developer or Contributor against whom + You file such action is referred to as "Participant") alleging that: + + (a) such Participant's Contributor Version directly or indirectly + infringes any patent, then any and all rights granted by such + Participant to You under Sections 2.1 and/or 2.2 of this License + shall, upon 60 days notice from Participant terminate prospectively, + unless if within 60 days after receipt of notice You either: (i) + agree in writing to pay Participant a mutually agreeable reasonable + royalty for Your past and future use of Modifications made by such + Participant, or (ii) withdraw Your litigation claim with respect to + the Contributor Version against such Participant. If within 60 days + of notice, a reasonable royalty and payment arrangement are not + mutually agreed upon in writing by the parties or the litigation claim + is not withdrawn, the rights granted by Participant to You under + Sections 2.1 and/or 2.2 automatically terminate at the expiration of + the 60 day notice period specified above. + + (b) any software, hardware, or device, other than such Participant's + Contributor Version, directly or indirectly infringes any patent, then + any rights granted to You by such Participant under Sections 2.1(b) + and 2.2(b) are revoked effective as of the date You first made, used, + sold, distributed, or had made, Modifications made by that + Participant. + + 8.3. If You assert a patent infringement claim against Participant + alleging that such Participant's Contributor Version directly or + indirectly infringes any patent where such claim is resolved (such as + by license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. + + 8.4. In the event of termination under Sections 8.1 or 8.2 above, + all end user license agreements (excluding distributors and resellers) + which have been validly granted by You or any distributor hereunder + prior to termination shall survive termination. + +9. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL + DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, + OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR + ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY + CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, + WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY + RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW + PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE + EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO + THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. + + The Covered Code is a "commercial item," as that term is defined in + 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" and "commercial computer software documentation," as such + terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 + C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), + all U.S. Government End Users acquire Covered Code with only those + rights set forth herein. + +11. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + California law provisions (except to the extent applicable law, if + any, provides otherwise), excluding its conflict-of-law provisions. + With respect to disputes in which at least one party is a citizen of, + or an entity chartered or registered to do business in the United + States of America, any litigation relating to this License shall be + subject to the jurisdiction of the Federal Courts of the Northern + District of California, with venue lying in Santa Clara County, + California, with the losing party responsible for costs, including + without limitation, court costs and reasonable attorneys' fees and + expenses. The application of the United Nations Convention on + Contracts for the International Sale of Goods is expressly excluded. + Any law or regulation which provides that the language of a contract + shall be construed against the drafter shall not apply to this + License. + +12. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. + +13. MULTIPLE-LICENSED CODE. + + Initial Developer may designate portions of the Covered Code as + "Multiple-Licensed". "Multiple-Licensed" means that the Initial + Developer permits you to utilize portions of the Covered Code under + Your choice of the NPL or the alternative licenses, if any, specified + by the Initial Developer in the file described in Exhibit A. + +EXHIBIT A -Mozilla Public License. + + ``The contents of this file are subject to the Mozilla Public License + Version 1.1 (the "License"); you may not use this file except in + compliance with the License. You may obtain a copy of the License at + http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + License for the specific language governing rights and limitations + under the License. + + The Original Code is ______________________________________. + + The Initial Developer of the Original Code is ________________________. + Portions created by ______________________ are Copyright (C) ______ + _______________________. All Rights Reserved. + + Contributor(s): ______________________________________. + + Alternatively, the contents of this file may be used under the terms + of the _____ license (the "[___] License"), in which case the + provisions of [______] License are applicable instead of those + above. If you wish to allow use of your version of this file only + under the terms of the [____] License and not to allow others to use + your version of this file under the MPL, indicate your decision by + deleting the provisions above and replace them with the notice and + other provisions required by the [___] License. If you do not delete + the provisions above, a recipient may use your version of this file + under either the MPL or the [___] License." + + [NOTE: The text of this Exhibit A may differ slightly from the text of + the notices in the Source Code files of the Original Code. You should + use the text of this Exhibit A rather than the text found in the + Original Code Source Code for Your Modifications.] \ No newline at end of file diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d10.bdsproj b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d10.bdsproj new file mode 100644 index 0000000..3549e3d --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d10.bdsproj @@ -0,0 +1,175 @@ + + + + + + + + + + + + SpTBXLibDsgn_d10.dpk + + + 7.0 + + + 8 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + True + True + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + False + False + False + True + True + True + True + True + True + + + + 0 + 0 + False + 1 + False + False + False + 16384 + 1048576 + 1333788672 + Toolbar2000 -- SpTBXLib Design Package + + + + + + + + + + + False + + + + + + False + + + True + False + + + + $00000000 + + + + True + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d10.dpk b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d10.dpk new file mode 100644 index 0000000..7d622d0 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d10.dpk @@ -0,0 +1,42 @@ +package SpTBXLibDsgn_d10; + +{$R *.res} +{$R '..\Source\SpTBXReg.dcr'} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $4F800000} +{$DESCRIPTION 'Toolbar2000 -- SpTBXLib Design Package'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + TntUnicodeVcl, + TntUnicodeVcl_Design, + tb2k_d10, + tb2kdsgn_d10, + SpTBXLib_d10, + dclstd, + vcl; + +contains + SpTBXReg in '..\Source\SpTBXReg.pas'; + +end. diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d10.res b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d10.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d10.res differ diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d11.bdsproj b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d11.bdsproj new file mode 100644 index 0000000..a1e48d5 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d11.bdsproj @@ -0,0 +1,175 @@ + + + + + + + + + + + + SpTBXLibDsgn_d11.dpk + + + 7.0 + + + 8 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + True + True + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + False + False + False + True + True + True + True + True + True + + + + 0 + 0 + False + 1 + False + False + False + 16384 + 1048576 + 1333788672 + Toolbar2000 -- SpTBXLib Design Package + + + + + + + + + + + False + + + + + + False + + + True + False + + + + $00000000 + + + + True + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d11.dpk b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d11.dpk new file mode 100644 index 0000000..21311c8 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d11.dpk @@ -0,0 +1,43 @@ +package SpTBXLibDsgn_d11; + +{$R *.res} +{$R '..\Source\SpTBXReg.dcr'} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS OFF} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DESCRIPTION 'Toolbar2000 -- SpTBXLib Design Package'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} +{$DEFINE RELEASE} + +requires + TntUnicodeVcl, + TntUnicodeVcl_Design, + tb2k_d11, + tb2kdsgn_d11, + SpTBXLib_d11, + dclstd, + vcl; + +contains + SpTBXReg in '..\Source\SpTBXReg.pas'; + +end. diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d11.dproj b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d11.dproj new file mode 100644 index 0000000..a609743 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d11.dproj @@ -0,0 +1,587 @@ + + + {0cd140c3-3adc-4bf2-8a9c-6b5faa587036} + SpTBXLibDsgn_d11.dpk + Release + AnyCPU + DCC32 + ..\Lib\D11\SpTBXLibDsgn_d11.bpl + + + 7.0 + False + False + 0 + RELEASE + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + + + 7.0 + 4F800000 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + + + Delphi.Personality + Package + + + False + True + False + + + Toolbar2000 -- SpTBXLib Design Package + True + True + False + + + True + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + SpTBXLibDsgn_d11.dpk + + + + + + + MainSource + + + + + + + + + + + + + + + + diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d11.res b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d11.res new file mode 100644 index 0000000..1bf5a8c Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d11.res differ diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d12.dpk b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d12.dpk new file mode 100644 index 0000000..1669b52 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d12.dpk @@ -0,0 +1,40 @@ +package SpTBXLibDsgn_d12; + +{$R *.res} +{$R '..\Source\SpTBXReg.dcr'} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $4F800000} +{$DESCRIPTION 'Toolbar2000 -- SpTBXLib Design Package'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + tb2k_d12, + tb2kdsgn_d12, + SpTBXLib_d12, + dclstd, + vcl; + +contains + SpTBXReg in '..\Source\SpTBXReg.pas'; + +end. diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d12.dproj b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d12.dproj new file mode 100644 index 0000000..17bc401 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d12.dproj @@ -0,0 +1,116 @@ + + + {0CD140C3-3ADC-4BF2-8A9C-6B5FAA587036} + SpTBXLibDsgn_d12.dpk + Debug + DCC32 + 12.0 + + + true + + + true + Base + true + + + true + Base + true + + + true + All + 4F800000 + 1 + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias) + x86 + Toolbar2000 -- SpTBXLib Design Package + true + false + true + false + true + false + false + + + false + RELEASE;$(DCC_Define) + 0 + false + + + DEBUG;$(DCC_Define) + + + + MainSource + + + + + + + + + + + Base + + + Cfg_2 + Base + + + Cfg_1 + Base + + + + + Delphi.Personality.12 + Package + + + + SpTBXLibDsgn_d12.dpk + + + False + True + False + + + True + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + 12 + + diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d12.res b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d12.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d12.res differ diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d14.dpk b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d14.dpk new file mode 100644 index 0000000..be51e42 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d14.dpk @@ -0,0 +1,40 @@ +package SpTBXLibDsgn_d14; + +{$R *.res} +{$R '..\Source\SpTBXReg.dcr'} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $4F800000} +{$DESCRIPTION 'Toolbar2000 -- SpTBXLib Design Package'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + tb2k_d12, + tb2kdsgn_d12, + SpTBXLib_d14, + dclstd, + vcl; + +contains + SpTBXReg in '..\Source\SpTBXReg.pas'; + +end. diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d14.dproj b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d14.dproj new file mode 100644 index 0000000..b050de3 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d14.dproj @@ -0,0 +1,116 @@ + + + {0CD140C3-3ADC-4BF2-8A9C-6B5FAA587036} + SpTBXLibDsgn_d14.dpk + Debug + DCC32 + 12.0 + + + true + + + true + Base + true + + + true + Base + true + + + true + All + 4F800000 + 1 + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias) + x86 + Toolbar2000 -- SpTBXLib Design Package + true + false + true + false + true + false + false + + + false + RELEASE;$(DCC_Define) + 0 + false + + + DEBUG;$(DCC_Define) + + + + MainSource + + + + + + + + + + + Base + + + Cfg_2 + Base + + + Cfg_1 + Base + + + + + Delphi.Personality.12 + Package + + + + SpTBXLibDsgn_d14.dpk + + + False + True + False + + + True + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + 12 + + diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d14.res b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d14.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d14.res differ diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d7.dpk b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d7.dpk new file mode 100644 index 0000000..e3a57af --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d7.dpk @@ -0,0 +1,42 @@ +package SpTBXLibDsgn_d7; + +{$R *.res} +{$R '..\Source\SpTBXReg.dcr'} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $4F800000} +{$DESCRIPTION 'Toolbar2000 -- SpTBXLib Design Package'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + TntUnicodeVcl_R70, + TntUnicodeVcl_D70, + tb2k_d7, + tb2kdsgn_d7, + SpTBXLib_d7, + dclstd, + vcl; + +contains + SpTBXReg in '..\Source\SpTBXReg.pas'; + +end. diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d7.res b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d7.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d7.res differ diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d9.dpk b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d9.dpk new file mode 100644 index 0000000..282eb87 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d9.dpk @@ -0,0 +1,42 @@ +package SpTBXLibDsgn_d9; + +{$R *.res} +{$R '..\Source\SpTBXReg.dcr'} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $4F800000} +{$DESCRIPTION 'Toolbar2000 -- SpTBXLib Design Package'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + TntUnicodeVcl_R90, + TntUnicodeVcl_D90, + tb2k_d9, + tb2kdsgn_d9, + SpTBXLib_d9, + dclstd, + vcl; + +contains + SpTBXReg in '..\Source\SpTBXReg.pas'; + +end. diff --git a/internal/2.4.4/1/Packages/SpTBXLibDsgn_d9.res b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d9.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLibDsgn_d9.res differ diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d10.bdsproj b/internal/2.4.4/1/Packages/SpTBXLib_d10.bdsproj new file mode 100644 index 0000000..1f6ec4f --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLib_d10.bdsproj @@ -0,0 +1,175 @@ + + + + + + + + + + + + SpTBXLib_d10.dpk + + + 7.0 + + + 8 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + True + True + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + False + False + False + True + True + True + True + True + True + + + + 0 + 0 + False + 1 + False + False + False + 16384 + 1048576 + 1337982976 + Toolbar2000 -- SpTBXLib + + + + + + + + + + + False + + + + + + False + + + True + False + + + + $00000000 + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d10.dpk b/internal/2.4.4/1/Packages/SpTBXLib_d10.dpk new file mode 100644 index 0000000..cbf16f6 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLib_d10.dpk @@ -0,0 +1,51 @@ +package SpTBXLib_d10; + +{$R *.res} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $4FC00000} +{$DESCRIPTION 'Toolbar2000 -- SpTBXLib'} +{$RUNONLY} +{$IMPLICITBUILD ON} + +requires + vcl, + tb2k_d10, + TntUnicodeVcl, + rtl; + +contains + SpTBXItem in '..\Source\SpTBXItem.pas', + SpTBXControls in '..\Source\SpTBXControls.pas', + SpTBXTabs in '..\Source\SpTBXTabs.pas', + SpTBXDkPanels in '..\Source\SpTBXDkPanels.pas', + SpTBXEditors in '..\Source\SpTBXEditors.pas', + SpTBXExtEditors in '..\Source\SpTBXExtEditors.pas', + SpTBXColorPickerForm in '..\Source\SpTBXColorPickerForm.pas', + SpTBXMDIMRU in '..\Source\SpTBXMDIMRU.pas', + SpTBXFormPopupMenu in '..\Source\SpTBXFormPopupMenu.pas', + SpTBXCustomizer in '..\Source\SpTBXCustomizer.pas', + SpTBXCustomizerForm in '..\Source\SpTBXCustomizerForm.pas', + SpTBXPageScroller in '..\Source\SpTBXPageScroller.pas', + SpTBXSkins in '..\Source\SpTBXSkins.pas', + SpTBXDefaultSkins in '..\Source\SpTBXDefaultSkins.pas'; + +end. diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d10.res b/internal/2.4.4/1/Packages/SpTBXLib_d10.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLib_d10.res differ diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d11.bdsproj b/internal/2.4.4/1/Packages/SpTBXLib_d11.bdsproj new file mode 100644 index 0000000..a04ffdd --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLib_d11.bdsproj @@ -0,0 +1,175 @@ + + + + + + + + + + + + SpTBXLib_d11.dpk + + + 7.0 + + + 8 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + True + True + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + False + False + False + True + True + True + True + True + True + + + + 0 + 0 + False + 1 + False + False + False + 16384 + 1048576 + 1337982976 + Toolbar2000 -- SpTBXLib + + + + + + + + + + + False + + + + + + False + + + True + False + + + + $00000000 + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d11.dcu b/internal/2.4.4/1/Packages/SpTBXLib_d11.dcu new file mode 100644 index 0000000..cb0f1fe Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLib_d11.dcu differ diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d11.dpk b/internal/2.4.4/1/Packages/SpTBXLib_d11.dpk new file mode 100644 index 0000000..b85f0ba --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLib_d11.dpk @@ -0,0 +1,52 @@ +package SpTBXLib_d11; + +{$R *.res} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS OFF} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DESCRIPTION 'Toolbar2000 -- SpTBXLib'} +{$RUNONLY} +{$IMPLICITBUILD ON} +{$DEFINE RELEASE} + +requires + vcl, + tb2k_d11, + TntUnicodeVcl, + rtl; + +contains + SpTBXItem in '..\Source\SpTBXItem.pas', + SpTBXControls in '..\Source\SpTBXControls.pas', + SpTBXTabs in '..\Source\SpTBXTabs.pas', + SpTBXDkPanels in '..\Source\SpTBXDkPanels.pas', + SpTBXEditors in '..\Source\SpTBXEditors.pas', + SpTBXExtEditors in '..\Source\SpTBXExtEditors.pas', + SpTBXColorPickerForm in '..\Source\SpTBXColorPickerForm.pas', + SpTBXMDIMRU in '..\Source\SpTBXMDIMRU.pas', + SpTBXFormPopupMenu in '..\Source\SpTBXFormPopupMenu.pas', + SpTBXCustomizer in '..\Source\SpTBXCustomizer.pas', + SpTBXCustomizerForm in '..\Source\SpTBXCustomizerForm.pas', + SpTBXPageScroller in '..\Source\SpTBXPageScroller.pas', + SpTBXSkins in '..\Source\SpTBXSkins.pas', + SpTBXDefaultSkins in '..\Source\SpTBXDefaultSkins.pas'; + +end. diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d11.dproj b/internal/2.4.4/1/Packages/SpTBXLib_d11.dproj new file mode 100644 index 0000000..66332c1 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLib_d11.dproj @@ -0,0 +1,588 @@ + + + {1eb74e79-e290-4976-b63e-8e6b50611d5f} + SpTBXLib_d11.dpk + Release + AnyCPU + DCC32 + ..\Lib\D11\SpTBXLib_d11.bpl + + + 7.0 + False + False + 0 + RELEASE + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + + + 7.0 + 4FC00000 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + ..\Lib\D11 + + + Delphi.Personality + Package + + + False + True + False + + + Toolbar2000 -- SpTBXLib + True + False + True + + + True + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + SpTBXLib_d11.dpk + + + + + + + MainSource + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d11.res b/internal/2.4.4/1/Packages/SpTBXLib_d11.res new file mode 100644 index 0000000..1bf5a8c Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLib_d11.res differ diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d11Group.groupproj b/internal/2.4.4/1/Packages/SpTBXLib_d11Group.groupproj new file mode 100644 index 0000000..c0ba271 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLib_d11Group.groupproj @@ -0,0 +1,44 @@ + + + {1708f789-2cf1-44ce-85c4-adea7490fa43} + + + + + + + + Default.Personality + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d12.dpk b/internal/2.4.4/1/Packages/SpTBXLib_d12.dpk new file mode 100644 index 0000000..7087098 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLib_d12.dpk @@ -0,0 +1,51 @@ +package SpTBXLib_d12; + +{$R *.res} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $4FC00000} +{$DESCRIPTION 'Toolbar2000 -- SpTBXLib'} +{$RUNONLY} +{$IMPLICITBUILD ON} + +requires + vcl, + tb2k_d12, + rtl, + vclx; + +contains + SpTBXItem in '..\Source\SpTBXItem.pas', + SpTBXControls in '..\Source\SpTBXControls.pas', + SpTBXTabs in '..\Source\SpTBXTabs.pas', + SpTBXDkPanels in '..\Source\SpTBXDkPanels.pas', + SpTBXEditors in '..\Source\SpTBXEditors.pas', + SpTBXExtEditors in '..\Source\SpTBXExtEditors.pas', + SpTBXColorPickerForm in '..\Source\SpTBXColorPickerForm.pas', + SpTBXMDIMRU in '..\Source\SpTBXMDIMRU.pas', + SpTBXFormPopupMenu in '..\Source\SpTBXFormPopupMenu.pas', + SpTBXCustomizer in '..\Source\SpTBXCustomizer.pas', + SpTBXCustomizerForm in '..\Source\SpTBXCustomizerForm.pas', + SpTBXPageScroller in '..\Source\SpTBXPageScroller.pas', + SpTBXSkins in '..\Source\SpTBXSkins.pas', + SpTBXDefaultSkins in '..\Source\SpTBXDefaultSkins.pas'; + +end. \ No newline at end of file diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d12.dproj b/internal/2.4.4/1/Packages/SpTBXLib_d12.dproj new file mode 100644 index 0000000..58b7242 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLib_d12.dproj @@ -0,0 +1,128 @@ + + + {1EB74E79-E290-4976-B63E-8E6B50611D5F} + SpTBXLib_d12.dpk + Debug + DCC32 + 12.0 + + + true + + + true + Base + true + + + true + Base + true + + + true + All + $(BDSCOMMONDIR)\DCP + SpTBXLib_d12.bpl + 4FC00000 + 1 + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias) + x86 + Toolbar2000 -- SpTBXLib + true + false + true + false + true + false + false + + + false + RELEASE;$(DCC_Define) + 0 + false + + + DEBUG;$(DCC_Define) + + + + MainSource + + + + + + + + + + + + + + + + + + + + + Base + + + Cfg_2 + Base + + + Cfg_1 + Base + + + + + Delphi.Personality.12 + Package + + + + SpTBXLib_d12.dpk + + + False + True + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + 12 + + diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d12.res b/internal/2.4.4/1/Packages/SpTBXLib_d12.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLib_d12.res differ diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d14.dpk b/internal/2.4.4/1/Packages/SpTBXLib_d14.dpk new file mode 100644 index 0000000..a7e7a73 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLib_d14.dpk @@ -0,0 +1,51 @@ +package SpTBXLib_d14; + +{$R *.res} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $4FC00000} +{$DESCRIPTION 'Toolbar2000 -- SpTBXLib'} +{$RUNONLY} +{$IMPLICITBUILD ON} + +requires + vcl, + tb2k_d12, + rtl, + vclx; + +contains + SpTBXItem in '..\Source\SpTBXItem.pas', + SpTBXControls in '..\Source\SpTBXControls.pas', + SpTBXTabs in '..\Source\SpTBXTabs.pas', + SpTBXDkPanels in '..\Source\SpTBXDkPanels.pas', + SpTBXEditors in '..\Source\SpTBXEditors.pas', + SpTBXExtEditors in '..\Source\SpTBXExtEditors.pas', + SpTBXColorPickerForm in '..\Source\SpTBXColorPickerForm.pas', + SpTBXMDIMRU in '..\Source\SpTBXMDIMRU.pas', + SpTBXFormPopupMenu in '..\Source\SpTBXFormPopupMenu.pas', + SpTBXCustomizer in '..\Source\SpTBXCustomizer.pas', + SpTBXCustomizerForm in '..\Source\SpTBXCustomizerForm.pas', + SpTBXPageScroller in '..\Source\SpTBXPageScroller.pas', + SpTBXSkins in '..\Source\SpTBXSkins.pas', + SpTBXDefaultSkins in '..\Source\SpTBXDefaultSkins.pas'; + +end. \ No newline at end of file diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d14.dproj b/internal/2.4.4/1/Packages/SpTBXLib_d14.dproj new file mode 100644 index 0000000..72e5116 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLib_d14.dproj @@ -0,0 +1,128 @@ + + + {1EB74E79-E290-4976-B63E-8E6B50611D5F} + SpTBXLib_d14.dpk + Debug + DCC32 + 12.0 + + + true + + + true + Base + true + + + true + Base + true + + + true + All + $(BDSCOMMONDIR)\DCP + SpTBXLib_d14.bpl + 4FC00000 + 1 + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias) + x86 + Toolbar2000 -- SpTBXLib + true + false + true + false + true + false + false + + + false + RELEASE;$(DCC_Define) + 0 + false + + + DEBUG;$(DCC_Define) + + + + MainSource + + + + + + + + + + + + + + + + + + + + + Base + + + Cfg_2 + Base + + + Cfg_1 + Base + + + + + Delphi.Personality.12 + Package + + + + SpTBXLib_d14.dpk + + + False + True + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + 12 + + diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d14.res b/internal/2.4.4/1/Packages/SpTBXLib_d14.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLib_d14.res differ diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d7.dpk b/internal/2.4.4/1/Packages/SpTBXLib_d7.dpk new file mode 100644 index 0000000..6f2d702 --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLib_d7.dpk @@ -0,0 +1,51 @@ +package SpTBXLib_d7; + +{$R *.res} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $4FC00000} +{$DESCRIPTION 'Toolbar2000 -- SpTBXLib'} +{$RUNONLY} +{$IMPLICITBUILD ON} + +requires + vcl, + tb2k_d7, + TntUnicodeVcl_R70, + rtl; + +contains + SpTBXItem in '..\Source\SpTBXItem.pas', + SpTBXControls in '..\Source\SpTBXControls.pas', + SpTBXTabs in '..\Source\SpTBXTabs.pas', + SpTBXDkPanels in '..\Source\SpTBXDkPanels.pas', + SpTBXEditors in '..\Source\SpTBXEditors.pas', + SpTBXExtEditors in '..\Source\SpTBXExtEditors.pas', + SpTBXColorPickerForm in '..\Source\SpTBXColorPickerForm.pas', + SpTBXMDIMRU in '..\Source\SpTBXMDIMRU.pas', + SpTBXFormPopupMenu in '..\Source\SpTBXFormPopupMenu.pas', + SpTBXCustomizer in '..\Source\SpTBXCustomizer.pas', + SpTBXCustomizerForm in '..\Source\SpTBXCustomizerForm.pas', + SpTBXPageScroller in '..\Source\SpTBXPageScroller.pas', + SpTBXSkins in '..\Source\SpTBXSkins.pas', + SpTBXDefaultSkins in '..\Source\SpTBXDefaultSkins.pas'; + +end. \ No newline at end of file diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d7.res b/internal/2.4.4/1/Packages/SpTBXLib_d7.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLib_d7.res differ diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d9.dpk b/internal/2.4.4/1/Packages/SpTBXLib_d9.dpk new file mode 100644 index 0000000..ae8209f --- /dev/null +++ b/internal/2.4.4/1/Packages/SpTBXLib_d9.dpk @@ -0,0 +1,51 @@ +package SpTBXLib_d9; + +{$R *.res} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $4FC00000} +{$DESCRIPTION 'Toolbar2000 -- SpTBXLib'} +{$RUNONLY} +{$IMPLICITBUILD ON} + +requires + vcl, + tb2k_d9, + TntUnicodeVcl_R90, + rtl; + +contains + SpTBXItem in '..\Source\SpTBXItem.pas', + SpTBXControls in '..\Source\SpTBXControls.pas', + SpTBXTabs in '..\Source\SpTBXTabs.pas', + SpTBXDkPanels in '..\Source\SpTBXDkPanels.pas', + SpTBXEditors in '..\Source\SpTBXEditors.pas', + SpTBXExtEditors in '..\Source\SpTBXExtEditors.pas', + SpTBXColorPickerForm in '..\Source\SpTBXColorPickerForm.pas', + SpTBXMDIMRU in '..\Source\SpTBXMDIMRU.pas', + SpTBXFormPopupMenu in '..\Source\SpTBXFormPopupMenu.pas', + SpTBXCustomizer in '..\Source\SpTBXCustomizer.pas', + SpTBXCustomizerForm in '..\Source\SpTBXCustomizerForm.pas', + SpTBXPageScroller in '..\Source\SpTBXPageScroller.pas', + SpTBXSkins in '..\Source\SpTBXSkins.pas', + SpTBXDefaultSkins in '..\Source\SpTBXDefaultSkins.pas'; + +end. \ No newline at end of file diff --git a/internal/2.4.4/1/Packages/SpTBXLib_d9.res b/internal/2.4.4/1/Packages/SpTBXLib_d9.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/internal/2.4.4/1/Packages/SpTBXLib_d9.res differ diff --git a/internal/2.4.4/1/Readme.txt b/internal/2.4.4/1/Readme.txt new file mode 100644 index 0000000..1a8fe1d --- /dev/null +++ b/internal/2.4.4/1/Readme.txt @@ -0,0 +1,63 @@ +[SpTBXLib] + +SpTBXLib is an add on package for TB2K components, it adds the following features: +- Skins +- Unicode support for items captions and hints properties. +- Custom painting events. +- Custom item size. +- Anchored items. +- Right aligned items. +- Accel char handling. +- Button, Label, Checkbox, RadioButton, with unicode support. +- TabControl with toolbar items support. +- DockablePanel with unicode toolbar items support. +- Panel and GroupBox with transparency and unicode support. +- Titlebar and Form Popup components with unicode support. + +For more info go to: +http://www.silverpointdevelopment.com + +[License] + +Use and/or distribution of the files requires compliance with the +SpTBXLib License, found in SpTBXLib-LICENSE.txt or at: + + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, at your option, the files may be used and/or distributed under +the terms of the Mozilla Public License Version 1.1, found in MPL-LICENSE.txt or at: + + http://www.mozilla.org/MPL + + +[Installation] + +Requirements: +- Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +- Troy Wolbrink's TNT Unicode Controls (not needed for Delphi/C++Builder 2009) + http://www.tntware.com/delphicontrols/unicode/ + Mirror: http://www.silverpointdevelopment.com/sptbxlib/TntUnicodeControls.zip + +To install SpTBXLib manually: +- If you have a previous version of SpTBXLib installed in the IDE remove it from Component->Install Packages, select SpTBXLib from the list and press the Remove button. +- Add the SpTBXLib 'Source' directory to Tools->Environment Options->Library->Library Path. +- Open the SpTBXLibDsgn_*.dpk design package corresponding to the IDE version, press Compile and then press Install, close the package window (don't save the changes). + +To install SpTBXLib with Silverpoint MultiInstaller (http://www.silverpointdevelopment.com/multiinstaller/index.htm): +- Create a new folder for the installation. +- Download all the component zips to a folder: SpTBXLib + TNT + TB2K +- Download the MultiInstaller and the Setup.Ini, extract them to the folder: + +The installation folder will end up with this files: +C:\MyInstall + |- SpTBXLib.zip + |- TntUnicodeControls.zip + |- tb2k-2.2.2.zip + |- MultiInstaller.exe + |- Setup.ini + +You are ready to install the component packages, just run the MultiInstaller, select the destination folder, and all the components will be unziped, patched, compiled and installed on the Delphi IDE. + +For more info go to: +http://www.silverpointdevelopment.com/sptbxlib/support/index.htm \ No newline at end of file diff --git a/internal/2.4.4/1/Registration.txt b/internal/2.4.4/1/Registration.txt new file mode 100644 index 0000000..0627a0e --- /dev/null +++ b/internal/2.4.4/1/Registration.txt @@ -0,0 +1,27 @@ +REGISTRATION AND DONATIONS + +Registration is required only if you choose the SpTBXLib License +wich allows you to not include an acknowledgement in your +application's about box or help file, and also allows you to keep the +modifications you've made to SpTBXLib without having to make them public. + +The cost of a single developer license is US$100. This license permits +usage of SpTBXLib in applications created/maintained by only a single +developer. +A site license costs US$200, and permits usage of SpTBXLib in applications +created/maintained by any number of developers at your organization. +Payments are accepted via PayPal and Kagi: + http://www.silverpointdevelopment.com/sptbxlib/registration.htm + +No registration is required if you choose to use SpTBXLib under the +Mozilla Public License Version 1.1 +However, if you wish to express your appreciation for the time I +spend on developing, documenting and supporting it, I do accept and +appreciate donations. +Donations are accepted via PayPal and Kagi: + http://www.silverpointdevelopment.com/sptbxlib/registration.htm + +Thank you for your support. + +Robert Lee +http://www.silverpointdevelopment.com \ No newline at end of file diff --git a/internal/2.4.4/1/Source/SpTBXColorPickerForm.dfm b/internal/2.4.4/1/Source/SpTBXColorPickerForm.dfm new file mode 100644 index 0000000..5ca6585 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXColorPickerForm.dfm @@ -0,0 +1,3025 @@ +object SpTBXColorPickerForm: TSpTBXColorPickerForm + Left = 156 + Top = 89 + ClientHeight = 193 + ClientWidth = 213 + Color = clBtnFace + Constraints.MinHeight = 211 + Constraints.MinWidth = 217 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [] + OldCreateOrder = False + Position = poDesigned + OnCreate = FormCreate + OnDestroy = FormDestroy + OnResize = FormResize + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object SpTBXTabControl1: TSpTBXTabControl + Left = 0 + Top = 26 + Width = 213 + Height = 167 + Align = alClient + ActiveTabIndex = 0 + Images = ImageList1 + OnActiveTabChange = SpTBXTabControl1ActiveTabChange + HiddenItems = <> + object SpTBXTabItem1: TSpTBXTabItem + Checked = True + ImageIndex = 2 + end + object SpTBXTabItem2: TSpTBXTabItem + ImageIndex = 3 + end + object SpTBXTabItem3: TSpTBXTabItem + ImageIndex = 4 + end + object SpTBXTabSheet2: TSpTBXTabSheet + Left = 0 + Top = 26 + Width = 213 + Height = 141 + ImageIndex = 3 + DesignSize = ( + 213 + 141) + TabItem = 'SpTBXTabItem2' + object SpTBXColorListBox1: TSpTBXColorListBox + Left = 5 + Top = 5 + Width = 200 + Height = 127 + Style = [clbsSystemColors, clbsIncludeNone, clbsIncludeDefault, clbsPrettyNames, clbsNoneAsTransparent] + Anchors = [akLeft, akTop, akRight, akBottom] + ItemHeight = 16 + TabOrder = 0 + OnClick = SpTBXColorListBox1Click + Selected = clActiveBorder + end + end + object SpTBXTabSheet3: TSpTBXTabSheet + Left = 0 + Top = 26 + Width = 213 + Height = 141 + ImageIndex = 4 + DesignSize = ( + 213 + 141) + TabItem = 'SpTBXTabItem3' + object imgColorPicker: TImage + Left = 2 + Top = 0 + Width = 207 + Height = 137 + Align = alClient + Visible = False + end + object btnColorPicker: TSpTBXSpeedButton + Left = 48 + Top = 58 + Width = 113 + Height = 22 + Caption = 'Click && Drag' + Anchors = [] + DragMode = dmAutomatic + OnEndDrag = btnColorPickerEndDrag + OnStartDrag = btnColorPickerStartDrag + end + end + object SpTBXTabSheet1: TSpTBXTabSheet + Left = 0 + Top = 26 + Width = 213 + Height = 141 + ImageIndex = 2 + TabItem = 'SpTBXTabItem1' + object imgPalette: TImage + Left = 5 + Top = 4 + Width = 200 + Height = 137 + Cursor = crHandPoint + AutoSize = True + Picture.Data = { + 07544269746D61704E410100424D4E410100000000003600000028000000C800 + 000089000000010018000000000018410100130B0000130B0000000000000000 + 0000010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101080942 + 080942080942080942080C42080F42081142081342071642071843071A43071C + 43071E43072043072243062444062644062844062A44062C45052D45052F4505 + 3145053345043446043646043846043946043946043946043946033B46033C46 + 033E47023F4702414702424701444702434602424403424203414003403E043F + 3C043F3A053E38053D36053C33063C31063B2E073A2C07392908382608382308 + 372009361C0935180A34140A340F0A33080B32010B31000B30000C30000C2F00 + 0C2F000C2F000C2E000D2E000D2D000D2C000D2C000F2C00112C00132C00152C + 00162C00182C001A2B001C2B001D2B001F2B00212B00232B00252B00262B0028 + 2B002A2B002C2B002D2B002F2B00312B00332A00342A00362A00372A00392A00 + 3A2A003C2A003D2A003F29004029004229004128004027003F26003F25003E24 + 003D22003C21003B20003A1F00391E00381C00371B0036190035180034160033 + 1500321300311100300F002F0E002E0B002D09002C07002C05002B03002A0100 + 29000228000427000527000726000825000A25000A25000D2500102500132500 + 1624001824001A24001D24001F23002123002323002523002722002922002B22 + 002D22002F21003121003221003421003621003720003920003A20003C20003E + 20003F1F00411F00421F00431F00451E00461D00461D00461C00451B00451A00 + 451A004519004518004518004517004416004415004414004414004413014412 + 02431102431103431004430F04430E05430E06430D06430C07420C07420B0842 + 0A08420A08420909420809420809420101010101010C0C5C0C0C5C0C0C5C0C0C + 5C0C115C0C155C0C195C0B1C5D0B1F5D0B225D0B255E0A285E0A2A5E092D5E09 + 305F09335F083660083860073B60073E61064061064362054562044862044A63 + 034C63024E63025164025164025164025164015364005564005765005965005B + 65005D66005F66005E64005D61005C5F005B5D015A5A02595703585504575205 + 564F06554C0854490953460A52420B513F0C4F3B0D4E370D4D340E4C300F4B2B + 104A2611492111471B1246131245091344001443001442001442001442001441 + 00154000153F00163E00163D00193D001B3D001E3D00203D00223D00243D0027 + 3E00293E002B3E002E3E00303E00333E00353E00373E003A3E003C3E003E3E00 + 413E00433E00453E00483E004A3E004C3E004E3E00503E00523E00543E00563E + 00593E005A3E005C3E005B3D005A3C00593A0058390057370056360055350054 + 3300523200513000502E004F2D004E2B004C29004B28004A2600482400472200 + 462000441E00431C00421A004118003F16003E14003D12003C0F003B0D023A0A + 0539080738050937020B37020B36021136021636011A36011E36002135002435 + 002735002A35002D34003034003234003634003833003B33003D330040320042 + 32004532004732004932004B31004E3100503100523100543100563100583000 + 5A30005C30005D2F005F2E005F2D005F2C005F2B005F2A005F29005E28005E26 + 005E25005E24005E23005E22005E21015E1F025D1E035D1D045D1C055D1B055D + 1A065D18075D17085D16095D15095C140A5C130A5C120B5C100B5C0F0B5C0E0C + 5C0D0C5C0C0C5C010101010101100E74100E74100E74100E74101475101A750F + 1F750F23760F27760E2B760E2F770D33770D36780C3A780B3D790A41790A447A + 09487A084B7B074F7B06527C04557D03587D025B7E015E7E00617F00647F0067 + 80006780006780006780006A80006C81006F8100718200748200778300798300 + 788000777D00757A00747700737400727100706D026F6A046E66066C63086B5F + 0A695B0C68570D67530F654E10644A116246136140145F3B155E35165C2F175B + 281859201958171956071A55001B54001B54001B54001C52001C51001D50001D + 4F001E4D00214D00244D00274E002A4E002C4E002F4E00324E00354E00384E00 + 3B4F003E4F00414F00444F00474F004A4F004D4F005050005350005650005950 + 005B50005E50006150006350006651006951006B51006E510071510073510075 + 5100745000734E00724C00704B006F49006D47006C46006B4400694200684000 + 663E00653C00633A006138006036005E34005D32005B3000592E00582B005629 + 005427005325005122005020004E1D004D1B004C19004A160349140648110A46 + 0E0D460E0D460D15460D1B460C20460B25450A2945092D450831450735440639 + 44053C44044043034343024743004A42004D4200504200534200564100594100 + 5C41005F41006140006440006640006940006C40006E4000704000733F00753E + 00773D00773B00773A0077390077370077360077340077330077310077300076 + 2F00762D00762B01762A02762803762704762505762406762207752108751F09 + 751D0A751C0A751A0B75190B75170C75160C75140D74130D74120E74100E7401 + 0101010101130E8B130E8B130E8B130E8B13178B131E8C12248C12298D112E8D + 11338E10388E0F3C8F0E418F0E45900D49910B4E910A5292085693075A93055E + 94036295026695006996006D97007197007498007899007B99007B99007B9900 + 7B99007E9A00829B00859B00889C008B9D008E9D00919E00909A008E97008D93 + 008B9000898C00888800868400858000837C038177068073097E6E0C7C6A0E7A + 6511795F13775A14755516744F1772491970431A6E3C1B6C341D6B2B1E69211F + 6712206600216400216400216400216200226100235F00245E00245C00285C00 + 2B5C002F5C00325C00365D00395D003D5D00405D00435D00475E004A5E004E5E + 00525E00555F00595F005C5F00605F006360006660006A60006D600070600074 + 61007761007A61007D61008061008361008762008962008C62008B6000895E00 + 885C00865A008459008357008155008053007E50007C4E007A4C00784A007748 + 007545007343007140006F3E006D3C006B3900693600673400653100632F0061 + 2C005F29005E27005C24005B2100591F00581C0556190A54160E54160E541518 + 54151F54142654132C53133153123653113B52103F520E43520D47510C4B510A + 5051085450065750055B50035F4F01634F00664F00694F006D4E00704E00734E + 00764E00794E007D4D00804D00824D00854D00884D008B4B008E4A008E48008E + 46008D45008D43008D41008D40008D3E008D3C008D3A008D39008D37008D3500 + 8D33018C31028C2F038C2E048C2C058C2A068C28078C26088C24098C220A8C20 + 0B8B1E0B8B1D0C8B1B0C8B190D8B170D8B150E8B130E8B010101010101160CA1 + 160CA1160CA1160CA11618A21521A21529A3142FA41335A4123BA51140A51046 + A60F4BA70E50A80D55A80B5AA9095FAA0664AB0468AC016DAD0072AD0076AE00 + 7AAF007FB00083B10087B2008BB2008FB3008FB3008FB3008FB30093B40097B5 + 009AB6009EB600A2B700A5B800A9B900A7B500A5B000A3AC00A2A800A0A4009E + 9F009C9A009A9600989100968C01948705928109907C0D8E76118C70138A6A16 + 886518865E1A84571C824F1E7F481F7D3F217B3522792A23771A247500257300 + 257300257300267100277000286E00296C002A6A002E6A00326A00366B003A6B + 003E6B00426B00466B004A6C004E6C00526C00566D005B6D005F6D00626E0067 + 6E006B6E006F6F00736F00776F007B6F007F70008270008670008A70008E7100 + 9171009571009871009C72009F7200A37200A170009F6E009D6C009C6A009A67 + 00986500966300946100925E00905C008E59008C5700895400875100854F0083 + 4C008049007E46007C4400794100773E00753B007338007135006E32006D2F00 + 6B2C0069290067260065230463200A621C0F621C0F611C1B611B24611A2C611A + 3360193960183E6016445F15495F144E5E13525E12575E105C5D0E615D0C655D + 0A695C076E5C05725C02765C007A5B007E5B00825B00855B00895A008C5A0090 + 5A00935A00975A009A5A009E5900A15700A45600A45400A45200A45000A44E00 + A44C00A34A00A34800A34600A34400A34200A34000A33E00A33C00A33900A337 + 00A33500A33301A33102A22E04A22C05A22A05A22807A22507A22308A22109A2 + 1F0AA21D0AA21B0BA2180CA2160CA10101010101011807B71807B71807B71807 + B71718B81723B9162DB91534BA143BBB1342BB1248BC114FBD0F54BE0D5ABF0B + 60BF0866C1056BC20271C20076C3007CC50081C60086C6008BC80090C90095CA + 0099CA009ECB00A2CC00A2CC00A2CC00A2CC00A7CD00ABCE00AFCF00B4D000B8 + D100BCD200C0D300BECE00BCC900BAC500B8C000B5BB00B3B600B1B000AFAB00 + ADA500AAA000A89A00A69404A38E0AA1870F9E80139C79169A7319976C1C9564 + 1E925B209053228E49248B3E2589322786222884002982002982002982002B80 + 002C7E002D7C002E79002F77003377003878003D78004178004679004A79004F + 7900547900587A005D7A00617A00667B006B7B006F7C00747C00797C007D7D00 + 827D00867E008B7E008F7E00937F00987F009C7F00A08000A48000A88000AC81 + 00B18100B48100B88100B67F00B47D00B27A00B07800AE7500AC7300A97000A7 + 6E00A56B00A26800A065009E62009B6000995D00965A009356009154008E5000 + 8C4D00894A008646008443008140007F3D007C39007A3600783300762F00742C + 0072290370250B6E21116E21116D211F6D20296D1F326C1E396C1D406C1C466B + 1B4C6B1A526B19586A175D6A16626A146869126D691072680D76680A7C680780 + 67048567018967008E67009266009666009A66009E6600A36600A66500AA6500 + AE6500B26500B66300B96100B95F00B95D00B95A00B95800B95600B95400B952 + 00B94F00B94D00B94B00B94800B94600B94300B94100B93F00B93C00B83A00B8 + 3700B83400B83200B82F00B82D01B82A02B82802B82503B82304B82005B81E05 + B81B06B81807B70101010101011900CD1900CD1900CD1900CD1817CE1825CE17 + 31CF1639D01541D11349D11250D21057D30E5ED40B64D5086AD60472D70178D9 + 007EDA0084DB008ADC0090DD0095DE009BE000A1E100A6E200ABE300B0E400B5 + E500B5E500B5E500B5E500BBE600BFE700C4E900C9EA00CEEB00D2EC00D7ED00 + D4E700D2E200CFDD00CDD700CAD200C8CC00C5C600C3C000C0B900BEB300BBAC + 00B8A600B69F03B3970BB09011AD8815AB8119A8791CA5701FA36722A05E249D + 53269A4728983A2A95292B93072D90002D90002D90002E8E002F8B0030890032 + 86003384003884003E84004385004885004D85005286005786005C8600618700 + 6687006B88007188007689007B8900808A00868A008B8B00908B00958B009A8C + 009F8C00A38D00A88D00AD8D00B28E00B68E00BB8F00BF8F00C48F00C89000CD + 9000CA8D00C88B00C68800C38500C18300BF8000BC7D00B97A00B77700B47400 + B27100AF6E00AC6A00A96700A66400A36000A15D009E5A009B5600985200954F + 00924B008F47008C4400894000873C008439008235008031007D2E047B2A0D79 + 251379251378252378242E78233877224077214777204E761F55761E5B761C61 + 751B6775196D75177374157974137E731083730D8973098E7204937201987200 + 9E7200A27100A77100AB7100B07100B57000B97000BD7000C17000C67000CA6D + 00CE6B00CE6900CE6700CE6400CE6200CE6000CE5D00CE5B00CE5800CE5600CE + 5300CE5000CE4E00CE4B00CE4800CE4600CE4300CE4000CE3D00CE3A00CE3700 + CE3400CD3100CD2E00CD2C00CD2900CD2600CD2300CD2000CD1D00CD1900CD01 + 01010101011A00E21A00E21A00E21A00E21916E31827E41734E5163EE51547E6 + 134FE71158E80F60E90C67EA086EEB0475EC007DEE0084EF008AF00091F20098 + F3009EF400A4F600AAF700B1F800B7FA00BCFB00C2FC00C7FD00C7FD00C7FD00 + C7FD00CEFF00D3FF00D8FF00DDFF00E3FF00E8FF00EDFF00EAFF00E7FA00E4F4 + 00E2EE00DFE800DCE100D9DB00D6D400D3CD00D1C600CEBE00CBB700C8AF00C5 + A704C29F0DBE9713BC8F18B9861CB67C20B27323AF6826AC5D28A9502AA6422C + A3302EA10F309E00309E00309E00319B003398003496003593003690003D9000 + 4391004991004E91005492005992005F93006593006A94007094007594007C95 + 008196008796008C97009397009898009D9800A39900A99900AE9A00B39A00B8 + 9B00BD9B00C39B00C89C00CD9C00D29D00D79D00DC9D00E09E00DE9B00DB9800 + D99500D69200D48F00D18C00CE8900CB8600C88300C57F00C27C00BF7800BC75 + 00B97100B66E00B26A00B06600AC6200A95F00A55A00A256009F53009C4F0099 + 4A00964600934200903E008D3A008B3600883206862E10832917832917832827 + 82283382273E82264681254E81245681225D80216480206B801E717F1C777F1A + 7E7F18847E158A7E12907E0E967D0A9C7D05A17D00A77C00AD7C00B27C00B77B + 00BC7B00C17B00C67B00CB7B00D07A00D47A00D97A00DE7700E27500E27300E2 + 7000E26E00E36B00E36900E36600E36300E36100E35E00E35B00E35800E35500 + E35200E34F00E34C00E34900E34600E34300E34000E33C00E23900E23600E233 + 00E22F00E22C00E22900E22500E22200E21E00E21A00E20101010101012A3DE5 + 2A3DE52A3DE52A3DE52B45E62B4CE72B54E82C5BE92C62EA2C68EB2C70EC2D76 + ED2D7CEE2D82EF2D88F02D8FF12D94F22D9AF32D9FF42DA5F52DAAF72CAFF82C + B5F92BBAFA2ABFFB2AC4FC29C9FD28CEFE28CEFE28CEFE28CEFE27D3FF26D8FF + 24DCFF23E1FF21E6FF1FEAFF1DEEFF21ECFF24EAFB27E7F629E5F12CE2EB2EE0 + E530DDE032DBDA34D8D436D6CE37D3C839D1C13ACEBB3CCCB43DC9AD3EC6A63F + C4A040C19942BF9143BC8944B98145B67845B36F46B16647AE5C48AB5049A944 + 49A94449A94449A6354AA41E4AA1004B9F004C9C00519D00569D005C9D00619E + 00669E006B9F00719F0076A0007BA00080A00085A1008BA10090A20095A2009A + A3009FA300A4A400A9A400ADA500B3A500B7A600BCA600C0A600C5A700CAA700 + CEA800D3A800D7A800DCA900E0A900E4A900E2A700DFA400DDA100DB9E00D89C + 00D69900D39600D19300CE9000CC8C00C98900C68600C48300C17F00BE7C00BB + 7800B87500B57200B26E00AF6A00AC660CA96318A65F1FA35B25A0572A9D532E + 9A4F32974B3595473892433A8F3F3C8D3B3E8D3B3E8D3B478D3B4E8C3B568C3B + 5D8C3B638C3B698C3B708C3B768C3B7B8C3B818B3B878B3B8D8B3B928B3B978B + 3B9C8B3BA18B3AA68B3AAB8B3AB08B3AB58B3ABA8A3ABE8A3AC38A39C78A39CC + 8A39D08A39D58A39D98A38DD8A38E18838E58538E58339E68139E67E39E67C3A + E6793AE6763AE6743AE6713BE66E3BE66B3BE6693BE6663BE6633BE6603CE65D + 3CE65A3CE6573CE6543CE6503CE64D3CE64A3CE6463CE6433CE6403CE63C3CE6 + 393CE6353CE6323CE52E3DE52A3DE5010101010101405FE9405FE9405FE9405F + E94164EA426AEB4370EC4476EC457BED4680EE4786EF488BF04990F14A95F24B + 9AF34C9FF44DA4F54DA9F64EADF74FB2F850B7F950BBF951BFFA51C4FB52C9FC + 52CDFD53D1FE53D5FF53D5FF53D5FF53D5FF54D9FF54DDFF54E1FF55E4FF55E9 + FF55EDFF56F0FF56EEFF57ECFC58EAF858E8F359E6EE59E4EA5AE2E55AE0E05B + DEDB5CDCD65CD9D05CD7CB5DD5C65DD3C05ED1BB5ECEB55ECCB05FCAAA5FC8A4 + 60C69E60C39760C19060BE8A61BC8261BA7B61B77461B56C61B56C61B56C62B3 + 6362B05A62AE5062AC4562A93967AA376CAA3671AB3476AB337AAB317FAC2F83 + AC2D88AD2B8DAD2991AD2796AE249BAE219FAF1DA3AF1AA8B016ADB010B1B109 + B5B100B9B100BEB200C2B200C5B200C9B300CDB300D1B400D5B400D9B400DCB5 + 00E1B500E4B500E8B600E6B300E4B000E2AE00E0AB00DEA900DBA600D9A308D7 + A015D59E1DD29B23D09829CE952DCB9231C98F35C68C39C4893CC2863EBF8341 + BD7F44BA7C46B77949B4754BB2724DAF6E4FAC6A51A96752A66354A45F55A15C + 579E58589C545999505B99505B99516199516699526D9952729953789A547D9A + 54829A55879A558C9A56919A57959A579B9A589F9A58A49A59A89A59AD9A5AB2 + 9A5AB69B5BBA9B5BBF9B5CC39B5CC79B5DCB9B5DCE9B5ED29B5ED69B5FDA9B5F + DD9B60E29B60E59961E99761E99561E99261E99061E98D61E98B61E98861E986 + 60E98360E98160E97E60E97B60E97960E97660E97360E97160E96E60E96B60E9 + 6860E96460E96160E95E5FE95B5FE9585FE9545FE9515FE94E5FE94A5FE9475F + E9435FE9405FE90101010101015A7DED5A7DED5A7DED5A7DED5C81EE5D86EF5F + 8BF0608FF06194F16398F2649CF365A0F466A4F468A8F569ACF66AB0F76BB4F7 + 6CB8F86DBCF96EBFFA6FC3FA70C6FB71CAFC72CEFD73D2FD74D5FE75D8FF76DC + FF76DCFF76DCFF76DCFF76DFFF77E2FF78E5FF79E9FF79ECFF7AF0FF7BF3FF7B + F1FF7BEFFD7BEEF97BECF57CEAF17CE8ED7CE7E97CE5E57CE3E17CE1DD7CE0D9 + 7CDED47CDCD07CDACC7CD8C77CD7C27CD5BF7CD3BA7CD1B57CCFB07CCEAB7CCC + A67CCAA17CC89C7CC6967CC4917CC28B7CC28B7CC28B7CC0857CBE7F7CBC787C + BA727CB86B80B86A84B96A89B9698CB96890BA6894BA6798BB679CBB66A0BB65 + A4BC64A7BC64ACBC63AFBD62B3BD62B6BD61BABE60BDBE5FC1BE5EC4BF5EC8BF + 5DCCC05CCFC05BD2C05AD5C059D9C159DCC158DFC157E2C256E6C255E9C254EC + C353EAC055E9BE56E7BC58E5B959E3B75BE1B45CDFB25DDEB05EDCAD60DAAA61 + D8A862D6A564D4A365D2A066D09D67CE9B68CC9869CA956AC7936BC5906CC38D + 6DC18A6DBE876EBC846FBA8170B77D71B57A72B27772B07473AE7074AB6D75A9 + 6975A96975A96A7AA96B7FA96C84A96D89AA6E8DAA6F91AA6F96AA709AAA719E + AB72A2AB73A6AB74AAAB74AEAB75B2AB76B6AC77B9AC77BDAC78C1AC79C4AC7A + C8AD7BCCAD7BCFAD7CD2AD7DD6AD7DD9AD7EDCAE7FE0AE7FE3AE80E6AE81EAAC + 81EDAA81EDA881EDA681EDA381EDA181ED9F81ED9C81ED9A80ED9880ED9580ED + 9380ED9080ED8E80ED8B80ED8980ED877FED847FED817FED7F7FED7C7FED797F + ED767EED737EED707EED6D7EED6A7EED677EED647DED617DED5E7DED5A7DED01 + 01010101017999F27999F27999F27999F27A9DF27BA0F37DA4F47EA7F47FABF5 + 81AEF582B1F683B4F784B7F785BAF886BDF888C1F989C4F98AC6FA8BC9FB8CCC + FB8DCFFC8ED2FC8FD5FD90D8FE91DBFE92DDFF93E0FF94E3FF94E3FF94E3FF94 + E3FF95E5FF96E8FF97EAFF97EDFF98F0FF99F3FF9AF5FF9AF4FF9AF3FD9AF1FA + 9AF0F79AEFF49AEDF19AECEE9AEAEB9AE9E799E8E499E6E199E5DD99E3DA99E2 + D699E0D399DFCF99DECC98DCC898DBC598D9C198D8BD98D6B998D5B598D3B197 + D2AD97D0A997CFA597CFA597CFA597CDA197CB9D96CA9896C89496C78F99C78F + 9CC78EA0C88EA4C88EA7C88DAAC98DADC98DB0C98CB3C98CB6CA8CB9CA8BBCCA + 8BBFCB8AC2CB8AC5CB8AC8CC89CACC89CDCC89D0CC88D3CD88D6CD87D9CD87DB + CD87DECE86E0CE86E3CE85E6CF85E8CF85EBCF84EECF84F0D083EFCE84EDCC84 + ECC985EAC785E9C586E7C386E6C187E4BF87E3BD87E1BB88E0B988DEB689DCB4 + 89DBB28AD9B08AD7AD8AD6AB8BD4A98BD2A68BD1A48CCFA28CCD9F8CCB9D8DC9 + 9A8DC7988DC6958EC4938EC2908EC08D8FBE8B8FBC888FBA8590BA8590BA8693 + BA8797BB889BBB899FBB8AA2BB8BA6BC8BA9BC8CACBC8DB0BC8EB3BC8FB6BD90 + BABD91BDBD91C0BD92C3BE93C6BE94C9BE95CCBE95CFBF96D2BF97D5BF98D8BF + 99DBBF99DDC09AE0C09BE3C09CE6C09CE8C09DEBC19EEEBF9EF1BD9EF1BB9EF1 + B99EF1B79EF1B59EF1B39EF1B19DF1AF9DF1AD9DF1AB9DF1A99DF1A69DF1A49C + F1A29CF1A09CF19E9CF19B9CF1999CF1979BF2949BF2929BF2909BF28D9BF28B + 9BF2889AF2869AF2839AF2819AF27E9AF27B9AF27999F20101010101019AB5F6 + 9AB5F69AB5F69AB5F69BB7F79CBAF79DBCF79EBEF89FC0F8A0C3F8A1C6F9A2C8 + F9A3CAFAA4CCFAA5CEFBA6D1FBA7D3FBA8D5FCA9D7FCAADAFDABDCFDACDEFDAD + E0FEAEE2FEAFE4FFAFE6FFB0E8FFB1EAFFB1EAFFB1EAFFB1EAFFB2ECFFB3EEFF + B4F0FFB5F2FFB6F4FFB6F6FFB7F8FFB7F7FFB7F6FEB7F5FCB7F4F9B6F3F7B6F2 + F5B6F1F2B6F0F0B6EFEDB6EEEBB6EDE9B5ECE6B5EBE4B5EAE1B5E8DEB5E7DCB5 + E6D9B4E5D7B4E4D4B4E3D1B4E2CFB4E1CCB3E0C9B3DFC7B3DEC4B3DDC1B3DBBE + B3DBBEB3DBBEB2DABBB2D9B8B2D8B5B2D7B2B2D6AFB4D6AFB6D6AFB8D6AFBBD7 + AFBDD7AEBFD7AEC2D7AEC4D8AEC7D8AEC9D8ADCBD8ADCDD8ADCFD9ADD1D9ADD3 + D9ACD6D9ACD8DAACDADAACDCDAABDEDAABE0DAABE2DBABE4DBABE6DBABE9DBAA + EBDCAAEDDCAAEFDCAAF1DCA9F2DCA9F4DDA9F3DBA9F2D9A9F1D8A9F0D6A9EFD4 + A9EED3AAECD1AAEBCFAAEACEAAE9CCAAE8CAAAE6C8AAE5C7AAE4C5AAE3C3AAE1 + C1AAE0C0AADFBEAADEBCABDCBAABDBB8ABDAB6ABD8B5ABD7B3ABD6B1ABD4AFAB + D3ADABD2ABABD0A9ABCFA7ABCDA5ABCCA3ABCCA3ABCCA4AECCA4B1CDA5B3CDA6 + B6CDA7B8CDA8BBCEA9BECEA9C0CEAAC3CEABC5CFACC8CFACCACFADCCCFAECFCF + AED1D0AFD4D0B0D6D0B1D8D0B1DBD0B2DDD1B3DFD1B4E1D1B4E3D1B5E5D2B6E8 + D2B7EAD2B7ECD2B8EED2B9F1D3B9F3D1BAF5CFBAF5CEB9F5CCB9F5CBB9F5C9B9 + F5C7B9F5C6B9F5C4B9F5C2B8F5C1B8F5BFB8F5BDB8F5BBB8F5BAB8F5B8B8F5B6 + B7F5B4B7F6B3B7F6B1B7F6AFB7F6ADB7F6ABB6F6A9B6F6A7B6F6A6B6F6A4B6F6 + A2B6F6A0B5F69EB5F69CB5F69AB5F6010101010101BBCFFABBCFFABBCFFABBCF + FABCD0FABDD2FABDD3FBBED5FBBFD6FBC0D8FBC1DAFCC1DBFCC2DDFCC3DEFCC4 + DFFCC4E1FDC5E2FDC6E3FDC6E5FEC7E6FEC8E8FEC8E9FEC9EAFFCAECFFCAEDFF + CBEEFFCCEFFFCCF1FFCCF1FFCCF1FFCCF1FFCDF3FFCEF4FFCFF5FFCFF7FFD0F8 + FFD1F9FFD1FAFFD1FAFFD1F9FED1F8FDD1F8FBD0F7FAD0F6F8D0F6F6D0F5F5D0 + F4F3D0F4F2D0F3F0CFF2EFCFF2EDCFF1EBCFF0EACFF0E8CFEFE6CFEEE5CEEDE3 + CEEDE1CEECE0CEEBDECEEBDCCEEADACDE9D9CDE8D7CDE8D5CDE8D5CDE8D5CDE7 + D3CDE6D2CDE6D0CCE5CECCE4CCCEE4CCCFE4CCD1E5CCD2E5CCD4E5CCD5E5CCD7 + E5CBD9E5CBDAE6CBDBE6CBDDE6CBDEE6CBE0E6CBE1E6CBE2E6CBE4E7CBE5E7CA + E6E7CAE8E7CAE9E7CAEAE7CAECE7CAEDE7CAEEE8CAF0E8CAF2E8C9F3E8C9F4E8 + C9F6E8C9F7E9C9F8E9C9F7E8C9F7E6C9F6E5C9F5E4C9F4E3C9F3E2C9F3E0C9F2 + DFC8F1DEC8F0DDC8F0DCC8EFDBC8EED9C8EDD8C8ECD7C8EBD6C8EBD4C8EAD3C8 + E9D2C8E8D1C8E7CFC8E6CEC8E6CDC8E5CCC8E4CAC7E3C9C7E2C8C7E1C6C7E0C5 + C7DFC4C7DFC3C7DEC1C7DEC1C7DEC2C9DEC2CADEC3CCDEC3CEDFC4CFDFC5D1DF + C5D3DFC6D5DFC7D7DFC7D8E0C8DAE0C8DBE0C9DDE0C9DEE0CAE0E0CAE2E1CBE3 + E1CCE5E1CCE6E1CDE8E1CDE9E1CEEBE2CEECE2CFEDE2D0F0E2D0F1E2D1F3E2D1 + F4E3D2F5E3D2F7E2D3F8E0D3F8DFD2F9DED2F9DDD2F9DCD2F9DBD2F9D9D2F9D8 + D2F9D7D2F9D6D1F9D5D1F9D3D1F9D2D1F9D1D1F9D0D1F9CFD1F9CDD1F9CCD1F9 + CBD0F9C9D0F9C8D0F9C7D0F9C6D0F9C4D0F9C3D0FAC2D0FAC0CFFABFCFFABECF + FABCCFFABBCFFA010101010101DDE8FDDDE8FDDDE8FDDDE8FDDDE8FDDEE9FDDE + EAFDDEEAFDDFEBFDDFECFDE0ECFEE0EDFEE0EEFEE1EEFEE1EFFEE2F0FEE2F0FE + E2F1FEE3F2FFE3F3FFE4F4FFE4F4FFE4F5FFE5F6FFE5F6FFE6F7FFE6F8FFE6F8 + FFE6F8FFE6F8FFE6F8FFE7F9FFE7FAFFE7FAFFE8FBFFE8FBFFE9FCFFE9FDFFE9 + FCFFE9FCFFE9FCFEE9FBFDE9FBFCE8FBFCE8FAFBE8FAFAE8FAF9E8F9F8E8F9F8 + E8F9F7E8F8F6E8F8F5E8F8F4E8F7F4E7F7F3E7F7F2E7F6F1E7F6F0E7F6F0E7F5 + EFE7F5EEE7F5EDE7F4ECE7F4ECE7F4EBE7F4EBE7F4EBE6F3EAE6F3E9E6F3E8E6 + F2E7E6F2E7E7F2E7E8F2E7E8F2E7E9F2E7EAF2E6EAF2E6EBF2E6ECF2E6ECF3E6 + EDF3E6EEF3E6EEF3E6EFF3E6F0F3E6F0F3E6F2F3E6F2F3E6F3F3E6F4F3E6F4F3 + E6F5F3E6F6F4E6F6F4E6F7F4E6F8F4E5F8F4E5F9F4E5FAF4E5FAF4E5FBF4E5FC + F4E5FBF4E5FBF3E5FBF2E5FAF2E5FAF1E5F9F0E5F9F0E5F8EFE5F8EFE5F8EEE5 + F7EDE5F7EDE4F6ECE4F6EBE4F6EBE4F5EAE4F5EAE4F4E9E4F4E8E4F4E8E4F3E7 + E4F3E6E4F2E6E4F2E5E4F2E4E4F1E4E4F1E3E3F0E3E3F0E2E3EFE1E3EFE1E3EF + E0E3EFE0E3EFE0E4EFE1E5EFE1E5EFE1E6EFE1E7EFE2E8EFE2E9EFE2E9EFE3EA + F0E3EBF0E3ECF0E4EDF0E4EDF0E4EEF0E5EFF0E5F0F0E5F1F0E6F2F0E6F3F1E6 + F3F1E7F4F1E7F5F1E7F6F1E8F7F1E8F7F1E8F8F1E8F9F1E9FAF1E9FAF1E9FBF1 + EAFCF0EAFCF0E9FCEFE9FCEEE9FCEEE9FCEDE9FCECE9FCECE9FCEBE9FCEBE9FC + EAE9FCE9E9FCE9E9FCE8E9FCE7E9FCE7E9FCE6E9FCE5E8FCE5E8FCE4E8FCE4E8 + FDE3E8FDE2E8FDE2E8FDE1E8FDE0E8FDE0E8FDDFE8FDDEE8FDDEE8FDDDE8FD01 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101FF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0000000000000000 + 00000000000000000000000000000000000000000000FF0099FF0099FF0099FF + 0099FF0099FF0099FF0099FF0099FF0099010101FF3399FF3399FF3399FF3399 + FF3399FF3399FF3399FF3399FF3399010101FF6699FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF6699010101FF9999FF9999FF9999FF9999FF9999FF + 9999FF9999FF9999FF9999010101FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99 + FFCC99FFCC99FFCC99010101FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99010101FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CC010101FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF33CC010101FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66 + CC010101FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC01 + 0101FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC010101 + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC010101FF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF010101FF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF010101FF66FFFF66FF + FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF010101FF99FFFF99FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF010101FFCCFFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF010101FFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF010101010101FF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FF00000000000000000000000000000000 + 0000000000000000000000000000FF0099FF0099FF0099FF0099FF0099FF0099 + FF0099FF0099FF0099010101FF3399FF3399FF3399FF3399FF3399FF3399FF33 + 99FF3399FF3399010101FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF6699010101FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999 + FF9999010101FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC + 99010101FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF9901 + 0101FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC010101 + FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC010101FF66 + CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CC010101FF99CCFF + 99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC010101FFCCCCFFCCCC + FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC010101FFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC010101FF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FF010101FF33FFFF33FFFF33FFFF33FF + FF33FFFF33FFFF33FFFF33FFFF33FF010101FF66FFFF66FFFF66FFFF66FFFF66 + FFFF66FFFF66FFFF66FFFF66FF010101FF99FFFF99FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99FFFF99FF010101FFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF + FFCCFFFFCCFFFFCCFF010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFF010101010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FF000000000000000000000000000000000000000000000000 + 000000000000FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF00 + 99010101FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF339901 + 0101FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699010101 + FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999010101FFCC + 99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99010101FFFF99FF + FF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99010101FF00CCFF00CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC010101FF33CCFF33CCFF33 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC010101FF66CCFF66CCFF66CCFF + 66CCFF66CCFF66CCFF66CCFF66CCFF66CC010101FF99CCFF99CCFF99CCFF99CC + FF99CCFF99CCFF99CCFF99CCFF99CC010101FFCCCCFFCCCCFFCCCCFFCCCCFFCC + CCFFCCCCFFCCCCFFCCCCFFCCCC010101FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF + FFCCFFFFCCFFFFCCFFFFCC010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FF010101FF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33 + FFFF33FFFF33FF010101FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF + 66FFFF66FF010101FF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF + FF99FF010101FFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC + FF010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF01 + 0101010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + 000000000000000000000000000000000000000000000000000000000000FF00 + 99FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099010101FF3399FF + 3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399010101FF6699FF6699 + FF6699FF6699FF6699FF6699FF6699FF6699FF6699010101FF9999FF9999FF99 + 99FF9999FF9999FF9999FF9999FF9999FF9999010101FFCC99FFCC99FFCC99FF + CC99FFCC99FFCC99FFCC99FFCC99FFCC99010101FFFF99FFFF99FFFF99FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99010101FF00CCFF00CCFF00CCFF00CCFF00 + CCFF00CCFF00CCFF00CCFF00CC010101FF33CCFF33CCFF33CCFF33CCFF33CCFF + 33CCFF33CCFF33CCFF33CC010101FF66CCFF66CCFF66CCFF66CCFF66CCFF66CC + FF66CCFF66CCFF66CC010101FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99 + CCFF99CCFF99CC010101FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF + CCCCFFCCCC010101FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC + FFFFCC010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FF010101FF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF01 + 0101FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF010101 + FF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF010101FFCC + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF010101FFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF010101010101FF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0000000000000000 + 00000000000000000000000000000000000000000000FF0099FF0099FF0099FF + 0099FF0099FF0099FF0099FF0099FF0099010101FF3399FF3399FF3399FF3399 + FF3399FF3399FF3399FF3399FF3399010101FF6699FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF6699010101FF9999FF9999FF9999FF9999FF9999FF + 9999FF9999FF9999FF9999010101FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99 + FFCC99FFCC99FFCC99010101FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99010101FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CC010101FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF33CC010101FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66 + CC010101FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC01 + 0101FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC010101 + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC010101FF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF010101FF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF010101FF66FFFF66FF + FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF010101FF99FFFF99FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF010101FFCCFFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF010101FFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF010101010101FF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FF00000000000000000000000000000000 + 0000000000000000000000000000FF0099FF0099FF0099FF0099FF0099FF0099 + FF0099FF0099FF0099010101FF3399FF3399FF3399FF3399FF3399FF3399FF33 + 99FF3399FF3399010101FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF6699010101FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999 + FF9999010101FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC + 99010101FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF9901 + 0101FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC010101 + FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC010101FF66 + CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CC010101FF99CCFF + 99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC010101FFCCCCFFCCCC + FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC010101FFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC010101FF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FF010101FF33FFFF33FFFF33FFFF33FF + FF33FFFF33FFFF33FFFF33FFFF33FF010101FF66FFFF66FFFF66FFFF66FFFF66 + FFFF66FFFF66FFFF66FFFF66FF010101FF99FFFF99FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99FFFF99FF010101FFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF + FFCCFFFFCCFFFFCCFF010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFF010101010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FF000000000000000000000000000000000000000000000000 + 000000000000FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF00 + 99010101FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF339901 + 0101FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699010101 + FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999010101FFCC + 99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99010101FFFF99FF + FF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99010101FF00CCFF00CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC010101FF33CCFF33CCFF33 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC010101FF66CCFF66CCFF66CCFF + 66CCFF66CCFF66CCFF66CCFF66CCFF66CC010101FF99CCFF99CCFF99CCFF99CC + FF99CCFF99CCFF99CCFF99CCFF99CC010101FFCCCCFFCCCCFFCCCCFFCCCCFFCC + CCFFCCCCFFCCCCFFCCCCFFCCCC010101FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF + FFCCFFFFCCFFFFCCFFFFCC010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FF010101FF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33 + FFFF33FFFF33FF010101FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF + 66FFFF66FF010101FF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF + FF99FF010101FFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC + FF010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF01 + 0101010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + 000000000000000000000000000000000000000000000000000000000000FF00 + 99FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099010101FF3399FF + 3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399010101FF6699FF6699 + FF6699FF6699FF6699FF6699FF6699FF6699FF6699010101FF9999FF9999FF99 + 99FF9999FF9999FF9999FF9999FF9999FF9999010101FFCC99FFCC99FFCC99FF + CC99FFCC99FFCC99FFCC99FFCC99FFCC99010101FFFF99FFFF99FFFF99FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99010101FF00CCFF00CCFF00CCFF00CCFF00 + CCFF00CCFF00CCFF00CCFF00CC010101FF33CCFF33CCFF33CCFF33CCFF33CCFF + 33CCFF33CCFF33CCFF33CC010101FF66CCFF66CCFF66CCFF66CCFF66CCFF66CC + FF66CCFF66CCFF66CC010101FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99 + CCFF99CCFF99CC010101FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF + CCCCFFCCCC010101FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC + FFFFCC010101FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FF010101FF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF01 + 0101FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF010101 + FF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF010101FFCC + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF010101FFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF010101010101FF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0000000000000000 + 00000000000000000000000000000000000000000000FF0099FF0099FF0099FF + 0099FF0099FF0099FF0099FF0099FF0099010101FF3399FF3399FF3399FF3399 + FF3399FF3399FF3399FF3399FF3399010101FF6699FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF6699010101FF9999FF9999FF9999FF9999FF9999FF + 9999FF9999FF9999FF9999010101FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99 + FFCC99FFCC99FFCC99010101FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99010101FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CC010101FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF33CC010101FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66 + CC010101FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC01 + 0101FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC010101 + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCC010101FF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF010101FF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF010101FF66FFFF66FF + FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF010101FF99FFFF99FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF010101FFCCFFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF010101FFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0101010101010101010101010101010101 + 0101010101010101010101010101010100000000000000000000000000000000 + 0000000000000000000000000000010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 01010101010101010101010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00000000000000000000000000000000000000000000000000 + 000000000000CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC00 + 99010101CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC339901 + 0101CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699010101 + CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999010101CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99010101CCFF99CC + FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99010101CC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CC010101CC33CCCC33CCCC33 + CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC010101CC66CCCC66CCCC66CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CC010101CC99CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC99CC010101CCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCC010101CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC + FFCCCCFFCCCCFFCCCCFFCC010101CC00FFCC00FFCC00FFCC00FFCC00FFCC00FF + CC00FFCC00FFCC00FF010101CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33 + FFCC33FFCC33FF010101CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66FFCC66FF010101CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF + CC99FF010101CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC + FF010101CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFF01 + 0101010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + 000000000000000000000000000000000000000000000000000000000000CC00 + 99CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099010101CC3399CC + 3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399010101CC6699CC6699 + CC6699CC6699CC6699CC6699CC6699CC6699CC6699010101CC9999CC9999CC99 + 99CC9999CC9999CC9999CC9999CC9999CC9999010101CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC99CCCC99010101CCFF99CCFF99CCFF99CCFF99 + CCFF99CCFF99CCFF99CCFF99CCFF99010101CC00CCCC00CCCC00CCCC00CCCC00 + CCCC00CCCC00CCCC00CCCC00CC010101CC33CCCC33CCCC33CCCC33CCCC33CCCC + 33CCCC33CCCC33CCCC33CC010101CC66CCCC66CCCC66CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CC010101CC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99 + CCCC99CCCC99CC010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCC010101CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCC + CCFFCC010101CC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00 + FF010101CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FF01 + 0101CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FF010101 + CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF010101CCCC + FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF010101CCFFFFCC + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFF010101010101FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF000000000000000000 + 00000000000000000000000000000000000000000000CC0099CC0099CC0099CC + 0099CC0099CC0099CC0099CC0099CC0099010101CC3399CC3399CC3399CC3399 + CC3399CC3399CC3399CC3399CC3399010101CC6699CC6699CC6699CC6699CC66 + 99CC6699CC6699CC6699CC6699010101CC9999CC9999CC9999CC9999CC9999CC + 9999CC9999CC9999CC9999010101CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99 + CCCC99CCCC99CCCC99010101CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF + 99CCFF99CCFF99010101CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC + 00CCCC00CC010101CC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC + CC33CC010101CC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66 + CC010101CC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CC01 + 0101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC010101 + CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCC010101CC00 + FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FF010101CC33FFCC + 33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FF010101CC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FF010101CC99FFCC99FFCC99 + FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF010101CCCCFFCCCCFFCCCCFFCC + CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF010101CCFFFFCCFFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFF010101010101FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF0000000000000000000000000000000000 + 0000000000000000000000000000CC0099CC0099CC0099CC0099CC0099CC0099 + CC0099CC0099CC0099010101CC3399CC3399CC3399CC3399CC3399CC3399CC33 + 99CC3399CC3399010101CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC + 6699CC6699010101CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999 + CC9999010101CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC + 99010101CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF9901 + 0101CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CC010101 + CC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC010101CC66 + CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CC010101CC99CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CC010101CCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC010101CCFFCCCCFFCCCCFF + CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCC010101CC00FFCC00FFCC00FFCC + 00FFCC00FFCC00FFCC00FFCC00FFCC00FF010101CC33FFCC33FFCC33FFCC33FF + CC33FFCC33FFCC33FFCC33FFCC33FF010101CC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66FFCC66FF010101CC99FFCC99FFCC99FFCC99FFCC99FFCC + 99FFCC99FFCC99FFCC99FF010101CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF + CCCCFFCCCCFFCCCCFF010101CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF + FFCCFFFFCCFFFF010101010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00000000000000000000000000000000000000000000000000 + 000000000000CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC00 + 99010101CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC339901 + 0101CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699010101 + CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999010101CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99010101CCFF99CC + FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99010101CC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CC010101CC33CCCC33CCCC33 + CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC010101CC66CCCC66CCCC66CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CC010101CC99CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC99CC010101CCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCC010101CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC + FFCCCCFFCCCCFFCCCCFFCC010101CC00FFCC00FFCC00FFCC00FFCC00FFCC00FF + CC00FFCC00FFCC00FF010101CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33 + FFCC33FFCC33FF010101CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66FFCC66FF010101CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF + CC99FF010101CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC + FF010101CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFF01 + 0101010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + 000000000000000000000000000000000000000000000000000000000000CC00 + 99CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099010101CC3399CC + 3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399010101CC6699CC6699 + CC6699CC6699CC6699CC6699CC6699CC6699CC6699010101CC9999CC9999CC99 + 99CC9999CC9999CC9999CC9999CC9999CC9999010101CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC99CCCC99010101CCFF99CCFF99CCFF99CCFF99 + CCFF99CCFF99CCFF99CCFF99CCFF99010101CC00CCCC00CCCC00CCCC00CCCC00 + CCCC00CCCC00CCCC00CCCC00CC010101CC33CCCC33CCCC33CCCC33CCCC33CCCC + 33CCCC33CCCC33CCCC33CC010101CC66CCCC66CCCC66CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CC010101CC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99 + CCCC99CCCC99CC010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCC010101CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCC + CCFFCC010101CC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00 + FF010101CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FF01 + 0101CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FF010101 + CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF010101CCCC + FFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF010101CCFFFFCC + FFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFF010101010101FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF000000000000000000 + 00000000000000000000000000000000000000000000CC0099CC0099CC0099CC + 0099CC0099CC0099CC0099CC0099CC0099010101CC3399CC3399CC3399CC3399 + CC3399CC3399CC3399CC3399CC3399010101CC6699CC6699CC6699CC6699CC66 + 99CC6699CC6699CC6699CC6699010101CC9999CC9999CC9999CC9999CC9999CC + 9999CC9999CC9999CC9999010101CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99 + CCCC99CCCC99CCCC99010101CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF + 99CCFF99CCFF99010101CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC + 00CCCC00CC010101CC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC + CC33CC010101CC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66 + CC010101CC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CC01 + 0101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC010101 + CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCC010101CC00 + FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FF010101CC33FFCC + 33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FF010101CC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FF010101CC99FFCC99FFCC99 + FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF010101CCCCFFCCCCFFCCCCFFCC + CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF010101CCFFFFCCFFFFCCFFFFCCFFFF + CCFFFFCCFFFFCCFFFFCCFFFFCCFFFF010101010101FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF0000000000000000000000000000000000 + 0000000000000000000000000000CC0099CC0099CC0099CC0099CC0099CC0099 + CC0099CC0099CC0099010101CC3399CC3399CC3399CC3399CC3399CC3399CC33 + 99CC3399CC3399010101CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC + 6699CC6699010101CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999 + CC9999010101CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC + 99010101CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF9901 + 0101CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CC010101 + CC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC010101CC66 + CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CC010101CC99CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CC010101CCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC010101CCFFCCCCFFCCCCFF + CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCC010101CC00FFCC00FFCC00FFCC + 00FFCC00FFCC00FFCC00FFCC00FFCC00FF010101CC33FFCC33FFCC33FFCC33FF + CC33FFCC33FFCC33FFCC33FFCC33FF010101CC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66FFCC66FF010101CC99FFCC99FFCC99FFCC99FFCC99FFCC + 99FFCC99FFCC99FFCC99FF010101CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFF + CCCCFFCCCCFFCCCCFF010101CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFF + FFCCFFFFCCFFFF010101010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00000000000000000000000000000000000000000000000000 + 000000000000CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC00 + 99010101CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC339901 + 0101CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699010101 + CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999010101CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99010101CCFF99CC + FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99010101CC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CC010101CC33CCCC33CCCC33 + CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC010101CC66CCCC66CCCC66CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CC010101CC99CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC99CC010101CCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCC010101CCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC + FFCCCCFFCCCCFFCCCCFFCC010101CC00FFCC00FFCC00FFCC00FFCC00FFCC00FF + CC00FFCC00FFCC00FF010101CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33 + FFCC33FFCC33FF010101CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66FFCC66FF010101CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FF + CC99FF010101CCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCCFFCCCC + FF010101CCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFFCCFFFF01 + 0101010101010101010101010101010101010101010101010101010101010101 + 0000000000000000000000000000000000000000000000000000000000000101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 010101010101010101010101010101010101010101010101010101010100FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0000000000000000 + 0000000000000000000000000000000000000000000099009999009999009999 + 0099990099990099990099990099990099010101993399993399993399993399 + 9933999933999933999933999933990101019966999966999966999966999966 + 9999669999669999669999669901010199999999999999999999999999999999 + 999999999999999999999901010199CC9999CC9999CC9999CC9999CC9999CC99 + 99CC9999CC9999CC9901010199FF9999FF9999FF9999FF9999FF9999FF9999FF + 9999FF9999FF990101019900CC9900CC9900CC9900CC9900CC9900CC9900CC99 + 00CC9900CC0101019933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC + 9933CC0101019966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966 + CC0101019999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC01 + 010199CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC010101 + 99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC0101019900 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF0101019933FF99 + 33FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF0101019966FF9966FF + 9966FF9966FF9966FF9966FF9966FF9966FF9966FF0101019999FF9999FF9999 + FF9999FF9999FF9999FF9999FF9999FF9999FF01010199CCFF99CCFF99CCFF99 + CCFF99CCFF99CCFF99CCFF99CCFF99CCFF01010199FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99FFFF99FFFF99FFFF01010101010100FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000000000000000000000 + 0000000000000000000000000000990099990099990099990099990099990099 + 9900999900999900990101019933999933999933999933999933999933999933 + 9999339999339901010199669999669999669999669999669999669999669999 + 6699996699010101999999999999999999999999999999999999999999999999 + 99999901010199CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC + 9901010199FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9901 + 01019900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC010101 + 9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC0101019966 + CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC0101019999CC99 + 99CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC01010199CCCC99CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC01010199FFCC99FFCC99FF + CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC0101019900FF9900FF9900FF99 + 00FF9900FF9900FF9900FF9900FF9900FF0101019933FF9933FF9933FF9933FF + 9933FF9933FF9933FF9933FF9933FF0101019966FF9966FF9966FF9966FF9966 + FF9966FF9966FF9966FF9966FF0101019999FF9999FF9999FF9999FF9999FF99 + 99FF9999FF9999FF9999FF01010199CCFF99CCFF99CCFF99CCFF99CCFF99CCFF + 99CCFF99CCFF99CCFF01010199FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF + FF99FFFF99FFFF01010101010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF000000000000000000000000000000000000000000000000 + 0000000000009900999900999900999900999900999900999900999900999900 + 9901010199339999339999339999339999339999339999339999339999339901 + 0101996699996699996699996699996699996699996699996699996699010101 + 99999999999999999999999999999999999999999999999999999901010199CC + 9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9901010199FF9999 + FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF990101019900CC9900CC + 9900CC9900CC9900CC9900CC9900CC9900CC9900CC0101019933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933CC9933CC0101019966CC9966CC9966CC99 + 66CC9966CC9966CC9966CC9966CC9966CC0101019999CC9999CC9999CC9999CC + 9999CC9999CC9999CC9999CC9999CC01010199CCCC99CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC01010199FFCC99FFCC99FFCC99FFCC99FFCC99 + FFCC99FFCC99FFCC99FFCC0101019900FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF9900FF0101019933FF9933FF9933FF9933FF9933FF9933FF9933 + FF9933FF9933FF0101019966FF9966FF9966FF9966FF9966FF9966FF9966FF99 + 66FF9966FF0101019999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF + 9999FF01010199CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC + FF01010199FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF01 + 010101010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 0000000000000000000000000000000000000000000000000000000000009900 + 9999009999009999009999009999009999009999009999009901010199339999 + 3399993399993399993399993399993399993399993399010101996699996699 + 9966999966999966999966999966999966999966990101019999999999999999 + 9999999999999999999999999999999999999901010199CC9999CC9999CC9999 + CC9999CC9999CC9999CC9999CC9999CC9901010199FF9999FF9999FF9999FF99 + 99FF9999FF9999FF9999FF9999FF990101019900CC9900CC9900CC9900CC9900 + CC9900CC9900CC9900CC9900CC0101019933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933CC9933CC0101019966CC9966CC9966CC9966CC9966CC9966CC + 9966CC9966CC9966CC0101019999CC9999CC9999CC9999CC9999CC9999CC9999 + CC9999CC9999CC01010199CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99 + CCCC99CCCC01010199FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC + 99FFCC0101019900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900 + FF0101019933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF01 + 01019966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF010101 + 9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF01010199CC + FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF01010199FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF01010101010100FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0000000000000000 + 0000000000000000000000000000000000000000000099009999009999009999 + 0099990099990099990099990099990099010101993399993399993399993399 + 9933999933999933999933999933990101019966999966999966999966999966 + 9999669999669999669999669901010199999999999999999999999999999999 + 999999999999999999999901010199CC9999CC9999CC9999CC9999CC9999CC99 + 99CC9999CC9999CC9901010199FF9999FF9999FF9999FF9999FF9999FF9999FF + 9999FF9999FF990101019900CC9900CC9900CC9900CC9900CC9900CC9900CC99 + 00CC9900CC0101019933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC + 9933CC0101019966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966 + CC0101019999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC01 + 010199CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC010101 + 99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC0101019900 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF0101019933FF99 + 33FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF0101019966FF9966FF + 9966FF9966FF9966FF9966FF9966FF9966FF9966FF0101019999FF9999FF9999 + FF9999FF9999FF9999FF9999FF9999FF9999FF01010199CCFF99CCFF99CCFF99 + CCFF99CCFF99CCFF99CCFF99CCFF99CCFF01010199FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99FFFF99FFFF99FFFF01010101010100FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000000000000000000000 + 0000000000000000000000000000990099990099990099990099990099990099 + 9900999900999900990101019933999933999933999933999933999933999933 + 9999339999339901010199669999669999669999669999669999669999669999 + 6699996699010101999999999999999999999999999999999999999999999999 + 99999901010199CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC + 9901010199FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9901 + 01019900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC010101 + 9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC0101019966 + CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC0101019999CC99 + 99CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC01010199CCCC99CCCC + 99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC01010199FFCC99FFCC99FF + CC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC0101019900FF9900FF9900FF99 + 00FF9900FF9900FF9900FF9900FF9900FF0101019933FF9933FF9933FF9933FF + 9933FF9933FF9933FF9933FF9933FF0101019966FF9966FF9966FF9966FF9966 + FF9966FF9966FF9966FF9966FF0101019999FF9999FF9999FF9999FF9999FF99 + 99FF9999FF9999FF9999FF01010199CCFF99CCFF99CCFF99CCFF99CCFF99CCFF + 99CCFF99CCFF99CCFF01010199FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FF + FF99FFFF99FFFF01010101010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF000000000000000000000000000000000000000000000000 + 0000000000009900999900999900999900999900999900999900999900999900 + 9901010199339999339999339999339999339999339999339999339999339901 + 0101996699996699996699996699996699996699996699996699996699010101 + 99999999999999999999999999999999999999999999999999999901010199CC + 9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9901010199FF9999 + FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF990101019900CC9900CC + 9900CC9900CC9900CC9900CC9900CC9900CC9900CC0101019933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933CC9933CC0101019966CC9966CC9966CC99 + 66CC9966CC9966CC9966CC9966CC9966CC0101019999CC9999CC9999CC9999CC + 9999CC9999CC9999CC9999CC9999CC01010199CCCC99CCCC99CCCC99CCCC99CC + CC99CCCC99CCCC99CCCC99CCCC01010199FFCC99FFCC99FFCC99FFCC99FFCC99 + FFCC99FFCC99FFCC99FFCC0101019900FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF9900FF0101019933FF9933FF9933FF9933FF9933FF9933FF9933 + FF9933FF9933FF0101019966FF9966FF9966FF9966FF9966FF9966FF9966FF99 + 66FF9966FF0101019999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF + 9999FF01010199CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CC + FF01010199FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF01 + 010101010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 0000000000000000000000000000000000000000000000000000000000009900 + 9999009999009999009999009999009999009999009999009901010199339999 + 3399993399993399993399993399993399993399993399010101996699996699 + 9966999966999966999966999966999966999966990101019999999999999999 + 9999999999999999999999999999999999999901010199CC9999CC9999CC9999 + CC9999CC9999CC9999CC9999CC9999CC9901010199FF9999FF9999FF9999FF99 + 99FF9999FF9999FF9999FF9999FF990101019900CC9900CC9900CC9900CC9900 + CC9900CC9900CC9900CC9900CC0101019933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933CC9933CC0101019966CC9966CC9966CC9966CC9966CC9966CC + 9966CC9966CC9966CC0101019999CC9999CC9999CC9999CC9999CC9999CC9999 + CC9999CC9999CC01010199CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99 + CCCC99CCCC01010199FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC + 99FFCC0101019900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900 + FF0101019933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF01 + 01019966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF010101 + 9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF9999FF01010199CC + FF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF99CCFF01010199FFFF99 + FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF99FFFF01010101010100FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0000000000000000 + 0000000000000000000000000000000000000000000099009999009999009999 + 0099990099990099990099990099990099010101993399993399993399993399 + 9933999933999933999933999933990101019966999966999966999966999966 + 9999669999669999669999669901010199999999999999999999999999999999 + 999999999999999999999901010199CC9999CC9999CC9999CC9999CC9999CC99 + 99CC9999CC9999CC9901010199FF9999FF9999FF9999FF9999FF9999FF9999FF + 9999FF9999FF990101019900CC9900CC9900CC9900CC9900CC9900CC9900CC99 + 00CC9900CC0101019933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC + 9933CC0101019966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966 + CC0101019999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC9999CC01 + 010199CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC99CCCC010101 + 99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC99FFCC0101019900 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF0101019933FF99 + 33FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF0101019966FF9966FF + 9966FF9966FF9966FF9966FF9966FF9966FF9966FF0101019999FF9999FF9999 + FF9999FF9999FF9999FF9999FF9999FF9999FF01010199CCFF99CCFF99CCFF99 + CCFF99CCFF99CCFF99CCFF99CCFF99CCFF01010199FFFF99FFFF99FFFF99FFFF + 99FFFF99FFFF99FFFF99FFFF99FFFF0101010101010101010101010101010101 + 0101010101010101010101010101010100000000000000000000000000000000 + 0000000000000000000000000000010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 01010101010101010101010101FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0000000000000000000000000000000000000000000000000000 + 0000000000006600996600996600996600996600996600996600996600996600 + 9901010166339966339966339966339966339966339966339966339966339901 + 0101666699666699666699666699666699666699666699666699666699010101 + 66999966999966999966999966999966999966999966999966999901010166CC + 9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9901010166FF9966 + FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF990101016600CC6600CC + 6600CC6600CC6600CC6600CC6600CC6600CC6600CC0101016633CC6633CC6633 + CC6633CC6633CC6633CC6633CC6633CC6633CC0101016666CC6666CC6666CC66 + 66CC6666CC6666CC6666CC6666CC6666CC0101016699CC6699CC6699CC6699CC + 6699CC6699CC6699CC6699CC6699CC01010166CCCC66CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CCCC66CCCC01010166FFCC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66FFCC0101016600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600FF6600FF0101016633FF6633FF6633FF6633FF6633FF6633FF6633 + FF6633FF6633FF0101016666FF6666FF6666FF6666FF6666FF6666FF6666FF66 + 66FF6666FF0101016699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF01010166CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CC + FF01010166FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF01 + 0101010101FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 + 0000000000000000000000000000000000000000000000000000000000006600 + 9966009966009966009966009966009966009966009966009901010166339966 + 3399663399663399663399663399663399663399663399010101666699666699 + 6666996666996666996666996666996666996666990101016699996699996699 + 9966999966999966999966999966999966999901010166CC9966CC9966CC9966 + CC9966CC9966CC9966CC9966CC9966CC9901010166FF9966FF9966FF9966FF99 + 66FF9966FF9966FF9966FF9966FF990101016600CC6600CC6600CC6600CC6600 + CC6600CC6600CC6600CC6600CC0101016633CC6633CC6633CC6633CC6633CC66 + 33CC6633CC6633CC6633CC0101016666CC6666CC6666CC6666CC6666CC6666CC + 6666CC6666CC6666CC0101016699CC6699CC6699CC6699CC6699CC6699CC6699 + CC6699CC6699CC01010166CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66 + CCCC66CCCC01010166FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66FFCC0101016600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600 + FF0101016633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF01 + 01016666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF010101 + 6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF01010166CC + FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF01010166FFFF66 + FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF010101010101FF0000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00000000000000000000 + 0000000000000000000000000000000000000000000066009966009966009966 + 0099660099660099660099660099660099010101663399663399663399663399 + 6633996633996633996633996633990101016666996666996666996666996666 + 9966669966669966669966669901010166999966999966999966999966999966 + 999966999966999966999901010166CC9966CC9966CC9966CC9966CC9966CC99 + 66CC9966CC9966CC9901010166FF9966FF9966FF9966FF9966FF9966FF9966FF + 9966FF9966FF990101016600CC6600CC6600CC6600CC6600CC6600CC6600CC66 + 00CC6600CC0101016633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC + 6633CC0101016666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666 + CC0101016699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC01 + 010166CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC010101 + 66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC0101016600 + FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF0101016633FF66 + 33FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF0101016666FF6666FF + 6666FF6666FF6666FF6666FF6666FF6666FF6666FF0101016699FF6699FF6699 + FF6699FF6699FF6699FF6699FF6699FF6699FF01010166CCFF66CCFF66CCFF66 + CCFF66CCFF66CCFF66CCFF66CCFF66CCFF01010166FFFF66FFFF66FFFF66FFFF + 66FFFF66FFFF66FFFF66FFFF66FFFF010101010101FF0000FF0000FF0000FF00 + 00FF0000FF0000FF0000FF0000FF000000000000000000000000000000000000 + 0000000000000000000000000000660099660099660099660099660099660099 + 6600996600996600990101016633996633996633996633996633996633996633 + 9966339966339901010166669966669966669966669966669966669966669966 + 6699666699010101669999669999669999669999669999669999669999669999 + 66999901010166CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC + 9901010166FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9901 + 01016600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC010101 + 6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC0101016666 + CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC0101016699CC66 + 99CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC01010166CCCC66CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC01010166FFCC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC0101016600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600FF6600FF0101016633FF6633FF6633FF6633FF + 6633FF6633FF6633FF6633FF6633FF0101016666FF6666FF6666FF6666FF6666 + FF6666FF6666FF6666FF6666FF0101016699FF6699FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF01010166CCFF66CCFF66CCFF66CCFF66CCFF66CCFF + 66CCFF66CCFF66CCFF01010166FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF + FF66FFFF66FFFF010101010101FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0000000000000000000000000000000000000000000000000000 + 0000000000006600996600996600996600996600996600996600996600996600 + 9901010166339966339966339966339966339966339966339966339966339901 + 0101666699666699666699666699666699666699666699666699666699010101 + 66999966999966999966999966999966999966999966999966999901010166CC + 9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9901010166FF9966 + FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF990101016600CC6600CC + 6600CC6600CC6600CC6600CC6600CC6600CC6600CC0101016633CC6633CC6633 + CC6633CC6633CC6633CC6633CC6633CC6633CC0101016666CC6666CC6666CC66 + 66CC6666CC6666CC6666CC6666CC6666CC0101016699CC6699CC6699CC6699CC + 6699CC6699CC6699CC6699CC6699CC01010166CCCC66CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CCCC66CCCC01010166FFCC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66FFCC0101016600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600FF6600FF0101016633FF6633FF6633FF6633FF6633FF6633FF6633 + FF6633FF6633FF0101016666FF6666FF6666FF6666FF6666FF6666FF6666FF66 + 66FF6666FF0101016699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF01010166CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CC + FF01010166FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF01 + 0101010101FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 + 0000000000000000000000000000000000000000000000000000000000006600 + 9966009966009966009966009966009966009966009966009901010166339966 + 3399663399663399663399663399663399663399663399010101666699666699 + 6666996666996666996666996666996666996666990101016699996699996699 + 9966999966999966999966999966999966999901010166CC9966CC9966CC9966 + CC9966CC9966CC9966CC9966CC9966CC9901010166FF9966FF9966FF9966FF99 + 66FF9966FF9966FF9966FF9966FF990101016600CC6600CC6600CC6600CC6600 + CC6600CC6600CC6600CC6600CC0101016633CC6633CC6633CC6633CC6633CC66 + 33CC6633CC6633CC6633CC0101016666CC6666CC6666CC6666CC6666CC6666CC + 6666CC6666CC6666CC0101016699CC6699CC6699CC6699CC6699CC6699CC6699 + CC6699CC6699CC01010166CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66 + CCCC66CCCC01010166FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66FFCC0101016600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600 + FF0101016633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF01 + 01016666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF010101 + 6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF01010166CC + FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF01010166FFFF66 + FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF010101010101FF0000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00000000000000000000 + 0000000000000000000000000000000000000000000066009966009966009966 + 0099660099660099660099660099660099010101663399663399663399663399 + 6633996633996633996633996633990101016666996666996666996666996666 + 9966669966669966669966669901010166999966999966999966999966999966 + 999966999966999966999901010166CC9966CC9966CC9966CC9966CC9966CC99 + 66CC9966CC9966CC9901010166FF9966FF9966FF9966FF9966FF9966FF9966FF + 9966FF9966FF990101016600CC6600CC6600CC6600CC6600CC6600CC6600CC66 + 00CC6600CC0101016633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC + 6633CC0101016666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666 + CC0101016699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC01 + 010166CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC010101 + 66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC0101016600 + FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF0101016633FF66 + 33FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF0101016666FF6666FF + 6666FF6666FF6666FF6666FF6666FF6666FF6666FF0101016699FF6699FF6699 + FF6699FF6699FF6699FF6699FF6699FF6699FF01010166CCFF66CCFF66CCFF66 + CCFF66CCFF66CCFF66CCFF66CCFF66CCFF01010166FFFF66FFFF66FFFF66FFFF + 66FFFF66FFFF66FFFF66FFFF66FFFF010101010101FF0000FF0000FF0000FF00 + 00FF0000FF0000FF0000FF0000FF000000000000000000000000000000000000 + 0000000000000000000000000000660099660099660099660099660099660099 + 6600996600996600990101016633996633996633996633996633996633996633 + 9966339966339901010166669966669966669966669966669966669966669966 + 6699666699010101669999669999669999669999669999669999669999669999 + 66999901010166CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC + 9901010166FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9901 + 01016600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC010101 + 6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC0101016666 + CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC0101016699CC66 + 99CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC01010166CCCC66CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC01010166FFCC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC0101016600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600FF6600FF0101016633FF6633FF6633FF6633FF + 6633FF6633FF6633FF6633FF6633FF0101016666FF6666FF6666FF6666FF6666 + FF6666FF6666FF6666FF6666FF0101016699FF6699FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF01010166CCFF66CCFF66CCFF66CCFF66CCFF66CCFF + 66CCFF66CCFF66CCFF01010166FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FF + FF66FFFF66FFFF010101010101FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0000000000000000000000000000000000000000000000000000 + 0000000000006600996600996600996600996600996600996600996600996600 + 9901010166339966339966339966339966339966339966339966339966339901 + 0101666699666699666699666699666699666699666699666699666699010101 + 66999966999966999966999966999966999966999966999966999901010166CC + 9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9901010166FF9966 + FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF990101016600CC6600CC + 6600CC6600CC6600CC6600CC6600CC6600CC6600CC0101016633CC6633CC6633 + CC6633CC6633CC6633CC6633CC6633CC6633CC0101016666CC6666CC6666CC66 + 66CC6666CC6666CC6666CC6666CC6666CC0101016699CC6699CC6699CC6699CC + 6699CC6699CC6699CC6699CC6699CC01010166CCCC66CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CCCC66CCCC01010166FFCC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66FFCC0101016600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600FF6600FF0101016633FF6633FF6633FF6633FF6633FF6633FF6633 + FF6633FF6633FF0101016666FF6666FF6666FF6666FF6666FF6666FF6666FF66 + 66FF6666FF0101016699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF01010166CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CC + FF01010166FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF01 + 0101010101010101010101010101010101010101010101010101010101010101 + 0000000000000000000000000000000000000000000000000000000000000101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 010101010101010101010101010101010101010101010101010101010100FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF000000000000000000 + 0000000000000000000000000000000000000000000033009933009933009933 + 0099330099330099330099330099330099010101333399333399333399333399 + 3333993333993333993333993333990101013366993366993366993366993366 + 9933669933669933669933669901010133999933999933999933999933999933 + 999933999933999933999901010133CC9933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933CC9901010133FF9933FF9933FF9933FF9933FF9933FF9933FF + 9933FF9933FF990101013300CC3300CC3300CC3300CC3300CC3300CC3300CC33 + 00CC3300CC0101013333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC + 3333CC0101013366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366 + CC0101013399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC01 + 010133CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC010101 + 33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC0101013300 + FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF0101013333FF33 + 33FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF0101013366FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3366FF0101013399FF3399FF3399 + FF3399FF3399FF3399FF3399FF3399FF3399FF01010133CCFF33CCFF33CCFF33 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF01010133FFFF33FFFF33FFFF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF01010101010100FF0000FF0000FF0000FF + 0000FF0000FF0000FF0000FF0000FF0000000000000000000000000000000000 + 0000000000000000000000000000330099330099330099330099330099330099 + 3300993300993300990101013333993333993333993333993333993333993333 + 9933339933339901010133669933669933669933669933669933669933669933 + 6699336699010101339999339999339999339999339999339999339999339999 + 33999901010133CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC + 9901010133FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9901 + 01013300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC010101 + 3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC0101013366 + CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC0101013399CC33 + 99CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC01010133CCCC33CCCC + 33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC01010133FFCC33FFCC33FF + CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC0101013300FF3300FF3300FF33 + 00FF3300FF3300FF3300FF3300FF3300FF0101013333FF3333FF3333FF3333FF + 3333FF3333FF3333FF3333FF3333FF0101013366FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF3366FF0101013399FF3399FF3399FF3399FF3399FF33 + 99FF3399FF3399FF3399FF01010133CCFF33CCFF33CCFF33CCFF33CCFF33CCFF + 33CCFF33CCFF33CCFF01010133FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF + FF33FFFF33FFFF01010101010100FF0000FF0000FF0000FF0000FF0000FF0000 + FF0000FF0000FF00000000000000000000000000000000000000000000000000 + 0000000000003300993300993300993300993300993300993300993300993300 + 9901010133339933339933339933339933339933339933339933339933339901 + 0101336699336699336699336699336699336699336699336699336699010101 + 33999933999933999933999933999933999933999933999933999901010133CC + 9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9901010133FF9933 + FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF990101013300CC3300CC + 3300CC3300CC3300CC3300CC3300CC3300CC3300CC0101013333CC3333CC3333 + CC3333CC3333CC3333CC3333CC3333CC3333CC0101013366CC3366CC3366CC33 + 66CC3366CC3366CC3366CC3366CC3366CC0101013399CC3399CC3399CC3399CC + 3399CC3399CC3399CC3399CC3399CC01010133CCCC33CCCC33CCCC33CCCC33CC + CC33CCCC33CCCC33CCCC33CCCC01010133FFCC33FFCC33FFCC33FFCC33FFCC33 + FFCC33FFCC33FFCC33FFCC0101013300FF3300FF3300FF3300FF3300FF3300FF + 3300FF3300FF3300FF0101013333FF3333FF3333FF3333FF3333FF3333FF3333 + FF3333FF3333FF0101013366FF3366FF3366FF3366FF3366FF3366FF3366FF33 + 66FF3366FF0101013399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF + 3399FF01010133CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF01010133FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF01 + 010101010100FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 + 0000000000000000000000000000000000000000000000000000000000003300 + 9933009933009933009933009933009933009933009933009901010133339933 + 3399333399333399333399333399333399333399333399010101336699336699 + 3366993366993366993366993366993366993366990101013399993399993399 + 9933999933999933999933999933999933999901010133CC9933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933CC9901010133FF9933FF9933FF9933FF99 + 33FF9933FF9933FF9933FF9933FF990101013300CC3300CC3300CC3300CC3300 + CC3300CC3300CC3300CC3300CC0101013333CC3333CC3333CC3333CC3333CC33 + 33CC3333CC3333CC3333CC0101013366CC3366CC3366CC3366CC3366CC3366CC + 3366CC3366CC3366CC0101013399CC3399CC3399CC3399CC3399CC3399CC3399 + CC3399CC3399CC01010133CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33 + CCCC33CCCC01010133FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC + 33FFCC0101013300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300 + FF0101013333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF01 + 01013366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF010101 + 3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF01010133CC + FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF01010133FFFF33 + FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF01010101010100FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF000000000000000000 + 0000000000000000000000000000000000000000000033009933009933009933 + 0099330099330099330099330099330099010101333399333399333399333399 + 3333993333993333993333993333990101013366993366993366993366993366 + 9933669933669933669933669901010133999933999933999933999933999933 + 999933999933999933999901010133CC9933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933CC9901010133FF9933FF9933FF9933FF9933FF9933FF9933FF + 9933FF9933FF990101013300CC3300CC3300CC3300CC3300CC3300CC3300CC33 + 00CC3300CC0101013333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC + 3333CC0101013366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366 + CC0101013399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC01 + 010133CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC010101 + 33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC0101013300 + FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF0101013333FF33 + 33FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF0101013366FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3366FF0101013399FF3399FF3399 + FF3399FF3399FF3399FF3399FF3399FF3399FF01010133CCFF33CCFF33CCFF33 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF01010133FFFF33FFFF33FFFF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF01010101010100FF0000FF0000FF0000FF + 0000FF0000FF0000FF0000FF0000FF0000000000000000000000000000000000 + 0000000000000000000000000000330099330099330099330099330099330099 + 3300993300993300990101013333993333993333993333993333993333993333 + 9933339933339901010133669933669933669933669933669933669933669933 + 6699336699010101339999339999339999339999339999339999339999339999 + 33999901010133CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC + 9901010133FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9901 + 01013300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC010101 + 3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC0101013366 + CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC0101013399CC33 + 99CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC01010133CCCC33CCCC + 33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC01010133FFCC33FFCC33FF + CC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC0101013300FF3300FF3300FF33 + 00FF3300FF3300FF3300FF3300FF3300FF0101013333FF3333FF3333FF3333FF + 3333FF3333FF3333FF3333FF3333FF0101013366FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF3366FF0101013399FF3399FF3399FF3399FF3399FF33 + 99FF3399FF3399FF3399FF01010133CCFF33CCFF33CCFF33CCFF33CCFF33CCFF + 33CCFF33CCFF33CCFF01010133FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FF + FF33FFFF33FFFF01010101010100FF0000FF0000FF0000FF0000FF0000FF0000 + FF0000FF0000FF00000000000000000000000000000000000000000000000000 + 0000000000003300993300993300993300993300993300993300993300993300 + 9901010133339933339933339933339933339933339933339933339933339901 + 0101336699336699336699336699336699336699336699336699336699010101 + 33999933999933999933999933999933999933999933999933999901010133CC + 9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9901010133FF9933 + FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF990101013300CC3300CC + 3300CC3300CC3300CC3300CC3300CC3300CC3300CC0101013333CC3333CC3333 + CC3333CC3333CC3333CC3333CC3333CC3333CC0101013366CC3366CC3366CC33 + 66CC3366CC3366CC3366CC3366CC3366CC0101013399CC3399CC3399CC3399CC + 3399CC3399CC3399CC3399CC3399CC01010133CCCC33CCCC33CCCC33CCCC33CC + CC33CCCC33CCCC33CCCC33CCCC01010133FFCC33FFCC33FFCC33FFCC33FFCC33 + FFCC33FFCC33FFCC33FFCC0101013300FF3300FF3300FF3300FF3300FF3300FF + 3300FF3300FF3300FF0101013333FF3333FF3333FF3333FF3333FF3333FF3333 + FF3333FF3333FF0101013366FF3366FF3366FF3366FF3366FF3366FF3366FF33 + 66FF3366FF0101013399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF + 3399FF01010133CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF01010133FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF01 + 010101010100FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 + 0000000000000000000000000000000000000000000000000000000000003300 + 9933009933009933009933009933009933009933009933009901010133339933 + 3399333399333399333399333399333399333399333399010101336699336699 + 3366993366993366993366993366993366993366990101013399993399993399 + 9933999933999933999933999933999933999901010133CC9933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933CC9901010133FF9933FF9933FF9933FF99 + 33FF9933FF9933FF9933FF9933FF990101013300CC3300CC3300CC3300CC3300 + CC3300CC3300CC3300CC3300CC0101013333CC3333CC3333CC3333CC3333CC33 + 33CC3333CC3333CC3333CC0101013366CC3366CC3366CC3366CC3366CC3366CC + 3366CC3366CC3366CC0101013399CC3399CC3399CC3399CC3399CC3399CC3399 + CC3399CC3399CC01010133CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33 + CCCC33CCCC01010133FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC + 33FFCC0101013300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300 + FF0101013333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF01 + 01013366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF010101 + 3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF01010133CC + FF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF01010133FFFF33 + FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF01010101010100FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF000000000000000000 + 0000000000000000000000000000000000000000000033009933009933009933 + 0099330099330099330099330099330099010101333399333399333399333399 + 3333993333993333993333993333990101013366993366993366993366993366 + 9933669933669933669933669901010133999933999933999933999933999933 + 999933999933999933999901010133CC9933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933CC9901010133FF9933FF9933FF9933FF9933FF9933FF9933FF + 9933FF9933FF990101013300CC3300CC3300CC3300CC3300CC3300CC3300CC33 + 00CC3300CC0101013333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC + 3333CC0101013366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366 + CC0101013399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC01 + 010133CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC010101 + 33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC0101013300 + FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF0101013333FF33 + 33FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF0101013366FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3366FF0101013399FF3399FF3399 + FF3399FF3399FF3399FF3399FF3399FF3399FF01010133CCFF33CCFF33CCFF33 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF01010133FFFF33FFFF33FFFF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF0101010101010101010101010101010101 + 0101010101010101010101010101010100000000000000000000000000000000 + 0000000000000000000000000000010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 010101010101010101010101010000FF0000FF0000FF0000FF0000FF0000FF00 + 00FF0000FF0000FF000000000000000000000000000000000000000000000000 + 0000000000000000990000990000990000990000990000990000990000990000 + 9901010100339900339900339900339900339900339900339900339900339901 + 0101006699006699006699006699006699006699006699006699006699010101 + 00999900999900999900999900999900999900999900999900999901010100CC + 9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9901010100FF9900 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF990101010000CC0000CC + 0000CC0000CC0000CC0000CC0000CC0000CC0000CC0101010033CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0033CC0101010066CC0066CC0066CC00 + 66CC0066CC0066CC0066CC0066CC0066CC0101010099CC0099CC0099CC0099CC + 0099CC0099CC0099CC0099CC0099CC01010100CCCC00CCCC00CCCC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC01010100FFCC00FFCC00FFCC00FFCC00FFCC00 + FFCC00FFCC00FFCC00FFCC0101010000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0000FF0101010033FF0033FF0033FF0033FF0033FF0033FF0033 + FF0033FF0033FF0101010066FF0066FF0066FF0066FF0066FF0066FF0066FF00 + 66FF0066FF0101010099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF + 0099FF01010100CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC + FF01010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF01 + 01010101010000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000000000000000000000000000000000000000000000000000000000000000 + 9900009900009900009900009900009900009900009900009901010100339900 + 3399003399003399003399003399003399003399003399010101006699006699 + 0066990066990066990066990066990066990066990101010099990099990099 + 9900999900999900999900999900999900999901010100CC9900CC9900CC9900 + CC9900CC9900CC9900CC9900CC9900CC9901010100FF9900FF9900FF9900FF99 + 00FF9900FF9900FF9900FF9900FF990101010000CC0000CC0000CC0000CC0000 + CC0000CC0000CC0000CC0000CC0101010033CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0033CC0101010066CC0066CC0066CC0066CC0066CC0066CC + 0066CC0066CC0066CC0101010099CC0099CC0099CC0099CC0099CC0099CC0099 + CC0099CC0099CC01010100CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00 + CCCC00CCCC01010100FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC + 00FFCC0101010000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 + FF0101010033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF01 + 01010066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF010101 + 0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF01010100CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF01010100FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0101010101010000FF + 0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000 + 0000000000000000000000000000000000000000000000009900009900009900 + 0099000099000099000099000099000099010101003399003399003399003399 + 0033990033990033990033990033990101010066990066990066990066990066 + 9900669900669900669900669901010100999900999900999900999900999900 + 999900999900999900999901010100CC9900CC9900CC9900CC9900CC9900CC99 + 00CC9900CC9900CC9901010100FF9900FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF990101010000CC0000CC0000CC0000CC0000CC0000CC0000CC00 + 00CC0000CC0101010033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC + 0033CC0101010066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066 + CC0101010099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC01 + 010100CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC010101 + 00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC0101010000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0101010033FF00 + 33FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0101010066FF0066FF + 0066FF0066FF0066FF0066FF0066FF0066FF0066FF0101010099FF0099FF0099 + FF0099FF0099FF0099FF0099FF0099FF0099FF01010100CCFF00CCFF00CCFF00 + CCFF00CCFF00CCFF00CCFF00CCFF00CCFF01010100FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF0101010101010000FF0000FF0000FF0000 + FF0000FF0000FF0000FF0000FF0000FF00000000000000000000000000000000 + 0000000000000000000000000000000099000099000099000099000099000099 + 0000990000990000990101010033990033990033990033990033990033990033 + 9900339900339901010100669900669900669900669900669900669900669900 + 6699006699010101009999009999009999009999009999009999009999009999 + 00999901010100CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC + 9901010100FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9901 + 01010000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC010101 + 0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0101010066 + CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0101010099CC00 + 99CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC01010100CCCC00CCCC + 00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC01010100FFCC00FFCC00FF + CC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC0101010000FF0000FF0000FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0101010033FF0033FF0033FF0033FF + 0033FF0033FF0033FF0033FF0033FF0101010066FF0066FF0066FF0066FF0066 + FF0066FF0066FF0066FF0066FF0101010099FF0099FF0099FF0099FF0099FF00 + 99FF0099FF0099FF0099FF01010100CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CCFF00CCFF01010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF0101010101010000FF0000FF0000FF0000FF0000FF0000FF00 + 00FF0000FF0000FF000000000000000000000000000000000000000000000000 + 0000000000000000990000990000990000990000990000990000990000990000 + 9901010100339900339900339900339900339900339900339900339900339901 + 0101006699006699006699006699006699006699006699006699006699010101 + 00999900999900999900999900999900999900999900999900999901010100CC + 9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9901010100FF9900 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF990101010000CC0000CC + 0000CC0000CC0000CC0000CC0000CC0000CC0000CC0101010033CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0033CC0101010066CC0066CC0066CC00 + 66CC0066CC0066CC0066CC0066CC0066CC0101010099CC0099CC0099CC0099CC + 0099CC0099CC0099CC0099CC0099CC01010100CCCC00CCCC00CCCC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC01010100FFCC00FFCC00FFCC00FFCC00FFCC00 + FFCC00FFCC00FFCC00FFCC0101010000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0000FF0101010033FF0033FF0033FF0033FF0033FF0033FF0033 + FF0033FF0033FF0101010066FF0066FF0066FF0066FF0066FF0066FF0066FF00 + 66FF0066FF0101010099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF + 0099FF01010100CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC + FF01010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF01 + 01010101010000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000000000000000000000000000000000000000000000000000000000000000 + 9900009900009900009900009900009900009900009900009901010100339900 + 3399003399003399003399003399003399003399003399010101006699006699 + 0066990066990066990066990066990066990066990101010099990099990099 + 9900999900999900999900999900999900999901010100CC9900CC9900CC9900 + CC9900CC9900CC9900CC9900CC9900CC9901010100FF9900FF9900FF9900FF99 + 00FF9900FF9900FF9900FF9900FF990101010000CC0000CC0000CC0000CC0000 + CC0000CC0000CC0000CC0000CC0101010033CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0033CC0101010066CC0066CC0066CC0066CC0066CC0066CC + 0066CC0066CC0066CC0101010099CC0099CC0099CC0099CC0099CC0099CC0099 + CC0099CC0099CC01010100CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00 + CCCC00CCCC01010100FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC + 00FFCC0101010000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 + FF0101010033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF01 + 01010066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF010101 + 0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF01010100CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF01010100FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0101010101010000FF + 0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000000000000000 + 0000000000000000000000000000000000000000000000009900009900009900 + 0099000099000099000099000099000099010101003399003399003399003399 + 0033990033990033990033990033990101010066990066990066990066990066 + 9900669900669900669900669901010100999900999900999900999900999900 + 999900999900999900999901010100CC9900CC9900CC9900CC9900CC9900CC99 + 00CC9900CC9900CC9901010100FF9900FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF990101010000CC0000CC0000CC0000CC0000CC0000CC0000CC00 + 00CC0000CC0101010033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC + 0033CC0101010066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066 + CC0101010099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC01 + 010100CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC010101 + 00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC0101010000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0101010033FF00 + 33FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0101010066FF0066FF + 0066FF0066FF0066FF0066FF0066FF0066FF0066FF0101010099FF0099FF0099 + FF0099FF0099FF0099FF0099FF0099FF0099FF01010100CCFF00CCFF00CCFF00 + CCFF00CCFF00CCFF00CCFF00CCFF00CCFF01010100FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF0101010101010000FF0000FF0000FF0000 + FF0000FF0000FF0000FF0000FF0000FF00000000000000000000000000000000 + 0000000000000000000000000000000099000099000099000099000099000099 + 0000990000990000990101010033990033990033990033990033990033990033 + 9900339900339901010100669900669900669900669900669900669900669900 + 6699006699010101009999009999009999009999009999009999009999009999 + 00999901010100CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC + 9901010100FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9901 + 01010000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC010101 + 0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0101010066 + CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0101010099CC00 + 99CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC01010100CCCC00CCCC + 00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC01010100FFCC00FFCC00FF + CC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC0101010000FF0000FF0000FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0101010033FF0033FF0033FF0033FF + 0033FF0033FF0033FF0033FF0033FF0101010066FF0066FF0066FF0066FF0066 + FF0066FF0066FF0066FF0066FF0101010099FF0099FF0099FF0099FF0099FF00 + 99FF0099FF0099FF0099FF01010100CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CCFF00CCFF01010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF0101010101010000FF0000FF0000FF0000FF0000FF0000FF00 + 00FF0000FF0000FF000000000000000000000000000000000000000000000000 + 0000000000000000990000990000990000990000990000990000990000990000 + 9901010100339900339900339900339900339900339900339900339900339901 + 0101006699006699006699006699006699006699006699006699006699010101 + 00999900999900999900999900999900999900999900999900999901010100CC + 9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9901010100FF9900 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF990101010000CC0000CC + 0000CC0000CC0000CC0000CC0000CC0000CC0000CC0101010033CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0033CC0101010066CC0066CC0066CC00 + 66CC0066CC0066CC0066CC0066CC0066CC0101010099CC0099CC0099CC0099CC + 0099CC0099CC0099CC0099CC0099CC01010100CCCC00CCCC00CCCC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC01010100FFCC00FFCC00FFCC00FFCC00FFCC00 + FFCC00FFCC00FFCC00FFCC0101010000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0000FF0101010033FF0033FF0033FF0033FF0033FF0033FF0033 + FF0033FF0033FF0101010066FF0066FF0066FF0066FF0066FF0066FF0066FF00 + 66FF0066FF0101010099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF + 0099FF01010100CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CC + FF01010100FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF01 + 0101010101010101010101010101010101010101010101010101010101010101 + 0000000000000000000000000000000000000000000000000000000000000101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101FFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000 + 00000000000000000000000000000000000000000000FF0000FF0000FF0000FF + 0000FF0000FF0000FF0000FF0000FF0000010101FF3300FF3300FF3300FF3300 + FF3300FF3300FF3300FF3300FF3300010101FF6600FF6600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600010101FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF9900FF9900010101FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00 + FFCC00FFCC00FFCC00010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00010101FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF + 0033FF0033010101FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333 + FF3333010101FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF66 + 33010101FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF993301 + 0101FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33010101 + FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33010101FF00 + 66FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066010101FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366010101FF6666FF6666 + FF6666FF6666FF6666FF6666FF6666FF6666FF6666010101FF9966FF9966FF99 + 66FF9966FF9966FF9966FF9966FF9966FF9966010101FFCC66FFCC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66010101FFFF66FFFF66FFFF66FFFF66 + FFFF66FFFF66FFFF66FFFF66FFFF66010101010101FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 + 0000000000000000000000000000FF0000FF0000FF0000FF0000FF0000FF0000 + FF0000FF0000FF0000010101FF3300FF3300FF3300FF3300FF3300FF3300FF33 + 00FF3300FF3300010101FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600010101FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900 + FF9900010101FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC + 00010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0001 + 0101FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033010101 + FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333010101FF66 + 33FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633010101FF9933FF + 9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933010101FFCC33FFCC33 + FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33010101FFFF33FFFF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33010101FF0066FF0066FF0066FF + 0066FF0066FF0066FF0066FF0066FF0066010101FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF3366FF3366010101FF6666FF6666FF6666FF6666FF66 + 66FF6666FF6666FF6666FF6666010101FF9966FF9966FF9966FF9966FF9966FF + 9966FF9966FF9966FF9966010101FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66010101FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF + 66FFFF66FFFF66010101010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000 + 000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 + 00010101FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF330001 + 0101FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600010101 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900010101FFCC + 00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00010101FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00010101FF0033FF0033 + FF0033FF0033FF0033FF0033FF0033FF0033FF0033010101FF3333FF3333FF33 + 33FF3333FF3333FF3333FF3333FF3333FF3333010101FF6633FF6633FF6633FF + 6633FF6633FF6633FF6633FF6633FF6633010101FF9933FF9933FF9933FF9933 + FF9933FF9933FF9933FF9933FF9933010101FFCC33FFCC33FFCC33FFCC33FFCC + 33FFCC33FFCC33FFCC33FFCC33010101FFFF33FFFF33FFFF33FFFF33FFFF33FF + FF33FFFF33FFFF33FFFF33010101FF0066FF0066FF0066FF0066FF0066FF0066 + FF0066FF0066FF0066010101FF3366FF3366FF3366FF3366FF3366FF3366FF33 + 66FF3366FF3366010101FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF + 6666FF6666010101FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966 + FF9966010101FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66010101FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF6601 + 0101010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + 000000000000000000000000000000000000000000000000000000000000FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000010101FF3300FF + 3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300010101FF6600FF6600 + FF6600FF6600FF6600FF6600FF6600FF6600FF6600010101FF9900FF9900FF99 + 00FF9900FF9900FF9900FF9900FF9900FF9900010101FFCC00FFCC00FFCC00FF + CC00FFCC00FFCC00FFCC00FFCC00FFCC00010101FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00010101FF0033FF0033FF0033FF0033FF00 + 33FF0033FF0033FF0033FF0033010101FF3333FF3333FF3333FF3333FF3333FF + 3333FF3333FF3333FF3333010101FF6633FF6633FF6633FF6633FF6633FF6633 + FF6633FF6633FF6633010101FF9933FF9933FF9933FF9933FF9933FF9933FF99 + 33FF9933FF9933010101FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FF + CC33FFCC33010101FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33 + FFFF33010101FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF00 + 66010101FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF336601 + 0101FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666010101 + FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966010101FFCC + 66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66010101FFFF66FF + FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66010101010101FFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000 + 00000000000000000000000000000000000000000000FF0000FF0000FF0000FF + 0000FF0000FF0000FF0000FF0000FF0000010101FF3300FF3300FF3300FF3300 + FF3300FF3300FF3300FF3300FF3300010101FF6600FF6600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600010101FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF9900FF9900010101FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00 + FFCC00FFCC00FFCC00010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00010101FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF + 0033FF0033010101FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333 + FF3333010101FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF66 + 33010101FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF993301 + 0101FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33010101 + FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33010101FF00 + 66FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066010101FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366010101FF6666FF6666 + FF6666FF6666FF6666FF6666FF6666FF6666FF6666010101FF9966FF9966FF99 + 66FF9966FF9966FF9966FF9966FF9966FF9966010101FFCC66FFCC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66010101FFFF66FFFF66FFFF66FFFF66 + FFFF66FFFF66FFFF66FFFF66FFFF66010101010101FFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 + 0000000000000000000000000000FF0000FF0000FF0000FF0000FF0000FF0000 + FF0000FF0000FF0000010101FF3300FF3300FF3300FF3300FF3300FF3300FF33 + 00FF3300FF3300010101FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600010101FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900 + FF9900010101FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC + 00010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0001 + 0101FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033010101 + FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333010101FF66 + 33FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633010101FF9933FF + 9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933010101FFCC33FFCC33 + FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33010101FFFF33FFFF33FFFF + 33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33010101FF0066FF0066FF0066FF + 0066FF0066FF0066FF0066FF0066FF0066010101FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF3366FF3366010101FF6666FF6666FF6666FF6666FF66 + 66FF6666FF6666FF6666FF6666010101FF9966FF9966FF9966FF9966FF9966FF + 9966FF9966FF9966FF9966010101FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66 + FFCC66FFCC66FFCC66010101FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF + 66FFFF66FFFF66010101010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000 + 000000000000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 + 00010101FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF330001 + 0101FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600010101 + FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900FF9900010101FFCC + 00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00010101FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00010101FF0033FF0033 + FF0033FF0033FF0033FF0033FF0033FF0033FF0033010101FF3333FF3333FF33 + 33FF3333FF3333FF3333FF3333FF3333FF3333010101FF6633FF6633FF6633FF + 6633FF6633FF6633FF6633FF6633FF6633010101FF9933FF9933FF9933FF9933 + FF9933FF9933FF9933FF9933FF9933010101FFCC33FFCC33FFCC33FFCC33FFCC + 33FFCC33FFCC33FFCC33FFCC33010101FFFF33FFFF33FFFF33FFFF33FFFF33FF + FF33FFFF33FFFF33FFFF33010101FF0066FF0066FF0066FF0066FF0066FF0066 + FF0066FF0066FF0066010101FF3366FF3366FF3366FF3366FF3366FF3366FF33 + 66FF3366FF3366010101FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF + 6666FF6666010101FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966 + FF9966010101FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC + 66010101FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF6601 + 0101010101FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + 000000000000000000000000000000000000000000000000000000000000FF00 + 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000010101FF3300FF + 3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300010101FF6600FF6600 + FF6600FF6600FF6600FF6600FF6600FF6600FF6600010101FF9900FF9900FF99 + 00FF9900FF9900FF9900FF9900FF9900FF9900010101FFCC00FFCC00FFCC00FF + CC00FFCC00FFCC00FFCC00FFCC00FFCC00010101FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00010101FF0033FF0033FF0033FF0033FF00 + 33FF0033FF0033FF0033FF0033010101FF3333FF3333FF3333FF3333FF3333FF + 3333FF3333FF3333FF3333010101FF6633FF6633FF6633FF6633FF6633FF6633 + FF6633FF6633FF6633010101FF9933FF9933FF9933FF9933FF9933FF9933FF99 + 33FF9933FF9933010101FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FF + CC33FFCC33010101FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33 + FFFF33010101FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF00 + 66010101FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF336601 + 0101FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666010101 + FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966FF9966010101FFCC + 66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66FFCC66010101FFFF66FF + FF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66FFFF66010101010101FFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000 + 00000000000000000000000000000000000000000000FF0000FF0000FF0000FF + 0000FF0000FF0000FF0000FF0000FF0000010101FF3300FF3300FF3300FF3300 + FF3300FF3300FF3300FF3300FF3300010101FF6600FF6600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600010101FF9900FF9900FF9900FF9900FF9900FF + 9900FF9900FF9900FF9900010101FFCC00FFCC00FFCC00FFCC00FFCC00FFCC00 + FFCC00FFCC00FFCC00010101FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00010101FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF + 0033FF0033010101FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333 + FF3333010101FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF66 + 33010101FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF9933FF993301 + 0101FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33FFCC33010101 + FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33FFFF33010101FF00 + 66FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066010101FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366010101FF6666FF6666 + FF6666FF6666FF6666FF6666FF6666FF6666FF6666010101FF9966FF9966FF99 + 66FF9966FF9966FF9966FF9966FF9966FF9966010101FFCC66FFCC66FFCC66FF + CC66FFCC66FFCC66FFCC66FFCC66FFCC66010101FFFF66FFFF66FFFF66FFFF66 + FFFF66FFFF66FFFF66FFFF66FFFF660101010101010101010101010101010101 + 0101010101010101010101010101010100000000000000000000000000000000 + 0000000000000000000000000000010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 01010101010101010101010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCC000000000000000000000000000000000000000000000000 + 000000000000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC00 + 00010101CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC330001 + 0101CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600010101 + CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900010101CCCC + 00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00010101CCFF00CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00010101CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0033CC0033010101CC3333CC3333CC33 + 33CC3333CC3333CC3333CC3333CC3333CC3333010101CC6633CC6633CC6633CC + 6633CC6633CC6633CC6633CC6633CC6633010101CC9933CC9933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933010101CCCC33CCCC33CCCC33CCCC33CCCC + 33CCCC33CCCC33CCCC33CCCC33010101CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF33CCFF33CCFF33CCFF33010101CC0066CC0066CC0066CC0066CC0066CC0066 + CC0066CC0066CC0066010101CC3366CC3366CC3366CC3366CC3366CC3366CC33 + 66CC3366CC3366010101CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC + 6666CC6666010101CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966 + CC9966010101CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC + 66010101CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF6601 + 0101010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + 000000000000000000000000000000000000000000000000000000000000CC00 + 00CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000010101CC3300CC + 3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300010101CC6600CC6600 + CC6600CC6600CC6600CC6600CC6600CC6600CC6600010101CC9900CC9900CC99 + 00CC9900CC9900CC9900CC9900CC9900CC9900010101CCCC00CCCC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC00CCCC00010101CCFF00CCFF00CCFF00CCFF00 + CCFF00CCFF00CCFF00CCFF00CCFF00010101CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0033CC0033010101CC3333CC3333CC3333CC3333CC3333CC + 3333CC3333CC3333CC3333010101CC6633CC6633CC6633CC6633CC6633CC6633 + CC6633CC6633CC6633010101CC9933CC9933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933010101CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC + CC33CCCC33010101CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33 + CCFF33010101CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC00 + 66010101CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC336601 + 0101CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666010101 + CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966010101CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66010101CCFF66CC + FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66010101010101CCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC0000000000000000 + 00000000000000000000000000000000000000000000CC0000CC0000CC0000CC + 0000CC0000CC0000CC0000CC0000CC0000010101CC3300CC3300CC3300CC3300 + CC3300CC3300CC3300CC3300CC3300010101CC6600CC6600CC6600CC6600CC66 + 00CC6600CC6600CC6600CC6600010101CC9900CC9900CC9900CC9900CC9900CC + 9900CC9900CC9900CC9900010101CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00 + CCCC00CCCC00CCCC00010101CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CCFF00010101CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC + 0033CC0033010101CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333 + CC3333010101CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC66 + 33010101CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC993301 + 0101CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33010101 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33010101CC00 + 66CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066010101CC3366CC + 3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366010101CC6666CC6666 + CC6666CC6666CC6666CC6666CC6666CC6666CC6666010101CC9966CC9966CC99 + 66CC9966CC9966CC9966CC9966CC9966CC9966010101CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CCCC66CCCC66CCCC66010101CCFF66CCFF66CCFF66CCFF66 + CCFF66CCFF66CCFF66CCFF66CCFF66010101010101CCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC00000000000000000000000000000000 + 0000000000000000000000000000CC0000CC0000CC0000CC0000CC0000CC0000 + CC0000CC0000CC0000010101CC3300CC3300CC3300CC3300CC3300CC3300CC33 + 00CC3300CC3300010101CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC + 6600CC6600010101CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900 + CC9900010101CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC + 00010101CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF0001 + 0101CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033010101 + CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333010101CC66 + 33CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633010101CC9933CC + 9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933010101CCCC33CCCC33 + CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33010101CCFF33CCFF33CCFF + 33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33010101CC0066CC0066CC0066CC + 0066CC0066CC0066CC0066CC0066CC0066010101CC3366CC3366CC3366CC3366 + CC3366CC3366CC3366CC3366CC3366010101CC6666CC6666CC6666CC6666CC66 + 66CC6666CC6666CC6666CC6666010101CC9966CC9966CC9966CC9966CC9966CC + 9966CC9966CC9966CC9966010101CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66 + CCCC66CCCC66CCCC66010101CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF + 66CCFF66CCFF66010101010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCC000000000000000000000000000000000000000000000000 + 000000000000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC00 + 00010101CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC330001 + 0101CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600010101 + CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900010101CCCC + 00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00010101CCFF00CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00010101CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0033CC0033010101CC3333CC3333CC33 + 33CC3333CC3333CC3333CC3333CC3333CC3333010101CC6633CC6633CC6633CC + 6633CC6633CC6633CC6633CC6633CC6633010101CC9933CC9933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933010101CCCC33CCCC33CCCC33CCCC33CCCC + 33CCCC33CCCC33CCCC33CCCC33010101CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF33CCFF33CCFF33CCFF33010101CC0066CC0066CC0066CC0066CC0066CC0066 + CC0066CC0066CC0066010101CC3366CC3366CC3366CC3366CC3366CC3366CC33 + 66CC3366CC3366010101CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC + 6666CC6666010101CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966 + CC9966010101CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC + 66010101CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF6601 + 0101010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + 000000000000000000000000000000000000000000000000000000000000CC00 + 00CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000010101CC3300CC + 3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300010101CC6600CC6600 + CC6600CC6600CC6600CC6600CC6600CC6600CC6600010101CC9900CC9900CC99 + 00CC9900CC9900CC9900CC9900CC9900CC9900010101CCCC00CCCC00CCCC00CC + CC00CCCC00CCCC00CCCC00CCCC00CCCC00010101CCFF00CCFF00CCFF00CCFF00 + CCFF00CCFF00CCFF00CCFF00CCFF00010101CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0033CC0033010101CC3333CC3333CC3333CC3333CC3333CC + 3333CC3333CC3333CC3333010101CC6633CC6633CC6633CC6633CC6633CC6633 + CC6633CC6633CC6633010101CC9933CC9933CC9933CC9933CC9933CC9933CC99 + 33CC9933CC9933010101CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CC + CC33CCCC33010101CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33 + CCFF33010101CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC00 + 66010101CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC336601 + 0101CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666010101 + CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966010101CCCC + 66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66010101CCFF66CC + FF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66010101010101CCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC0000000000000000 + 00000000000000000000000000000000000000000000CC0000CC0000CC0000CC + 0000CC0000CC0000CC0000CC0000CC0000010101CC3300CC3300CC3300CC3300 + CC3300CC3300CC3300CC3300CC3300010101CC6600CC6600CC6600CC6600CC66 + 00CC6600CC6600CC6600CC6600010101CC9900CC9900CC9900CC9900CC9900CC + 9900CC9900CC9900CC9900010101CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00 + CCCC00CCCC00CCCC00010101CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF + 00CCFF00CCFF00010101CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC + 0033CC0033010101CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333 + CC3333010101CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC66 + 33010101CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933CC993301 + 0101CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33010101 + CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33010101CC00 + 66CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066010101CC3366CC + 3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366010101CC6666CC6666 + CC6666CC6666CC6666CC6666CC6666CC6666CC6666010101CC9966CC9966CC99 + 66CC9966CC9966CC9966CC9966CC9966CC9966010101CCCC66CCCC66CCCC66CC + CC66CCCC66CCCC66CCCC66CCCC66CCCC66010101CCFF66CCFF66CCFF66CCFF66 + CCFF66CCFF66CCFF66CCFF66CCFF66010101010101CCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC00000000000000000000000000000000 + 0000000000000000000000000000CC0000CC0000CC0000CC0000CC0000CC0000 + CC0000CC0000CC0000010101CC3300CC3300CC3300CC3300CC3300CC3300CC33 + 00CC3300CC3300010101CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC + 6600CC6600010101CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900 + CC9900010101CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC + 00010101CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF0001 + 0101CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033010101 + CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333010101CC66 + 33CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633010101CC9933CC + 9933CC9933CC9933CC9933CC9933CC9933CC9933CC9933010101CCCC33CCCC33 + CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33CCCC33010101CCFF33CCFF33CCFF + 33CCFF33CCFF33CCFF33CCFF33CCFF33CCFF33010101CC0066CC0066CC0066CC + 0066CC0066CC0066CC0066CC0066CC0066010101CC3366CC3366CC3366CC3366 + CC3366CC3366CC3366CC3366CC3366010101CC6666CC6666CC6666CC6666CC66 + 66CC6666CC6666CC6666CC6666010101CC9966CC9966CC9966CC9966CC9966CC + 9966CC9966CC9966CC9966010101CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66 + CCCC66CCCC66CCCC66010101CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF + 66CCFF66CCFF66010101010101CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC + CCCCCCCCCCCCCCCC000000000000000000000000000000000000000000000000 + 000000000000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC00 + 00010101CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC330001 + 0101CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600010101 + CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900CC9900010101CCCC + 00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00CCCC00010101CCFF00CC + FF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00CCFF00010101CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0033CC0033010101CC3333CC3333CC33 + 33CC3333CC3333CC3333CC3333CC3333CC3333010101CC6633CC6633CC6633CC + 6633CC6633CC6633CC6633CC6633CC6633010101CC9933CC9933CC9933CC9933 + CC9933CC9933CC9933CC9933CC9933010101CCCC33CCCC33CCCC33CCCC33CCCC + 33CCCC33CCCC33CCCC33CCCC33010101CCFF33CCFF33CCFF33CCFF33CCFF33CC + FF33CCFF33CCFF33CCFF33010101CC0066CC0066CC0066CC0066CC0066CC0066 + CC0066CC0066CC0066010101CC3366CC3366CC3366CC3366CC3366CC3366CC33 + 66CC3366CC3366010101CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC + 6666CC6666010101CC9966CC9966CC9966CC9966CC9966CC9966CC9966CC9966 + CC9966010101CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC66CCCC + 66010101CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF66CCFF6601 + 0101010101010101010101010101010101010101010101010101010101010101 + 0000000000000000000000000000000000000000000000000000000000000101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101999999 + 9999999999999999999999999999999999999999999999990000000000000000 + 0000000000000000000000000000000000000000000099000099000099000099 + 0000990000990000990000990000990000010101993300993300993300993300 + 9933009933009933009933009933000101019966009966009966009966009966 + 0099660099660099660099660001010199990099990099990099990099990099 + 990099990099990099990001010199CC0099CC0099CC0099CC0099CC0099CC00 + 99CC0099CC0099CC0001010199FF0099FF0099FF0099FF0099FF0099FF0099FF + 0099FF0099FF0001010199003399003399003399003399003399003399003399 + 0033990033010101993333993333993333993333993333993333993333993333 + 9933330101019966339966339966339966339966339966339966339966339966 + 3301010199993399993399993399993399993399993399993399993399993301 + 010199CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC33010101 + 99FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF330101019900 + 6699006699006699006699006699006699006699006699006601010199336699 + 3366993366993366993366993366993366993366993366010101996666996666 + 9966669966669966669966669966669966669966660101019999669999669999 + 6699996699996699996699996699996699996601010199CC6699CC6699CC6699 + CC6699CC6699CC6699CC6699CC6699CC6601010199FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF6699FF660101010101019999999999999999999999 + 9999999999999999999999999999999900000000000000000000000000000000 + 0000000000000000000000000000990000990000990000990000990000990000 + 9900009900009900000101019933009933009933009933009933009933009933 + 0099330099330001010199660099660099660099660099660099660099660099 + 6600996600010101999900999900999900999900999900999900999900999900 + 99990001010199CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC + 0001010199FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0001 + 0101990033990033990033990033990033990033990033990033990033010101 + 9933339933339933339933339933339933339933339933339933330101019966 + 3399663399663399663399663399663399663399663399663301010199993399 + 993399993399993399993399993399993399993399993301010199CC3399CC33 + 99CC3399CC3399CC3399CC3399CC3399CC3399CC3301010199FF3399FF3399FF + 3399FF3399FF3399FF3399FF3399FF3399FF3301010199006699006699006699 + 0066990066990066990066990066990066010101993366993366993366993366 + 9933669933669933669933669933660101019966669966669966669966669966 + 6699666699666699666699666601010199996699996699996699996699996699 + 996699996699996699996601010199CC6699CC6699CC6699CC6699CC6699CC66 + 99CC6699CC6699CC6601010199FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF6699FF6601010101010199999999999999999999999999999999999999 + 9999999999999999000000000000000000000000000000000000000000000000 + 0000000000009900009900009900009900009900009900009900009900009900 + 0001010199330099330099330099330099330099330099330099330099330001 + 0101996600996600996600996600996600996600996600996600996600010101 + 99990099990099990099990099990099990099990099990099990001010199CC + 0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0001010199FF0099 + FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF00010101990033990033 + 9900339900339900339900339900339900339900330101019933339933339933 + 3399333399333399333399333399333399333301010199663399663399663399 + 6633996633996633996633996633996633010101999933999933999933999933 + 99993399993399993399993399993301010199CC3399CC3399CC3399CC3399CC + 3399CC3399CC3399CC3399CC3301010199FF3399FF3399FF3399FF3399FF3399 + FF3399FF3399FF3399FF33010101990066990066990066990066990066990066 + 9900669900669900660101019933669933669933669933669933669933669933 + 6699336699336601010199666699666699666699666699666699666699666699 + 6666996666010101999966999966999966999966999966999966999966999966 + 99996601010199CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC + 6601010199FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6601 + 0101010101999999999999999999999999999999999999999999999999999999 + 0000000000000000000000000000000000000000000000000000000000009900 + 0099000099000099000099000099000099000099000099000001010199330099 + 3300993300993300993300993300993300993300993300010101996600996600 + 9966009966009966009966009966009966009966000101019999009999009999 + 0099990099990099990099990099990099990001010199CC0099CC0099CC0099 + CC0099CC0099CC0099CC0099CC0099CC0001010199FF0099FF0099FF0099FF00 + 99FF0099FF0099FF0099FF0099FF000101019900339900339900339900339900 + 3399003399003399003399003301010199333399333399333399333399333399 + 3333993333993333993333010101996633996633996633996633996633996633 + 9966339966339966330101019999339999339999339999339999339999339999 + 3399993399993301010199CC3399CC3399CC3399CC3399CC3399CC3399CC3399 + CC3399CC3301010199FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF33 + 99FF330101019900669900669900669900669900669900669900669900669900 + 6601010199336699336699336699336699336699336699336699336699336601 + 0101996666996666996666996666996666996666996666996666996666010101 + 99996699996699996699996699996699996699996699996699996601010199CC + 6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6601010199FF6699 + FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF66010101010101999999 + 9999999999999999999999999999999999999999999999990000000000000000 + 0000000000000000000000000000000000000000000099000099000099000099 + 0000990000990000990000990000990000010101993300993300993300993300 + 9933009933009933009933009933000101019966009966009966009966009966 + 0099660099660099660099660001010199990099990099990099990099990099 + 990099990099990099990001010199CC0099CC0099CC0099CC0099CC0099CC00 + 99CC0099CC0099CC0001010199FF0099FF0099FF0099FF0099FF0099FF0099FF + 0099FF0099FF0001010199003399003399003399003399003399003399003399 + 0033990033010101993333993333993333993333993333993333993333993333 + 9933330101019966339966339966339966339966339966339966339966339966 + 3301010199993399993399993399993399993399993399993399993399993301 + 010199CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC33010101 + 99FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF330101019900 + 6699006699006699006699006699006699006699006699006601010199336699 + 3366993366993366993366993366993366993366993366010101996666996666 + 9966669966669966669966669966669966669966660101019999669999669999 + 6699996699996699996699996699996699996601010199CC6699CC6699CC6699 + CC6699CC6699CC6699CC6699CC6699CC6601010199FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF6699FF660101010101019999999999999999999999 + 9999999999999999999999999999999900000000000000000000000000000000 + 0000000000000000000000000000990000990000990000990000990000990000 + 9900009900009900000101019933009933009933009933009933009933009933 + 0099330099330001010199660099660099660099660099660099660099660099 + 6600996600010101999900999900999900999900999900999900999900999900 + 99990001010199CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC + 0001010199FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF0001 + 0101990033990033990033990033990033990033990033990033990033010101 + 9933339933339933339933339933339933339933339933339933330101019966 + 3399663399663399663399663399663399663399663399663301010199993399 + 993399993399993399993399993399993399993399993301010199CC3399CC33 + 99CC3399CC3399CC3399CC3399CC3399CC3399CC3301010199FF3399FF3399FF + 3399FF3399FF3399FF3399FF3399FF3399FF3301010199006699006699006699 + 0066990066990066990066990066990066010101993366993366993366993366 + 9933669933669933669933669933660101019966669966669966669966669966 + 6699666699666699666699666601010199996699996699996699996699996699 + 996699996699996699996601010199CC6699CC6699CC6699CC6699CC6699CC66 + 99CC6699CC6699CC6601010199FF6699FF6699FF6699FF6699FF6699FF6699FF + 6699FF6699FF6601010101010199999999999999999999999999999999999999 + 9999999999999999000000000000000000000000000000000000000000000000 + 0000000000009900009900009900009900009900009900009900009900009900 + 0001010199330099330099330099330099330099330099330099330099330001 + 0101996600996600996600996600996600996600996600996600996600010101 + 99990099990099990099990099990099990099990099990099990001010199CC + 0099CC0099CC0099CC0099CC0099CC0099CC0099CC0099CC0001010199FF0099 + FF0099FF0099FF0099FF0099FF0099FF0099FF0099FF00010101990033990033 + 9900339900339900339900339900339900339900330101019933339933339933 + 3399333399333399333399333399333399333301010199663399663399663399 + 6633996633996633996633996633996633010101999933999933999933999933 + 99993399993399993399993399993301010199CC3399CC3399CC3399CC3399CC + 3399CC3399CC3399CC3399CC3301010199FF3399FF3399FF3399FF3399FF3399 + FF3399FF3399FF3399FF33010101990066990066990066990066990066990066 + 9900669900669900660101019933669933669933669933669933669933669933 + 6699336699336601010199666699666699666699666699666699666699666699 + 6666996666010101999966999966999966999966999966999966999966999966 + 99996601010199CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC + 6601010199FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF6601 + 0101010101999999999999999999999999999999999999999999999999999999 + 0000000000000000000000000000000000000000000000000000000000009900 + 0099000099000099000099000099000099000099000099000001010199330099 + 3300993300993300993300993300993300993300993300010101996600996600 + 9966009966009966009966009966009966009966000101019999009999009999 + 0099990099990099990099990099990099990001010199CC0099CC0099CC0099 + CC0099CC0099CC0099CC0099CC0099CC0001010199FF0099FF0099FF0099FF00 + 99FF0099FF0099FF0099FF0099FF000101019900339900339900339900339900 + 3399003399003399003399003301010199333399333399333399333399333399 + 3333993333993333993333010101996633996633996633996633996633996633 + 9966339966339966330101019999339999339999339999339999339999339999 + 3399993399993301010199CC3399CC3399CC3399CC3399CC3399CC3399CC3399 + CC3399CC3301010199FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF33 + 99FF330101019900669900669900669900669900669900669900669900669900 + 6601010199336699336699336699336699336699336699336699336699336601 + 0101996666996666996666996666996666996666996666996666996666010101 + 99996699996699996699996699996699996699996699996699996601010199CC + 6699CC6699CC6699CC6699CC6699CC6699CC6699CC6699CC6601010199FF6699 + FF6699FF6699FF6699FF6699FF6699FF6699FF6699FF66010101010101999999 + 9999999999999999999999999999999999999999999999990000000000000000 + 0000000000000000000000000000000000000000000099000099000099000099 + 0000990000990000990000990000990000010101993300993300993300993300 + 9933009933009933009933009933000101019966009966009966009966009966 + 0099660099660099660099660001010199990099990099990099990099990099 + 990099990099990099990001010199CC0099CC0099CC0099CC0099CC0099CC00 + 99CC0099CC0099CC0001010199FF0099FF0099FF0099FF0099FF0099FF0099FF + 0099FF0099FF0001010199003399003399003399003399003399003399003399 + 0033990033010101993333993333993333993333993333993333993333993333 + 9933330101019966339966339966339966339966339966339966339966339966 + 3301010199993399993399993399993399993399993399993399993399993301 + 010199CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC3399CC33010101 + 99FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF3399FF330101019900 + 6699006699006699006699006699006699006699006699006601010199336699 + 3366993366993366993366993366993366993366993366010101996666996666 + 9966669966669966669966669966669966669966660101019999669999669999 + 6699996699996699996699996699996699996601010199CC6699CC6699CC6699 + CC6699CC6699CC6699CC6699CC6699CC6601010199FF6699FF6699FF6699FF66 + 99FF6699FF6699FF6699FF6699FF660101010101010101010101010101010101 + 0101010101010101010101010101010100000000000000000000000000000000 + 0000000000000000000000000000010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010166666666666666666666666666666666666666 + 6666666666666666000000000000000000000000000000000000000000000000 + 0000000000006600006600006600006600006600006600006600006600006600 + 0001010166330066330066330066330066330066330066330066330066330001 + 0101666600666600666600666600666600666600666600666600666600010101 + 66990066990066990066990066990066990066990066990066990001010166CC + 0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0001010166FF0066 + FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF00010101660033660033 + 6600336600336600336600336600336600336600330101016633336633336633 + 3366333366333366333366333366333366333301010166663366663366663366 + 6633666633666633666633666633666633010101669933669933669933669933 + 66993366993366993366993366993301010166CC3366CC3366CC3366CC3366CC + 3366CC3366CC3366CC3366CC3301010166FF3366FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF33010101660066660066660066660066660066660066 + 6600666600666600660101016633666633666633666633666633666633666633 + 6666336666336601010166666666666666666666666666666666666666666666 + 6666666666010101669966669966669966669966669966669966669966669966 + 66996601010166CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC + 6601010166FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6601 + 0101010101666666666666666666666666666666666666666666666666666666 + 0000000000000000000000000000000000000000000000000000000000006600 + 0066000066000066000066000066000066000066000066000001010166330066 + 3300663300663300663300663300663300663300663300010101666600666600 + 6666006666006666006666006666006666006666000101016699006699006699 + 0066990066990066990066990066990066990001010166CC0066CC0066CC0066 + CC0066CC0066CC0066CC0066CC0066CC0001010166FF0066FF0066FF0066FF00 + 66FF0066FF0066FF0066FF0066FF000101016600336600336600336600336600 + 3366003366003366003366003301010166333366333366333366333366333366 + 3333663333663333663333010101666633666633666633666633666633666633 + 6666336666336666330101016699336699336699336699336699336699336699 + 3366993366993301010166CC3366CC3366CC3366CC3366CC3366CC3366CC3366 + CC3366CC3301010166FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF33 + 66FF330101016600666600666600666600666600666600666600666600666600 + 6601010166336666336666336666336666336666336666336666336666336601 + 0101666666666666666666666666666666666666666666666666666666010101 + 66996666996666996666996666996666996666996666996666996601010166CC + 6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6601010166FF6666 + FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF66010101010101666666 + 6666666666666666666666666666666666666666666666660000000000000000 + 0000000000000000000000000000000000000000000066000066000066000066 + 0000660000660000660000660000660000010101663300663300663300663300 + 6633006633006633006633006633000101016666006666006666006666006666 + 0066660066660066660066660001010166990066990066990066990066990066 + 990066990066990066990001010166CC0066CC0066CC0066CC0066CC0066CC00 + 66CC0066CC0066CC0001010166FF0066FF0066FF0066FF0066FF0066FF0066FF + 0066FF0066FF0001010166003366003366003366003366003366003366003366 + 0033660033010101663333663333663333663333663333663333663333663333 + 6633330101016666336666336666336666336666336666336666336666336666 + 3301010166993366993366993366993366993366993366993366993366993301 + 010166CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC33010101 + 66FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF330101016600 + 6666006666006666006666006666006666006666006666006601010166336666 + 3366663366663366663366663366663366663366663366010101666666666666 + 6666666666666666666666666666666666666666660101016699666699666699 + 6666996666996666996666996666996666996601010166CC6666CC6666CC6666 + CC6666CC6666CC6666CC6666CC6666CC6601010166FF6666FF6666FF6666FF66 + 66FF6666FF6666FF6666FF6666FF660101010101016666666666666666666666 + 6666666666666666666666666666666600000000000000000000000000000000 + 0000000000000000000000000000660000660000660000660000660000660000 + 6600006600006600000101016633006633006633006633006633006633006633 + 0066330066330001010166660066660066660066660066660066660066660066 + 6600666600010101669900669900669900669900669900669900669900669900 + 66990001010166CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC + 0001010166FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0001 + 0101660033660033660033660033660033660033660033660033660033010101 + 6633336633336633336633336633336633336633336633336633330101016666 + 3366663366663366663366663366663366663366663366663301010166993366 + 993366993366993366993366993366993366993366993301010166CC3366CC33 + 66CC3366CC3366CC3366CC3366CC3366CC3366CC3301010166FF3366FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3301010166006666006666006666 + 0066660066660066660066660066660066010101663366663366663366663366 + 6633666633666633666633666633660101016666666666666666666666666666 + 6666666666666666666666666601010166996666996666996666996666996666 + 996666996666996666996601010166CC6666CC6666CC6666CC6666CC6666CC66 + 66CC6666CC6666CC6601010166FF6666FF6666FF6666FF6666FF6666FF6666FF + 6666FF6666FF6601010101010166666666666666666666666666666666666666 + 6666666666666666000000000000000000000000000000000000000000000000 + 0000000000006600006600006600006600006600006600006600006600006600 + 0001010166330066330066330066330066330066330066330066330066330001 + 0101666600666600666600666600666600666600666600666600666600010101 + 66990066990066990066990066990066990066990066990066990001010166CC + 0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0001010166FF0066 + FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF00010101660033660033 + 6600336600336600336600336600336600336600330101016633336633336633 + 3366333366333366333366333366333366333301010166663366663366663366 + 6633666633666633666633666633666633010101669933669933669933669933 + 66993366993366993366993366993301010166CC3366CC3366CC3366CC3366CC + 3366CC3366CC3366CC3366CC3301010166FF3366FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF33010101660066660066660066660066660066660066 + 6600666600666600660101016633666633666633666633666633666633666633 + 6666336666336601010166666666666666666666666666666666666666666666 + 6666666666010101669966669966669966669966669966669966669966669966 + 66996601010166CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC + 6601010166FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6601 + 0101010101666666666666666666666666666666666666666666666666666666 + 0000000000000000000000000000000000000000000000000000000000006600 + 0066000066000066000066000066000066000066000066000001010166330066 + 3300663300663300663300663300663300663300663300010101666600666600 + 6666006666006666006666006666006666006666000101016699006699006699 + 0066990066990066990066990066990066990001010166CC0066CC0066CC0066 + CC0066CC0066CC0066CC0066CC0066CC0001010166FF0066FF0066FF0066FF00 + 66FF0066FF0066FF0066FF0066FF000101016600336600336600336600336600 + 3366003366003366003366003301010166333366333366333366333366333366 + 3333663333663333663333010101666633666633666633666633666633666633 + 6666336666336666330101016699336699336699336699336699336699336699 + 3366993366993301010166CC3366CC3366CC3366CC3366CC3366CC3366CC3366 + CC3366CC3301010166FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF33 + 66FF330101016600666600666600666600666600666600666600666600666600 + 6601010166336666336666336666336666336666336666336666336666336601 + 0101666666666666666666666666666666666666666666666666666666010101 + 66996666996666996666996666996666996666996666996666996601010166CC + 6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6601010166FF6666 + FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF66010101010101666666 + 6666666666666666666666666666666666666666666666660000000000000000 + 0000000000000000000000000000000000000000000066000066000066000066 + 0000660000660000660000660000660000010101663300663300663300663300 + 6633006633006633006633006633000101016666006666006666006666006666 + 0066660066660066660066660001010166990066990066990066990066990066 + 990066990066990066990001010166CC0066CC0066CC0066CC0066CC0066CC00 + 66CC0066CC0066CC0001010166FF0066FF0066FF0066FF0066FF0066FF0066FF + 0066FF0066FF0001010166003366003366003366003366003366003366003366 + 0033660033010101663333663333663333663333663333663333663333663333 + 6633330101016666336666336666336666336666336666336666336666336666 + 3301010166993366993366993366993366993366993366993366993366993301 + 010166CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC3366CC33010101 + 66FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF3366FF330101016600 + 6666006666006666006666006666006666006666006666006601010166336666 + 3366663366663366663366663366663366663366663366010101666666666666 + 6666666666666666666666666666666666666666660101016699666699666699 + 6666996666996666996666996666996666996601010166CC6666CC6666CC6666 + CC6666CC6666CC6666CC6666CC6666CC6601010166FF6666FF6666FF6666FF66 + 66FF6666FF6666FF6666FF6666FF660101010101016666666666666666666666 + 6666666666666666666666666666666600000000000000000000000000000000 + 0000000000000000000000000000660000660000660000660000660000660000 + 6600006600006600000101016633006633006633006633006633006633006633 + 0066330066330001010166660066660066660066660066660066660066660066 + 6600666600010101669900669900669900669900669900669900669900669900 + 66990001010166CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC + 0001010166FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF0001 + 0101660033660033660033660033660033660033660033660033660033010101 + 6633336633336633336633336633336633336633336633336633330101016666 + 3366663366663366663366663366663366663366663366663301010166993366 + 993366993366993366993366993366993366993366993301010166CC3366CC33 + 66CC3366CC3366CC3366CC3366CC3366CC3366CC3301010166FF3366FF3366FF + 3366FF3366FF3366FF3366FF3366FF3366FF3301010166006666006666006666 + 0066660066660066660066660066660066010101663366663366663366663366 + 6633666633666633666633666633660101016666666666666666666666666666 + 6666666666666666666666666601010166996666996666996666996666996666 + 996666996666996666996601010166CC6666CC6666CC6666CC6666CC6666CC66 + 66CC6666CC6666CC6601010166FF6666FF6666FF6666FF6666FF6666FF6666FF + 6666FF6666FF6601010101010166666666666666666666666666666666666666 + 6666666666666666000000000000000000000000000000000000000000000000 + 0000000000006600006600006600006600006600006600006600006600006600 + 0001010166330066330066330066330066330066330066330066330066330001 + 0101666600666600666600666600666600666600666600666600666600010101 + 66990066990066990066990066990066990066990066990066990001010166CC + 0066CC0066CC0066CC0066CC0066CC0066CC0066CC0066CC0001010166FF0066 + FF0066FF0066FF0066FF0066FF0066FF0066FF0066FF00010101660033660033 + 6600336600336600336600336600336600336600330101016633336633336633 + 3366333366333366333366333366333366333301010166663366663366663366 + 6633666633666633666633666633666633010101669933669933669933669933 + 66993366993366993366993366993301010166CC3366CC3366CC3366CC3366CC + 3366CC3366CC3366CC3366CC3301010166FF3366FF3366FF3366FF3366FF3366 + FF3366FF3366FF3366FF33010101660066660066660066660066660066660066 + 6600666600666600660101016633666633666633666633666633666633666633 + 6666336666336601010166666666666666666666666666666666666666666666 + 6666666666010101669966669966669966669966669966669966669966669966 + 66996601010166CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC6666CC + 6601010166FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6666FF6601 + 0101010101010101010101010101010101010101010101010101010101010101 + 0000000000000000000000000000000000000000000000000000000000000101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101333333 + 3333333333333333333333333333333333333333333333330000000000000000 + 0000000000000000000000000000000000000000000033000033000033000033 + 0000330000330000330000330000330000010101333300333300333300333300 + 3333003333003333003333003333000101013366003366003366003366003366 + 0033660033660033660033660001010133990033990033990033990033990033 + 990033990033990033990001010133CC0033CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0001010133FF0033FF0033FF0033FF0033FF0033FF0033FF + 0033FF0033FF0001010133003333003333003333003333003333003333003333 + 0033330033010101333333333333333333333333333333333333333333333333 + 3333330101013366333366333366333366333366333366333366333366333366 + 3301010133993333993333993333993333993333993333993333993333993301 + 010133CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC33010101 + 33FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF330101013300 + 6633006633006633006633006633006633006633006633006601010133336633 + 3366333366333366333366333366333366333366333366010101336666336666 + 3366663366663366663366663366663366663366660101013399663399663399 + 6633996633996633996633996633996633996601010133CC6633CC6633CC6633 + CC6633CC6633CC6633CC6633CC6633CC6601010133FF6633FF6633FF6633FF66 + 33FF6633FF6633FF6633FF6633FF660101010101013333333333333333333333 + 3333333333333333333333333333333300000000000000000000000000000000 + 0000000000000000000000000000330000330000330000330000330000330000 + 3300003300003300000101013333003333003333003333003333003333003333 + 0033330033330001010133660033660033660033660033660033660033660033 + 6600336600010101339900339900339900339900339900339900339900339900 + 33990001010133CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC + 0001010133FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0001 + 0101330033330033330033330033330033330033330033330033330033010101 + 3333333333333333333333333333333333333333333333333333330101013366 + 3333663333663333663333663333663333663333663333663301010133993333 + 993333993333993333993333993333993333993333993301010133CC3333CC33 + 33CC3333CC3333CC3333CC3333CC3333CC3333CC3301010133FF3333FF3333FF + 3333FF3333FF3333FF3333FF3333FF3333FF3301010133006633006633006633 + 0066330066330066330066330066330066010101333366333366333366333366 + 3333663333663333663333663333660101013366663366663366663366663366 + 6633666633666633666633666601010133996633996633996633996633996633 + 996633996633996633996601010133CC6633CC6633CC6633CC6633CC6633CC66 + 33CC6633CC6633CC6601010133FF6633FF6633FF6633FF6633FF6633FF6633FF + 6633FF6633FF6601010101010133333333333333333333333333333333333333 + 3333333333333333000000000000000000000000000000000000000000000000 + 0000000000003300003300003300003300003300003300003300003300003300 + 0001010133330033330033330033330033330033330033330033330033330001 + 0101336600336600336600336600336600336600336600336600336600010101 + 33990033990033990033990033990033990033990033990033990001010133CC + 0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0001010133FF0033 + FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF00010101330033330033 + 3300333300333300333300333300333300333300330101013333333333333333 + 3333333333333333333333333333333333333301010133663333663333663333 + 6633336633336633336633336633336633010101339933339933339933339933 + 33993333993333993333993333993301010133CC3333CC3333CC3333CC3333CC + 3333CC3333CC3333CC3333CC3301010133FF3333FF3333FF3333FF3333FF3333 + FF3333FF3333FF3333FF33010101330066330066330066330066330066330066 + 3300663300663300660101013333663333663333663333663333663333663333 + 6633336633336601010133666633666633666633666633666633666633666633 + 6666336666010101339966339966339966339966339966339966339966339966 + 33996601010133CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC + 6601010133FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6601 + 0101010101333333333333333333333333333333333333333333333333333333 + 0000000000000000000000000000000000000000000000000000000000003300 + 0033000033000033000033000033000033000033000033000001010133330033 + 3300333300333300333300333300333300333300333300010101336600336600 + 3366003366003366003366003366003366003366000101013399003399003399 + 0033990033990033990033990033990033990001010133CC0033CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0001010133FF0033FF0033FF0033FF00 + 33FF0033FF0033FF0033FF0033FF000101013300333300333300333300333300 + 3333003333003333003333003301010133333333333333333333333333333333 + 3333333333333333333333010101336633336633336633336633336633336633 + 3366333366333366330101013399333399333399333399333399333399333399 + 3333993333993301010133CC3333CC3333CC3333CC3333CC3333CC3333CC3333 + CC3333CC3301010133FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF33 + 33FF330101013300663300663300663300663300663300663300663300663300 + 6601010133336633336633336633336633336633336633336633336633336601 + 0101336666336666336666336666336666336666336666336666336666010101 + 33996633996633996633996633996633996633996633996633996601010133CC + 6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6601010133FF6633 + FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF66010101010101333333 + 3333333333333333333333333333333333333333333333330000000000000000 + 0000000000000000000000000000000000000000000033000033000033000033 + 0000330000330000330000330000330000010101333300333300333300333300 + 3333003333003333003333003333000101013366003366003366003366003366 + 0033660033660033660033660001010133990033990033990033990033990033 + 990033990033990033990001010133CC0033CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0001010133FF0033FF0033FF0033FF0033FF0033FF0033FF + 0033FF0033FF0001010133003333003333003333003333003333003333003333 + 0033330033010101333333333333333333333333333333333333333333333333 + 3333330101013366333366333366333366333366333366333366333366333366 + 3301010133993333993333993333993333993333993333993333993333993301 + 010133CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC33010101 + 33FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF330101013300 + 6633006633006633006633006633006633006633006633006601010133336633 + 3366333366333366333366333366333366333366333366010101336666336666 + 3366663366663366663366663366663366663366660101013399663399663399 + 6633996633996633996633996633996633996601010133CC6633CC6633CC6633 + CC6633CC6633CC6633CC6633CC6633CC6601010133FF6633FF6633FF6633FF66 + 33FF6633FF6633FF6633FF6633FF660101010101013333333333333333333333 + 3333333333333333333333333333333300000000000000000000000000000000 + 0000000000000000000000000000330000330000330000330000330000330000 + 3300003300003300000101013333003333003333003333003333003333003333 + 0033330033330001010133660033660033660033660033660033660033660033 + 6600336600010101339900339900339900339900339900339900339900339900 + 33990001010133CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC + 0001010133FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF0001 + 0101330033330033330033330033330033330033330033330033330033010101 + 3333333333333333333333333333333333333333333333333333330101013366 + 3333663333663333663333663333663333663333663333663301010133993333 + 993333993333993333993333993333993333993333993301010133CC3333CC33 + 33CC3333CC3333CC3333CC3333CC3333CC3333CC3301010133FF3333FF3333FF + 3333FF3333FF3333FF3333FF3333FF3333FF3301010133006633006633006633 + 0066330066330066330066330066330066010101333366333366333366333366 + 3333663333663333663333663333660101013366663366663366663366663366 + 6633666633666633666633666601010133996633996633996633996633996633 + 996633996633996633996601010133CC6633CC6633CC6633CC6633CC6633CC66 + 33CC6633CC6633CC6601010133FF6633FF6633FF6633FF6633FF6633FF6633FF + 6633FF6633FF6601010101010133333333333333333333333333333333333333 + 3333333333333333000000000000000000000000000000000000000000000000 + 0000000000003300003300003300003300003300003300003300003300003300 + 0001010133330033330033330033330033330033330033330033330033330001 + 0101336600336600336600336600336600336600336600336600336600010101 + 33990033990033990033990033990033990033990033990033990001010133CC + 0033CC0033CC0033CC0033CC0033CC0033CC0033CC0033CC0001010133FF0033 + FF0033FF0033FF0033FF0033FF0033FF0033FF0033FF00010101330033330033 + 3300333300333300333300333300333300333300330101013333333333333333 + 3333333333333333333333333333333333333301010133663333663333663333 + 6633336633336633336633336633336633010101339933339933339933339933 + 33993333993333993333993333993301010133CC3333CC3333CC3333CC3333CC + 3333CC3333CC3333CC3333CC3301010133FF3333FF3333FF3333FF3333FF3333 + FF3333FF3333FF3333FF33010101330066330066330066330066330066330066 + 3300663300663300660101013333663333663333663333663333663333663333 + 6633336633336601010133666633666633666633666633666633666633666633 + 6666336666010101339966339966339966339966339966339966339966339966 + 33996601010133CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC + 6601010133FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF6601 + 0101010101333333333333333333333333333333333333333333333333333333 + 0000000000000000000000000000000000000000000000000000000000003300 + 0033000033000033000033000033000033000033000033000001010133330033 + 3300333300333300333300333300333300333300333300010101336600336600 + 3366003366003366003366003366003366003366000101013399003399003399 + 0033990033990033990033990033990033990001010133CC0033CC0033CC0033 + CC0033CC0033CC0033CC0033CC0033CC0001010133FF0033FF0033FF0033FF00 + 33FF0033FF0033FF0033FF0033FF000101013300333300333300333300333300 + 3333003333003333003333003301010133333333333333333333333333333333 + 3333333333333333333333010101336633336633336633336633336633336633 + 3366333366333366330101013399333399333399333399333399333399333399 + 3333993333993301010133CC3333CC3333CC3333CC3333CC3333CC3333CC3333 + CC3333CC3301010133FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF33 + 33FF330101013300663300663300663300663300663300663300663300663300 + 6601010133336633336633336633336633336633336633336633336633336601 + 0101336666336666336666336666336666336666336666336666336666010101 + 33996633996633996633996633996633996633996633996633996601010133CC + 6633CC6633CC6633CC6633CC6633CC6633CC6633CC6633CC6601010133FF6633 + FF6633FF6633FF6633FF6633FF6633FF6633FF6633FF66010101010101333333 + 3333333333333333333333333333333333333333333333330000000000000000 + 0000000000000000000000000000000000000000000033000033000033000033 + 0000330000330000330000330000330000010101333300333300333300333300 + 3333003333003333003333003333000101013366003366003366003366003366 + 0033660033660033660033660001010133990033990033990033990033990033 + 990033990033990033990001010133CC0033CC0033CC0033CC0033CC0033CC00 + 33CC0033CC0033CC0001010133FF0033FF0033FF0033FF0033FF0033FF0033FF + 0033FF0033FF0001010133003333003333003333003333003333003333003333 + 0033330033010101333333333333333333333333333333333333333333333333 + 3333330101013366333366333366333366333366333366333366333366333366 + 3301010133993333993333993333993333993333993333993333993333993301 + 010133CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC3333CC33010101 + 33FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF3333FF330101013300 + 6633006633006633006633006633006633006633006633006601010133336633 + 3366333366333366333366333366333366333366333366010101336666336666 + 3366663366663366663366663366663366663366660101013399663399663399 + 6633996633996633996633996633996633996601010133CC6633CC6633CC6633 + CC6633CC6633CC6633CC6633CC6633CC6601010133FF6633FF6633FF6633FF66 + 33FF6633FF6633FF6633FF6633FF660101010000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010100000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000330000330000330000330000330000330000330000330000330001 + 0101006600006600006600006600006600006600006600006600006600010101 + 00990000990000990000990000990000990000990000990000990001010100CC + 0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0001010100FF0000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00010101000033000033 + 0000330000330000330000330000330000330000330101010033330033330033 + 3300333300333300333300333300333300333301010100663300663300663300 + 6633006633006633006633006633006633010101009933009933009933009933 + 00993300993300993300993300993301010100CC3300CC3300CC3300CC3300CC + 3300CC3300CC3300CC3300CC3301010100FF3300FF3300FF3300FF3300FF3300 + FF3300FF3300FF3300FF33010101000066000066000066000066000066000066 + 0000660000660000660101010033660033660033660033660033660033660033 + 6600336600336601010100666600666600666600666600666600666600666600 + 6666006666010101009966009966009966009966009966009966009966009966 + 00996601010100CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC + 6601010100FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6601 + 0101000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000330000 + 3300003300003300003300003300003300003300003300010101006600006600 + 0066000066000066000066000066000066000066000101010099000099000099 + 0000990000990000990000990000990000990001010100CC0000CC0000CC0000 + CC0000CC0000CC0000CC0000CC0000CC0001010100FF0000FF0000FF0000FF00 + 00FF0000FF0000FF0000FF0000FF000101010000330000330000330000330000 + 3300003300003300003300003301010100333300333300333300333300333300 + 3333003333003333003333010101006633006633006633006633006633006633 + 0066330066330066330101010099330099330099330099330099330099330099 + 3300993300993301010100CC3300CC3300CC3300CC3300CC3300CC3300CC3300 + CC3300CC3301010100FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF33 + 00FF330101010000660000660000660000660000660000660000660000660000 + 6601010100336600336600336600336600336600336600336600336600336601 + 0101006666006666006666006666006666006666006666006666006666010101 + 00996600996600996600996600996600996600996600996600996601010100CC + 6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6601010100FF6600 + FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF66010101000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000003300003300003300003300 + 0033000033000033000033000033000101010066000066000066000066000066 + 0000660000660000660000660001010100990000990000990000990000990000 + 990000990000990000990001010100CC0000CC0000CC0000CC0000CC0000CC00 + 00CC0000CC0000CC0001010100FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0001010100003300003300003300003300003300003300003300 + 0033000033010101003333003333003333003333003333003333003333003333 + 0033330101010066330066330066330066330066330066330066330066330066 + 3301010100993300993300993300993300993300993300993300993300993301 + 010100CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC33010101 + 00FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF330101010000 + 6600006600006600006600006600006600006600006600006601010100336600 + 3366003366003366003366003366003366003366003366010101006666006666 + 0066660066660066660066660066660066660066660101010099660099660099 + 6600996600996600996600996600996600996601010100CC6600CC6600CC6600 + CC6600CC6600CC6600CC6600CC6600CC6601010100FF6600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600FF660101010000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000033000033000033000033000033000033000033 + 0000330000330001010100660000660000660000660000660000660000660000 + 6600006600010101009900009900009900009900009900009900009900009900 + 00990001010100CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC + 0001010100FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0001 + 0101000033000033000033000033000033000033000033000033000033010101 + 0033330033330033330033330033330033330033330033330033330101010066 + 3300663300663300663300663300663300663300663300663301010100993300 + 993300993300993300993300993300993300993300993301010100CC3300CC33 + 00CC3300CC3300CC3300CC3300CC3300CC3300CC3301010100FF3300FF3300FF + 3300FF3300FF3300FF3300FF3300FF3300FF3301010100006600006600006600 + 0066000066000066000066000066000066010101003366003366003366003366 + 0033660033660033660033660033660101010066660066660066660066660066 + 6600666600666600666600666601010100996600996600996600996600996600 + 996600996600996600996601010100CC6600CC6600CC6600CC6600CC6600CC66 + 00CC6600CC6600CC6601010100FF6600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600FF6601010100000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000330000330000330000330000330000330000330000330000330001 + 0101006600006600006600006600006600006600006600006600006600010101 + 00990000990000990000990000990000990000990000990000990001010100CC + 0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0001010100FF0000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00010101000033000033 + 0000330000330000330000330000330000330000330101010033330033330033 + 3300333300333300333300333300333300333301010100663300663300663300 + 6633006633006633006633006633006633010101009933009933009933009933 + 00993300993300993300993300993301010100CC3300CC3300CC3300CC3300CC + 3300CC3300CC3300CC3300CC3301010100FF3300FF3300FF3300FF3300FF3300 + FF3300FF3300FF3300FF33010101000066000066000066000066000066000066 + 0000660000660000660101010033660033660033660033660033660033660033 + 6600336600336601010100666600666600666600666600666600666600666600 + 6666006666010101009966009966009966009966009966009966009966009966 + 00996601010100CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC + 6601010100FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6601 + 0101000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000330000 + 3300003300003300003300003300003300003300003300010101006600006600 + 0066000066000066000066000066000066000066000101010099000099000099 + 0000990000990000990000990000990000990001010100CC0000CC0000CC0000 + CC0000CC0000CC0000CC0000CC0000CC0001010100FF0000FF0000FF0000FF00 + 00FF0000FF0000FF0000FF0000FF000101010000330000330000330000330000 + 3300003300003300003300003301010100333300333300333300333300333300 + 3333003333003333003333010101006633006633006633006633006633006633 + 0066330066330066330101010099330099330099330099330099330099330099 + 3300993300993301010100CC3300CC3300CC3300CC3300CC3300CC3300CC3300 + CC3300CC3301010100FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF33 + 00FF330101010000660000660000660000660000660000660000660000660000 + 6601010100336600336600336600336600336600336600336600336600336601 + 0101006666006666006666006666006666006666006666006666006666010101 + 00996600996600996600996600996600996600996600996600996601010100CC + 6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6601010100FF6600 + FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF66010101000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000003300003300003300003300 + 0033000033000033000033000033000101010066000066000066000066000066 + 0000660000660000660000660001010100990000990000990000990000990000 + 990000990000990000990001010100CC0000CC0000CC0000CC0000CC0000CC00 + 00CC0000CC0000CC0001010100FF0000FF0000FF0000FF0000FF0000FF0000FF + 0000FF0000FF0001010100003300003300003300003300003300003300003300 + 0033000033010101003333003333003333003333003333003333003333003333 + 0033330101010066330066330066330066330066330066330066330066330066 + 3301010100993300993300993300993300993300993300993300993300993301 + 010100CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC3300CC33010101 + 00FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF3300FF330101010000 + 6600006600006600006600006600006600006600006600006601010100336600 + 3366003366003366003366003366003366003366003366010101006666006666 + 0066660066660066660066660066660066660066660101010099660099660099 + 6600996600996600996600996600996600996601010100CC6600CC6600CC6600 + CC6600CC6600CC6600CC6600CC6600CC6601010100FF6600FF6600FF6600FF66 + 00FF6600FF6600FF6600FF6600FF660101010000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000033000033000033000033000033000033000033 + 0000330000330001010100660000660000660000660000660000660000660000 + 6600006600010101009900009900009900009900009900009900009900009900 + 00990001010100CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC + 0001010100FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0001 + 0101000033000033000033000033000033000033000033000033000033010101 + 0033330033330033330033330033330033330033330033330033330101010066 + 3300663300663300663300663300663300663300663300663301010100993300 + 993300993300993300993300993300993300993300993301010100CC3300CC33 + 00CC3300CC3300CC3300CC3300CC3300CC3300CC3301010100FF3300FF3300FF + 3300FF3300FF3300FF3300FF3300FF3300FF3301010100006600006600006600 + 0066000066000066000066000066000066010101003366003366003366003366 + 0033660033660033660033660033660101010066660066660066660066660066 + 6600666600666600666600666601010100996600996600996600996600996600 + 996600996600996600996601010100CC6600CC6600CC6600CC6600CC6600CC66 + 00CC6600CC6600CC6601010100FF6600FF6600FF6600FF6600FF6600FF6600FF + 6600FF6600FF6601010100000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000330000330000330000330000330000330000330000330000330001 + 0101006600006600006600006600006600006600006600006600006600010101 + 00990000990000990000990000990000990000990000990000990001010100CC + 0000CC0000CC0000CC0000CC0000CC0000CC0000CC0000CC0001010100FF0000 + FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00010101000033000033 + 0000330000330000330000330000330000330000330101010033330033330033 + 3300333300333300333300333300333300333301010100663300663300663300 + 6633006633006633006633006633006633010101009933009933009933009933 + 00993300993300993300993300993301010100CC3300CC3300CC3300CC3300CC + 3300CC3300CC3300CC3300CC3301010100FF3300FF3300FF3300FF3300FF3300 + FF3300FF3300FF3300FF33010101000066000066000066000066000066000066 + 0000660000660000660101010033660033660033660033660033660033660033 + 6600336600336601010100666600666600666600666600666600666600666600 + 6666006666010101009966009966009966009966009966009966009966009966 + 00996601010100CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC6600CC + 6601010100FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6600FF6601 + 0101000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000001010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101010101010101 + 0101010101010101010101010101010101010101010101010101} + OnMouseDown = imgPaletteMouseDown + OnMouseMove = imgPaletteMouseMove + end + end + end + object SpTBXPanel1: TSpTBXPanel + Left = 0 + Top = 0 + Width = 213 + Height = 26 + Caption = 'SpTBXPanel1' + Align = alTop + TabOrder = 1 + OnDrawBackground = SpTBXPanel1DrawBackground + DesignSize = ( + 213 + 26) + object btnColorNone: TSpTBXSpeedButton + Left = 170 + Top = 3 + Width = 20 + Height = 20 + Anchors = [akTop, akRight] + OnClick = btnColorNoneClick + OnMouseEnter = btnColorNoneMouseEnter + OnMouseLeave = btnColorNoneMouseLeave + Images = ImageList1 + ImageIndex = 1 + OnDraw = btnColorDialogDraw + end + object btnColorDialog: TSpTBXSpeedButton + Left = 190 + Top = 3 + Width = 20 + Height = 20 + Anchors = [akTop, akRight] + OnClick = btnColorDialogClick + OnMouseEnter = btnColorDialogMouseEnter + OnMouseLeave = btnColorDialogMouseLeave + Images = ImageList1 + ImageIndex = 0 + OnDraw = btnColorDialogDraw + end + object btnColor: TSpTBXSpeedButton + Left = 2 + Top = 2 + Width = 50 + Height = 22 + OnDraw = btnColorDraw + end + object btnLabel: TSpTBXLabel + Left = 58 + Top = 3 + Width = 47 + Height = 19 + Caption = 'btnLabel' + end + end + object Timer1: TTimer + Enabled = False + Interval = 25 + OnTimer = Timer1Timer + Left = 112 + Top = 152 + end + object ImageList1: TImageList + Left = 72 + Top = 152 + Bitmap = { + 494C010105000A00040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600 + 0000000000003600000028000000400000002000000001002000000000000020 + 00000000000000000000000000000000000000000000A1A1A100000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000A5A5A500FBF6F200A5A5A500A5A5 + A500000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000AAAAAA00F6EDE400F3E6 + D900AAAAAA000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000AFAFAF00FBF6F200F5EB + E100F3E6D900AFAFAF0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000B4B4B400FBF6 + F200F5EBE100F3E6D900B4B4B400000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000BABA + BA00FBF6F200F5EBE100F3E6D900BABABA000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000BFBFBF00FBF6F200F5EBE100F4E7DC00AC8E8400954A2F00974B2D000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000C4C4C400FBF6F200D0AD9F009B523700C6835600C67D4A00984B + 2F00000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000B5978C00A0593D00D4A07A00D3996A00C7834A00A259 + 3700000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000A25B3C00DBB29200DDB18A00D59C6C00CC884F00C77D + 4300A75D39000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000AD684600DFB39000E7C4A900E1B69200D3915B00D088 + 4C00CC834900AC64400000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000AD684700C0876B00E3BDA000E1B08A00D793 + 5A00D48E5300D08A5100B6704700000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000C48E7000E4BB9C00E1B1 + 8800D8965F00D7935900D5915900B47453000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000C9957700E8C1 + 9F00E4B58A00DD9E6800DA9A6200B97B58000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000D6AB + 8E00E8C2A200E6BA9200C98E6700000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000C2856000C1845F0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000E1818F00D1496C00C92B6300C72D7700CF519F00DF8DCB000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000E87C + 7A00D6121900E1405900EE638400F373A100F071B200E45AB600D236B400C41B + BB00DC91E1000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000040404000404 + 0400040404000404040004040400040404000404040004040400040404000404 + 0400040404000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000EB6E5100E952 + 4000F8858400FF969F00FF749100FF609A00FF60B700FF78D800FC92EF00E871 + EA00B632CC00BC6ED90000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000161616001616 + 1600222222001616160016161600222222001616160016161600161616001616 + 160016161600000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFF + FF00FFFFFF0000000000000000000000000000000000F69E6D00F0774400FCA6 + 9200FF7B6F00FF515800FF5A7900FF5E9B00FF5CBC00FF57DA00FF4CF700F17B + FF00D685F1009734CF00BA90E400000000000000000000000000B07A5800B07A + 5800B07A580000000000DD9BD900DD9BD900DD9BD90000000000B177FF00B177 + FF00B177FF000000000000000000000000000000000000000000000033000033 + 3300003333000033330033330000333300003333000033000000330033003300 + 330033003300000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFF + FF00FFFFFF0000000000000000000000000000000000F87E0F00FBB98E00FF97 + 6A00FF795B00FF716B00FF768900FF7CAD00FF7BCD00FF71ED00F763FF00D952 + FF00CF7CFF00B373EC00661AD000000000000000000000000000B07A5800B07A + 5800B07A580000000000DD9BD900DD9BD900DD9BD90000000000B177FF00B177 + FF00B177FF000000000000000000000000000000000000000000000066000033 + 6600006666000066330033660000666600006633000066000000660033006600 + 660033006600000000000000000000000000000000000000000000000000C0C0 + C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0 + C000C0C0C000000000000000000000000000FDC86100FDBE6000FFD09C00FFA5 + 5B00FFA27100FF9A8400FF979B00FF9FBF00FF9FE000FE92FB00E77CFF00C966 + FF00A84FFF00BE95FD007240DD00A086E7000000000000000000B07A5800B07A + 5800B07A580000000000DD9BD900DD9BD900DD9BD90000000000B177FF00B177 + FF00B177FF000000000000000000000000000000000000000000003399000066 + 9900009999000099660066990000999900009933000099000000990066009900 + 990033009900000000000000000000000000000000000000000000000000C0C0 + C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0 + C000C0C0C000000000000000000000000000F7CA3200FEDD8000FFD16C00FFC7 + 6B00FFC78500FFC49E00FFBDB300FFBFD000FFBFF100F4B0FF00D696FF00B679 + FF00955EFF009977FF008265EC00664BDD000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000033CC000066 + CC0000CCCC0000CC660066CC0000CCCC0000CC660000CC000000CC006600CC00 + CC006600CC00000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFF + FF00FFFFFF00000000000000000000000000F2DC1B00FFF29000FFE96200FFE8 + 7600FFE79300FFE7B000FFE6CA00FFE5E500FCDEFD00E1C6FF00C2A6FF00A184 + FF007E66FF007664FF00887BF6003D2EDB000000000000000000B2EBD000B2EB + D000B2EBD000000000006DCC50006DCC50006DCC500000000000EBB06000EBB0 + 6000EBB0600000000000000000000000000000000000000000000033FF000066 + FF0000FFFF0000FF660099FF0000FFFF0000FF660000FF000000FF009900CC00 + FF006600FF00000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFF + FF00FFFFFF00000000000000000000000000EBED1800F9FA9200FAFD6400FAFD + 7B00F9FD9800FAFDB500FAFED300FAFEEF00EFF3FF00D0D5FF00AFB3FF008D91 + FF006C6FFF006769FF008283FB002C2FDE000000000000000000B2EBD000B2EB + D000B2EBD000000000006DCC50006DCC50006DCC500000000000EBB06000EBB0 + 6000EBB0600000000000000000000000000000000000000000000033FF003399 + FF0033FFFF0033FF990099FF3300FFFF3300FF993300FF333300FF339900FF33 + FF006633FF00000000000000000000000000000000000000000000000000C0C0 + C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0 + C000C0C0C000000000000000000000000000D4ED3000E4F58200E5FF6F00E0FF + 7900E0FF9500DFFFAF00DCFFC700DCFFE000D9FEFA00C5E9FF00A7CAFF0087AA + FF00698BFF00788EFF007386FB00475AE6000000000000000000B2EBD000B2EB + D000B2EBD000000000006DCC50006DCC50006DCC500000000000EBB06000EBB0 + 6000EBB0600000000000000000000000000000000000000000003366FF006699 + FF0066FFFF0066FF9900CCFF6600FFFF6600FF996600FF666600FF66CC00FF66 + FF009966FF00000000000000000000000000000000000000000000000000C0C0 + C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0 + C000C0C0C000000000000000000000000000CBEE5700C6EB6700DDFF9B00C5FF + 6F00C3FF8C00BEFFA100B9FFB300BDFFCF00BDFFEE00B0F8FF0099DEFF007EC2 + FF0063A3FF009EBDFF005983F8007792EF000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000807CFF0099CC + FF0099FFFF0099FFCC00CCFF9900FFFF9900FFCC9900FF999900FF99CC00FF99 + FF009999FF00000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFF + FF00FFFFFF0000000000000000000000000000000000A0E13800CBF69700AEFF + 6C00A4FF7A009DFF8D009BFFA300A4FFC400A2FFDF0097FFF80085EFFF006ED3 + FF0078C5FF0092C5FC001C73F4000000000000000000000000006B6FFE006B6F + FE006B6FFE000000000073AAFF0073AAFF0073AAFF000000000067D5F00067D5 + F00067D5F00000000000000000000000000000000000000000009999FF0099CC + FF0099FFFF0099FFCC00CCFF9900FFFF9900FFCCCC00FFCCCC00FF99CC00FF99 + FF00CC99FF00000000000000000000000000000000000000000000000000FFFF + FF00FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00C0C0C000C0C0C000FFFF + FF00FFFFFF0000000000000000000000000000000000A1E5550094E25700BBF9 + 9D008AFF6E0079FF760082FF970089FFB60087FFD1007EFFEC006DFBFE0076E8 + FF009BDFFC0054BAFB0075B9FA000000000000000000000000006B6FFE006B6F + FE006B6FFE000000000073AAFF0073AAFF0073AAFF000000000067D5F00067D5 + F00067D5F0000000000000000000000000000000000000000000CCCCFF00CCCC + FF00CCFFFF00CCFFCC00CCFFCC00FFFFCC00FFCCCC00FFCCCC00FFCCCC00FFCC + FF00CCCCFF000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000006EDD3B0074E1 + 5800A1F699009EFFA6007BFF9E0070FFAE0070FFC7007CFFE300A5FFFA0098F4 + FB0055D8F50052CCFB00000000000000000000000000000000006B6FFE006B6F + FE006B6FFE000000000073AAFF0073AAFF0073AAFF000000000067D5F00067D5 + F00067D5F0000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000000000066DF + 56003AD73D006AE67C0088F3AA0096F9C40097FBD30087F7DB0068EFE0001EE7 + E6006DE6F3000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000058DF740037D96E0022D67A0025D892003BDFB20065E8D3000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000424D3E000000000000003E000000 + 2800000040000000200000000100010000000000000100000000000000000000 + 000000000000000000000000FFFFFF00BFFF0000000000000FFF000000000000 + 87FF00000000000083FF000000000000C1FF000000000000E0FF000000000000 + F01F000000000000F80F000000000000FC0F000000000000FC07000000000000 + FC03000000000000FE01000000000000FF80000000000000FFC0000000000000 + FFE1000000000000FFF3000000000000FFFFFFFFF81FFFFFFFFFFFFFE007FFFF + C007C003C003FFFFC007C0038001C447C007C0038001C447C007C0030000C447 + C007C0030000FFFFC007C0030000C447C007C0030000C447C007C0030000C447 + C007C0030000FFFFC007C0038001C447C007C0038001C447C007C003C003C447 + FFFFFFFFE007FFFFFFFFFFFFF81FFFFF} + end + object ColorDialog1: TColorDialog + Options = [cdFullOpen] + Left = 144 + Top = 152 + end +end diff --git a/internal/2.4.4/1/Source/SpTBXColorPickerForm.pas b/internal/2.4.4/1/Source/SpTBXColorPickerForm.pas new file mode 100644 index 0000000..f09bed5 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXColorPickerForm.pas @@ -0,0 +1,534 @@ +unit SpTBXColorPickerForm; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +Development notes: + - All the Windows and Delphi bugs fixes are marked with '[Bugfix]'. + - All the theme changes and adjustments are marked with '[Theme-Change]'. + +History: + - + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation + +uses + Windows, Messages, Classes, SysUtils, Controls, Graphics, ImgList, Forms, + Menus, StdCtrls, ExtCtrls, ActnList, Dialogs, + TB2Dock, TB2Toolbar, TB2Item, TB2ExtItems, + SpTBXSkins, SpTBXItem, SpTBXControls, SpTBXEditors, SpTBXFormPopupMenu, + SpTBXExtEditors, SpTBXTabs; + +type + { TSpTBXColorPickerDragObject } + + TSpTBXColorPickerDragObject = class(TDragControlObject) + protected + function GetDragCursor(Accepted: Boolean; X, Y: Integer): TCursor; override; + end; + + { TSpTBXColorEditPopupMenu } + + TSpTBXColorEditPopupMenu = class(TSpTBXFormPopupMenu) + protected + procedure DoGetPopupFormClass(var AFormClass: TCustomFormClass); override; + function InternalPopup(X, Y: Integer; ForceFocus: Boolean; PopupControl: TControl = nil): Boolean; override; + public + constructor Create(AOwner: TComponent); override; + end; + + { TSpTBXColorPickerForm } + + TSpTBXColorPickerForm = class(TForm) + Timer1: TTimer; + imgColorPicker: TImage; + SpTBXTabControl1: TSpTBXTabControl; + SpTBXTabItem1: TSpTBXTabItem; + SpTBXTabSheet1: TSpTBXTabSheet; + SpTBXTabItem2: TSpTBXTabItem; + SpTBXTabSheet2: TSpTBXTabSheet; + imgPalette: TImage; + btnColorPicker: TSpTBXSpeedButton; + SpTBXTabItem3: TSpTBXTabItem; + SpTBXTabSheet3: TSpTBXTabSheet; + ImageList1: TImageList; + SpTBXColorListBox1: TSpTBXColorListBox; + ColorDialog1: TColorDialog; + SpTBXPanel1: TSpTBXPanel; + btnColorNone: TSpTBXSpeedButton; + btnColorDialog: TSpTBXSpeedButton; + btnColor: TSpTBXSpeedButton; + btnLabel: TSpTBXLabel; + procedure Timer1Timer(Sender: TObject); + procedure imgPaletteMouseMove(Sender: TObject; Shift: TShiftState; X, + Y: Integer); + procedure btnColorPickerStartDrag(Sender: TObject; + var DragObject: TDragObject); + procedure FormCreate(Sender: TObject); + procedure btnColorPickerEndDrag(Sender, Target: TObject; X, Y: Integer); + procedure FormResize(Sender: TObject); + procedure SpTBXTabControl1ActiveTabChange(Sender: TObject; + TabIndex: Integer); + procedure SpTBXColorListBox1Click(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure btnColorDraw(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); + procedure btnColorNoneClick(Sender: TObject); + procedure btnColorNoneMouseEnter(Sender: TObject); + procedure btnColorDialogClick(Sender: TObject); + procedure btnColorDialogMouseEnter(Sender: TObject); + procedure btnColorDialogDraw(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); + procedure SpTBXPanel1DrawBackground(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); + procedure btnColorDialogMouseLeave(Sender: TObject); + procedure btnColorNoneMouseLeave(Sender: TObject); + procedure imgPaletteMouseDown(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); + protected + FSelectedColor: TColor; + FPrevLabelColor: TColor; + FColorPickerDragObject: TSpTBXColorPickerDragObject; + procedure CenterImages; + public + function GetSelectedColor: TColor; + procedure SetSelectedColor(AColor: TColor); + procedure UpdateColorLabel(AColor: TColor; AButtonType: Integer = -1); + property SelectedColor: TColor read FSelectedColor write FSelectedColor; + end; + +{ Helpers } +procedure SpScreenShot(SourceR: TRect; DestCanvas: TCanvas; DestR: TRect); +procedure SpScreenShotMagnify(DestCanvas: TCanvas; DestR: TRect; DrawCrosshair: Boolean; out CenterColor: TColor; ZoomFactor: Double = 200); + +const + crSpTBXEyeDropper = 103; // Cursor ID used for Eye Dropper cursor + +resourcestring + SSpTBXTransparentColor = 'Transparent Color'; + SSpTBXColorPicker = 'Color Picker'; + SSpTBXClickAndDrag = 'Drag && Drop'; + +implementation + +{$R *.dfm} + +uses + Themes, UxTheme; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Helpers } + +procedure SpScreenShot(SourceR: TRect; DestCanvas: TCanvas; DestR: TRect); +var + DesktopDC: HDC; +begin + DesktopDC := GetDC(0); + try + Windows.StretchBlt( + DestCanvas.Handle, DestR.Left, DestR.Top, DestR.Right - DestR.Left, DestR.Bottom - DestR.Top, + DesktopDC, SourceR.Left, SourceR.Top, SourceR.Right - SourceR.Left, SourceR.Bottom - SourceR.Top, + SRCCOPY); + finally + ReleaseDC(0, DesktopDC); + end; +end; + +procedure SpScreenShotMagnify(DestCanvas: TCanvas; DestR: TRect; DrawCrosshair: Boolean; out CenterColor: TColor; ZoomFactor: Double = 200); +var + W, H, zoomW, zoomH: integer; + CursorP, CenterP: TPoint; + SourceR: TRect; + Multiplier: Double; +begin + GetCursorPos(CursorP); + + W := DestR.Right - DestR.Left; + H := DestR.Bottom - DestR.Top; + + // Get the zoom width and height + if ZoomFactor < 0 then ZoomFactor := 100; + Multiplier := ZoomFactor / 100; + zoomW := Round(W * Multiplier); + zoomH := Round(H * Multiplier); + + // Get the zoomed Rect + SourceR.Left := CursorP.X - (zoomW div 2); + SourceR.Top := CursorP.Y - (zoomH div 2); + SourceR.Right := SourceR.Left + zoomW; + SourceR.Bottom := SourceR.Top + zoomH; + + DestCanvas.Lock; + try + // Draw the screenshot + DestCanvas.FillRect(DestR); + SpScreenShot(SourceR, DestCanvas, DestR); + CenterP := Point(W div 2, H div 2); + CenterColor := DestCanvas.Pixels[CenterP.X, CenterP.Y]; + + // Draw the crosshair + if DrawCrosshair then begin + DestCanvas.MoveTo(CenterP.X - (CenterP.X div 2), CenterP.Y); + DestCanvas.LineTo(CenterP.X + (CenterP.X div 2), CenterP.Y); + DestCanvas.MoveTo(CenterP.X, CenterP.Y - (CenterP.Y div 2)); + DestCanvas.LineTo(CenterP.X, CenterP.Y + (CenterP.Y div 2)); + end; + finally + DestCanvas.Unlock; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXColorPickerDragObject } + +function TSpTBXColorPickerDragObject.GetDragCursor(Accepted: Boolean; X, + Y: Integer): TCursor; +begin + // Make sure we always use crSpTBXEyeDropper + Result := crSpTBXEyeDropper; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXColorEditPopupMenu } + +constructor TSpTBXColorEditPopupMenu.Create(AOwner: TComponent); +begin + inherited; + BorderStyle := pbsSizeableRightBottom; +end; + +procedure TSpTBXColorEditPopupMenu.DoGetPopupFormClass(var AFormClass: TCustomFormClass); +begin + AFormClass := TSpTBXColorPickerForm; + inherited DoGetPopupFormClass(AFormClass); +end; + +function TSpTBXColorEditPopupMenu.InternalPopup(X, Y: Integer; + ForceFocus: Boolean; PopupControl: TControl): Boolean; +begin + if Assigned(PopupControl) and (PopupControl is TSpTBXColorEdit) then + SkinType := TSpTBXColorEdit(PopupControl).SkinType; + Result := inherited InternalPopup(X, Y, ForceFocus, PopupControl); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXColorPickerForm } + +procedure TSpTBXColorPickerForm.FormCreate(Sender: TObject); +begin + btnColorPicker.Caption := SSpTBXClickAndDrag; + SpTBXTabControl1.DoubleBuffered := True; + imgPalette.Cursor := crSpTBXEyeDropper; +end; + +procedure TSpTBXColorPickerForm.FormDestroy(Sender: TObject); +begin + FreeAndNil(FColorPickerDragObject); +end; + +procedure TSpTBXColorPickerForm.FormResize(Sender: TObject); +begin + CenterImages; +end; + +procedure TSpTBXColorPickerForm.FormShow(Sender: TObject); +var + T: TSpTBXSkinType; +begin + if Assigned(ActiveFormPopupMenu) then begin + T := ActiveFormPopupMenu.SkinType; + SkinManager.ChangeControlSkinType(Self, T); + if T <> sknSkin then + SpTBXTabControl1.TabBackgroundColor := clBtnFace; + end; + + UpdateColorLabel(GetSelectedColor); + CenterImages; +end; + +procedure TSpTBXColorPickerForm.CenterImages; +begin + // Center the images + case SpTBXTabControl1.ActiveTabIndex of + 0: begin + imgPalette.Left := (imgPalette.Parent.Width - imgPalette.Width) div 2; + imgPalette.Top := (imgPalette.Parent.Height - imgPalette.Height) div 2; + end; + 2: begin + imgColorPicker.Picture := nil; + end; + end; +end; + +procedure TSpTBXColorPickerForm.btnColorDraw(Sender: TObject; + ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +begin + if PaintStage = pstPrePaint then begin + PaintDefault := False; + InflateRect(ARect, -3, -3); + if btnColor.CaptionGlowColor = clNone then + SpDrawCheckeredBackground(ACanvas, ARect) + else begin + ACanvas.Brush.Color := btnColor.CaptionGlowColor; + ACanvas.FillRect(ARect); + end; + SpDrawRectangle(ACanvas, ARect, 0, clBtnShadow, clBtnHighlight); + end; +end; + +procedure TSpTBXColorPickerForm.btnColorDialogClick(Sender: TObject); +var + EditButton: TSpTBXColorEditButton; + P: TSpTBXFormPopupMenu; +begin + P := ActiveFormPopupMenu; + if Assigned(P) and Assigned(P.PopupComponent) and (P.PopupComponent is TSpTBXColorEditButton) then begin + EditButton := TSpTBXColorEditButton(P.PopupComponent); + Parent.Visible := False; + ColorDialog1.Color := btnColor.CaptionGlowColor; + if ColorDialog1.Execute then + EditButton.SelectedColor := ColorDialog1.Color; + P.ClosePopup(False); + end; +end; + +procedure TSpTBXColorPickerForm.btnColorDialogDraw(Sender: TObject; + ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +// Used by btnColorDialog and btnColorNone +var + B: TSpTBXSpeedButton; + Flags: Integer; + State: TSpTBXSkinStatesType; +begin + if (PaintStage = pstPrePaint) and (Sender is TSpTBXSpeedButton) then begin + PaintDefault := False; + B := Sender as TSpTBXSpeedButton; + if B.MouseInControl then begin + case SpTBXSkinType(SpTBXPanel1.SkinType) of + sknNone: + PaintDefault := True; + sknWindows: + begin + if B.Pushed then Flags := TS_PRESSED + else Flags := TS_HOT; + DrawThemeBackground(ThemeServices.Theme[teToolBar], ACanvas.Handle, TP_BUTTON, Flags, ARect, nil); + end; + sknSkin: + begin + if B.Pushed then State := sknsPushed + else State := sknsHotTrack; + CurrentSkin.PaintBackground(ACanvas, ARect, skncToolbarItem, State, True, True); + end; + end; + end; + end; +end; + +procedure TSpTBXColorPickerForm.btnColorDialogMouseEnter(Sender: TObject); +begin + FPrevLabelColor := btnColor.CaptionGlowColor; + btnLabel.Caption := SSpTBXColorPicker; +end; + +procedure TSpTBXColorPickerForm.btnColorDialogMouseLeave(Sender: TObject); +begin + UpdateColorLabel(FPrevLabelColor); +end; + +procedure TSpTBXColorPickerForm.btnColorNoneClick(Sender: TObject); +begin + SetSelectedColor(clNone); +end; + +procedure TSpTBXColorPickerForm.btnColorNoneMouseEnter(Sender: TObject); +begin + FPrevLabelColor := btnColor.CaptionGlowColor; + UpdateColorLabel(clNone); +end; + +procedure TSpTBXColorPickerForm.btnColorNoneMouseLeave(Sender: TObject); +begin + UpdateColorLabel(FPrevLabelColor); +end; + +procedure TSpTBXColorPickerForm.btnColorPickerStartDrag(Sender: TObject; + var DragObject: TDragObject); +begin + FPrevLabelColor := btnColor.CaptionGlowColor; + Timer1.Enabled := True; + FColorPickerDragObject := TSpTBXColorPickerDragObject.Create(btnColorPicker); + DragObject := FColorPickerDragObject; +end; + +procedure TSpTBXColorPickerForm.btnColorPickerEndDrag(Sender, Target: TObject; X, + Y: Integer); +var + CursorP: TPoint; +begin + Timer1.Enabled := False; + if imgColorPicker.Visible then begin + imgColorPicker.Visible := False; + btnColorPicker.Visible := True; + SpTBXTabControl1.InvalidateBackground; + end; + + if Assigned(FColorPickerDragObject) then begin + GetCursorPos(CursorP); + CursorP := ScreenToClient(CursorP); + if FColorPickerDragObject.Dropped and not PtInRect(ClientRect, CursorP) then + SetSelectedColor(btnColor.CaptionGlowColor) + else + UpdateColorLabel(FPrevLabelColor); + FreeAndNil(FColorPickerDragObject); + end; +end; + +procedure TSpTBXColorPickerForm.imgPaletteMouseDown(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +begin + SetSelectedColor(btnColor.CaptionGlowColor); +end; + +procedure TSpTBXColorPickerForm.imgPaletteMouseMove(Sender: TObject; Shift: TShiftState; + X, Y: Integer); +var + C: TColor; +begin + C := imgPalette.Picture.Bitmap.Canvas.Pixels[X, Y]; + if C <> $00010101 then + UpdateColorLabel(C); +end; + +procedure TSpTBXColorPickerForm.SpTBXTabControl1ActiveTabChange(Sender: TObject; + TabIndex: Integer); +begin + CenterImages; +end; + +procedure TSpTBXColorPickerForm.SpTBXColorListBox1Click(Sender: TObject); +begin + SetSelectedColor(SpTBXColorListBox1.Selected); +end; + +procedure TSpTBXColorPickerForm.SpTBXPanel1DrawBackground(Sender: TObject; + ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +begin + if PaintStage = pstPrePaint then begin + PaintDefault := False; + SpDrawXPDock(ACanvas, ARect, SpTBXPanel1.SkinType); + SpDrawXPToolbar(ACanvas, ARect, SpTBXPanel1.SkinType, True, False, False, True, False); + end; +end; + +procedure TSpTBXColorPickerForm.Timer1Timer(Sender: TObject); +var + CursorP: TPoint; + Zoom: Double; + C: TColor; +begin + if not IsIconic(Application.Handle) then begin + GetCursorPos(CursorP); + CursorP := ScreenToClient(CursorP); + if btnColorPicker.Dragging and not PtInRect(ClientRect, CursorP) then begin + if not imgColorPicker.Visible then begin + imgColorPicker.Visible := True; + btnColorPicker.Visible := False; + SpTBXTabControl1.InvalidateBackground; + end; + Zoom := 100 / 5; // x5 factor + SpScreenShotMagnify(imgColorPicker.Canvas, Rect(0, 0, imgColorPicker.Width, imgColorPicker.Height), True, C, Zoom); + UpdateColorLabel(C); + end + else + if imgColorPicker.Visible then begin + imgColorPicker.Visible := False; + btnColorPicker.Visible := True; + SpTBXTabControl1.InvalidateBackground; + end; + end; +end; + +function TSpTBXColorPickerForm.GetSelectedColor: TColor; +var + B: TSpTBXColorEditButton; +begin + Result := clNone; + if Assigned(ActiveFormPopupMenu) then + if Assigned(ActiveFormPopupMenu.PopupComponent) and (ActiveFormPopupMenu.PopupComponent is TSpTBXColorEditButton) then begin + B := TSpTBXColorEditButton(ActiveFormPopupMenu.PopupComponent); + Result := B.SelectedColor; + end; +end; + +procedure TSpTBXColorPickerForm.SetSelectedColor(AColor: TColor); +var + B: TSpTBXColorEditButton; +begin + // Inform the ActiveFormPopupMenu that a selection was made. + UpdateColorLabel(AColor); + FSelectedColor := AColor; + if Assigned(ActiveFormPopupMenu) then begin + if Assigned(ActiveFormPopupMenu.PopupComponent) and (ActiveFormPopupMenu.PopupComponent is TSpTBXColorEditButton) then begin + B := TSpTBXColorEditButton(ActiveFormPopupMenu.PopupComponent); + B.SelectedColor := AColor; + end; + ActiveFormPopupMenu.ClosePopup(True); + end; +end; + +procedure TSpTBXColorPickerForm.UpdateColorLabel(AColor: TColor; AButtonType: Integer = -1); +begin + btnColor.CaptionGlowColor := AColor; + if AColor = clNone then + btnLabel.Caption := SSpTBXTransparentColor + else + btnLabel.Caption := SpColorToHTML(AColor); +end; + +end. diff --git a/internal/2.4.4/1/Source/SpTBXControls.pas b/internal/2.4.4/1/Source/SpTBXControls.pas new file mode 100644 index 0000000..7b318a5 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXControls.pas @@ -0,0 +1,4306 @@ +unit SpTBXControls; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +Development notes: + - All the theme changes and adjustments are marked with '[Theme-Change]'. + - All the compatibility changes are marked with '[Backward-Compatibility]'. + +History: +2 December 2009 - version 2.4.4 + - Fixed TSpTBXLabel accel key handling, thanks to Costas + Stergiou for reporting this. + - Fixed incorrect hint handling on TSpTBXTextObject. + - Added Padding property to various controls, thanks to + Boris Yankov for reporting this. + +13 September 2009 - version 2.4.3 + - Fixed incorrect TSpTBXSpeedButton painting, when Flat is + set to true the button should be painted as a toolbar item, + thanks to Yann Papouin for reporting this. + +8 May 2009 - version 2.4.2 + - Added AllowAllUp property to TSpTBXSpeedButton. + +15 March 2009 - version 2.4.1 + - Added GlyphLayout property to TSpTBXButton/TSpTBXSpeedButton. + - Added Flat property to TSpTBXButton/TSpTBXSpeedButton. + - Fixed TSpTBXTrackBar bug, the Frequency property didn't work, + thanks to Alfred Vink for reporting this. + +17 January 2009 - version 2.4 + - No changes. + +28 September 2008 - version 2.3.1 + - Fixed incorrect TSpTBXGroupBox painting, the control was not + repainted when the font was changed, thanks to Yury Plashenkov + for reporting this. + +26 September 2008 - version 2.3 + - Removed LinkFont property from TSpTBXTextObject, having 2 font + properties to control the text state was a bad idea. + +29 July 2008 - version 2.2 + - Fixed incorrect ProgressBar painting on Windows Vista, + thanks to Arvid for reporting this. + +22 June 2008 - version 2.1 + - No changes. + +3 May 2008 - version 2.0 + - No changes. + +2 April 2008 - version 1.9.5 + - Improved the background painting of TSpTBXPanel. + +3 February 2008 - version 1.9.4 + - No changes. + +19 January 2008 - version 1.9.3 + - Fixed incorrect Autosizing of TSpTBXTextControl, thanks + to Alexey Naumov for reporting this. + +26 December 2007 - version 1.9.2 + - Added State parameter to TSpTBXTextControl.OnDrawCaption + - Fixed incorrect Default property handling of TSpTBXButton, + thanks to Karpushin Matvey and Beta Xiong for reporting this. + +1 December 2007 - version 1.9.1 + - Added various painting enhancements made by Jim. + - Fixed incorrect caption color on the controls when + the Font is changed, thanks to Arvid and Zunyite for + reporting this. + - Fixed incorrect nested panel painting (canvas was not locked), + thanks to Jim for reporting this. + +20 November 2007 - version 1.9 + - Removed TBX dependency. + +8 February 2007 - version 1.8.3 + - Added GripHotTrack property to TSpTBXSplitter. + +17 December 2006 - version 1.8.2 + - Added AutoSize property to TSpTBXPanel. + - Fixed incorrect resizing behavior on TSpTBXSplitter when a + DockablePanel was adjacent. + +24 November 2006 - version 1.8.1 + - Improved TSpTBXPanel painting, thanks to Jim Kueneman for + his code donation. + - Fixed incorrect focus behavior on TSpTBXRadioButton when used + on a groupbox, thanks to Andrew for reporting this. + +27 August 2006 - version 1.8 + - Added DropDownArrow property to TSpTBXButton and TSpTBXSpeedButton. + - Fixed incorrect TSpTBXGroupBox painting when changing the + Enabled property, thanks to Tomaz Kunaver for reporting this. + +15 June 2006 - version 1.7 + - Fixed incorrect TSpTBXButton painting when using a bitmap + skin and the DropDownMenu is shown, thanks to Boris Yankov + for reporting this. + +4 May 2006 - version 1.6 + - New component added, TSpTBXRadioGroup. + +12 April 2006 - version 1.5 + - No changes. + +27 February 2006 - version 1.4 + - Added GroupIndex property to TSpTBXButton and TSpTBXSpeedButton. + +10 February 2006 - version 1.3 + - New component added, TSpTBXSpeedButton. + - New component added, TSpTBXSplitter. + - Fixed incorrect TSpTBXButton behavior when trying to close the + DropDownMenu clicking the button, thanks to Alexey Naumov for + reporting this. + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation + +uses + Windows, Messages, Classes, SysUtils, Forms, Controls, Graphics, ImgList, + Menus, StdCtrls, ExtCtrls, ComCtrls, ActnList, + {$IFNDEF UNICODE} + TntClasses, TntControls, + {$ENDIF} + TB2Dock, TB2Toolbar, TB2Item, SpTBXItem, SpTBXSkins; + +{$IFDEF UNICODE} +type + TTntStrings = TStrings; +{$ENDIF} + +const + ConstStatesCount = 4; // Buttons have 4 states (normal, hottrack, pushed, disabled) + ConstInitRepeatPause = 400; // Delay of the first repeated click (ms) + ConstRepeatPause = 100; // Interval of the repeated clicks (ms) + CM_SPGROUPINDEXUPDATE = CM_BASE + 2222; // Message sent to the controls to update its state based on the GroupIndex + CM_SPTBXCONTROLSINVALIDATE = CM_BASE + 3333; // Message sent to SpTBX controls to invalidate the background + +type + TSpTBXTextObject = class; + + TSpTBXPanelBorder = ( + pbrRaised, + pbrDoubleRaised, + pbrSunken, + pbrDoubleSunken, + pbrBumped, + pbrEtched, + pbrFramed + ); + + TSpTBXProgressCaption = ( + pctNone, + pctDefault, + pctPercentage, + pctProgress + ); + + TSpTBXTickMark = ( + tmxBottomRight, + tmxTopLeft, + tmxBoth, + tmxCenter + ); + + TSpTBXCanResizeEvent = procedure(Sender: TObject; var NewSize: Integer; var Accept: Boolean) of object; + + { TSpTBXPanel } + + TSpTBXCustomPanel = class(TSpTBXCustomControl) + private + FBorders: Boolean; + FBorderType: TSpTBXPanelBorder; + FTBXStyleBackground: Boolean; + FSkinType: TSpTBXSkinType; + FOnDrawBackground: TSpTBXDrawEvent; + procedure SetBorders(const Value: Boolean); + procedure SetBorderType(const Value: TSpTBXPanelBorder); + procedure SetTBXStyleBackground(const Value: Boolean); + procedure SetSkinType(const Value: TSpTBXSkinType); + procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; + procedure CMSpTBXControlsInvalidate(var Message: TMessage); message CM_SPTBXCONTROLSINVALIDATE; + procedure WMEraseBkgnd(var Message: TMessage); message WM_ERASEBKGND; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; + protected + FBackground: TBitmap; + procedure AdjustClientRect(var Rect: TRect); override; + procedure CreateParams(var Params: TCreateParams); override; + procedure DrawBackground(ACanvas: TCanvas; ARect: TRect); virtual; + procedure DoDrawBackground(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + property Borders: Boolean read FBorders write SetBorders default True; + property BorderType: TSpTBXPanelBorder read FBorderType write SetBorderType default pbrEtched; + property ParentColor default False; + property TBXStyleBackground: Boolean read FTBXStyleBackground write SetTBXStyleBackground default False; + property OnDrawBackground: TSpTBXDrawEvent read FOnDrawBackground write FOnDrawBackground; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure InvalidateBackground(InvalidateChildren: Boolean = True); virtual; + published + property Caption; + property Hint; + property Color default clNone; + property SkinType: TSpTBXSkinType read FSkinType write SetSkinType default sknSkin; + end; + + TSpTBXPanel = class(TSpTBXCustomPanel) + private + FHotTracking: Boolean; + FHotTrack: Boolean; + FChildFocused: Boolean; + procedure SetHotTrack(const Value: Boolean); + procedure SetHotTracking(const Value: Boolean); + procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; + procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; + procedure CMFocusChanged(var Message: TCMFocusChanged); message CM_FOCUSCHANGED; + protected + procedure DrawBackground(ACanvas: TCanvas; ARect: TRect); override; + public + property HotTracking: Boolean read FHotTracking; + published + property Align; + property Anchors; + property AutoSize; + property BiDiMode; + property Constraints; + property UseDockManager; + property DockSite; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + {$IF CompilerVersion > 15} // For Delphi 2005 and up + property Padding; + {$IFEND} + property ParentBiDiMode; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property TabOrder; + property TabStop; + property Visible; + {$IF CompilerVersion > 15} // For Delphi 2005 and up + property OnAlignInsertBefore; + property OnAlignPosition; + {$IFEND} + property OnCanResize; + property OnClick; + property OnConstrainedResize; + property OnContextPopup; + property OnDockDrop; + property OnDockOver; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnGetSiteInfo; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnResize; + property OnStartDock; + property OnStartDrag; + property OnUnDock; + // TSpTBXCustomPanel properties + property Borders; + property BorderType; + property HotTrack: Boolean read FHotTrack write SetHotTrack default False; + property TBXStyleBackground; + property OnDrawBackground; + end; + + { TSpTBXGroupBox } + + TSpTBXCustomGroupBox = class(TSpTBXCustomPanel) + private + procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; + procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED; + protected + procedure AdjustClientRect(var Rect: TRect); override; + procedure DrawBackground(ACanvas: TCanvas; ARect: TRect); override; + public + constructor Create(AOwner: TComponent); override; + end; + + TSpTBXGroupBox = class(TSpTBXCustomGroupBox) + published + property Align; + property Anchors; + property BiDiMode; + property Color; + property Constraints; + property UseDockManager; + property DockSite; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + {$IF CompilerVersion > 15} // For Delphi 2005 and up + property Padding; + {$IFEND} + property ParentBiDiMode; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property TabOrder; + property TabStop; + property Visible; + {$IF CompilerVersion > 15} // For Delphi 2005 and up + property OnAlignInsertBefore; + property OnAlignPosition; + {$IFEND} + property OnCanResize; + property OnClick; + property OnConstrainedResize; + property OnContextPopup; + property OnDockDrop; + property OnDockOver; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnGetSiteInfo; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnResize; + property OnStartDock; + property OnStartDrag; + property OnUnDock; + // TSpTBXCustomPanel properties + property Borders; + property BorderType; + property TBXStyleBackground; + property OnDrawBackground; + end; + + { TSpTBXTextObjectActionLink } + + {$IFNDEF UNICODE} + TSpTBXTextObjectActionLink = class(TControlActionLink) + protected + FUnicodeClient: TSpTBXTextObject; + procedure AssignClient(AClient: TObject); override; + function IsCaptionLinked: Boolean; override; + function IsCheckedLinked: Boolean; override; + function IsHintLinked: Boolean; override; + procedure SetCaption(const Value: String); override; + procedure SetChecked(Value: Boolean); override; + procedure SetHint(const Value: String); override; + procedure SetImageIndex(Value: Integer); override; + end; + {$ELSE} + TSpTBXTextObjectActionLink = class(TControlActionLink); + {$ENDIF} + + { TSpTBXTextObject } + + TSpTBXTextObject = class(TSpTBXCustomControl) + private + FAlignment: TAlignment; + FCaptionGlow: TSpGlowDirection; + FCaptionGlowColor: TColor; + FCaptionRoatationAngle: TSpTextRotationAngle; + FChecked: Boolean; + FDisabledIconCorrection: Boolean; + FDrawPushedCaption: Boolean; + FGlyphLayout: TSpGlyphLayout; + FImages: TCustomImageList; + FImageChangeLink: TChangeLink; + FImageIndex: TImageIndex; + FLinkText: WideString; + FLinkTextParams: WideString; + FMouseInControl: Boolean; + FPushed: Boolean; + FSkinType: TSpTBXSkinType; + FSpaceAsClick: Boolean; + FShowAccelChar: Boolean; + FUpdating: Boolean; + FWrapping: TTextWrapping; + FOnDraw: TSpTBXDrawEvent; + FOnDrawCaption: TSpTBXDrawTextEvent; + FOnDrawHint: TSpTBXDrawHintEvent; + FOnGetImageIndex: TSpTBXGetImageIndexEvent; + FOnMouseEnter: TNotifyEvent; + FOnMouseLeave: TNotifyEvent; + procedure ReadLinkFont(Reader: TReader); // [Backward-Compatibility] + procedure ImageListChange(Sender: TObject); + procedure UpdateTracking(ForceMouseLeave: Boolean = False); + procedure SetAlignment(const Value: TAlignment); + procedure SetCaptionGlow(const Value: TSpGlowDirection); + procedure SetCaptionGlowColor(const Value: TColor); + procedure SetCaptionRoatationAngle(const Value: TSpTextRotationAngle); + procedure SetGlyphLayout(const Value: TSpGlyphLayout); + procedure SetImageIndex(const Value: TImageIndex); + procedure SetImages(const Value: TCustomImageList); + procedure SetSkinType(const Value: TSpTBXSkinType); + procedure SetShowAccelChar(Value: Boolean); + procedure SetWrapping(Value: TTextWrapping); + procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; + procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; + procedure CMHintShow(var Message: TCMHintShow); message CM_HINTSHOW; + procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; + procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; + procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED; + procedure WMEraseBkgnd(var Message: TMessage); message WM_ERASEBKGND; + procedure WMKillFocus(var Message: TMessage); message WM_KILLFOCUS; + procedure WMSetFocus(var Message: TMessage); message WM_SETFOCUS; + procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + protected + // Painting + procedure AdjustFont(AFont: TFont); virtual; + procedure AdjustBounds; + procedure DoDrawHint(AHintBitmap: TBitmap; var AHint: Widestring; var PaintDefault: Boolean); virtual; + function DoDrawItem(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage): Boolean; virtual; + function DoDrawText(ACanvas: TCanvas; var ARect: TRect; Flags: Longint): Integer; virtual; + procedure DoGetImageIndex(var AImageList: TCustomImageList; var AImageIndex: Integer); virtual; + procedure DoInternalGlyphDraw(ACanvas: TCanvas; AGlyphRect: TRect); virtual; + function GetFocusRect(R, TextR, GlyphR: TRect): TRect; virtual; + function GetTextMargins: TRect; virtual; + function IsImageIndexValid: Boolean; + procedure Paint; override; + + // Sizing + function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; override; + procedure DoAdjustBounds(var NewWidth, NewHeight: Integer); virtual; + + // Mouse + function GetFocused: Boolean; virtual; + function GetPushed: Boolean; virtual; + procedure DoMouseEnter; virtual; + procedure DoMouseLeave; virtual; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + procedure KeyUp(var Key: Word; Shift: TShiftState); override; + + // Component + procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override; + procedure CreateParams(var Params: TCreateParams); override; + procedure DefineProperties(Filer: TFiler); override; + procedure ExecuteLink; virtual; + function GetActionLinkClass: TControlActionLinkClass; override; + function GetChecked: Boolean; virtual; + procedure SetChecked(Value: Boolean); virtual; + procedure Loaded; override; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + + property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify; + property AutoSize default True; + property Checked: Boolean read GetChecked write SetChecked default False; + property CaptionGlow: TSpGlowDirection read FCaptionGlow write SetCaptionGlow default gldNone; + property CaptionGlowColor: TColor read FCaptionGlowColor write SetCaptionGlowColor default clYellow; + property CaptionRoatationAngle: TSpTextRotationAngle read FCaptionRoatationAngle write SetCaptionRoatationAngle default tra0; + property DrawPushedCaption: Boolean read FDrawPushedCaption write FDrawPushedCaption default False; + property DisabledIconCorrection: Boolean read FDisabledIconCorrection write FDisabledIconCorrection default True; + property GlyphLayout: TSpGlyphLayout read FGlyphLayout write SetGlyphLayout default ghlGlyphLeft; + property Images: TCustomImageList read FImages write SetImages; + property ImageIndex: TImageIndex read FImageIndex write SetImageIndex default -1; + property LinkText: WideString read FLinkText write FLinkText; + property LinkTextParams: WideString read FLinkTextParams write FLinkTextParams; + property SkinType: TSpTBXSkinType read FSkinType write SetSkinType default sknSkin; + property ShowAccelChar: Boolean read FShowAccelChar write SetShowAccelChar default True; + property SpaceAsClick: Boolean read FSpaceAsClick write FSpaceAsClick default False; + property Wrapping: TTextWrapping read FWrapping write SetWrapping default twNone; + property OnDraw: TSpTBXDrawEvent read FOnDraw write FOnDraw; + property OnDrawCaption: TSpTBXDrawTextEvent read FOnDrawCaption write FOnDrawCaption; + property OnDrawHint: TSpTBXDrawHintEvent read FOnDrawHint write FOnDrawHint; + property OnGetImageIndex: TSpTBXGetImageIndexEvent read FOnGetImageIndex write FOnGetImageIndex; + property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter; + property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave; + property TabStop default True; + property ParentColor default False; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function CanFocus: Boolean; override; + procedure Click; override; + function GetControlsAlignment: TAlignment; override; + procedure GetSize(out TotalR, TextR, GlyphR: TRect); virtual; + function GetTextFlags: Cardinal; + function GetGlyphSize: TSize; virtual; + property Canvas; + property MouseInControl: Boolean read FMouseInControl; + property Pushed: Boolean read GetPushed; + published + property Caption; + property Hint; + property Color default clNone; + end; + + { TSpTBXLabel } + + TSpTBXCustomLabel = class(TSpTBXTextObject) + private + FFocusControl: TWinControl; + FUnderline: Boolean; + FUnderlineColor: TColor; + procedure SetFocusControl(const Value: TWinControl); + procedure SetUnderline(const Value: Boolean); + procedure SetUnderlineColor(const Value: TColor); + procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; + protected + procedure AdjustFont(AFont: TFont); override; + function DoDrawItem(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage): Boolean; override; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + property FocusControl: TWinControl read FFocusControl write SetFocusControl; + property Underline: Boolean read FUnderline write SetUnderline default False; + property UnderlineColor: TColor read FUnderlineColor write SetUnderlineColor default clBtnShadow; + public + constructor Create(AOwner: TComponent); override; + procedure GetSize(out TotalR: TRect; out TextR: TRect; out GlyphR: TRect); override; + end; + + TSpTBXLabel = class(TSpTBXCustomLabel) + published + property Action; + property Align; + property Anchors; + property AutoSize; + property BiDiMode; + property Color; + property Constraints; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + property ParentBiDiMode; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowAccelChar; + property ShowHint; + property Visible; + property Wrapping; + property OnClick; + property OnContextPopup; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnMouseDown; + property OnMouseEnter; + property OnMouseLeave; + property OnMouseMove; + property OnMouseUp; + property OnStartDock; + property OnStartDrag; + // TSpTBXCustomLabel properties + property Alignment; + property CaptionGlow; + property CaptionGlowColor; + property FocusControl; + property GlyphLayout; + property Images; + property ImageIndex; + property LinkText; + property LinkTextParams; + property SkinType; + property Underline; + property UnderlineColor; + property OnDraw; + property OnDrawCaption; + property OnDrawHint; + property OnGetImageIndex; + end; + + { TSpTBXButtonControl } + + TSpTBXButtonControl = class(TSpTBXTextObject) + private + FAllowAllUp: Boolean; + FGroupIndex: Integer; + FStateChanged: Boolean; + procedure SetAllowAllUp(const Value: Boolean); + procedure SetGroupIndex(const Value: Integer); + procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; + procedure CMSPGroupIndexUpdate(var Message: TMessage); message CM_SPGROUPINDEXUPDATE; + protected + function CanUpdateExclusive: Boolean; virtual; + procedure SetChecked(Value: Boolean); override; + procedure UpdateExclusive; + property AllowAllUp: Boolean read FAllowAllUp write SetAllowAllUp default False; + property GroupIndex: Integer read FGroupIndex write SetGroupIndex default 0; + property StateChanged: Boolean read FStateChanged write FStateChanged; + public + constructor Create(AOwner: TComponent); override; + function CanFocus: Boolean; override; + end; + + { TSpTBXCheckBox } + + TSpTBXCustomCheckButton = class(TSpTBXButtonControl) + protected + procedure Toggle; virtual; + public + function GetGlyphSize: TSize; override; + procedure GetSize(out TotalR, TextR, GlyphR: TRect); override; + end; + + TSpTBXCustomCheckBox = class(TSpTBXCustomCheckButton) + private + FAllowGrayed: Boolean; + FState: TCheckBoxState; + procedure SetState(const Value: TCheckBoxState); + protected + procedure AdjustFont(AFont: TFont); override; + procedure DoInternalGlyphDraw(ACanvas: TCanvas; AGlyphRect: TRect); override; + function GetChecked: Boolean; override; + procedure SetChecked(Value: Boolean); override; + procedure Toggle; override; + property AllowGrayed: Boolean read FAllowGrayed write FAllowGrayed default False; + property State: TCheckBoxState read FState write SetState default cbUnchecked; + public + constructor Create(AOwner: TComponent); override; + procedure Click; override; + end; + + TSpTBXCheckBox = class(TSpTBXCustomCheckBox) + published + property Action; + property Align; + property Anchors; + property AutoSize; + property BiDiMode; + property Color; + property Constraints; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + property ParentBiDiMode; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowAccelChar; + property ShowHint; + property TabOrder; + property TabStop; + property Visible; + property Wrapping; + property OnClick; + property OnContextPopup; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnMouseDown; + property OnMouseEnter; + property OnMouseLeave; + property OnMouseMove; + property OnMouseUp; + property OnStartDock; + property OnStartDrag; + // TSpTBXCustomCheckBox properties + property Alignment; + property AllowGrayed; + property CaptionGlow; + property CaptionGlowColor; + property Checked; + property State; + property SkinType; + property OnDraw; + property OnDrawCaption; + property OnDrawHint; + property OnGetImageIndex; + end; + + { TSpTBXRadioButton } + + TSpTBXCustomRadioButton = class(TSpTBXCustomCheckButton) + private + procedure CMFocusChanged(var Message: TCMFocusChanged); message CM_FOCUSCHANGED; + protected + procedure AdjustFont(AFont: TFont); override; + function CanUpdateExclusive: Boolean; override; + procedure DoInternalGlyphDraw(ACanvas: TCanvas; AGlyphRect: TRect); override; + procedure SetChecked(Value: Boolean); override; + procedure Toggle; override; + property TabStop default False; + public + constructor Create(AOwner: TComponent); override; + procedure Click; override; + end; + + TSpTBXRadioButton = class(TSpTBXCustomRadioButton) + published + property Action; + property Align; + property Anchors; + property AutoSize; + property BiDiMode; + property Color; + property Constraints; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + property ParentBiDiMode; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowAccelChar; + property ShowHint; + property TabOrder; + property TabStop; + property Visible; + property Wrapping; + property OnClick; + property OnContextPopup; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnMouseDown; + property OnMouseEnter; + property OnMouseLeave; + property OnMouseMove; + property OnMouseUp; + property OnStartDock; + property OnStartDrag; + // TSpTBXCustomRadioButton properties + property Alignment; + property CaptionGlow; + property CaptionGlowColor; + property Checked; + property GroupIndex; + property SkinType; + property OnDraw; + property OnDrawCaption; + property OnDrawHint; + property OnGetImageIndex; + end; + + { TSpTBXRadioGroup } + + TSpTBXCustomRadioGroup = class(TSpTBXCustomGroupBox) + private + FButtons: TList; + FItems: TTntStrings; + FItemIndex: Integer; + FColumns: Integer; + FReading: Boolean; + FUpdating: Boolean; + function GetButtons(Index: Integer): TSpTBXRadioButton; + procedure ArrangeButtons; + procedure ButtonClick(Sender: TObject); + procedure ItemsChange(Sender: TObject); + procedure SetButtonCount(Value: Integer); + procedure SetColumns(Value: Integer); + procedure SetItemIndex(Value: Integer); + procedure SetItems(Value: TTntStrings); + procedure UpdateButtons; + procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; + procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; + procedure WMSize(var Message: TWMSize); message WM_SIZE; + protected + procedure Loaded; override; + procedure ReadState(Reader: TReader); override; + property Columns: Integer read FColumns write SetColumns default 1; + property ItemIndex: Integer read FItemIndex write SetItemIndex default -1; + property Items: TTntStrings read FItems write SetItems; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; + procedure FlipChildren(AllLevels: Boolean); override; + procedure InvalidateBackground(InvalidateChildren: Boolean = True); override; + procedure SetFocus; override; + property Buttons[Index: Integer]: TSpTBXRadioButton read GetButtons; + end; + + TSpTBXRadioGroup = class(TSpTBXCustomRadioGroup) + published + property Align; + property Anchors; + property BiDiMode; + property Color; + property Constraints; + property UseDockManager; + property DockSite; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + property ParentBiDiMode; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property TabOrder; + property TabStop; + property Visible; + property OnCanResize; + property OnClick; + property OnConstrainedResize; + property OnContextPopup; + property OnDockDrop; + property OnDockOver; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnGetSiteInfo; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnResize; + property OnStartDock; + property OnStartDrag; + property OnUnDock; + // TSpTBXCustomPanel properties + property Borders; + property BorderType; + property TBXStyleBackground; + property OnDrawBackground; + // TSpTBXCustomRadioGroup properties + property Columns; + property ItemIndex; + property Items; + end; + + { TSpTBXButton } + + TSpTBXCustomButton = class(TSpTBXButtonControl) + private + FBitmap: TBitmap; + FBitmapTransparent: Boolean; + FActive: Boolean; + FCancel: Boolean; + FDefault: Boolean; + FDropDownArrow: Boolean; + FDropDownMenu: TPopupMenu; + FDropDownMenuVisible: Boolean; + FFlat: Boolean; + FModalResult: TModalResult; + FRepeating: Boolean; + FRepeatTimer: TTimer; + FToolbarStyle: Boolean; + procedure BitmapChanged(Sender: TObject); + procedure RepeatTimerHandler(Sender: TObject); + procedure SetBitmap(const Value: TBitmap); + procedure SetDefault(const Value: Boolean); + procedure SetDropDownArrow(const Value: Boolean); + procedure SetDropdownMenu(Value: TPopupMenu); + procedure SetFlat(const Value: Boolean); + procedure CMDialogKey(var Message: TCMDialogKey); message CM_DIALOGKEY; + procedure CMFocusChanged(var Message: TCMFocusChanged); message CM_FOCUSCHANGED; + procedure CMSPPopupClose(var Message: TMessage); message CM_SPPOPUPCLOSE; + procedure WMCancelMode(var Message: TWMCancelMode); message WM_CANCELMODE; + protected + FPopupControl: TControl; + procedure CreateWnd; override; + procedure AdjustFont(AFont: TFont); override; + function BitmapValid: boolean; + function DoDrawDropDownArrow(ACanvas: TCanvas; ARect: TRect): Boolean; virtual; + function DoDrawItem(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage): Boolean; override; + function GetFocused: Boolean; override; + function GetFocusRect(R, TextR, GlyphR: TRect): TRect; override; + function GetInternalDropDownMenu: TPopupMenu; virtual; + function GetPushed: Boolean; override; + function GetTextMargins: TRect; override; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + property Alignment default taCenter; + property Bitmap: TBitmap read FBitmap write SetBitmap; + property BitmapTransparent: Boolean read FBitmapTransparent write FBitmapTransparent default True; + property DrawPushedCaption default True; + property Cancel: Boolean read FCancel write FCancel default False; + property Default: Boolean read FDefault write SetDefault default False; + property DropDownArrow: Boolean read FDropDownArrow write SetDropDownArrow default True; + property DropDownMenu: TPopupMenu read FDropDownMenu write SetDropDownMenu; + property Flat: Boolean read FFlat write SetFlat default False; + property ModalResult: TModalResult read FModalResult write FModalResult default 0; + property Repeating: Boolean read FRepeating write FRepeating default False; + property ToolbarStyle: Boolean read FToolbarStyle write FToolbarStyle default False; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Click; override; + function GetSkinStateRect: TRect; + function IsDroppedDown: Boolean; + procedure StopRepeat; virtual; + end; + + TSpTBXButton = class(TSpTBXCustomButton) + published + property Action; + property Align; + property Anchors; + property BiDiMode; + property Color; + property Constraints; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + property ParentBiDiMode; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowAccelChar; + property ShowHint; + property TabOrder; + property TabStop; + property Visible; + property Wrapping; + property OnClick; + property OnContextPopup; + // property OnDblClick; Buttons don't have OnDblClick events + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnMouseDown; + property OnMouseEnter; + property OnMouseLeave; + property OnMouseMove; + property OnMouseUp; + property OnStartDock; + property OnStartDrag; + // TSpTBXCustomButton properties + property Alignment; + property Bitmap; + property BitmapTransparent; + property Cancel; + property CaptionGlow; + property CaptionGlowColor; + property Checked; + property Default; + property DrawPushedCaption; + property DropDownArrow; + property DropDownMenu; + property Flat; + property GlyphLayout; + property GroupIndex; + property Images; + property ImageIndex; + property LinkText; + property LinkTextParams; + property ModalResult; + property SkinType; + property Repeating; + property OnDraw; + property OnDrawCaption; + property OnDrawHint; + property OnGetImageIndex; + end; + + { TSpTBXSpeedButton } + + TSpTBXCustomSpeedButton = class(TSpTBXCustomButton) + public + constructor Create(AOwner: TComponent); override; + function CanFocus: Boolean; override; + procedure Click; override; + end; + + TSpTBXSpeedButton = class(TSpTBXCustomSpeedButton) + published + property Action; + property Align; + property Anchors; + property BiDiMode; + property Color; + property Constraints; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + property ParentBiDiMode; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowAccelChar; + property ShowHint; + // property TabOrder; SpeedButtons don't have TabStops + // property TabStop; SpeedButtons don't have TabStops + property Visible; + property Wrapping; + property OnClick; + property OnContextPopup; + // property OnDblClick; SpeedButtons don't have OnDblClick events + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnMouseDown; + property OnMouseEnter; + property OnMouseLeave; + property OnMouseMove; + property OnMouseUp; + property OnStartDock; + property OnStartDrag; + // TSpTBXCustomButton properties + property Alignment; + property AllowAllUp; + property Bitmap; + property BitmapTransparent; + property Cancel; + property CaptionGlow; + property CaptionGlowColor; + property Checked; + property Default; + property DrawPushedCaption; + property DropDownArrow; + property DropDownMenu; + property Flat; + property GlyphLayout; + property GroupIndex; + property Images; + property ImageIndex; + property LinkText; + property LinkTextParams; + property SkinType; + property Repeating; + property OnDraw; + property OnDrawCaption; + property OnDrawHint; + property OnGetImageIndex; + end; + + { TSpTBXProgressBar } + + TSpTBXProgressBarChangeEvent = procedure(Sender: TObject; NewPosition: Integer) of object; + + TSpTBXCustomProgressBar = class(TSpTBXTextObject) + private + FMin: Integer; + FMax: Integer; + FPosition: Integer; + FProgressVisible: Boolean; + FSmooth: Boolean; + FVertical: Boolean; + FCaptionType: TSpTBXProgressCaption; + FOnProgressChange: TSpTBXProgressBarChangeEvent; + procedure SetMax(const Value: integer); + procedure SetMin(const Value: integer); + procedure SetPosition(Value: integer); + procedure SetSmooth(const Value: Boolean); + procedure SetVertical(const Value: Boolean); + procedure SetCaptionType(const Value: TSpTBXProgressCaption); + procedure SetProgressVisible(const Value: Boolean); + protected + procedure AdjustFont(AFont: TFont); override; + function DoDrawItem(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage): Boolean; override; + procedure DoProgressChange; virtual; + function GetTextMargins: TRect; override; + property Alignment default taCenter; + property CaptionGlow default gldAll; + property CaptionType: TSpTBXProgressCaption read FCaptionType write SetCaptionType default pctPercentage; + property Max: Integer read FMax write SetMax default 100; + property Min: Integer read FMin write SetMin default 0; + property Position: Integer read FPosition write SetPosition default 0; + property ProgressVisible: Boolean read FProgressVisible write SetProgressVisible default True; + property Smooth: Boolean read FSmooth write SetSmooth default False; + property Vertical: Boolean read FVertical write SetVertical default False; + property OnProgressChange: TSpTBXProgressBarChangeEvent read FOnProgressChange write FOnProgressChange; + public + constructor Create(AOwner: TComponent); override; + procedure StepIt(Delta: Integer = 1); + end; + + TSpTBXProgressBar = class(TSpTBXCustomProgressBar) + published + property Align; + property Anchors; + property Color; + property Constraints; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property Visible; + property OnClick; + property OnContextPopup; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnMouseDown; + property OnMouseEnter; + property OnMouseLeave; + property OnMouseMove; + property OnMouseUp; + property OnStartDock; + property OnStartDrag; + // TSpTBXCustomProgressBar properties + property Alignment; + property CaptionGlow; + property CaptionGlowColor; + property CaptionType; + property Max; + property Min; + property Position; + property Smooth; + property Vertical; + property SkinType; + property OnDraw; + property OnDrawCaption; + property OnDrawHint; + property OnProgressChange; + end; + + { TSpTBXTrackBar } + + TSpTBXTrackBar = class(TTrackBar) + private + FSkinType: TSpTBXSkinType; + FTickMarks: TSpTBXTickMark; + FOnDrawChannel: TSpTBXDrawEvent; + FOnDrawChannelTicks: TSpTBXDrawPosEvent; + FOnDrawThumb: TSpTBXDrawEvent; + FCanDrawChannelSelection: Boolean; + procedure SetSkinType(const Value: TSpTBXSkinType); + procedure SetTickMarks(const Value: TSpTBXTickMark); + procedure CMSpTBXControlsInvalidate(var Message: TMessage); message CM_SPTBXCONTROLSINVALIDATE; + procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; + procedure WMEraseBkGnd(var Message: TMessage); message WM_ERASEBKGND; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + protected + procedure CreateParams(var Params: TCreateParams); override; + function DoDrawChannel(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage): Boolean; virtual; + function DoDrawChannelTicks(ACanvas: TCanvas; X, Y: Integer): Boolean; virtual; + function DoDrawThumb(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage): Boolean; virtual; + procedure DrawTicks(ACanvas: TCanvas); virtual; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function ChannelRect: TRect; + function MouseInThumb: Boolean; + procedure InvalidateBackground; + published + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property SkinType: TSpTBXSkinType read FSkinType write SetSkinType default sknSkin; + property TickMarks: TSpTBXTickMark read FTickMarks write SetTickMarks default tmxBottomRight; + property OnDrawChannel: TSpTBXDrawEvent read FOnDrawChannel write FOnDrawChannel; + property OnDrawChannelTicks: TSpTBXDrawPosEvent read FOnDrawChannelTicks write FOnDrawChannelTicks; + property OnDrawThumb: TSpTBXDrawEvent read FOnDrawThumb write FOnDrawThumb; + end; + +{ Painting helpers } +procedure SpDrawXPPanel(ACanvas: TCanvas; ARect: TRect; Enabled, TBXStyleBackground: Boolean; SkinType: TSpTBXSkinType; Border: TSpTBXPanelBorder); +procedure SpDrawXPPanelBorder(ACanvas: TCanvas; ARect: TRect; Border: TSpTBXPanelBorder); +procedure SpDrawXPGroupBox(ACanvas: TCanvas; ARect: TRect; ACaption: WideString; TextFlags: Cardinal; Enabled, TBXStyleBackground: Boolean; SkinType: TSpTBXSkinType); +procedure SpDrawXPProgressBar(ACanvas: TCanvas; ARect: TRect; Min, Max, Position: Integer; Back, Fore: TBitmap); overload; +function SpDrawXPProgressBar(ACanvas: TCanvas; ARect: TRect; Vertical, Smooth, DrawProgress: Boolean; Min, Max, Position: Integer; SkinType: TSpTBXSkinType): Integer; overload; +procedure SpDrawXPTrackBar(ACanvas: TCanvas; ARect: TRect; Part: Cardinal; Vertical, Pushed, ChannelSelection: Boolean; TickMark: TSpTBXTickMark; Min, Max, SelStart, SelEnd: Integer; SkinType: TSpTBXSkinType); +procedure SpInvalidateSpTBXControl(AControl: TWinControl; InvalidateChildren, OnlySpTBXControls: Boolean); + +implementation + +uses + Themes, UxTheme, + {$IFNDEF UNICODE} TntActnList, {$ENDIF} + CommCtrl, ShellAPI; +type + TWinControlAccess = class(TWinControl); + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Helpers } + +procedure SpDrawXPPanel(ACanvas: TCanvas; ARect: TRect; Enabled, TBXStyleBackground: Boolean; + SkinType: TSpTBXSkinType; Border: TSpTBXPanelBorder); +var + Flags: Integer; +begin + case SpTBXSkinType(SkinType) of + sknWindows: + begin + if Enabled then Flags := GBS_NORMAL + else Flags := GBS_DISABLED; + DrawThemeBackground(ThemeServices.Theme[teButton], ACanvas.Handle, BP_GROUPBOX, Flags, ARect, nil); + end; + sknNone: + SpDrawXPPanelBorder(ACanvas, ARect, Border); + sknSkin: + CurrentSkin.PaintBackground(ACanvas, ARect, skncPanel, sknsNormal, TBXStyleBackground, True); + end; +end; + +procedure SpDrawXPPanelBorder(ACanvas: TCanvas; ARect: TRect; Border: TSpTBXPanelBorder); +const + Edge: array [TSpTBXPanelBorder] of Cardinal = (BDR_RAISEDINNER, EDGE_RAISED, + BDR_SUNKENOUTER, EDGE_SUNKEN, EDGE_BUMP, EDGE_ETCHED, 0); +begin + if Border = pbrFramed then begin + ACanvas.Brush.Color := clBtnFace; + ACanvas.FrameRect(ARect); + end + else + DrawEdge(ACanvas.Handle, ARect, Edge[Border], BF_RECT); +end; + +procedure SpDrawXPGroupBox(ACanvas: TCanvas; ARect: TRect; ACaption: WideString; + TextFlags: Cardinal; Enabled, TBXStyleBackground: Boolean; SkinType: TSpTBXSkinType); +var + Width, Flags, SaveIndex: Integer; + R: TRect; + CaptionRect: TRect; +begin + Flags := 0; + SkinType := SpTBXSkinType(SkinType); + Width := ARect.Right - ARect.Left; + + if ACaption <> '' then begin + CaptionRect := Rect(0, 0, 1, 1); + + if Enabled then Flags := GBS_NORMAL + else Flags := GBS_DISABLED; + if SkinType = sknWindows then + GetThemeTextExtent(ThemeServices.Theme[teButton], ACanvas.Handle, BP_GROUPBOX, Flags, + PWideChar(ACaption), Length(ACaption), DT_LEFT, nil, CaptionRect) + else + SpDrawXPText(ACanvas, ACaption, CaptionRect, TextFlags or DT_CALCRECT); + + if (TextFlags and DT_RTLREADING) = 0 then + OffsetRect(CaptionRect, 8, 0) + else + OffsetRect(CaptionRect, Width - 8 - CaptionRect.Right, 0); + end + else + CaptionRect := Rect(0, 0, 0, 0); + + R := ARect; + R.Top := (CaptionRect.Bottom - CaptionRect.Top) div 2; + SaveIndex := SaveDC(ACanvas.Handle); + with CaptionRect do + ExcludeClipRect(ACanvas.Handle, Left, Top, Right, Bottom); + try + SpDrawXPPanel(ACanvas, R, Enabled, TBXStyleBackground, SkinType, pbrEtched); + finally + RestoreDC(ACanvas.Handle, SaveIndex); + end; + + if ACaption <> '' then begin + case SkinType of + sknNone: + SpDrawXPText(ACanvas, ACaption, CaptionRect, TextFlags); + sknWindows: + DrawThemeText(ThemeServices.Theme[teButton], ACanvas.Handle, BP_GROUPBOX, Flags, PWideChar(ACaption), -1, TextFlags, 0, CaptionRect); + sknSkin: + begin + if CurrentSkin.Options(skncPanel, sknsNormal).TextColor <> clNone then + ACanvas.Font.Color := CurrentSkin.Options(skncPanel, sknsNormal).TextColor; + SpDrawXPText(ACanvas, ACaption, CaptionRect, TextFlags); + end; + end; + end; +end; + +procedure SpDrawXPProgressBar(ACanvas: TCanvas; ARect: TRect; + Min, Max, Position: Integer; Back, Fore: TBitmap); +var + Percent, Delta: Integer; + DeltaR, R: TRect; +begin + if Position < Min then Position := Min + else if Position > Max then Position := Max; + + // Get the delta + if (Max > Min) and (Position > Min) then begin + Percent := (Position * 100) div (Max - Min); + DeltaR := ARect; + R := Rect(0, 0, Back.Width, Back.Height); + if Back.Height > Back.Width then begin + Delta := (Back.Height * Percent) div 100; + DeltaR.Bottom := DeltaR.Top + Delta; + R.Bottom := R.Top + Delta; + end + else begin + Delta := (Back.Width * Percent) div 100; + DeltaR.Right := DeltaR.Left + Delta; + R.Right := R.Left + Delta; + end; + end + else + Delta := 0; + + ACanvas.Draw(ARect.Left, ARect.Top, Back); + if Delta > 0 then + ACanvas.CopyRect(DeltaR, Fore.Canvas, R); +end; + +function SpDrawXPProgressBar(ACanvas: TCanvas; ARect: TRect; + Vertical, Smooth, DrawProgress: Boolean; Min, Max, Position: Integer; + SkinType: TSpTBXSkinType): Integer; +const + PartID: array [Boolean] of Integer = (PP_BAR, PP_BARVERT); + VistaPartID: array [Boolean] of Integer = (5, 6); // PP_FILL, PP_FILLVERT + ChunkID: array [Boolean] of Integer = (PP_CHUNK, PP_CHUNKVERT); +var + ChunkPaint: Boolean; + I: Integer; + DeltaR, R: TRect; + B: TBitmap; + Percentage: Double; +begin + Result := 0; + ChunkPaint := False; + if Position < Min then Position := Min + else if Position > Max then Position := Max; + SkinType := SpTBXSkinType(SkinType); + + // Get the delta + if (Max > Min) and (Position > Min) then begin + DeltaR := ARect; + case SkinType of + sknWindows: + if not SpIsWinVistaOrUp then + if Vertical then InflateRect(DeltaR, -3, -4) + else InflateRect(DeltaR, -4, -3); + sknNone: InflateRect(DeltaR, -2, -2); + end; + // Cast Position to a Double real type, otherwise Percentage * 100 + // returns a negative value, e.g. 30000000 * 100 + Percentage := Position; + Percentage := (Percentage * 100) / (Max - Min); + Result := Round(Percentage); + if Vertical then + DeltaR.Top := DeltaR.Bottom - (((DeltaR.Bottom - DeltaR.Top) * Result) div 100) + else + DeltaR.Right := DeltaR.Left + (((DeltaR.Right - DeltaR.Left) * Result) div 100); + end + else + DeltaR := Rect(0, 0, 0, 0); + + B := TBitmap.Create; + try + case SkinType of + sknWindows: + begin + DrawThemeBackground(ThemeServices.Theme[teProgress], ACanvas.Handle, PartID[Vertical], 0, ARect, nil); + if DrawProgress and not IsRectEmpty(DeltaR) then begin + if SpIsWinVistaOrUp then + DrawThemeBackground(ThemeServices.Theme[teProgress], ACanvas.Handle, VistaPartID[Vertical], 1, DeltaR, nil) + else begin + // [Theme-Change] + // Another Windows API bug, Windows XP progress bar chunks are 8 x 11, + // but DrawThemeBackground draws 10 x 11 chunks. We must draw the chunks manually. + if Vertical then begin + B.Width := DeltaR.Right - DeltaR.Left; + B.Height := 8; + R := Rect(0, 2, B.Width, B.Height); + end + else begin + B.Width := 8; + B.Height := DeltaR.Bottom - DeltaR.Top; + R := Rect(0, 0, B.Width - 2, B.Height); + end; + DrawThemeBackground(ThemeServices.Theme[teProgress], B.Canvas.Handle, ChunkID[Vertical], 0, R, nil); + ChunkPaint := True; + end; + end; + end; + sknNone: + begin + DrawEdge(ACanvas.Handle, ARect, BDR_SUNKENOUTER, BF_RECT); + if DrawProgress and not IsRectEmpty(DeltaR) then + if Smooth then begin + ACanvas.Brush.Color := clHighlight; + ACanvas.FillRect(DeltaR); + end + else begin + // Chunks are 10 x 13 + if Vertical then begin + B.Width := DeltaR.Right - DeltaR.Left; + B.Height := 10; + R := Rect(0, 2, B.Width, B.Height); + end + else begin + B.Width := 10; + B.Height := DeltaR.Bottom - DeltaR.Top; + R := Rect(0, 0, B.Width - 2, B.Height); + end; + B.Canvas.Brush.Color := clBtnFace; + B.Canvas.FillRect(Rect(0, 0, B.Width, B.Height)); + B.Canvas.Brush.Color := clHighlight; + B.Canvas.FillRect(R); + ChunkPaint := True; + end; + end; + sknSkin: + begin + CurrentSkin.PaintBackground(ACanvas, ARect, skncProgressBar, sknsNormal, True, True); + if DrawProgress and not IsRectEmpty(DeltaR) then begin + B.Width := ARect.Right - ARect.Left; + B.Height := ARect.Bottom - ARect.Top; + R := Rect(0, 0, B.Width, B.Height); + B.Canvas.CopyRect(R, ACanvas, ARect); // B is transparent + + CurrentSkin.PaintBackground(B.Canvas, R, skncProgressBar, sknsHotTrack, True, True); + + if Vertical then + R.Top := R.Bottom - (DeltaR.Bottom - DeltaR.Top) + else + R.Right := DeltaR.Right - DeltaR.Left; + ACanvas.CopyRect(DeltaR, B.Canvas, R); + end; + end; + end; + + if ChunkPaint then begin + if Vertical then begin + ExcludeClipRect(ACanvas.Handle, ARect.Left, ARect.Top, ARect.Right, ARect.Top + 2); + I := DeltaR.Bottom - B.Height; + while I > DeltaR.Top - B.Height do begin + ACanvas.Draw(DeltaR.Left, I, B); + Dec(I, B.Height); + end; + end + else begin + ExcludeClipRect(ACanvas.Handle, ARect.Right - 2, ARect.Top, ARect.Right, ARect.Bottom); + I := DeltaR.Left; + while I < DeltaR.Right do begin + ACanvas.Draw(I, DeltaR.Top, B); + Inc(I, B.Width); + end; + end; + SelectClipRgn(ACanvas.Handle, 0); + end; + finally + B.Free; + end; +end; + +procedure SpDrawXPTrackBar(ACanvas: TCanvas; ARect: TRect; Part: Cardinal; + Vertical, Pushed, ChannelSelection: Boolean; TickMark: TSpTBXTickMark; + Min, Max, SelStart, SelEnd: Integer; SkinType: TSpTBXSkinType); +var + Flags: Integer; + + procedure DrawChannelSelection(ChannelR: TRect); + var + I: Integer; + Step : Single; + begin + if not ChannelSelection then Exit; + I := Max - Min; + if (I > 0) and (SelEnd > SelStart) then begin + if SkinType = sknSkin then + InflateRect(ChannelR, -2, -2) + else + InflateRect(ChannelR, -1, -1); + Step := (ChannelR.Right - ChannelR.Left) / I; + ChannelR.Right := ChannelR.Left + Round(SelEnd * Step); + ChannelR.Left := ChannelR.Left + Round(SelStart * Step); + + if SkinType = sknSkin then + CurrentSkin.PaintBackground(ACanvas, ChannelR, skncTrackBar, sknsHotTrack, True, True) + else begin + ACanvas.Brush.Color := clHighlight; + ACanvas.FillRect(ChannelR); + end; + end; + end; + +begin + SkinType := SpTBXSkinType(SkinType); + case SkinType of + sknWindows: + if Part = TBCD_THUMB then begin + if Pushed then Flags := TUS_HOT + else Flags := TUS_NORMAL; + Case TickMark of + tmxBottomRight: + if Vertical then Part := TKP_THUMBRIGHT + else Part := TKP_THUMBBOTTOM; + tmxTopLeft: + if Vertical then Part := TKP_THUMBLEFT + else Part := TKP_THUMBTOP; + tmxBoth, tmxCenter: + if Vertical then Part := TKP_THUMBVERT + else Part := TKP_THUMB; + end; + DrawThemeBackground(ThemeServices.Theme[teTrackBar], ACanvas.Handle, Part, Flags, ARect, nil); + end + else if Part = TBCD_CHANNEL then begin + if Vertical then Part := TKP_TRACKVERT + else Part := TKP_TRACK; + DrawThemeBackground(ThemeServices.Theme[teTrackBar], ACanvas.Handle, Part, TKS_NORMAL, ARect, nil); + DrawChannelSelection(ARect); + end; + sknNone: + if Part = TBCD_THUMB then begin + ACanvas.Brush.Color := clBtnFace; + ACanvas.FillRect(ARect); + DrawFrameControl(ACanvas.Handle, ARect, DFC_BUTTON, DFCS_BUTTONPUSH); + end + else if Part = TBCD_CHANNEL then begin + ACanvas.Brush.Color := clWindow; + ACanvas.FillRect(ARect); + ExtCtrls.Frame3D(ACanvas, ARect, clBtnShadow, clBtnHighlight, 1); + ExtCtrls.Frame3D(ACanvas, ARect, cl3DDkShadow, clBtnFace, 1); + DrawChannelSelection(ARect); + end; + sknSkin: + if Part = TBCD_THUMB then begin + if Pushed then + CurrentSkin.PaintBackground(ACanvas, ARect, skncTrackBarButton, sknsPushed, True, True) + else + CurrentSkin.PaintBackground(ACanvas, ARect, skncTrackBarButton, sknsNormal, True, True); + end + else if Part = TBCD_CHANNEL then begin + CurrentSkin.PaintBackground(ACanvas, ARect, skncTrackBar, sknsNormal, True, True); + DrawChannelSelection(ARect); + end; + end; +end; + +procedure SpInvalidateSpTBXControl(AControl: TWinControl; InvalidateChildren, OnlySpTBXControls: Boolean); +var + I: Integer; + ChildW: TWinControl; +begin + // Invalidate will not fire WM_ERASEBKGND, because csOpaque is setted + if Assigned(AControl) and not (csDestroying in AControl.ComponentState) and AControl.HandleAllocated then + begin + if InvalidateChildren then begin + if OnlySpTBXControls then begin + RedrawWindow(AControl.Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE); + // Only invalidate SpTBXControls + for I := 0 to AControl.ControlCount - 1 do + if Assigned(AControl.Controls[I]) and (AControl.Controls[I] is TWinControl) then begin + ChildW := AControl.Controls[I] as TWinControl; + if ChildW is TSpTBXTextObject then + RedrawWindow(ChildW.Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE) + else + PostMessage(ChildW.Handle, CM_SPTBXCONTROLSINVALIDATE, ChildW.Width, ChildW.Height); + end; + end + else + RedrawWindow(AControl.Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN); + end + else + RedrawWindow(AControl.Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE); + end; +end; + +procedure ApplyMargins(var R: TRect; const Margins: TRect); overload; +begin + with Margins do begin + Inc(R.Left, Left); Inc(R.Top, Top); + Dec(R.Right, Right); Dec(R.Bottom, Bottom); + end; +end; + +function GetRealAlignment(Control: TControl): TAlignment; +const + ReverseAlignment: array [TAlignment] of TAlignment = (taRightJustify, taLeftJustify, taCenter); +begin + Result := Control.GetControlsAlignment; + if Control.UseRightToLeftAlignment then Result := ReverseAlignment[Result]; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomPanel } + +constructor TSpTBXCustomPanel.Create(AOwner: TComponent); +begin + inherited; + ControlStyle := ControlStyle + [csAcceptsControls]; + + FBackground := TBitmap.Create; + + FBorders := True; + FBorderType := pbrEtched; + FSkinType := sknSkin; + Color := clNone; + ParentColor := False; + SkinManager.AddSkinNotification(Self); +end; + +destructor TSpTBXCustomPanel.Destroy; +begin + FreeAndNil(FBackground); + SkinManager.RemoveSkinNotification(Self); + inherited; +end; + +procedure TSpTBXCustomPanel.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + if not (csDesigning in ComponentState) then begin + with Params do + Style := Style or WS_CLIPCHILDREN; + with Params.WindowClass do + Style := Style and not (CS_HREDRAW or CS_VREDRAW); + end; +end; + +procedure TSpTBXCustomPanel.AdjustClientRect(var Rect: TRect); +begin + inherited AdjustClientRect(Rect); + if Borders then + InflateRect(Rect, -2, -2); +end; + +procedure TSpTBXCustomPanel.InvalidateBackground(InvalidateChildren: Boolean); +begin + // Force background repaint + if Assigned(FBackground) then + FBackground.Width := 1; + SpInvalidateSpTBXControl(Self, InvalidateChildren, True); +end; + +procedure TSpTBXCustomPanel.SetBorders(const Value: Boolean); +begin + if FBorders <> Value then begin + FBorders := Value; + Realign; + InvalidateBackground; + end; +end; + +procedure TSpTBXCustomPanel.SetBorderType(const Value: TSpTBXPanelBorder); +begin + if FBorderType <> Value then begin + FBorderType := Value; + InvalidateBackground; + end; +end; + +procedure TSpTBXCustomPanel.SetSkinType(const Value: TSpTBXSkinType); +begin + if Value <> FSkinType then begin + FSkinType := Value; + InvalidateBackground(False); + end; +end; + +procedure TSpTBXCustomPanel.SetTBXStyleBackground(const Value: Boolean); +begin + if FTBXStyleBackground <> Value then begin + FTBXStyleBackground := Value; + InvalidateBackground; + end; +end; + +procedure TSpTBXCustomPanel.DoDrawBackground(ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +begin + if Assigned(FOnDrawBackground) then FOnDrawBackground(Self, ACanvas, ARect, + PaintStage, PaintDefault); +end; + +procedure TSpTBXCustomPanel.DrawBackground(ACanvas: TCanvas; ARect: TRect); +begin + SpDrawXPPanel(ACanvas, ARect, True, FTBXStyleBackground, FSkinType, FBorderType); +end; + +procedure TSpTBXCustomPanel.CMFontChanged(var Message: TMessage); +begin + inherited; + InvalidateBackground(False); +end; + +procedure TSpTBXCustomPanel.CMSpTBXControlsInvalidate(var Message: TMessage); +begin + InvalidateBackground; + Message.Result := 1; +end; + +procedure TSpTBXCustomPanel.WMEraseBkgnd(var Message: TMessage); +var + R, R2: TRect; + PaintDefault: Boolean; + ACanvas: TCanvas; +begin + Message.Result := 1; + + if (not DoubleBuffered or (Message.wParam = Message.lParam)) and + not (csDestroying in ComponentState) and Assigned(FBackground) then + begin + ACanvas := TCanvas.Create; + try + ACanvas.Handle := TWMEraseBkgnd(Message).DC; + R := ClientRect; + + if (FBackground.Width = R.Right) and (FBackground.Height = R.Bottom) and not Assigned(FOnDrawBackground) then + ACanvas.Draw(R.Left, R.Top, FBackground) + else begin + FBackground.Width := R.Right; + FBackground.Height := R.Bottom; + + if (Color = clNone) and Assigned(Parent) then begin + // The Panel is a special component, it has the ability + // to paint the parent background on its children controls. + // For that it receives WM_ERASEBKGND messages from its children + // via SpDrawParentBackground. + SpDrawParentBackground(Self, FBackground.Canvas.Handle, R); + // PerformEraseBackground(Self, FBackground.Canvas.Handle); + end + else + Windows.FillRect(FBackground.Canvas.Handle, ClientRect, Brush.Handle); + + // Set the Font after SpDrawParentBackground, DrawThemeParentBackground, + // or PerformEraseBackground. + // The API messes the font, it seems it destroys it. + // For more info see: + // - TCustomActionControl.DrawBackground for more info. + // - Theme Explorer Main.pas TMainForm.ControlMessage + // (http://www.soft-gems.net:8080/browse/Demos) + FBackground.Canvas.Font.Handle := 0; // Reset the font, it gets destroyed + FBackground.Canvas.Font.Color := $010101; // Force a change + FBackground.Canvas.Font.Assign(Self.Font); + + PaintDefault := True; + DoDrawBackground(FBackground.Canvas, R, pstPrePaint, PaintDefault); + if PaintDefault then begin + if not FBorders then begin + R2 := R; + InflateRect(R2, 3, 3); + DrawBackground(FBackground.Canvas, R2); + end + else + DrawBackground(FBackground.Canvas, R); + end; + PaintDefault := True; + DoDrawBackground(FBackground.Canvas, R, pstPostPaint, PaintDefault); + + ACanvas.Draw(R.Left, R.Top, FBackground); + end; + finally + ACanvas.Handle := 0; + ACanvas.Free; + end; + end; +end; + +procedure TSpTBXCustomPanel.WMWindowPosChanged(var Message: TWMWindowPosChanged); +begin + inherited; + InvalidateBackground; +end; + +procedure TSpTBXCustomPanel.WMSpSkinChange(var Message: TMessage); +begin + InvalidateBackground; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXPanel } + +procedure TSpTBXPanel.DrawBackground(ACanvas: TCanvas; ARect: TRect); +begin + if not TBXStyleBackground and FHotTrack then begin + if SpTBXSkinType(SkinType) = sknNone then + SpDrawXPPanelBorder(ACanvas, ARect, pbrDoubleSunken) + else + SpDrawXPEditFrame(ACanvas, ARect, Enabled, FHotTracking, SkinType, True, True); + end + else + inherited; +end; + +procedure TSpTBXPanel.CMFocusChanged(var Message: TCMFocusChanged); +begin + inherited; + if FHotTrack and Assigned(Message.Sender) then begin + FChildFocused := SpFindControl(Self, Message.Sender) > -1; + if FChildFocused <> FHotTracking then + SetHotTracking(FChildFocused); + end; +end; + +procedure TSpTBXPanel.CMMouseEnter(var Message: TMessage); +begin + inherited; + if FHotTrack and not FHotTracking then + SetHotTracking(True); +end; + +procedure TSpTBXPanel.CMMouseLeave(var Message: TMessage); +begin + inherited; + if FHotTrack and FHotTracking and not FChildFocused then + SetHotTracking(False); +end; + +procedure TSpTBXPanel.SetHotTrack(const Value: Boolean); +begin + if FHotTrack <> Value then begin + FHotTrack := Value; + InvalidateBackground(False); + end; +end; + +procedure TSpTBXPanel.SetHotTracking(const Value: Boolean); +begin + if SpTBXSkinType(SkinType) = sknSkin then begin + FHotTracking := Value; + InvalidateBackground(False); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomGroupBox } + +constructor TSpTBXCustomGroupBox.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + ControlStyle := ControlStyle + [csSetCaption]; + Width := 185; + Height := 105; +end; + +procedure TSpTBXCustomGroupBox.AdjustClientRect(var Rect: TRect); +var + R: TRect; + H: Integer; +begin + inherited AdjustClientRect(Rect); + Canvas.Font := Font; + R := Rect; + H := SpDrawXPText(Canvas, '0', R, DT_SINGLELINE or DT_CALCRECT); + Inc(Rect.Top, H); +end; + +procedure TSpTBXCustomGroupBox.CMDialogChar(var Message: TCMDialogChar); +begin + with Message do + if IsAccel(CharCode, Caption) and SpCanFocus(Self) then begin + SelectFirst; + Result := 1; + end + else + inherited; +end; + +procedure TSpTBXCustomGroupBox.CMTextChanged(var Message: TMessage); +begin + inherited; + InvalidateBackground(False); + Realign; +end; + +procedure TSpTBXCustomGroupBox.DrawBackground(ACanvas: TCanvas; ARect: TRect); +var + Flags: Cardinal; +begin + Flags := DT_SINGLELINE; + if UseRightToLeftAlignment then + Flags := Flags or DT_RTLREADING; + SpDrawXPGroupBox(ACanvas, ARect, Caption, Flags, True, TBXStyleBackground, SkinType); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXTextObjectActionLink } + +{$IFNDEF UNICODE} +procedure TSpTBXTextObjectActionLink.AssignClient(AClient: TObject); +begin + inherited AssignClient(AClient); + FUnicodeClient := AClient as TSpTBXTextObject; +end; + +function TSpTBXTextObjectActionLink.IsCheckedLinked: Boolean; +begin + Result := inherited IsCheckedLinked and + (FUnicodeClient.Checked = (Action as TCustomAction).Checked); +end; + +function TSpTBXTextObjectActionLink.IsCaptionLinked: Boolean; +begin + if (Action is TCustomAction) and Supports(Action, ITntAction) then + Result := FUnicodeClient.Caption = TntActnList.TntAction_GetCaption(Action as TCustomAction) + else + Result := inherited IsCaptionLinked; +end; + +function TSpTBXTextObjectActionLink.IsHintLinked: Boolean; +begin + if (Action is TCustomAction) and Supports(Action, ITntAction) then + Result := FUnicodeClient.Hint = TntActnList.TntAction_GetHint(Action as TCustomAction) + else + Result := inherited IsHintLinked; +end; + +procedure TSpTBXTextObjectActionLink.SetCaption(const Value: String); +begin + if IsCaptionLinked then + if (Action is TCustomAction) and Supports(Action, ITntAction) then + FUnicodeClient.Caption := TntActnList.TntAction_GetNewCaption(Action as TCustomAction, Value) + else + FUnicodeClient.Caption := Value; +end; + +procedure TSpTBXTextObjectActionLink.SetChecked(Value: Boolean); +begin + if IsCheckedLinked then FUnicodeClient.Checked := Value; +end; + +procedure TSpTBXTextObjectActionLink.SetHint(const Value: String); +begin + if IsHintLinked then + if (Action is TCustomAction) and Supports(Action, ITntAction) then + FUnicodeClient.Hint := TntActnList.TntAction_GetNewHint(Action as TCustomAction, Value) + else + FUnicodeClient.Hint := Value; +end; + +procedure TSpTBXTextObjectActionLink.SetImageIndex(Value: Integer); +begin + if IsImageIndexLinked then FUnicodeClient.ImageIndex := Value; +end; +{$ENDIF} + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXTextObject } + +constructor TSpTBXTextObject.Create(AOwner: TComponent); +begin + inherited; + ControlStyle := ControlStyle + [csClickEvents, csDoubleClicks, csSetCaption] - [csAcceptsControls, csOpaque]; + + FImageIndex := -1; + FImageChangeLink := TChangeLink.Create; + FImageChangeLink.OnChange := ImageListChange; + + FAlignment := taLeftJustify; + FCaptionGlowColor := clYellow; + FDisabledIconCorrection := True; + FDrawPushedCaption := False; + FShowAccelChar := True; + FSkinType := sknSkin; + + Autosize := True; + Color := clNone; + DoubleBuffered := True; + ParentColor := False; + TabStop := True; + Width := 100; + SkinManager.AddSkinNotification(Self); +end; + +destructor TSpTBXTextObject.Destroy; +begin + FImageChangeLink.Free; + SkinManager.RemoveSkinNotification(Self); + + inherited; +end; + +procedure TSpTBXTextObject.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + { + if not (csDesigning in ComponentState) then + with Params.WindowClass do + Style := Style and not (CS_HREDRAW or CS_VREDRAW); + } +end; + +procedure TSpTBXTextObject.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited; + if Operation = opRemove then + if AComponent = Images then SetImages(nil); +end; + +procedure TSpTBXTextObject.DefineProperties(Filer: TFiler); +begin + inherited; + + // [Backward-Compatibility]: Don't read/save LinkFont, it's not used anymore + Filer.DefineProperty('LinkFont.Charset', ReadLinkFont, nil, False); + Filer.DefineProperty('LinkFont.Color', ReadLinkFont, nil, False); + Filer.DefineProperty('LinkFont.Height', ReadLinkFont, nil, False); + Filer.DefineProperty('LinkFont.Name', ReadLinkFont, nil, False); + Filer.DefineProperty('LinkFont.Orientation', ReadLinkFont, nil, False); + Filer.DefineProperty('LinkFont.Pitch', ReadLinkFont, nil, False); + Filer.DefineProperty('LinkFont.Style', ReadLinkFont, nil, False); + + Filer.DefineProperty('EditButton.LinkFont.Charset', ReadLinkFont, nil, False); + Filer.DefineProperty('EditButton.LinkFont.Color', ReadLinkFont, nil, False); + Filer.DefineProperty('EditButton.LinkFont.Height', ReadLinkFont, nil, False); + Filer.DefineProperty('EditButton.LinkFont.Name', ReadLinkFont, nil, False); + Filer.DefineProperty('EditButton.LinkFont.Orientation', ReadLinkFont, nil, False); + Filer.DefineProperty('EditButton.LinkFont.Pitch', ReadLinkFont, nil, False); + Filer.DefineProperty('EditButton.LinkFont.Style', ReadLinkFont, nil, False); + + Filer.DefineProperty('SpinButton.LinkFont.Charset', ReadLinkFont, nil, False); + Filer.DefineProperty('SpinButton.LinkFont.Color', ReadLinkFont, nil, False); + Filer.DefineProperty('SpinButton.LinkFont.Height', ReadLinkFont, nil, False); + Filer.DefineProperty('SpinButton.LinkFont.Name', ReadLinkFont, nil, False); + Filer.DefineProperty('SpinButton.LinkFont.Orientation', ReadLinkFont, nil, False); + Filer.DefineProperty('SpinButton.LinkFont.Pitch', ReadLinkFont, nil, False); + Filer.DefineProperty('SpinButton.LinkFont.Style', ReadLinkFont, nil, False); +end; + +function TSpTBXTextObject.GetActionLinkClass: TControlActionLinkClass; +begin + Result := TSpTBXTextObjectActionLink; +end; + +procedure TSpTBXTextObject.ActionChange(Sender: TObject; CheckDefaults: Boolean); +begin + inherited; + + if Sender is TCustomAction then + with TCustomAction(Sender) do begin + if not CheckDefaults or (Self.Checked = False) then + Self.Checked := Checked; + if not CheckDefaults or (Self.ImageIndex = -1) then + Self.ImageIndex := ImageIndex; + end; +end; + +procedure TSpTBXTextObject.AdjustFont(AFont: TFont); +begin + if (FLinkText <> '') and MouseInControl then begin + AFont.Color := clBlue; + AFont.Style := AFont.Style + [fsUnderline]; + end; +end; + +procedure TSpTBXTextObject.AdjustBounds; +var + NewWidth, NewHeight: Integer; +begin + if HandleAllocated and not FUpdating and ([csReading, csLoading] * ComponentState = []) and AutoSize then + begin + FUpdating := True; + try + NewWidth := Width; + NewHeight := 0; + DoAdjustBounds(NewWidth, NewHeight); + SetBounds(Left, Top, NewWidth, NewHeight); + finally + FUpdating := False; + end; + end; +end; + +function TSpTBXTextObject.CanFocus: Boolean; +begin + Result := False; +end; + +procedure TSpTBXTextObject.Click; +begin + if not (csLoading in ComponentState) then begin + Invalidate; + inherited; + ExecuteLink; + end; +end; + +function TSpTBXTextObject.CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; +begin + if not FUpdating and ([csReading, csLoading] * ComponentState = []) and AutoSize then begin + FUpdating := True; + try + NewHeight := 0; + DoAdjustBounds(NewWidth, NewHeight); + Result := True; + finally + FUpdating := False; + end; + end + else + Result := False; +end; + +procedure TSpTBXTextObject.DoAdjustBounds(var NewWidth, NewHeight: Integer); +var + R, R1, R2: TRect; +begin + GetSize(R, R1, R2); + NewHeight := R.Bottom - R.Top; + if Wrapping = twNone then + NewWidth := R.Right - R.Left; +end; + +procedure TSpTBXTextObject.DoDrawHint(AHintBitmap: TBitmap; + var AHint: Widestring; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawHint) then FOnDrawHint(Self, AHintBitmap, AHint, PaintDefault); +end; + +function TSpTBXTextObject.DoDrawItem(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage): Boolean; +begin + Result := True; + if Assigned(FOnDraw) then FOnDraw(Self, ACanvas, ARect, PaintStage, Result); +end; + +function TSpTBXTextObject.DoDrawText(ACanvas: TCanvas; var ARect: TRect; + Flags: Longint): Integer; +var + PaintDefault: Boolean; + GlyphSize, DummyRightGlyphSize: TSize; + DummyRightGlyphRect: TRect; + R, R1, R2: TRect; + WS: WideString; + TextFlags: Cardinal; + State: TSpTBXSkinStatesType; +begin + Result := 0; + WS := Caption; + TextFlags := Flags; + if TextFlags and DT_CALCRECT = 0 then begin + ACanvas.Brush.Style := bsClear; + State := CurrentSkin.GetState(Enabled, Pushed, MouseInControl, Checked); + + PaintDefault := True; + if Assigned(FOnDrawCaption) then + FOnDrawCaption(Self, ACanvas, ClientRect, State, WS, ARect, TextFlags, False, pstPrePaint, PaintDefault); + + if PaintDefault then begin + // Calc the rects + GlyphSize := GetGlyphSize; + DummyRightGlyphSize.cx := 0; + DummyRightGlyphSize.cy := 0; + DummyRightGlyphRect := Rect(0, 0, 0, 0); + SpCalcXPText(ACanvas, ARect, WS, GetRealAlignment(Self), TextFlags, GlyphSize, DummyRightGlyphSize, FGlyphLayout, DrawPushedCaption and Pushed, R1, R2, DummyRightGlyphRect, FCaptionRoatationAngle); + + // Paint the text + if not Enabled then + if SpTBXSkinType(FSkinType) = sknNone then begin + OffsetRect(R1, 1, 1); + ACanvas.Font.Color := clBtnHighlight; + SpDrawXPText(ACanvas, WS, R1, TextFlags, FCaptionGlow, FCaptionGlowColor, FCaptionRoatationAngle); + OffsetRect(R1, -1, -1); + ACanvas.Font.Color := clGrayText; + end; + SpDrawXPText(ACanvas, WS, R1, TextFlags, FCaptionGlow, FCaptionGlowColor, FCaptionRoatationAngle); + + // Paint the glyph + DoInternalGlyphDraw(ACanvas, R2); + end; + + PaintDefault := True; + if Assigned(FOnDrawCaption) then + FOnDrawCaption(Self, ACanvas, ClientRect, State, WS, ARect, TextFlags, False, pstPostPaint, PaintDefault); + if PaintDefault then + if GetFocused then begin + R := ClientRect; + SpDrawFocusRect(ACanvas, GetFocusRect(R, R1, R2)); + end; + end + else + Result := SpDrawXPText(ACanvas, WS, ARect, TextFlags); +end; + +procedure TSpTBXTextObject.DoGetImageIndex(var AImageList: TCustomImageList; var AImageIndex: Integer); +begin + if Assigned(FOnGetImageIndex) then FOnGetImageIndex(Self, AImageList, AImageIndex); +end; + +procedure TSpTBXTextObject.DoInternalGlyphDraw(ACanvas: TCanvas; + AGlyphRect: TRect); +var + I: Integer; + IL: TCustomImageList; +begin + IL := FImages; + I := FImageIndex; + DoGetImageIndex(IL, I); + if Assigned(IL) and (I > -1) and (I < IL.Count) then + SpDrawImageList(ACanvas, AGlyphRect, IL, I, Enabled, FDisabledIconCorrection) +end; + +procedure TSpTBXTextObject.DoMouseEnter; +begin + Invalidate; + if Assigned(FOnMouseEnter) then FOnMouseEnter(Self); +end; + +procedure TSpTBXTextObject.DoMouseLeave; +begin + Invalidate; + if Assigned(FOnMouseLeave) then FOnMouseLeave(Self); +end; + +procedure TSpTBXTextObject.ExecuteLink; +begin + if FLinkText <> '' then + if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then + ShellExecuteA(Application.Handle, 'open', PAnsiChar(AnsiString(FLinkText)), PAnsiChar(AnsiString(FLinkTextParams)), '', SW_SHOWNORMAL) + else + ShellExecuteW(Application.Handle, 'open', PWideChar(FLinkText), PWideChar(FLinkTextParams), '', SW_SHOWNORMAL); +end; + +function TSpTBXTextObject.GetControlsAlignment: TAlignment; +begin + Result := FAlignment; +end; + +function TSpTBXTextObject.GetTextFlags: Cardinal; +const + Alignments: array [TAlignment] of Integer = (DT_LEFT, DT_RIGHT, DT_CENTER); + WordWraps: array [TTextWrapping] of Integer = (DT_SINGLELINE, + DT_SINGLELINE or DT_END_ELLIPSIS, + DT_SINGLELINE or DT_PATH_ELLIPSIS, DT_WORDBREAK); + ShowAccelChars: array [Boolean] of Integer = (DT_NOPREFIX, 0); + SystemAccelChars: array [Boolean] of Integer = (DT_HIDEPREFIX, 0); +begin + // Note on SystemAccelChars: custom controls need to update the accel painting + // in response to WM_UPDATEUISTATE, call WM_QUERYUISTATE to get the accel + // painting state: + // http://blogs.msdn.com/oldnewthing/archive/2005/05/03/414317.aspx + // + // Another way of doing it is updating a flag in WM_UPDATEUISTATE, without + // calling WM_QUERYUISTATE everytime the control needs to be painted: + // begin + // if LoWord(Message.WParam) and UISF_HIDEACCEL = UISF_HIDEACCEL then begin + // if HiWord(Message.WParam) and UIS_CLEAR = UIS_CLEAR then + // FSystemShowAccelChar := True; + // if HiWord(Message.WParam) and UIS_SET = UIS_SET then + // FSystemShowAccelChar := False; + // end; + // inherited; + // end; + // + // To test this use the mouse to run the app on the IDE, don't use F9 + // otherwise the accel will always be visible + + Result := DT_EXPANDTABS or WordWraps[Wrapping] or + Alignments[GetRealAlignment(Self)] or + ShowAccelChars[ShowAccelChar] or SystemAccelChars[SendMessage(Handle, WM_QUERYUISTATE, 0, 0) and UISF_HIDEACCEL = 0]; + Result := DrawTextBiDiModeFlags(Result); +end; + +function TSpTBXTextObject.GetFocusRect(R, TextR, GlyphR: TRect): TRect; +begin + if Caption = '' then + Result := Rect(0, 0, 0, 0) + else begin + InflateRect(TextR, 1, 1); + Result := TextR; + end; +end; + +function TSpTBXTextObject.GetGlyphSize: TSize; +var + I: Integer; + IL: TCustomImageList; +begin + IL := FImages; + I := FImageIndex; + DoGetImageIndex(IL, I); + if Assigned(IL) and (I > -1) and (I < IL.Count) then begin + Result.cx := IL.Width; + Result.cy := IL.Height; + end + else begin + Result.cx := 0; + Result.cy := 0; + end; +end; + +function TSpTBXTextObject.GetFocused: Boolean; +begin + Result := Focused; +end; + +function TSpTBXTextObject.GetPushed: Boolean; +begin + Result := FPushed and MouseInControl; +end; + +procedure TSpTBXTextObject.GetSize(out TotalR, TextR, GlyphR: TRect); +// Size of Text + Glyph + TextMargin + Margins +var + GlyphSize, DummyRightGlyphSize: TSize; + DummyRightGlyphRect: TRect; + R: TRect; +begin + GlyphSize := GetGlyphSize; + DummyRightGlyphSize.cx := 0; + DummyRightGlyphSize.cy := 0; + DummyRightGlyphRect := Rect(0, 0, 0, 0); + R := ClientRect; + ApplyMargins(R, GetTextMargins); + + Canvas.Font.Assign(Font); + AdjustFont(Canvas.Font); + SpCalcXPText(Canvas, R, Caption, GetRealAlignment(Self), GetTextFlags, GlyphSize, DummyRightGlyphSize, + FGlyphLayout, DrawPushedCaption and Pushed, TextR, GlyphR, DummyRightGlyphRect); + + UnionRect(TotalR, TextR, GlyphR); + + {$IF CompilerVersion > 17} + if Autosize then + with Margins do begin + Inc(TotalR.Right, Left + Right); + Inc(TotalR.Bottom, Top + Bottom); + end; + {$IFEND} +end; + +function TSpTBXTextObject.GetTextMargins: TRect; +begin + Result := Rect(0, 0, 0, 0); +end; + +procedure TSpTBXTextObject.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +begin + if (Button = mbLeft) and Enabled and not FPushed then begin + FPushed := True; + if not Focused and CanFocus then + SetFocus // Invalidates the canvas + else + Invalidate; + end; + inherited; +end; + +procedure TSpTBXTextObject.MouseMove(Shift: TShiftState; X, Y: Integer); +begin + if FPushed then + UpdateTracking; + inherited; +end; + +procedure TSpTBXTextObject.MouseUp(Button: TMouseButton; Shift: TShiftState; X, + Y: Integer); +begin + FPushed := False; + Invalidate; + inherited; +end; + +procedure TSpTBXTextObject.KeyDown(var Key: Word; Shift: TShiftState); +begin + inherited; + if (Key = VK_SPACE) and FSpaceAsClick then begin + FPushed := True; + FMouseInControl := True; + Invalidate; + end; +end; + +procedure TSpTBXTextObject.KeyUp(var Key: Word; Shift: TShiftState); +begin + if (Key = VK_SPACE) and FSpaceAsClick and FPushed then begin + FPushed := False; + FMouseInControl := False; + Click; + Invalidate; + end; + inherited; +end; + +procedure TSpTBXTextObject.Paint; +var + R, TextR: TRect; +begin + R := ClientRect; + Canvas.Font.Assign(Font); + AdjustFont(Canvas.Font); + // Draw the background + DoDrawItem(Canvas, R, pstPrePaint); + // Draw the text + TextR := R; + ApplyMargins(TextR, GetTextMargins); + DoDrawText(Canvas, TextR, GetTextFlags); + // Draw the Focus, Icon and Text + DoDrawItem(Canvas, R, pstPostPaint); +end; + +procedure TSpTBXTextObject.ReadLinkFont(Reader: TReader); +begin + // [Backward-Compatibility] + Reader.SkipValue; +end; + +procedure TSpTBXTextObject.SetAlignment(const Value: TAlignment); +begin + if FAlignment <> Value then begin + FAlignment := Value; + Invalidate; + end; +end; + +procedure TSpTBXTextObject.Loaded; +begin + inherited; + AdjustBounds; +end; + +procedure TSpTBXTextObject.SetCaptionGlow(const Value: TSpGlowDirection); +begin + if FCaptionGlow <> Value then begin + FCaptionGlow := Value; + Invalidate; + end; +end; + +procedure TSpTBXTextObject.SetCaptionGlowColor(const Value: TColor); +begin + if FCaptionGlowColor <> Value then begin + FCaptionGlowColor := Value; + Invalidate; + end; +end; + +procedure TSpTBXTextObject.SetCaptionRoatationAngle(const Value: TSpTextRotationAngle); +begin + if FCaptionRoatationAngle <> Value then begin + FCaptionRoatationAngle := Value; + Invalidate; + end; +end; + +function TSpTBXTextObject.GetChecked: Boolean; +begin + Result := FChecked; +end; + +procedure TSpTBXTextObject.SetChecked(Value: Boolean); +begin + if Value <> FChecked then begin + FChecked := Value; + Invalidate; + end; +end; + +procedure TSpTBXTextObject.SetGlyphLayout(const Value: TSpGlyphLayout); +begin + if FGlyphLayout <> Value then begin + FGlyphLayout := Value; + Invalidate; + end; +end; + +function TSpTBXTextObject.IsImageIndexValid: Boolean; +var + I: Integer; + IL: TCustomImageList; +begin + IL := FImages; + I := FImageIndex; + DoGetImageIndex(IL, I); + Result := Assigned(IL) and (I > -1) and (I < IL.Count); +end; + +procedure TSpTBXTextObject.ImageListChange(Sender: TObject); +begin + if Sender = Images then begin + Invalidate; + AdjustBounds; + end; +end; + +procedure TSpTBXTextObject.SetImageIndex(const Value: TImageIndex); +begin + if FImageIndex <> Value then begin + FImageIndex := Value; + if Assigned(Images) then Invalidate; + AdjustBounds; + end; +end; + +procedure TSpTBXTextObject.SetImages(const Value: TCustomImageList); +begin + if FImages <> nil then FImages.UnRegisterChanges(FImageChangeLink); + FImages := Value; + if FImages <> nil then begin + FImages.RegisterChanges(FImageChangeLink); + FImages.FreeNotification(Self); + end; + Invalidate; + AdjustBounds; +end; + +procedure TSpTBXTextObject.SetShowAccelChar(Value: Boolean); +begin + if FShowAccelChar <> Value then begin + FShowAccelChar := Value; + AdjustBounds; + Invalidate; + end; +end; + +procedure TSpTBXTextObject.SetSkinType(const Value: TSpTBXSkinType); +begin + if FSkinType <> Value then begin + FSkinType := Value; + Invalidate; + end; +end; + +procedure TSpTBXTextObject.SetWrapping(Value: TTextWrapping); +begin + if FWrapping <> Value then begin + FWrapping := Value; + AdjustBounds; + Invalidate; + end; +end; + +procedure TSpTBXTextObject.UpdateTracking(ForceMouseLeave: Boolean = False); +var + P: TPoint; + IsInControl: Boolean; +begin + if ForceMouseLeave then begin + FMouseInControl := True; + Perform(CM_MOUSELEAVE, 0, 0) + end + else + if Enabled then begin + GetCursorPos(P); + IsInControl := FindDragTarget(P, True) = Self; + + if FMouseInControl <> IsInControl then begin + FMouseInControl := not IsInControl; + if FMouseInControl then + Perform(CM_MOUSELEAVE, 0, 0) + else + Perform(CM_MOUSEENTER, 0, 0); + end; + end; +end; + +procedure TSpTBXTextObject.CMEnabledChanged(var Message: TMessage); +begin + inherited; + if not Enabled and FMouseInControl then begin + FMouseInControl := False; + DoMouseLeave; + Perform(WM_CANCELMODE, 0, 0); + end + else + Invalidate; +end; + +procedure TSpTBXTextObject.CMFontChanged(var Message: TMessage); +begin + inherited; + Invalidate; + AdjustBounds; +end; + +procedure TSpTBXTextObject.CMHintShow(var Message: TCMHintShow); +// Handle the CM_HINTSHOW message to show unicode hints using +// a custom THintWindow. +var + HintInfo: PHintInfo; + WideHint, PrevWideHint: Widestring; + R, TextR: TRect; + PaintDefault: Boolean; + I: Integer; +begin + // Get the short hint + I := Pos('|', Hint); + if I = 0 then + WideHint := Hint + else + WideHint := Copy(Hint, 1, I - 1); + + // Prepare the HintBitmap + SpStockHintBitmap.Canvas.Font.Assign(Screen.HintFont); + SpStockHintBitmap.Canvas.Font.Color := clInfoText; + SpStockHintBitmap.Canvas.Pen.Color := clBlack; + SpStockHintBitmap.Canvas.Brush.Color := clInfoBk; + TextR := Rect(0, 0, 1, 1); + SpDrawXPText(SpStockHintBitmap.Canvas, WideHint, TextR, DT_NOPREFIX or DT_CALCRECT); + SpStockHintBitmap.Width := TextR.Right + 8; + SpStockHintBitmap.Height := TextR.Bottom + 4; + R := Rect(0, 0, SpStockHintBitmap.Width, SpStockHintBitmap.Height); + SpDrawXPTooltipBackground(SpStockHintBitmap.Canvas, R); + + // Draw the hint in the HintBitmap + PrevWideHint := WideHint; + PaintDefault := True; + DoDrawHint(SpStockHintBitmap, WideHint, PaintDefault); + if PaintDefault then begin + // Prepare the HintInfo + HintInfo := Message.HintInfo; + HintInfo.HintStr := WideHint; + HintInfo.CursorRect := ClientRect; + HintInfo.HintWindowClass := SpTBXHintWindowClass; // Custom HintWindow class + HintInfo.HintData := SpStockHintBitmap; // TApplication.ActivateHint will pass the data to the HintWindow + HintInfo.HideTimeout := 60000; // 1 minute + + // Adjust the bounds and repaint the background if it's needed + if WideHint <> PrevWideHint then begin + TextR := Rect(0, 0, 1, 1); + SpDrawXPText(SpStockHintBitmap.Canvas, WideHint, TextR, DT_NOPREFIX or DT_CALCRECT); + SpStockHintBitmap.Width := TextR.Right + 8; + SpStockHintBitmap.Height := TextR.Bottom + 4; + R := Rect(0, 0, SpStockHintBitmap.Width, SpStockHintBitmap.Height); + SpDrawXPTooltipBackground(SpStockHintBitmap.Canvas, R); + end + else + R := Rect(0, 0, SpStockHintBitmap.Width, SpStockHintBitmap.Height); + + // Draw the hint + OffsetRect(TextR, ((R.Right - TextR.Right) div 2) - 2, (R.Bottom - TextR.Bottom) div 2); + SpDrawXPText(SpStockHintBitmap.Canvas, WideHint, TextR, DT_NOPREFIX); + end; +end; + +procedure TSpTBXTextObject.CMMouseEnter(var Message: TMessage); +begin + inherited; + if not FMouseInControl then begin + FMouseInControl := True; + DoMouseEnter; + end; +end; + +procedure TSpTBXTextObject.CMMouseLeave(var Message: TMessage); +begin + inherited; + if FMouseInControl then begin + FMouseInControl := False; + DoMouseLeave; + end; +end; + +procedure TSpTBXTextObject.CMTextChanged(var Message: TMessage); +begin + inherited; + Invalidate; + AdjustBounds; +end; + +procedure TSpTBXTextObject.WMEraseBkgnd(var Message: TMessage); +begin + if not DoubleBuffered or (Message.wParam = Message.lParam) then + begin + if (Color = clNone) and Assigned(Parent) then + SpDrawParentBackground(Self, TWMEraseBkgnd(Message).DC, ClientRect) + else + Windows.FillRect(TWMEraseBkgnd(Message).DC, ClientRect, Brush.Handle); + end; + Message.Result := 1; +end; + +procedure TSpTBXTextObject.WMKillFocus(var Message: TMessage); +begin + inherited; + FPushed := False; + Invalidate; +end; + +procedure TSpTBXTextObject.WMSetFocus(var Message: TMessage); +begin + inherited; + Invalidate; +end; + +procedure TSpTBXTextObject.WMSetCursor(var Message: TWMSetCursor); +begin + if not (csDesigning in ComponentState) and (Message.CursorWnd = Handle) and + (FLinkText <> '') and MouseInControl and (Screen.Cursor = crDefault) then + begin + // Replace the Delphi hand cursor for the one used by Windows only if + // there is no other cursor assigned. + Windows.SetCursor(Screen.Cursors[crSpTBXNewHandPoint]); + Message.Result := 1; + end + else + inherited; +end; + +procedure TSpTBXTextObject.WMSpSkinChange(var Message: TMessage); +var + R: TRect; +begin + if HandleAllocated then begin + R := ClientRect; + InvalidateRect(Handle, @R, True); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomLabel } + +constructor TSpTBXCustomLabel.Create(AOwner: TComponent); +begin + inherited; + FUnderlineColor := clBtnShadow; + TabStop := False; +end; + +procedure TSpTBXCustomLabel.AdjustFont(AFont: TFont); +var + State: TSpTBXSkinStatesType; +begin + if (LinkText <> '') and MouseInControl then + inherited + else + if (SkinType = sknSkin) and ((AFont.Color = clWindowText) or (AFont.Color = clNone)) then begin + State := CurrentSkin.GetState(Enabled, Pushed, MouseInControl, Checked); + AFont.Color := CurrentSkin.GetTextColor(skncLabel, State); + end; +end; + +function TSpTBXCustomLabel.DoDrawItem(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage): Boolean; +var + C: TColor; +begin + Result := inherited DoDrawItem(ACanvas, ARect, PaintStage); + if Result and (PaintStage = pstPrePaint) and FUnderline then begin + C := ACanvas.Pen.Color; + try + ACanvas.Pen.Color := UnderlineColor; + ACanvas.MoveTo(ARect.Left, ARect.Bottom - 1); + ACanvas.LineTo(ARect.Right, ARect.Bottom - 1); + finally + ACanvas.Pen.Color := C; + end; + end; +end; + +procedure TSpTBXCustomLabel.GetSize(out TotalR, TextR, GlyphR: TRect); +begin + inherited GetSize(TotalR, TextR, GlyphR); + if FUnderline then + Inc(TotalR.Bottom); +end; + +procedure TSpTBXCustomLabel.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited; + if Operation = opRemove then + if AComponent = FocusControl then SetFocusControl(nil); +end; + +procedure TSpTBXCustomLabel.SetFocusControl(const Value: TWinControl); +begin + if FFocusControl <> Value then + begin + FFocusControl := Value; + if FFocusControl <> nil then FFocusControl.FreeNotification(Self); + end; +end; + +procedure TSpTBXCustomLabel.SetUnderline(const Value: Boolean); +begin + if Value <> FUnderline then begin + FUnderline := Value; + Invalidate; + AdjustBounds; + end; +end; + +procedure TSpTBXCustomLabel.SetUnderlineColor(const Value: TColor); +begin + FUnderlineColor := Value; + Invalidate; +end; + +procedure TSpTBXCustomLabel.CMDialogChar(var Message: TCMDialogChar); +begin + if Enabled and IsAccel(Message.CharCode, Caption) then begin + if SpCanFocus(FFocusControl) then + FFocusControl.SetFocus + else + Click; + Message.Result := 1; + end + else + inherited; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXButtonControl } + +constructor TSpTBXButtonControl.Create(AOwner: TComponent); +begin + inherited; + ControlStyle := ControlStyle - [csDoubleClicks]; + FGroupIndex := 0; +end; + +function TSpTBXButtonControl.CanFocus: Boolean; +var + Control: TWinControl; + Form: TCustomForm; +begin + Result := False; + Form := GetParentForm(Self); + if (Form <> nil) and Form.Visible and Form.Enabled then begin + Control := Self; + while Control <> Form do + begin + if not (Control.Visible and Control.Enabled) then Exit; + Control := Control.Parent; + end; + Result := True; + end; +end; + +function TSpTBXButtonControl.CanUpdateExclusive: Boolean; +begin + Result := FGroupIndex <> 0; +end; + +procedure TSpTBXButtonControl.UpdateExclusive; +var + Msg: TMessage; +begin + if Assigned(Parent) and CanUpdateExclusive then begin + Msg.Msg := CM_SPGROUPINDEXUPDATE; + Msg.WParam := FGroupIndex; + Msg.LParam := Longint(Self); + Msg.Result := 0; + Parent.Broadcast(Msg); + end; +end; + +procedure TSpTBXButtonControl.SetGroupIndex(const Value: Integer); +begin + if FGroupIndex <> Value then begin + FGroupIndex := Value; + UpdateExclusive; + end; +end; + +procedure TSpTBXButtonControl.SetAllowAllUp(const Value: Boolean); +begin + if FAllowAllUp <> Value then begin + FAllowAllUp := Value; + UpdateExclusive; + end; +end; + +procedure TSpTBXButtonControl.SetChecked(Value: Boolean); +begin + inherited; + if Value then UpdateExclusive; +end; + +procedure TSpTBXButtonControl.CMDialogChar(var Message: TCMDialogChar); +begin + if Enabled and ShowAccelChar and IsAccel(Message.CharCode, Caption) and + CanFocus and Visible then + begin + SetFocus; + Click; + Message.Result := 1; + end + else + inherited; +end; + +procedure TSpTBXButtonControl.CMSPGroupIndexUpdate(var Message: TMessage); +var + Sender: TComponent; + SenderButton: TSpTBXButtonControl; +begin + if Message.WParam = FGroupIndex then begin + Sender := TComponent(Message.LParam); + if (Sender <> Self) and (Sender is TSpTBXButtonControl) and (Sender.ClassType = Self.ClassType) then begin + SenderButton := Sender as TSpTBXButtonControl; + FAllowAllUp := SenderButton.AllowAllUp; + if SenderButton.Checked and Checked then + Checked := False; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomCheckButton } + +function TSpTBXCustomCheckButton.GetGlyphSize: TSize; +begin + Result := inherited GetGlyphSize; + if (Result.cx = 0) or (Result.cy = 0) then begin + Result.cx := 13; + Result.cy := 13; + end; +end; + +procedure TSpTBXCustomCheckButton.GetSize(out TotalR, TextR, GlyphR: TRect); +begin + inherited GetSize(TotalR, TextR, GlyphR); + // Inc TotalR for the FocusRect + if Autosize then begin + Inc(TotalR.Right); + Inc(TotalR.Bottom, 2); + end; +end; + +procedure TSpTBXCustomCheckButton.Toggle; +begin + // Toggle the check state +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomCheckBox } + +constructor TSpTBXCustomCheckBox.Create(AOwner: TComponent); +begin + inherited; + FAllowGrayed := False; + FState := cbUnchecked; + SpaceAsClick := True; +end; + +procedure TSpTBXCustomCheckBox.DoInternalGlyphDraw(ACanvas: TCanvas; + AGlyphRect: TRect); +begin + if IsImageIndexValid then + inherited + else + SpDrawXPCheckBoxGlyph(ACanvas, AGlyphRect, Enabled, State, MouseInControl, Pushed, SkinType); +end; + +procedure TSpTBXCustomCheckBox.AdjustFont(AFont: TFont); +var + State: TSpTBXSkinStatesType; +begin + if (LinkText <> '') and MouseInControl then + inherited + else + if (SkinType = sknSkin) and ((AFont.Color = clWindowText) or (AFont.Color = clNone)) then begin + State := CurrentSkin.GetState(Enabled, Pushed, MouseInControl, Checked); + AFont.Color := CurrentSkin.GetTextColor(skncCheckBox, State); + end; +end; + +procedure TSpTBXCustomCheckBox.Click; +begin + if StateChanged then + inherited + else + Toggle; // Toggle calls OnClick +end; + +function TSpTBXCustomCheckBox.GetChecked: Boolean; +begin + Result := FState = cbChecked; +end; + +procedure TSpTBXCustomCheckBox.SetChecked(Value: Boolean); +begin + if Checked <> Value then begin + inherited; + if Value then SetState(cbChecked) + else SetState(cbUnchecked); + end; +end; + +procedure TSpTBXCustomCheckBox.SetState(const Value: TCheckBoxState); +begin + if (FState <> Value) then begin + FState := Value; + + // When State is changed OnClick must be fired + StateChanged := True; + try + Click; + finally + StateChanged := False; + end; + end; +end; + +procedure TSpTBXCustomCheckBox.Toggle; +begin + case State of + cbUnchecked: if AllowGrayed then SetState(cbGrayed) else SetState(cbChecked); + cbChecked: SetState(cbUnchecked); + cbGrayed: SetState(cbChecked); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomRadioButton } + +constructor TSpTBXCustomRadioButton.Create(AOwner: TComponent); +begin + inherited; + TabStop := False; +end; + +procedure TSpTBXCustomRadioButton.DoInternalGlyphDraw(ACanvas: TCanvas; + AGlyphRect: TRect); +begin + if IsImageIndexValid then + inherited + else + SpDrawXPRadioButtonGlyph(ACanvas, AGlyphRect, Enabled, Checked, MouseInControl, Pushed, SkinType); +end; + +procedure TSpTBXCustomRadioButton.AdjustFont(AFont: TFont); +var + State: TSpTBXSkinStatesType; +begin + if (LinkText <> '') and MouseInControl then + inherited + else + if (SkinType = sknSkin) and ((AFont.Color = clWindowText) or (AFont.Color = clNone)) then begin + State := CurrentSkin.GetState(Enabled, Pushed, MouseInControl, Checked); + AFont.Color := CurrentSkin.GetTextColor(skncRadioButton, State); + end; +end; + +function TSpTBXCustomRadioButton.CanUpdateExclusive: Boolean; +begin + // Special case on RadioButtons, UpdateExclusive on all + // the radiobuttons regardless of the GroupIndex + Result := True; +end; + +procedure TSpTBXCustomRadioButton.Click; +begin + if StateChanged then + inherited + else + if not Checked then Toggle; // Toggle calls OnClick +end; + +procedure TSpTBXCustomRadioButton.CMFocusChanged(var Message: TCMFocusChanged); +begin + inherited; + if Focused then + Toggle; +end; + +procedure TSpTBXCustomRadioButton.SetChecked(Value: Boolean); +var + WasChecked: Boolean; +begin + WasChecked := Checked; + inherited; + TabStop := Value; + // When Checked is true OnClick must be fired + if not WasChecked and Value then begin + StateChanged := True; + try + Click; + finally + StateChanged := False; + end; + end; +end; + +procedure TSpTBXCustomRadioButton.Toggle; +begin + if not Checked then Checked := True; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXRadioGroupButton } + +type + TSpTBXRadioGroupButton = class(TSpTBXRadioButton) + public + constructor InternalCreate(RadioGroup: TSpTBXCustomRadioGroup); + destructor Destroy; override; + end; + +constructor TSpTBXRadioGroupButton.InternalCreate(RadioGroup: TSpTBXCustomRadioGroup); +begin + inherited Create(RadioGroup); + RadioGroup.FButtons.Add(Self); + Parent := RadioGroup; + AutoSize := False; + Visible := False; + Enabled := RadioGroup.Enabled; + ParentShowHint := False; + TabStop := False; + OnClick := RadioGroup.ButtonClick; +end; + +destructor TSpTBXRadioGroupButton.Destroy; +begin + TSpTBXCustomRadioGroup(Owner).FButtons.Remove(Self); + inherited Destroy; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomRadioGroup } + +constructor TSpTBXCustomRadioGroup.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + ControlStyle := ControlStyle - [csAcceptsControls]; + FButtons := TList.Create; + FItems := TTntStringList.Create; + TTntStringList(FItems).OnChange := ItemsChange; + FItemIndex := -1; + FColumns := 1; +end; + +destructor TSpTBXCustomRadioGroup.Destroy; +begin + SetButtonCount(0); + TTntStringList(FItems).OnChange := nil; + FItems.Free; + FButtons.Free; + inherited Destroy; +end; + +procedure TSpTBXCustomRadioGroup.FlipChildren(AllLevels: Boolean); +begin + { The radio buttons are flipped using BiDiMode } +end; + +procedure TSpTBXCustomRadioGroup.ArrangeButtons; +var + ButtonsPerCol, ButtonWidth, ButtonHeight, TopMargin, I: Integer; + DC: HDC; + SaveFont: HFont; + Metrics: TTextMetric; + DeferHandle: THandle; + ALeft: Integer; +begin + if (FButtons.Count <> 0) and not FReading then + begin + DC := GetDC(0); + SaveFont := SelectObject(DC, Font.Handle); + GetTextMetrics(DC, Metrics); + SelectObject(DC, SaveFont); + ReleaseDC(0, DC); + ButtonsPerCol := (FButtons.Count + FColumns - 1) div FColumns; + ButtonWidth := (Width - 10) div FColumns; + I := Height - Metrics.tmHeight - 5; + ButtonHeight := I div ButtonsPerCol; + TopMargin := Metrics.tmHeight + 1 + (I mod ButtonsPerCol) div 2; + DeferHandle := BeginDeferWindowPos(FButtons.Count); + try + for I := 0 to FButtons.Count - 1 do + with TSpTBXRadioGroupButton(FButtons[I]) do + begin + BiDiMode := Self.BiDiMode; + ALeft := (I div ButtonsPerCol) * ButtonWidth + 8; + if UseRightToLeftAlignment then + ALeft := Self.ClientWidth - ALeft - ButtonWidth; + DeferHandle := DeferWindowPos(DeferHandle, Handle, 0, + ALeft, + (I mod ButtonsPerCol) * ButtonHeight + TopMargin, + ButtonWidth, ButtonHeight, + SWP_NOZORDER or SWP_NOACTIVATE); + Visible := True; + end; + finally + EndDeferWindowPos(DeferHandle); + end; + end; +end; + +procedure TSpTBXCustomRadioGroup.ButtonClick(Sender: TObject); +begin + if not FUpdating then begin + FItemIndex := FButtons.IndexOf(Sender); + Changed; + Click; + end; +end; + +procedure TSpTBXCustomRadioGroup.InvalidateBackground(InvalidateChildren: Boolean); +var + I: Integer; + T: TSpTBXSkinType; +begin + inherited; + + if not InvalidateChildren and not (csDestroying in ComponentState) then + if HandleAllocated then begin + T := SkinType; + for I := 0 to FButtons.Count - 1 do + Buttons[I].SkinType := T; + end; +end; + +procedure TSpTBXCustomRadioGroup.ItemsChange(Sender: TObject); +begin + if not FReading then begin + if FItemIndex >= FItems.Count then FItemIndex := FItems.Count - 1; + UpdateButtons; + end; +end; + +procedure TSpTBXCustomRadioGroup.Loaded; +begin + inherited Loaded; + ArrangeButtons; +end; + +procedure TSpTBXCustomRadioGroup.ReadState(Reader: TReader); +begin + FReading := True; + try + inherited ReadState(Reader); + finally + FReading := False; + end; + UpdateButtons; +end; + +procedure TSpTBXCustomRadioGroup.SetButtonCount(Value: Integer); +begin + while FButtons.Count < Value do + TSpTBXRadioGroupButton.InternalCreate(Self); + while FButtons.Count > Value do + TSpTBXRadioGroupButton(FButtons.Last).Free; +end; + +procedure TSpTBXCustomRadioGroup.SetColumns(Value: Integer); +begin + if Value < 1 then Value := 1; + if Value > 16 then Value := 16; + if FColumns <> Value then begin + FColumns := Value; + ArrangeButtons; + Invalidate; + end; +end; + +procedure TSpTBXCustomRadioGroup.SetFocus; +begin + inherited; + if Enabled and (FItemIndex > -1) then + GetButtons(FItemIndex).SetFocus; +end; + +procedure TSpTBXCustomRadioGroup.SetItemIndex(Value: Integer); +begin + if FReading then + FItemIndex := Value + else begin + if Value < -1 then Value := -1; + if Value >= FButtons.Count then Value := FButtons.Count - 1; + if FItemIndex <> Value then + begin + if FItemIndex >= 0 then + GetButtons(FItemIndex).Checked := False; + FItemIndex := Value; + if FItemIndex >= 0 then + GetButtons(FItemIndex).Checked := True; + end; + end; +end; + +procedure TSpTBXCustomRadioGroup.SetItems(Value: TTntStrings); +begin + FItems.Assign(Value); +end; + +procedure TSpTBXCustomRadioGroup.UpdateButtons; +var + I: Integer; +begin + SetButtonCount(FItems.Count); + for I := 0 to FButtons.Count - 1 do + Buttons[I].Caption := FItems[I]; + if FItemIndex >= 0 then begin + FUpdating := True; + try + GetButtons(FItemIndex).Checked := True; + finally + FUpdating := False; + end; + end; + ArrangeButtons; + Invalidate; +end; + +procedure TSpTBXCustomRadioGroup.CMEnabledChanged(var Message: TMessage); +var + I: Integer; +begin + inherited; + for I := 0 to FButtons.Count - 1 do + GetButtons(I).Enabled := Enabled; +end; + +procedure TSpTBXCustomRadioGroup.CMFontChanged(var Message: TMessage); +begin + inherited; + ArrangeButtons; +end; + +procedure TSpTBXCustomRadioGroup.WMSize(var Message: TWMSize); +begin + inherited; + ArrangeButtons; +end; + +procedure TSpTBXCustomRadioGroup.GetChildren(Proc: TGetChildProc; Root: TComponent); +begin + // Do nothing +end; + +function TSpTBXCustomRadioGroup.GetButtons(Index: Integer): TSpTBXRadioButton; +begin + Result := TSpTBXRadioButton(FButtons[Index]); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomButton } + +constructor TSpTBXCustomButton.Create(AOwner: TComponent); +begin + inherited; + + FBitmapTransparent := True; + FBitmap := TBitmap.Create; + FBitmap.OnChange := BitmapChanged; + + FPopupControl := Self; + FDropDownArrow := True; + Alignment := taCenter; + Autosize := False; + DrawPushedCaption := True; + SpaceAsClick := True; + Width := 75; + Height := 25; +end; + +destructor TSpTBXCustomButton.Destroy; +begin + StopRepeat; + FBitmap.Free; + inherited; +end; + +procedure TSpTBXCustomButton.CreateWnd; +begin + inherited; + FActive := FDefault; +end; + +procedure TSpTBXCustomButton.AdjustFont(AFont: TFont); +var + State: TSpTBXSkinStatesType; +begin + if (LinkText <> '') and MouseInControl then + inherited + else + if (SkinType = sknSkin) and ((AFont.Color = clWindowText) or (AFont.Color = clNone)) then begin + State := CurrentSkin.GetState(Enabled, Pushed, MouseInControl, Checked); + AFont.Color := CurrentSkin.GetTextColor(skncButton, State); + end; +end; + +procedure TSpTBXCustomButton.BitmapChanged(Sender: TObject); +begin + Invalidate; +end; + +function TSpTBXCustomButton.BitmapValid: boolean; +begin + Result := (Bitmap <> nil) and (not Bitmap.Empty) and (Bitmap.Height mod ConstStatesCount = 0); +end; + +procedure TSpTBXCustomButton.Click; +var + P: TPoint; + Form: TCustomForm; + M: TPopupMenu; + SpTBXPopup: ISpTBXPopupMenu; + + procedure RemoveClicks; + var + RepostList: TList; + Repost: Boolean; + I: Integer; + Msg: TMsg; + P: TPoint; + begin + RepostList := TList.Create; + try + while PeekMessage(Msg, 0, WM_LBUTTONDOWN, WM_MBUTTONDBLCLK, PM_REMOVE) do + with Msg do + begin + Repost := True; + case Message of + WM_QUIT: begin + { Throw back any WM_QUIT messages } + PostQuitMessage(wParam); + Break; + end; + WM_LBUTTONDOWN, WM_LBUTTONDBLCLK, + WM_RBUTTONDOWN, WM_RBUTTONDBLCLK, + WM_MBUTTONDOWN, WM_MBUTTONDBLCLK: begin + P := SmallPointToPoint(TSmallPoint(lParam)); + Windows.ClientToScreen(hwnd, P); + if FindDragTarget(P, True) = Self then Repost := False; + end; + end; + if Repost then + begin + RepostList.Add(AllocMem(SizeOf(TMsg))); + PMsg(RepostList.Last)^ := Msg; + end; + end; + + for I := 0 to RepostList.Count-1 do + begin + with PMsg(RepostList[I])^ do PostMessage(hwnd, message, wParam, lParam); + FreeMem(RepostList[I]); + end; + finally + RepostList.Free; + end; + end; + +begin + if not FRepeating then begin + M := GetInternalDropDownMenu; + if Assigned(M) then begin + FDropDownMenuVisible := True; + try + UpdateTracking(True); + MouseCapture := False; + M.PopupComponent := Self; + + if M.GetInterface(ISpTBXPopupMenu, SpTBXPopup) then begin + if not SpTBXPopup.InternalPopup(0, 0, False, FPopupControl) then + FDropDownMenuVisible := False; + end + else begin + P := ClientToScreen(Point(0, Height)); + M.Popup(P.X, P.Y); + FDropDownMenuVisible := False; + end; + finally + Invalidate; + RemoveClicks; + end; + Exit; // don't call the Click handler if the DropDownMenu is shown + end; + + Form := GetParentForm(Self); + if Assigned(Form) then Form.ModalResult := FModalResult; + end; + + inherited; +end; + +function TSpTBXCustomButton.DoDrawDropDownArrow(ACanvas: TCanvas; + ARect: TRect): Boolean; +var + R: TRect; + P: TPoint; +begin + Result := True; + if FDropDownArrow and Assigned(FDropDownMenu) then begin + R := ARect; + R.Left := R.Right - GetTextMargins.Right; + + P.X := (R.Left + R.Right) div 2 - 1; + P.Y := (R.Top + R.Bottom) div 2 - 1; + SpDrawArrow(ACanvas, P.X, P.Y, ACanvas.Font.Color, True, False, 2); + end; +end; + +function TSpTBXCustomButton.DoDrawItem(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage): Boolean; +var + B: TBitmap; + T: TSpTBXSkinType; + State: TSpTBXSkinStatesType; + Defaulted: Boolean; +begin + Result := inherited DoDrawItem(ACanvas, ARect, PaintStage); + + if Result and (PaintStage = pstPrePaint) then + // When Flat is true draw the button only when it's needed + if not Flat or (MouseInControl or Focused or FPushed or Checked) then begin + if BitmapValid then begin + B := TBitmap.Create; + try + B.Width := ARect.Right - ARect.Left; + B.Height := ARect.Bottom - ARect.Top; + SetStretchBltMode(B.Canvas.Handle, COLORONCOLOR); + B.Canvas.CopyRect(ARect, Bitmap.Canvas, GetSkinStateRect); + if FBitmapTransparent then + B.Transparent := True; + ACanvas.Draw(0, 0, B); + finally + B.Free; + end; + end + else begin + T := SpTBXSkinType(SkinType); + if Flat and FToolbarStyle then begin + State := CurrentSkin.GetState(Enabled, Pushed, MouseInControl, Checked); + SpDrawXPToolbarButton(ACanvas, ARect, State, T); + end + else begin + if T = sknSkin then + Defaulted := False + else + Defaulted := FActive; + SpDrawXPButton(ACanvas, ARect, Enabled, Pushed, MouseInControl, Checked, False, Defaulted, T); + end; + end; + end; + + // Draw the button arrow + if Result and (PaintStage = pstPostPaint) then + DoDrawDropDownArrow(ACanvas, ARect); +end; + +function TSpTBXCustomButton.GetFocused: Boolean; +begin + Result := Focused and (IsDroppedDown or (inherited GetFocused)); +end; + +function TSpTBXCustomButton.GetFocusRect(R, TextR, GlyphR: TRect): TRect; +begin + Result := R; + if SpTBXSkinType(SkinType) = sknNone then + InflateRect(Result, -4, -4) + else + InflateRect(Result, -3, -3); +end; + +function TSpTBXCustomButton.GetInternalDropDownMenu: TPopupMenu; +begin + Result := FDropDownMenu; +end; + +function TSpTBXCustomButton.GetPushed: Boolean; +begin + Result := IsDroppedDown or (inherited GetPushed); +end; + +function TSpTBXCustomButton.GetTextMargins: TRect; +const + ArrowWidth = 5; +begin + Result := Rect(8, 2, 8, 2); + if FDropDownArrow and Assigned(FDropdownMenu) then + Inc(Result.Right, ArrowWidth + 4); +end; + +function TSpTBXCustomButton.IsDroppedDown: Boolean; +begin + Result := FDropDownMenuVisible; +end; + +function TSpTBXCustomButton.GetSkinStateRect: TRect; +var + W, H: integer; +begin + // Finds the skin rect based on the button state + Result := Rect(0, 0, 0, 0); + + if BitmapValid then begin + W := Bitmap.Width; + H := (Bitmap.Height div ConstStatesCount); // 4 states + if not Enabled then + Result := Bounds(0, H * 3, W, H) // 4th state (disabled) + else begin + if Checked or Pushed then + Result := Bounds(0, H * 2, W, H) // 3rd state (down) + else + if MouseInControl then + Result := Bounds(0, H * 1, W, H) // 2nd state (hottrack) + else + Result := Bounds(0, H * 0, W, H); // 1st state (up) + end; + end; +end; + +procedure TSpTBXCustomButton.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + inherited; + if Enabled and (Button = mbLeft) then begin + if Repeating then begin + Click; + ControlState := ControlState - [csClicked]; + if not Assigned(FRepeatTimer) then FRepeatTimer := TTimer.Create(Self); + FRepeatTimer.Interval := ConstInitRepeatPause; + FRepeatTimer.OnTimer := RepeatTimerHandler; + FRepeatTimer.Enabled := True; + end; + end; +end; + +procedure TSpTBXCustomButton.MouseUp(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + inherited; + if Button = mbLeft then StopRepeat; +end; + +procedure TSpTBXCustomButton.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited; + if Operation = opRemove then + if AComponent = DropdownMenu then DropdownMenu := nil; +end; + +procedure TSpTBXCustomButton.RepeatTimerHandler(Sender: TObject); +begin + FRepeatTimer.Interval := ConstRepeatPause; + if Repeating then begin + if Pushed then + Click; + end + else + StopRepeat; +end; + +procedure TSpTBXCustomButton.StopRepeat; +begin + if Assigned(FRepeatTimer) then begin + FRepeatTimer.Free; + FRepeatTimer := nil; + end; +end; + +procedure TSpTBXCustomButton.SetBitmap(const Value: TBitmap); +begin + FBitmap.Assign(Value); + Invalidate; +end; + +procedure TSpTBXCustomButton.SetDefault(const Value: Boolean); +var + Form: TCustomForm; +begin + FDefault := Value; + if HandleAllocated then begin + Form := GetParentForm(Self); + if Assigned(Form) then + Form.Perform(CM_FOCUSCHANGED, 0, Longint(Form.ActiveControl)); + end; +end; + +procedure TSpTBXCustomButton.SetDropDownArrow(const Value: Boolean); +begin + if FDropDownArrow <> Value then begin + FDropDownArrow := Value; + Invalidate; + end; +end; + +procedure TSpTBXCustomButton.SetDropDownMenu(Value: TPopupMenu); +begin + if FDropDownMenu <> Value then begin + if Assigned(FDropDownMenu) then RemoveFreeNotification(FDropDownMenu); + FDropDownMenu := Value; + if Assigned(FDropDownMenu) then FreeNotification(FDropDownMenu); + Invalidate; + end; +end; + +procedure TSpTBXCustomButton.SetFlat(const Value: Boolean); +begin + if FFlat <> Value then begin + FFlat := Value; + Invalidate; + end; +end; + +procedure TSpTBXCustomButton.CMDialogKey(var Message: TCMDialogKey); +begin + with Message do + if (((CharCode = VK_RETURN) and FActive) or + ((CharCode = VK_ESCAPE) and FCancel)) and + (KeyDataToShiftState(Message.KeyData) = []) and CanFocus then + begin + Click; + Result := 1; + end + else + inherited; +end; + +procedure TSpTBXCustomButton.CMFocusChanged(var Message: TCMFocusChanged); +begin + with Message do + if Sender is TSpTBXCustomButton then + FActive := Sender = Self + else + FActive := FDefault; + inherited; +end; + +procedure TSpTBXCustomButton.CMSPPopupClose(var Message: TMessage); +begin + FDropDownMenuVisible := False; + Invalidate; + inherited; +end; + +procedure TSpTBXCustomButton.WMCancelMode(var Message: TWMCancelMode); +begin + inherited; + StopRepeat; + UpdateTracking(True); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomSpeedButton } + +constructor TSpTBXCustomSpeedButton.Create(AOwner: TComponent); +begin + inherited; + ControlStyle := ControlStyle - [csSetCaption]; + SetBounds(0, 0, 23, 22); + ToolbarStyle := True; +end; + +function TSpTBXCustomSpeedButton.CanFocus: Boolean; +begin + Result := False; +end; + +procedure TSpTBXCustomSpeedButton.Click; +begin + if FGroupIndex <> 0 then + if AllowAllUp then + Checked := not Checked + else + Checked := True; + inherited +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomProgressBar } + +constructor TSpTBXCustomProgressBar.Create(AOwner: TComponent); +begin + inherited; + FMax := 100; + FMin := 0; + FPosition := 0; + FProgressVisible := True; + FCaptionGlow := gldAll; + FCaptionType := pctPercentage; + + Alignment := taCenter; + Autosize := False; + Width := 150; + Height := 17; + Font.Style := Font.Style + [fsBold]; + TabStop := False; +end; + +procedure TSpTBXCustomProgressBar.AdjustFont(AFont: TFont); +var + State: TSpTBXSkinStatesType; +begin + if (LinkText <> '') and MouseInControl then + inherited + else + if (SkinType = sknSkin) and ((AFont.Color = clWindowText) or (AFont.Color = clNone)) then begin + State := CurrentSkin.GetState(Enabled, Pushed, MouseInControl, Checked); + AFont.Color := CurrentSkin.GetTextColor(skncProgressBar, State); + end; +end; + +function TSpTBXCustomProgressBar.DoDrawItem(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage): Boolean; +var + I: Integer; + T: TSpTBXSkinType; +begin + Result := inherited DoDrawItem(ACanvas, ARect, PaintStage); + if Result and (PaintStage = pstPrePaint) then begin + T := SpTBXSkinType(SkinType); + I := SpDrawXPProgressBar(ACanvas, ARect, FVertical, FSmooth, FProgressVisible, FMin, FMax, FPosition, T); + case FCaptionType of + pctNone: Caption := ''; + pctPercentage: Caption := IntToStr(I) + '%'; + pctProgress: Caption := IntToStr(FPosition); + end; + end; +end; + +procedure TSpTBXCustomProgressBar.DoProgressChange; +begin + if Assigned(FOnProgressChange) then FOnProgressChange(Self, Position); +end; + +function TSpTBXCustomProgressBar.GetTextMargins: TRect; +begin + Result := Rect(8, 2, 8, 2); +end; + +procedure TSpTBXCustomProgressBar.SetCaptionType(const Value: TSpTBXProgressCaption); +begin + if FCaptionType <> Value then begin + FCaptionType := Value; + if Value <> pctDefault then Caption := ''; + Invalidate; + end; +end; + +procedure TSpTBXCustomProgressBar.SetMax(const Value: integer); +begin + if FMax <> Value then begin + FMax := Value; + Invalidate; + end; +end; + +procedure TSpTBXCustomProgressBar.SetMin(const Value: integer); +begin + if FMin <> Value then begin + FMin := Value; + Invalidate; + end; +end; + +procedure TSpTBXCustomProgressBar.SetPosition(Value: integer); +begin + if Value > FMax then Value := FMax + else if Value < FMin then Value := FMin; + if FPosition <> Value then begin + FPosition := Value; + Invalidate; + DoProgressChange; + end; +end; + +procedure TSpTBXCustomProgressBar.SetProgressVisible(const Value: Boolean); +begin + if FProgressVisible <> Value then begin + FProgressVisible := Value; + Invalidate; + end; +end; + +procedure TSpTBXCustomProgressBar.SetSmooth(const Value: Boolean); +begin + if FSmooth <> Value then begin + FSmooth := Value; + Invalidate; + end; +end; + +procedure TSpTBXCustomProgressBar.SetVertical(const Value: Boolean); +begin + if FVertical <> Value then begin + FVertical := Value; + if FVertical then + FCaptionRoatationAngle := tra90 + else + FCaptionRoatationAngle := tra0; + if Width > Height then + SetBounds(Left, Top, Height, Width); + Invalidate; + end; +end; + +procedure TSpTBXCustomProgressBar.StepIt(Delta: Integer = 1); +begin + SetPosition(FPosition + Delta); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXTrackBar } + +constructor TSpTBXTrackBar.Create(AOwner: TComponent); +begin + inherited; + FSkinType := sknSkin; + FTickMarks := tmxBottomRight; + SkinManager.AddSkinNotification(Self); +end; + +procedure TSpTBXTrackBar.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + FCanDrawChannelSelection := (Params.Style and TBS_ENABLESELRANGE) <> 0; +end; + +destructor TSpTBXTrackBar.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + inherited; +end; + +function TSpTBXTrackBar.ChannelRect: TRect; +var + R: TRect; +begin + // TBM_GETCHANNELRECT allways returns the horizontal channel rect, even + // when the Orientation is vertical. + SendMessage(Handle, TBM_GETCHANNELRECT, 0, Integer(@Result)); + if Orientation = trVertical then begin + R := Result; + Result := Rect(R.Top, R.Left, R.Bottom, R.Right); + end; +end; + +function TSpTBXTrackBar.DoDrawChannel(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage): Boolean; +begin + Result := True; + if Assigned(FOnDrawChannel) then FOnDrawChannel(Self, ACanvas, ARect, PaintStage, Result); +end; + +function TSpTBXTrackBar.DoDrawChannelTicks(ACanvas: TCanvas; X, Y: Integer): Boolean; +begin + Result := True; + if Assigned(FOnDrawChannelTicks) then FOnDrawChannelTicks(Self, ACanvas, X, Y, Result); +end; + +function TSpTBXTrackBar.DoDrawThumb(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage): Boolean; +begin + Result := True; + if Assigned(FOnDrawThumb) then FOnDrawThumb(Self, ACanvas, ARect, PaintStage, Result); +end; + +procedure TSpTBXTrackBar.DrawTicks(ACanvas: TCanvas); +var + PosArray: array of Integer; + I, Count, Y, iStart, iEnd: Integer; + ChannelR, ThumbR: TRect; + FirstTickSize, TickSize, TickDelta: Integer; + LastPenColor: TColor; +begin + if TickStyle = tsNone then Exit; + + // Returns the position of the ticks on the client area + // Check if Max - Min > 2 to see if the ticks array is valid. + Count := Max - Min; + if Count < 2 then + Count := 2 + else + Count := Count + 1; + SetLength(PosArray, Count); + + // Fill the array, the first and last ticks are not included in the ticks array: + // http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/trackbar/messages/tbm_getticpos.asp?frame=true + // First we need to get the middle ticks + // 0 1 2 3 4 5 6 7 8 9 // Tick positions seen on the trackbar. + // 1 2 3 4 5 6 7 8 // Tick positions whose position can be identified. + // 0 1 2 3 4 5 6 7 // Index numbers for the identifiable positions. + if Count >= 2 then begin + iStart := 1; + iEnd := Count - 1 - 1; + for I := iStart to iEnd do + PosArray[I] := SendMessage(Self.Handle, TBM_GETTICPOS, I - 1, 0); + end; + + LastPenColor := ACanvas.Pen.Color; + + case SpTBXSkinType(FSkinType) of + sknNone: + ACanvas.Pen.Color := clBlack; + sknWindows: + ACanvas.Pen.Color := clBtnShadow; + sknSkin: + if CurrentSkin.Options(skncTrackBar, sknsNormal).TextColor <> clNone then + ACanvas.Pen.Color := CurrentSkin.Options(skncTrackBar, sknsNormal).TextColor + else + ACanvas.Pen.Color := clBtnShadow; + end; + + SendMessage(Self.Handle, TBM_GETTHUMBRECT, 0, Integer(@ThumbR)); + ChannelR := ChannelRect; + FirstTickSize := 4; + TickSize := 3; + Y := 0; + + if Orientation = trHorizontal then begin + I := (ThumbR.Right - ThumbR.Left) div 2; + PosArray[0] := ChannelR.Left + I; + PosArray[Count - 1] := ChannelR.Right - I - 1; + case TickMarks of + tmxBottomRight: + begin + Y := ThumbR.Bottom + 1; + FirstTickSize := 4; + TickSize := 3; + end; + tmxTopLeft: + begin + Y := ThumbR.Top - 2; + FirstTickSize := -4; + TickSize := -3; + end; + tmxBoth: + begin + Y := ThumbR.Top - 2; + FirstTickSize := -4; + TickSize := -3; + end; + tmxCenter: + begin + Y := ChannelR.Top + (ChannelR.Bottom - ChannelR.Top) div 2; + FirstTickSize := 1; + TickSize := 1; + end; + end; + for I := 0 to Count - 1 do + if DoDrawChannelTicks(ACanvas, PosArray[I], Y) then begin + TickDelta := 0; + if (I = 0) or (I = Count - 1) then + TickDelta := FirstTickSize + else + if TickStyle = tsManual then TickDelta := TickSize + else if I mod Frequency = 0 then TickDelta := TickSize; + if TickDelta <> 0 then begin + ACanvas.MoveTo(PosArray[I], Y); + ACanvas.LineTo(PosArray[I], Y + TickDelta); + if TickMarks = tmxBoth then begin + ACanvas.MoveTo(PosArray[I], ThumbR.Bottom + 1); + ACanvas.LineTo(PosArray[I], ThumbR.Bottom + 1 - TickDelta); + end; + end; + end; + end + else begin + I := (ThumbR.Bottom - ThumbR.Top) div 2; + PosArray[0] := ChannelR.Top + I; + PosArray[Count - 1] := ChannelR.Bottom - I - 1; + case TickMarks of + tmxBottomRight: + begin + Y := ThumbR.Right + 1; + FirstTickSize := 4; + TickSize := 3; + end; + tmxTopLeft: + begin + Y := ThumbR.Left - 2; + FirstTickSize := -4; + TickSize := -3; + end; + tmxBoth: + begin + Y := ThumbR.Left - 2; + FirstTickSize := -4; + TickSize := -3; + end; + tmxCenter: + begin + Y := ChannelR.Left + (ChannelR.Right - ChannelR.Left) div 2; + FirstTickSize := 1; + TickSize := 1; + end; + end; + for I := 0 to Count - 1 do + if DoDrawChannelTicks(ACanvas, Y, PosArray[I]) then begin + TickDelta := 0; + if (I = 0) or (I = Count - 1) then + TickDelta := FirstTickSize + else + if TickStyle = tsManual then TickDelta := TickSize + else if I mod Frequency = 0 then TickDelta := TickSize; + if TickDelta <> 0 then begin + ACanvas.MoveTo(Y, PosArray[I]); + ACanvas.LineTo(Y + TickDelta, PosArray[I]); + if TickMarks = tmxBoth then begin + ACanvas.MoveTo(ThumbR.Right + 1, PosArray[I]); + ACanvas.LineTo(ThumbR.Right + 1 - TickDelta, PosArray[I]); + end; + end; + end; + end; + + ACanvas.Pen.Color := LastPenColor; +end; + +function TSpTBXTrackBar.MouseInThumb: Boolean; +var + P: TPoint; + R: TRect; +begin + if csDesigning in ComponentState then + Result := False + else begin + SendMessage(Handle, TBM_GETTHUMBRECT, 0, Integer(@R)); + GetCursorPos(P); + P := ScreenToClient(P); + Result := PtInRect(R, P) + end; + + if SpTBXSkinType(SkinType) = sknWindows then begin + if Focused then Result := not (GetCaptureControl = Self); + end + else + Result := GetCaptureControl = Self; +end; + +procedure TSpTBXTrackBar.InvalidateBackground; +begin + // Invalidate, Repaint, Update, SetWindowPos and RedrawWindow doesn't work + // on Trackbars (CN_NOTIFY messages are not sent), we have to send a + // WM_SIZE message in order to invalidate the control. + if HandleAllocated then + SendMessage(Handle, WM_SIZE, SIZE_RESTORED, MakeLParam(Width, Height)); +end; + +procedure TSpTBXTrackBar.SetSkinType(const Value: TSpTBXSkinType); +begin + if Value <> FSkinType then begin + FSkinType := Value; + InvalidateBackground; + end; +end; + +procedure TSpTBXTrackBar.SetTickMarks(const Value: TSpTBXTickMark); +const + A: array [TSpTBXTickMark] of TTickMark = (tmBottomRight, tmTopLeft, tmBoth, tmBoth); +begin + if Value <> FTickMarks then begin + if A[FTickMarks] = A[Value] then begin + FTickMarks := Value; + inherited TickMarks := A[Value]; + RecreateWnd; + end + else begin + FTickMarks := Value; + inherited TickMarks := A[Value]; + end; + end; +end; + +procedure TSpTBXTrackBar.CMSpTBXControlsInvalidate(var Message: TMessage); +begin + InvalidateBackground; + Message.Result := 1; +end; + +procedure TSpTBXTrackBar.CNNotify(var Message: TWMNotify); +var + Info: PNMCustomDraw; + ACanvas: TCanvas; + R: TRect; + Rgn: HRGN; + Offset: Integer; +begin + if Message.NMHdr.code = NM_CUSTOMDRAW then begin + Message.Result := CDRF_DODEFAULT; + Info := Pointer(Message.NMHdr); + case Info.dwDrawStage of + CDDS_PREPAINT: + Message.Result := CDRF_NOTIFYITEMDRAW; + CDDS_ITEMPREPAINT: + begin + ACanvas := TCanvas.Create; + ACanvas.Lock; + try + ACanvas.Handle := Info.hdc; + case Info.dwItemSpec of + TBCD_TICS: + begin + R := ClientRect; + SpDrawParentBackground(Self, ACanvas.Handle, R); + if Focused then + SpDrawFocusRect(ACanvas, R); + if FTickMarks <> tmxCenter then + DrawTicks(ACanvas); + Message.Result := CDRF_SKIPDEFAULT; + end; + TBCD_THUMB: + begin + if SliderVisible then begin + SendMessage(Handle, TBM_GETTHUMBRECT, 0, Integer(@R)); + if DoDrawThumb(ACanvas, R, pstPrePaint) then + SpDrawXPTrackBar(ACanvas, R, TBCD_THUMB, Orientation = trVertical, MouseInThumb, False, FTickMarks, Min, Max, SelStart, SelEnd, FSkinType); + DoDrawThumb(ACanvas, R, pstPostPaint); + Message.Result := CDRF_SKIPDEFAULT; + end; + end; + TBCD_CHANNEL: + begin + SendMessage(Handle, TBM_GETTHUMBRECT, 0, Integer(@R)); + Offset := 0; + if Focused then + Inc(Offset); + if Orientation = trHorizontal then begin + R.Left := ClientRect.Left + Offset; + R.Right := ClientRect.Right - Offset; + end + else begin + R.Top := ClientRect.Top + Offset; + R.Bottom := ClientRect.Bottom - Offset; + end; + with R do + Rgn := CreateRectRgn(Left, Top, Right, Bottom); + SelectClipRgn(ACanvas.Handle, Rgn); + try + SpDrawParentBackground(Self, ACanvas.Handle, ClientRect); + R := ChannelRect; + + if DoDrawChannel(ACanvas, R, pstPrePaint) then + SpDrawXPTrackBar(ACanvas, R, TBCD_CHANNEL, Orientation = trVertical, False, FCanDrawChannelSelection, FTickMarks, Min, Max, SelStart, SelEnd, FSkinType); + DoDrawChannel(ACanvas, R, pstPostPaint); + + // Draw channel tics + if FTickMarks = tmxCenter then + DrawTicks(ACanvas); + finally + DeleteObject(Rgn); + SelectClipRgn(ACanvas.Handle, 0); + end; + Message.Result := CDRF_SKIPDEFAULT; + end; + end; + finally + ACanvas.Unlock; + ACanvas.Handle := 0; + ACanvas.Free; + end; + end; + end; + end; +end; + +procedure TSpTBXTrackBar.WMEraseBkGnd(var Message: TMessage); +begin + if SpTBXSkinType(SkinType) <> sknNone then + Message.Result := 1 + else + inherited; +end; + +procedure TSpTBXTrackBar.WMSpSkinChange(var Message: TMessage); +begin + InvalidateBackground; +end; + +end. diff --git a/internal/2.4.4/1/Source/SpTBXCustomizer.pas b/internal/2.4.4/1/Source/SpTBXCustomizer.pas new file mode 100644 index 0000000..aac26c0 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXCustomizer.pas @@ -0,0 +1,1636 @@ +unit SpTBXCustomizer; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +History: +2 December 2009 - version 2.4.4 + - No changes. + +13 September 2009 - version 2.4.3 + - Fixed incorrect Customizer shortcut processing when the + shortcut text contains a space, thanks to Jim Kueneman + for reporting this. + +8 May 2009 - version 2.4.2 + - No changes. + +15 March 2009 - version 2.4.1 + - Fixed incorrect Customizer loading and saving when Frames + were used, thanks to Eduardo Mauro for reporting this. + +17 January 2009 - version 2.4 + - No changes. + +26 September 2008 - version 2.3 + - No changes. + +29 July 2008 - version 2.2 + - No changes. + +26 June 2008 - version 2.1 + - No changes. + +3 May 2008 - version 2.0 + - No changes. + +2 April 2008 - version 1.9.5 + - No changes. + +3 February 2008 - version 1.9.4 + - No changes. + +19 January 2008 - version 1.9.3 + - Added BlankSeparators property to TSpTBXCustomizer. + - Fixed AV on TSpTBXCustomizer when ShorcutsList was nil + when calling ApplyItemOptions, thanks to PyScripter for + reporting this. + +26 December 2007 - version 1.9.2 + - No changes. + +1 December 2007 - version 1.9.1 + - No changes. + +20 November 2007 - version 1.9 + - Removed TBX dependency. + - Added Reset method to TSpTBXCustomizer, used to reinitialize + the toolbars. + +8 February 2007 - version 1.8.3 + - Added DeleteLayout method to TSpTBXCustomizer. + - The customizer now closes when ESC is pressed, thanks to + Jim Kueneman for reporting this. + - The customizer now saves the Toolbar's DisplayMode, thanks to + Jim Kueneman for reporting this. + +17 December 2006 - version 1.8.2 + - No changes. + +24 November 2006 - version 1.8.1 + - No changes. + +27 August 2006 - version 1.8 + - Fixed TSpTBXCustomizer items saving when the MenuBar items are + nested in more than 3 subitems levels, thanks to Jim Kueneman + for reporting this. + +15 June 2006 - version 1.7 + - Added SaveFormState property to TSpTBXCustomizer, when SaveFormState + is true the main form position and WindowState are saved. + - Added Load and Save methods to TSpTBXCustomizer that loads/saves + the customizer options to a StringList, thanks to Philipp Hechter + for reporting this. + +4 May 2006 - version 1.6 + - No changes. + +12 April 2006 - version 1.5 + - No changes. + +27 February 2006 - version 1.4 + - No changes. + +10 February 2006 - version 1.3 + - No changes. + +28 December 2005 - version 1.2 + - Fixed incorrect ShortCut processing. + +18 October 2005 - version 1.1 + - Fixed TSpTBXCustomizer ShortCut processing method when + loading from file or registry. + - Fixed TSpTBXCustomizer support for separators items. + - Fixed TSpTBXCustomizer support for anchored items. + - Added OnGetShortcutsList event to the TSpTBXCustomizer to + allow the shortcuts list filtering. + - Added separator cloning support to the TSpTBXCustomizer. + +10 August 2005 - version 1.0 + - Initial release. + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, ImgList, IniFiles, + {$IFNDEF UNICODE} + TntClasses, + {$ENDIF} + TB2Dock, TB2Toolbar, TB2Item, + SpTBXSkins, SpTBXItem, SpTBXEditors; + + +type + +{$IFDEF UNICODE} + TTntStringList = TStringList; +{$ENDIF} + + TSpTBXCustomizer = class; + + TShortCutsProcessor = class + private + FActive: Boolean; + public + constructor Create; virtual; + destructor Destroy; override; + function MainWindowHook(var Message: TMessage): Boolean; + property Active: Boolean read FActive write FActive; + end; + + TSpTBXMenuBarShortcuts = class(TTntStringList) + private + FMenuBarName: string; + public + property MenuBarName: string read FMenuBarName write FMenuBarName; + end; + + TSpTBXCustomCustomizeForm = class(TForm) + private + FEmbedded: Boolean; + protected + FCustomizer: TSpTBXCustomizer; + FToolbarList: TTntStringList; + FItemList: TTntStringList; + FShortcutList: TTntStringList; + FSeparatorList: TTntStringList; + FBlankSeparatorList: TTntStringList; + procedure DoFillCommands(ToolbarList, ItemList, ShortcutsList: TTntStringList); virtual; abstract; + procedure DoShow; override; + procedure DoClose(var Action: TCloseAction); override; + procedure DoIconOptionsChange(UseSmallImages: Boolean); virtual; + procedure DoSkinChange; virtual; + procedure FillCommands; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + public + constructor Create(AOwner: TSpTBXCustomizer; EmbeddedParent: TWinControl); reintroduce; + destructor Destroy; override; + property Customizer: TSpTBXCustomizer read FCustomizer; + property Embedded: Boolean read FEmbedded; + end; + + TSpTBXCustomizeFormClass = class of TSpTBXCustomCustomizeForm; + + TSpTBXGetCustomizeFormClassEvent = procedure(Sender: TObject; var CustomizeFormClass: TSpTBXCustomizeFormClass) of object; + TSpTBXExtraOptionsEvent = procedure(Sender: TObject; ExtraOptions: TStringList) of object; + TSpTBXLayoutExtraOptionsEvent = procedure(Sender: TObject; LayoutName: string; ExtraOptions: TStringList) of object; + + TSpTBXIconOptionsChangeEvent = procedure(Sender: TObject; Toolbar: TTBCustomToolbar; UseSmallImages: Boolean) of object; + TSpTBXAcceptItemEvent = procedure(Sender: TObject; AItem: TTBCustomItem; var Accept: Boolean) of object; + + TSpTBXCustomizer = class(TComponent, ITBItems) + private + FLayouts: TStringList; + FResetState: TStringList; + FBlankSeparators: Boolean; + FItems: TTBRootItem; + FCustomizeForm: TSpTBXCustomCustomizeForm; + FMenuBar: TTBCustomToolbar; + FShowing: Boolean; + FSaveFormState: Boolean; + FOnShow: TNotifyEvent; + FOnClose: TNotifyEvent; + FOnCreateCustomizeForm: TNotifyEvent; + FOnGetCustomizeForm: TSpTBXGetCustomizeFormClassEvent; + FOnLoad: TSpTBXExtraOptionsEvent; + FOnSave: TSpTBXExtraOptionsEvent; + FOnLayoutLoad: TSpTBXLayoutExtraOptionsEvent; + FOnLayoutSave: TSpTBXLayoutExtraOptionsEvent; + FOnGetShortcutsList: TSpTBXAcceptItemEvent; + FOnIconOptionsChange: TSpTBXIconOptionsChangeEvent; + FOnSkinChange: TNotifyEvent; + function GetItems: TTBCustomItem; // For ITBItems interface + function GetImages: TCustomImageList; + procedure SetImages(Value: TCustomImageList); + procedure SetMenuBar(const Value: TTBCustomToolbar); + procedure SaveResetState(ShortcutsList: TSpTBXMenuBarShortcuts); + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + protected + function DoGetShortcutsList(AItem: TTBCustomItem): Boolean; virtual; + procedure DoIconOptionsChange(Toolbar: TTBCustomToolbar; UseSmallImages: Boolean); virtual; + procedure DoLoad(ExtraOptions: TStringList); virtual; + procedure DoSave(ExtraOptions: TStringList); virtual; + procedure DoLayoutLoad(LayoutName: string; ExtraOptions: TStringList); virtual; + procedure DoLayoutSave(LayoutName: string; ExtraOptions: TStringList); virtual; + procedure DoSkinChange; virtual; + procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; // For ITBItems interface + function GetCustomizeFormClass: TSpTBXCustomizeFormClass; virtual; + procedure GetShortcutList(ShortcutsList: TTntStringList); + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure SetupForm; virtual; + procedure ValidateContainer(AComponent: TComponent); override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Show; + procedure ShowEmbedded(AParent: TWinControl = nil); + procedure Close; + procedure Load(IniFile: TCustomIniFile; LoadLastLayout: Boolean = True); overload; + procedure Load(OptionsList: TStrings; LoadLastLayout: Boolean = True); overload; + procedure Load(const Filename: string; LoadLastLayout: Boolean = True); overload; + procedure Load(const RootKey: DWORD; BaseRegistryKey: string; LoadLastLayout: Boolean = True); overload; + procedure Save(IniFile: TCustomIniFile; SaveLastLayout: Boolean = True); overload; + procedure Save(OptionsList: TStrings; SaveLastLayout: Boolean = True); overload; + procedure Save(const Filename: string; SaveLastLayout: Boolean = True); overload; + procedure Save(const RootKey: DWORD; BaseRegistryKey: string; SaveLastLayout: Boolean = True); overload; + procedure Reset; + procedure LoadLayout(IniFile: TCustomIniFile; LayoutName: string); overload; + procedure LoadLayout(OptionsList: TStrings; LayoutName: string); overload; + procedure LoadLayout(const Filename, LayoutName: string); overload; + procedure LoadLayout(const RootKey: DWORD; BaseRegistryKey, LayoutName: string); overload; + procedure SaveLayout(IniFile: TCustomIniFile; LayoutName: string); overload; + procedure SaveLayout(OptionsList: TStrings; LayoutName: string); overload; + procedure SaveLayout(const Filename, LayoutName: string); overload; + procedure SaveLayout(const RootKey: DWORD; BaseRegistryKey, LayoutName: string); overload; + function DeleteLayout(IniFile: TCustomIniFile; LayoutName: string): Boolean; overload; + function DeleteLayout(OptionsList: TStrings; LayoutName: string): Boolean; overload; + function DeleteLayout(const Filename, LayoutName: string): Boolean; overload; + function DeleteLayout(const RootKey: DWORD; BaseRegistryKey, LayoutName: string): Boolean; overload; + property CustomizeForm: TSpTBXCustomCustomizeForm read FCustomizeForm; + property Layouts: TStringList read FLayouts; + property Showing: Boolean read FShowing; + published + property BlankSeparators: Boolean read FBlankSeparators write FBlankSeparators default False; + property Images: TCustomImageList read GetImages write SetImages; + property Items: TTBRootItem read FItems; + property MenuBar: TTBCustomToolbar read FMenuBar write SetMenuBar; + property SaveFormState: Boolean read FSaveFormState write FSaveFormState default True; + property OnShow: TNotifyEvent read FOnShow write FOnShow; + property OnClose: TNotifyEvent read FOnClose write FOnClose; + property OnCreateCustomizeForm: TNotifyEvent read FOnCreateCustomizeForm write FOnCreateCustomizeForm; + property OnGetCustomizeForm: TSpTBXGetCustomizeFormClassEvent read FOnGetCustomizeForm write FOnGetCustomizeForm; + property OnGetShortcutsList: TSpTBXAcceptItemEvent read FOnGetShortcutsList write FOnGetShortcutsList; + property OnLoad: TSpTBXExtraOptionsEvent read FOnLoad write FOnLoad; + property OnSave: TSpTBXExtraOptionsEvent read FOnSave write FOnSave; + property OnLayoutLoad: TSpTBXLayoutExtraOptionsEvent read FOnLayoutLoad write FOnLayoutLoad; + property OnLayoutSave: TSpTBXLayoutExtraOptionsEvent read FOnLayoutSave write FOnLayoutSave; + property OnIconOptionsChange: TSpTBXIconOptionsChangeEvent read FOnIconOptionsChange write FOnIconOptionsChange; + property OnSkinChange: TNotifyEvent read FOnSkinChange write FOnSkinChange; + end; + +{ Ini/Reg } +procedure SpIniEraseSection(IniFile: TCustomIniFile; Section: string; EraseKeysOnly: Boolean); +procedure SpIniSaveStringList(IniFile: TCustomIniFile; Section: string; L: TStringList); +procedure SpIniLoadStringList(IniFile: TCustomIniFile; Section: string; L: TStringList); +procedure SpRegSaveStringList(L: TStringList; const RootKey: DWORD; const BaseRegistryKey: string); +procedure SpRegLoadStringList(L: TStringList; const RootKey: DWORD; const BaseRegistryKey: string); + +{ Layouts } +procedure SpLoadFormState(Form: TCustomForm; OptionsList: TStrings); +procedure SpSaveFormState(Form: TCustomForm; OptionsList: TStrings); +procedure SpLoadLayoutList(IniFile: TCustomIniFile; L: TStringList); overload; +procedure SpLoadLayout(const OwnerComponent: TComponent; IniFile: TCustomIniFile; LayoutName: string; ExtraOptions: TStringList = nil); +procedure SpSaveLayout(const OwnerComponent: TComponent; IniFile: TCustomIniFile; LayoutName: string; ExtraOptions: TStringList = nil); + +{ Items } +procedure SpLoadItems(const OwnerComponent: TComponent; IniFile: TCustomIniFile; ShortcutsList: TSpTBXMenuBarShortcuts = nil; ExtraOptions: TStringList = nil); +procedure SpSaveItems(const OwnerComponent: TComponent; IniFile: TCustomIniFile; ShortcutsList: TSpTBXMenuBarShortcuts = nil; ExtraOptions: TStringList = nil); + +{ Misc } +function SpCustomizerGetWideCaption(Item: TTBCustomItem): WideString; +function SpCreateUniqueSeparator(Blank: Boolean): TSpTBXSeparatorItem; + +implementation + +uses + TypInfo, Registry, Menus, ActnList, TB2ExtItems, + SpTBXTabs, SpTBXDkPanels, SpTBXCustomizerForm; + +type + TTBRootItemAccess = class(TTBRootItem); + TTBCustomItemAccess = class(TTBCustomItem); + TTBDockAccess = class(TTBDock); + TSpTBXTabToolbarAccess = class(TSpTBXTabToolbar); + +{ Constants for SpTBXCustomizer-specific registry values. Do not localize! } +const + SSpTBXCustomizerRepeatedInstance = 'There''s already another instance of TSpTBXCustomizer'; + SSpTBXCustomizerInvalidParent = 'TSpTBXCustomizer must be dropped only on a Form or on a Frame'; + rvLastLayout = 'LastLayout'; + rvExtraOptions = 'ExtraOptions'; + rvLayoutRegList = 'LayoutsList'; + rvLayoutList = 'Layouts'; + rvItemsList = 'Items'; + rvCount = 'Count'; + rvSkin = 'Skin'; + rvMainFormWindowState = 'MainForm.WindowState'; + rvMainFormBounds = 'MainForm.Bounds'; + rvMainFormRestoreBounds = 'MainForm.RestoreBounds'; + rvSeparator = '--[Separator]--'; + rvBlankSeparator = '--[Blank Separator]--'; + rvUniqueSeparatorPrefix = 'CustomizerUniqueSeparator'; + rvUniqueBlankSeparatorPrefix = 'CustomizerUniqueBlankSeparator'; + +var + FShortcutsProcessor: TShortCutsProcessor; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Helpers } + +function IncludeTrailingRegKeyDelimiter(const S: string): string; +var + C: integer; +begin + Result := S; + C := Length(Result); + if (C > 0) and (Result[C] <> '\') then + Result := Result + '\'; +end; + +function ParseItemEntry(RootItemsList, ItemsList: TStringList; const ItemEntry: string; + out ParentItem: TTBCustomItem; out ItemName: string; out ShortCut: TShortCut): TTBCustomItem; +var + L: TStringList; + I: Integer; + TBName: string; +begin + Result := nil; + ParentItem := nil; + ShortCut := 0; + + L := TStringList.Create; + try + L.CommaText := ItemEntry; + if L.Count <= 1 then + Exit; + TBName := L[0]; + ItemName := L[1]; + if (L.Count > 2) and (L[2] <> '0') then + ShortCut := TextToShortCut(L[2]); + I := RootItemsList.IndexOf(TBName); + if I > -1 then begin + ParentItem := RootItemsList.Objects[I] as TTBCustomItem; + if Pos(rvUniqueSeparatorPrefix, ItemName) > 0 then begin // If it's a cloned separator create it + Result := TSpTBXSeparatorItem.Create(nil); + Result.Name := ItemName; + end + else + if Pos(rvUniqueBlankSeparatorPrefix, ItemName) > 0 then begin // If it's a cloned blank separator create it + Result := TSpTBXSeparatorItem.Create(nil); + Result.Name := ItemName; + TSpTBXSeparatorItem(Result).Blank := True; + end + else begin + I := ItemsList.IndexOf(ItemName); + if I > -1 then + Result := ItemsList.Objects[I] as TTBCustomItem; + end; + end; + finally + L.Free; + end; +end; + +procedure GetRootItemsList(OwnerComponent: TComponent; RootItemsList: TStringList); +// Creates a list with all the toolbar's root items +// It excludes Frames toolbars (name collision problems) +var + I: Integer; + C: TComponent; +begin + for I := 0 to OwnerComponent.ComponentCount - 1 do begin + C := OwnerComponent.Components[I]; + if C is TFrame then + Continue + else + if C is TSpTBXToolbar then begin + if TSpTBXToolbar(C).Customizable then + RootItemsList.AddObject(C.Name, TSpTBXToolbar(C).Items); + end + else + if C is TSpTBXCustomizer then + RootItemsList.AddObject(C.Name, TSpTBXCustomizer(C).Items) + else + if (C is TWinControl) and not (C is TFrame) and not (C is TForm) then + GetRootItemsList(C, RootItemsList); + end; +end; + +procedure SaveItemOptions(OwnerComponent: TComponent; + ShortcutsList: TSpTBXMenuBarShortcuts; OptionsList: TStringList); + + procedure SaveOption(ComponentName: string; AItem: TTBCustomItem); + var + ShortCut: string; + begin + ShortCut := ShortCutToText(AItem.ShortCut); + if ShortCut = '' then ShortCut := '0' + else if Pos(' ', ShortCut) > 0 then ShortCut := '"' + ShortCut + '"'; + OptionsList.Add(ComponentName + ', ' + AItem.Name + ', ' + ShortCut); + end; + +var + I, J: Integer; + ParentItem: TTBCustomItem; + RootItemsList: TStringList; +begin + OptionsList.Clear; + + RootItemsList := TStringList.Create; + try + GetRootItemsList(OwnerComponent, RootItemsList); + for I := 0 to RootItemsList.Count - 1 do begin + ParentItem := TTBCustomItem(RootItemsList.Objects[I]); + for J := 0 to ParentItem.Count - 1 do + SaveOption(RootItemsList.Strings[I], ParentItem[J]); + end; + finally + RootItemsList.Free; + end; + + // Save the MenuBar shortcuts + if Assigned(ShortcutsList) then begin + for J := 0 to ShortcutsList.Count - 1 do + SaveOption(ShortcutsList.MenuBarName, ShortcutsList.Objects[J] as TTBCustomItem); + end; +end; + +procedure ApplyItemOptions(OwnerComponent: TComponent; + ShortcutsList: TSpTBXMenuBarShortcuts; OptionsList: TStringList); +var + RootItemsList, ItemsList: TStringList; + I, J, OrigPos, InsertPoint: Integer; + Item, ParentItem, AuxParentItem: TTBCustomItem; + ParentToolbar: TSpTBXTabToolbarAccess; + ItemName: string; + ShortCut: TShortCut; +begin + RootItemsList := TStringList.Create; + ItemsList := TStringList.Create; + try + GetRootItemsList(OwnerComponent, RootItemsList); + for I := 0 to RootItemsList.Count - 1 do begin + ParentItem := TTBCustomItem(RootItemsList.Objects[I]); + for J := 0 to ParentItem.Count - 1 do + ItemsList.AddObject(ParentItem[J].Name, ParentItem[J]); + end; + + InsertPoint := 0; + AuxParentItem := nil; + for I := 0 to OptionsList.Count - 1 do begin + Item := ParseItemEntry(RootItemsList, ItemsList, OptionsList[I], ParentItem, ItemName, ShortCut); + if Assigned(Item) then begin + if AuxParentItem <> ParentItem then begin + AuxParentItem := ParentItem; + InsertPoint := 0; + end; + // Move the item if the parent or index are different + if not Assigned(Item.Parent) then + ParentItem.Insert(InsertPoint, Item) + else + if Item.Parent <> ParentItem then begin + Item.Parent.Remove(Item); + ParentItem.Insert(InsertPoint, Item); + end + else begin + OrigPos := Item.Parent.IndexOf(Item); + if OrigPos <> InsertPoint then begin + if Item.Parent.ParentComponent is TSpTBXTabToolbar then begin + ParentToolbar := TSpTBXTabToolbarAccess(Item.Parent.ParentComponent); + ParentToolbar.BeginItemMove; + ParentToolbar.View.BeginUpdate; + try + // The item is the active tab, we need to update the ActiveTabIndex + // Just set the internal value because the page didn't change + if ParentToolbar.FActiveTabIndex = OrigPos then + ParentToolbar.FActiveTabIndex := InsertPoint; + Item.Parent.Move(OrigPos, InsertPoint); + finally + ParentToolbar.View.EndUpdate; + ParentToolbar.EndItemMove; + end; + end + else + Item.Parent.Move(OrigPos, InsertPoint); + end; + end; + + if Assigned(Item.Action) and (Item.Action is TAction) then + TAction(Item.Action).ShortCut := ShortCut + else + Item.ShortCut := ShortCut; + Inc(InsertPoint); + end + else begin + // Item not found try to change the Shortcut + if Assigned(ShortcutsList) then + for J := 0 to ShortcutsList.Count - 1 do begin + Item := ShortcutsList.Objects[J] as TTBCustomItem; + if Item.Name = ItemName then begin + if Assigned(Item.Action) and (Item.Action is TAction) then + TAction(Item.Action).ShortCut := ShortCut + else + Item.ShortCut := ShortCut; + Break; + end; + end; + end; + end; + + finally + RootItemsList.Free; + ItemsList.Free; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Ini/Reg } + +procedure SpIniEraseSection(IniFile: TCustomIniFile; Section: string; EraseKeysOnly: Boolean); +var + I: Integer; + Keys: TStringList; +begin + if EraseKeysOnly then begin + Keys := TStringList.Create; + try + IniFile.ReadSection(Section, Keys); + for I := 0 to Keys.Count - 1 do + IniFile.DeleteKey(Section, Keys[I]); + finally + Keys.Free; + end; + end + else + IniFile.EraseSection(Section); +end; + +procedure SpIniSaveStringList(IniFile: TCustomIniFile; Section: string; L: TStringList); +var + I: Integer; +begin + if not Assigned(L) then Exit; + SpIniEraseSection(IniFile, Section, True); + if L.Count > 0 then begin + IniFile.WriteInteger(Section, rvCount, L.Count); + for I := 0 to L.Count - 1 do + IniFile.WriteString(Section, IntToStr(I), L[I]); + end; +end; + +procedure SpIniLoadStringList(IniFile: TCustomIniFile; Section: string; L: TStringList); +var + I, C: integer; +begin + if not Assigned(L) then Exit; + L.Clear; + C := IniFile.ReadInteger(Section, rvCount, -1); + for I := 0 to C - 1 do + L.Add(IniFile.ReadString(Section, IntToStr(I), '')); +end; + +procedure SpRegSaveStringList(L: TStringList; const RootKey: DWORD; const BaseRegistryKey: string); +var + Reg: TRegistry; + I: integer; +begin + if not Assigned(L) then Exit; + Reg := TRegistry.Create; + try + Reg.RootKey := RootKey; + Reg.DeleteKey(BaseRegistryKey); + if Reg.OpenKey(BaseRegistryKey, True) and (L.Count > 0) then begin + Reg.WriteInteger(rvCount, L.Count); + for I := 0 to L.Count - 1 do + Reg.WriteString(IntToStr(I), L[I]); + Reg.CloseKey; + end; + finally + Reg.Free; + end; +end; + +procedure SpRegLoadStringList(L: TStringList; const RootKey: DWORD; const BaseRegistryKey: string); +var + Reg: TRegistry; + I, C: integer; +begin + if not Assigned(L) then Exit; + Reg := TRegistry.Create; + try + L.Clear; + Reg.RootKey := RootKey; + if Reg.OpenKey(BaseRegistryKey, True) then begin + if Reg.ValueExists(rvCount) then begin + C := Reg.ReadInteger(rvCount); + for I := 0 to C - 1 do + if Reg.ValueExists(inttostr(I)) then + L.Add(Reg.ReadString(inttostr(I))); + end; + Reg.CloseKey; + end; + finally + Reg.Free; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Layouts } + +procedure SpLoadFormState(Form: TCustomForm; OptionsList: TStrings); +var + WState: TWindowState; + R: TRect; +begin + if Assigned(Form) then begin + WState := TWindowState(GetEnumValue(TypeInfo(TWindowState), OptionsList.Values[rvMainFormWindowState])); + if (WState < Low(WState)) or (WState > High(WState)) then + WState := Form.WindowState; // Failed reading from string, leave the default value + + if SpStringToRect(OptionsList.Values[rvMainFormBounds], R) then + Form.SetBounds(R.Left, R.Top, R.Right, R.Bottom); + + if not SpStringToRect(OptionsList.Values[rvMainFormRestoreBounds], R) then + R := Rect(Form.Left, Form.Top, Form.Width, Form.Height); // Failed reading from string, leave the default value + + SpSetFormWindowState(Form, WState, R); + end; +end; + +procedure SpSaveFormState(Form: TCustomForm; OptionsList: TStrings); +var + WState: TWindowState; + RestoreBounds: TRect; +begin + if Assigned(Form) then begin + WState := SpGetFormWindowState(Form, RestoreBounds); + OptionsList.Values[rvMainFormWindowState] := GetEnumName(TypeInfo(TWindowState), Ord(WState)); + OptionsList.Values[rvMainFormBounds] := SpRectToString(Rect(Form.Left, Form.Top, Form.Width, Form.Height)); + OptionsList.Values[rvMainFormRestoreBounds] := SpRectToString(RestoreBounds); + end; +end; + +procedure SpLoadLayoutList(IniFile: TCustomIniFile; L: TStringList); overload; +begin + SpIniLoadStringList(IniFile, rvLayoutList, L); +end; + +procedure SpSaveLayout(const OwnerComponent: TComponent; IniFile: TCustomIniFile; + LayoutName: string; ExtraOptions: TStringList = nil); +var + L: TStringList; + Prefix, RegPrevPath: string; +begin + // Add the Layout to the LayoutList + L := TStringList.Create; + try + SpIniLoadStringList(IniFile, rvLayoutList, L); + if L.IndexOf(LayoutName) = -1 then + L.Add(LayoutName); + SpIniSaveStringList(IniFile, rvLayoutList, L); + finally + L.Free; + end; + + Prefix := LayoutName + ' @ '; + // Open the new key and save the previous key if it's a TRegistryIniFile + if IniFile is TRegistryIniFile then begin + RegPrevPath := TRegistryIniFile(IniFile).RegIniFile.CurrentPath; + Prefix := ''; + if not TRegistryIniFile(IniFile).RegIniFile.OpenKey(RegPrevPath + '\' + rvLayoutRegList + '\' + LayoutName, True) then + Exit; + end; + // Save the Layout and ExtraOptions + SpTBIniSavePositions(OwnerComponent, IniFile, Prefix); + if Assigned(ExtraOptions) then + SpIniSaveStringList(IniFile, Prefix + rvExtraOptions, ExtraOptions); + // Open the previous key if it's a TRegistryIniFile + if IniFile is TRegistryIniFile then + TRegistryIniFile(IniFile).RegIniFile.OpenKey(RegPrevPath, False); +end; + +procedure SpLoadLayout(const OwnerComponent: TComponent; IniFile: TCustomIniFile; + LayoutName: string; ExtraOptions: TStringList = nil); +var + L: TStringList; + Prefix, RegPrevPath: string; +begin + // Check if the layout exists on the layout list + L := TStringList.Create; + try + SpIniLoadStringList(IniFile, rvLayoutList, L); + if L.IndexOf(LayoutName) < 0 then + Exit; + finally + L.Free; + end; + + Prefix := LayoutName + ' @ '; + // Open the new key and save the previous key if it's a TRegistryIniFile + if IniFile is TRegistryIniFile then begin + RegPrevPath := TRegistryIniFile(IniFile).RegIniFile.CurrentPath; + Prefix := ''; + if not TRegistryIniFile(IniFile).RegIniFile.OpenKey(RegPrevPath + '\' + rvLayoutRegList + '\' + LayoutName, False) then + Exit; + end; + // Load the Layout and ExtraOptions + SpTBIniLoadPositions(OwnerComponent, IniFile, Prefix); + if Assigned(ExtraOptions) then + SpIniLoadStringList(IniFile, Prefix + rvExtraOptions, ExtraOptions); + // Open the previous key if it's a TRegistryIniFile + if IniFile is TRegistryIniFile then + TRegistryIniFile(IniFile).RegIniFile.OpenKey(RegPrevPath, False); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Items } + +procedure SpSaveItems(const OwnerComponent: TComponent; IniFile: TCustomIniFile; + ShortcutsList: TSpTBXMenuBarShortcuts = nil; ExtraOptions: TStringList = nil); overload; +var + L: TStringList; +begin + L := TStringList.Create; + try + SaveItemOptions(OwnerComponent, ShortcutsList, L); + SpIniSaveStringList(IniFile, rvItemsList, L); + SpIniSaveStringList(IniFile, rvExtraOptions, ExtraOptions); + finally + L.Free; + end; +end; + +procedure SpLoadItems(const OwnerComponent: TComponent; IniFile: TCustomIniFile; + ShortcutsList: TSpTBXMenuBarShortcuts = nil; ExtraOptions: TStringList = nil); overload; +var + L: TStringList; +begin + L := TStringList.Create; + try + SpIniLoadStringList(IniFile, rvItemsList, L); + ApplyItemOptions(OwnerComponent, ShortcutsList, L); + SpIniLoadStringList(IniFile, rvExtraOptions, ExtraOptions); + finally + L.Free; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Misc } + +function SpCustomizerGetWideCaption(Item: TTBCustomItem): WideString; +begin + if Item is TSpTBXCustomItem then Result := TSpTBXCustomItem(Item).Caption + else if Item is TSpTBXEditItem then Result := TSpTBXEditItem(Item).Caption + else if Item is TTBSeparatorItem then Result := Item.Name + else if Item is TTBGroupItem then Result := Item.Name + else Result := Item.Caption; + Result := SpStripShortcut(Result); + Result := SpStripAccelChars(Result); +end; + +function SpCreateUniqueSeparator(Blank: Boolean): TSpTBXSeparatorItem; +var + S: string; +begin + S := IntToStr(DateTimeToFileDate(Now)); + Result := TSpTBXSeparatorItem.Create(nil); + if Blank then begin + Result.Name := rvUniqueBlankSeparatorPrefix + S; + TSpTBXSeparatorItem(Result).Blank := True; + end + else + Result.Name := rvUniqueSeparatorPrefix + S; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TShortCutsProcessor } + +constructor TShortCutsProcessor.Create; +begin + inherited; + if Assigned(Application) then + Application.HookMainWindow(MainWindowHook); +end; + +destructor TShortCutsProcessor.Destroy; +begin + if Assigned(Application) then + Application.UnhookMainWindow(MainWindowHook); + inherited; +end; + +function TShortCutsProcessor.MainWindowHook(var Message: TMessage): Boolean; +begin + // Hook to the Application's message loop to disable ShortCut messages processing. + // If the Form is non-modal and a key is pressed it tries to find a shortcut + // handler in the main form, we need to disable this. + // We have to hook in the initialization section so the hook is prior the + // TTBCustomToolbar hook in the Application's hooklist. + + // Shortcut messages: + // Whenever a keystroke is pressed and is not handled by the active control + // or a suitable popup menu item, it is passed to the underlying form's + // IsShortCut method. The form tries to handle the keystroke through its + // OnShortCut event or, failing that, through its main menu. If nothing wants + // it, all action lists owned by the form are checked for a matching shortcut. + // The action list checks each of its actions and if a match is found, + // the action's Execute method is called. + // If no suitable action is found on the current form a CM_APPKEYDOWN message + // is sent to the Application object which calls its own IsShortCut method. + // This tries to handle the keystroke in its own OnShortCut event and if + // that fails it calls the main form's IsShortCut method. + + // Key press -> Active Control -> Popup Menu -> TCustomForm.IsShortCut -> + // TCustomForm.MainMenu -> TActionList -> TApplication CM_APPKEYDOWN and CM_APPSYSCOMMAND -> + // TApplication.IsShortCut + + Result := False; + if FActive then + if (Message.Msg = CM_APPKEYDOWN) or (Message.Msg = CM_APPSYSCOMMAND) then begin + Message.Result := 0; + Result := true; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomizer } + +constructor TSpTBXCustomizer.Create(AOwner: TComponent); +begin + inherited; + FItems := TTBRootItem.Create(Self); + FItems.ParentComponent := Self; + FLayouts := TStringList.Create; + FResetState := TStringList.Create; + FSaveFormState := True; + SkinManager.AddSkinNotification(Self); +end; + +destructor TSpTBXCustomizer.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + FItems.Free; + FLayouts.Free; + FResetState.Free; + inherited; +end; + +procedure TSpTBXCustomizer.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if (Operation = opRemove) then begin + if AComponent = FCustomizeForm then FCustomizeForm := nil; + if AComponent = FMenuBar then FMenuBar := nil; + end; +end; + +procedure TSpTBXCustomizer.GetChildren(Proc: TGetChildProc; + Root: TComponent); +begin + TTBRootItemAccess(FItems).GetChildren(Proc, Root); +end; + +function TSpTBXCustomizer.GetCustomizeFormClass: TSpTBXCustomizeFormClass; +begin + Result := TSpTBXCustomizeForm; + if Assigned(FOnGetCustomizeForm) then FOnGetCustomizeForm(Self, Result); + if not Assigned(Result) then + Result := TSpTBXCustomizeForm; +end; + +procedure TSpTBXCustomizer.GetShortcutList(ShortcutsList: TTntStringList); +var + I: Integer; + Item: TTBCustomItem; + ItemStyle: TTBItemStyle; + L: TTntStringList; +begin + ShortcutsList.Clear; + + if Assigned(MenuBar) then begin + if ShortcutsList is TSpTBXMenuBarShortcuts then + TSpTBXMenuBarShortcuts(ShortcutsList).MenuBarName := MenuBar.Name; + + L := TTntStringList.Create; + try + SpGetAllItems(MenuBar.Items, L); + for I := 0 to L.Count - 1 do begin + Item := L.Objects[I] as TTBCustomItem; + ItemStyle := TTBCustomItemAccess(Item).ItemStyle; + // Exclude the submenus, separators, labels, groups and edit items + if (ItemStyle * [tbisSubMenu, tbisSeparator, tbisEmbeddedGroup, tbisClicksTransparent] = []) and + not (Item is TTBEditItem) then + begin + if DoGetShortcutsList(Item) then + ShortcutsList.AddObject(SpCustomizerGetWideCaption(Item), Item); + end; + end; + finally + L.Free; + end; + end; +end; + +function TSpTBXCustomizer.GetImages: TCustomImageList; +begin + Result := FItems.SubMenuImages; +end; + +function TSpTBXCustomizer.GetItems: TTBCustomItem; +begin + Result := FItems; +end; + +procedure TSpTBXCustomizer.SetImages(Value: TCustomImageList); +begin + FItems.SubMenuImages := Value; +end; + +procedure TSpTBXCustomizer.SetMenuBar(const Value: TTBCustomToolbar); +begin + if FMenuBar <> Value then begin + FMenuBar := Value; + if Assigned(Value) then + Value.FreeNotification(Self); + end; +end; + +procedure TSpTBXCustomizer.SetupForm; +begin + FCustomizeForm.FormStyle := fsStayOnTop; + FCustomizeForm.BorderIcons := [biSystemMenu]; + FCustomizeForm.Position := poMainFormCenter; + SpCustomizeAllToolbars(Owner as TWinControl, False); + SpCustomizeAllToolbars(FCustomizeForm, False); +end; + +procedure TSpTBXCustomizer.Close; +begin + if FShowing and Assigned(FCustomizeForm) then begin + FCustomizeForm.Close; + SpCustomizeAllToolbars(Owner as TWinControl, True); + SpCustomizeAllToolbars(FCustomizeForm, True); + FShowing := False; + if Assigned(FOnClose) then FOnClose(Self); + end; +end; + +procedure TSpTBXCustomizer.Show; +begin + ShowEmbedded; +end; + +procedure TSpTBXCustomizer.ShowEmbedded(AParent: TWinControl = nil); +begin + if FShowing then Exit; + + if not Assigned(FCustomizeForm) then + FCustomizeForm := GetCustomizeFormClass.Create(Self, AParent); + + if Assigned(FCustomizeForm) then begin + if Assigned(FOnCreateCustomizeForm) then FOnCreateCustomizeForm(FCustomizeForm); + FShowing := True; + SetupForm; + FCustomizeForm.Show; + FCustomizeForm.DoSkinChange; + if Assigned(FOnShow) then FOnShow(Self); + end; +end; + +procedure TSpTBXCustomizer.ValidateContainer(AComponent: TComponent); +var + I: Integer; +begin + if Assigned(AComponent) then begin + if not (AComponent is TCustomForm) and not (AComponent is TCustomFrame) then + raise EInvalidOperation.Create(SSpTBXCustomizerInvalidParent); + for I := 0 to AComponent.ComponentCount - 1 do + if AComponent.Components[I] is TSpTBXCustomizer then + raise EInvalidOperation.Create(SSpTBXCustomizerRepeatedInstance); + end + else + raise EInvalidOperation.Create(SSpTBXCustomizerInvalidParent); + + inherited; +end; + +procedure TSpTBXCustomizer.Load(IniFile: TCustomIniFile; LoadLastLayout: Boolean = True); +var + ExtraL: TStringList; + ShortcutsL: TSpTBXMenuBarShortcuts; +begin + ExtraL := TStringList.Create; + ShortcutsL := TSpTBXMenuBarShortcuts.Create; + try + // Load Shortcuts + if Assigned(MenuBar) then + GetShortcutList(ShortcutsL); + + // Save the ResetState, save only the Items and Toolbar state + SaveResetState(ShortcutsL); + + // Load Items + SpLoadItems(Owner, IniFile, ShortcutsL, ExtraL); + + // Fill Extra Options + DoLoad(ExtraL); + if FSaveFormState then + SpLoadFormState(Application.MainForm, ExtraL); + SkinManager.SetSkin(ExtraL.Values[rvSkin]); + + // Load Layouts + SpLoadLayoutList(IniFile, FLayouts); + if LoadLastLayout then + LoadLayout(IniFile, rvLastLayout); + finally + ExtraL.Free; + ShortcutsL.Free; + end; +end; + +procedure TSpTBXCustomizer.Load(OptionsList: TStrings; LoadLastLayout: Boolean = True); +var + MemIni: TMemIniFile; +begin + MemIni := TMemIniFile.Create(''); + try + MemIni.SetStrings(OptionsList); // Transfer OptionsList contents to MemIni + Load(MemIni, LoadLastLayout); + finally + MemIni.Free; + end; +end; + +procedure TSpTBXCustomizer.Load(const Filename: string; LoadLastLayout: Boolean = True); +var + MemIni: TMemIniFile; +begin + MemIni := TMemIniFile.Create(Filename); + try + Load(MemIni, LoadLastLayout); + finally + MemIni.Free; + end; +end; + +procedure TSpTBXCustomizer.Load(const RootKey: DWORD; BaseRegistryKey: string; LoadLastLayout: Boolean = True); +var + Reg: TRegistryIniFile; +begin + // Use TRegistryIniFile to call Load + Reg := TRegistryIniFile.Create('', KEY_QUERY_VALUE); + try + Reg.RegIniFile.RootKey := RootKey; + if Reg.RegIniFile.OpenKey(BaseRegistryKey, False) then + Load(Reg, LoadLastLayout); + finally + Reg.Free; + end; +end; + +procedure TSpTBXCustomizer.Save(IniFile: TCustomIniFile; SaveLastLayout: Boolean = True); +var + ExtraL: TStringList; + ShortcutsL: TSpTBXMenuBarShortcuts; +begin + ExtraL := TStringList.Create; + ShortcutsL := TSpTBXMenuBarShortcuts.Create; + try + // Fill Extra Options, SpSaveItems will save it + ExtraL.Values[rvSkin] := SkinManager.CurrentSkinName; + if FSaveFormState then + SpSaveFormState(Application.MainForm, ExtraL); + DoSave(ExtraL); + + // Save Items + if Assigned(MenuBar) then + GetShortcutList(ShortcutsL); + SpSaveItems(Owner, IniFile, ShortcutsL, ExtraL); + + // Save LastLayout + if SaveLastLayout then + SaveLayout(IniFile, rvLastLayout) + else + DeleteLayout(IniFile, rvLastLayout); + finally + ExtraL.Free; + ShortcutsL.Free; + end; +end; + +procedure TSpTBXCustomizer.Save(OptionsList: TStrings; SaveLastLayout: Boolean = True); +var + MemIni: TMemIniFile; +begin + MemIni := TMemIniFile.Create(''); + try + MemIni.SetStrings(OptionsList); // Transfer OptionsList contents to MemIni + Save(MemIni, SaveLastLayout); + OptionsList.Clear; + MemIni.GetStrings(OptionsList); // Transfer MemIni contents to OptionsList + finally + MemIni.Free; + end; +end; + +procedure TSpTBXCustomizer.Save(const Filename: string; SaveLastLayout: Boolean = True); +var + MemIni: TMemIniFile; +begin + MemIni := TMemIniFile.Create(Filename); + try + Save(MemIni, SaveLastLayout); + MemIni.UpdateFile; + finally + MemIni.Free; + end; +end; + +procedure TSpTBXCustomizer.Save(const RootKey: DWORD; BaseRegistryKey: string; SaveLastLayout: Boolean = True); +var + Reg: TRegistryIniFile; +begin + // Use TRegistryIniFile to call Save + Reg := TRegistryIniFile.Create(''); + try + Reg.RegIniFile.RootKey := RootKey; + Reg.RegIniFile.CreateKey(BaseRegistryKey); + if Reg.RegIniFile.OpenKey(BaseRegistryKey, True) then + Save(Reg, SaveLastLayout); + finally + Reg.Free; + end; +end; + +procedure TSpTBXCustomizer.Reset; +var + MemIni: TMemIniFile; + ShortcutsL: TSpTBXMenuBarShortcuts; +begin + // Load ResetState + if FResetState.Count > 0 then begin + MemIni := TMemIniFile.Create(''); + ShortcutsL := TSpTBXMenuBarShortcuts.Create; + try + MemIni.SetStrings(FResetState); // Transfer FResetState contents to MemIni + // Load Shortcuts + if Assigned(MenuBar) then + GetShortcutList(ShortcutsL); + // Load Items + SpLoadItems(Owner, MemIni, ShortcutsL, nil); + // Load last layout + SpLoadLayout(Owner, MemIni, rvLastLayout, nil); + finally + MemIni.Free; + ShortcutsL.Free; + end; + end; +end; + +procedure TSpTBXCustomizer.LoadLayout(IniFile: TCustomIniFile; LayoutName: string); +var + ExtraL: TStringList; +begin + ExtraL := TStringList.Create; + try + SpLoadLayout(Owner, IniFile, LayoutName, ExtraL); + DoLayoutLoad(LayoutName, ExtraL); + finally + ExtraL.Free; + end; +end; + +procedure TSpTBXCustomizer.LoadLayout(OptionsList: TStrings; LayoutName: string); +var + MemIni: TMemIniFile; +begin + MemIni := TMemIniFile.Create(''); + try + MemIni.SetStrings(OptionsList); // Transfer OptionsList contents to MemIni + LoadLayout(MemIni, LayoutName); + finally + MemIni.Free; + end; +end; + +procedure TSpTBXCustomizer.LoadLayout(const Filename, LayoutName: string); +var + MemIni: TMemIniFile; +begin + MemIni := TMemIniFile.Create(Filename); + try + LoadLayout(MemIni, LayoutName); + finally + MemIni.Free; + end; +end; + +procedure TSpTBXCustomizer.LoadLayout(const RootKey: DWORD; + BaseRegistryKey, LayoutName: string); +var + Reg: TRegistryIniFile; +begin + // Use TRegistryIniFile to call LoadLayout + Reg := TRegistryIniFile.Create('', KEY_QUERY_VALUE); + try + Reg.RegIniFile.RootKey := RootKey; + if Reg.RegIniFile.OpenKey(BaseRegistryKey, False) then + LoadLayout(Reg, LayoutName); + finally + Reg.Free; + end; +end; + +procedure TSpTBXCustomizer.SaveLayout(IniFile: TCustomIniFile; LayoutName: string); +var + ExtraL: TStringList; +begin + if LayoutName = '' then Exit; + ExtraL := TStringList.Create; + try + DoLayoutSave(LayoutName, ExtraL); + SpSaveLayout(Owner, IniFile, LayoutName, ExtraL); + SpLoadLayoutList(IniFile, FLayouts); + finally + ExtraL.Free; + end; +end; + +procedure TSpTBXCustomizer.SaveLayout(OptionsList: TStrings; LayoutName: string); +var + MemIni: TMemIniFile; +begin + if LayoutName = '' then Exit; + MemIni := TMemIniFile.Create(''); + try + MemIni.SetStrings(OptionsList); // Transfer OptionsList contents to MemIni + SaveLayout(MemIni, LayoutName); + + // Reload OptionsList + OptionsList.Clear; + MemIni.GetStrings(OptionsList); // Transfer MemIni contents to OptionsList + finally + MemIni.Free; + end; +end; + +procedure TSpTBXCustomizer.SaveLayout(const Filename, LayoutName: string); +var + MemIni: TMemIniFile; +begin + if LayoutName = '' then Exit; + MemIni := TMemIniFile.Create(Filename); + try + SaveLayout(MemIni, LayoutName); + MemIni.UpdateFile; + finally + MemIni.Free; + end; +end; + +procedure TSpTBXCustomizer.SaveLayout(const RootKey: DWORD; + BaseRegistryKey, LayoutName: string); +var + Reg: TRegistryIniFile; +begin + if LayoutName = '' then Exit; + // Use TRegistryIniFile to call SaveLayout + Reg := TRegistryIniFile.Create(''); + try + Reg.RegIniFile.RootKey := RootKey; + Reg.RegIniFile.CreateKey(BaseRegistryKey); + if Reg.RegIniFile.OpenKey(BaseRegistryKey, True) then + SaveLayout(Reg, LayoutName); + finally + Reg.Free; + end; +end; + +procedure TSpTBXCustomizer.SaveResetState(ShortcutsList: TSpTBXMenuBarShortcuts); +var + TempIni: TMemIniFile; +begin + // Save the ResetState, save only the Items and Toolbar state + if FResetState.Count = 0 then begin + TempIni := TMemIniFile.Create(''); + try + SaveItemOptions(Owner, ShortcutsList, FResetState); + SpIniSaveStringList(TempIni, rvItemsList, FResetState); + SpSaveLayout(Owner, TempIni, rvLastLayout, nil); + FResetState.Clear; + TempIni.GetStrings(FResetState); // Transfer MemIni contents to OptionsList + finally + TempIni.Free; + end; + end; +end; + +function TSpTBXCustomizer.DeleteLayout(IniFile: TCustomIniFile; LayoutName: string): Boolean; +var + L: TStringList; + I, P: Integer; + S: string; +begin + Result := False; + L := TStringList.Create; + try + SpIniLoadStringList(IniFile, rvLayoutList, L); + I := L.IndexOf(LayoutName); + if I > -1 then begin + Result := True; + L.Delete(I); + SpIniSaveStringList(IniFile, rvLayoutList, L); + + if IniFile is TRegistryIniFile then + TRegistryIniFile(IniFile).EraseSection(rvLayoutRegList + '\' + LayoutName) + else begin + // Delete all the Layout sections + IniFile.ReadSections(L); + for I := 0 to L.Count - 1 do begin + P := Pos(' @ ', L[I]); + if P > 0 then begin + S := Copy(L[I], 1, P - 1); + if SameText(LayoutName, S) then + IniFile.EraseSection(L[I]); + end; + end; + end; + + SpLoadLayoutList(IniFile, FLayouts); + end; + finally + L.Free; + end; +end; + +function TSpTBXCustomizer.DeleteLayout(OptionsList: TStrings; LayoutName: string): Boolean; +var + MemIni: TMemIniFile; +begin + Result := False; + MemIni := TMemIniFile.Create(''); + try + MemIni.SetStrings(OptionsList); // Transfer OptionsList contents to MemIni + if DeleteLayout(MemIni, LayoutName) then begin + Result := True; + // Reload OptionsList + OptionsList.Clear; + MemIni.GetStrings(OptionsList); // Transfer MemIni contents to OptionsList + end; + finally + MemIni.Free; + end; +end; + +function TSpTBXCustomizer.DeleteLayout(const Filename, LayoutName: string): Boolean; +var + MemIni: TMemIniFile; +begin + Result := False; + MemIni := TMemIniFile.Create(Filename); + try + if DeleteLayout(MemIni, LayoutName) then begin + Result := True; + MemIni.UpdateFile; + end; + finally + MemIni.Free; + end; +end; + +function TSpTBXCustomizer.DeleteLayout(const RootKey: DWORD; BaseRegistryKey, + LayoutName: string): Boolean; +var + Reg: TRegistryIniFile; +begin + // Use TRegistryIniFile to call DeleteLayout + Result := False; + Reg := TRegistryIniFile.Create(''); + try + Reg.RegIniFile.RootKey := RootKey; + Reg.RegIniFile.CreateKey(BaseRegistryKey); + if Reg.RegIniFile.OpenKey(BaseRegistryKey, True) then + Result := DeleteLayout(Reg, LayoutName); + finally + Reg.Free; + end; +end; + +function TSpTBXCustomizer.DoGetShortcutsList(AItem: TTBCustomItem): Boolean; +begin + if AItem.Parent is TSpTBXSkinGroupItem then + Result := False + else + Result := True; + if Assigned(FOnGetShortcutsList) then FOnGetShortcutsList(Self, AItem, Result); +end; + +procedure TSpTBXCustomizer.DoIconOptionsChange(Toolbar: TTBCustomToolbar; + UseSmallImages: Boolean); +begin + if Assigned(FOnIconOptionsChange) then FOnIconOptionsChange(Self, Toolbar, UseSmallImages); +end; + +procedure TSpTBXCustomizer.DoLoad(ExtraOptions: TStringList); +begin + if Assigned(FOnLoad) then FOnLoad(Self, ExtraOptions); +end; + +procedure TSpTBXCustomizer.DoSave(ExtraOptions: TStringList); +begin + if Assigned(FOnSave) then FOnSave(Self, ExtraOptions); +end; + +procedure TSpTBXCustomizer.DoLayoutLoad(LayoutName: string; + ExtraOptions: TStringList); +begin + if Assigned(FOnLayoutLoad) then FOnLayoutLoad(Self, LayoutName, ExtraOptions); +end; + +procedure TSpTBXCustomizer.DoLayoutSave(LayoutName: string; + ExtraOptions: TStringList); +begin + if Assigned(FOnLayoutSave) then FOnLayoutSave(Self, LayoutName, ExtraOptions); +end; + +procedure TSpTBXCustomizer.DoSkinChange; +begin + if FShowing and Assigned(FCustomizeForm) then + FCustomizeForm.DoSkinChange; + if Assigned(FOnSkinChange) then FOnSkinChange(Self); +end; + +procedure TSpTBXCustomizer.WMSpSkinChange(var Message: TMessage); +begin + DoSkinChange; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomCustomizeForm } + +constructor TSpTBXCustomCustomizeForm.Create(AOwner: TSpTBXCustomizer; EmbeddedParent: TWinControl); +begin + FCustomizer := AOwner; + FEmbedded := Assigned(EmbeddedParent); + + inherited Create(AOwner); + + FToolbarList := TTntStringList.Create; + FItemList := TTntStringList.Create; + FShortcutList := TTntStringList.Create; + FSeparatorList := TTntStringList.Create; + FBlankSeparatorList := TTntStringList.Create; + + // Hook to the Application's message loop to disable ShortCut messages processing. + // Otherwise the TApplication.MainForm Actions are executed. + if Assigned(FShortcutsProcessor) then + FShortcutsProcessor.Active := True; + + if Assigned(EmbeddedParent) then begin + Parent := EmbeddedParent; + BorderStyle := bsNone; + Align := alClient; + end; +end; + +destructor TSpTBXCustomCustomizeForm.Destroy; +begin + Customizer.Close; + if Assigned(FShortcutsProcessor) then + FShortcutsProcessor.Active := False; + FreeAndNil(FToolbarList); + FreeAndNil(FItemList); + FreeAndNil(FShortcutList); + FreeAndNil(FSeparatorList); + FreeAndNil(FBlankSeparatorList); + inherited; +end; + +procedure TSpTBXCustomCustomizeForm.FillCommands; +var + I: Integer; + W: TWinControl; + TB: TSpTBXToolbar; + Item: TTBCustomItem; + WS: WideString; + UseBlankSeparators: Boolean; +begin + // Get the main form + W := Customizer.Owner as TWinControl; + + FToolbarList.Clear; + FSeparatorList.Clear; + FBlankSeparatorList.Clear; + FItemList.Clear; + + // Fill the Toolbars + for I := 0 to W.ComponentCount - 1 do + if W.Components[I] is TSpTBXToolbar then begin + TB := W.Components[I] as TSpTBXToolbar; + if TB.Customizable then + FToolbarList.AddObject(TB.Caption, TB); + end; + + // Add the Separator item + FItemList.Add(rvSeparator); + UseBlankSeparators := Customizer.BlankSeparators; + if UseBlankSeparators then + FItemList.Add(rvBlankSeparator); + + // Add the Customizer items + for I := 0 to Customizer.Items.Count - 1 do begin + Item := Customizer.Items[I]; + WS := SpCustomizerGetWideCaption(Item); + if Item is TTBSeparatorItem then begin + if UseBlankSeparators and TTBSeparatorItem(Item).Blank then + FBlankSeparatorList.AddObject(WS, Item) + else + FSeparatorList.AddObject(WS, Item); + end + else + FItemList.AddObject(WS, Item); + end; + + // Add the Shortcuts items + Customizer.GetShortcutList(FShortcutList); + + DoFillCommands(FToolbarList, FItemList, FShortcutList); +end; + +procedure TSpTBXCustomCustomizeForm.KeyDown(var Key: Word; Shift: TShiftState); +begin + inherited KeyUp(Key, Shift); + if Key = VK_ESCAPE then Close; +end; + +procedure TSpTBXCustomCustomizeForm.DoClose(var Action: TCloseAction); +begin + Action := caFree; + inherited DoClose(Action); +end; + +procedure TSpTBXCustomCustomizeForm.DoShow; +begin + if Assigned(Customizer) then + FillCommands; + inherited; +end; + +procedure TSpTBXCustomCustomizeForm.DoIconOptionsChange(UseSmallImages: Boolean); +var + I: integer; + TB: TTBCustomToolbar; +begin + if Assigned(Customizer) then + for I := 0 to FToolbarList.Count - 1 do + if FToolbarList.Objects[I] is TTBCustomToolbar then begin + TB := FToolbarList.Objects[I] as TTBCustomToolbar; + Customizer.DoIconOptionsChange(TB, UseSmallImages); + end; +end; + +procedure TSpTBXCustomCustomizeForm.DoSkinChange; +begin + // The skin has changed +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM + +initialization + FShortcutsProcessor := TShortCutsProcessor.Create; +finalization + FreeAndNil(FShortcutsProcessor); + +end. diff --git a/internal/2.4.4/1/Source/SpTBXCustomizerForm.dfm b/internal/2.4.4/1/Source/SpTBXCustomizerForm.dfm new file mode 100644 index 0000000..a3afc67 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXCustomizerForm.dfm @@ -0,0 +1,282 @@ +object SpTBXCustomizeForm: TSpTBXCustomizeForm + Left = 219 + Top = 115 + Caption = 'Customize...' + ClientHeight = 321 + ClientWidth = 347 + Color = clBtnFace + Constraints.MinHeight = 355 + Constraints.MinWidth = 355 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [] + FormStyle = fsStayOnTop + KeyPreview = True + OldCreateOrder = False + Position = poDesigned + OnCreate = FormCreate + OnKeyDown = FormKeyDown + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object SpTBXTabControl1: TSpTBXTabControl + Left = 0 + Top = 0 + Width = 347 + Height = 286 + Align = alClient + ActiveTabIndex = 0 + HiddenItems = <> + object tabToolbars: TSpTBXTabItem + Caption = 'Toolbars' + Checked = True + end + object tabCommands: TSpTBXTabItem + Caption = 'Commands' + end + object tabShortcuts: TSpTBXTabItem + Caption = 'Shortcuts' + end + object SpTBXTabSheet2: TSpTBXTabSheet + Left = 0 + Top = 23 + Width = 347 + Height = 263 + Caption = 'Shortcuts' + ImageIndex = -1 + DesignSize = ( + 347 + 263) + TabItem = 'tabShortcuts' + object SpTBXPanel5: TSpTBXPanel + Left = 8 + Top = 227 + Width = 247 + Height = 22 + Anchors = [akLeft, akRight, akBottom] + TabOrder = 1 + HotTrack = True + object Panel1: TPanel + Left = 2 + Top = 2 + Width = 243 + Height = 18 + Align = alClient + BevelOuter = bvNone + TabOrder = 0 + DesignSize = ( + 243 + 18) + object HotKey1: THotKey + Left = -2 + Top = -2 + Width = 249 + Height = 23 + Anchors = [akLeft, akTop, akRight, akBottom] + HotKey = 0 + Modifiers = [] + TabOrder = 0 + end + end + end + object ChangeShortcut: TSpTBXButton + Left = 261 + Top = 226 + Width = 75 + Height = 25 + Caption = 'C&hange' + Anchors = [akRight, akBottom] + TabOrder = 2 + OnClick = ChangeShortcutClick + end + object lbShortcuts: TSpTBXListBox + Left = 8 + Top = 8 + Width = 330 + Height = 208 + Anchors = [akLeft, akTop, akRight, akBottom] + ItemHeight = 16 + TabOrder = 0 + OnClick = lbShortcutsClick + OnDrawItem = lbShortcutsDrawItem + end + end + object SpTBXTabSheet3: TSpTBXTabSheet + Left = 0 + Top = 23 + Width = 347 + Height = 263 + Caption = 'Commands' + ImageIndex = -1 + DesignSize = ( + 347 + 263) + TabItem = 'tabCommands' + object SpTBXLabel3: TSpTBXLabel + Left = 8 + Top = 213 + Width = 330 + Height = 44 + Caption = + 'To add command buttons, drag and drop commands onto a toolbar. T' + + 'o remove command buttons, drag them off the toolbar and drop the' + + 'm on the commands list.' + Anchors = [akLeft, akRight, akBottom] + AutoSize = False + Wrapping = twWrap + end + object lbCommands: TSpTBXListBox + Left = 8 + Top = 8 + Width = 330 + Height = 202 + Anchors = [akLeft, akTop, akRight, akBottom] + DragMode = dmAutomatic + ItemHeight = 16 + TabOrder = 0 + OnDragDrop = lbCommandsDragDrop + OnDragOver = lbCommandsDragOver + OnDrawItem = lbCommandsDrawItem + OnEndDrag = lbCommandsEndDrag + OnStartDrag = lbCommandsStartDrag + end + end + object SpTBXTabSheet1: TSpTBXTabSheet + Left = 0 + Top = 23 + Width = 347 + Height = 263 + Caption = 'Toolbars' + ImageIndex = -1 + DesignSize = ( + 347 + 263) + TabItem = 'tabToolbars' + object SpTBXGroupBox1: TSpTBXGroupBox + Left = 175 + Top = 2 + Width = 161 + Height = 191 + Caption = 'Options' + Anchors = [akTop, akRight, akBottom] + TabOrder = 1 + object cbText: TSpTBXComboBox + Left = 6 + Top = 66 + Width = 149 + Height = 21 + Style = csDropDownList + ItemHeight = 13 + TabOrder = 1 + OnClick = cbTextClick + Items.Strings = ( + 'Icons + Selective Text' + 'Icons' + 'Icons + Text' + 'Text') + end + object cbIcon: TSpTBXComboBox + Left = 6 + Top = 114 + Width = 149 + Height = 21 + Style = csDropDownList + ItemHeight = 13 + TabOrder = 2 + Items.Strings = ( + 'Large images' + 'Small images') + end + object cbTextLabel: TSpTBXLabel + Left = 6 + Top = 45 + Width = 68 + Height = 19 + Caption = 'T&ext Options' + FocusControl = cbText + end + object cbIconLabel: TSpTBXLabel + Left = 6 + Top = 95 + Width = 67 + Height = 19 + Caption = '&Icon Options' + FocusControl = cbIcon + end + object checkVisible: TSpTBXCheckBox + Left = 6 + Top = 21 + Width = 53 + Height = 21 + Caption = '&Visible' + TabOrder = 0 + OnClick = checkVisibleClick + end + end + object SpTBXGroupBox2: TSpTBXGroupBox + Left = 175 + Top = 200 + Width = 161 + Height = 49 + Caption = '&Skins' + Anchors = [akRight, akBottom] + TabOrder = 2 + object cbSkins: TSpTBXComboBox + Left = 6 + Top = 20 + Width = 149 + Height = 21 + Style = csDropDownList + ItemHeight = 13 + TabOrder = 0 + OnClick = cbSkinsClick + end + end + object lbToolbars: TSpTBXCheckListBox + Left = 8 + Top = 8 + Width = 158 + Height = 241 + OnClickCheck = lbToolbarsClickCheck + Anchors = [akLeft, akTop, akRight, akBottom] + ItemHeight = 20 + TabOrder = 0 + OnClick = lbToolbarsClick + end + end + end + object ClosePanel: TSpTBXPanel + Left = 0 + Top = 286 + Width = 347 + Height = 35 + Align = alBottom + TabOrder = 1 + Borders = False + TBXStyleBackground = True + DesignSize = ( + 347 + 35) + object CloseButton: TSpTBXButton + Left = 264 + Top = 4 + Width = 78 + Height = 25 + Caption = '&Close' + Anchors = [akRight, akBottom] + TabOrder = 0 + OnClick = CloseButtonClick + end + object ResetButton: TSpTBXButton + Left = 7 + Top = 4 + Width = 130 + Height = 25 + Caption = '&Default Options' + TabOrder = 1 + OnClick = ResetButtonClick + end + end +end diff --git a/internal/2.4.4/1/Source/SpTBXCustomizerForm.pas b/internal/2.4.4/1/Source/SpTBXCustomizerForm.pas new file mode 100644 index 0000000..902544a --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXCustomizerForm.pas @@ -0,0 +1,529 @@ +unit SpTBXCustomizerForm; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +Development notes: + - All the theme changes and adjustments are marked with '[Theme-Change]'. + +History: + - + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, ComCtrls, ImgList, CheckLst, + {$IFNDEF UNICODE} + TntClasses, TntStdCtrls, TntCheckLst, + {$ENDIF} + TB2Toolbar, TB2Item, + SpTBXSkins, SpTBXItem, SpTBXControls, SpTBXEditors, SpTBXTabs, SpTBXCustomizer; + +resourcestring + SSpTBXCustomizerFormChangeShortcut = 'The shortcut is already being used by the "%s" command. Do you want to reassign it to the "%s" command?'; + SSpTBXCustomizerFormChangeShortcutTitle = 'Change Shortcut'; + SSpTBXCustomizerFormSeparator = '[ Separator ]'; + SSpTBXCustomizerFormBlankSeparator = '[ Blank Separator ]'; + +type + TSpTBXCustomizeForm = class(TSpTBXCustomCustomizeForm) + SpTBXTabControl1: TSpTBXTabControl; + tabCommands: TSpTBXTabItem; + SpTBXTabSheet1: TSpTBXTabSheet; + tabToolbars: TSpTBXTabItem; + SpTBXTabSheet2: TSpTBXTabSheet; + tabShortcuts: TSpTBXTabItem; + SpTBXTabSheet3: TSpTBXTabSheet; + CloseButton: TSpTBXButton; + SpTBXLabel3: TSpTBXLabel; + HotKey1: THotKey; + ChangeShortcut: TSpTBXButton; + SpTBXPanel5: TSpTBXPanel; + Panel1: TPanel; + cbSkins: TSpTBXComboBox; + cbIconLabel: TSpTBXLabel; + cbText: TSpTBXComboBox; + cbIcon: TSpTBXComboBox; + cbTextLabel: TSpTBXLabel; + SpTBXGroupBox1: TSpTBXGroupBox; + ResetButton: TSpTBXButton; + checkVisible: TSpTBXCheckBox; + SpTBXGroupBox2: TSpTBXGroupBox; + lbToolbars: TSpTBXCheckListBox; + lbCommands: TSpTBXListBox; + lbShortcuts: TSpTBXListBox; + ClosePanel: TSpTBXPanel; + procedure lbCommandsStartDrag(Sender: TObject; + var DragObject: TDragObject); + procedure lbCommandsDragOver(Sender, Source: TObject; X, + Y: Integer; State: TDragState; var Accept: Boolean); + procedure lbCommandsDragDrop(Sender, Source: TObject; X, + Y: Integer); + procedure lbToolbarsClickCheck(Sender: TObject); + procedure CloseButtonClick(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure lbCommandsEndDrag(Sender, Target: TObject; X, Y: Integer); + procedure lbShortcutsClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure cbSkinsClick(Sender: TObject); + procedure checkVisibleClick(Sender: TObject); + procedure cbTextClick(Sender: TObject); + procedure lbToolbarsClick(Sender: TObject); + procedure ChangeShortcutClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure ResetButtonClick(Sender: TObject); + procedure lbCommandsDrawItem(Sender: TObject; ACanvas: TCanvas; + var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); + procedure lbShortcutsDrawItem(Sender: TObject; ACanvas: TCanvas; + var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); + protected + procedure DoFillCommands(ToolbarList, ItemList, ShortcutsList: TTntStringList); override; + procedure DoSkinChange; override; + end; + +implementation + +uses + ActnList; + +{$R *.dfm} + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Helpers } + +procedure SpDrawListboxItem(L: TSpTBXListBox; Index: Integer; ARect: TRect; + State: TOwnerDrawState; DrawShortcut: Boolean; DefaultImageList: TCustomImageList); +var + Item: TTBCustomItem; + IL: TCustomImageList; + WS: WideString; + TextR, ILRect: TRect; + Y: Integer; + ACanvas: TCanvas; +begin + if (Index < 0) or (Index > L.Count - 1) or not (L.Items.Objects[Index] is TTBCustomItem) then Exit; + Item := L.Items.Objects[Index] as TTBCustomItem; + ACanvas := L.Canvas; + + // Draw the icon image + Inc(ARect.Left, 2); // Apply margins + if Item.ImageIndex > -1 then begin + IL := Item.Images; + if not Assigned(IL) then + IL := DefaultImageList; + if Assigned(IL) then begin + ILRect := Bounds(ARect.Left, ARect.Top + ((L.ItemHeight - IL.Height) div 2), IL.Width, IL.Height); + // Draw icon shadow + if odSelected in State then begin + OffsetRect(ILRect, 1, 1); + SpDrawIconShadow(ACanvas, ILRect, IL, Item.ImageIndex); + OffsetRect(ILRect, -2, -2); + end; + SpDrawImageList(ACanvas, ILRect, IL, Item.ImageIndex, True, True); + end; + end; + + // Draw the caption + Inc(ARect.Left, L.ItemHeight); // Apply margins + WS := L.Items[Index]; + TextR := ARect; + Y := SpDrawXPText(ACanvas, WS, TextR, DT_CALCRECT); + ARect.Top := ARect.Top + ((L.ItemHeight - Y) div 2); + SpDrawXPText(ACanvas, WS, ARect, 0); + + // Draw the shortcut + if DrawShortcut then begin + WS := Item.GetShortCutText; + if (WS <> '0') and (WS <> '') then begin + ARect.Left := L.Width - 120; + SpDrawXPText(ACanvas, WS, ARect, 0) + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomizeForm } + +procedure TSpTBXCustomizeForm.FormCreate(Sender: TObject); +var + L: TStringList; +begin + ClosePanel.Visible := not Embedded; + + // Setup the listboxes + if Assigned(Customizer.Images) then begin + lbCommands.ItemHeight := Customizer.Images.Height + 4; + lbShortcuts.ItemHeight := Customizer.Images.Height + 4; + end; + // Hide the Icon Options combobox if necessary + if not Assigned(Customizer.OnIconOptionsChange) then begin + cbIconLabel.Visible := False; + cbIcon.Visible := False; + end; + // Fill the Skins combobox + L := TStringList.Create; + try + SkinManager.SkinsList.GetSkinNames(L); + L.Sort; + cbSkins.Items.Assign(L); + cbSkins.ItemIndex := L.IndexOf(SkinManager.CurrentSkinName); + finally + L.Free; + end; +end; + +procedure TSpTBXCustomizeForm.FormShow(Sender: TObject); +begin + SpTBXTabControl1.ActiveTabIndex := 0; +end; + +procedure TSpTBXCustomizeForm.FormKeyDown(Sender: TObject; + var Key: Word; Shift: TShiftState); +var + I: Integer; +begin + // Allow to change the tab index using Ctrl+Tab and Shift+Ctrl+Tab + if Key = VK_TAB then + if Shift = [ssCtrl] then begin + I := SpTBXTabControl1.ActiveTabIndex; + if I + 1 < SpTBXTabControl1.PagesCount then + SpTBXTabControl1.ActiveTabIndex := I + 1 + else + SpTBXTabControl1.ActiveTabIndex := I - 1 + end + else + if Shift = [ssCtrl, ssShift] then begin + I := SpTBXTabControl1.ActiveTabIndex; + if I - 1 > -1 then + SpTBXTabControl1.ActiveTabIndex := I - 1 + else + SpTBXTabControl1.ActiveTabIndex := I + 1; + end; +end; + +procedure TSpTBXCustomizeForm.CloseButtonClick(Sender: TObject); +begin + Close; +end; + +procedure TSpTBXCustomizeForm.DoFillCommands(ToolbarList, ItemList, ShortcutsList: TTntStringList); +var + I: Integer; + TB: TSpTBXToolbar; +begin + lbToolbars.Items.Assign(ToolbarList); + lbCommands.Items.Assign(ItemList); + lbShortcuts.Items.Assign(ShortcutsList); + // Setup the Toolbars check list + for I := 0 to lbToolbars.Count - 1 do begin + TB := lbToolbars.Items.Objects[I] as TSpTBXToolbar; + if TB.Visible then + lbToolbars.State[I] := cbChecked; + end; + if lbToolbars.Count > 0 then begin + lbToolbars.ItemIndex := 0; + lbToolbarsClick(nil); + end; +end; + +procedure TSpTBXCustomizeForm.DoSkinChange; +begin + inherited; + ClosePanel.Color := SkinManager.CurrentSkin.ColorBtnFace; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Toolbars tab } + +procedure TSpTBXCustomizeForm.lbToolbarsClick(Sender: TObject); +var + I: Integer; + TB: TTBCustomToolbar; +begin + I := lbToolbars.ItemIndex; + if I > -1 then begin + TB := lbToolbars.Items.Objects[I] as TTBCustomToolbar; + checkVisible.Checked := TB.Visible; + if TB is TSpTBXToolbar then + cbText.ItemIndex := Ord(TSpTBXToolbar(TB).DisplayMode) + else + cbText.ItemIndex := -1; + end; +end; + +procedure TSpTBXCustomizeForm.lbToolbarsClickCheck(Sender: TObject); +var + I: Integer; + TB: TTBCustomToolbar; +begin + I := lbToolbars.ItemIndex; + if I > -1 then begin + TB := lbToolbars.Items.Objects[I] as TTBCustomToolbar; + TB.Visible := lbToolbars.Checked[I]; + end; +end; + +procedure TSpTBXCustomizeForm.ResetButtonClick(Sender: TObject); +begin + Customizer.Reset; + FillCommands; +end; + +procedure TSpTBXCustomizeForm.checkVisibleClick(Sender: TObject); +var + I: Integer; +begin + I := lbToolbars.ItemIndex; + if I > -1 then begin + lbToolbars.Checked[I] := checkVisible.Checked; + lbToolbarsClickCheck(nil); + end; +end; + +procedure TSpTBXCustomizeForm.cbTextClick(Sender: TObject); +var + I: Integer; + TB: TSpTBXToolbar; +begin + I := lbToolbars.ItemIndex; + if (I > -1) and (cbText.ItemIndex > -1) then + if lbToolbars.Items.Objects[I] is TSpTBXToolbar then begin + TB := lbToolbars.Items.Objects[I] as TSpTBXToolbar; + TB.DisplayMode := TSpTBXToolbarDisplayMode(cbText.ItemIndex); + end; +end; + +procedure TSpTBXCustomizeForm.cbSkinsClick(Sender: TObject); +begin + if cbSkins.ItemIndex > -1 then + SkinManager.SetSkin(cbSkins.Text); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Commands tab } + +procedure TSpTBXCustomizeForm.lbCommandsStartDrag(Sender: TObject; + var DragObject: TDragObject); +var + L: TSpTBXListBox; + I: Integer; + Item: TTBCustomItem; + Sep: TTBSeparatorItem; +begin + L := Sender as TSpTBXListBox; + I := L.ItemIndex; + if I > -1 then begin + if I = 0 then begin + // When dragging the separator item use the first one available, or create one + if FSeparatorList.Count = 0 then begin + Sep := SpCreateUniqueSeparator(False); + Customizer.Items.Add(Sep); + FSeparatorList.AddObject(Sep.Name, Sep); + end; + Item := FSeparatorList.Objects[0] as TTBCustomItem; + // SpOutputDebugString('Start ' + FSeparatorList[0]); + end + else + if (I = 1) and Customizer.BlankSeparators then begin + // When dragging the blank separator item use the first one available, or create one + if FBlankSeparatorList.Count = 0 then begin + Sep := SpCreateUniqueSeparator(True); + Customizer.Items.Add(Sep); + FBlankSeparatorList.AddObject(Sep.Name, Sep); + end; + Item := FBlankSeparatorList.Objects[0] as TTBCustomItem; + end + else + Item := L.Items.Objects[I] as TTBCustomItem; + DragObject := TSpTBXItemDragObject.Create(L, Item); + end; +end; + +procedure TSpTBXCustomizeForm.lbCommandsEndDrag(Sender, + Target: TObject; X, Y: Integer); +var + Accepted: Boolean; + I: Integer; +begin + // When dropping an item on a toolbar we must remove the item from the list + Accepted := Assigned(Target) and (Target <> Sender); + if Accepted then begin + I := lbCommands.ItemIndex; + if I > -1 then + if I = 0 then begin + // SpOutputDebugString('End ' + FSeparatorList[0]); + FSeparatorList.Delete(0); + end + else + if (I = 1) and Customizer.BlankSeparators then + FBlankSeparatorList.Delete(0) + else + lbCommands.Items.Delete(I); + end; +end; + +procedure TSpTBXCustomizeForm.lbCommandsDragOver(Sender, + Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); +begin + Accept := Assigned(Source) and (Source is TSpTBXItemDragObject); +end; + +procedure TSpTBXCustomizeForm.lbCommandsDragDrop(Sender, + Source: TObject; X, Y: Integer); +var + OrigItem: TTBCustomItem; + WS: WideString; +begin + if Assigned(Source) and (Source is TSpTBXItemDragObject) and + (TSpTBXItemDragObject(Source).SourceControl <> Sender) then + begin + OrigItem := TSpTBXItemDragObject(Source).SouceItem; + // Remove the item from its parent + OrigItem.Parent.Remove(OrigItem); + // Add the item to the Customizer.Items property + Customizer.Items.Add(OrigItem); + WS := SpCustomizerGetWideCaption(OrigItem); + // Add the item entry in the commands list + if OrigItem is TTBSeparatorItem then begin + if Customizer.BlankSeparators and TTBSeparatorItem(OrigItem).Blank then + FBlankSeparatorList.InsertObject(0, WS, OrigItem) // Insert the blank separator in the first position + else + FSeparatorList.InsertObject(0, WS, OrigItem) // Insert the separator in the first position + end + else + lbCommands.AddItem(WS, OrigItem); + // SpOutputDebugString('Dropped ' + WS); + end; +end; + +procedure TSpTBXCustomizeForm.lbCommandsDrawItem(Sender: TObject; + ACanvas: TCanvas; var ARect: TRect; Index: Integer; + const State: TOwnerDrawState; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +begin + if PaintStage = pstPrePaint then begin + PaintDefault := False; + if Index = 0 then begin + // Draw the separator + SpDrawXPText(ACanvas, SSpTBXCustomizerFormSeparator, ARect, DT_SINGLELINE or DT_CENTER or DT_VCENTER); + end + else + if (Index = 1) and Customizer.BlankSeparators then begin + // Draw the blank separator + SpDrawXPText(ACanvas, SSpTBXCustomizerFormBlankSeparator, ARect, DT_SINGLELINE or DT_CENTER or DT_VCENTER); + end + else + SpDrawListboxItem(Sender as TSpTBXListBox, Index, ARect, State, False, Customizer.Images); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Shortcuts tab } + +procedure TSpTBXCustomizeForm.lbShortcutsClick(Sender: TObject); +var + Item: TTBCustomItem; +begin + if lbShortcuts.ItemIndex > -1 then begin + Item := lbShortcuts.Items.Objects[lbShortcuts.ItemIndex] as TTBCustomItem; + HotKey1.HotKey := Item.ShortCut; + end; +end; + +procedure TSpTBXCustomizeForm.lbShortcutsDrawItem(Sender: TObject; + ACanvas: TCanvas; var ARect: TRect; Index: Integer; + const State: TOwnerDrawState; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +begin + if PaintStage = pstPrePaint then begin + PaintDefault := False; + SpDrawListboxItem(Sender as TSpTBXListBox, Index, ARect, State, True, Customizer.Images); + end; +end; + +procedure TSpTBXCustomizeForm.ChangeShortcutClick(Sender: TObject); +var + Item, F: TTBCustomItem; + WS, WS2: WideString; + T: TShortCut; + I: Integer; + ChangeShortCut: Boolean; +begin + if lbShortcuts.ItemIndex < 0 then Exit; + T := HotKey1.HotKey; + Item := lbShortcuts.Items.Objects[lbShortcuts.ItemIndex] as TTBCustomItem; + + ChangeShortCut := True; + + if T <> 0 then begin + // Find if the shortcut is already being used + for I := 0 to lbShortcuts.Count - 1 do begin + F := lbShortcuts.Items.Objects[I] as TTBCustomItem; + if F.ShortCut = T then begin + WS := WideFormat(SSpTBXCustomizerFormChangeShortcut, [SpCustomizerGetWideCaption(F), SpCustomizerGetWideCaption(Item)]); + WS2 := SSpTBXCustomizerFormChangeShortcutTitle; + ChangeShortCut := MessageBoxW(Handle, PWideChar(WS), PWideChar(WS2), MB_APPLMODAL+MB_ICONWARNING+MB_OKCANCEL+MB_DEFBUTTON1) = IDOK; + if ChangeShortCut then + if Assigned(F.Action) and (F.Action is TAction) then + TAction(F.Action).ShortCut := 0 + else + F.ShortCut := 0; + + Break; + end; + end; + end; + + if ChangeShortCut then begin + if Assigned(Item.Action) and (Item.Action is TAction) then + TAction(Item.Action).ShortCut := T + else + Item.ShortCut := T; + lbShortcuts.Invalidate; + end; +end; + +end. diff --git a/internal/2.4.4/1/Source/SpTBXDefaultSkins.pas b/internal/2.4.4/1/Source/SpTBXDefaultSkins.pas new file mode 100644 index 0000000..49963e2 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXDefaultSkins.pas @@ -0,0 +1,2171 @@ +unit SpTBXDefaultSkins; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +History: +2 December 2009 - version 2.4.4 + - No changes. + +13 September 2009 - version 2.4.3 + - No changes. + +8 May 2009 - version 2.4.2 + - No changes. + +15 March 2009 - version 2.4.1 + - No changes. + +17 January 2009 - version 2.4 + - No changes. + +26 September 2008 - version 2.3 + - No changes. + +29 July 2008 - version 2.2 + - Fixed incorrect TRGBQuadArray declaration, thanks to Arvid + for reporting this. + - Fixed incorrect gradients in Office 2003 skins, thanks to + David for reporting this. + - Fixed Vista painting bug, the menu checkboxes are stretched + by the themes API, this doesn't happen on XP, thanks to + Arvid for reporting this. + +26 June 2008 - version 2.1 + - New skin added: Aluminum, thanks to Pete for his contribution. + +3 May 2008 - version 2.0 + - No changes. + +2 April 2008 - version 1.9.5 + - No changes. + +3 February 2008 - version 1.9.4 + - No changes. + +19 January 2008 - version 1.9.3 + - New skin added: Human. + +26 December 2007 - version 1.9.2 + - No changes. + +1 December 2007 - version 1.9.1 + - No changes. + +20 November 2007 - version 1.9 + - Initial release. + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation + +uses + Windows, Messages, Classes, SysUtils, Graphics, Controls, SpTBXSkins; + +type + { Skins } + + TSpTBXAluminumColors = array[0..3] of TColor; + + TSpTBXAluminumSkin = class(TSpTBXSkinOptions) + private + procedure SetDefaultColorScheme(const Value: TSpTBXLunaScheme); + protected + FColors: TSpTBXAluminumColors; + FDefaultColorScheme: TSpTBXLunaScheme; + FLightMetalColor: TColor; + FDarkMetalColor: TColor; + FRoughness: Integer; + procedure FillColors; virtual; + function GetBrushMetalColor(Component: TSpTBXSkinComponentsType; State: TSpTBXSkinStatesType): TColor; virtual; + public + constructor Create; override; + destructor Destroy; override; + procedure FillOptions; override; + procedure PaintBackground(ACanvas: TCanvas; ARect: TRect; Component: TSpTBXSkinComponentsType; State: TSpTBXSkinStatesType; Background, Borders: Boolean; Vertical: Boolean = False; ForceRectBorders: TAnchors = []); override; + property LightMetalColor: TColor read FLightMetalColor write FLightMetalColor; + property DarkMetalColor: TColor read FDarkMetalColor write FDarkMetalColor; + property DefaultColorScheme: TSpTBXLunaScheme read FDefaultColorScheme write SetDefaultColorScheme default lusUnknown; + end; + + TSpTBXAthenSkin = class(TSpTBXSkinOptions) + public + procedure FillOptions; override; + end; + + TSpTBXDreamSkin = class(TSpTBXSkinOptions) + public + procedure FillOptions; override; + end; + + TSpTBXEosSkin = class(TSpTBXSkinOptions) + public + procedure FillOptions; override; + end; + + TSpTBXHumanSkin = class(TSpTBXSkinOptions) + public + procedure FillOptions; override; + procedure PaintBackground(ACanvas: TCanvas; ARect: TRect; Component: TSpTBXSkinComponentsType; State: TSpTBXSkinStatesType; Background, Borders: Boolean; Vertical: Boolean = False; ForceRectBorders: TAnchors = []); override; + end; + + TSpTBXLeopardSkin = class(TSpTBXSkinOptions) + public + procedure FillOptions; override; + procedure PaintBackground(ACanvas: TCanvas; ARect: TRect; Component: TSpTBXSkinComponentsType; State: TSpTBXSkinStatesType; Background, Borders: Boolean; Vertical: Boolean = False; ForceRectBorders: TAnchors = []); override; + end; + + TSpTBXXitoSkin = class(TSpTBXSkinOptions) + public + procedure FillOptions; override; + end; + + { Office Skins } + + TSpTBXOfficeXPSkin = class(TSpTBXSkinOptions) + public + procedure FillOptions; override; + end; + + TSpTBXOffice2003Colors = array[0..22] of TColor; + + TSpTBXOffice2003Skin = class(TSpTBXSkinOptions) + private + procedure SetDefaultColorScheme(const Value: TSpTBXLunaScheme); + protected + FColors: TSpTBXOffice2003Colors; + FDefaultColorScheme: TSpTBXLunaScheme; + procedure FillColors; virtual; + public + constructor Create; override; + procedure FillOptions; override; + property DefaultColorScheme: TSpTBXLunaScheme read FDefaultColorScheme write SetDefaultColorScheme default lusUnknown; + end; + + TSpTBXOffice2007Colors = array[0..17] of TColor; + + TSpTBXOffice2007Skin = class(TSpTBXSkinOptions) + protected + FColors: TSpTBXOffice2007Colors; + procedure FillColors; virtual; abstract; + public + procedure FillOptions; override; + end; + + TSpTBXOffice2007BlueSkin = class(TSpTBXOffice2007Skin) + protected + procedure FillColors; override; + end; + + TSpTBXOffice2007BlackSkin = class(TSpTBXOffice2007Skin) + protected + procedure FillColors; override; + end; + + TSpTBXOffice2007SilverSkin = class(TSpTBXOffice2007Skin) + protected + procedure FillColors; override; + end; + +implementation + +uses + Math; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Brushed Fill } + +const + THREAD_CACHE_SIZE = 16; + NUM_TEMPLATES = 8; + MIN_TEMPLATE_SIZE = 100; + MAX_TEMPLATE_SIZE = 200; + NUM_RANDTHREADS = 1024; + +type + PRGBQuad = ^TRGBQuad; + TRGBQuad = Integer; + PRGBQuadArray = ^TRGBQuadArray; + TRGBQuadArray = array [Byte] of TRGBQuad; + TThreadCacheItem = record + BaseColor: TColorRef; + Roughness: Integer; + Bitmaps: array [0..NUM_TEMPLATES - 1] of HBITMAP; + end; + +var + ThreadTemplates: array of array of Integer; + RandThreadIndex: array of Integer; + RandThreadPositions: array of Integer; + ThreadCache: array of TThreadCacheItem; + NextCacheEntry: Integer = 0; + +function GetBGR(C: TColorRef): Cardinal; +asm + MOV ECX,EAX // this function swaps R and B bytes in ABGR + SHR EAX,16 + XCHG AL,CL + MOV AH,$FF // and writes $FF into A component } + SHL EAX,16 + MOV AX,CX +end; + +procedure InitializeBrushedFill; +const + Pi = 3.14159265358987; +var + TemplateIndex, Size, I, V, V1, V2: Integer; + T, R12, R13, R14, R21, R22, R23, R24: Single; +begin + + SetLength(ThreadTemplates, NUM_TEMPLATES); + SetLength(RandThreadIndex, NUM_RANDTHREADS); + SetLength(RandThreadPositions, NUM_RANDTHREADS); + + { Make thread templates } + for TemplateIndex := 0 to NUM_TEMPLATES - 1 do begin + Size := (MIN_TEMPLATE_SIZE + Random(MAX_TEMPLATE_SIZE - MIN_TEMPLATE_SIZE + 1)) div 2; + SetLength(ThreadTemplates[TemplateIndex], Size * 2); + R12 := Random * 2 * Pi; + R13 := Random * 2 * Pi; + R14 := Random * 2 * Pi; + R21 := Random * 2 * Pi; + R22 := Random * 2 * Pi; + R23 := Random * 2 * Pi; + R24 := Random * 2 * Pi; + for I := 0 to Size - 1 do begin + T := 2 * Pi * I / Size; + V1 := Round(150 * Sin(T) + 100 * Sin(2 * T + R12) + 50 * Sin(3 * T + R13) + 20 * Sin(4 * T + R14)); + if V1 > 255 then V1 := 255; + if V1 < -255 then V1 := -255; + + V2 := Round(150 * Sin(T + R21) + 100 * Sin(2 * T + R22) + 50 * Sin(3 * T + R23) + 20 * Sin(4 * T + R24)); + if V2 > 255 then V2 := 255; + if V2 < -255 then V2 := -255; + + if Abs(V2 - V1) > 300 then begin + V := (V1 + V2) div 2; + V1 := V - 150; + V2 := V + 150; + end; + + ThreadTemplates[TemplateIndex][I * 2] := Min(V1, V2); + ThreadTemplates[TemplateIndex][I * 2 + 1] := Max(V1, V2); + end; + end; + + { Initialize Rand arrays } + for I := 0 to NUM_RANDTHREADS- 1 do begin + RandThreadIndex[I] := Random(NUM_TEMPLATES); + V1 := Random(Length(ThreadTemplates[RandThreadIndex[I]])) and not $1; + if Odd(I) then Inc(V1); + RandThreadPositions[I] := V1; + end; +end; + +procedure ClearCacheItem(var CacheItem: TThreadCacheItem); +var + I: Integer; +begin + with CacheItem do begin + BaseColor := $FFFFFFFF; + Roughness := -1; + for I := NUM_TEMPLATES- 1 downto 0 do + if Bitmaps[I] <> 0 then begin + DeleteObject(Bitmaps[I]); + Bitmaps[I] := 0; + end; + end; +end; + +procedure ResetBrushedFillCache; +var + I: Integer; +begin + { Should be called each time the screen parameters change } + for I := High(ThreadCache) downto 0 do ClearCacheItem(ThreadCache[I]); +end; + +procedure FinalizeBrushedFill; +begin + ResetBrushedFillCache; + SetLength(ThreadCache, 0); + ThreadCache := nil; + SetLength(RandThreadPositions, 0); + RandThreadPositions := nil; + SetLength(RandThreadIndex, 0); + RandThreadIndex := nil; + SetLength(ThreadTemplates, 0, 0); + ThreadTemplates := nil; +end; + +procedure MakeCacheItem(var CacheItem: TThreadCacheItem; Color: TColorRef; Roughness: Integer); +var + TemplateIndex, Size, I, V: Integer; + CR, CG, CB: Integer; + R, G, B: Integer; + ScreenDC: HDC; + BMI: TBitmapInfo; + Bits: PRGBQuadArray; + DIBSection: HBITMAP; + DIBDC, CacheDC: HDC; +begin + ScreenDC := GetDC(0); + FillChar(BMI, SizeOf(TBitmapInfo), 0); + with BMI.bmiHeader do begin + biSize := SizeOf(TBitmapInfoHeader); + biPlanes := 1; + biCompression := BI_RGB; + biWidth := MAX_TEMPLATE_SIZE; + biHeight := -1; + biBitCount := 32; + end; + DIBSection := CreateDIBSection(0, BMI, DIB_RGB_COLORS, Pointer(Bits), 0, 0); + DIBDC := CreateCompatibleDC(0); + SelectObject(DIBDC, DIBSection); + CacheDC := CreateCompatibleDC(0); + + CR := Color shl 8 and $FF00; + CG := Color and $FF00; + CB := Color shr 8 and $FF00; + try + for TemplateIndex := 0 to NUM_TEMPLATES - 1 do begin + CacheItem.BaseColor := Color; + CacheItem.Roughness := Roughness; + Size := Length(ThreadTemplates[TemplateIndex]); + + if CacheItem.Bitmaps[TemplateIndex] = 0 then + CacheItem.Bitmaps[TemplateIndex] := CreateCompatibleBitmap(ScreenDC, Size, 1); + SelectObject(CacheDC, CacheItem.Bitmaps[TemplateIndex]); + + for I := 0 to Size - 1 do begin + V := ThreadTemplates[TemplateIndex][I]; + R := CR + V * Roughness; + G := CG + V * Roughness; + B := CB + V * Roughness; + if R < 0 then R := 0; + if G < 0 then G := 0; + if B < 0 then B := 0; + if R > $EF00 then R := $EF00; + if G > $EF00 then G := $EF00; + if B > $EF00 then B := $EF00; + Bits^[I] := (R and $FF00 + (G and $FF00) shl 8 + (B and $FF00) shl 16) shr 8; + end; + + BitBlt(CacheDC, 0, 0, Size, 1, DIBDC, 0, 0, SRCCOPY); + end; + finally + DeleteDC(CacheDC); + DeleteDC(DIBDC); + DeleteObject(DIBSection); + ReleaseDC(0, ScreenDC); + end; +end; + +function FindCacheItem(Color: TColorRef; Roughness: Integer): Integer; +begin + Result := High(ThreadCache); + while Result >= 0 do + if (ThreadCache[Result].BaseColor = Color) and (ThreadCache[Result].Roughness = Roughness) then + Exit + else + Dec(Result); +end; + +function GetCacheItem(Color: TColorRef; Roughness: Integer): Integer; +begin + Result := FindCacheItem(Color, Roughness); + if Result >= 0 then + Exit + else begin + Result := NextCacheEntry; + if Result > High(ThreadCache) then begin + SetLength(ThreadCache, Result+ 1); + ClearCacheItem(ThreadCache[Result]); + end; + MakeCacheItem(ThreadCache[Result], Color, Roughness); + NextCacheEntry := (NextCacheEntry + 1) mod THREAD_CACHE_SIZE; + end; +end; + +procedure BrushedFill(DC: HDC; Origin: PPoint; ARect: TRect; Color: TColor; Roughness: Integer); +const + ZeroOrigin: TPoint = (X: 0; Y: 0); +var + CR: TColorRef; + X, Y: Integer; + CacheIndex: Integer; + TemplateIndex: Integer; + CacheDC: HDC; + Size: Integer; + BoxR: TRect; +begin + if (Color = clNone) or not RectVisible(DC, ARect) then Exit; + CR := GetBGR(ColorToRGB(Color)); + if Origin = nil then Origin := @ZeroOrigin; + if ThreadTemplates = nil then InitializeBrushedFill; + CacheIndex := GetCacheItem(CR, Roughness); + GetClipBox(DC, BoxR); + IntersectRect(ARect, ARect, BoxR); + SaveDC(DC); + IntersectClipRect(DC, ARect.Left, ARect.Top, ARect.Right, ARect.Bottom); + + CacheDC := CreateCompatibleDC(0); + for Y := ARect.Top to ARect.Bottom - 1 do begin + TemplateIndex := RandThreadIndex[(65536 + Y - Origin.Y) mod NUM_RANDTHREADS]; + Size := Length(ThreadTemplates[TemplateIndex]); + X := -RandThreadPositions[(65536 + Y - Origin.Y) mod NUM_RANDTHREADS] + Origin.X; + SelectObject(CacheDC, ThreadCache[CacheIndex].Bitmaps[TemplateIndex]); + while X < ARect.Right do begin + if X + Size >= ARect.Left then BitBlt(DC, X, Y, Size, 1, CacheDC, 0, 0, SRCCOPY); + Inc(X, Size); + end; + end; + DeleteDC(CacheDC); + RestoreDC(DC, -1); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXAluminumSkin } + +constructor TSpTBXAluminumSkin.Create; +begin + FRoughness := 12; + FDefaultColorScheme := lusUnknown; + inherited; +end; + +destructor TSpTBXAluminumSkin.Destroy; +begin + FinalizeBrushedFill; + inherited; +end; + +procedure TSpTBXAluminumSkin.FillColors; +const + AluminumColors: array[lusBlue..lusGreen] of TSpTBXAluminumColors = ( + ($C56A31, // 0: Item borders + $E0D7D1, // 1: Item Checked + $E2B598, // 2: Item Pushed + $EED2C1), // 3: Item HotTrack + + ($BFB4B2, // 0: Item borders + $DDDCDC, // 1: Item Checked + $DFDAD9, // 2: Item Pushed + $ECE9E8), // 3: Item HotTrack + + ($70A093, // 0: Item borders + $D8DCDB, // 1: Item Checked + $B8D0C9, // 2: Item Pushed + $D4E3DF) // 3: Item HotTrack + ); +var + Luna: TSpTBXLunaScheme; +begin + if FDefaultColorScheme <> lusUnknown then + Luna := FDefaultColorScheme + else begin + Luna := SpGetLunaScheme; + if Luna = lusUnknown then Luna := lusMetallic; + end; + + FColors := AluminumColors[Luna]; + FRoughness := 12; + FLightMetalColor := $C7C7C7; + FDarkMetalColor := $DFDFDF; +end; + +procedure TSpTBXAluminumSkin.FillOptions; +begin + SkinName := 'Aluminum'; + + //---- Colors ----// + + FillColors; + + //---- Single State ----// + Options(skncDock, sknsNormal).Body.Fill(0, clWhite, clNone, clNone, clNone); // Dummy, uses BrushedFill + + Options(skncDockablePanel, sknsNormal).Body.Fill(0, $F9F9F9, clNone, clNone, clNone); + Options(skncDockablePanel, sknsNormal).Borders.Fill(0, $C7C7C7, $C7C7C7, clWhite, clWhite); + + Options(skncDockablePanelTitleBar, sknsNormal).Body.Fill(1, clWhite, $D8D8D8, clNone, clNone); + Options(skncDockablePanelTitleBar, sknsNormal).Borders.Fill(0, clWhite, $9F9F9F, clNone, clNone); + + Options(skncPanel, sknsNormal).Body.Fill(0, clWhite, clNone, clNone, clNone); // Dummy, uses BrushedFill + Options(skncPanel, sknsNormal).Borders.Fill(2, FColors[0], FColors[0], clWhite, clWhite); + + Options(skncPopup, sknsNormal).Body.Fill(0, $F9F9F9, clNone, clNone, clNone); + Options(skncPopup, sknsNormal).Borders.Fill(0, $7F7F7F, $7F7F7F, clNone, clNone); + + Options(skncStatusBar, sknsNormal).Body.Fill(0, clWhite, clNone, clNone, clNone); // Dummy, uses BrushedFill + + Options(skncSplitter, sknsNormal).Body.Fill(0, clWhite, clNone, clNone, clNone); // Dummy, uses BrushedFill + + Options(skncToolbar, sknsNormal).Body.Fill(0, clWhite, clNone, clNone, clNone); // Dummy, uses BrushedFill + Options(skncToolbar, sknsNormal).Borders.Fill(2, clWhite, $7F7F7F, clNone, clNone); + + CopyOptions(skncToolbar, skncMenuBar); // Dummy, uses BrushedFill + + Options(skncWindow, sknsNormal).Borders.Fill(0, $808080, $808080, $C0C0C0, $DDD9D2); + + Options(skncWindowTitleBar, sknsNormal).Body.Fill(1, clWhite, $D8D8D8, clNone, clNone); + + //---- Elements ----// + Options(skncToolbarGrip, sknsNormal).Body.Fill(0, $B0B0B0, clWhite, clNone, clNone); + + Options(skncStatusBarGrip, sknsNormal).Body.Fill(0, $B0B0B0, clWhite, clNone, clNone); + + Options(skncSeparator, sknsNormal).Body.Fill(0, $9F9F9F, clWhite, clNone, clNone); + + //---- Buttons ----// + Options(skncToolbarItem, sknsHotTrack).Body.Fill(0, FColors[3], clNone, clNone, clNone); + Options(skncToolbarItem, sknsHotTrack).Borders.Fill(1, FColors[0], FColors[0], clNone, clNone); + Options(skncToolbarItem, sknsPushed).Body.Fill(0, FColors[2], clNone, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Borders.Fill(1, FColors[0], FColors[0], clNone, clNone); + Options(skncToolbarItem, sknsChecked).Body.Fill(0, FColors[1], clNone, clNone, clNone); + Options(skncToolbarItem, sknsChecked).Borders.Fill(1, FColors[0], FColors[0], clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Body.Fill(0, FColors[2], clNone, clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Borders.Fill(1, FColors[0], FColors[0], clNone, clNone); + + Options(skncOpenToolbarItem, sknsNormal).Body.Fill(0, $ECECEC, clNone, clNone, clNone); + Options(skncOpenToolbarItem, sknsNormal).Borders.Fill(0, $7F7F7F, $7F7F7F, clNone, clNone); + + CopyOptions(skncToolbarItem, skncMenuBarItem); + + CopyOptions(skncToolbarItem, skncMenuItem); + + Options(skncButton, sknsNormal).Body.Fill(1, $EFEFEF, $D1D1D1, clNone, clNone); + Options(skncButton, sknsNormal).Borders.Fill(1, $9F9F9F, $9F9F9F, $F7F7F7, $C7C7C7); + Options(skncButton, sknsDisabled).Body.Fill(1, $EFEFEF, $D1D1D1, clNone, clNone); + Options(skncButton, sknsDisabled).Borders.Fill(1, $9F9F9F, $9F9F9F, $F7F7F7, $C7C7C7); + Options(skncButton, sknsHotTrack).Body.Fill(1, $F2F2F2, $DDDDDD, clNone, clNone); + Options(skncButton, sknsHotTrack).Borders.Fill(1, $BABABA, $BABABA, $F8F8F8, $D6D6D6); + Options(skncButton, sknsPushed).Body.Fill(1, $D1D1D1, $EFEFEF, clNone, clNone); + Options(skncButton, sknsPushed).Borders.Fill(1, $9F9F9F, $9F9F9F, $C7C7C7, $F7F7F7); + Options(skncButton, sknsChecked).Body.Fill(1, $D1D1D1, $EFEFEF, clNone, clNone); + Options(skncButton, sknsChecked).Borders.Fill(1, $9F9F9F, $9F9F9F, $C7C7C7, $F7F7F7); + Options(skncButton, sknsCheckedAndHotTrack).Body.Fill(1, $D1D1D1, $EFEFEF, clNone, clNone); + Options(skncButton, sknsCheckedAndHotTrack).Borders.Fill(1, $9F9F9F, $9F9F9F, $C7C7C7, $F7F7F7); + + Options(skncListItem, sknsChecked).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsCheckedAndHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Body.Lighten(20); + Options(skncListItem, sknsHotTrack).Borders.Lighten(20); + Options(skncListItem, sknsCheckedAndHotTrack).Body.Lighten(-20); + Options(skncListItem, sknsCheckedAndHotTrack).Borders.Lighten(-20); + + CopyOptions(skncToolbarItem, skncCheckBox); + Options(skncCheckBox, sknsNormal).Borders.Fill(1, $9F9F9F, $9F9F9F, clNone, clNone); + Options(skncCheckBox, sknsDisabled).Borders.Fill(1, $99A8AC, $99A8AC, clNone, clNone); + + CopyOptions(skncCheckBox, skncRadioButton); + + //---- Editors ----// + Options(skncEditFrame, sknsNormal).Borders.Fill(1, clNone, clNone, $9F9F9F, $9F9F9F); + Options(skncEditFrame, sknsDisabled).Borders.Fill(1, clNone, clNone, $99A8AC, $99A8AC); + Options(skncEditFrame, sknsHotTrack).Borders.Fill(1, clNone, clNone, $9F9F9F, $9F9F9F); + + CopyOptions(skncButton, skncEditButton); + Options(skncEditButton, sknsNormal).Reset; + + //---- Tabs ----// + CopyOptions(skncToolbarItem, skncTab); + + // TabBackground: Only Normal state is used + Options(skncTabBackground, sknsNormal).Body.Fill(0, FColors[1], clNone, clNone, clNone); + Options(skncTabBackground, sknsNormal).Borders.Fill(0, FColors[0], FColors[0], clNone, clNone); + + //---- ProgressBar ----// + // ProgressBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + Options(skncProgressBar, sknsNormal).Body.Fill(0, FColors[2], clNone, clNone, clNone); + Options(skncProgressBar, sknsNormal).Borders.Fill(1, FColors[0], FColors[0], clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Body.Fill(0, FColors[3], clNone, clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Borders.Fill(1, FColors[0], FColors[0], clNone, clNone); + + //---- TrackBar ----// + // TrackBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + CopyOptions(skncProgressBar, skncTrackBar); + + // TrackBarButton: Only Normal and Pushed states are used + Options(skncTrackBarButton, sknsNormal).Body.Fill(0, FColors[3], clNone, clNone, clNone); + Options(skncTrackBarButton, sknsNormal).Borders.Fill(1, FColors[0], FColors[0], clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Body.Fill(0, FColors[1], clNone, clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Borders.Fill(1, FColors[0], FColors[0], clNone, clNone); + + //---- Header ----// + Options(skncHeader, sknsNormal).Body.Fill(1, $EFEFEF, $D1D1D1, clNone, clNone); + Options(skncHeader, sknsNormal).Borders.Fill(0, $F7F7F7, $C7C7C7, clNone, clNone); + Options(skncHeader, sknsHotTrack).Body.Fill(1, $F2F2F2, $DDDDDD, clNone, clNone); + Options(skncHeader, sknsHotTrack).Borders.Fill(0, $F8F8F8, $D6D6D6, clNone, clNone); + Options(skncHeader, sknsPushed).Body.Fill(1, $D1D1D1, $EFEFEF, clNone, clNone); + Options(skncHeader, sknsPushed).Borders.Fill(0, $C7C7C7, $F7F7F7, clNone, clNone); +end; + +function TSpTBXAluminumSkin.GetBrushMetalColor(Component: TSpTBXSkinComponentsType; + State: TSpTBXSkinStatesType): TColor; +begin + Result := clNone; + if Component in [skncDock, skncPanel, skncTabToolbar, skncStatusBar, skncSplitter] then + Result := FLightMetalColor + else + if Component in [skncToolbar, skncMenuBar] then + Result := FDarkMetalColor; +end; + +procedure TSpTBXAluminumSkin.PaintBackground(ACanvas: TCanvas; ARect: TRect; + Component: TSpTBXSkinComponentsType; State: TSpTBXSkinStatesType; + Background, Borders, Vertical: Boolean; ForceRectBorders: TAnchors); +var + BackgroundRect: TRect; + Op: TSpTBXSkinOptionCategory; + BrushColor: TColor; +begin + BrushColor := GetBrushMetalColor(Component, State); + + if BrushColor = clNone then + inherited + else begin + Op := Options(Component, State); + + if Op.Borders.IsEmpty then + Borders := False; + if Op.Body.IsEmpty then + Background := False; + + if Background then begin + BackgroundRect := ARect; + if Borders then + InflateRect(BackgroundRect, -1, -1); + BrushedFill(ACanvas.Handle, nil, BackgroundRect, BrushColor, FRoughness); + end; + + if Borders then + SpPaintSkinBorders(ACanvas, ARect, Op, ForceRectBorders); + end; +end; + +procedure TSpTBXAluminumSkin.SetDefaultColorScheme(const Value: TSpTBXLunaScheme); +begin + if FDefaultColorScheme <> Value then begin + FDefaultColorScheme := Value; + Reset; + FillOptions; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXAthenSkin } + +procedure TSpTBXAthenSkin.FillOptions; +begin + SkinName := 'Athen'; + + //---- Single State ----// + Options(skncDock, sknsNormal).Body.Fill(0, $E0E0E0, clNone, clNone, clNone); + + Options(skncDockablePanel, sknsNormal).Body.Fill(0, clWhite, clNone, clNone, clNone); + Options(skncDockablePanel, sknsNormal).Borders.Fill(0, $E0E0E0, $E0E0E0, clWhite, clWhite); + + Options(skncDockablePanelTitleBar, sknsNormal).Body.Fill(3, $F8F8F8, $D8D8D8, $F0F0F0, $F8F8F8); + + Options(skncPanel, sknsNormal).Body.Fill(1, $FBF9A0, clWhite, clNone, clNone); + Options(skncPanel, sknsNormal).Borders.Fill(2, $D0D0D0, $D0D0D0, $F8F8F8, $F8F8F8); + + Options(skncPopup, sknsNormal).Body.Fill(0, clWhite, clNone, clNone, clNone); + Options(skncPopup, sknsNormal).Borders.Fill(0, $C0C0C0, $C0C0C0, clNone, clNone); + + Options(skncStatusBar, sknsNormal).Body.Fill(3, $F8F8F8, $D8D8D8, $F0F0F0, $F8F8F8); + + Options(skncSplitter, sknsNormal).Body.Fill(1, $D8D8D8, $F0F0F0, clNone, clNone); + + Options(skncToolbar, sknsNormal).Body.Fill(3, $F8F8F8, $D8D8D8, $F0F0F0, $F8F8F8); + Options(skncToolbar, sknsNormal).Borders.Fill(1, clWhite, $B0B0B0, clNone, clNone); + + CopyOptions(skncToolbar, skncMenuBar); + + Options(skncWindow, sknsNormal).Borders.Fill(0, $808080, $808080, $C0C0C0, $DDD9D2); + + Options(skncWindowTitleBar, sknsNormal).Body.Fill(3, $F8F8F8, $D8D8D8, $F0F0F0, $F8F8F8); + + //---- Elements ----// + Options(skncToolbarGrip, sknsNormal).Body.Fill(0, $B0B0B0, clWhite, clNone, clNone); + + Options(skncStatusBarGrip, sknsNormal).Body.Fill(0, $B0B0B0, clWhite, clNone, clNone); + + Options(skncSeparator, sknsNormal).Body.Fill(0, $B0B0B0, clWhite, clNone, clNone); + + //---- Buttons ----// + Options(skncToolbarItem, sknsHotTrack).Body.Fill(3, $FFF8F0, $E0B080, $F0E870, $FFFFB0); + Options(skncToolbarItem, sknsHotTrack).Borders.Fill(1, $DAB370, $DAB370, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Body.Fill(1, $C0C0C0, clWhite, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Borders.Fill(1, $D0D0D0, $B0B0B0, clNone, clNone); + Options(skncToolbarItem, sknsChecked).Body.Fill(3, $FFF8F0, $E0B080, $F0E870, $FFFFB0); + Options(skncToolbarItem, sknsChecked).Borders.Fill(1, $DAB370, $DAB370, clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Body.Fill(3, $FAECDE, $E0B080, $EDDE73, $FFFFBA); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Borders.Fill(1, $DAB370, $DAB370, clNone, clNone); + + Options(skncOpenToolbarItem, sknsNormal).Body.Fill(1, $C0C0C0, clWhite, clNone, clNone); + Options(skncOpenToolbarItem, sknsNormal).Borders.Fill(1, $D0D0D0, $B0B0B0, clNone, clNone); + + Options(skncMenuBarItem, sknsHotTrack).Body.Fill(3, $FFF8F0, $E0B080, $F0E870, $FFFFB0); + Options(skncMenuBarItem, sknsPushed).Body.Fill(3, $FFF8F0, $E0B080, $F0E870, $FFFFB0); + Options(skncMenuBarItem, sknsChecked).Body.Fill(3, $FFF8F0, $E0B080, $F0E870, $FFFFB0); + Options(skncMenuBarItem, sknsCheckedAndHotTrack).Body.Fill(3, $FAECDE, $E0B080, $EDDE73, $FFFFBA); + + CopyOptions(skncToolbarItem, skncMenuItem); + Options(skncMenuItem, sknsHotTrack).Body.Fill(3, $F8F8F8, $D8D8D8, $F0F0F0, $F8F8F8); + Options(skncMenuItem, sknsHotTrack).Borders.Fill(1, $C0C0C0, $C0C0C0, clNone, clNone); + + CopyOptions(skncToolbarItem, skncButton); + Options(skncButton, sknsNormal).Body.Fill(3, $F8F8F8, $D8D8D8, $F0F0F0, $F8F8F8); + Options(skncButton, sknsNormal).Borders.Fill(1, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncButton, sknsDisabled).Body.Fill(3, $F8F8F8, $D8D8D8, $F0F0F0, $F8F8F8); + Options(skncButton, sknsDisabled).Borders.Fill(1, $C0C0C0, $C0C0C0, clNone, clNone); + + Options(skncListItem, sknsChecked).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsCheckedAndHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Body.Lighten(30); + Options(skncListItem, sknsHotTrack).Borders.Lighten(30); + Options(skncListItem, sknsCheckedAndHotTrack).Body.Lighten(-30); + Options(skncListItem, sknsCheckedAndHotTrack).Borders.Lighten(-30); + + CopyOptions(skncToolbarItem, skncCheckBox); + Options(skncCheckBox, sknsNormal).Body.Fill(3, $F8F8F8, $D8D8D8, $F0F0F0, $F8F8F8); + Options(skncCheckBox, sknsNormal).Borders.Fill(0, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncCheckBox, sknsDisabled).Borders.Fill(0, $99A8AC, $99A8AC, clNone, clNone); + + CopyOptions(skncCheckBox, skncRadioButton); + + //---- Editors ----// + Options(skncEditFrame, sknsNormal).Borders.Fill(1, clNone, clNone, $D0D0D0, $D0D0D0); + Options(skncEditFrame, sknsDisabled).Borders.Fill(1, clNone, clNone, $99A8AC, $99A8AC); + Options(skncEditFrame, sknsHotTrack).Borders.Fill(1, clNone, clNone, $DAB370, $DAB370); + + CopyOptions(skncToolbarItem, skncEditButton); + + //---- Tabs ----// + Options(skncTab, sknsHotTrack).Body.Fill(3, $FFF8F0, $E0B080, $F0E870, $FFFFB0); + Options(skncTab, sknsHotTrack).Borders.Fill(2, $DAB370, $DAB370, clNone, clNone); + Options(skncTab, sknsChecked).Body.Fill(3, $FFF8F0, $E0B080, $F0E870, $FFFFB0); + Options(skncTab, sknsChecked).Borders.Fill(2, $DAB370, $DAB370, clNone, clNone); + Options(skncTab, sknsCheckedAndHotTrack).Body.Fill(3, $FAECDE, $E0B080, $EDDE73, $FFFFBA); + Options(skncTab, sknsCheckedAndHotTrack).Borders.Fill(2, $DAB370, $DAB370, clNone, clNone); + + // TabBackground: Only Normal state is used + Options(skncTabBackground, sknsNormal).Body.Fill(1, $FBF9A0, clWhite, clNone, clNone); + Options(skncTabBackground, sknsNormal).Borders.Fill(0, $DAB370, $DAB370, clNone, clNone); + + //---- ProgressBar ----// + // ProgressBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + Options(skncProgressBar, sknsNormal).Body.Fill(1, $C0C0C0, clWhite, clNone, clNone); + Options(skncProgressBar, sknsNormal).Borders.Fill(1, $D0D0D0, $B0B0B0, clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Body.Fill(3, $FFF8F0, $E0B080, $F0E870, $FFFFB0); + Options(skncProgressBar, sknsHotTrack).Borders.Fill(2, $DAB370, $DAB370, clNone, clNone); + + //---- TrackBar ----// + // TrackBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + CopyOptions(skncProgressBar, skncTrackBar); + + // TrackBarButton: Only Normal and Pushed states are used + Options(skncTrackBarButton, sknsNormal).Body.Fill(3, $F8F8F8, $D8D8D8, $F0F0F0, $F8F8F8); + Options(skncTrackBarButton, sknsNormal).Borders.Fill(1, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Body.Fill(3, $FFF8F0, $E0B080, $F0E870, $FFFFB0); + Options(skncTrackBarButton, sknsPushed).Borders.Fill(1, $DAB370, $DAB370, clNone, clNone); + + //---- Header ----// + Options(skncHeader, sknsNormal).Body.Fill(3, $F8F8F8, $D8D8D8, $F0F0F0, $F8F8F8); + Options(skncHeader, sknsNormal).Borders.Fill(0, $E7E7E7, $C0C0C0, clNone, clNone); + Options(skncHeader, sknsHotTrack).Body.Fill(3, $FFF8F0, $E0B080, $F0E870, $FFFFB0); + Options(skncHeader, sknsHotTrack).Borders.Fill(0, $F7E4D0, $DAB370, clNone, clNone); + Options(skncHeader, sknsPushed).Body.Fill(1, $C0C0C0, clWhite, clNone, clNone); + Options(skncHeader, sknsPushed).Borders.Fill(0, $D0D0D0, $B0B0B0, clNone, clNone); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXDreamSkin } + +procedure TSpTBXDreamSkin.FillOptions; +begin + SkinName := 'Dream'; + + //---- Single State ----// + Options(skncDock, sknsNormal).Body.Fill(0, $E0E0E0, clNone, clNone, clNone); + + Options(skncDockablePanel, sknsNormal).Body.Fill(1, clWhite, $DDD9D2, clNone, clNone); + Options(skncDockablePanel, sknsNormal).Borders.Fill(0, $E0E0E0, $E0E0E0, clWhite, clWhite); + + Options(skncDockablePanelTitleBar, sknsNormal).Body.Fill(1, clWhite, $DDD9D2, clNone, clNone); + + Options(skncPanel, sknsNormal).Body.Fill(1, $D1F9FF, clWhite, clNone, clNone); + Options(skncPanel, sknsNormal).Borders.Fill(2, $808080, $808080, $B0D4DF, clWhite); + + Options(skncPopup, sknsNormal).Body.Fill(0, $F9F9F9, clNone, clNone, clNone); + Options(skncPopup, sknsNormal).Borders.Fill(0, $C0C0C0, $C0C0C0, clNone, clNone); + + Options(skncStatusBar, sknsNormal).Body.Fill(1, $DDD9D2, clWhite, clNone, clNone); + + Options(skncSplitter, sknsNormal).Body.Fill(1, clWhite, $DDD9D2, clNone, clNone); + + Options(skncToolbar, sknsNormal).Body.Fill(1, clWhite, $DDD9D2, clNone, clNone); + Options(skncToolbar, sknsNormal).Borders.Fill(2, clWhite, $B0B0B0, clNone, clNone); + + CopyOptions(skncToolbar, skncMenuBar); + + Options(skncWindow, sknsNormal).Borders.Fill(0, $808080, $808080, $C0C0C0, $DDD9D2); + + Options(skncWindowTitleBar, sknsNormal).Body.Fill(1, clWhite, $DDD9D2, clNone, clNone); + + //---- Elements ----// + Options(skncToolbarGrip, sknsNormal).Body.Fill(0, $B0B0B0, clWhite, clNone, clNone); + + Options(skncStatusBarGrip, sknsNormal).Body.Fill(0, $B0B0B0, clWhite, clNone, clNone); + + Options(skncSeparator, sknsNormal).Body.Fill(0, $B0B0B0, clWhite, clNone, clNone); + + //---- Buttons ----// + Options(skncToolbarItem, sknsHotTrack).Body.Fill(1, clWhite, $E5E2DB, clNone, clNone); + Options(skncToolbarItem, sknsHotTrack).Borders.Fill(1, $909090, $909090, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Body.Fill(1, $C0C0C0, clWhite, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Borders.Fill(1, $909090, $909090, clNone, clNone); + Options(skncToolbarItem, sknsChecked).Body.Fill(1, $D2F9FF, $F0FDFF, clNone, clNone); + Options(skncToolbarItem, sknsChecked).Borders.Fill(1, $808080, $808080, $B0D4DF, $F0FDFF); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Body.Fill(1, $2695EA, $80E0FF, clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Borders.Fill(1, $808080, $808080, $60B0E8, $80E0FF); + + Options(skncOpenToolbarItem, sknsNormal).Body.Fill(1, $C0C0C0, clWhite, clNone, clNone); + Options(skncOpenToolbarItem, sknsNormal).Borders.Fill(1, $909090, $909090, clNone, clNone); + + CopyOptions(skncToolbarItem, skncMenuBarItem); + + CopyOptions(skncToolbarItem, skncMenuItem); + + CopyOptions(skncToolbarItem, skncButton); + Options(skncButton, sknsNormal).Body.Fill(1, clWhite, $DCD8D0, clNone, clNone); + Options(skncButton, sknsNormal).Borders.Fill(1, $909090, $909090, clNone, clNone); + Options(skncButton, sknsDisabled).Body.Fill(1, clWhite, $DCD8D0, clNone, clNone); + Options(skncButton, sknsDisabled).Borders.Fill(1, $909090, $909090, clNone, clNone); + + Options(skncListItem, sknsChecked).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsCheckedAndHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Body.Lighten(20); + Options(skncListItem, sknsHotTrack).Borders.Lighten(20); + Options(skncListItem, sknsCheckedAndHotTrack).Body.Lighten(-20); + Options(skncListItem, sknsCheckedAndHotTrack).Borders.Lighten(-20); + + CopyOptions(skncToolbarItem, skncCheckBox); + Options(skncCheckBox, sknsNormal).Borders.Fill(0, $808080, $808080, clNone, clNone); + Options(skncCheckBox, sknsDisabled).Borders.Fill(0, $99A8AC, $99A8AC, clNone, clNone); + + CopyOptions(skncCheckBox, skncRadioButton); + + //---- Editors ----// + Options(skncEditFrame, sknsNormal).Borders.Fill(1, clNone, clNone, $D0D0D0, $D0D0D0); + Options(skncEditFrame, sknsDisabled).Borders.Fill(1, clNone, clNone, $99A8AC, $99A8AC); + Options(skncEditFrame, sknsHotTrack).Borders.Fill(1, clNone, clNone, $909090, $909090); + + CopyOptions(skncToolbarItem, skncEditButton); + + //---- Tabs ----// + Options(skncTab, sknsHotTrack).Body.Fill(0, $F4F0F0, clNone, clNone, clNone); + Options(skncTab, sknsHotTrack).Borders.Fill(1, $A0A0A0, $A0A0A0, clNone, clNone); + Options(skncTab, sknsChecked).Body.Fill(1, $F0FDFF, $D2F9FF, clNone, clNone); + Options(skncTab, sknsChecked).Borders.Fill(1, $808080, $808080, $B0D4DF, $F0FDFF); + Options(skncTab, sknsCheckedAndHotTrack).Body.Fill(1, $2695EA, $80E0FF, clNone, clNone); + Options(skncTab, sknsCheckedAndHotTrack).Borders.Fill(1, $808080, $808080, $60B0E8, $80E0FF); + + // TabBackground: Only Normal state is used + Options(skncTabBackground, sknsNormal).Body.Fill(1, $D2F9FF, $F0FDFF, clNone, clNone); + Options(skncTabBackground, sknsNormal).Borders.Fill(0, $808080, $808080, $B0D4DF, $F0FDFF); + + //---- ProgressBar ----// + // ProgressBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + Options(skncProgressBar, sknsNormal).Body.Fill(1, $C0C0C0, clWhite, clNone, clNone); + Options(skncProgressBar, sknsNormal).Borders.Fill(2, $909090, $909090, clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Body.Fill(1, clWhite, $DDD9D2, clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Borders.Fill(2, $909090, $909090, clNone, clNone); + + //---- TrackBar ----// + // TrackBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + CopyOptions(skncProgressBar, skncTrackBar); + + // TrackBarButton: Only Normal and Pushed states are used + Options(skncTrackBarButton, sknsNormal).Body.Fill(0, $F4F0F0, clNone, clNone, clNone); + Options(skncTrackBarButton, sknsNormal).Borders.Fill(1, $909090, $909090, clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Body.Fill(1, $D1F9FF, clWhite, clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Borders.Fill(1, $808080, $808080, $B0D4DF, clWhite); + + //---- Header ----// + Options(skncHeader, sknsNormal).Body.Fill(1, clWhite, $DCD8D0, clNone, clNone); + Options(skncHeader, sknsNormal).Borders.Fill(0, $E7E7E7, $C0C0C0, clNone, clNone); + Options(skncHeader, sknsHotTrack).Body.Fill(1, clWhite, $E5E2DB, clNone, clNone); + Options(skncHeader, sknsHotTrack).Borders.Fill(0, $E7E7E7, $C0C0C0, clNone, clNone); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXEosSkin } + +procedure TSpTBXEosSkin.FillOptions; +begin + SkinName := 'Eos'; + + //---- Single State ----// + Options(skncDock, sknsNormal).Body.Fill(0, $809090, clNone, clNone, clNone); + + Options(skncDockablePanel, sknsNormal).Body.Fill(0, $809090, clNone, clNone, clNone); + Options(skncDockablePanel, sknsNormal).Borders.Fill(0, $838C8C, $838C8C, clNone, clNone); + + Options(skncDockablePanelTitleBar, sknsNormal).Body.Fill(0, $5A6666, clNone, clNone, clNone); + + Options(skncPanel, sknsNormal).Body.Fill(0, $809090, clNone, clNone, clNone); + Options(skncPanel, sknsNormal).Borders.Fill(0, $5A6666, $5A6666, clNone, clNone); + + Options(skncPopup, sknsNormal).Body.Fill(0, $708080, clNone, clNone, clNone); + Options(skncPopup, sknsNormal).Borders.Fill(0, $5A6666, $5A6666, clNone, clNone); + + Options(skncStatusBar, sknsNormal).Body.Fill(0, $708080, clNone, clNone, clNone); + + Options(skncSplitter, sknsNormal).Body.Fill(0, $708080, clNone, clNone, clNone); + + Options(skncToolbar, sknsNormal).Body.Fill(0, $708080, clNone, clNone, clNone); + Options(skncToolbar, sknsNormal).Borders.Fill(0, $838C8C, $5A6666, clNone, clNone); + + CopyOptions(skncToolbar, skncMenuBar); + + Options(skncWindow, sknsNormal).Borders.Fill(0, $808080, $808080, $C0C0C0, $DDD9D2); + + Options(skncWindowTitleBar, sknsNormal).Body.Fill(0, $5A6666, clNone, clNone, clNone); + Options(skncWindowTitleBar, sknsNormal).TextColor := $EEEEEE; // This overrides the Items text color + + //---- Elements ----// + Options(skncToolbarGrip, sknsNormal).Body.Fill(0, $576363, clWhite, clNone, clNone); + + Options(skncStatusBarGrip, sknsNormal).Body.Fill(0, $576363, clWhite, clNone, clNone); + + Options(skncSeparator, sknsNormal).Body.Fill(0, $869999, clNone, clNone, clNone); + + //---- Buttons ----// + Options(skncToolbarItem, sknsNormal).TextColor := $EEEEEE; + Options(skncToolbarItem, sknsHotTrack).TextColor := $68CAE6; + Options(skncToolbarItem, sknsHotTrack).Body.Fill(0, $5F6D6D, clNone, clNone, clNone); + Options(skncToolbarItem, sknsHotTrack).Borders.Fill(0, $94A0A0, $94A0A0, clNone, clNone); + Options(skncToolbarItem, sknsPushed).TextColor := clBlack; + Options(skncToolbarItem, sknsPushed).Body.Fill(0, $7AD2EA, clNone, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Borders.Fill(0, $94A0A0, $94A0A0, clNone, clNone); + Options(skncToolbarItem, sknsChecked).TextColor := $EEEEEE; + Options(skncToolbarItem, sknsChecked).Body.Fill(0, $94A0A0, clNone, clNone, clNone); + Options(skncToolbarItem, sknsChecked).Borders.Fill(0, $94A0A0, $94A0A0, clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).TextColor := clBlack; + Options(skncToolbarItem, sknsCheckedAndHotTrack).Body.Fill(0, $8ED7EC, clNone, clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Borders.Fill(0, $94A0A0, $94A0A0, clNone, clNone); + Options(skncToolbarItem, sknsDisabled).TextColor := $99A8AC; + + CopyOptions(skncToolbarItem, skncMenuBarItem); + + CopyOptions(skncToolbarItem, skncMenuItem); + Options(skncMenuItem, sknsPushed).TextColor := $68CAE6; + Options(skncMenuItem, sknsCheckedAndHotTrack).Body.Fill(0, $94A0A0, clNone, clNone, clNone); + Options(skncMenuItem, sknsCheckedAndHotTrack).TextColor := $68CAE6; + + Options(skncButton, sknsNormal).TextColor := $EEEEEE; + Options(skncButton, sknsNormal).Body.Fill(0, $708080, clNone, clNone, clNone); + Options(skncButton, sknsNormal).Borders.Fill(0, clWhite, $3C4444, $838C8C, $5A6666); + Options(skncButton, sknsHotTrack).TextColor := $68CAE6; + Options(skncButton, sknsHotTrack).Body.Fill(0, $708080, clNone, clNone, clNone); + Options(skncButton, sknsHotTrack).Borders.Fill(0, clWhite, $3C4444, $838C8C, $5A6666); + Options(skncButton, sknsPushed).TextColor := $EEEEEE; + Options(skncButton, sknsPushed).Body.Fill(0, $708080, clNone, clNone, clNone); + Options(skncButton, sknsPushed).Borders.Fill(0, $3C4444, clWhite, $5A6666, $838C8C); + Options(skncButton, sknsChecked).TextColor := $EEEEEE; + Options(skncButton, sknsChecked).Body.Fill(0, $708080, clNone, clNone, clNone); + Options(skncButton, sknsChecked).Borders.Fill(0, $3C4444, clWhite, $5A6666, $838C8C); + Options(skncButton, sknsCheckedAndHotTrack).TextColor := $68CAE6; + Options(skncButton, sknsCheckedAndHotTrack).Body.Fill(0, $708080, clNone, clNone, clNone); + Options(skncButton, sknsCheckedAndHotTrack).Borders.Fill(0, $3C4444, clWhite, $5A6666, $838C8C); + Options(skncButton, sknsDisabled).Body.Fill(0, $708080, clNone, clNone, clNone); + Options(skncButton, sknsDisabled).Borders.Fill(0, clWhite, $3C4444, $838C8C, $5A6666); + Options(skncButton, sknsDisabled).TextColor := $99A8AC; + + Options(skncListItem, sknsChecked).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsCheckedAndHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Body.Lighten(30); + Options(skncListItem, sknsHotTrack).Borders.Lighten(30); + Options(skncListItem, sknsCheckedAndHotTrack).Body.Lighten(-30); + Options(skncListItem, sknsCheckedAndHotTrack).Borders.Lighten(-30); + + Options(skncCheckBox, sknsNormal).Borders.Fill(0, $5A6666, $5A6666, clNone, clNone); + Options(skncCheckBox, sknsHotTrack).Body.Fill(0, $5F6D6D, clNone, clNone, clNone); + Options(skncCheckBox, sknsHotTrack).Borders.Fill(0, $94A0A0, $94A0A0, clNone, clNone); + Options(skncCheckBox, sknsPushed).Body.Fill(0, $7AD2EA, clNone, clNone, clNone); + Options(skncCheckBox, sknsPushed).Borders.Fill(0, $94A0A0, $94A0A0, clNone, clNone); + Options(skncCheckBox, sknsChecked).Body.Fill(0, $94A0A0, clNone, clNone, clNone); + Options(skncCheckBox, sknsChecked).Borders.Fill(0, $94A0A0, $94A0A0, clNone, clNone); + Options(skncCheckBox, sknsCheckedAndHotTrack).Body.Fill(0, $8ED7EC, clNone, clNone, clNone); + Options(skncCheckBox, sknsCheckedAndHotTrack).Borders.Fill(0, $94A0A0, $94A0A0, clNone, clNone); + Options(skncCheckBox, sknsDisabled).Borders.Fill(0, $99A8AC, $99A8AC, clNone, clNone); + + CopyOptions(skncCheckBox, skncRadioButton); + + //---- Editors ----// + Options(skncEditFrame, sknsNormal).Borders.Fill(1, clNone, clNone, $D0D0D0, $D0D0D0); + Options(skncEditFrame, sknsDisabled).Borders.Fill(1, clNone, clNone, $99A8AC, $99A8AC); + Options(skncEditFrame, sknsHotTrack).Borders.Fill(1, clNone, clNone, $94A0A0, $94A0A0); + + CopyOptions(skncToolbarItem, skncEditButton); + Options(skncEditButton, sknsNormal).TextColor := clBlack; + + //---- Tabs ----// + Options(skncTab, sknsNormal).TextColor := $EEEEEE; + Options(skncTab, sknsHotTrack).TextColor := $68CAE6; + Options(skncTab, sknsHotTrack).Body.Fill(0, $708080, clNone, clNone, clNone); + Options(skncTab, sknsHotTrack).Borders.Fill(0, $5A6666, $5A6666, clNone, clNone); + Options(skncTab, sknsChecked).TextColor := $EEEEEE; + Options(skncTab, sknsChecked).Body.Fill(0, $809090, clNone, clNone, clNone); + Options(skncTab, sknsChecked).Borders.Fill(0, $5A6666, $5A6666, clNone, clNone); + Options(skncTab, sknsCheckedAndHotTrack).TextColor := $68CAE6; + Options(skncTab, sknsCheckedAndHotTrack).Body.Fill(0, $809090, clNone, clNone, clNone); + Options(skncTab, sknsCheckedAndHotTrack).Borders.Fill(0, $5A6666, $5A6666, clNone, clNone); + + // TabBackground: Only Normal state is used + Options(skncTabBackground, sknsNormal).Body.Fill(0, $809090, clNone, clNone, clNone); + Options(skncTabBackground, sknsNormal).Borders.Fill(0, $5A6666, $5A6666, clNone, clNone); + + //---- ProgressBar ----// + // ProgressBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + Options(skncProgressBar, sknsNormal).Body.Fill(0, $809090, clNone, clNone, clNone); + Options(skncProgressBar, sknsNormal).Borders.Fill(0, $5A6666, $5A6666, clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Body.Fill(0, $94A0A0, clNone, clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Borders.Fill(1, $5A6666, $5A6666, clNone, clNone); + + //---- TrackBar ----// + // TrackBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + CopyOptions(skncProgressBar, skncTrackBar); + Options(skncTrackBar, sknsNormal).TextColor := $5A6666; + + // TrackBarButton: Only Normal and Pushed states are used + Options(skncTrackBarButton, sknsNormal).Body.Fill(0, $5A6666, clNone, clNone, clNone); + Options(skncTrackBarButton, sknsNormal).Borders.Fill(1, $94A0A0, $94A0A0, clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Body.Fill(0, $809090, clNone, clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Borders.Fill(1, $94A0A0, $94A0A0, clNone, clNone); + + //---- Header ----// + Options(skncHeader, sknsNormal).TextColor := $EEEEEE; + Options(skncHeader, sknsNormal).Body.Fill(0, $708080, clNone, clNone, clNone); + Options(skncHeader, sknsNormal).Borders.Fill(0, $838C8C, $5A6666, clNone, clNone); + Options(skncHeader, sknsHotTrack).TextColor := $68CAE6; + Options(skncHeader, sknsHotTrack).Body.Fill(0, $5F6D6D, clNone, clNone, clNone); + Options(skncHeader, sknsHotTrack).Borders.Fill(0, $838C8C, $5A6666, clNone, clNone); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXHumanSkin } + +procedure TSpTBXHumanSkin.FillOptions; +begin + SkinName := 'Human'; + + //---- Single State ----// + Options(skncDock, sknsNormal).Body.Fill(0, $E7EBEF, clNone, clNone, clNone); + + Options(skncDockablePanel, sknsNormal).Body.Fill(0, $F1F6F9, clNone, clNone, clNone); + + Options(skncDockablePanelTitleBar, sknsNormal).Body.Fill(0, $E7EBEF, clNone, clNone, clNone); + Options(skncDockablePanelTitleBar, sknsNormal).Borders.Fill(0, $B9BCBF, $B9BCBF, clWhite, clNone); + + Options(skncPanel, sknsNormal).Body.Fill(0, $F1F6F9, clNone, clNone, clNone); + Options(skncPanel, sknsNormal).Borders.Fill(2, $B7C1CB, $B7C1CB, clNone, clNone); + + Options(skncPopup, sknsNormal).Body.Fill(0, $F2F5F8, clNone, clNone, clNone); + Options(skncPopup, sknsNormal).Borders.Fill(0, $91A3B6, $91A3B6, clNone, clNone); + + Options(skncStatusBar, sknsNormal).Body.Fill(0, $E7EBEF, clNone, clNone, clNone); + + Options(skncSplitter, sknsNormal).Body.Fill(0, $E7EBEF, clNone, clNone, clNone); + + Options(skncToolbar, sknsNormal).Body.Fill(0, $E7EBEF, clNone, clNone, clNone); + Options(skncToolbar, sknsNormal).Borders.Fill(0, clWhite, $B7C1CB, clNone, clNone); + + CopyOptions(skncToolbar, skncMenuBar); + + Options(skncWindow, sknsNormal).Borders.Fill(0, $383A3D, $C7CFD8, $E7EBEF, $E7EBEF); + + Options(skncWindowTitleBar, sknsNormal).Body.Fill(5, $6AAAE8, $468CD1, $3A82C8, $488ED3); + Options(skncWindowTitleBar, sknsNormal).TextColor := clWhite; // This overrides the Items text color + + //---- Elements ----// + Options(skncToolbarGrip, sknsNormal).Body.Fill(0, $B7C1CB, clWhite, clNone, clNone); + + Options(skncStatusBarGrip, sknsNormal).Body.Fill(0, $B7C1CB, clWhite, clNone, clNone); + + Options(skncSeparator, sknsNormal).Body.Fill(0, $B7C1CB, clWhite, clNone, clNone); + + //---- Buttons ----// + Options(skncToolbarItem, sknsHotTrack).Body.Fill(5, clWhite, $EDF0F3, $E2E7EC, $E7EBEF); + Options(skncToolbarItem, sknsHotTrack).Borders.Fill(2, $1E4B8F, $1E4B8F, $1975FF, $1975FF); + Options(skncToolbarItem, sknsPushed).Body.Fill(0, $D4DBE0, clNone, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Borders.Fill(2, $606A73, $606A73, clNone, clNone); + Options(skncToolbarItem, sknsChecked).Body.Fill(0, $D4DBE0, clNone, clNone, clNone); + Options(skncToolbarItem, sknsChecked).Borders.Fill(2, $606A73, $606A73, clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Body.Fill(5, clWhite, $EDF0F3, $E2E7EC, $E7EBEF); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Borders.Fill(2, $1E4B8F, $1E4B8F, $1975FF, $1975FF); + + Options(skncMenuBarItem, sknsHotTrack).Body.Fill(1, $ACDEFE, $7BC5F5, clNone, clNone); + Options(skncMenuBarItem, sknsPushed).Body.Fill(1, $ACDEFE, $7BC5F5, clNone, clNone); + Options(skncMenuBarItem, sknsChecked).Body.Fill(1, $ACDEFE, $7BC5F5, clNone, clNone); + Options(skncMenuBarItem, sknsCheckedAndHotTrack).Body.Fill(1, $ACDEFE, $7BC5F5, clNone, clNone); + + Options(skncMenuItem, sknsHotTrack).Body.Fill(1, $ACDEFE, $7BC5F5, clNone, clNone); + Options(skncMenuItem, sknsHotTrack).Borders.Fill(1, $69BAEF, $69BAEF, clNone, clNone); + Options(skncMenuItem, sknsChecked).Body.Fill(1, $ACDEFE, $7BC5F5, clNone, clNone); + Options(skncMenuItem, sknsChecked).Borders.Fill(1, $69BAEF, $69BAEF, clNone, clNone); + Options(skncMenuItem, sknsCheckedAndHotTrack).Body.Fill(1, $ACDEFE, $7BC5F5, clNone, clNone); + Options(skncMenuItem, sknsCheckedAndHotTrack).Borders.Fill(1, $69BAEF, $69BAEF, clNone, clNone); + + CopyOptions(skncToolbarItem, skncButton); + Options(skncButton, sknsNormal).Body.Fill(5, clWhite, $EDF0F3, $E2E7EC, $E7EBEF); + Options(skncButton, sknsNormal).Borders.Fill(2, $D0D4D8, $D0D4D8, $606A73, $606A73); + Options(skncButton, sknsDisabled).Body.Fill(5, clWhite, $EDF0F3, $E2E7EC, $E7EBEF); + Options(skncButton, sknsDisabled).Borders.Fill(2, $D0D4D8, $D0D4D8, $606A73, $606A73); + + Options(skncListItem, sknsChecked).Assign(Options(skncMenuBarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Assign(Options(skncMenuBarItem, sknsHotTrack)); + Options(skncListItem, sknsCheckedAndHotTrack).Assign(Options(skncMenuBarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Body.Lighten(20); + Options(skncListItem, sknsHotTrack).Borders.Lighten(20); + Options(skncListItem, sknsCheckedAndHotTrack).Body.Lighten(-20); + Options(skncListItem, sknsCheckedAndHotTrack).Borders.Lighten(-20); + + Options(skncCheckBox, sknsNormal).Body.Fill(5, clWhite, $EDF0F3, $E2E7EC, $E7EBEF); + Options(skncCheckBox, sknsNormal).Borders.Fill(2, $666666, $666666, $F1F1F1, $F1F1F1); + Options(skncCheckBox, sknsDisabled).Body.Fill(5, clWhite, $EDF0F3, $E2E7EC, $E7EBEF); + Options(skncCheckBox, sknsDisabled).Borders.Fill(2, $D0D4D8, $D0D4D8, $606A73, $606A73); + Options(skncCheckBox, sknsPushed).Body.Fill(5, clWhite, $EDF0F3, $E2E7EC, $E7EBEF); + Options(skncCheckBox, sknsPushed).Borders.Fill(2, $666666, $666666, $F1F1F1, $F1F1F1); + Options(skncCheckBox, sknsHotTrack).Body.Fill(1, $76ADFF, $2C7DF7, clNone, clNone); + Options(skncCheckBox, sknsHotTrack).Borders.Fill(2, $214A87, $214A87, $8FBCFD, $8FBCFD); + Options(skncCheckBox, sknsChecked).Body.Fill(1, $76ADFF, $2C7DF7, clNone, clNone); + Options(skncCheckBox, sknsChecked).Borders.Fill(2, $214A87, $214A87, $8FBCFD, $8FBCFD); + Options(skncCheckBox, sknsCheckedAndHotTrack).Body.Fill(1, $76ADFF, $2C7DF7, clNone, clNone); + Options(skncCheckBox, sknsCheckedAndHotTrack).Borders.Fill(2, $214A87, $214A87, $8FBCFD, $8FBCFD); + + CopyOptions(skncCheckBox, skncRadioButton); + + //---- Editors ----// + Options(skncEditFrame, sknsNormal).Borders.Fill(1, $778B97, $778B97, $E6E6E6, $E6E6E6); + Options(skncEditFrame, sknsDisabled).Borders.Fill(1, clNone, clNone, $E6E6E6, $E6E6E6); + Options(skncEditFrame, sknsHotTrack).Borders.Fill(1, $1E4B8F, $1E4B8F, $1975FF, $1975FF); + + Options(skncEditButton, sknsHotTrack).Body.Fill(1, $76ADFF, $2C7DF7, clNone, clNone); + Options(skncEditButton, sknsHotTrack).Borders.Fill(0, $1975FF, $1975FF, $8FBCFD, $8FBCFD); + Options(skncEditButton, sknsPushed).Body.Fill(1, $3787FF, $0A66F0, clNone, clNone); + Options(skncEditButton, sknsPushed).Borders.Fill(0, $1975FF, $1975FF, $589AFC, $589AFC); + + //---- Tabs ----// + Options(skncTab, sknsNormal).Body.Fill(0, $DBDFE4, clNone, clNone, clNone); + Options(skncTab, sknsNormal).Borders.Fill(2, $B8C2CA, $B8C2CA, $E1E4E8, $E1E4E8); + Options(skncTab, sknsDisabled).Body.Fill(0, $DBDFE4, clNone, clNone, clNone); + Options(skncTab, sknsDisabled).Borders.Fill(2, $B8C2CA, $B8C2CA, $E1E4E8, $E1E4E8); + + Options(skncTab, sknsHotTrack).Body.Fill(1, clWhite, $E7EBEF, clNone, clNone); + Options(skncTab, sknsHotTrack).Borders.Fill(2, $677883, $677883, clWhite, $DCE0E4); + Options(skncTab, sknsChecked).Body.Fill(1, clWhite, $E7EBEF, clNone, clNone); + Options(skncTab, sknsChecked).Borders.Fill(2, $677883, $677883, clWhite, $DCE0E4); + Options(skncTab, sknsCheckedAndHotTrack).Body.Fill(1, clWhite, $E7EBEF, clNone, clNone); + Options(skncTab, sknsCheckedAndHotTrack).Borders.Fill(2, $677883, $677883, clWhite, $DCE0E4); + + // TabBackground: Only Normal state is used + Options(skncTabBackground, sknsNormal).Body.Fill(0, $E7EBEF, clNone, clNone, clNone); + Options(skncTabBackground, sknsNormal).Borders.Fill(0, $677883, $677883, clWhite, $DCE0E4); + + //---- ProgressBar ----// + // ProgressBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + Options(skncProgressBar, sknsNormal).Body.Fill(5, clWhite, $EDF0F3, $E2E7EC, $E7EBEF); + Options(skncProgressBar, sknsNormal).Borders.Fill(2, $D0D4D8, $D0D4D8, $606A73, $606A73); + Options(skncProgressBar, sknsHotTrack).Body.Fill(5, $9CC3FF, $60A0FF, $1672FD, $63A1FF); + Options(skncProgressBar, sknsHotTrack).Borders.Fill(2, $D0D4D8, $D0D4D8, $606A73, $606A73); + + + //---- TrackBar ----// + // TrackBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + CopyOptions(skncProgressBar, skncTrackBar); + + // TrackBarButton: Only Normal and Pushed states are used + Options(skncTrackBarButton, sknsNormal).Body.Fill(5, clWhite, $EDF0F3, $E2E7EC, $E7EBEF); + Options(skncTrackBarButton, sknsNormal).Borders.Fill(2, $D0D4D8, $D0D4D8, $606A73, $606A73); + Options(skncTrackBarButton, sknsPushed).Body.Fill(5, $9CC3FF, $60A0FF, $1672FD, $63A1FF); + Options(skncTrackBarButton, sknsPushed).Borders.Fill(2, $D0D4D8, $D0D4D8, $606A73, $606A73); + + //---- Header ----// + Options(skncHeader, sknsNormal).Body.Fill(0, $E7EBEF, clNone, clNone, clNone); + Options(skncHeader, sknsNormal).Borders.Fill(0, $F3F5F7, $8F9CAA, clNone, $D4D8DB); + Options(skncHeader, sknsHotTrack).Body.Fill(0, $EEF2F6, clNone, clNone, clNone); + Options(skncHeader, sknsHotTrack).Borders.Fill(0, $F3F5F7, $8F9CAA, clNone, $D4D8DB); +end; + +procedure TSpTBXHumanSkin.PaintBackground(ACanvas: TCanvas; ARect: TRect; + Component: TSpTBXSkinComponentsType; State: TSpTBXSkinStatesType; Background, + Borders, Vertical: Boolean; ForceRectBorders: TAnchors); +begin + inherited; + // Override the Tab painting + if (Component = skncTab) and (State in [sknsHotTrack, sknsPushed, sknsChecked, sknsCheckedAndHotTrack]) then begin + SpDrawLine(ACanvas, ARect.Left + 2, ARect.Top, ARect.Right - 2, ARect.Top, $1E4B8F); + SpDrawLine(ACanvas, ARect.Left + 1, ARect.Top + 1, ARect.Right - 1, ARect.Top + 1, $1975FF); + SpDrawLine(ACanvas, ARect.Left, ARect.Top + 2, ARect.Right, ARect.Top + 2, $1975FF); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXLeopardSkin } + +procedure TSpTBXLeopardSkin.FillOptions; +begin + SkinName := 'Leopard'; + + //---- Single State ----// + Options(skncDock, sknsNormal).Body.Fill(1, $CFCFCF, $999797, clNone, clNone); + + Options(skncDockablePanel, sknsNormal).Body.Fill(0, $EAE4DD, clNone, clNone, clNone); + Options(skncDockablePanel, sknsNormal).Borders.Fill(0, $999797, $999797, clNone, clNone); + + Options(skncDockablePanelTitleBar, sknsNormal).Body.Fill(1, $C0C0C0, $999797, clNone, clNone); + + Options(skncPanel, sknsNormal).Body.Fill(0, $EAE4DD, clNone, clNone, clNone); + Options(skncPanel, sknsNormal).Borders.Fill(2, $999797, $999797, clNone, clNone); + + Options(skncPopup, sknsNormal).Body.Fill(0, clWhite, clNone, clNone, clNone); + Options(skncPopup, sknsNormal).Borders.Fill(0, $C0C0C0, $C0C0C0, clNone, clNone); + + Options(skncStatusBar, sknsNormal).Body.Fill(1, $C2C5C3, $999797, clNone, clNone); + + Options(skncSplitter, sknsNormal).Body.Fill(1, $C2C5C3, $999797, clNone, clNone); + + Options(skncWindow, sknsNormal).Borders.Fill(0, $808080, $808080, $C0C0C0, $DDD9D2); + + Options(skncWindowTitleBar, sknsNormal).Body.Fill(1, $C2C5C3, $999797, clNone, clNone); + + //---- Elements ----// + Options(skncToolbarGrip, sknsNormal).Body.Fill(0, $646262, $CECECE, clNone, clNone); + + Options(skncStatusBarGrip, sknsNormal).Body.Fill(0, $646262, $CECECE, clNone, clNone); + + Options(skncSeparator, sknsNormal).Body.Fill(0, $646262, $CECECE, clNone, clNone); + + //---- Buttons ----// + Options(skncToolbarItem, sknsHotTrack).Body.Fill(1, clWhite, $A8A8A8, clNone, clNone); + Options(skncToolbarItem, sknsHotTrack).Borders.Fill(2, $848484, $848484, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Body.Fill(1, $343434, $696969, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Borders.Fill(2, $272727, $272727, clNone, clNone); + Options(skncToolbarItem, sknsPushed).TextColor := clWhite; + Options(skncToolbarItem, sknsChecked).Body.Fill(1, $343434, $696969, clNone, clNone); + Options(skncToolbarItem, sknsChecked).Borders.Fill(2, $272727, $272727, clNone, clNone); + Options(skncToolbarItem, sknsChecked).TextColor := clWhite; + Options(skncToolbarItem, sknsCheckedAndHotTrack).Body.Fill(1, $343434, $696969, clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Borders.Fill(2, $272727, $272727, $343434, $343434); + Options(skncToolbarItem, sknsCheckedAndHotTrack).TextColor := clWhite; + Options(skncToolbarItem, sknsDisabled).TextColor := $89736D; + + Options(skncMenuBarItem, sknsHotTrack).Body.Fill(0, $D87439, clNone, clNone, clNone); + Options(skncMenuBarItem, sknsHotTrack).TextColor := clWhite; + Options(skncMenuBarItem, sknsPushed).Body.Fill(0, $D87439, clNone, clNone, clNone); + Options(skncMenuBarItem, sknsPushed).TextColor := clWhite; + Options(skncMenuBarItem, sknsChecked).Body.Fill(0, $D87439, clNone, clNone, clNone); + Options(skncMenuBarItem, sknsChecked).TextColor := clWhite; + Options(skncMenuBarItem, sknsCheckedAndHotTrack).Body.Fill(0, $D87439, clNone, clNone, clNone); + Options(skncMenuBarItem, sknsCheckedAndHotTrack).TextColor := clWhite; + + Options(skncMenuItem, sknsHotTrack).Body.Fill(0, $D87439, clNone, clNone, clNone); + Options(skncMenuItem, sknsHotTrack).TextColor := clWhite; + Options(skncMenuItem, sknsChecked).Body.Fill(5, $FFE7D5, $FFD0A2, $F5BA82, $FDFCDA); + Options(skncMenuItem, sknsChecked).Borders.Fill(2, $DB9D79, $DB9D79, clNone, clNone); + Options(skncMenuItem, sknsCheckedAndHotTrack).Body.Fill(5, $FFE7D5, $FFD0A2, $F5BA82, $FDFCDA); + Options(skncMenuItem, sknsCheckedAndHotTrack).Borders.Fill(2, $DB9D79, $DB9D79, clNone, clNone); + Options(skncMenuItem, sknsCheckedAndHotTrack).TextColor := clWhite; + + Options(skncButton, sknsNormal).Body.Fill(5, clWhite, $EFEFEF, $E3E3E3, clWhite); + Options(skncButton, sknsNormal).Borders.Fill(2, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncButton, sknsDisabled).Body.Fill(5, clWhite, $EFEFEF, $E3E3E3, clWhite); + Options(skncButton, sknsDisabled).Borders.Fill(2, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncButton, sknsHotTrack).Body.Fill(5, $FFE7D5, $FFD0A2, $F5BA82, $FDFCDA); + Options(skncButton, sknsHotTrack).Borders.Fill(2, $DB9D79, $DB9D79, clNone, clNone); + Options(skncButton, sknsPushed).Body.Fill(5, $FFD6B7, $FFC689, $F3AF67, $FCFBBE); + Options(skncButton, sknsPushed).Borders.Fill(2, $DB9D79, $DB9D79, clNone, clNone); + Options(skncButton, sknsChecked).Body.Fill(5, $FFD6B7, $FFC689, $F3AF67, $FCFBBE); + Options(skncButton, sknsChecked).Borders.Fill(2, $DB9D79, $DB9D79, clNone, clNone); + Options(skncButton, sknsCheckedAndHotTrack).Body.Fill(5, $FFE7D5, $FFD0A2, $F5BA82, $FDFCDA); + Options(skncButton, sknsCheckedAndHotTrack).Borders.Fill(2, $DB9D79, $DB9D79, clNone, clNone); + + Options(skncListItem, sknsChecked).Assign(Options(skncButton, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Assign(Options(skncButton, sknsHotTrack)); + Options(skncListItem, sknsCheckedAndHotTrack).Assign(Options(skncButton, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Body.Lighten(30); + Options(skncListItem, sknsHotTrack).Borders.Lighten(30); + Options(skncListItem, sknsCheckedAndHotTrack).Body.Lighten(-20); + Options(skncListItem, sknsCheckedAndHotTrack).Borders.Lighten(-20); + + CopyOptions(skncButton, skncCheckBox); + + CopyOptions(skncCheckBox, skncRadioButton); + + //---- Editors ----// + Options(skncEditFrame, sknsNormal).Borders.Fill(1, clNone, clNone, $D0D0D0, $D0D0D0); + Options(skncEditFrame, sknsDisabled).Borders.Fill(1, clNone, clNone, $99A8AC, $99A8AC); + Options(skncEditFrame, sknsHotTrack).Borders.Fill(1, $D99D51, $D99D51, $FFD3A7, $FFD3A7); + + Options(skncEditButton, sknsHotTrack).Body.Fill(5, $FFE7D5, $FFD0A2, $F5BA82, $FDFCDA); + Options(skncEditButton, sknsHotTrack).Borders.Fill(0, $DB9D79, $DB9D79, clNone, clNone); + Options(skncEditButton, sknsPushed).Body.Fill(5, $FFD6B7, $FFC689, $F3AF67, $FCFBBE); + Options(skncEditButton, sknsPushed).Borders.Fill(0, $DB9D79, $DB9D79, clNone, clNone); + Options(skncEditButton, sknsChecked).Body.Fill(5, $FFD6B7, $FFC689, $F3AF67, $FCFBBE); + Options(skncEditButton, sknsChecked).Borders.Fill(0, $DB9D79, $DB9D79, clNone, clNone); + Options(skncEditButton, sknsCheckedAndHotTrack).Body.Fill(5, $FFE7D5, $FFD0A2, $F5BA82, $FDFCDA); + Options(skncEditButton, sknsCheckedAndHotTrack).Borders.Fill(0, $DB9D79, $DB9D79, clNone, clNone); + + //---- Tabs ----// + Options(skncTab, sknsNormal).Body.Fill(5, clWhite, $EFEFEF, $E3E3E3, clWhite); + Options(skncTab, sknsNormal).Borders.Fill(2, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncTab, sknsDisabled).Body.Fill(5, clWhite, $EFEFEF, $E3E3E3, clWhite); + Options(skncTab, sknsDisabled).Borders.Fill(2, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncTab, sknsHotTrack).Body.Fill(5, $FFD6B7, $FFC689, $F3AF67, $FCFBBE); + Options(skncTab, sknsHotTrack).Borders.Fill(2, $DB9D79, $DB9D79, clNone, clNone); + Options(skncTab, sknsChecked).Body.Fill(5, $FFD6B7, $FFC689, $F3AF67, $FCFBBE); + Options(skncTab, sknsChecked).Borders.Fill(2, $DB9D79, $DB9D79, clNone, clNone); + Options(skncTab, sknsCheckedAndHotTrack).Body.Fill(5, $FFE7D5, $FFD0A2, $F5BA82, $FDFCDA); + Options(skncTab, sknsCheckedAndHotTrack).Borders.Fill(2, $DB9D79, $DB9D79, clNone, clNone); + + // TabBackground: Only Normal state is used + Options(skncTabBackground, sknsNormal).Body.Fill(0, $EAE4DD, clNone, clNone, clNone); + + //---- ProgressBar ----// + // ProgressBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + Options(skncProgressBar, sknsNormal).Body.Fill(5, clWhite, $EFEFEF, $E3E3E3, clWhite); + Options(skncProgressBar, sknsNormal).Borders.Fill(2, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Body.Fill(5, $FFD6B7, $FFC689, $F3AF67, $FCFBBE); + Options(skncProgressBar, sknsHotTrack).Borders.Fill(2, $DB9D79, $DB9D79, clNone, clNone); + + //---- TrackBar ----// + // TrackBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + CopyOptions(skncProgressBar, skncTrackBar); + + // TrackBarButton: Only Normal and Pushed states are used + Options(skncTrackBarButton, sknsNormal).Body.Fill(5, $FFD6B7, $FFC689, $F3AF67, $FCFBBE); + Options(skncTrackBarButton, sknsNormal).Borders.Fill(2, $DB9D79, $DB9D79, clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Body.Fill(5, $FFE7D5, $FFD0A2, $F5BA82, $FDFCDA); + Options(skncTrackBarButton, sknsPushed).Borders.Fill(2, $DB9D79, $DB9D79, clNone, clNone); + + //---- Header ----// + Options(skncHeader, sknsNormal).Body.Fill(5, clWhite, $EFEFEF, $E3E3E3, clWhite); + Options(skncHeader, sknsNormal).Borders.Fill(0, $E7E7E7, $C0C0C0, clNone, clNone); + Options(skncHeader, sknsHotTrack).Body.Fill(5, $FFE7D5, $FFD0A2, $F5BA82, $FDFCDA); + Options(skncHeader, sknsHotTrack).Borders.Fill(0, $F5BA82, $DB9D79, clNone, clNone); + Options(skncHeader, sknsPushed).Body.Fill(5, $FFE7D5, $FFD0A2, $F5BA82, $FDFCDA); + Options(skncHeader, sknsPushed).Borders.Fill(0, $F5BA82, $DB9D79, clNone, clNone); +end; + +procedure TSpTBXLeopardSkin.PaintBackground(ACanvas: TCanvas; ARect: TRect; + Component: TSpTBXSkinComponentsType; State: TSpTBXSkinStatesType; Background, + Borders, Vertical: Boolean; ForceRectBorders: TAnchors); +begin + inherited; + // Override the TabBackground painting + if Component = skncTabBackground then begin + SpDrawLine(ACanvas, ARect.Left, ARect.Top, ARect.Right, ARect.Top, $DB9D79); + SpDrawLine(ACanvas, ARect.Left, ARect.Top + 1, ARect.Right, ARect.Top + 1, $FAEEAF); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXXitoSkin } + +procedure TSpTBXXitoSkin.FillOptions; +begin + SkinName := 'Xito'; + + //---- Single State ----// + Options(skncDock, sknsNormal).Body.Fill(0, $E0E0E0, clNone, clNone, clNone); + + Options(skncDockablePanel, sknsNormal).Body.Fill(0, clWhite, clNone, clNone, clNone); + Options(skncDockablePanel, sknsNormal).Borders.Fill(0, $E0E0E0, $E0E0E0, clWhite, clWhite); + + Options(skncDockablePanelTitleBar, sknsNormal).Body.Fill(5, clWhite, $F2F2F2, $EAEAEA, $EFEFEF); + + Options(skncPanel, sknsNormal).Body.Fill(0, $D8D8D8, clNone, clNone, clNone); + Options(skncPanel, sknsNormal).Borders.Fill(2, $909090, $909090, $D0D0D0, $D0D0D0); + + Options(skncPopup, sknsNormal).Body.Fill(0, clWhite, clNone, clNone, clNone); + Options(skncPopup, sknsNormal).Borders.Fill(0, $C0C0C0, $C0C0C0, clNone, clNone); + + Options(skncStatusBar, sknsNormal).Body.Fill(5, clWhite, $F2F2F2, $EAEAEA, $EFEFEF); + + Options(skncSplitter, sknsNormal).Body.Fill(5, clWhite, $F2F2F2, $EAEAEA, $EFEFEF); + + Options(skncToolbar, sknsNormal).Body.Fill(5, clWhite, $F2F2F2, $EAEAEA, $EFEFEF); + Options(skncToolbar, sknsNormal).Borders.Fill(2, clWhite, $B0B0B0, clNone, clNone); + + CopyOptions(skncToolbar, skncMenuBar); + + Options(skncWindow, sknsNormal).Borders.Fill(0, $808080, $808080, $C0C0C0, $DDD9D2); + + Options(skncWindowTitleBar, sknsNormal).Body.Fill(1, $C0C0C0, clWhite, clNone, clNone); + + //---- Elements ----// + Options(skncToolbarGrip, sknsNormal).Body.Fill(0, $B0B0B0, clWhite, clNone, clNone); + + Options(skncStatusBarGrip, sknsNormal).Body.Fill(0, $B0B0B0, clWhite, clNone, clNone); + + Options(skncSeparator, sknsNormal).Body.Fill(0, $D0D0D0, clWhite, clNone, clNone); + + //---- Buttons ----// + Options(skncToolbarItem, sknsHotTrack).Body.Fill(0, $E0E0E0, clNone, clNone, clNone); + Options(skncToolbarItem, sknsHotTrack).Borders.Fill(2, $A0A0A0, $A0A0A0, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Body.Fill(0, $C0C0C0, clNone, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Borders.Fill(2, $909090, $909090, clNone, clNone); + Options(skncToolbarItem, sknsChecked).Body.Fill(0, $D8D8D8, clNone, clNone, clNone); + Options(skncToolbarItem, sknsChecked).Borders.Fill(2, $B8B8B8, $F8F8F8, clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Body.Fill(0, $D0D0D0, clNone, clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Borders.Fill(2, $808080, $808080, clNone, clNone); + + CopyOptions(skncToolbarItem, skncMenuBarItem); + + CopyOptions(skncToolbarItem, skncMenuItem); + + Options(skncButton, sknsNormal).Body.Fill(5, clWhite, $DADADA, $D0D0D0, $E0E0E0); + Options(skncButton, sknsNormal).Borders.Fill(2, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncButton, sknsDisabled).Body.Fill(5, clWhite, $DADADA, $D0D0D0, $E0E0E0); + Options(skncButton, sknsDisabled).Borders.Fill(2, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncButton, sknsHotTrack).Body.Fill(5, clWhite, $DADADA, $DFDFDF, $E0E0E0); + Options(skncButton, sknsHotTrack).Borders.Fill(2, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncButton, sknsPushed).Body.Fill(1, $D0D0D0, clWhite, clNone, clNone); + Options(skncButton, sknsPushed).Borders.Fill(2, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncButton, sknsChecked).Body.Fill(1, $D0D0D0, clWhite, clNone, clNone); + Options(skncButton, sknsChecked).Borders.Fill(2, $C0C0C0, $C0C0C0, clNone, clNone); + Options(skncButton, sknsCheckedAndHotTrack).Body.Fill(1, $EFEFEF, clWhite, clNone, clNone); + Options(skncButton, sknsCheckedAndHotTrack).Borders.Fill(2, $C0C0C0, $C0C0C0, clNone, clNone); + + Options(skncListItem, sknsChecked).Assign(Options(skncButton, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Assign(Options(skncButton, sknsHotTrack)); + Options(skncListItem, sknsCheckedAndHotTrack).Assign(Options(skncButton, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Body.Lighten(20); + Options(skncListItem, sknsHotTrack).Borders.Lighten(20); + Options(skncListItem, sknsCheckedAndHotTrack).Body.Lighten(-20); + Options(skncListItem, sknsCheckedAndHotTrack).Borders.Lighten(-20); + + CopyOptions(skncButton, skncCheckBox); + Options(skncCheckBox, sknsNormal).Body.Reset; + Options(skncCheckBox, sknsChecked).Body.Fill(5, clWhite, $DADADA, $D0D0D0, $E0E0E0); + Options(skncCheckBox, sknsDisabled).Body.Reset; + + CopyOptions(skncCheckBox, skncRadioButton); + + //---- Editors ----// + Options(skncEditFrame, sknsNormal).Borders.Fill(1, clNone, clNone, $E0E0E0, $E0E0E0); + Options(skncEditFrame, sknsDisabled).Borders.Fill(1, clNone, clNone, $99A8AC, $99A8AC); + Options(skncEditFrame, sknsHotTrack).Borders.Fill(1, clNone, clNone, $C0C0C0, $C0C0C0); + + CopyOptions(skncButton, skncEditButton); + Options(skncEditButton, sknsNormal).Reset; + Options(skncEditButton, sknsDisabled).Borders.SkinType := 0; + Options(skncEditButton, sknsHotTrack).Borders.SkinType := 0; + Options(skncEditButton, sknsPushed).Borders.SkinType := 0; + Options(skncEditButton, sknsChecked).Borders.SkinType := 0; + Options(skncEditButton, sknsCheckedAndHotTrack).Borders.SkinType := 0; + + //---- Tabs ----// + CopyOptions(skncToolbarItem, skncTab); + Options(skncTab, sknsCheckedAndHotTrack).Borders.Fill(2, $B8B8B8, $F8F8F8, clNone, clNone); + + // TabBackground: Only Normal state is used + Options(skncTabBackground, sknsNormal).Body.Fill(0, $D8D8D8, clNone, clNone, clNone); + Options(skncTabBackground, sknsNormal).Borders.Fill(2, $B8B8B8, $F8F8F8, clNone, clNone); + + //---- ProgressBar ----// + // ProgressBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + Options(skncProgressBar, sknsNormal).Body.Fill(0, $C0C0C0, clNone, clNone, clNone); + Options(skncProgressBar, sknsNormal).Borders.Fill(2, $909090, $909090, clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Body.Fill(0, $E0E0E0, clNone, clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Borders.Fill(2, $909090, $909090, clNone, clNone); + + //---- TrackBar ----// + // TrackBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + CopyOptions(skncProgressBar, skncTrackBar); + + // TrackBarButton: Only Normal and Pushed states are used + Options(skncTrackBarButton, sknsNormal).Body.Fill(0, $E0E0E0, clNone, clNone, clNone); + Options(skncTrackBarButton, sknsNormal).Borders.Fill(2, $909090, $909090, clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Body.Fill(0, $F0F0F0, clNone, clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Borders.Fill(2, $909090, $909090, clNone, clNone); + + //---- Header ----// + Options(skncHeader, sknsNormal).Body.Fill(5, clWhite, $DADADA, $D0D0D0, $E0E0E0); + Options(skncHeader, sknsNormal).Borders.Fill(0, $E7E7E7, $C0C0C0, clNone, clNone); + Options(skncHeader, sknsHotTrack).Body.Fill(5, clWhite, $DADADA, $DFDFDF, $E0E0E0); + Options(skncHeader, sknsHotTrack).Borders.Fill(0, $E7E7E7, $C0C0C0, clNone, clNone); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXOfficeXPSkin } + +procedure TSpTBXOfficeXPSkin.FillOptions; +var + ToolbarC, PopupC, HotTrackC, CheckedC, EditHotTrackC: TColor; +begin + //---- Skin Properties ----// + + SkinName := 'Office XP'; + OfficeIcons := True; + OfficeMenu := True; + OfficeStatusBar := True; + + //---- Colors ----// + + ToolbarC := SpBlendColors(clWindow, clBtnFace, 165); + PopupC := SpBlendColors(clBtnFace, clWindow, 143); + + HotTrackC := SpBlendColors(clHighlight, clWindow, 30); + HotTrackC := SpLighten(HotTrackC, -15); //-7 original, -30 silver + + CheckedC := SpBlendColors(clBtnFace, clWindow, 50); + CheckedC := SpBlendColors(clHighlight, CheckedC, 10); + + EditHotTrackC := clHighlight; + + //---- Single State ----// + Options(skncDock, sknsNormal).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + + Options(skncDockablePanel, sknsNormal).Body.Fill(0, PopupC, clNone, clNone, clNone); + + Options(skncDockablePanelTitleBar, sknsNormal).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + Options(skncDockablePanelTitleBar, sknsNormal).Borders.Fill(0, PopupC, PopupC, clNone, clNone); + + Options(skncPanel, sknsNormal).Body.Fill(1, clBtnFace, clWhite, clNone, clNone); + Options(skncPanel, sknsNormal).Borders.Fill(2, $808080, $808080, $B0D4DF, clWhite); + + Options(skncPopup, sknsNormal).Body.Fill(0, PopupC, clNone, clNone, clNone); + Options(skncPopup, sknsNormal).Borders.Fill(0, clBtnShadow, clBtnShadow, clNone, clNone); + + Options(skncStatusBar, sknsNormal).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + + Options(skncSplitter, sknsNormal).Body.Fill(0, ToolbarC, clNone, clNone, clNone); + + Options(skncToolbar, sknsNormal).Body.Fill(0, ToolbarC, clNone, clNone, clNone); + Options(skncToolbar, sknsNormal).Borders.Fill(2, clBtnFace, clBtnFace, clNone, clNone); + + CopyOptions(skncToolbar, skncMenuBar); + + Options(skncWindow, sknsNormal).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + Options(skncWindow, sknsNormal).Borders.Fill(0, $808080, $808080, clBtnShadow, clBtnShadow); + + Options(skncWindowTitleBar, sknsNormal).Body.Fill(0, clBtnShadow, clNone, clNone, clNone); + Options(skncWindowTitleBar, sknsNormal).Borders.Fill(0, clBtnFace, clBtnFace, clNone, clNone); + + //---- Elements ----// + Options(skncGutter, sknsNormal).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + + Options(skncToolbarGrip, sknsNormal).Body.Fill(0, clBtnShadow, clWhite, clNone, clNone);////// + + Options(skncStatusBarGrip, sknsNormal).Body.Fill(0, clBtnShadow, clWhite, clNone, clNone);////// + + Options(skncSeparator, sknsNormal).Body.Fill(0, clBtnShadow, clNone, clNone, clNone); + + //---- Buttons ----// + Options(skncToolbarItem, sknsHotTrack).Body.Fill(0, HotTrackC, clNone, clNone, clNone); + Options(skncToolbarItem, sknsHotTrack).Borders.Fill(0, clHighlight, clHighlight, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + Options(skncToolbarItem, sknsPushed).Borders.Fill(0, clBtnShadow, clBtnShadow, clNone, clNone); + Options(skncToolbarItem, sknsChecked).Body.Fill(0, CheckedC, clNone, clNone, clNone); + Options(skncToolbarItem, sknsChecked).Borders.Fill(0, clHighlight, clHighlight, clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Body.Fill(0, HotTrackC, clNone, clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Borders.Fill(0, clHighlight, clHighlight, clNone, clNone); + + Options(skncOpenToolbarItem, sknsNormal).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + Options(skncOpenToolbarItem, sknsNormal).Borders.Fill(0, clBtnShadow, clBtnShadow, clNone, clNone); + + CopyOptions(skncToolbarItem, skncMenuBarItem); + + CopyOptions(skncToolbarItem, skncMenuItem); + + CopyOptions(skncToolbarItem, skncButton); + Options(skncButton, sknsNormal).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + Options(skncButton, sknsNormal).Borders.Fill(0, clBtnShadow, clBtnShadow, clNone, clNone); + Options(skncButton, sknsDisabled).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + Options(skncButton, sknsDisabled).Borders.Fill(0, clBtnShadow, clBtnShadow, clNone, clNone); + + Options(skncListItem, sknsChecked).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsCheckedAndHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Body.Lighten(20); + Options(skncListItem, sknsHotTrack).Borders.Lighten(20); + Options(skncListItem, sknsCheckedAndHotTrack).Body.Lighten(-20); + Options(skncListItem, sknsCheckedAndHotTrack).Borders.Lighten(-20); + + CopyOptions(skncToolbarItem, skncCheckBox); + Options(skncCheckBox, sknsNormal).Borders.Fill(0, clBtnShadow, clBtnShadow, clNone, clNone); + Options(skncCheckBox, sknsDisabled).Borders.Fill(0, clBtnShadow, clBtnShadow, clNone, clNone); + + CopyOptions(skncCheckBox, skncRadioButton); + + //---- Editors ----// + Options(skncEditFrame, sknsNormal).Borders.Fill(1, clNone, clNone, clBtnFace, clBtnFace); + Options(skncEditFrame, sknsDisabled).Borders.Fill(1, clNone, clNone, clBtnShadow, clBtnShadow); + Options(skncEditFrame, sknsHotTrack).Borders.Fill(1, clNone, clNone, EditHotTrackC, EditHotTrackC); + + CopyOptions(skncToolbarItem, skncEditButton); + Options(skncEditButton, sknsNormal).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + Options(skncEditButton, sknsNormal).Borders.Fill(0, clWindow, clWindow, clNone, clNone); + Options(skncEditButton, sknsPushed).Body.Fill(0, HotTrackC, clNone, clNone, clNone); + Options(skncEditButton, sknsPushed).Borders.Fill(0, EditHotTrackC, EditHotTrackC, clNone, clNone); + Options(skncEditButton, sknsPushed).TextColor := clHighlightText; + + //---- Tabs ----// + Options(skncTab, sknsHotTrack).Body.Fill(0, HotTrackC, clNone, clNone, clNone); + Options(skncTab, sknsHotTrack).Borders.Fill(0, clBtnShadow, clBtnShadow, clNone, clNone); + Options(skncTab, sknsChecked).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + Options(skncTab, sknsChecked).Borders.Fill(0, clBtnShadow, clBtnShadow, clNone, clNone); + Options(skncTab, sknsCheckedAndHotTrack).Body.Fill(0, HotTrackC, clNone, clNone, clNone); + Options(skncTab, sknsCheckedAndHotTrack).Borders.Fill(0, clBtnShadow, clBtnShadow, clNone, clNone); + + // TabBackground: Only Normal state is used + Options(skncTabBackground, sknsNormal).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + Options(skncTabBackground, sknsNormal).Borders.Fill(0, clBtnShadow, clBtnShadow, clNone, clNone); + + //---- ProgressBar ----// + // ProgressBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + Options(skncProgressBar, sknsNormal).Body.Fill(0, CheckedC, clWhite, clNone, clNone); + Options(skncProgressBar, sknsNormal).Borders.Fill(0, clHighlight, clHighlight, clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Body.Fill(0, HotTrackC, clNone, clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Borders.Fill(0, clHighlight, clHighlight, clNone, clNone); + + //---- TrackBar ----// + // TrackBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + CopyOptions(skncProgressBar, skncTrackBar); + + // TrackBarButton: Only Normal and Pushed states are used + Options(skncTrackBarButton, sknsNormal).Body.Fill(0, CheckedC, clNone, clNone, clNone); + Options(skncTrackBarButton, sknsNormal).Borders.Fill(0, clHighlight, clHighlight, clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Body.Fill(0, HotTrackC, clWhite, clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Borders.Fill(0, clHighlight, clHighlight, clNone, clNone); + + //---- Header ----// + Options(skncHeader, sknsNormal).Body.Fill(0, clBtnFace, clNone, clNone, clNone); + Options(skncHeader, sknsNormal).Borders.Fill(0, clWindow, clBtnShadow, clNone, clNone); + Options(skncHeader, sknsHotTrack).Body.Fill(0, HotTrackC, clNone, clNone, clNone); + Options(skncHeader, sknsHotTrack).Borders.Fill(0, clBtnFace, clBtnShadow, clNone, clNone); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXOffice2003Skin } + +constructor TSpTBXOffice2003Skin.Create; +begin + FDefaultColorScheme := lusUnknown; + inherited; +end; + +procedure TSpTBXOffice2003Skin.FillColors; +const + Office2003Colors: array[lusBlue..lusGreen] of TSpTBXOffice2003Colors = ( + ($F5BE9E, $F9D9C3, // 0, 1: Dock + $FEECDD, $E2A981, // 2, 3: Toolbar + $CB8C6A, $F5BE9E, // 4, 5: Toolbar borders + $F6F6F6, // 6: Popup + $962D00, // 7: Popup borders + $800000, // 8: Item borders + $C9662A, // 9: Window borders + $8CD5FF, $55ADFF, // 10, 11: Item Checked + $4E91FE, $8ED3FF, // 12, 13: Item Pushed + $CCF4FF, $91D0FF, // 14, 15: Item HotTrack + $FFEFE3, $E7B593, // 16, 17: OpenToolbarItem + $91420D, // 18: Button external border + $FBD0B3, $CB8C6A, // 19, 20: Button internal borders + $FEECDD, // 21: Grip/Separator soft color + $E2A981), // 22: Panel/CheckBox/Tabs/ProgressBar/TrackBar borders + + ($E5D7D7, $F7F3F3, // 0, 1: Dock + $FAF4F3, $B59799, // 2, 3: Toolbar + $8F6D6E, $E5D7D7, // 4, 5: Toolbar borders + $FFFAFD, // 6: Popup + $947C7C, // 7: Popup borders + $6F4B4B, // 8: Item borders + $99797A, // 9: Window borders + $8CD5FF, $55ADFF, // 10, 11: Item Checked + $4E91FE, $8ED3FF, // 12, 13: Item Pushed + $CCF4FF, $91D0FF, // 14, 15: Item HotTrack + $F1E9E8, $CDB9BA, // 16, 17: OpenToolbarItem + $988B8A, // 18: Button external border + clWhite, $B0A7A6, // 19, 20: Button internal borders + $FFFFFF, // 21: Grip/Separator soft color + $B59799), // 22: Panel/CheckBox/Tabs/ProgressBar/TrackBar borders + + ($A7D9D9, $E4F2F0, // 0, 1: Dock + $DEF7F4, $91C6B7, // 2, 3: Toolbar + $588060, $A7D9D9, // 4, 5: Toolbar borders + $EEF4F4, // 6: Popup + $5E8D75, // 7: Popup borders + $385D3F, // 8: Item borders + $5E8674, // 9: Window borders + $8CD5FF, $55ADFF, // 10, 11: Item Checked + $4E91FE, $8ED3FF, // 12, 13: Item Pushed + $CCF4FF, $91D0FF, // 14, 15: Item HotTrack + $D5F0EC, $9FCEC2, // 16, 17: OpenToolbarItem + $5B8479, // 18: Button external border + $E3FFFA, $86ADAA, // 19, 20: Button internal borders + $DEF7F4, // 21: Grip/Separator soft color + $91C6B7) // 22: Panel/CheckBox/Tabs/ProgressBar/TrackBar borders + ); +var + Luna: TSpTBXLunaScheme; +begin + if FDefaultColorScheme <> lusUnknown then + Luna := FDefaultColorScheme + else + Luna := SpGetLunaScheme; + + if Luna <> lusUnknown then + FColors := Office2003Colors[Luna] + else begin + // Use adapted colors + // 0, 1: Dock + FColors[0] := clBtnFace; + FColors[1] := SpBlendColors(clBtnFace, clWindow, 35); + // 2, 3: Toolbar + FColors[2] := SpBlendColors(clBtnFace, clWindow, 20); + FColors[3] := SpBlendColors(clBtnFace, clWindow, 95); + // 4, 5: Toolbar borders + FColors[4] := SpBlendColors(clBtnShadow, clWindow, 70); + FColors[5] := SpBlendColors(clBtnFace, clWindow, 62); + // 6: Popup + FColors[6] := SpBlendColors(clBtnFace, clWindow, 15); + // 7: Popup borders + FColors[7] := SpBlendColors(clBtnFace, clBtnShadow, 20); + // 8: Item borders + FColors[8] := clHighlight; + // 9: Window borders + FColors[9] := SpBlendColors(clBtnText, clBtnShadow, 15); + // 10, 11: Item Checked + FColors[10] := SpBlendColors(clHighlight, SpBlendColors(clBtnFace, clWindow, 50), 10); + FColors[11] := FColors[10]; + // 12, 13: Item Pushed + FColors[12] := SpBlendColors(clHighlight, clWindow, 50); + FColors[13] := FColors[12]; + // 14, 15: Item HotTrack + FColors[14] := SpBlendColors(clHighlight, clWindow, 30); + FColors[15] := FColors[14]; + // 16, 17: OpenToolbarItem + FColors[16] := SpBlendColors(clBtnFace, clWindow, 16); + FColors[17] := SpBlendColors(clBtnFace, clWindow, 42); + // 18: Button external border + FColors[18] := FColors[4]; + // 19, 20: Button internal borders + FColors[19] := FColors[5]; + FColors[20] := SpBlendColors(clBtnShadow, clWindow, 40); + // 21: Grip/Separator soft color + FColors[21] := clWhite; + // 22: Panel/CheckBox/Tabs/ProgressBar/TrackBar borders + FColors[22] := SpBlendColors(clBtnShadow, clWindow, 70); + end; +end; + +procedure TSpTBXOffice2003Skin.FillOptions; +var + IsUnknownLuna: Boolean; +begin + //---- Skin Properties ----// + + SkinName := 'Office 2003'; + OfficeMenu := True; + + //---- Colors ----// + + FillColors; + IsUnknownLuna := FColors[0] = clBtnFace; + + //---- Single State ----// + Options(skncDock, sknsNormal).Body.Fill(2, FColors[0], FColors[1], clNone, clNone); + + Options(skncDockablePanel, sknsNormal).Body.Fill(0, FColors[6], clNone, clNone, clNone); + Options(skncDockablePanel, sknsNormal).Borders.Fill(0, FColors[3], FColors[3], clNone, clNone); + + Options(skncDockablePanelTitleBar, sknsNormal).Body.Fill(1, FColors[2], FColors[3], clNone, clNone); + Options(skncDockablePanelTitleBar, sknsNormal).Borders.Fill(0, FColors[6], FColors[6], clNone, clNone); + + Options(skncPanel, sknsNormal).Body.Fill(0, FColors[6], clNone, clNone, clNone); + Options(skncPanel, sknsNormal).Borders.Fill(2, FColors[22], FColors[22], clNone, clNone); + + Options(skncPopup, sknsNormal).Body.Fill(0, FColors[6], clNone, clNone, clNone); + Options(skncPopup, sknsNormal).Borders.Fill(0, FColors[7], FColors[7], clNone, clNone); + + Options(skncStatusBar, sknsNormal).Body.Fill(1, FColors[2], FColors[3], clNone, clNone); + + Options(skncSplitter, sknsNormal).Body.Fill(1, FColors[2], FColors[3], clNone, clNone); + + Options(skncToolbar, sknsNormal).Body.Fill(1, FColors[2], FColors[3], clNone, clNone); + Options(skncToolbar, sknsNormal).Borders.Fill(2, FColors[5], FColors[4], clNone, clNone); + + Options(skncWindow, sknsNormal).Body.Fill(0, FColors[6], clNone, clNone, clNone); + Options(skncWindow, sknsNormal).Borders.Fill(0, FColors[9], FColors[9], FColors[9], FColors[9]); + + Options(skncWindowTitleBar, sknsNormal).Body.Fill(0, FColors[9], clNone, clNone, clNone); + if IsUnknownLuna then + Options(skncWindowTitleBar, sknsNormal).TextColor := clBtnHighlight; + + //---- Elements ----// + Options(skncGutter, sknsNormal).Body.Fill(2, FColors[2], FColors[3], clNone, clNone); + + Options(skncToolbarGrip, sknsNormal).Body.Fill(0, FColors[4], FColors[21], clNone, clNone); + + Options(skncStatusBarGrip, sknsNormal).Body.Fill(0, FColors[4], FColors[21], clNone, clNone); + + Options(skncSeparator, sknsNormal).Body.Fill(0, FColors[4], FColors[21], clNone, clNone); + + //---- Buttons ----// + Options(skncToolbarItem, sknsHotTrack).Body.Fill(1, FColors[14], FColors[15], clNone, clNone); + Options(skncToolbarItem, sknsHotTrack).Borders.Fill(0, FColors[8], FColors[8], clNone, clNone); + Options(skncToolbarItem, sknsPushed).Body.Fill(1, FColors[12], FColors[13], clNone, clNone); + Options(skncToolbarItem, sknsPushed).Borders.Fill(0, FColors[8], FColors[8], clNone, clNone); + Options(skncToolbarItem, sknsChecked).Body.Fill(1, FColors[10], FColors[11], clNone, clNone); + Options(skncToolbarItem, sknsChecked).Borders.Fill(0, FColors[8], FColors[8], clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Body.Fill(1, FColors[12], FColors[13], clNone, clNone); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Borders.Fill(0, FColors[8], FColors[8], clNone, clNone); + + Options(skncOpenToolbarItem, sknsNormal).Body.Fill(1, FColors[16], FColors[17], clNone, clNone); + Options(skncOpenToolbarItem, sknsNormal).Borders.Fill(0, FColors[7], FColors[7], clNone, clNone); + + CopyOptions(skncToolbarItem, skncMenuBarItem); + + CopyOptions(skncToolbarItem, skncMenuItem); + + Options(skncButton, sknsNormal).Body.Fill(1, FColors[2], FColors[3], clNone, clNone); + Options(skncButton, sknsNormal).Borders.Fill(1, FColors[18], FColors[18], FColors[19], FColors[20]); + Options(skncButton, sknsDisabled).Body.Fill(1, FColors[2], FColors[3], clNone, clNone); + Options(skncButton, sknsDisabled).Borders.Fill(1, FColors[18], FColors[18], FColors[19], FColors[20]); + Options(skncButton, sknsHotTrack).Body.Fill(1, FColors[14], FColors[15], clNone, clNone); + Options(skncButton, sknsHotTrack).Borders.Fill(1, FColors[18], FColors[18], FColors[19], FColors[20]); + Options(skncButton, sknsPushed).Body.Fill(1, FColors[12], FColors[13], clNone, clNone); + Options(skncButton, sknsPushed).Borders.Fill(1, FColors[18], FColors[18], FColors[19], FColors[20]); + Options(skncButton, sknsChecked).Body.Fill(1, FColors[10], FColors[11], clNone, clNone); + Options(skncButton, sknsChecked).Borders.Fill(1, FColors[18], FColors[18], FColors[19], FColors[20]); + Options(skncButton, sknsCheckedAndHotTrack).Body.Fill(1, SpLighten(FColors[12], 15), FColors[13], clNone, clNone); + Options(skncButton, sknsCheckedAndHotTrack).Borders.Fill(1, FColors[18], FColors[18], FColors[19], FColors[20]); + + Options(skncListItem, sknsChecked).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsCheckedAndHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Body.Lighten(20); + Options(skncListItem, sknsHotTrack).Borders.Lighten(20); + Options(skncListItem, sknsCheckedAndHotTrack).Body.Lighten(-20); + Options(skncListItem, sknsCheckedAndHotTrack).Borders.Lighten(-20); + + CopyOptions(skncToolbarItem, skncCheckBox); + Options(skncCheckBox, sknsNormal).Borders.Fill(0, FColors[22], FColors[22], clNone, clNone); + Options(skncCheckBox, sknsDisabled).Borders.Fill(0, FColors[22], FColors[22], clNone, clNone); + + CopyOptions(skncCheckBox, skncRadioButton); + + //---- Editors ----// + Options(skncEditFrame, sknsNormal).Borders.Fill(1, clNone, clNone, FColors[3], FColors[3]); + Options(skncEditFrame, sknsDisabled).Borders.Fill(1, clNone, clNone, clBtnShadow, clBtnShadow); + Options(skncEditFrame, sknsHotTrack).Borders.Fill(1, clNone, clNone, FColors[8], FColors[8]); + + CopyOptions(skncToolbarItem, skncEditButton); + Options(skncEditButton, sknsNormal).Body.Fill(1, FColors[2], FColors[3], clNone, clNone); + Options(skncEditButton, sknsNormal).Borders.Fill(0, clWindow, clWindow, clNone, clNone); + + //---- Tabs ----// + Options(skncTab, sknsHotTrack).Body.Fill(1, FColors[14], FColors[15], clNone, clNone); + Options(skncTab, sknsHotTrack).Borders.Fill(0, FColors[22], FColors[22], clNone, clNone); + Options(skncTab, sknsChecked).Body.Fill(0, FColors[6], clNone, clNone, clNone); + Options(skncTab, sknsChecked).Borders.Fill(0, FColors[22], FColors[22], clNone, clNone); + Options(skncTab, sknsCheckedAndHotTrack).Body.Fill(1, FColors[14], FColors[15], clNone, clNone); + Options(skncTab, sknsCheckedAndHotTrack).Borders.Fill(0, FColors[22], FColors[22], clNone, clNone); + + // TabBackground: Only Normal state is used + Options(skncTabBackground, sknsNormal).Body.Fill(0, FColors[6], clNone, clNone, clNone); + Options(skncTabBackground, sknsNormal).Borders.Fill(0, FColors[22], FColors[22], clNone, clNone); + + //---- ProgressBar ----// + // ProgressBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + Options(skncProgressBar, sknsNormal).Body.Fill(0, FColors[6], clWhite, clNone, clNone); + Options(skncProgressBar, sknsNormal).Borders.Fill(0, FColors[22], FColors[22], clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Body.Fill(0, FColors[0], clNone, clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Borders.Fill(0, FColors[22], FColors[22], clNone, clNone); + + //---- TrackBar ----// + // TrackBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + CopyOptions(skncProgressBar, skncTrackBar); + + // TrackBarButton: Only Normal and Pushed states are used + Options(skncTrackBarButton, sknsNormal).Body.Fill(0, FColors[0], clNone, clNone, clNone); + Options(skncTrackBarButton, sknsNormal).Borders.Fill(0, FColors[22], FColors[22], clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Body.Fill(1, FColors[12], FColors[13], clNone, clNone); + Options(skncTrackBarButton, sknsPushed).Borders.Fill(0, FColors[22], FColors[22], clNone, clNone); + + //---- Header ----// + Options(skncHeader, sknsNormal).Body.Fill(1, FColors[2], FColors[3], clNone, clNone); + Options(skncHeader, sknsNormal).Borders.Fill(0, FColors[19], FColors[20], clNone, clNone); + Options(skncHeader, sknsHotTrack).Body.Fill(1, FColors[14], FColors[15], clNone, clNone); + Options(skncHeader, sknsHotTrack).Borders.Fill(0, FColors[19], FColors[20], clNone, clNone); +end; + +procedure TSpTBXOffice2003Skin.SetDefaultColorScheme(const Value: TSpTBXLunaScheme); +begin + if FDefaultColorScheme <> Value then begin + FDefaultColorScheme := Value; + Reset; + FillOptions; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXOffice2007Skin } + +procedure TSpTBXOffice2007Skin.FillOptions; +begin + //---- Skin Properties ----// + + SkinName := 'Office 2007'; + OfficeMenu := True; + + //---- Colors ----// + + FillColors; + + //---- Single State ----// + Options(skncDock, sknsNormal).Body.Fill(7, FColors[0], FColors[1], FColors[2], FColors[3]); + + Options(skncDockablePanel, sknsNormal).Body.Fill(1, FColors[13], FColors[14], clNone, clNone); + Options(skncDockablePanel, sknsNormal).Borders.Fill(0, FColors[11], FColors[11], FColors[12], FColors[12]); + + Options(skncPanel, sknsNormal).Body.Fill(1, FColors[13], FColors[14], clNone, clNone); + Options(skncPanel, sknsNormal).Borders.Fill(1, FColors[11], FColors[11], FColors[12], FColors[12]); + + Options(skncPopup, sknsNormal).Body.Fill(0, clWhite, clNone, clNone, clNone); + Options(skncPopup, sknsNormal).Borders.Fill(0, $C0C0C0, $C0C0C0, clNone, clNone); + + Options(skncStatusBar, sknsNormal).Body.Fill(7, FColors[7], FColors[8], FColors[9], FColors[10]); + Options(skncStatusBar, sknsNormal).TextColor := FColors[6]; // This overrides the Items text color + + CopyOptions(skncStatusBar, skncDockablePanelTitleBar); + + CopyOptions(skncDock, skncSplitter); + + Options(skncWindow, sknsNormal).Body.Fill(1, FColors[13], FColors[14], clNone, clNone); + Options(skncWindow, sknsNormal).Borders.Fill(0, FColors[15], FColors[16], FColors[17], FColors[16]); + + CopyOptions(skncStatusBar, skncWindowTitleBar); + + //---- Elements ----// + Options(skncGutter, sknsNormal).Body.Fill(0, $EEEEE9, clNone, clNone, clNone); + Options(skncGutter, sknsNormal).Borders.Fill(0, $C5C5C5, clNone, clNone, clNone); + + Options(skncToolbarGrip, sknsNormal).Body.Fill(0, FColors[4], FColors[5], clNone, clNone); + + Options(skncStatusBarGrip, sknsNormal).Body.Fill(0, FColors[4], FColors[5], clNone, clNone); + + Options(skncSeparator, sknsNormal).Body.Fill(0, FColors[4], FColors[5], clNone, clNone); + + //---- Buttons ----// + Options(skncToolbarItem, sknsHotTrack).Body.Fill(7, $DBFDFF, $95E7FF, $4CD7FF, $96E7FF); + Options(skncToolbarItem, sknsHotTrack).Borders.Fill(1, $9BCFDD, $9BCFDD, $D2FBFF, $B3FAFF); + Options(skncToolbarItem, sknsPushed).Body.Fill(7, $70BAFC, $59A5F3, $388FEF, $64CDFD); + Options(skncToolbarItem, sknsPushed).Borders.Fill(1, $65818E, $AEBDC3, $66C1FA, $66C1FA); + Options(skncToolbarItem, sknsChecked).Body.Fill(7, $A8D6FE, $61AFFC, $329BFB, $ACF0FF); + Options(skncToolbarItem, sknsChecked).Borders.Fill(1, $65818E, $AEBDC3, $66C1FA, $66C1FA); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Body.Fill(7, $70BAFC, $59A5F3, $388FEF, $64CDFD); + Options(skncToolbarItem, sknsCheckedAndHotTrack).Borders.Fill(1, $65818E, $AEBDC3, $66C1FA, $66C1FA); + + CopyOptions(skncToolbarItem, skncMenuBarItem); + + CopyOptions(skncToolbarItem, skncMenuItem); + + CopyOptions(skncToolbarItem, skncButton); + Options(skncButton, sknsNormal).Body.Fill(1, FColors[13], FColors[14], clNone, clNone); + Options(skncButton, sknsNormal).Borders.Fill(1, FColors[11], FColors[11], FColors[12], FColors[12]); + Options(skncButton, sknsDisabled).Body.Fill(1, FColors[13], FColors[14], clNone, clNone); + Options(skncButton, sknsDisabled).Borders.Fill(1, FColors[11], FColors[11], FColors[12], FColors[12]); + + Options(skncListItem, sknsChecked).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsCheckedAndHotTrack).Assign(Options(skncToolbarItem, sknsHotTrack)); + Options(skncListItem, sknsHotTrack).Body.Lighten(10); + Options(skncListItem, sknsHotTrack).Borders.Lighten(10); + Options(skncListItem, sknsCheckedAndHotTrack).Body.Lighten(-10); + Options(skncListItem, sknsCheckedAndHotTrack).Borders.Lighten(-10); + + CopyOptions(skncToolbarItem, skncCheckBox); + Options(skncCheckBox, sknsNormal).Borders.Fill(1, FColors[11], FColors[11], clNone, clNone); + Options(skncCheckBox, sknsDisabled).Borders.Fill(1, FColors[11], FColors[11], clNone, clNone); + + CopyOptions(skncCheckBox, skncRadioButton); + + //---- Editors ----// + Options(skncEditFrame, sknsNormal).Borders.Fill(1, clNone, clNone, FColors[4], FColors[4]); + Options(skncEditFrame, sknsDisabled).Borders.Fill(1, clNone, clNone, FColors[4], FColors[4]); + Options(skncEditFrame, sknsHotTrack).Borders.Fill(1, clNone, clNone, FColors[4], FColors[4]); + + CopyOptions(skncToolbarItem, skncEditButton); + + //---- Tabs ----// + Options(skncTab, sknsHotTrack).Assign(Options(skncButton, sknsHotTrack)); + Options(skncTab, sknsChecked).Body.Fill(0, FColors[13], clNone, clNone, clNone); + Options(skncTab, sknsChecked).Borders.Fill(1, FColors[11], FColors[11], FColors[12], FColors[12]); + Options(skncTab, sknsCheckedAndHotTrack).Assign(Options(skncButton, sknsHotTrack)); + + // TabBackground: Only Normal state is used + Options(skncTabBackground, sknsNormal).Assign(Options(skncButton, sknsNormal)); + + //---- ProgressBar ----// + // ProgressBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + Options(skncProgressBar, sknsNormal).Body.Fill(0, FColors[5], clWhite, clNone, clNone); + Options(skncProgressBar, sknsNormal).Borders.Fill(1, FColors[2], FColors[2], clNone, clNone); + Options(skncProgressBar, sknsHotTrack).Body.Fill(7, $DBFDFF, $95E7FF, $4CD7FF, $96E7FF); + Options(skncProgressBar, sknsHotTrack).Borders.Fill(1, FColors[2], FColors[2], clNone, clNone); + + //---- TrackBar ----// + // TrackBar: Only Normal and HotTrack states are used + // HotTrack represents the selection + CopyOptions(skncProgressBar, skncTrackBar); + + // TrackBarButton: Only Normal and Pushed states are used + Options(skncTrackBarButton, sknsNormal).Assign(Options(skncToolbarItem, sknsChecked)); + Options(skncTrackBarButton, sknsPushed).Assign(Options(skncToolbarItem, sknsPushed)); + + //---- Header ----// + Options(skncHeader, sknsNormal).Body.Fill(1, FColors[13], FColors[14], clNone, clNone); + Options(skncHeader, sknsNormal).Borders.Fill(0, FColors[11], FColors[11], FColors[12], FColors[12]); + Options(skncHeader, sknsHotTrack).Body.Fill(7, $DBFDFF, $95E7FF, $4CD7FF, $96E7FF); + Options(skncHeader, sknsHotTrack).Borders.Fill(0, $7E99A9, $7E99A9, $D2FBFF, $D2FBFF); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXOffice2007BlueSkin } + +procedure TSpTBXOffice2007BlueSkin.FillColors; +const + ColorConst: TSpTBXOffice2007Colors = ( + $F4E6DB, $F0DECF, $EDD9C9, $FFF2E7, // 0, 1, 2, 3: Dock + $D6AE90, $FFFFFF, // 4, 5: Separator + clNone, // 6: StatusBar Text Color + $F9E6D7, $F7D7BF, $F5D0B4, $F7E5D6, // 7, 8, 9, 10: StatusBar + $EDC4A5, $FEF6ED, // 11, 12: Button Borders + $FEF9F6, $FBE7D9, // 13, 14: Button Normal + $825A3B, $E1C6B1, $F7D9C2 // 15, 16, 17: Window Borders + ); +begin + FColors := ColorConst; + SkinName := 'Office 2007 Blue'; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXOffice2007BlackSkin } + +procedure TSpTBXOffice2007BlackSkin.FillColors; +const + ColorConst: TSpTBXOffice2007Colors = ( + $DDD8D5, $CFC6C1, $C5BBB4, $EAEAEA, // 0, 1, 2, 3: Dock + $989898, $CCCCCC, // 4, 5: Separator + clWhite, // 6: StatusBar Text Color + $524743, $463E3B, $30302F, $454545, // 7, 8, 9, 10: StatusBar + $B4B0AE, $DBD4D0, // 11, 12: Button Borders + $E5E0DD, $CFC6C1, // 13, 14: Button Normal + $2F2F2F, $4D4D4D, $666666 // 15, 16, 17: Window Borders + ); +begin + FColors := ColorConst; + SkinName := 'Office 2007 Black'; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXOffice2007SilverSkin } + +procedure TSpTBXOffice2007SilverSkin.FillColors; +const + ColorConst: TSpTBXOffice2007Colors = ( + $DDD8D5, $CFC6C1, $C5BBB4, $EAEAEA, // 0, 1, 2, 3: Dock + $AAA6A2, $FFFFFF, // 4, 5: Separator + clNone, // 6: StatusBar Text Color + $EBE8E7, $C2B7B1, $B6AFA9, $CEC9C7, // 7, 8, 9, 10: StatusBar + $B4B0AE, $DBD4D0, // 11, 12: Button Borders + $E5E0DD, $CFC6C1, // 13, 14: Button Normal + $989898, $BABABB, $DEDDDE // 15, 16, 17: Window Borders + ); +begin + FColors := ColorConst; + SkinName := 'Office 2007 Silver'; +end; + +initialization + SkinManager.SkinsList.AddSkin('Aluminum', TSpTBXAluminumSkin); + SkinManager.SkinsList.AddSkin('Athen', TSpTBXAthenSkin); + SkinManager.SkinsList.AddSkin('Dream', TSpTBXDreamSkin); + SkinManager.SkinsList.AddSkin('Eos', TSpTBXEosSkin); + SkinManager.SkinsList.AddSkin('Human', TSpTBXHumanSkin); + SkinManager.SkinsList.AddSkin('Leopard', TSpTBXLeopardSkin); + SkinManager.SkinsList.AddSkin('Xito', TSpTBXXitoSkin); + { Office } + SkinManager.SkinsList.AddSkin('Office XP', TSpTBXOfficeXPSkin); + SkinManager.SkinsList.AddSkin('Office 2003', TSpTBXOffice2003Skin); + SkinManager.SkinsList.AddSkin('Office 2007 Blue', TSpTBXOffice2007BlueSkin); + SkinManager.SkinsList.AddSkin('Office 2007 Black', TSpTBXOffice2007BlackSkin); + SkinManager.SkinsList.AddSkin('Office 2007 Silver', TSpTBXOffice2007SilverSkin); + +end. diff --git a/internal/2.4.4/1/Source/SpTBXDkPanels.pas b/internal/2.4.4/1/Source/SpTBXDkPanels.pas new file mode 100644 index 0000000..24ad5b5 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXDkPanels.pas @@ -0,0 +1,3669 @@ +unit SpTBXDkPanels; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +Development notes: + - All the Windows and Delphi bugs fixes are marked with '[Bugfix]'. + - All the theme changes and adjustments are marked with '[Theme-Change]'. + - All the DockablePanels rules are marked with '[DockablePanel-Rule]'. + - To handle the size constraints use GetMinMaxSize when the DP is floating, + and ConstrainedResize when is Docked (explicitly check if it's docked). + +Limitations: + - DockablePanels can be docked only on MultiDocks. + - MultiDocks doesn't have lateral splitters, you can solve this by + adding a TSpTBXSplitter on the Form. + +History: +2 December 2009 - version 2.4.4 + - No changes. + +13 September 2009 - version 2.4.3 + - Added OnCanResize event to TSpTBXDockablePanel. + - Changed TSpTBXDockablePanel docking behavior, when the + panel is docked and it's DockPos isn't specified it + will be appended to the bottom of the MultiDock. + - Fixed incorrect TSpTBXDockablePanel split resizing when + FixedDockedSize was true, thanks to Gilles Arcas for + reporting this. + +8 May 2009 - version 2.4.2 + - Fixed incorrect TSpTBXDockablePanel floating border + painting on Vista with Aero enabled, thanks to Mattias + Andersson for reporting this. + +15 March 2009 - version 2.4.1 + - Fixed TSpTBXSplitter bug, it wasn't correctly minimized + when MinSize was 1, 2 or 3, thanks to Sertac Akyuz for + fixing this. + - Fixed TSpTBXSplitter bug, it wasn't correctly restored + when SpTBIniLoadPositions was called. + - Fixed incorrect TSpTBXDockablePanel behavior, when DockMode + is dmCannotFloat the DP should be able to be re-docked, + thanks to Ivan Petrovic for reporting this. + - Fixed incorrect TSpTBXDockablePanel behavior, it wasn't + correctly resized when using the embedded splitter, thanks + to Gilles Arcas for reporting this. + - Fixed incorrect TSpTBXDockablePanel painting, + OnDrawCaptionPanel wasn't called when painting the NC + area borders, thanks to Mikael Stalvik for reporting this. + +17 January 2009 - version 2.4 + - Added FloatingClientWidth and FloatingClientHeight public + properties to TSpTBXDockablePanel. + - Added TaskPaneStyleResize property to TSpTBXDockablePanel, + when this property is set to True the Minimize/Restore + behavior will be the same as the Windows Task Pane (the + DockablePanel is minimized from bottom to top). + - Changed TSpTBXDockablePanel undocking behavior the panel + will remember the previous floating size when it is + undocked. + - Changed TSpTBXDockablePanel docking behavior, when the + panel is docked on an empty MultiDock it will use the + DefaultDockedSize property to set its size. + If DefaultDockedSize is 0 it will use the floating size. + +26 September 2008 - version 2.3 + - Added DefaultDockedSize property to TSpTBXDockablePanel, + this property is used to set the DockablePanel size when + it's docked on an empty MultiDock. + - Added ShowVerticalCaption property to TSpTBXDockablePanel, + this property is used to rotate the caption panel vertically. + When the DockablePanel is floating or docked on a vertical + MultiDock the caption will be horizontal regardless of the + value of ShowVerticalCaption. + - Fixed TSpTBXDockablePanel bug, anchored children were not + correctly resized when the Form was loaded, thanks to + Alex Neznanov for reporting this. + - Fixed TSpTBXDockablePanel bug, hiding/restoring a DP + misaligned the adjacent splitter, thanks to Alexander for + reporting this (related to Delphi's zero size align bug). + - Fixed TSpTBXDockablePanel bug, dragging a floating DP + with CTRL key pressed should not dock the DP. + +29 July 2008 - version 2.2 + - Fixed TSpTBXDockablePanel bug, an AV was raised when the + DockablePanel was undocked when it was minimized by an + adjacent splitter, thanks to Minoru Yoshida for reporting this. + +26 June 2008 - version 2.1 + - Added AutoSplitterVisibility property to TSpTBXMultiDock, + use this property to automatically hide the adjacent + splitter when the MultiDock is empty. + - Added OnWindowStateChanged event to TSpTBXDockablePanel, + this event is fired when the DockablePanel gets minimized, + maximized or restored. + - Fixed TSpTBXDockablePanel bug, the floating panel was able to be + dragged offscreen leaving no way to move it back, thanks to + Minoru Yoshida for reporting this. + - Fixed TSpTBXSplitter bug, incorrect alignment when the split + control was minimized and the Form was resized, thanks to + Den and Minoru Yoshida for reporting this. + +3 May 2008 - version 2.0 + - Decoupled from TBX. + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation + +uses + Windows, Messages, Classes, SysUtils, Controls, Graphics, ImgList, Forms, + Menus, StdCtrls, ExtCtrls, ActnList, IniFiles, + TB2Item, TB2Dock, TB2Toolbar, + SpTBXSkins, SpTBXItem, SpTBXControls; + +type + TSpTBXCustomDockablePanel = class; + TSpTBXCustomSplitter = class; + + TSpTBXDockStateRec = record + DockedState: TWindowState; + RestoreSize: Integer; + end; + + TSpTBXDockPosition = ( + dpxLeft, // dpLeft + dpxTop, // dpTop + dpxRight, // dpRight + dpxBottom, // dpBottom + dpxClient // dpRight + ); + + TSpTBXDPResizeType = ( + dprtManualResize, + dprtMinimizeOrRestore, + dprtMinimizeOrRestoreTaskPaneStyle, + dprtSplitResize, + dprtAppendResize + ); + + TSpTBXWindowStateChangedEvent = procedure(Sender: TObject; AWindowState: TWindowState) of object; + + { TSpTBXMultiDock } + + TSpTBXCustomMultiDock = class(TTBDock) + private + FAutoSplitterVisibility: Boolean; + FLimitToOneRow: Boolean; + FLastSplitter: TSpTBXCustomSplitter; + FPosition: TSpTBXDockPosition; + FReadingPositionData: Boolean; + FUpdatingLateralSize: Boolean; + FOnInsertRemoveBar: TTBInsertRemoveEvent; + FOnRequestDock: TTBRequestDockEvent; + procedure UpdateDPLateralSize(AWidth, AHeight: Integer); + procedure SetPosition(const Value: TSpTBXDockPosition); + procedure SetLimitToOneRow(const Value: Boolean); + protected + procedure AlignControls(AControl: TControl; var Rect: TRect); override; + procedure DoInsertRemoveBar(Sender: TObject; Inserting: Boolean; Bar: TTBCustomDockableWindow); virtual; // OnInsertRemoveBar is republished + procedure DoRequestDock(Sender: TObject; Bar: TTBCustomDockableWindow; var Accept: Boolean); virtual; // OnRequestDock is republished + procedure Loaded; override; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure ValidateInsert(AComponent: TComponent); override; + + procedure InsertingOnEmptyDock; + function GetAdjacentSplitter(SpacingDelta: Integer = 1): TSpTBXCustomSplitter; + property ReadingPositionData: Boolean read FReadingPositionData; + public + constructor Create(AOwner: TComponent); override; + function IsVertical: Boolean; + procedure GetDockablePanelList(DPList: TList); + procedure GetDockablePanelDockIndex(DPList: TList; DP: TSpTBXCustomDockablePanel; out DPDockIndex: Integer); + procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; + procedure UpdateDockablePanelsDockPos; + property UpdatingLateralSize: Boolean read FUpdatingLateralSize; + published + // Republish LimitToOneRow, the inherited LimitToOneRow should always be True + property LimitToOneRow: Boolean read FLimitToOneRow write SetLimitToOneRow default True; + property Position: TSpTBXDockPosition read FPosition write SetPosition default dpxLeft; + property AutoSplitterVisibility: Boolean read FAutoSplitterVisibility write FAutoSplitterVisibility default True; + // Republish OnInsertRemoveBar, use the inherited OnRequestDock to show/hide the Splitter + property OnInsertRemoveBar: TTBInsertRemoveEvent read FOnInsertRemoveBar write FOnInsertRemoveBar; + // Republish OnRequestDock, use the inherited OnRequestDock to deny non DPs + property OnRequestDock: TTBRequestDockEvent read FOnRequestDock write FOnRequestDock; + end; + + TSpTBXMultiDock = class(TSpTBXCustomMultiDock); + + { TSpTBXDockablePanelButtonOptions } + + TSpTBXDockablePanelButtonOptions = class(TSpTBXButtonOptions) + private + FTaskPaneStyleResize: Boolean; + protected + FDockablePanel: TSpTBXCustomDockablePanel; + procedure ButtonsClick(Sender: TObject); override; + procedure CreateButtons; override; + function Restoring(B: TSpTBXCustomItem): Boolean; override; + procedure SetupButton(B: TSpTBXCustomItem); override; + public + constructor Create(AParent: TWinControl); override; + published + property Maximize default False; + property Minimize default False; + property TaskPaneStyleResize: Boolean read FTaskPaneStyleResize write FTaskPaneStyleResize default False; + property TitleBarMaxSize default 19; + end; + + { TSpTBXDockablePanelToolbar } + + TSpTBXDockablePanelToolbar = class(TSpTBXToolbar) + protected + function CanItemClick(Item: TTBCustomItem; Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer): Boolean; override; + function GetItemsTextColor(State: TSpTBXSkinStatesType): TColor; override; + function GetRightAlignMargin: Integer; override; + public + constructor Create(AOwner: TComponent); override; + function GetParentDockablePanel: TSpTBXCustomDockablePanel; + end; + + { TSpTBXDockablePanel } + + TSpTBXCustomDockablePanel = class(TSpTBXCustomToolWindow, ITBItems) + private + FDefaultDockedSize: Integer; + FFixedDockedSize: Boolean; + FFloatingClientHeight: Integer; + FFloatingClientWidth: Integer; + FIsDockedMoving: Boolean; + FIsManualSizing: Boolean; + FLoadedBarSize: TSize; + FLoadedDockPos: Integer; + FLoadedState: TWindowState; + FOptions: TSpTBXDockablePanelButtonOptions; + FShowCaption: Boolean; + FShowCaptionWhenDocked: Boolean; + FShowVerticalCaption: Boolean; + FOnDrawCaptionPanel: TSpTBXDrawEvent; + FOnWindowStateChanged: TSpTBXWindowStateChangedEvent; + function CanSplitResize(EdgePosition: TTBDockPosition): Boolean; + procedure DockRequestDock(Sender: TObject; Bar: TTBCustomDockableWindow; var Accept: Boolean); + procedure DockResize(Sender: TObject); + function InternalMaximize(Restore: Boolean): Boolean; + procedure UpdateTitleBarRotation; + function GetCaptionPanelSize: TPoint; + function GetEffectiveHeight: Integer; + function GetEffectiveWidth: Integer; + function GetFloatingClientHeight: Integer; + function GetFloatingClientWidth: Integer; + function GetImages: TCustomImageList; + function GetItems: TTBCustomItem; // For ITBItems interface + function GetRootItems: TTBRootItem; + function GetToolbar: TSpTBXToolbar; + function GetView: TTBToolbarView; + procedure SetDefaultDockedSize(Value: Integer); + procedure SetEffectiveHeight(const Value: Integer); + procedure SetEffectiveWidth(const Value: Integer); + procedure SetFloatingClientHeight(const Value: Integer); + procedure SetFloatingClientWidth(const Value: Integer); + procedure SetImages(const Value: TCustomImageList); + procedure SetShowCaption(const Value: Boolean); + procedure SetShowCaptionWhenDocked(const Value: Boolean); + procedure SetShowVerticalCaption(const Value: Boolean); + procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED; + procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; + procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST; + procedure WMNCLButtonDown(var Message: TWMNCLButtonDown); message WM_NCLBUTTONDOWN; + procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; + protected + FPanel: TPanel; + FToolbarDock: TSpTBXDock; + FToolbar: TSpTBXDockablePanelToolbar; + FState: TSpTBXDockStateRec; + FDockForms: TList; + + // Component + procedure CreateParams(var Params: TCreateParams); override; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure Loaded; override; + procedure SetParent(AParent: TWinControl); override; + procedure ValidateContainer(AComponent: TComponent); override; + + // Sizing + procedure BeginDockedMoving; + procedure BeginSplitResizing(HitTest: Integer); + procedure ConstrainedResize(var MinWidth, MinHeight, MaxWidth, MaxHeight: Integer); override; + procedure DoWindowStateChanged(AWindowState: TWindowState); virtual; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure Resize; override; + + // Painting + procedure DoDrawCaptionPanel(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure DockDrawBackground(Sender: TObject; ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure ToolbarDrawBackground(Sender: TObject; ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure InternalDrawBackground(ACanvas: TCanvas; ARect: TRect; PaintOnNCArea: Boolean; PaintBorders: Boolean = True); override; + + property DefaultDockedSize: Integer read FDefaultDockedSize write SetDefaultDockedSize default 0; + property FixedDockedSize: Boolean read FFixedDockedSize write FFixedDockedSize default False; + property Images: TCustomImageList read GetImages write SetImages; + property Items: TTBRootItem read GetRootItems; + property Options: TSpTBXDockablePanelButtonOptions read FOptions write FOptions; + property ShowCaption: Boolean read FShowCaption write SetShowCaption default True; + property ShowCaptionWhenDocked: Boolean read FShowCaptionWhenDocked write SetShowCaptionWhenDocked default True; + property ShowVerticalCaption: Boolean read FShowVerticalCaption write SetShowVerticalCaption default False; + property OnDrawCaptionPanel: TSpTBXDrawEvent read FOnDrawCaptionPanel write FOnDrawCaptionPanel; + property OnWindowStateChanged: TSpTBXWindowStateChangedEvent read FOnWindowStateChanged write FOnWindowStateChanged; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + + procedure AddDockForm(const Form: TTBCustomForm); + procedure RemoveDockForm(const Form: TTBCustomForm); + procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; // For ITBItems interface + procedure DoneReadingPositionData(const Data: TTBReadPositionData); override; + procedure ReadPositionData(const Data: TTBReadPositionData); override; + procedure WritePositionData(const Data: TTBWritePositionData); override; + procedure InvalidateBackground(InvalidateChildren: Boolean = True); override; + function IsResizable: Boolean; + function IsVerticalTitleBar: Boolean; + function Maximize: Boolean; virtual; + function Maximized: Boolean; + function Minimize: Boolean; virtual; + function Minimized: Boolean; + function Restore: Boolean; virtual; + function SizeToggle(ToMaximize: Boolean): Boolean; + + property CaptionPanelSize: TPoint read GetCaptionPanelSize; + property EffectiveWidth: Integer read GetEffectiveWidth write SetEffectiveWidth; + property EffectiveHeight: Integer read GetEffectiveHeight write SetEffectiveHeight; + property FloatingClientHeight: Integer read GetFloatingClientHeight write SetFloatingClientHeight; + property FloatingClientWidth: Integer read GetFloatingClientWidth write SetFloatingClientWidth; + property Toolbar: TSpTBXToolbar read GetToolbar; + property View: TTBToolbarView read GetView; + end; + + TSpTBXDockablePanel = class(TSpTBXCustomDockablePanel) + published + property ActivateParent; + property Align; + property Anchors; + property CurrentDock; + property DefaultDock; + property DockableTo; + property DockMode; + property DockPos; + property DockRow; + property FloatingMode; + property Font; + property HideWhenInactive; + property LastDock; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property Resizable; + property ShowHint; + property TabOrder; + property UseLastDock; + property Visible; + // TTBCustomDockableWindow doesn't store the Width and Height, make + // sure it is stored and do not store TSpTBXCustomToolWindow + // ClientWidth/ClientHeight + property Height stored True; + property Width stored True; + property OnCanResize; + property OnClose; + property OnCloseQuery; + property OnContextPopup; + property OnDragDrop; + property OnDragOver; + property OnDockChanged; + property OnDockChanging; + property OnDockChangingHidden; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnMove; + property OnRecreated; + property OnRecreating; + property OnResize; + property OnVisibleChanged; + // TSpTBXCustomDockablePanel properties + property DefaultDockedSize; + property FixedDockedSize; + property Images; + property Items; + property Options; + property ShowCaption; + property ShowCaptionWhenDocked; + property ShowVerticalCaption; + property OnDrawCaptionPanel; + property OnWindowStateChanged; + end; + + { TSpTBXSplitter } + + TSpTBXCustomSplitter = class(TCustomControl) + private + FAutoCalcMaxSize: Boolean; + FGripSize: Integer; + FGripHotTrack: Boolean; + FMouseSplitControl: TControl; + FMouseActiveControl: TWinControl; + FMouseBrush: TBrush; + FMouseDownPos: TPoint; + FMousePrevSplitControlSize: Integer; + FMouseDownOnGrip: Boolean; + FMouseOverGrip: Boolean; + FMouseLineDC: HDC; + FMouseLineVisible: Boolean; + FMousePrevBrush: HBrush; + FMoving: Boolean; + FMinSize: Integer; + FMaxSize: Integer; + FNewSize: Integer; + FOldSize: Integer; + FOldKeyDown: TKeyEvent; + FResizeStyle: TResizeStyle; + FSkinType: TSpTBXSkinType; + FSplitLinePaintingPos: Integer; + FOnDrawBackground: TSpTBXDrawEvent; + FOnMoving: TSpTBXCanResizeEvent; + FOnMoved: TNotifyEvent; + function GetGripRect: TRect; + function GetMinimized: Boolean; + procedure SetGripSize(const Value: Integer); + procedure SetMinSize(const Value: integer); + procedure SetSkinType(const Value: TSpTBXSkinType); + procedure UpdateControlSize(SplitControl: TControl); + procedure MouseCalcSplitSize(X, Y: Integer; var NewSize, Split: Integer); + procedure MouseAllocateLineDC; + procedure MouseReleaseLineDC; + procedure MouseDrawLine; + procedure MouseFocusKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); + function ValidateSplitControl: TControl; + procedure CMMouseleave(var Message: TMessage); message CM_MOUSELEAVE; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + procedure WMEraseBkgnd(var Message: TWmEraseBkgnd); message WM_ERASEBKGND; + protected + FRestorePos: Integer; + procedure DoDrawBackground(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure DoMoved; virtual; + function DoMoving(var NewSize: Integer): Boolean; virtual; + function IsVertical: Boolean; + procedure MouseStopSizing; dynamic; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure Paint; override; + procedure RequestAlign; override; + property AutoCalcMaxSize: Boolean read FAutoCalcMaxSize write FAutoCalcMaxSize default True; + property GripSize: Integer read FGripSize write SetGripSize default 50; + property GripHotTrack: Boolean read FGripHotTrack write FGripHotTrack default True; + property MinSize: Integer read FMinSize write SetMinSize default 0; + property ResizeStyle: TResizeStyle read FResizeStyle write FResizeStyle default rsUpdate; + property SkinType: TSpTBXSkinType read FSkinType write SetSkinType default sknSkin; + property OnDrawBackground: TSpTBXDrawEvent read FOnDrawBackground write FOnDrawBackground; + property OnMoving: TSpTBXCanResizeEvent read FOnMoving write FOnMoving; + property OnMoved: TNotifyEvent read FOnMoved write FOnMoved; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure ChangeSplitControlSize(NewControlSize: Integer); + procedure InvalidateGrip; + procedure Minimize; + procedure Restore; + procedure Toggle; + property GripRect: TRect read GetGripRect; + property Minimized: Boolean read GetMinimized; + property MouseOverGrip: Boolean read FMouseOverGrip; + property Moving: Boolean read FMoving; + published + property Align default alLeft; + property Width default 5; + end; + + TSpTBXSplitter = class(TSpTBXCustomSplitter) + published + property Align; + property Color; + property Constraints; + property ParentColor; + property PopupMenu; + property ShowHint; + property Visible; + property OnClick; + property OnContextPopup; + property OnDblClick; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + // TSpTBXCustomSplitter properties + property AutoCalcMaxSize; + property GripSize; + property MinSize; + property ResizeStyle; + property SkinType; + property OnDrawBackground; + property OnMoving; + property OnMoved; + end; + +{ Painting helpers } +procedure SpDrawXPDockablePanelTitleBar(ACanvas: TCanvas; ARect: TRect; IsActive, Vertical: Boolean); +procedure SpDrawXPDockablePanelBody(ACanvas: TCanvas; ARect: TRect; IsActive, IsFloating: Boolean); + +{ Toolbar Load/Save Position helpers } +procedure SpTBRegLoadPositions(const OwnerComponent: TComponent; const RootKey: DWORD; const BaseRegistryKey: string); +procedure SpTBRegSavePositions(const OwnerComponent: TComponent; const RootKey: DWORD; const BaseRegistryKey: string); +procedure SpTBIniLoadPositions(const OwnerComponent: TComponent; const Filename, SectionNamePrefix: string); overload; +procedure SpTBIniLoadPositions(const OwnerComponent: TComponent; const IniFile: TCustomIniFile; const SectionNamePrefix: string); overload; +procedure SpTBIniSavePositions(const OwnerComponent: TComponent; const Filename, SectionNamePrefix: string); overload; +procedure SpTBIniSavePositions(const OwnerComponent: TComponent; const IniFile: TCustomIniFile; const SectionNamePrefix: string); overload; + +implementation + +uses + Types, ComCtrls, Registry, TB2Consts, TB2Common; + +const + DockedBorderSize = 2; + HT_TB2k_Border = 2000; + HT_DP_SPLITRESIZELEFT = 86; + HT_DP_SPLITRESIZERIGHT = 87; + HT_DP_SPLITRESIZETOP = 88; + HT_DP_SPLITRESIZEBOTTOM = 89; + // Constants for ini/registry values. Do not localize! + rvMultiDockWidth = 'MultiDockWidth'; + rvMultiDockHeight = 'MultiDockHeight'; + rvFloatingClientWidth = 'FloatingClientWidth'; + rvFloatingClientHeight = 'FloatingClientHeight'; + rvRestoreSize = 'RestoreSize'; + rvState = 'State'; + rvSplitterRestorePos = 'SplitterRestorePos'; + +type + TTBCustomItemAccess = class(TTBCustomItem); + TSpTBXCustomItemAccess = class(TSpTBXCustomItem); + TTBDockAccess = class(TTBDock); + TControlAccess = class(TControl); + TWinControlAccess = class(TWinControl); + + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Helpers } + +procedure SpFixDelphiAlignBug(W: TControl; NewSize: Integer; Splitter: TControl); +// [Bugfix] +{ Try to fix a Delphi align bug when a control is right or bottom aligned and + its size is changed. + To reproduce this: + - On a new form drop 3 TPanels, align them to the bottom, don't change the size. + - Drop a button, on its OnClick event change the middle panel size to 200. + - Run the app, when you click the button the middle panel will be moved to the bottom of the form. + + Another Delphi bug: the controls aligning is based on the Controls array when they + have the same position. + For example: + Form1.DisableAlign; + try + Control1.Left:= 10; Control1.Top:= 10; + Control1.Align:= alLeft; + Control2.Left:= 10; Control2.Top:= 10; + Control2.Align:= alLeft; + // Control1 has the aligning priority because it has lower index in the Controls array + finally + Form1.EnableAlign; + end; + + This will affect the splitter when the splitter is Minimized or Maximazed to 0. + Thats why the standard Borland TSplitter must minimize to a value higher than 0. + + Solution: we must move the splitter before or after the other control + based on the Align property, for that we use SendToBack and BringToFront methods. + SendToBack and BringToFront besides of changing the "z-order" changes the + order of the control in the Controls array, SendToBack moves the control + to the first position while BringToFront moves it the last position. + + When Align is alLeft or alTop we should make the splitter to have the + aligning priority using BringToFront. + And when Align is alRight or alBottom we will use SendToBack. } +var + I, Delta: Integer; + PrevBounds: TRect; + C: TControl; +begin + case W.Align of + alLeft: + begin + if Assigned(Splitter) then Splitter.BringToFront; + W.SendToBack; + W.Width := NewSize; + end; + alTop: + begin + if Assigned(Splitter) then Splitter.BringToFront; + W.SendToBack; + W.Height := NewSize; + end; + alRight: + begin + W.Parent.DisableAlign; + if W is TSpTBXCustomMultiDock then + TSpTBXCustomMultiDock(W).BeginUpdate; + try + if Assigned(Splitter) then Splitter.SendToBack; + W.BringToFront; + PrevBounds := W.BoundsRect; + W.Width := NewSize; + Delta := (PrevBounds.Right - PrevBounds.Left) - W.Width; + + // Move all children + for I := 0 to W.Parent.ControlCount - 1 do begin + C := W.Parent.Controls[I]; + if C.Align = W.Align then + if (C = Splitter) and (PrevBounds.Right - PrevBounds.Left = 0) then + C.Left := C.Left + Delta - 1 + else + if (C.Left < PrevBounds.Right) or ((C = W) and (C.Left = PrevBounds.Right)) then + C.Left := C.Left + Delta; + end; + finally + if W is TSpTBXCustomMultiDock then + TSpTBXCustomMultiDock(W).EndUpdate; + W.Parent.EnableAlign; + end; + end; + alBottom: + begin + W.Parent.DisableAlign; + if W is TSpTBXCustomMultiDock then + TSpTBXCustomMultiDock(W).BeginUpdate; + try + if Assigned(Splitter) then Splitter.SendToBack; + W.BringToFront; + PrevBounds := W.BoundsRect; + W.Height := NewSize; + Delta := (PrevBounds.Bottom - PrevBounds.Top) - W.Height; + + // Move all children + for I := 0 to W.Parent.ControlCount - 1 do begin + C := W.Parent.Controls[I]; + if C.Align = W.Align then + if (C = Splitter) and (PrevBounds.Bottom - PrevBounds.Top = 0) then + C.Top := C.Top + Delta - 1 + else + if (C.Top < PrevBounds.Bottom) or ((C = W) and (C.Top = PrevBounds.Bottom)) then + C.Top := C.Top + Delta; + end; + finally + if W is TSpTBXCustomMultiDock then + TSpTBXCustomMultiDock(W).EndUpdate; + W.Parent.EnableAlign; + end; + end; + end; +end; + +function SpAdjacentSplitter(Dock: TTBDock; Space: Integer = 1): TSpTBXCustomSplitter; +var + I: Integer; + P: TPoint; + R: TRect; + C: TControl; +begin + Result := nil; + + P := Point(Dock.Left, Dock.Top); + case Dock.Position of + dpLeft: Inc(P.X, Dock.Width + Space); + dpRight: Dec(P.X, Space); + dpTop: Inc(P.Y, Dock.Height + Space); + dpBottom: Dec(P.Y, Space); + end; + + for I := 0 to Dock.Parent.ControlCount - 1 do begin + C := Dock.Parent.Controls[I]; + R := C.BoundsRect; + if (C.Align = Dock.Align) and (C is TSpTBXCustomSplitter) then begin + // The splitter should be adjacent to the Dock + // Or the splitter is not visible and a DP is being docked on an + // empty Dock. + if PtInRect(R, P) or + (not C.Visible and (Space = -1)) then + begin + Result := TSpTBXCustomSplitter(C); + Break; + end; + end; + end; +end; + +procedure SpDPGetDockableMultiDockList(DP: TSpTBXCustomDockablePanel; var L: TList); +// Returns a valid list of MultiDocks where the DP can dock to. + + procedure Recurse(const ParentCtl: TWinControl); + var + M: TTBDock; + I: Integer; + begin + if DP.ContainsControl(ParentCtl) or not ParentCtl.Showing then Exit; + + for I := 0 to ParentCtl.ControlCount-1 do + if ParentCtl.Controls[I] is TSpTBXCustomMultiDock then begin + M := TSpTBXCustomMultiDock(ParentCtl.Controls[I]); + if (L.IndexOf(M) = -1) and M.Visible and M.AllowDrag and (M.Position in DP.DockableTo) then + if DP.CurrentDock = M then + L.Insert(0, M) // Add CurrentDock to the DockList first so that it gets priority + else + L.Add(M); + end + else + if (ParentCtl.Controls[I] is TWinControl) and not (ParentCtl.Controls[I] is TTBDock) then + Recurse(TWinControl(ParentCtl.Controls[I])); + end; + +var + ParentForm: TTBCustomForm; + DockFormsList: TList; + I, J: Integer; +begin + L.Clear; + ParentForm := TBGetToolWindowParentForm(DP); + DockFormsList := TList.Create; + try + if Assigned(DP.FDockForms) then begin + for I := 0 to Screen.CustomFormCount - 1 do begin + J := DP.FDockForms.IndexOf(Screen.CustomForms[I]); + if (J > -1) and (DP.FDockForms[J] <> ParentForm) then + DockFormsList.Add(DP.FDockForms[J]); + end; + end; + + if Assigned(ParentForm) then + DockFormsList.Insert(0, ParentForm); + + for I := 0 to DockFormsList.Count - 1 do + Recurse(DockFormsList[I]); + finally + DockFormsList.Free; + end; +end; + +function SpDPInmediateResizableSibling(DP: TSpTBXCustomDockablePanel; + ResizeType: TSpTBXDPResizeType; out IsAdjacent: Boolean): TSpTBXCustomDockablePanel; +// Returns the inmediate resizable DP sibling + + function FindPrevSibling(L: TList; StartIndex: Integer): TSpTBXCustomDockablePanel; + var + J: Integer; + LItem: TSpTBXCustomDockablePanel; + begin + Result := nil; + if StartIndex > 0 then + for J := StartIndex - 1 downto 0 do begin + LItem := TSpTBXCustomDockablePanel(L[J]); + if (LItem <> DP) and LItem.IsResizable then begin + Result := LItem; + IsAdjacent := J = StartIndex - 1; + Break; + end; + end; + end; + + function FindNextSibling(L: TList; StartIndex: Integer): TSpTBXCustomDockablePanel; + var + J: Integer; + LItem: TSpTBXCustomDockablePanel; + begin + Result := nil; + if StartIndex + 1 < L.Count then + for J := StartIndex + 1 to L.Count - 1 do begin + LItem := TSpTBXCustomDockablePanel(L[J]); + if (LItem <> DP) and LItem.IsResizable then begin + Result := LItem; + IsAdjacent := J = StartIndex + 1; + Break; + end; + end; + end; + +var + I: Integer; + MultiDock: TSpTBXCustomMultiDock; + L: TList; + DkPanel: TSpTBXCustomDockablePanel; +begin + Result := nil; + DkPanel := nil; + IsAdjacent := False; + if not (DP.CurrentDock is TSpTBXCustomMultiDock) then Exit; + + if DP.Docked then begin + L := TList.Create; + try + MultiDock := TSpTBXCustomMultiDock(DP.CurrentDock); + MultiDock.GetDockablePanelList(L); + if L.Count <= 1 then Exit; + + // Resize only the inmediate dockable panel sibling + // Find DP on the DockList + for I := 0 to L.Count - 1 do + if L[I] = DP then begin + DkPanel := L[I]; + Break; + end; + if not Assigned(DkPanel) then Exit; + + // Find the inmediate resizable sibling + case ResizeType of + dprtMinimizeOrRestore: + begin + // Search the prev sibling, if not found search the next sibling + Result := FindPrevSibling(L, I); + if not Assigned(Result) then + Result := FindNextSibling(L, I); + end; + dprtAppendResize: + begin + // Search from the first item to the last + I := -1; + Result := FindNextSibling(L, I); + end; + else + // Search the next sibling, if not found search the prev sibling + Result := FindNextSibling(L, I); + if not Assigned(Result) then + Result := FindPrevSibling(L, I); + end; + + finally + L.Free; + end; + end; +end; + +procedure SpDPUpdateDockPos(DPList: TList; IsVertical: Boolean); overload; +// Updates the DP.DockPos on all the DPs on the list +var + I, TotalDockPos: Integer; + DP: TSpTBXCustomDockablePanel; +begin + TotalDockPos := 0; + for I := 0 to DPList.Count - 1 do begin + DP := DPList[I]; + if IsVertical then begin + DP.DockPos := TotalDockPos; + Inc(TotalDockPos, DP.Height); + end + else begin + DP.DockPos := TotalDockPos; + Inc(TotalDockPos, DP.Width); + end; + end; +end; + +procedure SpDPSwapPos(MultiDock: TSpTBXCustomMultiDock; DP1, DP2: TSpTBXCustomDockablePanel); +// Swaps the positions of two DPs +var + L: TList; + I, DP1Index, DP2Index: Integer; + Temp: TSpTBXCustomDockablePanel; +begin + L := TList.Create; + MultiDock.BeginUpdate; + try + MultiDock.GetDockablePanelList(L); + + // Find the DPs indexes + DP1Index := -1; + DP2Index := -1; + for I := 0 to L.Count - 1 do begin + Temp := L[I]; + if Temp = DP1 then DP1Index := I; + if Temp = DP2 then DP2Index := I; + if (DP1Index > -1) and (DP2Index > -1) then Break; + end; + + if (DP1Index > -1) and (DP2Index > -1) then begin + // Swap the DPs + Temp := L[DP1Index]; + L[DP1Index] := L[DP2Index]; + L[DP2Index] := Temp; + // Adjust the Dock Pos + SpDPUpdateDockPos(L, MultiDock.IsVertical); + end; + finally + Multidock.EndUpdate; + L.Free; + end; +end; + +function SpDPResize(DP: TSpTBXCustomDockablePanel; NewSize: Integer; ResizeType: TSpTBXDPResizeType = dprtManualResize): Boolean; +var + PrevSize, Delta, MinSize: Integer; + MultiDock: TSpTBXCustomMultiDock; + DPSibling: TSpTBXCustomDockablePanel; + IsDPSiblingAdjacent: Boolean; +begin + Result := False; + + if DP.Docked then begin + if not (DP.CurrentDock is TSpTBXCustomMultiDock) then Exit; + + MultiDock := TSpTBXCustomMultiDock(DP.CurrentDock); + if MultiDock.ToolbarCount < 2 then Exit; + + MultiDock.BeginUpdate; + try + // Resize only the inmediate dockable panel sibling + DPSibling := SpDPInmediateResizableSibling(DP, ResizeType, IsDPSiblingAdjacent); + if Assigned(DPSibling) then begin + case ResizeType of + dprtAppendResize: + begin + // Resize the 1st DP + if MultiDock.IsVertical then + DPSibling.Height := DPSibling.Height - NewSize + else + DPSibling.Width := DPSibling.Width - NewSize; + MultiDock.UpdateDockablePanelsDockPos; + end; + dprtManualResize, dprtMinimizeOrRestore, dprtMinimizeOrRestoreTaskPaneStyle: + begin + if MultiDock.IsVertical then begin + PrevSize := DP.Height; + DP.Height := NewSize; + Delta := DP.Height - PrevSize; + DPSibling.Height := DPSibling.Height - Delta; + end + else begin + PrevSize := DP.Width; + DP.Width := NewSize; + Delta := DP.Width - PrevSize; + DPSibling.Width := DPSibling.Width - Delta; + end; + MultiDock.UpdateDockablePanelsDockPos; + end; + dprtSplitResize: + begin + if DPSibling.DockPos < DP.DockPos then + Exit; + + // If DP can't be resized find another sibling + if not (csDesigning in MultiDock.ComponentState) and DP.FixedDockedSize then begin + if MultiDock.IsVertical then + Delta := NewSize - DP.Height + else + Delta := NewSize - DP.Width; + DP := DPSibling; + // Use dprtMinimizeOrRestore as the ResizeType, we need to find the previous DP in the list + DPSibling := SpDPInmediateResizableSibling(DP, dprtMinimizeOrRestore, IsDPSiblingAdjacent); + // Make sure DPSibling index < DP index + if not Assigned(DPSibling) or (DPSibling.DockPos > DP.DockPos) then + Exit; + + if MultiDock.IsVertical then begin + NewSize := DP.Height - Delta; + if (DPSibling.Height + Delta < DPSibling.MinClientHeight + (DockedBorderSize * 2)) or + (NewSize < DP.MinClientHeight + (DockedBorderSize * 2)) then + begin + Exit; + end; + end + else begin + NewSize := DP.Width - Delta; + if (DPSibling.Width + Delta < DPSibling.MinClientWidth + (DockedBorderSize * 2)) or + (NewSize < DP.MinClientWidth + (DockedBorderSize * 2)) then + begin + Exit; + end; + end; + end; + + // Resize the DP and DPSibling + if MultiDock.IsVertical then begin + if NewSize < DP.MinClientHeight + (DockedBorderSize * 2) then + Exit; + PrevSize := DP.Height; + Delta := NewSize - PrevSize; + MinSize := DPSibling.MinClientHeight + (DockedBorderSize * 2); + if DPSibling.Height - Delta < MinSize then begin + Delta := DPSibling.Height - MinSize; + if Delta <= 0 then Exit; + DP.Height := PrevSize + Delta; + end + else + DP.Height := NewSize; + DPSibling.Height := DPSibling.Height - Delta; + end + else begin + if NewSize < DP.MinClientWidth + (DockedBorderSize * 2) then + Exit; + PrevSize := DP.Width; + Delta := NewSize - PrevSize; + MinSize := DPSibling.MinClientWidth + (DockedBorderSize * 2); + if DPSibling.Width - Delta < MinSize then begin + Delta := DPSibling.Width - MinSize; + if Delta <= 0 then Exit; + DP.Width := PrevSize + Delta; + end + else + DP.Width := NewSize; + DPSibling.Width := DPSibling.Width - Delta; + end; + end; + end; + + Result := True; + end; + finally + // Update DockPos of all the DPs, including the non-visible DPs, even when DPSibling = nil + if ResizeType = dprtSplitResize then + MultiDock.UpdateDockablePanelsDockPos; + + MultiDock.EndUpdate; + + // Resize the DP after the it was appended + if ResizeType = dprtAppendResize then + SpDPResize(DP, NewSize, dprtManualResize); + end; + end + else begin + // Not docked nor floating + DP.Width := NewSize + end; +end; + +function SpPtInMultiDock(P: TPoint; MultiDockList: TList): TSpTBXCustomMultiDock; +// Returns the Dock that is under the point, on screen coordinates +var + I: Integer; + MultiDock: TSpTBXCustomMultiDock; + R: TRect; +const + SnapBuffer = 24; + MinDockSize = 4; +begin + Result := nil; + for I := 0 to MultiDockList.Count - 1 do + if TControl(MultiDockList[I]) is TSpTBXCustomMultiDock then begin + MultiDock := TSpTBXCustomMultiDock(MultiDockList[I]); + GetWindowRect(MultiDock.Handle, R); + + // Ensure there is a minimum size for mouse sensibility + case MultiDock.Position of + dpxTop: + if (R.Bottom - R.Top) < MinDockSize then + Inc(R.Bottom, SnapBuffer); + dpxBottom: + if (R.Bottom - R.Top) < MinDockSize then + Dec(R.Top, SnapBuffer); + dpxLeft: + if (R.Right - R.Left) < MinDockSize then + Inc(R.Right, SnapBuffer); + dpxRight, dpxClient: + if (R.Right - R.Left) < MinDockSize then + Dec(R.Left, SnapBuffer); + end; + + if PtInRect(R, P) then begin + Result := MultiDock; + Break; + end; + end; +end; + +function SpPtInDP(P: TPoint; MultiDock: TSpTBXCustomMultiDock; OnlyOnTitleBar: Boolean): TSpTBXCustomDockablePanel; +// Returns a DP that is under the point, on screen coordinates +// If OnlyOnTitleBar is true it returns a DP if the point is under the DP's TitleBar. +var + I: Integer; + DP: TSpTBXCustomDockablePanel; + R: TRect; +begin + Result := nil; + for I := 0 to MultiDock.ToolbarCount - 1 do + if MultiDock.Toolbars[I] is TSpTBXCustomDockablePanel then begin + DP := TSpTBXCustomDockablePanel(MultiDock.Toolbars[I]); + if OnlyOnTitleBar then begin + if MultiDock.IsVertical then + GetWindowRect(DP.FToolbar.Handle, R) + else begin + // When the DP is horizontal track 20 pixels from the left + R.TopLeft := DP.ClientToScreen(Point(0, 0)); + R.BottomRight := DP.ClientToScreen(Point(20, DP.ClientHeight)); + end; + end + else + GetWindowRect(DP.Handle, R); + + if PtInRect(R, P) then begin + Result := DP; + Break; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Painting helpers } + +procedure SpDrawXPDockablePanelTitleBar(ACanvas: TCanvas; ARect: TRect; IsActive, Vertical: Boolean); +begin + case SkinManager.GetSkinType of + sknNone, sknWindows: + begin + // [Theme-Change] + // When the XP theme is used just paint a gradient + SpGradientFill(ACanvas, ARect, SpLighten(clBtnFace, 12), SpLighten(clBtnFace, -12), not Vertical); + Windows.DrawEdge(ACanvas.Handle, ARect, BDR_RAISEDINNER, BF_RECT); + end; + sknSkin: + CurrentSkin.PaintBackground(ACanvas, ARect, skncDockablePanelTitleBar, sknsNormal, True, True, Vertical); + end; +end; + +procedure SpDrawXPDockablePanelBody(ACanvas: TCanvas; ARect: TRect; IsActive, IsFloating: Boolean); +var + C: TColor; +begin + case SkinManager.GetSkinType of + sknNone, sknWindows: + begin + C := ACanvas.Brush.Color; + ACanvas.Brush.Color := SpMixColors(clBtnFace, clWindow, 80); + ACanvas.FillRect(ARect); + if not IsFloating then begin + ACanvas.Brush.Color := clBtnFace; + ACanvas.FrameRect(ARect); + InflateRect(ARect, -1, -1); + ACanvas.Brush.Color := clWhite; + ACanvas.FrameRect(ARect); + end; + ACanvas.Brush.Color := C; + end; + sknSkin: + CurrentSkin.PaintBackground(ACanvas, ARect, skncDockablePanel, sknsNormal, True, not IsFloating); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Toolbar Load/Save Position helpers } + +procedure SpTBUpdateMultiDocksAfterLoad(const M: TSpTBXMultiDock); +// TBCustomLoadPositions doesn't correctly position the DPs after they are loaded. +// To reproduce: +// 1) Drop a top aligned MultiDock with 3 DPs (DP1, DP2, DP3), and drop a left +// aligned Multidock with a single DP (DP4) +// 2) Use TBIniLoadPositions in Form.OnShow and TBIniSavePositions in Form.OnClose +// 3) Run the app, position the top DPs in this order: DP4, DP3, DP1, and +// dock DP2 on the left aligned Multidock +// 4) Close and run the app, the top DPs are not correctly positioned/sized +// This happens because TBCustomLoadPositions updates the DockPos and Size +// after the toolbar Parent is set, toolbar by toolbar. +// DockPos and Size should be changed after all the toolbars parent is changed. +// http://news.jrsoftware.org/read/article.php?id=15131&group=jrsoftware.toolbar2000.thirdparty#15131 +var + J: Integer; + DP: TSpTBXCustomDockablePanel; + L: TList; + Sz: TSize; + R: TRect; +begin + L := TList.Create; + M.BeginUpdate; + try + M.GetDockablePanelList(L); + for J := 0 to L.Count - 1 do begin + DP := TSpTBXCustomDockablePanel(L[J]); + if DP.FLoadedDockPos > -1 then + DP.DockPos := DP.FLoadedDockPos; + Windows.GetClientRect(DP.Handle, R); + Sz := DP.FLoadedBarSize; + if M.IsVertical then begin + if Sz.cy > 0 then + DP.Height := DP.Height - R.Bottom + Sz.cy; + end + else begin + if Sz.cx > 0 then + DP.Width := DP.Width - R.Right + Sz.cx; + end; + end; + finally + M.EndUpdate; + L.Free; + end; +end; + +procedure SpTBUpdateBeforeLoadIni(const OwnerComponent: TComponent; + const IniFile: TCustomIniFile; const SectionNamePrefix: string); +var + I: Integer; + MultiDock: TSpTBXMultiDock; +begin + for I := 0 to OwnerComponent.ComponentCount - 1 do begin + if OwnerComponent.Components[I] is TSpTBXMultiDock then begin + MultiDock := TSpTBXMultiDock(OwnerComponent.Components[I]); + MultiDock.FReadingPositionData := True; // Set the flag to allow resizing of FixedDockedSize DPs + end; + end; +end; + +procedure SpTBUpdateAfterLoadIni(const OwnerComponent: TComponent; + const IniFile: TCustomIniFile; const SectionNamePrefix: string); +var + I, W, H: Integer; + MultiDock: TSpTBXMultiDock; + Splitter: TSpTBXCustomSplitter; +begin + for I := 0 to OwnerComponent.ComponentCount - 1 do begin + // Load the MultiDock size + if OwnerComponent.Components[I] is TSpTBXMultiDock then begin + MultiDock := TSpTBXMultiDock(OwnerComponent.Components[I]); + MultiDock.FReadingPositionData := False; // Reset the flag + if MultiDock.ToolbarCount > 0 then begin + W := IniFile.ReadInteger(SectionNamePrefix + MultiDock.Name, rvMultiDockWidth, -1); + H := IniFile.ReadInteger(SectionNamePrefix + MultiDock.Name, rvMultiDockHeight, -1); + Splitter := MultiDock.GetAdjacentSplitter; + if Assigned(Splitter) then begin + case MultiDock.Align of + alLeft: if W > -1 then SpFixDelphiAlignBug(MultiDock, W, Splitter); + alTop: if H > -1 then SpFixDelphiAlignBug(MultiDock, H, Splitter); + alRight: if W > -1 then SpFixDelphiAlignBug(MultiDock, W, Splitter); + alBottom: if H > -1 then SpFixDelphiAlignBug(MultiDock, H, Splitter); + end; + end; + // Update the size and position of the DPs + SpTBUpdateMultiDocksAfterLoad(MultiDock); + end; + end; + + // Load Splitter.RestorePos + if OwnerComponent.Components[I] is TSpTBXCustomSplitter then begin + Splitter := TSpTBXCustomSplitter(OwnerComponent.Components[I]); + Splitter.FRestorePos := IniFile.ReadInteger(SectionNamePrefix + Splitter.Name, rvSplitterRestorePos, 60); + end; + end; +end; + +procedure SpTBUpdateAfterSaveIni(const OwnerComponent: TComponent; + const IniFile: TCustomIniFile; const SectionNamePrefix: string); +var + I: Integer; + MultiDock: TSpTBXMultiDock; + Splitter: TSpTBXCustomSplitter; +begin + for I := 0 to OwnerComponent.ComponentCount - 1 do begin + // Save the MultiDock size + if OwnerComponent.Components[I] is TSpTBXMultiDock then begin + MultiDock := TSpTBXMultiDock(OwnerComponent.Components[I]); + if MultiDock.ToolbarCount > 0 then begin + IniFile.WriteInteger(SectionNamePrefix + MultiDock.Name, rvMultiDockWidth, MultiDock.Width); + IniFile.WriteInteger(SectionNamePrefix + MultiDock.Name, rvMultiDockHeight, MultiDock.Height); + end; + end; + + // Save the Splitter.RestorePos + if OwnerComponent.Components[I] is TSpTBXCustomSplitter then begin + Splitter := TSpTBXCustomSplitter(OwnerComponent.Components[I]); + IniFile.WriteInteger(SectionNamePrefix + Splitter.Name, rvSplitterRestorePos, Splitter.FRestorePos); + end; + end; +end; + +procedure SpTBRegLoadPositions(const OwnerComponent: TComponent; + const RootKey: DWORD; const BaseRegistryKey: string); +var + Reg: TRegistryIniFile; +begin + // Use TRegistryIniFile to call SpTBUpdateAfterLoadIni + Reg := TRegistryIniFile.Create('', KEY_QUERY_VALUE); + try + Reg.RegIniFile.RootKey := RootKey; + if Reg.RegIniFile.OpenKey(BaseRegistryKey, False) then begin + SpTBUpdateBeforeLoadIni(OwnerComponent, Reg, ''); + TBRegLoadPositions(OwnerComponent, RootKey, BaseRegistryKey); + SpTBUpdateAfterLoadIni(OwnerComponent, Reg, ''); + end; + finally + Reg.Free; + end; +end; + +procedure SpTBRegSavePositions(const OwnerComponent: TComponent; + const RootKey: DWORD; const BaseRegistryKey: string); +var + Reg: TRegistryIniFile; +begin + TBRegSavePositions(OwnerComponent, RootKey, BaseRegistryKey); + // Use TRegistryIniFile to call SpTBUpdateAfterSaveIni + Reg := TRegistryIniFile.Create(''); + try + Reg.RegIniFile.RootKey := RootKey; + Reg.RegIniFile.CreateKey(BaseRegistryKey); + if Reg.RegIniFile.OpenKey(BaseRegistryKey, True) then + SpTBUpdateAfterSaveIni(OwnerComponent, Reg, ''); + finally + Reg.Free; + end; +end; + +procedure SpTBIniLoadPositions(const OwnerComponent: TComponent; + const IniFile: TCustomIniFile; const SectionNamePrefix: string); +begin + SpTBUpdateBeforeLoadIni(OwnerComponent, IniFile, SectionNamePrefix); + TBIniLoadPositions(OwnerComponent, IniFile, SectionNamePrefix); + SpTBUpdateAfterLoadIni(OwnerComponent, IniFile, SectionNamePrefix); +end; + +procedure SpTBIniSavePositions(const OwnerComponent: TComponent; + const IniFile: TCustomIniFile; const SectionNamePrefix: string); +begin + TBIniSavePositions(OwnerComponent, IniFile, SectionNamePrefix); + SpTBUpdateAfterSaveIni(OwnerComponent, IniFile, SectionNamePrefix); +end; + +procedure SpTBIniLoadPositions(const OwnerComponent: TComponent; + const Filename, SectionNamePrefix: string); +// Use TMemIniFile instead of TIniFile for better readability and to solve +// the #7363 bug report from QC: http://qc.borland.com/wc/qcmain.aspx?d=7363 +var + MemIniFile: TMemIniFile; +begin + MemIniFile := TMemIniFile.Create(Filename); + try + SpTBIniLoadPositions(OwnerComponent, MemIniFile, SectionNamePrefix); + finally + MemIniFile.Free; + end; +end; + +procedure SpTBIniSavePositions(const OwnerComponent: TComponent; + const Filename, SectionNamePrefix: string); +// Use TMemIniFile instead of TIniFile for better readability and to solve +// the #7363 bug report from QC: http://qc.borland.com/wc/qcmain.aspx?d=7363 +var + MemIniFile: TMemIniFile; +begin + MemIniFile := TMemIniFile.Create(Filename); + try + SpTBIniSavePositions(OwnerComponent, MemIniFile, SectionNamePrefix); + MemIniFile.UpdateFile; + finally + MemIniFile.Free; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomMultiDock } + +constructor TSpTBXCustomMultiDock.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + inherited LimitToOneRow := True; + FAutoSplitterVisibility := True; + FLimitToOneRow := True; + FPosition := dpxTop; + SetPosition(dpxLeft); + inherited OnInsertRemoveBar := DoInsertRemoveBar; + inherited OnRequestDock := DoRequestDock; +end; + +procedure TSpTBXCustomMultiDock.DoInsertRemoveBar(Sender: TObject; + Inserting: Boolean; Bar: TTBCustomDockableWindow); +var + SpacingDelta: Integer; + Splitter: TSpTBXCustomSplitter; +begin + // Automatically Show or Hide the adjacent splitter when + // the MultiDock is empty + if FAutoSplitterVisibility then begin + if Inserting and (ToolbarCount = 1) then + SpacingDelta := -1 // Inserting on an empty Dock + else + SpacingDelta := 1; + + Splitter := GetAdjacentSplitter(SpacingDelta); + + if Assigned(Splitter) then begin + if Inserting and (ToolbarCount = 1) then begin + // Inserting on an empty Dock, re-align adjacent splitter + // When Width/Height = 0 the realign must be done by SetParent + Splitter.Visible := True; + if (IsVertical and (Width > 0)) or (not IsVertical and (Height > 0)) then + InsertingOnEmptyDock; + end + else begin + if ToolbarCount = 0 then + Splitter.Visible := False; + end; + end; + end; + + if Assigned(FOnInsertRemoveBar) then FOnInsertRemoveBar(Sender, Inserting, Bar); +end; + +procedure TSpTBXCustomMultiDock.DoRequestDock(Sender: TObject; + Bar: TTBCustomDockableWindow; var Accept: Boolean); +begin + Accept := Assigned(Bar) and (Bar is TSpTBXCustomDockablePanel); + if Accept then + if Assigned(FOnRequestDock) then FOnRequestDock(Sender, Bar, Accept); +end; + +procedure TSpTBXCustomMultiDock.AlignControls(AControl: TControl; + var Rect: TRect); +begin + inherited; + if FPosition = dpxClient then + UpdateDPLateralSize(Width, Height); +end; + +function CompareEffectiveDockPos(Item1, Item2: Pointer): Integer; +begin + Result := TSpTBXCustomDockablePanel(Item1).EffectiveDockPos - TSpTBXCustomDockablePanel(Item2).EffectiveDockPos; +end; + +procedure TSpTBXCustomMultiDock.GetDockablePanelList(DPList: TList); +var + I: Integer; + T: TTBCustomDockableWindow; +begin + DPList.Clear; + for I := 0 to ToolbarCount - 1 do begin + T := Toolbars[I]; + if T is TSpTBXCustomDockablePanel then + DPList.Add(T); + end; + // Sort the list based on the dock pos + DPList.Sort(CompareEffectiveDockPos); +end; + +function TSpTBXCustomMultiDock.GetAdjacentSplitter(SpacingDelta: Integer = 1): TSpTBXCustomSplitter; +begin + if Assigned(FLastSplitter) then + Result := FLastSplitter + else begin + Result := SpAdjacentSplitter(Self, SpacingDelta); + if Result <> FLastSplitter then begin + if Assigned(FLastSplitter) then FLastSplitter.RemoveFreeNotification(Self); + FLastSplitter := Result; + if Assigned(FLastSplitter) then + FLastSplitter.FreeNotification(Self); + end; + end; +end; + +procedure TSpTBXCustomMultiDock.GetDockablePanelDockIndex(DPList: TList; + DP: TSpTBXCustomDockablePanel; out DPDockIndex: Integer); +var + I: Integer; +begin + DPDockIndex := -1; + GetDockablePanelList(DPList); + for I := 0 to DPList.Count - 1 do + if DPList[I] = DP then begin + DPDockIndex := I; + Break; + end; +end; + +procedure TSpTBXCustomMultiDock.InsertingOnEmptyDock; +var + Splitter: TSpTBXCustomSplitter; +begin + // When a DP is docked on an empty right/bottom aligned MultiDock and there's + // an adjacent Splitter, the Splitter is moved to the right/bottom side + // of the MultiDock: + // http://news.jrsoftware.org/read/article.php?id=14410&group=jrsoftware.toolbar2000.thirdparty#14410 + // To fix this, re align the Splitter after the MultiDock is resized. + Splitter := GetAdjacentSplitter; + if Assigned(Splitter) then begin + Parent.DisableAlign; + try + case Splitter.Align of + alTop: Splitter.Top := Top + Height + 1; + alBottom: Splitter.Top := Top - 1; + alLeft: Splitter.Left := Left + Width + 1; + alRight: Splitter.Left := Left - 1; + end; + finally + Parent.EnableAlign; + end; + end; +end; + +function TSpTBXCustomMultiDock.IsVertical: Boolean; +begin + Result := not (Position in [dpxTop, dpxBottom]); +end; + +procedure TSpTBXCustomMultiDock.Loaded; +var + Splitter: TSpTBXCustomSplitter; +begin + inherited; + + // Automatically Hide the adjacent splitter when + // the MultiDock is empty + if FAutoSplitterVisibility and (ToolbarCount = 0) then begin + Splitter := GetAdjacentSplitter; + if Assigned(Splitter) then + Splitter.Visible := False; + end; +end; + +procedure TSpTBXCustomMultiDock.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited; + if (Operation = opRemove) and (AComponent = FLastSplitter) then + FLastSplitter := nil; +end; + +procedure TSpTBXCustomMultiDock.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); +begin + inherited; + UpdateDPLateralSize(AWidth, AHeight); +end; + +procedure TSpTBXCustomMultiDock.SetLimitToOneRow(const Value: Boolean); +begin + FLimitToOneRow := True; +end; + +procedure TSpTBXCustomMultiDock.SetPosition(const Value: TSpTBXDockPosition); +begin + if FPosition <> Value then begin + if (ControlCount <> 0) then + raise EInvalidOperation.Create(STBDockCannotChangePosition); + FPosition := Value; + case Value of + dpxLeft: inherited Position := dpLeft; + dpxTop: inherited Position := dpTop; + dpxRight: inherited Position := dpRight; + dpxBottom: inherited Position := dpBottom; + dpxClient: + begin + inherited Position := dpRight; + Align := alClient; + end; + end; + ArrangeToolbars; + end; +end; + +procedure TSpTBXCustomMultiDock.UpdateDockablePanelsDockPos; +// Updates the DP.DockPos on all the DPs on the MultiDock +var + L: TList; +begin + L := TList.Create; + BeginUpdate; + try + GetDockablePanelList(L); + SpDPUpdateDockPos(L, IsVertical); + finally + EndUpdate; + L.Free; + end; +end; + +procedure TSpTBXCustomMultiDock.UpdateDPLateralSize(AWidth, AHeight: Integer); +// Update the lateral size of all the DPs relative to the MultiDock +// This causes flicker! +var + L: TList; + I, Size: Integer; + DP: TSpTBXCustomDockablePanel; + IsDPSiblingAdjacent: Boolean; +begin + L := TList.Create; + try + GetDockablePanelList(L); + if L.Count = 0 then Exit; + FUpdatingLateralSize := True; + BeginUpdate; + try + Size := 0; + if IsVertical then begin + for I := 0 to L.Count - 1 do begin + DP := TSpTBXCustomDockablePanel(L[I]); + DP.Width := AWidth; // Update the lateral size + Inc(Size, DP.Height); // Calculate the total size of all the DPs + end; + // If the last DP is not resizable make sure we fill the empty space + if (Size < Height) or (Size > Height) then begin + DP := L[L.Count - 1]; + if not DP.IsResizable then begin + // Use dprtMinimizeOrRestore as the ResizeType, we need to find the previous DP in the list + DP := SpDPInmediateResizableSibling(DP, dprtMinimizeOrRestore, IsDPSiblingAdjacent); + if Assigned(DP) then + DP.Height := DP.Height + (Height - Size); + end; + SpDPUpdateDockPos(L, IsVertical); + end; + end + else begin + for I := 0 to L.Count - 1 do begin + DP := TSpTBXCustomDockablePanel(L[I]); + DP.Height := AHeight; // Update the lateral size + Inc(Size, DP.Width); // Calculate the total size of all the DPs + end; + // If the last DP is not resizable make sure we fill the empty space + if (Size < Width) or (Size > Width) then begin + DP := L[L.Count - 1]; + if not DP.IsResizable then begin + // Use dprtMinimizeOrRestore as the ResizeType, we need to find the previous DP in the list + DP := SpDPInmediateResizableSibling(DP, dprtMinimizeOrRestore, IsDPSiblingAdjacent); + if Assigned(DP) then + DP.Width := DP.Width + (Width - Size); + end; + SpDPUpdateDockPos(L, IsVertical); + end; + end; + finally + EndUpdate; + FUpdatingLateralSize := False; + end; + finally + L.Free; + end; +end; + +procedure TSpTBXCustomMultiDock.ValidateInsert(AComponent: TComponent); +begin + inherited; + if not (AComponent is TSpTBXCustomDockablePanel) then + raise EInvalidOperation.CreateFmt('Cannot insert %s into MultiDock', [AComponent.ClassName]); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXDockablePanelButtonOptions } + +constructor TSpTBXDockablePanelButtonOptions.Create(AParent: TWinControl); +begin + FDockablePanel := AParent as TSpTBXCustomDockablePanel; + inherited; + Maximize := False; + Minimize := False; + TitleBarMaxSize := 19; +end; + +procedure TSpTBXDockablePanelButtonOptions.CreateButtons; +begin + FToolbar := FDockablePanel.FToolbar; + inherited; +end; + +procedure TSpTBXDockablePanelButtonOptions.ButtonsClick(Sender: TObject); +begin + if Sender = MinimizeButton then FDockablePanel.SizeToggle(False) + else if Sender = MaximizeButton then FDockablePanel.SizeToggle(True) + else if Sender = CloseButton then FDockablePanel.Close; +end; + +function TSpTBXDockablePanelButtonOptions.Restoring(B: TSpTBXCustomItem): Boolean; +begin + Result := False; + if Assigned(FDockablePanel) then + if B = MinimizeButton then + Result := FDockablePanel.Minimized + else + if B = MaximizeButton then + Result := FDockablePanel.Maximized; +end; + +procedure TSpTBXDockablePanelButtonOptions.SetupButton(B: TSpTBXCustomItem); +begin + inherited; + TSpTBXCustomItemAccess(B).CustomWidth := 15; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXDockablePanelToolbar } + +constructor TSpTBXDockablePanelToolbar.Create(AOwner: TComponent); +begin + inherited; + CompoundToolbar := True; +end; + +function TSpTBXDockablePanelToolbar.GetItemsTextColor(State: TSpTBXSkinStatesType): TColor; +begin + Result := CurrentSkin.GetTextColor(skncDockablePanelTitleBar, State); +end; + +function TSpTBXDockablePanelToolbar.GetParentDockablePanel: TSpTBXCustomDockablePanel; +var + P: TWinControl; +begin + Result := nil; + P := Parent; + while Assigned(P) do + if P is TSpTBXCustomDockablePanel then begin + Result := P as TSpTBXCustomDockablePanel; + Break; + end + else + P := P.Parent; +end; + +function TSpTBXDockablePanelToolbar.GetRightAlignMargin: Integer; +begin + Result := 4; +end; + +function TSpTBXDockablePanelToolbar.CanItemClick(Item: TTBCustomItem; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer): Boolean; +var + TransparentClick: Boolean; + DP: TSpTBXCustomDockablePanel; +begin + Result := True; + + // Move the DockablePanel if the toolbar client area or an item with + // tbisClicksTransparent itemstyle is clicked (like a LabelItem) + if Button = mbLeft then begin + DP := GetParentDockablePanel; + if Assigned(DP) and DP.IsMovable then begin + if Assigned(Item) then + TransparentClick := tbisClicksTransparent in TTBCustomItemAccess(Item).ItemStyle + else + TransparentClick := True; + if TransparentClick then + if ssDouble in Shift then + DP.DoubleClick + else begin + Result := False; + SendMessage(DP.Handle, WM_NCLBUTTONDOWN, HT_TB2k_Border, 0); + end; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomDockablePanel } + +constructor TSpTBXCustomDockablePanel.Create(AOwner: TComponent); +begin + inherited; + + FLoadedDockPos := -1; + FLoadedBarSize.cx := -1; + FLoadedBarSize.cy := -1; + + Stretch := True; + DragHandleStyle := dhNone; + + SetBounds(Left, Top, 160, 128); + + FPanel := TPanel.Create(Self); + FPanel.Parent := Self; + FPanel.Align := alTop; + FPanel.BevelOuter := bvNone; + + FToolbarDock := TSpTBXDock.Create(Self); + FToolbarDock.Parent := FPanel; + FToolbarDock.OnRequestDock := DockRequestDock; + FToolbarDock.OnDrawBackground := DockDrawBackground; + FToolbarDock.OnResize := DockResize; + + FToolbar := TSpTBXDockablePanelToolbar.Create(Self); + FToolbar.Parent := FToolbarDock; + FToolbar.CurrentDock := FToolbarDock; + FToolbar.Name := Name + 'Toolbar'; + FToolbar.Customizable := False; + FToolbar.BorderStyle := bsNone; + FToolbar.DockMode := dmCannotFloatOrChangeDocks; + FToolbar.DragHandleStyle := dhNone; + FToolbar.Options := FToolbar.Options + [tboNoAutoHint]; + FToolbar.Stretch := True; + FToolbar.ShrinkMode := tbsmNone; + FToolbar.ShowCaption := False; + FToolbar.OnDrawBackground := ToolbarDrawBackground; + + FOptions := TSpTBXDockablePanelButtonOptions.Create(Self); + FOptions.CaptionLabel := Caption; + + inherited ShowCaption := False; // Re-publish it, should always be False + FShowCaption := True; + FShowCaptionWhenDocked := True; + + DockResize(FToolbarDock); // Adjust ToolbarDock resizing +end; + +procedure TSpTBXCustomDockablePanel.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + + if not (csDesigning in ComponentState) then + with Params do + Params.Style := Params.Style or WS_CLIPCHILDREN; +end; + +destructor TSpTBXCustomDockablePanel.Destroy; +begin + FOptions.Free; + FToolbar.Free; + FToolbarDock.Free; + FPanel.Free; + + inherited; + + FreeAndNil(FDockForms); // After inherited, Notification accesses FDockForms +end; + +procedure TSpTBXCustomDockablePanel.Loaded; +var + I: Integer; + C: TControl; + DesignerRootItem: TTBCustomItem; +begin + inherited; + + // The parent of TTBControlItem.Control should be the toolbar, not Self + // (as setted in GetChildren for dfm streaming). + DesignerRootItem := GetItems; + for I := 0 to DesignerRootItem.Count - 1 do + if DesignerRootItem[I] is TTBControlItem then begin + C := TTBControlItem(DesignerRootItem[I]).Control; + if Assigned(C) and (C.Parent <> FToolbar) then + C.Parent := FToolbar; + end; +end; + +procedure TSpTBXCustomDockablePanel.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited; + if Operation = opRemove then + RemoveFromList(FDockForms, AComponent); +end; + +function TSpTBXCustomDockablePanel.Maximize: Boolean; +var + PrevState: TWindowState; +begin + Result := False; + if not Maximized then begin + // [DockablePanel-Rule] + // Do not maximize if it's the only DP on the dock + if Docked and (CurrentDock.ToolbarCount > 1) then begin + PrevState := FState.DockedState; + FIsManualSizing := True; + try + if InternalMaximize(False) then begin + Result := True; + FState.DockedState := wsMaximized; + FOptions.SetupButtonIcon(FOptions.MinimizeButton); + FOptions.SetupButtonIcon(FOptions.MaximizeButton); + end + else + FState.DockedState := PrevState; + finally + FIsManualSizing := False; + end; + end; + end; + + if Result then + DoWindowStateChanged(wsMaximized); +end; + +function TSpTBXCustomDockablePanel.Maximized: Boolean; +begin + if Floating then + Result := False + else + Result := FState.DockedState = wsMaximized; +end; + +function TSpTBXCustomDockablePanel.Minimize: Boolean; +var + CanMinimize: Boolean; + I, MinimizedCount: Integer; + L: TList; + MultiDock: TSpTBXCustomMultiDock; + RS: TSpTBXDPResizeType; +begin + Result := False; + if Floating then begin + if FState.DockedState <> wsMinimized then begin + FState.DockedState := wsMinimized; + FState.RestoreSize := Parent.Height; + Parent.ClientHeight := MinClientHeight; + FOptions.SetupButtonIcon(FOptions.MinimizeButton); + FOptions.SetupButtonIcon(FOptions.MaximizeButton); + Result := True; + end; + end + else + if Docked and (FState.DockedState <> wsMinimized) and (CurrentDock is TSpTBXCustomMultiDock) then begin + MultiDock := TSpTBXCustomMultiDock(CurrentDock); + L := TList.Create; + try + MultiDock.GetDockablePanelList(L); + // [DockablePanel-Rule] + // Only minimize if it's horizontal and is the only DP on the dock + // Or if it's vertical and it's not the only DP on the dock and the rest of the siblings are not minimized + MinimizedCount := 0; + if not MultiDock.IsVertical then + CanMinimize := L.Count = 1 + else begin + for I := 0 to L.Count - 1 do + if TSpTBXCustomDockablePanel(L[I]).FState.DockedState = wsMinimized then + Inc(MinimizedCount); + CanMinimize := (L.Count > 1) and (L.Count - 1 > MinimizedCount); + end; + + if CanMinimize then begin + FIsManualSizing := True; + try + if Height > MinClientHeight then + FState.RestoreSize := Height; + if Options.TaskPaneStyleResize then + RS := dprtMinimizeOrRestoreTaskPaneStyle + else + RS := dprtMinimizeOrRestore; + if SpDPResize(Self, MinClientHeight, RS) then begin + FState.DockedState := wsMinimized; + FOptions.SetupButtonIcon(FOptions.MinimizeButton); + FOptions.SetupButtonIcon(FOptions.MaximizeButton); + Result := True; + end; + finally + FIsManualSizing := False; + end; + end; + + finally + L.Free; + end; + end; + + if Result then + DoWindowStateChanged(wsMinimized); +end; + +function TSpTBXCustomDockablePanel.Minimized: Boolean; +begin + Result := FState.DockedState = wsMinimized; +end; + +procedure TSpTBXCustomDockablePanel.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + // Don't let the DP be dragged by the client area + // Override TTBCustomDockableWindow.MouseDown + if (Button <> mbLeft) or not IsMovable then + inherited + else + if Assigned(OnMouseDown) then OnMouseDown(Self, Button, Shift, X, Y); +end; + +procedure TSpTBXCustomDockablePanel.Resize; +var + TotalBorderSize: Integer; +begin + inherited; + + if Floating and Assigned(Parent) then begin + // When Floating the caption panel is always horizontal + // Make sure to calculate the floating form constraints taking into + // account the borders and the close button. + TotalBorderSize := GetFloatingBorderSize.Y * 2; + Parent.Constraints.MinWidth := 20 + TotalBorderSize; + Parent.Constraints.MinHeight := MinClientHeight + TotalBorderSize; + if (FState.DockedState = wsMinimized) and (Parent.ClientHeight > MinClientHeight) then begin + FState.DockedState := wsNormal; + FOptions.SetupButtonIcon(FOptions.MinimizeButton); + end; + end + else begin + if (FState.DockedState = wsMinimized) and (ClientHeight > MinClientHeight) then begin + FState.DockedState := wsNormal; + FOptions.SetupButtonIcon(FOptions.MinimizeButton); + end; + end; +end; + +function TSpTBXCustomDockablePanel.Restore: Boolean; +var + I: Integer; + DkPanel: TSpTBXCustomDockablePanel; + RS: TSpTBXDPResizeType; +begin + Result := False; + FIsManualSizing := True; + try + if Floating then begin + if FState.DockedState = wsMinimized then begin + FState.DockedState := wsNormal; + Parent.Height := FState.RestoreSize; + Result := True; + end; + end + else + if Docked then begin + case FState.DockedState of + wsNormal: ; + wsMinimized: + begin + if Options.TaskPaneStyleResize then + RS := dprtMinimizeOrRestoreTaskPaneStyle + else + RS := dprtMinimizeOrRestore; + Result := SpDPResize(Self, FState.RestoreSize, RS); + if Result then begin + FState.DockedState := wsNormal; + + // If a sibling was Maximized restore it + if Assigned(CurrentDock) then begin + for I := 0 to CurrentDock.ToolbarCount - 1 do + if (CurrentDock.Toolbars[I] <> Self) and (CurrentDock.Toolbars[I] is TSpTBXCustomDockablePanel) then begin + DkPanel := TSpTBXCustomDockablePanel(CurrentDock.Toolbars[I]); + if DkPanel.Maximized then begin + DkPanel.FState.DockedState := wsNormal; + DkPanel.Options.SetupButtonIcon(DkPanel.Options.MaximizeButton); + Break; + end; + end; + end; + end; + end; + wsMaximized: + begin + Result := InternalMaximize(True); + if Result then + FState.DockedState := wsNormal; + end; + end; + end; + + FOptions.SetupButtonIcon(FOptions.MinimizeButton); + FOptions.SetupButtonIcon(FOptions.MaximizeButton); + finally + FIsManualSizing := False; + end; + + if Result then + DoWindowStateChanged(wsNormal); +end; + +procedure TSpTBXCustomDockablePanel.AddDockForm(const Form: TTBCustomForm); +begin + if Assigned(Form) and AddToList(FDockForms, Form) then + Form.FreeNotification(Self); +end; + +procedure TSpTBXCustomDockablePanel.RemoveDockForm(const Form: TTBCustomForm); +begin + RemoveFromList(FDockForms, Form); +end; + +procedure TSpTBXCustomDockablePanel.BeginDockedMoving; + + function DockDPOnMultiDock(DockList: TList; CursorPos: TPoint): Boolean; + var + MultiDock: TSpTBXCustomMultiDock; + DP: TSpTBXCustomDockablePanel; + begin + Result := False; + MultiDock := SpPtInMultiDock(CursorPos, DockList); + if Assigned(MultiDock) then begin + Result := True; + MultiDock.DoRequestDock(MultiDock, Self, Result); + end; + + if Result then begin + // Dock the DP if the cursor is over a valid dock + DP := SpPtInDP(CursorPos, MultiDock, False); + if Assigned(DP) then begin + if MultiDock.IsVertical then + DockPos := DP.EffectiveDockPos + (DP.Height) div 2 + else + DockPos := DP.EffectiveDockPos + (DP.Width) div 2; + end; + CurrentDock := MultiDock; + end + end; + + procedure MouseMoved(DockList: TList; ClientClickPos: TPoint; + OldCursor: HCURSOR; PreventDocking: Boolean; var OldCursorPos: TPoint); + var + CursorPos, Delta: TPoint; + R, TitleBarR, FloatR1, FloatR2: TRect; + MultiDock: TSpTBXCustomMultiDock; + DP: TSpTBXCustomDockablePanel; + FloatingW: Integer; + begin + GetCursorPos(CursorPos); + if (CursorPos.X = OldCursorPos.X) and (CursorPos.Y = OldCursorPos.Y) then Exit; + + SetCursor(OldCursor); + + if Docked and (CurrentDock is TSpTBXCustomMultiDock) then begin + GetWindowRect(CurrentDock.Handle, R); + if PtInRect(R, CursorPos) then begin + MultiDock := TSpTBXCustomMultiDock(CurrentDock); + DP := SpPtInDP(CursorPos, MultiDock, True); + if Assigned(DP) then begin + // The cursor is over another dockable window, swap the pos + SpDPSwapPos(MultiDock, Self, DP); + end; + end + else begin + // Change the cursor if it can't float + if DockMode = dmCanFloat then begin + // The cursor is outside the Dock, make the DP float + // Position the DP at the center of the clicked point + if FFloatingClientWidth > 0 then + FloatingW := FFloatingClientWidth + else + FloatingW := ClientAreaWidth; + FloatingPosition := Point(CursorPos.X - (FloatingW div 2), CursorPos.Y - 10); + Floating := True; + MoveOnScreen(True); + end + else begin + SetCursor(LoadCursor(0, IDC_NO)); + if DockMode = dmCannotFloat then + // The DP can't float but can be re-docked on a different MultiDock + DockDPOnMultiDock(DockList, CursorPos); + end; + end; + OldCursorPos := CursorPos; + end + else + if Floating then + if DockMode <> dmCanFloat then + SetCursor(LoadCursor(0, IDC_NO)) + else begin + // Clip the point so it doesn't get dragged under the taskbar + R := GetRectOfMonitorContainingPoint(CursorPos, True); + if CursorPos.X < R.Left then CursorPos.X := R.Left; + if CursorPos.X > R.Right then CursorPos.X := R.Right; + if CursorPos.Y < R.Top then CursorPos.Y := R.Top; + if CursorPos.Y > R.Bottom then CursorPos.Y := R.Bottom; + + // Try to dock it on a MultiDock + if not PreventDocking and DockDPOnMultiDock(DockList, CursorPos) then + OldCursorPos := CursorPos + else begin + Delta := Point(CursorPos.X - OldCursorPos.X, CursorPos.Y - OldCursorPos.Y); + + // Make sure the TitleBar is still accessible if it's dragged almost + // completely off the screen so it can be dragged back. + GetWindowRect(FToolbar.Handle, TitleBarR); + OffsetRect(TitleBarR, Delta.X, Delta.Y); + with GetFloatingBorderSize do + InflateRect(TitleBarR, -X, -Y); + if TitleBarR.Right < R.Left then Delta.X := 0; + if TitleBarR.Left > R.Right then Delta.X := 0; + if TitleBarR.Bottom < R.Top then Delta.Y := 0; + if TitleBarR.Top > R.Bottom then Delta.Y := 0; + + // Move the floating DP + GetWindowRect(Parent.Handle, FloatR1); + FloatingPosition := Point(Parent.Left + Delta.X, Parent.Top + Delta.Y); + GetWindowRect(Parent.Handle, FloatR2); + + // Don't change OldCursorPos if the floating DP wasn't moved + if not EqualRect(FloatR1, FloatR2) then begin + if FloatR1.Left <> FloatR2.Left then + OldCursorPos.X := CursorPos.X; + if FloatR1.Top <> FloatR2.Top then + OldCursorPos.Y := CursorPos.Y; + end; + end; + end; + end; + +var + L: TList; + ClientClickPos, OldCursorPos: TPoint; + OldCursor: HCURSOR; + PreventDocking: Boolean; + Msg: TMsg; +begin + L := TList.Create; + FIsDockedMoving := True; + try + OldCursor := GetCursor; // Save the original mouse cursor + + SpDPGetDockableMultiDockList(Self, L); + + SetCapture(Handle); + GetCursorPos(OldCursorPos); + ClientClickPos := ScreenToClient(OldCursorPos); + PreventDocking := GetKeyState(VK_CONTROL) < 0; + + while GetCapture = Handle do begin + case Integer(GetMessage(Msg, 0, 0, 0)) of + -1: Break; // if GetMessage failed + 0: begin + // Repost WM_QUIT messages + PostQuitMessage(Msg.WParam); + Break; + end; + end; + case Msg.Message of + WM_KEYDOWN, WM_KEYUP: + if (Msg.wParam = VK_CONTROL) and (PreventDocking <> (Msg.Message = WM_KEYDOWN)) then begin + PreventDocking := Msg.Message = WM_KEYDOWN; + MouseMoved(L, ClientClickPos, OldCursor, PreventDocking, OldCursorPos); + end + else + if Msg.wParam = VK_ESCAPE then Break; + WM_MOUSEMOVE: + MouseMoved(L, ClientClickPos, OldCursor, PreventDocking, OldCursorPos); + WM_LBUTTONDOWN, WM_LBUTTONDBLCLK: + Break; + WM_LBUTTONUP: + Break; + WM_RBUTTONDOWN..WM_MBUTTONDBLCLK: ; + else + TranslateMessage(Msg); + DispatchMessage(Msg); + end; + end; + + finally + if GetCapture = Handle then + ReleaseCapture; + FIsDockedMoving := False; + L.Free; + end; +end; + +procedure TSpTBXCustomDockablePanel.BeginSplitResizing(HitTest: Integer); + + procedure MouseMoved(DP: TSpTBXCustomDockablePanel; VerticalSplitting: Boolean; var OldCursorPos: TPoint); + var + CursorPos: TPoint; + Delta: Integer; + begin + GetCursorPos(CursorPos); + if (CursorPos.X = OldCursorPos.X) and (CursorPos.Y = OldCursorPos.Y) then Exit; + + if VerticalSplitting then begin + Delta := CursorPos.Y - OldCursorPos.Y; + if Delta = 0 then Exit; + if not SpDPResize(DP, DP.Height + Delta, dprtSplitResize) then + Exit; // Exit if it couldn't be resized + end + else begin + Delta := CursorPos.X - OldCursorPos.X; + if Delta = 0 then Exit; + if not SpDPResize(DP, DP.Width + Delta, dprtSplitResize) then + Exit; // Exit if it couldn't be resized + end; + + OldCursorPos := CursorPos; + end; + +var + M: TSpTBXCustomMultiDock; + L: TList; + VerticalSplitting: Boolean; + DockIndex: Integer; + OldCursorPos: TPoint; + Msg: TMsg; + EffectivePanel: TSpTBXCustomDockablePanel; + Form: TCustomForm; +begin + if not (CurrentDock is TSpTBXCustomMultiDock) then Exit; + M := TSpTBXCustomMultiDock(CurrentDock); + + // Get the EffectivePanel + EffectivePanel := Self; + VerticalSplitting := False; + case HitTest of + HT_DP_SPLITRESIZELEFT, HT_DP_SPLITRESIZETOP: + begin + // If we are grabbing the left or top side of the DP the + // EffectivePanel should be the previous sibling + L := TList.Create; + try + M.GetDockablePanelDockIndex(L, Self, DockIndex); + if DockIndex > 0 then + EffectivePanel := TSpTBXCustomDockablePanel(L[DockIndex - 1]); + if HitTest = HT_DP_SPLITRESIZETOP then + VerticalSplitting := True; + finally + L.Free; + end; + end; + HT_DP_SPLITRESIZEBOTTOM: VerticalSplitting := True; + HT_DP_SPLITRESIZERIGHT: VerticalSplitting := False; + end; + + try + SetCapture(Handle); + GetCursorPos(OldCursorPos); + + while GetCapture = Handle do begin + case Integer(GetMessage(Msg, 0, 0, 0)) of + -1: Break; { if GetMessage failed } + 0: begin + { Repost WM_QUIT messages } + PostQuitMessage(Msg.WParam); + Break; + end; + end; + case Msg.Message of + WM_KEYDOWN, WM_KEYUP: + if Msg.WParam = VK_ESCAPE then Break; + WM_MOUSEMOVE: + MouseMoved(EffectivePanel, VerticalSplitting, OldCursorPos); + WM_LBUTTONDOWN, WM_LBUTTONDBLCLK: + Break; + WM_LBUTTONUP: + Break; + WM_RBUTTONDOWN..WM_MBUTTONDBLCLK: ; + else + TranslateMessage(Msg); + DispatchMessage(Msg); + end; + end; + + finally + if GetCapture = Handle then + ReleaseCapture; + if csDesigning in ComponentState then begin + Form := GetParentForm(Self); + if (Form <> nil) and (Form.Designer <> nil) then + Form.Designer.Modified; + end; + end; +end; + +function TSpTBXCustomDockablePanel.CanSplitResize(EdgePosition: TTBDockPosition): Boolean; +var + M: TSpTBXCustomMultiDock; + L: TList; +begin + Result := Docked and (CurrentDock is TSpTBXCustomMultiDock) and HandleAllocated; + + if not Result then Exit; + + M := TSpTBXCustomMultiDock(CurrentDock); + + L := TList.Create; + try + M.GetDockablePanelList(L); + + if M.IsVertical then begin + case EdgePosition of + dpTop: Result := EffectiveDockPos > 0; + dpBottom: Result := L.Last <> Self; + else + Result := False; + end; + end + else begin + case EdgePosition of + dpLeft: Result := EffectiveDockPos > 0; + dpRight: Result := L.Last <> Self; + else + Result := False; + end; + end; + finally + L.Free; + end; +end; + +procedure TSpTBXCustomDockablePanel.ConstrainedResize(var MinWidth, MinHeight, + MaxWidth, MaxHeight: Integer); +var + Sz: TPoint; + M: TSpTBXCustomMultiDock; +begin + Sz := CalcNCSizes; + + if MinClientWidth > 0 then MinWidth := MinClientWidth + Sz.X; + if MinClientHeight > 0 then MinHeight := MinClientHeight + Sz.Y; + if MaxClientWidth > 0 then MaxWidth := MaxClientWidth + Sz.X; + if MaxClientHeight > 0 then MaxHeight := MaxClientHeight + Sz.Y; + + // Disallow lateral Width change when the DP is docked + if Docked and (CurrentDock is TSpTBXCustomMultiDock) then begin + M := TSpTBXCustomMultiDock(CurrentDock); + if M.IsVertical then begin + if not M.UpdatingLateralSize then + MinWidth := Width; + if FFixedDockedSize and not FIsManualSizing and not (csDesigning in ComponentState) and not M.ReadingPositionData then begin + MinHeight := Height; + MaxHeight := Height; + end; + end + else begin + if not M.UpdatingLateralSize then + MinHeight := Height; + if FFixedDockedSize and not FIsManualSizing and not (csDesigning in ComponentState) and not M.ReadingPositionData then begin + MinWidth := Width; + MaxWidth := Width; + end; + end; + end; +end; + +procedure TSpTBXCustomDockablePanel.DockDrawBackground(Sender: TObject; + ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +var + DefaultPainting: Boolean; +begin + if PaintStage = pstPrePaint then begin + PaintDefault := False; + + if Docked and not Floating then begin + // When the DP is not floating draws the CaptionBar borders on the NC area + // of the DockablePanel, see InternalDrawBackground + // Just draw 1 pixel from the left and right, and 2 pixels from the top + // ARect.Bottom should remain the same + if IsVerticalTitleBar then begin + InflateRect(ARect, 0, 1); + ARect.Left := ARect.Left - DockedBorderSize; + end + else begin + InflateRect(ARect, 1, 0); + ARect.Top := ARect.Top - DockedBorderSize; + end; + end; + + DefaultPainting := True; + DoDrawCaptionPanel(ACanvas, ARect, pstPrePaint, DefaultPainting); + if DefaultPainting then + SpDrawXPDockablePanelTitleBar(ACanvas, ARect, True, IsVerticalTitleBar); + DefaultPainting := True; + DoDrawCaptionPanel(ACanvas, ARect, pstPostPaint, DefaultPainting); + end; +end; + +procedure TSpTBXCustomDockablePanel.ToolbarDrawBackground(Sender: TObject; + ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +begin + // Let the background be painted by the Dock + if PaintStage = pstPrePaint then + PaintDefault := False; +end; + +procedure TSpTBXCustomDockablePanel.DockRequestDock(Sender: TObject; + Bar: TTBCustomDockableWindow; var Accept: Boolean); +begin + Accept := False; + if Assigned(FToolbar) then + Accept := Bar = FToolbar; +end; + +procedure TSpTBXCustomDockablePanel.DockResize(Sender: TObject); +begin + if IsVerticalTitleBar then begin + // If the Panel is left/right aligned + if FPanel.Width <> FToolbarDock.Width then begin + FPanel.Width := FToolbarDock.Width; + if Floating and Assigned(Parent) then begin + Parent.Constraints.MinWidth := FPanel.Width + GetFloatingBorderSize.X * 2; + Parent.Constraints.MinHeight := 0; + end; + end; + MinClientHeight := 0; + if not Floating and not ShowCaptionWhenDocked then + MinClientWidth := 1 + else + MinClientWidth := FPanel.Width; + end + else begin + if FPanel.Height <> FToolbarDock.Height then begin + FPanel.Height := FToolbarDock.Height; + if Floating and Assigned(Parent) then begin + Parent.Constraints.MinWidth := 0; + Parent.Constraints.MinHeight := FPanel.Height + GetFloatingBorderSize.Y * 2; + end; + end; + MinClientWidth := 0; + if not Floating and not ShowCaptionWhenDocked then + MinClientHeight := 1 + else + MinClientHeight := FPanel.Height; + end; +end; + +procedure TSpTBXCustomDockablePanel.DoDrawCaptionPanel(ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawCaptionPanel) then FOnDrawCaptionPanel(Self, ACanvas, ARect, PaintStage, PaintDefault); +end; + +procedure TSpTBXCustomDockablePanel.DoWindowStateChanged(AWindowState: TWindowState); +begin + if Assigned(FOnWindowStateChanged) then FOnWindowStateChanged(Self, AWindowState); +end; + +function TSpTBXCustomDockablePanel.GetCaptionPanelSize: TPoint; +begin + Result := Point(FPanel.Width, FPanel.Height); +end; + +procedure TSpTBXCustomDockablePanel.GetChildren(Proc: TGetChildProc; + Root: TComponent); +var + I: Integer; + C: TControl; + DesignerRootItem: TTBCustomItem; +begin + // Needed to fake the DFM streaming system because the owner of the items + // is the Form and not the Toolbar nor Self. + // But the parent must be the Toolbar. + // GetChildren is used to pass the children components of Self to the DFM + // streaming system. + // We also need to do the same with the controls of TTBControlItems. + // More info on the Delphi help or Classes.TWriter.WriteData + // Same as TSpTBXCompoundItemsControl and TSpTBXCustomDockablePanel + + DesignerRootItem := GetItems; + TTBCustomItemAccess(DesignerRootItem).GetChildren(Proc, Root); + for I := 0 to DesignerRootItem.Count - 1 do + if (DesignerRootItem[I] is TTBControlItem) then begin + C := TTBControlItem(DesignerRootItem[I]).Control; + if Assigned(C) then + if SpFindControl(Self, C) = -1 then Proc(C); + end; + inherited; +end; + +function TSpTBXCustomDockablePanel.GetImages: TCustomImageList; +begin + if Assigned(FToolbar) then + Result := FToolbar.Images + else + Result := nil; +end; + +function TSpTBXCustomDockablePanel.GetItems: TTBCustomItem; +begin + // The ToolbarEditor designer will open the editable items and + // not the Toolbar.Items + Result := Options.EditableItems; +end; + +function TSpTBXCustomDockablePanel.GetRootItems: TTBRootItem; +begin + Result := FToolbar.Items; +end; + +function TSpTBXCustomDockablePanel.GetToolbar: TSpTBXToolbar; +begin + Result := FToolbar; +end; + +function TSpTBXCustomDockablePanel.GetView: TTBToolbarView; +begin + Result := FToolbar.View; +end; + +function TSpTBXCustomDockablePanel.GetEffectiveHeight: Integer; +begin + Result := Height; +end; + +function TSpTBXCustomDockablePanel.GetEffectiveWidth: Integer; +begin + Result := Width; +end; + +function TSpTBXCustomDockablePanel.GetFloatingClientHeight: Integer; +begin + if Docked then + Result := FFloatingClientHeight + else + Result := ClientAreaHeight; +end; + +function TSpTBXCustomDockablePanel.GetFloatingClientWidth: Integer; +begin + if Docked then + Result := FFloatingClientWidth + else + Result := ClientAreaWidth; +end; + +procedure TSpTBXCustomDockablePanel.InternalDrawBackground(ACanvas: TCanvas; + ARect: TRect; PaintOnNCArea, PaintBorders: Boolean); +var + DefaultPainting: Boolean; +begin + if Color = clNone then + SpDrawXPDockablePanelBody(ACanvas, ARect, True, Floating) + else begin + ACanvas.Brush.Color := Color; + ACanvas.FillRect(ARect); + end; + + if PaintOnNCArea and FPanel.Visible then begin + // Draw the CaptionBar borders on the NC Area of the embedded Dock + // See DockDrawBackground. + // Just draw 1 pixel from the left and right, and 2 pixels from the top + // ARect.Top should remain the same + if IsVerticalTitleBar then begin + ARect.Right := ARect.Left + CaptionPanelSize.X + 2; + InflateRect(ARect, 0, -(DockedBorderSize - 1)); + end + else begin + ARect.Bottom := ARect.Top + CaptionPanelSize.Y + 2; + InflateRect(ARect, -(DockedBorderSize - 1), 0); + end; + + DefaultPainting := True; + DoDrawCaptionPanel(ACanvas, ARect, pstPrePaint, DefaultPainting); + if DefaultPainting then + SpDrawXPDockablePanelTitleBar(ACanvas, ARect, True, IsVerticalTitleBar); + DefaultPainting := True; + DoDrawCaptionPanel(ACanvas, ARect, pstPostPaint, DefaultPainting); + end; +end; + +function TSpTBXCustomDockablePanel.InternalMaximize(Restore: Boolean): Boolean; +// Resize the dockable panel to the maximum size, and minimize the rest of +// the panels +// Horizontal resizing is not supported. +var + I: Integer; + L, PrevRestoreSize: TList; + DP: TSpTBXCustomDockablePanel; + MultiDock: TSpTBXCustomMultiDock; +begin + Result := False; + if not Docked or not (CurrentDock is TSpTBXCustomMultiDock) or (CurrentDock.Position in [dpTop, dpBottom]) then Exit; + MultiDock := TSpTBXCustomMultiDock(CurrentDock); + + L := TList.Create; + PrevRestoreSize := TList.Create; + try + MultiDock.GetDockablePanelList(L); + if L.Count < 2 then Exit; + + if Restore then begin + // Restore the minimized DPs, from down-to-top + for I := L.Count - 1 downto 0 do + if L[I] <> Self then begin + DP := TSpTBXCustomDockablePanel(L[I]); + if DP.Minimized then begin + DP.FIsManualSizing := True; + if SpDPResize(DP, DP.FState.RestoreSize, dprtMinimizeOrRestore) then + PrevRestoreSize.Add(DP); + DP.FIsManualSizing := False; + end; + end; + // Now set the DockedState + for I := 0 to PrevRestoreSize.Count - 1 do begin + DP := TSpTBXCustomDockablePanel(PrevRestoreSize[I]); + DP.FState.DockedState := wsNormal; + DP.Options.SetupButtonIcon(DP.Options.MinimizeButton); + DP.Options.SetupButtonIcon(DP.Options.MaximizeButton); + end; + end + else begin + // Remember the previous Height of the DPs + for I := 0 to L.Count - 1 do begin + DP := TSpTBXCustomDockablePanel(L[I]); + PrevRestoreSize.Add(Pointer(DP.Height)); + end; + // Minimize the DPs + for I := 0 to L.Count - 1 do + if L[I] <> Self then begin + DP := TSpTBXCustomDockablePanel(L[I]); + if not DP.Minimized then begin + if not DP.Maximized then begin + DP.FState.RestoreSize := Integer(PrevRestoreSize[I]); + end; + DP.FIsManualSizing := True; + SpDPResize(DP, DP.CaptionPanelSize.Y, dprtMinimizeOrRestore); + DP.FIsManualSizing := False; + DP.FState.DockedState := wsMinimized; + DP.Options.SetupButtonIcon(DP.Options.MinimizeButton); + DP.Options.SetupButtonIcon(DP.Options.MaximizeButton); + end; + end; + end; + + Result := True; + finally + L.Free; + PrevRestoreSize.Free; + end; +end; + +procedure TSpTBXCustomDockablePanel.InvalidateBackground(InvalidateChildren: Boolean); +begin + SpInvalidateSpTBXControl(Self, True, True); +end; + +function TSpTBXCustomDockablePanel.IsResizable: Boolean; +var + R: TRect; +begin + Result := False; + if FState.DockedState <> wsMinimized then begin + R := Rect(1, 1, 0, 0); + ConstrainedResize(R.Left, R.Top, R.Right, R.Bottom); + Result := (R.Top <> R.Bottom) and (R.Left <> R.Right); + end; +end; + +function TSpTBXCustomDockablePanel.IsVerticalTitleBar: Boolean; +begin + Result := FPanel.Align in [alLeft, alRight]; +end; + +procedure TSpTBXCustomDockablePanel.DoneReadingPositionData(const Data: TTBReadPositionData); +begin + inherited; + + // Special case when it's floating and minimized force the state + if Floating and (FLoadedState = wsMinimized) then begin + FState.DockedState := FLoadedState; + Parent.ClientHeight := FPanel.Height; + end; + + // Update buttons state + FOptions.SetupButtonIcon(FOptions.MinimizeButton); + FOptions.SetupButtonIcon(FOptions.MaximizeButton); +end; + +procedure TSpTBXCustomDockablePanel.ReadPositionData(const Data: TTBReadPositionData); +begin + inherited; + + // Load FLoadedBarSize and FLoadedDockPos + FLoadedBarSize.cx := ClientAreaWidth; + FLoadedBarSize.cy := ClientAreaHeight; + FLoadedDockPos := DockPos; + + // Load FloatingClientWidth/FloatingClientHeight, RestoreSize, State + with Data do begin + FFloatingClientWidth := ReadIntProc(Name, rvFloatingClientWidth, 0, ExtraData); + FFloatingClientHeight := ReadIntProc(Name, rvFloatingClientHeight, 0, ExtraData); + FState.RestoreSize := ReadIntProc(Name, rvRestoreSize, 0, ExtraData); + FState.DockedState := TWindowState(ReadIntProc(Name, rvState, 0, ExtraData)); + FLoadedState := FState.DockedState; + end; +end; + +procedure TSpTBXCustomDockablePanel.WritePositionData(const Data: TTBWritePositionData); +begin + inherited; + + // Save FloatingClientWidth/FloatingClientHeight, RestoreSize, State + with Data do begin + WriteIntProc(Name, rvFloatingClientWidth, FFloatingClientWidth, ExtraData); + WriteIntProc(Name, rvFloatingClientHeight, FFloatingClientHeight, ExtraData); + WriteIntProc(Name, rvRestoreSize, FState.RestoreSize, ExtraData); + WriteIntProc(Name, rvState, Integer(FState.DockedState), ExtraData); + end; +end; + +procedure TSpTBXCustomDockablePanel.SetDefaultDockedSize(Value: Integer); +begin + if FDefaultDockedSize <> Value then + FDefaultDockedSize := Value; +end; + +procedure TSpTBXCustomDockablePanel.SetEffectiveHeight(const Value: Integer); +begin + if Docked and IsVertical and (CurrentDock is TSpTBXCustomMultiDock) then + SpDPResize(Self, Value) + else + Height := Value; +end; + +procedure TSpTBXCustomDockablePanel.SetEffectiveWidth(const Value: Integer); +begin + if Docked and not IsVertical and (CurrentDock is TSpTBXCustomMultiDock) then + SpDPResize(Self, Value) + else + Width := Value; +end; + +procedure TSpTBXCustomDockablePanel.SetFloatingClientHeight(const Value: Integer); +begin + if Docked then + FFloatingClientHeight := Value + else + ClientAreaHeight := Value; +end; + +procedure TSpTBXCustomDockablePanel.SetFloatingClientWidth(const Value: Integer); +begin + if Docked then + FFloatingClientWidth := Value + else + ClientAreaWidth := Value; +end; + +procedure TSpTBXCustomDockablePanel.SetImages(const Value: TCustomImageList); +begin + if Assigned(FToolbar) then + FToolbar.Images := Value; +end; + +procedure TSpTBXCustomDockablePanel.SetParent(AParent: TWinControl); +var + ToDock, ToFloating, ToEmptyMultiDock, WasMinimized, DockingByCode: Boolean; + PrevSize: TSize; + D: TTBDock; +begin + if not (csDestroying in ComponentState) and Assigned(Parent) and Assigned(AParent) and (AParent <> Parent) then begin + ToDock := AParent is TTBDock; + ToFloating := AParent is TTBFloatingWindowParent; + ToEmptyMultiDock := False; + WasMinimized := Minimized; + DockingByCode := DockPos < 0; + + if ToDock then FPanel.Visible := FShowCaptionWhenDocked + else FPanel.Visible := FShowCaption; + + PrevSize.cx := ClientAreaWidth; + PrevSize.cy := ClientAreaHeight; + + if Floating then begin + FFloatingClientWidth := PrevSize.cx; + FFloatingClientHeight := PrevSize.cy; + end; + + if ToDock then begin + // [DockablePanel-Rule] + // When a floating DP is re-docked the DP width should be the same + // as the rest of the DPs that are present on the MultiDock. + // If the MultiDock is empty then the size should be DefaultDockedSize, + // and if DefaultDockedSize is 0 use the previous size. + D := TTBDock(AParent); + if D is TSpTBXCustomMultiDock then begin + ToEmptyMultiDock := D.ToolbarCount = 0; + if D.Position in [dpLeft, dpRight] then begin + if ToEmptyMultiDock then begin + if FDefaultDockedSize > 0 then EffectiveWidth := FDefaultDockedSize; + end + else begin + if not Docked then // If it's not docked compute the borders + EffectiveWidth := D.ClientWidth - (DockedBorderSize * 2) + else + EffectiveWidth := D.ClientWidth; + // Append the DP to the bottom if it's being docked by code + if DockingByCode then begin + DockPos := D.ClientHeight; + TSpTBXCustomMultiDock(D).UpdateDockablePanelsDockPos; + end; + end; + end + else begin + if ToEmptyMultiDock then begin + if FDefaultDockedSize > 0 then EffectiveHeight := FDefaultDockedSize; + end + else begin + if not Docked then // If it's not docked compute the borders + EffectiveHeight := D.ClientHeight - (DockedBorderSize * 2) + else + EffectiveHeight := D.ClientHeight; + // Append the DP to the bottom if it's being docked by code + if DockingByCode then begin + DockPos := D.ClientWidth; + TSpTBXCustomMultiDock(D).UpdateDockablePanelsDockPos; + end; + end; + end; + end; + end; + + inherited; + + if ToEmptyMultiDock then + TSpTBXMultiDock(AParent).InsertingOnEmptyDock // Re-align adjacent splitter + else + if ToDock and DockingByCode then begin + D := TTBDock(AParent); + if D is TSpTBXCustomMultiDock then + if D.Position in [dpLeft, dpRight] then + SpDPResize(Self, PrevSize.cy, dprtAppendResize) + else + SpDPResize(Self, PrevSize.cx, dprtAppendResize); + end + else + if ToFloating then begin + // [DockablePanel-Rule] + // Remember the previous floating size + if FFloatingClientWidth > 0 then + ClientAreaWidth := FFloatingClientWidth + else + ClientAreaWidth := PrevSize.cx; + if FFloatingClientHeight > 0 then + ClientAreaHeight := FFloatingClientHeight + else + // [DockablePanel-Rule] + // If the previous floating size is not valid and the DP was minimized + // when it was undocked then use the Restore size. + if WasMinimized then + ClientAreaHeight := FState.RestoreSize + else + ClientAreaHeight := PrevSize.cy; + + if Assigned(Parent) and (Parent is TSpTBXFloatingWindowParent) then begin + Parent.Constraints.MinHeight := FPanel.Height + GetFloatingBorderSize.Y * 2; + TSpTBXFloatingWindowParent(Parent).CloseOnAltF4 := True; + end; + end; + + UpdateTitleBarRotation; // Update the rotation of the titlebar + end + else + inherited; +end; + +procedure TSpTBXCustomDockablePanel.SetShowCaption(const Value: Boolean); +begin + if FShowCaption <> Value then begin + FShowCaption := Value; + if not Docked then begin + FPanel.Visible := Value; + RedrawWindow(Parent.Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_FRAME); + end; + end; +end; + +procedure TSpTBXCustomDockablePanel.SetShowCaptionWhenDocked(const Value: Boolean); +begin + if FShowCaptionWhenDocked <> Value then begin + FShowCaptionWhenDocked := Value; + if not Floating then begin + FPanel.Visible := Value; + DockResize(nil); // Resize and update MinClientWidth/Height + // The panel can't be hidden at designtime, move it outside the client area + if (csDesigning in ComponentState) then + if Value then + FPanel.Align := alTop + else begin + FPanel.Align := alNone; + FPanel.Top := FPanel.Top - FPanel.Height - 60; + end; + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_FRAME); + end; + end; +end; + +procedure TSpTBXCustomDockablePanel.SetShowVerticalCaption(const Value: Boolean); +begin + if FShowVerticalCaption <> Value then begin + FShowVerticalCaption := Value; + UpdateTitleBarRotation; + end; +end; + +function TSpTBXCustomDockablePanel.SizeToggle(ToMaximize: Boolean): Boolean; +begin + if (Minimized and not ToMaximize) or (Maximized and ToMaximize) then + Result := Restore + else + if ToMaximize then Result := Maximize + else Result := Minimize; +end; + +procedure TSpTBXCustomDockablePanel.UpdateTitleBarRotation; +begin + if not HandleAllocated then Exit; + + if FShowVerticalCaption and not (Floating or IsVertical) then begin + if not IsVerticalTitleBar then begin + // TTBDock doesn't allow us to change the position when there are + // docked toolbars, we have to undock the toolbar + FToolbar.Visible := False; + FToolbar.Floating := True; + FToolbarDock.Position := dpLeft; + FPanel.Align := alLeft; + FToolbar.CurrentDock := FToolbarDock; + FToolbar.Visible := True; + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_FRAME); + end; + end + else begin + if IsVerticalTitleBar then begin + // TTBDock doesn't allow us to change the position when there are + // docked toolbars, we have to undock the toolbar + FToolbar.Visible := False; + FToolbar.Floating := True; + FToolbarDock.Position := dpTop; + FPanel.Align := alTop; + FToolbar.CurrentDock := FToolbarDock; + FToolbar.Visible := True; + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_FRAME); + end; + end; + + // Update buttons glyphs + FOptions.SetupButtonIcon(FOptions.MinimizeButton); + FOptions.SetupButtonIcon(FOptions.MaximizeButton); +end; + +procedure TSpTBXCustomDockablePanel.ValidateContainer(AComponent: TComponent); +begin + inherited; + if (AComponent is TTBDock) and not (AComponent is TSpTBXCustomMultiDock) then + raise EInvalidOperation.CreateFmt('Cannot insert %s into %s. Place it on a MultiDock instead', [Self.ClassName, AComponent.ClassName]); +end; + +procedure TSpTBXCustomDockablePanel.CMTextChanged(var Message: TMessage); +begin + inherited; + if Assigned(FOptions) then + FOptions.CaptionLabel := Caption; +end; + +procedure TSpTBXCustomDockablePanel.WMNCCalcSize(var Message: TWMNCCalcSize); +begin + Message.Result := 0; + if Docked then + with Message.CalcSize_Params^ do + InflateRect(rgrc[0], -DockedBorderSize, -DockedBorderSize); +end; + +procedure TSpTBXCustomDockablePanel.WMNCHitTest(var Message: TWMNCHitTest); +var + P: TPoint; + R: TRect; +begin + inherited; + + if Docked then begin + P := SmallPointToPoint(Message.Pos); + GetWindowRect(Handle, R); + + if IsVertical then begin + if (P.Y >= R.Bottom - DockedBorderSize) and CanSplitResize(dpBottom) then + Message.Result := HT_DP_SPLITRESIZEBOTTOM + else if (P.Y <= R.Top + DockedBorderSize) and CanSplitResize(dpTop) then + Message.Result := HT_DP_SPLITRESIZETOP; + end + else begin + if (P.X >= R.Right - DockedBorderSize) and CanSplitResize(dpRight) then Message.Result := HT_DP_SPLITRESIZERIGHT + else if (P.X <= R.Left + DockedBorderSize) and CanSplitResize(dpLeft) then Message.Result := HT_DP_SPLITRESIZELEFT; + end; + end; +end; + +procedure TSpTBXCustomDockablePanel.WMNCLButtonDown(var Message: TWMNCLButtonDown); +var + OldCursor: HCURSOR; +begin + if Message.HitTest in [HT_DP_SPLITRESIZELEFT..HT_DP_SPLITRESIZEBOTTOM] then + BeginSplitResizing(Message.HitTest) + else + if (Message.HitTest = HT_TB2k_Border) and IsMovable then begin + FIsDockedMoving := True; + OldCursor := SetCursor(LoadCursor(0, IDC_SIZEALL)); + try + // To prevent resizing when clicking on the CaptionPanel: + // Instead of calling inherited call BeginDockedMoving + // that mimics TTBCustomDockableWindow.BeginMoving. + // The new method should only change position and change dock/floating + // it won't resize the DP. + BeginDockedMoving; + finally + SetCursor(OldCursor); + FIsDockedMoving := False; + end; + end + else + inherited; +end; + +procedure TSpTBXCustomDockablePanel.WMSetCursor(var Message: TWMSetCursor); +begin + if Docked and CurrentDock.AllowDrag and (Message.CursorWnd = WindowHandle) then begin + case Message.HitTest of + HT_DP_SPLITRESIZELEFT, HT_DP_SPLITRESIZERIGHT: + begin + SetCursor(LoadCursor(0, IDC_SIZEWE)); + Message.Result := 1; + Exit; + end; + HT_DP_SPLITRESIZETOP, HT_DP_SPLITRESIZEBOTTOM: + begin + SetCursor(LoadCursor(0, IDC_SIZENS)); + Message.Result := 1; + Exit; + end; + end; + end; + + inherited; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSplitter } + +constructor TSpTBXCustomSplitter.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + ControlStyle := ControlStyle + [csOpaque]; + + Width := 5; + Height := 100; + Align := alLeft; + Cursor := crSizeWE; + FResizeStyle := rsUpdate; + FOldSize := -1; + FMinSize := 0; + FGripSize := 50; + FGripHotTrack := True; + FAutoCalcMaxSize := True; + FSkinType := sknSkin; + FRestorePos := 60; + + SkinManager.AddSkinNotification(Self); +end; + +destructor TSpTBXCustomSplitter.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + FreeAndNil(FMouseBrush); + inherited Destroy; +end; + +procedure TSpTBXCustomSplitter.RequestAlign; +begin + inherited; + if Align in [alTop, alBottom] then Cursor:= crSizeNS + else Cursor:= crSizeWE; +end; + +function TSpTBXCustomSplitter.IsVertical: Boolean; +begin + Result := not (Align in [alTop, alBottom]); +end; + +function TSpTBXCustomSplitter.ValidateSplitControl: TControl; +// Find the control that the splitter must resize +var + P: TPoint; + I: Integer; + R: TRect; + C, ZeroSized: TControl; +begin + Result := nil; + ZeroSized := nil; + + P := Point(Left, Top); + case Align of + alLeft: Dec(P.X); + alRight: Inc(P.X, Width); + alTop: Dec(P.Y); + alBottom: Inc(P.Y, Height); + else + Exit; + end; + + // Try to find the Split Control + for I := 0 to Parent.ControlCount - 1 do begin + C := Parent.Controls[I]; + // Can't be a StatusBar, a Splitter or a regular Toolbar Dock + if C.Visible and (C.Align = Align) and + not ((C is TSpTBXCustomStatusBar) or (C is TCustomStatusBar)) and + not ((C is TSpTBXCustomSplitter) or (C is TSplitter)) and + not ((C is TTBDock) and not (C is TSpTBXCustomMultiDock)) then + begin + R := C.BoundsRect; + case Align of + alLeft, alRight: + if (R.Right - R.Left) = 0 then begin + if (R.Left = Left) or (R.Left = Left + Width) then + ZeroSized := C; + end; + alTop, alBottom: + if (R.Bottom - R.Top) = 0 then begin + if (R.Top = Top) or (R.Top = Top + Height) then + ZeroSized := C; + end; + end; + + if (Result = nil) and PtInRect(R, P) then + Result := C; + end; + end; + + // Zero sized control has the priority + if Assigned(ZeroSized) then + Result := ZeroSized; + + // Don't try to resize an empty MultiDock + if Assigned(Result) and (Result is TSpTBXCustomMultiDock) then + if TSpTBXCustomMultiDock(Result).ToolbarCount = 0 then begin + Result := nil; + Exit; + end; +end; + +procedure TSpTBXCustomSplitter.WMEraseBkgnd(var Message: TWmEraseBkgnd); +begin + Message.Result := 1; +end; + +procedure TSpTBXCustomSplitter.WMSpSkinChange(var Message: TMessage); +begin + Invalidate; +end; + +procedure TSpTBXCustomSplitter.MouseAllocateLineDC; +begin + FMouseLineDC := GetDCEx(Parent.Handle, 0, DCX_CACHE or DCX_CLIPSIBLINGS or DCX_LOCKWINDOWUPDATE); + if ResizeStyle = rsPattern then begin + if FMouseBrush = nil then begin + FMouseBrush := TBrush.Create; + FMouseBrush.Bitmap:= AllocPatternBitmap(clBlack,clWhite); + end; + FMousePrevBrush := SelectObject(FMouseLineDC, FMouseBrush.Handle); + end; +end; + +procedure TSpTBXCustomSplitter.MouseReleaseLineDC; +begin + if FMousePrevBrush <> 0 then SelectObject(FMouseLineDC, FMousePrevBrush); + ReleaseDC(Parent.Handle, FMouseLineDC); + if FMouseBrush <> nil then + FreeAndNil(FMouseBrush); +end; + +procedure TSpTBXCustomSplitter.MouseDrawLine; +var + P: TPoint; +begin + FMouseLineVisible := not FMouseLineVisible; + P := Point(Left, Top); + if IsVertical then + P.X := Left + FSplitLinePaintingPos + else + P.Y := Top + FSplitLinePaintingPos; + PatBlt(FMouseLineDC, P.X, P.Y, Width, Height, PATINVERT); +end; + +procedure TSpTBXCustomSplitter.MouseCalcSplitSize(X, Y: Integer; var NewSize, + Split: Integer); +var + I: Integer; +begin + if Assigned(FMouseSplitControl) then begin + if IsVertical then + Split := X - FMouseDownPos.X + else + Split := Y - FMouseDownPos.Y; + + I := 0; + case Align of + alLeft: I := FMouseSplitControl.Width + Split; + alRight: I := FMouseSplitControl.Width - Split; + alTop: I := FMouseSplitControl.Height + Split; + alBottom: I := FMouseSplitControl.Height - Split; + end; + + NewSize := I; + if I < FMinSize then + NewSize := FMinSize + else + if AutoCalcMaxSize and (I > FMaxSize) then + NewSize := FMaxSize; // Use the Maximum Size + + if I <> NewSize then begin + if Align in [alRight, alBottom] then + I := I - NewSize + else + I := NewSize - I; + Inc(Split, I); + end; + end; +end; + +procedure TSpTBXCustomSplitter.MouseStopSizing; +begin + if Assigned(FMouseSplitControl) then begin + if FMouseLineVisible then MouseDrawLine; + FMouseSplitControl := nil; + MouseReleaseLineDC; + if Assigned(FMouseActiveControl) then begin + TWinControlAccess(FMouseActiveControl).OnKeyDown := FOldKeyDown; + FMouseActiveControl := nil; + end; + end; + DoMoved; + FMoving:= False; +end; + +procedure TSpTBXCustomSplitter.MouseFocusKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + if Key = VK_ESCAPE then MouseStopSizing + else if Assigned(FOldKeyDown) then FOldKeyDown(Sender,Key,Shift); +end; + +procedure TSpTBXCustomSplitter.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +var + C: TControl; + F: TCustomForm; + P: TPoint; + I: Integer; +begin + inherited; + + if (Button = mbLeft) and not (ssDouble in Shift) then begin + C := ValidateSplitControl; + if C = nil then Exit; + + P := Point(X,Y); + if (FGripSize > 0) and PtInRect(GripRect, P) then + FMouseDownOnGrip := True; + + FMouseSplitControl := C; + FMouseDownPos := P; + + if AutoCalcMaxSize and Assigned(FMouseSplitControl) then begin + if Align in [alLeft, alRight] then begin + FMaxSize := Parent.ClientWidth - FMinSize - Width; + for I := 0 to Parent.ControlCount - 1 do + with Parent.Controls[I] do + if Visible and (Align in [alLeft, alRight]) then Dec(FMaxSize, Width); + Inc(FMaxSize, FMouseSplitControl.Width); + end + else begin + FMaxSize := Parent.ClientHeight - FMinSize - Height; + for I := 0 to Parent.ControlCount - 1 do + with Parent.Controls[I] do + if Visible and (Align in [alTop, alBottom]) then Dec(FMaxSize, Height); + Inc(FMaxSize, FMouseSplitControl.Height); + end; + end; + + MouseCalcSplitSize(X, Y, FNewSize, FSplitLinePaintingPos); + MouseAllocateLineDC; + FMousePrevSplitControlSize := FNewSize; + + // When the ESC key is pressed we must abort the moving with StopSizing, + // for that we must intercept the key event from the Active control. + F := ValidParentForm(Self); + if Assigned(F) then + if F.ActiveControl <> nil then begin + FMouseActiveControl := F.ActiveControl; + FOldKeyDown := TWinControlAccess(FMouseActiveControl).OnKeyDown; + TWinControlAccess(FMouseActiveControl).OnKeyDown := MouseFocusKeyDown; + end; + + if ResizeStyle in [rsLine, rsPattern] then MouseDrawLine; + end; +end; + +procedure TSpTBXCustomSplitter.MouseMove(Shift: TShiftState; X, Y: Integer); +var + I, Split: Integer; + GripR: TRect; + MouseInGrip: Boolean; +begin + inherited; + + if (ssLeft in Shift) and not (ssDouble in Shift) and Assigned(FMouseSplitControl) then begin + MouseCalcSplitSize(X, Y, I, Split); + if DoMoving(I) then begin + FMoving := True; + if ResizeStyle in [rsLine, rsPattern] then MouseDrawLine; + FNewSize := I; + FSplitLinePaintingPos := Split; + case ResizeStyle of + rsUpdate: UpdateControlSize(FMouseSplitControl); + rsLine, rsPattern: MouseDrawLine; + end; + end; + end; + + // Track the mouse to invalidate the Grip when the mouse enters or leaves the grip zone + if (FGripSize > 0) and not FMoving then begin + GripR := GripRect; + MouseInGrip := PtInRect(GripR, Point(X, Y)); + if (MouseInGrip <> FMouseOverGrip) then begin + FMouseOverGrip := MouseInGrip; + InvalidateGrip; + end; + end; +end; + +procedure TSpTBXCustomSplitter.MouseUp(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +var + P: TPoint; +begin + inherited; + + if (Button = mbLeft) and not (ssDouble in Shift) and Assigned(FMouseSplitControl) then begin + P := Point(X, Y); + if ResizeStyle in [rsLine, rsPattern] then MouseDrawLine; + UpdateControlSize(FMouseSplitControl); + // If the splitter was minimized then RestorePos should be the MouseDown point + if not FMouseDownOnGrip and FMoving and (FNewSize = 0) and (FMousePrevSplitControlSize <> 0) then + FRestorePos := FMousePrevSplitControlSize; + MouseStopSizing; + + if (FGripSize > 0) and FMouseDownOnGrip then begin + if (P.X = FMouseDownPos.X) and (P.Y = FMouseDownPos.Y) and PtInRect(GripRect, P) then + Toggle; + FMouseDownOnGrip := False; + FMouseOverGrip := False; + InvalidateGrip; + end; + end; +end; + +procedure TSpTBXCustomSplitter.Paint; +var + ClientR, R, DragHandleR: TRect; + C1, C2: TColor; + PaintDefault: Boolean; +begin + ClientR := ClientRect; + PaintDefault := True; + DoDrawBackground(Canvas, ClientR, pstPrePaint, PaintDefault); + if PaintDefault then begin + // Paint background + if SpTBXSkinType(SkinType) = sknSkin then + CurrentSkin.PaintBackground(Canvas, ClientR, skncSplitter, sknsNormal, True, False, IsVertical) + else begin + if Color = clNone then + Canvas.Brush.Color := clBtnFace + else + Canvas.Brush.Color := Color; + Canvas.FillRect(ClientR); + end; + + // Paint grip + R := GripRect; + DragHandleR := R; + if IsVertical then + InflateRect(DragHandleR, -1, -10) + else + InflateRect(DragHandleR, -10, -1); + + case SpTBXSkinType(SkinType) of + sknNone, sknWindows: + begin + C1 := clBtnShadow; + C2 := clWindow; + SpDrawXPGrip(Canvas, DragHandleR, C1, C2); + end; + sknSkin: + begin + if FMouseOverGrip then + CurrentSkin.PaintBackground(Canvas, R, skncButton, sknsNormal, True, True, False, [akLeft, akTop, akRight, akBottom]); + C1 := SkinManager.CurrentSkin.Options(skncToolbarGrip).Body.Color1; + C2 := SkinManager.CurrentSkin.Options(skncToolbarGrip).Body.Color2; + SpDrawXPGrip(Canvas, DragHandleR, C1, C2); + end; + end; + end; + + PaintDefault := True; + DoDrawBackground(Canvas, ClientR, pstPostPaint, PaintDefault); +end; + +procedure TSpTBXCustomSplitter.CMMouseleave(var Message: TMessage); +begin + inherited; + if FMouseOverGrip and not FMoving then begin + FMouseOverGrip := False; + InvalidateGrip; + end; +end; + +procedure TSpTBXCustomSplitter.ChangeSplitControlSize(NewControlSize: Integer); +var + C: TControl; +begin + if not (csDesigning in ComponentState) then begin + C := ValidateSplitControl; + if C = nil then Exit; + + if NewControlSize < FMinSize then + NewControlSize := FMinSize; + if DoMoving(NewControlSize) then begin + // If minimizing save restore position + if NewControlSize = FMinSize then begin + if IsVertical then FRestorePos := C.Width + else FRestorePos := C.Height; + end; + + FMoving := True; + FNewSize := NewControlSize; + UpdateControlSize(C); + end; + FMoving := False; + end; +end; + +function TSpTBXCustomSplitter.GetMinimized: Boolean; +var + I, MinW, MinH: Integer; + C: TControl; +begin + Result := False; + C := ValidateSplitControl; + if Assigned(C) then begin + MinW := C.Constraints.MinWidth; + MinH := C.Constraints.MinHeight; + + if FMinSize > MinW then + MinW := FMinSize; + if FMinSize > MinH then + MinH := FMinSize; + + if IsVertical then begin + I := C.Width; + Result := I <= MinW; + end + else begin + I := C.Height; + Result := I <= MinH; + end; + end; +end; + +procedure TSpTBXCustomSplitter.Minimize; +begin + ChangeSplitControlSize(0); +end; + +procedure TSpTBXCustomSplitter.Restore; +begin + if Minimized then + ChangeSplitControlSize(FRestorePos); +end; + +procedure TSpTBXCustomSplitter.Toggle; +begin + if Minimized then + Restore + else + Minimize; +end; + +procedure TSpTBXCustomSplitter.DoDrawBackground(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawBackground) then FOnDrawBackground(Self, ACanvas, ARect, PaintStage, PaintDefault); +end; + +procedure TSpTBXCustomSplitter.DoMoved; +begin + if Assigned(FOnMoved) then FOnMoved(Self); +end; + +function TSpTBXCustomSplitter.DoMoving(var NewSize: Integer): Boolean; +begin + Result := True; + if Assigned(FOnMoving) then FOnMoving(Self, NewSize, Result); + if Result and (NewSize < FMinSize) then NewSize := 0; +end; + +procedure TSpTBXCustomSplitter.SetMinSize(const Value: integer); +begin + if (Value <> FMinSize) and (Value >= 0) then FMinSize := Value; +end; + +procedure TSpTBXCustomSplitter.SetSkinType(const Value: TSpTBXSkinType); +begin + if Value <> FSkinType then begin + FSkinType := Value; + Invalidate; + end; +end; + +procedure TSpTBXCustomSplitter.UpdateControlSize(SplitControl: TControl); +begin + if (FOldSize <> FNewSize) and Assigned(SplitControl) then begin + case Align of + alLeft: + begin + SpFixDelphiAlignBug(SplitControl, FNewSize, Self); + FOldSize := SplitControl.Width; + end; + alTop: + begin + SpFixDelphiAlignBug(SplitControl, FNewSize, Self); + FOldSize := SplitControl.Height; + end; + alRight: + begin + SpFixDelphiAlignBug(SplitControl, FNewSize, Self); + FOldSize := SplitControl.Width; + end; + alBottom: + begin + SpFixDelphiAlignBug(SplitControl, FNewSize, Self); + FOldSize := SplitControl.Height; + end; + end; + Update; + DoMoved; + end; +end; + +function TSpTBXCustomSplitter.GetGripRect: TRect; +begin + Result := Rect(0, 0, 0, 0); + if FGripSize > 0 then + if IsVertical then + Result := Bounds(0, (Height - FGripSize) div 2, Width, FGripSize) + else + Result := Bounds((Width - FGripSize) div 2, 0, FGripSize, Height); +end; + +procedure TSpTBXCustomSplitter.SetGripSize(const Value: Integer); +begin + if FGripSize <> Value then begin + if Value < 0 then FGripSize := 0 + else FGripSize := Value; + InvalidateGrip; + end; +end; + +procedure TSpTBXCustomSplitter.InvalidateGrip; +begin + if FGripHotTrack then Invalidate; +end; + +end. diff --git a/internal/2.4.4/1/Source/SpTBXEditors.pas b/internal/2.4.4/1/Source/SpTBXEditors.pas new file mode 100644 index 0000000..e4acbb3 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXEditors.pas @@ -0,0 +1,3769 @@ +unit SpTBXEditors; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +Development notes: + - All the Windows and Delphi bugs fixes are marked with '[Bugfix]'. + - All the theme changes and adjustments are marked with '[Theme-Change]'. + +To Do: + - Rotated caption painting. + +Known Issues: + - + +History: +2 December 2009 - version 2.4.4 + - Fixed flicker on TSpTBXComboBox when changing the font, + thanks to Simon H. for reporting this. + +13 September 2009 - version 2.4.3 + - Fixed incorrect TSpTBXComboBox painting, when the Style + is set to csDropDownList and the control is disabled the + text is not painted with csGrayText. This is a VCL bug + the same happens with TComboBox when you set it to + csDropDownFixed (TSpTBXComboBox uses csDropDownFixed + instead of csDropDownList). + Thanks to Arvid for reporting this. + - Fixed incorrect TSpTBXSpinEdit behavior, when the focus + was changed the text wasn't validated, thanks to Stephan + for reporting this. + - Fixed incorrect caret positioning on TSpTBXSpinEdit when + using a Postfix, thanks to Eric Rappsilber for reporting + this. + +8 May 2009 - version 2.4.2 + - Added AutoDropDownWidth property to TSpTBXComboBox, use + this to automatically calculate the DropDown window + size. + - Changed params of OnDrawItem and OnDrawItemBackground events + from TSpTBXComboBox. + +15 March 2009 - version 2.4.1 + - Added HasEditButton public method to TSpTBXEdit. + - Added GetDropDownButtonRect public method to TSpTBXComboBox. + - Fixed TSpTBXEdit frame flicker, thanks to Marc Hoffmann for + reporting this. + - Fixed incorrect TSpTBXEdit frame painting when the edit was + placed on a Toolbar, thanks to Alfred Vink for reporting this. + - Fixed incorrect TSpTBXListBox painting when OnDrawItem event + was used, thanks to Evgeny Efimov for reporting this. + +17 January 2009 - version 2.4 + - Added AutoItemHeight property to TSpTBXComboBox, use this + to automatically calculate the ItemHeight property when the + Style is csDropDown, csDropDownList or csSimple. + +26 September 2008 - version 2.3 + - Added skinning support to TSpTBXComboBox items. + - Fixed incorrect TSpTBXEditItem OnChange event handling, + the event was only fired if the text property was changed, + thanks to Anta for reporting this. + - Added hack to automatically adjust the ItemHeight based on + the ComboBox font size. Delphi doesn't do this when the + ComboBox is owner drawed. + +29 July 2008 - version 2.2 + - Fixed incorrect TSpTBXEditItem size when the item is on + a menu, thanks to David for reporting it. + +26 June 2008 - version 2.1 + - Added EditImageIndex property to TSpTBXEditItem and + TSpTBXSpinEditItem, use this to show an icon image + on the left of the EditCaption when the item is on a menu. + +3 May 2008 - version 2.0 + - No changes. + +2 April 2008 - version 1.9.5 + - Added ExtendedAccept property to TSpTBXSpinEditor. + - Fixed incorrect TSpTBXSpinEditor.ValueInc/ValueDec behavior + when ValueSnap was true and Increment was a fraction, thanks + to John for reporting this. + +3 Febrary 2008 - version 1.9.4 + - Fixed incorrect TSpTBXSpinEditor.ValueInc/ValueDec behavior + when ValueSnap was true and Increment was higher than + 10000, thanks to Yucel for reporting this. + +19 January 2008 - version 1.9.3 + - Fixed incorrect TSpTBXComboBox painting on Windows Vista, + thanks to Santiago Vila for reporting this. + +26 December 2007 - version 1.9.2 + - Fixed incorrect TSpTBXSpinEdit font behavior, when the font + was changed at runtime the edit rect was not updated, thanks + to Beta Xiong for reporting this. + +1 December 2007 - version 1.9.1 + - Fixed incorrect TSpTBXEditButton painting, when the caption + was empty and DropDownMenu was assigned 2 arrows were painted + instead of 1, thanks to Costas Stergiou for reporting this. + +20 November 2007 - version 1.9 + - Removed TBX dependency. + +20 April 2007 - version 1.8.4 + - Added CustomWidth and CustomHeight properties to the toolbar + editor items. + - Fixed incorrect TSpTBXEditItem.StartEditing behavior, + thanks to Daniel Rikowski for reporting this. + +8 February 2007 - version 1.8.3 + - Fixed incorrect OnChange event handling in TSpTBXEditItem, + thanks to Daniel Rikowski for reporting this. + +17 December 2006 - version 1.8.2 + - Fixed a BDS 2006 bug related to Comboboxes, CM_MOUSEENTER and + CM_MOUSELEAVE are fired everytime the mouse is moved over the + internal edit control. In D7 these messages were only fired when + the mouse entered or leaved the combobox. + +24 November 2006 - version 1.8.1 + - Fixed incorrect TSpTBXSpinEdit behavior, the Value was not updated + when the control was unfocused, thanks to Steve and Sebastian for + reporting this. + +27 August 2006 - version 1.8 + - Improved editor's button painting. + +15 June 2006 - version 1.7 + - Fixed edit items incorrect painting, the items were not painted + using the color of FontSettings and EditorFontSettings properties, + the same happens with the TBX items. + +4 May 2006 - version 1.6 + - No changes. + +12 April 2006 - version 1.5 + - Added ValueType, ValueAsInteger, Decimals, Prefix and Postfix + properties to TSpTBXSpinEdit, thanks to Maxim Rylov for his + code donation. + - Fixed TSpTBXSpinEdit painting. + +27 February 2006 - version 1.4 + - New component added, TSpTBXSpinEdit: a SpinEdit control + that has TBX themes support. + - Fixed TSpTBXComboBoxItem bug, when AutoComplete is set to + false the ComboBox still autocompletes the text, thanks to + Erwin Denissen for reporting this. + - Fixed Delphi 2005/2006 bug, CM_MOUSEENTER and CM_MOUSELEAVE + are fired everytime the mouse enters the combobox internal + edit control. In prior versions of Delphi these messages + were only fired when the mouse entered or leaved the combobox, + including the internal edit control. + +10 February 2006 - version 1.3 + - New component added, TSpTBXButtonEdit: an Edit control that + has a multipurpose button attached. + - Added new public method, AddEditButton, to TSpTBXEdit. + +28 December 2005 - version 1.2 + - No changes. + +18 October 2005 - version 1.1 + - New component added, TSpTBXListBox: a ListBox + with Unicode and TBX themes support that paints + a hottrack border and TBX theme style selection. + - New component added, TSpTBXCheckListBox: a CheckListBox + with Unicode and TBX themes support that paints + a hottrack border and TBX theme style selection. + - Fixed TSpTBXComboBoxItem dynamic creation problem. + +18 August 2005 - version 1.0 + - No changes. + +10 June 2005 - version 0.9 + - SpTBXLib may now alternatively, at your option, be used and/or + distributed under the terms of the SpTBXLib License. + Please see the updated LICENSE.TXT file for more information. + +20 May 2005 - version 0.8 + - Fixed TSpTBXDropDownItem and TSpTBXComboBoxItem bugs, the popup list + should be closed when F4 is pressed, thanks to Rune Moberg for + reporting this. + - Fixed TSpTBXComboBoxItem bug, the ComboBox didn't check the ItemIndex + bounds when pressing Up or Down keys, thanks to Rune Moberg for + reporting this. + - Fixed AV when trying to dock a toolbar with a TSpTBXComboBoxItem + on a vertical dock, thanks to Pavel for reporting this. + +16 February 2005 - version 0.7 + - Fixed unicode support in W9x, thanks to Daniel Rikowski for + reporting this. + - Fixed editors bug, the editors autocomplete was case sensitive, + this is a TBX bug but it was fixed without patching the source, + thanks to Daniel Rikowski for reporting this. + - Fixed TSpTBXComboBox painting bug, the edit frame was not + correctly highlighted when using the Default theme. + - Added HotTrack property to TSpTBXEdit and TSpTBXComboBox, when + setted to true a TBX style frame will be painted when the mouse + is over the control. + - Added OnDrawBackground event to TSpTBXEdit and TSpTBXComboBox. + +23 December 2004 - version 0.6 + - Initial release. + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation + +uses + Windows, Messages, Classes, SysUtils, Controls, Graphics, ImgList, Forms, + Menus, StdCtrls, ExtCtrls, ActnList, CheckLst, + {$IFNDEF UNICODE} + TntClasses, TntControls, TntStdCtrls, TntCheckLst, TntSysUtils, + {$ENDIF} + TB2Toolbar, TB2Item, TB2ExtItems, + SpTBXSkins, SpTBXItem, SpTBXControls; + +{$IFDEF UNICODE} +type + TTntComboBox = TComboBox; + TTntListBox = TListBox; + TTntCheckListBox = TCheckListBox; +{$ENDIF} + +const + CM_SPFONTCHANGED = CM_BASE + 2221; // Message sent to the control when the font is changed + + { Change reasons for EditItem.Text property } + tcrSetProperty = 0; // direct assignment to Text property + tcrActionLink = 1; // change comes from an action link + tcrEditControl = 2; // change is caused by typing in edit area + +type + TSpTBXSpinType = ( + spnInteger, + spnFloat, + spnHex + ); + + TSpTBXEditItemViewer = class; + TSpTBXSpinEditViewer = class; + + TSpTBXEditChangeEvent = procedure(Sender: TObject; const AText: WideString) of object; + TSpTBXEditAcceptTextEvent = procedure(Sender: TObject; var NewText: WideString; var Accept: Boolean) of object; + TSpTBXEditGetTextEvent = procedure(Sender: TObject; var AText: WideString) of object; + TSpTBXBeginEditEvent = procedure(Sender: TObject; Viewer: TSpTBXEditItemViewer; EditControl: TCustomEdit) of object; + TSpTBXEditMessageEvent = procedure(Sender: TObject; Viewer: TSpTBXEditItemViewer; var Message: TMessage; var Handled: Boolean) of object; + TSpTBXDrawListItemEvent = procedure(Sender: TObject; ACanvas: TCanvas; var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean) of object; + + { TSpTBXEditButton } + + TSpTBXEditButton = class(TSpTBXSpeedButton) + protected + procedure AdjustFont(AFont: TFont); override; + function DoDrawDropDownArrow(ACanvas: TCanvas; ARect: TRect): Boolean; override; + function DoDrawItem(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage): Boolean; override; + function GetFrameHotTrack: Boolean; + public + constructor Create(AOwner: TComponent); override; + procedure Click; override; + end; + + { TSpTBXSpinButton } + + TSpTBXSpinButton = class(TSpTBXEditButton) + private + FUpPushed: Boolean; + FDownPushed: Boolean; + FOnUpClick: TNotifyEvent; + FOnDownClick: TNotifyEvent; + protected + function DoDrawItem(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage): Boolean; override; + procedure DoMouseLeave; override; + procedure MouseMove(Shift: TShiftState; X: Integer; Y: Integer); override; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); override; + property OnUpClick: TNotifyEvent read FOnUpClick write FOnUpClick; + property OnDownClick: TNotifyEvent read FOnDownClick write FOnDownClick; + public + constructor Create(AOwner: TComponent); override; + procedure Click; override; + procedure IsHotTracking(out UpButton, DownButton, EditFrame: Boolean); + published + property Repeating default True; + end; + + { TSpTBXUnicodeAdaptEdit } + + // Do not inherit from TTNTEdit, TBEditItemViewer.GetEditControlClass needs a TEditClass + {$IFNDEF UNICODE} + TSpTBXUnicodeAdaptEdit = class(TEdit) + private + FPasswordChar: WideChar; + procedure SetSelText(const Value: WideString); + function GetText: WideString; + procedure SetText(const Value: WideString); + function GetHint: WideString; + procedure SetHint(const Value: WideString); + function IsHintStored: Boolean; + function GetPasswordChar: WideChar; + procedure SetPasswordChar(const Value: WideChar); + protected + procedure CreateWindowHandle(const Params: TCreateParams); override; + procedure CreateWnd; override; + procedure DefineProperties(Filer: TFiler); override; + function GetActionLinkClass: TControlActionLinkClass; override; + procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override; + function GetSelStart: Integer; reintroduce; virtual; + procedure SetSelStart(const Value: Integer); reintroduce; virtual; + function GetSelLength: Integer; reintroduce; virtual; + procedure SetSelLength(const Value: Integer); reintroduce; virtual; + function GetSelText: WideString; reintroduce; virtual; + public + property SelText: WideString read GetSelText write SetSelText; + property SelStart: Integer read GetSelStart write SetSelStart; + property SelLength: Integer read GetSelLength write SetSelLength; + published + // Don't let the streaming system store the WideStrings, use DefineProperties instead + property Text: WideString read GetText write SetText; + property Hint: WideString read GetHint write SetHint stored IsHintStored; + property PasswordChar: WideChar read GetPasswordChar write SetPasswordChar default #0; + end; + {$ELSE} + TSpTBXUnicodeAdaptEdit = class(TEdit); + {$ENDIF} + + { TSpTBXUnicodeEdit } + + TSpTBXUnicodeEdit = class(TSpTBXUnicodeAdaptEdit) + private + FAlignment: TAlignment; + procedure SetAlignment(Value: TAlignment); + procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; + procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; + protected + procedure CreateWnd; override; + procedure CreateParams(var Params: TCreateParams); override; + procedure UpdateEditRect; virtual; + public + function AddEditButton(RightAligned: Boolean = True; AWidth: Integer = -1): TSpTBXEditButton; + function HasEditButton: Boolean; + published + property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify; + end; + + { TSpTBXEdit } + + TSpTBXEdit = class(TSpTBXUnicodeEdit) + private + FBorderStyle: TBorderStyle; + FHotTrack: Boolean; + FSkinType: TSpTBXSkinType; + FMouseInControl: Boolean; + procedure SetBorderStyle(const Value: TBorderStyle); + procedure SetSkinType(const Value: TSpTBXSkinType); + procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; + procedure CMEnter(var Message: TCMEnter); message CM_ENTER; + procedure CMExit(var Message: TCMExit); message CM_EXIT; + procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; + procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; + procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure InvalidateFrame; + property MouseInControl: Boolean read FMouseInControl; + published + property BorderStyle: TBorderStyle read FBorderStyle write SetBorderStyle default bsSingle; // Hides the inherited BorderStyle + property HotTrack: Boolean read FHotTrack write FHotTrack default True; + property SkinType: TSpTBXSkinType read FSkinType write SetSkinType default sknSkin; + end; + + { TSpTBXButtonEdit } + + TSpTBXCustomButtonEdit = class(TSpTBXEdit) + private + FEditButton: TSpTBXEditButton; + protected + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure SetName(const Value: TComponentName); override; + property EditButton: TSpTBXEditButton read FEditButton; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + TSpTBXButtonEdit = class(TSpTBXCustomButtonEdit) + published + property EditButton; + end; + + { TSpTBXSpinEdit } + + TSpTBXSpinEditOptions = class(TPersistent) + private + FDecimal: Integer; + FIncrement: Extended; + FMinValue: Extended; + FMaxValue: Extended; + FValue: Extended; + FValueSnap: Boolean; + FValueType: TSpTBXSpinType; + FPrefix: WideString; + FPostfix: WideString; + FOnGetText: TSpTBXEditAcceptTextEvent; + FOnSetText: TSpTBXEditChangeEvent; + FOnValueChanged: TNotifyEvent; + function IsIncrementStored: Boolean; + function IsMaxValueStored: Boolean; + function IsMinValueStored: Boolean; + function IsValueStored: Boolean; + procedure SetDecimal(NewDecimal: Integer); + procedure SetMaxValue(const NewValue: Extended); + procedure SetMinValue(const NewValue: Extended); + procedure SetValue(const NewValue: Extended); + procedure SetValueType(NewType: TSpTBXSpinType); + procedure SetPostfix(const ValueString: WideString); + procedure SetPrefix(const ValueString: WideString); + function GetValueAsInteger: Int64; + procedure SetValueAsInteger(const NewValue: Int64); + protected + procedure DoValueChanged; virtual; + procedure UpdateTextFromValue; + procedure UpdateValueFromText(RevertWhenInvalid: Boolean = True); + property OnGetText: TSpTBXEditAcceptTextEvent read FOnGetText write FOnGetText; + property OnSetText: TSpTBXEditChangeEvent read FOnSetText write FOnSetText; + property OnValueChanged: TNotifyEvent read FOnValueChanged write FOnValueChanged; + public + constructor Create; virtual; + procedure ValueInc; + procedure ValueDec; + property ValueAsInteger: Int64 read GetValueAsInteger write SetValueAsInteger; + published + property Decimal: Integer read FDecimal write SetDecimal default 2; + property Increment: Extended read FIncrement write FIncrement stored IsIncrementStored; + property MaxValue: Extended read FMaxValue write SetMaxValue stored IsMaxValueStored; + property MinValue: Extended read FMinValue write SetMinValue stored IsMinValueStored; + property Postfix: WideString read FPostfix write SetPostfix; + property Prefix: WideString read FPrefix write SetPrefix; + property Value: Extended read FValue write SetValue stored IsValueStored; + property ValueSnap: Boolean read FValueSnap write FValueSnap default True; + property ValueType: TSpTBXSpinType read FValueType write SetValueType default spnInteger; + end; + + TSpTBXSpinEdit = class(TSpTBXEdit) + private + FExtendedAccept: Boolean; + FSpinButton: TSpTBXSpinButton; + FSpinOptions: TSpTBXSpinEditOptions; + procedure SpinOptionsGetText(Sender: TObject; var NewText: WideString; var Accept: Boolean); + procedure SpinOptionsSetText(Sender: TObject; const AText: WideString); + function GetValue: Extended; + function GetValueChanged: TNotifyEvent; + procedure SetValue(const Value: Extended); + procedure SetValueChanged(const ValueChangedEvent: TNotifyEvent); + procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; + protected + procedure Change; override; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + procedure KeyPress(var Key: Char); override; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure UpClick(Sender: TObject); virtual; + procedure DownClick(Sender: TObject); virtual; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + property Alignment default taRightJustify; + property ExtendedAccept: Boolean read FExtendedAccept write FExtendedAccept default False; + property Text stored False; + property SpinButton: TSpTBXSpinButton read FSpinButton; + property SpinOptions: TSpTBXSpinEditOptions read FSpinOptions write FSpinOptions; + property Value: Extended read GetValue write SetValue stored False; + property OnValueChanged: TNotifyEvent read GetValueChanged write SetValueChanged; + end; + + { TSpTBXComboBox } + + TSpTBXComboBox = class(TTntComboBox) + private + FAutoDropDownWidth: Boolean; + FAutoItemHeight: Boolean; + FFontChanging: Boolean; + FHotTrack: Boolean; + FInternalItemHeight: Integer; + FMouseInControl: Boolean; + FMouseInDropDownButton: Boolean; + FMouseTimer: TTimer; + FSkinType: TSpTBXSkinType; + FOnDrawBackground: TSpTBXDrawEvent; + FOnDrawItem: TSpTBXDrawListItemEvent; + FOnDrawItemBackground: TSpTBXDrawListItemEvent; + procedure MouseTimerHandler(Sender: TObject); + procedure SetSkinType(const Value: TSpTBXSkinType); + procedure UpdateDropDownButton; + procedure CMEnter(var Message: TCMEnter); message CM_ENTER; + procedure CMExit(var Message: TCMExit); message CM_EXIT; + procedure CNMeasureItem(var Message: TWMMeasureItem); message CN_MEASUREITEM; + procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; + procedure CMSPFontChanged(var Message: TMessage); message CM_SPFONTCHANGED; + procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM; + procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE; + procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; + procedure WMPaint(var Message: TWMPaint); message WM_PAINT; + procedure WMSetFont(var Message: TWMSetFont); message WM_SETFONT; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + protected + FAutoDropDownWidthRightMargin: Integer; + procedure CreateParams(var Params: TCreateParams); override; + procedure CreateWnd; override; + procedure CloseUp; override; + procedure DoCalcMaxDropDownWidth; virtual; + procedure DoDrawBackground(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure DoDrawItem(ACanvas: TCanvas; var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure DoDrawItemBackground(ACanvas: TCanvas; var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; + procedure DrawItemBackground(Index: Integer; Rect: TRect; State: TOwnerDrawState); virtual; + {$IF CompilerVersion > 17} + procedure EditWndProc(var Message: TMessage); override; + {$IFEND} + function GetItemHt: Integer; override; + procedure SetItemHeight(Value: Integer); override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function GetDropDownButtonRect: TRect; + function GetMouseInDropDownButton: Boolean; + procedure InvalidateFrame; + property MouseInControl: Boolean read FMouseInControl; + published + property AutoDropDownWidth: Boolean read FAutoDropDownWidth write FAutoDropDownWidth default False; + property AutoItemHeight: Boolean read FAutoItemHeight write FAutoItemHeight default True; + property HotTrack: Boolean read FHotTrack write FHotTrack default True; + property SkinType: TSpTBXSkinType read FSkinType write SetSkinType default sknSkin; + property OnDrawBackground: TSpTBXDrawEvent read FOnDrawBackground write FOnDrawBackground; + property OnDrawItem: TSpTBXDrawListItemEvent read FOnDrawItem write FOnDrawItem; // Hides the inherited OnDrawItem + property OnDrawItemBackground: TSpTBXDrawListItemEvent read FOnDrawItemBackground write FOnDrawItemBackground; + property OnMouseMove; + end; + + { TSpTBXListBox } + + TSpTBXListBox = class(TTntListBox) + private + FHotTracking: Boolean; + FHotTrack: Boolean; + FSkinType: TSpTBXSkinType; + FChildFocused: Boolean; + FOnDrawItem: TSpTBXDrawListItemEvent; + FOnDrawItemBackground: TSpTBXDrawListItemEvent; + procedure SetHotTrack(const Value: Boolean); + procedure SetSkinType(const Value: TSpTBXSkinType); + procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; + procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; + procedure CMFocusChanged(var Message: TCMFocusChanged); message CM_FOCUSCHANGED; + procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM; + procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + protected + procedure CreateParams(var Params: TCreateParams); override; + procedure DoDrawItem(ACanvas: TCanvas; var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure DoDrawItemBackground(ACanvas: TCanvas; var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; + procedure DrawItemBackground(Index: Integer; Rect: TRect; State: TOwnerDrawState); virtual; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure InvalidateBorders; + property HotTracking: Boolean read FHotTracking; + published + property Style default lbOwnerDrawFixed; + property HotTrack: Boolean read FHotTrack write SetHotTrack default True; + property SkinType: TSpTBXSkinType read FSkinType write SetSkinType default sknSkin; + property OnDrawItem: TSpTBXDrawListItemEvent read FOnDrawItem write FOnDrawItem; // Hides the inherited OnDrawItem + property OnDrawItemBackground: TSpTBXDrawListItemEvent read FOnDrawItemBackground write FOnDrawItemBackground; + end; + + { TSpTBXCheckListBox } + + TSpTBXCheckListBox = class(TTntCheckListBox) + private + FHotTracking: Boolean; + FHotTrack: Boolean; + FSkinType: TSpTBXSkinType; + FChildFocused: Boolean; + FOnDrawItem: TSpTBXDrawListItemEvent; + FOnDrawItemBackground: TSpTBXDrawListItemEvent; + procedure SetHotTrack(const Value: Boolean); + procedure SetSkinType(const Value: TSpTBXSkinType); + procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; + procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; + procedure CMFocusChanged(var Message: TCMFocusChanged); message CM_FOCUSCHANGED; + procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM; + procedure WMNCPaint(var Message: TWMNCPaint); message WM_NCPAINT; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + protected + procedure DoDrawItem(ACanvas: TCanvas; var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure DoDrawItemBackground(ACanvas: TCanvas; var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override; + procedure DrawItemBackground(Index: Integer; Rect: TRect; State: TOwnerDrawState); virtual; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure InvalidateBorders; + property HotTracking: Boolean read FHotTracking; + published + property Style default lbOwnerDrawFixed; + property HotTrack: Boolean read FHotTrack write SetHotTrack default True; + property SkinType: TSpTBXSkinType read FSkinType write SetSkinType default sknSkin; + property OnDrawItem: TSpTBXDrawListItemEvent read FOnDrawItem write FOnDrawItem; + property OnDrawItemBackground: TSpTBXDrawListItemEvent read FOnDrawItemBackground write FOnDrawItemBackground; + end; + + { TSpTBXEditItem } + + TSpTBXEditItem = class(TSpTBXCustomItem) + private + FEditCaption: WideString; + FEditImageIndex: TImageIndex; + FText: WideString; + FAllowVerticalEditor: Boolean; + FCharCase: TEditCharCase; + FEditorFontSettings: TSpTBXFontSettings; + FExtendedAccept: Boolean; + FFontSettings: TSpTBXFontSettings; + FMaxLength: Integer; + FPasswordChar: WideChar; + FReadOnly: Boolean; + FShowImage: Boolean; + FOnAcceptText: TSpTBXEditAcceptTextEvent; + FOnBeginEdit: TSpTBXBeginEditEvent; + FOnChange: TSpTBXEditChangeEvent; + FOnEditMessage: TSpTBXEditMessageEvent; + procedure FontSettingsChanged(Sender: TObject); + procedure SetAllowVerticalEditor(const Value: Boolean); + procedure SetCharCase(Value: TEditCharCase); + procedure SetEditCaption(const Value: WideString); + procedure SetEditorFontSettings(const Value: TSpTBXFontSettings); + procedure SetMaxLength(Value: Integer); + procedure SetPasswordChar(Value: WideChar); + procedure SetShowImage(const Value: Boolean); + procedure SetText(Value: WideString); + protected + function DoAcceptText(var NewText: WideString): Boolean; virtual; + function DoAutoComplete(var AText: WideString): Boolean; virtual; + procedure DoBeginEdit(Viewer: TSpTBXEditItemViewer); virtual; + procedure DoChange(const AText: WideString); virtual; + procedure DoTextChanging(const OldText: WideString; var NewText: WideString; Reason: Integer); virtual; + function GetItemViewerClass(AView: TTBView): TTBItemViewerClass; override; + function NeedToRecreateViewer(AViewer: TTBItemViewer): Boolean; override; + procedure SetTextEx(Value: WideString; Reason: Integer); virtual; + public + function StartEditing(AView: TTBView): Boolean; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + // TSpTBXCustomItem properties + property Action; + property Alignment default taLeftJustify; + property Caption; + property CustomWidth default 64; + property CustomHeight; + property DisplayMode; + property Enabled; + property FontSettings; + property GroupIndex; + property HelpContext; + property Hint; + property ImageIndex; + property Images; + property ShortCut; + property Visible; + property OnClick; + property OnDrawCaption; + property OnDrawHint; + property OnDrawImage; + property OnDrawItem; + property OnSelect; + + // Don't let the streaming system store the WideStrings, use DefineProperties instead + property EditCaption: WideString read FEditCaption write SetEditCaption; // Hides the inherited EditCaption + property EditImageIndex: TImageIndex read FEditImageIndex write FEditImageIndex default -1; + property Text: WideString read FText write SetText; // Hides the inherited Text + property AllowVerticalEditor: Boolean read FAllowVerticalEditor write SetAllowVerticalEditor default False; + property CharCase: TEditCharCase read FCharCase write SetCharCase default ecNormal; + property EditorFontSettings: TSpTBXFontSettings read FEditorFontSettings write SetEditorFontSettings; + property ExtendedAccept: Boolean read FExtendedAccept write FExtendedAccept default False; + property MaxLength: Integer read FMaxLength write SetMaxLength default 0; + property PasswordChar: WideChar read FPasswordChar write SetPasswordChar default #0; + property ReadOnly: Boolean read FReadOnly write FReadOnly default False; + property ShowImage: Boolean read FShowImage write SetShowImage default False; + property OnAcceptText: TSpTBXEditAcceptTextEvent read FOnAcceptText write FOnAcceptText; // Hides the inherited OnAcceptText + property OnBeginEdit: TSpTBXBeginEditEvent read FOnBeginEdit write FOnBeginEdit; + property OnChange: TSpTBXEditChangeEvent read FOnChange write FOnChange; + property OnEditMessage: TSpTBXEditMessageEvent read FOnEditMessage write FOnEditMessage; + end; + + TEditClass = class of TCustomEdit; + + TSpTBXEditItemViewer = class(TSpTBXItemViewer) + private + function EditLoop(const CapHandle: HWND): Boolean; + procedure EditWndProc(var Message: TMessage); + function GetEditControlText: WideString; + procedure GetEditHeight(const DC: HDC; out EditHeight, ExternalLeading: Integer); + function GetItem: TSpTBXEditItem; + procedure MouseBeginEdit; + function MeasureEditCaption: TSize; + function MeasureTextHeight: Integer; + protected + FEditControl: TCustomEdit; + FEditControlStatus: set of (ecsContinueLoop, ecsAccept, ecsClose); + procedure CalcSize(const Canvas: TCanvas; var AWidth, AHeight: Integer); override; + function CaptionShown: Boolean; override; + procedure DoBeginEdit; virtual; + function DoExecute: Boolean; override; + function HandleEditMessage(var Message: TMessage): Boolean; virtual; + function GetAccRole: Integer; override; + function GetAccValue(var Value: WideString): Boolean; override; + procedure GetCursor(const Pt: TPoint; var ACursor: HCURSOR); override; + function GetEditControlClass: TEditClass; virtual; + procedure GetEditRect(var R: TRect); virtual; + function GetImageShown: Boolean; override; + function GetIndentBefore: Integer; virtual; + function GetIndentAfter: Integer; virtual; + procedure InternalDrawFrame(ACanvas: TCanvas; ARect: TRect; ItemInfo: TSpTBXMenuItemInfo); virtual; + procedure InternalEditControlChange(Sender: TObject); virtual; + procedure InternalEditControlExit; virtual; + procedure MouseDown(Shift: TShiftState; X, Y: Integer; var MouseDownOnMenu: Boolean); override; + procedure MouseUp(X, Y: Integer; MouseWasDownOnMenu: Boolean); override; + procedure Paint(const Canvas: TCanvas; const ClientAreaRect: TRect; IsSelected, IsPushed, UseDisabledShadow: Boolean); override; + + function ShowImage: Boolean; virtual; + function UsesSameWidth: Boolean; override; + public + function GetCaptionText: WideString; override; + property EditControl: TCustomEdit read FEditControl; + property Item: TSpTBXEditItem read GetItem; // Hides the inherited TB2K Item property + end; + + { TSpTBXSpinEditItem } + + TSpTBXSpinEditItem = class(TSpTBXEditItem) + private + FSpinOptions: TSpTBXSpinEditOptions; + procedure SpinOptionsGetText(Sender: TObject; var NewText: WideString; var Accept: Boolean); + procedure SpinOptionsSetText(Sender: TObject; const AText: WideString); + function GetValue: Extended; + function GetValueChanged: TNotifyEvent; + procedure SetValue(const Value: Extended); + procedure SetValueChanged(const ValueChangedEvent: TNotifyEvent); + protected + function GetItemViewerClass(AView: TTBView): TTBItemViewerClass; override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + property Alignment default taRightJustify; + property Text stored False; + property SpinOptions: TSpTBXSpinEditOptions read FSpinOptions write FSpinOptions; + property Value: Extended read GetValue write SetValue stored False; + property OnValueChanged: TNotifyEvent read GetValueChanged write SetValueChanged; + end; + + TSpTBXSpinEditViewer = class(TSpTBXEditItemViewer) + private + FUpPushed: Boolean; + FDownPushed: Boolean; + FTimer: TTimer; + procedure TimerHandler(Sender: TObject); + function GetItem: TSpTBXSpinEditItem; + protected + function GetAccRole: Integer; override; + function GetIndentAfter: Integer; override; + function HandleEditMessage(var Message: TMessage): Boolean; override; + procedure InvalidateButtons; + function IsPtInButtonPart(X, Y: Integer): Boolean; override; + procedure LosingCapture; override; + procedure MouseDown(Shift: TShiftState; X, Y: Integer; var MouseDownOnMenu: Boolean); override; + procedure MouseUp(X, Y: Integer; MouseWasDownOnMenu: Boolean); override; + procedure InternalDrawFrame(ACanvas: TCanvas; ARect: TRect; ItemInfo: TSpTBXMenuItemInfo); override; + procedure InternalEditControlChange(Sender: TObject); override; + procedure InternalEditControlExit; override; + public + destructor Destroy; override; + property Item: TSpTBXSpinEditItem read GetItem; // Hides the inherited TB2K Item property + end; + +{ Helpers } +procedure SpCalcMaxDropDownWidth(Combo: TSpTBXComboBox; RightMargin: Integer = 8); +function SpFocusEditItem(Item: TTBCustomItem; View: TTBView): Boolean; +function SpStartsTextW(const ASubText, AText: WideString): Boolean; + +{ Painting helpers } +function SpCanEditFrameBeHotTracked(BorderStyle: TBorderStyle; SkinType: TSpTBXSkinType): Boolean; +procedure SpDrawXPEditButton(ACanvas: TCanvas; ARect: TRect; Enabled, FrameHotTrack, HotTrack, Pushed, RightAligned: Boolean); +procedure SpDrawXPComboButton(ACanvas: TCanvas; ARect: TRect; Enabled, FrameHotTrack, HotTrack, DroppedDown, RightAligned: Boolean; SkinType: TSpTBXSkinType); +procedure SpDrawXPSpinButton(ACanvas: TCanvas; ARect: TRect; Enabled, FrameHotTrack, UpHotTrack, DownHotTrack, UpPushed, DownPushed, RightAligned: Boolean; SkinType: TSpTBXSkinType); + +implementation + +uses + Themes, UxTheme, + {$IFNDEF UNICODE} TntActnList, TntWindows, {$ENDIF} + Math, TB2Common; + +const + DefaultSpinButtonSize = 14; + +type + TTBViewAccess = class(TTBView); + TSpTBXFontSettingsAccess = class(TSpTBXFontSettings); + TCustomEditAccess = class(TCustomEdit); + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Helpers } + +procedure SpCalcMaxDropDownWidth(Combo: TSpTBXComboBox; RightMargin: Integer = 8); +var + I, MaxWidth: Integer; + Sz: TSize; + C: TControlCanvas; +begin + MaxWidth := 0; + + C := TControlCanvas.Create; + try + C.Control := Combo; + C.Font.Assign(Combo.Font); + for I := 0 to Combo.Items.Count - 1 do begin + Sz := SpGetTextSize(C.Handle, Combo.Items[I], False); + if Sz.cx > MaxWidth then MaxWidth := Sz.cx; + end; + + MaxWidth := MaxWidth + GetSystemMetrics(SM_CXVSCROLL) + RightMargin; + if Combo.Width < MaxWidth then + SendMessage(Combo.Handle, CB_SETDROPPEDWIDTH, MaxWidth, 0); + finally + C.Free; + end; +end; + +function SpFocusEditItem(Item: TTBCustomItem; View: TTBView): Boolean; +var + IV: TTBItemViewer; +begin + Result := False; + IV := View.Find(Item); + if Assigned(IV) then begin + View.Select(IV, False); + View.ExecuteSelected(False); + Result := True; + end; +end; + +function SpStartsTextW(const ASubText, AText: WideString): Boolean; +var + L, L2: Integer; +begin + L := Length(ASubText); + L2 := Length(AText); + if L > L2 then Result := False + else Result := CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE, + PWideChar(AText), L, PWideChar(ASubText), L) = 2; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Painting helpers } + +function SpCanEditFrameBeHotTracked(BorderStyle: TBorderStyle; SkinType: TSpTBXSkinType): Boolean; +var + NormalB, HotTrackB: TSpTBXSkinOptionEntry; +begin + Result := False; + if (BorderStyle <> bsNone) and (SpTBXSkinType(SkinType) <> sknNone) then begin + // If the HotTrack borders are different than the Normal borders then + // return true. + NormalB := CurrentSkin.Options(skncEditFrame, sknsNormal).Borders; + HotTrackB := CurrentSkin.Options(skncEditFrame, sknsHotTrack).Borders; + if not NormalB.IsEqual(HotTrackB) then + Result := True; + end; +end; + +procedure SpDrawXPEditButton(ACanvas: TCanvas; ARect: TRect; Enabled, FrameHotTrack, + HotTrack, Pushed, RightAligned: Boolean); +var + State: TSpTBXSkinStatesType; +begin + State := CurrentSkin.GetState(Enabled, Pushed, HotTrack or FrameHotTrack, False); + if FrameHotTrack then begin + InflateRect(ARect, 1, 1); + if RightAligned then + ARect.Left := ARect.Left + 1 + else + ARect.Right := ARect.Right - 1; + end; + CurrentSkin.PaintBackground(ACanvas, ARect, skncEditButton, State, True, True); +end; + +procedure SpDrawXPComboButton(ACanvas: TCanvas; ARect: TRect; Enabled, FrameHotTrack, + HotTrack, DroppedDown, RightAligned: Boolean; SkinType: TSpTBXSkinType); +var + Flags: Integer; + State: TSpTBXSkinStatesType; + C: TColor; + X, Y, Part: Integer; +begin + case SpTBXSkinType(SkinType) of + sknNone: + begin + Inc(ARect.Left, 4); + SpFillRect(ACanvas, ARect, clBtnFace, clWindow); + if DroppedDown then + Windows.DrawEdge(ACanvas.Handle, ARect, BDR_SUNKENOUTER, BF_RECT) + else if FrameHotTrack or HotTrack then + Windows.DrawEdge(ACanvas.Handle, ARect, BDR_RAISEDINNER, BF_RECT); + State := CurrentSkin.GetState(Enabled, DroppedDown, HotTrack, False); + C := CurrentSkin.GetTextColor(skncEditButton, State); + X := (ARect.Left + ARect.Right) div 2; + Y := (ARect.Top + ARect.Bottom) div 2 - 1; + SpDrawArrow(ACanvas, X, Y, C, True, False, 2); + end; + sknWindows: + begin + if SpIsWinVistaOrUp then + Part := 6 // (CP_DROPDOWNBUTTONRIGHT) Use the new API on Windows Vista + else + Part := CP_DROPDOWNBUTTON; + if not Enabled then Flags := CBXS_DISABLED + else if DroppedDown then Flags := CBXS_PRESSED + else if HotTrack then Flags := CBXS_HOT + else Flags := CBXS_NORMAL; + DrawThemeBackground(ThemeServices.Theme[teComboBox], ACanvas.Handle, Part, Flags, ARect, nil); + end; + sknSkin: + begin + State := CurrentSkin.GetState(Enabled, DroppedDown, FrameHotTrack, False); + ACanvas.FillRect(ARect); + SpDrawXPEditButton(ACanvas, ARect, Enabled, FrameHotTrack, HotTrack, DroppedDown, RightAligned); + C := CurrentSkin.GetTextColor(skncEditButton, State); + X := (ARect.Left + ARect.Right) div 2; + Y := (ARect.Top + ARect.Bottom) div 2 - 1; + SpDrawArrow(ACanvas, X, Y, C, True, False, 2); + end; + end; +end; + +procedure SpDrawXPSpinButton(ACanvas: TCanvas; ARect: TRect; Enabled, FrameHotTrack, + UpHotTrack, DownHotTrack, UpPushed, DownPushed, RightAligned: Boolean; SkinType: TSpTBXSkinType); +var + ButtonR, BR: TRect; + StateFlags: Integer; + Flags: Cardinal; + X, Y: Integer; + State: TSpTBXSkinStatesType; + C: TColor; +begin + ButtonR := ARect; + + case SpTBXSkinType(SkinType) of + sknNone: + begin + // Up button + Flags := DFCS_SCROLLUP; + if UpPushed then + Flags := Flags or DFCS_PUSHED; + BR := Rect(ButtonR.Left, ButtonR.Top, ButtonR.Right, (ButtonR.Bottom + ButtonR.Top) div 2); + DrawFrameControl(ACanvas.Handle, BR, DFC_SCROLL, Flags); + // Down button + Flags := DFCS_SCROLLDOWN; + if DownPushed then + Flags := Flags or DFCS_PUSHED; + BR := Rect(ButtonR.Left, BR.Bottom - 1, ButtonR.Right, ButtonR.Bottom); + DrawFrameControl(ACanvas.Handle, BR, DFC_SCROLL, Flags); + end; + sknWindows: + begin + InflateRect(ButtonR, 1, 1); + // Up button + BR := ButtonR; + BR.Bottom := (ButtonR.Top + ButtonR.Bottom) div 2; + if not Enabled then StateFlags := UPS_DISABLED + else if UpPushed then StateFlags := UPS_PRESSED + else if UpHotTrack then StateFlags := UPS_HOT + else StateFlags := UPS_NORMAL; + DrawThemeBackground(ThemeServices.Theme[teSpin], ACanvas.Handle, SPNP_UP, StateFlags, BR, nil); + // Down button + BR := ButtonR; + BR.Top := (ButtonR.Top + ButtonR.Bottom) div 2; + if not Enabled then StateFlags := DNS_DISABLED + else if DownPushed then StateFlags := DNS_PRESSED + else if DownHotTrack then StateFlags := DNS_HOT + else StateFlags := DNS_NORMAL; + DrawThemeBackground(ThemeServices.Theme[teSpin], ACanvas.Handle, SPNP_DOWN, StateFlags, BR, nil); + end; + sknSkin: + begin + // Up button + BR := Rect(ButtonR.Left, ButtonR.Top, ButtonR.Right, (ButtonR.Top + ButtonR.Bottom) div 2 + 1); + X := (BR.Left + BR.Right) div 2; + Y := (BR.Top + BR.Bottom) div 2 - 1; + State := CurrentSkin.GetState(Enabled, UpPushed, UpHotTrack or FrameHotTrack, False); + if FrameHotTrack then + BR.Bottom := BR.Bottom - 1; + SpDrawXPEditButton(ACanvas, BR, Enabled, FrameHotTrack, UpHotTrack, UpPushed, RightAligned); + C := CurrentSkin.GetTextColor(skncEditButton, State); + SpDrawArrow(ACanvas, X, Y, C, True, True, 2); + if FrameHotTrack then + BR.Bottom := BR.Bottom + 1; + // Down button + BR := Rect(ButtonR.Left, BR.Bottom - 1, ButtonR.Right, ButtonR.Bottom); + X := (BR.Left + BR.Right) div 2; + Y := (BR.Top + BR.Bottom) div 2 - 1; + State := CurrentSkin.GetState(Enabled, DownPushed, DownHotTrack or FrameHotTrack, False); + if FrameHotTrack then + BR.Top := BR.Top + 1; + SpDrawXPEditButton(ACanvas, BR, Enabled, FrameHotTrack, DownHotTrack, DownPushed, RightAligned); + C := CurrentSkin.GetTextColor(skncEditButton, State); + SpDrawArrow(ACanvas, X, Y, C, True, False, 2); + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXEditButton } + +constructor TSpTBXEditButton.Create(AOwner: TComponent); +var + Index: Integer; +const + DefaultName = 'SubEditButton'; +begin + inherited; + + // Find unique name + if Assigned(AOwner) then begin + Index := 0; + while AOwner.FindComponent(DefaultName + IntToStr(Index)) <> nil do + Inc(Index); + Name := DefaultName + IntToStr(Index); + end; + + // Change the FPopupControl, we need to align + // the DropdownMenu to the Edit control not the button. + // FPopupControl is used in TSpTBXCustomButton.Click + if Assigned(AOwner) and (AOwner is TControl) then + FPopupControl := AOwner as TControl; + + SetSubComponent(True); + SkinType := sknSkin; +end; + +procedure TSpTBXEditButton.AdjustFont(AFont: TFont); +var + State: TSpTBXSkinStatesType; +begin + if (LinkText <> '') and MouseInControl then + inherited + else begin + State := CurrentSkin.GetState(Enabled, Pushed, MouseInControl or GetFrameHotTrack, Checked); + AFont.Color := CurrentSkin.GetTextColor(skncEditButton, State); + end; +end; + +procedure TSpTBXEditButton.Click; +begin + if Assigned(Parent) and SpCanFocus(Parent) then + Parent.SetFocus; + inherited; +end; + +function TSpTBXEditButton.DoDrawDropDownArrow(ACanvas: TCanvas; + ARect: TRect): Boolean; +begin + if (Caption = '') and not IsImageIndexValid then + Result := False // Paint the default Windows combo button + else + Result := inherited DoDrawDropDownArrow(ACanvas, ARect); +end; + +function TSpTBXEditButton.DoDrawItem(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage): Boolean; +var + T: TSpTBXSkinType; + FrameHotTrack, RightAligned: Boolean; +begin + if (PaintStage = pstPrePaint) and not BitmapValid then begin + Result := True; + if Assigned(OnDraw) then OnDraw(Self, ACanvas, ARect, PaintStage, Result); + if Result then begin + FrameHotTrack := GetFrameHotTrack; + RightAligned := Align <> alLeft; + + // Draw the ComboButton if the caption is not set + T := SpTBXSkinType(SkinType); + if (Length(Caption) = 0) and not IsImageIndexValid then + SpDrawXPComboButton(ACanvas, ARect, Enabled, FrameHotTrack, MouseInControl, Pushed, RightAligned, T) + else begin + case T of + sknNone: + SpDrawXPButton(ACanvas, ARect, Enabled, Pushed, MouseInControl, Checked, Focused, Default, T); + sknWindows: + begin + InflateRect(ARect, 1, 1); + SpDrawXPButton(ACanvas, ARect, Enabled, Pushed, MouseInControl, Checked, Focused, Default, T); + end; + sknSkin: + SpDrawXPEditButton(ACanvas, ARect, Enabled, FrameHotTrack, FrameHotTrack or MouseInControl, Pushed, RightAligned); + end; + end; + end; + end + else + Result := inherited DoDrawItem(ACanvas, ARect, PaintStage); +end; + +function TSpTBXEditButton.GetFrameHotTrack: Boolean; +begin + if Parent is TSpTBXEdit then + Result := TSpTBXEdit(Parent).MouseInControl or Parent.Focused + else + Result := False; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSpinButton } + +constructor TSpTBXSpinButton.Create(AOwner: TComponent); +begin + inherited; + Repeating := True; +end; + +procedure TSpTBXSpinButton.Click; +var + P: TPoint; +begin + FUpPushed := False; + FDownPushed := False; + if Enabled then begin + GetCursorPos(P); + P := ScreenToClient(P); + if P.Y < Height div 2 then begin + FUpPushed := True; + if Assigned(FOnUpClick) then FOnUpClick(Self); + end + else begin + FDownPushed := True; + if Assigned(FOnDownClick) then FOnDownClick(Self); + end; + end; + + inherited; +end; + +function TSpTBXSpinButton.DoDrawItem(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage): Boolean; +var + UpHotTrack, DownHotTrack, EditFrameHotTrack, RightAligned: Boolean; +begin + // Draw rectangle buttons + if (PaintStage = pstPrePaint) and not BitmapValid then begin + Result := True; + if Assigned(OnDraw) then OnDraw(Self, ACanvas, ARect, PaintStage, Result); + if Result then begin + IsHotTracking(UpHotTrack, DownHotTrack, EditFrameHotTrack); + RightAligned := Align <> alLeft; + SpDrawXPSpinButton(ACanvas, ARect, Enabled, EditFrameHotTrack, UpHotTrack, DownHotTrack, FUpPushed, FDownPushed, RightAligned, SkinType); + end; + end + else + Result := inherited DoDrawItem(ACanvas, ARect, PaintStage); +end; + +procedure TSpTBXSpinButton.IsHotTracking(out UpButton, DownButton, EditFrame: Boolean); +var + Edit: TSpTBXEdit; + P: TPoint; + R: TRect; +begin + UpButton := False; + DownButton := False; + EditFrame := False; + + if GetCursorPos(P) then begin + P := ScreenToClient(P); + R := Rect(0, 0, Width, Height div 2); + UpButton := PtInRect(R, P); + if not UpButton then begin + R := Rect(0, Height div 2, Width, Height); + DownButton := PtInRect(R, P); + end; + end; + + if Assigned(Owner) and (Owner is TSpTBXEdit) then begin + Edit := Owner as TSpTBXEdit; + if Edit.HotTrack then + EditFrame := Edit.MouseInControl or Edit.Focused; + end; +end; + +procedure TSpTBXSpinButton.DoMouseLeave; +begin + FUpPushed := False; + FDownPushed := False; + inherited; +end; + +procedure TSpTBXSpinButton.MouseUp(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + FUpPushed := False; + FDownPushed := False; + inherited; +end; + +procedure TSpTBXSpinButton.MouseMove(Shift: TShiftState; X, Y: Integer); +begin + inherited; + if Enabled then + Repaint; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXUnicodeAdaptEdit } + +{$IFNDEF UNICODE} +procedure TSpTBXUnicodeAdaptEdit.CreateWindowHandle(const Params: TCreateParams); +begin + TntCustomEdit_CreateWindowHandle(Self, Params); +end; + +procedure TSpTBXUnicodeAdaptEdit.CreateWnd; +begin + inherited; + TntCustomEdit_AfterInherited_CreateWnd(Self, FPasswordChar); +end; + +procedure TSpTBXUnicodeAdaptEdit.DefineProperties(Filer: TFiler); +begin + inherited; + TntPersistent_AfterInherited_DefineProperties(Filer, Self); +end; + +function TSpTBXUnicodeAdaptEdit.GetSelStart: Integer; +begin + Result := TntCustomEdit_GetSelStart(Self); +end; + +procedure TSpTBXUnicodeAdaptEdit.SetSelStart(const Value: Integer); +begin + TntCustomEdit_SetSelStart(Self, Value); +end; + +function TSpTBXUnicodeAdaptEdit.GetSelLength: Integer; +begin + Result := TntCustomEdit_GetSelLength(Self); +end; + +procedure TSpTBXUnicodeAdaptEdit.SetSelLength(const Value: Integer); +begin + TntCustomEdit_SetSelLength(Self, Value); +end; + +function TSpTBXUnicodeAdaptEdit.GetSelText: WideString; +begin + Result := TntCustomEdit_GetSelText(Self); +end; + +procedure TSpTBXUnicodeAdaptEdit.SetSelText(const Value: WideString); +begin + TntCustomEdit_SetSelText(Self, Value); +end; + +function TSpTBXUnicodeAdaptEdit.GetPasswordChar: WideChar; +begin + Result := TntCustomEdit_GetPasswordChar(Self, FPasswordChar); +end; + +procedure TSpTBXUnicodeAdaptEdit.SetPasswordChar(const Value: WideChar); +begin + TntCustomEdit_SetPasswordChar(Self, FPasswordChar, Value); +end; + +function TSpTBXUnicodeAdaptEdit.GetText: WideString; +begin + Result := TntControl_GetText(Self); +end; + +procedure TSpTBXUnicodeAdaptEdit.SetText(const Value: WideString); +begin + TntControl_SetText(Self, Value); +end; + +function TSpTBXUnicodeAdaptEdit.IsHintStored: Boolean; +begin + Result := TntControl_IsHintStored(Self); +end; + +function TSpTBXUnicodeAdaptEdit.GetHint: WideString; +begin + Result := TntControl_GetHint(Self); +end; + +procedure TSpTBXUnicodeAdaptEdit.SetHint(const Value: WideString); +begin + TntControl_SetHint(Self, Value); +end; + +procedure TSpTBXUnicodeAdaptEdit.ActionChange(Sender: TObject; CheckDefaults: Boolean); +begin + TntControl_BeforeInherited_ActionChange(Self, Sender, CheckDefaults); + inherited; +end; + +function TSpTBXUnicodeAdaptEdit.GetActionLinkClass: TControlActionLinkClass; +begin + Result := TntControl_GetActionLinkClass(Self, inherited GetActionLinkClass); +end; +{$ENDIF} + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXUnicodeEdit } + +procedure TSpTBXUnicodeEdit.CreateWnd; +begin + inherited; + if HandleAllocated then UpdateEditRect; +end; + +procedure TSpTBXUnicodeEdit.CreateParams(var Params: TCreateParams); +const + Alignments: array[TAlignment] of Cardinal = (ES_LEFT, ES_RIGHT, ES_CENTER); +begin + inherited CreateParams(Params); + // WS_CLIPCHILDREN needed for edit buttons + Params.Style := Params.Style or Alignments[FAlignment] or WS_CLIPCHILDREN; +end; + +procedure TSpTBXUnicodeEdit.SetAlignment(Value: TAlignment); +begin + if Value <> FAlignment then begin + FAlignment := Value; + RecreateWnd; + end; +end; + +function TSpTBXUnicodeEdit.AddEditButton(RightAligned: Boolean; + AWidth: Integer): TSpTBXEditButton; +begin + Result := TSpTBXEditButton.Create(Self); + Result.Parent := Self; + Result.FreeNotification(Self); + if RightAligned then + Result.Align := alRight + else + Result.Align := alLeft; + if AWidth = -1 then + Result.Width := GetSystemMetrics(SM_CXVSCROLL) + else + Result.Width := AWidth; + UpdateEditRect; +end; + +function TSpTBXUnicodeEdit.HasEditButton: Boolean; +var + I: Integer; +begin + Result := False; + if not HandleAllocated then Exit; + for I := 0 to ControlCount - 1 do begin + if Controls[I] is TSpTBXEditButton then begin + Result := True; + Break; + end; + end; +end; + +procedure TSpTBXUnicodeEdit.UpdateEditRect; +var + I, X1, X2: Integer; + B: TSpTBXEditButton; +begin + if not HandleAllocated then Exit; + + X1 := 0; + X2 := 0; + + for I := 0 to ControlCount - 1 do begin + if Controls[I] is TSpTBXEditButton then begin + B := Controls[I] as TSpTBXEditButton; + if B.Visible then + case B.Align of + alLeft: X1 := X1 + B.Width; + alRight: X2 := X2 + B.Width; + end; + end; + end; + + if X1 > 0 then Inc(X1, 2); + if X2 > 0 then Inc(X2, 2); + + SendMessage(Handle, EM_SETMARGINS, EC_LEFTMARGIN or EC_RIGHTMARGIN, MakeLong(X1, X2)); +end; + +procedure TSpTBXUnicodeEdit.CMEnabledChanged(var Message: TMessage); +var + I: Integer; +begin + inherited; + for I := 0 to ControlCount - 1 do + if Controls[I] is TSpTBXEditButton then + TSpTBXEditButton(Controls[I]).Enabled := Enabled; +end; + +procedure TSpTBXUnicodeEdit.CMFontChanged(var Message: TMessage); +begin + inherited; + UpdateEditRect; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXEdit } + +constructor TSpTBXEdit.Create(AOwner: TComponent); +begin + inherited; + FSkinType := sknSkin; + FHotTrack := True; + FBorderStyle := bsSingle; + SkinManager.AddSkinNotification(Self); + + if not (csDesigning in ComponentState) then + DoubleBuffered := True; +end; + +destructor TSpTBXEdit.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + inherited; +end; + +procedure TSpTBXEdit.CMEnabledChanged(var Message: TMessage); +begin + inherited; + FMouseInControl := False; + if FHotTrack then InvalidateFrame; +end; + +procedure TSpTBXEdit.CMEnter(var Message: TCMEnter); +begin + inherited; + FMouseInControl := True; + if FHotTrack then InvalidateFrame; +end; + +procedure TSpTBXEdit.CMExit(var Message: TCMExit); +begin + inherited; + FMouseInControl := False; + if FHotTrack then InvalidateFrame; +end; + +procedure TSpTBXEdit.CMMouseEnter(var Message: TMessage); +begin + inherited; + if not FMouseInControl then begin + FMouseInControl := True; + if FHotTrack and not Focused and (HasEditButton or SpCanEditFrameBeHotTracked(BorderStyle, SkinType)) then + InvalidateFrame; + end; +end; + +procedure TSpTBXEdit.CMMouseLeave(var Message: TMessage); +begin + inherited; + if FMouseInControl then begin + FMouseInControl := False; + if FHotTrack and not Focused and (HasEditButton or SpCanEditFrameBeHotTracked(BorderStyle, SkinType)) then + InvalidateFrame; + end; +end; + +procedure TSpTBXEdit.InvalidateFrame; +begin + if HandleAllocated then + RedrawWindow(Handle, nil, 0, RDW_FRAME or RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN); +end; + +procedure TSpTBXEdit.SetBorderStyle(const Value: TBorderStyle); +begin + if FBorderStyle <> Value then begin + FBorderStyle := Value; + InvalidateFrame; + end; +end; + +procedure TSpTBXEdit.SetSkinType(const Value: TSpTBXSkinType); +var + I: Integer; +begin + if Value <> FSkinType then begin + FSkinType := Value; + for I := 0 to ControlCount - 1 do + if Controls[I] is TSpTBXEditButton then + TSpTBXEditButton(Controls[I]).SkinType := Value; + InvalidateFrame; + end; +end; + +procedure TSpTBXEdit.WMNCPaint(var Message: TWMNCPaint); +var + HotTrackFrame: Boolean; +begin + if FHotTrack then + HotTrackFrame := FMouseInControl or Focused + else + HotTrackFrame := False; + + if (SpTBXSkinType(FSkinType) = sknNone) and (FBorderStyle <> bsNone) then + inherited + else + if Ctl3D then + SpDrawXPEditFrame(Self, HotTrackFrame, FSkinType, False, FBorderStyle = bsNone); +end; + +procedure TSpTBXEdit.WMSpSkinChange(var Message: TMessage); +begin + inherited; + InvalidateFrame; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomButtonEdit } + +constructor TSpTBXCustomButtonEdit.Create(AOwner: TComponent); +begin + inherited; + ControlStyle := ControlStyle - [csSetCaption]; + FEditButton := AddEditButton(True, 19); +end; + +destructor TSpTBXCustomButtonEdit.Destroy; +begin + FreeAndNil(FEditButton); + inherited; +end; + +procedure TSpTBXCustomButtonEdit.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited; + if (AComponent = FEditButton) and (Operation = opRemove) then + FEditButton := nil; +end; + +procedure TSpTBXCustomButtonEdit.SetName(const Value: TComponentName); +begin + inherited SetName(Value); + if not (csLoading in ComponentState) then begin + FEditButton.Caption := '...'; + Text := ''; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSpinEditOptions } + +constructor TSpTBXSpinEditOptions.Create; +begin + inherited Create; + FDecimal := 2; + FIncrement := 1; + FValueSnap := True; + FValueType := spnInteger; +end; + +procedure TSpTBXSpinEditOptions.DoValueChanged; +begin + if Assigned(FOnValueChanged) then FOnValueChanged(Self); +end; + +function TSpTBXSpinEditOptions.GetValueAsInteger: Int64; +begin + Result := Round(Value); +end; + +function TSpTBXSpinEditOptions.IsIncrementStored: Boolean; +begin + Result := FIncrement <> 1; +end; + +function TSpTBXSpinEditOptions.IsMaxValueStored: Boolean; +begin + Result := FMaxValue <> 0; +end; + +function TSpTBXSpinEditOptions.IsMinValueStored: Boolean; +begin + Result := FMinValue <> 0; +end; + +function TSpTBXSpinEditOptions.IsValueStored: Boolean; +begin + Result := FValue <> 0; +end; + +procedure TSpTBXSpinEditOptions.SetDecimal(NewDecimal: Integer); +begin + if NewDecimal > 10 then NewDecimal := 10; + if NewDecimal < 0 then NewDecimal := 0; + if NewDecimal <> FDecimal then begin + FDecimal := NewDecimal; + UpdateTextFromValue; + end; +end; + +procedure TSpTBXSpinEditOptions.SetMaxValue(const NewValue: Extended); +begin + if NewValue <> FMaxValue then begin + FMaxValue := NewValue; + if FValue > NewValue then SetValue(NewValue); + end; +end; + +procedure TSpTBXSpinEditOptions.SetMinValue(const NewValue: Extended); +begin + if NewValue <> FMinValue then begin + FMinValue := NewValue; + if FValue < NewValue then SetValue(NewValue); + end; +end; + +procedure TSpTBXSpinEditOptions.SetPostfix(const ValueString: WideString); +begin + if FPostfix <> ValueString then begin + FPostfix := ValueString; + UpdateTextFromValue; + end; +end; + +procedure TSpTBXSpinEditOptions.SetPrefix(const ValueString: WideString); +begin + if FPrefix <> ValueString then begin + FPrefix := ValueString; + UpdateTextFromValue; + end; +end; + +procedure TSpTBXSpinEditOptions.SetValue(const NewValue: Extended); +begin + if NewValue <> FValue then + if (FMaxValue = FMinValue) or + (FMaxValue <> FMinValue) and (NewValue >= FMinValue) and (NewValue <= FMaxValue) then + begin + FValue := NewValue; + DoValueChanged; + UpdateTextFromValue; + end; +end; + +procedure TSpTBXSpinEditOptions.SetValueAsInteger(const NewValue: Int64); +begin + Value := NewValue; +end; + +procedure TSpTBXSpinEditOptions.SetValueType(NewType: TSpTBXSpinType); +begin + if NewType <> FValueType then begin + FValueType := NewType; + if NewType in [spnInteger, spnHex] then FIncrement := Max(Round(FIncrement), 1); + UpdateTextFromValue; + end; +end; + +procedure TSpTBXSpinEditOptions.UpdateTextFromValue; +var + WS: WideString; +begin + WS := ''; + case FValueType of + spnInteger: WS := IntToStr(Round(FValue)); + spnFloat: WS := FloatToStrF(FValue, ffFixed, 15, FDecimal); + spnHex: WS := IntToHex(Round(FValue), 1); + end; + if Assigned(FOnSetText) then FOnSetText(Self, FPrefix + WS + FPostfix); +end; + +procedure TSpTBXSpinEditOptions.UpdateValueFromText(RevertWhenInvalid: Boolean = True); +var + WS: WideString; + PrevValue, NewValue: Extended; + I: Integer; + Dummy: Boolean; +begin + PrevValue := FValue; + NewValue := FValue; + Dummy := True; + WS := ''; + if Assigned(FOnGetText) then FOnGetText(Self, WS, Dummy); + + // Remove the Prefix and Postfix from the text + I := Pos(Prefix, WS); + if I > 0 then + Delete(WS, I, Length(Prefix)); + I := Pos(Postfix, WS); + if I > 0 then + Delete(WS, I, Length(Postfix)); + + // Try to parse the text to get the value + WS := Trim(WS); + if Length(WS) > 0 then begin + case FValueType of + spnInteger: NewValue := StrToInt64Def(WS, Round(PrevValue)); + spnFloat: NewValue := StrToFloatDef(WS, PrevValue); + spnHex: NewValue := StrToInt64Def('$' + WS, Round(PrevValue)); + end; + end; + + if RevertWhenInvalid or (NewValue <> PrevValue) then begin + SetValue(NewValue); + UpdateTextFromValue; + end; +end; + +procedure TSpTBXSpinEditOptions.ValueInc; +var + NewValue: Extended; +begin + if FValueSnap then + NewValue := Math.Floor(FValue / FIncrement + 1 + FIncrement * 0.0000000001) * FIncrement + else + NewValue := FValue + FIncrement; + SetValue(NewValue); +end; + +procedure TSpTBXSpinEditOptions.ValueDec; +var + NewValue: Extended; +begin + if FValueSnap then + NewValue := Math.Ceil(FValue / FIncrement - 1 - FIncrement * 0.0000000001) * FIncrement + else + NewValue := FValue - FIncrement; + SetValue(NewValue); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSpinEdit } + +constructor TSpTBXSpinEdit.Create(AOwner: TComponent); +begin + inherited; + Alignment := taRightJustify; + + FSpinOptions := TSpTBXSpinEditOptions.Create; + FSpinOptions.OnGetText := SpinOptionsGetText; + FSpinOptions.OnSetText := SpinOptionsSetText; + + FSpinButton := TSpTBXSpinButton.Create(Self); + FSpinButton.Parent := Self; + FSpinButton.FreeNotification(Self); + FSpinButton.OnUpClick := UpClick; + FSpinButton.OnDownClick := DownClick; + FSpinButton.Align := alRight; + FSpinButton.Width := DefaultSpinButtonSize; + UpdateEditRect; + + Text := '0'; +end; + +destructor TSpTBXSpinEdit.Destroy; +begin + FreeAndNil(FSpinOptions); + FreeAndNil(FSpinButton); + inherited; +end; + +procedure TSpTBXSpinEdit.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited; + if (AComponent = FSpinButton) and (Operation = opRemove) then + FSpinButton := nil; +end; + +procedure TSpTBXSpinEdit.KeyDown(var Key: Word; Shift: TShiftState); +begin + inherited; + case Key of + VK_UP: SpinOptions.ValueInc; + VK_DOWN: SpinOptions.ValueDec; + end; +end; + +procedure TSpTBXSpinEdit.KeyPress(var Key: Char); +begin + inherited; + if Key = #13 then begin + Key := #0; + SpinOptions.UpdateValueFromText; + end; +end; + +procedure TSpTBXSpinEdit.UpClick(Sender: TObject); +begin + SpinOptions.ValueInc; +end; + +procedure TSpTBXSpinEdit.DownClick(Sender: TObject); +begin + SpinOptions.ValueDec; +end; + +procedure TSpTBXSpinEdit.Change; +begin + if FExtendedAccept then + SpinOptions.UpdateValueFromText(False); // Don't revert when an invalid text is entered + inherited; +end; + +function TSpTBXSpinEdit.GetValue: Extended; +begin + Result := SpinOptions.Value; +end; + +procedure TSpTBXSpinEdit.SetValue(const Value: Extended); +begin + SpinOptions.Value := Value; +end; + +function TSpTBXSpinEdit.GetValueChanged: TNotifyEvent; +begin + Result := SpinOptions.OnValueChanged; +end; + +procedure TSpTBXSpinEdit.SetValueChanged(const ValueChangedEvent: TNotifyEvent); +begin + SpinOptions.OnValueChanged := ValueChangedEvent; +end; + +procedure TSpTBXSpinEdit.SpinOptionsGetText(Sender: TObject; + var NewText: WideString; var Accept: Boolean); +begin + // Event used by SpinOptions to get the text from the edit control + NewText := Text; +end; + +procedure TSpTBXSpinEdit.SpinOptionsSetText(Sender: TObject; + const AText: WideString); +var + L, L2: Integer; +begin + // Event used by SpinOptions to set the edit control text + if Text = AText then Exit; + + // Change the EditControl text and reposition the edit caret + L := Length(Text); + Text := AText; + L2 := Length(Text); + if L2 > L then + SelStart := L + Length(SpinOptions.Prefix); +end; + +procedure TSpTBXSpinEdit.WMKillFocus(var Message: TWMKillFocus); +begin + SpinOptions.UpdateValueFromText; + inherited; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXComboBox } + +constructor TSpTBXComboBox.Create(AOwner: TComponent); +begin + inherited; + FAutoDropDownWidthRightMargin := 8; + FAutoItemHeight := True; + FMouseTimer := nil; + FHotTrack := True; + FSkinType := sknSkin; + SkinManager.AddSkinNotification(Self); + + if not (csDesigning in ComponentState) then + DoubleBuffered := True; +end; + +procedure TSpTBXComboBox.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + + // Force the ComboBox to be owner draw + with Params do + if Style and (CBS_OWNERDRAWFIXED or CBS_OWNERDRAWVARIABLE) = 0 then + Style := Style or LBS_OWNERDRAWFIXED; +end; + +procedure TSpTBXComboBox.CreateWnd; +begin + inherited; + DoCalcMaxDropDownWidth; +end; + +destructor TSpTBXComboBox.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + if Assigned(FMouseTimer) then begin + FMouseTimer.Enabled := False; + FreeAndNil(FMouseTimer); + end; + inherited; +end; + +procedure TSpTBXComboBox.CloseUp; +begin + inherited; + InvalidateFrame; +end; + +procedure TSpTBXComboBox.CMEnter(var Message: TCMEnter); +begin + inherited; + FMouseInControl := True; + InvalidateFrame; +end; + +procedure TSpTBXComboBox.CMExit(var Message: TCMExit); +begin + inherited; + FMouseInControl := False; + InvalidateFrame; +end; + +procedure TSpTBXComboBox.CMMouseEnter(var Message: TMessage); +begin + inherited; + if Message.LParam = 0 then begin + if not FMouseInControl then begin + FMouseInControl := True; + if FHotTrack then + InvalidateFrame; + if not Assigned(FMouseTimer) then begin + FMouseTimer := TTimer.Create(nil); + FMouseTimer.Enabled := False; + FMouseTimer.Interval := 125; + FMouseTimer.OnTimer := MouseTimerHandler; + FMouseTimer.Enabled := True; + end; + end; + end; +end; + +procedure TSpTBXComboBox.CNDrawItem(var Message: TWMDrawItem); +var + State: TOwnerDrawState; + SknState: TSpTBXSkinStatesType; +begin + with Message.DrawItemStruct^ do + begin + State := TOwnerDrawState(LongRec(itemState).Lo); + if itemState and ODS_COMBOBOXEDIT <> 0 then + Include(State, odComboBoxEdit); + if itemState and ODS_DEFAULT <> 0 then + Include(State, odDefault); + + Canvas.Handle := hDC; + Canvas.Lock; + try + Canvas.Font := Font; + Canvas.Brush := Brush; + if (Integer(itemID) >= 0) and (Integer(itemID) < Items.Count) then begin + DrawItemBackground(itemID, rcItem, State); + + TControlCanvas(Canvas).UpdateTextFlags; + SknState := CurrentSkin.GetState(not (odDisabled in State), False, False, odSelected in State); + Canvas.Brush.Style := bsClear; + if SknState = sknsChecked then + Canvas.Font.Color := CurrentSkin.GetTextColor(skncListItem, SknState, SkinType); + DrawItem(itemID, rcItem, State); + end + else + Canvas.FillRect(rcItem); + finally + Canvas.Unlock; + Canvas.Handle := 0; + end; + end; +end; + +procedure TSpTBXComboBox.MouseTimerHandler(Sender: TObject); +var + P: TPoint; + R: TRect; + InControl: Boolean; +begin + if not DroppedDown and GetCursorPos(P) then begin + GetWindowRect(Handle, R); + InControl := PtInRect(R, P); + if InControl <> FMouseInControl then begin + FMouseInControl := InControl; + if FHotTrack then InvalidateFrame; + end; + + if not InControl then begin + FMouseTimer.Enabled := False; + FreeAndNil(FMouseTimer); + end; + end; +end; + +procedure TSpTBXComboBox.DoCalcMaxDropDownWidth; +begin + if FAutoDropDownWidth then + SpCalcMaxDropDownWidth(Self, FAutoDropDownWidthRightMargin); +end; + +procedure TSpTBXComboBox.DoDrawBackground(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawBackground) then FOnDrawBackground(Self, ACanvas, ARect, + PaintStage, PaintDefault); +end; + +procedure TSpTBXComboBox.DoDrawItem(ACanvas: TCanvas; var ARect: TRect; + Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawItem) then FOnDrawItem(Self, ACanvas, ARect, Index, State, PaintStage, PaintDefault); +end; + +procedure TSpTBXComboBox.DoDrawItemBackground(ACanvas: TCanvas; + var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawItemBackground) then FOnDrawItemBackground(Self, ACanvas, ARect, Index, State, PaintStage, PaintDefault); +end; + +procedure TSpTBXComboBox.DrawItem(Index: Integer; Rect: TRect; + State: TOwnerDrawState); +var + Flags: Integer; + PaintDefault: Boolean; +begin + // Draw the item text + PaintDefault := True; + DoDrawItem(Canvas, Rect, Index, State, pstPrePaint, PaintDefault); + if PaintDefault then begin + Flags := DrawTextBiDiModeFlags(DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX); + Inc(Rect.Left, 2); + + // [Bugfix] Delphi 7-2009 bug: + // When the Style is set to csDropDownList and the control is disabled the + // text is not painted with csGrayText. This is a VCL bug the same happens + // with TComboBox when you set it to csDropDownFixed (TSpTBXComboBox uses + // csDropDownFixed instead of csDropDownList). + if odDisabled in State then + Canvas.Font.Color := clGrayText; + SpDrawXPText(Canvas, Items[Index], Rect, Flags); + end; + + PaintDefault := True; + DoDrawItem(Canvas, Rect, Index, State, pstPostPaint, PaintDefault); +end; + +procedure TSpTBXComboBox.DrawItemBackground(Index: Integer; Rect: TRect; + State: TOwnerDrawState); +var + PaintDefault: Boolean; +begin + // Draw the list items background + PaintDefault := True; + DoDrawItemBackground(Canvas, Rect, Index, State, pstPrePaint, PaintDefault); + if PaintDefault then + SpDrawXPListItemBackground(Canvas, Rect, odSelected in State, False, odFocused in State, SkinType); + + PaintDefault := True; + DoDrawItemBackground(Canvas, Rect, Index, State, pstPostPaint, PaintDefault); +end; + +{$IF CompilerVersion > 17} +procedure TSpTBXComboBox.EditWndProc(var Message: TMessage); +begin + // [Bugfix] Delphi 2006/2007 bug: + // CM_MOUSEENTER and CM_MOUSELEAVE are fired everytime the mouse + // enters the combobox internal edit control. + // In D7 these messages were only fired when the mouse entered or leaved + // the combobox, including the internal edit control. + // We need to block the mouse messages from the internal edit control + // in EditWndProc + if Message.Msg = WM_MOUSEMOVE then + ComboWndProc(Message, FEditHandle, FDefEditProc) + else + inherited; +end; +{$IFEND} + +function TSpTBXComboBox.GetDropDownButtonRect: TRect; +var + ButtonWidth: Integer; + T: TSpTBXSkinType; +begin + if Style = csSimple then + ButtonWidth := 0 + else + ButtonWidth := GetSystemMetrics(SM_CXHSCROLL); + Result.Left := Width - ButtonWidth; + Result.Top := 0; + Result.Right := Result.Left + ButtonWidth; + Result.Bottom := Height; + + T := SpTBXSkinType(FSkinType); + case T of + sknNone: + begin + InflateRect(Result, 0, -1); + OffsetRect(Result, -1, 0); + end; + sknWindows: + begin + InflateRect(Result, 0, -1); + OffsetRect(Result, -1, 0); + end; + sknSkin: + begin + InflateRect(Result, 0, -2); + OffsetRect(Result, -2, 0); + end; + end; +end; + +function TSpTBXComboBox.GetMouseInDropDownButton: Boolean; +var + P: TPoint; + ButtonR: TRect; + ButtonWidth: Integer; +begin + Result := False; + + if not (csDesigning in ComponentState) and GetCursorPos(P) then begin + P := ScreenToClient(P); + if Style = csSimple then + ButtonWidth := 0 + else + ButtonWidth := GetSystemMetrics(SM_CXHSCROLL); + ButtonR.Left := Width - ButtonWidth; + ButtonR.Top := 0; + ButtonR.Right := ButtonR.Left + ButtonWidth; + ButtonR.Bottom := Height; + + Result := PtInRect(ButtonR, P); + end; +end; + +procedure TSpTBXComboBox.InvalidateFrame; +begin + if HandleAllocated then + Invalidate; +end; + +procedure TSpTBXComboBox.UpdateDropDownButton; +var + ButtonState: Boolean; +begin + if not DroppedDown then begin + ButtonState := GetMouseInDropDownButton; + if ButtonState <> FMouseInDropDownButton then + InvalidateFrame; + FMouseInDropDownButton := ButtonState; + end; +end; + +function TSpTBXComboBox.GetItemHt: Integer; +// Automatically update the Height/ItemHeight when Style is csDropDown, +// csDropDownList or csSimple +begin + // CB_GETITEMHEIGHT doesn't work when Style is csOwnerDrawFixed or + // csOwnerDrawVariable. + // Since TSpTBXComboBox is always owner-drawed we must calculate the + // ItemHeight based on the font when Style <> csOwnerDrawFixed/csOwnerDrawVariable. + // Look at TCustomComboBox.GetItemHt + if Style in [csOwnerDrawFixed, csOwnerDrawVariable] then + Result := inherited GetItemHt + else + if not FAutoItemHeight then // When AutoItemHeight is turned off return the ItemHeight + Result := FInternalItemHeight + else + Result := SpGetControlTextHeight(Self, Font); +end; + +procedure TSpTBXComboBox.SetItemHeight(Value: Integer); +begin + if Value > 0 then + FInternalItemHeight := Value; + inherited; +end; + +procedure TSpTBXComboBox.SetSkinType(const Value: TSpTBXSkinType); +begin + if Value <> FSkinType then begin + FSkinType := Value; + InvalidateFrame; + end; +end; + +procedure TSpTBXComboBox.WMMouseMove(var Message: TWMMouseMove); +begin + inherited; + UpdateDropDownButton; +end; + +procedure TSpTBXComboBox.WMNCCalcSize(var Message: TWMNCCalcSize); +begin + // [Bugfix] Delphi 2006 bug: + // Do nothing, fix Delphi 2005/2006 bug: http://qc.borland.com/wc/qcmain.aspx?d=13852 +end; + +procedure TSpTBXComboBox.WMPaint(var Message: TWMPaint); +var + ACanvas: TControlCanvas; + R, ButtonR: TRect; + ButtonWidth: Integer; + T: TSpTBXSkinType; + PaintDefault, HotTrackFrame, VistaNewComCtrls: Boolean; +begin + inherited; + + ACanvas := TControlCanvas.Create; + try + ACanvas.Control := Self; + ACanvas.Lock; // lock the canvas to prevent flicker on mouse click + GetWindowRect(Handle, R); + OffsetRect(R, -R.Left, -R.Top); + + if Style = csSimple then + ButtonWidth := 0 + else + ButtonWidth := GetSystemMetrics(SM_CXHSCROLL); + + T := SpTBXSkinType(FSkinType); + ExcludeClipRect(ACanvas.Handle, 2, 2, R.Right - 2 - ButtonWidth, R.Bottom - 2); + try + PaintDefault := True; + DoDrawBackground(ACanvas, R, pstPrePaint, PaintDefault); + + // Don't custom paint if we are on Vista with ComCtrls 6, let the + // OS draw the frame + VistaNewComCtrls := not (csDesigning in ComponentState) and (T = sknWindows) and SpIsWinVistaOrUp and ThemeServices.ThemesEnabled; + + if PaintDefault and (T <> sknNone) and not VistaNewComCtrls then begin + if csDesigning in ComponentState then + HotTrackFrame := False + else + if FHotTrack then + HotTrackFrame := FMouseInControl or Focused + else + HotTrackFrame := DroppedDown; + + ButtonR := GetDropDownButtonRect; + if T = sknSkin then + SpDrawParentBackground(Self, ACanvas.Handle, R); + SpDrawXPEditFrame(ACanvas, R, Enabled, HotTrackFrame, T); + if Style <> csSimple then + SpDrawXPComboButton(ACanvas, ButtonR, Enabled, HotTrackFrame, GetMouseInDropDownButton, DroppedDown, True, T); + end; + + PaintDefault := True; + DoDrawBackground(ACanvas, R, pstPostPaint, PaintDefault); + finally + SelectClipRgn(ACanvas.Handle, 0); + end; + finally + ACanvas.Unlock; + ACanvas.Free; + end; +end; + +procedure TSpTBXComboBox.CNMeasureItem(var Message: TWMMeasureItem); +// Automatically update the Height/ItemHeight when Style is csDropDown, +// csDropDownList or csSimple +// Recalc ItemHeight based on the font +var + I: Integer; +begin + inherited; + if not (Style in [csOwnerDrawFixed, csOwnerDrawVariable]) then begin + // When itemID = $FFFFFFFFFF the itemHeight is refering to the + // editbox height + if Message.MeasureItemStruct.itemID = High(LongWord) then begin + I := SpGetControlTextHeight(Self, Font); + Inc(I, 2); + end + else + I := GetItemHt; + Message.MeasureItemStruct^.itemHeight := I; + end; +end; + +procedure TSpTBXComboBox.CMSPFontChanged(var Message: TMessage); +// Automatically update the Height/ItemHeight when Style is csDropDown, +// csDropDownList or csSimple +// Recreate when the font is changed +begin + if not FFontChanging and not (Style in [csOwnerDrawFixed, csOwnerDrawVariable]) then begin + FFontChanging := True; + if not DroppedDown then RecreateWnd; + FFontChanging := False; + end; +end; + +procedure TSpTBXComboBox.WMSetFont(var Message: TWMSetFont); +// Automatically update the Height/ItemHeight when Style is csDropDown, +// csDropDownList or csSimple +// Recreate when the font is changed +begin + inherited; + if not FFontChanging and not (Style in [csOwnerDrawFixed, csOwnerDrawVariable]) then + PostMessage(Handle, CM_SPFONTCHANGED, 0, 0); +end; + +procedure TSpTBXComboBox.WMSpSkinChange(var Message: TMessage); +begin + inherited; + InvalidateFrame; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXListBox } + +constructor TSpTBXListBox.Create(AOwner: TComponent); +begin + inherited; + FHotTrack := True; + FSkinType := sknSkin; + SkinManager.AddSkinNotification(Self); + Style := lbOwnerDrawFixed; +end; + +procedure TSpTBXListBox.CreateParams(var Params: TCreateParams); +begin + inherited; + // Force the ListBox to be owner draw + with Params do + if Style and (LBS_OWNERDRAWFIXED or LBS_OWNERDRAWVARIABLE) = 0 then + Style := Style or LBS_OWNERDRAWFIXED; +end; + +destructor TSpTBXListBox.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + inherited; +end; + +procedure TSpTBXListBox.InvalidateBorders; +begin + if HandleAllocated then + RedrawWindow(Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE); +end; + +procedure TSpTBXListBox.SetHotTrack(const Value: Boolean); +begin + if FHotTrack <> Value then begin + FHotTrack := Value; + InvalidateBorders; + end; +end; + +procedure TSpTBXListBox.SetSkinType(const Value: TSpTBXSkinType); +begin + if Value <> FSkinType then begin + FSkinType := Value; + InvalidateBorders; + end; +end; + +procedure TSpTBXListBox.CMFocusChanged(var Message: TCMFocusChanged); +begin + inherited; + if FHotTrack and Assigned(Message.Sender) then begin + FChildFocused := Self = Message.Sender; + if FChildFocused <> FHotTracking then begin + FHotTracking := FChildFocused; + InvalidateBorders; + end; + end; +end; + +procedure TSpTBXListBox.CMMouseEnter(var Message: TMessage); +begin + inherited; + if FHotTrack and not FHotTracking then begin + FHotTracking := True; + if SpCanEditFrameBeHotTracked(BorderStyle, SkinType) then + InvalidateBorders; + end; +end; + +procedure TSpTBXListBox.CMMouseLeave(var Message: TMessage); +begin + inherited; + if FHotTrack and FHotTracking and not FChildFocused then begin + FHotTracking := False; + if SpCanEditFrameBeHotTracked(BorderStyle, SkinType) then + InvalidateBorders; + end; +end; + +procedure TSpTBXListBox.WMSpSkinChange(var Message: TMessage); +begin + inherited; + InvalidateBorders; +end; + +procedure TSpTBXListBox.DoDrawItem(ACanvas: TCanvas; var ARect: TRect; + Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawItem) then FOnDrawItem(Self, ACanvas, ARect, Index, State, PaintStage, PaintDefault); +end; + +procedure TSpTBXListBox.DoDrawItemBackground(ACanvas: TCanvas; var ARect: TRect; + Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawItemBackground) then FOnDrawItemBackground(Self, ACanvas, ARect, Index, State, PaintStage, PaintDefault); +end; + +procedure TSpTBXListBox.DrawItem(Index: Integer; Rect: TRect; + State: TOwnerDrawState); +var + R: TRect; + Flags: Integer; + PaintDefault: Boolean; +begin + // Draw the item text + PaintDefault := True; + DoDrawItem(Canvas, Rect, Index, State, pstPrePaint, PaintDefault); + if PaintDefault then begin + Flags := DrawTextBiDiModeFlags(DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX); + + // It seems TabWidth doesn't work on owner-drawed listboxes, we have to do + // it manually using DT_EXPANDTABS. + // It seems that DrawText uses a different unit metric than LB_SETTABSTOPS, + // don't know how to calculate it correctly for more info: + // http://news.jrsoftware.org/read/article.php?id=15427&group=jrsoftware.toolbar2000.thirdparty#15427 + // Using DrawTextEx doesn't solve the problem, GetDialogBaseUnits doesn't help either + if TabWidth > 0 then + Flags := ((Flags or DT_EXPANDTABS or DT_TABSTOP) and not $800) or (Round(TabWidth * 0.3) shl 8); + + // Add a margin to the rect + R := Rect; + if not UseRightToLeftAlignment then + Inc(R.Left, 3) + else + Dec(R.Right, 3); + SpDrawXPText(Canvas, Items[Index], R, Flags); + end; + + PaintDefault := True; + DoDrawItem(Canvas, Rect, Index, State, pstPostPaint, PaintDefault); +end; + +procedure TSpTBXListBox.DrawItemBackground(Index: Integer; Rect: TRect; + State: TOwnerDrawState); +var + PaintDefault: Boolean; +begin + // Draw the item background + PaintDefault := True; + DoDrawItemBackground(Canvas, Rect, Index, State, pstPrePaint, PaintDefault); + if PaintDefault then + SpDrawXPListItemBackground(Canvas, Rect, odSelected in State, False, odFocused in State, SkinType); + + PaintDefault := True; + DoDrawItemBackground(Canvas, Rect, Index, State, pstPostPaint, PaintDefault); +end; + +procedure TSpTBXListBox.CNDrawItem(var Message: TWMDrawItem); +var + State: TOwnerDrawState; + SknState: TSpTBXSkinStatesType; +begin + with Message.DrawItemStruct^ do + begin + State := TOwnerDrawState(LongRec(itemState).Lo); + Canvas.Handle := hDC; + Canvas.Lock; + try + Canvas.Font := Font; + Canvas.Brush := Brush; + if (Integer(itemID) >= 0) and (Integer(itemID) < Items.Count) then begin + DrawItemBackground(itemID, rcItem, State); + + SknState := CurrentSkin.GetState(not (odDisabled in State), False, False, odSelected in State); + Canvas.Brush.Style := bsClear; + if SknState = sknsChecked then + Canvas.Font.Color := CurrentSkin.GetTextColor(skncListItem, SknState, SkinType); + DrawItem(itemID, rcItem, State); + end + else + Canvas.FillRect(rcItem); + finally + Canvas.Unlock; + Canvas.Handle := 0; + end; + end; +end; + +procedure TSpTBXListBox.WMNCPaint(var Message: TWMNCPaint); +begin + inherited; + if (BorderStyle <> bsNone) and (SpTBXSkinType(FSkinType) <> sknNone) then + if Ctl3D then + SpDrawXPEditFrame(Self, FHotTracking, FSkinType, True); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCheckListBox } + +constructor TSpTBXCheckListBox.Create(AOwner: TComponent); +begin + inherited; + FHotTrack := True; + FSkinType := sknSkin; + SkinManager.AddSkinNotification(Self); + Style := lbOwnerDrawFixed; +end; + +destructor TSpTBXCheckListBox.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + inherited; +end; + +procedure TSpTBXCheckListBox.InvalidateBorders; +begin + if HandleAllocated then + RedrawWindow(Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE); +end; + +procedure TSpTBXCheckListBox.SetHotTrack(const Value: Boolean); +begin + if FHotTrack <> Value then begin + FHotTrack := Value; + InvalidateBorders; + end; +end; + +procedure TSpTBXCheckListBox.SetSkinType(const Value: TSpTBXSkinType); +begin + if Value <> FSkinType then begin + FSkinType := Value; + InvalidateBorders; + end; +end; + +procedure TSpTBXCheckListBox.CMFocusChanged(var Message: TCMFocusChanged); +begin + inherited; + if FHotTrack and Assigned(Message.Sender) then begin + FChildFocused := Self = Message.Sender; + if FChildFocused <> FHotTracking then begin + FHotTracking := FChildFocused; + InvalidateBorders; + end; + end; +end; + +procedure TSpTBXCheckListBox.CMMouseEnter(var Message: TMessage); +begin + inherited; + if FHotTrack and not FHotTracking then begin + FHotTracking := True; + if SpCanEditFrameBeHotTracked(BorderStyle, SkinType) then + InvalidateBorders; + end; +end; + +procedure TSpTBXCheckListBox.CMMouseLeave(var Message: TMessage); +begin + inherited; + if FHotTrack and FHotTracking and not FChildFocused then begin + FHotTracking := False; + if SpCanEditFrameBeHotTracked(BorderStyle, SkinType) then + InvalidateBorders; + end; +end; + +procedure TSpTBXCheckListBox.WMSpSkinChange(var Message: TMessage); +begin + inherited; + InvalidateBorders; +end; + +procedure TSpTBXCheckListBox.DoDrawItem(ACanvas: TCanvas; var ARect: TRect; + Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawItem) then FOnDrawItem(Self, ACanvas, ARect, Index, State, PaintStage, PaintDefault); +end; + +procedure TSpTBXCheckListBox.DoDrawItemBackground(ACanvas: TCanvas; + var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawItemBackground) then FOnDrawItemBackground(Self, ACanvas, ARect, Index, State, PaintStage, PaintDefault); +end; + +procedure TSpTBXCheckListBox.DrawItem(Index: Integer; Rect: TRect; + State: TOwnerDrawState); +var + R: TRect; + Flags: Integer; + PaintDefault: Boolean; +begin + // Draw the item text + PaintDefault := True; + DoDrawItem(Canvas, Rect, Index, State, pstPrePaint, PaintDefault); + if PaintDefault then begin + Flags := DrawTextBiDiModeFlags(DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX); + + // Add a margin to the rect + R := Rect; + if not UseRightToLeftAlignment then + Inc(R.Left, 3) + else + Dec(R.Right, 3); + SpDrawXPText(Canvas, Items[Index], R, Flags); + end; + + PaintDefault := True; + DoDrawItem(Canvas, Rect, Index, State, pstPostPaint, PaintDefault); +end; + +procedure TSpTBXCheckListBox.DrawItemBackground(Index: Integer; Rect: TRect; + State: TOwnerDrawState); +var + ACheckWidth: Integer; + R: TRect; + PaintDefault: Boolean; +begin + // Draw the checkbox, background and focus + PaintDefault := True; + DoDrawItemBackground(Canvas, Rect, Index, State, pstPrePaint, PaintDefault); + if PaintDefault then begin + if not Header[Index] then begin + // Draw the checkbox + ACheckWidth := GetCheckWidth; + if not UseRightToLeftAlignment then begin + R.Right := Rect.Left; + R.Left := R.Right - ACheckWidth; + end + else begin + R.Left := Rect.Right; + R.Right := R.Left + ACheckWidth; + end; + R.Top := Rect.Top + (Rect.Bottom - Rect.Top - ACheckWidth) div 2; + R.Bottom := R.Top + ACheckWidth; + InflateRect(R, -1, -1); + + Canvas.FillRect(R); + SpDrawXPCheckBoxGlyph(Canvas, R, ItemEnabled[Index], Self.State[Index], False, False, SkinType); + + // Draw the background and focus + SpDrawXPListItemBackground(Canvas, Rect, odSelected in State, False, odFocused in State, SkinType); + end + else begin + Canvas.Font.Color := HeaderColor; + Canvas.Brush.Color := HeaderBackgroundColor; + Canvas.FillRect(Rect); + if odFocused in State then + SpDrawFocusRect(Canvas, Rect); + end; + end; + + PaintDefault := True; + DoDrawItemBackground(Canvas, Rect, Index, State, pstPostPaint, PaintDefault); +end; + +procedure TSpTBXCheckListBox.CNDrawItem(var Message: TWMDrawItem); +var + State: TOwnerDrawState; + SknState: TSpTBXSkinStatesType; +begin + if Items.Count = 0 then Exit; + + with Message.DrawItemStruct^ do + begin + State := TOwnerDrawState(LongRec(itemState).Lo); + Canvas.Handle := hDC; + Canvas.Lock; + try + Canvas.Font := Font; + Canvas.Brush := Brush; + if (Integer(itemID) >= 0) and (Integer(itemID) < Items.Count) then begin + // Exclude the checkbox area + if not Header[itemID] then + if not UseRightToLeftAlignment then + rcItem.Left := rcItem.Left + GetCheckWidth + else + rcItem.Right := rcItem.Right - GetCheckWidth; + + DrawItemBackground(itemID, rcItem, State); + + SknState := CurrentSkin.GetState(not (odDisabled in State), False, False, odSelected in State); + Canvas.Brush.Style := bsClear; + if SknState = sknsChecked then + Canvas.Font.Color := CurrentSkin.GetTextColor(skncListItem, SknState, SkinType); + DrawItem(itemID, rcItem, State); + end + else + Canvas.FillRect(rcItem); + finally + Canvas.Unlock; + Canvas.Handle := 0; + end; + end; +end; + +procedure TSpTBXCheckListBox.WMNCPaint(var Message: TWMNCPaint); +begin + inherited; + if (BorderStyle <> bsNone) and (SpTBXSkinType(FSkinType) <> sknNone) then + if Ctl3D then + SpDrawXPEditFrame(Self, FHotTracking, FSkinType, True); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXEditItem } + +constructor TSpTBXEditItem.Create(AOwner: TComponent); +begin + inherited; + FEditImageIndex := -1; + FEditorFontSettings := TSpTBXFontSettings.Create; + TSpTBXFontSettingsAccess(FEditorFontSettings).OnChange := FontSettingsChanged; + CustomWidth := 64; + Alignment := taLeftJustify; +end; + +destructor TSpTBXEditItem.Destroy; +begin + FFontSettings.Free; + FEditorFontSettings.Free; + inherited; +end; + +function TSpTBXEditItem.DoAcceptText(var NewText: WideString): Boolean; +begin + Result := True; + if Assigned(FOnAcceptText) then FOnAcceptText(Self, NewText, Result); +end; + +function TSpTBXEditItem.DoAutoComplete(var AText: WideString): Boolean; +begin + Result := False; +end; + +procedure TSpTBXEditItem.DoBeginEdit(Viewer: TSpTBXEditItemViewer); +begin + if Assigned(FOnBeginEdit) then FOnBeginEdit(Self, Viewer, Viewer.EditControl); +end; + +procedure TSpTBXEditItem.DoChange(const AText: WideString); +begin + if Assigned(FOnChange) then FOnChange(Self, AText); +end; + +procedure TSpTBXEditItem.DoTextChanging(const OldText: WideString; + var NewText: WideString; Reason: Integer); +begin + case CharCase of + ecUpperCase: NewText := WideUpperCase(NewText); + ecLowerCase: NewText := WideLowerCase(NewText); + end; +end; + +procedure TSpTBXEditItem.FontSettingsChanged(Sender: TObject); +begin + Change(True); +end; + +function TSpTBXEditItem.GetItemViewerClass(AView: TTBView): TTBItemViewerClass; +begin + if not FAllowVerticalEditor and (AView.Orientation = tbvoVertical) then + Result := inherited GetItemViewerClass(AView) + else + Result := TSpTBXEditItemViewer; +end; + +function TSpTBXEditItem.NeedToRecreateViewer(AViewer: TTBItemViewer): Boolean; +begin + Result := GetItemViewerClass(AViewer.View) <> AViewer.ClassType; +end; + +procedure TSpTBXEditItem.SetPasswordChar(Value: WideChar); +begin + if Value <> FPasswordChar then begin + FPasswordChar := Value; + Change(True); + end; +end; + +procedure TSpTBXEditItem.SetShowImage(const Value: Boolean); +begin + if FShowImage <> Value then begin + FShowImage := Value; + Change(True); + end; +end; + +function TSpTBXEditItem.StartEditing(AView: TTBView): Boolean; +var + SaveText: WideString; +begin + SaveText := Text; + SpFocusEditItem(Self, AView); + // Case Sensitive, Result is true when the text is changed + Result := Text <> SaveText; +end; + +procedure TSpTBXEditItem.SetAllowVerticalEditor(const Value: Boolean); +begin + if FAllowVerticalEditor <> Value then begin + FAllowVerticalEditor := Value; + Change(True); + end; +end; + +procedure TSpTBXEditItem.SetCharCase(Value: TEditCharCase); +begin + if FCharCase <> Value then begin + FCharCase := Value; + SetText(Text); // Updates case + end; +end; + +procedure TSpTBXEditItem.SetEditCaption(const Value: WideString); +begin + if FEditCaption <> Value then begin + FEditCaption := Value; + Change(True); + end; +end; + +procedure TSpTBXEditItem.SetEditorFontSettings(const Value: TSpTBXFontSettings); +begin + FEditorFontSettings.Assign(Value); +end; + +procedure TSpTBXEditItem.SetMaxLength(Value: Integer); +begin + if FMaxLength <> Value then begin + FMaxLength := Value; + Change(False); + end; +end; + +procedure TSpTBXEditItem.SetText(Value: WideString); +begin + SetTextEx(Value, tcrSetProperty); +end; + +procedure TSpTBXEditItem.SetTextEx(Value: WideString; Reason: Integer); +begin + DoTextChanging(FText, Value, Reason); + // Case Sensitive, fire the event when the text is changed + if FText <> Value then begin + FText := Value; + Change(False); + DoChange(Text); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXEditItemViewer } + +procedure TSpTBXEditItemViewer.EditWndProc(var Message: TMessage); + + procedure AcceptText; + var + S: WideString; + begin + S := GetEditControlText; + if Item.DoAcceptText(S) then Item.SetTextEx(S, tcrEditControl); + end; + +begin + if FEditControl = nil then + Exit; + + if not HandleEditMessage(Message) then begin + if Message.Msg = WM_CHAR then + case TWMChar(Message).CharCode of + VK_TAB: begin + FEditControlStatus := [ecsAccept]; + AcceptText; + Exit; + end; + VK_RETURN: begin + FEditControlStatus := [ecsAccept, ecsClose]; + AcceptText; + Exit; + end; + VK_ESCAPE: begin + FEditControlStatus := []; + Exit; + end; + end; + TCustomEditAccess(FEditControl).WndProc(Message); + end; + + if Message.Msg = WM_KILLFOCUS then begin + View.CancelMode; + FEditControlStatus := [ecsClose]; + end; +end; + +function TSpTBXEditItemViewer.GetEditControlClass: TEditClass; +begin + Result := TSpTBXUnicodeEdit; +end; + +function TSpTBXEditItemViewer.GetEditControlText: WideString; +begin + Result := ''; + if Assigned(FEditControl) then begin + if FEditControl is TSpTBXUnicodeEdit then + Result := TSpTBXUnicodeEdit(FEditControl).Text + else + Result := TCustomEditAccess(FEditControl).Text; + end; +end; + +procedure TSpTBXEditItemViewer.GetEditHeight(const DC: HDC; out EditHeight, + ExternalLeading: Integer); +var + TextMetricA: TTextMetricA; + TextMetricW: TTextMetricW; +begin + if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then begin + Windows.GetTextMetricsA(DC, TextMetricA); + EditHeight := TextMetricA.tmHeight; + ExternalLeading := TextMetricA.tmExternalLeading; + end + else begin + Windows.GetTextMetricsW(DC, TextMetricW); + EditHeight := TextMetricW.tmHeight; + ExternalLeading := TextMetricW.tmExternalLeading; + end; +end; + +procedure TSpTBXEditItemViewer.GetEditRect(var R: TRect); +var + TextSize: TSize; + MarginsInfo: TSpTBXMenuItemMarginsInfo; +begin + R := BoundsRect; + if not IsToolbarStyle then begin + TextSize := MeasureEditCaption; + CurrentSkin.GetMenuItemMargins(StockBitmap.Canvas, 0, MarginsInfo); + Inc(R.Left, MarginsInfo.GutterSize + MarginsInfo.ImageTextSpace); + if Length(Item.EditCaption) > 0 then + Inc(R.Left, MarginsInfo.LeftCaptionMargin + TextSize.cx + MarginsInfo.RightCaptionMargin + 1); + end; + + InflateRect(R, 1, 0); + Inc(R.Left, GetIndentBefore); + Dec(R.Right, GetIndentAfter); +end; + +function TSpTBXEditItemViewer.GetImageShown: Boolean; +begin + Result := (Item.EditImageIndex >= 0) and + ((Item.DisplayMode in [nbdmDefault, nbdmImageAndText]) or + (IsToolbarStyle and (Item.DisplayMode = nbdmTextOnlyInMenus))); + + if Assigned(View) and Assigned(View.Owner) and (View.Owner is TSpTBXToolbar) then + if TSpTBXToolbar(View.Owner).DisplayMode = tbdmTextOnly then + Result := False; +end; + +function TSpTBXEditItemViewer.GetIndentAfter: Integer; +begin + Result := 1; +end; + +function TSpTBXEditItemViewer.GetIndentBefore: Integer; +var + ImgList: TCustomImageList; +begin + Result := 1; + + if ShowImage then begin + ImgList := GetImageList; + if Assigned(ImgList) and (Item.ImageIndex >= 0) and (Item.ImageIndex <= ImgList.Count - 1) then + Result := ImgList.Width + 4; + end; +end; + +function TSpTBXEditItemViewer.GetItem: TSpTBXEditItem; +var + TBItem: TTBCustomItem; +begin + TBItem := inherited Item; + if Assigned(TBItem) then + Result := TBItem as TSpTBXEditItem + else + Result := nil; +end; + +function TSpTBXEditItemViewer.HandleEditMessage(var Message: TMessage): Boolean; +begin + Result := False; + if Assigned(Item.FOnEditMessage) then Item.FOnEditMessage(Item, Self, Message, Result); +end; + +procedure TSpTBXEditItemViewer.CalcSize(const Canvas: TCanvas; + var AWidth, AHeight: Integer); +var + TextSize: TSize; + MarginsInfo: TSpTBXMenuItemMarginsInfo; + EditBoxHeight: Integer; +begin + if Item.CustomWidth > -1 then + AWidth := Item.CustomWidth; + + if not IsToolbarStyle then begin + TextSize := MeasureEditCaption; + CurrentSkin.GetMenuItemMargins(StockBitmap.Canvas, 0, MarginsInfo); + Inc(AWidth, MarginsInfo.GutterSize + MarginsInfo.ImageTextSpace); + if Length(Item.EditCaption) > 0 then + Inc(AWidth, MarginsInfo.LeftCaptionMargin + TextSize.cx + MarginsInfo.RightCaptionMargin + 2); + end + else begin + TextSize.cx := 0; + TextSize.cy := 0; + end; + + EditBoxHeight := MeasureTextHeight + 1; + Inc(EditBoxHeight, 2 + 4); + AHeight := Max(EditBoxHeight, TextSize.cy); + if not IsToolbarStyle then + AHeight := AHeight + else + AHeight := AHeight or $01; + + if (Item.CustomHeight > -1) and IsToolbarStyle then + AHeight := Item.CustomHeight; +end; + +function TSpTBXEditItemViewer.CaptionShown: Boolean; +begin + Result := not IsToolbarStyle and inherited CaptionShown; +end; + +function TSpTBXEditItemViewer.GetCaptionText: WideString; +begin + Result := TSpTBXEditItem(Item).EditCaption; +end; + +procedure TSpTBXEditItemViewer.InternalDrawFrame(ACanvas: TCanvas; + ARect: TRect; ItemInfo: TSpTBXMenuItemInfo); +begin + if not (ItemInfo.HotTrack or ItemInfo.Pushed) and (SkinManager.CurrentSkinName = 'Default') then + SpFillRect(ACanvas, ARect, clWindow, clBtnFace) + else begin + SpDrawXPEditFrame(ACanvas, ARect, ItemInfo.Enabled, ItemInfo.HotTrack, sknSkin); + InflateRect(ARect, -2, -2); + SpFillRect(ACanvas, ARect, clWindow); + end; +end; + +procedure TSpTBXEditItemViewer.InternalEditControlChange(Sender: TObject); +begin + // Used by descendants + Item.DoChange(GetEditControlText); +end; + +procedure TSpTBXEditItemViewer.InternalEditControlExit; +begin + // Used by descendants +end; + +procedure TSpTBXEditItemViewer.Paint(const Canvas: TCanvas; + const ClientAreaRect: TRect; IsSelected, IsPushed, UseDisabledShadow: Boolean); +const + Alignments: array [TAlignment] of Integer = (DT_LEFT, DT_RIGHT, DT_CENTER); +var + DC: HDC; + S: WideString; + R, ImageRect: TRect; + ImgList: TCustomImageList; + TextSize: TSize; + ItemInfo: TSpTBXMenuItemInfo; + MarginsInfo: TSpTBXMenuItemMarginsInfo; +begin + DC := Canvas.Handle; + R := ClientAreaRect; + SpFillItemInfo(Canvas, Self, ItemInfo); + + Canvas.Font.Assign(View.GetFont); + Item.FontSettings.Apply(Canvas.Font); + + { Item Caption, only on MenuItems } + if not IsToolbarStyle then begin + S := Item.EditCaption; + CurrentSkin.GetMenuItemMargins(Canvas, 0, MarginsInfo); + TextSize := SpGetTextSize(DC, S, True); + + if Length(S) > 0 then + R.Right := MarginsInfo.GutterSize + MarginsInfo.ImageTextSpace + TextSize.cx + MarginsInfo.LeftCaptionMargin + MarginsInfo.RightCaptionMargin + else + R.Right := MarginsInfo.GutterSize + MarginsInfo.ImageTextSpace - 1; + SpDrawXPMenuItem(Canvas, R, ItemInfo); + + R.Right := ClientAreaRect.Right; + Inc(R.Left, MarginsInfo.GutterSize + MarginsInfo.ImageTextSpace); + + if Length(S) > 0 then begin + if Canvas.Font.Color = clNone then + Canvas.Font.Color := CurrentSkin.GetTextColor(skncMenuItem, ItemInfo.State); + Inc(R.Left, MarginsInfo.LeftCaptionMargin); + SpDrawXPText(Canvas, S, R, DT_SINGLELINE or DT_LEFT or DT_VCENTER); + Inc(R.Left, TextSize.cx + MarginsInfo.RightCaptionMargin + 1); + end; + + ImageRect := ClientAreaRect; + ImageRect.Right := ImageRect.Left + ItemInfo.MenuMargins.GutterSize; + if ItemInfo.ImageShown then begin + ImageRect.Left := ImageRect.Left + ((ImageRect.Right - ImageRect.Left) - ItemInfo.ImageSize.cx) div 2; + ImageRect.Top := ImageRect.Top + ((ImageRect.Bottom - ImageRect.Top) - ItemInfo.ImageSize.cy) div 2; + ImageRect.Right := ImageRect.Left + ItemInfo.ImageSize.cx; + ImageRect.Bottom := ImageRect.Top + ItemInfo.ImageSize.cy; + DrawItemImage(Canvas, ImageRect, ItemInfo, Item.EditImageIndex); + end; + end; + + { Edit Frame } + InternalDrawFrame(Canvas, R, ItemInfo); + InflateRect(R, 1, 0); + + { Editor Image } + if ShowImage then begin + ImgList := GetImageList; + if Assigned(ImgList) and (Item.ImageIndex >= 0) and (Item.ImageIndex <= ImgList.Count - 1) then begin + ImageRect.Left := R.Left + 4; + ImageRect.Right := R.Left + ImgList.Width; + ImageRect.Top := (R.Top + R.Bottom + 1 - ImgList.Height) div 2; + ImageRect.Bottom := ImageRect.Top + ImgList.Height; + + SpDrawImageList(Canvas, ImageRect, ImgList, Item.ImageIndex, Item.Enabled, True); + end; + end; + + { Editor text } + if Length(Item.Text) > 0 then begin + if Item.PasswordChar <> #0 then + S := StringOfChar(Item.PasswordChar, Length(S)) + else + S := Item.Text; + + Canvas.Font.Assign(View.GetFont); + Item.EditorFontSettings.Apply(Canvas.Font); + if Canvas.Font.Color = clNone then + if Item.Enabled then + Canvas.Font.Color := clBtnText + else + Canvas.Font.Color := clGrayText; + InflateRect(R, -2, -1); + if not IsToolbarStyle then + Inc(R.Left, GetIndentBefore + 1) + else + Inc(R.Left, GetIndentBefore + 2); + Dec(R.Right, GetIndentAfter + 1); + Dec(R.Top, 1); + if IsToolbarStyle then + Inc(R.Left, -1); + SpDrawXPText(Canvas, S, R, DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX or Alignments[Item.Alignment]); + end; +end; + +function TSpTBXEditItemViewer.ShowImage: Boolean; +begin + Result := Item.ShowImage; +end; + +procedure TSpTBXEditItemViewer.GetCursor(const Pt: TPoint; var ACursor: HCURSOR); +var + R: TRect; +begin + if not Item.Enabled then + Exit; + GetEditRect(R); + OffsetRect(R, -BoundsRect.Left, -BoundsRect.Top); + InflateRect(R, -2, -2); + if PtInRect(R, Pt) then + ACursor := LoadCursor(0, IDC_IBEAM); +end; + +function TSpTBXEditItemViewer.EditLoop(const CapHandle: HWND): Boolean; + + procedure ControlMessageLoop; + + function PointInWindow(const Wnd: HWND; const P: TPoint): Boolean; + var + W: HWND; + begin + Result := False; + W := WindowFromPoint(P); + if W = 0 then Exit; + if W = Wnd then + Result := True + else + if IsChild(Wnd, W) then + Result := True; + end; + + function ContinueLoop: Boolean; + begin + Result := (ecsContinueLoop in FEditControlStatus) and + not View.IsModalEnding and FEditControl.Focused and Item.Enabled; + { Note: View.IsModalEnding is checked since TTBView.CancelMode doesn't + destroy popup windows; it merely hides them and calls EndModal. So if + IsModalEnding returns True we can infer that CancelMode was likely + called. } + end; + + var + Msg: TMsg; + IsKeypadDigit: Boolean; + V: Integer; + begin + try + while ContinueLoop do begin + { Examine the next message before popping it out of the queue } + if not PeekMessage(Msg, 0, 0, 0, PM_NOREMOVE) then begin + WaitMessage; + Continue; + end; + case Msg.message of + WM_SYSKEYDOWN: begin + { Exit immediately if Alt+[key] or F10 are pressed, but not + Alt+Shift, Alt+`, or Alt+[keypad digit] } + if (Msg.wParam <> VK_MENU) and (Msg.wParam <> VK_SHIFT) and + (Msg.wParam <> VK_HANJA) then begin + IsKeypadDigit := False; + { This detect digits regardless of whether Num Lock is on: } + if Lo(LongRec(Msg.lParam).Hi) <> 0 then + for V := VK_NUMPAD0 to VK_NUMPAD9 do + if MapVirtualKey(V, 0) = Lo(LongRec(Msg.lParam).Hi) then begin + IsKeypadDigit := True; + Break; + end; + if not IsKeypadDigit then begin + FEditControlStatus := [ecsClose]; + Exit; + end; + end; + end; + WM_SYSKEYUP: begin + { Exit when Alt is released by itself } + if Msg.wParam = VK_MENU then begin + FEditControlStatus := [ecsClose]; + Exit; + end; + end; + WM_LBUTTONDOWN, WM_LBUTTONDBLCLK, + WM_RBUTTONDOWN, WM_RBUTTONDBLCLK, + WM_MBUTTONDOWN, WM_MBUTTONDBLCLK, + WM_NCLBUTTONDOWN, WM_NCLBUTTONDBLCLK, + WM_NCRBUTTONDOWN, WM_NCRBUTTONDBLCLK, + WM_NCMBUTTONDOWN, WM_NCMBUTTONDBLCLK: begin + { If a mouse click outside the edit control is in the queue, + exit and let the upstream message loop deal with it } + if Msg.hwnd <> FEditControl.Handle then + Exit; + end; + WM_MOUSEMOVE, WM_NCMOUSEMOVE: begin + if GetCapture = CapHandle then begin + if PointInWindow(FEditControl.Handle, Msg.pt) then + ReleaseCapture; + end + else if GetCapture = 0 then begin + if not PointInWindow(FEditControl.Handle, Msg.pt) then + SetCapture(CapHandle); + end; + if GetCapture = CapHandle then + SetCursor(LoadCursor(0, IDC_ARROW)); + end; + end; + { Now pop the message out of the queue } + if not PeekMessage(Msg, 0, Msg.message, Msg.message, PM_REMOVE or PM_NOYIELD) then + Continue; + if ((Msg.message >= WM_MOUSEFIRST) and (Msg.message <= WM_MOUSELAST)) and + (Msg.hwnd = CapHandle) then + { discard, so that the selection doesn't get changed } + else begin + TranslateMessage(Msg); + DispatchMessage(Msg); + end; + end; + finally + { Make sure there are no outstanding WM_*CHAR messages } + RemoveMessages(WM_CHAR, WM_DEADCHAR); + RemoveMessages(WM_SYSCHAR, WM_SYSDEADCHAR); + end; + end; + +var + R: TRect; + ActiveWnd, FocusWnd: HWND; + S: WideString; +begin + GetEditRect(R); + if IsRectEmpty(R) then begin + Result := False; + Exit; + end; + + ActiveWnd := GetActiveWindow; + FocusWnd := GetFocus; + + { Create the edit control } + InflateRect(R, -3, -3); + FEditControl := GetEditControlClass.Create(nil); + try + FEditControl.Name := Format('%s_edit_control_%p', [ClassName, Pointer(FEditControl)]); + FEditControl.Visible := False; + TCustomEditAccess(FEditControl).ReadOnly := Item.ReadOnly; + TCustomEditAccess(FEditControl).BorderStyle := bsNone; + TCustomEditAccess(FEditControl).AutoSize := False; + TCustomEditAccess(FEditControl).Font.Assign(View.GetFont); + Item.EditorFontSettings.Apply(TCustomEditAccess(FEditControl).Font); + if FEditControl is TSpTBXUnicodeEdit then begin + TSpTBXUnicodeEdit(FEditControl).Alignment := Item.Alignment; + TSpTBXUnicodeEdit(FEditControl).PasswordChar := Item.PasswordChar; + TSpTBXUnicodeEdit(FEditControl).Text := Item.Text + end + else + TCustomEditAccess(FEditControl).Text := Item.Text; + TCustomEditAccess(FEditControl).CharCase := Item.FCharCase; + TCustomEditAccess(FEditControl).MaxLength := Item.FMaxLength; + FEditControl.BoundsRect := R; + FEditControl.WindowProc := EditWndProc; + FEditControl.ParentWindow := View.Window.Handle; + TCustomEditAccess(FEditControl).OnChange := InternalEditControlChange; + FEditControl.SelectAll; + DoBeginEdit; + FEditControl.Visible := True; + FEditControl.SetFocus; + if GetActiveWindow <> ActiveWnd then + SendMessage(ActiveWnd, WM_NCACTIVATE, 1, 0) // Don't gray out title bar of old active window + else + ActiveWnd := 0; + + FEditControlStatus := [ecsContinueLoop]; + ControlMessageLoop; + finally + if FEditControlStatus = [ecsContinueLoop] then + InternalEditControlExit; + S := GetEditControlText; + FreeAndNil(FEditControl); + end; + + if (FEditControlStatus = [ecsContinueLoop]) and Item.ExtendedAccept then + if Item.DoAcceptText(S) then Item.SetTextEx(S, tcrEditControl); + + { ensure the area underneath the edit control is repainted immediately } + View.Window.Update; + { If app is still active, set focus to previous control and restore capture + to CapHandle if another control hasn't taken it } + if GetActiveWindow <> 0 then begin + SetFocus(FocusWnd); + if GetCapture = 0 then + SetCapture(CapHandle); + end; + if ActiveWnd <> 0 then + SendMessage(ActiveWnd, WM_NCACTIVATE, Ord(GetActiveWindow = ActiveWnd), 0); + { The SetFocus call above can change the Z order of windows. If the parent + window is a popup window, reassert its topmostness. } + if View.Window is TTBPopupWindow then + SetWindowPos(View.Window.Handle, HWND_TOPMOST, 0, 0, 0, 0, + SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE); + { Send an MSAA "focus" event now that we're returning to the regular modal loop } + View.NotifyFocusEvent; + + Result := ecsClose in FEditControlStatus; + if not Result and (GetCapture = CapHandle) then begin + if ecsAccept in FEditControlStatus then + { if we are accepting but not closing, Tab must have been pressed } + View.Selected := View.NextSelectable(View.Selected, + GetKeyState(VK_SHIFT) >= 0); + end; +end; + +procedure TSpTBXEditItemViewer.DoBeginEdit; +begin + Item.DoBeginEdit(Self); +end; + +function TSpTBXEditItemViewer.DoExecute: Boolean; +begin + // Close any delay-close popup menus before entering the edit loop + View.CancelChildPopups; + Result := False; + if EditLoop(View.GetCaptureWnd) then begin + View.EndModal; + if ecsAccept in FEditControlStatus then + Result := True; + end; +end; + +function TSpTBXEditItemViewer.MeasureEditCaption: TSize; +begin + StockBitmap.Canvas.Font.Assign(View.GetFont); + Item.FontSettings.Apply(StockBitmap.Canvas.Font); + Result := SpGetTextSize(StockBitmap.Canvas.Handle, Item.EditCaption, True); +end; + +function TSpTBXEditItemViewer.MeasureTextHeight: Integer; +var + I: Integer; +begin + StockBitmap.Canvas.Font.Assign(View.GetFont); + Item.EditorFontSettings.Apply(StockBitmap.Canvas.Font); + GetEditHeight(StockBitmap.Canvas.Handle, Result, I); + Inc(Result, I); +end; + +procedure TSpTBXEditItemViewer.MouseBeginEdit; +begin + if Item.Enabled then + Execute(True) + else begin + if (View.ParentView = nil) and not View.IsPopup then + View.EndModal; + end; +end; + +procedure TSpTBXEditItemViewer.MouseDown(Shift: TShiftState; X, Y: Integer; + var MouseDownOnMenu: Boolean); +begin + if IsPtInButtonPart(X, Y) then + MouseBeginEdit + else + inherited; +end; + +procedure TSpTBXEditItemViewer.MouseUp(X, Y: Integer; MouseWasDownOnMenu: Boolean); +begin + if IsPtInButtonPart(X, Y) then + MouseBeginEdit + else + inherited; +end; + +function TSpTBXEditItemViewer.UsesSameWidth: Boolean; +begin + Result := False; +end; + +function TSpTBXEditItemViewer.GetAccRole: Integer; +const + ROLE_SYSTEM_TEXT = $2a; // from OleAcc.h +begin + Result := ROLE_SYSTEM_TEXT; +end; + +function TSpTBXEditItemViewer.GetAccValue(var Value: WideString): Boolean; +begin + Value := Item.Text; + Result := True; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSpinEditItem } + +constructor TSpTBXSpinEditItem.Create(AOwner: TComponent); +begin + inherited; + FSpinOptions := TSpTBXSpinEditOptions.Create; + FSpinOptions.OnGetText := SpinOptionsGetText; + FSpinOptions.OnSetText := SpinOptionsSetText; + + Alignment := taRightJustify; + Text := '0'; +end; + +destructor TSpTBXSpinEditItem.Destroy; +begin + FreeAndNil(FSpinOptions); + inherited; +end; + +function TSpTBXSpinEditItem.GetItemViewerClass(AView: TTBView): TTBItemViewerClass; +begin + if not FAllowVerticalEditor and (AView.Orientation = tbvoVertical) then + Result := inherited GetItemViewerClass(AView) + else + Result := TSpTBXSpinEditViewer; +end; + +function TSpTBXSpinEditItem.GetValue: Extended; +begin + Result := SpinOptions.Value; +end; + +procedure TSpTBXSpinEditItem.SetValue(const Value: Extended); +begin + SpinOptions.Value := Value; +end; + +function TSpTBXSpinEditItem.GetValueChanged: TNotifyEvent; +begin + Result := SpinOptions.OnValueChanged; +end; + +procedure TSpTBXSpinEditItem.SetValueChanged(const ValueChangedEvent: TNotifyEvent); +begin + SpinOptions.OnValueChanged := ValueChangedEvent; +end; + +procedure TSpTBXSpinEditItem.SpinOptionsGetText(Sender: TObject; + var NewText: WideString; var Accept: Boolean); +begin + // Event used by SpinOptions to get the text from the edit control + NewText := Text; +end; + +procedure TSpTBXSpinEditItem.SpinOptionsSetText(Sender: TObject; + const AText: WideString); +begin + // Event used by SpinOptions to set the edit control text + Text := AText; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSpinEditViewer } + +destructor TSpTBXSpinEditViewer.Destroy; +begin + FreeAndNil(FTimer); + inherited; +end; + +function TSpTBXSpinEditViewer.GetAccRole: Integer; +const + ROLE_SYSTEM_SPINBUTTON = $34; +begin + Result := ROLE_SYSTEM_SPINBUTTON; +end; + +function TSpTBXSpinEditViewer.GetIndentAfter: Integer; +begin + if IsToolbarStyle then + Result := DefaultSpinButtonSize + 1 + else + Result := GetSystemMetrics(SM_CXMENUCHECK) + 1; +end; + +function TSpTBXSpinEditViewer.GetItem: TSpTBXSpinEditItem; +begin + Result := (inherited Item) as TSpTBXSpinEditItem; +end; + +function TSpTBXSpinEditViewer.HandleEditMessage(var Message: TMessage): Boolean; +begin + if Message.Msg = WM_CHAR then + case TWMChar(Message).CharCode of + VK_TAB, VK_RETURN: + begin + Item.Text := EditControl.Text; + Item.SpinOptions.UpdateValueFromText; + EditControl.Text := Item.Text; + end; + end + else + if Message.Msg = WM_KEYDOWN then + case TWMKeyDown(Message).CharCode of + VK_UP: + begin + Item.SpinOptions.ValueInc; + EditControl.Text := Item.Text; + EditControl.SelectAll; + Result := True; + Exit; + end; + VK_DOWN: + begin + Item.SpinOptions.ValueDec; + EditControl.Text := Item.Text; + EditControl.SelectAll; + Result := True; + Exit; + end; + end; + + Result := inherited HandleEditMessage(Message); +end; + +procedure TSpTBXSpinEditViewer.InternalDrawFrame(ACanvas: TCanvas; ARect: TRect; + ItemInfo: TSpTBXMenuItemInfo); +var + IsHotTrack: Boolean; + R: TRect; +begin + inherited; + R := ARect; + InflateRect(R, -2, -2); + R.Left := ARect.Right - GetIndentAfter; + + IsHotTrack := ItemInfo.HotTrack; + SpDrawXPSpinButton(ACanvas, R, ItemInfo.Enabled, IsHotTrack, IsHotTrack, IsHotTrack, FUpPushed, FDownPushed, True, sknSkin); +end; + +procedure TSpTBXSpinEditViewer.InternalEditControlChange(Sender: TObject); +var + L, L2: Integer; +begin + if Item.ExtendedAccept then begin + Item.Text := EditControl.Text; + Item.SpinOptions.UpdateValueFromText(False); // Don't revert when an invalid text is entered + // Change the EditControl text and reposition the edit caret + L := Length(EditControl.Text); + EditControl.Text := Item.Text; + L2 := Length(EditControl.Text); + if L2 > L then + EditControl.SelStart := L + Length(Item.SpinOptions.Prefix); + end + else + inherited; +end; + +procedure TSpTBXSpinEditViewer.InternalEditControlExit; +begin + Item.Text := EditControl.Text; + Item.SpinOptions.UpdateValueFromText; + EditControl.Text := Item.Text; +end; + +procedure TSpTBXSpinEditViewer.InvalidateButtons; +var + R: TRect; +begin + if Show and not IsRectEmpty(BoundsRect) then begin + R := BoundsRect; + R.Left := R.Right - GetIndentAfter; + InvalidateRect(View.Window.Handle, @R, False); + Include(State, tbisInvalidated); + end; +end; + +function TSpTBXSpinEditViewer.IsPtInButtonPart(X, Y: Integer): Boolean; +begin + Result := X <= (BoundsRect.Right - BoundsRect.Left) - GetIndentAfter; +end; + +procedure TSpTBXSpinEditViewer.LosingCapture; +begin + FUpPushed := False; + FDownPushed := False; + FreeAndNil(FTimer); + inherited; +end; + +procedure TSpTBXSpinEditViewer.MouseDown(Shift: TShiftState; X, Y: Integer; + var MouseDownOnMenu: Boolean); +begin + if not Item.Enabled then Exit; + + FUpPushed := False; + FDownPushed := False; + + if X >= BoundsRect.Right - BoundsRect.Left - GetIndentAfter then begin + if Y < (BoundsRect.Bottom - BoundsRect.Top) div 2 then begin + FUpPushed := True; + Item.SpinOptions.ValueInc; + end + else begin + FDownPushed := True; + Item.SpinOptions.ValueDec; + end; + + if not Assigned(FTimer) then begin + FTimer := TTimer.Create(nil); + FTimer.OnTimer := TimerHandler; + end; + FTimer.Interval := 400; + FTimer.Enabled := True; + end; + + if FUpPushed or FDownPushed then begin + InvalidateButtons; + inherited; + View.SetCapture; + end + else + inherited; +end; + +procedure TSpTBXSpinEditViewer.MouseUp(X, Y: Integer; MouseWasDownOnMenu: Boolean); +begin + if FUpPushed or FDownPushed then begin + FUpPushed := False; + FDownPushed := False; + FreeAndNil(FTimer); + InvalidateButtons; + end; + inherited; +end; + +procedure TSpTBXSpinEditViewer.TimerHandler(Sender: TObject); +begin + FTimer.Interval := 100; + if FUpPushed then Item.SpinOptions.ValueInc + else + if FDownPushed then Item.SpinOptions.ValueDec + else FreeAndNil(FTimer); +end; + +end. diff --git a/internal/2.4.4/1/Source/SpTBXExtEditors.pas b/internal/2.4.4/1/Source/SpTBXExtEditors.pas new file mode 100644 index 0000000..8234abe --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXExtEditors.pas @@ -0,0 +1,1076 @@ +unit SpTBXExtEditors; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +Development notes: + - All the Windows and Delphi bugs fixes are marked with '[Bugfix]'. + - All the theme changes and adjustments are marked with '[Theme-Change]'. + +To Do: + - Rotated caption painting. + +Known Issues: + - + +History: +2 December 2009 - version 2.4.4 + - No changes. + +13 September 2009 - version 2.4.3 + - Fixed incorrect TSpTBXColorEdit behavior, when the focus + was changed the text wasn't validated, thanks to Stephan + for reporting this. + +8 May 2009 - version 2.4.2 + - No changes. + +15 March 2009 - version 2.4.1 + - No changes. + +17 January 2009 - version 2.4 + - Initial release. + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation + +uses + Windows, Messages, Classes, SysUtils, Controls, Graphics, ImgList, Forms, + Menus, StdCtrls, ExtCtrls, + SpTBXSkins, SpTBXItem, SpTBXEditors; + +type + TSpTBXColorListBoxStyle = ( + clbsStandardColors, // First 16 RGBI colors + 4 additional extended colors + clbsSystemColors, // System colors + clbsIncludeNone, // Include clNone color + clbsIncludeDefault, // Include clDefault color + clbsCustomColor, // First color is customizable + clbsPrettyNames, // Draw text with pretty names + clbsNoneAsTransparent // Draw clNone as transparent color + ); + TSpTBXColorListBoxStyles = set of TSpTBXColorListBoxStyle; + + { TSpTBXColorEditButton } + + TSpTBXColorEditButton = class(TSpTBXEditButton) + private + FSelectedColor: TColor; + procedure SetSelectedColor(const Value: TColor); + protected + function DoDrawItem(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage): Boolean; override; + function GetInternalDropDownMenu: TPopupMenu; override; + public + property SelectedColor: TColor read FSelectedColor write SetSelectedColor; + end; + + { TSpTBXColorEdit } + + TSpTBXColorEdit = class(TSpTBXEdit) + private + FColorButton: TSpTBXColorEditButton; + FSelectedFormat: TSpTBXColorTextType; + FOnSelectedColorChanged: TNotifyEvent; + function GetSelectedColor: TColor; + procedure SetSelectedColor(const Value: TColor); + procedure SetSelectedFormat(const Value: TSpTBXColorTextType); + procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; + protected + procedure KeyPress(var Key: Char); override; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure DoSelectedColorChanged; virtual; + procedure UpdateTextFromValue; + procedure UpdateValueFromText(RevertWhenInvalid: Boolean = True); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + property ColorButton: TSpTBXColorEditButton read FColorButton; + published + property Text stored False; + property SelectedColor: TColor read GetSelectedColor write SetSelectedColor; + property SelectedFormat: TSpTBXColorTextType read FSelectedFormat write SetSelectedFormat default cttIdentAndHTML; + property OnSelectedColorChanged: TNotifyEvent read FOnSelectedColorChanged write FOnSelectedColorChanged; + end; + + { TSpTBXFontComboBox } + + TSpTBXFontComboBoxPreview = class(TCustomControl) + private + FPreviewPanel: TPanel; + protected + procedure CreateParams(var Params: TCreateParams); override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + property PreviewPanel: TPanel read FPreviewPanel; + end; + + TSpTBXFontComboBox = class(TSpTBXComboBox) + private + FFontPreview: Boolean; + FFontNamePreview: Boolean; + FMaxMRUItems: Integer; + FMRUCount: Integer; + FPreviewWindow: TSpTBXFontComboBoxPreview; + FSelectedFont: TFontName; + FOnFontPreview: TSpTBXEditGetTextEvent; + procedure UpdateSelectedFont(AddMRU: Boolean); + procedure SetFontNamePreview(const Value: Boolean); + procedure SetSelectedFont(const Value: TFontName); + procedure SetMaxMRUItems(Value: Integer); + procedure SetFontPreview(const Value: Boolean); + protected + procedure Click; override; + procedure CloseUp; override; + procedure DoCalcMaxDropDownWidth; override; + procedure DoDrawItem(ACanvas: TCanvas; var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); override; + procedure DropDown; override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure MRUAdd(AFontName: TFontName); + function MRUDelete(AFontName: TFontName): Boolean; + property MRUCount: Integer read FMRUCount; + published + property Items stored False; + property AutoDropDownWidth default True; + property AutoItemHeight default False; + property FontPreview: Boolean read FFontPreview write SetFontPreview default True; + property FontNamePreview: Boolean read FFontNamePreview write SetFontNamePreview default True; + property MaxMRUItems: Integer read FMaxMRUItems write SetMaxMRUItems default 5; + property SelectedFont: TFontName read FSelectedFont write SetSelectedFont; + property OnFontPreview: TSpTBXEditGetTextEvent read FOnFontPreview write FOnFontPreview; + end; + + { TSpTBXColorListBox } + + TSpTBXColorListBox = class(TSpTBXListBox) + private + FItems: Boolean; + FNeedToPopulate: Boolean; + FSelectedColor: TColor; + FStyle: TSpTBXColorListBoxStyles; + procedure ColorCallBack(const AName: string); + function GetColorName(Index: Integer): string; + function GetColor(Index: Integer): TColor; + function GetSelected: TColor; + procedure SetSelected(const Value: TColor); + procedure SetStyle(const Value: TSpTBXColorListBoxStyles); + protected + procedure CreateWnd; override; + procedure Loaded; override; + procedure DblClick; override; + procedure KeyPress(var Key: Char); override; + procedure DoDrawItem(ACanvas: TCanvas; var ARect: TRect; Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); override; + function PickCustomColor: Boolean; + procedure PopulateList; + public + constructor Create(AOwner: TComponent); override; + procedure AddColor(AColor: TColor; AColorName: string); + function ColorCount: Integer; + property Colors[Index: Integer]: TColor read GetColor; + property ColorNames[Index: Integer]: string read GetColorName; + published + property Items: Boolean read FItems; // Hides inherited Items property + property Selected: TColor read GetSelected write SetSelected default clBlack; + property Style: TSpTBXColorListBoxStyles read FStyle write SetStyle default [clbsStandardColors, clbsSystemColors, clbsNoneAsTransparent]; // Hides inherited Style property + end; + +{ Helpers } +procedure SpFillFontNames(ADest: TStrings); + +{ Painting helpers } +procedure SpDrawCheckeredBackground(ACanvas: TCanvas; ARect: TRect); +procedure SpDrawColorDropDownButton(ACanvas: TCanvas; ARect: TRect; Pushed: Boolean; AColor: TColor; CheckeredBkgndWhenTransparent: Boolean = True); + +var + FontGlyphImgList: TImageList = nil; + +implementation + +uses + Dialogs, TB2Common, SpTBXFormPopupMenu, SpTBXColorPickerForm; + +var + DefaultColorPickerDropDownMenu: TSpTBXColorEditPopupMenu = nil; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Helpers } + +procedure SpFillFontNames(ADest: TStrings); +// This will only work on Windows 2000 and above, more info on: +// http://www.delphipraxis.net/post712587.html&sid=945c12fa9fb826d76e51c80b42109a21#712587 + + function EnumFontsProcWin9x(EnumLogFontEx: PEnumLogFontEx; NewTextMetric: PNewTextMetric; + FontType: DWORD; LParam: LPARAM): Integer; stdcall; + var + S: string; + GlyphIndex: Integer; + L: TStrings; + const + NTM_PS_OPENTYPE = $00020000; + NTM_TT_OPENTYPE = $00040000; + begin + L := TStrings(LParam); + if FontType = TRUETYPE_FONTTYPE then + GlyphIndex := 1 + else + GlyphIndex := 0; + + S := EnumLogFontEx.elfLogFont.lfFaceName; + + if (S[1] <> '@') then + if (L.Count = 0) or not SameText(S, L[L.Count - 1]) then + L.AddObject(S, Pointer(GlyphIndex)); + + Result := 1; + end; + + function EnumFontsProc(EnumLogFontExDV: PEnumLogFontExDV; EnumTextMetric: PEnumTextMetric; + FontType: DWORD; LParam: LPARAM): Integer; stdcall; + var + S: string; + GlyphIndex: Integer; + L: TStrings; + const + NTM_PS_OPENTYPE = $00020000; + NTM_TT_OPENTYPE = $00040000; + begin + L := TStrings(LParam); + GlyphIndex := 0; + if ((EnumTextMetric.etmNewTextMetricEx.ntmTm.ntmFlags and NTM_TT_OPENTYPE) = NTM_TT_OPENTYPE) or + ((EnumTextMetric.etmNewTextMetricEx.ntmTm.ntmFlags and NTM_PS_OPENTYPE) = NTM_PS_OPENTYPE) then + GlyphIndex := 2 + else + if FontType = TRUETYPE_FONTTYPE then + GlyphIndex := 1; + + S := EnumLogFontExDV.elfEnumLogfontEx.elfLogFont.lfFaceName; + + if (S[1] <> '@') then + if (L.Count = 0) or not SameText(S, L[L.Count - 1]) then + L.AddObject(S, Pointer(GlyphIndex)); + + Result := 1; + end; + +var + DC: HDC; + LFont: TLogFont; + L: TStringList; +begin + L := TStringList.Create; + DC := GetDC(0); + try + FillChar(LFont, SizeOf(LFont), 0); + LFont.lfCharset := DEFAULT_CHARSET; + if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then + EnumFontFamiliesEx(DC, LFont, @EnumFontsProcWin9x, LongInt(L), 0) + else + EnumFontFamiliesEx(DC, LFont, @EnumFontsProc, LongInt(L), 0); + L.Sort; + ADest.Assign(L); + finally + ReleaseDC(0, DC); + L.Free; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Painting helpers } + +procedure SpDrawCheckeredBackground(ACanvas: TCanvas; ARect: TRect); +// Draws a 2x2 white and silver checkered background +var + R: TRect; + I, J, HCount, WCount: Integer; +const + Size = 2; +begin + WCount := (ARect.Right - ARect.Left) div Size; + HCount := (ARect.Bottom - ARect.Top) div Size; + for J := 0 to HCount do + for I := 0 to WCount do begin + R := Bounds(ARect.Left + (I * Size), ARect.Top + (J * Size), Size, Size); + if R.Right > ARect.Right then + R.Right := ARect.Right; + if R.Bottom > ARect.Bottom then + R.Bottom := ARect.Bottom; + if (I + J) mod 2 = 0 then + ACanvas.Brush.Color := clWhite + else + ACanvas.Brush.Color := clSilver; + ACanvas.FillRect(R); + end; +end; + +procedure SpDrawColorDropDownButton(ACanvas: TCanvas; ARect: TRect; + Pushed: Boolean; AColor: TColor; CheckeredBkgndWhenTransparent: Boolean); +// Draws a button used for color editboxes +var + R: TRect; +begin + R := ARect; + + ACanvas.Brush.Color := clBtnFace; + ACanvas.FillRect(R); + if not Pushed then + SpDrawRectangle(ACanvas, R, 0, clBtnHighlight, clBtnShadow); + + InflateRect(R, -2, -2); + if (AColor = clNone) and CheckeredBkgndWhenTransparent then begin + // Draw a checkered background when clNone is used + SpDrawCheckeredBackground(ACanvas, R); + end + else begin + ACanvas.Brush.Color := AColor; + ACanvas.FillRect(R); + end; + SpDrawRectangle(ACanvas, R, 0, clBtnShadow, clBtnHighlight); + + R := ARect; + R.Left := R.Right - 9; + R.Top := R.Bottom - 7; + ACanvas.Brush.Color := clBtnFace; + ACanvas.FillRect(R); + if Pushed then + SpDrawRectangle(ACanvas, R, 0, clBtnHighlight, clBtnFace) + else + SpDrawRectangle(ACanvas, R, 0, clBtnHighlight, clBtnShadow); + SpDrawArrow(ACanvas, R.Left + (R.Right - R.Left) div 2, R.Top + (R.Bottom - R.Top) div 2 - 1, clBlack, True, False, 2); + + R := ARect; + InflateRect(R, -1, -1); + SpDrawRectangle(ACanvas, R, 0, clBtnFace, clBtnFace); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXColorEditButton } + +function TSpTBXColorEditButton.DoDrawItem(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage): Boolean; +begin + if (PaintStage = pstPrePaint) and not BitmapValid then begin + Result := True; + if Assigned(OnDraw) then OnDraw(Self, ACanvas, ARect, PaintStage, Result); + if Result then + SpDrawColorDropDownButton(ACanvas, ARect, Pushed, FSelectedColor); + end + else + Result := inherited DoDrawItem(ACanvas, ARect, PaintStage); +end; + +function TSpTBXColorEditButton.GetInternalDropDownMenu: TPopupMenu; +begin + if Assigned(DropDownMenu) then + Result := DropDownMenu + else + Result := DefaultColorPickerDropDownMenu; +end; + +procedure TSpTBXColorEditButton.SetSelectedColor(const Value: TColor); +begin + if FSelectedColor <> Value then begin + FSelectedColor := Value; + Invalidate; + if Owner is TSpTBXColorEdit then begin + TSpTBXColorEdit(Owner).UpdateTextFromValue; + TSpTBXColorEdit(Owner).DoSelectedColorChanged; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXColorEdit } + +constructor TSpTBXColorEdit.Create(AOwner: TComponent); +begin + inherited; + + FSelectedFormat := cttIdentAndHTML; + + FColorButton := TSpTBXColorEditButton.Create(Self); + FColorButton.Parent := Self; + FColorButton.FreeNotification(Self); + FColorButton.Align := alRight; + FColorButton.Width := 19; + UpdateEditRect; + + Text := 'clBlack'; +end; + +destructor TSpTBXColorEdit.Destroy; +begin + FreeAndNil(FColorButton); + inherited; +end; + +procedure TSpTBXColorEdit.DoSelectedColorChanged; +begin + if Assigned(FOnSelectedColorChanged) then FOnSelectedColorChanged(Self); +end; + +procedure TSpTBXColorEdit.KeyPress(var Key: Char); +begin + inherited; + if Key = #13 then begin + Key := #0; + UpdateValueFromText; + if FColorButton.IsDroppedDown and Assigned(ActiveFormPopupMenu) then + ActiveFormPopupMenu.ClosePopup(False); + end; +end; + +procedure TSpTBXColorEdit.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited; + if (AComponent = FColorButton) and (Operation = opRemove) then + FColorButton := nil; +end; + +function TSpTBXColorEdit.GetSelectedColor: TColor; +begin + Result := FColorButton.SelectedColor; +end; + +procedure TSpTBXColorEdit.SetSelectedColor(const Value: TColor); +begin + FColorButton.SelectedColor := Value; +end; + +procedure TSpTBXColorEdit.SetSelectedFormat(const Value: TSpTBXColorTextType); +begin + if FSelectedFormat <> Value then begin + FSelectedFormat := Value; + UpdateTextFromValue; + end; +end; + +procedure TSpTBXColorEdit.UpdateTextFromValue; +begin + if (SelectedColor = clNone) or (SelectedColor = clDefault) then + Text := ColorToString(SelectedColor) + else + Text := SpColorToString(SelectedColor, FSelectedFormat); + SelStart := Length(Text); +end; + +procedure TSpTBXColorEdit.UpdateValueFromText(RevertWhenInvalid: Boolean = True); +var + WS: WideString; + PrevValue, NewValue, C: TColor; +begin + PrevValue := SelectedColor; + NewValue := SelectedColor; + WS := Text; + + // Try to parse the text to get the value + WS := Trim(WS); + if SpStringToColor(WS, C) then + NewValue := C; + + if RevertWhenInvalid or (NewValue <> PrevValue) then begin + SetSelectedColor(NewValue); + UpdateTextFromValue; + end; +end; + +procedure TSpTBXColorEdit.WMKillFocus(var Message: TWMKillFocus); +begin + inherited; + UpdateValueFromText; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXFontComboBoxPreview } + +constructor TSpTBXFontComboBoxPreview.Create(AOwner: TComponent); +begin + inherited; + + Visible := False; + SetBounds(0, 0, 0, 0); + Color := clWindow; + FPreviewPanel := TPanel.Create(Self); + FPreviewPanel.Parent := Self; + FPreviewPanel.Color := clWindow; + FPreviewPanel.BevelOuter := bvNone; + FPreviewPanel.Align := alClient; +end; + +procedure TSpTBXFontComboBoxPreview.CreateParams(var Params: TCreateParams); +const + CS_DROPSHADOW = $00020000; +begin + inherited; + with Params do begin + Style := (Style and not (WS_CHILD or WS_GROUP or WS_TABSTOP)) or WS_POPUP; + ExStyle := ExStyle or WS_EX_TOPMOST or WS_EX_TOOLWINDOW; + WindowClass.Style := WindowClass.Style or CS_SAVEBITS; + if IsWindowsXP then + WindowClass.Style := WindowClass.Style or CS_DROPSHADOW; + end; +end; + +destructor TSpTBXFontComboBoxPreview.Destroy; +begin + FreeAndNil(FPreviewPanel); + + inherited; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXFontComboBox } + +constructor TSpTBXFontComboBox.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FAutoDropDownWidthRightMargin := 60; + FFontNamePreview := True; + FFontPreview := True; + FMaxMRUItems := 5; + FMRUCount := 0; + AutoItemHeight := False; + AutoDropDownWidth := True; + ItemHeight := 23; +end; + +destructor TSpTBXFontComboBox.Destroy; +begin + FreeAndNil(FPreviewWindow); + inherited; +end; + +procedure TSpTBXFontComboBox.Click; +begin + UpdateSelectedFont(False); + inherited; +end; + +procedure TSpTBXFontComboBox.CloseUp; +begin + UpdateSelectedFont(True); + inherited; + FreeAndNil(FPreviewWindow); +end; + +procedure TSpTBXFontComboBox.DropDown; +var + W: Integer; + P: TPoint; + Sz: TSize; + WS: WideString; +begin + inherited; + + if FFontPreview then begin + WS := 'AaBbYyZz'; + FPreviewWindow := TSpTBXFontComboBoxPreview.Create(Self); + FPreviewWindow.ParentWindow := Application.Handle; + FPreviewWindow.PreviewPanel.Font.Size := 14; + + if Assigned(FOnFontPreview) then FOnFontPreview(Self, WS); + + FPreviewWindow.PreviewPanel.Caption := WS; + Sz := SpGetControlTextSize(FPreviewWindow.PreviewPanel, FPreviewWindow.PreviewPanel.Font, WS); + Inc(Sz.cx, 100); + Inc(Sz.cy, 20); + + W := SendMessage(Handle, CB_GETDROPPEDWIDTH, 0, 0); + P := Parent.ClientToScreen(Point(Left, Top)); + + if P.X + W + Sz.cx > Screen.Width then + Dec(P.X, Sz.cx) + else + Inc(P.X, W); + if P.Y + Height + Sz.cy > Screen.Height then + Dec(P.Y, Sz.cy) + else + Inc(P.Y, Height); + FPreviewWindow.SetBounds(P.X, P.Y, Sz.cx, Sz.cy); + FPreviewWindow.Visible := True; + ShowWindow(FPreviewWindow.Handle, SW_SHOWNA); + end; +end; + +procedure TSpTBXFontComboBox.DoCalcMaxDropDownWidth; +begin + if Items.Count <= 0 then begin + {$IFNDEF UNICODE} + SpFillFontNames(Items.AnsiStrings); + {$ELSE} + SpFillFontNames(Items); + {$ENDIF} + end; + + inherited; +end; + +procedure TSpTBXFontComboBox.DoDrawItem(ACanvas: TCanvas; var ARect: TRect; + Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +var + Flags, ImageIndex: Integer; + R: TRect; +const + Spacing = 4; +begin + inherited DoDrawItem(ACanvas, ARect, Index, State, PaintStage, PaintDefault); + if (PaintStage = pstPrePaint) and PaintDefault then begin + PaintDefault := False; // Override the default painting + // Draw the item glyph if the font is TrueType/OpenType + R := ARect; + R.Left := Spacing; + R.Top := R.Top + ((R.Bottom - R.Top) - FontGlyphImgList.Height) div 2; + ImageIndex := Integer(Items.Objects[Index]) - 1; + if ImageIndex > -1 then + FontGlyphImgList.Draw(ACanvas, R.Left, R.Top, ImageIndex); + + // Draw the item text + R := ARect; + R.Left := Spacing + FontGlyphImgList.Width + Spacing; + if FFontNamePreview then + ACanvas.Font.Name := Items[Index]; + Flags := DrawTextBiDiModeFlags(DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX); + SpDrawXPText(ACanvas, Items[Index], R, Flags); + + // Draw the MRU separator line + if FMaxMRUItems > 0 then begin + if Index = MRUCount - 1 then + SpDrawLine(ACanvas, ARect.Left, ARect.Bottom - 1, ARect.Right, ARect.Bottom - 1, $C0C0C0); + if Index = MRUCount then + SpDrawLine(ACanvas, ARect.Left, ARect.Top, ARect.Right, ARect.Top, $C0C0C0); + end; + + // Update the Font of the PreviewWindow + if Assigned(FPreviewWindow) and (odSelected in State) then + FPreviewWindow.PreviewPanel.Font.Name := Items[Index]; + end; +end; + +procedure TSpTBXFontComboBox.MRUAdd(AFontName: TFontName); +var + I, AFontNameIndex: Integer; +begin + AFontNameIndex := Items.IndexOf(AFontName); + if (AFontNameIndex > -1) and (FMRUCount < Items.Count) and (FMaxMRUItems > 0) then begin + // Exit if it's already on the list + for I := 0 to FMRUCount - 1 do + if SameText(AFontName, Items[I]) then Exit; + + // Add the font to the top and delete the last MRU item if necessary + Items.InsertObject(0, Items[AFontNameIndex], Items.Objects[AFontNameIndex]); + if FMRUCount >= FMaxMRUItems then + Items.Delete(FMRUCount) + else + Inc(FMRUCount); + end; +end; + +function TSpTBXFontComboBox.MRUDelete(AFontName: TFontName): Boolean; +var + I: Integer; +begin + Result := False; + for I := 0 to FMRUCount - 1 do + if SameText(AFontName, Items[I]) then begin + Items.Delete(I); + Result := True; + Break; + end; +end; + +procedure TSpTBXFontComboBox.SetMaxMRUItems(Value: Integer); +begin + if Value < 0 then Value := 0; + if FMaxMRUItems <> Value then begin + FMaxMRUItems := Value; + while FMRUCount > FMaxMRUItems do begin + Items.Delete(FMRUCount); + Dec(FMRUCount); + end; + end; +end; + +procedure TSpTBXFontComboBox.SetFontNamePreview(const Value: Boolean); +begin + if FFontNamePreview <> Value then begin + FFontNamePreview := Value; + Invalidate; + end; +end; + +procedure TSpTBXFontComboBox.SetFontPreview(const Value: Boolean); +begin + FFontPreview := Value; +end; + +procedure TSpTBXFontComboBox.SetSelectedFont(const Value: TFontName); +var + I: Integer; +begin + I := Items.IndexOf(Value); + if ItemIndex <> I then + ItemIndex := I; + UpdateSelectedFont(True); + + // If the Value is not valid clear the text and call the click events + if I = -1 then begin + Click; + Select; + end; +end; + +procedure TSpTBXFontComboBox.UpdateSelectedFont(AddMRU: Boolean); +var + I: Integer; +begin + I := ItemIndex; + if I > -1 then begin + FSelectedFont := Items[I]; + if AddMRU then + MRUAdd(FSelectedFont); + end + else + FSelectedFont := ''; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXColorListBox } + +constructor TSpTBXColorListBox.Create(AOwner: TComponent); +begin + inherited; + FStyle := [clbsStandardColors, clbsSystemColors, clbsNoneAsTransparent]; + FSelectedColor := clBlack; + PopulateList; +end; + +procedure TSpTBXColorListBox.CreateWnd; +begin + inherited CreateWnd; + if FNeedToPopulate then + PopulateList; +end; + +procedure TSpTBXColorListBox.DblClick; +begin + inherited; + if ItemIndex = 0 then + PickCustomColor; +end; + +procedure TSpTBXColorListBox.Loaded; +begin + inherited; + Selected := FSelectedColor; + if FNeedToPopulate then + PopulateList; +end; + +procedure TSpTBXColorListBox.AddColor(AColor: TColor; AColorName: string); +begin + (inherited Items).AddObject(AColorName, TObject(AColor)); +end; + +procedure TSpTBXColorListBox.ColorCallBack(const AName: string); +var + I, LStart: Integer; + LColor: TColor; + LName: string; +begin + LColor := StringToColor(AName); + if clbsPrettyNames in Style then begin + if AName = 'clBtnFace' then LName := 'Button Face' + else if AName = 'clBtnHighlight' then LName := 'Button Highlight' + else if AName = 'clBtnShadow' then LName := 'Button Shadow' + else if AName = 'clBtnText' then LName := 'Button Text' + else if AName = 'clMedGray' then LName := 'Medium Gray' + else if AName = 'clInfoBk' then LName := 'Info Background' + else if AName = 'cl3DDkShadow' then LName := '3D Dark Shadow' + else if AName = 'cl3DLight' then LName := '3D Light' + else begin + // Remove the 'cl' prefix and separate the words with a space + if Copy(AName, 1, 2) = 'cl' then + LStart := 3 + else + LStart := 1; + LName := ''; + for I := LStart to Length(AName) do begin + case AName[I] of + 'A'..'Z': + if LName <> '' then + LName := LName + ' '; + end; + LName := LName + AName[I]; + end; + end; + end + else + LName := AName; + + AddColor(LColor, LName); +end; + +function TSpTBXColorListBox.ColorCount: Integer; +begin + Result := (inherited Items).Count; +end; + +procedure TSpTBXColorListBox.DoDrawItem(ACanvas: TCanvas; var ARect: TRect; + Index: Integer; const State: TOwnerDrawState; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +var + R: TRect; + SavedBrushColor: TColor; +begin + if PaintStage = pstPrePaint then begin + // Paint the color glyphs + R := ARect; + R.Right := R.Left + 16 + 5; + ARect.Left := R.Right + 1; + inherited DoDrawItem(ACanvas, ARect, Index, State, PaintStage, PaintDefault); + if PaintDefault then begin + SavedBrushColor := ACanvas.Brush.Color; + try + InflateRect(R, -1, -1); + + ACanvas.Brush.Color := Colors[Index]; + if (ACanvas.Brush.Color = clNone) and (clbsNoneAsTransparent in Style) then + SpDrawCheckeredBackground(ACanvas, R) + else + ACanvas.FillRect(R); + + if odSelected in State then + ACanvas.Brush.Color := clWhite + else + ACanvas.Brush.Color := clBlack; + ACanvas.FrameRect(R); + finally + ACanvas.Brush.Color := SavedBrushColor; + end; + end; + end + else + inherited DoDrawItem(ACanvas, ARect, Index, State, PaintStage, PaintDefault); +end; + +function TSpTBXColorListBox.GetColor(Index: Integer): TColor; +begin + Result := TColor((inherited Items).Objects[Index]); +end; + +function TSpTBXColorListBox.GetColorName(Index: Integer): string; +begin + Result := (inherited Items)[Index]; +end; + +function TSpTBXColorListBox.GetSelected: TColor; +begin + if HandleAllocated then + if ItemIndex <> -1 then + Result := Colors[ItemIndex] + else + Result := clNone + else + Result := FSelectedColor; +end; + +procedure TSpTBXColorListBox.KeyPress(var Key: Char); +begin + inherited KeyPress(Key); + if (clbsCustomColor in Style) and (Key = #13) and (ItemIndex = 0) then begin + Key := #0; + PickCustomColor; + end; +end; + +function TSpTBXColorListBox.PickCustomColor: Boolean; +var + LColor: TColor; + CD: TColorDialog; +begin + Result := False; + if not (clbsCustomColor in Style) then Exit; + + CD := TColorDialog.Create(nil); + try + LColor := ColorToRGB(Colors[0]); + CD.Color := LColor; + CD.CustomColors.Text := Format('ColorA=%.8x', [LColor]); + CD.Options := CD.Options + [cdFullOpen]; + Result := CD.Execute; + if Result then begin + (inherited Items).Objects[0] := TObject(CD.Color); + Invalidate; + end; + finally + CD.Free; + end; +end; + +procedure TSpTBXColorListBox.PopulateList; + + procedure DeleteRange(const AMin, AMax: Integer); + var + I: Integer; + begin + for I := AMax downto AMin do + (inherited Items).Delete(I); + end; + + procedure DeleteColor(const AColor: TColor); + var + I: Integer; + begin + I := (inherited Items).IndexOfObject(TObject(AColor)); + if I <> -1 then + (inherited Items).Delete(I); + end; + +var + LSelectedColor, LCustomColor: TColor; +begin + if HandleAllocated and not (csLoading in ComponentState) then begin + (inherited Items).BeginUpdate; + try + // Get the custom color + LCustomColor := clBlack; + if (clbsCustomColor in Style) and ((inherited Items).Count > 0) then + LCustomColor := TColor((inherited Items).Objects[0]); + + LSelectedColor := FSelectedColor; + (inherited Items).Clear; + + GetColorValues(ColorCallBack); + if not (clbsIncludeNone in Style) then + DeleteColor(clNone); + if not (clbsIncludeDefault in Style) then + DeleteColor(clDefault); + if not (clbsSystemColors in Style) then + DeleteRange(StandardColorsCount + ExtendedColorsCount, (inherited Items).Count - 1); + if not (clbsStandardColors in Style) then + DeleteRange(0, StandardColorsCount + ExtendedColorsCount - 1); + + if clbsCustomColor in Style then + (inherited Items).InsertObject(0, '...', TObject(LCustomColor)); + + Selected := LSelectedColor; + finally + (inherited Items).EndUpdate; + FNeedToPopulate := False; + end; + end + else + FNeedToPopulate := True; +end; + +procedure TSpTBXColorListBox.SetSelected(const Value: TColor); +var + I, J: Integer; +begin + if HandleAllocated then begin + I := (inherited Items).IndexOfObject(TObject(Value)); + if (I = -1) and (clbsCustomColor in Style) then begin + // If the color is not on the list add it and select it + (inherited Items).Objects[0] := TObject(Value); + I := 0; + end + else + if (clbsCustomColor in Style) and (I = 0) then begin + // Try to find the color on the list before selecting the 1st custom color + for J := 1 to (inherited Items).Count - 1 do + if (inherited Items).Objects[J] = TObject(Value) then begin + I := J; + Break; + end; + end; + + if (ItemIndex = 0) and (I = 0) then + Invalidate + else + ItemIndex := I; + end; + + FSelectedColor := Value; +end; + +procedure TSpTBXColorListBox.SetStyle(const Value: TSpTBXColorListBoxStyles); +begin + if Style <> Value then begin + FStyle := Value; + Enabled := ([clbsStandardColors, clbsSystemColors, clbsCustomColor] * FStyle) <> []; + PopulateList; + if (ColorCount > 0) and (ItemIndex = -1) then + ItemIndex := 0; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Stock Objects } + +procedure InitializeStock; +begin + Screen.Cursors[crSpTBXEyeDropper] := LoadCursor(HInstance, 'CZEYEDROPPER'); + + FontGlyphImgList := TImageList.CreateSize(12, 12); + FontGlyphImgList.ResInstLoad(HInstance, rtBitmap, 'SPTBXTRUETYPE', clFuchsia); + FontGlyphImgList.ResInstLoad(HInstance, rtBitmap, 'SPTBXOPENTYPE', clFuchsia); + + DefaultColorPickerDropDownMenu := TSpTBXColorEditPopupMenu.Create(nil); +end; + +procedure FinalizeStock; +begin + FreeAndNil(FontGlyphImgList); + FreeAndNil(DefaultColorPickerDropDownMenu); +end; + +initialization + InitializeStock; + +finalization + FinalizeStock; + +end. diff --git a/internal/2.4.4/1/Source/SpTBXFormPopupMenu.pas b/internal/2.4.4/1/Source/SpTBXFormPopupMenu.pas new file mode 100644 index 0000000..8922f78 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXFormPopupMenu.pas @@ -0,0 +1,1192 @@ +unit SpTBXFormPopupMenu; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +History: +2 December 2009 - version 2.4.4 + - Added AutoSize property to TSpTBXFormPopupMenu. + +13 September 2009 - version 2.4.3 + - No changes. + +8 May 2009 - version 2.4.2 + - No changes. + +15 March 2009 - version 2.4.1 + - No changes. + +17 January 2009 - version 2.4 + - Fixed incorrect focus handling on TSpTBXFormPopupMenu, + when a dialog is showed on top of a TSpTBXFormPopupMenu and + the app is deactivated the Popup is closed but the dialog + stays, thanks to Sertac Akyuz for reporting this. + +26 September 2008 - version 2.3 + - No changes. + +29 July 2008 - version 2.2 + - No changes. + +26 June 2008 - version 2.1 + - No changes. + +3 May 2008 - version 2.0 + - No changes. + +2 April 2008 - version 1.9.5 + - No changes. + +3 February 2008 - version 1.9.4 + - No changes. + +19 January 2008 - version 1.9.3 + - No changes. + +26 December 2007 - version 1.9.2 + - Fixed incorrect focus handling on TSpTBXFormPopupMenu, + thanks to Costas Stergiou for reporting this. + +1 December 2007 - version 1.9.1 + - Removed TBX dependency. + +20 November 2007 - version 1.9 + - Removed TBX dependency. + +8 February 2007 - version 1.8.3 + - No changes. + +17 December 2006 - version 1.8.2 + - No changes. + +24 November 2006 - version 1.8.1 + - Fixed TSpTBXFormPopupMenu resizing flicker. + +27 August 2006 - version 1.8 + - Initial release. + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation +{$I TB2Ver.inc} + +uses + Windows, Messages, Classes, SysUtils, Controls, Graphics, ImgList, Forms, + Menus, StdCtrls, TB2Item, TB2Anim, SpTBXSkins, SpTBXItem; + +const + WM_SPTBX_POPUPINVALIDATE = WM_USER + 887; + WM_SPTBX_POPUPROLLUP = WM_USER + 888; + +type + TSpTBXFormPopupMenu = class; + TSpTBXCustomWrapperPopupForm = class; + + TSpTBXPopupAnimationType = ( + patNone, + patSlide, + patFade + ); + + TSpTBXPopupBorderStyleType = ( + pbsFrame, + pbsSizeable, + pbsSizeableBottom, + pbsSizeableRightBottom + ); + + TSpTBXPopupFormState = record + PopupForm: TCustomForm; + BorderStyle: TFormBorderStyle; + BoundsRect: TRect; + end; + + TSpTBXRollDownEvent = procedure(Sender: TObject; var FormWidth, FormHeight: Integer) of object; + TSpTBXRollUpEvent = procedure(Sender: TObject; Selected: Boolean) of object; + TSpTBXGetFormClassEvent = procedure(Sender: TObject; var AFormClass: TCustomFormClass) of object; + + { TSpTBXPopupSizeGrip } + + TSpTBXPopupSizeGrip = class(TWinControl) + private + FSkinType: TSpTBXSkinType; + FOnDrawBackground: TSpTBXDrawEvent; + procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; + procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; + protected + FPopupForm: TSpTBXCustomWrapperPopupForm; + procedure DoDrawBackground(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); override; + public + constructor Create(AOwner: TComponent); override; + function GetGripRect: TRect; + function GetGripSizerRect: TRect; + function IsScreenPointInGrip(P: TPoint): Boolean; + published + property SkinType: TSpTBXSkinType read FSkinType write FSkinType default sknSkin; + property OnDrawBackground: TSpTBXDrawEvent read FOnDrawBackground write FOnDrawBackground; + end; + + { TSpTBXWrapperPopupForm } + + TSpTBXCustomWrapperPopupForm = class(TCustomForm) + private + FHooksInstalled: Boolean; + FOldAppOnMessage: TMessageEvent; + FOldPopupControlWndProc: TWndMethod; + FShowShadows: Boolean; + FAnimation: TSpTBXPopupAnimationType; + FAnimationDirection: TTBAnimationDirection; + FBorderStyle: TSpTBXPopupBorderStyleType; + FOnRollDown: TNotifyEvent; + FOnRollUp: TSpTBXRollUpEvent; + procedure SetBorderStyle(const Value: TSpTBXPopupBorderStyleType); + procedure InstallHooks; + procedure UninstallHooks; + procedure CMChildKey(var Message: TCMChildKey); message CM_CHILDKEY; + procedure CMCancelMode(var Message: TCMCancelMode); message CM_CANCELMODE; + procedure WMActivate(var Message: TWMActivate); message WM_ACTIVATE; + procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; + procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; + procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST; + procedure WMNCPaint(var Message: TMessage); message WM_NCPAINT; + procedure WMPrint(var Message: TMessage); message WM_PRINT; + procedure WMSpTBXPopupInvalidate(var Message: TMessage); message WM_SPTBX_POPUPINVALIDATE; + procedure WMSpTBXPopupRollUp(var Message: TMessage); message WM_SPTBX_POPUPROLLUP; + protected + FPopupControl: TControl; + FFormPopupMenu: TSpTBXFormPopupMenu; + FPaintingClientArea: Boolean; + FSizeGrip: TSpTBXPopupSizeGrip; + procedure CreateParams(var Params: TCreateParams); override; + procedure PaintBackground(ACanvas: TCanvas; ARect: TRect); virtual; abstract; + function GetSysAnimation: TSpTBXPopupAnimationType; + procedure AppOnMessageHook(var Msg: TMsg; var Handled: Boolean); virtual; + procedure PopupControlWindowProc(var Message: TMessage); virtual; + procedure DoRollDown; virtual; + procedure DoRollUp(Selected: Boolean); virtual; + property Animation: TSpTBXPopupAnimationType read FAnimation write FAnimation; + property AnimationDirection: TTBAnimationDirection read FAnimationDirection write FAnimationDirection default []; + property BorderStyle: TSpTBXPopupBorderStyleType read FBorderStyle write SetBorderStyle default pbsFrame; + property ShowShadows: Boolean read FShowShadows write FShowShadows default True; + property OnRollDown: TNotifyEvent read FOnRollDown write FOnRollDown; + property OnRollUp: TSpTBXRollUpEvent read FOnRollUp write FOnRollUp; + public + constructor Create(AFormPopupMenu: TSpTBXFormPopupMenu); reintroduce; virtual; + destructor Destroy; override; + procedure RollDown(X, Y, AWidth, AHeight: Integer; FocusPopup: Boolean = True); overload; virtual; + procedure RollDown(APopupControl: TControl; AWidth, AHeight: Integer; IsVertical: Boolean = False; FocusPopup: Boolean = True); overload; virtual; + procedure RollUp(Selected: Boolean; FocusParentControl: Boolean = True); virtual; + property FormPopupMenu: TSpTBXFormPopupMenu read FFormPopupMenu; + end; + + TSpTBXWrapperPopupForm = class(TSpTBXCustomWrapperPopupForm) + private + FSkinType: TSpTBXSkinType; + procedure CMShowingChanged(var Message: TMessage); message CM_SHOWINGCHANGED; + procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; + procedure SetSkinType(const Value: TSpTBXSkinType); + protected + procedure DestroyWindowHandle; override; + procedure PaintBackground(ACanvas: TCanvas; ARect: TRect); override; + public + constructor Create(AFormPopupMenu: TSpTBXFormPopupMenu); override; + destructor Destroy; override; + published + property Height; + property Width; + property BorderStyle; + property ShowShadows; + property OnRollDown; + property OnRollUp; + property SkinType: TSpTBXSkinType read FSkinType write SetSkinType default sknSkin; + end; + + { TSpTBXFormPopupMenu } + + TSpTBXFormPopupMenu = class(TPopupMenu, ISpTBXPopupMenu) + private + FAutoSize: Boolean; + FItems: Boolean; + FNotifies: TList; + FPopupFocus: Boolean; + FPopupFormState: TSpTBXPopupFormState; + FPopupFormPrevSize: TSize; + FSkinType: TSpTBXSkinType; + FOnClosePopup: TSpTBXRollUpEvent; + FOnBeforeClosePopup: TSpTBXRollUpEvent; + FOnBeforePopup: TSpTBXRollDownEvent; + FOnGetPopupFormClass: TSpTBXGetFormClassEvent; + function GetBorderStyle: TSpTBXPopupBorderStyleType; + function GetShowShadows: Boolean; + procedure SetBorderStyle(const Value: TSpTBXPopupBorderStyleType); + procedure SetShowShadows(const Value: Boolean); + procedure SetPopupForm(const Value: TCustomForm); + procedure SetSkinType(const Value: TSpTBXSkinType); + protected + FPopupForm: TCustomForm; + FWrapperForm: TSpTBXWrapperPopupForm; // Container of FPopupForm + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure BroadcastCloseMessage(Selected: Boolean); + procedure DoGetPopupFormClass(var AFormClass: TCustomFormClass); virtual; + function InternalPopup(X, Y: Integer; ForceFocus: Boolean; PopupControl: TControl = nil): Boolean; virtual; + procedure InternalClosePopup(Sender: TObject; Selected: Boolean); virtual; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Popup(X: Integer; Y: Integer); override; + procedure PopupEx(X, Y: Integer; ForceFocus: Boolean); overload; + procedure PopupEx(PopupControl: TControl; ForceFocus: Boolean); overload; + procedure AddCloseNotification(AObject: TObject); + procedure RemoveCloseNotification(AObject: TObject); + procedure ClosePopup(Selected: Boolean); + property PopupForm: TCustomForm read FPopupForm write SetPopupForm; + published + property Items: Boolean read FItems; // Hide the Items property + property AutoSize: Boolean read FAutoSize write FAutoSize default False; + property BorderStyle: TSpTBXPopupBorderStyleType read GetBorderStyle write SetBorderStyle default pbsFrame; + property PopupFocus: Boolean read FPopupFocus write FPopupFocus default False; + property ShowShadows: Boolean read GetShowShadows write SetShowShadows default True; + property SkinType: TSpTBXSkinType read FSkinType write SetSkinType default sknSkin; + property OnClosePopup: TSpTBXRollUpEvent read FOnClosePopup write FOnClosePopup; + property OnBeforeClosePopup: TSpTBXRollUpEvent read FOnBeforeClosePopup write FOnBeforeClosePopup; + property OnBeforePopup: TSpTBXRollDownEvent read FOnBeforePopup write FOnBeforePopup; + property OnGetPopupFormClass: TSpTBXGetFormClassEvent read FOnGetPopupFormClass write FOnGetPopupFormClass; + end; + +var + ActiveFormPopupMenu: TSpTBXFormPopupMenu = nil; + +implementation + +uses + Themes, UxTheme, Types, TB2Common, TB2Acc; + +const + DefaultBorderSize = 2; + +type + TCustomFormAccess = class(TCustomForm); + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXPopupSizeGrip } + +constructor TSpTBXPopupSizeGrip.Create(AOwner: TComponent); +begin + inherited; + if Assigned(AOwner) and (AOwner is TSpTBXCustomWrapperPopupForm) then + FPopupForm := AOwner as TSpTBXCustomWrapperPopupForm; + FSkinType := sknSkin; + Align := alBottom; + Height := 10; +end; + +procedure TSpTBXPopupSizeGrip.DoDrawBackground(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawBackground) then FOnDrawBackground(Self, ACanvas, ARect, PaintStage, PaintDefault); +end; + +function TSpTBXPopupSizeGrip.GetGripRect: TRect; +begin + // Return the rect of the area that is sizeable. + // If BorderStyle = pbsSizeableRightBottom the sizeable area is the + // bottom right corner, when BorderStyle = pbsSizeableRightBottom the + // sizeable area is the client rect of the SizeGrip + Result := Rect(0, 0, 0, 0); + if not (csDestroying in ComponentState) and Assigned(FPopupForm) and + (FPopupForm.FBorderStyle in [pbsSizeableBottom, pbsSizeableRightBottom]) then + begin + Result := ClientRect; + if FPopupForm.BorderStyle = pbsSizeableRightBottom then + Result := GetGripSizerRect + else + Result := ClientRect; + end; +end; + +function TSpTBXPopupSizeGrip.GetGripSizerRect: TRect; +begin + // Return the rect of the grip sizer, the area that has the + // dots on the sizer. + Result := Rect(0, 0, 0, 0); + if not (csDestroying in ComponentState) and Assigned(FPopupForm) then begin + case FPopupForm.BorderStyle of + pbsSizeableBottom: + begin + Result := ClientRect; + Result.Left := (Result.Right + Result.Left - 20) div 2; + Result.Right := Result.Left + 20; + end; + pbsSizeableRightBottom: + begin + Result := ClientRect; + Result.Left := Result.Right - 14; + end; + end; + end; +end; + +function TSpTBXPopupSizeGrip.IsScreenPointInGrip(P: TPoint): Boolean; +var + GR: TRect; +begin + Result := False; + P := ScreenToClient(P); + GR := GetGripRect; + if not IsRectEmpty(GR) and PtInRect(GR, P) then + Result := True; +end; + +procedure TSpTBXPopupSizeGrip.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +var + P: TPoint; +const + SC_SizeDown = $F006; + SC_SizeDownRight = $F008; +begin + // Resize the StatusBar if the parent is TSpTBXTitleBar + if not (csDesigning in ComponentState) and (Button = mbLeft) and Assigned(FPopupForm) then begin + P := ClientToScreen(Point(X, Y)); + if IsScreenPointInGrip(P) then begin + ReleaseCapture; + case FPopupForm.BorderStyle of + pbsSizeableBottom: + SendMessage(FPopupForm.Handle, WM_SYSCOMMAND, SC_SizeDown, 0); + pbsSizeableRightBottom: + SendMessage(FPopupForm.Handle, WM_SYSCOMMAND, SC_SizeDownRight, 0); + end; + Exit; + end; + end; + + inherited; +end; + +procedure TSpTBXPopupSizeGrip.WMEraseBkgnd(var Message: TWMEraseBkgnd); +var + ACanvas: TCanvas; + PaintDefault: Boolean; + R, GR, CellR: TRect; + C1, C2: TColor; + T: TSpTBXSkinType; +begin + Message.Result := 1; + if (csDestroying in ComponentState) then Exit; + + ACanvas := TCanvas.Create; + ACanvas.Handle := Message.DC; + try + R := ClientRect; + T := SpTBXSkinType(FSkinType); + + // Draw the background + PaintDefault := True; + DoDrawBackground(ACanvas, R, pstPrePaint, PaintDefault); + if PaintDefault then begin + GR := Rect(0, 0, 0, 0); + SpDrawXPStatusBar(ACanvas, R, GR, T); + end; + + // Draw the grip + PaintDefault := True; + DoDrawBackground(ACanvas, R, pstPostPaint, PaintDefault); + if PaintDefault then begin + C1 := SkinManager.CurrentSkin.Options(skncStatusBarGrip).Body.Color1; + if (C1 = clNone) or (T <> sknSkin) then C1 := clBtnShadow; + C2 := SkinManager.CurrentSkin.Options(skncStatusBarGrip).Body.Color2; + if (C2 = clNone) or (T <> sknSkin) then C2 := clBtnHighlight; + // Grip cells are 4x4 pixels + case FPopupForm.BorderStyle of + pbsSizeableBottom: + begin + GR := GetGripSizerRect; + CellR := GR; + CellR.Top := (CellR.Top + CellR.Bottom - 4) div 2 + 1; + CellR.Bottom := CellR.Top + 3; + SpDrawXPGrip(ACanvas, CellR, C1, C2); + end; + pbsSizeableRightBottom: + begin + GR := GetGripSizerRect; + CellR := GR; + // Draw 2 cells at the bottom + CellR.Left := GR.Right - 8; + CellR.Top := CellR.Bottom - 4; + SpDrawXPGrip(ACanvas, CellR, C1, C2); + // Draw 1 cell at the top + CellR.Bottom := CellR.Top; + CellR.Top := CellR.Bottom - 4; + CellR.Left := CellR.Left + 4; + SpDrawXPGrip(ACanvas, CellR, C1, C2); + end; + end; + end; + finally + ACanvas.Handle := 0; + ACanvas.Free; + end; +end; + +procedure TSpTBXPopupSizeGrip.WMSetCursor(var Message: TWMSetCursor); +var + P: TPoint; +begin + if not (csDesigning in ComponentState) and (Message.CursorWnd = Handle) and + (Screen.Cursor = crDefault) and Assigned(FPopupForm) then + begin + GetCursorPos(P); + if IsScreenPointInGrip(P) then begin + case FPopupForm.BorderStyle of + pbsSizeableBottom: + Windows.SetCursor(Screen.Cursors[-7]); + pbsSizeableRightBottom: + Windows.SetCursor(Screen.Cursors[-8]); + end; + Message.Result := 1; + Exit; + end; + end; + + inherited; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomWrapperPopupForm } + +constructor TSpTBXCustomWrapperPopupForm.Create(AFormPopupMenu: TSpTBXFormPopupMenu); +begin + // Form doesn't have DFM info + inherited CreateNew(nil); + + Visible := False; + SetBounds(0, 0, 0, 0); + FFormPopupMenu := AFormPopupMenu; + FAnimation := GetSysAnimation; + FAnimationDirection := []; + FShowShadows := True; + FSizeGrip := TSpTBXPopupSizeGrip.Create(Self); + FSizeGrip.Parent := Self; +end; + +procedure TSpTBXCustomWrapperPopupForm.CreateParams(var Params: TCreateParams); +begin + inherited; + if not (csDesigning in ComponentState) then + with Params do begin + Style := WS_POPUP or WS_CLIPCHILDREN; + + // Add the thickframe on all the BorderStyles + // We should handle the NC HitTest + Style := Style or WS_THICKFRAME; + + ExStyle := WS_EX_TOPMOST or WS_EX_TOOLWINDOW; + WindowClass.Style := WindowClass.Style or CS_SAVEBITS; + if IsWindowsXP then + WindowClass.Style := WindowClass.Style or CS_DROPSHADOW; + end; +end; + +destructor TSpTBXCustomWrapperPopupForm.Destroy; +begin + FreeAndNil(FSizeGrip); + inherited; +end; + +procedure TSpTBXCustomWrapperPopupForm.DoRollDown; +begin + if Assigned(FOnRollDown) then FOnRollDown(Self); +end; + +procedure TSpTBXCustomWrapperPopupForm.DoRollUp(Selected: Boolean); +begin + if Assigned(FOnRollUp) then FOnRollUp(Self, Selected); +end; + +function TSpTBXCustomWrapperPopupForm.GetSysAnimation: TSpTBXPopupAnimationType; +const + SPI_GETMENUFADE = $1012; +var + Animate: BOOL; +begin + Result := patNone; + if SystemParametersInfo(SPI_GETMENUANIMATION, 0, @Animate, 0) and Animate then + if SystemParametersInfo(SPI_GETMENUFADE, 0, @Animate, 0) and Animate then + Result := patFade + else + Result := patSlide; +end; + +procedure TSpTBXCustomWrapperPopupForm.RollDown(X, Y, AWidth, + AHeight: Integer; FocusPopup: Boolean = True); +begin + if not Visible then begin + ActiveFormPopupMenu := FFormPopupMenu; // Set global variable used by RollUp + // If FPopupControl is nil we should use the ActiveForm to set focus on RollUp + if not Assigned(FPopupControl) then + FPopupControl := Screen.ActiveForm; + // Increase the size of the form if the size grip is visible + if FBorderStyle in [pbsSizeableBottom, pbsSizeableRightBottom] then begin + FSizeGrip.Visible := True; + AHeight := AHeight + FSizeGrip.Height; + end + else + FSizeGrip.Visible := False; + + InstallHooks; + HandleNeeded; // We need the handle to set the Bounds and deactivate Vista form thick borders + SetBounds(X, Y, AWidth, AHeight); + SpActivateDwmNC(Self, False); + // Make sure it will be showed on top of all the forms/dialogs + SetWindowPos(WindowHandle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE); + Visible := True; + if FocusPopup then + SetFocus; + DoRollDown; + end; +end; + +procedure TSpTBXCustomWrapperPopupForm.RollDown(APopupControl: TControl; + AWidth, AHeight: Integer; IsVertical: Boolean = False; + FocusPopup: Boolean = True); +var + P, Size: TPoint; +begin + if Assigned(APopupControl) and Assigned(APopupControl.Parent) then begin + FPopupControl := APopupControl; + // Increase the size of the form if the size grip is visible + Size.X := AWidth; + Size.Y := AHeight; + if FBorderStyle in [pbsSizeableBottom, pbsSizeableRightBottom] then + Size.Y := Size.Y + FSizeGrip.Height; + + P := SpCalcPopupPosition(0, 0, Size.X, Size.Y, APopupControl, IsVertical); + RollDown(P.X, P.Y, AWidth, AHeight, FocusPopup); + end; +end; + +procedure TSpTBXCustomWrapperPopupForm.RollUp(Selected: Boolean; FocusParentControl: Boolean = True); +var + W: TWinControl; + Msg: TMessage; +begin + // Instead of checking for Self.Visible check if the actual wrapped form + // is visible. + if FFormPopupMenu.PopupForm.Visible then begin + UninstallHooks; + + if Assigned(FPopupControl) and (FPopupControl is TWinControl) then begin + W := FPopupControl as TWinControl; + if FocusParentControl and W.CanFocus then + W.SetFocus; + // Send a message to the PopupControl and it's children controls + // to inform that the Popup was closed. + Msg.Msg := CM_SPPOPUPCLOSE; + Msg.WParam := Integer(Self); + if Selected then + Msg.LParam := 1 + else + Msg.LParam := 0; + Msg.Result := 0; + PostMessage(W.Handle, Msg.Msg, Msg.WParam, Msg.LParam); + W.Broadcast(Msg); + end; + + Visible := False; + + // Broadcast the close message to all the notifies + if Assigned(ActiveFormPopupMenu) then + ActiveFormPopupMenu.BroadcastCloseMessage(Selected); + ActiveFormPopupMenu := nil; // Reset global variable + FPopupControl := nil; + DoRollUp(Selected); + end; +end; + +procedure TSpTBXCustomWrapperPopupForm.SetBorderStyle(const Value: TSpTBXPopupBorderStyleType); +begin + if FBorderStyle <> Value then + FBorderStyle := Value; +end; + +procedure TSpTBXCustomWrapperPopupForm.InstallHooks; +begin + if not FHooksInstalled then begin + FHooksInstalled := True; + + // Needed to handle main form mouse clicks when the popup is visible + FOldAppOnMessage := Application.OnMessage; + Application.OnMessage := AppOnMessageHook; + + if Assigned(FPopupControl) then begin + // Needed to handle focus changes when the popup is visible but the + // ParentControl has the focus, like the Comboboxes + FOldPopupControlWndProc := FPopupControl.WindowProc; + FPopupControl.WindowProc := PopupControlWindowProc; + end; + end; +end; + +procedure TSpTBXCustomWrapperPopupForm.UninstallHooks; +begin + if FHooksInstalled then begin + FHooksInstalled := False; + + Application.OnMessage := FOldAppOnMessage; + FOldAppOnMessage := nil; + + if Assigned(FPopupControl) then begin + FPopupControl.WindowProc := FOldPopupControlWndProc; + FOldPopupControlWndProc := nil; + end; + end; +end; + +procedure TSpTBXCustomWrapperPopupForm.AppOnMessageHook(var Msg: TMsg; var Handled: Boolean); +begin + if Assigned(FOldAppOnMessage) then FOldAppOnMessage(Msg, Handled); + + if not IsWindowEnabled(Handle) then begin + Handled := False; + Exit; + end; + + case Msg.message of + CM_DEACTIVATE: + begin + // Rollup when the popup is deactivated + // Instead of calling Rollup post a message so the + // Application.OnMessage is processed before + // the popup is closed, this is needed to handle + // the mouse clicks on the main form + PostMessage(Handle, WM_SPTBX_POPUPROLLUP, 0, 0); // Set FocusParentControl param to False + end; + WM_LBUTTONDOWN, WM_RBUTTONDOWN, WM_MBUTTONDOWN: + // If the click was not on the popup, rollup and Handle the message + if (GetCapture = 0) and (Msg.hwnd <> Handle) and not Windows.IsChild(Handle, Msg.hwnd) then + if Assigned(FPopupControl) and not (FPopupControl is TCustomForm) and (FPopupControl is TWinControl) then begin + if Msg.hwnd <> TWinControl(FPopupControl).Handle then begin + Handled := True; + RollUp(False); + end; + end + else begin + Handled := True; + RollUp(False); + end; + WM_NCLBUTTONDOWN..WM_NCMBUTTONDBLCLK: + // If the click was not on the popup, rollup and Handle the message + if (Msg.hwnd <> Handle) and not Windows.IsChild(Handle, Msg.hwnd) then begin + Handled := True; + RollUp(False); + end; + end; +end; + +procedure TSpTBXCustomWrapperPopupForm.PopupControlWindowProc(var Message: TMessage); +begin + if Assigned(FOldPopupControlWndProc) then FOldPopupControlWndProc(Message); + + if Visible then + case Message.Msg of + CM_FOCUSCHANGED: + // Rollup when the popup is deactivated + // Instead of calling Rollup post a message so the + // Application.OnMessage is processed before + // the popup is closed, this is needed to handle + // the focus change on the main form + PostMessage(Handle, WM_SPTBX_POPUPROLLUP, 0, 0); // Set FocusParentControl param to False + CM_CHILDKEY: + if Message.WParam = VK_ESCAPE then + RollUp(False); +// CM_CANCELMODE: +// RollUp(False); + end; +end; + +procedure TSpTBXCustomWrapperPopupForm.CMCancelMode(var Message: TCMCancelMode); +begin + inherited; + RollUp(False); +end; + +procedure TSpTBXCustomWrapperPopupForm.CMChildKey(var Message: TCMChildKey); +begin + inherited; + if Message.CharCode = VK_ESCAPE then + RollUp(False); +end; + +procedure TSpTBXCustomWrapperPopupForm.WMActivate(var Message: TWMActivate); +begin + inherited; + if Message.Active = WA_INACTIVE then begin + // Rollup when the popup is deactivated + // Instead of calling Rollup post a message so the + // Application.OnMessage is processed before + // the popup is closed, this is needed to handle + // the mouse clicks on the main form +// PostMessage(Handle, WM_SPTBX_POPUPROLLUP, 0, 1); +// ^ Not needed + end + else begin + // When the popup is activated redraw the caption bar of the Main Form + // And invalidate the client and non client area + SendMessage(Message.ActiveWindow, WM_NCACTIVATE, 1, 0); + // Post the invalidate message on Vista to repaint the form borders + if SpIsWinVistaOrUp then + PostMessage(Handle, WM_SPTBX_POPUPINVALIDATE, 0, 0); + end; +end; + +procedure TSpTBXCustomWrapperPopupForm.WMNCCalcSize(var Message: TWMNCCalcSize); +begin + Message.Result := 0; + InflateRect(Message.CalcSize_Params^.rgrc[0], -DefaultBorderSize, -DefaultBorderSize); +end; + +procedure TSpTBXCustomWrapperPopupForm.WMNCHitTest(var Message: TWMNCHitTest); +var + P: TPoint; + GR: TRect; + HitOnBorder: Boolean; +begin + inherited; + + HitOnBorder := Message.Result in [HTLEFT, HTTOP, HTTOPLEFT, HTTOPRIGHT, HTRIGHT, HTBOTTOM, HTBOTTOMLEFT, HTBOTTOMRIGHT]; + + if HitOnBorder then + case FBorderStyle of + pbsFrame: + Message.Result := HTNOWHERE; + pbsSizeableBottom: + begin + // Make the NC area resizeable + Message.Result := HTNOWHERE; + P := FSizeGrip.ScreenToClient(SmallPointToPoint(Message.Pos)); + GR := FSizeGrip.GetGripRect; + if P.Y >= GR.Top then + Message.Result := HTBOTTOM; + end; + pbsSizeableRightBottom: + begin + // Make the NC area resizeable + Message.Result := HTNOWHERE; + P := FSizeGrip.ScreenToClient(SmallPointToPoint(Message.Pos)); + GR := FSizeGrip.GetGripRect; + if P.Y >= GR.Top then + if P.X >= GR.Left then + Message.Result := HTBOTTOMRIGHT; + end; + end; +end; + +procedure PopupWindowNCPaintProc(Wnd: HWND; DC: HDC; AppData: TObject); +// Paints the NC area and the client background, used by WMEraseBkgnd, WMNCPaint, WMPrint +var + ACanvas: TCanvas; + R: TRect; + PopupWindow: TSpTBXCustomWrapperPopupForm; +begin + ACanvas := TCanvas.Create; + try + ACanvas.Handle := DC; + GetWindowRect(Wnd, R); + OffsetRect(R, -R.Left, -R.Top); + + // If it's used by WM_ERASEBKGND offset the rect + PopupWindow := TSpTBXCustomWrapperPopupForm(AppData); + if PopupWindow.FPaintingClientArea then begin + PopupWindow.FPaintingClientArea := False; + OffsetRect(R, -DefaultBorderSize, -DefaultBorderSize); + end; + + PopupWindow.PaintBackground(ACanvas, R); + finally + ACanvas.Handle := 0; + ACanvas.Free; + end; +end; + +procedure TSpTBXCustomWrapperPopupForm.WMEraseBkgnd(var Message: TWMEraseBkgnd); +begin + // There's no need to call PopupWindowNCPaintProc here, because the + // ClientArea is filled with the child Form + Message.Result := 1; +end; + +procedure TSpTBXCustomWrapperPopupForm.WMNCPaint(var Message: TMessage); +var + DC: HDC; +begin + DC := GetWindowDC(Handle); + try + FPaintingClientArea := False; + SelectNCUpdateRgn(Handle, DC, HRGN(Message.WParam)); + PopupWindowNCPaintProc(Handle, DC, Self); + finally + ReleaseDC(Handle, DC); + end; +end; + +procedure TSpTBXCustomWrapperPopupForm.WMPrint(var Message: TMessage); +begin + FPaintingClientArea := False; + HandleWMPrint(Handle, Message, PopupWindowNCPaintProc, Self); +end; + +procedure TSpTBXCustomWrapperPopupForm.WMSpTBXPopupInvalidate(var Message: TMessage); +begin + if HandleAllocated then + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_FRAME); +end; + +procedure TSpTBXCustomWrapperPopupForm.WMSpTBXPopupRollUp(var Message: TMessage); +var + Selected, FocusParentControl: Boolean; +begin + Selected := Message.WParam <> 0; + FocusParentControl := Message.LParam <> 0; + RollUp(Selected, FocusParentControl); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXWrapperPopupForm } + +constructor TSpTBXWrapperPopupForm.Create(AFormPopupMenu: TSpTBXFormPopupMenu); +begin + inherited; + FSkinType := sknSkin; +end; + +destructor TSpTBXWrapperPopupForm.Destroy; +begin + Destroying; + if HandleAllocated then + DestroyWindowHandle; + inherited; +end; + +procedure TSpTBXWrapperPopupForm.DestroyWindowHandle; +begin + { Cleanly destroy any timers before the window handle is destroyed } + CallNotifyWinEvent(EVENT_SYSTEM_MENUPOPUPEND, WindowHandle, OBJID_CLIENT, CHILDID_SELF); + inherited; +end; + +procedure TSpTBXWrapperPopupForm.CMShowingChanged(var Message: TMessage); +const + ShowFlags: array[Boolean] of UINT = ( + SWP_NOSIZE or SWP_NOMOVE or SWP_NOZORDER or SWP_NOACTIVATE or SWP_HIDEWINDOW, + SWP_NOSIZE or SWP_NOMOVE or SWP_NOZORDER or SWP_NOACTIVATE or SWP_SHOWWINDOW); +var + Blend: Boolean; +begin + { Must override TCustomForm/TForm's CM_SHOWINGCHANGED handler so that the + form doesn't get activated when Visible is set to True. } + + { Handle animation } + if Showing and not IsWindowVisible(WindowHandle) and (Animation <> patNone) then + begin + Blend := Animation = patFade; + if Assigned(AnimateWindowProc) and (Blend or (FAnimationDirection <> [])) then begin + AnimateWindowProc(Handle, 150, AW_BLEND); + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN); + Exit; + end; + end; + + { No animation... } + SetWindowPos(WindowHandle, 0, 0, 0, 0, 0, ShowFlags[Showing]); + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN); +end; + +procedure TSpTBXWrapperPopupForm.PaintBackground(ACanvas: TCanvas; ARect: TRect); +begin + SpDrawXPMenuPopupWindow(ACanvas, ARect, Rect(0, 0, 0, 0), False, 0, FSkinType); +end; + +procedure TSpTBXWrapperPopupForm.SetSkinType(const Value: TSpTBXSkinType); +begin + if FSkinType <> Value then begin + FSkinType := Value; + FSizeGrip.SkinType := Value; + end; +end; + +procedure TSpTBXWrapperPopupForm.WMEraseBkgnd(var Message: TWMEraseBkgnd); +begin + Message.Result := 1; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXFormPopupMenu } + +constructor TSpTBXFormPopupMenu.Create(AOwner: TComponent); +begin + inherited; + FSkinType := sknSkin; + FNotifies := TList.Create; + FWrapperForm := TSpTBXWrapperPopupForm.Create(Self); + FWrapperForm.OnRollUp := InternalClosePopup; +end; + +destructor TSpTBXFormPopupMenu.Destroy; +var + FC: TCustomFormClass; +begin + if Assigned(FPopupForm) then + FPopupForm.Parent := nil; + // Free the PopupForm if the OnGetPopupFormClass event returns + // a valid form class. + FC := nil; + DoGetPopupFormClass(FC); + if Assigned(FC) then + FreeAndNil(FPopupForm); + + FreeAndNil(FNotifies); + FreeAndNil(FWrapperForm); + inherited; +end; + +procedure TSpTBXFormPopupMenu.DoGetPopupFormClass(var AFormClass: TCustomFormClass); +begin + if Assigned(FOnGetPopupFormClass) then FOnGetPopupFormClass(Self, AFormClass); +end; + +procedure TSpTBXFormPopupMenu.AddCloseNotification(AObject: TObject); +begin + if Assigned(AObject) then + if FNotifies.IndexOf(AObject) < 0 then FNotifies.Add(AObject); +end; + +procedure TSpTBXFormPopupMenu.RemoveCloseNotification(AObject: TObject); +begin + FNotifies.Remove(AObject); +end; + +procedure TSpTBXFormPopupMenu.BroadcastCloseMessage(Selected: Boolean); +var + Msg: TMessage; + I: Integer; +begin + if FNotifies.Count > 0 then begin + Msg.Msg := CM_SPPOPUPCLOSE; + Msg.WParam := Integer(FWrapperForm); + if Selected then + Msg.LParam := 1 + else + Msg.LParam := 0; + Msg.Result := 0; + for I := 0 to FNotifies.Count - 1 do + TObject(FNotifies[I]).Dispatch(Msg); + end; +end; + +procedure TSpTBXFormPopupMenu.ClosePopup(Selected: Boolean); +begin + // Instead of calling Rollup post a message so the Application.OnMessage is + // processed before the popup is closed, this is needed to handle the mouse + // clicks on the main form. + PostMessage(FWrapperForm.Handle, WM_SPTBX_POPUPROLLUP, Integer(Selected), 1); +end; + +procedure TSpTBXFormPopupMenu.InternalClosePopup(Sender: TObject; Selected: Boolean); +var + FC: TCustomFormClass; +begin + if Assigned(FOnBeforeClosePopup) then FOnBeforeClosePopup(Self, Selected); + + if Assigned(FPopupForm) then begin + if FAutoSize then begin + FPopupFormPrevSize.cx := FPopupForm.ClientRect.Right; + FPopupFormPrevSize.cy := FPopupForm.ClientRect.Bottom; + end; + FPopupForm.Visible := False; + FPopupForm.Parent := nil; + FPopupForm.Align := alNone; + if FPopupFormState.PopupForm = FPopupForm then begin + FPopupForm.BorderStyle := FPopupFormState.BorderStyle; + FPopupForm.BoundsRect := FPopupFormState.BoundsRect; + end; + end; + + if Assigned(FOnClosePopup) then FOnClosePopup(Self, Selected); + + // Free the PopupForm if the OnGetPopupFormClass event returns + // a valid form class. + FC := nil; + DoGetPopupFormClass(FC); + if Assigned(FC) then + FreeAndNil(FPopupForm); +end; + +function TSpTBXFormPopupMenu.InternalPopup(X, Y: Integer; ForceFocus: Boolean; + PopupControl: TControl = nil): Boolean; +var + ClientR: TRect; + FC: TCustomFormClass; +begin + Result := False; + + {$IFDEF JR_D9} + SetPopupPoint(Point(X, Y)); + {$ELSE} + PPoint(@PopupPoint)^ := Point(X, Y); + {$ENDIF} + + // Create the PopupForm if the OnGetPopupFormClass event returns + // a valid form class. + // Otherwise try to use the assigned PopupForm property. + FC := nil; + DoGetPopupFormClass(FC); + if Assigned(FC) then + FPopupForm := FC.Create(nil); + + // Use the WrapperForm to show the PopupForm + if Assigned(FPopupForm) then begin + FPopupFormState.PopupForm := FPopupForm; + FPopupFormState.BorderStyle := FPopupForm.BorderStyle; + FPopupFormState.BoundsRect := FPopupForm.BoundsRect; + + ClientR := FPopupForm.ClientRect; + if FAutoSize and (FPopupFormPrevSize.cx > 0) and (FPopupFormPrevSize.cy > 0) then begin + ClientR.Right := FPopupFormPrevSize.cx; + ClientR.Bottom := FPopupFormPrevSize.cy; + end; + + FPopupForm.Parent := FWrapperForm; + FPopupForm.Align := alClient; + FPopupForm.BorderStyle := bsNone; + FPopupForm.Visible := True; + + if Assigned(FOnBeforePopup) then FOnBeforePopup(Self, ClientR.Right, ClientR.Bottom); + + if Assigned(PopupControl) then + FWrapperForm.RollDown(PopupControl, ClientR.Right + DefaultBorderSize * 2, ClientR.Bottom + DefaultBorderSize * 2, False, ForceFocus) + else + FWrapperForm.RollDown(X, Y, ClientR.Right + DefaultBorderSize * 2, ClientR.Bottom + DefaultBorderSize * 2, ForceFocus); + + if Assigned(OnPopup) then OnPopup(Self); + Result := True; + end; +end; + +procedure TSpTBXFormPopupMenu.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited; + if Operation = opRemove then + if AComponent = PopupForm then begin + // Weird Delphi IDE bug at design time. + // When a Form is closed at design time it will fire the + // FreeNotification, setting PopupForm to nil and not + // saving it to the dfm + + SetPopupForm(nil); + + { TODO : Delphi IDE bug } + // This line doesn't seem to fix it, it raises AVs in the IDE + // PopupForm shouldn't be published. + // if not (csDesigning in ComponentState) then + // SetPopupForm(nil); + end; +end; + +procedure TSpTBXFormPopupMenu.Popup(X, Y: Integer); +begin + InternalPopup(X, Y, FPopupFocus); +end; + +procedure TSpTBXFormPopupMenu.PopupEx(X, Y: Integer; ForceFocus: Boolean); +begin + InternalPopup(X, Y, ForceFocus); +end; + +procedure TSpTBXFormPopupMenu.PopupEx(PopupControl: TControl; ForceFocus: Boolean); +begin + InternalPopup(0, 0, ForceFocus, PopupControl); +end; + +function TSpTBXFormPopupMenu.GetBorderStyle: TSpTBXPopupBorderStyleType; +begin + Result := FWrapperForm.BorderStyle; +end; + +function TSpTBXFormPopupMenu.GetShowShadows: Boolean; +begin + Result := FWrapperForm.ShowShadows; +end; + +procedure TSpTBXFormPopupMenu.SetBorderStyle(const Value: TSpTBXPopupBorderStyleType); +begin + FWrapperForm.BorderStyle := Value; +end; + +procedure TSpTBXFormPopupMenu.SetPopupForm(const Value: TCustomForm); +begin + if FPopupForm <> Value then begin + if FWrapperForm.Visible then + ClosePopup(False); + + if Assigned(FPopupForm) then + FPopupForm.RemoveFreeNotification(Self); + + FPopupForm := Value; + if Assigned(FPopupForm) then + FPopupForm.FreeNotification(Self); + end; +end; + +procedure TSpTBXFormPopupMenu.SetShowShadows(const Value: Boolean); +begin + FWrapperForm.ShowShadows := Value; +end; + +procedure TSpTBXFormPopupMenu.SetSkinType(const Value: TSpTBXSkinType); +begin + if FSkinType <> Value then begin + FSkinType := Value; + FWrapperForm.SkinType := Value; + end; +end; + +end. diff --git a/internal/2.4.4/1/Source/SpTBXGlyphs.res b/internal/2.4.4/1/Source/SpTBXGlyphs.res new file mode 100644 index 0000000..ce753b7 Binary files /dev/null and b/internal/2.4.4/1/Source/SpTBXGlyphs.res differ diff --git a/internal/2.4.4/1/Source/SpTBXItem.pas b/internal/2.4.4/1/Source/SpTBXItem.pas new file mode 100644 index 0000000..26b5827 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXItem.pas @@ -0,0 +1,10073 @@ +unit SpTBXItem; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +Wish list for TB2K: + - tboSameHeight option for toolbar items, used to stretch the item + to the highest possible size. + - It would be nice to have a way to get the TTBItemViewer width and height + even when the Item is not visible (TTBItemViewer.BoundsRect is not valid + when the item is not visible). + As a workaround we should use TTBItemViewer.CalcSize method. + - It would be nice to allow component writers to override + TTBCustomToolbar.CreateWrapper so they can create custom TTBControlItem + items descendants as the dropped control wrappers. + - It would be nice to have access to the TTBPopupMenu Viewer before the + popup is showed to initialize the items, for example to set the focus + on a TTBEditItem. + +Development notes: + - All the Windows and Delphi bugs fixes are marked with '[Bugfix]'. + - All the theme changes and adjustments are marked with '[Theme-Change]'. + - All the compatibility changes are marked with '[Backward-Compatibility]'. + - TSpTBXCompoundItemsControl is used as the base class for TB2K items enabled + Controls, it uses the ITBItems interface and streams the items to the DFM. + - When a control is dropped on the toolbar a TTBControlItem is created by + TTBCustomToolbar.CreateWrapper, unfortunately it is created with the + Toolbar.Owner instead of the Form (Owner.Owner for TSpTBXCompoundItemsControl + like the TSpTBXTabSet or TSpTBXStatusBar). The workaround is to handle the + CM_CONTROLCHANGE message in the compound toolbar, stream all the + TTBControlItem.Control to the DFM (the TSpTBXCompoundItemsControl must be + the parent in the DFM), and finally reset the TTBControlItem.Control + parentship to the Toolbar in TSpTBXCompoundItemsControl.Loaded. + +To Do: + - + +History: +2 December 2009 - version 2.4.4 + - Fixed bug in SpSetFormWindowState utility function, the Form + was not restored correctly, thanks to Alex Yagolnik for + reporting this. + - Fixed incorrect TSpTBXPopupWindow items margins, thanks to + Pedro Vugluskra for reporting this. + +13 September 2009 - version 2.4.3 + - Fixed incorrect menu items painting on Vista, thanks to + Maël Hörz and Sertac Akyuz for reporting this. + - Fixed TSpTBXToolbar flicker when adding/deleting items. + - Fixed incorrect TSpTBXStatusBar painting when XP theming was + disabled, thanks to Warren Postma for reporting this. + - Fixed incorrect TSpTBXDock painting when the Background + property was used. + - Made the NC area of the TSpTBXTitleBar clickeable when the + form is maximized. + +8 May 2009 - version 2.4.2 + - Added Dutch translation for the Customizer demo, thanks to + Alfred Vink. + - Added Tooltips Vista theming. + +15 March 2009 - version 2.4.1 + - Fixed incorrect TntAction checking, thanks to Costas Stergiou + for reporting this. + +17 January 2009 - version 2.4 + - Replaced the default Windows taskbar PopupMenu with a skninned + PopupMenu when TSpTBXTitleBar is used on the Main form. + - Fixed incorrect menu separator painting when it was used on + a ToolBoxPopup submenu, thanks to Yury Plashenkov for + reporting this. + - Fixed incorrect menu item margins, thanks to Eduardo Mauro + for reporting this. + +26 September 2008 - version 2.3 + - New Toolbar item added, TSpTBXColorItem. + - Fixed incorrect Alt-Space handling on TSpTBXTitleBar, the + System PopupMenu was still showed even when SystemMenu was + setted to False, thanks to Ilya Zaytsev for reporting this. + - Fixed incorrect items text sizing when SystemFont was setted + to False, thanks to Minoru Yoshida for reporting this. + - Fixed a Delphi 7 bug, D7 hints didn't support multi-monitors, + thanks to Costas Stergiou for reporting this. + +29 July 2008 - version 2.2 + - Fixed AV raised when Screen.MonitorFromWindow failed, thanks + to Andrew Denton for reporting this. + - Added OnClosePopup event to TSpTBXPopupMenu. + +26 June 2008 - version 2.1 + - Added Turkish translation for the Customizer demo, thanks to + Zylar. + - Fixed incorrect keyboard handling on TSpTBXTitleBar, Alt+Space + didn't popup the system menu, thanks to Costas Stergiou for + reporting this. + +3 May 2008 - version 2.0 + - SpTBXLib is now decoupled from TBX and uses the latest version + of TB2K, with NO PATCHES REQUIRED. + - Added HideEmptyPopup property to TSpTBXSubmenuItem, when + the submenu has no items and this property is set the + popup window will not be showed. + - Added Swedish translation for the Customizer demo, thanks to + Mattias Andersson. + +2 April 2008 - version 1.9.5 + - Fixed incorrect item stretching when the toolbar was + vertical and tboImageAboveCaption was set, thanks to + John for reporting this. + - Fixed incorrect item painting when no themes were + used, thanks to Denis for reporting this. + - Fixed incorrect TSpTBXToolPalette.Images handling, thanks + to Minoru Yoshida for reporting this. + - Fixed incorrect menu gutter painting when hints were showed, + thanks to Michele and Beta Xiong for reporting this. + - Fixed incorrect floating border painting when the default + size was changed thanks to Costas Stergiou and Serge + for reporting this. + - Fixed incorrect floating border painting on Vista, + the borders should not be transparent, thanks to + Costas Stergiou for reporting this. + +3 February 2008 - version 1.9.4 + - No changes. + +19 January 2008 - version 1.9.3 + - Completed the Brazilian Portuguese translation of the Customizer + demo, thanks to Mauricio Magnani. + - Added TSpTBXToolWindow component. + - Fixed incorrect gutter painting on the popup menus. + - Fixed item stretching problems + +26 December 2007 - version 1.9.2 + - New component added: TSpTBXToolWindow, a fully customizable + ToolWindow with unicode support. + - Added State parameter to the toolbar items OnDrawCaption event. + - Fixed AV on Delphi 2005, Margins and Paddings were introduced + on Delphi 2006, thanks to Stefan for reporting this. + - Minor bug fixes. + +1 December 2007 - version 1.9.1 + - Added Invalidate method to TSpTBXItem. + - Added OnClosePopup event to TSpTBXSubmenuItem. + - Fixed tboNoRotation use on vertical toolbar items, when + tboImageAboveCaption is not set the glyph should appear + aligned with the caption. + +20 November 2007 - version 1.9 + - New theme engine. + - Added SpTBXHintWindowClass global variable, it specifies which + THintWindow class is used to show the hints. + - Added TSpTBXToolPalette and TSpTBXColorPalette items. + - Added TSpTBXToolWindow component. + - Removed TSpTBXComboBoxItem, TSpTBXDropDownItem, TSpTBXStringList + and TSpTBXUndoList. + +8 February 2007 - version 1.8.3 + - No changes. + +17 December 2006 - version 1.8.2 + - Added Toolbar public property to TSpTBXStatusBar. + +24 November 2006 - version 1.8.1 + - Added properties to TSpTBXRightAlignSpacer: ImageIndex, Images, + OnAdjustFont, OnClick, OnDrawHint, OnDrawImage, OnDrawItem. + - Added unicode shortcut-text support for menu items, thanks + Steve for reporting this. + - Fixed incorrect TSpTBXTitleBar positioning when the + taskbar is moved around the screen, thanks to + Costas Stergiou for reporting this. + - Fixed incorrect TSpTBXStatusBar size grip painting when + Windows XP themes are disabled, thanks to Alexey Naumov + for reporting this. + +27 August 2006 - version 1.8 + - Fixed incorrect DropdownCombo item painting, thanks to + François Rivierre for reporting this. + - Fixed incorrect TSpTBXTitleBar SystemMenu painting, + GetMenuStringW doesn't work correctly on Win2K/WinXP, + when a DBCS code page is active (e.g. Japanese), thanks + to Jordan Russell for reporting this. + http://news.jrsoftware.org/read/article.php?id=12268&group=jrsoftware.toolbar2000.thirdparty + - Fixed bug in TSpTBXLabelItem, clicking a TSpTBXLabelItem + on a popup menu causes the menu to close, thanks to + Piotr Janus for reporting this. + +15 June 2006 - version 1.7 + - Added vertical caption painting to toolbar items. + - Added CaptionGlow and CaptionGlowColor properties to + toolbar Items. + - Added Margins property to toolbar items. + - Fixed incorrect TSpTBXTitleBar resizing when the form is + maximized and the titlebar is activated and deactivated + multiple times, thanks to Costas Stergiou for reporting this. + +4 May 2006 - version 1.6 + - Fixed incorrect TSpTBXStatusBar behavior, the size grip + disappeared when the parent was a TSpTBXTitleBar, thanks to + Costas Stergiou for reporting this. + - Fixed incorrect TSpTBXStatusBar's size grip painting when the + Default theme was used. + - Fixed incorrect TSpTBXLabelItem painting when the label was used + in a submenu, thanks to Costas Stergiou for reporting this. + - Added OnSystemMenuPopup event to TSpTBXTitleBar. + +12 April 2006 - version 1.5 + - Fixed incorrect TSpTBXStatusBar behavior, it didn't resized + the form if the mouse click was on the non-client area of the + status bar, thanks to Frank de Groot for reporting this. + - Fixed incorrect mouse handling in TSpTBXTitlebar, thanks to + Marten Pape for reporting this. + - Fixed incorrect TSpTBXLabelItem alignment on menus, thanks to + Costas Stergiou for reporting this. + - Added ClickedItem parameter to TSpTBXSubmenuItem.OnClosePopup + event. + +27 February 2006 - version 1.4 + - Added SizeGrip property to TSpTBXStatusBar. + - Added FullScreenMaximize property to TSpTBXTitleBar. + +10 February 2006 - version 1.3 + - Fixed AV in TSpTBXTitleBar at designtime, thanks to + Alexey Naumov for reporting this. + - Fixed incorrect system popupmenu visibility in TSpTBXTitleBar. + - Added Active property to TSpTBXTitleBar. + - Added OnDrawBackground event to TSpTBXTitleBar. + - Added OnClosePopup event to TSpTBXSubmenuItem. + +28 December 2005 - version 1.2 + - Fixed incorrect items anchoring. + - Fixed range check errrors. + +18 October 2005 - version 1.1 + - Fixed incorrect TSpTBXStatusBar margins when the form is + maximazed. + - Fixed incorrect accel char handling in TSpTBXToolbar. + - Fixed incorrect TntAction support, the previous version of + TntActions didn't supported unicode enabled ActionLinks. + - Fixed incorrect tab stop chars handling in TSpTBXItem. + - Added MaxSize property to TSpTBXToolbar, determines + the maximum height the toolbar can have. + - Added TBX themes support to TSpTBXTitleBar's system menu. + - Added radio item painting support. + +18 August 2005 - version 1.0 + - Added DisplayOptions property to TSpTBXToolbar, determines + whether the item's image is to be displayed. + - Added Customizable property to TSpTBXToolbar, determines + whether the toolbar is customizable or not. + - Added TitleBarSize property to the Options of the + TSpTBXTitlebar. + +10 June 2005 - version 0.9 + - SpTBXLib may now alternatively, at your option, be used and/or + distributed under the terms of the SpTBXLib License. + Please see the updated LICENSE.TXT file for more information. + +20 May 2005 - version 0.8 + - Fixed incorrect caption centering in TSpTBXItem. + - Fixed incorrect TSpTBXItem hint when accessing TntApplication, + thanks to Erik Maly for reporting this. + - Changed the Options property of TSpTBXTitleBar to use a base class + for default buttons. + - Added ChevronVertical property to TSpTBXToolbar, it changes the + layout of the chevron popup to be vertical. + - Added Wrapping property to TSpTBXItem, it determines the wrapping + type of the item's caption. + - Added FixedSize property to TSpTBXTitleBar, it determines if + the TitleBar can be resized. + +16 February 2005 - version 0.7 + - Fixed TSpTBXThemeGroupItem theme sync bug, it now correctly selects + the current TBX theme. + - Fixed unicode support in W9x. + - Fixed TSpTBXTitleBar painting flicker. + - Fixed TSpTBXStatusBar right align margin. + - Added TBXStyleBackground property to TSpTBXTitleBar, when setted to + true it paints a TBX style background. + - Added AutoCheck property to TSpTBXItem. + +23 December 2004 - version 0.6 + - Fixed hint bug, ampersands were not removed in auto-generated hints. + - Fixed incorrect caption painting when the font is italic, this bug + is present in TBX items, TLabel, TBitBtn, TSpeedButton, TGroupBox, + TRadioGroup, and any other control that uses DrawText to draw the + caption. To reproduce this, drop a TBitBtn, change the caption to + 'WWW' and the font to italic, the last W is cropped. + - Fixed incorrect caption painting when the Default theme is used, + the caption was not painted in a down state when the toolbarstyle + item was pushed, thanks Daniel Rikowski for reporting this. + - Changed the default value of DisplayMode to nbdmDefault. + - New component added, TSpTBXTitleBar: a fully customizable + TitleBar with Unicode text and TBX themes support. + - New component added, TSpTBXPopupMenu: a TTBXPopupMenu descendant + with an OnPopupMenuInit event to setup the items before the popup + is showed, it could be used for example to set the focus to an + EditItem. + - Added SpChangeThemeType utility function, this makes it easier to + switch the theme type of any given control and its children. + +30 August 2004 - version 0.5 + - Reworked the hint show event of the items. + +21 July 2004 - version 0.4 + - Fixed TTBControlItem.Control streaming bug on TSpTBXStatusBar. + - Fixed bad sync of the items unicode caption and hint properties + when an Action was assigned. + +12 July 2004 - version 0.3.1 + - Unchanged. + +9 July 2004 - version 0.3 + - Fixed incorrect TSpTBXItem caption painting when DisplayMode + was nbdmDefault, thanks to Cyril for reporting this. + - Added anchors support for TTBControlItem items, if the associated + Control is client aligned or has akRight in its Anchors property. + - The theme items in TSpTBXThemeGroupItem are now sorted. + - Added OnUpdate event to TSpTBXThemeGroupItem, this event is fired + every time the theme items list is recreated, use this event + to sort or change the items properties. + +27 June 2004 - version 0.2 + - Fixed Toolbar custom painting event. + - Fixed incorrect Shortcut painting in submenus. + - Fixed incorrect Shortcut hint painting. + - Removed thtBitmapSkin from TSpTBXThemeType. + - Published more properties for TSpTBXLabelItem. + - New Toolbar item added, TSpTBXSeparator. + - New component added, TSpTBXStatusBar: a fully customizable + StatusBar with Unicode text and TBX themes support. + +22 June 2004 - version 0.1 + - Initial release. + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation +{$I TB2Ver.inc} + +uses + Windows, Messages, Classes, SysUtils, Forms, Controls, Graphics, ImgList, + Menus, StdCtrls, ActnList, + {$IFNDEF UNICODE} + TntClasses, TntControls, + {$ENDIF} + TB2Item, TB2Dock, TB2Toolbar, TB2ToolWindow, + SpTBXSkins; + +{$IFDEF UNICODE} +type + TTntStringList = TStringList; +{$ENDIF} + +const + C_SpTBXRadioGroupIndex = 8888; // Default GroupItem of TSpTBXRadioGroupItem + CM_SPPOPUPCLOSE = CM_BASE + 1111; // Message sent to the PopupControl to update its state after the Popup is closed + rvSpTBXDisplayMode = 'DisplayMode'; // Constant used to save the Toolbar DisplayMode with the Customizer. Do not localize! + CPDefaultCols = 8; // ColorPalette constant + CPDefaultRows = 5; // ColorPalette constant + +type + TSpTBXCustomItem = class; + TSpTBXToolbar = class; + TSpTBXStatusToolbar = class; + TSpTBXPopupMenu = class; + + TSpTBXPaintStage = ( + pstPrePaint, // Pre paint stage + pstPostPaint // Post paint stage + ); + + TSpTBXToolbarDisplayMode = ( + tbdmSelectiveCaption, // The caption is displayed if the Item.DisplayMode = nbdmImageAndText + tbdmImageOnly, // Only the images are displayed + tbdmImageAboveCaption, // The images are displayed above the caption + tbdmTextOnly // Show the caption only + ); + + TSpTBXToolbarState = ( + tstResizing, // The toolbar is being resized + tstRightAligning, // The toolbar items are being right aligned + tstAnchoring // The toolbar items are being anchored + ); + + TSpTBXToolbarStates = set of TSpTBXToolbarState; + + TSpBorderIcon = ( + briSystemMenu, // SystemMenu item on the title bar + briMinimize, // Minimize item on the title bar + briMaximize, // Maximize item on the title bar + briClose // Close item on the title bar + ); + + TSpBorderIcons = set of TSpBorderIcon; + + TTextWrapping = ( + twNone, // No wrapping + twEndEllipsis, // End ellipsis '...' + twPathEllipsis, // Path ellipsis '\..\..' + twWrap // Word wrap + ); + + TSpTBXSearchItemViewerType = ( + sivtNormal, // Normal search + sivtInmediate, // Search for the inmediate ItemViewer + sivtInmediateSkipNonVisible// Search for the next inmediate ItemViewer, skipping non visible ones + ); + + TSpTBXGetImageIndexEvent = procedure(Sender: TObject; + var AImageList: TCustomImageList; var AItemIndex: Integer) of object; + + TSpTBXDrawEvent = procedure(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean) of object; + + TSpTBXDrawImageEvent = procedure(Sender: TObject; ACanvas: TCanvas; + State: TSpTBXSkinStatesType; const PaintStage: TSpTBXPaintStage; + var AImageList: TCustomImageList; var AImageIndex: Integer; + var ARect: TRect; var PaintDefault: Boolean) of object; + + TSpTBXDrawItemEvent = procedure(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean) of object; + + TSpTBXDrawPosEvent = procedure(Sender: TObject; ACanvas: TCanvas; + X, Y: Integer; var PaintDefault: Boolean) of object; + + TSpTBXDrawTextEvent = procedure(Sender: TObject; ACanvas: TCanvas; + ClientAreaRect: TRect; State: TSpTBXSkinStatesType; var ACaption: WideString; + var CaptionRect: TRect; var CaptionFormat: Cardinal; IsTextRotated: Boolean; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean) of object; + + TSpTBXDrawHintEvent = procedure(Sender: TObject; AHintBitmap: TBitmap; + var AHint: WideString; var PaintDefault: Boolean) of object; + + TSpTBXItemNotificationEvent = procedure(Sender: TObject; + Ancestor: TTBCustomItem; Relayed: Boolean; Action: TTBItemChangedAction; + Index: Integer; Item: TTBCustomItem) of object; + + TSpTBXRadioGroupFillStringsEvent = procedure(Sender: TObject; + Strings: TTntStringList) of object; + + TSpTBXPopupEvent = procedure(Sender: TObject; PopupView: TTBView) of object; + + { TSpTBXFontSettings } + + TSpTBXFontSize = 25..1000; + + TSpTBXFontSettings = class(TPersistent) + private + FColor: TColor; + FName: TFontName; + FSize: TSpTBXFontSize; + FStyle: TFontStyles; + FOnChange: TNotifyEvent; + procedure SetColor(Value: TColor); + procedure SetName(const Value: TFontName); + procedure SetSize(Value: TSpTBXFontSize); + procedure SetStyle(const Value: TFontStyles); + protected + procedure Modified; + property OnChange: TNotifyEvent read FOnChange write FOnChange; + public + constructor Create; + procedure Apply(AFont: TFont); + procedure Assign(Src: TPersistent); override; + published + property Color: TColor read FColor write SetColor default clNone; + property Name: TFontName read FName write SetName; // default '' + property Size: TSpTBXFontSize read FSize write SetSize default 100; // Size Percent + property Style: TFontStyles read FStyle write SetStyle default []; + end; + + { TSpTBXCustomDragObject } + + TSpTBXCustomDragObject = class(TDragObjectEx) + private + FDragCursorAccept: TCursor; + FDragCursorCancel: TCursor; + FSourceControl: TControl; + FSourceItem: TTBCustomItem; + protected + function GetDragCursor(Accepted: Boolean; X: Integer; Y: Integer): TCursor; override; + procedure Finished(Target: TObject; X, Y: Integer; Accepted: Boolean); override; + public + constructor Create(ASourceControl: TControl; AItem: TTBCustomItem); virtual; + property DragCursorAccept: TCursor read FDragCursorAccept write FDragCursorAccept; + property DragCursorCancel: TCursor read FDragCursorCancel write FDragCursorCancel; + property SouceItem: TTBCustomItem read FSourceItem; + property SourceControl: TControl read FSourceControl; + end; + + { TSpTBXItemDragObject } + + TSpTBXItemDragObject = class(TSpTBXCustomDragObject); + + { TSpTBXCustomItemActionLink } + + {$IFNDEF UNICODE} + TSpTBXCustomItemActionLink = class(TTBCustomItemActionLink) + protected + FUnicodeClient: TSpTBXCustomItem; + procedure AssignClient(AClient: TObject); override; + function IsCaptionLinked: Boolean; override; + function IsHintLinked: Boolean; override; + procedure SetCaption(const Value: string); override; + procedure SetHint(const Value: string); override; + end; + {$ELSE} + TSpTBXCustomItemActionLink = class(TTBCustomItemActionLink); + {$ENDIF} + + { TSpTBXCustomControl } + + {$IFNDEF UNICODE} + TSpTBXCustomControl = class(TCustomControl) + private + function IsCaptionStored: Boolean; + function IsHintStored: Boolean; + function GetCaption: TWideCaption; + function GetHint: WideString; + procedure SetCaption(const Value: TWideCaption); + procedure SetHint(const Value: WideString); + protected + procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override; + procedure CreateWindowHandle(const Params: TCreateParams); override; + procedure DefineProperties(Filer: TFiler); override; + // Don't let the streaming system store the WideStrings, use DefineProperties instead + property Caption: TWideCaption read GetCaption write SetCaption stored IsCaptionStored; // Hides the inherited Caption + property Hint: WideString read GetHint write SetHint stored IsHintStored; // Hides the inherited Hint + end; + {$ELSE} + TSpTBXCustomControl = class(TCustomControl); + {$ENDIF} + + { TSpTBXItem } + + TSpTBXCustomItem = class(TTBCustomItem) + private + {$IFNDEF UNICODE} + FCaption: WideString; + FHint: WideString; + {$ENDIF} + FCaptionGlow: TSpGlowDirection; + FCaptionGlowColor: TColor; + FAlignment: TAlignment; + FAnchored: Boolean; + FControl: TControl; + FCustomWidth: Integer; + FCustomHeight: Integer; + FFontSettings: TSpTBXFontSettings; + FMargins: Integer; + FMinHeight: Integer; + FMinWidth: Integer; + FStretch: Boolean; + FToolbarStylePopup: Boolean; + FToolBoxPopup: Boolean; + FWrapping: TTextWrapping; + FOnClosePopup: TNotifyEvent; + FOnInitPopup: TSpTBXPopupEvent; + FOnDrawCaption: TSpTBXDrawTextEvent; + FOnDrawHint: TSpTBXDrawHintEvent; + FOnDrawItem: TSpTBXDrawItemEvent; + FOnDrawImage: TSpTBXDrawImageEvent; + {$IFNDEF UNICODE} + function IsCaptionStored: Boolean; + function IsHintStored: Boolean; + procedure SetCaption(const Value: WideString); + procedure SetHint(const Value: WideString); + {$ENDIF} + procedure FontSettingsChanged(Sender: TObject); + procedure SetAlignment(const Value: TAlignment); + procedure SetAnchored(const Value: Boolean); + procedure SetCaptionGlow(const Value: TSpGlowDirection); + procedure SetCaptionGlowColor(const Value: TColor); + procedure SetControl(const Value: TControl); + procedure SetCustomWidth(Value: Integer); + procedure SetCustomHeight(Value: Integer); + procedure SetFontSettings(const Value: TSpTBXFontSettings); + procedure SetMargins(Value: Integer); + procedure SetMinHeight(const Value: Integer); + procedure SetMinWidth(const Value: Integer); + procedure SetStretch(const Value: Boolean); + procedure SetToolBoxPopup(const Value: Boolean); + procedure SetWrapping(const Value: TTextWrapping); + protected + procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override; + function DialogChar(CharCode: Word): Boolean; virtual; + procedure DefineProperties(Filer: TFiler); override; + procedure DoDrawAdjustFont(AFont: TFont; State: TSpTBXSkinStatesType); virtual; + procedure DoDrawHint(AHintBitmap: TBitmap; var AHint: Widestring; var PaintDefault: Boolean); virtual; + procedure DoDrawButton(ACanvas: TCanvas; ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure DoDrawCaption(ACanvas: TCanvas; ClientAreaRect: TRect; State: TSpTBXSkinStatesType; + var ACaption: WideString; var CaptionRect: TRect; var CaptionFormat: Cardinal; + IsTextRotated: Boolean; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure DoDrawImage(ACanvas: TCanvas; State: TSpTBXSkinStatesType; + const PaintStage: TSpTBXPaintStage; var AImageList: TCustomImageList; + var AImageIndex: Integer; var ARect: TRect; var PaintDefault: Boolean); virtual; + procedure DoPopupShowingChanged(APopupWindow: TTBPopupWindow; IsVisible: Boolean); virtual; + function GetActionLinkClass: TTBCustomItemActionLinkClass; override; + function GetItemViewerClass(AView: TTBView): TTBItemViewerClass; override; + function GetPopupWindowClass: TTBPopupWindowClass; override; + procedure ToggleControl; virtual; + procedure UpdateProps; virtual; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + + property Alignment: TAlignment read FAlignment write SetAlignment default taCenter; + property Anchored: Boolean read FAnchored write SetAnchored default False; + property CaptionGlow: TSpGlowDirection read FCaptionGlow write SetCaptionGlow default gldNone; + property CaptionGlowColor: TColor read FCaptionGlowColor write SetCaptionGlowColor default clYellow; + property Control: TControl read FControl write SetControl; + property CustomWidth: Integer read FCustomWidth write SetCustomWidth default -1; + property CustomHeight: Integer read FCustomHeight write SetCustomHeight default -1; + property FontSettings: TSpTBXFontSettings read FFontSettings write SetFontSettings; + property Margins: Integer read FMargins write SetMargins default 0; + property MinHeight: Integer read FMinHeight write SetMinHeight default 0; + property MinWidth: Integer read FMinWidth write SetMinWidth default 0; + property ToolbarStylePopup: Boolean read FToolbarStylePopup write FToolbarStylePopup default False; // Used on submenus + property ToolBoxPopup: Boolean read FToolBoxPopup write SetToolBoxPopup default False; // Used on submenus + property Stretch: Boolean read FStretch write SetStretch default True; // Hidden, all items are stretched by default + property OnClosePopup: TNotifyEvent read FOnClosePopup write FOnClosePopup; + property OnInitPopup: TSpTBXPopupEvent read FOnInitPopup write FOnInitPopup; + property OnDrawCaption: TSpTBXDrawTextEvent read FOnDrawCaption write FOnDrawCaption; + property OnDrawHint: TSpTBXDrawHintEvent read FOnDrawHint write FOnDrawHint; + property OnDrawImage: TSpTBXDrawImageEvent read FOnDrawImage write FOnDrawImage; + property OnDrawItem: TSpTBXDrawItemEvent read FOnDrawItem write FOnDrawItem; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Click; override; + function GetShortCutText: WideString; // Reintroduce to support unicode shortcut text + procedure InitiateAction; override; + procedure Invalidate; + published + {$IFNDEF UNICODE} + // Don't let the streaming system store the WideStrings, use DefineProperties instead + property Caption: WideString read FCaption write SetCaption stored IsCaptionStored; // Hides the inherited Caption + property Hint: WideString read FHint write SetHint stored IsHintStored; // Hides the inherited Hint + {$ELSE} + property Caption; + property Hint; + {$ENDIF} + property Wrapping: TTextWrapping read FWrapping write SetWrapping default twWrap; + end; + + TSpTBXItemViewer = class(TTBItemViewer) + private + function GetItem: TSpTBXCustomItem; + procedure CMHintShow(var Message: TMessage); message CM_HINTSHOW; + procedure InternalCalcSize(const Canvas: TCanvas; CalcStretch: Boolean; var AWidth, AHeight: Integer); + protected + FAnchorSize: TPoint; + FAnchorDelta: Integer; + + function IsOnToolBoxPopup: Boolean; + + // Custom Painting methods + procedure DoDrawAdjustFont(AFont: TFont; State: TSpTBXSkinStatesType); virtual; + procedure DoDrawButton(ACanvas: TCanvas; ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure DoDrawCaption(ACanvas: TCanvas; ClientAreaRect: TRect; + State: TSpTBXSkinStatesType; var ACaption: WideString; var CaptionRect: TRect; + var CaptionFormat: Cardinal; IsTextRotated: Boolean; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); virtual; + procedure DoDrawImage(ACanvas: TCanvas; State: TSpTBXSkinStatesType; + const PaintStage: TSpTBXPaintStage; var AImageList: TCustomImageList; + var AImageIndex: Integer; var ARect: TRect; var PaintDefault: Boolean); virtual; + procedure DoDrawHint(AHintBitmap: TBitmap; CursorPos: TPoint; var CursorRect: TRect; var AHint: Widestring; var PaintDefault: Boolean); virtual; + + // Painting methods + function CaptionShown: Boolean; override; + function GetImageShown: Boolean; virtual; + function GetImageSize: TSize; virtual; + function GetRightImageSize: TSize; virtual; + function GetTextColor(State: TSpTBXSkinStatesType): TColor; virtual; + procedure DrawItemImage(ACanvas: TCanvas; ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; ImgIndex: Integer); virtual; + procedure DrawItemRightImage(ACanvas: TCanvas; ARect: TRect; ItemInfo: TSpTBXMenuItemInfo); virtual; + procedure CalcSize(const Canvas: TCanvas; var AWidth, AHeight: Integer); override; + procedure GetTextInfo(ACanvas: TCanvas; State: TSpTBXSkinStatesType; out TextInfo: TSpTBXTextInfo); + procedure Paint(const Canvas: TCanvas; const ClientAreaRect: TRect; IsSelected, IsPushed, UseDisabledShadow: Boolean); override; + + // Hints + procedure Entering; override; + procedure InternalMouseMove(Shift: TShiftState; X, Y: Integer); virtual; + public + function GetCaptionText: WideString; reintroduce; virtual; // Hides the inherited TB2K GetCaptionText function + function GetHintText: Widestring; reintroduce; virtual; // Hides the inherited TB2K GetHintText function + function IsToolbarStyle: Boolean; // Hides the inherited TB2K IsToolbarStyle function + property Item: TSpTBXCustomItem read GetItem; // Hides the inherited TB2K Item property + end; + + TSpTBXItem = class(TSpTBXCustomItem) + published + property Action; + property AutoCheck; + property Checked; + property DisplayMode; + property Enabled; + property GroupIndex; + property HelpContext; + property ImageIndex; + property Images; + property InheritOptions; + property MaskOptions; + property Options; + property RadioItem; + property ShortCut; + property Visible; + // property OnDrawImage; use custom OnDrawImage + property OnClick; + property OnSelect; + // TSpTBXCustomItem properties + property Alignment; + property Anchored; + property CaptionGlow; + property CaptionGlowColor; + property Control; + property CustomWidth; + property CustomHeight; + property FontSettings; + property Margins; + property MinHeight; + property MinWidth; + property OnDrawCaption; + property OnDrawHint; + property OnDrawImage; + property OnDrawItem; + end; + + { TSpTBXRootItem } + + TSpTBXRootItem = class(TTBRootItem) + private + FToolBoxPopup: Boolean; + FOnInitPopup: TSpTBXPopupEvent; + FOnClosePopup: TNotifyEvent; + procedure SetToolBoxPopup(const Value: Boolean); + protected + procedure DoPopupShowingChanged(APopupWindow: TTBPopupWindow; IsVisible: Boolean); virtual; + function GetPopupWindowClass: TTBPopupWindowClass; override; + property ToolBoxPopup: Boolean read FToolBoxPopup write SetToolBoxPopup default False; + public + property OnInitPopup: TSpTBXPopupEvent read FOnInitPopup write FOnInitPopup; + property OnClosePopup: TNotifyEvent read FOnClosePopup write FOnClosePopup; + end; + + { TSpTBXSubmenuItem } + + TSpTBXSubmenuItem = class(TSpTBXItem) + private + FHideEmptyPopup: Boolean; + function GetDropdownCombo: Boolean; + procedure SetDropdownCombo(Value: Boolean); + public + constructor Create(AOwner: TComponent); override; + published + property DropdownCombo: Boolean read GetDropdownCombo write SetDropdownCombo default False; + property HideEmptyPopup: Boolean read FHideEmptyPopup write FHideEmptyPopup default False; + property LinkSubitems; + property SubMenuImages; + property ToolbarStylePopup; + property ToolBoxPopup; + property OnPopup; + property OnClosePopup; + property OnInitPopup; + end; + + { TSpTBXColorItem } + + TSpTBXColorItem = class(TSpTBXCustomItem) + private + FColor: TColor; + procedure SetColor(Value: TColor); + protected + function GetItemViewerClass(AView: TTBView): TTBItemViewerClass; override; + public + constructor Create(AOwner: TComponent); override; + published + property Action; + property AutoCheck; + property Checked; + property DisplayMode; + property Enabled; + property GroupIndex; + property HelpContext; + property InheritOptions; + property MaskOptions; + property Options; + property ShortCut; + property Visible; + property OnClick; + property OnSelect; + // TSpTBXCustomItem properties + property Alignment; + property Anchored; + property CaptionGlow; + property CaptionGlowColor; + property Control; + property CustomWidth; + property CustomHeight; + property FontSettings; + property Margins; + property MinHeight; + property MinWidth; + property OnDrawCaption; + property OnDrawHint; + property OnDrawImage; + property OnDrawItem; + // TSpTBXColorItem properties + property Color: TColor read FColor write SetColor default clWhite; + end; + + TSpTBXColorItemViewer = class(TSpTBXItemViewer) + protected + procedure DoDrawImage(ACanvas: TCanvas; State: TSpTBXSkinStatesType; + const PaintStage: TSpTBXPaintStage; var AImageList: TCustomImageList; + var AImageIndex: Integer; var ARect: TRect; var PaintDefault: Boolean); override; + function GetImageShown: Boolean; override; + function GetImageSize: TSize; override; + end; + + { TSpTBXLabelItem } + + TSpTBXCustomLabelItem = class(TSpTBXCustomItem) + protected + function DialogChar(CharCode: Word): Boolean; override; + procedure DoDrawButton(ACanvas: TCanvas; ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); override; + function GetItemViewerClass(AView: TTBView): TTBItemViewerClass; override; + procedure ToggleControl; override; + procedure UpdateProps; override; + property Alignment default taLeftJustify; + public + constructor Create(AOwner: TComponent); override; + end; + + TSpTBXLabelItemViewer = class(TSpTBXItemViewer) + protected + procedure CalcSize(const Canvas: TCanvas; var AWidth, AHeight: Integer); override; + function DoExecute: Boolean; override; + end; + + TSpTBXLabelItem = class(TSpTBXCustomLabelItem) + published + property Enabled; + property ImageIndex; + property Images; + property InheritOptions; + property MaskOptions; + property Options; + property Visible; + property OnClick; + // TSpTBXCustomItem properties + property Alignment; + property Anchored; + property CaptionGlow; + property CaptionGlowColor; + property Control; + property CustomWidth; + property CustomHeight; + property FontSettings; + property Margins; + property MinHeight; + property MinWidth; + property OnDrawCaption; + property OnDrawHint; + property OnDrawImage; + property OnDrawItem; + end; + + { TSpTBXSeparatorItem } + + TSpTBXSeparatorItem = class(TTBSeparatorItem) + protected + function GetItemViewerClass(AView: TTBView): TTBItemViewerClass; override; + end; + + TSpTBXSeparatorItemViewer = class(TTBSeparatorItemViewer) + protected + procedure CalcSize(const Canvas: TCanvas; var AWidth, AHeight: Integer); override; + function IsStatusBarSeparator: Boolean; + procedure Paint(const Canvas: TCanvas; const ClientAreaRect: TRect; IsSelected, IsPushed, UseDisabledShadow: Boolean); override; + end; + + { TSpTBXRightAlignSpacerItem } + + TSpTBXRightAlignSpacerItem = class(TSpTBXCustomLabelItem) + published + property ImageIndex; + property Images; + property MaskOptions; + property Options; + property OnClick; + // TSpTBXCustomItem properties + property Alignment; + property CaptionGlow; + property CaptionGlowColor; + property CustomWidth; + property CustomHeight; + property FontSettings; + property OnDrawCaption; + property OnDrawHint; + property OnDrawImage; + property OnDrawItem; + end; + + { TSpTBXRadioGroupItem } + + TSpTBXRadioGroupItem = class(TTBGroupItem) + private + FDefaultIndex: Integer; + FLastClickedIndex: Integer; + FOnClick: TNotifyEvent; + FOnFillStrings: TSpTBXRadioGroupFillStringsEvent; + FOnUpdate: TNotifyEvent; + protected + FStrings: TTntStringList; + procedure Loaded; override; + procedure ItemClickEvent(Sender: TObject); virtual; + procedure DoClick(AItem: TSpTBXItem); virtual; + procedure DoFillStrings; virtual; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Recreate; + property DefaultIndex: Integer read FDefaultIndex write FDefaultIndex; + property LastClickedIndex: Integer read FLastClickedIndex; + published + property OnClick: TNotifyEvent read FOnClick write FOnClick; + property OnFillStrings: TSpTBXRadioGroupFillStringsEvent read FOnFillStrings write FOnFillStrings; + property OnUpdate: TNotifyEvent read FOnUpdate write FOnUpdate; + end; + + { TSpTBXSkinGroupItem } + + TSpTBXSkinGroupItem = class(TSpTBXRadioGroupItem) + private + FOnSkinChange: TNotifyEvent; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + protected + procedure DoClick(AItem: TSpTBXItem); override; + procedure DoSkinChange; virtual; + procedure DoFillStrings; override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + property OnSkinChange: TNotifyEvent read FOnSkinChange write FOnSkinChange; + end; + + { TSpTBXSystemMenuItem } + + TSpTBXSystemMenuItem = class(TSpTBXCustomItem) + private + FMDISystemMenu: Boolean; + FShowSize: Boolean; + procedure CommandClick(Sender: TObject); + protected + function GetItemViewerClass(AView: TTBView): TTBItemViewerClass; override; + function GetSystemMenuParentForm: TCustomForm; + public + constructor Create(AOwner: TComponent); override; + procedure Click; override; + published + property MDISystemMenu: Boolean read FMDISystemMenu write FMDISystemMenu default False; + property ShowSize: Boolean read FShowSize write FShowSize default True; + end; + + TSpTBXSystemMenuItemViewer = class(TSpTBXItemViewer) + protected + procedure CalcSize(const Canvas: TCanvas; var AWidth, AHeight: Integer); override; + procedure Paint(const Canvas: TCanvas; const ClientAreaRect: TRect; IsSelected, IsPushed, UseDisabledShadow: Boolean); override; + end; + + { TSpTBXToolPalette } + + TSpTBXRowColCount = 1..100; + + TSpTBXTPGetCellHint = procedure(Sender: TObject; ACol, ARow: Integer; var AHint: WideString) of object; + + TSpTBXTPDrawCellImage = procedure(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; ACol, ARow: Integer; Selected, HotTrack, Enabled: Boolean) of object; + + TSpTBXTPCellClick = procedure(Sender: TObject; ACol, ARow: Integer; var Allow: Boolean) of object; + + TSpTBXCPGetColorInfo = procedure(Sender: TObject; ACol, ARow: Integer; var Color: TColor; var Name: WideString) of object; + + TSpTBXCustomToolPalette = class(TSpTBXCustomItem) + private + FCustomImages: Boolean; + FColCount: TSpTBXRowColCount; + FRowCount: TSpTBXRowColCount; + FSelectedCell: TPoint; + FOnChange: TNotifyEvent; + FOnCellClick: TSpTBXTPCellClick; + FOnDrawCellImage: TSpTBXTPDrawCellImage; + FOnGetCellHint: TSpTBXTPGetCellHint; + procedure SetSelectedCell(Value: TPoint); + protected + function DoCellClick(ACol, ARow: Integer): Boolean; virtual; + procedure DoChange; virtual; + procedure DoDrawCellImage(ACanvas: TCanvas; const ARect: TRect; ACol, ARow: Integer; ItemInfo: TSpTBXMenuItemInfo); virtual; + procedure DoGetCellHint(ACol, ARow: Integer; var AHint: WideString); virtual; + function GetItemViewerClass(AView: TTBView): TTBItemViewerClass; override; + procedure HandleClickCell(ACol, ARow: Integer); virtual; + procedure SetColCount(Value: TSpTBXRowColCount); virtual; + procedure SetRowCount(Value: TSpTBXRowColCount); virtual; + property CustomImages: Boolean read FCustomImages write FCustomImages; + property ColCount: TSpTBXRowColCount read FColCount write SetColCount default 1; + property RowCount: TSpTBXRowColCount read FRowCount write SetRowCount default 1; + property SelectedCell: TPoint read FSelectedCell write SetSelectedCell; + property OnChange: TNotifyEvent read FOnChange write FOnChange; + property OnCellClick: TSpTBXTPCellClick read FOnCellClick write FOnCellClick; + property OnDrawCellImage: TSpTBXTPDrawCellImage read FOnDrawCellImage write FOnDrawCellImage; + property OnGetCellHint: TSpTBXTPGetCellHint read FOnGetCellHint write FOnGetCellHint; + public + constructor Create(AOwner: TComponent); override; + end; + + TSpTBXToolPalette = class(TSpTBXCustomToolPalette) + public + property SelectedCell; + published + property ColCount; + property HelpContext; + property Images; + property Options; + property RowCount; + property Visible; + property OnChange; + property OnCellClick; + property OnDrawCellImage; + property OnGetCellHint; + end; + + TSpTBXToolViewer = class(TSpTBXItemViewer) + private + FCellHeight: Integer; + FCellWidth: Integer; + FColCount: Integer; + FRowCount: Integer; + FHotCell: TPoint; + function GetItem: TSpTBXCustomToolPalette; + protected + FIndent: Integer; + FMouseIsDown: Boolean; + procedure CalcCellSize(ACanvas: TCanvas; var AWidth, AHeight: Integer); virtual; + procedure CalcSize(const Canvas: TCanvas; var AWidth, AHeight: Integer); override; + function GetImageIndex(Col, Row: Integer): Integer; + function GetImageSize: TSize; override; + function GetImageShown: Boolean; override; + function GetCellAt(X, Y: Integer; out Col, Row: Integer): Boolean; + function GetCellRect(ClientAreaRect: TRect; Col, Row: Integer): TRect; virtual; + function GetCellHint(Col, Row: Integer): WideString; + procedure DoDrawHint(AHintBitmap: TBitmap; CursorPos: TPoint; var CursorRect: TRect; var AHint: Widestring; var PaintDefault: Boolean); override; + procedure DrawCellImage(ACanvas: TCanvas; const ARect: TRect; Col, Row: Integer; ItemInfo: TSpTBXMenuItemInfo); virtual; + procedure Entering; override; + procedure InvalidateCell(ACol, ARow: Integer); + function IsCellVisible(Cell: TPoint): Boolean; virtual; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + procedure MouseDown(Shift: TShiftState; X, Y: Integer;var MouseDownOnMenu: Boolean); override; + procedure MouseMove(X, Y: Integer); override; + procedure MouseUp(X, Y: Integer; MouseWasDownOnMenu: Boolean); override; + procedure Paint(const Canvas: TCanvas; const ClientAreaRect: TRect; IsSelected, IsPushed, UseDisabledShadow: Boolean); override; + public + constructor Create(AView: TTBView; AItem: TTBCustomItem; AGroupLevel: Integer); override; + property Item: TSpTBXCustomToolPalette read GetItem; // Hides the inherited TB2K Item property + end; + + { TSpTBXColorPalette } + + TSpTBXColorPalette = class(TSpTBXCustomToolPalette) + private + FColor: TColor; + FCustomColors: Boolean; + FOnGetColor: TSpTBXCPGetColorInfo; + procedure SetColor(Value: TColor); + procedure SetCustomColors(const Value: Boolean); + protected + procedure DoChange; override; + procedure DoGetCellHint(ACol, ARow: Integer; var AHint: WideString); override; + procedure DoDrawCellImage(ACanvas: TCanvas; const ARect: TRect; ACol, ARow: Integer; ItemInfo: TSpTBXMenuItemInfo); override; + function GetCellColor(ACol, ARow: Integer): TColor; + procedure GetCellInfo(ACol, ARow: Integer; out AColor: TColor; out AName: WideString); + procedure SetColCount(Value: TSpTBXRowColCount); override; + procedure SetRowCount(Value: TSpTBXRowColCount); override; + public + constructor Create(AOwner: TComponent); override; + function FindCell(AColor: TColor): TPoint; + published + property CustomColors: Boolean read FCustomColors write SetCustomColors default False; // Must be published before ColCount + property ColCount default CPDefaultCols; + property Color: TColor read FColor write SetColor default clNone; + property HelpContext; + property InheritOptions; + property MaskOptions; + property Options default [tboShowHint]; + property RowCount default CPDefaultRows; + property Visible; + property OnChange; + property OnCellClick; + property OnGetCellHint; + property OnGetColor: TSpTBXCPGetColorInfo read FOnGetColor write FOnGetColor; + end; + + { TSpTBXItemCacheList } + + TSpTBXItemCache = class(TCollectionItem) + private + FDock: TTBDock; + FName: TComponentName; + FItem: TTBCustomItem; + FWidth, FHeight: Integer; + FParentWidth, FParentHeight: Integer; + function GetName: TComponentName; + public + procedure Assign(Source: TPersistent); override; + property Item: TTBCustomItem read FItem write FItem; + published + property Dock: TTBDock read FDock write FDock; + property Name: TComponentName read GetName write FName; + property Width: Integer read FWidth write FWidth default 0; + property Height: Integer read FHeight write FHeight default 0; + property ParentWidth: Integer read FParentWidth write FParentWidth default 0; + property ParentHeight: Integer read FParentHeight write FParentHeight default 0; + end; + + TSpTBXItemCacheCollection = class(TCollection) + private + function GetItem(Index: Integer): TSpTBXItemCache; + procedure SetItem(Index: Integer; const Value: TSpTBXItemCache); + public + function Add(AItem: TTBCustomItem): Integer; virtual; + function IndexOf(AItem: TTBCustomItem): Integer; + property Items[Index: Integer]: TSpTBXItemCache read GetItem write SetItem; default; + end; + + { TSpTBXDock } + + TSpTBXDock = class(TTBDock) + private + FMoving: Boolean; + FResizing: Boolean; + FPrevWidth: Integer; + FPrevHeight: Integer; + FOnDrawBackground: TSpTBXDrawEvent; + procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; + procedure WMMove(var Message: TWMMove); message WM_MOVE; + procedure WMSize(var Message: TWMSize); message WM_SIZE; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + protected + function CanResize(var NewWidth: Integer; var NewHeight: Integer): Boolean; override; + procedure DrawBackground(DC: HDC; const DrawRect: TRect); override; + procedure DoDrawBackground(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + procedure Resize; override; + function UsingBackground: Boolean; override; + function UsingBitmap: Boolean; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + property PrevWidth: Integer read FPrevWidth; + property PrevHeight: Integer read FPrevHeight; + published + property Color default clNone; + property OnCanResize; + property OnDrawBackground: TSpTBXDrawEvent read FOnDrawBackground write FOnDrawBackground; + end; + + TSpTBXDockClass = class of TSpTBXDock; + + { TSpTBXToolbar } + + TSpTBXToolbarView = class(TTBToolbarView) + private + FMaxSize: Integer; + procedure SetMaxSize(const Value: Integer); + protected + FTallestItemSize: Integer; + FUpdating: Integer; + procedure DoUpdatePositions(var ASize: TPoint); override; + public + constructor Create(AOwner: TComponent; AParentView: TTBView; + AParentItem: TTBCustomItem; AWindow: TWinControl; + AIsToolbar, ACustomizing, AUsePriorityList: Boolean); override; + procedure BeginUpdate; virtual; // Hides inherited BeginUpdate + procedure EndUpdate; virtual; // Hides inherited EndUpdate + function IsUpdating: Boolean; + property MaxSize: Integer read FMaxSize write SetMaxSize; + end; + + TSpTBXToolbar = class(TTBCustomToolbar) + private + FChevronVertical: Boolean; + FCompoundToolbar: Boolean; + FCustomizable: Boolean; + FCustomizingCount: Integer; + FItemMovingCount: Integer; + FDisplayMode: TSpTBXToolbarDisplayMode; + FLastDropMark: TRect; + FLastSelectableWidth: Integer; + FMenuBar: Boolean; + FOnDrawBackground: TSpTBXDrawEvent; + FOnItemNotification: TSpTBXItemNotificationEvent; + {$IFNDEF UNICODE} + function IsCaptionStored: Boolean; + function GetCaption: TWideCaption; + procedure SetCaption(const Value: TWideCaption); + function GetHint: WideString; + procedure SetHint(const Value: WideString); + {$ENDIF} + procedure SetDisplayMode(const Value: TSpTBXToolbarDisplayMode); + function GetMaxSize: Integer; + procedure SetMaxSize(const Value: Integer); + procedure SetMenuBar(const Value: Boolean); + function CreateWrapper(Index: Integer; Ctl: TControl): TTBControlItem; + function IsAnchoredControlItem(Item: TTBCustomItem): TTBControlItem; + procedure CMControlChange(var Message: TCMControlChange); message CM_CONTROLCHANGE; + procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; + procedure CMMouseleave(var Message: TMessage); message CM_MOUSELEAVE; + procedure CMHintShow(var Message: TCMHintShow); message CM_HINTSHOW; + procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED; + procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; + procedure WMSize(var Message: TWMSize); message WM_SIZE; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + procedure SetCustomizable(const Value: Boolean); + protected + FBeginDragIV: TTBItemViewer; + FAnchoredControlItems: TSpTBXItemCacheCollection; + FState: TSpTBXToolbarStates; + FDefaultToolbarBorderSize: Integer; + + // Component + procedure CreateWindowHandle(const Params: TCreateParams); override; + procedure DefineProperties(Filer: TFiler); override; + procedure Resize; override; + procedure AnchorItems(UpdateControlItems: Boolean = True); virtual; + procedure RightAlignItems; virtual; + + // Painting + procedure DrawNCArea(const DrawToDC: Boolean; const ADC: HDC; const Clip: HRGN); override; + function GetItemsTextColor(State: TSpTBXSkinStatesType): TColor; virtual; + procedure InternalDrawBackground(ACanvas: TCanvas; ARect: TRect; PaintOnNCArea: Boolean; PaintBorders: Boolean = True); virtual; + procedure DoDrawBackground(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + + // Get class + function GetChevronItemClass: TTBChevronItemClass; override; + function GetFloatingWindowParentClass: TTBFloatingWindowParentClass; override; + function GetRightAlignMargin: Integer; virtual; + function GetViewClass: TTBToolbarViewClass; override; + + // Hints + procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; + + // Customizer + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); override; + function CanDragCustomize(Button: TMouseButton; Shift: TShiftState; X, Y: Integer): Boolean; virtual; + procedure DoStartDrag(var DragObject: TDragObject); override; + procedure DragOver(Source: TObject; X: Integer; Y: Integer; State: TDragState; var Accept: Boolean); override; + + // Misc + function CanItemClick(Item: TTBCustomItem; Button: TMouseButton; Shift: TShiftState; X, Y: Integer): Boolean; virtual; + procedure DoItemClick(Item: TTBCustomItem; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); virtual; + procedure DoItemNotification(Ancestor: TTBCustomItem; Relayed: Boolean; Action: TTBItemChangedAction; Index: Integer; Item: TTBCustomItem); virtual; + + property CompoundToolbar: Boolean read FCompoundToolbar write FCompoundToolbar; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure DragDrop(Source: TObject; X: Integer; Y: Integer); override; + procedure ReadPositionData(const Data: TTBReadPositionData); override; + procedure WritePositionData(const Data: TTBWritePositionData); override; + procedure BeginUpdate; // Hides inherited BeginUpdate + procedure EndUpdate; // Hides inherited EndUpdate + function IsUpdating: Boolean; + procedure BeginCustomize; + procedure EndCustomize; + procedure BeginItemMove; + procedure EndItemMove; + function GetFloatingBorderSize: TPoint; override; + function IsCustomizing: Boolean; + function IsItemMoving: Boolean; + function IsVertical: Boolean; + property DefaultToolbarBorderSize: Integer read FDefaultToolbarBorderSize; + property MaxSize: Integer read GetMaxSize write SetMaxSize default -1; + published + property ActivateParent; + property Align; + property AutoResize; + property BorderStyle; + property ChevronHint; + property ChevronMoveItems; + property ChevronPriorityForNewItems; + property CloseButton; + property CloseButtonWhenDocked; + property CurrentDock; + property DefaultDock; + property DockableTo; + property DockMode; + property DockPos; + property DockRow; + property DragHandleStyle; + property FloatingMode; + property Font; + property FullSize; + property HideWhenInactive; + property Images; + property Items; + property LastDock; + property LinkSubitems; + property Options; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ProcessShortCuts; + property Resizable; + property ShowCaption; + property ShowHint; + property ShrinkMode; + property SmoothDrag; + property Stretch; + property SystemFont; + property TabOrder; + property TabStop; + property UpdateActions; + property UseLastDock; + property Visible; + property Color default clNone; + property OnClose; + property OnCloseQuery; + property OnContextPopup; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnMove; + property OnRecreated; + property OnRecreating; + property OnDockChanged; + property OnDockChanging; + property OnDockChangingHidden; + property OnResize; + property OnShortCut; + property OnVisibleChanged; + {$IFNDEF UNICODE} + // Don't let the streaming system store the WideStrings, use DefineProperties instead + property Caption: TWideCaption read GetCaption write SetCaption stored IsCaptionStored; // Hides the inherited Caption + property Hint: WideString read GetHint write SetHint stored False; // Hint is set dynamically in MouseMove, don't save it + {$ELSE} + property Caption; + property Hint; + {$ENDIF} + property ChevronVertical: Boolean read FChevronVertical write FChevronVertical default True; + property Customizable: Boolean read FCustomizable write SetCustomizable default True; + property DisplayMode: TSpTBXToolbarDisplayMode read FDisplayMode write SetDisplayMode default tbdmSelectiveCaption; + property MenuBar: Boolean read FMenuBar write SetMenuBar default False; // Hides the inherited MenuBar + property OnDrawBackground: TSpTBXDrawEvent read FOnDrawBackground write FOnDrawBackground; + property OnItemNotification: TSpTBXItemNotificationEvent read FOnItemNotification write FOnItemNotification; + end; + + TSpTBXToolbarClass = class of TSpTBXToolbar; + + { TSpTBXToolWindow } + + TSpTBXCustomToolWindow = class(TTBCustomDockableWindow) + private + FMinClientWidth, FMinClientHeight, FMaxClientWidth, FMaxClientHeight: Integer; + FOnDrawBackground: TSpTBXDrawEvent; + {$IFNDEF UNICODE} + function IsCaptionStored: Boolean; + function GetCaption: TWideCaption; + procedure SetCaption(const Value: TWideCaption); + {$ENDIF} + function GetClientAreaWidth: Integer; + procedure SetClientAreaWidth(Value: Integer); + function GetClientAreaHeight: Integer; + procedure SetClientAreaHeight(Value: Integer); + procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED; + procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; + protected + FBarSize: TSize; + FDefaultToolbarBorderSize: Integer; + procedure CreateWindowHandle(const Params: TCreateParams); override; + procedure DefineProperties(Filer: TFiler); override; + function GetFloatingWindowParentClass: TTBFloatingWindowParentClass; override; + + // Sizing + function CalcSize(ADock: TTBDock): TPoint; virtual; + function DoArrange(CanMoveControls: Boolean; PreviousDockType: TTBDockType; NewFloating: Boolean; NewDock: TTBDock): TPoint; override; + procedure GetBaseSize(var ASize: TPoint); override; + procedure GetMinMaxSize(var AMinClientWidth, AMinClientHeight, AMaxClientWidth, AMaxClientHeight: Integer); override; + procedure SetClientAreaSize(AWidth, AHeight: Integer); virtual; + procedure SizeChanging(const AWidth, AHeight: Integer); override; + + // Painting + procedure Paint; override; + procedure DrawNCArea(const DrawToDC: Boolean; const ADC: HDC; const Clip: HRGN); override; + procedure InternalDrawBackground(ACanvas: TCanvas; ARect: TRect; PaintOnNCArea: Boolean; PaintBorders: Boolean = True); virtual; + procedure DoDrawBackground(ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + + property ClientAreaHeight: Integer read GetClientAreaHeight write SetClientAreaHeight; + property ClientAreaWidth: Integer read GetClientAreaWidth write SetClientAreaWidth; + property MaxClientHeight: Integer read FMaxClientHeight write FMaxClientHeight default 0; + property MaxClientWidth: Integer read FMaxClientWidth write FMaxClientWidth default 0; + property MinClientHeight: Integer read FMinClientHeight write FMinClientHeight default 32; + property MinClientWidth: Integer read FMinClientWidth write FMinClientWidth default 32; + property OnDrawBackground: TSpTBXDrawEvent read FOnDrawBackground write FOnDrawBackground; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function GetFloatingBorderSize: TPoint; override; + procedure InvalidateBackground(InvalidateChildren: Boolean = True); virtual; + function IsVertical: Boolean; + procedure ReadPositionData(const Data: TTBReadPositionData); override; + procedure WritePositionData(const Data: TTBWritePositionData); override; + property DefaultToolbarBorderSize: Integer read FDefaultToolbarBorderSize; + published + {$IFNDEF UNICODE} + // Don't let the streaming system store the WideStrings, use DefineProperties instead + property Caption: TWideCaption read GetCaption write SetCaption stored IsCaptionStored; // Hides the inherited Caption + {$ELSE} + property Caption; + {$ENDIF} + property Color default clNone; + end; + + TSpTBXToolWindow = class(TSpTBXCustomToolWindow) + published + property ActivateParent; + property Align; + property Anchors; + property BorderStyle; + property Caption; + property Color; + property CloseButton; + property CloseButtonWhenDocked; + property CurrentDock; + property DefaultDock; + property DockableTo; + property DockMode; + property DockPos; + property DockRow; + property DragHandleStyle; + property FloatingMode; + property Font; + property FullSize; + property HideWhenInactive; + property LastDock; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property Resizable; + property ShowCaption; + property ShowHint; + property Stretch; + property SmoothDrag; + property TabOrder; + property UseLastDock; + property Visible; + property OnClose; + property OnCloseQuery; + property OnContextPopup; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnDockChanged; + property OnDockChanging; + property OnDockChangingHidden; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnMove; + property OnRecreated; + property OnRecreating; + property OnResize; + property OnVisibleChanged; + // TSpTBXCustomToolWindow properties + property ClientAreaHeight; + property ClientAreaWidth; + property MaxClientHeight; + property MaxClientWidth; + property MinClientHeight; + property MinClientWidth; + property OnDrawBackground; + end; + + { TSpTBXFloatingWindowParent } + + TSpTBXFloatingWindowParent = class(TTBFloatingWindowParent) + private + FCloseButtonHover: Boolean; + FCloseOnAltF4: Boolean; + procedure UpdateDwmNCSize; + procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; + procedure WMActivateApp(var Message: TWMActivateApp); message WM_ACTIVATEAPP; + procedure WMClose(var Message: TWMClose); message WM_CLOSE; + procedure WMEraseBkgnd(var Message: TMessage); message WM_ERASEBKGND; + procedure WMNCMouseLeave(var Message: TMessage); message WM_NCMOUSELEAVE; + procedure WMNCMouseMove(var Message: TWMNCMouseMove); message WM_NCMOUSEMOVE; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + protected + procedure CancelNCHover; + procedure CreateWnd; override; + procedure DrawNCArea(const DrawToDC: Boolean; const ADC: HDC; const Clip: HRGN; RedrawWhat: TTBToolWindowNCRedrawWhat); override; + procedure RedrawCloseButton; + procedure VisibleChanging; override; + property CloseButtonHover: Boolean read FCloseButtonHover; + public + constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); override; + destructor Destroy; override; + property CloseOnAltF4: Boolean read FCloseOnAltF4 write FCloseOnAltF4; + end; + + { TSpTBXPopupWindow } + + TSpTBXPopupWindow = class(TTBPopupWindow) + private + FPaintingClientArea: Boolean; + FMaximumImageSize: TSize; + function CanDrawGutter: Boolean; + procedure CMHintShow(var Message: TCMHintShow); message CM_HINTSHOW; + procedure CMShowingchanged(var Message: TMessage); message CM_SHOWINGCHANGED; + procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; + procedure WMNCPaint(var Message: TMessage); message WM_NCPAINT; + procedure WMPrint(var Message: TMessage); message WM_PRINT; + protected + function GetViewClass: TTBViewClass; override; + procedure DoPopupShowingChanged(IsVisible: Boolean); virtual; + procedure PaintBackground(ACanvas: TCanvas; ARect: TRect); virtual; + public + constructor CreatePopupWindow(AOwner: TComponent; const AParentView: TTBView; + const AItem: TTBCustomItem; const ACustomizing: Boolean); override; + destructor Destroy; override; + property MaximumImageSize: TSize read FMaximumImageSize; + end; + + TSpTBXPopupWindowView = class(TTBPopupView) + protected + procedure AutoSize(AWidth, AHeight: Integer); override; + public + procedure SetIsToolbar(const Value: Boolean); + published + property IsToolbar; + end; + + { TSpTBXChevronItem } + + TSpTBXChevronItem = class(TTBChevronItem) + protected + function GetPopupWindowClass: TTBPopupWindowClass; override; + public + function GetItemViewerClass(AView: TTBView): TTBItemViewerClass; override; + end; + + TSpTBXChevronItemViewer = class(TTBItemViewer) + protected + procedure Paint(const Canvas: TCanvas; const ClientAreaRect: TRect; + IsSelected, IsPushed, UseDisabledShadow: Boolean); override; + public + function GetTextColor(State: TSpTBXSkinStatesType): TColor; virtual; + end; + + TSpTBXChevronPopupWindow = class(TSpTBXPopupWindow) + private + procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED; + end; + + { TSpTBXPopupMenu } + + ISpTBXPopupMenu = interface + ['{C576A225-6E42-49F6-96E5-712510C5D85C}'] + function InternalPopup(X, Y: Integer; ForceFocus: Boolean; PopupControl: TControl = nil): Boolean; + end; + + TSpTBXPopupMenu = class(TTBPopupMenu, ISpTBXPopupMenu) + private + FClickedItem: TTBCustomItem; + FReturnClickedItemOnly: Boolean; + FToolBoxPopup: Boolean; + function GetOnInitPopup: TSpTBXPopupEvent; + procedure SetOnInitPopup(const Value: TSpTBXPopupEvent); + function GetOnClosePopup: TNotifyEvent; + procedure SetOnClosePopup(const Value: TNotifyEvent); + protected + function InternalPopup(X, Y: Integer; ForceFocus: Boolean; PopupControl: TControl = nil): Boolean; virtual; + function GetRootItemClass: TTBRootItemClass; override; + public + procedure Popup(X: Integer; Y: Integer); override; + function PopupEx(X, Y: Integer; PopupControl: TControl = nil; ReturnClickedItemOnly: Boolean = False): TTBCustomItem; virtual; + published + property ToolBoxPopup: Boolean read FToolBoxPopup write FToolBoxPopup default False; + property OnInitPopup: TSpTBXPopupEvent read GetOnInitPopup write SetOnInitPopup; + property OnClosePopup: TNotifyEvent read GetOnClosePopup write SetOnClosePopup; + end; + + { TSpTBXCompoundItemsControl } + + TSpTBXCompoundItemsControl = class(TSpTBXCustomControl, ITBItems) + private + FSkinType: TSpTBXSkinType; + procedure DockRequestDock(Sender: TObject; Bar: TTBCustomDockableWindow; var Accept: Boolean); + function GetRootItems: TTBRootItem; + function GetView: TSpTBXToolbarView; + function GetImages: TCustomImageList; + procedure SetImages(const Value: TCustomImageList); + procedure SetSkinType(const Value: TSpTBXSkinType); + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + protected + FDock: TSpTBXDock; + FToolbar: TSpTBXToolbar; + procedure CreateParams(var Params: TCreateParams); override; + function GetDockClass: TSpTBXDockClass; virtual; + function GetToolbarClass: TSpTBXToolbarClass; virtual; + function GetItems: TTBCustomItem; virtual; // For ITBItems interface + procedure Loaded; override; + procedure SetName(const Value: TComponentName); override; + property Images: TCustomImageList read GetImages write SetImages; + property SkinType: TSpTBXSkinType read FSkinType write SetSkinType default sknSkin; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; // For ITBItems interface + procedure InvalidateBackground(InvalidateChildren: Boolean = True); virtual; + property View: TSpTBXToolbarView read GetView; + published + property Items: TTBRootItem read GetRootItems; + end; + + { TSpTBXCompoundBar } + + TSpTBXCompoundBar = class(TSpTBXCompoundItemsControl) + private + FOnDrawDockBackground: TSpTBXDrawEvent; + procedure DrawDockBackground(Sender: TObject; ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); + procedure DrawToolbarBackground(Sender: TObject; ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); + procedure DockResize(Sender: TObject); + protected + procedure DoDrawDockBackground(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + property OnDrawDockBackground: TSpTBXDrawEvent read FOnDrawDockBackground write FOnDrawDockBackground; + public + constructor Create(AOwner: TComponent); override; + end; + + { TSpTBXButtonOptions } + + TSpTBXButtonOptions = class(TPersistent) + private + FEditableItems: TTBGroupItem; + FCloseButton: TSpTBXItem; + FMinimizeButton: TSpTBXItem; + FMaximizeButton: TSpTBXItem; + FRightAlignSpacer: TSpTBXRightAlignSpacerItem; + FCaptionImageIndex: Integer; + FCloseImageIndex: Integer; + FMinimizeImageIndex: Integer; + FMaximizeImageIndex: Integer; + FRestoreImageIndex: Integer; + FCaptionLabel: WideString; + FCaption: Boolean; + FClose: Boolean; + FMinimize: Boolean; + FMaximize: Boolean; + FButtonBorders: Boolean; + FTitleBarMaxSize: Integer; + procedure SetCaptionImageIndex(Value: Integer); + procedure SetCloseImageIndex(Value: Integer); + procedure SetCaptionLabel(const Value: WideString); + procedure SetMaximizeImageIndex(Value: Integer); + procedure SetRestoreImageIndex(Value: Integer); + procedure SetMinimizeImageIndex(Value: Integer); + procedure SetCaption(const Value: Boolean); + procedure SetClose(const Value: Boolean); + procedure SetMaximize(const Value: Boolean); + procedure SetMinimize(const Value: Boolean); + procedure SetTitleBarMaxSize(const Value: Integer); + protected + FParentControl: TWinControl; + FToolbar: TSpTBXToolbar; + procedure ButtonsDrawImage(Sender: TObject; ACanvas: TCanvas; + State: TSpTBXSkinStatesType; const PaintStage: TSpTBXPaintStage; + var AImageList: TCustomImageList; var AImageIndex: Integer; var ARect: + TRect; var PaintDefault: Boolean); virtual; + procedure ButtonsDrawItem(Sender: TObject; ACanvas: TCanvas; ARect: TRect; + ItemInfo: TSpTBXMenuItemInfo; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); virtual; + procedure ButtonsClick(Sender: TObject); virtual; abstract; + procedure CreateButtons; virtual; + procedure UpdateButtonsVisibility; virtual; + procedure SetupButton(B: TSpTBXCustomItem); virtual; + function Restoring(B: TSpTBXCustomItem): Boolean; virtual; abstract; + public + constructor Create(AParent: TWinControl); virtual; + procedure SetupButtonIcon(B: TSpTBXCustomItem); virtual; + procedure MoveItemToTheLeft(B: TTBCustomItem); + property EditableItems: TTBGroupItem read FEditableItems; + property RightAlignSpacer: TSpTBXRightAlignSpacerItem read FRightAlignSpacer; + property MinimizeButton: TSpTBXItem read FMinimizeButton; + property MaximizeButton: TSpTBXItem read FMaximizeButton; + property CloseButton: TSpTBXItem read FCloseButton; + property CaptionLabel: WideString read FCaptionLabel write SetCaptionLabel; + published + property ButtonBorders: Boolean read FButtonBorders write FButtonBorders default True; + property Caption: Boolean read FCaption write SetCaption default True; + property Close: Boolean read FClose write SetClose default True; + property Minimize: Boolean read FMinimize write SetMinimize default True; + property Maximize: Boolean read FMaximize write SetMaximize default True; + property CaptionImageIndex: Integer read FCaptionImageIndex write SetCaptionImageIndex default -1; + property CloseImageIndex: Integer read FCloseImageIndex write SetCloseImageIndex default -1; + property MinimizeImageIndex: Integer read FMinimizeImageIndex write SetMinimizeImageIndex default -1; + property MaximizeImageIndex: Integer read FMaximizeImageIndex write SetMaximizeImageIndex default -1; + property RestoreImageIndex: Integer read FRestoreImageIndex write SetRestoreImageIndex default -1; + property TitleBarMaxSize: Integer read FTitleBarMaxSize write SetTitleBarMaxSize default 21; + end; + + { TSpTBXStatusBar } + + TSpTBXStatusToolbar = class(TSpTBXToolbar) + private + FSizeGrip: Boolean; + FSkinType: TSpTBXSkinType; + procedure SetSizeGrip(const Value: Boolean); + procedure WMNCLButtonDown(var Message: TWMNCLButtonDown); message WM_NCLBUTTONDOWN; + procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; + protected + FParentForm: TCustomForm; + procedure DoItemNotification(Ancestor: TTBCustomItem; Relayed: Boolean; Action: TTBItemChangedAction; Index: Integer; Item: TTBCustomItem); override; + function GetItemsTextColor(State: TSpTBXSkinStatesType): TColor; override; + function GetRightAlignMargin: Integer; override; + function GetParentFormWindowState: TWindowState; + function IsPointInGrip(P: TPoint): Boolean; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function GetGripRect: TRect; + function NeedsSeparatorRepaint: Boolean; + published + property SizeGrip: Boolean read FSizeGrip write SetSizeGrip default True; + end; + + TSpTBXCustomStatusBar = class(TSpTBXCompoundBar) + private + function GetSizeGrip: Boolean; + procedure SetSizeGrip(const Value: Boolean); + function GetStatusToolbar: TSpTBXStatusToolbar; + procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; + protected + FPrevState: TWindowState; + function CanResize(var NewWidth: Integer; var NewHeight: Integer): Boolean; override; + procedure DoDrawDockBackground(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); override; + procedure DrawSeparators(ACanvas: TCanvas; ARect: TRect); virtual; + function GetToolbarClass: TSpTBXToolbarClass; override; + property Align default alBottom; + property SizeGrip: Boolean read GetSizeGrip write SetSizeGrip default True; + public + constructor Create(AOwner: TComponent); override; + property Toolbar: TSpTBXStatusToolbar read GetStatusToolbar; + end; + + TSpTBXStatusBar = class(TSpTBXCustomStatusBar) + published + property Align; + property Anchors; + property BiDiMode; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + property ParentColor; + property ParentBiDiMode; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property Visible; + property OnCanResize; + property OnContextPopup; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnResize; + property OnStartDock; + property OnStartDrag; + // TSpTBXCustomStatusBar properties + property Images; + property SizeGrip; + property SkinType; + property OnDrawDockBackground; + end; + + { TSpTBXTitleBar } + + TSpTBXCustomTitleBar = class; + + TSpTBXTitleToolbar = class(TSpTBXToolbar) + private + procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; + protected + function GetItemsTextColor(State: TSpTBXSkinStatesType): TColor; override; + function GetTitleBar: TSpTBXCustomTitleBar; + function GetRightAlignMargin: Integer; override; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); override; + end; + + TSpTBXTitleBarButtonOptions = class(TSpTBXButtonOptions) + private + FSystemMenu: Boolean; + FSystemButton: TSpTBXSystemMenuItem; + procedure SetSystemMenu(const Value: Boolean); + protected + FTitleBar: TSpTBXCustomTitleBar; + procedure ButtonsDrawItem(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); override; + procedure ButtonsClick(Sender: TObject); override; + procedure CreateButtons; override; + function Restoring(B: TSpTBXCustomItem): Boolean; override; + public + constructor Create(AParent: TWinControl); override; + property SystemButton: TSpTBXSystemMenuItem read FSystemButton; + published + property SystemMenu: Boolean read FSystemMenu write SetSystemMenu default True; + end; + + TSpTBXCustomTitleBar = class(TSpTBXCompoundBar) + private + FActive: Boolean; + FFixedSize: Boolean; + FFullScreenMaximize: Boolean; + FMouseActive: Boolean; + FOptions: TSpTBXTitleBarButtonOptions; + FOldAppWndProc: Pointer; + FNewAppWndProc: Pointer; + FOnDrawBackground: TSpTBXDrawEvent; + FOnSystemMenuPopup: TSpTBXPopupEvent; + FOldParentFormWndProc: TWndMethod; + procedure AppWndProc(var Msg: TMessage); + procedure NewParentFormWndProc(var Message: TMessage); + procedure SetActive(const Value: Boolean); + procedure SetMouseActive(const Value: Boolean); + procedure SetFullScreenMaximize(const Value: Boolean); + function GetWindowState: TWindowState; + procedure SetWindowState(const Value: TWindowState); + procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED; + procedure WMEraseBkgnd(var Message: TMessage); message WM_ERASEBKGND; + procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; + protected + FParentForm: TCustomForm; + // Component + procedure Loaded; override; + function GetFloatingBorderSize: TPoint; + function GetItems: TTBCustomItem; override; // For ITBItems interface + function GetToolbarClass: TSpTBXToolbarClass; override; + procedure ChangeTitleBarState(Activate: Boolean); + procedure UpdateSkinMetrics; + + // Painting + procedure DoDrawDockBackground(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); override; + procedure DoDrawBackground(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + + // Sizing + procedure AdjustClientRect(var Rect: TRect); override; + procedure GetSizeCursor(MousePos: TPoint; var SizeCursor, SizeCode: Integer); + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); override; + + property Active: Boolean read FActive write SetActive default True; + property Align default alClient; + property FixedSize: Boolean read FFixedSize write FFixedSize default False; + property FullScreenMaximize: Boolean read FFullScreenMaximize write SetFullScreenMaximize default False; + property Options: TSpTBXTitleBarButtonOptions read FOptions write FOptions; + property WindowState: TWindowState read GetWindowState write SetWindowState; + property OnDrawBackground: TSpTBXDrawEvent read FOnDrawBackground write FOnDrawBackground; + property OnSystemMenuPopup: TSpTBXPopupEvent read FOnSystemMenuPopup write FOnSystemMenuPopup; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function GetClientAreaRect: TRect; + function IsActive: Boolean; + property MouseActive: Boolean read FMouseActive write SetMouseActive default True; + property Toolbar: TSpTBXToolbar read FToolbar; + published + property Caption; + end; + + TSpTBXTitleBar = class(TSpTBXCustomTitleBar) + published + property Align; + property Anchors; + property Color; + property BiDiMode; + property Constraints; + property DockSite; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + property ParentColor; + property ParentBiDiMode; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property Visible; + property OnCanResize; + property OnContextPopup; + property OnDockDrop; + property OnDockOver; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnGetSiteInfo; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnResize; + property OnStartDock; + property OnStartDrag; + property OnUnDock; + // TSpTBXCustomTitleBar properties + property Active; + property FixedSize; + property FullScreenMaximize; + property Images; + property Options; + property OnDrawBackground; + property OnDrawDockBackground; + property OnSystemMenuPopup; + end; + + { TBitmapHint } + + TBitmapHint = class(THintWindow) + private + FHintBitmap: TBitmap; + FActivating: Boolean; + procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED; + protected + procedure Paint; override; + public + property Activating: Boolean read FActivating; + procedure ActivateHint(Rect: TRect; const AHint: string); override; + procedure ActivateHintData(Rect: TRect; const AHint: string; AData: Pointer); override; + end; + +{ Item helpers } +procedure SpFillItemInfo(ACanvas: TCanvas; IV: TTBItemViewer; out ItemInfo: TSpTBXMenuItemInfo); +function SpGetBoundsRect(IV: TTBItemViewer; Root: TTBRootItem): TRect; +procedure SpGetAllItems(AParentItem: TTBCustomItem; ItemsList: TTntStringList; ClearFirst: Boolean = True); +function SpGetMenuMaximumImageSize(View: TTBView): TSize; +function SpGetItemViewerFromPoint(Root: TTBRootItem; View: TTBView; P: TPoint; ProcessGroupItems: Boolean = True): TTBItemViewer; +function SpGetNextItemSameEdge(View: TTBView; IV: TTBItemViewer; GoForward: Boolean; SearchType: TSpTBXSearchItemViewerType): TTBItemViewer; +function SpGetFirstRightAlignSpacer(View: TTBView): TSpTBXItemViewer; +function SpGetRightAlignedItems(View: TTBView; RightAlignedList: TList; IsRotated: Boolean; out VisibleTotalWidth, RightAlignedTotalWidth: Integer): TSpTBXItemViewer; +procedure SpInvalidateItem(View: TTBView; Item: TTBCustomItem); +function SpFindItemViewer(View: TTBView; Item: TTBCustomItem): TTBItemViewer; +function SpFindControlItem(Item: TTBCustomItem; Ctl: TControl; Recurse: Boolean = True): TTBControlItem; +procedure SpGetDropPosItemViewer(Root: TTBRootItem; View: TTBView; P: TPoint; out DestIV: TTBItemViewer; out DestItemPos: Integer; out DropMark: TRect); overload; +procedure SpGetDropPosItemViewer(Root: TTBRootItem; View: TTBView; P: TPoint; SourceItemPos: Integer; out DestIV: TTBItemViewer; out DestItemPos: Integer); overload; +function SpGetDragHandleSize(Toolbar: TTBCustomDockableWindow): Integer; +function SpIsVerticalToolbar(Toolbar: TTBCustomDockableWindow): Boolean; +function SpIsDockUsingBitmap(Dock: TTBDock): Boolean; + +{ Painting helpers } +procedure SpDrawXPToolbarButton(ACanvas: TCanvas; ARect: TRect; State: TSpTBXSkinStatesType; SkinType: TSpTBXSkinType; ComboPart: TSpTBXComboPart = cpNone); +procedure SpDrawXPMenuItem(ACanvas: TCanvas; ARect: TRect; ItemInfo: TSpTBXMenuItemInfo); +procedure SpDrawXPMenuSeparator(ACanvas: TCanvas; ARect: TRect; MenuItemStyle, Vertical: Boolean); +procedure SpDrawXPMenuItemImage(ACanvas: TCanvas; ARect: TRect; const ItemInfo: TSpTBXMenuItemInfo; ImageList: TCustomImageList; ImageIndex: Integer); +procedure SpDrawXPMenuGutter(ACanvas: TCanvas; ARect: TRect; SkinType: TSpTBXSkinType); +procedure SpDrawXPMenuPopupWindow(ACanvas: TCanvas; ARect, OpenIVRect: TRect; DrawGutter: Boolean; ImageSize: Integer; SkinType: TSpTBXSkinType); +procedure SpDrawXPStatusBar(ACanvas: TCanvas; ARect, AGripRect: TRect; SkinType: TSpTBXSkinType); +procedure SpDrawXPTitleBar(ACanvas: TCanvas; ARect: TRect; IsActive: Boolean; DrawBorders: Boolean = True); +procedure SpDrawXPTitleBarBody(ACanvas: TCanvas; ARect: TRect; IsActive: Boolean; BorderSize: TPoint; DrawBody: Boolean = True); +procedure SpDrawXPDock(ACanvas: TCanvas; ARect: TRect; SkinType: TSpTBXSkinType; Vertical: Boolean = False); +procedure SpDrawXPToolbar(ACanvas: TCanvas; ARect: TRect; SkinType: TSpTBXSkinType; Docked, Floating, Vertical, PaintSkinBackground, PaintBorders: Boolean; SkinComponent: TSpTBXSkinComponentsType = skncToolbar); overload; +procedure SpDrawXPToolbar(W: TTBCustomDockableWindow; ACanvas: TCanvas; ARect: TRect; PaintOnNCArea: Boolean; PaintBorders: Boolean = True; SkinComponent: TSpTBXSkinComponentsType = skncToolbar); overload; +procedure SpDrawXPToolbarGrip(W: TTBCustomDockableWindow; ACanvas: TCanvas; ARect: TRect); +procedure SpDrawXPTooltipBackground(ACanvas: TCanvas; ARect: TRect); + +{ Menu helpers } +function SpCalcPopupPosition(const X, Y, Width, Height: Integer; PopupControl: TControl = nil; IsVertical: Boolean = False): TPoint; +function SpHMenuGetCaption(Menu: HMenu; Index: Integer): WideString; +function SpHMenuToTBMenuItem(Menu: HMenu; ParentItem: TTBCustomItem): Boolean; +function SpShowSystemPopupMenu(ParentForm: TCustomForm; ScreenPos: TPoint; DoDefault: Boolean = True): Integer; +function SpFillSystemSpTBXPopup(ParentForm: TCustomForm; ParentItem: TTBCustomItem; ShowSize, ShowMinimize, ShowMaximize, ShowClose: Boolean; ClickEvent: TNotifyEvent = nil): Boolean; +function SpShowSystemSpTBXPopupMenu(ParentForm: TCustomForm; ScreenPos: TPoint; ShowSize, ShowMinimize, ShowMaximize, ShowClose: Boolean; PopupEvent: TSpTBXPopupEvent; DoDefault: Boolean = True): Integer; + +{ Misc helpers } +procedure SpActivateDwmNC(WinControl: TWinControl; Activate: Boolean); +function SpIsDwmCompositionEnabled: Boolean; +function SpCanFocus(WinControl: TWinControl): Boolean; +function SpIsFocused(WinControl: TWinControl; out FocusedChild: TWinControl): Boolean; +function SpFocusFirstChild(WinControl: TWinControl): TWinControl; +function SpFindControl(Parent: TWinControl; Child: TControl): Integer; +function SpFindParent(Control: TControl; ParentClass: TClass): TWinControl; +function SpHasBorders(WinControl: TWinControl): Boolean; +function SpGetFormWindowState(F: TCustomForm; out RestoreBoundsRect: TRect): TWindowState; +procedure SpSetFormWindowState(F: TCustomForm; WindowState: TWindowState; RestoreBoundsRect: TRect); +function SpGetTaskBar(out State, Edge: Cardinal; out Bounds: TRect): Boolean; +procedure SpRecalcNCArea(WinControl: TWinControl); + +{ Customizer helpers } +procedure SpCustomizeAllToolbars(AParentComponent: TComponent; Reset: Boolean); +procedure SpBeginUpdateAllToolbars(AParentComponent: TComponent); +procedure SpEndUpdateAllToolbars(AParentComponent: TComponent); + +{ Unicode helpers } +procedure SpPersistent_AfterInherited_DefineProperties(Filer: TFiler; Instance: TPersistent); + +var + SmCaptionFont: TFont; + SpStockHintBitmap: TBitmap; + MDIButtonsImgList: TImageList = nil; + SpTBXHintWindowClass: THintWindowClass = TBitmapHint; + +const + CDefaultToolbarBorderSize = 2; // Default size of Floating Toolbar borders + crSpTBXNewHandPoint = 100; // Cursor ID to replace crHandPoint for IDC_HAND + crSpTBXCustomization = 101; // Cursor ID used for item D&D customization accepted + crSpTBXCustomizationCancel = 102; // Cursor ID used for item D&D customization cancelled + +implementation + +{$R SpTBXGlyphs.res} + +uses + Themes, UxTheme, + TypInfo, Types, ComCtrls, CommCtrl, ShellApi, + {$IFDEF JR_D11} DwmApi, {$ENDIF} + {$IFNDEF UNICODE} TntWindows, TntSysUtils, TntActnList, TntForms, {$ENDIF} + TB2Anim, TB2Common; + +const + ROP_DSPDxax = $00E20746; + // Constants for TSpTBXToolWindow registry values. Do not localize! + rvClientWidth = 'ClientWidth'; + rvClientHeight = 'ClientHeight'; + // ColorPalette constants: + CPDefaultColors: array[0..CPDefaultCols * CPDefaultRows - 1] of TIdentMapEntry = ( + (Value: $000000; Name: 'Black'), + (Value: $003399; Name: 'Brown'), + (Value: $003333; Name: 'Olive Green'), + (Value: $003300; Name: 'Dark Green'), + (Value: $663300; Name: 'Dark Teal'), + (Value: $800000; Name: 'Dark blue'), + (Value: $993333; Name: 'Indigo'), + (Value: $333333; Name: 'Gray-80%'), + + (Value: $000080; Name: 'Dark Red'), + (Value: $0066FF; Name: 'Orange'), + (Value: $008080; Name: 'Dark Yellow'), + (Value: $008000; Name: 'Green'), + (Value: $808000; Name: 'Teal'), + (Value: $FF0000; Name: 'Blue'), + (Value: $996666; Name: 'Blue-Gray'), + (Value: $808080; Name: 'Gray-50%'), + + (Value: $0000FF; Name: 'Red'), + (Value: $0099FF; Name: 'Light Orange'), + (Value: $00CC99; Name: 'Lime'), + (Value: $669933; Name: 'Sea Green'), + (Value: $CCCC33; Name: 'Aqua'), + (Value: $FF6633; Name: 'Light Blue'), + (Value: $800080; Name: 'Violet'), + (Value: $969696; Name: 'Gray-40%'), + + (Value: $FF00FF; Name: 'Pink'), + (Value: $00CCFF; Name: 'Gold'), + (Value: $00FFFF; Name: 'Yellow'), + (Value: $00FF00; Name: 'Bright Green'), + (Value: $FFFF00; Name: 'Turquoise'), + (Value: $FFCC00; Name: 'Sky Blue'), + (Value: $663399; Name: 'Plum'), + (Value: $C0C0C0; Name: 'Gray-25%'), + + (Value: $CC99FF; Name: 'Rose'), + (Value: $99CCFF; Name: 'Tan'), + (Value: $99FFFF; Name: 'Light Yellow'), + (Value: $CCFFCC; Name: 'Light Green'), + (Value: $FFFFCC; Name: 'Light Turquoise'), + (Value: $FFCC99; Name: 'Pale Blue'), + (Value: $FF99CC; Name: 'Lavender'), + (Value: $FFFFFF; Name: 'White')); + +type + TTBCustomItemAccess = class(TTBCustomItem); + TTBItemViewerAccess = class(TTBItemViewer); + TTBViewAccess = class(TTBView); + TTBDockAccess = class(TTBDock); + TTBCustomDockableWindowAccess = class(TTBCustomDockableWindow); + TTBBasicBackgroundAccess = class(TTBBasicBackground); + TControlAccess = class(TControl); + TWinControlAccess = class(TWinControl); + TCustomFormAccess = class(TCustomForm); + TActionLinkAccess = class(TActionLink); + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Item Helpers } + +procedure SpFillItemInfo(ACanvas: TCanvas; IV: TTBItemViewer; out ItemInfo: TSpTBXMenuItemInfo); +var + Item: TTBCustomItemAccess; + View: TTBViewAccess; + + IsHoverItem, IsOpen, IsPushed: Boolean; + IsSplit, IsComboPushed: Boolean; + IsToolbarStyle, ImageIsShown: Boolean; + ImgSize, RightImageSize: TSize; +begin + Item := TTBCustomItemAccess(IV.Item); + View := TTBViewAccess(IV.View); + + if IV is TSpTBXItemViewer then + IsToolbarStyle := TSpTBXItemViewer(IV).IsToolbarStyle + else + IsToolbarStyle := IV.IsToolbarStyle; + IsOpen := IV = View.OpenViewer; + IsHoverItem := IV = View.Selected; + IsPushed := IsHoverItem and (IsOpen or (View.MouseOverSelected and View.Capture and IsToolbarStyle)); + IsSplit := tbisCombo in Item.ItemStyle; + IsComboPushed := IsSplit and IsPushed and not View.Capture; + if IsComboPushed then IsPushed := False; + + ImgSize.cx := 0; + ImgSize.cy := 0; + RightImageSize.cx := 0; + RightImageSize.cy := 0; + ImageIsShown := False; + if IV is TSpTBXItemViewer then begin + if TSpTBXItemViewer(IV).GetImageShown then begin + ImgSize := TSpTBXItemViewer(IV).GetImageSize; + if (ImgSize.cx > 0) and (ImgSize.cy > 0) then + ImageIsShown := True; + end; + RightImageSize := TSpTBXItemViewer(IV).GetRightImageSize; + end; + + FillChar(ItemInfo, SizeOf(ItemInfo), 0); + ItemInfo.Enabled := Item.Enabled or View.Customizing; + ItemInfo.Pushed := IsPushed; + ItemInfo.Checked := Item.Checked; + ItemInfo.HotTrack := IsHoverItem; + ItemInfo.ImageShown := ImageIsShown; + ItemInfo.ImageOrCheckShown := ImageIsShown or (not IsToolbarStyle and Item.Checked); + ItemInfo.ImageSize := ImgSize; + ItemInfo.RightImageSize := RightImageSize; + ItemInfo.IsDesigning := csDesigning in View.ComponentState; + ItemInfo.IsOnMenuBar := vsMenuBar in View.Style; + ItemInfo.IsVertical := (View.Orientation = tbvoVertical) and not IsSplit; + ItemInfo.IsOnToolbox := False; + if IV is TSpTBXItemViewer then + ItemInfo.IsOnToolbox := TSpTBXItemViewer(IV).IsOnToolBoxPopup; + ItemInfo.IsOpen := IsOpen; + ItemInfo.IsSplit := IsSplit; + ItemInfo.ComboRect := Rect(0, 0, 0, 0); + // HasArrow = tboDropdownArrow or (Submenu and Combo) + ItemInfo.HasArrow := (tboDropdownArrow in Item.Options) or + ((tbisSubmenu in Item.ItemStyle) and (tbisCombo in Item.ItemStyle)); + ItemInfo.ToolbarStyle := IsToolbarStyle; + + if ItemInfo.ToolbarStyle then + begin + if ItemInfo.HasArrow then + ItemInfo.ComboPart := cpCombo; + if ItemInfo.IsSplit then + ItemInfo.ComboPart := cpSplitLeft; + end + else begin + // Only for menu items + if View.Window is TSpTBXPopupWindow then + CurrentSkin.GetMenuItemMargins(ACanvas, TSpTBXPopupWindow(View.Window).MaximumImageSize.cx, ItemInfo.MenuMargins) + else + CurrentSkin.GetMenuItemMargins(ACanvas, ImgSize.cx, ItemInfo.MenuMargins); + end; + + if tbisClicksTransparent in Item.ItemStyle then + ItemInfo.State := CurrentSkin.GetState(ItemInfo.Enabled, False, False, False) + else + ItemInfo.State := CurrentSkin.GetState(ItemInfo.Enabled, ItemInfo.Pushed, ItemInfo.HotTrack, ItemInfo.Checked); + + ItemInfo.ComboState := sknsNormal; + if IsSplit then begin + ItemInfo.ComboState := ItemInfo.State; + if IsComboPushed then + ItemInfo.ComboState := sknsPushed + else + case ItemInfo.State of + sknsPushed: ItemInfo.ComboState := sknsHotTrack; + sknsChecked: ItemInfo.ComboState := sknsNormal; + sknsCheckedAndHotTrack: ItemInfo.ComboState := sknsHotTrack; + end; + end; + + ItemInfo.SkinType := SkinManager.GetSkinType; + + // [Theme-Change] + // The Default theme paints the caption of the pushed button in a down + // state, this only happens when the Item is on a toolbar and: + // 1) Windows themes are enabled and the item is not on a menubar + // 2) Windows themes are disabled + ItemInfo.IsSunkenCaption := False; + if (ItemInfo.Pushed or ItemInfo.Checked) and ItemInfo.ToolbarStyle then + ItemInfo.IsSunkenCaption := (not ItemInfo.IsOnMenuBar and (ItemInfo.SkinType = sknWindows)) or + (ItemInfo.SkinType = sknNone); +end; + +function SpGetBoundsRect(IV: TTBItemViewer; Root: TTBRootItem): TRect; +// Returns the Bounds Rect of an ItemViewer. +// If the ItemViewer is a GroupItemViewer then it returns the sum +// of all the ItemViewers inside it. +var + G: TTBItemViewer; + V: TTBView; + I, J: Integer; + R: TRect; + FirstItemFound: Boolean; +begin + Result := Rect(0, 0, 0, 0); + if Assigned(IV) then + if IV.Item is TTBGroupItem then begin + // Sum all the ItemViewers of the GroupItem + V := IV.View; + J := IV.Index + 1; + FirstItemFound := False; + for I := J to V.ViewerCount - 1 do begin + G := V.Viewers[I]; + if (G.Item.Parent = Root) then + Break + else + if G.Item.Visible and not (G.Item is TTBGroupItem) then + if not FirstItemFound then begin + FirstItemFound := True; + Result := G.BoundsRect; + end + else begin + R := G.BoundsRect; + Result.Left := Min(Result.Left, R.Left); + Result.Top := Min(Result.Top, R.Top); + Result.Right := Max(Result.Right, R.Right); + Result.Bottom := Max(Result.Bottom, R.Bottom); + end; + end; + end + else + Result := IV.BoundsRect; +end; + +procedure SpGetAllItems(AParentItem: TTBCustomItem; ItemsList: TTntStringList; ClearFirst: Boolean = True); +// Returns a StringList with all the items, subitems and linked items from AParentItem. +// The ItemsList.Strings[] contains the items name +// The ItemsList.Objects[] contains the items reference + + procedure Iterate(AParentItem: TTBCustomItem; LinkDepth: Integer); + var + I: Integer; + NewParentItem, Item: TTBCustomItem; + begin + NewParentItem := AParentItem; + if Assigned(NewParentItem.LinkSubitems) then begin + NewParentItem := NewParentItem.LinkSubitems; + Inc(LinkDepth); + if LinkDepth > 25 then + Exit; { prevent infinite link recursion } + end; + for I := 0 to NewParentItem.Count - 1 do begin + Item := NewParentItem.Items[I]; + ItemsList.AddObject(Item.Name, Item); + Iterate(Item, LinkDepth); + end; + end; + +begin + if ClearFirst then + ItemsList.Clear; + Iterate(AParentItem, 0); +end; + +function SpGetMenuMaximumImageSize(View: TTBView): TSize; +// Iterates the viewers and returns the maximum image size +var + I: Integer; + IV: TTBItemViewer; + IL: TCustomImageList; + ImageShown: Boolean; +begin + Result.cx := 0; + Result.cy := 0; + for I := 0 to View.ViewerCount - 1 do begin + IV := View.Viewers[I]; + if IV is TSpTBXItemViewer then + ImageShown := TSpTBXItemViewer(IV).GetImageShown + else + ImageShown := TTBItemViewerAccess(IV).ImageShown; + + if ImageShown then begin + IL := TTBItemViewerAccess(IV).GetImageList; + if Assigned(IL) then begin + if IL.Width > Result.cx then + Result.cx := IL.Width; + if IL.Height > Result.cy then + Result.cy := IL.Height; + end; + end; + end; +end; + +function SpGetItemViewerFromPoint(Root: TTBRootItem; View: TTBView; P: TPoint; + ProcessGroupItems: Boolean = True): TTBItemViewer; +// Returns the ItemViewer at the given position +// If ProcessGroupItems is true and the ItemViewer is on a GroupItem return +// the GroupItem's ItemViewer instead. +var + IV: TTBItemViewer; + I, X: Integer; + G: TTBItemViewer; +begin + Result := nil; + if Assigned(Root) and Assigned(View) then begin + IV := View.ViewerFromPoint(P); + + // If the Item is not on the Root it must be part of a GroupItem + if ProcessGroupItems and Assigned(IV) and not (IV.Item is TTBChevronItem) and (IV.Item.Parent <> Root) then begin + // Get the parent GroupItem ItemViewer + X := IV.Index; + for I := X downto 0 do begin + G := IV.View.Viewers[I]; + if G.Item is TTBGroupItem then begin + Result := G; + Break; + end; + end; + end + else + Result := IV; + end; +end; + +function SpGetNextItemSameEdge(View: TTBView; IV: TTBItemViewer; GoForward: Boolean; + SearchType: TSpTBXSearchItemViewerType): TTBItemViewer; +// Returns the left or right Tab item depending on GoForward +// SearchType can be: +// sivtNormal: Normal search +// sivtInmediate: Search for the inmediate ItemViewer +// sivtInmediateSkipNonVisible: Search for the next inmediate ItemViewer, skipping non visible ones +var + Temp: TTBItemViewer; + I: Integer; +begin + Result := nil; + if IV = nil then + Result := View.NextSelectable(nil, GoForward) + else begin + View.ValidatePositions; + I := View.IndexOf(IV); + while not Assigned(Result) do begin + if GoForward then Inc(I) + else Dec(I); + + if (I > View.ViewerCount - 1) or (I < 0) then + Break + else begin + Temp := View.Viewers[I]; + // Skip non visible items, search for same edge items + if Temp.Item.Visible and (Temp.OffEdge = IV.OffEdge) and (Temp.BoundsRect.Top = IV.BoundsRect.Top) then begin + Result := Temp; // Found IV + Break; + end + else begin + case SearchType of + sivtInmediate: + Break; // Inmediate not found, exit + sivtInmediateSkipNonVisible: + if Temp.Item.Visible then Break; // Inmediate not found and visible, exit + end; + end; + end; + end; + end; +end; + +function SpGetFirstRightAlignSpacer(View: TTBView): TSpTBXItemViewer; +var + I: Integer; + IV: TTBItemViewer; +begin + Result := nil; + for I := 0 to View.ViewerCount - 1 do begin + IV := View.Viewers[I]; + if IV.Item.Visible and (IV.Item is TSpTBXRightAlignSpacerItem) then + Result := IV as TSpTBXItemViewer; + end; +end; + +function SpGetRightAlignedItems(View: TTBView; RightAlignedList: TList; + IsRotated: Boolean; out VisibleTotalWidth, RightAlignedTotalWidth: Integer): TSpTBXItemViewer; + + function GetWidth(R: TRect): Integer; + begin + if IsRotated then + Result := R.Bottom - R.Top + else + Result := R.Right - R.Left; + end; + +var + I: Integer; + IV: TTBItemViewer; +begin + Result := nil; + + if Assigned(RightAlignedList) then + RightAlignedList.Clear; + VisibleTotalWidth := 0; + RightAlignedTotalWidth := 0; + + for I := 0 to View.ViewerCount - 1 do begin + IV := View.Viewers[I]; + if IV.Item.Visible then + VisibleTotalWidth := VisibleTotalWidth + GetWidth(IV.BoundsRect); + if not Assigned(Result) and (IV.Item.Visible) and (IV.Item is TSpTBXRightAlignSpacerItem) then + Result := IV as TSpTBXItemViewer; + if Assigned(Result) then begin + if Assigned(RightAlignedList) then + RightAlignedList.Add(IV); + RightAlignedTotalWidth := RightAlignedTotalWidth + GetWidth(IV.BoundsRect); + end; + end; +end; + +procedure SpInvalidateItem(View: TTBView; Item: TTBCustomItem); +var + IV: TTBItemViewer; +begin + IV := View.Find(Item); + if Assigned(IV) then View.Invalidate(IV); +end; + +function SpFindItemViewer(View: TTBView; Item: TTBCustomItem): TTBItemViewer; +var + I: Integer; +begin + Result := nil; + if Assigned(Item) then + for I := 0 to View.ViewerCount - 1 do + if View.Viewers[I].Item = Item then begin + Result := View.Viewers[I]; + Exit; + end; +end; + +function SpFindControlItem(Item: TTBCustomItem; Ctl: TControl; Recurse: Boolean): TTBControlItem; +var + I: Integer; +begin + Result := nil; + for I := 0 to Item.Count - 1 do begin + if Recurse and (Item[I] is TTBGroupItem) then begin + Result := SpFindControlItem(Item[I], Ctl, True); + if Assigned(Result) then + Break; + end; + if (Item[I] is TTBControlItem) and (TTBControlItem(Item[I]).Control = Ctl) then begin + Result := TTBControlItem(Item[I]); + Break; + end; + end; +end; + +procedure SpGetDropPosItemViewer(Root: TTBRootItem; View: TTBView; P: TPoint; + out DestIV: TTBItemViewer; out DestItemPos: Integer; out DropMark: TRect); +// Returns the ItemViewer and Item index at the given position for Drag & Drop +// operations that needs a DropMark rect. +// Use this when the items are dropped when the drag operation is finished. +var + DestR: TRect; +const + DropMarkSize = 4; +begin + DestItemPos := -1; + DestIV := SpGetItemViewerFromPoint(Root, View, P); + DropMark := Rect(0, 0, 0, 0); + if Assigned(DestIV) then begin + // Get the destination item position + DestItemPos := Root.IndexOf(DestIV.Item); + DestR := SpGetBoundsRect(DestIV, Root); + if View.Orientation = tbvoVertical then begin + if P.Y > ((DestR.Bottom - DestR.Top) div 2) + DestR.Top then begin + Inc(DestItemPos); + DropMark := Rect(0, DestR.Bottom, View.BaseSize.X, DestR.Bottom + DropMarkSize); + end + else + DropMark := Rect(0, DestR.Top, View.BaseSize.X, DestR.Top + DropMarkSize); + end + else + if P.X > ((DestR.Right - DestR.Left) div 2) + DestR.Left then begin + Inc(DestItemPos); + DropMark := Rect(DestR.Right, 0, DestR.Right + DropMarkSize, View.BaseSize.Y); + end + else + DropMark := Rect(DestR.Left, 0, DestR.Left + DropMarkSize, View.BaseSize.Y); + end; +end; + +procedure SpGetDropPosItemViewer(Root: TTBRootItem; View: TTBView; P: TPoint; + SourceItemPos: Integer; out DestIV: TTBItemViewer; out DestItemPos: Integer); +// Returns the ItemViewer and Item index at the given position for inmediate +// Drag & Drop operations without a DropMark. +// Use this when the items are moved while the mouse is being dragged. +var + DestR: TRect; +begin + DestItemPos := -1; + DestIV := SpGetItemViewerFromPoint(Root, View, P); + if Assigned(DestIV) then begin + // Get the destination item position + DestItemPos := Root.IndexOf(DestIV.Item); + DestR := SpGetBoundsRect(DestIV, Root); + + if View.Orientation = tbvoVertical then begin + if P.Y > ((DestR.Bottom - DestR.Top) div 2) + DestR.Top then begin + if DestItemPos - 1 <> SourceItemPos then Inc(DestItemPos); + end + else begin + if DestItemPos - 1 = SourceItemPos then Dec(DestItemPos); + end; + end + else + if P.X > ((DestR.Right - DestR.Left) div 2) + DestR.Left then begin + if DestItemPos - 1 <> SourceItemPos then Inc(DestItemPos); + end + else begin + if DestItemPos - 1 = SourceItemPos then Dec(DestItemPos); + end; + end; +end; + +function SpGetDragHandleSize(Toolbar: TTBCustomDockableWindow): Integer; +const + DragHandleSizes: array [Boolean, 0..2] of Integer = ((9, 0, 6), (14, 14, 14)); +var + T: TTBCustomDockableWindowAccess; +begin + Result := 0; + if Assigned(Toolbar.CurrentDock) then + if Toolbar.CurrentDock.AllowDrag then begin + T := TTBCustomDockableWindowAccess(Toolbar); + Result := DragHandleSizes[T.CloseButtonWhenDocked, Ord(T.DragHandleStyle)] + end; +end; + +function SpIsVerticalToolbar(Toolbar: TTBCustomDockableWindow): Boolean; +begin + if Assigned(Toolbar.CurrentDock) then + Result := Toolbar.CurrentDock.Position in [dpLeft, dpRight] + else + Result := False; +end; + +function SpIsDockUsingBitmap(Dock: TTBDock): Boolean; +var + Background: TTBBasicBackgroundAccess; +begin + Background := TTBBasicBackgroundAccess(Dock.Background); + Result := Assigned(Background) and Background.UsingBackground; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Painting helpers } + +procedure SpDrawXPToolbarButton(ACanvas: TCanvas; ARect: TRect; State: TSpTBXSkinStatesType; + SkinType: TSpTBXSkinType; ComboPart: TSpTBXComboPart = cpNone); +// Paints a toolbar button depending on the State and SkinType +var + Flags: Integer; + ForceRectBorders: TAnchors; +const + XPPart: array [TSpTBXComboPart] of Integer = (TP_BUTTON, TP_DROPDOWNBUTTON, + TP_SPLITBUTTON, TP_SPLITBUTTONDROPDOWN); +begin + case SkinType of + sknNone: + begin + case State of + sknsNormal, sknsDisabled: ; // Do nothing + sknsHotTrack: + Windows.DrawEdge(ACanvas.Handle, ARect, BDR_RAISEDINNER, BF_RECT); + sknsPushed, sknsCheckedAndHotTrack: + Windows.DrawEdge(ACanvas.Handle, ARect, BDR_SUNKENOUTER, BF_RECT); + sknsChecked: + begin + ACanvas.Brush.Bitmap := AllocPatternBitmap(clBtnFace, clBtnHighlight);; + ACanvas.Brush.Bitmap.HandleType := bmDDB; // Needed for Win95, or else brush is solid white + ACanvas.FillRect(ARect); + ACanvas.Brush.Style := bsClear; + Windows.DrawEdge(ACanvas.Handle, ARect, BDR_SUNKENOUTER, BF_RECT); + end; + end; + end; + sknWindows: + begin + Flags := TS_NORMAL; + case State of + sknsDisabled: Flags := TS_DISABLED; + sknsHotTrack: Flags := TS_HOT; + sknsPushed: Flags := TS_PRESSED; + sknsChecked: Flags := TS_CHECKED; + sknsCheckedAndHotTrack: Flags := TS_HOTCHECKED; + end; + DrawThemeBackground(ThemeServices.Theme[teToolBar], ACanvas.Handle, XPPart[ComboPart], Flags, ARect, nil); + end; + sknSkin: + begin + ForceRectBorders := []; + if ComboPart = cpSplitLeft then ForceRectBorders := [akRight] + else + if ComboPart = cpSplitRight then ForceRectBorders := [akLeft]; + CurrentSkin.PaintBackground(ACanvas, ARect, skncToolbarItem, State, True, True, False, ForceRectBorders); + end; + end; +end; + +procedure SpDrawXPMenuItem(ACanvas: TCanvas; ARect: TRect; ItemInfo: TSpTBXMenuItemInfo); +// Paints a menu or toolbar item depending on the ItemInfo + + procedure ToolbarItemDraw(ARect: TRect); + var + ForceRectBorders: TAnchors; + Flags: Integer; + begin + ForceRectBorders := []; + if ItemInfo.IsSplit then + if ItemInfo.ComboPart = cpSplitLeft then ForceRectBorders := [akRight] + else + if ItemInfo.ComboPart = cpSplitRight then ForceRectBorders := [akLeft]; + + case ItemInfo.SkinType of + sknNone: + begin + if ItemInfo.Checked then + if not ItemInfo.HotTrack or (not ItemInfo.Enabled and ItemInfo.ToolbarStyle) then + ItemInfo.State := sknsChecked; // Paint Disabled&Checked as Checked + + if ItemInfo.State = sknsNormal then begin + if ItemInfo.IsDesigning then + Windows.DrawEdge(ACanvas.Handle, ARect, BDR_RAISEDINNER, BF_RECT); + end + else + SpDrawXPToolbarButton(ACanvas, ARect, ItemInfo.State, ItemInfo.SkinType, ItemInfo.ComboPart); + end; + sknWindows: + if ItemInfo.IsDesigning then + SpDrawRectangle(ACanvas, ARect, 2, clBtnShadow, clBtnShadow, clNone, clNone, ForceRectBorders) + else + if ItemInfo.IsOnMenuBar then begin + if SpIsWinVistaOrUp then begin + // Use the new API on Windows Vista + Flags := MBI_NORMAL; + case ItemInfo.State of + sknsDisabled: Flags := MBI_DISABLED; + sknsHotTrack: Flags := MBI_HOT; + sknsPushed: Flags := MBI_PUSHED; + end; + + DrawThemeBackground(ThemeServices.Theme[teMenu], ACanvas.Handle, MENU_BARITEM, Flags, ARect, nil); + end + else + if ItemInfo.State in [sknsHotTrack, sknsPushed, sknsChecked, sknsCheckedAndHotTrack] then + SpFillRect(ACanvas, ARect, clHighlight); + end + else + SpDrawXPToolbarButton(ACanvas, ARect, ItemInfo.State, ItemInfo.SkinType, ItemInfo.ComboPart); + sknSkin: + if ItemInfo.IsOpen and CurrentSkin.OfficePopup then begin + // Paints skncOpenToolbarItem skin, hide the bottom border + ARect.Bottom := ARect.Bottom + 2; + CurrentSkin.PaintBackground(ACanvas, ARect, skncOpenToolbarItem, sknsNormal, True, True) + end + else + if ItemInfo.IsDesigning then + SpDrawRectangle(ACanvas, ARect, 2, clBtnShadow, clBtnShadow, clNone, clNone, ForceRectBorders) + else + if ItemInfo.IsOnMenuBar then + CurrentSkin.PaintBackground(ACanvas, ARect, skncMenuBarItem, ItemInfo.State, True, True, False, ForceRectBorders) + else + SpDrawXPToolbarButton(ACanvas, ARect, ItemInfo.State, ItemInfo.SkinType, ItemInfo.ComboPart); + end; + end; + + procedure MenuItemDraw(ARect: TRect); + var + Flags: Integer; + begin + case ItemInfo.SkinType of + sknNone: + SpFillRect(ACanvas, ARect, clHighlight); + sknWindows: + if SpIsWinVistaOrUp then begin + // Use the new API on Windows Vista + if ItemInfo.Enabled then Flags := MPI_HOT + else Flags := MPI_DISABLEDHOT; + DrawThemeBackground(ThemeServices.Theme[teMenu], ACanvas.Handle, MENU_POPUPITEM, Flags, ARect, nil); + end + else + SpFillRect(ACanvas, ARect, clHighlight); + sknSkin: + CurrentSkin.PaintBackground(ACanvas, ARect, skncMenuItem, sknsHotTrack, True, True); + end; + end; + +var + R: TRect; + DrawCheckBoxFrame: Boolean; + C: TColor; + SelectionDelta: Integer; + Flags: Integer; +begin + if ItemInfo.ToolbarStyle then begin // Toolbar Item + if ItemInfo.IsSplit then begin + if ItemInfo.IsOpen and CurrentSkin.OfficePopup then begin + // If it's Split, Open and OfficePopup paint the skncOpenToolbarItem skin + ARect.Right := ItemInfo.ComboRect.Right; + ToolbarItemDraw(ARect); + end + else begin + // Draw the left side button + if (ItemInfo.SkinType = sknSkin) or ItemInfo.IsDesigning then + Inc(ARect.Right, 2); + ItemInfo.ComboPart := cpSplitLeft; + ToolbarItemDraw(ARect); + + // Draw the right side button + ItemInfo.ComboPart := cpSplitRight; + ItemInfo.State := ItemInfo.ComboState; + ToolbarItemDraw(ItemInfo.ComboRect); + end; + end + else + ToolbarItemDraw(ARect); + end + else begin // Menu item + // DrawCheckBoxFrame is true when the item is checked + if (ItemInfo.SkinType = sknSkin) or (SpIsWinVistaOrUp and (ItemInfo.SkinType = sknWindows)) then + DrawCheckBoxFrame := ItemInfo.Enabled and ItemInfo.Checked + else begin + if ItemInfo.SkinType = sknNone then + DrawCheckBoxFrame := ItemInfo.Checked or ItemInfo.ImageOrCheckShown + else + DrawCheckBoxFrame := ItemInfo.Enabled and (ItemInfo.Checked or ItemInfo.ImageOrCheckShown); + end; + + R := ARect; + + // Draw the item selection rectangle hottrack + // Office doesn't draw the hottrack when the item is disabled, check + // if OfficeMenu is set. + if ItemInfo.Enabled or not CurrentSkin.OfficeMenu then + if ItemInfo.HotTrack then begin + if DrawCheckBoxFrame then begin + SelectionDelta := 0; + case ItemInfo.SkinType of + sknNone: + SelectionDelta := ItemInfo.MenuMargins.GutterSize + 1; // Don't draw the hottrack selection behind the checkbox + sknWindows: + if not SpIsWinVistaOrUp then + SelectionDelta := ItemInfo.MenuMargins.GutterSize + 1; // Don't draw the hottrack selection behind the checkbox + sknSkin: + SelectionDelta := 3; // Don't draw the hottrack selection behind the checkbox left borders + end; + Inc(R.Left, SelectionDelta); + end; + MenuItemDraw(R); + end; + + // Draw the checkbox frame (the checkbox glyph is painted in the ItemViewer.Paint method) + if DrawCheckBoxFrame then begin + R := ARect; + R.Right := R.Left + ItemInfo.MenuMargins.GutterSize; + if SpIsWinVistaOrUp and (ItemInfo.SkinType = sknWindows) then begin + // Use the new API on Windows Vista + // The checkbox frame is not painted + if ItemInfo.State = sknsDisabled then Flags := MCB_DISABLED + else if ItemInfo.ImageShown then Flags := MCB_BITMAP + else Flags := MCB_NORMAL; + DrawThemeBackground(ThemeServices.Theme[teMenu], ACanvas.Handle, MENU_POPUPCHECKBACKGROUND, Flags, R, nil); + end + else + if ItemInfo.SkinType = sknSkin then + CurrentSkin.PaintBackground(ACanvas, R, skncMenuItem, ItemInfo.State, True, True) + else + ToolbarItemDraw(R); + end; + + // Draw the combo item separator + if ItemInfo.IsSplit then begin + if ItemInfo.SkinType = sknSkin then begin + C := SkinManager.CurrentSkin.Options(skncMenuItem, ItemInfo.State).Borders.Color1; + if C = clNone then + C := clBtnShadow; + end + else + C := clBtnShadow; + R := ARect; + R.Left := ARect.Right - 10 - 4; + SpDrawLine(ACanvas, R.Left, R.Top + 1, R.Left, R.Bottom - 1, C); + end; + end; +end; + +procedure SpDrawXPMenuSeparator(ACanvas: TCanvas; ARect: TRect; MenuItemStyle, Vertical: Boolean); +const + ToolbarXPFlags: array [Boolean] of Integer = (TP_SEPARATORVERT, TP_SEPARATOR); +var + R: TRect; + C: TColor; + D: Integer; + VistaSeparatorSize: tagSize; +begin + R := ARect; + case SkinManager.GetSkinType of + sknNone: + if not Vertical then begin + R.Top := (R.Top + R.Bottom) div 2 - 1; + DrawEdge(ACanvas.Handle, R, EDGE_ETCHED, BF_TOP); + end + else begin + R.Left := (R.Left + R.Right) div 2 - 1; + DrawEdge(ACanvas.Handle, R, EDGE_ETCHED, BF_LEFT); + end; + sknWindows: + if MenuItemStyle and SpIsWinVistaOrUp then begin + // Use the new API in Windows Vista + GetThemePartSize(ThemeServices.Theme[teMenu], 0, MENU_POPUPSEPARATOR, 0, nil, TS_TRUE, VistaSeparatorSize); + R := SpCenterRectVert(R, VistaSeparatorSize.cy); + DrawThemeBackground(ThemeServices.Theme[teMenu], ACanvas.Handle, MENU_POPUPSEPARATOR, 0, R, nil); + end + else begin + if MenuItemStyle then begin + D := 0; + if Vertical then begin + R.Left := (R.Left + R.Right) div 2 - 1; + Inc(R.Top, D); Dec(R.Bottom, D); + Windows.DrawEdge(ACanvas.Handle, R, EDGE_ETCHED, BF_LEFT); + end + else begin + R.Top := (R.Top + R.Bottom) div 2 - 1; + Inc(R.Left, D); Dec(R.Right, D); + Windows.DrawEdge(ACanvas.Handle, R, EDGE_ETCHED, BF_TOP); + end; + end + else + DrawThemeBackground(ThemeServices.Theme[teToolbar], ACanvas.Handle, ToolbarXPFlags[Vertical], TS_NORMAL, R, nil); + end; + sknSkin: + if not Vertical then begin + // ??? what happens when 2 items have different imagelist sizes? how is the gutter measured? + R.Top := (R.Bottom + R.Top) div 2 - 1; + R.Bottom := R.Top; + C := SkinManager.CurrentSkin.Options(skncSeparator, sknsNormal).Body.Color1; + SpDrawLine(ACanvas, R.Left, R.Top, R.Right, R.Bottom, C); + OffsetRect(R, 0, 1); + C := SkinManager.CurrentSkin.Options(skncSeparator, sknsNormal).Body.Color2; + SpDrawLine(ACanvas, R.Left, R.Top, R.Right, R.Bottom, C); + end + else begin + R.Left := (R.Right + R.Left) div 2 - 1; + R.Right := R.Left; + InflateRect(R, 0, -3); + C := SkinManager.CurrentSkin.Options(skncSeparator, sknsNormal).Body.Color1; + SpDrawLine(ACanvas, R.Left, R.Top, R.Right, R.Bottom, C); + OffsetRect(R, 1, 0); + C := SkinManager.CurrentSkin.Options(skncSeparator, sknsNormal).Body.Color2; + SpDrawLine(ACanvas, R.Left, R.Top, R.Right, R.Bottom, C); + end; + end; +end; + +procedure SpDrawXPMenuItemImage(ACanvas: TCanvas; ARect: TRect; + const ItemInfo: TSpTBXMenuItemInfo; ImageList: TCustomImageList; ImageIndex: Integer); +begin + if ImageList is TTBCustomImageList then begin + if ItemInfo.IsSunkenCaption then + OffsetRect(ARect, 1, 1); + TTBCustomImageList(ImageList).DrawState(ACanvas, ARect.Left, ARect.Top, + ImageIndex, ItemInfo.Enabled, ItemInfo.HotTrack, ItemInfo.Checked); + Exit; + end; + + if ItemInfo.Enabled and SkinManager.CurrentSkin.OfficeIcons then begin + // Draw icon shadow + if ItemInfo.HotTrack and not ItemInfo.Pushed then begin + OffsetRect(ARect, 1, 1); + SpDrawIconShadow(ACanvas, ARect, ImageList, ImageIndex); + OffsetRect(ARect, -2, -2); + end; + SpDrawImageList(ACanvas, ARect, ImageList, ImageIndex, ItemInfo.Enabled, True); + end + else begin + if ItemInfo.IsSunkenCaption then + OffsetRect(ARect, 1, 1); + SpDrawImageList(ACanvas, ARect, ImageList, ImageIndex, ItemInfo.Enabled, True); + end; +end; + +procedure SpDrawXPMenuGutter(ACanvas: TCanvas; ARect: TRect; SkinType: TSpTBXSkinType); +var + Op: TSpTBXSkinOptionCategory; + C: TColor; +begin + SkinType := SpTBXSkinType(SkinType); + // If it's Windows theme and we're not on Vista do default painting + if (SkinType = sknWindows) and not SpIsWinVistaOrUp then + SkinType := sknNone; + + case SkinType of + sknNone:; // No gutter on Windows 9x, 2000 + sknWindows: + begin + // Only Windows Vista painting, XP just fills the background + if SpIsWinVistaOrUp then + DrawThemeBackground(ThemeServices.Theme[teMenu], ACanvas.Handle, MENU_POPUPGUTTER, 0, ARect, nil); + end; + sknSkin: + begin + Op := CurrentSkin.Options(skncGutter, sknsNormal); + if not Op.Body.IsEmpty then + SpPaintSkinBackground(ACanvas, ARect, Op, False); + + // Paint only the right side border, like a Separator line + ARect.Left := ARect.Right; + C := Op.Borders.Color2; + if C <> clNone then begin + SpDrawLine(ACanvas, ARect.Left, ARect.Top, ARect.Right, ARect.Bottom, C); + OffsetRect(ARect, -1, 0); + end; + C := Op.Borders.Color1; + if C <> clNone then + SpDrawLine(ACanvas, ARect.Left, ARect.Top, ARect.Right, ARect.Bottom, C); + end; + end; +end; + +procedure SpDrawXPMenuPopupWindow(ACanvas: TCanvas; ARect, OpenIVRect: TRect; + DrawGutter: Boolean; ImageSize: Integer; SkinType: TSpTBXSkinType); +var + GutterR: TRect; + MarginsInfo: TSpTBXMenuItemMarginsInfo; + SaveIndex: Integer; +begin + SkinType := SpTBXSkinType(SkinType); + // If it's Windows theme and we're not on Vista do default painting + if (SkinType = sknWindows) and not SpIsWinVistaOrUp then + SkinType := sknNone; + + case SkinType of + sknNone: // Windows 9x, 2000 and XP + if not AreFlatMenusEnabled then begin + DrawEdge(ACanvas.Handle, ARect, EDGE_RAISED, BF_RECT or BF_ADJUST); + SpFillRect(ACanvas, ARect, clBtnFace); + end + else + SpFillRect(ACanvas, ARect, clMenu, clBtnShadow); + sknWindows: // Only Windows Vista painting, XP just fills the background + begin + // Use the new API in Windows Vista + DrawThemeBackground(ThemeServices.Theme[teMenu], ACanvas.Handle, MENU_POPUPBACKGROUND, 0, ARect, nil); + + // Now paint the borders, clip the background + SaveIndex := SaveDC(ACanvas.Handle); + try + ExcludeClipRect(ACanvas.Handle, ARect.Left + 2, ARect.Top + 2, ARect.Right - 2, ARect.Bottom - 2); + DrawThemeBackground(ThemeServices.Theme[teMenu], ACanvas.Handle, MENU_POPUPBORDERS, 0, ARect, nil); + finally + RestoreDC(ACanvas.Handle, SaveIndex); + end; + + // Paint the gutter + if DrawGutter then begin + CurrentSkin.GetMenuItemMargins(ACanvas, ImageSize, MarginsInfo); + GutterR := ARect; + InflateRect(GutterR, -1, -4); + GutterR.Right := GutterR.Left + MarginsInfo.GutterSize + MarginsInfo.LeftCaptionMargin + 1 + 4; // +1 because the popup has 2 pixel border, and +4 gutter separator has 4 pixel spacing + SpDrawXPMenuGutter(ACanvas, GutterR, SkinType); + end; + end; + sknSkin: + begin + // Paint the background, if OfficePopup is true just clip the top + // border corresponding to the Open ItemViewer Rect + if OpenIVRect.Top < 0 then begin + OpenIVRect.Top := ARect.Top; + OpenIVRect.Bottom := ARect.Top + 1; + InflateRect(OpenIVRect, -1, 0); + + // First paint the background + CurrentSkin.PaintBackground(ACanvas, ARect, skncPopup, sknsNormal, True, False); + // Now paint the borders, clip the top border + SaveIndex := SaveDC(ACanvas.Handle); + try + ExcludeClipRect(ACanvas.Handle, OpenIVRect.Left, OpenIVRect.Top, OpenIVRect.Right, OpenIVRect.Bottom); + CurrentSkin.PaintBackground(ACanvas, ARect, skncPopup, sknsNormal, False, True); + finally + RestoreDC(ACanvas.Handle, SaveIndex); + end; + end + else + CurrentSkin.PaintBackground(ACanvas, ARect, skncPopup, sknsNormal, True, True); + + // Paint the gutter + if DrawGutter and not CurrentSkin.Options(skncGutter, sknsNormal).IsEmpty then begin + if ImageSize <= 0 then ImageSize := 16; + CurrentSkin.GetMenuItemMargins(ACanvas, ImageSize, MarginsInfo); + GutterR := ARect; + InflateRect(GutterR, -1, -1); + GutterR.Right := GutterR.Left + MarginsInfo.GutterSize + MarginsInfo.LeftCaptionMargin + 1; // +1 because the popup has 2 pixel border + SpDrawXPMenuGutter(ACanvas, GutterR, SkinType); + end; + end; + end; +end; + +procedure SpDrawXPStatusBar(ACanvas: TCanvas; ARect, AGripRect: TRect; SkinType: TSpTBXSkinType); +var + R: TRect; + C1, C2: TColor; +begin + case SpTBXSkinType(SkinType) of + sknNone: + begin + if not IsRectEmpty(ARect) then begin + SpFillRect(ACanvas, ARect, clBtnFace); + SpDrawRectangle(ACanvas, ARect, 0, clBtnShadow, clWindow); + end; + if not IsRectEmpty(AGripRect) then begin + InflateRect(AGripRect, 0, -1); + DrawFrameControl(ACanvas.Handle, AGripRect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP); + end; + end; + sknWindows: + begin + if not IsRectEmpty(ARect) then + DrawThemeBackground(ThemeServices.Theme[teStatus], ACanvas.Handle, 0, 0, ARect, nil); + if not IsRectEmpty(AGripRect) then + DrawThemeBackground(ThemeServices.Theme[teStatus], ACanvas.Handle, SP_GRIPPER, 0, AGripRect, nil) + end; + sknSkin: + begin + if not IsRectEmpty(ARect) then + CurrentSkin.PaintBackground(ACanvas, ARect, skncStatusBar, sknsNormal, True, True); + if not IsRectEmpty(AGripRect) then begin + R := AGripRect; + C1 := SkinManager.CurrentSkin.Options(skncStatusBarGrip).Body.Color1; + C2 := SkinManager.CurrentSkin.Options(skncStatusBarGrip).Body.Color2; + // Draw 3 cells at the bottom + R.Left := R.Right - 12; + R.Top := R.Bottom - 4; + SpDrawXPGrip(ACanvas, R, C1, C2); + // Draw 2 cells at the top + R.Bottom := R.Top; + R.Top := R.Bottom - 4; + R.Left := R.Left + 4; + SpDrawXPGrip(ACanvas, R, C1, C2); + // Draw 1 cell at the top + R.Bottom := R.Top; + R.Top := R.Bottom - 4; + R.Left := R.Left + 4; + SpDrawXPGrip(ACanvas, R, C1, C2); + end; + end; + end; +end; + +procedure SpDrawXPTitleBar(ACanvas: TCanvas; ARect: TRect; IsActive: Boolean; DrawBorders: Boolean = True); +const + XpFlags: array [Boolean] of Integer = (FS_INACTIVE, FS_ACTIVE); + W9xFlags: array [Boolean] of Integer = (0, DC_ACTIVE); + W9xGradientFlag: array [Boolean] of Integer = (0, DC_GRADIENT); +var + Gradient: Boolean; + B: BOOL; +begin + case SkinManager.GetSkinType of + sknNone: + begin + Gradient := SystemParametersInfo(SPI_GETGRADIENTCAPTIONS, 0, @B, 0) and B; + Windows.DrawCaption(GetDesktopWindow, ACanvas.Handle, ARect, DC_TEXT or W9xFlags[IsActive] or W9xGradientFlag[Gradient]); + end; + sknWindows: + // If WP_CAPTION is used instead of WP_SMALLCAPTION the top borders are rounded + DrawThemeBackground(ThemeServices.Theme[teWindow], ACanvas.Handle, WP_SMALLCAPTION, XpFlags[IsActive], ARect, nil); + sknSkin: + CurrentSkin.PaintBackground(ACanvas, ARect, skncWindowTitleBar, sknsNormal, True, DrawBorders); + end; +end; + +procedure SpDrawXPTitleBarBody(ACanvas: TCanvas; ARect: TRect; IsActive: Boolean; + BorderSize: TPoint; DrawBody: Boolean = True); +var + R, MirrorR: TRect; + SaveIndex, Flags: Integer; + B: TBitmap; +begin + case SkinManager.GetSkinType of + sknNone: + begin + if DrawBody then + ACanvas.FillRect(ARect); + SaveIndex := SaveDC(ACanvas.Handle); + try + R := ARect; + InflateRect(R, -BorderSize.X, -BorderSize.Y); + ExcludeClipRect(ACanvas.Handle, R.Left, R.Top, R.Right, R.Bottom); + if not DrawBody then + ACanvas.FillRect(ARect); + Windows.DrawEdge(ACanvas.Handle, ARect, EDGE_RAISED, BF_RECT); + finally + RestoreDC(ACanvas.Handle, SaveIndex); + end; + end; + sknWindows: + begin + if IsActive then + Flags := FS_ACTIVE + else + Flags := FS_INACTIVE; + R := ARect; + R.Top := R.Bottom - BorderSize.Y; + DrawThemeBackground(ThemeServices.Theme[teWindow], ACanvas.Handle, WP_SMALLFRAMEBOTTOM, Flags, R, nil); + R.Top := ARect.Top + BorderSize.Y; + R.Bottom := ARect.Bottom - BorderSize.Y; + R.Right := R.Left + BorderSize.X; + DrawThemeBackground(ThemeServices.Theme[teWindow], ACanvas.Handle, WP_SMALLFRAMELEFT, Flags, R, nil); + R.Right := ARect.Right; + R.Left := R.Right - BorderSize.X; + DrawThemeBackground(ThemeServices.Theme[teWindow], ACanvas.Handle, WP_SMALLFRAMERIGHT, Flags, R, nil); + + // Don't know how to paint a captionless window frame + // We have to mirror the bottom frame and paint it on the top + B := TBitmap.Create; + try + R := ARect; + R.Bottom := R.Top + BorderSize.Y; + B.Width := R.Right - R.Left; + B.Height := R.Bottom - R.Top; + DrawThemeBackground(ThemeServices.Theme[teWindow], B.Canvas.Handle, WP_SMALLFRAMEBOTTOM, Flags, R, nil); + + // Mirror + MirrorR := Rect(0, B.Height - 1, B.Width, -1); + ACanvas.CopyRect(R, B.Canvas, MirrorR); + finally + B.Free; + end; + end; + sknSkin: + begin + CurrentSkin.PaintWindowFrame(ACanvas, ARect, IsActive, DrawBody, BorderSize.X); + end; + end; +end; + +procedure SpDrawXPDock(ACanvas: TCanvas; ARect: TRect; SkinType: TSpTBXSkinType; Vertical: Boolean = False); +begin + SkinType := SpTBXSkinType(SkinType); + case SkinType of + sknNone: + begin + ACanvas.Brush.Color := clBtnFace; + ACanvas.FillRect(ARect); + end; + sknWindows: + begin + if Vertical then Inc(ARect.Bottom, 1); // Fix WindowsXP bug + DrawThemeBackground(ThemeServices.Theme[teRebar], ACanvas.Handle, 0, 0, ARect, nil); + end; + sknSkin: + CurrentSkin.PaintBackground(ACanvas, ARect, skncDock, sknsNormal, True, True, Vertical); + end; +end; + +procedure SpDrawXPToolbar(ACanvas: TCanvas; ARect: TRect; SkinType: TSpTBXSkinType; + Docked, Floating, Vertical, PaintSkinBackground, PaintBorders: Boolean; + SkinComponent: TSpTBXSkinComponentsType = skncToolbar); +begin + SkinType := SpTBXSkinType(SkinType); + case SkinType of + sknNone: + if PaintBorders and Docked then + Windows.DrawEdge(ACanvas.Handle, ARect, BDR_RAISEDINNER, BF_RECT or BF_ADJUST); + sknWindows: + if PaintBorders and Docked then + SpDrawRectangle(ACanvas, ARect, 0, SpLighten(clBtnFace, 24), SpLighten(clBtnFace, -32)); + sknSkin: + if Docked or Floating then begin + if Floating and CurrentSkin.Options(SkinComponent, sknsNormal).Body.IsEmpty then // Floating and doesn't have a Body + CurrentSkin.PaintBackground(ACanvas, ARect, skncDock, sknsNormal, True, False) + else begin + if Floating then PaintBorders := False; + CurrentSkin.PaintBackground(ACanvas, ARect, SkinComponent, sknsNormal, PaintSkinBackground, PaintBorders, Vertical); + end; + end; + end; +end; + +procedure SpDrawXPToolbar(W: TTBCustomDockableWindow; ACanvas: TCanvas; + ARect: TRect; PaintOnNCArea: Boolean; PaintBorders: Boolean = True; + SkinComponent: TSpTBXSkinComponentsType = skncToolbar); +var + R: TRect; + PaintDefault, DrawSkinBody: Boolean; + Toolbar: TTBCustomDockableWindowAccess; + IsVertical: Boolean; +begin + if CurrentSkin.Options(SkinComponent, sknsNormal).Body.IsEmpty then + SkinComponent := skncToolbar; + + Toolbar := TTBCustomDockableWindowAccess(W); + IsVertical := SpIsVerticalToolbar(Toolbar); + DrawSkinBody := True; + + if Toolbar.Docked then begin + // Prepare R + R := Toolbar.CurrentDock.ClientRect; + OffsetRect(R, -Toolbar.Left, -Toolbar.Top); + if not PaintOnNCArea then begin + if W is TSpTBXToolbar then + OffsetRect(R, -TSpTBXToolbar(W).DefaultToolbarBorderSize, -TSpTBXToolbar(W).DefaultToolbarBorderSize) + else + OffsetRect(R, -CDefaultToolbarBorderSize, -CDefaultToolbarBorderSize); + if IsVertical then + Dec(R.Top, SpGetDragHandleSize(Toolbar)) + else + Dec(R.Left, SpGetDragHandleSize(Toolbar)); + end; + // Draw the Dock background + if Toolbar.CurrentDock is TSpTBXDock then + TSpTBXDock(Toolbar.CurrentDock).DrawBackground(ACanvas.Handle, R); + + DrawSkinBody := not (Toolbar.CurrentDock.BackgroundOnToolbars and SpIsDockUsingBitmap(Toolbar.CurrentDock)); + end + else begin + if Toolbar.Floating then begin + if SkinManager.GetSkinType <> sknSkin then begin + if Toolbar.Color = clNone then ACanvas.Brush.Color := clBtnFace + else ACanvas.Brush.Color := Toolbar.Color; + ACanvas.FillRect(ARect); + end; + end + else begin + // Draw the parent background if the toolbar is not docked nor floating + // SpDrawParentBackground doesn't seem to work correctly here + // (when a toolbar is inside a toolwindow), use PerformEraseBackground instead + Controls.PerformEraseBackground(Toolbar, ACanvas.Handle); + end; + end; + + // Default painting + PaintDefault := True; + if W is TSpTBXToolbar then begin + if TSpTBXToolbar(W).MenuBar then + SkinComponent := skncMenuBar; + TSpTBXToolbar(W).DoDrawBackground(ACanvas, ARect, pstPrePaint, PaintDefault); + end + else + if W is TSpTBXCustomToolWindow then + TSpTBXCustomToolWindow(W).DoDrawBackground(ACanvas, ARect, pstPrePaint, PaintDefault); + + if PaintDefault then begin + R := ARect; + if Toolbar.Color <> clNone then begin + ACanvas.Brush.Color := Toolbar.Color; + ACanvas.FillRect(R); + end + else + SpDrawXPToolbar(ACanvas, R, SkinManager.GetSkinType, Toolbar.Docked, Toolbar.Floating, IsVertical, DrawSkinBody, PaintBorders, SkinComponent); + end; + + PaintDefault := True; + if W is TSpTBXToolbar then + TSpTBXToolbar(W).DoDrawBackground(ACanvas, ARect, pstPostPaint, PaintDefault) + else + if W is TSpTBXCustomToolWindow then + TSpTBXCustomToolWindow(W).DoDrawBackground(ACanvas, ARect, pstPostPaint, PaintDefault); +end; + +procedure SpDrawXPToolbarGrip(W: TTBCustomDockableWindow; ACanvas: TCanvas; ARect: TRect); +const + GripperPart: array [Boolean] of Cardinal = (RP_GRIPPER, RP_GRIPPERVERT); + Pattern: array [0..15] of Byte = (0, 0, $CC, 0, $78, 0, $30, 0, $78, 0, $CC, 0, 0, 0, 0, 0); +var + GripR, CloseR: TRect; + GripSize, Z: Integer; + Vertical: Boolean; + C1, C2, PatternColor: TColor; + Flags: Integer; + Toolbar: TTBCustomDockableWindowAccess; + State: TSpTBXSkinStatesType; +begin + Toolbar := TTBCustomDockableWindowAccess(W); + + GripSize := SpGetDragHandleSize(Toolbar); + if GripSize <= 0 then Exit; + + Vertical := SpIsVerticalToolbar(Toolbar); + + GripR := ARect; + if Vertical then begin + GripR.Bottom := GripR.Top + GripSize; + InflateRect(GripR, -2, 0); + end + else begin + GripR.Right := GripR.Left + GripSize; + InflateRect(GripR, 0, -2); + end; + + if Toolbar.DragHandleStyle <> dhNone then begin + if Toolbar.CloseButtonWhenDocked then begin + if Vertical then begin + CloseR.Left := ARect.Right - GripSize; + CloseR.Right := CloseR.Left + GripSize - 2; + CloseR.Top := ARect.Top + 2; + CloseR.Bottom := CloseR.Top + GripSize - 2; + Dec(GripR.Right, GripSize - 1); + end + else begin + CloseR.Left := ARect.Left + 2; + CloseR.Right := CloseR.Left + GripSize - 2; + CloseR.Top := ARect.Top + 2; + CloseR.Bottom := CloseR.Top + GripSize - 2; + Inc(GripR.Top, GripSize - 1); + end; + end; + + case SkinManager.GetSkinType of + sknNone: + begin + OffsetRect(CloseR, -1, -1); + if Vertical then begin + if Toolbar.CloseButtonWhenDocked then + if Toolbar.DragHandleStyle = dhDouble then Inc(GripR.Top, 1) + else Inc(GripR.Top, 3); + Inc(GripR.Top, 3); + GripR.Bottom := GripR.Top + 3; + end + else begin + if Toolbar.CloseButtonWhenDocked then + if Toolbar.DragHandleStyle = dhDouble then Inc(GripR.Left, 1) + else Inc(GripR.Left, 3); + Inc(GripR.Left, 3); + GripR.Right := GripR.Left + 3; + end; + Windows.DrawEdge(ACanvas.Handle, GripR, BDR_RAISEDINNER, BF_RECT); + ACanvas.Pixels[GripR.Left, GripR.Bottom - 1] := clBtnHighlight; + if Toolbar.DragHandleStyle = dhDouble then begin + if Vertical then OffsetRect(GripR, 0, 3) + else OffsetRect(GripR, 3, 0); + Windows.DrawEdge(ACanvas.Handle, GripR, BDR_RAISEDINNER, BF_RECT); + ACanvas.Pixels[GripR.Left, GripR.Bottom - 1] := clBtnHighlight; + end; + + // Close button + if Toolbar.CloseButtonWhenDocked then begin + if Toolbar.CloseButtonDown then + Windows.DrawEdge(ACanvas.Handle, CloseR, BDR_SUNKENOUTER, BF_RECT) + else + if Toolbar. CloseButtonHover then + Windows.DrawEdge(ACanvas.Handle, CloseR, BDR_RAISEDINNER, BF_RECT); + if Toolbar.CloseButtonDown then OffsetRect(CloseR, 1, 1); + SpDrawGlyphPattern(ACanvas.Handle, CloseR, 7, 7, Pattern[0], clBtnText); + end; + end; + sknWindows: + begin + // Since GetThemePartSize does not seem to work properly, assume we use default + // WindowsXP themes where the gripper pattern repeats itself every 4 pixels + if Vertical then begin + OffsetRect(GripR, -1, 0); + GripR := SpCenterRectVert(GripR, 6); + Z := GripR.Right - GripR.Left; + GripR.Left := GripR.Left - 1 + (Z and $3) shr 1; + GripR.Right := GripR.Left + Z and not $3 + 2; + end + else begin + OffsetRect(GripR, 0, -1); + GripR := SpCenterRectHoriz(GripR, 6); + Z := GripR.Bottom - GripR.Top; + GripR.Top := GripR.Top - 1 + (Z and $3) shr 1; + GripR.Bottom := GripR.Top + Z and not $3 + 1; + end; + DrawThemeBackground(ThemeServices.Theme[teRebar], ACanvas.Handle, GripperPart[Vertical], 0, GripR, nil); + + // Close button + if Toolbar.CloseButtonWhenDocked then begin + Flags := TS_NORMAL; + if Toolbar.CloseButtonDown then Flags := TS_PRESSED + else if Toolbar.CloseButtonHover then Flags := TS_HOT; + DrawThemeBackground(ThemeServices.Theme[teToolbar], ACanvas.Handle, TP_BUTTON, Flags, CloseR, nil); + if Toolbar.CloseButtonDown then OffsetRect(CloseR, 1, 1); + SpDrawGlyphPattern(ACanvas.Handle, CloseR, 7, 7, Pattern[0], clBtnText); + end; + end; + sknSkin: + begin + if Vertical then begin + InflateRect(GripR, -3, 0); + OffsetRect(GripR, 0, 2); + GripR := SpCenterRectVert(GripR, 4); + end + else begin + InflateRect(GripR, 0, -3); + OffsetRect(GripR, 2, 0); + GripR := SpCenterRectHoriz(GripR, 4); + end; + C1 := SkinManager.CurrentSkin.Options(skncToolbarGrip).Body.Color1; + C2 := SkinManager.CurrentSkin.Options(skncToolbarGrip).Body.Color2; + SpDrawXPGrip(ACanvas, GripR, C1, C2); + + // Close button + if Toolbar.CloseButtonWhenDocked then begin + State := sknsNormal; + if Toolbar.CloseButtonDown then State := sknsPushed + else if Toolbar.CloseButtonHover then State := sknsHotTrack; + CurrentSkin.PaintBackground(ACanvas, CloseR, skncToolbarItem, State, True, True); + if Toolbar.CloseButtonDown then OffsetRect(CloseR, 1, 1); + PatternColor := CurrentSkin.GetTextColor(skncToolbarItem, State); + SpDrawGlyphPattern(ACanvas.Handle, CloseR, 7, 7, Pattern[0], PatternColor); + end; + end; + end; + end; +end; + +procedure SpDrawXPTooltipBackground(ACanvas: TCanvas; ARect: TRect); +var + ClipRect: TRect; +begin + if SpIsWinVistaOrUp and ThemeServices.ThemesEnabled then begin + // Paint Vista gradient background if themes enabled + ClipRect := ARect; + InflateRect(ARect, 4, 4); + DrawThemeBackground(ThemeServices.Theme[teToolTip], ACanvas.Handle, TTP_STANDARD, TTSS_NORMAL, ARect, @ClipRect); + end + else + ACanvas.FillRect(ARect); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Menu helpers } + +function SpCalcPopupPosition(const X, Y, Width, Height: Integer; + PopupControl: TControl = nil; IsVertical: Boolean = False): TPoint; +var + R, MonitorR: TRect; +begin + if Assigned(PopupControl) then begin + Result := Point(0, 0); + if PopupControl.Parent = nil then Exit; + + R := PopupControl.BoundsRect; + R.TopLeft := PopupControl.Parent.ClientToScreen(R.TopLeft); + R.BottomRight := PopupControl.Parent.ClientToScreen(R.BottomRight); + + if IsVertical then + Result := Point(R.Right, R.Top) + else + Result := Point(R.Left, R.Bottom); + + MonitorR := GetRectOfMonitorContainingPoint(Result, True); + + if IsVertical then begin + if Result.X + Width > MonitorR.Right then + Result.X := R.Left - Width; + if Result.Y + Height > MonitorR.Bottom then + if R.Bottom > MonitorR.Bottom then + Result.Y := MonitorR.Bottom - Height + else + Result.Y := R.Bottom - Height; + end + else begin + if Result.X + Width > MonitorR.Right then + if R.Right > MonitorR.Right then + Result.X := MonitorR.Right - Width + else + Result.X := R.Right - Width; + if Result.Y + Height > MonitorR.Bottom then + Result.Y := R.Top - Height; + end; + end + else begin + Result := Point(X, Y); + MonitorR := GetRectOfMonitorContainingPoint(Result, True); + if X + Width > MonitorR.Right then + Result.X := X - Width; + if Y + Height > MonitorR.Bottom then + Result.Y := Y - Height; + end; +end; + +function SpHMenuGetCaption(Menu: HMenu; Index: Integer): WideString; +var + AnsiBuf: array[0..MAX_PATH] of AnsiChar; + WideBuf: array[0..MAX_PATH] of WideChar; + Size: Integer; +begin + Result := ''; + if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then begin + FillChar(AnsiBuf, MAX_PATH, #0); + GetMenuStringA(Menu, Index, @AnsiBuf, MAX_PATH, MF_BYPOSITION); + Size := lstrlenA(@AnsiBuf); + Result := WideString(AnsiBuf); + SetLength(Result, Size); + end + else begin + // [Bugfix] Windows bug: + // GetMenuStringW when a DBCS code page is active (e.g. Japanese) + // the result of the function is incorrect (it returns Size * 2) + // http://news.jrsoftware.org/read/article.php?id=12268&group=jrsoftware.toolbar2000.thirdparty + FillChar(WideBuf, MAX_PATH, #0); + GetMenuStringW(Menu, Index, @WideBuf, MAX_PATH, MF_BYPOSITION); + Size := lstrlenW(@WideBuf); + Result := WideBuf; + SetLength(Result, Size); + end; +end; + +function SpHMenuToTBMenuItem(Menu: HMenu; ParentItem: TTBCustomItem): Boolean; +var + MenuInfo: TMenuItemInfo; + I, C: Integer; + Item: TSpTBXItem; + HasSubMenu: Boolean; +begin + Result := False; + if not Assigned(ParentItem) or not IsMenu(Menu) then Exit; + + C := GetMenuItemCount(Menu); + + for I := 0 to C - 1 do begin + FillChar(MenuInfo, SizeOf(MenuInfo), #0); + MenuInfo.cbSize := SizeOf(MenuInfo); + MenuInfo.fMask := MIIM_TYPE or MIIM_STATE or MIIM_ID or MIIM_SUBMENU; + GetMenuItemInfo(Menu, I, True, MenuInfo); + + if MenuInfo.fType and MFT_SEPARATOR <> 0 then + ParentItem.Add(TSpTBXSeparatorItem.Create(nil)) + else begin + HasSubmenu := IsMenu(MenuInfo.hSubMenu); + if HasSubmenu then + Item := TSpTBXSubmenuItem.Create(nil) + else + Item := TSpTBXItem.Create(nil); + + Item.Caption := SpHMenuGetCaption(Menu, I); + Item.Tag := MenuInfo.wID; + if MenuInfo.fState and MFS_DISABLED <> 0 then + Item.Enabled := False; + if MenuInfo.fState and MFS_CHECKED <> 0 then + Item.Checked := True; + if MenuInfo.fState and MFS_DEFAULT <> 0 then + Item.Options := Item.Options + [tboDefault]; + ParentItem.Add(Item); + end; + end; + + Result := True; +end; + +function SpShowSystemPopupMenu(ParentForm: TCustomForm; ScreenPos: TPoint; DoDefault: Boolean = True): Integer; +var + SysMenu: HMENU; +begin + ReleaseCapture; + SysMenu := GetSystemMenu(ParentForm.Handle, False); + case ParentForm.WindowState of + wsMaximized: + begin + EnableMenuItem(SysMenu, SC_RESTORE, MF_ENABLED); + EnableMenuItem(SysMenu, SC_MAXIMIZE, MF_GRAYED); + EnableMenuItem(SysMenu, SC_MOVE, MF_GRAYED); + EnableMenuItem(SysMenu, SC_SIZE, MF_GRAYED); + end; + wsNormal: + begin + EnableMenuItem(SysMenu, SC_RESTORE, MF_GRAYED); + EnableMenuItem(SysMenu, SC_MAXIMIZE, MF_ENABLED); + EnableMenuItem(SysMenu, SC_MOVE, MF_ENABLED); + EnableMenuItem(SysMenu, SC_SIZE, MF_ENABLED); + end; + end; + Result := Integer(TrackPopupMenuEx(SysMenu, TPM_LEFTALIGN or TPM_RETURNCMD or + TPM_RIGHTBUTTON or TPM_HORIZONTAL or TPM_VERTICAL, ScreenPos.X, ScreenPos.Y, ParentForm.Handle, nil)); + if DoDefault then + case Result of + SC_MAXIMIZE: ParentForm.WindowState := wsMaximized; + SC_RESTORE: ParentForm.WindowState := wsNormal; + else + // WindowState := wsMinimized will not minimize the app correctly + SendMessage(ParentForm.Handle, WM_SYSCOMMAND, Result, 0); + end; +end; + +function SpFillSystemSpTBXPopup(ParentForm: TCustomForm; ParentItem: TTBCustomItem; + ShowSize, ShowMinimize, ShowMaximize, ShowClose: Boolean; ClickEvent: TNotifyEvent = nil): Boolean; +var + Menu: HMENU; + I: Integer; + Item: TTBCustomItem; +begin + Result := False; + Menu := GetSystemMenu(ParentForm.Handle, False); + + if SpHMenuToTBMenuItem(Menu, ParentItem) then begin + for I := 0 to ParentItem.Count - 1 do begin + Item := ParentItem.Items[I]; + Item.OnClick := ClickEvent; + case Item.Tag of + SC_MINIMIZE: + begin + Item.Visible := ShowMinimize; + Item.Enabled := ParentForm.WindowState <> wsMinimized; + Item.Images := MDIButtonsImgList; + Item.ImageIndex := 2; + end; + SC_RESTORE: + begin + Item.Visible := ShowMaximize; + Item.Enabled := ParentForm.WindowState <> wsNormal; + Item.Images := MDIButtonsImgList; + Item.ImageIndex := 3; + end; + SC_MAXIMIZE: + begin + Item.Visible := ShowMaximize; + Item.Enabled := ParentForm.WindowState <> wsMaximized; + Item.Images := MDIButtonsImgList; + Item.ImageIndex := 1; + end; + SC_CLOSE: + begin + Item.Visible := ShowClose; + Item.Options := Item.Options + [tboDefault]; + Item.Images := MDIButtonsImgList; + Item.ImageIndex := 0; + end; + SC_MOVE: + begin + Item.Enabled := ParentForm.WindowState <> wsMaximized; + end; + SC_SIZE: + begin + Item.Visible := ShowSize; + Item.Enabled := ParentForm.WindowState <> wsMaximized; + end; + end; + end; + + Result := True; + end; +end; + +function SpShowSystemSpTBXPopupMenu(ParentForm: TCustomForm; ScreenPos: TPoint; + ShowSize, ShowMinimize, ShowMaximize, ShowClose: Boolean; + PopupEvent: TSpTBXPopupEvent; DoDefault: Boolean = True): Integer; +var + Popup: TSpTBXPopupMenu; + ClickedItem: TTBCustomItem; +begin + Result := 0; + ReleaseCapture; + + Popup := TSpTBXPopupMenu.Create(ParentForm); + try + if SpFillSystemSpTBXPopup(ParentForm, Popup.Items, ShowSize, ShowMinimize, ShowMaximize, ShowClose) then begin + if Assigned(PopupEvent) then + Popup.OnInitPopup := PopupEvent; + Popup.PopupComponent := ParentForm; + ClickedItem := Popup.PopupEx(ScreenPos.X, ScreenPos.Y, nil, True); + if Assigned(ClickedItem) then begin + Result := ClickedItem.Tag; + // If it's not a SystemMenu item fire the OnClick event of the item + // We can't use PostClick because the Item will be destroyed by the + // time the message is handled. + if (Result < SC_SIZE) or (Result > SC_CONTEXTHELP) then + ClickedItem.Click; + end; + end; + finally + Popup.Free; + end; + + if DoDefault and (Result > 0) then + case Result of + SC_MAXIMIZE: + ParentForm.WindowState := wsMaximized; + SC_RESTORE: + ParentForm.WindowState := wsNormal; + SC_SIZE, SC_MOVE, SC_MINIMIZE, SC_CLOSE: + begin + // WindowState := wsMinimized will not minimize the app correctly + SendMessage(ParentForm.Handle, WM_SYSCOMMAND, Result, 0); + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Misc helpers } + +procedure SpActivateDwmNC(WinControl: TWinControl; Activate: Boolean); +{$IFDEF JR_D11} +var + ncrp: Cardinal; +{$ENDIF} +begin + {$IFDEF JR_D11} + // Use the new API on Windows Vista + if DwmCompositionEnabled and WinControl.HandleAllocated then begin + if Activate then + ncrp := DWMNCRP_USEWINDOWSTYLE + else + ncrp := DWMNCRP_DISABLED; + DwmSetWindowAttribute(WinControl.Handle, DWMWA_NCRENDERING_POLICY, @ncrp, SizeOf(ncrp)); + end; + {$ENDIF} +end; + +function SpIsDwmCompositionEnabled: Boolean; +begin + {$IFDEF JR_D11} + // Use the new API on Windows Vista + Result := DwmCompositionEnabled; + {$ELSE} + Result := False; + {$ENDIF} +end; + +function SpCanFocus(WinControl: TWinControl): Boolean; +var + Form: TCustomForm; +begin + Result := False; + if Assigned(WinControl) and not WinControl.Focused then begin + Form := GetParentForm(WinControl); + if Assigned(Form) and Form.Enabled and Form.Visible then + Result := WinControl.CanFocus; + end; +end; + +function SpIsFocused(WinControl: TWinControl; out FocusedChild: TWinControl): Boolean; +var + Form: TCustomForm; +begin + Result := False; + FocusedChild := nil; + if WinControl.Focused then + Result := True + else begin + Form := GetParentForm(WinControl); + if Assigned(Form) and Form.Enabled and Form.Visible then + if Assigned(Form.ActiveControl) and Form.ActiveControl.Focused then + if IsChild(WinControl.Handle, Form.ActiveControl.Handle) then begin + Result := True; + FocusedChild := Form.ActiveControl; + end; + end; +end; + +function SpFocusFirstChild(WinControl: TWinControl): TWinControl; +var + Form: TCustomForm; +begin + Result := nil; + Form := GetParentForm(WinControl); + if Assigned(Form) and Form.Enabled and Form.Visible then begin + TWinControlAccess(WinControl).SelectFirst; + Result := Form.ActiveControl; + end; +end; + +function SpFindControl(Parent: TWinControl; Child: TControl): Integer; +var + I: Integer; +begin + Result := -1; + for I := 0 to Parent.ControlCount - 1 do + if Parent.Controls[I] = Child then begin + Result := I; + Break; + end; +end; + +function SpFindParent(Control: TControl; ParentClass: TClass): TWinControl; +var + P: TWinControl; +begin + Result := nil; + if Assigned(Control) then begin + P := Control.Parent; + while Assigned(P) do + if P is ParentClass then begin + Result := P; + Break; + end + else + P := P.Parent; + end; +end; + +function SpHasBorders(WinControl: TWinControl): Boolean; +var + Style, ExStyle: Integer; +begin + Result := False; + Style := GetWindowLong(WinControl.Handle, GWL_STYLE); + ExStyle := GetWindowLong(WinControl.Handle, GWL_EXSTYLE); + + if (Style and WS_BORDER <> 0) or (ExStyle and WS_EX_CLIENTEDGE <> 0) then + Result := True; +end; + +function SpGetFormWindowState(F: TCustomForm; out RestoreBoundsRect: TRect): TWindowState; +// This method is more accurate than Form.WindowState +var + P: TWindowPlacement; +begin + Result := wsNormal; + RestoreBoundsRect := Rect(0, 0, 0, 0); + if Assigned(F) and (F.HandleAllocated) then begin + P.Length := SizeOf(TWindowPlacement); + if GetWindowPlacement(F.Handle, @P) then begin + case P.showCmd of + SW_SHOWMINIMIZED: Result := wsMinimized; + SW_SHOWMAXIMIZED: Result := wsMaximized; + end; + // rcNormalPosition contains the window's coordinates when the window is in the restored position + with P.rcNormalPosition do + RestoreBoundsRect := Rect(Left, Top, Right - Left, Bottom - Top); + end; + end; +end; + +procedure SpSetFormWindowState(F: TCustomForm; WindowState: TWindowState; RestoreBoundsRect: TRect); +// This method is more accurate than Form.WindowState +var + P: TWindowPlacement; + R: TRect; +begin + if Assigned(F) and (F.HandleAllocated) then begin + P.Length := SizeOf(TWindowPlacement); + case WindowState of + wsMinimized: P.showCmd := SW_SHOWMINIMIZED; + wsMaximized: P.showCmd := SW_SHOWMAXIMIZED; + else + P.showCmd := SW_SHOWNORMAL; + end; + with RestoreBoundsRect do + R := Bounds(Left, Top, Right, Bottom); + // rcNormalPosition contains the window's coordinates when the window is in the restored position + if not IsRectEmpty(R) then + P.rcNormalPosition := R; + + SetWindowPlacement(F.Handle, @P); + end; +end; + +function SpGetTaskBar(out State, Edge: Cardinal; out Bounds: TRect): Boolean; +// Returns the TaskBar state and bounds +// State can be: 0, ABS_ALWAYSONTOP, ABS_AUTOHIDE +// Edge can be: ABE_LEFT, ABE_RIGHT, ABE_TOP, ABE_BOTTOM +// ABM_GETSTATE + +var + AppData: TAppBarData; +begin + Result := False; + State := 0; + Edge := 0; + Bounds := Rect(0, 0, 0, 0); + + // 'Shell_TrayWnd' is the name of the task bar's window + AppData.Hwnd := FindWindow('Shell_TrayWnd', nil); + if AppData.Hwnd <> 0 then begin + AppData.cbSize := SizeOf(TAppBarData); + if SHAppBarMessage(ABM_GETTASKBARPOS, AppData) <> 0 then begin + Edge := AppData.uEdge; + Bounds := AppData.rc; + + AppData.cbSize := SizeOf(TAppBarData); + State := SHAppBarMessage(ABM_GETSTATE, AppData); + + Result := True; + end; + end; +end; + +procedure SpRecalcNCArea(WinControl: TWinControl); +begin + if WinControl.HandleAllocated then + SetWindowPos(WinControl.Handle, 0, 0, 0, 0, 0, SWP_FRAMECHANGED or + SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Customizer helpers } + +procedure SpCustomizeAllToolbars(AParentComponent: TComponent; Reset: Boolean); +var + I: Integer; + TB: TSpTBXToolbar; +begin + if Assigned(AParentComponent) then begin + for I := 0 to AParentComponent.ComponentCount - 1 do + if AParentComponent.Components[I] is TSpTBXToolbar then begin + TB := AParentComponent.Components[I] as TSpTBXToolbar; + if Reset then + TB.EndCustomize + else + TB.BeginCustomize; + end; + end; +end; + +procedure SpBeginUpdateAllToolbars(AParentComponent: TComponent); +var + I: Integer; + TB: TTBCustomToolbar; +begin + if Assigned(AParentComponent) then begin + for I := 0 to AParentComponent.ComponentCount - 1 do + if AParentComponent.Components[I] is TTBCustomToolbar then begin + TB := AParentComponent.Components[I] as TTBCustomToolbar; + TB.BeginUpdate; + end; + end; +end; + +procedure SpEndUpdateAllToolbars(AParentComponent: TComponent); +var + I: Integer; + TB: TTBCustomToolbar; +begin + if Assigned(AParentComponent) then begin + for I := 0 to AParentComponent.ComponentCount - 1 do + if AParentComponent.Components[I] is TTBCustomToolbar then begin + TB := AParentComponent.Components[I] as TTBCustomToolbar; + TB.View.UpdatePositions; + TB.EndUpdate; + TB.Invalidate; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Unicode helpers } + +procedure SpPersistent_AfterInherited_DefineProperties(Filer: TFiler; Instance: TPersistent); +begin + {$IFNDEF UNICODE} + // Don't let the streaming system store the WideStrings, + // we need to store them manually + TntPersistent_AfterInherited_DefineProperties(Filer, Instance); + {$ENDIF} +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXFontSettings } + +constructor TSpTBXFontSettings.Create; +begin + FSize := 100; + FColor := clNone; +end; + +procedure TSpTBXFontSettings.Apply(AFont: TFont); +begin + AFont.Charset := DEFAULT_CHARSET; + AFont.Color := FColor; + if FSize <> 100 then + AFont.Size := (AFont.Size * FSize + 50) div 100; + if FName <> '' then + AFont.Name := Name; + if FStyle <> [] then + AFont.Style := FStyle; +end; + +procedure TSpTBXFontSettings.Assign(Src: TPersistent); +var + F: TSpTBXFontSettings; +begin + if Src is TPersistent then begin + F := TSpTBXFontSettings(Src); + FColor := F.Color; + FName := F.Name; + FSize := F.Size; + FStyle := F.Style; + Modified; + end + else + inherited; +end; + +procedure TSpTBXFontSettings.Modified; +begin + if Assigned(FOnChange) then FOnChange(Self); +end; + +procedure TSpTBXFontSettings.SetColor(Value: TColor); +begin + if FColor <> Value then begin + FColor := Value; + Modified; + end; +end; + +procedure TSpTBXFontSettings.SetName(const Value: TFontName); +begin + if FName <> Value then begin + FName := Value; + Modified; + end; +end; + +procedure TSpTBXFontSettings.SetSize(Value: TSpTBXFontSize); +begin + if FSize <> Value then begin + FSize := Value; + Modified; + end; +end; + +procedure TSpTBXFontSettings.SetStyle(const Value: TFontStyles); +begin + if FStyle <> Value then begin + FStyle := Value; + Modified; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomDragObject } + +constructor TSpTBXCustomDragObject.Create(ASourceControl: TControl; AItem: TTBCustomItem); +begin + FSourceControl := ASourceControl; + FSourceItem := AItem; + FDragCursorAccept := crSpTBXCustomization; + FDragCursorCancel := crNo; +end; + +procedure TSpTBXCustomDragObject.Finished(Target: TObject; X, Y: Integer; + Accepted: Boolean); +begin + inherited; + if not Accepted then begin + if Assigned(FSourceControl) then + TControlAccess(FSourceControl).DragCanceled; + Target := nil; + end; + + if Assigned(FSourceControl) then + TControlAccess(FSourceControl).DoEndDrag(Target, X, Y); +end; + +function TSpTBXCustomDragObject.GetDragCursor(Accepted: Boolean; X, + Y: Integer): TCursor; +begin + if Accepted then Result := FDragCursorAccept + else Result := FDragCursorCancel; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomItemActionLink } + +{$IFNDEF UNICODE} +procedure TSpTBXCustomItemActionLink.AssignClient(AClient: TObject); +begin + inherited AssignClient(AClient); + FUnicodeClient := AClient as TSpTBXCustomItem; +end; + +function TSpTBXCustomItemActionLink.IsCaptionLinked: Boolean; +begin + if (Action is TCustomAction) and Supports(Action, ITntAction) then + Result := FUnicodeClient.Caption = TntActnList.TntAction_GetCaption(Action as TCustomAction) + else + Result := inherited IsCaptionLinked; +end; + +function TSpTBXCustomItemActionLink.IsHintLinked: Boolean; +begin + if (Action is TCustomAction) and Supports(Action, ITntAction) then + Result := FUnicodeClient.Hint = TntActnList.TntAction_GetHint(Action as TCustomAction) + else + Result := inherited IsCaptionLinked; +end; + +procedure TSpTBXCustomItemActionLink.SetCaption(const Value: String); +begin + if IsCaptionLinked then + if (Action is TCustomAction) and Supports(Action, ITntAction) then + FUnicodeClient.Caption := TntActnList.TntAction_GetNewCaption(Action as TCustomAction, Value) + else + FUnicodeClient.Caption := Value; +end; + +procedure TSpTBXCustomItemActionLink.SetHint(const Value: String); +begin + if IsHintLinked then + if (Action is TCustomAction) and Supports(Action, ITntAction) then + FUnicodeClient.Hint := TntActnList.TntAction_GetNewHint(Action as TCustomAction, Value) + else + FUnicodeClient.Hint := Value; +end; +{$ENDIF} + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomControl } + +{$IFNDEF UNICODE} +procedure TSpTBXCustomControl.CreateWindowHandle(const Params: TCreateParams); +begin + CreateUnicodeHandle(Self, Params, ''); +end; + +procedure TSpTBXCustomControl.DefineProperties(Filer: TFiler); +begin + inherited; + // Don't let the streaming system store the WideStrings, + // we need to store them manually + SpPersistent_AfterInherited_DefineProperties(Filer, Self); +end; + +procedure TSpTBXCustomControl.ActionChange(Sender: TObject; CheckDefaults: Boolean); +begin + if (Action is TCustomAction) and Supports(Action, ITntAction) then begin + if not CheckDefaults or (Self.Caption = '') then + Self.Caption := TntActnList.TntAction_GetCaption(Action as TCustomAction); + if not CheckDefaults or (Self.Hint = '') then + Self.Hint := TntActnList.TntAction_GetHint(Action as TCustomAction); + end; + // Call inherited after we changed the unicode Caption and Hint + inherited; +end; + +function TSpTBXCustomControl.IsCaptionStored: Boolean; +begin + Result := TntControl_IsCaptionStored(Self); +end; + +function TSpTBXCustomControl.IsHintStored: Boolean; +begin + Result := TntControl_IsHintStored(Self); +end; + +function TSpTBXCustomControl.GetCaption: TWideCaption; +begin + Result := TntControl_GetText(Self); +end; + +function TSpTBXCustomControl.GetHint: WideString; +begin + Result := TntControl_GetHint(Self); +end; + +procedure TSpTBXCustomControl.SetCaption(const Value: TWideCaption); +begin + TntControl_SetText(Self, Value); +end; + +procedure TSpTBXCustomControl.SetHint(const Value: WideString); +begin + TntControl_SetHint(Self, Value); +end; +{$ENDIF} + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomItem } + +constructor TSpTBXCustomItem.Create(AOwner: TComponent); +begin + inherited; + FFontSettings := TSpTBXFontSettings.Create; + FFontSettings.OnChange := FontSettingsChanged; + + {$IFNDEF UNICODE} + FCaption := ''; + {$ENDIF} + FAlignment := taCenter; + FCaptionGlowColor := clYellow; + FCustomWidth := -1; + FCustomHeight := -1; + FMargins := 0; + SetStretch(True); + FWrapping := twWrap; +end; + +destructor TSpTBXCustomItem.Destroy; +begin + FreeAndNil(FFontSettings); + inherited; +end; + +procedure TSpTBXCustomItem.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited; + if (Operation = opRemove) and (AComponent = Control) then Control := nil; +end; + +procedure TSpTBXCustomItem.DefineProperties(Filer: TFiler); +begin + inherited; + // Don't let the streaming system store the WideStrings, + // we need to store them manually + SpPersistent_AfterInherited_DefineProperties(Filer, Self); +end; + +procedure TSpTBXCustomItem.ActionChange(Sender: TObject; CheckDefaults: Boolean); +begin + {$IFNDEF UNICODE} + if (Action is TCustomAction) and Supports(Action, ITntAction) then begin + if not CheckDefaults or (Self.Caption = '') then + Self.Caption := TntActnList.TntAction_GetCaption(Action as TCustomAction); + if not CheckDefaults or (Self.Hint = '') then + Self.Hint := TntActnList.TntAction_GetHint(Action as TCustomAction); + inherited; + Exit; + end; + {$ENDIF} + + if Action is TCustomAction then + with TCustomAction(Sender) do begin + if not CheckDefaults or (Self.Caption = '') then + Self.Caption := Caption; + if not CheckDefaults or (Self.Hint = '') then + Self.Hint := Hint; + end; + inherited; +end; + +function TSpTBXCustomItem.DialogChar(CharCode: Word): Boolean; +begin + Result := False; +end; + +procedure TSpTBXCustomItem.DoDrawAdjustFont(AFont: TFont; State: TSpTBXSkinStatesType); +begin + // Do nothing +end; + +procedure TSpTBXCustomItem.DoDrawHint(AHintBitmap: TBitmap; var AHint: Widestring; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawHint) then FOnDrawHint(Self, AHintBitmap, AHint, PaintDefault); +end; + +procedure TSpTBXCustomItem.DoDrawButton(ACanvas: TCanvas; ARect: TRect; + ItemInfo: TSpTBXMenuItemInfo; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawItem) then FOnDrawItem(Self, ACanvas, ARect, ItemInfo, PaintStage, PaintDefault); +end; + +procedure TSpTBXCustomItem.DoDrawCaption(ACanvas: TCanvas; ClientAreaRect: TRect; + State: TSpTBXSkinStatesType; var ACaption: WideString; var CaptionRect: TRect; var CaptionFormat: Cardinal; + IsTextRotated: Boolean; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawCaption) then FOnDrawCaption(Self, ACanvas, ClientAreaRect, + State, ACaption, CaptionRect, CaptionFormat, IsTextRotated, PaintStage, PaintDefault); +end; + +procedure TSpTBXCustomItem.DoDrawImage(ACanvas: TCanvas; + State: TSpTBXSkinStatesType; const PaintStage: TSpTBXPaintStage; + var AImageList: TCustomImageList; var AImageIndex: Integer; + var ARect: TRect; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawImage) then FOnDrawImage(Self, ACanvas, State, PaintStage, + AImageList, AImageIndex, ARect, PaintDefault); +end; + +procedure TSpTBXCustomItem.DoPopupShowingChanged(APopupWindow: TTBPopupWindow; IsVisible: Boolean); +// This method is called by TSpTBXPopupWindow when the popup is Opened and Closed +begin + if Assigned(APopupWindow) then begin + if IsVisible then begin + if Assigned(FOnInitPopup) then FOnInitPopup(Self, APopupWindow.View); + end + else begin + if Assigned(FOnClosePopup) then FOnClosePopup(Self); + end; + end; +end; + +procedure TSpTBXCustomItem.FontSettingsChanged(Sender: TObject); +begin + Change(True); +end; + +function TSpTBXCustomItem.GetActionLinkClass: TTBCustomItemActionLinkClass; +begin + Result := TSpTBXCustomItemActionLink; +end; + +function TSpTBXCustomItem.GetItemViewerClass(AView: TTBView): TTBItemViewerClass; +begin + Result := TSpTBXItemViewer; +end; + +function TSpTBXCustomItem.GetPopupWindowClass: TTBPopupWindowClass; +begin + Result := TSpTBXPopupWindow; +end; + +function TSpTBXCustomItem.GetShortCutText: WideString; +var + P: Integer; +begin + P := Pos(#9, Caption); + if (P = 0) or (P = Length(Caption)) then begin + if ShortCut <> 0 then + Result := ShortCutToText(ShortCut) + else + Result := ''; + end + else + Result := Copy(Caption, P+1, Maxint); +end; + +procedure TSpTBXCustomItem.Click; +begin + if Assigned(FControl) then ToggleControl; + inherited; +end; + +procedure TSpTBXCustomItem.InitiateAction; +begin + inherited; + UpdateProps; +end; + +procedure TSpTBXCustomItem.Invalidate; +begin + Change(False); +end; + +{$IFNDEF UNICODE} +function TSpTBXCustomItem.IsCaptionStored: Boolean; +begin + Result := (ActionLink = nil) or not TActionLinkAccess(ActionLink).IsCaptionLinked; +end; + +function TSpTBXCustomItem.IsHintStored: Boolean; +begin + Result := (ActionLink = nil) or not TActionLinkAccess(ActionLink).IsHintLinked; +end; + +procedure TSpTBXCustomItem.SetCaption(const Value: WideString); +var + S, PrevS: string; +begin + if FCaption <> Value then begin + FCaption := Value; + // We need to compare the Ansi inherited Caption + // to force the change. + // Sometimes '???' = '???' and the change is not executed. + S := inherited Caption; + PrevS := Value; + if S <> PrevS then + inherited Caption := Value + else + Change(True); + end; +end; + +procedure TSpTBXCustomItem.SetHint(const Value: WideString); +begin + if FHint <> Value then begin + FHint := Value; + inherited Hint := Value; + end; +end; +{$ENDIF} + +procedure TSpTBXCustomItem.SetAlignment(const Value: TAlignment); +begin + if FAlignment <> Value then begin + FAlignment := Value; + Change(False); + end; +end; + +procedure TSpTBXCustomItem.SetAnchored(const Value: Boolean); +begin + if FAnchored <> Value then begin + FAnchored := Value; + end; +end; + +procedure TSpTBXCustomItem.SetCaptionGlow(const Value: TSpGlowDirection); +begin + if FCaptionGlow <> Value then begin + FCaptionGlow := Value; + Change(False); + end; +end; + +procedure TSpTBXCustomItem.SetCaptionGlowColor(const Value: TColor); +begin + if FCaptionGlowColor <> Value then begin + FCaptionGlowColor := Value; + Change(False); + end; +end; + +procedure TSpTBXCustomItem.SetControl(const Value: TControl); +begin + if FControl <> Value then + begin + FControl := Value; + if Assigned(Value) then + Value.FreeNotification(Self); + UpdateProps; + end; +end; + +procedure TSpTBXCustomItem.SetCustomWidth(Value: Integer); +begin + if Value < -1 then Value := -1; + if FCustomWidth <> Value then begin + FCustomWidth := Value; + Change(True); + end; +end; + +procedure TSpTBXCustomItem.SetCustomHeight(Value: Integer); +begin + if Value < -1 then Value := -1; + if FCustomHeight <> Value then begin + FCustomHeight := Value; + Change(True); + end; +end; + +procedure TSpTBXCustomItem.SetFontSettings(const Value: TSpTBXFontSettings); +begin + FFontSettings.Assign(Value); +end; + +procedure TSpTBXCustomItem.SetMargins(Value: Integer); +begin + if FMargins <> Value then begin + FMargins := Value; + Change(True); + end; +end; + +procedure TSpTBXCustomItem.SetMinHeight(const Value: Integer); +begin + if Value <> FMinHeight then begin + FMinHeight := Value; + Change(True); + end; +end; + +procedure TSpTBXCustomItem.SetMinWidth(const Value: Integer); +begin + if Value <> FMinWidth then begin + FMinWidth := Value; + Change(True); + end; +end; + +procedure TSpTBXCustomItem.SetStretch(const Value: Boolean); +begin + if FStretch <> Value then begin + FStretch := Value; + Change(True); + end; +end; + +procedure TSpTBXCustomItem.SetToolBoxPopup(const Value: Boolean); +begin + FToolBoxPopup := Value; + if FToolBoxPopup then + Options := Options + [tboToolbarStyle] + else + Options := Options - [tboToolbarStyle]; +end; + +procedure TSpTBXCustomItem.SetWrapping(const Value: TTextWrapping); +begin + if FWrapping <> Value then begin + FWrapping := Value; + Change(False); + end; +end; + +procedure TSpTBXCustomItem.ToggleControl; +begin + FControl.Visible := not FControl.Visible; +end; + +procedure TSpTBXCustomItem.UpdateProps; +begin + if Assigned(Control) then + if (ComponentState * [csDesigning, csLoading, csDestroying] = []) then + Checked := Control.Visible; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXItemViewer } + +function TSpTBXItemViewer.CaptionShown: Boolean; +var + T: TSpTBXToolbar; +begin + Result := inherited CaptionShown; + + if Assigned(View) and Assigned(View.Owner) and (View.Owner is TSpTBXToolbar) then begin + T := View.Owner as TSpTBXToolbar; + case T.DisplayMode of + tbdmImageOnly: + if GetImageShown then Result := False; + tbdmTextOnly: + Result := True; + end; + end; +end; + +function TSpTBXItemViewer.GetImageShown: Boolean; +begin + Result := (Item.ImageIndex >= 0) and + ((Item.DisplayMode in [nbdmDefault, nbdmImageAndText]) or + (IsToolbarStyle and (Item.DisplayMode = nbdmTextOnlyInMenus))); + + if Assigned(View) and Assigned(View.Owner) and (View.Owner is TSpTBXToolbar) then + if TSpTBXToolbar(View.Owner).DisplayMode = tbdmTextOnly then + Result := False; +end; + +function TSpTBXItemViewer.GetImageSize: TSize; +var + IL: TCustomImageList; +begin + IL := GetImageList; + if Assigned(IL) then begin + Result.cx := IL.Width; + Result.cy := IL.Height; + end + else begin + Result.cx := 0; + Result.cy := 0; + end; +end; + +function TSpTBXItemViewer.GetRightImageSize: TSize; +begin + Result.cx := 0; + Result.cy := 0; +end; + +procedure TSpTBXItemViewer.DoDrawButton(ACanvas: TCanvas; ARect: TRect; + ItemInfo: TSpTBXMenuItemInfo; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + Item.DoDrawButton(ACanvas, ARect, ItemInfo, PaintStage, PaintDefault); +end; + +procedure TSpTBXItemViewer.DoDrawCaption(ACanvas: TCanvas; ClientAreaRect: TRect; + State: TSpTBXSkinStatesType; var ACaption: WideString; var CaptionRect: TRect; var CaptionFormat: Cardinal; + IsTextRotated: Boolean; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + Item.DoDrawCaption(ACanvas, ClientAreaRect, State, ACaption, CaptionRect, + CaptionFormat, IsTextRotated, PaintStage, PaintDefault); +end; + +procedure TSpTBXItemViewer.DoDrawHint(AHintBitmap: TBitmap; CursorPos: TPoint; + var CursorRect: TRect; var AHint: Widestring; var PaintDefault: Boolean); +begin + Item.DoDrawHint(AHintBitmap, AHint, PaintDefault); +end; + +procedure TSpTBXItemViewer.DoDrawImage(ACanvas: TCanvas; + State: TSpTBXSkinStatesType; const PaintStage: TSpTBXPaintStage; + var AImageList: TCustomImageList; var AImageIndex: Integer; + var ARect: TRect; var PaintDefault: Boolean); +begin + Item.DoDrawImage(ACanvas, State, PaintStage, AImageList, AImageIndex, ARect, PaintDefault); +end; + +procedure TSpTBXItemViewer.DoDrawAdjustFont(AFont: TFont; State: TSpTBXSkinStatesType); +begin + Item.FontSettings.Apply(AFont); + + if tboDefault in Item.EffectiveOptions then + AFont.Style := AFont.Style + [fsBold]; + + if AFont.Color = clNone then + AFont.Color := GetTextColor(State); + + Item.DoDrawAdjustFont(AFont, State); +end; + +procedure TSpTBXItemViewer.DrawItemImage(ACanvas: TCanvas; ARect: TRect; + ItemInfo: TSpTBXMenuItemInfo; ImgIndex: Integer); +var + PaintDefault: Boolean; + ImgList: TCustomImageList; + PatternColor: TColor; +begin + ImgList := GetImageList; + + PaintDefault := True; + DoDrawImage(ACanvas, ItemInfo.State, pstPrePaint, ImgList, ImgIndex, ARect, PaintDefault); + if PaintDefault and Assigned(ImgList) then + if ImgList = MDIButtonsImgList then begin + if (Item.Enabled) and not IsToolbarStyle and (SkinManager.GetSkinType <> sknSkin) then + PatternColor := clMenuText + else + PatternColor := GetTextColor(ItemInfo.State); + SpDrawGlyphPattern(ACanvas, ARect, ImgIndex, PatternColor); + end + else + if (ImgIndex >= 0) and (ImgIndex < ImgList.Count) then + SpDrawXPMenuItemImage(ACanvas, ARect, ItemInfo, ImgList, ImgIndex); + PaintDefault := True; + DoDrawImage(ACanvas, ItemInfo.State, pstPostPaint, ImgList, ImgIndex, ARect, PaintDefault); +end; + +procedure TSpTBXItemViewer.DrawItemRightImage(ACanvas: TCanvas; ARect: TRect; + ItemInfo: TSpTBXMenuItemInfo); +begin + // Do nothing +end; + +procedure TSpTBXItemViewer.InternalCalcSize(const Canvas: TCanvas; + CalcStretch: Boolean; var AWidth, AHeight: Integer); +var + I, W, H: Integer; + DropDownArrowSize, DropDownArrowMargin, SplitBtnArrowSize: Integer; + ImgSize, RightImgSize: TSize; + GlyphTop, ToolbarStyle: Boolean; + WS: WideString; + TextMetric: TTextMetric; + MenuMargins: TSpTBXMenuItemMarginsInfo; + State: TSpTBXSkinStatesType; + IsHoverItem, IsOpen, IsPushed: Boolean; + TextInfo: TSpTBXTextInfo; + TB: TSpTBXToolbar; +begin + CurrentSkin.GetDropDownArrowSize(DropDownArrowSize, DropDownArrowMargin, SplitBtnArrowSize); + + ToolbarStyle := IsToolbarStyle; + + ImgSize := GetImageSize; + if (ImgSize.CX <= 0) or (ImgSize.CY <= 0) then begin + ImgSize.CX := 0; + ImgSize.CY := 0; + end; + RightImgSize := GetRightImageSize; + if (RightImgSize.CX <= 0) or (RightImgSize.CY <= 0) then begin + RightImgSize.CX := 0; + RightImgSize.CY := 0; + end; + + GlyphTop := False; + if tboImageAboveCaption in Item.EffectiveOptions then + GlyphTop := True; + + // Setup font and get the text info + IsOpen := Self = View.OpenViewer; + IsHoverItem := Self = View.Selected; + IsPushed := IsHoverItem and (IsOpen or (View.MouseOverSelected and View.Capture)); + State := CurrentSkin.GetState(Item.Enabled, IsPushed, IsHoverItem, Item.Checked); + GetTextInfo(Canvas, State, TextInfo); + + // Measure size + if ToolbarStyle then begin + AWidth := 6; + AHeight := 6; + + if CaptionShown then begin + Inc(AWidth, TextInfo.TextSize.CX); + Inc(AHeight, TextInfo.TextSize.CY); + if not TextInfo.IsTextRotated then Inc(AWidth, 4) + else Inc(AHeight, 4); + end; + + if GetImageShown and (ImgSize.CX > 0) and (ImgSize.CY > 0) then begin + if not GlyphTop then begin + if not TextInfo.IsTextRotated then begin + Inc(AWidth, ImgSize.CX); + Inc(AWidth); + if AHeight < ImgSize.CY + 6 then AHeight := ImgSize.CY + 6; + end + else begin + Inc(AHeight, ImgSize.CY); + Inc(AHeight); + if AWidth < ImgSize.CX + 6 then AWidth := ImgSize.CX + 6; + end; + end + else begin + Inc(AHeight, ImgSize.CY); + if AWidth < ImgSize.CX + 7 then AWidth := ImgSize.CX + 7; + end; + end; + + if (RightImgSize.cx > 0) and (RightImgSize.cy > 0) then begin + if View.Orientation = tbvoVertical then + Inc(AHeight, 4 + RightImgSize.cy) + else + Inc(AWidth, 4 + RightImgSize.cx); + end; + + if (tbisSubmenu in Item.ItemStyle) and (tbisCombo in Item.ItemStyle) then + Inc(AWidth, SplitBtnArrowSize) + else begin + if tboDropdownArrow in Item.Options then + if not GlyphTop or (ImgSize.CX = 0) or TextInfo.IsTextRotated then begin + if View.Orientation = tbvoVertical then Inc(AHeight, DropDownArrowSize) + else Inc(AWidth, DropDownArrowSize); + end + else + if GlyphTop and (TextInfo.IsTextRotated xor (View.Orientation <> tbvoVertical)) then begin + W := ImgSize.CX + DropDownArrowSize + 2; + if W > AWidth - 7 then AWidth := W + 7; + end + else begin + H := ImgSize.CY + DropDownArrowSize + 2; + if H > AHeight - 7 then AHeight := H + 7; + end; + end; + + // Widen MenuBar SubMenuItems + if (tbisSubmenu in Item.ItemStyle) and (vsMenuBar in View.Style) then + Inc(AWidth, 6); + + // Toolbar.Stretch property doesn't work correctly, I don't know how to fix + // it without changing the TB2K source. + // http://news.jrsoftware.org/read/article.php?id=8176&group=jrsoftware.toolbar2000#8176 + if CalcStretch and Item.Stretch and (View is TSpTBXToolbarView) and (View.ViewerCount > 2) then begin + if View.Orientation = tbvoVertical then begin + if AWidth < TSpTBXToolbarView(View).FTallestItemSize then AWidth := TSpTBXToolbarView(View).FTallestItemSize; + end + else + if AHeight < TSpTBXToolbarView(View).FTallestItemSize then AHeight := TSpTBXToolbarView(View).FTallestItemSize; + end; + end + else begin // Menu Item + GetTextMetrics(Canvas.Handle, TextMetric); + Inc(TextInfo.TextSize.cy, TextMetric.tmExternalLeading); + + AWidth := TextInfo.TextSize.cx; + AHeight := TextInfo.TextSize.cy; + + if ImgSize.cy = 0 then ImgSize.cy := 16; + if AHeight < ImgSize.cy then AHeight := ImgSize.cy; + + if View.Window is TSpTBXPopupWindow then + CurrentSkin.GetMenuItemMargins(Canvas, TSpTBXPopupWindow(View.Window).MaximumImageSize.cx, MenuMargins) + else + CurrentSkin.GetMenuItemMargins(Canvas, ImgSize.cx, MenuMargins); + + Inc(AWidth, MenuMargins.Margins.Left + MenuMargins.Margins.Right); + Inc(AHeight, MenuMargins.Margins.Top + MenuMargins.Margins.Bottom); + + Inc(AWidth, MenuMargins.GutterSize + MenuMargins.ImageTextSpace + MenuMargins.LeftCaptionMargin + MenuMargins.RightCaptionMargin); + WS := Item.GetShortCutText; + if Length(WS) > 0 then + Inc(AWidth, (AHeight - 6) + SpGetTextSize(Canvas.Handle, WS, True).cx); + Inc(AWidth, AHeight); { Note: maybe this should be controlled by the theme } + end; + + if AWidth < Item.MinWidth then AWidth := Item.MinWidth; + if AHeight < Item.MinHeight then AHeight := Item.MinHeight; + + // Handle Custom size and anchors + if IsRotated then begin + // Reverse + H := AWidth + Item.Margins; + W := AHeight; + end + else begin + W := AWidth + Item.Margins; + H := AHeight; + end; + + if Item.CustomWidth > -1 then + W := Item.CustomWidth; + if Item.CustomHeight > -1 then + H := Item.CustomHeight; + + if IsToolbarStyle and Item.Anchored then + W := W + FAnchorDelta; + if W < Item.MinWidth then W := Item.MinWidth; + if H < Item.MinHeight then H := Item.MinHeight; + // Apply View.MaxSize to the height of the item + if View.Window is TSpTBXToolbar then begin + TB := View.Window as TSpTBXToolbar; + I := TB.MaxSize - TB.NonClientHeight; + if (I > -1) and (H > I) then + H := I; + end; + + if IsRotated then begin + // Reverse + AWidth := H; + AHeight := W; + end + else begin + AWidth := W; + AHeight := H; + end; +end; + +procedure TSpTBXItemViewer.InternalMouseMove(Shift: TShiftState; X, Y: Integer); +begin + // Do nothing +end; + +function TSpTBXItemViewer.IsOnToolBoxPopup: Boolean; +// Returns True if the item is on a submenu with ToolBoxPopup set to True. +begin + Result := False; + if Assigned(View) and Assigned(View.ParentItem) then + if View.ParentItem is TSpTBXCustomItem then + Result := TSpTBXCustomItem(View.ParentItem).ToolBoxPopup + else + if View.ParentItem is TSpTBXRootItem then + Result := TSpTBXRootItem(View.ParentItem).ToolBoxPopup; +end; + +function TSpTBXItemViewer.IsToolbarStyle: Boolean; +// Returns True if the item is on a toolbar or has tboToolbarStyle. +// We should return False if the item is a ToolBoxPopup and the parent doesn't have tboToolbarStyle, +// the main ToolBoxPopup should be painted as a menu item on submenus/popups. +begin + Result := inherited IsToolbarStyle; + // if ToolBoxPopup and tboToolbarStyle is set see if the item is the parent + // ToolBox submenu. + if Result and Item.ToolBoxPopup and not View.IsToolbar and Assigned(View) and Assigned(View.ParentItem) then + if not (tboToolbarStyle in View.ParentItem.EffectiveOptions) then begin + // The parent item doesn't have tboToolbarStyle, so the current item + // is the main ToolBoxPopup submenu. + Result := False; + end; +end; + +procedure TSpTBXItemViewer.CalcSize(const Canvas: TCanvas; var AWidth, AHeight: Integer); +begin + InternalCalcSize(Canvas, True, AWidth, AHeight); +end; + +function TSpTBXItemViewer.GetCaptionText: WideString; +begin + Result := SpStripShortcut(Item.Caption); +end; + +function TSpTBXItemViewer.GetTextColor(State: TSpTBXSkinStatesType): TColor; +begin + Result := Item.FontSettings.Color; + if Result = clNone then begin + if IsToolbarStyle then begin + if View.Window is TSpTBXToolbar then + Result := TSpTBXToolbar(View.Window).GetItemsTextColor(State); + if Result = clNone then + Result := CurrentSkin.GetTextColor(skncToolbarItem, State); + end + else + Result := CurrentSkin.GetTextColor(skncMenuItem, State); + end; +end; + +procedure TSpTBXItemViewer.GetTextInfo(ACanvas: TCanvas; State: TSpTBXSkinStatesType; out TextInfo: TSpTBXTextInfo); +var + ToolbarStyle: Boolean; + I: Integer; +const + WordWraps: array [TTextWrapping] of Cardinal = (0, + DT_SINGLELINE or DT_END_ELLIPSIS, + DT_SINGLELINE or DT_PATH_ELLIPSIS, DT_WORDBREAK); + + function GetRealTextSize(TextFlags: Cardinal): TSize; + var + R, CaptionRect: TRect; + begin + TextFlags := TextFlags and not DT_SINGLELINE; + TextFlags := TextFlags and not (DT_WORDBREAK or DT_END_ELLIPSIS or DT_PATH_ELLIPSIS); + if (TextFlags and (DT_WORDBREAK or DT_END_ELLIPSIS or DT_PATH_ELLIPSIS)) <> 0 then begin + // will never get here, TextFlags doesn't have wrapping + CaptionRect := BoundsRect; + R := Rect(0, 0, CaptionRect.Right - CaptionRect.Left, 80); + end + else + R := Rect(0, 0, 1, 1); + SpDrawXPText(ACanvas, TextInfo.Text, R, TextFlags or DT_CALCRECT, gldNone, clYellow, TextInfo.TextAngle); + Result.CX := R.Right; + Result.CY := R.Bottom; + end; + +begin + ToolbarStyle := IsToolbarStyle; + FillChar(TextInfo, SizeOf(TextInfo), 0); + + // Setup Font + ACanvas.Font.Assign(View.GetFont); + DoDrawAdjustFont(ACanvas.Font, State); // Let the Item adjust the font + + // Text Flags + TextInfo.TextFlags := 0; + if not AreKeyboardCuesEnabled and (vsUseHiddenAccels in View.Style) and + not (vsShowAccels in View.State) then TextInfo.TextFlags := DT_HIDEPREFIX; + TextInfo.TextFlags := TextInfo.TextFlags or DT_VCENTER or WordWraps[Item.Wrapping]; + + TextInfo.IsCaptionShown := CaptionShown; + if TextInfo.IsCaptionShown then begin + TextInfo.Text := GetCaptionText; + + TextInfo.IsTextRotated := IsRotated; + if TextInfo.IsTextRotated or not ToolbarStyle then + TextInfo.TextFlags := TextInfo.TextFlags or DT_SINGLELINE; + + TextInfo.TextSize := GetRealTextSize(TextInfo.TextFlags); + if TextInfo.IsTextRotated then begin + I := TextInfo.TextSize.cx; + TextInfo.TextSize.cx := TextInfo.TextSize.cy; + TextInfo.TextSize.cy := I; + end; + end + else begin + TextInfo.Text := ''; + TextInfo.IsTextRotated := False; + TextInfo.TextSize.cx := 0; + TextInfo.TextSize.cy := 0; + end; + + if TextInfo.IsTextRotated then + TextInfo.TextAngle := tra270 + else + TextInfo.TextAngle := tra0; +end; + +procedure TSpTBXItemViewer.Paint(const Canvas: TCanvas; const ClientAreaRect: TRect; + IsSelected, IsPushed, UseDisabledShadow: Boolean); +var + View: TTBViewAccess; + ItemInfo: TSpTBXMenuItemInfo; + TextInfo: TSpTBXTextInfo; + TextAlignment: TAlignment; + TextMetrics: TTextMetric; + PaintDefault, IsSpecialDropDown: Boolean; + + R, CaptionRect, ImageRect, RightImageRect: TRect; + P: TPoint; + + DropDownArrowSize, DropDownArrowMargin, SplitBtnArrowSize, ImgAndArrowWidth: Integer; + WS: WideString; + TextC, DropDownC: TColor; + + GlyphLayout: TSpGlyphLayout; +const + WordWraps: array [TTextWrapping] of Cardinal = (0, + DT_SINGLELINE or DT_END_ELLIPSIS, + DT_SINGLELINE or DT_PATH_ELLIPSIS, DT_WORDBREAK); +begin + CaptionRect := Rect(0, 0, 0, 0); + ImageRect := Rect(0, 0, 0, 0); + RightImageRect := Rect(0, 0, 0, 0); + CurrentSkin.GetDropDownArrowSize(DropDownArrowSize, DropDownArrowMargin, SplitBtnArrowSize); + + View := TTBViewAccess(Self.View); + SpFillItemInfo(Canvas, Self, ItemInfo); + + GlyphLayout := ghlGlyphLeft; + if tboImageAboveCaption in Item.EffectiveOptions then GlyphLayout := ghlGlyphTop; + + { Setup font and get the text info } + GetTextInfo(Canvas, ItemInfo.State, TextInfo); + TextC := Canvas.Font.Color; + TextAlignment := Item.Alignment; + + // Special DropDown, toolbar item with arrow, image and text. The Image is above the caption + // the arrow must be aligned with the image, above the text + IsSpecialDropDown := ItemInfo.HasArrow and not ItemInfo.IsSplit and ItemInfo.ToolbarStyle and + (tboImageAboveCaption in Item.EffectiveOptions) and + (ItemInfo.ImageSize.cx > 0) and not (TextInfo.IsTextRotated) and (Length(Item.Caption) > 0); + + { Border & Arrows } + R := ClientAreaRect; + if ItemInfo.ToolbarStyle then begin + if ItemInfo.HasArrow then begin + if ItemInfo.IsSplit then begin + ItemInfo.ComboRect := R; + Dec(R.Right, SplitBtnArrowSize); + ItemInfo.ComboRect.Left := R.Right; + end + else + if not IsSpecialDropDown then begin + if View.Orientation <> tbvoVertical then + ItemInfo.ComboRect := Rect(R.Right - DropDownArrowSize - DropDownArrowMargin, 0, + R.Right - DropDownArrowMargin, R.Bottom) + else + ItemInfo.ComboRect := Rect(0, R.Bottom - DropDownArrowSize - DropDownArrowMargin, + R.Right, R.Bottom - DropDownArrowMargin); + end + else begin + // Special DropDown, toolbar item with arrow, image and text. The Image is above the caption + // the arrow must be aligned with the image, above the text + ImgAndArrowWidth := ItemInfo.ImageSize.cx + DropDownArrowSize + 2; + ItemInfo.ComboRect.Right := (R.Left + R.Right + ImgAndArrowWidth + 2) div 2; + ItemInfo.ComboRect.Left := ItemInfo.ComboRect.Right - DropDownArrowSize; + ItemInfo.ComboRect.Top := (R.Top + R.Bottom - ItemInfo.ImageSize.cy - 2 - TextInfo.TextSize.CY) div 2; + ItemInfo.ComboRect.Bottom := ItemInfo.ComboRect.Top + ItemInfo.ImageSize.cy; + end; + end; + + PaintDefault := True; + DoDrawButton(Canvas, R, ItemInfo, pstPrePaint, PaintDefault); + if PaintDefault then + SpDrawXPMenuItem(Canvas, R, ItemInfo); + PaintDefault := True; + DoDrawButton(Canvas, R, ItemInfo, pstPostPaint, PaintDefault); + + // Draw dropdown arrow + if PaintDefault and ItemInfo.HasArrow then begin + P.X := (ItemInfo.ComboRect.Left + ItemInfo.ComboRect.Right) div 2 - 1; + P.Y := (ItemInfo.ComboRect.Top + ItemInfo.ComboRect.Bottom) div 2 - 1; + // Don't draw the arrow if is a split button in Windows XP, it's + // painted by the Windows theme. + if not (ItemInfo.IsSplit and (ItemInfo.SkinType = sknWindows)) then begin + DropDownC := TextC; + if ItemInfo.IsSplit and ItemInfo.Enabled then + DropDownC := GetTextColor(ItemInfo.ComboState); + if ItemInfo.IsSunkenCaption then + P := Point(P.X + 1, P.Y + 1); + SpDrawArrow(Canvas, P.X, P.Y, DropDownC, not ItemInfo.IsVertical, False, 2); + end; + if not ItemInfo.IsSplit and not IsSpecialDropDown then begin + if View.Orientation <> tbvoVertical then Dec(R.Right, DropDownArrowSize) + else Dec(R.Bottom, DropDownArrowSize); + end; + end; + + InflateRect(R, -4, -4); // Adjust + end + else begin // Menu items + PaintDefault := True; + DoDrawButton(Canvas, R, ItemInfo, pstPrePaint, PaintDefault); + if PaintDefault then + SpDrawXPMenuItem(Canvas, R, ItemInfo); + PaintDefault := True; + DoDrawButton(Canvas, R, ItemInfo, pstPostPaint, PaintDefault); + + // Draw the submenu arrows + if PaintDefault and (tbisSubmenu in Item.ItemStyle) then + SpDrawArrow(Canvas, R.Right - 10, R.Bottom div 2, TextC, False, False, 3); + + // Don't apply the margins if the menu item has + // tbisClicksTransparent itemstyle (like a SpTBXLabelItem) + // the caption will be automatically centered. + if not (tbisClicksTransparent in Item.ItemStyle) then begin + Inc(R.Left, ItemInfo.MenuMargins.Margins.Left); + Dec(R.Right, ItemInfo.MenuMargins.Margins.Right); + Inc(R.Top, ItemInfo.MenuMargins.Margins.Top); + Dec(R.Bottom, ItemInfo.MenuMargins.Margins.Bottom); + end; + end; + + { Caption } + if TextInfo.IsCaptionShown then + begin + WS := GetCaptionText; + + if ItemInfo.ToolbarStyle then begin + TextInfo.TextFlags := TextInfo.TextFlags and not DT_VCENTER; + // When ItemInfo.RightImageSize is valid use taLeftJustify + if (ItemInfo.RightImageSize.cx > 0) and (ItemInfo.RightImageSize.cy > 0) then + TextAlignment := taLeftJustify; + case TextAlignment of + taCenter: + if GlyphLayout = ghlGlyphTop then TextInfo.TextFlags := TextInfo.TextFlags or DT_CENTER; + taRightJustify: + TextInfo.TextFlags := TextInfo.TextFlags or DT_RIGHT; + end; + SpCalcXPText(Canvas, R, WS, TextAlignment, TextInfo.TextFlags, ItemInfo.ImageSize, ItemInfo.RightImageSize, GlyphLayout, False, CaptionRect, ImageRect, RightImageRect, TextInfo.TextAngle); + + if ItemInfo.IsSunkenCaption then + OffsetRect(CaptionRect, 1, 1); + end + else begin + if tbisClicksTransparent in Item.ItemStyle then begin + // The caption should be centered on the menu popup if the item has + // tbisClicksTransparent itemstyle (SpTBXLabelItem) + TextInfo.TextFlags := TextInfo.TextFlags or DT_CENTER; + CaptionRect := R; + end + else begin + TextInfo.TextFlags := TextInfo.TextFlags or DT_LEFT or DT_VCENTER; + GetTextMetrics(Canvas.Handle, TextMetrics); + CaptionRect := R; + Inc(CaptionRect.Left, ItemInfo.MenuMargins.GutterSize + ItemInfo.MenuMargins.ImageTextSpace + ItemInfo.MenuMargins.LeftCaptionMargin); + if (CaptionRect.Bottom - CaptionRect.Top) - (TextMetrics.tmHeight + TextMetrics.tmExternalLeading) = ItemInfo.MenuMargins.Margins.Bottom then + Dec(CaptionRect.Bottom); + Inc(CaptionRect.Top, TextMetrics.tmExternalLeading); + CaptionRect.Right := CaptionRect.Left + TextInfo.TextSize.CX; + end; + end; + + Canvas.Font.Color := TextC; + PaintDefault := True; + DoDrawCaption(Canvas, ClientAreaRect, ItemInfo.State, WS, CaptionRect, TextInfo.TextFlags, TextInfo.IsTextRotated, pstPrePaint, PaintDefault); + if PaintDefault then begin + if (not IsSelected or ItemInfo.ToolbarStyle) and + (ItemInfo.State = sknsDisabled) and (ItemInfo.SkinType = sknNone) then + begin + OffsetRect(CaptionRect, 1, 1); + Canvas.Font.Color := clBtnHighlight; + SpDrawXPText(Canvas, WS, CaptionRect, TextInfo.TextFlags, Item.CaptionGlow, Item.CaptionGlowColor, TextInfo.TextAngle); + OffsetRect(CaptionRect, -1, -1); + Canvas.Font.Color := clGrayText; + end; + SpDrawXPText(Canvas, WS, CaptionRect, TextInfo.TextFlags, Item.CaptionGlow, Item.CaptionGlowColor, TextInfo.TextAngle); + end; + PaintDefault := True; + DoDrawCaption(Canvas, ClientAreaRect, ItemInfo.State, WS, CaptionRect, TextInfo.TextFlags, TextInfo.IsTextRotated, pstPostPaint, PaintDefault); + end; + + { Shortcut } + if not ItemInfo.ToolbarStyle then + begin + WS := Item.GetShortCutText; + if Length(WS) > 0 then + begin + CaptionRect := R; + CaptionRect.Left := CaptionRect.Right - (CaptionRect.Bottom - CaptionRect.Top) - SpGetTextSize(Canvas.Handle, WS, True).cx; + if (CaptionRect.Bottom - CaptionRect.Top) - (TextMetrics.tmHeight + TextMetrics.tmExternalLeading) = ItemInfo.MenuMargins.Margins.Bottom then + Dec(CaptionRect.Bottom); + Inc(CaptionRect.Top, TextMetrics.tmExternalLeading); + Canvas.Font.Color := TextC; + PaintDefault := True; + DoDrawCaption(Canvas, ClientAreaRect, ItemInfo.State, WS, CaptionRect, TextInfo.TextFlags, TextInfo.IsTextRotated, pstPrePaint, PaintDefault); + if PaintDefault then + SpDrawXPText(Canvas, WS, CaptionRect, TextInfo.TextFlags, Item.CaptionGlow, Item.CaptionGlowColor, TextInfo.TextAngle); + PaintDefault := True; + DoDrawCaption(Canvas, ClientAreaRect, ItemInfo.State, WS, CaptionRect, TextInfo.TextFlags, TextInfo.IsTextRotated, pstPostPaint, PaintDefault); + end; + end; + + { Image, or check box } + if ItemInfo.ImageOrCheckShown then begin + if ItemInfo.ToolBarStyle then begin + if IsRectEmpty(ImageRect) then + ImageRect := R; + if IsSpecialDropDown then OffsetRect(ImageRect, (-DropDownArrowSize + 1) div 2, 0); + end + else begin + ImageRect := R; + ImageRect.Right := ImageRect.Left + ItemInfo.MenuMargins.GutterSize; + end; + + if ItemInfo.ImageShown then begin + ImageRect := SpCenterRect(ImageRect, ItemInfo.ImageSize.cx, ItemInfo.ImageSize.cy); + DrawItemImage(Canvas, ImageRect, ItemInfo, Item.ImageIndex); + end + else begin + if not ItemInfo.ToolbarStyle and Item.Checked then begin + if Item.RadioItem then + CurrentSkin.PaintMenuRadioMark(Canvas, ImageRect, True, True, ItemInfo.State) + else + CurrentSkin.PaintMenuCheckMark(Canvas, ImageRect, True, False, True, ItemInfo.State); + end; + end; + end; + + { Right Image } + if ItemInfo.ToolbarStyle and (ItemInfo.RightImageSize.cx > 0) and (ItemInfo.RightImageSize.cy > 0) then begin + if IsRectEmpty(RightImageRect) then begin + RightImageRect.Left := R.Right - ItemInfo.RightImageSize.cx; + RightImageRect.Right := RightImageRect.Left + ItemInfo.RightImageSize.cx; + RightImageRect.Top := R.Top + (R.Bottom - R.Top - ItemInfo.RightImageSize.cy) div 2; + RightImageRect.Bottom := RightImageRect.Top + ItemInfo.RightImageSize.cy; + end; + DrawItemRightImage(Canvas, RightImageRect, ItemInfo); + end; +end; + +function TSpTBXItemViewer.GetItem: TSpTBXCustomItem; +var + TBItem: TTBCustomItem; +begin + TBItem := inherited Item; + if Assigned(TBItem) then + Result := TBItem as TSpTBXCustomItem + else + Result := nil; +end; + +function TSpTBXItemViewer.GetHintText: Widestring; +var + I: Integer; + S: string; +begin + // Get the short hint + I := Pos('|', Item.Hint); + if I = 0 then + Result := Item.Hint + else + Result := Copy(Item.Hint, 1, I - 1); + // Use the caption if there is no hint + if (Result = '') and not(tboNoAutoHint in Item.EffectiveOptions) and + (not(tbisSubmenu in Item.ItemStyle) or (tbisCombo in Item.ItemStyle) or + not CaptionShown) then + begin + Result := SpStripAccelChars(SpStripTrailingPunctuation(Item.Caption)); + end; + + // Call associated action's OnHint event handler to post-process the hint + if Assigned(Item.ActionLink) and (Item.ActionLink.Action is TCustomAction) and + Assigned(TCustomAction(Item.ActionLink.Action).OnHint) then + begin + S := Result; + if TCustomAction(Item.ActionLink.Action).DoHint(S) then + Result := S + else + Result := ''; + // Note: TControlActionLink.DoShowHint actually misinterprets the result of DoHint, but we get it right... + end; + + // Add shortcut text + if (Result <> '') and Application.HintShortCuts and (Item.ShortCut <> scNone) then + Result := Result + ' (' + ShortCutToText(Item.ShortCut) + ')'; +end; + +procedure TSpTBXItemViewer.Entering; +begin + // When a Popupmenu is opened the TB2K modal handler will reset + // the TApplication.Hint in UpdateAppHint subprocedure of + // TTBModalHandler.Create, this in turn sets TTntApplication.Hint + // to AnsiString: + // ... + // if Assigned(View.FSelected) then + // Application.Hint := GetLongHint(View.FSelected.Item.Hint) + // else + // Application.Hint := ''; + // ... + // We need to set TTntApplication.Hint before TB2K. + // TTntStatusBar uses TTntApplication.Hint when AutoHint is true. + + inherited; + {$IFNDEF UNICODE} + if View.IsPopup then + TntApplication.Hint := Item.Hint; + {$ENDIF} +end; + +procedure TSpTBXItemViewer.CMHintShow(var Message: TMessage); +// Handle the CM_HINTSHOW message to show unicode hints using +// a custom THintWindow. +var + HintInfo: PHintInfo; + WideHint, PrevWideHint: Widestring; + R, TextR, CursorR: TRect; + PaintDefault: Boolean; +begin + HintInfo := TCMHintShow(Message).HintInfo; + WideHint := GetHintText; + CursorR := BoundsRect; + + // Prepare the HintInfo + HintInfo.HintStr := WideHint; + HintInfo.CursorRect := CursorR; + HintInfo.HintWindowClass := SpTBXHintWindowClass; // Custom HintWindow class + HintInfo.HintData := SpStockHintBitmap; // TApplication.ActivateHint will pass the data to the HintWindow + HintInfo.HideTimeout := 60000; // 1 minute + + // Prepare the HintBitmap + SpStockHintBitmap.Canvas.Font.Assign(Screen.HintFont); + SpStockHintBitmap.Canvas.Font.Color := clInfoText; + SpStockHintBitmap.Canvas.Pen.Color := clBlack; + SpStockHintBitmap.Canvas.Brush.Color := clInfoBk; + TextR := Rect(0, 0, 1, 1); + SpDrawXPText(SpStockHintBitmap.Canvas, WideHint, TextR, DT_NOPREFIX or DT_CALCRECT); + SpStockHintBitmap.Width := TextR.Right + 8; + SpStockHintBitmap.Height := TextR.Bottom + 4; + R := Rect(0, 0, SpStockHintBitmap.Width, SpStockHintBitmap.Height); + SpDrawXPTooltipBackground(SpStockHintBitmap.Canvas, R); + + // Draw the hint in the HintBitmap + PrevWideHint := WideHint; + PaintDefault := True; + DoDrawHint(SpStockHintBitmap, HintInfo.CursorPos, CursorR, WideHint, PaintDefault); + if PaintDefault then begin + HintInfo.HintStr := WideHint; + HintInfo.CursorRect := CursorR; + + // Adjust the bounds and repaint the background if it's needed + if WideHint <> PrevWideHint then begin + TextR := Rect(0, 0, 1, 1); + SpDrawXPText(SpStockHintBitmap.Canvas, WideHint, TextR, DT_NOPREFIX or DT_CALCRECT); + SpStockHintBitmap.Width := TextR.Right + 8; + SpStockHintBitmap.Height := TextR.Bottom + 4; + R := Rect(0, 0, SpStockHintBitmap.Width, SpStockHintBitmap.Height); + SpDrawXPTooltipBackground(SpStockHintBitmap.Canvas, R); + end + else + R := Rect(0, 0, SpStockHintBitmap.Width, SpStockHintBitmap.Height); + + // Draw the hint + OffsetRect(TextR, ((R.Right - TextR.Right) div 2) - 2, (R.Bottom - TextR.Bottom) div 2); + SpDrawXPText(SpStockHintBitmap.Canvas, WideHint, TextR, DT_NOPREFIX); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXRootItem } + +procedure TSpTBXRootItem.DoPopupShowingChanged(APopupWindow: TTBPopupWindow; IsVisible: Boolean); +// This method is called by TSpTBXPopupWindow when the popup is Opened +begin + if Assigned(APopupWindow) then begin + if IsVisible then begin + if Assigned(FOnInitPopup) then FOnInitPopup(Self, APopupWindow.View); + end + else begin + if Assigned(FOnClosePopup) then FOnClosePopup(Self); + end; + end; +end; + +function TSpTBXRootItem.GetPopupWindowClass: TTBPopupWindowClass; +begin + Result := TSpTBXPopupWindow; +end; + +procedure TSpTBXRootItem.SetToolBoxPopup(const Value: Boolean); +begin + FToolBoxPopup := Value; + if FToolBoxPopup then + Options := Options + [tboToolbarStyle] + else + Options := Options - [tboToolbarStyle]; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSubmenuItem } + +constructor TSpTBXSubmenuItem.Create(AOwner: TComponent); +begin + inherited; + ItemStyle := ItemStyle + [tbisSubMenu, tbisSubitemsEditable]; +end; + +function TSpTBXSubmenuItem.GetDropdownCombo: Boolean; +begin + Result := tbisCombo in ItemStyle; +end; + +procedure TSpTBXSubmenuItem.SetDropdownCombo(Value: Boolean); +begin + if (tbisCombo in ItemStyle) <> Value then begin + if Value then ItemStyle := ItemStyle + [tbisCombo] + else ItemStyle := ItemStyle - [tbisCombo]; + Change(True); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXColorItem } + +constructor TSpTBXColorItem.Create(AOwner: TComponent); +begin + inherited; + FColor := clWhite; +end; + +function TSpTBXColorItem.GetItemViewerClass(AView: TTBView): TTBItemViewerClass; +begin + Result := TSpTBXColorItemViewer; +end; + +procedure TSpTBXColorItem.SetColor(Value: TColor); +begin + if FColor <> Value then begin + FColor := Value; + Change(False); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXColorItemViewer } + +procedure TSpTBXColorItemViewer.DoDrawImage(ACanvas: TCanvas; + State: TSpTBXSkinStatesType; const PaintStage: TSpTBXPaintStage; + var AImageList: TCustomImageList; var AImageIndex: Integer; var ARect: TRect; + var PaintDefault: Boolean); +var + C: TColor; +begin + if PaintStage = pstPrePaint then begin + if State = sknsDisabled then begin + Inc(ARect.Right); + Inc(ARect.Bottom); + DrawEdge(ACanvas.Handle, ARect, BDR_SUNKENOUTER or BDR_RAISEDINNER, BF_RECT); + end + else begin + if not IsToolbarStyle then + InflateRect(ARect, -2, -2); + C := TSpTBXColorItem(Item).Color; + if C <> clNone then begin + ACanvas.Brush.Color := clBtnShadow; + ACanvas.FrameRect(ARect); + InflateRect(ARect, -1, -1); + ACanvas.Brush.Color := C; + ACanvas.FillRect(ARect); + end; + end; + end; + inherited; +end; + +function TSpTBXColorItemViewer.GetImageShown: Boolean; +begin + Result := ((Item.DisplayMode in [nbdmDefault, nbdmImageAndText]) or + (IsToolbarStyle and (Item.DisplayMode = nbdmTextOnlyInMenus))); +end; + +function TSpTBXColorItemViewer.GetImageSize: TSize; +begin + if IsToolbarStyle then begin + Result.cx := 12; + Result.cy := 12; + end + else begin + Result.cx := 16; + Result.cy := 16; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomLabelItem } + +constructor TSpTBXCustomLabelItem.Create(AOwner: TComponent); +begin + inherited; + ItemStyle := ItemStyle - [tbisSelectable, tbisRedrawOnSelChange, + tbisRedrawOnMouseOverChange] + [tbisClicksTransparent]; + Alignment := taLeftJustify; + Stretch := False; + DisplayMode := nbdmImageAndText; +end; + +function TSpTBXCustomLabelItem.DialogChar(CharCode: Word): Boolean; +begin + Result := inherited DialogChar(CharCode); + if Enabled and Visible and Assigned(Control) and (Control is TWinControl) and + IsAccel(CharCode, Caption) and SpCanFocus(TWinControl(Control)) then + begin + TWinControl(Control).SetFocus; + Result := True; + end; +end; + +procedure TSpTBXCustomLabelItem.DoDrawButton(ACanvas: TCanvas; ARect: TRect; + ItemInfo: TSpTBXMenuItemInfo; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + PaintDefault := True; + inherited DoDrawButton(ACanvas, ARect, ItemInfo, PaintStage, PaintDefault); + PaintDefault := False; +end; + +function TSpTBXCustomLabelItem.GetItemViewerClass(AView: TTBView): TTBItemViewerClass; +begin + Result := TSpTBXLabelItemViewer; +end; + +procedure TSpTBXCustomLabelItem.ToggleControl; +begin + // Do nothing, the Control property is not valid +end; + +procedure TSpTBXCustomLabelItem.UpdateProps; +begin + // Do nothing, the Control property is not valid +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXLabelItemViewer } + +procedure TSpTBXLabelItemViewer.CalcSize(const Canvas: TCanvas; var AWidth, + AHeight: Integer); +var + TextMetrics: TTextMetric; +begin + inherited CalcSize(Canvas, AWidth, AHeight); + if not IsToolbarStyle and (Length(GetCaptionText) > 0) and (Item.CustomHeight <= -1) then begin + GetTextMetrics(Canvas.Handle, TextMetrics); + AHeight := TextMetrics.tmHeight; + end; +end; + +function TSpTBXLabelItemViewer.DoExecute: Boolean; +begin + // Clicking a TSpTBXLabelItem on a popup menu causes the menu to close. + // This is caused by TTBXItemViewer.MouseUp, which calls + // TTBItemViewer.DoExecute + // The TBXLabelItem doesn't fire the click because the ItemViewer descends + // from TTBItemViewer instead of TTBXItemViewer. + // TTBXItemViewer.MouseUp is the culprit of firing the DoExecute + Result := False; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSeparatorItem } + +function TSpTBXSeparatorItem.GetItemViewerClass(AView: TTBView): TTBItemViewerClass; +begin + Result := TSpTBXSeparatorItemViewer; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSeparatorItemViewer } + +procedure TSpTBXSeparatorItemViewer.CalcSize(const Canvas: TCanvas; var AWidth, + AHeight: Integer); +begin + if not IsToolbarStyle then begin + if CurrentSkin.OfficeMenu then + AHeight := 4 // For Office XP, 2003, 2007 + else + AHeight := 10; + end + else begin + AWidth := 6; + AHeight := 6; + end; +end; + +function TSpTBXSeparatorItemViewer.IsStatusBarSeparator: Boolean; +var + C: TComponent; +begin + Result := False; + C := Item.GetParentComponent; + if Assigned(C) and (C is TSpTBXStatusToolbar) then + Result := TSpTBXStatusToolbar(C).NeedsSeparatorRepaint; +end; + +procedure TSpTBXSeparatorItemViewer.Paint(const Canvas: TCanvas; const ClientAreaRect: TRect; + IsSelected, IsPushed, UseDisabledShadow: Boolean); +var + Vertical, MenuItemStyle: Boolean; + MarginsInfo: TSpTBXMenuItemMarginsInfo; + R: TRect; +begin + if TTBSeparatorItem(Item).Blank or IsStatusBarSeparator then + Exit; + + R := ClientAreaRect; + MenuItemStyle := View.IsPopup; + if MenuItemStyle then begin + Vertical := False; + case SkinManager.GetSkinType of + sknNone: + begin + // Add separator spacing when it's not on a ToolBoxPopup + if not (tboToolbarStyle in Item.EffectiveOptions) then + InflateRect(R, -tbMenuSeparatorOffset, 0); + end; + sknWindows, sknSkin: + begin + // Draw the separator from the gutter end if the separator is not on + // a ToolBoxPopup and we are using the default Vista theme or the + // skin has a gutter specified. + if not (tboToolbarStyle in Item.EffectiveOptions) then + if SpIsWinVistaOrUp or not CurrentSkin.Options(skncGutter, sknsNormal).IsEmpty then begin + if View.Window is TSpTBXPopupWindow then + CurrentSkin.GetMenuItemMargins(Canvas, TSpTBXPopupWindow(View.Window).MaximumImageSize.cx, MarginsInfo) + else + CurrentSkin.GetMenuItemMargins(Canvas, 0, MarginsInfo); + if SpIsWinVistaOrUp then + R.Left := MarginsInfo.GutterSize + MarginsInfo.ImageTextSpace + else + R.Left := MarginsInfo.GutterSize + MarginsInfo.ImageTextSpace + MarginsInfo.LeftCaptionMargin; + end; + end; + end; + end + else + Vertical := View.Orientation <> tbvoVertical; + + SpDrawXPMenuSeparator(Canvas, R, MenuItemStyle, Vertical); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXRadioGroupItem } + +constructor TSpTBXRadioGroupItem.Create(AOwner: TComponent); +begin + inherited; + FDefaultIndex := 0; + FLastClickedIndex := 0; + FStrings := TTntStringList.Create; +end; + +destructor TSpTBXRadioGroupItem.Destroy; +begin + FStrings.Free; + inherited; +end; + +procedure TSpTBXRadioGroupItem.DoClick(AItem: TSpTBXItem); +begin + if Assigned(FOnClick) then FOnClick(AItem); +end; + +procedure TSpTBXRadioGroupItem.DoFillStrings; +begin + if Assigned(FOnFillStrings) then FOnFillStrings(Self, FStrings); +end; + +procedure TSpTBXRadioGroupItem.ItemClickEvent(Sender: TObject); +var + Item: TSpTBXItem; +begin + Item := Sender as TSpTBXItem; + if not Item.Checked and (Item.Tag > -1) and (Item.Tag < FStrings.Count) then + begin + Item.Checked := True; + FLastClickedIndex := IndexOf(Item); + DoClick(Item); + end; +end; + +procedure TSpTBXRadioGroupItem.Loaded; +begin + inherited; + if not (csDesigning in ComponentState) then + Recreate; +end; + +procedure TSpTBXRadioGroupItem.Recreate; +var + I: Integer; + A: TSpTBXItem; +begin + // Delete FStrings items + FStrings.Clear; + for I := Count - 1 downto 0 do + if Items[I].GroupIndex = C_SpTBXRadioGroupIndex then + Delete(I); + + DoFillStrings; + + // Create group items + for I := 0 to FStrings.Count - 1 do begin + A := TSpTBXItem.Create(Self); + A.Caption := FStrings[I]; + A.AutoCheck := False; + A.GroupIndex := C_SpTBXRadioGroupIndex; + A.Tag := I; + A.OnClick := ItemClickEvent; + Insert(I, A); + if I = FDefaultIndex then A.Click; + end; + + if Assigned(FOnUpdate) then FOnUpdate(Self); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSkinGroupItem } + +constructor TSpTBXSkinGroupItem.Create(AOwner: TComponent); +begin + inherited; + SkinManager.AddSkinNotification(Self); +end; + +destructor TSpTBXSkinGroupItem.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + inherited; +end; + +procedure TSpTBXSkinGroupItem.DoClick(AItem: TSpTBXItem); +begin + SkinManager.SetSkin(FStrings[AItem.Tag]); + inherited; +end; + +procedure TSpTBXSkinGroupItem.DoSkinChange; +var + I: Integer; +begin + I := FStrings.IndexOf(SkinManager.CurrentSkinName); + if I > -1 then + Items[I].Click; + + if Assigned(FOnSkinChange) then FOnSkinChange(Self); +end; + +procedure TSpTBXSkinGroupItem.DoFillStrings; +var + I: Integer; +begin + {$IFNDEF UNICODE} + SkinManager.SkinsList.GetSkinNames(FStrings.AnsiStrings); + {$ELSE} + SkinManager.SkinsList.GetSkinNames(FStrings); + {$ENDIF} + + // Sort the list and move the Default skin to the top + FStrings.Sort; + I := FStrings.IndexOf('Default'); + if I > -1 then FStrings.Move(I, 0); + inherited; + FDefaultIndex := FStrings.IndexOf(SkinManager.CurrentSkinName); +end; + +procedure TSpTBXSkinGroupItem.WMSpSkinChange(var Message: TMessage); +begin + DoSkinChange; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSystemMenuItem } + +constructor TSpTBXSystemMenuItem.Create(AOwner: TComponent); +begin + inherited; + ItemStyle := ItemStyle + [tbisSubMenu, tbisDontSelectFirst] - [tbisRedrawOnSelChange, tbisRedrawOnMouseOverChange]; + Caption := '&-'; + FShowSize := True; +end; + +function TSpTBXSystemMenuItem.GetItemViewerClass(AView: TTBView): TTBItemViewerClass; +begin + Result := TSpTBXSystemMenuItemViewer; +end; + +function TSpTBXSystemMenuItem.GetSystemMenuParentForm: TCustomForm; +var + C: TComponent; +begin + Result := nil; + C := GetParentComponent; + if Assigned(C) and (C is TControl) then + Result := GetParentForm(TControl(C)); + + if not Assigned(Result) and Assigned(Application.MainForm) then begin + if FMDISystemMenu then + Result := Application.MainForm.ActiveMDIChild + else + Result := Application.MainForm; + end; +end; + +procedure TSpTBXSystemMenuItem.Click; +var + Form: TCustomForm; +begin + inherited; + Clear; + + Form := GetSystemMenuParentForm; + if Assigned(Form) then + SpFillSystemSpTBXPopup(Form, Self, True, True, True, True, CommandClick); +end; + +procedure TSpTBXSystemMenuItem.CommandClick(Sender: TObject); +var + Form: TCustomForm; + I: Integer; +begin + Form := GetSystemMenuParentForm; + if Assigned(Form) and Assigned(Sender) then begin + I := TComponent(Sender).Tag; + if I = SC_MAXIMIZE then + Form.WindowState := wsMaximized + else + SendMessage(Form.Handle, WM_SYSCOMMAND, I, GetMessagePos); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSystemMenuItemViewer } + +procedure TSpTBXSystemMenuItemViewer.CalcSize(const Canvas: TCanvas; + var AWidth, AHeight: Integer); +begin + AWidth := GetSystemMetrics(SM_CXSMICON) + 2; + AHeight := GetSystemMetrics(SM_CYSMICON) + 2; +end; + +procedure TSpTBXSystemMenuItemViewer.Paint(const Canvas: TCanvas; + const ClientAreaRect: TRect; IsSelected, IsPushed, UseDisabledShadow: Boolean); + + function GetIconHandle: HICON; + var + Form: TForm; + begin + Result := 0; + if Assigned(Application.MainForm) then begin + if TSpTBXSystemMenuItem(Item).MDISystemMenu then + Form := Application.MainForm.ActiveMDIChild + else + Form := Application.MainForm; + if Assigned(Form) then + Result := Form.Icon.Handle; + end; + if Result = 0 then + Result := Application.Icon.Handle; + if Result = 0 then + Result := LoadIcon(0, IDI_APPLICATION); + end; + +var + R: TRect; + TempIcon: HICON; +begin + R := ClientAreaRect; + InflateRect(R, -1, -1); + TempIcon := CopyImage(GetIconHandle, IMAGE_ICON, R.Right - R.Left, R.Bottom - R.Top, LR_COPYFROMRESOURCE); + try + DrawIconEx(Canvas.Handle, R.Left, R.Top, TempIcon, 0, 0, 0, 0, DI_NORMAL); + finally + DestroyIcon(TempIcon); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomToolPalette } + +constructor TSpTBXCustomToolPalette.Create(AOwner: TComponent); +begin + inherited; + FColCount := 1; + FRowCount := 1; + FSelectedCell.X := -1; +end; + +function TSpTBXCustomToolPalette.DoCellClick(ACol, ARow: Integer): Boolean; +begin + Result := True; + if Assigned(FOnCellClick) then FOnCellClick(Self, ACol, ARow, Result); +end; + +procedure TSpTBXCustomToolPalette.DoChange; +begin + if Assigned(FOnChange) then FOnChange(Self); +end; + +procedure TSpTBXCustomToolPalette.DoDrawCellImage(ACanvas: TCanvas; + const ARect: TRect; ACol, ARow: Integer; ItemInfo: TSpTBXMenuItemInfo); +begin + if Assigned(FOnDrawCellImage) then + FOnDrawCellImage(Self, ACanvas, ARect, ACol, ARow, ItemInfo.Checked, + ItemInfo.HotTrack, ItemInfo.Enabled); +end; + +procedure TSpTBXCustomToolPalette.DoGetCellHint(ACol, ARow: Integer; var AHint: WideString); +begin + if Assigned(FOnGetCellHint) then FOnGetCellHint(Self, ACol, ARow, AHint); +end; + +function TSpTBXCustomToolPalette.GetItemViewerClass(AView: TTBView): TTBItemViewerClass; +begin + Result := TSpTBXToolViewer; +end; + +procedure TSpTBXCustomToolPalette.HandleClickCell(ACol, ARow: Integer); +begin + if DoCellClick(ACol, ARow) then SetSelectedCell(Point(ACol, ARow)); +end; + +procedure TSpTBXCustomToolPalette.SetColCount(Value: TSpTBXRowColCount); +begin + if FColCount <> Value then begin + FColCount := Value; + Change(True); + end; +end; + +procedure TSpTBXCustomToolPalette.SetRowCount(Value: TSpTBXRowColCount); +begin + if FRowCount <> Value then begin + FRowCount := Value; + Change(True); + end; +end; + +procedure TSpTBXCustomToolPalette.SetSelectedCell(Value: TPoint); +begin + FSelectedCell := Value; + Change(True); + DoChange; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXToolViewer } + +constructor TSpTBXToolViewer.Create(AView: TTBView; AItem: TTBCustomItem; + AGroupLevel: Integer); +begin + inherited; + FColCount := TSpTBXCustomToolPalette(AItem).ColCount; + FRowCount := TSpTBXCustomToolPalette(AItem).RowCount; +end; + +procedure TSpTBXToolViewer.CalcCellSize(ACanvas: TCanvas; var AWidth, AHeight: Integer); +var + ImageSize: TSize; +begin + ImageSize := GetImageSize; + AWidth := ImageSize.cx + 6; + AHeight := ImageSize.cy + 6; +end; + +procedure TSpTBXToolViewer.CalcSize(const Canvas: TCanvas; var AWidth, AHeight: Integer); +var + W, H: Integer; + MarginsInfo: TSpTBXMenuItemMarginsInfo; +begin + if IsToolbarStyle then + FIndent := 0 + else begin + if View.Window is TSpTBXPopupWindow then + CurrentSkin.GetMenuItemMargins(Canvas, TSpTBXPopupWindow(View.Window).MaximumImageSize.cx, MarginsInfo) + else + CurrentSkin.GetMenuItemMargins(Canvas, 0, MarginsInfo); + FIndent := MarginsInfo.GutterSize + MarginsInfo.ImageTextSpace + MarginsInfo.LeftCaptionMargin - 3; + end; + + FColCount := Item.ColCount; + FRowCount := Item.RowCount; + CalcCellSize(Canvas, W, H); + AWidth := FIndent + W * FColCount; + if not IsToolbarStyle then + Inc(AWidth, MarginsInfo.RightCaptionMargin); + AHeight := H * FRowCount; + if AWidth < 8 then AWidth := 8; + if AHeight < 8 then AHeight := 8; +end; + +procedure TSpTBXToolViewer.DoDrawHint(AHintBitmap: TBitmap; CursorPos: TPoint; + var CursorRect: TRect; var AHint: Widestring; var PaintDefault: Boolean); +var + Col, Row: Integer; +begin + if GetCellAt(CursorPos.X - BoundsRect.Left, CursorPos.Y - BoundsRect.Top, Col, Row) then begin + AHint := GetCellHint(Col, Row); + CursorRect := GetCellRect(CursorRect, Col, Row); + inherited DoDrawHint(AHintBitmap, CursorPos, CursorRect, AHint, PaintDefault); + end + else + PaintDefault := False; +end; + +procedure TSpTBXToolViewer.DrawCellImage(ACanvas: TCanvas; const ARect: TRect; + Col, Row: Integer; ItemInfo: TSpTBXMenuItemInfo); +var + I: Integer; + IL: TCustomImageList; +begin + if not Item.CustomImages then begin + I := GetImageIndex(Col, Row); + IL := Item.Images; + SpDrawImageList(ACanvas, ARect, IL, I, ItemInfo.Enabled, True); + end; + Item.DoDrawCellImage(ACanvas, ARect, Col, Row, ItemInfo); +end; + +procedure TSpTBXToolViewer.Entering; +begin + FHotCell := Point(-1, 0); + if (View is TSpTBXPopupWindowView) and Assigned(View.Selected) then begin + if View.Selected.Index > Index then begin + FHotCell := Point(FColCount - 1, FRowCount - 1); + while (FHotCell.X > 0) and not IsCellVisible(FHotCell) do + Dec(FHotCell.X); + end + else + if View.Selected.Index < Index then + FHotCell := Point(0, 0); + end; + inherited; +end; + +function TSpTBXToolViewer.GetCellAt(X, Y: Integer; out Col, Row: Integer): Boolean; +begin + if (FCellWidth = 0) or (FCellHeight = 0) then begin + Col := 0; + Row := 0; + end + else begin + Col := (X - FIndent) div FCellWidth; + Row := Y div FCellHeight; + end; + Result := (Col >= 0) and (Row >= 0) and (Col < FColCount) and (Row < FRowCount); +end; + +function TSpTBXToolViewer.GetCellHint(Col, Row: Integer): WideString; +begin + Result := ''; + Item.DoGetCellHint(Col, Row, Result); +end; + +function TSpTBXToolViewer.GetCellRect(ClientAreaRect: TRect; Col, Row: Integer): TRect; +begin + Result := Bounds(ClientAreaRect.Left + FIndent + Col * FCellWidth, ClientAreaRect.Top + Row * FCellHeight, FCellWidth, FCellHeight); +end; + +function TSpTBXToolViewer.GetImageIndex(Col, Row: Integer): Integer; +begin + Result := Col + Row * FColCount; +end; + +function TSpTBXToolViewer.GetImageShown: Boolean; +begin + Result := True; +end; + +function TSpTBXToolViewer.GetImageSize: TSize; +var + IL: TCustomImageList; +begin + if Item.CustomImages then + IL := nil + else + IL := Item.Images; + + if Assigned(IL) then begin + Result.cx := IL.Width; + Result.cy := IL.Height; + end + else begin + Result.cx := 12; + Result.cy := 12; + end; +end; + +function TSpTBXToolViewer.GetItem: TSpTBXCustomToolPalette; +var + TBItem: TTBCustomItem; +begin + TBItem := inherited Item; + if Assigned(TBItem) then + Result := TBItem as TSpTBXCustomToolPalette + else + Result := nil; +end; + +procedure TSpTBXToolViewer.InvalidateCell(ACol, ARow: Integer); +var + R: TRect; +begin + R := GetCellRect(BoundsRect, ACol, ARow); + InvalidateRect(View.Window.Handle, @R, False); +end; + +function TSpTBXToolViewer.IsCellVisible(Cell: TPoint): Boolean; +var + IL: TCustomImageList; +begin + Result := (Cell.X >= 0) and (Cell.Y >= 0) and (Cell.X < FColCount) and (Cell.Y < FRowCount); + if Result and not Item.CustomImages then begin + IL := Item.Images; + if Assigned(IL) then + Result := (Cell.X + Cell.Y * FColCount) < IL.Count; + end; +end; + +procedure TSpTBXToolViewer.KeyDown(var Key: Word; Shift: TShiftState); +var + OldPos, Pos: TPoint; +begin + if IsCellVisible(FHotCell) then + OldPos := FHotCell + else + if IsCellVisible(Item.SelectedCell) then + OldPos := Item.SelectedCell + else + OldPos.X := -1; + + if OldPos.X >= 0 then begin + Pos := OldPos; + case Key of + VK_LEFT: + begin + Dec(Pos.X); + if Pos.X < 0 then begin + Pos.X := FColCount - 1; + Dec(Pos.Y); + end; + end; + VK_UP: Dec(Pos.Y); + VK_RIGHT: + begin + Inc(Pos.X); + if Pos.X >= FColCount then + begin + Pos.X := 0; + Inc(Pos.Y); + end; + end; + VK_DOWN: Inc(Pos.Y); + VK_PRIOR: Pos.Y := 0; + VK_NEXT: Pos.Y := FRowCount - 1; + VK_HOME: Pos.X := 0; + VK_END: Pos.Y := FColCount - 1; + VK_RETURN: + if IsCellVisible(FHotCell) then begin + Item.HandleClickCell(FHotCell.X, FHotCell.Y); + Exit; + end; + else + inherited; + Exit; + end; + end + else begin + OldPos := Point(-1, 0); + Pos := Point(0, 0); + end; + + if ((OldPos.X <> Pos.X) or (OldPos.Y <> Pos.Y)) and IsCellVisible(Pos) then begin + Key := 0; + FHotCell := Pos; + Item.Change(False); + end; +end; + +procedure TSpTBXToolViewer.MouseDown(Shift: TShiftState; X, Y: Integer; + var MouseDownOnMenu: Boolean); +begin + FMouseIsDown := True; + MouseMove(X, Y); + inherited; + View.SetCapture; +end; + +procedure TSpTBXToolViewer.MouseMove(X, Y: Integer); +var + OldHotCell: TPoint; +begin + OldHotCell := FHotCell; + if not GetCellAt(X, Y, FHotCell.X, FHotCell.Y) then + FHotCell := Point(-1, 0); + + if (FHotCell.X <> OldHotCell.X) or (FHotCell.Y <> OldHotCell.Y) then + if Show and not IsRectEmpty(BoundsRect) {and not (Item is TTBControlItem)} then begin + Include(State, tbisInvalidated); + InvalidateCell(OldHotCell.X, OldHotCell.Y); + InvalidateCell(FHotCell.X, FHotCell.Y); + end; +end; + +procedure TSpTBXToolViewer.MouseUp(X, Y: Integer; MouseWasDownOnMenu: Boolean); +var + Col, Row: Integer; +begin + FMouseIsDown := False; + if GetCellAt(X, Y, Col, Row) then + Item.HandleClickCell(Col, Row); + View.EndModalWithClick(Self); + inherited; +end; + +procedure TSpTBXToolViewer.Paint(const Canvas: TCanvas; + const ClientAreaRect: TRect; IsSelected, IsPushed, + UseDisabledShadow: Boolean); +var + I, J: Integer; + ItemInfo: TSpTBXMenuItemInfo; + CellRect: TRect; + ItemHotTrack: Boolean; + ImageSize: TSize; +begin + CalcCellSize(Canvas, FCellWidth, FCellHeight); + + SpFillItemInfo(Canvas, Self, ItemInfo); + ItemInfo.ToolbarStyle := True; + ItemHotTrack := False; + if IsSelected then + if not ItemInfo.Enabled and not View.MouseOverSelected then ItemHotTrack := True + else if ItemInfo.Enabled then ItemHotTrack := True; + + for J := 0 to FRowCount - 1 do + for I := 0 to FColCount - 1 do + if IsCellVisible(Point(I, J)) then begin + ItemInfo.HotTrack := False; + ItemInfo.Pushed := False; + if ItemHotTrack and (FHotCell.X = I) and (FHotCell.Y = J) then begin + ItemInfo.HotTrack := True; + if IsPushed then ItemInfo.Pushed := True + end; + if (Item.SelectedCell.X = I) and (Item.SelectedCell.Y = J) then + ItemInfo.Checked := True + else + ItemInfo.Checked := False; + ItemInfo.State := CurrentSkin.GetState(ItemInfo.Enabled, ItemInfo.Pushed, ItemInfo.HotTrack, ItemInfo.Checked); + CellRect := GetCellRect(ClientAreaRect, I, J); + + // Paint the cell + SpDrawXPMenuItem(Canvas, CellRect, ItemInfo); + ImageSize := GetImageSize; + CellRect := SpCenterRect(CellRect, ImageSize.cx, ImageSize.cy); + DrawCellImage(Canvas, CellRect, I, J, ItemInfo); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXColorPalette } + +constructor TSpTBXColorPalette.Create(AOwner: TComponent); +begin + inherited; + CustomImages := True; + FCustomColors := False; + ColCount := CPDefaultCols; + RowCount := CPDefaultRows; // 40 Default Colors + Options := Options + [tboShowHint]; + FColor := clNone; +end; + +procedure TSpTBXColorPalette.DoChange; +begin + if SelectedCell.X >= 0 then + FColor := GetCellColor(SelectedCell.X, SelectedCell.Y); + inherited; +end; + +procedure TSpTBXColorPalette.DoDrawCellImage(ACanvas: TCanvas; + const ARect: TRect; ACol, ARow: Integer; ItemInfo: TSpTBXMenuItemInfo); +var + R: TRect; +begin + R := ARect; + ACanvas.Brush.Color := clBtnShadow; + ACanvas.FrameRect(R); + InflateRect(R, -1, -1); + if ItemInfo.Enabled then begin + ACanvas.Brush.Color := GetCellColor(ACol, ARow); + ACanvas.FillRect(R); + end; +end; + +procedure TSpTBXColorPalette.DoGetCellHint(ACol, ARow: Integer; var AHint: WideString); +var + C: TColor; +begin + GetCellInfo(ACol, ARow, C, AHint); +end; + +function TSpTBXColorPalette.FindCell(AColor: TColor): TPoint; +var + I, J: Integer; + C: TColor; +begin + if AColor <> clNone then + AColor := ColorToRGB(AColor); + for J := 0 to RowCount - 1 do + for I := 0 to ColCount - 1 do begin + C := GetCellColor(I, J); + if C <> clNone then + C := ColorToRGB(C); + if C = AColor then begin + Result.X := I; + Result.Y := J; + Exit; + end; + end; + Result.X := -1; + Result.Y := 0; +end; + +function TSpTBXColorPalette.GetCellColor(ACol, ARow: Integer): TColor; +var + W: WideString; +begin + GetCellInfo(ACol, ARow, Result, W); +end; + +procedure TSpTBXColorPalette.GetCellInfo(ACol, ARow: Integer; + out AColor: TColor; out AName: WideString); +var + I: Integer; +begin + AColor := clNone; + AName := ''; + if not FCustomColors then begin + I := ACol + ARow * ColCount; + if (I > -1) and (I < CPDefaultCols * CPDefaultRows) then begin + AColor := CPDefaultColors[I].Value; + AName := CPDefaultColors[I].Name; + end; + end; + + if Assigned(FOnGetColor) then FOnGetColor(Self, ACol, ARow, AColor, AName); +end; + +procedure TSpTBXColorPalette.SetColor(Value: TColor); +begin + FColor := Value; + SelectedCell := FindCell(Value); +end; + +procedure TSpTBXColorPalette.SetCustomColors(const Value: Boolean); +begin + if FCustomColors <> Value then begin + FCustomColors := Value; + if not Value then begin + RowCount := CPDefaultCols; + ColCount := CPDefaultRows; + end; + Change(True); + end; +end; + +procedure TSpTBXColorPalette.SetColCount(Value: TSpTBXRowColCount); +begin + if FCustomColors then + inherited SetColCount(Value) + else + inherited SetColCount(CPDefaultCols); +end; + +procedure TSpTBXColorPalette.SetRowCount(Value: TSpTBXRowColCount); +begin + if FCustomColors then + inherited SetRowCount(Value) + else + inherited SetRowCount(CPDefaultRows); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXItemCache } + +procedure TSpTBXItemCache.Assign(Source: TPersistent); +var + C: TSpTBXItemCache; +begin + if Source is TSpTBXItemCache then + begin + C := Source as TSpTBXItemCache; + Dock := C.Dock; + Item := C.Item; + Width := C.Width; + Height := C.Height; + ParentWidth := C.ParentWidth; + ParentHeight := C.ParentHeight; + end + else inherited Assign(Source); +end; + +function TSpTBXItemCache.GetName: TComponentName; +begin + if Assigned(FItem) then + Result := FItem.Name + else + Result := FName; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXItemCacheCollection } + +function TSpTBXItemCacheCollection.Add(AItem: TTBCustomItem): Integer; +var + F: TSpTBXItemCache; +begin + F := TSpTBXItemCache(inherited Add); + F.Item := AItem; + Result := F.Index; +end; + +function TSpTBXItemCacheCollection.GetItem(Index: Integer): TSpTBXItemCache; +begin + Result := TSpTBXItemCache(inherited Items[Index]); +end; + +function TSpTBXItemCacheCollection.IndexOf(AItem: TTBCustomItem): Integer; +var + I: Integer; +begin + Result := -1; + if Assigned(AItem) then + for I := 0 to Count - 1 do + if Items[I].Item = AItem then begin + Result := I; + Break; + end; +end; + +procedure TSpTBXItemCacheCollection.SetItem(Index: Integer; + const Value: TSpTBXItemCache); +begin + inherited Items[Index] := Value; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXDock } + +constructor TSpTBXDock.Create(AOwner: TComponent); +begin + inherited; + Color := clNone; + SkinManager.AddSkinNotification(Self); +end; + +destructor TSpTBXDock.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + inherited; +end; + +function TSpTBXDock.CanResize(var NewWidth, NewHeight: Integer): Boolean; +begin + FPrevWidth := Width; + FPrevHeight := Height; + Result := inherited CanResize(NewWidth, NewHeight); +end; + +procedure TSpTBXDock.DoDrawBackground(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawBackground) then FOnDrawBackground(Self, ACanvas, ARect, PaintStage, PaintDefault); +end; + +procedure TSpTBXDock.DrawBackground(DC: HDC; const DrawRect: TRect); +var + ACanvas: TCanvas; + PaintDefault: Boolean; +begin + // OnDrawBackground should be used to paint all the toolbars + dock, it is + // used by TSpTBXStatusBar and TSpTBXDockablePanel to paint the whole client + // area with custom painting. + // OnDrawBackground is triggered by the Dock and by the docked Toolbar. + if (csDestroying in ComponentState) then Exit; + + ACanvas := TCanvas.Create; + try + ACanvas.Handle := DC; + ACanvas.Lock; + + PaintDefault := True; + DoDrawBackground(ACanvas, DrawRect, pstPrePaint, PaintDefault); + if PaintDefault then begin + // Paint the Bitmap if it's assigned, or use the skin or the Color + if UsingBitmap then + inherited + else + if Color = clNone then + SpDrawXPDock(ACanvas, DrawRect, SkinManager.GetSkinType, Position in [dpLeft, dpRight]) + else begin + ACanvas.Brush.Color := Color; + ACanvas.FillRect(DrawRect); + end; + end; + + PaintDefault := True; + DoDrawBackground(ACanvas, DrawRect, pstPostPaint, PaintDefault); + finally + ACanvas.Unlock; + ACanvas.Handle := 0; + ACanvas.Free; + end; +end; + +procedure TSpTBXDock.Resize; +var + I, J: Integer; + ResizeToolbars: Boolean; + V: TTBItemViewer; + R: TRect; +begin + inherited Resize; + + // For anchored and right aligned items + if Position in [dpLeft, dpRight] then + ResizeToolbars := Height < FPrevHeight + else + ResizeToolbars := Width < FPrevWidth; + if ResizeToolbars then + for I := 0 to ToolbarCount - 1 do + if Toolbars[I] is TSpTBXToolbar then + TSpTBXToolbar(Toolbars[I]).Resize; + + // Invalidate the dock and the toolbars + for J := 0 to ToolbarCount - 1 do begin + Invalidate; + if Toolbars[J] is TSpTBXToolbar then begin + with TSpTBXToolbar(Toolbars[J]) do begin + // Invalidate Control Items + for I := 0 to View.ViewerCount - 1 do begin + V := View.Viewers[I]; + if V.Show and not IsRectEmpty(V.BoundsRect) and not (V.Item is TTBControlItem) then + View.Invalidate(V); + end; + // Invalidate Toolbar + Update; + if HandleAllocated then + RedrawWindow(Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE or RDW_ERASE); + // Invalidate Items + for I := 0 to View.ViewerCount - 1 do begin + V := View.Viewers[I]; + if V.Show and not IsRectEmpty(V.BoundsRect) and not (V.Item is TTBControlItem) then begin + R := V.BoundsRect; + ValidateRect(Handle, @R); + end; + end; + end; + end + else + if Toolbars[J] is TSpTBXCustomToolWindow then + with TSpTBXCustomToolWindow(Toolbars[J]) do begin + if HandleAllocated then + RedrawWindow(Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE or RDW_ERASE); + end; + end; +end; + +function TSpTBXDock.UsingBackground: Boolean; +begin + // UsingBackground is used by TTB2Dock to repaint the Dock and Toolbars + // To check if the Dock is using a Bitmap use SpIsDockUsingBitmap instead + Result := True; +end; + +function TSpTBXDock.UsingBitmap: Boolean; +begin + Result := SpIsDockUsingBitmap(Self); +end; + +procedure TSpTBXDock.WMEraseBkgnd(var Message: TWMEraseBkgnd); +begin + DrawBackground(Message.DC, ClientRect); + Message.Result := 1; +end; + +procedure TSpTBXDock.WMMove(var Message: TWMMove); +begin + FMoving := True; + inherited; + FMoving := False; +end; + +procedure TSpTBXDock.WMSize(var Message: TWMSize); +begin + FResizing := True; + inherited; + FResizing := False; +end; + +procedure TSpTBXDock.WMSpSkinChange(var Message: TMessage); +begin + Invalidate; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXToolbarView } + +constructor TSpTBXToolbarView.Create(AOwner: TComponent; AParentView: TTBView; + AParentItem: TTBCustomItem; AWindow: TWinControl; + AIsToolbar, ACustomizing, AUsePriorityList: Boolean); +begin + inherited; + FMaxSize := -1; +end; + +procedure TSpTBXToolbarView.DoUpdatePositions(var ASize: TPoint); +var + I, W, H: Integer; + CtlCanvas: TControlCanvas; +begin + // Find the tallest item size so we can stretch the items + // vertically (if Toolbar.Stretch is true) + FTallestItemSize := 0; + + if Assigned(Window) and Window.HandleAllocated and + (Window.ClientWidth > 0) and (Window.ClientHeight > 0) and + (ViewerCount > 2) and not IsUpdating then + begin + CtlCanvas := TControlCanvas.Create; + try + CtlCanvas.Control := Window; + for I := 0 to ViewerCount - 1 do begin + W := 0; + H := 0; + if TTBCustomItem(Viewers[I].Item).Visible then + if Viewers[I] is TSpTBXItemViewer then + TSpTBXItemViewer(Viewers[I]).InternalCalcSize(CtlCanvas, False, W, H) + else + TTBItemViewerAccess(Viewers[I]).CalcSize(CtlCanvas, W, H); + if Orientation = tbvoVertical then begin + if W > FTallestItemSize then FTallestItemSize := W; + end + else + if H > FTallestItemSize then FTallestItemSize := H; + end; + finally + CtlCanvas.Free; + end; + end; + + inherited DoUpdatePositions(ASize); +end; + +procedure TSpTBXToolbarView.BeginUpdate; +begin + Inc(FUpdating); + inherited BeginUpdate; +end; + +procedure TSpTBXToolbarView.EndUpdate; +begin + Dec(FUpdating); + inherited EndUpdate; + if FUpdating = 0 then + if Assigned(Owner) and (Owner is TSpTBXToolbar) then begin + TSpTBXToolbar(Owner).RightAlignItems; + TSpTBXToolbar(Owner).AnchorItems; + end; +end; + +function TSpTBXToolbarView.IsUpdating: Boolean; +begin + Result := FUpdating > 0; +end; + +procedure TSpTBXToolbarView.SetMaxSize(const Value: Integer); +begin + if FMaxSize <> Value then begin + FMaxSize := Value; + UpdatePositions; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXToolbar } + +constructor TSpTBXToolbar.Create(AOwner: TComponent); +begin + inherited; + ControlStyle := ControlStyle - [csOpaque]; + Color := clNone; + + Items.RegisterNotification(DoItemNotification); + FAnchoredControlItems := TSpTBXItemCacheCollection.Create(TSpTBXItemCache); + FChevronVertical := True; + FCustomizable := True; + FDefaultToolbarBorderSize := CDefaultToolbarBorderSize; + FDisplayMode := tbdmSelectiveCaption; + SkinManager.AddSkinNotification(Self); +end; + +destructor TSpTBXToolbar.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + Items.UnRegisterNotification(DoItemNotification); + FAnchoredControlItems.Free; + inherited; +end; + +procedure TSpTBXToolbar.CreateWindowHandle(const Params: TCreateParams); +begin + {$IFNDEF UNICODE} + CreateUnicodeHandle(Self, Params, ''); + {$ELSE} + inherited; + {$ENDIF} +end; + +procedure TSpTBXToolbar.DefineProperties(Filer: TFiler); +begin + inherited; + // Don't let the streaming system store the WideStrings, + // we need to store them manually + SpPersistent_AfterInherited_DefineProperties(Filer, Self); +end; + +procedure TSpTBXToolbar.DoDrawBackground(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawBackground) then FOnDrawBackground(Self, ACanvas, ARect, + PaintStage, PaintDefault); +end; + +procedure TSpTBXToolbar.DoItemClick(Item: TTBCustomItem; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + // Force OnClick event, by default tbisClicksTransparent Items doesn't get executed + if (Button = mbLeft) and Item.Enabled then + if (tbisClicksTransparent in TTBCustomItemAccess(Item).ItemStyle) then + if Assigned(Item.OnClick) then Item.OnClick(Item); +end; + +procedure TSpTBXToolbar.DoItemNotification(Ancestor: TTBCustomItem; + Relayed: Boolean; Action: TTBItemChangedAction; Index: Integer; + Item: TTBCustomItem); +var + I: Integer; +begin + if (csDestroying in ComponentState) or (csReading in ComponentState) then Exit; + + if not (tstResizing in FState) and not IsItemMoving then begin + if Assigned(FOnItemNotification) then FOnItemNotification(Self, Ancestor, Relayed, Action, Index, Item); + + case Action of + tbicInserted: + begin + RightAlignItems; + AnchorItems(True); + end; + tbicDeleting: + begin + I := FAnchoredControlItems.IndexOf(Item); + if I > -1 then + FAnchoredControlItems.Delete(I); + RightAlignItems; + AnchorItems(True); + end; + tbicInvalidateAndResize: + begin + RightAlignItems; + end; + end; + end; +end; + +procedure TSpTBXToolbar.Resize; +begin + FState := FState + [tstResizing]; + try + RightAlignItems; + AnchorItems; + finally + FState := FState - [tstResizing]; + end; + inherited; +end; + +procedure TSpTBXToolbar.AnchorItems(UpdateControlItems: Boolean); +var + I, J, UpdatedDelta: Integer; + SpIV: TSpTBXItemViewer; + Size: TPoint; + CI: TTBControlItem; + IV: TTBItemViewer; + IsRotated: Boolean; +begin + if (csDestroying in ComponentState) or + (tstAnchoring in FState) or not Assigned(CurrentDock) or + (CurrentDock.Width = 0) or (CurrentDock.Height = 0) or + not Stretch or (ShrinkMode <> tbsmNone) or IsUpdating then + Exit; + + FState := FState + [tstAnchoring]; + View.BeginUpdate; + try + View.ValidatePositions; + IsRotated := IsVertical; + // Adjust the delta, only used when inserting/deleting an item on the toolbar + UpdatedDelta := 0; + if (FLastSelectableWidth > 0) and UpdateControlItems then begin + IV := View.NextSelectable(nil, False); + if Assigned(IV) then + if IsRotated then + UpdatedDelta := FLastSelectableWidth - IV.BoundsRect.Bottom + else + UpdatedDelta := FLastSelectableWidth - IV.BoundsRect.Right; + end; + + // Calculate the Toolbar size + Size := Point(CurrentDock.Width, CurrentDock.Height); + + // Resize the anchored items + for I := 0 to View.ViewerCount - 1 do + if View.Viewers[I] is TSpTBXItemViewer then begin + SpIV := View.Viewers[I] as TSpTBXItemViewer; + if SpIV.Item.Anchored then begin + // Revalidate FAnchorSize and set FAnchorDelta + if (SpIV.FAnchorSize.X = 0) and (SpIV.FAnchorSize.Y = 0) then + SpIV.FAnchorSize := Size; + + // Adjust the delta, only used when inserting/deleting an item on + // the toolbar and resize + if IsRotated then begin + SpIV.FAnchorSize.Y := SpIV.FAnchorSize.Y - UpdatedDelta; + SpIV.FAnchorDelta := Size.Y - SpIV.FAnchorSize.Y; + end + else begin + SpIV.FAnchorSize.X := SpIV.FAnchorSize.X - UpdatedDelta; + SpIV.FAnchorDelta := Size.X - SpIV.FAnchorSize.X; + end; + end; + end + else begin + // Client align TTBControlItem items if the associated Control is client + // aligned or has akRight in its Anchors property. + CI := IsAnchoredControlItem(View.Viewers[I].Item); + J := FAnchoredControlItems.IndexOf(View.Viewers[I].Item); + if Assigned(CI) then begin + // Add the TTBControlItem item to the list if its not there + if J = -1 then begin + J := FAnchoredControlItems.Add(CI); + FAnchoredControlItems[J].Width := CI.Control.Width; + FAnchoredControlItems[J].Height := CI.Control.Height; + FAnchoredControlItems[J].ParentWidth := Size.X; + FAnchoredControlItems[J].ParentHeight := Size.Y; + FAnchoredControlItems[J].Dock := CurrentDock; + end; + // Resize + if FAnchoredControlItems[J].Dock = CurrentDock then begin + FAnchoredControlItems[J].Width := FAnchoredControlItems[J].Width + UpdatedDelta; + CI.Control.Width := FAnchoredControlItems[J].Width + (Size.X - FAnchoredControlItems[J].ParentWidth); + end; + end + else + // If ControlItem is not valid delete it from the list + if J > -1 then + FAnchoredControlItems.Delete(J); + end; + View.UpdatePositions; + finally + View.EndUpdate; + FState := FState - [tstAnchoring]; + end; + + // We can't calculate the delta based on the IV.BoundsRect because + // the IV is nil on tbicDeleting notification. + // We have to keep track of the sum of the selectable items width + IV := View.NextSelectable(nil, False); + if Assigned(IV) then begin + if IsRotated then + FLastSelectableWidth := IV.BoundsRect.Bottom + else + FLastSelectableWidth := IV.BoundsRect.Right; + end + else + FLastSelectableWidth := 0; +end; + +function TSpTBXToolbar.IsAnchoredControlItem(Item: TTBCustomItem): TTBControlItem; +var + CI: TTBControlItem; +begin + Result := nil; + if Assigned(CurrentDock) and (Item is TTBControlItem) then begin + CI := Item as TTBControlItem; + if Assigned(CI.Control) and + ((CI.Control.Align = alClient) or (akRight in CI.Control.Anchors)) then + begin + Result := CI; + end + else + Result := nil; + end; +end; + +procedure TSpTBXToolbar.RightAlignItems; +var + I, VisibleWidth, RightAlignedWidth: Integer; + Spacer: TSpTBXItemViewer; + IsRotated: Boolean; +begin + if (csDestroying in ComponentState) or (tstRightAligning in FState) or + not Assigned(CurrentDock) or (Items.Count <= 0) or + not Stretch or (ShrinkMode <> tbsmNone) or + ((CurrentDock.Width <= 0) and (CurrentDock.Height <= 0)) or IsUpdating then + Exit; + + FState := FState + [tstRightAligning]; + View.ValidatePositions; + View.BeginUpdate; + try + // Find the spacer and the right aligned items + IsRotated := IsVertical; + Spacer := SpGetRightAlignedItems(View, nil, IsRotated, VisibleWidth, RightAlignedWidth); + if Assigned(Spacer) then begin + // Resize the spacer + if IsRotated then + I := CurrentDock.Height - GetRightAlignMargin - (VisibleWidth - (Spacer.BoundsRect.Bottom - Spacer.BoundsRect.Top)) + else + I := CurrentDock.Width - GetRightAlignMargin - (VisibleWidth - (Spacer.BoundsRect.Right - Spacer.BoundsRect.Left)); + + if I < 0 then I := 0; + Spacer.Item.CustomWidth := I; + end; + View.UpdatePositions; + finally + View.EndUpdate; + FState := FState - [tstRightAligning]; + end; +end; + +function TSpTBXToolbar.GetChevronItemClass: TTBChevronItemClass; +begin + Result := TSpTBXChevronItem; +end; + +function TSpTBXToolbar.GetFloatingBorderSize: TPoint; +begin + if SkinManager.GetSkinType = sknSkin then + Result := Point(CurrentSkin.FloatingWindowBorderSize, CurrentSkin.FloatingWindowBorderSize) + else + Result := inherited GetFloatingBorderSize; +end; + +function TSpTBXToolbar.GetFloatingWindowParentClass: TTBFloatingWindowParentClass; +begin + Result := TSpTBXFloatingWindowParent; +end; + +function TSpTBXToolbar.GetRightAlignMargin: Integer; +begin + if IsVertical then + Result := NonClientHeight + else + Result := NonClientWidth; +end; + +function TSpTBXToolbar.GetViewClass: TTBToolbarViewClass; +begin + Result := TSpTBXToolbarView; +end; + +function TSpTBXToolbar.GetItemsTextColor(State: TSpTBXSkinStatesType): TColor; +begin + if vsMenuBar in View.Style then + Result := CurrentSkin.GetTextColor(skncMenuBarItem, State) + else + Result := CurrentSkin.GetTextColor(skncToolbarItem, State); +end; + +function TSpTBXToolbar.IsVertical: Boolean; +begin + Result := SpIsVerticalToolbar(Self); +end; + +procedure TSpTBXToolbar.InternalDrawBackground(ACanvas: TCanvas; ARect: TRect; + PaintOnNCArea: Boolean; PaintBorders: Boolean = True); +begin + SpDrawXPToolbar(Self, ACanvas, ARect, PaintOnNCArea, PaintBorders and (BorderStyle <> bsNone)); +end; + +procedure TSpTBXToolbar.DrawNCArea(const DrawToDC: Boolean; const ADC: HDC; + const Clip: HRGN); +var + DC: HDC; + R, ExcludeR: TRect; + GripSize: Integer; + ACanvas: TCanvas; +begin + if (csDestroying in ComponentState) or not Docked or not HandleAllocated then Exit; + + if not DrawToDC then DC := GetWindowDC(Handle) + else DC := ADC; + try + GetWindowRect(Handle, R); + OffsetRect(R, -R.Left, -R.Top); + GripSize := SpGetDragHandleSize(Self); + + if not DrawToDC then begin + SelectNCUpdateRgn(Handle, DC, Clip); + ExcludeR := R; + InflateRect(ExcludeR, -DefaultToolbarBorderSize, -DefaultToolbarBorderSize); + if IsVertical then + Inc(ExcludeR.Top, GripSize) + else + Inc(ExcludeR.Left, GripSize); + ExcludeClipRect(DC, ExcludeR.Left, ExcludeR.Top, ExcludeR.Right, ExcludeR.Bottom); + end; + + ACanvas := TCanvas.Create; + try + ACanvas.Handle := DC; + + // Paint the background and borders + InternalDrawBackground(ACanvas, R, True); + + // Paint the grip and close button + SpDrawXPToolbarGrip(Self, ACanvas, R); + finally + ACanvas.Handle := 0; + ACanvas.Free; + end; + finally + if not DrawToDC then ReleaseDC(Handle, DC); + end; +end; + +procedure TSpTBXToolbar.CMHintShow(var Message: TCMHintShow); +// Dispatch the message to the Item Viewer. +// TSpTBXItemViewer will handle CM_HINTSHOW message to show unicode hints using +// a custom THintWindow. +begin + with Message.HintInfo^ do begin + HintStr := ''; + if Assigned(View.Selected) then begin + CursorRect := View.Selected.BoundsRect; + HintStr := View.Selected.GetHintText; + View.Selected.Dispatch(Message); + end; + end; +end; + +procedure TSpTBXToolbar.CMControlChange(var Message: TCMControlChange); +begin + // When a control is dropped on the toolbar a TTBControlItem is created by + // TTBCustomToolbar.CreateWrapper, unfortunately it is created with the + // Self.Owner instead of the Form (Owner.Owner for CompoundToolbars like + // the TabToolbar or StatusToolbar). + + if CompoundToolbar and Message.Inserting and not(csLoading in ComponentState) and + not (csUpdating in ComponentState) then + begin + CreateWrapper(Items.Count, Message.Control); + end + else + inherited; +end; + +function TSpTBXToolbar.CreateWrapper(Index: Integer; Ctl: TControl): TTBControlItem; +// CreateWrapper is used only when CompoundToolbar is true, otherwise the +// wrapper is created by TB2K +var + I: Integer; + S: String; + C: TComponent; + ItemsInterface: ITBItems; +begin + Result := nil; + if SpFindControlItem(Items, Ctl) <> nil then Exit; + + C := Owner.Owner; // The Form + Result := TTBControlItem.Create(C); + Result.Control := Ctl; + if (csDesigning in ComponentState) and Assigned(C) then begin + { Needs a name for compatibility with form inheritance } + I := 1; + while True do begin + S := Format('TBControlItem%d', [I]); + if C.FindComponent(S) = nil then + Break; + Inc(I); + end; + Result.Name := S; + end; + + if CompoundToolbar then begin + if Assigned(Owner) and Owner.GetInterface(ITBItems, ItemsInterface) then begin + if Index > ItemsInterface.GetItems.Count then + Index := 0; + ItemsInterface.GetItems.Insert(Index, Result) + end; + end + else + Items.Insert(Index, Result); +end; + +procedure TSpTBXToolbar.CMDialogChar(var Message: TCMDialogChar); +var + I: Integer; +begin + if Enabled and Visible then + for I := 0 to Items.Count - 1 do + if Items[I] is TSpTBXCustomItem then + if TSpTBXCustomItem(Items[I]).DialogChar(Message.CharCode) then begin + Message.Result := 1; + Exit; + end; + inherited; +end; + +procedure TSpTBXToolbar.CMMouseleave(var Message: TMessage); +begin + inherited; + if IsCustomizing and FCustomizable then begin + // Clear the last DropMark + InvalidateRect(Handle, @FLastDropMark, True); + end; +end; + +procedure TSpTBXToolbar.CMTextChanged(var Message: TMessage); +begin + inherited; + if HandleAllocated then begin + if Floating then RedrawWindow(TSpTBXFloatingWindowParent(Parent).Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE) + else RedrawWindow(Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE) + end; +end; + +procedure TSpTBXToolbar.WMSpSkinChange(var Message: TMessage); +begin + if HandleAllocated and not Floating then + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_FRAME); +end; + +procedure TSpTBXToolbar.WMEraseBkgnd(var Message: TWMEraseBkgnd); +// Same as TSpTBXToolWindow.WMEraseBkgnd +var + ACanvas: TCanvas; + R: TRect; +begin + if (csDestroying in ComponentState) then Exit; + + Message.Result := 1; + ACanvas := TCanvas.Create; + ACanvas.Handle := Message.DC; + try + R := ClientRect; + if Docked then begin + InflateRect(R, DefaultToolbarBorderSize, DefaultToolbarBorderSize); + if IsVertical then + Dec(R.Top, SpGetDragHandleSize(Self)) + else + Dec(R.Left, SpGetDragHandleSize(Self)); + end; + + InternalDrawBackground(ACanvas, R, False); + finally + ACanvas.Handle := 0; + ACanvas.Free; + end; +end; + +procedure TSpTBXToolbar.WMSize(var Message: TWMSize); +var + I: Integer; + V: TTBItemViewer; + R: TRect; +begin + inherited; + + if Docked and ((CurrentDock is TSpTBXDock) and not TSpTBXDock(CurrentDock).FResizing) then begin + for I := 0 to View.ViewerCount - 1 do begin + V := View.Viewers[I]; + if V.Show and not IsRectEmpty(V.BoundsRect) and not (V.Item is TTBControlItem) then + View.Invalidate(V); + end; + Self.Update; + InvalidateRect(Handle, nil, True); + for I := 0 to View.ViewerCount - 1 do begin + V := View.Viewers[I]; + if V.Show and not IsRectEmpty(V.BoundsRect) and not (V.Item is TTBControlItem) then begin + R := V.BoundsRect; + ValidateRect(Handle, @R); + end; + end; + end; +end; + +{$IFNDEF UNICODE} +function TSpTBXToolbar.IsCaptionStored: Boolean; +begin + Result := TntControl_IsCaptionStored(Self); +end; + +function TSpTBXToolbar.GetCaption: TWideCaption; +begin + Result := TntControl_GetText(Self); +end; + +procedure TSpTBXToolbar.SetCaption(const Value: TWideCaption); +begin + TntControl_SetText(Self, Value); +end; + +function TSpTBXToolbar.GetHint: WideString; +begin + Result := TntControl_GetHint(Self); +end; + +procedure TSpTBXToolbar.SetHint(const Value: WideString); +begin + TntControl_SetHint(Self, Value); +end; +{$ENDIF} + +procedure TSpTBXToolbar.SetCustomizable(const Value: Boolean); +begin + if FCustomizable <> Value then begin + if FMenuBar then + FCustomizable := False + else + FCustomizable := Value; + end; +end; + +procedure TSpTBXToolbar.SetDisplayMode(const Value: TSpTBXToolbarDisplayMode); +begin + if FDisplayMode <> Value then begin + FDisplayMode := Value; + if Value = tbdmImageAboveCaption then + Options := Options + [tboImageAboveCaption, tboSameWidth] + else + Options := Options - [tboImageAboveCaption, tboSameWidth]; + View.UpdatePositions; + end; +end; + +function TSpTBXToolbar.GetMaxSize: Integer; +begin + if Assigned(View) then + Result := TSpTBXToolbarView(View).MaxSize + else + Result := -1; +end; + +procedure TSpTBXToolbar.SetMaxSize(const Value: Integer); +begin + if Assigned(View) then + TSpTBXToolbarView(View).MaxSize := Value; +end; + +procedure TSpTBXToolbar.SetMenuBar(const Value: Boolean); +begin + inherited MenuBar := Value; + FMenuBar := inherited MenuBar; + FCustomizable := not FMenuBar; +end; + +procedure TSpTBXToolbar.BeginUpdate; +begin + TSpTBXToolbarView(View).BeginUpdate; +end; + +procedure TSpTBXToolbar.EndUpdate; +begin + TSpTBXToolbarView(View).EndUpdate; +end; + +function TSpTBXToolbar.IsUpdating: Boolean; +begin + Result := TSpTBXToolbarView(View).IsUpdating; +end; + +procedure TSpTBXToolbar.BeginItemMove; +begin + Inc(FItemMovingCount); +end; + +procedure TSpTBXToolbar.EndItemMove; +begin + Dec(FItemMovingCount); + if FItemMovingCount < 0 then FItemMovingCount := 0; +end; + +function TSpTBXToolbar.IsItemMoving: Boolean; +begin + Result := FItemMovingCount > 0; +end; + +procedure TSpTBXToolbar.BeginCustomize; +begin + Inc(FCustomizingCount); +end; + +procedure TSpTBXToolbar.EndCustomize; +begin + Dec(FCustomizingCount); + if FCustomizingCount < 0 then FCustomizingCount := 0; +end; + +function TSpTBXToolbar.IsCustomizing: Boolean; +begin + Result := FCustomizingCount > 0; +end; + +function TSpTBXToolbar.CanDragCustomize(Button: TMouseButton; Shift: TShiftState; X, Y: Integer): Boolean; +var + IV: TTBItemViewer; +begin + Result := False; + FBeginDragIV := nil; + + if not (csDesigning in ComponentState) and IsCustomizing then begin + Result := True; + if FCustomizable then begin + IV := SpGetItemViewerFromPoint(Items, View, Point(X, Y)); + if Assigned(IV) and Assigned(IV.Item) and not (IV.Item is TTBChevronItem) then begin + FBeginDragIV := IV; + BeginDrag(True); + end; + end; + end; +end; + +function TSpTBXToolbar.CanItemClick(Item: TTBCustomItem; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer): Boolean; +begin + Result := True; +end; + +procedure TSpTBXToolbar.MouseMove(Shift: TShiftState; X, Y: Integer); +var + Item: TTBCustomItem; +begin + inherited; + + // Handle the Toolbar items hints + // Set the Toolbar.Hint to change the Application.Hint when the + // mouse is over the Item. + // From TB2Toolbar.MouseMove + if not (csDesigning in ComponentState) then begin + if Assigned(View.Selected) then begin + Item := View.Selected.Item; + if not (tboLongHintInMenuOnly in Item.EffectiveOptions) then + if Item is TSpTBXCustomItem then + Hint := TSpTBXCustomItem(Item).Hint + else + Hint := Item.Hint; + // Send MouseMove to the selected viewer (with TB2K MouseMove is only + // called when the modal handler is active, we need this on the toolbar + // for the tab close button) + if View.Selected is TSpTBXItemViewer then + TSpTBXItemViewer(View.Selected).InternalMouseMove(Shift, X, Y); + end; + end; +end; + +procedure TSpTBXToolbar.MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); +var + OldParent: TWinControl; + CurrentPos, OldPos: TPoint; + Item: TTBCustomItem; +begin + if not (csDesigning in ComponentState) and not CanDragCustomize(Button, Shift, X, Y) then begin + OldParent := Parent; + OldPos := ClientToScreen(Point(Left, Top)); + if Assigned(View.Selected) then + Item := View.Selected.Item + else + Item := nil; + + if CanItemClick(Item, Button, Shift, X, Y) then + inherited; + + // Check if the Parent was changed due to the toolbar moving between docks + if (Parent = OldParent) and Assigned(View.Selected) then begin + // Check if the toolbar was moved across the screen + CurrentPos := ClientToScreen(Point(Left, Top)); + if (CurrentPos.X = OldPos.X) and (CurrentPos.Y = OldPos.Y) then + DoItemClick(View.Selected.Item, Button, Shift, X, Y); // Extra click processing + end; + end; +end; + +procedure TSpTBXToolbar.DoStartDrag(var DragObject: TDragObject); +begin + if IsCustomizing and FCustomizable and Assigned(FBeginDragIV) and Assigned(FBeginDragIV.Item) then begin + // TSpTBXItemDragObject will be automatically destroyed since it's + // a descendant of TDragObjectEx. + // It's destroyed on Controls.DragDone + DragObject := TSpTBXItemDragObject.Create(Self, FBeginDragIV.Item); + inherited DoStartDrag(DragObject); + end; +end; + +procedure TSpTBXToolbar.DragOver(Source: TObject; X, Y: Integer; + State: TDragState; var Accept: Boolean); +var + DestIV: TTBItemViewer; + DestPos: Integer; + DropMark: TRect; +begin + inherited DragOver(Source, X, Y, State, Accept); + + if IsCustomizing and FCustomizable then begin + Accept := True; + SpGetDropPosItemViewer(Items, View, Point(X, Y), DestIV, DestPos, DropMark); + if not EqualRect(DropMark, FLastDropMark) then begin + // Clear the last DropMark + InvalidateRect(Handle, @FLastDropMark, True); + // Draw the new DropMark + SpDrawDropMark(Canvas, DropMark); + FLastDropMark := DropMark; + end; + end; +end; + +procedure TSpTBXToolbar.DragDrop(Source: TObject; X, Y: Integer); +var + D: TSpTBXItemDragObject; + DestIV: TTBItemViewer; + OrigItem: TTBCustomItem; + OrigPos, DestPos: Integer; + DropMark: TRect; +begin + if Assigned(Source) and (Source is TSpTBXItemDragObject) then begin + D := Source as TSpTBXItemDragObject; + OrigItem := D.SouceItem; + OrigPos := OrigItem.Parent.IndexOf(OrigItem); + + // Get the destination item position + if X < 0 then X := 0; + if Y < 0 then Y := 0; + SpGetDropPosItemViewer(Items, View, Point(X, Y), DestIV, DestPos, DropMark); + if OrigItem.Parent = Items then begin + if DestPos > OrigPos then + dec(DestPos); + if (OrigPos = DestPos) then begin + // Clear the last DropMark + InvalidateRect(Handle, @FLastDropMark, True); + Exit; + end; + end; + + if Assigned(DestIV) and (DestPos < 0) then Exit; + + // Insert the dragging item to the destination toolbar + OrigItem.Parent.Remove(OrigItem); + try + if Assigned(DestIV) then + Items.Insert(DestPos, OrigItem) + else + Items.Add(OrigItem); + + if OrigItem is TTBControlItem then + if D.SourceControl <> Self then + TTBControlItem(OrigItem).Control.Parent := Self; + + OrigItem.Visible := True; + FLastDropMark := Rect(0, 0, 0, 0); + except + OrigItem.Parent.Insert(OrigPos, OrigItem); + end; + end; + + inherited; +end; + +procedure TSpTBXToolbar.ReadPositionData(const Data: TTBReadPositionData); +begin + inherited; + with Data do + DisplayMode := TSpTBXToolbarDisplayMode(ReadIntProc(Name, rvSpTBXDisplayMode, 0, ExtraData)); +end; + +procedure TSpTBXToolbar.WritePositionData(const Data: TTBWritePositionData); +begin + inherited; + with Data do + WriteIntProc(Name, rvSpTBXDisplayMode, Integer(DisplayMode), ExtraData); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomToolWindow } + +constructor TSpTBXCustomToolWindow.Create(AOwner: TComponent); +begin + inherited; + FDefaultToolbarBorderSize := CDefaultToolbarBorderSize; + FMinClientWidth := 32; + FMinClientHeight := 32; + SetBounds(Left, Top, FMinClientWidth, FMinClientHeight); + + Color := clNone; + SkinManager.AddSkinNotification(Self); +end; + +destructor TSpTBXCustomToolWindow.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + inherited; +end; + +procedure TSpTBXCustomToolWindow.CreateWindowHandle(const Params: TCreateParams); +begin + {$IFNDEF UNICODE} + CreateUnicodeHandle(Self, Params, ''); + {$ELSE} + inherited; + {$ENDIF} +end; + +procedure TSpTBXCustomToolWindow.DefineProperties(Filer: TFiler); +begin + inherited; + // Don't let the streaming system store the WideStrings, + // we need to store them manually + SpPersistent_AfterInherited_DefineProperties(Filer, Self); +end; + +function TSpTBXCustomToolWindow.CalcSize(ADock: TTBDock): TPoint; +begin + Result.X := FBarSize.cx; + Result.Y := FBarSize.cy; + if Assigned(ADock) and (FullSize or Stretch) then begin + // If docked and stretching, return the minimum size so that the + // toolbar can shrink below FBarSize + if SpIsVerticalToolbar(Self) then + Result.Y := FMinClientHeight + else + Result.X := FMinClientWidth; + end; +end; + +function TSpTBXCustomToolWindow.DoArrange(CanMoveControls: Boolean; + PreviousDockType: TTBDockType; NewFloating: Boolean; NewDock: TTBDock): TPoint; +begin + Result := CalcSize(NewDock); +end; + +procedure TSpTBXCustomToolWindow.GetBaseSize(var ASize: TPoint); +begin + ASize := CalcSize(CurrentDock); +end; + +procedure TSpTBXCustomToolWindow.GetMinMaxSize(var AMinClientWidth, AMinClientHeight, + AMaxClientWidth, AMaxClientHeight: Integer); +begin + // GetMinMaxSize is used only when the window is floating + AMinClientWidth := FMinClientWidth; + AMinClientHeight := FMinClientHeight; + AMaxClientWidth := FMaxClientWidth; + AMaxClientHeight := FMaxClientHeight; +end; + +function TSpTBXCustomToolWindow.IsVertical: Boolean; +begin + Result := SpIsVerticalToolbar(Self); +end; + +procedure TSpTBXCustomToolWindow.SizeChanging(const AWidth, AHeight: Integer); +begin + FBarSize.cx := AWidth; + FBarSize.cy := AHeight; + if Assigned(Parent) then begin + Dec(FBarSize.cx, Width - ClientWidth); + Dec(FBarSize.cy, Height - ClientHeight); + end; +end; + +procedure TSpTBXCustomToolWindow.SetClientAreaSize(AWidth, AHeight: Integer); +var + R: TRect; +begin + if Assigned(Parent) then begin + Windows.GetClientRect(Handle, R); + SetBounds(Left, Top, Width - R.Right + AWidth, Height - R.Bottom + AHeight); + end + else + SetBounds(Left, Top, AWidth, AHeight); +end; + +procedure TSpTBXCustomToolWindow.Paint; +var + R: TRect; +begin + // Dotted border in design mode + if csDesigning in ComponentState then begin + R := ClientRect; + Canvas.Pen.Style := psDot; + Canvas.Pen.Color := clBtnShadow; + Canvas.Brush.Style := bsClear; + Canvas.Rectangle(R.Left, R.Top, R.Right, R.Bottom); + Canvas.Pen.Style := psSolid; + end; +end; + +procedure TSpTBXCustomToolWindow.InternalDrawBackground(ACanvas: TCanvas; + ARect: TRect; PaintOnNCArea, PaintBorders: Boolean); +begin + SpDrawXPToolbar(Self, ACanvas, ARect, PaintOnNCArea, PaintBorders and (BorderStyle <> bsNone)); +end; + +procedure TSpTBXCustomToolWindow.InvalidateBackground(InvalidateChildren: Boolean); +begin + // Force background repaint + if not (csDestroying in ComponentState) and HandleAllocated then + if InvalidateChildren then + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN) + else + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE); +end; + +procedure TSpTBXCustomToolWindow.DrawNCArea(const DrawToDC: Boolean; + const ADC: HDC; const Clip: HRGN); +var + DC: HDC; + R, ExcludeR: TRect; + GripSize: Integer; + ACanvas: TCanvas; +begin + if (csDestroying in ComponentState) or not Docked or not HandleAllocated then Exit; + + if not DrawToDC then DC := GetWindowDC(Handle) + else DC := ADC; + try + GetWindowRect(Handle, R); + OffsetRect(R, -R.Left, -R.Top); + GripSize := SpGetDragHandleSize(Self); + + if not DrawToDC then begin + SelectNCUpdateRgn(Handle, DC, Clip); + ExcludeR := R; + InflateRect(ExcludeR, -DefaultToolbarBorderSize, -DefaultToolbarBorderSize); + if IsVertical then + Inc(ExcludeR.Top, GripSize) + else + Inc(ExcludeR.Left, GripSize); + ExcludeClipRect(DC, ExcludeR.Left, ExcludeR.Top, ExcludeR.Right, ExcludeR.Bottom); + end; + + ACanvas := TCanvas.Create; + try + ACanvas.Handle := DC; + + // Paint the background and borders + InternalDrawBackground(ACanvas, R, True); + + // Paint the grip and close button + SpDrawXPToolbarGrip(Self, ACanvas, R); + finally + ACanvas.Handle := 0; + ACanvas.Free; + end; + finally + if not DrawToDC then ReleaseDC(Handle, DC); + end; +end; + +procedure TSpTBXCustomToolWindow.DoDrawBackground(ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawBackground) then FOnDrawBackground(Self, ACanvas, ARect, PaintStage, PaintDefault); +end; + +procedure TSpTBXCustomToolWindow.ReadPositionData(const Data: TTBReadPositionData); +var + W, H: Integer; +begin + inherited; + // Load ClientAreaWidth/ClientAreaHeight + if Resizable then + with Data do begin + W := ReadIntProc(Name, rvClientWidth, FBarSize.cx, ExtraData); + H := ReadIntProc(Name, rvClientHeight, FBarSize.cy, ExtraData); + SetClientAreaSize(W, H); + end; +end; + +procedure TSpTBXCustomToolWindow.WritePositionData(const Data: TTBWritePositionData); +begin + inherited; + // Save ClientAreaWidth/ClientAreaHeight + with Data do begin + WriteIntProc(Name, rvClientWidth, ClientAreaWidth, ExtraData); + WriteIntProc(Name, rvClientHeight, ClientAreaHeight, ExtraData); + end; +end; + +function TSpTBXCustomToolWindow.GetFloatingBorderSize: TPoint; +begin + if SkinManager.GetSkinType = sknSkin then + Result := Point(CurrentSkin.FloatingWindowBorderSize, CurrentSkin.FloatingWindowBorderSize) + else + Result := inherited GetFloatingBorderSize; +end; + +function TSpTBXCustomToolWindow.GetFloatingWindowParentClass: TTBFloatingWindowParentClass; +begin + Result := TSpTBXFloatingWindowParent; +end; + +{$IFNDEF UNICODE} +function TSpTBXCustomToolWindow.IsCaptionStored: Boolean; +begin + Result := TntControl_IsCaptionStored(Self); +end; + +function TSpTBXCustomToolWindow.GetCaption: TWideCaption; +begin + Result := TntControl_GetText(Self); +end; + +procedure TSpTBXCustomToolWindow.SetCaption(const Value: TWideCaption); +begin + TntControl_SetText(Self, Value); +end; +{$ENDIF} + +function TSpTBXCustomToolWindow.GetClientAreaWidth: Integer; +begin + if Assigned(Parent) then Result := ClientWidth + else Result := Width; +end; + +procedure TSpTBXCustomToolWindow.SetClientAreaWidth(Value: Integer); +begin + SetClientAreaSize(Value, ClientAreaHeight); +end; + +function TSpTBXCustomToolWindow.GetClientAreaHeight: Integer; +begin + if Assigned(Parent) then Result := ClientHeight + else Result := Height; +end; + +procedure TSpTBXCustomToolWindow.SetClientAreaHeight(Value: Integer); +begin + SetClientAreaSize(ClientAreaWidth, Value); +end; + +procedure TSpTBXCustomToolWindow.CMTextChanged(var Message: TMessage); +begin + inherited; + if HandleAllocated then begin + if Floating then RedrawWindow(TSpTBXFloatingWindowParent(Parent).Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE) + else RedrawWindow(Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE) + end; +end; + +procedure TSpTBXCustomToolWindow.WMEraseBkgnd(var Message: TWMEraseBkgnd); +// Same as TSpTBXToolbar.WMEraseBkgnd +var + ACanvas: TCanvas; + R: TRect; +begin + if (csDestroying in ComponentState) then Exit; + + Message.Result := 1; + ACanvas := TCanvas.Create; + ACanvas.Handle := Message.DC; + try + R := ClientRect; + if Docked then begin + InflateRect(R, DefaultToolbarBorderSize, DefaultToolbarBorderSize); + if IsVertical then + Dec(R.Top, SpGetDragHandleSize(Self)) + else + Dec(R.Left, SpGetDragHandleSize(Self)); + end; + + InternalDrawBackground(ACanvas, R, False); + finally + ACanvas.Handle := 0; + ACanvas.Free; + end; +end; + +procedure TSpTBXCustomToolWindow.WMSpSkinChange(var Message: TMessage); +begin + if HandleAllocated and not Floating then + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_FRAME); +end; + +procedure TSpTBXCustomToolWindow.WMWindowPosChanged(var Message: TWMWindowPosChanged); +begin + inherited; + InvalidateBackground; + if (Message.WindowPos.flags and SWP_NOSIZE) = 0 then begin + Realign; + Update; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXFloatingWindowParent } + +constructor TSpTBXFloatingWindowParent.CreateNew(AOwner: TComponent; + Dummy: Integer); +begin + inherited; + ScreenSnap := True; + SkinManager.AddSkinNotification(Self); +end; + +procedure TSpTBXFloatingWindowParent.CreateWnd; +begin + inherited; + UpdateDwmNCSize; +end; + +destructor TSpTBXFloatingWindowParent.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + inherited; +end; + +procedure TSpTBXFloatingWindowParent.DrawNCArea(const DrawToDC: Boolean; + const ADC: HDC; const Clip: HRGN; RedrawWhat: TTBToolWindowNCRedrawWhat); +const + Pattern: array [0..15] of Byte = ($C6, 0, $EE, 0, $7C, 0, $38, 0, $7C, 0, $EE, 0, $C6, 0, 0, 0); +var + DC: HDC; + R, CaptionR, CloseR: TRect; + ACanvas: TCanvas; + DockWindow: TTBCustomDockableWindowAccess; + FloatingBorderSize: TPoint; + WideCaption: WideString; + IsActive: Boolean; + Flags: Integer; + CloseButtonWidth: Integer; + SkinState: TSpTBXSkinStatesType; + PatternColor: TColor; +begin + if not HandleAllocated then Exit; + if not DrawToDC then DC := GetWindowDC(Handle) + else DC := ADC; + try + if not DrawToDC then SelectNCUpdateRgn(Handle, DC, Clip); + GetWindowRect(Handle, R); + OffsetRect(R, -R.Left, -R.Top); + with R do IntersectClipRect(DC, Left, Top, Right, Bottom); + ACanvas := TCanvas.Create; + try + ACanvas.Handle := DC; + ACanvas.Brush.Color := Color; // SpDrawXPTitleBarBody needs it to paint the background + GetWindowRect(Handle, R); + OffsetRect(R, -R.Left, -R.Top); + DockWindow := TTBCustomDockableWindowAccess(DockableWindow); + FloatingBorderSize := DockWindow.GetFloatingBorderSize; + IsActive := not DockWindow.InactiveCaption; + + // Borders + if twrdBorder in RedrawWhat then + SpDrawXPTitleBarBody(ACanvas, R, IsActive, FloatingBorderSize, False); + + // Caption + if DockWindow.ShowCaption then begin + R.Bottom := R.Top + FloatingBorderSize.Y + GetSystemMetrics(SM_CYSMCAPTION); + if SkinManager.GetSkinType = sknWindows then begin + if twrdBorder in RedrawWhat then + SpDrawXPTitleBar(ACanvas, R, IsActive, False); + InflateRect(R, -FloatingBorderSize.X, 0); + R.Top := R.Top + FloatingBorderSize.Y; + end + else begin + InflateRect(R, -FloatingBorderSize.X, 0); + R.Top := R.Top + FloatingBorderSize.Y; + if twrdBorder in RedrawWhat then + SpDrawXPTitleBar(ACanvas, R, IsActive, False); + end; + + // Text + if twrdCaption in RedrawWhat then begin + CaptionR := R; + OffsetRect(CaptionR, 2, 0); + if DockWindow.CloseButton then + Dec(CaptionR.Right, GetSystemMetrics(SM_CYSMCAPTION) + 2); + ACanvas.Brush.Style := bsClear; + try + ACanvas.Font.Assign(SmCaptionFont); + if IsActive then + ACanvas.Font.Color := CurrentSkin.GetTextColor(skncWindowTitleBar, sknsNormal) + else + ACanvas.Font.Color := CurrentSkin.GetTextColor(skncWindowTitleBar, sknsDisabled); + + if DockableWindow is TSpTBXToolbar then + WideCaption := TSpTBXToolbar(DockWindow).Caption + else + if DockableWindow is TSpTBXCustomToolWindow then + WideCaption := TSpTBXCustomToolWindow(DockWindow).Caption + else + WideCaption := ''; + SpDrawXPText(ACanvas, WideCaption, CaptionR, DT_SINGLELINE or DT_VCENTER or DT_END_ELLIPSIS or DT_HIDEPREFIX); + finally + ACanvas.Brush.Style := bsSolid; + end; + end; + + // Close button + if (twrdCloseButton in RedrawWhat) and DockWindow.CloseButton then begin + CloseR := R; + Dec(CloseR.Bottom); + CloseButtonWidth := (CloseR.Bottom - CloseR.Top) - 2 - 2; + CloseR.Left := CloseR.Right - CloseButtonWidth - 2; // TB2Dock.GetCloseButtonRect + CloseR.Right := CloseR.Left + CloseButtonWidth; + CloseR.Top := CloseR.Top + 2; + CloseR.Bottom := CloseR.Top + CloseButtonWidth; + + case SkinManager.GetSkinType of + sknNone: + begin + if CloseButtonDown then + DrawFrameControl(ACanvas.Handle, CloseR, DFC_CAPTION, DFCS_CAPTIONCLOSE or DFCS_PUSHED) + else + DrawFrameControl(ACanvas.Handle, CloseR, DFC_CAPTION, DFCS_CAPTIONCLOSE); + end; + sknWindows: + begin + if CloseButtonDown then Flags := CBS_PUSHED + else if FCloseButtonHover then Flags := CBS_HOT + else Flags := CBS_NORMAL; + DrawThemeBackground(ThemeServices.Theme[teWindow], ACanvas.Handle, WP_SMALLCLOSEBUTTON, Flags, CloseR, nil); + end; + sknSkin: + begin + SkinState := CurrentSkin.GetState(True, CloseButtonDown, FCloseButtonHover, False); + PatternColor := CurrentSkin.GetTextColor(skncWindowTitleBar, SkinState); + if PatternColor = clNone then + PatternColor := CurrentSkin.GetTextColor(skncToolbarItem, SkinState); + CurrentSkin.PaintBackground(ACanvas, CloseR, skncToolbarItem, SkinState, True, True); + SpDrawGlyphPattern(ACanvas, CloseR, 0, PatternColor); + end; + end; + end; + end; + finally + ACanvas.Handle := 0; + ACanvas.Free; + end; + finally + if not DrawToDC then ReleaseDC(Handle, DC); + end; +end; + +procedure TSpTBXFloatingWindowParent.RedrawCloseButton; +begin + if HandleAllocated and IsWindowVisible(Handle) then + if SkinManager.GetSkinType <> sknNone then + DrawNCArea(False, 0, 0, [twrdBorder, twrdCaption, twrdCloseButton]); +end; + +procedure TSpTBXFloatingWindowParent.UpdateDwmNCSize; +var + Style: Integer; +begin + if HandleAllocated then begin + // Make sure WS_THICKFRAME is setted only when Windows themes are used with + // DwmComposition, otherwise borders are incorrectly painted on Vista + Style := GetWindowLong(Handle, GWL_STYLE); + if SpIsDwmCompositionEnabled and (SkinManager.GetSkinType = sknWindows) then + Style := Style or WS_THICKFRAME + else + Style := Style and not WS_THICKFRAME; + SetWindowLong(Handle, GWL_STYLE, Style); + + // Update the NC area size, CurrentSkin.FloatingWindowBorderSize could have changed + // Make sure to resize the toolbar + SpRecalcNCArea(Self); + if Assigned(DockableWindow) then + TTBCustomDockableWindowAccess(DockableWindow).Arrange; + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_FRAME); + SpActivateDwmNC(Self, SkinManager.GetSkinType <> sknSkin); + end; +end; + +procedure TSpTBXFloatingWindowParent.CancelNCHover; +begin + if FCloseButtonHover then begin + FCloseButtonHover := False; + RedrawCloseButton; + end; +end; + +procedure TSpTBXFloatingWindowParent.VisibleChanging; +begin + inherited; + Caption := ''; +end; + +procedure TSpTBXFloatingWindowParent.CMMouseLeave(var Message: TMessage); +begin + inherited; + CancelNCHover; +end; + +procedure TSpTBXFloatingWindowParent.WMActivateApp(var Message: TWMActivateApp); +var + DockWindow: TTBCustomDockableWindowAccess; +begin + inherited; + + // The floating window is not repainted correctly if HideWhenInactive is + // false and the application is deactivated/activated. + if HandleAllocated then begin + DockWindow := TTBCustomDockableWindowAccess(DockableWindow); + if not DockWindow.HideWhenInactive then + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN); + end; +end; + +procedure TSpTBXFloatingWindowParent.WMClose(var Message: TWMClose); +begin + if FCloseOnAltF4 then begin + if Assigned(DockableWindow) then + TTBCustomDockableWindowAccess(DockableWindow).Close; + end + else + inherited; +end; + +procedure TSpTBXFloatingWindowParent.WMEraseBkgnd(var Message: TMessage); +begin + Message.Result := 1; +end; + +procedure TSpTBXFloatingWindowParent.WMNCMouseLeave(var Message: TMessage); +begin + if not MouseCapture then CancelNCHover; + inherited; +end; + +procedure TSpTBXFloatingWindowParent.WMNCMouseMove(var Message: TWMNCMouseMove); +var + InArea: Boolean; +begin + inherited; + { Note: TME_NONCLIENT was introduced in Windows 98 and 2000 } + if (Win32MajorVersion >= 5) or + (Win32MajorVersion = 4) and (Win32MinorVersion >= 10) then + CallTrackMouseEvent(Handle, TME_LEAVE or $10 {TME_NONCLIENT}); + InArea := Message.HitTest = 2001; {HT_TB2k_Close} + if FCloseButtonHover <> InArea then begin + FCloseButtonHover := InArea; + RedrawCloseButton; + end; +end; + +procedure TSpTBXFloatingWindowParent.WMSpSkinChange(var Message: TMessage); +begin + UpdateDwmNCSize; + inherited; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXPopupWindow } + +constructor TSpTBXPopupWindow.CreatePopupWindow(AOwner: TComponent; + const AParentView: TTBView; const AItem: TTBCustomItem; + const ACustomizing: Boolean); +begin + inherited; + if AItem is TSpTBXCustomItem then + if Assigned(View) and (View is TSpTBXPopupWindowView) then begin + if TSpTBXCustomItem(AItem).ToolbarStylePopup then + TSpTBXPopupWindowView(View).SetIsToolbar(True); + end; + + FMaximumImageSize := SpGetMenuMaximumImageSize(View); +end; + +destructor TSpTBXPopupWindow.Destroy; +begin + DoPopupShowingChanged(False); + + inherited; +end; + +procedure TSpTBXPopupWindow.DoPopupShowingChanged(IsVisible: Boolean); +begin + if View.ParentItem is TSpTBXCustomItem then + TSpTBXCustomItem(View.ParentItem).DoPopupShowingChanged(Self, IsVisible) + else + if View.ParentItem is TSpTBXRootItem then + TSpTBXRootItem(View.ParentItem).DoPopupShowingChanged(Self, IsVisible); +end; + +function TSpTBXPopupWindow.GetViewClass: TTBViewClass; +begin + Result := TSpTBXPopupWindowView; +end; + +function TSpTBXPopupWindow.CanDrawGutter: Boolean; +begin + if View.IsToolbar then + Result := False + else begin + Result := True; + // Is it a toolbox? + if Assigned(View) and Assigned(View.ParentItem) then begin + if View.ParentItem is TSpTBXCustomItem then + Result := not TSpTBXCustomItem(View.ParentItem).ToolBoxPopup + else + if View.ParentItem is TSpTBXRootItem then + Result := not TSpTBXRootItem(View.ParentItem).ToolBoxPopup; + end; + end; +end; + +procedure PopupWindowNCPaintProc(Wnd: HWND; DC: HDC; AppData: TObject); +// Paints the NC area and the client background, used by WMEraseBkgnd, WMNCPaint, WMPrint +var + ACanvas: TCanvas; + R: TRect; + PopupWindow: TSpTBXPopupWindow; +begin + ACanvas := TCanvas.Create; + try + ACanvas.Handle := DC; + GetWindowRect(Wnd, R); + OffsetRect(R, -R.Left, -R.Top); + + PopupWindow := TSpTBXPopupWindow(AppData); + // If it's used by WM_ERASEBKGND offset the rect + if PopupWindow.FPaintingClientArea then begin + PopupWindow.FPaintingClientArea := False; + OffsetRect(R, -3, -3); + end; + + PopupWindow.PaintBackground(ACanvas, R); + finally + ACanvas.Handle := 0; + ACanvas.Free; + end; +end; + +procedure TSpTBXPopupWindow.PaintBackground(ACanvas: TCanvas; ARect: TRect); +// Paints the NC area and the client background, used by WMEraseBkgnd, WMNCPaint, WMPrint +var + DrawGutter: Boolean; + OpenIVRect: TRect; + OpenIV: TTBItemViewer; + OpenIVSize: Integer; +begin + OpenIVRect := Rect(0, 0, 0, 0); + DrawGutter := False; + + if Assigned(View) then begin + ACanvas.Font.Assign(ToolbarFont); + DrawGutter := CanDrawGutter; + + if Assigned(View.ParentView) and CurrentSkin.OfficePopup then begin + OpenIV := TTBViewAccess(View.ParentView).OpenViewer; + if Assigned(OpenIV) and OpenIV.IsToolbarStyle and + ((OpenIV is TSpTBXItemViewer) or (OpenIV is TSpTBXChevronItemViewer)) then + begin + // Get the OpenIVRect in window coordinates + OpenIVRect := OpenIV.BoundsRect; + OpenIVRect.TopLeft := View.ParentView.Window.ClientToScreen(OpenIVRect.TopLeft); + OpenIVRect.BottomRight := View.ParentView.Window.ClientToScreen(OpenIVRect.BottomRight); + OpenIVRect.TopLeft := ScreenToClient(OpenIVRect.TopLeft); + OpenIVRect.BottomRight := ScreenToClient(OpenIVRect.BottomRight); + OffsetRect(OpenIVRect, 3, 3); // Offset to get it on window coordinates + OpenIVSize := OpenIVRect.Right - OpenIVRect.Left; + + // Get the Clip rect based on OpenIVRect + OpenIVRect.Left := OpenIVRect.Left + ARect.Left; // ARect.Left is -3 when called by WMEraseBkgnd and is 0 when called by WMNCPaint and WMPrint + OpenIVRect.Right := OpenIVRect.Left + OpenIVSize; + end; + end; + end; + + SpDrawXPMenuPopupWindow(ACanvas, ARect, OpenIVRect, DrawGutter, MaximumImageSize.cx, sknSkin); +end; + +procedure TSpTBXPopupWindow.CMHintShow(var Message: TCMHintShow); +// Dispatch the message to the Item Viewer. +// TSpTBXItemViewer will handle CM_HINTSHOW message to show unicode hints using +// a custom THintWindow. +begin + with Message.HintInfo^ do begin + HintStr := ''; + if Assigned(View.Selected) then begin + CursorRect := View.Selected.BoundsRect; + HintStr := View.Selected.GetHintText; + View.Selected.Dispatch(Message); + end; + end; +end; + +procedure TSpTBXPopupWindow.CMShowingchanged(var Message: TMessage); +const + ShowFlags: array[Boolean] of UINT = ( + SWP_NOSIZE or SWP_NOMOVE or SWP_NOZORDER or SWP_NOACTIVATE or SWP_HIDEWINDOW, + SWP_NOSIZE or SWP_NOMOVE or SWP_NOZORDER or SWP_NOACTIVATE or SWP_SHOWWINDOW); +var + HideEmptyPopup: Boolean; +begin + if View.ParentItem is TSpTBXSubmenuItem then + HideEmptyPopup := TSpTBXSubmenuItem(View.ParentItem).HideEmptyPopup + else + HideEmptyPopup := False; + + // When the View is empty the size is set to 0 on TSpTBXPopupWindowView.AutoSize + // We should disable the animation because it can't animate an empty window + if HideEmptyPopup and Showing and (View.ViewerCount = 0) then begin + SetWindowPos(WindowHandle, 0, 0, 0, 0, 0, ShowFlags[Showing]); + end + else + inherited; + + if Visible then + DoPopupShowingChanged(True); +end; + +procedure TSpTBXPopupWindow.WMEraseBkgnd(var Message: TWMEraseBkgnd); +begin + case SkinManager.GetSkinType of + sknNone: + inherited; + sknWindows: + // If it's Windows theme and we're not on Vista do default painting + if not SpIsWinVistaOrUp then + inherited + else begin + Message.Result := 1; + FPaintingClientArea := True; + TBEndAnimation(WindowHandle); + PopupWindowNCPaintProc(Handle, Message.DC, Self); + end; + sknSkin: + begin + Message.Result := 1; + FPaintingClientArea := True; + TBEndAnimation(WindowHandle); + PopupWindowNCPaintProc(Handle, Message.DC, Self); + end; + end; +end; + +procedure TSpTBXPopupWindow.WMNCPaint(var Message: TMessage); +var + DC: HDC; +begin + DC := GetWindowDC(Handle); + try + FPaintingClientArea := False; + SelectNCUpdateRgn(Handle, DC, HRGN(Message.WParam)); + PopupWindowNCPaintProc(Handle, DC, Self); + finally + ReleaseDC(Handle, DC); + end; +end; + +procedure TSpTBXPopupWindow.WMPrint(var Message: TMessage); +begin + FPaintingClientArea := False; + HandleWMPrint(Handle, Message, PopupWindowNCPaintProc, Self); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXPopupWindowView } + +procedure TSpTBXPopupWindowView.AutoSize(AWidth, AHeight: Integer); +begin + // When the View is empty the size should be 0 + if (ViewerCount = 0) and (ParentItem is TSpTBXSubmenuItem) then + if TSpTBXSubmenuItem(ParentItem).HideEmptyPopup then begin + AWidth := -(PopupMenuWindowNCSize * 2); + AHeight := -(PopupMenuWindowNCSize * 2); + end; + + inherited AutoSize(AWidth, AHeight); +end; + +procedure TSpTBXPopupWindowView.SetIsToolbar(const Value: Boolean); +begin + // Change the readonly IsToolbar property using RTTI, the property must + // be published. + // Tip from: http://hallvards.blogspot.com/2004/05/hack-1-write-access-to-read-only.html + PBoolean(Integer(Self) + (Integer(GetPropInfo(TSpTBXPopupWindowView, 'IsToolbar').GetProc) and $00FFFFFF))^ := Value; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXChevronItem } + +function TSpTBXChevronItem.GetItemViewerClass(AView: TTBView): TTBItemViewerClass; +begin + Result := TSpTBXChevronItemViewer; +end; + +function TSpTBXChevronItem.GetPopupWindowClass: TTBPopupWindowClass; +begin + Result := TSpTBXChevronPopupWindow; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXChevronItemViewer } + +function TSpTBXChevronItemViewer.GetTextColor(State: TSpTBXSkinStatesType): TColor; +begin + Result := clNone; + if IsToolbarStyle then begin + if View.Window is TSpTBXToolbar then + Result := TSpTBXToolbar(View.Window).GetItemsTextColor(State); + if Result = clNone then + Result := CurrentSkin.GetTextColor(skncToolbarItem, State); + end + else + Result := CurrentSkin.GetTextColor(skncMenuItem, State); +end; + +procedure TSpTBXChevronItemViewer.Paint(const Canvas: TCanvas; + const ClientAreaRect: TRect; IsSelected, IsPushed, + UseDisabledShadow: Boolean); +const + Pattern: array[Boolean, 0..15] of Byte = ( + ($CC, 0, $66, 0, $33, 0, $66, 0, $CC, 0, 0, 0, 0, 0, 0, 0), + ($88, 0, $D8, 0, $70, 0, $20, 0, $88, 0, $D8, 0, $70, 0, $20, 0)); +var + ItemInfo: TSpTBXMenuItemInfo; + R2: TRect; + P: PByte; + W, H: Integer; + DC: HDC; + PatternColor: TColor; +begin + DC := Canvas.Handle; + SpFillItemInfo(Canvas, Self, ItemInfo); + SpDrawXPMenuItem(Canvas, ClientAreaRect, ItemInfo); + + // Chevron glyph + R2 := ClientAreaRect; + if not ItemInfo.IsVertical then begin + Inc(R2.Top, 4); + R2.Bottom := R2.Top + 5; + W := 8; + H := 5; + end + else begin + R2.Left := R2.Right - 9; + R2.Right := R2.Left + 5; + W := 5; + H := 8; + end; + if ItemInfo.Pushed then OffsetRect(R2, 1, 1); + + if SkinManager.GetSkinType = sknSkin then + PatternColor := GetTextColor(ItemInfo.State) + else + PatternColor := clBtnText; + P := @Pattern[ItemInfo.IsVertical][0]; + if ItemInfo.Enabled then + SpDrawGlyphPattern(DC, R2, W, H, P^, PatternColor) + else begin + OffsetRect(R2, 1, 1); + SpDrawGlyphPattern(DC, R2, W, H, P^, clBtnHighlight); + OffsetRect(R2, -1, -1); + SpDrawGlyphPattern(DC, R2, W, H, P^, clBtnShadow); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXChevronPopupWindow } + +procedure TSpTBXChevronPopupWindow.CMColorChanged(var Message: TMessage); +var + V: TSpTBXPopupWindowView; + PV: TTBView; +begin + // The private FIsToolbar field of the ChevronItem is setted to True + // in TTBCustomItem.CreatePopup, we need to reset it to False before + // the Popup is showed. + // TTBCustomItem.CreatePopup changes the PopupWindow color to clBtnFace + // after it changes the FIsToolbar value (and before it is visible), + // that's why we are trapping CM_COLORCHANGED to reset the field. + + inherited; + if Assigned(View) and (View is TSpTBXPopupWindowView) then begin + V := TSpTBXPopupWindowView(View); + PV := V.ParentView; + // Do we really need to change it? + if (Color = clBtnFace) and V.IsToolbar and Assigned(PV) and + Assigned(PV.Owner) and (PV.Owner is TSpTBXToolbar) and + (TSpTBXToolbar(PV.Owner).ChevronVertical) then + begin + V.SetIsToolbar(False); + Color := clMenu; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXPopupMenu } + +function TSpTBXPopupMenu.GetOnClosePopup: TNotifyEvent; +begin + Result := TSpTBXRootItem(Items).OnClosePopup; +end; + +function TSpTBXPopupMenu.GetOnInitPopup: TSpTBXPopupEvent; +begin + Result := TSpTBXRootItem(Items).OnInitPopup; +end; + +function TSpTBXPopupMenu.GetRootItemClass: TTBRootItemClass; +begin + Result := TSpTBXRootItem; +end; + +function TSpTBXPopupMenu.InternalPopup(X, Y: Integer; ForceFocus: Boolean; + PopupControl: TControl = nil): Boolean; +var + P: TPoint; + PopupControlRect: TRect; + WinPopupControl: TWinControl; + Msg: TMessage; +begin + Result := True; + FClickedItem := nil; + P := Point(X, Y); + + {$IFDEF JR_D9} + SetPopupPoint(P); + {$ELSE} + PPoint(@PopupPoint)^ := P; + {$ENDIF} + + WinPopupControl := nil; + if Assigned(PopupControl) and Assigned(PopupControl.Parent) then begin + PopupControlRect := PopupControl.BoundsRect; + PopupControlRect.TopLeft := PopupControl.Parent.ClientToScreen(PopupControlRect.TopLeft); + PopupControlRect.BottomRight := PopupControl.Parent.ClientToScreen(PopupControlRect.BottomRight); + if PopupControl is TWinControl then + WinPopupControl := PopupControl as TWinControl; + end + else + PopupControlRect := Rect(X, Y, X, Y); + + P.X := PopupControlRect.Left; + P.Y := PopupControlRect.Bottom; + TSpTBXRootItem(Items).ToolBoxPopup := ToolBoxPopup; + FClickedItem := Items.Popup(P.X, P.Y, TrackButton = tbRightButton, + TTBPopupAlignment(Alignment), FReturnClickedItemOnly); + + if Assigned(WinPopupControl) then begin + // Send a message to the PopupControl and it's children controls + // to inform that the Popup is closed. + Msg.Msg := CM_SPPOPUPCLOSE; + Msg.WParam := Integer(Self); + Msg.LParam := 0; + Msg.Result := 0; + PostMessage(WinPopupControl.Handle, Msg.Msg, Msg.WParam, Msg.LParam); + WinPopupControl.Broadcast(Msg); + end; +end; + +procedure TSpTBXPopupMenu.Popup(X, Y: Integer); +begin + PopupEx(X, Y); +end; + +function TSpTBXPopupMenu.PopupEx(X, Y: Integer; PopupControl: TControl = nil; + ReturnClickedItemOnly: Boolean = False): TTBCustomItem; +begin + FReturnClickedItemOnly := ReturnClickedItemOnly; + try + InternalPopup(X, Y, False, PopupControl); + Result := FClickedItem; + finally + FReturnClickedItemOnly := False; + end; +end; + +procedure TSpTBXPopupMenu.SetOnClosePopup(const Value: TNotifyEvent); +begin + TSpTBXRootItem(Items).OnClosePopup := Value; +end; + +procedure TSpTBXPopupMenu.SetOnInitPopup(const Value: TSpTBXPopupEvent); +begin + TSpTBXRootItem(Items).OnInitPopup := Value; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCompoundItemsControl } + +constructor TSpTBXCompoundItemsControl.Create(AOwner: TComponent); +begin + inherited; + + FDock := GetDockClass.Create(Self); + FDock.Parent := Self; + FDock.OnRequestDock := DockRequestDock; + + FToolbar := GetToolbarClass.Create(Self); + FToolbar.CompoundToolbar := True; + FToolbar.Parent := FDock; + FToolbar.CurrentDock := FDock; + FToolbar.Name := Name + 'Toolbar'; + FToolbar.Customizable := False; + FToolbar.BorderStyle := bsNone; + FToolbar.DockMode := dmCannotFloatOrChangeDocks; + FToolbar.DragHandleStyle := dhNone; + FToolbar.Stretch := True; + FToolbar.ShrinkMode := tbsmNone; + FToolbar.ShowCaption := False; + + FSkinType := sknSkin; + SkinManager.AddSkinNotification(Self); +end; + +procedure TSpTBXCompoundItemsControl.CreateParams(var Params: TCreateParams); +begin + // Disable complete redraws when size changes. CS_HREDRAW and CS_VREDRAW + // cause flicker and are not necessary for this control at run time + // Invalidate in WMWindowPosChanged message instead. + inherited CreateParams(Params); + if not (csDesigning in ComponentState) then begin + with Params do + Style := Style or WS_CLIPCHILDREN; + with Params do + WindowClass.Style := WindowClass.Style and not (CS_HREDRAW or CS_VREDRAW); + end; +end; + +destructor TSpTBXCompoundItemsControl.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + FToolbar.Free; + FDock.Free; + inherited; +end; + +procedure TSpTBXCompoundItemsControl.Loaded; +var + I: Integer; + C: TControl; + DesignerRootItem: TTBCustomItem; +begin + inherited; + + // The parent of TTBControlItem.Control should be the toolbar, not Self + // (as setted in GetChildren for dfm streaming). + DesignerRootItem := GetItems; + for I := 0 to DesignerRootItem.Count - 1 do + if DesignerRootItem[I] is TTBControlItem then begin + C := TTBControlItem(DesignerRootItem[I]).Control; + if Assigned(C) and (C.Parent <> FToolbar) then + C.Parent := FToolbar; + end; +end; + +procedure TSpTBXCompoundItemsControl.DockRequestDock(Sender: TObject; + Bar: TTBCustomDockableWindow; var Accept: Boolean); +begin + if Assigned(FToolbar) then Accept := Bar = FToolbar; +end; + +procedure TSpTBXCompoundItemsControl.GetChildren(Proc: TGetChildProc; + Root: TComponent); +var + I: Integer; + C: TControl; + DesignerRootItem: TTBCustomItem; +begin + // Needed to fake the DFM streaming system because the owner of the items + // is the Form and not the Toolbar nor Self. + // But the parent must be the Toolbar. + // GetChildren is used to pass the children components of Self to the DFM + // streaming system. + // We also need to do the same with the controls of TTBControlItems. + // More info on the Delphi help or Classes.TWriter.WriteData + // Same as TSpTBXCompoundItemsControl and TSpTBXCustomDockablePanel + + DesignerRootItem := GetItems; + TTBCustomItemAccess(DesignerRootItem).GetChildren(Proc, Root); + for I := 0 to DesignerRootItem.Count - 1 do + if (DesignerRootItem[I] is TTBControlItem) then begin + C := TTBControlItem(DesignerRootItem[I]).Control; + if Assigned(C) then + if SpFindControl(Self, C) = -1 then Proc(C); + end; + inherited; +end; + +function TSpTBXCompoundItemsControl.GetItems: TTBCustomItem; +begin + Result := FToolbar.Items; +end; + +function TSpTBXCompoundItemsControl.GetRootItems: TTBRootItem; +begin + Result := FToolbar.Items; +end; + +function TSpTBXCompoundItemsControl.GetDockClass: TSpTBXDockClass; +begin + Result := TSpTBXDock; +end; + +function TSpTBXCompoundItemsControl.GetToolbarClass: TSpTBXToolbarClass; +begin + Result := TSpTBXToolbar; +end; + +function TSpTBXCompoundItemsControl.GetView: TSpTBXToolbarView; +begin + Result := FToolbar.View as TSpTBXToolbarView; +end; + +function TSpTBXCompoundItemsControl.GetImages: TCustomImageList; +begin + if Assigned(FToolbar) then + Result := FToolbar.Images + else + Result := nil; +end; + +procedure TSpTBXCompoundItemsControl.InvalidateBackground(InvalidateChildren: Boolean); +begin + // Invalidate will not fire WM_ERASEBKGND, because csOpaque is setted + if not (csDestroying in ComponentState) and HandleAllocated then + if InvalidateChildren then + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN) + else + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE); +end; + +procedure TSpTBXCompoundItemsControl.SetImages(const Value: TCustomImageList); +begin + if Assigned(FToolbar) then FToolbar.Images := Value; +end; + +procedure TSpTBXCompoundItemsControl.SetName(const Value: TComponentName); +begin + inherited; + if Name = Value then + if Assigned(FToolbar) then + FToolbar.Name := Name + 'Toolbar'; +end; + +procedure TSpTBXCompoundItemsControl.SetSkinType(const Value: TSpTBXSkinType); +begin + if FSkinType <> Value then begin + FSkinType := Value; + InvalidateBackground; + end; +end; + +procedure TSpTBXCompoundItemsControl.WMSpSkinChange(var Message: TMessage); +begin + InvalidateBackground; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCompoundBar } + +constructor TSpTBXCompoundBar.Create(AOwner: TComponent); +begin + inherited; + Height := FDock.Height; + FDock.OnDrawBackground := DrawDockBackground; + FDock.OnResize := DockResize; + FToolbar.OnDrawBackground := DrawToolbarBackground; +end; + +procedure TSpTBXCompoundBar.DockResize(Sender: TObject); +begin + if Assigned(FDock) then + if Height <> FDock.Height then + Height := FDock.Height; +end; + +procedure TSpTBXCompoundBar.DoDrawDockBackground(ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +begin + if Assigned(FOnDrawDockBackground) then FOnDrawDockBackground(Self, ACanvas, ARect, PaintStage, PaintDefault); +end; + +procedure TSpTBXCompoundBar.DrawDockBackground(Sender: TObject; + ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +var + InternalPaintDefault: Boolean; +begin + if PaintStage = pstPrePaint then begin + // OnDrawBackground is triggered by the Dock and by the docked Toolbar. + // The Toolbar triggers it only if Dock.ThemedBackground is true, which depends + // on CurrentTheme.PaintDockBackground, this is done in + // TTBXToolbar.WMEraseBkgnd. + ACanvas.Brush.Color := clBtnFace; + InternalPaintDefault := True; + DoDrawDockBackground(ACanvas, ARect, pstPrePaint, InternalPaintDefault); + PaintDefault := InternalPaintDefault; + InternalPaintDefault := True; + DoDrawDockBackground(ACanvas, ARect, pstPostPaint, InternalPaintDefault); + end; +end; + +procedure TSpTBXCompoundBar.DrawToolbarBackground(Sender: TObject; + ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +begin + // Let the background be painted by the Dock + if PaintStage = pstPrePaint then + PaintDefault := False; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXButtonOptions } + +constructor TSpTBXButtonOptions.Create(AParent: TWinControl); +begin + inherited Create; + + FToolbar := nil; + if AParent is TSpTBXCompoundItemsControl then + FToolbar := TSpTBXCompoundItemsControl(AParent).FToolbar; + FParentControl := AParent; + + FCaption := True; + FClose := True; + FMinimize := True; + FMaximize := True; + FCaptionImageIndex := -1; + FCloseImageIndex := -1; + FMinimizeImageIndex := -1; + FMaximizeImageIndex := -1; + FRestoreImageIndex := -1; + FTitleBarMaxSize := 21; + FButtonBorders := True; + CreateButtons; +end; + +procedure TSpTBXButtonOptions.CreateButtons; +begin + FRightAlignSpacer := TSpTBXRightAlignSpacerItem.Create(nil); + FRightAlignSpacer.FontSettings.Style := FRightAlignSpacer.FontSettings.Style + [fsBold]; + FRightAlignSpacer.Wrapping := twEndEllipsis; + FToolbar.Items.Add(FRightAlignSpacer); + + FEditableItems := TTBGroupItem.Create(nil); + FToolbar.Items.Add(FEditableItems); + + FMinimizeButton := TSpTBXItem.Create(nil); + SetupButton(FMinimizeButton); + FMinimizeButton.Visible := FMinimize; + + FMaximizeButton := TSpTBXItem.Create(nil); + SetupButton(FMaximizeButton); + FMaximizeButton.Visible := FMaximize; + + FCloseButton := TSpTBXItem.Create(nil); + SetupButton(FCloseButton); + FCloseButton.Visible := FClose; + + SetTitleBarMaxSize(FTitleBarMaxSize); +end; + +procedure TSpTBXButtonOptions.MoveItemToTheLeft(B: TTBCustomItem); +var + I: Integer; +begin + I := EditableItems.IndexOf(B); + if I > -1 then begin + EditableItems.Delete(I); + I := FToolbar.Items.IndexOf(RightAlignSpacer); + FToolbar.Items.Insert(I, B); + end; +end; + +procedure TSpTBXButtonOptions.SetupButton(B: TSpTBXCustomItem); +begin + B.CustomWidth := 17; + B.CustomHeight := FTitleBarMaxSize; + B.DisplayMode := nbdmImageAndText; + B.OnDrawImage := ButtonsDrawImage; + B.OnDrawItem := ButtonsDrawItem; + B.OnClick := ButtonsClick; + FToolbar.Items.Add(B); + B.Visible := False; + SetupButtonIcon(B); +end; + +procedure TSpTBXButtonOptions.SetupButtonIcon(B: TSpTBXCustomItem); +var + Index, GlyphIndex: Integer; +begin + if Assigned(B) then begin + Index := -1; + GlyphIndex := -1; + + if B = FRightAlignSpacer then begin + Index := FCaptionImageIndex; + end else + if B = FCloseButton then begin + Index := FCloseImageIndex; + GlyphIndex := 0; + end else + if B = FMaximizeButton then begin + if Restoring(B) then begin + Index := FRestoreImageIndex; + GlyphIndex := 3; + end + else begin + Index := FMaximizeImageIndex; + GlyphIndex := 1; + end; + end else + if B = FMinimizeButton then begin + if Restoring(B) then begin + Index := FRestoreImageIndex; + GlyphIndex := 3; + end + else begin + Index := FMinimizeImageIndex; + GlyphIndex := 2; + end; + end; + + if Index = -1 then begin + B.Images := MDIButtonsImgList; + B.ImageIndex := GlyphIndex; + end + else begin + B.Images := nil; + B.ImageIndex := Index; + end; + end; +end; + +procedure TSpTBXButtonOptions.UpdateButtonsVisibility; +begin + FRightAlignSpacer.Visible := FCaption or FClose or FMaximize or FMinimize; +end; + +procedure TSpTBXButtonOptions.ButtonsDrawImage(Sender: TObject; + ACanvas: TCanvas; State: TSpTBXSkinStatesType; + const PaintStage: TSpTBXPaintStage; var AImageList: TCustomImageList; + var AImageIndex: Integer; var ARect: TRect; var PaintDefault: Boolean); +begin + // Empty, useful for descendants +end; + +procedure TSpTBXButtonOptions.ButtonsDrawItem(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +begin + // [Theme-Change] + // Don't draw the items background if ButtonBorders is False + if (PaintStage = pstPrePaint) and not ButtonBorders then + PaintDefault := False; +end; + +procedure TSpTBXButtonOptions.SetCaptionLabel(const Value: WideString); +begin + if FCaptionLabel <> Value then begin + FCaptionLabel := Value; + if Assigned(FRightAlignSpacer) then + FRightAlignSpacer.Caption := Value; + end; +end; + +procedure TSpTBXButtonOptions.SetCaption(const Value: Boolean); +begin + FCaption := Value; + if Assigned(FRightAlignSpacer) then begin + if Value then + FRightAlignSpacer.Caption := CaptionLabel + else + FRightAlignSpacer.Caption := ''; + UpdateButtonsVisibility; + end; +end; + +procedure TSpTBXButtonOptions.SetClose(const Value: Boolean); +begin + FClose := Value; + if Assigned(FCloseButton) then begin + FCloseButton.Visible := Value; + UpdateButtonsVisibility; + end; +end; + +procedure TSpTBXButtonOptions.SetMaximize(const Value: Boolean); +begin + FMaximize := Value; + if Assigned(FMaximizeButton) then begin + FMaximizeButton.Visible := Value; + UpdateButtonsVisibility; + end; +end; + +procedure TSpTBXButtonOptions.SetMinimize(const Value: Boolean); +begin + FMinimize := Value; + if Assigned(FMinimizeButton) then begin + FMinimizeButton.Visible := Value; + UpdateButtonsVisibility; + end; +end; + +procedure TSpTBXButtonOptions.SetCaptionImageIndex(Value: Integer); +begin + if Value < 0 then Value := -1; + FCaptionImageIndex := Value; + if Assigned(FRightAlignSpacer) then SetupButtonIcon(FRightAlignSpacer); +end; + +procedure TSpTBXButtonOptions.SetCloseImageIndex(Value: Integer); +begin + if Value < 0 then Value := -1; + FCloseImageIndex := Value; + if Assigned(FCloseButton) then SetupButtonIcon(FCloseButton); +end; + +procedure TSpTBXButtonOptions.SetMinimizeImageIndex(Value: Integer); +begin + if Value < 0 then Value := -1; + FMinimizeImageIndex := Value; + if Assigned(FMinimizeButton) then SetupButtonIcon(FMinimizeButton); +end; + +procedure TSpTBXButtonOptions.SetMaximizeImageIndex(Value: Integer); +begin + if Value < 0 then Value := -1; + FMaximizeImageIndex := Value; + if Assigned(FMaximizeButton) then SetupButtonIcon(FMaximizeButton); +end; + +procedure TSpTBXButtonOptions.SetRestoreImageIndex(Value: Integer); +begin + if Value < 0 then Value := -1; + FRestoreImageIndex := Value; + SetupButtonIcon(FMinimizeButton); + SetupButtonIcon(FMaximizeButton); +end; + +procedure TSpTBXButtonOptions.SetTitleBarMaxSize(const Value: Integer); +begin + FTitleBarMaxSize := Value; + TSpTBXToolbarView(FToolbar.View).MaxSize := Value; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXStatusToolbar } + +constructor TSpTBXStatusToolbar.Create(AOwner: TComponent); +begin + inherited; + FSkinType := sknSkin; + FSizeGrip := True; +end; + +destructor TSpTBXStatusToolbar.Destroy; +begin + FParentForm := nil; + inherited; +end; + +procedure TSpTBXStatusToolbar.DoItemNotification(Ancestor: TTBCustomItem; + Relayed: Boolean; Action: TTBItemChangedAction; Index: Integer; + Item: TTBCustomItem); +begin + inherited; + + if not (csDestroying in ComponentState) and not (csReading in ComponentState) and + not (tstResizing in FState) and not IsItemMoving then + begin + if (Action = tbicInvalidateAndResize) and Assigned(Owner) and (Owner is TSpTBXCustomStatusBar) then + if NeedsSeparatorRepaint then + TSpTBXCustomStatusBar(Owner).InvalidateBackground; + end; +end; + +function TSpTBXStatusToolbar.GetParentFormWindowState: TWindowState; +// This method is more accurate than FParentForm.WindowState +var + R: TRect; +begin + if not Assigned(FParentForm) then + FParentForm := GetParentForm(Self); + Result := SpGetFormWindowState(FParentForm, R); +end; + +function TSpTBXStatusToolbar.IsPointInGrip(P: TPoint): Boolean; +var + GR: TRect; +begin + Result := False; + GR := GetGripRect; + if not IsRectEmpty(GR) and PtInRect(GR, P) then + Result := True; +end; + +function TSpTBXStatusToolbar.GetGripRect: TRect; +var + C: TWinControl; + FS: TWindowState; + HasGrip: Boolean; +begin + Result := Rect(0, 0, 0, 0); + if not (csDestroying in ComponentState) and FSizeGrip and Assigned(CurrentDock) then begin + FS := GetParentFormWindowState; // initializes FParentForm + if Assigned(FParentForm) and FParentForm.HandleAllocated then begin + C := SpFindParent(Self, TSpTBXTitleBar); + if Assigned(C) and TSpTBXTitleBar(C).Active and not TSpTBXTitleBar(C).FixedSize then + HasGrip := (FS = wsNormal) or not TSpTBXTitleBar(C).MouseActive + else + HasGrip := (FS = wsNormal) and (GetWindowLong(FParentForm.Handle, GWL_STYLE) and WS_THICKFRAME <> 0); + if HasGrip then begin + Result := CurrentDock.ClientRect; + Result.Left := Result.Right - GetSystemMetrics(SM_CXVSCROLL); + end; + end; + end; +end; + +function TSpTBXStatusToolbar.GetItemsTextColor(State: TSpTBXSkinStatesType): TColor; +begin + if Assigned(Owner) and (Owner is TSpTBXCustomStatusBar) then + Result := CurrentSkin.GetTextColor(skncStatusBar, State, TSpTBXCustomStatusBar(Owner).SkinType) + else + Result := clNone; +end; + +function TSpTBXStatusToolbar.GetRightAlignMargin: Integer; +var + R: TRect; +begin + R := GetGripRect; + Result := R.Right - R.Left; + if Result = 0 then + Result := 4; +end; + +function TSpTBXStatusToolbar.NeedsSeparatorRepaint: Boolean; +var + T: TSpTBXSkinType; +begin + // [Theme-Change] + // Office themes have rectangle panels, the separator needs + // to be painted by the Toolbar. + if Assigned(Owner) and (Owner is TSpTBXCustomStatusBar) then begin + T := TSpTBXCustomStatusBar(Owner).SkinType; + Result := (CurrentSkin.OfficeStatusBar and (T = sknSkin)) or (T = sknNone); + end + else + Result := False; +end; + +procedure TSpTBXStatusToolbar.SetSizeGrip(const Value: Boolean); +begin + if FSizeGrip <> Value then begin + FSizeGrip := Value; + if Assigned(Owner) and (Owner is TSpTBXStatusBar) then + TSpTBXStatusBar(Owner).InvalidateBackground; + end; +end; + +procedure TSpTBXStatusToolbar.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +var + P: TPoint; +begin + // Resize the StatusBar if the parent is TSpTBXTitleBar + if not (csDesigning in ComponentState) and (Button = mbLeft) and Assigned(FParentForm) then begin + P := Point(X, Y); + if IsPointInGrip(P) then begin + ReleaseCapture; + SendMessage(FParentForm.Handle, WM_SYSCOMMAND, $F008, 0); + Exit; + end; + end; + + inherited; +end; + +procedure TSpTBXStatusToolbar.WMNCLButtonDown(var Message: TWMNCLButtonDown); +var + P: TPoint; +begin + if not (csDesigning in ComponentState) and Assigned(FParentForm) then begin + P := ScreenToClient(SmallPointToPoint(TSmallPoint(GetMessagePos()))); + if IsPointInGrip(P) then begin + ReleaseCapture; + SendMessage(FParentForm.Handle, WM_SYSCOMMAND, $F008, 0); + Exit; + end; + end; + + inherited; +end; + +procedure TSpTBXStatusToolbar.WMSetCursor(var Message: TWMSetCursor); +var + P: TPoint; +begin + if not (csDesigning in ComponentState) and (Message.CursorWnd = Handle) and + (Screen.Cursor = crDefault) and Assigned(FParentForm) then + begin + GetCursorPos(P); + P := ScreenToClient(P); + if IsPointInGrip(P) then begin + Windows.SetCursor(Screen.Cursors[-8]); + Message.Result := 1; + Exit; + end; + end; + + inherited; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomStatusBar } + +constructor TSpTBXCustomStatusBar.Create(AOwner: TComponent); +begin + inherited; + Align := alBottom; +end; + +function TSpTBXCustomStatusBar.CanResize(var NewWidth, NewHeight: Integer): Boolean; +begin + if Assigned(FDock) and (NewHeight <> FDock.Height) then + Result := False + else + Result := inherited CanResize(NewWidth, NewHeight); +end; + +procedure TSpTBXCustomStatusBar.DoDrawDockBackground(ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +var + G: TRect; + OfficeSeparators: Boolean; +begin + inherited DoDrawDockBackground(ACanvas, ARect, PaintStage, PaintDefault); + if (PaintStage = pstPrePaint) and PaintDefault then begin + PaintDefault := False; + G := Toolbar.GetGripRect; + if not IsRectEmpty(G) then begin + // When it's called by the Toolbar the Gripper position should be corrected + if (ARect.Left = -2) and (ARect.Top = -2) then + OffsetRect(G, -2, -2); + end; + + OfficeSeparators := Toolbar.NeedsSeparatorRepaint; + SpDrawXPStatusBar(ACanvas, ARect, G, SkinType); + if OfficeSeparators then + DrawSeparators(ACanvas, ARect); + end; +end; + +procedure TSpTBXCustomStatusBar.DrawSeparators(ACanvas: TCanvas; ARect: TRect); +// Draws Office separators when the skin has OfficeStatusBar set to true +var + I: Integer; + IV: TTBItemViewer; + R: TRect; + SaveIndex: Integer; +begin + SaveIndex := SaveDC(ACanvas.Handle); + try + for I := 0 to FToolbar.View.ViewerCount - 1 do begin + IV := FToolbar.View.Viewers[I]; + if (IV is TSpTBXSeparatorItemViewer) and (not TSpTBXSeparatorItem(IV.Item).Blank) then begin + R := IV.BoundsRect; + if IsRectEmpty(R) then + Continue; + + OffsetRect(R, ARect.Left + 2, ARect.Top + 2); + R.Top := ARect.Top; + R.Bottom := ARect.Bottom; + R.Left := ((R.Right + R.Left) div 2) - 2; + R.Right := R.Left + 3; + + if SpTBXSkinType(FSkinType) = sknNone then begin + ACanvas.Brush.Color := clBtnFace; + ACanvas.FillRect(R); + SpDrawLine(ACanvas, R.Left, R.Top, R.Left, R.Bottom, clWindow); + SpDrawLine(ACanvas, R.Right, R.Top, R.Right, R.Bottom, clBtnShadow); + end + else begin + // For Office XP, when called by the Dock inc Top by 1 + if ARect.Top = 0 then Inc(R.Top); + SpDrawLine(ACanvas, R.Left, R.Top, R.Left, R.Bottom, clWindow); + SpDrawLine(ACanvas, R.Right, R.Top, R.Right, R.Bottom, clWindow); + ExcludeClipRect(ACanvas.Handle, R.Left, R.Top, R.Right, R.Bottom); + end; + end; + end; + + if SpTBXSkinType(FSkinType) = sknSkin then begin + Inc(ARect.Top); + ACanvas.Brush.Color := clWindow; + ACanvas.FrameRect(ARect); + end; + finally + RestoreDC(ACanvas.Handle, SaveIndex); + end; +end; + +function TSpTBXCustomStatusBar.GetStatusToolbar: TSpTBXStatusToolbar; +begin + Result := FToolbar as TSpTBXStatusToolbar; +end; + +function TSpTBXCustomStatusBar.GetToolbarClass: TSpTBXToolbarClass; +begin + Result := TSpTBXStatusToolbar; +end; + +function TSpTBXCustomStatusBar.GetSizeGrip: Boolean; +begin + Result := Toolbar.SizeGrip; +end; + +procedure TSpTBXCustomStatusBar.SetSizeGrip(const Value: Boolean); +begin + Toolbar.SizeGrip := Value; +end; + +procedure TSpTBXCustomStatusBar.WMEraseBkgnd(var Message: TWMEraseBkgnd); +begin + Message.Result := 1; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXTitleToolbar } + +function TSpTBXTitleToolbar.GetItemsTextColor(State: TSpTBXSkinStatesType): TColor; +begin + Result := CurrentSkin.GetTextColor(skncWindowTitleBar, State); +end; + +function TSpTBXTitleToolbar.GetRightAlignMargin: Integer; +var + TitleBar: TSpTBXCustomTitleBar; +begin + Result := inherited GetRightAlignMargin; + + TitleBar := GetTitleBar; + if Assigned(TitleBar) and (TitleBar.WindowState = wsMaximized) then + Result := 0; +end; + +function TSpTBXTitleToolbar.GetTitleBar: TSpTBXCustomTitleBar; +begin + Result := CurrentDock.Parent as TSpTBXCustomTitleBar; +end; + +procedure TSpTBXTitleToolbar.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +var + TransparentClick: Boolean; + F: TCustomForm; + TitleBar: TSpTBXCustomTitleBar; + P: TPoint; + IV: TTBItemViewer; +begin + // Move the Parent Form if the toolbar client area or an item with + // tbisClicksTransparent itemstyle is clicked (like a TBXLabelItem) + if not (csDesigning in ComponentState) then begin + TitleBar := GetTitleBar; + F := TitleBar.FParentForm; + if not Assigned(F) or not Assigned(TitleBar) then Exit; + if not TitleBar.IsActive then Exit; + + if Assigned(View.Selected) then + TransparentClick := tbisClicksTransparent in TTBCustomItemAccess(View.Selected.Item).ItemStyle + else + TransparentClick := True; + + case Button of + mbLeft: + if TransparentClick then begin + if ssDouble in Shift then begin + // Maximize or restore when double clicking the toolbar + if TitleBar.Options.Maximize and not TitleBar.FixedSize then + TitleBar.Options.MaximizeButton.Click; + end + else + if F.WindowState <> wsMaximized then begin + // Drag the form when dragging the toolbar + ReleaseCapture; + SendMessage(F.Handle, WM_SYSCOMMAND, $F012, 0); + end; + Exit; // Do not process transparent clicks + end + else + if (ssDouble in Shift) and TitleBar.Options.SystemMenu then begin + // Close the form when the system menu button is double clicked + IV := View.ViewerFromPoint(Point(X, Y)); + if Assigned(IV) and (IV.Item = TitleBar.Options.SystemButton) then begin + F.Close; + Exit; // Do not process transparent clicks + end; + end; + mbRight: + if TransparentClick and TitleBar.Options.SystemMenu then begin + P := ClientToScreen(Point(X, Y)); + TitleBar.Options.SystemButton.Popup(P.X, P.Y, True); + Exit; // Do not process transparent clicks + end; + end; + end; + + inherited; +end; + +procedure TSpTBXTitleToolbar.WMNCCalcSize(var Message: TWMNCCalcSize); +var + TitleBar: TSpTBXCustomTitleBar; +begin + inherited; + + FDefaultToolbarBorderSize := CDefaultToolbarBorderSize; + if Docked then begin + TitleBar := GetTitleBar; + if Assigned(TitleBar) and (TitleBar.WindowState = wsMaximized) then begin + InflateRect(Message.CalcSize_Params.rgrc[0], 2, 2); + FDefaultToolbarBorderSize := 0; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXTitleBarButtonOptions } + +constructor TSpTBXTitleBarButtonOptions.Create(AParent: TWinControl); +begin + FSystemMenu := True; + FTitleBar := AParent as TSpTBXCustomTitleBar; + inherited Create(AParent); +end; + +procedure TSpTBXTitleBarButtonOptions.CreateButtons; +begin + FSystemButton := TSpTBXSystemMenuItem.Create(nil); + SetupButton(FSystemButton); + FSystemButton.Visible := FSystemMenu; + + inherited; +end; + +procedure TSpTBXTitleBarButtonOptions.SetSystemMenu(const Value: Boolean); +begin + FSystemMenu := Value; + if Assigned(FSystemButton) then + FSystemButton.Visible := Value; +end; + +procedure TSpTBXTitleBarButtonOptions.ButtonsDrawItem(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +begin + inherited; + + // [Theme-Change] + // Don't draw the items background if ButtonBorders is False or Default theme is used + if (PaintStage = pstPrePaint) and (not ButtonBorders or SkinManager.IsDefaultSkin) then + PaintDefault := False; +end; + +procedure TSpTBXTitleBarButtonOptions.ButtonsClick(Sender: TObject); +begin + if not Assigned(FTitleBar.FParentForm) or not FTitleBar.IsActive then Exit; + + if Sender = FSystemButton then + FSystemButton.ShowSize := not FTitleBar.FixedSize + else + if Sender = FMinimizeButton then + FTitleBar.WindowState := wsMinimized + else + if Sender = FCloseButton then + FTitleBar.FParentForm.Close + else + if Sender = FMaximizeButton then begin + if FTitleBar.WindowState = wsNormal then + FTitleBar.WindowState := wsMaximized + else + FTitleBar.WindowState := wsNormal; + end; +end; + +function TSpTBXTitleBarButtonOptions.Restoring(B: TSpTBXCustomItem): Boolean; +begin + Result := False; + if (B = MaximizeButton) and (FTitleBar.WindowState = wsMaximized) then Result := True; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomTitleBar } + +constructor TSpTBXCustomTitleBar.Create(AOwner: TComponent); +begin + inherited; + + FActive := True; + FMouseActive := True; + ControlStyle := ControlStyle + [csAcceptsControls]; + + Align := alClient; + FDock.OnResize := nil; + + FParentForm := GetParentForm(Self); + FOptions := TSpTBXTitleBarButtonOptions.Create(Self); + FOptions.CaptionLabel := Caption; +end; + +destructor TSpTBXCustomTitleBar.Destroy; +begin + ChangeTitleBarState(False); + FOptions.Free; + + if Assigned(FParentForm) and Assigned(FOldParentFormWndProc) then begin + FParentForm.WindowProc := FOldParentFormWndProc; + FOldParentFormWndProc := nil; + end; + + if Assigned(Application) and Assigned(FNewAppWndProc) then begin + SetWindowLong(Application.Handle, GWL_WNDPROC, Longint(FOldAppWndProc)); + Classes.FreeObjectInstance(FNewAppWndProc); + FNewAppWndProc := nil; + end; + + inherited; +end; + +procedure TSpTBXCustomTitleBar.Loaded; +begin + inherited; + + // Subclass the ParentForm and Application for the System menu handling + if not (csDesigning in ComponentState) then begin + FParentForm := GetParentForm(Self); + // Hook the ParentForm + if Assigned(FParentForm) then begin + FOldParentFormWndProc := FParentForm.WindowProc; + FParentForm.WindowProc := NewParentFormWndProc; + end; + + // Hook the Application to trap the $0313 message, more info on AppWndProc + if not (csDesigning in ComponentState) and (Application.Handle <> 0) and + (Application.MainForm = nil) and (FOldAppWndProc = nil) then + begin + // When Application.MainForm asume FParentForm as the MainForm + FOldAppWndProc := Pointer(GetWindowLong(Application.Handle, GWL_WNDPROC)); + FNewAppWndProc := Classes.MakeObjectInstance(AppWndProc); + SetWindowLong(Application.Handle, GWL_WNDPROC, Longint(FNewAppWndProc)); + end; + + ChangeTitleBarState(Active); + end; +end; + +procedure TSpTBXCustomTitleBar.UpdateSkinMetrics; +begin + if HandleAllocated then begin + // Update the NC area size, CurrentSkin.FloatingWindowBorderSize could have changed + // Make sure to realign the toolbars + SpRecalcNCArea(Self); + Realign; + end; +end; + +procedure TSpTBXCustomTitleBar.AppWndProc(var Msg: TMessage); +var + SystemButtonP: TPoint; +begin + // Handle undocumented $0313 message, this is sent when the + // taskbar button of the application is right clicked. + // When Application.MainFormOnTaskbar = True (Delphi 2007 and above) + // the message is sent to the Main Form, otherwise it is sent + // to the Application. + // More info: + // http://delphi.about.com/od/vclwriteenhance/a/ttaskbarmenu.htm + if (Msg.Msg = $0313) and Assigned(FParentForm) and Assigned(Options) then begin + GetCursorPos(SystemButtonP); + FOptions.SystemButton.Popup(SystemButtonP.X, SystemButtonP.Y, True); + end + else + if Assigned(FOldAppWndProc) then + Msg.Result := CallWindowProc(FOldAppWndProc, Application.Handle, Msg.Msg, Msg.wParam, Msg.lParam); +end; + +procedure TSpTBXCustomTitleBar.NewParentFormWndProc(var Message: TMessage); +var + M: TWMSysCommand; + I: Integer; + HandleSpaceKey: Boolean; + + MMI: ^TMinMaxInfo; + MonitorBounds, WorkArea, TaskBarBounds: TRect; + TaskBarState, TaskBarEdge: Cardinal; + SystemButtonIV: TTBItemViewer; + SystemButtonP: TPoint; +begin + if not Assigned(FParentForm) then Exit; + + case Message.Msg of + $0313: + begin + // Handle undocumented $0313 message, this is sent when the + // taskbar button of the application is right clicked. + // When Application.MainFormOnTaskbar = True (Delphi 2007 and above) + // the message is sent to the Main Form, otherwise it is sent + // to the Application. + // More info: + // http://delphi.about.com/od/vclwriteenhance/a/ttaskbarmenu.htm + GetCursorPos(SystemButtonP); + FOptions.SystemButton.Popup(SystemButtonP.X, SystemButtonP.Y, True); + Exit; + end; + WM_GETMINMAXINFO: + if IsActive and not FFullScreenMaximize then begin + MMI := Pointer(Message.lParam); + WorkArea := GetRectOfMonitorContainingWindow(Handle, True); + MonitorBounds := GetRectOfMonitorContainingWindow(Handle, False); + + // Calculate the Max position and size + // http://news.jrsoftware.org/news/toolbar2000.thirdparty/msg13127.html + MMI^.ptMaxPosition.X := WorkArea.Left - MonitorBounds.Left; + MMI^.ptMaxPosition.Y := WorkArea.Top - MonitorBounds.Top; + MMI^.ptMaxSize.X := WorkArea.Right - WorkArea.Left; + MMI^.ptMaxSize.Y := WorkArea.Bottom - WorkArea.Top; + + // Reduce the Max Size if the TaskBar is AutoHidden + if SpGetTaskBar(TaskBarState, TaskBarEdge, TaskBarBounds) then begin + if (TaskBarState and ABS_AUTOHIDE) = ABS_AUTOHIDE then + case TaskBarEdge of + ABE_LEFT, ABE_RIGHT: MMI^.ptMaxSize.X := MMI^.ptMaxSize.X - 2; + ABE_TOP, ABE_BOTTOM: MMI^.ptMaxSize.Y := MMI^.ptMaxSize.Y - 2; + end; + end; + + // Max size during window resize, change the ParentForm constraints + // to make it work + if WindowState = wsMaximized then begin + MMI^.ptMaxTrackSize.X := MMI^.ptMaxSize.X; + MMI^.ptMaxTrackSize.Y := MMI^.ptMaxSize.Y; + FParentForm.Constraints.MaxWidth := MMI^.ptMaxSize.X; + FParentForm.Constraints.MaxHeight := MMI^.ptMaxSize.Y; + end + else begin + FParentForm.Constraints.MaxWidth := 0; + FParentForm.Constraints.MaxHeight := 0; + end; + + Message.Result := 0; + end; + WM_SYSCOMMAND: + if IsActive and Options.SystemMenu then begin + M := TWMSysCommand(Message); + if M.CmdType and $FFF0 = SC_KEYMENU then + case M.Key of + VK_SPACE: + begin + // Show the custom SysMenu + SystemButtonIV := FToolbar.View.Find(FOptions.SystemButton); + if Assigned(SystemButtonIV) then begin + SystemButtonP.X := SystemButtonIV.BoundsRect.Left; + SystemButtonP.Y := SystemButtonIV.BoundsRect.Bottom; + SystemButtonP := FToolbar.ClientToScreen(SystemButtonP); + FOptions.SystemButton.Popup(SystemButtonP.X, SystemButtonP.Y, True); + Message.Result := 1; + Exit; + end; + end; + 0: + if GetCapture = 0 then begin + // When only the Alt key is pressed and a few seconds latter the Space + // key is pressed the default SysMenu is showed, this only happens + // when there are no menubars on the form. + // In this case the WM_SYSCOMMAND is sent when the Alt key is + // pressed (Key = 0), but not when the space key is pressed. + // Apparently there's no way to override this, the only solution is to + // handle the Alt key press (Key = 0). + // + // Message log when Alt [...] Space is pressed: + // WM_SYSKEYDOWN: VK_MENU + // WM_SYSKEYUP: VK_MENU + // WM_SYSCOMMAND: Key = 0 + // WM_ENTERMENULOOP + // WM_INITMENU + // WM_KEYDOWN: VK_SPACE + // WM_CHAR: VK_SPACE + // WM_INITMENUPOPUP: system hmenu + + // If the form has a main menu VK_SPACE will be correctly handled + HandleSpaceKey := True; + if Assigned(FParentForm.Menu) then + HandleSpaceKey := False + else + if Toolbar.MenuBar then + HandleSpaceKey := False + else + for I := 0 to FParentForm.ComponentCount - 1 do + if FParentForm.Components[I] is TTBCustomToolbar then + if TTBCustomToolbar(FParentForm.Components[I]).MenuBar then begin + HandleSpaceKey := False; + Break; + end; + if HandleSpaceKey then begin + Message.Result := 1; + Exit; + end; + end; + end; + end; + end; + + // Default processing + if Assigned(FOldParentFormWndProc) then + FOldParentFormWndProc(Message); +end; + +procedure TSpTBXCustomTitleBar.ChangeTitleBarState(Activate: Boolean); +var + FloatingBorderSize: TPoint; + Style: Integer; + RestoreR: TRect; + WState: TWindowState; + OnParentFormShow: TNotifyEvent; +begin + FParentForm := GetParentForm(Self); + if Assigned(FParentForm) and (FParentForm.HandleAllocated) and ([csDesigning, csDestroying] * FParentForm.ComponentState = []) then begin + + if FMouseActive then begin + FloatingBorderSize := GetFloatingBorderSize; + + // Changing the BorderStyle of the form will recreate it, + // causing it to call Form.OnShow everytime Active is changed + // We need to disable the OnShow calling. + OnParentFormShow := TCustomFormAccess(FParentForm).OnShow; + TCustomFormAccess(FParentForm).OnShow := nil; + try + WState := SpGetFormWindowState(FParentForm, RestoreR); + + if Activate then begin + // Remove the border and titlebar from the form, and add the sysmenu + FParentForm.BorderStyle := bsNone; + Style := GetWindowLong(FParentForm.Handle, GWL_STYLE); + Style := Style or WS_SYSMENU; + SetWindowLong(FParentForm.Handle, GWL_STYLE, Style); + + // Resize the form to retain the same size before it was activated. + // This is needed to keep the designtime size + if (WState <> wsMaximized) and (TCustomFormAccess(FParentForm).FormStyle <> fsMDIChild) then begin + FParentForm.Height := FParentForm.Height - GetSystemMetrics(SM_CYCAPTION) - (FloatingBorderSize.Y * 2); + FParentForm.Width := FParentForm.Width - (FloatingBorderSize.X * 2); + end; + end + else begin + FParentForm.BorderStyle := bsSizeable; + + // Resize the form to retain the same size before it was deactivated. + // This is needed to keep the designtime size + if (WState <> wsMaximized) and (TCustomFormAccess(FParentForm).FormStyle <> fsMDIChild) then begin + FParentForm.Height := FParentForm.Height + GetSystemMetrics(SM_CYCAPTION) + (FloatingBorderSize.Y * 2); + FParentForm.Width := FParentForm.Width + (FloatingBorderSize.X * 2); + end; + end; + + // When Active is changed the Form is recreated, we have to + // reset the Restore size if the form is currently Maximized. + if WState = wsMaximized then + SpSetFormWindowState(FParentForm, WState, RestoreR); + + InvalidateBackground; + finally + TCustomFormAccess(FParentForm).OnShow := OnParentFormShow; + end; + end; + + FDock.Visible := FActive; + end; +end; + +procedure TSpTBXCustomTitleBar.AdjustClientRect(var Rect: TRect); +begin + inherited AdjustClientRect(Rect); + Rect := GetClientAreaRect; +end; + +procedure TSpTBXCustomTitleBar.DoDrawDockBackground(ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +var + FloatingBorderSize: TPoint; +begin + inherited DoDrawDockBackground(ACanvas, ARect, PaintStage, PaintDefault); + if (PaintStage = pstPrePaint) and PaintDefault then begin + PaintDefault := False; + + // [Theme-Change] + // On WindowsXP make sure we paint the titlebar on the NC area + // TSpTBXCustomTitleBar.WMEraseBkgnd and TSpTBXCustomTitleBar.DoDrawDockBackground handles this issue + if SkinManager.GetSkinType = sknWindows then begin + FloatingBorderSize := GetFloatingBorderSize; + InflateRect(ARect, FloatingBorderSize.X, FloatingBorderSize.Y); + end; + + SpDrawXPTitleBar(ACanvas, ARect, True); + end; +end; + +procedure TSpTBXCustomTitleBar.DoDrawBackground(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + if Assigned(FOnDrawBackground) then FOnDrawBackground(Self, ACanvas, ARect, PaintStage, PaintDefault); +end; + +function TSpTBXCustomTitleBar.GetClientAreaRect: TRect; +var + FloatingBorderSize: TPoint; +begin + Result := ClientRect; + if Active then begin + FloatingBorderSize := GetFloatingBorderSize; + if Assigned(FParentForm) then begin + if not FMouseActive or (FParentForm.WindowState <> wsMaximized) then + InflateRect(Result, -FloatingBorderSize.X, -FloatingBorderSize.Y); + end + else + InflateRect(Result, -FloatingBorderSize.X, -FloatingBorderSize.Y); + end; +end; + +function TSpTBXCustomTitleBar.GetFloatingBorderSize: TPoint; +begin + if SkinManager.GetSkinType = sknSkin then + Result := Point(CurrentSkin.FloatingWindowBorderSize, CurrentSkin.FloatingWindowBorderSize) + else begin + Result.X := GetSystemMetrics(SM_CXFRAME); + Result.Y := GetSystemMetrics(SM_CYFRAME); + end +end; + +function TSpTBXCustomTitleBar.GetItems: TTBCustomItem; +begin + // The ToolbarEditor designer will open the editable items and + // not the Toolbar.Items + Result := Options.EditableItems; +end; + +procedure TSpTBXCustomTitleBar.GetSizeCursor(MousePos: TPoint; var SizeCursor, + SizeCode: Integer); +var + R: TRect; + Pt, FloatingBorderSize: TPoint; +const + SC_SizeLeft = $F001; + SC_SizeRight = $F002; + SC_SizeUp = $F003; + SC_SizeUpLeft = $F004; + SC_SizeUpRight = $F005; + SC_SizeDown = $F006; + SC_SizeDownLeft = $F007; + SC_SizeDownRight = $F008; +begin + SizeCursor := 0; + SizeCode := 0; + + if not IsActive or (Assigned(FParentForm) and (FParentForm.WindowState = wsMaximized)) then Exit; + + R := ClientRect; + FloatingBorderSize := GetFloatingBorderSize; + InflateRect(R, -FloatingBorderSize.X, -FloatingBorderSize.Y); + Pt := MousePos; + if not PtInRect(R, Pt) then begin + if (Pt.X < 10) and (Pt.Y < 10) then SizeCode := SC_SizeUpLeft + else if (Pt.X > Width - 10) and (Pt.Y < 10) then SizeCode := SC_SizeUpRight + else if (Pt.X < 10) and (Pt.Y > Height - 10) then SizeCode := SC_SizeDownLeft + else if (Pt.X > Width - 10) and (Pt.Y > Height - 10) then SizeCode := SC_SizeDownRight + else if (Pt.X > 10) and (Pt.X < Width - 10) and (Pt.Y < 10) then SizeCode := SC_SizeUp + else if (Pt.X > 10) and (Pt.X < Width - 10) and (Pt.Y > Height - 10) then SizeCode := SC_SizeDown + else if (Pt.Y > 10) and (Pt.Y < Height - 10) and (Pt.X < 10) then SizeCode := SC_SizeLeft + else if (Pt.Y > 10) and (Pt.Y < Height - 10) and (Pt.X > Width - 10) then SizeCode := SC_SizeRight; + + case SizeCode of + SC_SizeLeft, SC_SizeRight: SizeCursor := -9; + SC_SizeUp, SC_SizeDown: SizeCursor := -7; + SC_SizeUpLeft, SC_SizeDownRight: SizeCursor := -8; + SC_SizeDownLeft, SC_SizeUpRight: SizeCursor := -6; + end; + end +end; + +function TSpTBXCustomTitleBar.GetToolbarClass: TSpTBXToolbarClass; +begin + Result := TSpTBXTitleToolbar; +end; + +function TSpTBXCustomTitleBar.GetWindowState: TWindowState; +begin + if Assigned(FParentForm) then + Result := FParentForm.WindowState + else + Result := wsNormal; +end; + +function TSpTBXCustomTitleBar.IsActive: Boolean; +begin + Result := FActive and FMouseActive; +end; + +procedure TSpTBXCustomTitleBar.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +var + Pt: TPoint; + SizeCursor, SizeCode: Integer; +begin + inherited; + if not FixedSize and (Button = mbLeft) then begin + Pt := Point(X, Y); + GetSizeCursor(Pt, SizeCursor, SizeCode); + if (SizeCode > 0) and Assigned(FParentForm) then begin + ReleaseCapture; + FParentForm.Perform(WM_SYSCOMMAND, SizeCode, 0); + end; + end; +end; + +procedure TSpTBXCustomTitleBar.SetActive(const Value: Boolean); +begin + if FActive <> Value then begin + FActive := Value; + ChangeTitleBarState(Value); + end; +end; + +procedure TSpTBXCustomTitleBar.SetFullScreenMaximize(const Value: Boolean); +begin + if FFullScreenMaximize <> Value then begin + FFullScreenMaximize := Value; + if IsActive and Assigned(FParentForm) and FParentForm.HandleAllocated then begin + FParentForm.Constraints.MaxWidth := 0; + FParentForm.Constraints.MaxHeight := 0; + if (WindowState = wsMaximized) and not (csDesigning in ComponentState) then + TCustomFormAccess(FParentForm).RecreateWnd; + end; + end; +end; + +procedure TSpTBXCustomTitleBar.SetMouseActive(const Value: Boolean); +begin + if FMouseActive <> Value then begin + FMouseActive := Value; + ChangeTitleBarState(Value); + end; +end; + +procedure TSpTBXCustomTitleBar.SetWindowState(const Value: TWindowState); +begin + if Assigned(FParentForm) then begin + case Value of + wsMinimized: + begin + // WindowState := wsMinimized will not minimize the app correctly + SendMessage(FParentForm.Handle, WM_SYSCOMMAND, SC_MINIMIZE, 0); + end; + wsMaximized, wsNormal: + FParentForm.WindowState := Value; + end; + end; +end; + +procedure TSpTBXCustomTitleBar.WMSpSkinChange(var Message: TMessage); +begin + UpdateSkinMetrics; + inherited; +end; + +procedure TSpTBXCustomTitleBar.CMTextChanged(var Message: TMessage); +begin + inherited; + if Assigned(FOptions) then + FOptions.CaptionLabel := Caption; +end; + +procedure TSpTBXCustomTitleBar.WMEraseBkgnd(var Message: TMessage); +var + ARect, DockAreaR: TRect; + FloatingBorderSize: TPoint; + Maximized, PaintDefault: Boolean; + B: TBitmap; +begin + Message.Result := 1; + if not DoubleBuffered or (Message.wParam = Message.lParam) then begin + B := TBitmap.Create; + try + ARect := GetClientRect; + B.Width := ARect.Right; + B.Height := ARect.Bottom; + B.Canvas.Brush.Color := Color; // SpDrawXPTitleBarBody needs it to paint the background + B.Canvas.FillRect(ARect); + + PaintDefault := True; + DoDrawBackground(B.Canvas, ARect, pstPrePaint, PaintDefault); + if PaintDefault then begin + Maximized := (WindowState = wsMaximized) and FMouseActive; + if Maximized then + InflateRect(ARect, 4, 4); + if Active then begin + FloatingBorderSize := GetFloatingBorderSize; + SpDrawXPTitleBarBody(B.Canvas, ARect, True, FloatingBorderSize); + + // [Theme-Change] + // On WindowsXP make sure we paint the titlebar on the NC area + // TSpTBXCustomTitleBar.WMEraseBkgnd and TSpTBXCustomTitleBar.DoDrawDockBackground handles this issue + if Assigned(FDock) and not Maximized and (SkinManager.GetSkinType = sknWindows) then begin + DockAreaR := ARect; + DockAreaR.Bottom := FDock.Height + FloatingBorderSize.Y; // don't multiply by 2 + SpDrawXPTitleBar(B.Canvas, DockAreaR, True); + end; + end; + end; + + PaintDefault := True; + DoDrawBackground(B.Canvas, ARect, pstPostPaint, PaintDefault); + + BitBlt(TWMEraseBkgnd(Message).DC, 0, 0, B.Width, B.Height, B.Canvas.Handle, 0, 0, SRCCOPY); + finally + B.Free; + end; + end; +end; + +procedure TSpTBXCustomTitleBar.WMSetCursor(var Message: TWMSetCursor); +var + P: TPoint; + SizeCursor, SizeCode: Integer; +begin + if not FixedSize and not (csDesigning in ComponentState) and + (Message.CursorWnd = Handle) and (Screen.Cursor = crDefault) then + begin + GetCursorPos(P); + P := ScreenToClient(P); + GetSizeCursor(P, SizeCursor, SizeCode); + if SizeCursor <> 0 then begin + Windows.SetCursor(Screen.Cursors[SizeCursor]); + Message.Result := 1; + end + else + inherited; + end + else + inherited; +end; + +procedure TSpTBXCustomTitleBar.WMWindowPosChanged(var Message: TWMWindowPosChanged); +begin + inherited; + InvalidateBackground(False); + if [csDesigning, csDestroying] * ComponentState = [] then begin + if FOptions.Maximize then + FOptions.SetupButtonIcon(FOptions.MaximizeButton); + // Hide the Toolbar if the Form is a MDI child and it's maximized + if Assigned(FParentForm) and (FParentForm.HandleAllocated) then begin + if (TCustomFormAccess(FParentForm).FormStyle = fsMDIChild) then + FDock.Visible := FParentForm.WindowState <> wsMaximized; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TBitmapHint } + +procedure TBitmapHint.ActivateHint(Rect: TRect; const AHint: string); +var + SaveActivating: Boolean; + // Detect Delphi 7 + {$IF CompilerVersion < 17} + MonitorR: TRect; + Delta: TPoint; + {$IFEND} +begin + // [Bugfix] Delphi 7 bug, D7 hints doesn't support multi-monitors + {$IF CompilerVersion < 17} + MonitorR := GetRectOfMonitorContainingPoint(Point(Rect.Left, Rect.Top), True); + Delta := Point(0, 0); + if (Rect.Left < MonitorR.Right) and (Rect.Right > MonitorR.Right) then + Delta.X := - (Rect.Right - MonitorR.Right); + if (Rect.Top < MonitorR.Bottom) and (Rect.Bottom > MonitorR.Bottom) then + Delta.Y := - (Rect.Bottom - MonitorR.Bottom); + OffsetRect(Rect, Delta.X, Delta.Y); + {$IFEND} + + SaveActivating := FActivating; + try + FActivating := True; + inherited ActivateHint(Rect, AHint); + finally + FActivating := SaveActivating; + end; +end; + +procedure TBitmapHint.ActivateHintData(Rect: TRect; const AHint: string; AData: Pointer); +begin + //The AData parameter is a bitmap + FHintBitmap := TBitmap(AData); + Rect.Right := Rect.Left + FHintBitmap.Width - 2; + Rect.Bottom := Rect.Top + FHintBitmap.Height - 2; + inherited ActivateHintData(Rect, AHint, AData); +end; + +procedure TBitmapHint.CMTextChanged(var Message: TMessage); +begin + Message.Result := 1; +end; + +procedure TBitmapHint.Paint; +begin + if Assigned(FHintBitmap) then + Canvas.Draw(0, 0, FHintBitmap); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Stock Objects } + +procedure InitializeStock; +var + NonClientMetrics: TNonClientMetrics; +begin + // Small caption font + SmCaptionFont := TFont.Create; + NonClientMetrics.cbSize := SizeOf(NonClientMetrics); + if SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, @NonClientMetrics, 0) then + SmCaptionFont.Handle := CreateFontIndirect(NonClientMetrics.lfSmCaptionFont); + + SpStockHintBitmap := TBitmap.Create; + + Screen.Cursors[crSpTBXNewHandPoint] := LoadCursor(0, IDC_HAND); + Screen.Cursors[crSpTBXCustomization] := LoadCursor(HInstance, 'CZMOVE'); + Screen.Cursors[crSpTBXCustomizationCancel] := LoadCursor(HInstance, 'CZCANCEL'); + + // Dummy ImageList, used by TSpTBXItemViewer and TSpTBXButtonOptions + MDIButtonsImgList := TImageList.Create(nil); +end; + +procedure FinalizeStock; +begin + FreeAndNil(SmCaptionFont); + FreeAndNil(SpStockHintBitmap); + FreeAndNil(MDIButtonsImgList); +end; + +initialization + InitializeStock; + +finalization + FinalizeStock; + +end. diff --git a/internal/2.4.4/1/Source/SpTBXMDIMRU.pas b/internal/2.4.4/1/Source/SpTBXMDIMRU.pas new file mode 100644 index 0000000..6fa3154 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXMDIMRU.pas @@ -0,0 +1,794 @@ +unit SpTBXMDIMRU; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +Development notes: + - All the theme changes and adjustments are marked with '[Theme-Change]'. + +History: +2 December 2009 - version 2.4.4 + - No changes. + +13 September 2009 - version 2.4.3 + - Fixed TSpTBXMRUListItem.LoadFromIni/SaveToIni bug, in Delphi + 2009, some strings are not stored correctly (Surrogate Pair), + thanks to Totonica for reporting this. + - Fixed incorrect TSpTBXMDIHandler MDI buttons painting when + using the default Windows theme, thanks to Cybrus for + reporting this. + +8 May 2009 - version 2.4.2 + - Fixed incorrect MRU saving on TSpTBXMRUListItem, the + items were not correctly encoded when saving to an Ini + file, thanks to Dirk for reporting this. + +15 March 2009 - version 2.4.1 + - No changes. + +17 January 2009 - version 2.4 + - Added GetMRUFilenames and MRUClick methods to + TSpTBXMRUListItem. + - Added Hints to the items of TSpTBXMRUListItem. + +26 September 2008 - version 2.3 + - No changes. + +29 July 2008 - version 2.2 + - No changes. + +26 June 2008 - version 2.1 + - No changes. + +3 May 2008 - version 2.0 + - No changes. + +2 April 2008 - version 1.9.5 + - Fixed incorrect MRU loading on TSpTBXMRUListItem, thanks + to Pete for reporting this. + - Fixed incorrect TSpTBXMRUListItem behavior, MaxItems + had no effect when new files were added, thanks to + Senfore for reporting this. + +3 February 2008 - version 1.9.4 + - Added HidePathExtension property to TSpTBXMRUListItem. + +19 January 2008 - version 1.9.3 + - Initial release. + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Menus, ImgList, IniFiles, TB2Item, TB2Toolbar, SpTBXSkins, SpTBXItem; + +type + TSpTBXMDIButtonsItem = class; + + TSpTBXMRUListClickEvent = procedure(Sender: TObject; const Filename: WideString) of object; + + { TSpTBXMDIHandler } + + TSpTBXMDIHandler = class(TComponent) + private + FButtonsItem: TSpTBXMDIButtonsItem; + FSystemMenuItem: TSpTBXSystemMenuItem; + FToolbar: TTBCustomToolbar; + procedure SetToolbar(Value: TTBCustomToolbar); + protected + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + property Toolbar: TTBCustomToolbar read FToolbar write SetToolbar; + end; + + { TSpTBXMDIButtonsItem: should only be used by TSpTBXMDIHandler } + + TSpTBXMDIButtonsItem = class(TTBCustomItem) + private + FMinimizeItem, FRestoreItem, FCloseItem: TSpTBXItem; + procedure DrawItem(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); + procedure DrawItemImage(Sender: TObject; ACanvas: TCanvas; + State: TSpTBXSkinStatesType; const PaintStage: TSpTBXPaintStage; + var AImageList: TCustomImageList; var AImageIndex: Integer; + var ARect: TRect; var PaintDefault: Boolean); + procedure InvalidateSystemMenuItem; + procedure ItemClick(Sender: TObject); + procedure UpdateState(W: HWND; Maximized: Boolean); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + { TSpTBXMDIWindowItem } + + TSpTBXMDIWindowItem = class(TTBCustomItem) + private + FForm: TForm; + FOnUpdate: TNotifyEvent; + FWindowMenu: TMenuItem; + procedure ItemClick(Sender: TObject); + procedure SetForm(AForm: TForm); + protected + procedure EnabledChanged; override; + procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + public + constructor Create(AOwner: TComponent); override; + procedure InitiateAction; override; + published + property Enabled; + property OnUpdate: TNotifyEvent read FOnUpdate write FOnUpdate; + end; + + { TSpTBXMRUListItem } + + TSpTBXMRUListItem = class(TTBCustomItem) + private + FMaxItems: Integer; + FOnClick: TSpTBXMRUListClickEvent; + FHidePathExtension: Boolean; + procedure ClickHandler(Sender: TObject); + procedure SetHidePathExtension(const Value: Boolean); + procedure SetMaxItems(const Value: Integer); + public + constructor Create(AOwner: TComponent); override; + procedure GetMRUFilenames(MRUFilenames: TStrings); + function IndexOfMRU(Filename: WideString): Integer; + function MRUAdd(Filename: WideString): Integer; + function MRUClick(Filename: WideString): Boolean; + procedure MRURemove(Filename: WideString); + procedure MRUUpdateCaptions; + procedure LoadFromIni(Ini: TCustomIniFile; const Section: string); + procedure SaveToIni(Ini: TCustomIniFile; const Section: string); + published + property HidePathExtension: Boolean read FHidePathExtension write SetHidePathExtension default True; + property MaxItems: Integer read FMaxItems write SetMaxItems default 4; + property OnClick: TSpTBXMRUListClickEvent read FOnClick write FOnClick; + end; + + { TSpTBXMRUItem: should only be used by TSpTBXMRUListItem } + + TSpTBXMRUItem = class(TSpTBXCustomItem) + private + FMRUString: WideString; + public + property MRUString: WideString read FMRUString write FMRUString; + end; + +implementation + +uses + Themes, UxTheme, + {$IFNDEF UNICODE} TntSysUtils, {$ENDIF} + TB2Common, TB2Consts; + +type + TTBCustomToolbarAccess = class(TTBCustomToolbar); + TTBCustomItemAccess = class(TTBCustomItem); + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXMDIHandler } + +constructor TSpTBXMDIHandler.Create(AOwner: TComponent); +begin + inherited; + FSystemMenuItem := TSpTBXSystemMenuItem.Create(Self); + FSystemMenuItem.MDISystemMenu := True; + FButtonsItem := TSpTBXMDIButtonsItem.Create(Self); +end; + +destructor TSpTBXMDIHandler.Destroy; +begin + SetToolbar(nil); + inherited; +end; + +procedure TSpTBXMDIHandler.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited; + if (AComponent = FToolbar) and (Operation = opRemove) then + Toolbar := nil; +end; + +procedure TSpTBXMDIHandler.SetToolbar(Value: TTBCustomToolbar); +var + Rebuild: Boolean; +begin + if FToolbar <> Value then begin + if Assigned(FToolbar) then begin + Rebuild := False; + if TTBCustomToolbarAccess(FToolbar).FMDIButtonsItem = FButtonsItem then begin + TTBCustomToolbarAccess(FToolbar).FMDIButtonsItem := nil; + Rebuild := True; + end; + if TTBCustomToolbarAccess(FToolbar).FMDISystemMenuItem = FSystemMenuItem then begin + TTBCustomToolbarAccess(FToolbar).FMDISystemMenuItem := nil; + Rebuild := True; + end; + if Rebuild and Assigned(FToolbar.View) then + FToolbar.View.RecreateAllViewers; + end; + FToolbar := Value; + if Assigned(Value) then begin + Value.FreeNotification(Self); + TTBCustomToolbarAccess(Value).FMDIButtonsItem := FButtonsItem; + TTBCustomToolbarAccess(Value).FMDISystemMenuItem := FSystemMenuItem; + Value.View.RecreateAllViewers; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXMDIButtonsItem } + +var + CBTHookHandle: HHOOK; + MDIButtonsItems: TList; + +function WindowIsMDIChild(W: HWND): Boolean; +var + I: Integer; + MainForm, ChildForm: TForm; +begin + MainForm := Application.MainForm; + if Assigned(MainForm) then + for I := 0 to MainForm.MDIChildCount-1 do begin + ChildForm := MainForm.MDIChildren[I]; + if ChildForm.HandleAllocated and (ChildForm.Handle = W) then begin + Result := True; + Exit; + end; + end; + Result := False; +end; + +function CBTHook(Code: Integer; WParam: WPARAM; LParam: LPARAM): LRESULT; +stdcall; +var + Maximizing: Boolean; + WindowPlacement: TWindowPlacement; + I: Integer; +begin + case Code of + HCBT_SETFOCUS: begin + if WindowIsMDIChild(HWND(WParam)) and Assigned(MDIButtonsItems) then begin + for I := 0 to MDIButtonsItems.Count-1 do + TSpTBXMDIButtonsItem(MDIButtonsItems[I]).InvalidateSystemMenuItem; + end; + end; + HCBT_MINMAX: begin + if WindowIsMDIChild(HWND(WParam)) and Assigned(MDIButtonsItems) and + (LParam in [SW_SHOWNORMAL, SW_SHOWMAXIMIZED, SW_MINIMIZE, SW_RESTORE]) then begin + Maximizing := (LParam = SW_MAXIMIZE); + if (LParam = SW_RESTORE) and not IsZoomed(HWND(WParam)) then begin + WindowPlacement.length := SizeOf(WindowPlacement); + GetWindowPlacement(HWND(WParam), @WindowPlacement); + Maximizing := (WindowPlacement.flags and WPF_RESTORETOMAXIMIZED <> 0); + end; + for I := 0 to MDIButtonsItems.Count-1 do + TSpTBXMDIButtonsItem(MDIButtonsItems[I]).UpdateState(HWND(WParam), Maximizing); + end; + end; + HCBT_DESTROYWND: begin + if WindowIsMDIChild(HWND(WParam)) and Assigned(MDIButtonsItems) then begin + for I := 0 to MDIButtonsItems.Count-1 do + TSpTBXMDIButtonsItem(MDIButtonsItems[I]).UpdateState(HWND(WParam), False); + end; + end; + end; + Result := CallNextHookEx(CBTHookHandle, Code, WParam, LParam); +end; + +constructor TSpTBXMDIButtonsItem.Create(AOwner: TComponent); + + function CreateItem(ImageIndex: Integer): TSpTBXItem; + var + A: TTBCustomItemAccess; + begin + Result := TSpTBXItem.Create(Self); + A := TTBCustomItemAccess(Result); + A.ItemStyle := A.ItemStyle + [tbisRightAlign]; + Result.Images := MDIButtonsImgList; + Result.ImageIndex := ImageIndex; + Result.CustomWidth := 17; + Result.OnClick := ItemClick; + Result.OnDrawItem := DrawItem; + Result.OnDrawImage := DrawItemImage; + end; + +begin + inherited; + ItemStyle := ItemStyle + [tbisEmbeddedGroup]; + + FMinimizeItem := CreateItem(2); + FRestoreItem := CreateItem(3); + FCloseItem := CreateItem(0); + + Add(FMinimizeItem); + Add(FRestoreItem); + Add(FCloseItem); + + UpdateState(0, False); + AddToList(MDIButtonsItems, Self); + if CBTHookHandle = 0 then + CBTHookHandle := SetWindowsHookEx(WH_CBT, CBTHook, 0, GetCurrentThreadId); +end; + +destructor TSpTBXMDIButtonsItem.Destroy; +begin + RemoveFromList(MDIButtonsItems, Self); + if (MDIButtonsItems = nil) and (CBTHookHandle <> 0) then begin + UnhookWindowsHookEx(CBTHookHandle); + CBTHookHandle := 0; + end; + inherited; +end; + +procedure TSpTBXMDIButtonsItem.DrawItem(Sender: TObject; ACanvas: TCanvas; + ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + // [Theme-Change] + // Don't draw the items background if the Default theme is used + if (PaintStage = pstPrePaint) and SkinManager.IsDefaultSkin then + PaintDefault := False; +end; + +procedure TSpTBXMDIButtonsItem.DrawItemImage(Sender: TObject; ACanvas: TCanvas; + State: TSpTBXSkinStatesType; const PaintStage: TSpTBXPaintStage; + var AImageList: TCustomImageList; var AImageIndex: Integer; var ARect: TRect; + var PaintDefault: Boolean); +const + ButtonIndexFlags: array[0..3] of Integer = (DFCS_CAPTIONCLOSE, DFCS_CAPTIONMAX, DFCS_CAPTIONMIN, DFCS_CAPTIONRESTORE); + NoneFlags: array[TSpTBXSkinStatesType] of Integer = (0, DFCS_INACTIVE, 0, DFCS_PUSHED, DFCS_PUSHED, DFCS_PUSHED); + XPPart: array [0..3] of Integer = (WP_MDICLOSEBUTTON, WP_MAXBUTTON, WP_MDIMINBUTTON, WP_MDIRESTOREBUTTON); + XPFlags: array[TSpTBXSkinStatesType] of Integer = (CBS_NORMAL, CBS_DISABLED, CBS_HOT, CBS_PUSHED, CBS_PUSHED, CBS_PUSHED); +begin + if (PaintStage = pstPrePaint) and (AImageList = MDIButtonsImgList) and + (AImageIndex >= 0) and (AImageIndex <= 3) then + begin + case SkinManager.GetSkinType of + sknNone: + begin + PaintDefault := False; + DrawFrameControl(ACanvas.Handle, ARect, DFC_CAPTION, ButtonIndexFlags[AImageIndex] or NoneFlags[State]); + end; + sknWindows: + begin + PaintDefault := False; + DrawThemeBackground(ThemeServices.Theme[teWindow], ACanvas.Handle, XPPart[AImageIndex], XPFlags[State], ARect, nil); + end; + end; + end; +end; + +procedure TSpTBXMDIButtonsItem.UpdateState(W: HWND; Maximized: Boolean); +var + HasMaxChild, VisibilityChanged: Boolean; + + procedure UpdateVisibleEnabled(const Item: TTBCustomItem; const AEnabled: Boolean); + begin + if (Item.Visible <> HasMaxChild) or (Item.Enabled <> AEnabled) then begin + Item.Visible := HasMaxChild; + Item.Enabled := AEnabled; + VisibilityChanged := True; + end; + end; + +var + MainForm, ActiveMDIChild, ChildForm: TForm; + I: Integer; +begin + HasMaxChild := False; + MainForm := Application.MainForm; + ActiveMDIChild := nil; + if Assigned(MainForm) then begin + for I := 0 to MainForm.MDIChildCount - 1 do begin + ChildForm := MainForm.MDIChildren[I]; + if ChildForm.HandleAllocated and + (((ChildForm.Handle = W) and Maximized) or + ((ChildForm.Handle <> W) and IsZoomed(ChildForm.Handle))) then begin + HasMaxChild := True; + Break; + end; + end; + ActiveMDIChild := MainForm.ActiveMDIChild; + end; + + VisibilityChanged := False; + UpdateVisibleEnabled(TSpTBXMDIHandler(Owner).FSystemMenuItem, True); + UpdateVisibleEnabled(FMinimizeItem, (ActiveMDIChild = nil) or (GetWindowLong(ActiveMDIChild.Handle, GWL_STYLE) and WS_MINIMIZEBOX <> 0)); + UpdateVisibleEnabled(FRestoreItem, True); + UpdateVisibleEnabled(FCloseItem, True); + + if VisibilityChanged and Assigned((Owner as TSpTBXMDIHandler).FToolbar) then begin + TSpTBXMDIHandler(Owner).FToolbar.View.InvalidatePositions; + TSpTBXMDIHandler(Owner).FToolbar.View.TryValidatePositions; + end; +end; + +procedure TSpTBXMDIButtonsItem.ItemClick(Sender: TObject); +var + MainForm, ChildForm: TForm; + Cmd: WPARAM; + SendTo: HWND; +begin + MainForm := Application.MainForm; + if Assigned(MainForm) then begin + ChildForm := MainForm.ActiveMDIChild; + if Assigned(ChildForm) then begin + // Make sure we send the message to a maximized window + SendTo := ChildForm.Handle; + while not IsZoomed(SendTo) do begin + SendTo := GetWindow(SendTo, GW_HWNDNEXT); + if SendTo = 0 then Exit; + end; + + if Sender = FRestoreItem then + Cmd := SC_RESTORE + else if Sender = FCloseItem then + Cmd := SC_CLOSE + else + Cmd := SC_MINIMIZE; + SendMessage(SendTo, WM_SYSCOMMAND, Cmd, GetMessagePos); + end; + end; +end; + +procedure TSpTBXMDIButtonsItem.InvalidateSystemMenuItem; +var + View: TTBView; +begin + if Assigned((Owner as TSpTBXMDIHandler).FToolbar) then begin + View := TSpTBXMDIHandler(Owner).FToolbar.View; + View.Invalidate(View.Find(TSpTBXMDIHandler(Owner).FSystemMenuItem)); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXMDIWindowItem } + +constructor TSpTBXMDIWindowItem.Create(AOwner: TComponent); +var + Form: TForm; +begin + inherited; + ItemStyle := ItemStyle + [tbisEmbeddedGroup]; + Caption := STBMDIWindowItemDefCaption; + FWindowMenu := TMenuItem.Create(Self); + + if not (csDesigning in ComponentState) then begin + { Need to set WindowMenu before MDI children are created. Otherwise the + list incorrectly shows the first 9 child windows, even if window 10+ is + active. } + Form := Application.MainForm; + if (Form = nil) and (Screen.FormCount > 0) then + Form := Screen.Forms[0]; + SetForm(Form); + end; +end; + +procedure TSpTBXMDIWindowItem.GetChildren(Proc: TGetChildProc; Root: TComponent); +begin + // Do nothing +end; + +procedure TSpTBXMDIWindowItem.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited; + if (Operation = opRemove) and (AComponent = FForm) then + SetForm(nil); +end; + +procedure TSpTBXMDIWindowItem.SetForm(AForm: TForm); +begin + if FForm <> AForm then begin + if Assigned(FForm) and (FForm.WindowMenu = FWindowMenu) then + FForm.WindowMenu := nil; + FForm := AForm; + if Assigned(FForm) then + FForm.FreeNotification(Self); + end; + if Assigned(FForm) then + FForm.WindowMenu := FWindowMenu; +end; + +procedure TSpTBXMDIWindowItem.EnabledChanged; +var + I: Integer; +begin + inherited; + for I := 0 to Count-1 do + Items[I].Enabled := Enabled; +end; + +procedure TSpTBXMDIWindowItem.InitiateAction; +var + MainForm: TForm; + I: Integer; + M: HMENU; + Item: TSpTBXItem; + ItemCount: Integer; + Buf: array[0..1023] of Char; +begin + inherited; + if csDesigning in ComponentState then + Exit; + MainForm := Application.MainForm; + if Assigned(MainForm) then + SetForm(MainForm); + if FForm = nil then + Exit; + if FForm.ClientHandle <> 0 then + { This is needed, otherwise windows selected on the More Windows dialog + don't move back into the list } + SendMessage(FForm.ClientHandle, WM_MDIREFRESHMENU, 0, 0); + M := FWindowMenu.Handle; + ItemCount := GetMenuItemCount(M) - 1; + if ItemCount < 0 then + ItemCount := 0; + while Count < ItemCount do begin + Item := TSpTBXItem.Create(Self); + Item.Enabled := Enabled; + Item.OnClick := ItemClick; + Add(Item); + end; + while Count > ItemCount do + Items[Count - 1].Free; + for I := 0 to ItemCount - 1 do begin + Item := TSpTBXItem(Items[I]); + Item.Tag := GetMenuItemID(M, I+1); + if GetMenuString(M, I+1, Buf, SizeOf(Buf), MF_BYPOSITION) = 0 then + Buf[0] := #0; + Item.Caption := Buf; + Item.Checked := GetMenuState(M, I+1, MF_BYPOSITION) and MF_CHECKED <> 0; + end; + if Assigned(FOnUpdate) then + FOnUpdate(Self); +end; + +procedure TSpTBXMDIWindowItem.ItemClick(Sender: TObject); +var + Form: TForm; +begin + Form := Application.MainForm; + if Assigned(Form) then + PostMessage(Form.Handle, WM_COMMAND, TTBCustomItem(Sender).Tag, 0); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXMRUListItem } + +procedure TSpTBXMRUListItem.ClickHandler(Sender: TObject); +var + I: Integer; + A: TSpTBXMRUItem; +begin + if Sender is TSpTBXMRUItem then begin + A := TSpTBXMRUItem(Sender); + I := IndexOf(A); + if I > 0 then + Move(I, 0); + MRUUpdateCaptions; + if Assigned(FOnClick) then FOnClick(Self, A.MRUString); + end; +end; + +constructor TSpTBXMRUListItem.Create(AOwner: TComponent); +begin + inherited; + ItemStyle := ItemStyle + [tbisEmbeddedGroup]; + Caption := STBMRUListItemDefCaption; + Options := Options + [tboShowHint]; + FMaxItems := 4; + FHidePathExtension := True; +end; + +procedure TSpTBXMRUListItem.GetMRUFilenames(MRUFilenames: TStrings); +var + I: Integer; +begin + MRUFilenames.Clear; + for I := 0 to Count - 1 do + if Items[I] is TSpTBXMRUItem then + MRUFilenames.Add(TSpTBXMRUItem(Items[I]).MRUString); +end; + +function TSpTBXMRUListItem.IndexOfMRU(Filename: WideString): Integer; +var + I: Integer; +begin + Result := -1; + for I := 0 to Count - 1 do + if Items[I] is TSpTBXMRUItem then + if SpSameText(TSpTBXMRUItem(Items[I]).MRUString, Filename) then begin + Result := I; + Break; + end; +end; + +function TSpTBXMRUListItem.MRUAdd(Filename: WideString): Integer; +var + A: TSpTBXMRUItem; + I: Integer; +begin + Result := -1; + I := IndexOfMRU(Filename); + if I > -1 then begin + // If Filename is already in the MRU list, move it to the top + Move(I, 0); + MRUUpdateCaptions; + end + else begin + // Add the new Filename, if it exceeds the MaxItems limit delete the bottom items + A := TSpTBXMRUItem.Create(Self); + A.MRUString := Filename; + A.Hint := Filename; + A.OnClick := ClickHandler; + Insert(0, A); + while Count > FMaxItems do + Items[Count - 1].Free; + MRUUpdateCaptions; + Result := 0; + end; +end; + +function TSpTBXMRUListItem.MRUClick(Filename: WideString): Boolean; +var + I: Integer; +begin + Result := False; + I := IndexOfMRU(Filename); + if I > -1 then begin + Items[I].Click; + Result := True; + end; +end; + +procedure TSpTBXMRUListItem.MRURemove(Filename: WideString); +var + I: Integer; +begin + I := IndexOfMRU(Filename); + if I > -1 then begin + Items[I].Free; + MRUUpdateCaptions; + end; +end; + +procedure TSpTBXMRUListItem.MRUUpdateCaptions; +var + I: Integer; + A: TSpTBXMRUItem; + S: WideString; +begin + for I := 0 to Count - 1 do + if Items[I] is TSpTBXMRUItem then begin + A := TSpTBXMRUItem(Items[I]); + S := A.MRUString; + if FHidePathExtension then begin + {$IFDEF UNICODE} + S := ExtractFileName(S); + {$ELSE} + S := TntSysUtils.WideExtractFileName(S); + {$ENDIF} + end; + A.Caption := '&' + IntToStr(I + 1) + ' ' + S; + end; +end; + +procedure TSpTBXMRUListItem.LoadFromIni(Ini: TCustomIniFile; const Section: string); +var + I: Integer; + S: WideString; +begin + Clear; + for I := FMaxItems downto 1 do begin + S := Ini.ReadString(Section, IntToStr(I), ''); + {$IFNDEF UNICODE} + S := UTF8Decode(S); + {$ENDIF} + if S <> '' then + MRUAdd(S); + end; +end; + +procedure TSpTBXMRUListItem.SaveToIni(Ini: TCustomIniFile; const Section: string); +var + I: Integer; + A: TSpTBXMRUItem; + S: string; + L: TStringList; +begin + {$IFDEF UNICODE} + // If the IniFile doesn't exist create it with Unicode encoding + // otherwise we can't write Unicode strings. + if (Ini is TIniFile) and not FileExists(Ini.FileName) then begin + L := TStringList.Create; + try + L.SaveToFile(Ini.FileName, TEncoding.Unicode); + finally + L.Free; + end; + end; + {$ENDIF} + for I := 1 to FMaxItems do begin + if I <= Count then begin + A := TSpTBXMRUItem(Items[I - 1]); + {$IFDEF UNICODE} + S := A.MRUString; + {$ELSE} + S := UTF8Encode(A.MRUString); + {$ENDIF} + Ini.WriteString(Section, IntToStr(I), S); + end + else + Ini.DeleteKey(Section, IntToStr(I)); + end; +end; + +procedure TSpTBXMRUListItem.SetHidePathExtension(const Value: Boolean); +begin + if FHidePathExtension <> Value then begin + FHidePathExtension := Value; + MRUUpdateCaptions; + end; +end; + +procedure TSpTBXMRUListItem.SetMaxItems(const Value: Integer); +begin + if FMaxItems <> Value then begin + FMaxItems := Value; + if Count > FMaxItems then begin + while Count > FMaxItems do + Items[Count - 1].Free; + MRUUpdateCaptions; + end; + end; +end; + +end. diff --git a/internal/2.4.4/1/Source/SpTBXPageScroller.pas b/internal/2.4.4/1/Source/SpTBXPageScroller.pas new file mode 100644 index 0000000..2de84e0 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXPageScroller.pas @@ -0,0 +1,943 @@ +unit SpTBXPageScroller; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +Development notes: + - All the Windows and Delphi bugs fixes are marked with '[Bugfix]'. + - All the theme changes and adjustments are marked with '[Theme-Change]'. + +History: +2 December 2009 - version 2.4.4 + - No changes. + +13 September 2009 - version 2.4.3 + - Initial release, initial author: Kiriakos. + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation + +uses + Windows, Messages, Classes, Graphics, Controls, StdCtrls, ExtCtrls, Forms, + TB2Dock, TB2Item, SpTBXSkins, SpTBXItem; + + +const + { New hit test constants for page scrollers } + HTSCROLLPREV = 30; + HTSCROLLNEXT = 31; + + { Page scroll button types } + PSBT_UP = 1; + PSBT_DOWN = 2; + PSBT_LEFT = 3; + PSBT_RIGHT = 4; + +type + TSpTBXPageScrollerOrientation = (tpsoVertical, tpsoHorizontal); + TSpTBXPageScrollerButtons = set of (tpsbPrev, tpsbNext); + TSpTBXPageScrollerButtonType = (tpsbtUp, tpsbtDown, tpsbtLeft, tpsbtRight); + + TSpTBXCustomPageScroller = class(TWinControl) + private + FAutoRangeCount: Integer; + FAutoRange: Boolean; + FAutoScroll: Boolean; + FButtonSize: Integer; + FMargin: Integer; + FOrientation: TSpTBXPageScrollerOrientation; + FPosition: Integer; + FPosRange: Integer; + FRange: Integer; + FScrollDirection: Integer; + FScrollCounter: Integer; + FScrollPending: Boolean; + FScrollTimer: TTimer; + FUpdatingButtons: Boolean; + FVisibleButtons: TSpTBXPageScrollerButtons; + procedure CalcAutoRange; + function IsRangeStored: Boolean; + procedure ScrollTimerTimer(Sender: TObject); + procedure SetButtonSize(Value: Integer); + procedure SetAutoRange(Value: Boolean); + procedure SetOrientation(Value: TSpTBXPageScrollerOrientation); + procedure SetPosition(Value: Integer); + procedure SetRange(Value: Integer); + procedure StopScrolling; + procedure ValidatePosition(var NewPos: Integer); + procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE; + procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; + procedure WMEraseBkgnd(var Message: TWmEraseBkgnd); message WM_ERASEBKGND; + procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST; + procedure WMNCLButtonDown(var Message: TWMNCLButtonDown); message WM_NCLBUTTONDOWN; + procedure WMNCMouseLeave(var Message: TMessage); message $2A2 {WM_NCMOUSELEAVE}; + procedure WMNCMouseMove(var Message: TWMNCMouseMove); message WM_NCMOUSEMOVE; + procedure WMNCPaint(var Message: TMessage); message WM_NCPAINT; + procedure WMSize(var Message: TWMSize); message WM_SIZE; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + protected + procedure AdjustClientRect(var Rect: TRect); override; + procedure AlignControls(AControl: TControl; var ARect: TRect); override; + function AutoScrollEnabled: Boolean; virtual; + procedure BeginScrolling(HitTest: Integer); + function CalcClientArea: TRect; + function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; override; + procedure ConstrainedResize(var MinWidth, MinHeight, MaxWidth, MaxHeight: Integer); override; + procedure CreateParams(var Params: TCreateParams); override; + procedure DoSetRange(Value: Integer); virtual; + procedure DrawNCArea(const DrawToDC: Boolean; const ADC: HDC; const Clip: HRGN); virtual; + procedure HandleScrollTimer; virtual; + procedure Loaded; override; + procedure RecalcNCArea; + procedure Resizing; virtual; + procedure UpdateButtons; + property AutoRange: Boolean read FAutoRange write SetAutoRange default True; + property AutoScroll: Boolean read FAutoScroll write FAutoScroll default True; + property ButtonSize: Integer read FButtonSize write SetButtonSize default 10; + property Margin: Integer read FMargin write FMargin default 0; + property Orientation: TSpTBXPageScrollerOrientation read FOrientation write SetOrientation default tpsoVertical; + property Range: Integer read FRange write SetRange stored IsRangeStored; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure DisableAutoRange; + procedure EnableAutoRange; + procedure ScrollToCenter(ARect: TRect); overload; + procedure ScrollToCenter(AControl: TControl); overload; + property Position: Integer read FPosition write SetPosition default 0; + end; + + TSpTBXPageScroller = class(TSpTBXCustomPageScroller) + published + property Align; + property Anchors; + property AutoRange; + property AutoScroll; + property ButtonSize; + property Color; + property Constraints; + property DockSite; + property DragCursor; + property DragKind; + property DragMode; + property DoubleBuffered; + property Enabled; + property Ctl3D; + property Font; + property Margin; + property Orientation; + property ParentBiDiMode; + property ParentColor; + property ParentCtl3D; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property Range; + property ShowHint; + property TabOrder; + property TabStop; + property Visible; + property OnCanResize; + property OnClick; + property OnConstrainedResize; + property OnContextPopup; + property OnDblClick; + property OnDockDrop; + property OnDockOver; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnGetSiteInfo; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnMouseWheel; + property OnMouseWheelDown; + property OnMouseWheelUp; + property OnResize; + property OnStartDock; + property OnStartDrag; + property OnUnDock; + end; + +{ Painting helpers } +procedure SpTBXPaintPageScrollButton(ACanvas: TCanvas; const ARect: TRect; ButtonType: TSpTBXPageScrollerButtonType; Hot: Boolean); + +implementation + +uses + SysUtils, TB2Common, UxTheme, Themes; + +const + ScrollDelay = 300; + ScrollInterval = 75;{ TSpTBXCustomPageScroller } + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Helpers } + +function GetMinControlHeight(Control: TControl): Integer; +begin + if Control.Align = alClient then + Result := Control.Constraints.MinHeight + else + Result := Control.Height; +end; + +function GetMinControlWidth(Control: TControl): Integer; +begin + if Control.Align = alClient then + Result := Control.Constraints.MinWidth + else + Result := Control.Width; +end; + +procedure SpTBXPaintPageScrollButton(ACanvas: TCanvas; const ARect: TRect; + ButtonType: TSpTBXPageScrollerButtonType; Hot: Boolean); +var + R: TRect; + Flags: Integer; + X, Y, Sz: Integer; +begin + R := ARect; + case SkinManager.GetSkinType of + sknNone: + begin + if Hot then Flags := DFCS_FLAT + else Flags := 0; + case ButtonType of + tpsbtUp: Flags := Flags or DFCS_SCROLLUP; + tpsbtDown: Flags := Flags or DFCS_SCROLLDOWN; + tpsbtLeft: Flags := Flags or DFCS_SCROLLLEFT; + tpsbtRight: Flags := Flags or DFCS_SCROLLRIGHT; + end; + Windows.DrawFrameControl(ACanvas.Handle, R, DFC_SCROLL, Flags); + end; + sknWindows: + begin + if Hot then Flags := TS_PRESSED + else Flags := TS_HOT; + DrawThemeBackground(ThemeServices.Theme[teToolBar], ACanvas.Handle, TP_BUTTON, Flags, ARect, nil); + if Hot then ACanvas.Pen.Color := clBtnText; + end; + sknSkin : + begin + SpDrawXPButton(ACanvas, R, True, False, Hot, False, False, False, sknSkin); + if Hot then + ACanvas.Pen.Color := CurrentSkin.GetTextColor(skncButton, sknsHotTrack, sknSkin) + else + ACanvas.Pen.Color := CurrentSkin.GetTextColor(skncButton, sknsNormal, sknSkin); + end; + end; + + if SkinManager.GetSkinType in [sknWindows, sknSkin] then begin + X := (R.Left + R.Right) div 2; + Y := (R.Top + R.Bottom) div 2; + Sz := Min(X - R.Left, Y - R.Top) * 3 div 4; + ACanvas.Brush.Color := ACanvas.Pen.Color; + case ButtonType of + tpsbtUp: + begin + Inc(Y, Sz div 2); + ACanvas.Polygon([Point(X + Sz, Y), Point(X, Y - Sz), Point(X - Sz, Y)]); + end; + tpsbtDown: + begin + Y := (R.Top + R.Bottom - 1) div 2; + Dec(Y, Sz div 2); + ACanvas.Polygon([Point(X + Sz, Y), Point(X, Y + Sz), Point(X - Sz, Y)]); + end; + tpsbtLeft: + begin + Inc(X, Sz div 2); + ACanvas.Polygon([Point(X, Y + Sz), Point(X - Sz, Y), Point(X, Y - Sz)]); + end; + tpsbtRight: + begin + X := (R.Left + R.Right - 1) div 2; + Dec(X, Sz div 2); + ACanvas.Polygon([Point(X, Y + Sz), Point(X + Sz, Y), Point(X, Y - Sz)]); + end; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomPageScroller } + +procedure TSpTBXCustomPageScroller.AdjustClientRect(var Rect: TRect); +begin + if Orientation = tpsoVertical then + begin + if tpsbPrev in FVisibleButtons then Dec(Rect.Top, ButtonSize); + if tpsbNext in FVisibleButtons then Inc(Rect.Bottom, ButtonSize); + OffsetRect(Rect, 0, -Position); + if Range > Rect.Bottom - Rect.Top then Rect.Bottom := Rect.Top + Range; + end + else + begin + if tpsbPrev in FVisibleButtons then Dec(Rect.Left, ButtonSize); + if tpsbNext in FVisibleButtons then Inc(Rect.Right, ButtonSize); + OffsetRect(Rect, -Position, 0); + if Range > Rect.Right - Rect.Left then Rect.Right := Rect.Left + Range; + end; +end; + +procedure TSpTBXCustomPageScroller.AlignControls(AControl: TControl; var ARect: TRect); +begin + CalcAutoRange; + UpdateButtons; + ARect := ClientRect; + inherited AlignControls(AControl, ARect); +end; + +function TSpTBXCustomPageScroller.AutoScrollEnabled: Boolean; +begin + Result := not AutoSize and not (DockSite and UseDockManager); +end; + +procedure TSpTBXCustomPageScroller.BeginScrolling(HitTest: Integer); +var + Msg: TMsg; +begin + if HitTest = HTSCROLLPREV then FScrollDirection := -1 else FScrollDirection := 1; + try + SetCapture(Handle); + FScrollCounter := FScrollDirection * 8; + FScrollPending := True; + FScrollTimer.Enabled := True; + DrawNCArea(False, 0, 0); + HandleScrollTimer; + FScrollPending := True; + FScrollTimer.Interval := ScrollDelay; + + while GetCapture = Handle do begin + case Integer(GetMessage(Msg, 0, 0, 0)) of + -1: Break; + 0: begin + PostQuitMessage(Msg.WParam); + Break; + end; + end; + case Msg.Message of + WM_KEYDOWN, WM_KEYUP: + if Msg.WParam = VK_ESCAPE then + Break; + WM_LBUTTONDOWN, WM_LBUTTONDBLCLK, WM_LBUTTONUP: + begin + Break; + end; + WM_RBUTTONDOWN..WM_MBUTTONDBLCLK:; + WM_TIMER: + begin + HandleScrollTimer; + end; + else + TranslateMessage(Msg); + DispatchMessage(Msg); + end; + end; + finally + StopScrolling; + if GetCapture = Handle then ReleaseCapture; + end; +end; + +procedure TSpTBXCustomPageScroller.CalcAutoRange; +var + I: Integer; + Bias: Integer; + NewRange, AlignMargin: Integer; + CW, CH: Integer; + Control: TControl; +begin + if (FAutoRangeCount <= 0) and AutoRange then + begin + if AutoScrollEnabled then + begin + NewRange := 0; + AlignMargin := 0; + if Position > 0 then Bias := ButtonSize + else Bias := 0; + CW := ClientWidth; + CH := ClientHeight; + DisableAlign; + for I := 0 to ControlCount - 1 do + begin + Control := Controls[I]; + if Control.Visible or (csDesigning in Control.ComponentState) and + not (csNoDesignVisible in Control.ControlStyle) then + begin + if Orientation = tpsoVertical then + begin + if Control.Align in [alTop, alBottom, alClient] then + Control.Width := CW; + case Control.Align of + alTop, alNone: + if (Control.Align = alTop) or (Control.Anchors * [akTop, akBottom] = [akTop]) then + NewRange := Max(NewRange, Position + Control.Top + Control.Height + Bias); + alBottom: Inc(AlignMargin, Control.Height); + alClient: Inc(AlignMargin, GetMinControlHeight(Control)); + end + end + else + begin + if Control.Align in [alLeft, alRight, alClient] then + Control.Height := CH; + case Control.Align of + alLeft, alNone: + if (Control.Align = alLeft) or (Control.Anchors * [akLeft, akRight] = [akLeft]) then + NewRange := Max(NewRange, Position + Control.Left + Control.Width + Bias); + alRight: Inc(AlignMargin, Control.Width); + alClient: Inc(AlignMargin, GetMinControlWidth(Control)); + end; + end; + end; + end; + EnableAlign; + DoSetRange(NewRange + AlignMargin + Margin); + end + else DoSetRange(0); + end; +end; + +function TSpTBXCustomPageScroller.CalcClientArea: TRect; +begin + Result := ClientRect; + if Orientation = tpsoVertical then + begin + if tpsbPrev in FVisibleButtons then Dec(Result.Top, ButtonSize); + if tpsbNext in FVisibleButtons then Inc(Result.Bottom, ButtonSize); + end + else + begin + if tpsbPrev in FVisibleButtons then Dec(Result.Left, ButtonSize); + if tpsbNext in FVisibleButtons then Inc(Result.Right, ButtonSize); + end; +end; + +function TSpTBXCustomPageScroller.CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; +begin + Result := NewHeight > FButtonSize * 3; +end; + +procedure TSpTBXCustomPageScroller.ConstrainedResize(var MinWidth, MinHeight, MaxWidth, MaxHeight: Integer); +begin + // do not call inherited here +end; + +constructor TSpTBXCustomPageScroller.Create(AOwner: TComponent); +begin + inherited; + ControlStyle := ControlStyle + [csAcceptsControls, csClickEvents, csDoubleClicks]; + FAutoScroll := True; + FAutoRange := True; + FButtonSize := 10; + FScrollTimer := TTimer.Create(Self); + FScrollTimer.Enabled := False; + FScrollTimer.Interval := 60; + FScrollTimer.OnTimer := ScrollTimerTimer; + Width := 64; + Height := 64; + SkinManager.AddSkinNotification(Self); +end; + +procedure TSpTBXCustomPageScroller.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + with Params.WindowClass do style := style and not (CS_HREDRAW or CS_VREDRAW); +end; + +destructor TSpTBXCustomPageScroller.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + inherited; +end; + +procedure TSpTBXCustomPageScroller.DisableAutoRange; +begin + Inc(FAutoRangeCount); +end; + +procedure TSpTBXCustomPageScroller.DoSetRange(Value: Integer); +begin + FRange := Value; + if FRange < 0 then FRange := 0; + UpdateButtons; +end; + +procedure TSpTBXCustomPageScroller.DrawNCArea(const DrawToDC: Boolean; + const ADC: HDC; const Clip: HRGN); +const + CBtns: array [TSpTBXPageScrollerOrientation, Boolean] of TSpTBXPageScrollerButtonType = + ((tpsbtUp, tpsbtDown), (tpsbtLeft, tpsbtRight)); +var + DC: HDC; + R, CR, BR: TRect; + ACanvas: TCanvas; + PrevBtnSize, NextBtnSize: Integer; +begin + if FVisibleButtons = [] then Exit; + if not DrawToDC then DC := GetWindowDC(Handle) + else DC := ADC; + try + GetWindowRect(Handle, R); + OffsetRect(R, -R.Left, -R.Top); + if not DrawToDC then + begin + SelectNCUpdateRgn(Handle, DC, Clip); + CR := R; + PrevBtnSize := 0; + NextBtnSize := 0; + if tpsbPrev in FVisibleButtons then PrevBtnSize := ButtonSize; + if tpsbNext in FVisibleButtons then NextBtnSize := ButtonSize; + if Orientation = tpsoVertical then + begin + Inc(CR.Top, PrevBtnSize); + Dec(CR.Bottom, NextBtnSize); + end + else + begin + Inc(CR.Left, PrevBtnSize); + Dec(CR.Right, NextBtnSize); + end; + with CR do ExcludeClipRect(DC, Left, Top, Right, Bottom); + end; + + ACanvas := TCanvas.Create; + try + ACanvas.Handle := DC; + ACanvas.Brush.Color := Color; + ACanvas.FillRect(R); + + if tpsbPrev in FVisibleButtons then + begin + BR := R; + if Orientation = tpsoVertical then BR.Bottom := BR.Top + ButtonSize + else BR.Right := BR.Left + ButtonSize; + SpTBXPaintPageScrollButton(ACanvas, BR, CBtns[Orientation, False], + FScrollDirection < 0); + end; + if tpsbNext in FVisibleButtons then + begin + BR := R; + if Orientation = tpsoVertical then BR.Top := BR.Bottom - ButtonSize + else BR.Left := BR.Right - ButtonSize; + SpTBXPaintPageScrollButton(ACanvas, BR, CBtns[Orientation, True], + FScrollDirection > 0); + end; + finally + ACanvas.Handle := 0; + ACanvas.Free; + end; + finally + if not DrawToDC then ReleaseDC(Handle, DC); + end; +end; + +procedure TSpTBXCustomPageScroller.EnableAutoRange; +begin + if FAutoRangeCount > 0 then + begin + Dec(FAutoRangeCount); + if FAutoRangeCount = 0 then CalcAutoRange; + end; +end; + +procedure TSpTBXCustomPageScroller.HandleScrollTimer; +var + Pt: TPoint; + R: TRect; + OldPosition: Integer; + OldDirection: Integer; +begin + GetCursorPos(Pt); + GetWindowRect(Handle, R); + if not PtInRect(R, Pt) then + begin + StopScrolling; + end + else if FScrollDirection = 0 then + begin + FScrollTimer.Enabled := False; + FScrollCounter := 0; + end + else + begin + OldPosition := Position; + OldDirection := FScrollDirection; + if ((FScrollDirection > 0) and (FScrollCounter < 0)) or + ((FScrollDirection < 0) and (FScrollCounter > 0)) then FScrollCounter := 0; + if FScrollDirection > 0 then Inc(FScrollCounter) + else Dec(FScrollCounter); + Position := Position + FScrollCounter; + if Position = OldPosition then + begin + ReleaseCapture; + FScrollTimer.Enabled := False; + DrawNCArea(False, 0, 0); + end + else + begin + if FScrollPending or (FScrollDirection * OldDirection <= 0) or + (FScrollDirection * OldDirection <= 0) then + DrawNCArea(False, 0, 0); + end; + end; + if FScrollPending then FScrollTimer.Interval := ScrollInterval; + FScrollPending := False; +end; + +function TSpTBXCustomPageScroller.IsRangeStored: Boolean; +begin + Result := not AutoRange; +end; + +procedure TSpTBXCustomPageScroller.Loaded; +begin + inherited; + UpdateButtons; +end; + +procedure TSpTBXCustomPageScroller.RecalcNCArea; +begin + SetWindowPos(Handle, 0, 0, 0, 0, 0, + SWP_FRAMECHANGED or SWP_NOACTIVATE or SWP_NOZORDER or SWP_NOMOVE or SWP_NOSIZE); +end; + +procedure TSpTBXCustomPageScroller.Resizing; +begin + // do nothing by default +end; + +procedure TSpTBXCustomPageScroller.ScrollTimerTimer(Sender: TObject); +begin + HandleScrollTimer; +end; + +procedure TSpTBXCustomPageScroller.ScrollToCenter(ARect: TRect); +var + X, Y: Integer; +begin + if Orientation = tpsoVertical then + begin + if ARect.Bottom - ARect.Top < Range then Y := (ARect.Top + ARect.Bottom) div 2 + else Y := ARect.Top; + Position := Position + Y - Height div 2; + end + else + begin + if ARect.Right - ARect.Left < Range then X := (ARect.Left + ARect.Right) div 2 + else X := ARect.Left; + Position := Position + X - Width div 2; + end; +end; + +procedure TSpTBXCustomPageScroller.ScrollToCenter(AControl: TControl); +var + R: TRect; +begin + R := AControl.ClientRect; + R.TopLeft := ScreenToClient(AControl.ClientToScreen(R.TopLeft)); + R.BottomRight := ScreenToClient(AControl.ClientToScreen(R.BottomRight)); + ScrollToCenter(R); +end; + +procedure TSpTBXCustomPageScroller.SetAutoRange(Value: Boolean); +begin + if FAutoRange <> Value then + begin + FAutoRange := Value; + if Value then CalcAutoRange else Range := 0; + end; +end; + +procedure TSpTBXCustomPageScroller.SetButtonSize(Value: Integer); +begin + if FButtonSize <> Value then + begin + FButtonSize := Value; + UpdateButtons; + end; +end; + +procedure TSpTBXCustomPageScroller.SetOrientation(Value: TSpTBXPageScrollerOrientation); +begin + if Orientation <> Value then + begin + FOrientation := Value; + Realign; + end; +end; + +procedure TSpTBXCustomPageScroller.SetPosition(Value: Integer); +var + OldPos: Integer; +begin + if csReading in ComponentState then FPosition := Value + else + begin + ValidatePosition(Value); + if FPosition <> Value then + begin + OldPos := FPosition; + FPosition := Value; + + if OldPos > 0 then Inc(OldPos, ButtonSize); + if Value > 0 then Inc(Value, ButtonSize); + + if Orientation = tpsoHorizontal then ScrollBy(OldPos - Value, 0) + else ScrollBy(0, OldPos - Value); + UpdateButtons; + end; + end; +end; + +procedure TSpTBXCustomPageScroller.SetRange(Value: Integer); +begin + FAutoRange := False; + DoSetRange(Value); +end; + +procedure TSpTBXCustomPageScroller.StopScrolling; +begin + if (FScrollDirection <> 0) or (FScrollCounter <> 0) or (FScrollTimer.Enabled) then + begin + FScrollDirection := 0; + FScrollCounter := 0; + FScrollTimer.Enabled := False; + if HandleAllocated and IsWindowVisible(Handle) then DrawNCArea(False, 0, 0); + end; +end; + +procedure TSpTBXCustomPageScroller.UpdateButtons; +var + Sz: Integer; + OldVisibleButtons: TSpTBXPageScrollerButtons; + RealignNeeded: Boolean; +begin + RealignNeeded := False; + if not FUpdatingButtons and HandleAllocated then + try + FUpdatingButtons := True; + if Orientation = tpsoHorizontal then Sz := Width + else Sz := Height; + OldVisibleButtons := FVisibleButtons; + FVisibleButtons := []; + + FPosRange := Range - Sz; + if FPosRange < 0 then FPosRange := 0; + if FPosition > FPosRange - 1 then + begin + FPosition := FPosRange; + RealignNeeded := True; + end; + + if Sz > ButtonSize * 3 then + begin + if Position > 0 then Include(FVisibleButtons, tpsbPrev); + if Range - Position > Sz then Include(FVisibleButtons, tpsbNext); + end; + if FVisibleButtons <> OldVisibleButtons then + begin + RecalcNCArea; + RealignNeeded := True; + end; + finally + FUpdatingButtons := False; + if RealignNeeded then Realign; + end; +end; + +procedure TSpTBXCustomPageScroller.ValidatePosition(var NewPos: Integer); +begin + if NewPos < 0 then NewPos := 0; + if NewPos > FPosRange then NewPos := FPosRange; +end; + +procedure TSpTBXCustomPageScroller.WMEraseBkgnd(var Message: TWmEraseBkgnd); +begin + if Color = clNone then + begin + SpDrawParentBackground(Self, Message.DC, ClientRect); + Message.Result := 1; + end + else inherited; +end; + +procedure TSpTBXCustomPageScroller.WMMouseMove(var Message: TWMMouseMove); +begin + if AutoScroll then StopScrolling; + inherited; +end; + +procedure TSpTBXCustomPageScroller.WMNCCalcSize(var Message: TWMNCCalcSize); +begin + with Message.CalcSize_Params^ do + begin + if Orientation = tpsoVertical then + begin + if tpsbPrev in FVisibleButtons then Inc(rgrc[0].Top, ButtonSize); + if tpsbNext in FVisibleButtons then Dec(rgrc[0].Bottom, ButtonSize); + end + else + begin + if tpsbPrev in FVisibleButtons then Inc(rgrc[0].Left, ButtonSize); + if tpsbNext in FVisibleButtons then Dec(rgrc[0].Right, ButtonSize); + end; + Message.Result := 0; + end; +end; + +procedure TSpTBXCustomPageScroller.WMNCHitTest(var Message: TWMNCHitTest); +var + Pt: TPoint; + R: TRect; +begin + DefaultHandler(Message); + with Message do if Result <> HTCLIENT then + begin + Pt := SmallPointToPoint(Pos); + GetWindowRect(Handle, R); + if PtInRect(R, Pt) then + begin + if (tpsbPrev in FVisibleButtons) then + begin + if Orientation = tpsoVertical then + begin + if Pt.Y < R.Top + ButtonSize then Result := HTSCROLLPREV + end + else + begin + if Pt.X < R.Left + ButtonSize then Result := HTSCROLLPREV + end; + end; + if (tpsbNext in FVisibleButtons) then + begin + if Orientation = tpsoVertical then + begin + if Pt.Y >= R.Bottom - ButtonSize then Result := HTSCROLLNEXT; + end + else + begin + if Pt.X >= R.Right - ButtonSize then Result := HTSCROLLNEXT; + end; + end; + end; + end; +end; + +procedure TSpTBXCustomPageScroller.WMNCLButtonDown(var Message: TWMNCLButtonDown); +begin + if (Win32MajorVersion >= 5) or + (Win32MajorVersion = 4) and (Win32MinorVersion >= 10) then + CallTrackMouseEvent(Handle, TME_LEAVE or $10 {TME_NONCLIENT}); + + if not AutoScroll and (Message.HitTest in [HTSCROLLPREV, HTSCROLLNEXT]) then + BeginScrolling(Message.HitTest) + else + inherited; +end; + +procedure TSpTBXCustomPageScroller.WMNCMouseLeave(var Message: TMessage); +begin + if AutoScroll then StopScrolling; + inherited; +end; + +procedure TSpTBXCustomPageScroller.WMNCMouseMove(var Message: TWMNCMouseMove); +var + OldScrollDirection: Integer; +begin + if (Win32MajorVersion >= 5) or + (Win32MajorVersion = 4) and (Win32MinorVersion >= 10) then + CallTrackMouseEvent(Handle, TME_LEAVE or $10 {TME_NONCLIENT}); + + if AutoScroll then + begin + OldScrollDirection := FScrollDirection; + case Message.HitTest of + HTSCROLLPREV: FScrollDirection := -1; + HTSCROLLNEXT: FScrollDirection := 1; + else + StopScrolling; + inherited; + Exit; + end; + if OldScrollDirection <> FScrollDirection then + begin + FScrollCounter := 0; + FScrollPending := True; + FScrollTimer.Interval := ScrollDelay; + FScrollTimer.Enabled := True; + DrawNCArea(False, 0, 0); + end; + end; +end; + +procedure TSpTBXCustomPageScroller.WMNCPaint(var Message: TMessage); +begin + DrawNCArea(False, 0, HRGN(Message.WParam)); +end; + +procedure TSpTBXCustomPageScroller.WMSize(var Message: TWMSize); +begin + FUpdatingButtons := True; + try + CalcAutoRange; + finally + FUpdatingButtons := False; + end; + Inc(FAutoRangeCount); + inherited; + Resizing; + Dec(FAutoRangeCount); +end; + +procedure TSpTBXCustomPageScroller.WMSpSkinChange(var Message: TMessage); +begin + if HandleAllocated then + RedrawWindow(Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE or RDW_ERASE); +end; + +end. diff --git a/internal/2.4.4/1/Source/SpTBXReg.dcr b/internal/2.4.4/1/Source/SpTBXReg.dcr new file mode 100644 index 0000000..c469148 Binary files /dev/null and b/internal/2.4.4/1/Source/SpTBXReg.dcr differ diff --git a/internal/2.4.4/1/Source/SpTBXReg.pas b/internal/2.4.4/1/Source/SpTBXReg.pas new file mode 100644 index 0000000..fe8d07c --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXReg.pas @@ -0,0 +1,301 @@ +unit SpTBXReg; + +{============================================================================== +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ +==============================================================================} + +interface + +{$I TB2Ver.inc} + +uses + Windows, Classes, Controls, SysUtils, Graphics, ImgList, Dialogs, + {$IFDEF JR_D6} DesignIntf, DesignEditors, VCLEditors, {$ELSE} DsgnIntf, {$ENDIF} + TB2Reg, TB2Toolbar, TB2Item, TB2DsgnItemEditor, + SpTBXItem, SpTBXTabs, SpTBXDkPanels, SpTBXFormPopupMenu, + SpTBXControls, SpTBXEditors, SpTBXExtEditors, SpTBXPageScroller, + SpTBXCustomizer, SpTBXMDIMRU; + +type + { TSpTBXItemsEditor } + + TSpTBXItemsEditor = class(TTBItemsEditor) + public + procedure Edit; override; + end; + + { TSpTBXImageIndexEditor } + + TSpTBXImageIndexEditor = class(TIntegerProperty, ICustomPropertyListDrawing) + public + function GetAttributes: TPropertyAttributes; override; + procedure GetValues(Proc: TGetStrProc); override; + function GetImageListAt(Index: Integer): TCustomImageList; virtual; + + // ICustomPropertyListDrawing + procedure ListMeasureHeight(const Value: string; ACanvas: TCanvas; var AHeight: Integer); + procedure ListMeasureWidth(const Value: string; ACanvas: TCanvas; var AWidth: Integer); + procedure ListDrawValue(const Value: string; ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean); + end; + +procedure Register; + +implementation + +uses + Forms, TypInfo; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Helpers } + +procedure SpEditFormAddItems(Sender: TTBItemEditForm; const ToolbarName, ItemsPrefix: string); +// Creates a new toolbar in the EditForm with all the items that have the same prefix. +var + TB: TTBToolbar; + Item: TTBCustomItem; + NewItem: TTBItem; + S: string; + I, C: Integer; +begin + if Sender.FindComponent(ToolbarName) <> nil then Exit; + + // Create our own toolbar in the editor + TB := TTBToolbar.Create(Sender); + TB.Top := Sender.Height; + TB.Parent := Sender; + TB.Align := alTop; + TB.Images := Sender.ToolbarItems.SubMenuImages; + TB.ShowHint := True; + TB.Name := ToolbarName; + + C := Length(ItemsPrefix); + for I := 0 to Sender.MoreMenu.Count - 1 do + begin + Item := Sender.MoreMenu.Items[I]; + if Item is TTBCustomItem then + begin + S := TTBCustomItemClass(Item.Tag).ClassName; + if StrLComp(PChar(S), PChar(ItemsPrefix), C) = 0 then + begin + NewItem := TTBItem.Create(TB); + TB.Items.Add(NewItem); + NewItem.Caption := Item.Caption; + NewItem.ImageIndex := Item.ImageIndex; + NewItem.Tag := Item.Tag; + NewItem.Hint := S; + NewItem.OnClick := Item.OnClick; + end; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBItemsEditor } + +procedure TSpTBXItemsEditor.Edit; +var + Intf: ITBItems; + F: TTBItemEditForm; + I: Integer; +begin + if Assigned(Component) and Component.GetInterface(ITBItems, Intf) then begin + inherited; + F := nil; + if Screen.ActiveForm is TTBItemEditForm then + F := Screen.ActiveForm as TTBItemEditForm + else + for I := 0 to Screen.FormCount - 1 do + if Screen.Forms[I] is TTBItemEditForm then begin + F := Screen.Forms[I] as TTBItemEditForm; + Break; + end; + + if Assigned(F) then + SpEditFormAddItems(F, 'SpTBToolbar', 'TSpTBX'); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXImageIndexEditor } + +function TSpTBXImageIndexEditor.GetAttributes: TPropertyAttributes; +begin + Result := [paMultiSelect, paValueList, paRevertable]; +end; + +function TSpTBXImageIndexEditor.GetImageListAt(Index: Integer): TCustomImageList; +begin + Result := TCustomImageList(TypInfo.GetObjectProp(GetComponent(Index), 'Images')); +end; + +procedure TSpTBXImageIndexEditor.GetValues(Proc: TGetStrProc); +var + ImgList: TCustomImageList; + I: Integer; +begin + ImgList := GetImageListAt(0); + if Assigned(ImgList) then + for I := 0 to ImgList.Count-1 do + Proc(IntToStr(I)); +end; + +procedure TSpTBXImageIndexEditor.ListDrawValue(const Value: string; + ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean); +var + ImgList: TCustomImageList; + X: Integer; +begin + ImgList := GetImageListAt(0); + ACanvas.FillRect(ARect); + X := ARect.Left + 2; + if Assigned(ImgList) then begin + ImgList.Draw(ACanvas, X, ARect.Top + 2, StrToInt(Value)); + Inc(X, ImgList.Width); + end; + ACanvas.TextOut(X + 3, ARect.Top + 1, Value); +end; + +procedure TSpTBXImageIndexEditor.ListMeasureHeight(const Value: string; + ACanvas: TCanvas; var AHeight: Integer); +var + ImgList: TCustomImageList; +begin + ImgList := GetImageListAt(0); + AHeight := ACanvas.TextHeight(Value) + 2; + if Assigned(ImgList) and (ImgList.Height + 4 > AHeight) then + AHeight := ImgList.Height + 4; +end; + +procedure TSpTBXImageIndexEditor.ListMeasureWidth(const Value: string; + ACanvas: TCanvas; var AWidth: Integer); +var + ImgList: TCustomImageList; +begin + ImgList := GetImageListAt(0); + AWidth := ACanvas.TextWidth(Value) + 4; + if Assigned(ImgList) then + Inc(AWidth, ImgList.Width); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM + +procedure Register; +begin + {$IFDEF JR_D9} + ForceDemandLoadState(dlDisable); + {$ENDIF} + + RegisterComponents('SpTBXLib', [TSpTBXDock, TSpTBXMultiDock, TSpTBXToolbar, + TSpTBXToolWindow, TSpTBXDockablePanel, TSpTBXTabSet, TSpTBXTabControl, TSpTBXStatusBar, + TSpTBXPopupMenu, TSpTBXFormPopupMenu, TSpTBXMDIHandler, TSpTBXTitleBar, + TSpTBXLabel, TSpTBXCheckBox, TSpTBXRadioButton, TSpTBXButton, TSpTBXSpeedButton, + TSpTBXProgressBar, TSpTBXTrackBar, TSpTBXSplitter, TSpTBXPanel, TSpTBXGroupBox, + TSpTBXRadioGroup, TSpTBXEdit, TSpTBXButtonEdit, TSpTBXSpinEdit, TSpTBXColorEdit, + TSpTBXComboBox, TSpTBXFontComboBox, TSpTBXListBox, TSpTBXCheckListBox, TSpTBXColorListBox, + TSpTBXPageScroller, TSpTBXCustomizer]); + + RegisterClasses([TSpTBXTabSheet, TSpTBXCustomTabSet, TSpTBXCustomTabControl]); + + // TSpTBXItem + RegisterNoIcon([TSpTBXItem]); + RegisterClasses([TSpTBXItem]); + TBRegisterItemClass(TSpTBXItem, 'New SpTBX Item', HInstance); + // TSpTBXSubmenuItem + RegisterNoIcon([TSpTBXSubmenuItem]); + RegisterClasses([TSpTBXSubmenuItem]); + TBRegisterItemClass(TSpTBXSubmenuItem, 'New SpTBX Submenu Item', HInstance); + // TSpTBXSeparatorItem + RegisterNoIcon([TSpTBXSeparatorItem]); + RegisterClasses([TSpTBXSeparatorItem]); + TBRegisterItemClass(TSpTBXSeparatorItem, 'New SpTBX Separator Item', HInstance); + // TSpTBXSpacerItem + RegisterNoIcon([TSpTBXRightAlignSpacerItem]); + RegisterClasses([TSpTBXRightAlignSpacerItem]); + TBRegisterItemClass(TSpTBXRightAlignSpacerItem, 'New SpTBX RightAlignSpacer Item', HInstance); + // TSpTBXLabelItem + RegisterNoIcon([TSpTBXLabelItem]); + RegisterClasses([TSpTBXLabelItem]); + TBRegisterItemClass(TSpTBXLabelItem, 'New SpTBX Label Item', HInstance); + // TSpTBXSkinGroupItem + RegisterNoIcon([TSpTBXSkinGroupItem]); + RegisterClasses([TSpTBXSkinGroupItem]); + TBRegisterItemClass(TSpTBXSkinGroupItem, 'New SpTBX SkinGroup Item', HInstance); + // TSpTBXColorItem + RegisterNoIcon([TSpTBXColorItem]); + RegisterClasses([TSpTBXColorItem]); + TBRegisterItemClass(TSpTBXColorItem, 'New SpTBX Color Item', HInstance); + // TSpTBXTabItem + RegisterNoIcon([TSpTBXTabItem]); + RegisterClasses([TSpTBXTabItem]); + TBRegisterItemClass(TSpTBXTabItem, 'New SpTBX Tab Item', HInstance); + // TSpTBXEditItem + RegisterNoIcon([TSpTBXEditItem]); + RegisterClasses([TSpTBXEditItem]); + TBRegisterItemClass(TSpTBXEditItem, 'New SpTBX Edit Item', HInstance); + // TSpTBXSpinEditItem + RegisterNoIcon([TSpTBXSpinEditItem]); + RegisterClasses([TSpTBXSpinEditItem]); + TBRegisterItemClass(TSpTBXSpinEditItem, 'New SpTBX Spin Edit Item', HInstance); + // TSpTBXToolPalette + RegisterNoIcon([TSpTBXToolPalette]); + RegisterClasses([TSpTBXToolPalette]); + TBRegisterItemClass(TSpTBXToolPalette, 'New SpTBX Tool Palette Item', HInstance); + // TSpTBXColorPalette + RegisterNoIcon([TSpTBXColorPalette]); + RegisterClasses([TSpTBXColorPalette]); + TBRegisterItemClass(TSpTBXColorPalette, 'New SpTBX Color Palette Item', HInstance); + // TSpTBXMRUListItem + RegisterNoIcon([TSpTBXMRUListItem]); + RegisterClasses([TSpTBXMRUListItem]); + TBRegisterItemClass(TSpTBXMRUListItem, 'New SpTBX MRU List Item', HInstance); + // TSpTBXMDIWindowItem + RegisterNoIcon([TSpTBXMDIWindowItem]); + RegisterClasses([TSpTBXMDIWindowItem]); + TBRegisterItemClass(TSpTBXMDIWindowItem, 'New SpTBX MDI Window Item', HInstance); + + // Register the components editor, the components must implement IItems interface + RegisterComponentEditor(TSpTBXToolbar, TSpTBXItemsEditor); + RegisterComponentEditor(TSpTBXCompoundItemsControl, TSpTBXItemsEditor); + RegisterComponentEditor(TSpTBXDockablePanel, TSpTBXItemsEditor); + RegisterComponentEditor(TSpTBXCustomizer, TSpTBXItemsEditor); + RegisterComponentEditor(TSpTBXPopupMenu, TSpTBXItemsEditor); + + // Register the ImageIndex property editor for TSpTBXTextObject descendants, this is + // needed to show the preview of images in the property editor combobox. + RegisterPropertyEditor(TypeInfo(TImageIndex), TSpTBXTextObject, '', TSpTBXImageIndexEditor); +end; + +end. diff --git a/internal/2.4.4/1/Source/SpTBXSkins.pas b/internal/2.4.4/1/Source/SpTBXSkins.pas new file mode 100644 index 0000000..3332423 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXSkins.pas @@ -0,0 +1,3678 @@ +unit SpTBXSkins; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +Development notes: + - All the Windows and Delphi bugs fixes are marked with '[Bugfix]'. + - All the theme changes and adjustments are marked with '[Theme-Change]'. + - DT_END_ELLIPSIS and DT_PATH_ELLIPSIS doesn't work with rotated text + http://support.microsoft.com/kb/249678 + +History: +2 December 2009 - version 2.4.4 + - Renamed the OfficeMenuSeparator skin option to OfficeMenu. + +13 September 2009 - version 2.4.3 + - Improved the gradient painting performance, it's 2x faster on + Vista/Win7, thanks to Kyan and Jim Kueneman for the code donation. + - Fixed CurrentSkin.GetTextColor bug, it didn't return the + correct skncDockablePanelTitleBar text color when using + the EOS skin, thanks to Aaron Taylor for reporting this. + - Fixed CurrentSkin.GetTextColor bug, it didn't return the + correct skncButton disabled text color on Windows Vista, + thanks to Arvid for reporting this. + +8 May 2009 - version 2.4.2 + - No changes. + +15 March 2009 - version 2.4.1 + - Added OnSkinChange event to TSpTBXSkinManager. + +17 January 2009 - version 2.4 + - Minor Fixes. + +26 September 2008 - version 2.3 + - Fixed incorrect skin loading when the Aluminum skin was used, + thanks to Costas Stergiou for reporting this. + +29 July 2008 - version 2.2 + - Fixed incorrect menu items painting on Vista when the Windows + themes was disabled, thanks to Arvid for reporting this. + +26 June 2008 - version 2.1 + - Added Windows Vista specific constants to support Vista + themes on Delphi versions prior to 2007, thanks to Wolf B. + for his contribution. + +3 May 2008 - version 2.0 + - Renamed TSpTBXSkinOptions.TitleBarBorderSize to + FloatingWindowBorderSize. + +2 April 2008 - version 1.9.5 + - No changes. + +3 February 2008 - version 1.9.4 + - Added TitleBarBorderSize to the skins options. + +19 January 2008 - version 1.9.3 + - No changes. + +26 December 2007 - version 1.9.2 + - New gradient skin style added to mimic Vista toolbar gradients, use + 9 or 10 gradient style to paint vertically or horizontally. + +1 December 2007 - version 1.9.1 + - Added Header and Tabs Toolbar skinning. skncHeader and skncTabToolbar + skin elements were added to the skin components type. + - Added SpDrawXPHeader utility function to paint the header controls. + +20 November 2007 - version 1.9 + - Initial release. + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation + +// Use GradientFill API instead of FillRect to paint the gradients +// GradientFill vs FillRect: http://www.mustangpeak.net/phpBB2/viewtopic.php?f=12&t=2109 +{$DEFINE SYSTEM_GRADIENT} + +uses + Windows, Messages, Classes, SysUtils, Graphics, Controls, StdCtrls, + ImgList, IniFiles; + +const + WM_SPSKINCHANGE = WM_APP + 2007; // Skin change notification message + + { Windows Vista theme painting constants } + MENU_BARITEM = 8; + MENU_POPUPBACKGROUND = 9; + MENU_POPUPBORDERS = 10; + MENU_POPUPCHECK = 11; + MENU_POPUPCHECKBACKGROUND = 12; + MENU_POPUPGUTTER = 13; + MENU_POPUPITEM = 14; + MENU_POPUPSEPARATOR = 15; + MBI_NORMAL = 1; + MBI_HOT = 2; + MBI_PUSHED = 3; + MBI_DISABLED = 4; + MBI_DISABLEDHOT = 5; + MBI_DISABLEDPUSHED = 6; + MPI_NORMAL = 1; + MPI_HOT = 2; + MPI_DISABLED = 3; + MPI_DISABLEDHOT = 4; + MCB_DISABLED = 1; + MCB_NORMAL = 2; + MCB_BITMAP = 3; + MC_CHECKMARKNORMAL = 1; + MC_CHECKMARKDISABLED = 2; + MC_BULLETNORMAL = 3; + MC_BULLETDISABLED = 4; + +type + { Skins } + + TSpTBXSkinType = ( + sknNone, // No themes + sknWindows, // Use Windows themes + sknSkin // Use Skins + ); + + TSpTBXLunaScheme = ( + lusBlue, + lusMetallic, + lusGreen, + lusUnknown + ); + + TSpTBXSkinComponentsType = ( + skncDock, + skncDockablePanel, + skncDockablePanelTitleBar, + skncGutter, + skncMenuBar, + skncOpenToolbarItem, + skncPanel, + skncPopup, + skncSeparator, + skncSplitter, + skncStatusBar, + skncStatusBarGrip, + skncTabBackground, + skncTabToolbar, + skncToolbar, + skncToolbarGrip, + skncWindow, + skncWindowTitleBar, + + // Multiple States + skncMenuBarItem, + skncMenuItem, + skncToolbarItem, + skncButton, + skncCheckBox, + skncEditButton, + skncEditFrame, + skncHeader, + skncLabel, + skncListItem, + skncProgressBar, + skncRadioButton, + skncTab, + skncTrackBar, + skncTrackBarButton + ); + TSpTBXSkinStatesType = (sknsNormal, sknsDisabled, sknsHotTrack, sknsPushed, sknsChecked, sknsCheckedAndHotTrack); + + TSpTBXSkinStatesSet = set of TSpTBXSkinStatesType; + + TSpTBXSkinPartsType = (sknpBody, sknpBorders, sknpText); + + TSpTBXSkinComponentsIdentEntry = record + Name: string; + States: TSpTBXSkinStatesSet; + end; + +const + SpTBXSkinMultiStateComponents: set of TSpTBXSkinComponentsType = [skncMenuBarItem..High(TSpTBXSkinComponentsType)]; + + CSpTBXSkinAllStates = [Low(TSpTBXSkinStatesType)..High(TSpTBXSkinStatesType)]; + CSpTBXSkinComponents: array [TSpTBXSkinComponentsType] of TSpTBXSkinComponentsIdentEntry = ( + // Single state Components + (Name: 'Dock'; States: [sknsNormal]), + (Name: 'DockablePanel'; States: [sknsNormal]), + (Name: 'DockablePanelTitleBar'; States: [sknsNormal]), + (Name: 'Gutter'; States: [sknsNormal]), + (Name: 'MenuBar'; States: [sknsNormal]), + (Name: 'OpenToolbarItem'; States: [sknsNormal]), + (Name: 'Panel'; States: [sknsNormal]), + (Name: 'Popup'; States: [sknsNormal]), + (Name: 'Separator'; States: [sknsNormal]), + (Name: 'Splitter'; States: [sknsNormal]), + (Name: 'StatusBar'; States: [sknsNormal]), + (Name: 'StatusBarGrip'; States: [sknsNormal]), + (Name: 'TabBackground'; States: [sknsNormal]), + (Name: 'TabToolbar'; States: [sknsNormal]), + (Name: 'Toolbar'; States: [sknsNormal]), + (Name: 'ToolbarGrip'; States: [sknsNormal]), + (Name: 'Window'; States: [sknsNormal]), + (Name: 'WindowTitleBar'; States: [sknsNormal]), + // Multi state Components + (Name: 'MenuBarItem'; States: CSpTBXSkinAllStates), + (Name: 'MenuItem'; States: CSpTBXSkinAllStates), + (Name: 'ToolbarItem'; States: CSpTBXSkinAllStates), + (Name: 'Button'; States: CSpTBXSkinAllStates), + (Name: 'CheckBox'; States: CSpTBXSkinAllStates), + (Name: 'EditButton'; States: CSpTBXSkinAllStates), + (Name: 'EditFrame'; States: [sknsNormal, sknsDisabled, sknsHotTrack]), + (Name: 'Header'; States: [sknsNormal, sknsDisabled, sknsHotTrack, sknsPushed]), + (Name: 'Label'; States: [sknsNormal, sknsDisabled]), + (Name: 'ListItem'; States: CSpTBXSkinAllStates), + (Name: 'ProgressBar'; States: [sknsNormal, sknsHotTrack]), + (Name: 'RadioButton'; States: CSpTBXSkinAllStates), + (Name: 'Tab'; States: CSpTBXSkinAllStates), + (Name: 'TrackBar'; States: [sknsNormal, sknsHotTrack]), + (Name: 'TrackBarButton'; States: [sknsNormal, sknsPushed]) + ); + + SSpTBXSkinStatesString: array [TSpTBXSkinStatesType] of string = ('Normal', 'Disabled', 'HotTrack', 'Pushed', 'Checked', 'CheckedAndHotTrack'); + SSpTBXSkinDisplayStatesString: array [TSpTBXSkinStatesType] of string = ('Normal', 'Disabled', 'Hot', 'Pushed', 'Checked', 'Checked && Hot'); + +type + { Text } + + TSpTextRotationAngle = ( + tra0, // No rotation + tra90, // 90 degree rotation + tra270 // 270 degree rotation + ); + + TSpTBXTextInfo = record + Text: WideString; + TextAngle: TSpTextRotationAngle; + TextFlags: Cardinal; + TextSize: TSize; + IsCaptionShown: Boolean; + IsTextRotated: Boolean; + end; + + TSpGlyphLayout = ( + ghlGlyphLeft, // Glyph icon on the left of the caption + ghlGlyphTop // Glyph icon on the top of the caption + ); + + TSpGlowDirection = ( + gldNone, // No glow + gldAll, // Glow on Left, Top, Right and Bottom of the text + gldTopLeft, // Glow on Top-Left of the text + gldBottomRight // Glow on Bottom-Right of the text + ); + + { MenuItem } + + TSpTBXComboPart = (cpNone, cpCombo, cpSplitLeft, cpSplitRight); + TSpTBXMenuItemMarginsInfo = record + Margins: TRect; // MenuItem margins + GutterSize: Integer; // Size of the gutter + LeftCaptionMargin: Integer; // Left margin of the caption + RightCaptionMargin: Integer; // Right margin of the caption + ImageTextSpace: Integer; // Space between the Icon and the caption + end; + + TSpTBXMenuItemInfo = record + Enabled: Boolean; + HotTrack: Boolean; + Pushed: Boolean; + Checked: Boolean; + HasArrow: Boolean; + ImageShown: Boolean; + ImageOrCheckShown: Boolean; + ImageSize: TSize; + RightImageSize: TSize; + IsDesigning: Boolean; + IsOnMenuBar: Boolean; + IsOnToolbox: Boolean; + IsOpen: Boolean; + IsSplit: Boolean; + IsSunkenCaption: Boolean; + IsVertical: Boolean; + MenuMargins: TSpTBXMenuItemMarginsInfo; // Used only on menu items + ComboPart: TSpTBXComboPart; + ComboRect: TRect; + ComboState: TSpTBXSkinStatesType; + ToolbarStyle: Boolean; + State: TSpTBXSkinStatesType; + SkinType: TSpTBXSkinType; + end; + + { Colors } + + TSpTBXColorTextType = ( + cttDefault, // Default format (clWhite, $FFFFFF) + cttHTML, // HTML format (#FFFFFF) + cttIdentAndHTML // Use color idents (clWhite), if not possible use HTML format + ); + + { TSpTBXSkinOptions } + + TSpTBXSkinOptionEntry = class(TPersistent) + private + FSkinType: Integer; + FColor1, FColor2, FColor3, FColor4: TColor; + protected + procedure AssignTo(Dest: TPersistent); override; + public + constructor Create; virtual; + procedure Fill(ASkinType: Integer; AColor1, AColor2, AColor3, AColor4: TColor); + procedure ReadFromString(S: string); + function WriteToString: string; + function IsEmpty: Boolean; + function IsEqual(AOptionEntry: TSpTBXSkinOptionEntry): Boolean; + procedure Lighten(Amount: Integer); + procedure Reset; + published + property SkinType: Integer read FSkinType write FSkinType; + property Color1: TColor read FColor1 write FColor1; + property Color2: TColor read FColor2 write FColor2; + property Color3: TColor read FColor3 write FColor3; + property Color4: TColor read FColor4 write FColor4; + end; + + TSpTBXSkinOptionCategory = class(TPersistent) + private + FBody: TSpTBXSkinOptionEntry; + FBorders: TSpTBXSkinOptionEntry; + FTextColor: TColor; + protected + procedure AssignTo(Dest: TPersistent); override; + public + constructor Create; virtual; + destructor Destroy; override; + function IsEmpty: Boolean; + procedure Reset; + procedure LoadFromIni(MemIni: TMemIniFile; Section, Ident: string); + procedure SaveToIni(MemIni: TMemIniFile; Section, Ident: string); + published + property Body: TSpTBXSkinOptionEntry read FBody write FBody; + property Borders: TSpTBXSkinOptionEntry read FBorders write FBorders; + property TextColor: TColor read FTextColor write FTextColor; + end; + + TSpTBXSkinOptions = class(TPersistent) + private + FColorBtnFace: TColor; + FFloatingWindowBorderSize: Integer; + FOptions: array [TSpTBXSkinComponentsType, TSpTBXSkinStatesType] of TSpTBXSkinOptionCategory; + FOfficeIcons: Boolean; + FOfficeMenu: Boolean; + FOfficeStatusBar: Boolean; + FSkinAuthor: string; + FSkinName: string; + function GetOfficeIcons: Boolean; + function GetOfficeMenu: Boolean; + function GetOfficePopup: Boolean; + function GetOfficeStatusBar: Boolean; + function GetFloatingWindowBorderSize: Integer; + procedure SetFloatingWindowBorderSize(const Value: Integer); + protected + procedure AssignTo(Dest: TPersistent); override; + procedure BroadcastChanges; + public + constructor Create; virtual; + destructor Destroy; override; + procedure CopyOptions(AComponent, ToComponent: TSpTBXSkinComponentsType); + procedure FillOptions; virtual; + function Options(Component: TSpTBXSkinComponentsType; State: TSpTBXSkinStatesType): TSpTBXSkinOptionCategory; overload; + function Options(Component: TSpTBXSkinComponentsType): TSpTBXSkinOptionCategory; overload; + procedure LoadFromFile(Filename: WideString); + procedure LoadFromStrings(L: TStrings); virtual; + procedure SaveToFile(Filename: WideString); + procedure SaveToStrings(L: TStrings); virtual; + procedure SaveToMemIni(MemIni: TMemIniFile); virtual; + procedure Reset(ForceResetSkinProperties: Boolean = False); + + // Metrics + procedure GetDropDownArrowSize(out DropDownArrowSize, DropDownArrowMargin, SplitBtnArrowSize: Integer); virtual; + procedure GetMenuItemMargins(ACanvas: TCanvas; ImgSize: Integer; out MarginsInfo: TSpTBXMenuItemMarginsInfo); virtual; + function GetState(Enabled, Pushed, HotTrack, Checked: Boolean): TSpTBXSkinStatesType; + function GetTextColor(Component: TSpTBXSkinComponentsType; State: TSpTBXSkinStatesType; SkinType: TSpTBXSkinType = sknSkin): TColor; virtual; + + // Skin Paint + procedure PaintBackground(ACanvas: TCanvas; ARect: TRect; Component: TSpTBXSkinComponentsType; State: TSpTBXSkinStatesType; Background, Borders: Boolean; Vertical: Boolean = False; ForceRectBorders: TAnchors = []); virtual; + + // Element Paint + procedure PaintMenuCheckMark(ACanvas: TCanvas; ARect: TRect; Checked, Grayed, MenuItemStyle: Boolean; State: TSpTBXSkinStatesType); virtual; + procedure PaintMenuRadioMark(ACanvas: TCanvas; ARect: TRect; Checked, MenuItemStyle: Boolean; State: TSpTBXSkinStatesType); virtual; + procedure PaintWindowFrame(ACanvas: TCanvas; ARect: TRect; IsActive, DrawBody: Boolean; BorderSize: Integer = 4); virtual; + + // Properties + property ColorBtnFace: TColor read FColorBtnFace write FColorBtnFace; + property FloatingWindowBorderSize: Integer read GetFloatingWindowBorderSize write SetFloatingWindowBorderSize; + property OfficeIcons: Boolean read GetOfficeIcons write FOfficeIcons; + property OfficeMenu: Boolean read GetOfficeMenu write FOfficeMenu; + property OfficePopup: Boolean read GetOfficePopup; + property OfficeStatusBar: Boolean read GetOfficeStatusBar write FOfficeStatusBar; + property SkinAuthor: string read FSkinAuthor write FSkinAuthor; + property SkinName: string read FSkinName write FSkinName; + end; + + TSpTBXSkinOptionsClass = class of TSpTBXSkinOptions; + + { TSpTBXSkinsList } + + TSpTBXSkinsListEntry = class + public + SkinClass: TSpTBXSkinOptionsClass; + SkinStrings: TStringList; + destructor Destroy; override; + end; + + TSpTBXSkinsList = class(TStringList) + private + function GetSkinOption(Index: Integer): TSpTBXSkinsListEntry; + public + procedure Delete(Index: Integer); override; + destructor Destroy; override; + function AddSkin(SkinName: string; SkinClass: TSpTBXSkinOptionsClass): Integer; overload; + function AddSkin(SkinOptions: TStrings): Integer; overload; + function AddSkinFromFile(Filename: WideString): Integer; + procedure AddSkinsFromFolder(Folder: WideString); + procedure GetSkinNames(SkinNames: TStrings); + property SkinOptions[Index: Integer]: TSpTBXSkinsListEntry read GetSkinOption; + end; + + { TSpTBXSkinManager } + + TSpTBXSkinManager = class + private + FCurrentSkin: TSpTBXSkinOptions; + FNotifies: TList; + FSkinsList: TSpTBXSkinsList; + FOnSkinChange: TNotifyEvent; + procedure Broadcast; + function GetCurrentSkinName: string; + public + constructor Create; virtual; + destructor Destroy; override; + + function GetSkinType: TSpTBXSkinType; + function IsDefaultSkin: Boolean; + function IsXPThemesEnabled: Boolean; + + procedure AddSkinNotification(AObject: TObject); + procedure RemoveSkinNotification(AObject: TObject); + procedure BroadcastSkinNotification; + + procedure LoadFromFile(Filename: WideString); + procedure SaveToFile(Filename: WideString); + + procedure SetToDefaultSkin; + procedure SetSkin(SkinName: string); + procedure ChangeControlSkinType(Control: TWinControl; SkinType: TSpTBXSkinType; Recursive: Boolean = True); + + property CurrentSkin: TSpTBXSkinOptions read FCurrentSkin; + property CurrentSkinName: string read GetCurrentSkinName; + property SkinsList: TSpTBXSkinsList read FSkinsList; + property OnSkinChange: TNotifyEvent read FOnSkinChange write FOnSkinChange; + end; + + { TSpTBXSkinSwitcher } + + TSpTBXSkinSwitcher = class(TComponent) + private + FOnSkinChange: TNotifyEvent; + function GetSkin: string; + procedure SetSkin(const Value: string); + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + property Skin: string read GetSkin write SetSkin; + property OnSkinChange: TNotifyEvent read FOnSkinChange write FOnSkinChange; + end; + + { TSpPrintWindow } + // Use SpPrintWindow instead of PaintTo as many controls will not render + // properly (no text on editors, no scrollbars, incorrect borders, etc) + // http://msdn2.microsoft.com/en-us/library/ms535695.aspx + TSpPrintWindow = function(Hnd: HWND; HdcBlt: HDC; nFlags: UINT): BOOL; stdcall; + +{ Themes } +function SkinManager: TSpTBXSkinManager; +function CurrentSkin: TSpTBXSkinOptions; +function SpTBXSkinType(T: TSpTBXSkinType): TSpTBXSkinType; +function SpGetLunaScheme: TSpTBXLunaScheme; +procedure SpDrawParentBackground(Control: TControl; DC: HDC; R: TRect); + +{ WideString helpers } +function SpCreateRotatedFont(DC: HDC; Orientation: Integer = 2700): HFONT; +function SpDrawRotatedText(const DC: HDC; AText: WideString; var ARect: TRect; const AFormat: Cardinal; RotationAngle: TSpTextRotationAngle = tra270): Integer; +function SpCalcXPText(ACanvas: TCanvas; ARect: TRect; Caption: WideString; CaptionAlignment: TAlignment; Flags: Cardinal; GlyphSize, RightGlyphSize: TSize; Layout: TSpGlyphLayout; PushedCaption: Boolean; out ACaptionRect, AGlyphRect, ARightGlyphRect: TRect; RotationAngle: TSpTextRotationAngle = tra0): Integer; +function SpDrawXPText(ACanvas: TCanvas; Caption: WideString; var ARect: TRect; Flags: Cardinal; CaptionGlow: TSpGlowDirection = gldNone; CaptionGlowColor: TColor = clYellow; RotationAngle: TSpTextRotationAngle = tra0): Integer; overload; +function SpDrawXPText(ACanvas: TCanvas; ARect: TRect; Caption: WideString; CaptionGlow: TSpGlowDirection; CaptionGlowColor: TColor; CaptionAlignment: TAlignment; Flags: Cardinal; GlyphSize: TSize; Layout: TSpGlyphLayout; PushedCaption: Boolean; out ACaptionRect, AGlyphRect: TRect; RotationAngle: TSpTextRotationAngle = tra0): Integer; overload; +function SpDrawXPText(ACanvas: TCanvas; ARect: TRect; Caption: WideString; CaptionGlow: TSpGlowDirection; CaptionGlowColor: TColor; CaptionAlignment: TAlignment; Flags: Cardinal; IL: TCustomImageList; ImageIndex: Integer; Layout: TSpGlyphLayout; Enabled, PushedCaption, DisabledIconCorrection: Boolean; out ACaptionRect, AGlyphRect: TRect; RotationAngle: TSpTextRotationAngle = tra0): Integer; overload; +function SpGetTextSize(DC: HDC; WS: WideString; NoPrefix: Boolean): TSize; +function SpGetControlTextHeight(AControl: TControl; AFont: TFont): Integer; +function SpGetControlTextSize(AControl: TControl; AFont: TFont; WS: WideString): TSize; +function SpSameText(W1, W2: WideString): Boolean; +function SpStripAccelChars(S: WideString): WideString; +function SpStripShortcut(S: WideString): WideString; +function SpStripTrailingPunctuation(S: WideString): WideString; +function SpRectToString(R: TRect): string; +function SpStringToRect(S: string; out R: TRect): Boolean; + +{ Color helpers } +function SpColorToHTML(const Color: TColor): string; +function SpColorToString(const Color: TColor; TextType: TSpTBXColorTextType = cttDefault): string; +function SpStringToColor(S: string; out Color: TColor): Boolean; +procedure SpGetRGB(Color: TColor; out R, G, B: Integer); +function SpRGBToColor(R, G, B: Integer): TColor; +function SpLighten(Color: TColor; Amount: Integer): TColor; +function SpBlendColors(TargetColor, BaseColor: TColor; Percent: Integer): TColor; +function SpMixColors(TargetColor, BaseColor: TColor; Amount: Byte): TColor; + +{ Painting helpers } +function SpCenterRect(Parent: TRect; ChildWidth, ChildHeight: Integer): TRect; overload; +function SpCenterRect(Parent, Child: TRect): TRect; overload; +function SpCenterRectHoriz(Parent: TRect; ChildWidth: Integer): TRect; +function SpCenterRectVert(Parent: TRect; ChildHeight: Integer): TRect; +procedure SpFillRect(ACanvas: TCanvas; const ARect: TRect; BrushColor: TColor; PenColor: TColor = clNone); +procedure SpDrawLine(ACanvas: TCanvas; X1, Y1, X2, Y2: Integer; Color: TColor); +procedure SpDrawRectangle(ACanvas: TCanvas; ARect: TRect; CornerSize: Integer; ColorTL, ColorBR: TColor; ColorTLInternal: TColor = clNone; ColorBRInternal: TColor = clNone; ForceRectBorders: TAnchors = []); overload; +procedure SpDrawRectangle(ACanvas: TCanvas; ARect: TRect; CornerSize: Integer; ColorL, ColorT, ColorR, ColorB, InternalColorL, InternalColorT, InternalColorR, InternalColorB: TColor; ForceRectBorders: TAnchors = []); overload; +procedure SpAlphaBlend(SrcDC, DstDC: HDC; SrcR, DstR: TRect; Alpha: Byte; SrcHasAlphaChannel: Boolean = False); +procedure SpPaintTo(WinControl: TWinControl; ACanvas: TCanvas; X, Y: Integer); + +{ ImageList painting } +procedure SpDrawIconShadow(ACanvas: TCanvas; const ARect: TRect; ImageList: TCustomImageList; ImageIndex: Integer); +procedure SpDrawImageList(ACanvas: TCanvas; const ARect: TRect; ImageList: TCustomImageList; ImageIndex: Integer; Enabled, DisabledIconCorrection: Boolean); + +{ Gradients } +procedure SpGradient(ACanvas: TCanvas; const ARect: TRect; StartPos, EndPos, ChunkSize: Integer; C1, C2: TColor; const Vertical: Boolean); +procedure SpGradientFill(ACanvas: TCanvas; const ARect: TRect; const C1, C2: TColor; const Vertical: Boolean); +procedure SpGradientFillMirror(ACanvas: TCanvas; const ARect: TRect; const C1, C2, C3, C4: TColor; const Vertical: Boolean); +procedure SpGradientFillMirrorTop(ACanvas: TCanvas; const ARect: TRect; const C1, C2, C3, C4: TColor; const Vertical: Boolean); +procedure SpGradientFillGlass(ACanvas: TCanvas; const ARect: TRect; const C1, C2, C3, C4: TColor; const Vertical: Boolean); + +{ Element painting } +procedure SpDrawArrow(ACanvas: TCanvas; X, Y: Integer; AColor: TColor; Vertical, Reverse: Boolean; Size: Integer); +procedure SpDrawDropMark(ACanvas: TCanvas; DropMark: TRect); +procedure SpDrawFocusRect(ACanvas: TCanvas; const ARect: TRect); +procedure SpDrawGlyphPattern(DC: HDC; const R: TRect; Width, Height: Integer; const PatternBits; PatternColor: TColor); overload; +procedure SpDrawGlyphPattern(ACanvas: TCanvas; ARect: TRect; PatternIndex: Integer; PatternColor: TColor); overload; +procedure SpDrawXPButton(ACanvas: TCanvas; ARect: TRect; Enabled, Pushed, HotTrack, Checked, Focused, Defaulted: Boolean; SkinType: TSpTBXSkinType); +procedure SpDrawXPCheckBoxGlyph(ACanvas: TCanvas; ARect: TRect; Enabled: Boolean; State: TCheckBoxState; HotTrack, Pushed: Boolean; SkinType: TSpTBXSkinType); +procedure SpDrawXPRadioButtonGlyph(ACanvas: TCanvas; ARect: TRect; Enabled, Checked, HotTrack, Pushed: Boolean; SkinType: TSpTBXSkinType); +procedure SpDrawXPEditFrame(ACanvas: TCanvas; ARect: TRect; Enabled, HotTrack: Boolean; SkinType: TSpTBXSkinType; ClipContent: Boolean = False; AutoAdjust: Boolean = False); overload; +procedure SpDrawXPEditFrame(AWinControl: TWinControl; HotTracking: Boolean; SkinType: TSpTBXSkinType; AutoAdjust: Boolean = False; HideFrame: Boolean = False); overload; +procedure SpDrawXPGrip(ACanvas: TCanvas; ARect: TRect; LoC, HiC: TColor); +procedure SpDrawXPHeader(ACanvas: TCanvas; ARect: TRect; HotTrack, Pushed: Boolean; SkinType: TSpTBXSkinType); +procedure SpDrawXPListItemBackground(ACanvas: TCanvas; ARect: TRect; Selected, HotTrack, Focused: Boolean; SkinType: TSpTBXSkinType; ForceRectBorders: Boolean = False; Borders: Boolean = True); + +{ Skins painting } +procedure SpPaintSkinBackground(ACanvas: TCanvas; ARect: TRect; SkinOption: TSpTBXSkinOptionCategory; Vertical: Boolean); +procedure SpPaintSkinBorders(ACanvas: TCanvas; ARect: TRect; SkinOption: TSpTBXSkinOptionCategory; ForceRectBorders: TAnchors = []); + +{ Misc } +function SpIsWinVistaOrUp: Boolean; +function SpGetDirectories(Path: WideString; L: TStringList): Boolean; + +{ Stock Objects } +var + StockBitmap: TBitmap; + SpPrintWindow: TSpPrintWindow = nil; + +implementation + +uses + UxTheme, Themes, Forms, Math, TypInfo, SpTBXDefaultSkins; + +var + FInternalSkinManager: TSpTBXSkinManager = nil; + + {$IFDEF SYSTEM_GRADIENT} + FMsimg32Library: HMODULE; + {$ENDIF} + +const + ROP_DSPDxax = $00E20746; + +type + TTriVertex = packed record + X: Integer; + Y: Integer; + Red: WORD; + Green: WORD; + Blue: WORD; + Alpha: WORD; + end; + + TControlAccess = class(TControl); + +{$IFDEF SYSTEM_GRADIENT} +var + GradientFillSystem: function (ADC: THandle; const AVertex: TTriVertex; ANumVertex: Integer; + const AMesh: TGradientRect; ANumMesh: Integer; AMode: DWORD): Boolean; stdcall; +{$ENDIF} + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Skin Notification } + +function SkinManager: TSpTBXSkinManager; +begin + if not Assigned(FInternalSkinManager) then + FInternalSkinManager := TSpTBXSkinManager.Create; + Result := FInternalSkinManager; +end; + +function CurrentSkin: TSpTBXSkinOptions; +begin + Result := SkinManager.CurrentSkin; +end; + +function SpTBXSkinType(T: TSpTBXSkinType): TSpTBXSkinType; +begin + Result := T; + if (Result = sknSkin) and SkinManager.IsDefaultSkin then + Result := sknWindows; + if (Result = sknWindows) and not SkinManager.IsXPThemesEnabled then + Result := sknNone; +end; + +function SpGetLunaScheme: TSpTBXLunaScheme; +const + MaxChars = 1024; +var + pszThemeFileName, pszColorBuff, pszSizeBuf: PWideChar; + S: string; +begin + Result := lusUnknown; + + if SkinManager.IsXPThemesEnabled then begin + GetMem(pszThemeFileName, 2 * MaxChars); + GetMem(pszColorBuff, 2 * MaxChars); + GetMem(pszSizeBuf, 2 * MaxChars); + try + if not Failed(GetCurrentThemeName(pszThemeFileName, MaxChars, pszColorBuff, MaxChars, pszSizeBuf, MaxChars)) then + if UpperCase(ExtractFileName(pszThemeFileName)) = 'LUNA.MSSTYLES' then begin + S := UpperCase(pszColorBuff); + if S = 'NORMALCOLOR' then + Result := lusBlue + else if S = 'METALLIC' then + Result := lusMetallic + else if S = 'HOMESTEAD' then + Result := lusGreen; + end; + finally + FreeMem(pszSizeBuf); + FreeMem(pszColorBuff); + FreeMem(pszThemeFileName); + end; + end; +end; + +procedure SpDrawParentBackground(Control: TControl; DC: HDC; R: TRect); +// Delphi 2007 and Vista compatible +var + Parent: TWinControl; + P: TPoint; + Brush: HBRUSH; +begin + Parent := Control.Parent; + if Parent = nil then begin + Brush := CreateSolidBrush(ColorToRGB(clBtnFace)); + Windows.FillRect(DC, R, Brush); + end + else if Parent.HandleAllocated then begin + if not Parent.DoubleBuffered and (Control is TWinControl) and SkinManager.IsXPThemesEnabled then + UxTheme.DrawThemeParentBackground(TWinControl(Control).Handle, DC, @R) + else begin + // Same as Controls.PerformEraseBackground + GetWindowOrgEx(DC, P); + SetWindowOrgEx(DC, P.X + Control.Left, P.Y + Control.Top, nil); + Parent.Perform(WM_ERASEBKGND, Integer(DC), Integer(DC)); + SetWindowOrgEx(DC, P.X, P.Y, nil); + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ WideString helpers} + +function EnumFontsProc(const lplf: TLogFont; const lptm: TTextMetric; + dwType: DWORD; lpData: LPARAM): Integer; stdcall; +begin + Boolean(Pointer(lpData)^) := True; + Result := 0; +end; + +function SpCreateRotatedFont(DC: HDC; Orientation: Integer = 2700): HFONT; +var + LogFont: TLogFont; + TM: TTextMetric; + VerticalFontName: array[0..LF_FACESIZE-1] of Char; + VerticalFontExists: Boolean; +begin + if GetObject(GetCurrentObject(DC, OBJ_FONT), SizeOf(LogFont), + @LogFont) = 0 then begin + { just in case... } + Result := 0; + Exit; + end; + LogFont.lfEscapement := Orientation; + LogFont.lfOrientation := Orientation; + LogFont.lfOutPrecision := OUT_TT_ONLY_PRECIS; { needed for Win9x } + + { Don't let a random TrueType font be substituted when MS Sans Serif or + Microsoft Sans Serif are used. On Windows 2000 and later, hard-code Tahoma + because Arial can't display Japanese or Thai Unicode characters (on Windows + 2000 at least). On earlier versions, hard-code Arial since NT 4.0 doesn't + ship with Tahoma, and 9x doesn't do Unicode. } + if (StrIComp(LogFont.lfFaceName, 'MS Sans Serif') = 0) or + (StrIComp(LogFont.lfFaceName, 'Microsoft Sans Serif') = 0) then begin + if Win32MajorVersion >= 5 then + StrPCopy(LogFont.lfFaceName, 'Tahoma') + else + StrPCopy(LogFont.lfFaceName, 'Arial'); + { Set lfHeight to the actual height of the current font. This is needed + to work around a Windows 98 issue: on a clean install of the OS, + SPI_GETNONCLIENTMETRICS returns -5 for lfSmCaptionFont.lfHeight. This is + wrong; it should return -11 for an 8 pt font. With normal, unrotated text + this actually displays correctly, since MS Sans Serif doesn't support + sizes below 8 pt. However, when we change to a TrueType font like Arial, + this becomes a problem because it'll actually create a font that small. } + if GetTextMetrics(DC, TM) then begin + { If the original height was negative, keep it negative } + if LogFont.lfHeight <= 0 then + LogFont.lfHeight := -(TM.tmHeight - TM.tmInternalLeading) + else + LogFont.lfHeight := TM.tmHeight; + end; + end; + + { Use a vertical font if available so that Asian characters aren't drawn + sideways } + if StrLen(LogFont.lfFaceName) < SizeOf(VerticalFontName)-1 then begin + VerticalFontName[0] := '@'; + StrCopy(@VerticalFontName[1], LogFont.lfFaceName); + VerticalFontExists := False; + EnumFonts(DC, VerticalFontName, @EnumFontsProc, @VerticalFontExists); + if VerticalFontExists then + StrCopy(LogFont.lfFaceName, VerticalFontName); + end; + + Result := CreateFontIndirect(LogFont); +end; + +function SpDrawRotatedText(const DC: HDC; AText: WideString; var ARect: TRect; const AFormat: Cardinal; RotationAngle: TSpTextRotationAngle = tra270): Integer; +{ The format flag this function respects are + DT_CALCRECT, DT_NOPREFIX, DT_HIDEPREFIX, DT_CENTER, DT_END_ELLIPSIS, DT_NOCLIP } +var + RotatedFont, SaveFont: HFONT; + TextMetrics: TTextMetric; + X, Y, P, I, SU, FU, W: Integer; + SaveAlign: UINT; + Clip: Boolean; + Pen, SavePen: HPEN; + Sz: TSize; + Orientation: Integer; +begin + Result := 0; + if Length(AText) = 0 then Exit; + + Orientation := 0; + case RotationAngle of + tra90: Orientation := 900; // 90 degrees + tra270: Orientation := 2700; // 270 degrees + end; + RotatedFont := SpCreateRotatedFont(DC, Orientation); + SaveFont := SelectObject(DC, RotatedFont); + + GetTextMetrics(DC, TextMetrics); + X := ARect.Left + (ARect.Right - ARect.Left - TextMetrics.tmHeight) div 2; + + Clip := AFormat and DT_NOCLIP = 0; + + { Find the index of the character that should be underlined. Delete '&' + characters from the string. Like DrawText, only the last prefixed character + will be underlined. } + P := 0; + I := 1; + if AFormat and DT_NOPREFIX = 0 then + while I <= Length(AText) do + begin + if AText[I] = '&' then + begin + Delete(AText, I, 1); + if PWideChar(AText)[I - 1] <> '&' then P := I; + end; + Inc(I); + end; + + if AFormat and DT_END_ELLIPSIS <> 0 then + begin + if (Length(AText) > 1) and (SpGetTextSize(DC, AText, False).cx > ARect.Bottom - ARect.Top) then + begin + W := ARect.Bottom - ARect.Top; + if W > 2 then + begin + Delete(AText, Length(AText), 1); + while (Length(AText) > 1) and (SpGetTextSize(DC, AText + '...', False).cx > W) do + Delete(AText, Length(AText), 1); + end + else AText := AText[1]; + if P > Length(AText) then P := 0; + AText := AText + '...'; + end; + end; + + Sz := SpGetTextSize(DC, AText, False); + Result := Sz.cy; + + if AFormat and DT_CALCRECT <> 0 then begin + ARect.Right := ARect.Left + Sz.cy; + ARect.Bottom := ARect.Top + Sz.cx; + end + else begin + if AFormat and DT_CENTER <> 0 then + Y := ARect.Top + (ARect.Bottom - ARect.Top - Sz.cx) div 2 + else + Y := ARect.Top; + + if Clip then + begin + SaveDC(DC); + with ARect do IntersectClipRect(DC, Left, Top, Right, Bottom); + end; + + case RotationAngle of + tra90: SaveAlign := SetTextAlign(DC, TA_RIGHT); + tra270: SaveAlign := SetTextAlign(DC, TA_BOTTOM); + else + SaveAlign := SetTextAlign(DC, TA_LEFT); + end; + + if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then + Windows.TextOutA(DC, X, Y, PAnsiChar(AnsiString(AText)), Length(AnsiString(AText))) + else + Windows.TextOutW(DC, X, Y, PWideChar(AText), Length(AText)); + + SetTextAlign(DC, SaveAlign); + + { Underline } + if (P > 0) and (AFormat and DT_HIDEPREFIX = 0) then + begin + SU := SpGetTextSize(DC, Copy(AText, 1, P - 1), False).cx; + FU := SU + SpGetTextSize(DC, PWideChar(AText)[P - 1], False).cx; + Inc(X, TextMetrics.tmDescent - 2); + Pen := CreatePen(PS_SOLID, 1, GetTextColor(DC)); + SavePen := SelectObject(DC, Pen); + MoveToEx(DC, X, Y + SU, nil); + LineTo(DC, X, Y + FU); + SelectObject(DC, SavePen); + DeleteObject(Pen); + end; + + if Clip then RestoreDC(DC, -1); + end; + + SelectObject(DC, SaveFont); + DeleteObject(RotatedFont); +end; + +function SpCalcXPText(ACanvas: TCanvas; ARect: TRect; Caption: WideString; + CaptionAlignment: TAlignment; Flags: Cardinal; GlyphSize, RightGlyphSize: TSize; + Layout: TSpGlyphLayout; PushedCaption: Boolean; out ACaptionRect, AGlyphRect, ARightGlyphRect: TRect; + RotationAngle: TSpTextRotationAngle = tra0): Integer; +var + R: TRect; + TextOffset, Spacing, RightSpacing: TPoint; + CaptionSz: TSize; +begin + Result := 0; + ACaptionRect := Rect(0, 0, 0, 0); + AGlyphRect := Rect(0, 0, 0, 0); + ARightGlyphRect := Rect(0, 0, 0, 0); + TextOffset := Point(0, 0); + Spacing := Point(0, 0); + RightSpacing := Point(0, 0); + if (Caption <> '') and (GlyphSize.cx > 0) and (GlyphSize.cy > 0) then + Spacing := Point(4, 1); + if (Caption <> '') and (RightGlyphSize.cx > 0) and (RightGlyphSize.cy > 0) then + RightSpacing := Point(4, 1); + + Flags := Flags and not DT_CENTER; + Flags := Flags and not DT_VCENTER; + if CaptionAlignment = taRightJustify then + Flags := Flags or DT_RIGHT; + + // DT_END_ELLIPSIS and DT_PATH_ELLIPSIS doesn't work with rotated text + // http://support.microsoft.com/kb/249678 + // Revert the ARect if the text is rotated, from now on work on horizontal text !!! + if RotationAngle <> tra0 then + ARect := Rect(ARect.Top, ARect.Left, ARect.Bottom, ARect.Right); + + // Get the caption size + if ((Flags and DT_WORDBREAK) <> 0) or ((Flags and DT_END_ELLIPSIS) <> 0) or ((Flags and DT_PATH_ELLIPSIS) <> 0) then begin + if Layout = ghlGlyphLeft then // Glyph on left or right side + R := Rect(0, 0, ARect.Right - ARect.Left - GlyphSize.cx - Spacing.X - RightGlyphSize.cx - RightSpacing.X + 2, 1) + else // Glyph on top + R := Rect(0, 0, ARect.Right - ARect.Left + 2, 1); + end + else + R := Rect(0, 0, 1, 1); + + if (fsBold in ACanvas.Font.Style) and (RotationAngle = tra0) and (((Flags and DT_END_ELLIPSIS) <> 0) or ((Flags and DT_PATH_ELLIPSIS) <> 0)) then begin + // [Bugfix] Windows bug: + // When the Font is Bold and DT_END_ELLIPSIS or DT_PATH_ELLIPSIS is used + // DrawTextW returns an incorrect size if the string is unicode. + // The R.Right is reduced by 3 which cuts down the string and + // adds the ellipsis. + // We have to obtain the real size and check if it fits in the Rect. + CaptionSz := SpGetTextSize(ACanvas.Handle, Caption, True); + if CaptionSz.cx <= R.Right then begin + R := Rect(0, 0, CaptionSz.cx, CaptionSz.cy); + Result := CaptionSz.cy; + end; + end; + + if Result <= 0 then begin + Result := SpDrawXPText(ACanvas, Caption, R, Flags or DT_CALCRECT, gldNone, clYellow); + CaptionSz.cx := R.Right; + CaptionSz.cy := R.Bottom; + end; + + // ACaptionRect + if Result > 0 then begin + R.Top := ARect.Top + (ARect.Bottom - ARect.Top - CaptionSz.cy) div 2; // Vertically centered + R.Bottom := R.Top + CaptionSz.cy; + case CaptionAlignment of + taCenter: + R.Left := ARect.Left + (ARect.Right - ARect.Left - CaptionSz.cx) div 2; // Horizontally centered + taLeftJustify: + R.Left := ARect.Left; + taRightJustify: + R.Left := ARect.Right - CaptionSz.cx; + end; + R.Right := R.Left + CaptionSz.cx; + + // Since DT_END_ELLIPSIS and DT_PATH_ELLIPSIS doesn't work with rotated text + // try to fix it by padding the text 8 pixels to the right + if (RotationAngle <> tra0) and (R.Right + 8 < ARect.Right) then + if ((Flags and DT_END_ELLIPSIS) <> 0) or ((Flags and DT_PATH_ELLIPSIS) <> 0) then + R.Right := R.Right + 8; + + if PushedCaption then + OffsetRect(R, 1, 1); + + ACaptionRect := R; + end; + + // AGlyphRect + if (GlyphSize.cx > 0) and (GlyphSize.cy > 0) then begin + R := ARect; + + // If ghlGlyphTop is used the glyph should be centered + if Layout = ghlGlyphTop then + CaptionAlignment := taCenter; + + case CaptionAlignment of + taCenter: + begin + // Total width = Icon + Space + Text + if Layout = ghlGlyphLeft then begin + AGlyphRect.Left := R.Left + (R.Right - R.Left - (GlyphSize.cx + Spacing.X + CaptionSz.cx)) div 2; + TextOffset.X := (GlyphSize.cx + Spacing.X) div 2; + end + else + AGlyphRect.Left := R.Left + (R.Right - R.Left - GlyphSize.cx) div 2; + end; + taLeftJustify: + begin + AGlyphRect.Left := R.Left; + TextOffset.X := GlyphSize.cx + Spacing.X; + end; + taRightJustify: + begin + AGlyphRect.Left := R.Right - GlyphSize.cx; + TextOffset.X := - Spacing.X - GlyphSize.cx; + end; + end; + + if Layout = ghlGlyphLeft then + AGlyphRect.Top := R.Top + (R.Bottom - R.Top - GlyphSize.cy) div 2 + else begin + AGlyphRect.Top := R.Top + (R.Bottom - R.Top - (GlyphSize.cy + Spacing.Y + CaptionSz.cy)) div 2; + Inc(TextOffset.Y, (GlyphSize.cy + Spacing.Y) div 2); + end; + + AGlyphRect.Right := AGlyphRect.Left + GlyphSize.cx; + AGlyphRect.Bottom := AGlyphRect.Top + GlyphSize.cy; + + if PushedCaption then + OffsetRect(AGlyphRect, 1, 1); + end; + + // Move the text according to the icon position + if Result > 0 then + OffsetRect(ACaptionRect, TextOffset.X, TextOffset.Y); + + // ARightGlyphRect, it's valid only when using taLeftJustify + if (RightGlyphSize.cx > 0) and (RightGlyphSize.cy > 0) then + if CaptionAlignment = taLeftJustify then begin + R := ARect; + ARightGlyphRect.Left := R.Right - RightGlyphSize.cx; + ARightGlyphRect.Right := ARightGlyphRect.Left + RightGlyphSize.cx; + ARightGlyphRect.Top := R.Top + (R.Bottom - R.Top - RightGlyphSize.cy) div 2; + ARightGlyphRect.Bottom := ARightGlyphRect.Top + RightGlyphSize.cy; + if (Result > 0) and (ACaptionRect.Right > ARightGlyphRect.Left - RightSpacing.X) then + ACaptionRect.Right := ARightGlyphRect.Left - RightSpacing.X; + end; + + // Revert back, normalize when the text is rotated + if RotationAngle <> tra0 then begin + ACaptionRect := Rect(ACaptionRect.Top, ACaptionRect.Left, ACaptionRect.Bottom, ACaptionRect.Right); + AGlyphRect := Rect(AGlyphRect.Top, AGlyphRect.Left, AGlyphRect.Bottom, AGlyphRect.Right); + ARightGlyphRect := Rect(ARightGlyphRect.Top, ARightGlyphRect.Left, ARightGlyphRect.Bottom, ARightGlyphRect.Right); + end; +end; + +function SpDrawXPText(ACanvas: TCanvas; Caption: WideString; var ARect: TRect; + Flags: Cardinal; CaptionGlow: TSpGlowDirection = gldNone; + CaptionGlowColor: TColor = clYellow; RotationAngle: TSpTextRotationAngle = tra0): Integer; overload; + + function InternalDraw(var R: TRect): Integer; + begin + Result := 0; + case RotationAngle of + tra0: + if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then + Result := Windows.DrawTextA(ACanvas.Handle, PAnsiChar(AnsiString(Caption)), -1, R, Flags) + else + Result := Windows.DrawTextW(ACanvas.Handle, PWideChar(Caption), -1, R, Flags); + tra90, tra270: + Result := SpDrawRotatedText(ACanvas.Handle, Caption, R, Flags, RotationAngle); + end; + end; + +var + BS: TBrushStyle; + GlowR: TRect; + C, FC: TColor; +begin + BS := ACanvas.Brush.Style; + C := ACanvas.Brush.Color; + try + ACanvas.Brush.Style := bsClear; + + if (Flags and DT_CALCRECT = 0) and (CaptionGlow <> gldNone) then begin + FC := ACanvas.Font.Color; + ACanvas.Font.Color := CaptionGlowColor; + case CaptionGlow of + gldAll: + begin + GlowR := ARect; OffsetRect(GlowR, 0, -1); + InternalDraw(GlowR); + GlowR := ARect; OffsetRect(GlowR, 0, 1); + InternalDraw(GlowR); + GlowR := ARect; OffsetRect(GlowR, -1, 0); + InternalDraw(GlowR); + GlowR := ARect; OffsetRect(GlowR, 1, 0); + end; + gldTopLeft: + begin + GlowR := ARect; OffsetRect(GlowR, -1, -1); + InternalDraw(GlowR); + end; + gldBottomRight: + begin + GlowR := ARect; OffsetRect(GlowR, 1, 1); + InternalDraw(GlowR); + end; + end; + ACanvas.Font.Color := FC; + end; + + Result := InternalDraw(ARect); + + if IsRectEmpty(ARect) then + Result := 0 + else + if Flags and DT_CALCRECT <> 0 then begin + // [Bugfix] Windows bug: + // When DT_CALCRECT is used and the font is italic the + // resulting rect is incorrect + if fsItalic in ACanvas.Font.Style then + ARect.Right := ARect.Right + 1 + (ACanvas.Font.Size div 8) * 2; + end; + + finally + ACanvas.Brush.Style := BS; + ACanvas.Brush.Color := C; + end; +end; + +function SpDrawXPText(ACanvas: TCanvas; ARect: TRect; Caption: WideString; + CaptionGlow: TSpGlowDirection; CaptionGlowColor: TColor; CaptionAlignment: TAlignment; + Flags: Cardinal; GlyphSize: TSize; Layout: TSpGlyphLayout; PushedCaption: Boolean; + out ACaptionRect, AGlyphRect: TRect; + RotationAngle: TSpTextRotationAngle = tra0): Integer; overload; +var + DummyRightGlyphSize: TSize; + DummyRightGlyphRect: TRect; +begin + DummyRightGlyphSize.cx := 0; + DummyRightGlyphSize.cy := 0; + DummyRightGlyphRect := Rect(0, 0, 0, 0); + Result := SpCalcXPText(ACanvas, ARect, Caption, CaptionAlignment, Flags, GlyphSize, DummyRightGlyphSize, + Layout, PushedCaption, ACaptionRect, AGlyphRect, DummyRightGlyphRect, RotationAngle); + SpDrawXPText(ACanvas, Caption, ACaptionRect, Flags and not DT_CALCRECT, CaptionGlow, CaptionGlowColor, RotationAngle); +end; + +function SpDrawXPText(ACanvas: TCanvas; ARect: TRect; Caption: WideString; + CaptionGlow: TSpGlowDirection; CaptionGlowColor: TColor; CaptionAlignment: TAlignment; + Flags: Cardinal; IL: TCustomImageList; ImageIndex: Integer; Layout: TSpGlyphLayout; + Enabled, PushedCaption, DisabledIconCorrection: Boolean; out ACaptionRect, AGlyphRect: TRect; + RotationAngle: TSpTextRotationAngle = tra0): Integer; overload; +var + GlyphSize, DummyRightGlyphSize: TSize; + DummyRightGlyphRect: TRect; +begin + GlyphSize.cx := 0; + GlyphSize.cy := 0; + DummyRightGlyphSize.cx := 0; + DummyRightGlyphSize.cy := 0; + DummyRightGlyphRect := Rect(0, 0, 0, 0); + + if Assigned(IL) and (ImageIndex > -1) and (ImageIndex < IL.Count) then begin + GlyphSize.cx := IL.Width; + GlyphSize.cy := IL.Height; + end; + + Result := SpCalcXPText(ACanvas, ARect, Caption, CaptionAlignment, Flags, GlyphSize, DummyRightGlyphSize, + Layout, PushedCaption, ACaptionRect, AGlyphRect, DummyRightGlyphRect, RotationAngle); + + SpDrawXPText(ACanvas, Caption, ACaptionRect, Flags and not DT_CALCRECT, CaptionGlow, CaptionGlowColor, RotationAngle); + + if Assigned(IL) and (ImageIndex > -1) and (ImageIndex < IL.Count) then + SpDrawImageList(ACanvas, AGlyphRect, IL, ImageIndex, Enabled, DisabledIconCorrection); +end; + +function SpGetTextSize(DC: HDC; WS: WideString; NoPrefix: Boolean): TSize; +// Returns the size of the string, if NoPrefix is True, it first removes "&" +// characters as necessary. +// This procedure is 10x faster than using DrawText with the DT_CALCRECT flag +begin + Result.cx := 0; + Result.cy := 0; + if NoPrefix then + WS := SpStripAccelChars(WS); + if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then + Windows.GetTextExtentPoint32A(DC, PAnsiChar(AnsiString(WS)), Length(AnsiString(WS)), Result) + else + Windows.GetTextExtentPoint32W(DC, PWideChar(WS), Length(WS), Result); +end; + +function SpGetControlTextHeight(AControl: TControl; AFont: TFont): Integer; +// Returns the control text height based on the font +var + Sz: TSize; +begin + Sz := SpGetControlTextSize(AControl, AFont, 'WQqJ'); + Result := Sz.cy; +end; + +function SpGetControlTextSize(AControl: TControl; AFont: TFont; WS: WideString): TSize; +// Returns the control text size based on the font +var + ACanvas: TControlCanvas; +begin + ACanvas := TControlCanvas.Create; + try + ACanvas.Control := AControl; + ACanvas.Font.Assign(AFont); + Result := SpGetTextSize(ACanvas.Handle, WS, False); + finally + ACanvas.Free; + end; +end; + +function SpSameText(W1, W2: WideString): Boolean; +begin + {$IFNDEF UNICODE} + if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then + Result := AnsiSameText(AnsiString(W1), AnsiString(W2)) + else + Result := WideSameText(W1, W2); + {$ELSE} + Result := WideSameText(W1, W2); + {$ENDIF} +end; + +function SpStripAccelChars(S: WideString): WideString; +var + I: Integer; +begin + Result := S; + I := 1; + while I <= Length(Result) do begin + if Result[I] = '&' then + System.Delete(Result, I, 1); + Inc(I); + end; +end; + +function SpStripShortcut(S: WideString): WideString; +var + P: Integer; +begin + Result := S; + P := Pos(#9, Result); + if P <> 0 then + SetLength(Result, P - 1); +end; + +function SpStripTrailingPunctuation(S: WideString): WideString; +// Removes any colon (':') or ellipsis ('...') from the end of S and returns +// the resulting string +var + L: Integer; +begin + Result := S; + L := Length(Result); + if (L > 1) and (Result[L] = ':') then + SetLength(Result, L-1) + else if (L > 3) and (Result[L-2] = '.') and (Result[L-1] = '.') and + (Result[L] = '.') then + SetLength(Result, L-3); +end; + +function SpRectToString(R: TRect): string; +begin + Result := Format('%d, %d, %d, %d', [R.Left, R.Top, R.Right, R.Bottom]); +end; + +function SpStringToRect(S: string; out R: TRect): Boolean; +var + L: TStringList; +begin + Result := False; + R := Rect(0, 0, 0, 0); + L := TStringList.Create; + try + L.CommaText := S; + if L.Count = 4 then begin + R.Left := StrToIntDef(L[0], 0); + R.Top := StrToIntDef(L[1], 0); + R.Right := StrToIntDef(L[2], 0); + R.Bottom := StrToIntDef(L[3], 0); + Result := True; + end; + finally + L.Free; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Color Helpers } + +function SpColorToHTML(const Color: TColor): string; +var + R: TColorRef; +begin + R := ColorToRGB(Color); + Result := Format('#%.2x%.2x%.2x', [GetRValue(R), GetGValue(R), GetBValue(R)]); +end; + +function SpColorToString(const Color: TColor; TextType: TSpTBXColorTextType = cttDefault): string; +begin + case TextType of + cttDefault: + Result := ColorToString(Color); + cttHTML: + Result := SpColorToHTML(Color); + cttIdentAndHTML: + begin + Result := ColorToString(Color); + if (Length(Result) > 0) and (Result[1] = '$') then + Result := SpColorToHTML(Color); + end; + end; +end; + +function SpStringToColor(S: string; out Color: TColor): Boolean; +var + E, L: Integer; +begin + Result := False; + Color := clDefault; + L := Length(S); + if L < 2 then Exit; + + if (S[1] = '#') and (L = 7) then begin + Delete(S, 1, 1); // strip the # char + S := Format('$00%s%s%s', [Copy(S, 5, 2), Copy(S, 3, 2), Copy(S, 1, 2)]); + Color := StringToColor(S); + Result := True; + end + else begin + Result := IdentToColor(S, Longint(Color)); + if not Result and (L > 6) and (L < 10) and (S[1] = '$') then begin + Val(S, Color, E); + Result := E = 0; + end; + end; +end; + +procedure SpGetRGB(Color: TColor; out R, G, B: Integer); +begin + Color := ColorToRGB(Color); + R := GetRValue(Color); + G := GetGValue(Color); + B := GetBValue(Color); +end; + +function SpRGBToColor(R, G, B: Integer): TColor; +begin + if R < 0 then R := 0 else if R > 255 then R := 255; + if G < 0 then G := 0 else if G > 255 then G := 255; + if B < 0 then B := 0 else if B > 255 then B := 255; + Result := TColor(RGB(R, G, B)); +end; + +function SpLighten(Color: TColor; Amount: Integer): TColor; +var + R, G, B: Integer; +begin + Color := ColorToRGB(Color); + R := GetRValue(Color) + Amount; + G := GetGValue(Color) + Amount; + B := GetBValue(Color) + Amount; + Result := SpRGBToColor(R, G, B); +end; + +function SpBlendColors(TargetColor, BaseColor: TColor; Percent: Integer): TColor; +// Blend 2 colors with a predefined percent (0..100 or 0..1000) +// If Percent is 0 the result will be BaseColor, +// If Percent is 100 the result will be TargetColor. +// Any other value will return a color between base and target. +// For example if you want to add 70% of yellow ($0000FFFF) to a color: +// NewColor := SpBlendColor($0000FFFF, BaseColor, 70); +// The result will have 70% of yellow and 30% of BaseColor +var + Percent2, D, F: Integer; + R, G, B, R2, G2, B2: Integer; +begin + SpGetRGB(TargetColor, R, G, B); + SpGetRGB(BaseColor, R2, G2, B2); + + if Percent >= 100 then D := 1000 + else D := 100; + Percent2 := D - Percent; + F := D div 2; + + R := (R * Percent + R2 * Percent2 + F) div D; + G := (G * Percent + G2 * Percent2 + F) div D; + B := (B * Percent + B2 * Percent2 + F) div D; + + Result := SpRGBToColor(R, G, B); +end; + +function SpMixColors(TargetColor, BaseColor: TColor; Amount: Byte): TColor; +// Mix 2 colors with a predefined amount (0..255). +// If Amount is 0 the result will be BaseColor, +// If Amount is 255 the result will be TargetColor. +// Any other value will return a color between base and target. +// For example if you want to add 50% of yellow ($0000FFFF) to a color: +// NewColor := SpMixColors($0000FFFF, BaseColor, 128); +// The result will be BaseColor + 50% of yellow +var + R1, G1, B1: Integer; + R2, G2, B2: Integer; +begin + SpGetRGB(BaseColor, R1, G1, B1); + SpGetRGB(TargetColor, R2, G2, B2); + + R1 := (R2 - R1) * Amount div 255 + R1; + G1 := (G2 - G1) * Amount div 255 + G1; + B1 := (B2 - B1) * Amount div 255 + B1; + + Result := SpRGBToColor(R1, G1, B1); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Painting Helpers } + +function SpCenterRect(Parent: TRect; ChildWidth, ChildHeight: Integer): TRect; +begin + Result.Left := Parent.Left + (Parent.Right - Parent.Left - ChildWidth) div 2; + Result.Top := Parent.Top + (Parent.Bottom - Parent.Top - ChildHeight) div 2; + Result.Right := Result.Left + ChildWidth; + Result.Bottom := Result.Top + ChildHeight; +end; + +function SpCenterRect(Parent, Child: TRect): TRect; +begin + Result := SpCenterRect(Parent, Child.Right - Child.Left, Child.Bottom - Child.Top); +end; + +function SpCenterRectHoriz(Parent: TRect; ChildWidth: Integer): TRect; +begin + Result.Left := Parent.Left + (Parent.Right - Parent.Left - ChildWidth) div 2; + Result.Right := Result.Left + ChildWidth; + Result.Top := Parent.Top; + Result.Bottom := Parent.Bottom; +end; + +function SpCenterRectVert(Parent: TRect; ChildHeight: Integer): TRect; +begin + Result.Left := Parent.Left; + Result.Right := Parent.Right; + Result.Top := Parent.Top + (Parent.Bottom - Parent.Top - ChildHeight) div 2; + Result.Bottom := Result.Top + ChildHeight; +end; + +procedure SpFillRect(ACanvas: TCanvas; const ARect: TRect; BrushColor: TColor; PenColor: TColor = clNone); +var + C, C2: TColor; +begin + if BrushColor <> clNone then begin + C := ACanvas.Brush.Color; + C2 := ACanvas.Pen.Color; + ACanvas.Brush.Color := BrushColor; + ACanvas.Pen.Color := PenColor; + if PenColor = clNone then + ACanvas.FillRect(ARect) + else + ACanvas.Rectangle(ARect); + ACanvas.Brush.Color := C; + ACanvas.Pen.Color := C2; + end; +end; + +procedure SpDrawLine(ACanvas: TCanvas; X1, Y1, X2, Y2: Integer; Color: TColor); +var + C: TColor; +begin + if Color <> clNone then begin + C := ACanvas.Pen.Color; + ACanvas.Pen.Color := Color; + ACanvas.MoveTo(X1, Y1); + ACanvas.LineTo(X2, Y2); + ACanvas.Pen.Color := C; + end; +end; + +procedure SpDrawRectangle(ACanvas: TCanvas; ARect: TRect; CornerSize: Integer; + ColorL, ColorT, ColorR, ColorB, + InternalColorL, InternalColorT, InternalColorR, InternalColorB: TColor; + ForceRectBorders: TAnchors = []); +// Draws 2 beveled borders. +// CornerSize can be 0, 1 or 2. +// Color: left, top, right, bottom external border color +// InternalColor: left, top, right, bottom internal border color +// ForceRectBorders: forces the borders to be rect +var + Color: TColor; + CornerSizeTL, CornerSizeTR, CornerSizeBL, CornerSizeBR: Integer; +begin + Color := ACanvas.Pen.Color; + + if CornerSize < 0 then CornerSize := 0; + if CornerSize > 2 then CornerSize := 2; + CornerSizeTL := CornerSize; + CornerSizeTR := CornerSize; + CornerSizeBL := CornerSize; + CornerSizeBR := CornerSize; + if akLeft in ForceRectBorders then begin + CornerSizeTL := 0; + CornerSizeBL := 0; + end; + if akRight in ForceRectBorders then begin + CornerSizeTR := 0; + CornerSizeBR := 0; + end; + if akTop in ForceRectBorders then begin + CornerSizeTL := 0; + CornerSizeTR := 0; + end; + if akBottom in ForceRectBorders then begin + CornerSizeBL := 0; + CornerSizeBR := 0; + end; + + with ARect do begin + Dec(Right); + Dec(Bottom); + + // Internal borders + InflateRect(ARect, -1, -1); + if InternalColorL <> clNone then begin + ACanvas.Pen.Color := InternalColorL; + ACanvas.PolyLine([Point(Left, Bottom), Point(Left, Top)]); + end; + if InternalColorT <> clNone then begin + ACanvas.Pen.Color := InternalColorT; + ACanvas.PolyLine([Point(Left, Top), Point(Right, Top)]); + end; + if InternalColorR <> clNone then begin + ACanvas.Pen.Color := InternalColorR; + ACanvas.PolyLine([Point(Right, Bottom), Point(Right, Top - 1)]); + end; + if InternalColorB <> clNone then begin + ACanvas.Pen.Color := InternalColorB; + ACanvas.PolyLine([Point(Left, Bottom), Point(Right, Bottom)]); + end; + + // External borders + InflateRect(ARect, 1, 1); + if ColorL <> clNone then begin + ACanvas.Pen.Color := ColorL; + ACanvas.PolyLine([ + Point(Left, Bottom - CornerSizeBL), + Point(Left, Top + CornerSizeTL) + ]); + end; + if ColorT <> clNone then begin + ACanvas.Pen.Color := ColorT; + ACanvas.PolyLine([ + Point(Left, Top + CornerSizeTL), + Point(Left + CornerSizeTL, Top), + Point(Right - CornerSizeTR + 1, Top), + Point(Right, Top + CornerSizeTR) + ]); + end; + if ColorR <> clNone then begin + ACanvas.Pen.Color := ColorR; + ACanvas.PolyLine([ + Point(Right, Top + CornerSizeTR), + Point(Right , Bottom - CornerSizeBR) + ]); + end; + if ColorB <> clNone then begin + ACanvas.Pen.Color := ColorB; + ACanvas.PolyLine([ + Point(Right, Bottom - CornerSizeBR), + Point(Right - CornerSizeBR, Bottom), + Point(Left + CornerSizeBL, Bottom), + Point(Left, Bottom - CornerSizeBL) + ]); + end; + end; + + ACanvas.Pen.Color := Color; +end; + + +procedure SpDrawRectangle(ACanvas: TCanvas; ARect: TRect; + CornerSize: Integer; ColorTL, ColorBR, ColorTLInternal, ColorBRInternal: TColor; + ForceRectBorders: TAnchors); +// Draws 2 beveled borders. +// CornerSize can be 0, 1 or 2. +// TLColor, ColorBR: external border color +// InternalTL, ColorBRInternal: internal border color +// ForceRectBorders: forces the borders to be rect +var + Color: TColor; + CornerSizeTL, CornerSizeTR, CornerSizeBL, CornerSizeBR: Integer; +begin + Color := ACanvas.Pen.Color; + + if CornerSize < 0 then CornerSize := 0; + if CornerSize > 2 then CornerSize := 2; + CornerSizeTL := CornerSize; + CornerSizeTR := CornerSize; + CornerSizeBL := CornerSize; + CornerSizeBR := CornerSize; + if akLeft in ForceRectBorders then begin + CornerSizeTL := 0; + CornerSizeBL := 0; + end; + if akRight in ForceRectBorders then begin + CornerSizeTR := 0; + CornerSizeBR := 0; + end; + if akTop in ForceRectBorders then begin + CornerSizeTL := 0; + CornerSizeTR := 0; + end; + if akBottom in ForceRectBorders then begin + CornerSizeBL := 0; + CornerSizeBR := 0; + end; + + with ARect do begin + Dec(Right); + Dec(Bottom); + + // Internal borders + InflateRect(ARect, -1, -1); + if ColorTLInternal <> clNone then begin + ACanvas.Pen.Color := ColorTLInternal; + ACanvas.PolyLine([ + Point(Left, Bottom), + Point(Left, Top), + Point(Right, Top) + ]); + end; + if ColorBRInternal <> clNone then begin + ACanvas.Pen.Color := ColorBRInternal; + ACanvas.PolyLine([ + Point(Left, Bottom), + Point(Right, Bottom), + Point(Right, Top - 1) + ]); + end; + + // External borders + InflateRect(ARect, 1, 1); + if ColorTL <> clNone then begin + ACanvas.Pen.Color := ColorTL; + ACanvas.PolyLine([ + Point(Left + CornerSizeBL, Bottom), + Point(Left, Bottom - CornerSizeBL), + Point(Left, Top + CornerSizeTL), + Point(Left + CornerSizeTL, Top), + Point(Right - CornerSizeTR, Top), + Point(Right, Top + CornerSizeTR) + ]); + end; + if ColorBR <> clNone then begin + ACanvas.Pen.Color := ColorBR; + ACanvas.PolyLine([ + Point(Right, Top + CornerSizeTR), + Point(Right , Bottom - CornerSizeBR), + Point(Right - CornerSizeBR, Bottom), + Point(Left + CornerSizeBL - 1, Bottom) + ]); + end; + end; + + ACanvas.Pen.Color := Color; +end; + +procedure SpAlphaBlend(SrcDC, DstDC: HDC; SrcR, DstR: TRect; Alpha: Byte; + SrcHasAlphaChannel: Boolean = False); +// NOTE: AlphaBlend does not work on Windows 95 and Windows NT +var + BF: TBlendFunction; +begin + BF.BlendOp := AC_SRC_OVER; + BF.BlendFlags := 0; + BF.SourceConstantAlpha := Alpha; + if SrcHasAlphaChannel then + BF.AlphaFormat := AC_SRC_ALPHA + else + BF.AlphaFormat := 0; + Windows.AlphaBlend(DstDC, DstR.Left, DstR.Top, DstR.Right - DstR.Left, DstR.Bottom - DstR.Top, + SrcDC, SrcR.Left, SrcR.Top, SrcR.Right - SrcR.Left, SrcR.Bottom - SrcR.Top, BF); +end; + +procedure SpPaintTo(WinControl: TWinControl; ACanvas: TCanvas; X, Y: Integer); +// NOTE: PrintWindow does not work if the control is not visible +var + B: TBitmap; + PrevTop: Integer; +begin + // Use SpPrintWindow instead of PaintTo as many controls will not render + // properly (no text on editors, no scrollbars, incorrect borders, etc) + // http://msdn2.microsoft.com/en-us/library/ms535695.aspx + if Assigned(SpPrintWindow) then begin + ACanvas.Lock; + try + // It doesn't work if the control is not visible !!! + // Show it and move it offscreen + if not WinControl.Visible then begin + PrevTop := WinControl.Top; + WinControl.Top := 10000; // Move it offscreen + WinControl.Visible := True; + SpPrintWindow(WinControl.Handle, ACanvas.Handle, 0); + WinControl.Visible := False; + WinControl.Top := PrevTop; + end + else + SpPrintWindow(WinControl.Handle, ACanvas.Handle, 0); + finally + ACanvas.UnLock; + end; + end + else begin + // If SpPrintWindow is not available use PaintTo + // If the Control is a Form use GetFormImage instead + if WinControl is TCustomForm then begin + B := TCustomForm(WinControl).GetFormImage; + try + ACanvas.Draw(X, Y, B); + finally + B.Free; + end; + end + else + WinControl.PaintTo(ACanvas, X, Y); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ ImageList painting } + +procedure SpDrawIconShadow(ACanvas: TCanvas; const ARect: TRect; + ImageList: TCustomImageList; ImageIndex: Integer); +var + ImageWidth, ImageHeight: Integer; + I, J: Integer; + Src, Dst: ^Cardinal; + S, C, CBRB, CBG: Cardinal; + B1, B2: TBitmap; +begin + ImageWidth := ARect.Right - ARect.Left; + ImageHeight := ARect.Bottom - ARect.Top; + with ImageList do + begin + if Width < ImageWidth then ImageWidth := Width; + if Height < ImageHeight then ImageHeight := Height; + end; + + B1 := TBitmap.Create; + B2 := TBitmap.Create; + try + B1.PixelFormat := pf32bit; + B2.PixelFormat := pf32bit; + B1.Width := ImageWidth; + B1.Height := ImageHeight; + B2.Width := ImageWidth; + B2.Height := ImageHeight; + + BitBlt(B1.Canvas.Handle, 0, 0, ImageWidth, ImageHeight, ACanvas.Handle, ARect.Left, ARect.Top, SRCCOPY); + BitBlt(B2.Canvas.Handle, 0, 0, ImageWidth, ImageHeight, ACanvas.Handle, ARect.Left, ARect.Top, SRCCOPY); + ImageList.Draw(B2.Canvas, 0, 0, ImageIndex, True); + + for J := 0 to ImageHeight - 1 do + begin + Src := B2.ScanLine[J]; + Dst := B1.ScanLine[J]; + for I := 0 to ImageWidth - 1 do + begin + S := Src^; + if S <> Dst^ then + begin + CBRB := Dst^ and $00FF00FF; + CBG := Dst^ and $0000FF00; + C := ((S and $00FF0000) shr 16 * 29 + (S and $0000FF00) shr 8 * 150 + + (S and $000000FF) * 76) shr 8; + C := (C div 3) + (255 - 255 div 3); + Dst^ := ((CBRB * C and $FF00FF00) or (CBG * C and $00FF0000)) shr 8; + end; + Inc(Src); + Inc(Dst); + end; + end; + BitBlt(ACanvas.Handle, ARect.Left, ARect.Top, ImageWidth, ImageHeight, B1.Canvas.Handle, 0, 0, SRCCOPY); + finally + B1.Free; + B2.Free; + end; +end; + +procedure SpDrawImageList(ACanvas: TCanvas; const ARect: TRect; ImageList: TCustomImageList; + ImageIndex: Integer; Enabled, DisabledIconCorrection: Boolean); +begin + if Assigned(ImageList) and (ImageIndex > -1) and (ImageIndex < ImageList.Count) then + if Enabled then + ImageList.Draw(ACanvas, ARect.Left, ARect.Top, ImageIndex) + else + if DisabledIconCorrection then + SpDrawIconShadow(ACanvas, ARect, ImageList, ImageIndex) + else + ImageList.Draw(ACanvas, ARect.Left, ARect.Top, ImageIndex, False); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Gradients } + +procedure SpGradient(ACanvas: TCanvas; const ARect: TRect; + StartPos, EndPos, ChunkSize: Integer; C1, C2: TColor; const Vertical: Boolean); +// StartPos: start position relative to ARect, usually 0 +// EndPos: end position relative to ARect, usually ARect.Bottom - ARect.Top +// ChunkSize: size of the chunk of the gradient we need to paint + + procedure SpGradientSoft(ACanvas: TCanvas; const ARect: TRect; + StartPos, EndPos, ChunkSize: Integer; C1, C2: TColor; const Vertical: Boolean); + var + I: Integer; + r, g, b: Integer; + rc1, gc1, bc1: Integer; + rc2, gc2, bc2: Integer; + PrevColor: TColor; + begin + PrevColor := ACanvas.Brush.Color; + if ChunkSize = 0 then ChunkSize := 1; + SpGetRGB(C1, rc1, gc1, bc1); + SpGetRGB(C2, rc2, gc2, bc2); + for I := StartPos to EndPos do begin + r := rc1 + (((rc2 - rc1) * (I - StartPos)) div ChunkSize); + g := gc1 + (((gc2 - gc1) * (I - StartPos)) div ChunkSize); + b := bc1 + (((bc2 - bc1) * (I - StartPos)) div ChunkSize); + + ACanvas.Brush.Color := SpRGBToColor(r, g, b); + if Vertical then + ACanvas.FillRect(Rect(ARect.Left, ARect.Top + I, ARect.Right, ARect.Top + I + 1)) + else + ACanvas.FillRect(Rect(ARect.Left + I, ARect.Top, ARect.Left + I + 1, ARect.Bottom)); + end; + ACanvas.Brush.Color := PrevColor; + end; + + {$IFDEF SYSTEM_GRADIENT} + procedure SpGradientSystem(ACanvas: TCanvas; const ARect: TRect; + StartPos, EndPos, ChunkSize: Integer; C1, C2: TColor; const Vertical: Boolean); + + procedure SetVertex(var AVertex: TTriVertex; const APoint: TPoint; ARGBColor: DWORD); + begin + AVertex.X := APoint.X; + AVertex.Y := APoint.Y; + AVertex.Red := MakeWord(0, GetRValue(ARGBColor)); + AVertex.Green := MakeWord(0, GetGValue(ARGBColor)); + AVertex.Blue := MakeWord(0, GetBValue(ARGBColor)); + AVertex.Alpha := 0; + end; + + const + AModesMap: array[Boolean] of DWORD = (GRADIENT_FILL_RECT_H, GRADIENT_FILL_RECT_V); + var + AVertices: array[0..1] of TTriVertex; + AGradientRect: TGradientRect; + ARGBColor1, ARGBColor2: DWORD; + Vertex: TPoint; + begin + ARGBColor1 := ColorToRGB(C1); + ARGBColor2 := ColorToRGB(C2); + Vertex := ARect.TopLeft; + if Vertical then + Vertex.Y := Vertex.Y + StartPos + else + Vertex.X := Vertex.X + StartPos; + SetVertex(AVertices[0], Vertex, ARGBColor1); + Vertex := ARect.BottomRight; + if Vertical then + Vertex.Y := ARect.Top + EndPos + 1 + else + Vertex.X := ARect.Left + EndPos + 1; + SetVertex(AVertices[1], Vertex, ARGBColor2); + AGradientRect.UpperLeft := 0; + AGradientRect.LowerRight := 1; + GradientFillSystem(ACanvas.Handle, AVertices[0], 2, AGradientRect, 1, AModesMap[Vertical]); + end; + {$ENDIF} + +begin + {$IFDEF SYSTEM_GRADIENT} + if Assigned(GradientFillSystem) then + SpGradientSystem(ACanvas, ARect, StartPos, EndPos, ChunkSize, C1, C2, Vertical) + else + {$ENDIF} + SpGradientSoft(ACanvas, ARect, StartPos, EndPos, ChunkSize, C1, C2, Vertical); +end; + +{ +procedure SpGradient(ACanvas: TCanvas; const ARect: TRect; + StartPos, EndPos, ChunkSize: Integer; C1, C2: TColor; const Vertical: Boolean); +// StartPos: start position relative to ARect, usually 0 +// EndPos: end position relative to ARect, usually ARect.Bottom - ARect.Top +// ChunkSize: size of the chunk of the gradient we need to paint +var + I: Integer; + r, g, b: Integer; + rc1, gc1, bc1: Integer; + rc2, gc2, bc2: Integer; + PrevColor: TColor; +begin + PrevColor := ACanvas.Brush.Color; + if ChunkSize = 0 then ChunkSize := 1; + SpGetRGB(C1, rc1, gc1, bc1); + SpGetRGB(C2, rc2, gc2, bc2); + for I := StartPos to EndPos do begin + r := rc1 + (((rc2 - rc1) * (I - StartPos)) div ChunkSize); + g := gc1 + (((gc2 - gc1) * (I - StartPos)) div ChunkSize); + b := bc1 + (((bc2 - bc1) * (I - StartPos)) div ChunkSize); + + ACanvas.Brush.Color := SpRGBToColor(r, g, b); + if Vertical then + ACanvas.FillRect(Rect(ARect.Left, ARect.Top + I, ARect.Right, ARect.Top + I + 1)) + else + ACanvas.FillRect(Rect(ARect.Left + I, ARect.Top, ARect.Left + I + 1, ARect.Bottom)); + end; + ACanvas.Brush.Color := PrevColor; +end; } + +procedure SpGradientFill(ACanvas: TCanvas; const ARect: TRect; + const C1, C2: TColor; const Vertical: Boolean); +var + GSize: Integer; +begin + if Vertical then + GSize := (ARect.Bottom - ARect.Top) - 1 + else + GSize := (ARect.Right - ARect.Left) - 1; + + SpGradient(ACanvas, ARect, 0, GSize, GSize, C1, C2, Vertical); +end; + +procedure SpGradientFillMirror(ACanvas: TCanvas; const ARect: TRect; + const C1, C2, C3, C4: TColor; const Vertical: Boolean); +var + GSize, ChunkSize, d1, d2: Integer; +begin + if Vertical then + GSize := (ARect.Bottom - ARect.Top) - 1 + else + GSize := (ARect.Right - ARect.Left) - 1; + + ChunkSize := GSize div 2; + if ChunkSize = 0 then ChunkSize := 1; + d1 := ChunkSize; + d2 := GSize; + + SpGradient(ACanvas, ARect, 0, d1, ChunkSize, C1, C2, Vertical); + SpGradient(ACanvas, ARect, d1, d2, ChunkSize, C3, C4, Vertical); +end; + +procedure SpGradientFillMirrorTop(ACanvas: TCanvas; const ARect: TRect; + const C1, C2, C3, C4: TColor; const Vertical: Boolean); +var + GSize, d1, d2: Integer; +begin + if Vertical then + GSize := (ARect.Bottom - ARect.Top) - 1 + else + GSize := (ARect.Right - ARect.Left) - 1; + + d1 := GSize div 3; + d2 := GSize; + + SpGradient(ACanvas, ARect, 0, d1, d1, C1, C2, Vertical); + SpGradient(ACanvas, ARect, d1, d2, d2 - d1, C3, C4, Vertical); +end; + +procedure SpGradientFillGlass(ACanvas: TCanvas; const ARect: TRect; + const C1, C2, C3, C4: TColor; const Vertical: Boolean); +var + GSize, ChunkSize, d1, d2, d3: Integer; +begin + if Vertical then + GSize := (ARect.Bottom - ARect.Top) - 1 + else + GSize := (ARect.Right - ARect.Left) - 1; + + ChunkSize := GSize div 3; + if ChunkSize = 0 then ChunkSize := 1; + d1 := ChunkSize; + d2 := ChunkSize * 2; + d3 := GSize; + + SpGradient(ACanvas, ARect, 0, d1, ChunkSize, C1, C2, Vertical); + SpGradient(ACanvas, ARect, d1, d2, ChunkSize, C2, C3, Vertical); + SpGradient(ACanvas, ARect, d2, d3, ChunkSize, C3, C4, Vertical); +end; + +procedure SpGradientFill9pixels(ACanvas: TCanvas; const ARect: TRect; + const C1, C2, C3, C4: TColor; const Vertical: Boolean); +// Mimics Vista menubar/toolbar blue gradient +var + GSize, d1, d2: Integer; +begin + if Vertical then + GSize := (ARect.Bottom - ARect.Top) - 1 + else + GSize := (ARect.Right - ARect.Left) - 1; + + d1 := GSize div 3; + if d1 > 9 then d1 := 9; + d2 := GSize; + + SpGradient(ACanvas, ARect, 0, d1, d1, C1, C2, Vertical); + SpGradient(ACanvas, ARect, d1, d2, d2 - d1, C3, C4, Vertical); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Element painting } + +procedure SpDrawArrow(ACanvas: TCanvas; X, Y: Integer; AColor: TColor; Vertical, Reverse: Boolean; Size: Integer); +var + C1, C2: TColor; +begin + C1 := ACanvas.Pen.Color; + C2 := ACanvas.Brush.Color; + ACanvas.Pen.Color := AColor; + ACanvas.Brush.Color := AColor; + + if Vertical then + if Reverse then + ACanvas.Polygon([Point(X, Y), Point(X - Size, Y + Size), Point(X + Size, Y + Size)]) + else + ACanvas.Polygon([Point(X - Size, Y), Point(X + Size, Y), Point(X, Y + Size)]) + else + if Reverse then + ACanvas.Polygon([Point(X, Y), Point(X + Size, Y + Size), Point(X + Size, Y - Size)]) + else + ACanvas.Polygon([Point(X, Y - Size), Point(X, Y + Size), Point(X + Size, Y)]); + + ACanvas.Pen.Color := C1; + ACanvas.Brush.Color := C2; +end; + +procedure SpDrawDropMark(ACanvas: TCanvas; DropMark: TRect); +var + C: TColor; + R: TRect; +begin + if IsRectEmpty(DropMark) then Exit; + C := ACanvas.Brush.Color; + + R := Rect(DropMark.Left + 1, DropMark.Top, DropMark.Right - 1, DropMark.Top + 2); + ACanvas.Rectangle(R); + R := Rect(DropMark.Left + 1, DropMark.Bottom - 2, DropMark.Right - 1, DropMark.Bottom); + ACanvas.Rectangle(R); + + R := Rect(DropMark.Left, DropMark.Top + 1, DropMark.Right, DropMark.Top + 3); + ACanvas.Rectangle(R); + R := Rect(DropMark.Left, DropMark.Bottom - 3, DropMark.Right, DropMark.Bottom - 1); + ACanvas.Rectangle(R); + + R := Rect(DropMark.Left + 1, DropMark.Top + 4, DropMark.Right - 1, DropMark.Bottom - 4); + ACanvas.Rectangle(R); + + { + // Standard DropMark + + R := Rect(DropMark.Left, DropMark.Top, DropMark.Right - 1, DropMark.Bottom - 1); + if IsRectEmpty(R) then Exit; + ACanvas.Brush.Color := clBlack; + ACanvas.Polygon([ + Point(R.Left, R.Top), + Point(R.Left + 2, R.Top + 2), + Point(R.Left + 2, R.Bottom - 2), + Point(R.Left, R.Bottom), + Point(R.Right, R.Bottom), + Point(R.Right - 2, R.Bottom - 2), + Point(R.Right - 2, R.Top + 2), + Point(R.Right, R.Top) + ]); + } + ACanvas.Brush.Color := C; +end; + +procedure SpDrawFocusRect(ACanvas: TCanvas; const ARect: TRect); +var + DC: HDC; + C1, C2: TColor; +begin + if not IsRectEmpty(ARect) then begin + DC := ACanvas.Handle; + C1 := SetTextColor(DC, clBlack); + C2 := SetBkColor(DC, clWhite); + ACanvas.DrawFocusRect(ARect); + SetTextColor(DC, C1); + SetBkColor(DC, C2); + end; +end; + +procedure SpDrawGlyphPattern(DC: HDC; const R: TRect; Width, Height: Integer; + const PatternBits; PatternColor: TColor); +var + B: TBitmap; + OldTextColor, OldBkColor: Longword; + OldBrush, Brush: HBrush; + BitmapWidth, BitmapHeight: Integer; +begin + OldTextColor := SetTextColor(DC, clBlack); + OldBkColor := SetBkColor(DC, clWhite); + B := TBitmap.Create; + try + BitmapWidth := 8; + if Width > BitmapWidth then BitmapWidth := Width; + BitmapHeight := 8; + if Height > BitmapHeight then BitmapHeight := Height; + + B.Handle := CreateBitmap(BitmapWidth, BitmapHeight, 1, 1, @PatternBits); + if PatternColor < 0 then Brush := GetSysColorBrush(PatternColor and $FF) + else Brush := CreateSolidBrush(PatternColor); + OldBrush := SelectObject(DC, Brush); + BitBlt(DC, (R.Left + R.Right + 1 - Width) div 2, (R.Top + R.Bottom + 1 - Height) div 2, + Width, Height, B.Canvas.Handle, 0, 0, ROP_DSPDxax); + SelectObject(DC, OldBrush); + if PatternColor >= 0 then DeleteObject(Brush); + finally + SetTextColor(DC, OldTextColor); + SetBkColor(DC, OldBkColor); + B.Free; + end; +end; + +procedure SpDrawGlyphPattern(ACanvas: TCanvas; ARect: TRect; PatternIndex: Integer; PatternColor: TColor); +// The pattern is a 8x8 bitmap +// The array has 16 elements, only the odd elements are used +// The first value of an element represents the bits from the 4 first horizontal pixels, +// and the next value represents the bits of the 4 last horizontal pixels. +// For example: 0 represents -------- +// $FF represents xxxxxxxx +// $C6 represents xx---xx- +const + ClosePattern: array [0..15] of Byte = ($C6, 0, $EE, 0, $7C, 0, $38, 0, $7C, 0, $EE, 0, $C6, 0, 0, 0); + MaximizePattern: array [0..15] of Byte = ($FF, 0, $FF, 0, $81, 0, $81, 0, $81, 0, $81, 0, $81, 0, $FF, 0); + MinimizePattern: array [0..15] of Byte = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, $7E, 0, $7E, 0, 0, 0); + RestorePattern: array [0..17] of Byte = ($3F, 0, $3F, 0, $21, 0, $FD, 0, $FD, 0, $87, 0, $84, 0, $84, 0, $FC, 0); +begin + case PatternIndex of + 0: SpDrawGlyphPattern(ACanvas.Handle, ARect, 8, 8, ClosePattern[0], PatternColor); + 1: SpDrawGlyphPattern(ACanvas.Handle, ARect, 8, 8, MaximizePattern[0], PatternColor); + 2: SpDrawGlyphPattern(ACanvas.Handle, ARect, 8, 8, MinimizePattern[0], PatternColor); + 3: SpDrawGlyphPattern(ACanvas.Handle, ARect, 8, 9, RestorePattern[0], PatternColor); + end; +end; + +procedure SpDrawXPButton(ACanvas: TCanvas; ARect: TRect; Enabled, Pushed, + HotTrack, Checked, Focused, Defaulted: Boolean; SkinType: TSpTBXSkinType); +var + Flags: Cardinal; + C: TColor; + State: TSpTBXSkinStatesType; +begin + SkinType := SpTBXSkinType(SkinType); + case SkinType of + sknNone: + begin + C := ACanvas.Brush.Color; + ACanvas.Brush.Color := clBtnFace; + ACanvas.FillRect(ARect); + if Defaulted or Focused then begin + ACanvas.Brush.Color := clWindowFrame; + ACanvas.FrameRect(ARect); + InflateRect(ARect, -1, -1); // Reduce the Rect for the focus rect + end; + if Pushed or Checked then begin + ACanvas.Brush.Color := clBtnShadow; + ACanvas.FrameRect(ARect); + end + else + DrawFrameControl(ACanvas.Handle, ARect, DFC_BUTTON, DFCS_BUTTONPUSH); + ACanvas.Brush.Color := C; + end; + sknWindows: + begin + if not Enabled then Flags := PBS_DISABLED + else if Pushed or Checked then Flags := PBS_PRESSED + else if HotTrack then Flags := PBS_HOT + else if Defaulted or Focused then Flags := PBS_DEFAULTED + else Flags := PBS_NORMAL; + DrawThemeBackground(ThemeServices.Theme[teButton], ACanvas.Handle, BP_PUSHBUTTON, Flags, ARect, nil); + end; + sknSkin: + begin + State := CurrentSkin.GetState(Enabled, Pushed, HotTrack, Checked); + CurrentSkin.PaintBackground(ACanvas, ARect, skncButton, State, True, True); + end; + end; + + if Focused then begin + InflateRect(ARect, -3, -3); + SpDrawFocusRect(ACanvas, ARect); + end; +end; + +procedure SpDrawXPCheckBoxGlyph(ACanvas: TCanvas; ARect: TRect; Enabled: Boolean; + State: TCheckBoxState; HotTrack, Pushed: Boolean; SkinType: TSpTBXSkinType); +var + Flags: Integer; + SknState: TSpTBXSkinStatesType; +begin + SkinType := SpTBXSkinType(SkinType); + Flags := 0; + case SkinType of + sknNone: + begin + case State of + cbChecked: Flags := DFCS_BUTTONCHECK or DFCS_CHECKED; + cbGrayed: Flags := DFCS_BUTTON3STATE or DFCS_CHECKED; + cbUnChecked: Flags := DFCS_BUTTONCHECK; + end; + if not Enabled then + Flags := Flags or DFCS_INACTIVE; + if Pushed then + Flags := Flags or DFCS_PUSHED; + DrawFrameControl(ACanvas.Handle, ARect, DFC_BUTTON, Flags); + end; + sknWindows: + begin + case State of + cbChecked: Flags := CBS_CHECKEDNORMAL; + cbGrayed: Flags := CBS_MIXEDNORMAL; + cbUnChecked: Flags := CBS_UNCHECKEDNORMAL; + end; + + if not Enabled then Inc(Flags, 3) + else + if Pushed then Inc(Flags, 2) + else if HotTrack then Inc(Flags); + DrawThemeBackground(ThemeServices.Theme[teButton], ACanvas.Handle, BP_CHECKBOX, Flags, ARect, nil); + end; + sknSkin: + begin + SknState := CurrentSkin.GetState(Enabled, Pushed, HotTrack, State in [cbChecked, cbGrayed]); + CurrentSkin.PaintMenuCheckMark(ACanvas, ARect, State = cbChecked, State = cbGrayed, False, SknState); + end; + end; +end; + +procedure SpDrawXPRadioButtonGlyph(ACanvas: TCanvas; ARect: TRect; Enabled: Boolean; + Checked, HotTrack, Pushed: Boolean; SkinType: TSpTBXSkinType); +var + Flags: Integer; + SknState: TSpTBXSkinStatesType; +begin + SkinType := SpTBXSkinType(SkinType); + case SkinType of + sknNone: + begin + Flags := DFCS_BUTTONRADIO; + if Checked then + Flags := Flags or DFCS_CHECKED; + if not Enabled then + Flags := Flags or DFCS_INACTIVE; + if Pushed then + Flags := Flags or DFCS_PUSHED; + DrawFrameControl(ACanvas.Handle, ARect, DFC_BUTTON, Flags); + end; + sknWindows: + begin + if Checked then Flags := RBS_CHECKEDNORMAL + else Flags := RBS_UNCHECKEDNORMAL; + + if not Enabled then Inc(Flags, 3) + else + if Pushed then Inc(Flags, 2) + else if HotTrack then Inc(Flags); + DrawThemeBackground(ThemeServices.Theme[teButton], ACanvas.Handle, BP_RADIOBUTTON, Flags, ARect, nil); + end; + sknSkin: + begin + SknState := CurrentSkin.GetState(Enabled, Pushed, HotTrack, Checked); + CurrentSkin.PaintMenuRadioMark(ACanvas, ARect, Checked, False, SknState); + end; + end; +end; + +procedure SpDrawXPEditFrame(ACanvas: TCanvas; ARect: TRect; Enabled, HotTrack: Boolean; + SkinType: TSpTBXSkinType; ClipContent: Boolean; AutoAdjust: Boolean); +var + PartID, Flags: Integer; + BorderR: TRect; + State: TSpTBXSkinStatesType; + Entry: TSpTBXSkinOptionEntry; +const + CP_BORDER = 4; // Available only on Vista with Delphi 2007 +begin + SkinType := SpTBXSkinType(SkinType); + + if ClipContent then begin + BorderR := ARect; + if HotTrack then + InflateRect(BorderR, -1, -1) + else + InflateRect(BorderR, -2, -2); + ExcludeClipRect(ACanvas.Handle, BorderR.Left, BorderR.Top, BorderR.Right, BorderR.Bottom); + end; + try + case SkinType of + sknNone: + if HotTrack then + SpDrawRectangle(ACanvas, ARect, 0, clBtnShadow, clBtnHighlight, clBtnFace, clBtnFace) + else + SpDrawRectangle(ACanvas, ARect, 0, clBtnFace, clBtnFace, clBtnFace, clBtnFace); + sknWindows: + begin + if SpIsWinVistaOrUp then begin + // Use the new API on Windows Vista + PartID := CP_BORDER; + if not Enabled then Flags := CBXS_DISABLED + else if HotTrack then Flags := CBXS_HOT + else Flags := CBXS_NORMAL; + end + else begin + PartID := 0; + Flags := 0; + end; + DrawThemeBackground(ThemeServices.Theme[teComboBox], ACanvas.Handle, PartID, Flags, ARect, nil); + end; + sknSkin: + begin + State := CurrentSkin.GetState(Enabled, False, HotTrack, False); + // Try to adjust the borders if only the internal borders are specified, + // used by some controls that need to paint the edit frames like + // TSpTBXPanel (HotTrack=True), TSpTBXListBox, TSpTBXCheckListBox, etc + if AutoAdjust then begin + Entry := SkinManager.CurrentSkin.Options(skncEditFrame, State).Borders; + if (Entry.Color1 = clNone) and (Entry.Color2 = clNone) and + (Entry.Color3 <> clNone) and (Entry.Color4 <> clNone) then + begin + CurrentSkin.PaintBackground(ACanvas, ARect, skncEditFrame, State, True, False); + SpDrawRectangle(ACanvas, ARect, Entry.SkinType, Entry.Color3, Entry.Color4); + Exit; + end; + end; + + CurrentSkin.PaintBackground(ACanvas, ARect, skncEditFrame, State, True, True); + end; + end; + finally + if ClipContent then + SelectClipRgn(ACanvas.Handle, 0); + end; +end; + +procedure SpDrawXPEditFrame(AWinControl: TWinControl; HotTracking: Boolean; + SkinType: TSpTBXSkinType; AutoAdjust, HideFrame: Boolean); +var + R: TRect; + DC: HDC; + ACanvas: TCanvas; +begin + DC := GetWindowDC(AWinControl.Handle); + try + ACanvas := TCanvas.Create; + try + ACanvas.Handle := DC; + GetWindowRect(AWinControl.Handle, R); + OffsetRect(R, -R.Left, -R.Top); + with R do + ExcludeClipRect(DC, Left + 2, Top + 2, Right - 2, Bottom - 2); + + if HideFrame then begin + ACanvas.Brush.Color := TControlAccess(AWinControl).Color; + ACanvas.FillRect(R); + end + else begin + // Don't use SpDrawParentBackground to paint the background it doesn't get + // the correct WindowOrg in this particular case + PerformEraseBackground(AWinControl, ACanvas.Handle); + SpDrawXPEditFrame(ACanvas, R, AWinControl.Enabled, HotTracking, SkinType, False, AutoAdjust); + end; + finally + ACanvas.Handle := 0; + ACanvas.Free; + end; + finally + ReleaseDC(AWinControl.Handle, DC); + end; +end; + +procedure SpDrawXPGrip(ACanvas: TCanvas; ARect: TRect; LoC, HiC: TColor); +var + I, J: Integer; + XCellCount, YCellCount: Integer; + R: TRect; + C: TColor; +begin + // 4 x 4 cells (Grey, White, Null) + // GG-- + // GGW- + // -WW- + // ---- + + C := ACanvas.Brush.Color; + XCellCount := (ARect.Right - ARect.Left) div 4; + YCellCount := (ARect.Bottom - ARect.Top) div 4; + if XCellCount = 0 then XCellCount := 1; + if YCellCount = 0 then YCellCount := 1; + + for J := 0 to YCellCount - 1 do + for I := 0 to XCellCount - 1 do begin + R.Left := ARect.Left + (I * 4) + 1; + R.Right := R.Left + 2; + R.Top := ARect.Top + (J * 4) + 1; + R.Bottom := R.Top + 2; + + ACanvas.Brush.Color := HiC; + ACanvas.FillRect(R); + OffsetRect(R, -1, -1); + ACanvas.Brush.Color := LoC; + ACanvas.FillRect(R); + end; + ACanvas.Brush.Color := C; +end; + +procedure SpDrawXPHeader(ACanvas: TCanvas; ARect: TRect; HotTrack, Pushed: Boolean; SkinType: TSpTBXSkinType); +var + Flags: Cardinal; + State: TSpTBXSkinStatesType; +begin + SkinType := SpTBXSkinType(SkinType); + case SkinType of + sknNone: + begin + DrawEdge(ACanvas.Handle, ARect, BDR_RAISEDINNER or BDR_RAISEDOUTER, BF_RECT or BF_SOFT); + end; + sknWindows: + begin + if Pushed then Flags := HIS_PRESSED + else if HotTrack then Flags := HIS_HOT + else Flags := HIS_NORMAL; + DrawThemeBackground(ThemeServices.Theme[teHeader], ACanvas.Handle, HP_HEADERITEM, Flags, ARect, nil); + end; + sknSkin: + begin + State := CurrentSkin.GetState(True, Pushed, HotTrack, False); + if (State = sknsPushed) and CurrentSkin.Options(skncHeader, State).IsEmpty then + State := sknsHotTrack; + CurrentSkin.PaintBackground(ACanvas, ARect, skncHeader, State, True, True); + end; + end; +end; + +procedure SpDrawXPListItemBackground(ACanvas: TCanvas; ARect: TRect; Selected, HotTrack, Focused: Boolean; + SkinType: TSpTBXSkinType; ForceRectBorders: Boolean; Borders: Boolean); +var + State: TSpTBXSkinStatesType; + PrevColor: TColor; +begin + PrevColor := ACanvas.Font.Color; + if SpTBXSkinType(SkinType) = sknSkin then begin + ACanvas.FillRect(ARect); + if HotTrack or Selected then begin + State := CurrentSkin.GetState(True, False, HotTrack, Selected); + ACanvas.Font.Color := CurrentSkin.GetTextColor(skncListItem, State); + if ForceRectBorders then + CurrentSkin.PaintBackground(ACanvas, ARect, skncListItem, State, True, Borders, False, [akLeft, akTop, akRight, akBottom]) + else + CurrentSkin.PaintBackground(ACanvas, ARect, skncListItem, State, True, Borders); + end; + end + else begin + if Selected then begin + ACanvas.Brush.Color := clHighlight; + ACanvas.Font.Color := clHighlightText; + end; + ACanvas.FillRect(ARect); + if Focused then + SpDrawFocusRect(ACanvas, ARect); + end; + ACanvas.Font.Color := PrevColor; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Skins painting } + +procedure SpPaintSkinBackground(ACanvas: TCanvas; ARect: TRect; SkinOption: TSpTBXSkinOptionCategory; Vertical: Boolean); +var + Part: TSpTBXSkinOptionEntry; + SkinType: Integer; +begin + Part := SkinOption.Body; + SkinType := SkinOption.Body.SkinType; + + if Vertical then + case SkinType of + 1: SkinType := 2; // Vertical Gradient to Horizontal + 2: SkinType := 1; // Horizontal Gradient to Vertical + + 3: SkinType := 4; // Vertical Glass Gradient to Horizontal + 4: SkinType := 3; // Horizontal Glass Gradient to Vertical + + 5: SkinType := 6; // Vertical Mirror Gradient to Horizontal + 6: SkinType := 5; // Horizontal Mirror Gradient to Vertical + + 7: SkinType := 8; // Vertical MirrorTop Gradient to Horizontal + 8: SkinType := 7; // Horizontal MirrorTop Gradient to Vertical + + 9: SkinType := 10; // Vertical 9Pixels Gradient to Horizontal + 10: SkinType := 9; // Horizontal 9Pixels Gradient to Vertical + end; + + case SkinType of + 0: begin // Solid + SpFillRect(ACanvas, ARect, Part.Color1); + end; + 1: begin // Vertical Gradient + SpGradientFill(ACanvas, ARect, Part.Color1, Part.Color2, True); + end; + 2: begin // Horizontal Gradient + SpGradientFill(ACanvas, ARect, Part.Color1, Part.Color2, False); + end; + 3: begin // Vertical Glass Gradient + SpGradientFillGlass(ACanvas, ARect, Part.Color1, Part.Color2, Part.Color3, Part.Color4, True); + end; + 4: begin // Horizontal Glass Gradient + SpGradientFillGlass(ACanvas, ARect, Part.Color1, Part.Color2, Part.Color3, Part.Color4, False); + end; + 5: begin // Vertical Mirror Gradient + SpGradientFillMirror(ACanvas, ARect, Part.Color1, Part.Color2, Part.Color3, Part.Color4, True); + end; + 6: begin // Horizontal Mirror Gradient + SpGradientFillMirror(ACanvas, ARect, Part.Color1, Part.Color2, Part.Color3, Part.Color4, False); + end; + 7: begin // Vertical MirrorTop Gradient + SpGradientFillMirrorTop(ACanvas, ARect, Part.Color1, Part.Color2, Part.Color3, Part.Color4, True); + end; + 8: begin // Horizontal MirrorTop Gradient + SpGradientFillMirrorTop(ACanvas, ARect, Part.Color1, Part.Color2, Part.Color3, Part.Color4, False); + end; + 9: begin // Vertical 9Pixels Gradient + SpGradientFill9Pixels(ACanvas, ARect, Part.Color1, Part.Color2, Part.Color3, Part.Color4, True); + end; + 10:begin // Horizontal 9Pixels Gradient + SpGradientFill9Pixels(ACanvas, ARect, Part.Color1, Part.Color2, Part.Color3, Part.Color4, False); + end; + end; +end; + +procedure SpPaintSkinBorders(ACanvas: TCanvas; ARect: TRect; SkinOption: TSpTBXSkinOptionCategory; + ForceRectBorders: TAnchors = []); +var + Part: TSpTBXSkinOptionEntry; +begin + Part := SkinOption.Borders; + case Part.SkinType of + 0, 1, 2: // Rectangle, Simple Rounded and Double Rounded Border + begin + SpDrawRectangle(ACanvas, ARect, Part.SkinType, Part.Color1, Part.Color2, Part.Color3, Part.Color4, ForceRectBorders); + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Misc } + +function SpIsWinVistaOrUp: Boolean; +begin + Result := (Win32Platform = VER_PLATFORM_WIN32_NT) and (Win32MajorVersion >= 6); +end; + +function SpGetDirectories(Path: WideString; L: TStringList): Boolean; +var + SearchRec: TSearchRec; +begin + Result := False; + if DirectoryExists(Path) then begin + Path := IncludeTrailingPathDelimiter(Path) + '*.*'; + if FindFirst(Path, faDirectory, SearchRec) = 0 then begin + try + repeat + if (SearchRec.Name <> '.') and (SearchRec.Name <> '..') then + L.Add(SearchRec.Name); + until FindNext(SearchRec) <> 0; + Result := True; + finally + FindClose(SearchRec); + end; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSkinOptionEntry } + +procedure TSpTBXSkinOptionEntry.AssignTo(Dest: TPersistent); +begin + if Dest is TSpTBXSkinOptionEntry then + with TSpTBXSkinOptionEntry(Dest) do begin + SkinType := Self.SkinType; + Color1 := Self.Color1; + Color2 := Self.Color2; + Color3 := Self.Color3; + Color4 := Self.Color4; + end + else inherited AssignTo(Dest); +end; + +constructor TSpTBXSkinOptionEntry.Create; +begin + inherited; + Reset; +end; + +procedure TSpTBXSkinOptionEntry.Fill(ASkinType: Integer; AColor1, AColor2, + AColor3, AColor4: TColor); +begin + FSkinType := ASkinType; + FColor1 := AColor1; + FColor2 := AColor2; + FColor3 := AColor3; + FColor4 := AColor4; +end; + +function TSpTBXSkinOptionEntry.IsEmpty: Boolean; +begin + Result := (FColor1 = clNone) and (FColor2 = clNone) and (FColor3 = clNone) and (FColor4 = clNone); +end; + +function TSpTBXSkinOptionEntry.IsEqual(AOptionEntry: TSpTBXSkinOptionEntry): Boolean; +begin + Result := (FSkinType = AOptionEntry.SkinType) and + (FColor1 = AOptionEntry.Color1) and (FColor2 = AOptionEntry.Color2) and + (FColor3 = AOptionEntry.Color3) and (FColor4 = AOptionEntry.Color4); +end; + +procedure TSpTBXSkinOptionEntry.Lighten(Amount: Integer); +begin + if FColor1 <> clNone then FColor1 := SpLighten(FColor1, Amount); + if FColor2 <> clNone then FColor2 := SpLighten(FColor2, Amount); + if FColor3 <> clNone then FColor3 := SpLighten(FColor3, Amount); + if FColor4 <> clNone then FColor4 := SpLighten(FColor4, Amount); +end; + +procedure TSpTBXSkinOptionEntry.Reset; +begin + FSkinType := 0; + FColor1 := clNone; + FColor2 := clNone; + FColor3 := clNone; + FColor4 := clNone; +end; + +procedure TSpTBXSkinOptionEntry.ReadFromString(S: string); +var + L: TStringList; +begin + Reset; + L := TStringList.Create; + try + L.CommaText := S; + try + if L.Count > 0 then FSkinType := StrToIntDef(L[0], 0); + if L.Count > 1 then FColor1 := StringToColor(L[1]); + if L.Count > 2 then FColor2 := StringToColor(L[2]); + if L.Count > 3 then FColor3 := StringToColor(L[3]); + if L.Count > 4 then FColor4 := StringToColor(L[4]); + except + // do nothing + end; + finally + L.Free; + end; +end; + +function TSpTBXSkinOptionEntry.WriteToString: string; +begin + Result := Format('%d, %s, %s, %s, %s', [FSkinType, + SpColorToString(FColor1), SpColorToString(FColor2), + SpColorToString(FColor3), SpColorToString(FColor4)]); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXThemeOptionCategory } + +procedure TSpTBXSkinOptionCategory.AssignTo(Dest: TPersistent); +begin + if Dest is TSpTBXSkinOptionCategory then + with TSpTBXSkinOptionCategory(Dest) do begin + Body.Assign(Self.Body); + Borders.Assign(Self.Borders); + TextColor := Self.TextColor; + end + else inherited AssignTo(Dest); +end; + +constructor TSpTBXSkinOptionCategory.Create; +begin + inherited; + FBody := TSpTBXSkinOptionEntry.Create; + FBorders := TSpTBXSkinOptionEntry.Create; + FTextColor := clNone; +end; + +destructor TSpTBXSkinOptionCategory.Destroy; +begin + FreeAndNil(FBody); + FreeAndNil(FBorders); + inherited; +end; + +function TSpTBXSkinOptionCategory.IsEmpty: Boolean; +begin + Result := FBody.IsEmpty and FBorders.IsEmpty and (FTextColor = clNone); +end; + +procedure TSpTBXSkinOptionCategory.Reset; +begin + FBody.Reset; + FBorders.Reset; + FTextColor := clNone; +end; + +procedure TSpTBXSkinOptionCategory.SaveToIni(MemIni: TMemIniFile; Section, Ident: string); +begin + if not IsEmpty then begin + MemIni.WriteString(Section, Ident + '.Body', Body.WriteToString); + MemIni.WriteString(Section, Ident + '.Borders', Borders.WriteToString); + MemIni.WriteString(Section, Ident + '.TextColor', SpColorToString(TextColor)); + end; +end; + +procedure TSpTBXSkinOptionCategory.LoadFromIni(MemIni: TMemIniFile; Section, Ident: string); +begin + Reset; + if Ident = '' then Ident := SSpTBXSkinStatesString[sknsNormal]; + + Body.ReadFromString(MemIni.ReadString(Section, Ident + '.Body', '')); + Borders.ReadFromString(MemIni.ReadString(Section, Ident + '.Borders', '')); + TextColor := StringToColor(MemIni.ReadString(Section, Ident + '.TextColor', 'clNone')); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXThemeOptions } + +procedure TSpTBXSkinOptions.AssignTo(Dest: TPersistent); +var + C: TSpTBXSkinComponentsType; + S: TSpTBXSkinStatesType; + DestOp: TSpTBXSkinOptions; +begin + if Dest is TSpTBXSkinOptions then begin + DestOp := TSpTBXSkinOptions(Dest); + for C := Low(C) to High(C) do + for S := Low(S) to High(S) do + DestOp.FOptions[C, S].Assign(Options(C, S)); + DestOp.ColorBtnFace := FColorBtnFace; + DestOp.FloatingWindowBorderSize := FFloatingWindowBorderSize; + DestOp.OfficeIcons := FOfficeIcons; + DestOp.OfficeMenu := FOfficeMenu; + DestOp.OfficeStatusBar := FOfficeStatusBar; + DestOp.FSkinAuthor := FSkinAuthor; + DestOp.FSkinName := FSkinName; + end + else inherited AssignTo(Dest); +end; + +procedure TSpTBXSkinOptions.BroadcastChanges; +begin + if Self = SkinManager.CurrentSkin then + SkinManager.BroadcastSkinNotification; +end; + +procedure TSpTBXSkinOptions.CopyOptions(AComponent, ToComponent: TSpTBXSkinComponentsType); +var + S: TSpTBXSkinStatesType; +begin + for S := Low(S) to High(S) do + FOptions[AComponent, S].AssignTo(FOptions[ToComponent, S]); +end; + +constructor TSpTBXSkinOptions.Create; +var + C: TSpTBXSkinComponentsType; + S: TSpTBXSkinStatesType; +begin + inherited; + FSkinName := 'Default'; + FColorBtnFace := clBtnFace; + FFloatingWindowBorderSize := 4; + for C := Low(C) to High(C) do + for S := Low(S) to High(S) do + FOptions[C, S] := TSpTBXSkinOptionCategory.Create; + + FillOptions; +end; + +destructor TSpTBXSkinOptions.Destroy; +var + C: TSpTBXSkinComponentsType; + S: TSpTBXSkinStatesType; +begin + for C := Low(C) to High(C) do + for S := Low(S) to High(S) do + FreeAndNil(FOptions[C, S]); + + inherited; +end; + +procedure TSpTBXSkinOptions.FillOptions; +begin + // Used by descendants to fill the skin options +end; + +procedure TSpTBXSkinOptions.Reset(ForceResetSkinProperties: Boolean); +var + C: TSpTBXSkinComponentsType; + S: TSpTBXSkinStatesType; +begin + if ForceResetSkinProperties then begin + FColorBtnFace := clBtnFace; + FFloatingWindowBorderSize := 4; + FOfficeIcons := False; + FOfficeMenu := False; + FOfficeStatusBar := False; + end; + + for C := Low(C) to High(C) do + for S := Low(S) to High(S) do + FOptions[C, S].Reset; +end; + +function TSpTBXSkinOptions.Options(Component: TSpTBXSkinComponentsType; State: TSpTBXSkinStatesType): TSpTBXSkinOptionCategory; +begin + if CSpTBXSkinComponents[Component].States = [sknsNormal] then + State := sknsNormal; + Result := FOptions[Component, State]; +end; + +function TSpTBXSkinOptions.Options(Component: TSpTBXSkinComponentsType): TSpTBXSkinOptionCategory; +begin + Result := FOptions[Component, sknsNormal]; +end; + +procedure TSpTBXSkinOptions.SaveToFile(Filename: WideString); +var + MemIni: TMemIniFile; +begin + MemIni := TMemIniFile.Create(Filename); + try + SaveToMemIni(MemIni); + MemIni.UpdateFile; + finally + MemIni.Free; + end; +end; + +procedure TSpTBXSkinOptions.SaveToMemIni(MemIni: TMemIniFile); +var + C: TSpTBXSkinComponentsType; + S: TSpTBXSkinStatesType; +begin + MemIni.WriteString('Skin', 'Name', FSkinName); + MemIni.WriteString('Skin', 'Author', FSkinAuthor); + MemIni.WriteString('Skin', 'ColorBtnFace', SpColorToString(FColorBtnFace)); + MemIni.WriteInteger('Skin', 'FloatingWindowBorderSize', FFloatingWindowBorderSize); + MemIni.WriteBool('Skin', 'OfficeIcons', FOfficeIcons); + MemIni.WriteBool('Skin', 'OfficeMenu', FOfficeMenu); + MemIni.WriteBool('Skin', 'OfficeStatusBar', FOfficeStatusBar); + + for C := Low(C) to High(C) do begin + for S := Low(S) to High(S) do + if S in CSpTBXSkinComponents[C].States then + FOptions[C, S].SaveToIni(MemIni, CSpTBXSkinComponents[C].Name, SSpTBXSkinStatesString[S]); + end; +end; + +procedure TSpTBXSkinOptions.SaveToStrings(L: TStrings); +var + MemIni: TMemIniFile; +begin + MemIni := TMemIniFile.Create(''); + try + MemIni.SetStrings(L); // Transfer L contents to MemIni + SaveToMemIni(MemIni); + L.Clear; + MemIni.GetStrings(L); // Transfer MemIni contents to L + finally + MemIni.Free; + end; +end; + +procedure TSpTBXSkinOptions.LoadFromFile(Filename: WideString); +var + L: TStringList; +begin + if FileExists(Filename) then begin + L := TStringList.Create; + try + L.LoadFromFile(Filename); + LoadFromStrings(L); + finally + L.Free; + end; + end; +end; + +procedure TSpTBXSkinOptions.LoadFromStrings(L: TStrings); +var + MemIni: TMemIniFile; + C: TSpTBXSkinComponentsType; + S: TSpTBXSkinStatesType; +begin + MemIni := TMemIniFile.Create(''); + try + MemIni.SetStrings(L); + + FSkinName := MemIni.ReadString('Skin', 'Name', ''); + FSkinAuthor := MemIni.ReadString('Skin', 'Author', ''); + FColorBtnFace := StringToColor(MemIni.ReadString('Skin', 'ColorBtnFace', 'clBtnFace')); + FFloatingWindowBorderSize := MemIni.ReadInteger('Skin', 'FloatingWindowBorderSize', 4); + FOfficeIcons := MemIni.ReadBool('Skin', 'OfficeIcons', False); + FOfficeMenu := MemIni.ReadBool('Skin', 'OfficeMenu', False); + FOfficeStatusBar := MemIni.ReadBool('Skin', 'OfficeStautsBar', False); + + for C := Low(C) to High(C) do begin + for S := Low(S) to High(S) do + if S in CSpTBXSkinComponents[C].States then + FOptions[C, S].LoadFromIni(MemIni, CSpTBXSkinComponents[C].Name, SSpTBXSkinStatesString[S]); + end; + + BroadcastChanges; + finally + MemIni.Free; + end; +end; + +function TSpTBXSkinOptions.GetOfficeIcons: Boolean; +// OfficeIcons is used to paint the menu items icons with Office XP shadows. +begin + Result := FOfficeIcons and (SkinManager.GetSkinType = sknSkin); +end; + +function TSpTBXSkinOptions.GetOfficeMenu: Boolean; +// When OfficeMenu is True the height of the separators on popup menus +// is 6 pixels, otherwise the size is 10 pixels. +// And when the item is disabled the hottrack is not painted. +begin + Result := FOfficeMenu and (SkinManager.GetSkinType = sknSkin); +end; + +function TSpTBXSkinOptions.GetOfficePopup: Boolean; +// OfficePopup is used to paint the PopupWindow with Office XP style. +// It is also used to paint the opened toolbar item with shadows. +begin + Result := (SkinManager.GetSkinType = sknSkin) and not Options(skncOpenToolbarItem).IsEmpty; +end; + +function TSpTBXSkinOptions.GetOfficeStatusBar: Boolean; +// OfficeStatusBar is used to paint the StatusBar panels with Office XP style. +var + T: TSpTBXSkinType; +begin + T := SkinManager.GetSkinType; + Result := (FOfficeStatusBar and (T = sknSkin)) or (T = sknNone); +end; + +function TSpTBXSkinOptions.GetFloatingWindowBorderSize: Integer; +begin + if SkinManager.GetSkinType = sknSkin then + Result := FFloatingWindowBorderSize + else + Result := 4; +end; + +procedure TSpTBXSkinOptions.SetFloatingWindowBorderSize(const Value: Integer); +begin + FFloatingWindowBorderSize := Value; + if FFloatingWindowBorderSize < 0 then FFloatingWindowBorderSize := 0; + if FFloatingWindowBorderSize > 4 then FFloatingWindowBorderSize := 4; +end; + +procedure TSpTBXSkinOptions.GetDropDownArrowSize(out DropDownArrowSize, + DropDownArrowMargin, SplitBtnArrowSize: Integer); +begin + DropDownArrowSize := 8; // TB2Item.tbDropdownArrowWidth + DropDownArrowMargin := 3; // TB2Item.tbDropdownArrowMargin + + SplitBtnArrowSize := 12; // TB2Item.tbDropdownComboArrowWidth + 1 + if SkinManager.GetSkinType = sknWindows then + SplitBtnArrowSize := SplitBtnArrowSize + 1; +end; + +procedure TSpTBXSkinOptions.GetMenuItemMargins(ACanvas: TCanvas; ImgSize: Integer; + out MarginsInfo: TSpTBXMenuItemMarginsInfo); +var + TextMetric: TTextMetric; + H, M2: Integer; + SkinType: TSpTBXSkinType; +begin + if ImgSize = 0 then + ImgSize := 16; + + FillChar(MarginsInfo, SizeOf(MarginsInfo), 0); + SkinType := SkinManager.GetSkinType; + + if (SkinType = sknWindows) and SpIsWinVistaOrUp then begin + // Vista-like spacing + MarginsInfo.Margins := Rect(1, 3, 1, 3); // MID_MENUITEM + MarginsInfo.ImageTextSpace := 5 + 1; // TMI_MENU_IMGTEXTSPACE + MarginsInfo.LeftCaptionMargin := 3; // TMI_MENU_LCAPTIONMARGIN + MarginsInfo.RightCaptionMargin := 3; // TMI_MENU_RCAPTIONMARGIN + end + else + if (SkinType = sknSkin) then begin + // Office-like spacing + MarginsInfo.Margins := Rect(1, 3, 1, 3); // MID_MENUITEM + MarginsInfo.ImageTextSpace := 5; // TMI_MENU_IMGTEXTSPACE + MarginsInfo.LeftCaptionMargin := 3; // TMI_MENU_LCAPTIONMARGIN + MarginsInfo.RightCaptionMargin := 3; // TMI_MENU_RCAPTIONMARGIN + end + else begin + MarginsInfo.Margins := Rect(0, 2, 0, 2); // MID_MENUITEM + MarginsInfo.ImageTextSpace := 1; // TMI_MENU_IMGTEXTSPACE + MarginsInfo.LeftCaptionMargin := 2; // TMI_MENU_LCAPTIONMARGIN + MarginsInfo.RightCaptionMargin := 2; // TMI_MENU_RCAPTIONMARGIN + end; + + GetTextMetrics(ACanvas.Handle, TextMetric); + M2 := MarginsInfo.Margins.Top + MarginsInfo.Margins.Bottom; + MarginsInfo.GutterSize := TextMetric.tmHeight + TextMetric.tmExternalLeading + M2; + H := ImgSize + M2; + if H > MarginsInfo.GutterSize then MarginsInfo.GutterSize := H; + MarginsInfo.GutterSize := (ImgSize + M2) * MarginsInfo.GutterSize div H; // GutterSize = GetPopupMargin = ItemInfo.PopupMargin +end; + +function TSpTBXSkinOptions.GetState(Enabled, Pushed, HotTrack, Checked: Boolean): TSpTBXSkinStatesType; +begin + Result := sknsNormal; + if not Enabled then Result := sknsDisabled + else begin + if Pushed then Result := sknsPushed + else + if HotTrack and Checked then Result := sknsCheckedAndHotTrack + else + if HotTrack then Result := sknsHotTrack + else + if Checked then Result := sknsChecked; + end; +end; + +function TSpTBXSkinOptions.GetTextColor(Component: TSpTBXSkinComponentsType; + State: TSpTBXSkinStatesType; SkinType: TSpTBXSkinType = sknSkin): TColor; +var + Flags: Integer; + VistaColor: Cardinal; +begin + Result := clNone; + SkinType := SpTBXSkinType(SkinType); + + if SkinType = sknSkin then begin + if State in CSpTBXSkinComponents[Component].States then begin + Result := Options(Component, State).TextColor; + if Result <> clNone then + Exit; // Text color is specified by the skin + end + else + Exit; // Exit if the State is not valid + end; + + if State = sknsDisabled then Result := clGrayText + else Result := clBtnText; + + case Component of + skncMenuItem: + if SpIsWinVistaOrUp and (SkinType = sknWindows) then begin + // Use the new API on Windows Vista + Flags := MPI_NORMAL; + if State = sknsDisabled then Flags := MPI_DISABLED + else if State in [sknsHotTrack, sknsCheckedAndHotTrack] then Flags := MPI_HOT; + GetThemeColor(ThemeServices.Theme[teMenu], MENU_POPUPITEM, Flags, TMT_TEXTCOLOR, VistaColor); + Result := TColor(VistaColor); + end + else + if State <> sknsDisabled then begin + Result := clMenuText; + if SkinType <> sknSkin then + if State in [sknsHotTrack, sknsCheckedAndHotTrack, sknsPushed] then + Result := clHighlightText; + end; + skncMenuBarItem: + if SpIsWinVistaOrUp and (SkinType = sknWindows) then begin + // Use the new API on Windows Vista + Flags := MBI_NORMAL; + if State = sknsDisabled then Flags := MBI_DISABLED + else if State in [sknsHotTrack, sknsCheckedAndHotTrack] then Flags := MBI_HOT; + GetThemeColor(ThemeServices.Theme[teMenu], MENU_BARITEM, Flags, TMT_TEXTCOLOR, VistaColor); + Result := TColor(VistaColor); + end + else + if State <> sknsDisabled then begin + Result := clMenuText; + if SkinType = sknWindows then + if State in [sknsHotTrack, sknsPushed, sknsChecked, sknsCheckedAndHotTrack] then + Result := clHighlightText; + end; + skncToolbarItem: + if State <> sknsDisabled then Result := clMenuText; + skncButton: + if (SkinType = sknWindows) then begin + Flags := PBS_NORMAL; + case State of + sknsDisabled: Flags := PBS_DISABLED; + sknsHotTrack: Flags := PBS_HOT; + sknsPushed, sknsChecked, sknsCheckedAndHotTrack: Flags := PBS_PRESSED; + end; + GetThemeColor(ThemeServices.Theme[teButton], BP_PUSHBUTTON, Flags, TMT_TEXTCOLOR, VistaColor); + Result := TColor(VistaColor); + end; + skncListItem: + if SkinType <> sknSkin then + if State in [sknsChecked, sknsCheckedAndHotTrack] then + Result := clHighlightText; + skncDockablePanelTitleBar, skncStatusBar, skncTabToolbar: + if SkinType = sknSkin then + Result := GetTextColor(skncToolbarItem, State, SkinType); // Use skncToolbarItem to get the default text color + skncWindowTitleBar: + if SkinType = sknSkin then + Result := GetTextColor(skncToolbarItem, State, SkinType) // Use skncToolbarItem to get the default text color + else + if State = sknsDisabled then Result := clInactiveCaptionText + else Result := clCaptionText; + end; +end; + +procedure TSpTBXSkinOptions.PaintBackground(ACanvas: TCanvas; ARect: TRect; + Component: TSpTBXSkinComponentsType; State: TSpTBXSkinStatesType; + Background, Borders: Boolean; Vertical: Boolean = False; + ForceRectBorders: TAnchors = []); +var + BackgroundRect: TRect; + Op: TSpTBXSkinOptionCategory; +begin + Op := Options(Component, State); + + if Op.Borders.IsEmpty then + Borders := False; + if Op.Body.IsEmpty then + Background := False; + + if Background then begin + BackgroundRect := ARect; + if Borders then + InflateRect(BackgroundRect, -1, -1); + SpPaintSkinBackground(ACanvas, BackgroundRect, Op, Vertical); + end; + + if Borders then + SpPaintSkinBorders(ACanvas, ARect, Op, ForceRectBorders); +end; + +procedure TSpTBXSkinOptions.PaintMenuCheckMark(ACanvas: TCanvas; ARect: TRect; + Checked, Grayed, MenuItemStyle: Boolean; State: TSpTBXSkinStatesType); +var + X, Y: Integer; + PenC, BrushC, CheckColor: TColor; + Flags: Integer; + VistaCheckSize: TSize; +begin + if MenuItemStyle and SpIsWinVistaOrUp and (SkinManager.GetSkinType = sknWindows) then begin + // Use the new API on Windows Vista + if State = sknsDisabled then Flags := MC_CHECKMARKDISABLED + else Flags := MC_CHECKMARKNORMAL; + VistaCheckSize.cx := 0; + VistaCheckSize.cy := 0; + GetThemePartSize(ThemeServices.Theme[teMenu], ACanvas.Handle, MENU_POPUPCHECK, Flags, nil, TS_TRUE, VistaCheckSize); + ARect := SpCenterRect(ARect, VistaCheckSize.cx, VistaCheckSize.cy); + DrawThemeBackground(ThemeServices.Theme[teMenu], ACanvas.Handle, MENU_POPUPCHECK, Flags, ARect, nil); + end + else begin + X := ARect.Left + (ARect.Right - ARect.Left) div 2 - 1; + Y := ARect.Top + (ARect.Bottom - ARect.Top) div 2 + 1; + + PenC := ACanvas.Pen.Color; + BrushC := ACanvas.Brush.Color; + try + if MenuItemStyle then begin + CheckColor := clMenuText; // On sknNone it's clMenuText even when disabled + case SkinManager.GetSkinType of + sknWindows: + CheckColor := GetTextColor(skncCheckBox, State); + sknSkin: + CheckColor := GetTextColor(skncMenuItem, State); + end; + ACanvas.Brush.Color := CheckColor; + ACanvas.Pen.Color := CheckColor; + ACanvas.Polygon([Point(X - 3, Y - 2), Point(X - 1, Y), Point(X + 3, Y - 4), + Point(X + 3, Y - 3), Point(X - 1, Y + 1), Point(X - 3, Y - 1), Point(X - 3, Y -2)]); + end + else begin + CheckColor := GetTextColor(skncCheckBox, State); + ACanvas.Brush.Color := CheckColor; + ACanvas.Pen.Color := CheckColor; + PaintBackground(ACanvas, ARect, skncCheckBox, State, True, True); + if Checked then + ACanvas.Polygon([Point(X - 2, Y), Point(X, Y + 2), Point(X + 4, Y - 2), + Point(X + 4, Y - 4), Point(X, Y), Point(X - 2, Y - 2), Point(X - 2, Y)]) + else + if Grayed then begin + InflateRect(ARect, -3, -3); + // ACanvas.Brush.Color := Options(skncCheckBox, sknsChecked).Borders.Color1; + ACanvas.FillRect(ARect); + end; + end; + finally + ACanvas.Pen.Color := PenC; + ACanvas.Brush.Color := BrushC; + end; + end; +end; + +procedure TSpTBXSkinOptions.PaintMenuRadioMark(ACanvas: TCanvas; ARect: TRect; + Checked, MenuItemStyle: Boolean; State: TSpTBXSkinStatesType); +var + X, Y: Integer; + PenC, BrushC, CheckColor, FrameColor: TColor; + Flags: Integer; + VistaCheckSize: TSize; +begin + if MenuItemStyle and SpIsWinVistaOrUp and (SkinManager.GetSkinType = sknWindows) then begin + // Use the new API on Windows Vista + if State = sknsDisabled then Flags := MC_BULLETDISABLED + else Flags := MC_BULLETNORMAL; + VistaCheckSize.cx := 0; + VistaCheckSize.cy := 0; + GetThemePartSize(ThemeServices.Theme[teMenu], ACanvas.Handle, MENU_POPUPCHECK, Flags, nil, TS_TRUE, VistaCheckSize); + ARect := SpCenterRect(ARect, VistaCheckSize.cx, VistaCheckSize.cy); + DrawThemeBackground(ThemeServices.Theme[teMenu], ACanvas.Handle, MENU_POPUPCHECK, Flags, ARect, nil); + end + else begin + PenC := ACanvas.Pen.Color; + BrushC := ACanvas.Brush.Color; + try + if MenuItemStyle then begin + CheckColor := clMenuText; // On sknNone it's clMenuText even when disabled + case SkinManager.GetSkinType of + sknWindows: + CheckColor := GetTextColor(skncRadioButton, State); + sknSkin: + CheckColor := GetTextColor(skncMenuItem, State); + end; + ACanvas.Brush.Color := CheckColor; + ACanvas.Pen.Color := CheckColor; + X := ARect.Left + (ARect.Right - ARect.Left) div 2; + Y := ARect.Top + (ARect.Bottom - ARect.Top) div 2; + ACanvas.RoundRect(X - 3, Y - 3, X + 3, Y + 3, 2, 2); + end + else begin + CheckColor := GetTextColor(skncRadioButton, State); + FrameColor := Options(skncRadioButton, State).Borders.Color1; + if State = sknsDisabled then FrameColor := CheckColor; + if not Checked then CheckColor := clNone; + + // Keep it simple make the radio 13x13 + ARect.Left := ARect.Left + (ARect.Right - ARect.Left - 13) div 2; + ARect.Right := ARect.Left + 13; + ARect.Top := ARect.Top + (ARect.Bottom - ARect.Top - 13) div 2; + ARect.Bottom := ARect.Top + 13; + X := ARect.Left; + Y := ARect.Top; + + // Background + BeginPath(ACanvas.Handle); + ACanvas.Polyline([Point(X, Y + 8), Point(X, Y + 4), Point(X + 1, Y + 3), + Point(X + 1, Y + 2), Point(X + 2, Y + 1), Point(X + 3, Y + 1), + Point(X + 4, Y), Point(X + 8, Y), Point(X + 9, Y + 1), + Point(X + 10, Y + 1), Point(X + 11, Y + 2), Point(X + 11, Y + 3), + Point(X + 12, Y + 4), Point(X + 12, Y + 8), Point(X + 11, Y + 9), + Point(X + 11, Y + 10), Point(X + 10, Y + 11), Point(X + 9, Y + 11), + Point(X + 8, Y + 12), Point(X + 4, Y + 12), Point(X + 3, Y + 11), + Point(X + 2, Y + 11), Point(X + 1, Y + 10), Point(X + 1, Y + 8)]); + EndPath(ACanvas.Handle); + SelectClipPath(ACanvas.Handle, RGN_COPY); + PaintBackground(ACanvas, ARect, skncRadioButton, State, True, False); + SelectClipPath(ACanvas.Handle, 0); + SelectClipRgn(ACanvas.Handle, 0); + + // Frame + ACanvas.Brush.Color := FrameColor; + ACanvas.Pen.Color := FrameColor; + ACanvas.Polyline([Point(X, Y + 8), Point(X, Y + 4), Point(X + 1, Y + 3), + Point(X + 1, Y + 2), Point(X + 2, Y + 1), Point(X + 3, Y + 1), + Point(X + 4, Y), Point(X + 8, Y), Point(X + 9, Y + 1), + Point(X + 10, Y + 1), Point(X + 11, Y + 2), Point(X + 11, Y + 3), + Point(X + 12, Y + 4), Point(X + 12, Y + 8), Point(X + 11, Y + 9), + Point(X + 11, Y + 10), Point(X + 10, Y + 11), Point(X + 9, Y + 11), + Point(X + 8, Y + 12), Point(X + 4, Y + 12), Point(X + 3, Y + 11), + Point(X + 2, Y + 11), Point(X + 1, Y + 10), Point(X + 1, Y + 8)]); + + // Radio + if CheckColor <> clNone then begin + ACanvas.Brush.Color := CheckColor; + ACanvas.Pen.Color := CheckColor; + X := (ARect.Left + ARect.Right) div 2; + Y := (ARect.Top + ARect.Bottom) div 2 + 1; + ACanvas.RoundRect(X - 2, Y - 3, X + 3, Y + 2, 2, 2); + end; + end; + finally + ACanvas.Pen.Color := PenC; + ACanvas.Brush.Color := BrushC; + end; + end; +end; + +procedure TSpTBXSkinOptions.PaintWindowFrame(ACanvas: TCanvas; ARect: TRect; + IsActive, DrawBody: Boolean; BorderSize: Integer = 4); +var + C: TColor; + R: TRect; + I: Integer; + State: TSpTBXSkinStatesType; + Op: TSpTBXSkinOptionEntry; +begin + if IsActive then + State := sknsNormal + else + if Options(skncWindow, sknsDisabled).IsEmpty then + State := sknsNormal + else + State := sknsDisabled; + + C := ACanvas.Brush.Color; + if DrawBody then + PaintBackground(ACanvas, ARect, skncWindow, State, True, False); + R := ARect; + Op := Options(skncWindow, State).Borders; + for I := 1 to BorderSize do begin + if I = 1 then ACanvas.Brush.Color := Op.Color1 + else if I = 2 then ACanvas.Brush.Color := Op.Color2 + else if I = 3 then ACanvas.Brush.Color := Op.Color3 + else if I >= 4 then ACanvas.Brush.Color := Op.Color4; + ACanvas.FrameRect(R); + InflateRect(R, -1, -1); + end; + ACanvas.Brush.Color := C; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSkinsListEntry } + +destructor TSpTBXSkinsListEntry.Destroy; +begin + SkinClass := nil; + FreeAndNil(SkinStrings); + + inherited; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSkinsList } + +destructor TSpTBXSkinsList.Destroy; +begin + // Free all the skins options + while Count > 0 do + Delete(0); + inherited; +end; + +function TSpTBXSkinsList.AddSkin(SkinName: string; SkinClass: TSpTBXSkinOptionsClass): Integer; +var + K: TSpTBXSkinsListEntry; +begin + Result := -1; + if (SkinName <> '') and (IndexOf(SkinName) = -1) then begin + K := TSpTBXSkinsListEntry.Create; + try + K.SkinClass := SkinClass; + Result := AddObject(SkinName, K); // the list owns K + except + K.Free; + end; + end; +end; + +function TSpTBXSkinsList.AddSkin(SkinOptions: TStrings): Integer; +var + K: TSpTBXSkinsListEntry; + S: string; +begin + Result := -1; + K := TSpTBXSkinsListEntry.Create; + try + K.SkinStrings := TStringList.Create; + S := SkinOptions.Values['Name ']; + if S = '' then + S := SkinOptions.Values['Name']; + S := Trim(S); + if (S <> '') and (IndexOf(S) = -1) then begin + K.SkinStrings.Assign(SkinOptions); + Result := AddObject(S, K); // the list owns K + end + else + K.Free; + except + K.Free; + end; +end; + +function TSpTBXSkinsList.AddSkinFromFile(Filename: WideString): Integer; +var + L: TStringList; +begin + L := TStringList.Create; + try + L.LoadFromFile(Filename); + Result := AddSkin(L); + finally + L.Free; + end; +end; + +procedure TSpTBXSkinsList.AddSkinsFromFolder(Folder: WideString); +var + L: TStringList; + I: Integer; + S: string; +begin + L := TStringList.Create; + try + if SpGetDirectories(Folder, L) then begin + for I := 0 to L.Count - 1 do begin + S := IncludeTrailingPathDelimiter(Folder) + L[I] + '\Skin.ini'; + if FileExists(S) then + AddSkinFromFile(S); + end; + end; + finally + L.Free; + end; +end; + +procedure TSpTBXSkinsList.Delete(Index: Integer); +begin + if (Index > -1) and (Index < Count) then + SkinOptions[Index].Free; + inherited Delete(Index); +end; + +procedure TSpTBXSkinsList.GetSkinNames(SkinNames: TStrings); +var + I: Integer; +begin + SkinNames.BeginUpdate; + try + SkinNames.Clear; + SkinNames.Add('Default'); + for I := 0 to Count - 1 do + SkinNames.Add(Strings[I]); + finally + SkinNames.EndUpdate; + end; +end; + +function TSpTBXSkinsList.GetSkinOption(Index: Integer): TSpTBXSkinsListEntry; +begin + Result := TSpTBXSkinsListEntry(Objects[Index]); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSkinManager } + +constructor TSpTBXSkinManager.Create; +begin + FNotifies := TList.Create; + FCurrentSkin := TSpTBXSkinOptions.Create; + FSkinsList := TSpTBXSkinsList.Create; +end; + +destructor TSpTBXSkinManager.Destroy; +begin + FreeAndNil(FNotifies); + FreeAndNil(FCurrentSkin); + FreeAndNil(FSkinsList); + inherited; +end; + +procedure TSpTBXSkinManager.AddSkinNotification(AObject: TObject); +begin + if FNotifies.IndexOf(AObject) < 0 then FNotifies.Add(AObject); +end; + +procedure TSpTBXSkinManager.RemoveSkinNotification(AObject: TObject); +begin + FNotifies.Remove(AObject); +end; + +procedure TSpTBXSkinManager.Broadcast; +var + Msg: TMessage; + I: Integer; +begin + if FNotifies.Count > 0 then begin + Msg.Msg := WM_SPSKINCHANGE; + Msg.WParam := 0; + Msg.LParam := 0; + Msg.Result := 0; + for I := 0 to FNotifies.Count - 1 do + TObject(FNotifies[I]).Dispatch(Msg); + end; + if Assigned(FOnSkinChange) then FOnSkinChange(Self); +end; + +procedure TSpTBXSkinManager.BroadcastSkinNotification; +begin + Broadcast; +end; + +procedure TSpTBXSkinManager.LoadFromFile(Filename: WideString); +begin + FCurrentSkin.LoadFromFile(Filename); +end; + +procedure TSpTBXSkinManager.SaveToFile(Filename: WideString); +begin + FCurrentSkin.SaveToFile(Filename); +end; + +function TSpTBXSkinManager.GetCurrentSkinName: string; +begin + Result := FCurrentSkin.SkinName; +end; + +function TSpTBXSkinManager.GetSkinType: TSpTBXSkinType; +begin + Result := SpTBXSkinType(sknSkin); +end; + +function TSpTBXSkinManager.IsDefaultSkin: Boolean; +begin + Result := CurrentSkinName = 'Default'; +end; + +function TSpTBXSkinManager.IsXPThemesEnabled: Boolean; +begin + Result := ThemeServices.ThemesAvailable and UxTheme.UseThemes; +end; + +procedure TSpTBXSkinManager.SetSkin(SkinName: string); +var + I: Integer; + K: TSpTBXSkinsListEntry; +begin + if not SameText(SkinName, CurrentSkinName) then + if SameText(SkinName, 'Default') then + SetToDefaultSkin + else begin + I := FSkinsList.IndexOf(SkinName); + if I > -1 then begin + K := FSkinsList.SkinOptions[I]; + if Assigned(K.SkinClass) then begin + FCurrentSkin.Free; + FCurrentSkin := K.SkinClass.Create; + Broadcast; + end + else + if Assigned(K.SkinStrings) then begin + FCurrentSkin.Free; + FCurrentSkin := TSpTBXSkinOptions.Create; + FCurrentSkin.LoadFromStrings(K.SkinStrings); + end; + end; + end; +end; + +procedure TSpTBXSkinManager.SetToDefaultSkin; +begin + FCurrentSkin.Free; + FCurrentSkin := TSpTBXSkinOptions.Create; + Broadcast; +end; + +procedure TSpTBXSkinManager.ChangeControlSkinType(Control: TWinControl; + SkinType: TSpTBXSkinType; Recursive: Boolean = True); + + procedure ChangeSkinTypeProperty(Component: TComponent; TM: TSpTBXSkinType); + var + S: string; + PropInfo: PPropInfo; + begin + if Length(Component.ClassName) > 6 then begin + S := Copy(Component.ClassName, 1, 6); + if SameText(S, 'TSpTBX') then begin + PropInfo := GetPropInfo(Component, 'SkinType'); + if (PropInfo <> nil) and (PropInfo.PropType^.Kind = tkEnumeration) then + SetOrdProp(Component, PropInfo, Integer(TM)); + end; + end; + end; + +var + I: Integer; + C: TControl; +begin + for I := 0 to Control.ControlCount - 1 do begin + C := Control.Controls[I]; + ChangeSkinTypeProperty(C, SkinType); + if Recursive and (C is TWinControl) then + ChangeControlSkinType(C as TWinControl, SkinType, Recursive); + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXSkinSwitcher } + +constructor TSpTBXSkinSwitcher.Create(AOwner: TComponent); +begin + inherited; + SkinManager.AddSkinNotification(Self); +end; + +destructor TSpTBXSkinSwitcher.Destroy; +begin + SkinManager.RemoveSkinNotification(Self); + inherited; +end; + +function TSpTBXSkinSwitcher.GetSkin: string; +begin + Result := SkinManager.CurrentSkinName; +end; + +procedure TSpTBXSkinSwitcher.SetSkin(const Value: string); +begin + SkinManager.SetSkin(Value); +end; + +procedure TSpTBXSkinSwitcher.WMSpSkinChange(var Message: TMessage); +begin + if Assigned(FOnSkinChange) then FOnSkinChange(Self); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Stock Objects } + +procedure InitializeStock; +begin + StockBitmap := TBitmap.Create; + StockBitmap.Width := 8; + StockBitmap.Height := 8; + + @SpPrintWindow := GetProcAddress(GetModuleHandle(user32), 'PrintWindow'); + + if not Assigned(FInternalSkinManager) then + FInternalSkinManager := TSpTBXSkinManager.Create; +end; + +procedure FinalizeStock; +begin + FreeAndNil(StockBitmap); + FreeAndNil(FInternalSkinManager); +end; + +initialization + InitializeStock; + {$IFDEF SYSTEM_GRADIENT} + FMsimg32Library := LoadLibrary(msimg32); + if FMsimg32Library <> 0 then + GradientFillSystem := GetProcAddress(FMsimg32Library, 'GradientFill') + {$ENDIF} + +finalization + FinalizeStock; + {$IFDEF SYSTEM_GRADIENT} + if FMsimg32Library <> 0 then + FreeLibrary(FMsimg32Library); + {$ENDIF} + +end. diff --git a/internal/2.4.4/1/Source/SpTBXTabs.pas b/internal/2.4.4/1/Source/SpTBXTabs.pas new file mode 100644 index 0000000..0cc3e11 --- /dev/null +++ b/internal/2.4.4/1/Source/SpTBXTabs.pas @@ -0,0 +1,3493 @@ +unit SpTBXTabs; + +{============================================================================== +Version 2.4.4 + +The contents of this file are subject to the SpTBXLib License; you may +not use or distribute this file except in compliance with the +SpTBXLib License. +A copy of the SpTBXLib License may be found in SpTBXLib-LICENSE.txt or at: + http://www.silverpointdevelopment.com/sptbxlib/SpTBXLib-LICENSE.htm + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License Version 1.1 (the "MPL v1.1"), in which case the provisions +of the MPL v1.1 are applicable instead of those in the SpTBXLib License. +A copy of the MPL v1.1 may be found in MPL-LICENSE.txt or at: + http://www.mozilla.org/MPL/ + +If you wish to allow use of your version of this file only under the terms of +the MPL v1.1 and not to allow others to use your version of this file under the +SpTBXLib License, indicate your decision by deleting the provisions +above and replace them with the notice and other provisions required by the +MPL v1.1. If you do not delete the provisions above, a recipient may use your +version of this file under either the SpTBXLib License or the MPL v1.1. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The initial developer of this code is Robert Lee. + +Requirements: +For Delphi/C++Builder 2009 or newer: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org +For Delphi/C++Builder 7-2007: + - Jordan Russell's Toolbar 2000 + http://www.jrsoftware.org + - Troy Wolbrink's TNT Unicode Controls + http://www.tntware.com/delphicontrols/unicode/ + +Development Notes: + - All the theme changes and adjustments are marked with '[Theme-Change]'. + - When an item is hidden the ItemViewer.BoundsRect property is invalid. + - tbicDeleting item notification is fired after the ItemViewer of the + Item is destroyed by TTBView, but the Items array still has the Item. + +TODO: + - Tabbed docking + +History: +2 December 2009 - version 2.4.4 + - Fixed TabControl flicker when changing the caption of a tab + item, thanks to Simon H. for reporting this. + +13 September 2009 - version 2.4.3 + - Fixed TabControl flicker when closing/selecting/scrolling + tab items. + - Fixed incorrect TabControl painting when transparent + child controls get invalidated, thanks for Alfred Vink + for reporting this. + - Fixed incorrect TabControl scrolling, thanks to Henner + Drewes for reporting this. + +8 May 2009 - version 2.4.2 + - Fixed incorrect TabControl behavior, when deleting + the tabs the ActiveTabIndex is incorrectly set if + there are regular Items on the control, thanks to + Jonah for reporting this. + +15 March 2009 - version 2.4.1 + - No changes. + +17 January 2009 - version 2.4 + - No changes. + +26 September 2008 - version 2.3 + - No changes. + +29 July 2008 - version 2.2 + - No changes. + +26 June 2008 - version 2.1 + - No changes. + +3 May 2008 - version 2.0 + - Fixed incorrect close button painting on tab items, + thanks to Miha for reporting this. + +2 April 2008 - version 1.9.5 + - Fixed incorrect TabControl behavior, when deleting the + only visible Tab all the auto-hidden tabs will not + be showed on resize, thanks to Jim for reporting this. + +3 February 2008 - version 1.9.4 + - Fixed AV on TabControl when scrolling tabs, thanks + to Beta Xiong and Yucel Yavuz for reporting this. + - Fixed incorrect TabControl.ScrollState behavior + thanks to Michele for reporting this. + +19 January 2008 - version 1.9.3 + - Fixed recursion on TSpTBXTabToolbar.RightAlignItems, + thanks to Jim for reporting this. + +26 December 2007 - version 1.9.2 + - Minor bug fixes. + +1 December 2007 - version 1.9.1 + - Added OnTabClosing event to TSpTBXTabItem. + - Fixed incorrect tab items painting when TabPosition was + ttpBottom, thanks to Marko Savolainen for reporting this. + +20 November 2007 - version 1.9 + - Added TabBackgroundBorders property to TSpTBXTabSet and + TSpTBXTabControl, when set to true the tabs area is + painted with borders. + - Added TabCloseButton and TabCloseButtonImageIndex properties + to SpTBXTabSet and TSpTBXTabControl to control the close + button visibility on the tab items. + - Added TabMaxSize property to SpTBXTabSet and TSpTBXTabControl + to control the maximum size of the tab items. + - Improved tab scrolling, thanks to Kevin Lu for + reporting this. + +8 February 2007 - version 1.8.3 + - Added accel char handling to TSpTBXTabSet and TSpTBXTabControl + +17 December 2006 - version 1.8.2 + - No changes. + +24 November 2006 - version 1.8.1 + - Fixed incorrect Tab painting when the Default theme was used + and the ThemeType was tttFlat. + +27 August 2006 - version 1.8 + - Fixed incorrect OnActiveTabChanging handling when + ActiveTabIndex is changed on this event, thanks to + Serg Chechenin for reporting this. + +15 June 2006 - version 1.7 + - Fixed incorrect Tab painting when the default theme was used, + the captions were painted in a pushed state, thanks to + Mikalai Arapau for reporting this. + - Fixed incorrect Tab aligning when Autofit was used and the + tab control was parented by a Frame, thanks to + Henk van Kampen for reporting this. + +12 April 2006 - version 1.5 + - Fixed incorrect Tab painting when TabAutofit was true. + +27 February 2006 - version 1.4 + - Fixed flicker when reordering TSpTBXTabSet and TSpTBXTabControl + tabs, thanks to Alexey Naumov for reporting this. + - Fixed incorrect context menu handling in TSpTBXTabSet and + TSpTBXTabControl, thanks to Boris Yankov for reporting this. + - Added OnActiveTabReorder event to TSpTBXTabSet and TSpTBXTabControl. + +10 February 2006 - version 1.3 + - Added TabDragReorder property to TSpTBXTabSet and TSpTBXTabControl, + when this property is true it allows tabs reordering with + drag and drop. + - Added TabAutofit and TabAutofitMaxSize properties to TSpTBXTabSet + and TSpTBXTabControl. When TabAutofit is true the tabs are resized + to fit the tabset. + +28 December 2005 - version 1.2 + - Fixed incorrect TSpTBXTabControl background painting on some themes. + - Fixed incorrect OnActiveTabChange call when the component is being + loaded, thanks to Leroy Casterline for reporting this. + - Fixed incorrect tab scrolling when an item is deleted, thanks to + Daniel Rikowski for reporting this. + +18 October 2005 - version 1.1 + - Fixed incorrect TSpTBXTabItem painting on some themes. + - Added Margins property to TSpTBXPageControl. + +18 August 2005 - version 1.0 + - Added TabVisible property to TSpTBXTabSet and TSpTBXPageControl. + - Added OnActiveTabChanging event to TSpTBXTabSet and TSpTBXPageControl. + +10 June 2005 - version 0.9 + - SpTBXLib may now alternatively, at your option, be used and/or + distributed under the terms of the SpTBXLib License. + Please see the updated LICENSE.TXT file for more information. + - Fixed AV in TSpTBXTabSet and TSpTBXPageControl when used in a Frame + with TabPosition setted to dpBottom, thanks to Cyril Velter for the fix. + +20 May 2005 - version 0.8 + - Fixed tab scrolling of TSpTBXTabSet and TSpTBXPageControl, the tabs + were not allowed to scroll when one single tab was visible, thanks + to Anders Olsson for the fix. + - Added MakeVisible method to the TSpTBXTabSet and TSpTBXPageControl, + it scrolls the tabset, if necessary, to ensure a Tab is in view. + +16 February 2005 - version 0.7 + - No changes. + +23 December 2004 - version 0.6 + - Fixed TSpTBXTabControl reordering bug. + - Changed the order of the TSpTBXTabThemeType enumerated type. + - Added ActivePage property to the TSpTBXTabControl. + - Added Caption, ImageIndex, TabVisible and PopupMenu properties + to TSpTBXTabControl. + +30 August 2004 - version 0.5 + - No changes. + +21 July 2004 - version 0.4 + - Fixed TSpTBXTabControl design time bug, it was allowing to drop + components when ActiveTabIndex = -1 + - Fixed TSpTBXTabSet and TSpTBXTabControl design time bug, the + hidden items were not streamed to the DFM. + - Changed TSpTBXTabControl.OnTabClick event for OnActiveTabChange. + - Added GetPage method to TSpTBXTabControl to get the TSpTBXTabSheet + linked to a TSpTBXTabItem. + +12 July 2004 - version 0.3.1 + - Fixed nasty AV when setting TBXSwitcher.EnableXPStyles to false, + thanks to Alfred for reporting this. + Note: TBXThemeManager unloads the theme library and the theme + parts when some conditions are met, we must handle extra theme + parts outside TBXThemeManager space. + - Fixed incorrect TSpTBXTabSet.ActiveTabIndex property update at + design time. + - Fixed incorrect TSpTBXTabSet painting on some TBX themes, thanks + to Tim for reporting this. + +9 July 2004 - version 0.3 + - Fixed design time AVs when moving or deleting TabSheets. + - Published ThemeType and TabPosition properties for TSpTBXTabItem. + - New component added, TSpTBXTabSet, a fully customizable TabSet + with unicode and toolbar items support. + +28 June 2004 - version 0.2 + - No changes. + +22 June 2004 - version 0.1 + - Initial release. + +==============================================================================} + +interface + +{$BOOLEVAL OFF} // Unit depends on short-circuit boolean evaluation + +uses + Windows, Messages, Classes, SysUtils, Controls, Graphics, ImgList, Forms, + Dialogs, ExtCtrls, TB2Item, TB2Dock, TB2Toolbar, + SpTBXSkins, SpTBXItem, SpTBXControls; + +const + C_SpTBXTabGroupIndex = 7777; + WM_INVALIDATETABBACKGROUND = WM_USER + 7777; + +type + TSpTBXTabEdge = ( + tedNone, // No edge needed + tedLeft, // Left edge of the tab + tedRight // Right edge of the tab + ); + + TSpTBXTabPosition = ( + ttpTop, // Top aligned tabset + ttpBottom // Bottom aligned tabset + ); + + TSpTBXTabCloseButton = ( + tcbNone, // No close button on tabs + tcbActive, // Close button only on active tab + tcbAll // Close button on all the tabs + ); + + TSpTBXTabChangeEvent = procedure(Sender: TObject; TabIndex: Integer) of object; + TSpTBXTabChangingEvent = procedure(Sender: TObject; TabIndex, NewTabIndex: Integer; var Allow: Boolean) of object; + TSpTBXTabClosingEvent = procedure(Sender: TObject; var Allow, CloseAndFree: Boolean) of object; + + TSpTBXTabToolbar = class; + TSpTBXCustomTabSet = class; + TSpTBXCustomTabControl = class; + TSpTBXTabSheet = class; + + TSpTBXTabItemDragObject = class(TSpTBXCustomDragObject) + public + constructor Create(ASourceControl: TControl; AItem: TTBCustomItem); override; + end; + + { TSpTBXTabItem } + + TSpTBXTabItem = class(TSpTBXCustomItem) + private + FSkinType: TSpTBXSkinType; + FOnDrawTabCloseButton: TSpTBXDrawImageEvent; + FOnTabClose: TNotifyEvent; + FOnTabClosing: TSpTBXTabClosingEvent; + function GetTabColor: TColor; + function GetSkinType: TSpTBXSkinType; + procedure SetSkinType(const Value: TSpTBXSkinType); + protected + function DialogChar(CharCode: Word): Boolean; override; + procedure DoDrawTabCloseButton(ACanvas: TCanvas; State: TSpTBXSkinStatesType; + const PaintStage: TSpTBXPaintStage; var AImageList: TCustomImageList; + var AImageIndex: Integer; var ARect: TRect; var PaintDefault: Boolean); virtual; + procedure DoTabClose; virtual; + procedure DoTabClosing(var Allow, CloseAndFree: Boolean); virtual; + function GetItemViewerClass(AView: TTBView): TTBItemViewerClass; override; + function GetTabToolbar(out TabToolbar: TSpTBXTabToolbar): Boolean; + procedure ToggleControl; override; + property Control; // TabSheet + property TabColor: TColor read GetTabColor; + public + constructor Create(AOwner: TComponent); override; + procedure Click; override; + procedure TabClose; + function GetNextTab(GoForward: Boolean; SearchType: TSpTBXSearchItemViewerType): TSpTBXTabItem; + function IsFirstVisible: Boolean; + function IsFirstVisibleTab: Boolean; + function IsLastVisibleTab: Boolean; + published + property Action; + property Checked; + // Hide DisplayMode + // property DisplayMode default nbdmImageAndText; + property Enabled; + // Hide GroupIndex, all the TabItems must have the same GroupIndex + // property GroupIndex; + property HelpContext; + property ImageIndex; + property Images; + property InheritOptions; + property MaskOptions; + property Options; + property ShortCut; + property Visible; + property OnClick; + property OnSelect; + // TSpTBXCustomItem properties + property Alignment; + property CustomWidth; + property CustomHeight; + property Margins default 4; + property MinHeight; + property MinWidth; + property FontSettings; + property Wrapping default twEndEllipsis; + property OnDrawImage; + property OnDrawItem; + property OnDrawHint; + property OnDrawCaption; + // TSpTBXTabItem properties + property SkinType: TSpTBXSkinType read GetSkinType write SetSkinType default sknSkin; + property OnDrawTabCloseButton: TSpTBXDrawImageEvent read FOnDrawTabCloseButton write FOnDrawTabCloseButton; + property OnTabClose: TNotifyEvent read FOnTabClose write FOnTabClose; + property OnTabClosing: TSpTBXTabClosingEvent read FOnTabClosing write FOnTabClosing; + end; + + TSpTBXTabItemViewer = class(TSpTBXItemViewer) + private + FTabCloseButtonState: TSpTBXSkinStatesType; + function CorrectTabRect(ARect: TRect): TRect; + function GetItem: TSpTBXTabItem; + procedure GetTabCloseButtonImgList(var AImageList: TCustomImageList; var AImageIndex: Integer); + function IsTabCloseButtonVisible: Boolean; + function GetTabPosition: TSpTBXTabPosition; + protected + procedure CalcSize(const Canvas: TCanvas; var AWidth, AHeight: Integer); override; + procedure DoDrawButton(ACanvas: TCanvas; ARect: TRect; ItemInfo: TSpTBXMenuItemInfo; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); override; + procedure DoDrawCaption(ACanvas: TCanvas; ClientAreaRect: TRect; State: TSpTBXSkinStatesType; + var ACaption: WideString; var CaptionRect: TRect; var CaptionFormat: Cardinal; + IsTextRotated: Boolean; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); override; + procedure DoDrawImage(ACanvas: TCanvas; State: TSpTBXSkinStatesType; + const PaintStage: TSpTBXPaintStage; var AImageList: TCustomImageList; + var AImageIndex: Integer; var ARect: TRect; + var PaintDefault: Boolean); override; + procedure DoDrawTabCloseButton(ACanvas: TCanvas; State: TSpTBXSkinStatesType; + const PaintStage: TSpTBXPaintStage; var AImageList: TCustomImageList; + var AImageIndex: Integer; var ARect: TRect; var PaintDefault: Boolean); virtual; + procedure DrawBottomBorder(ACanvas: TCanvas; ARect: TRect); + procedure DrawTab(ACanvas: TCanvas; ARect: TRect; + AEnabled, AChecked, AHoverItem: Boolean; Position: TSpTBXTabPosition; + ASeparator: Boolean = False; AEdge: TSpTBXTabEdge = tedNone); virtual; + procedure DrawItemRightImage(ACanvas: TCanvas; ARect: TRect; ItemInfo: TSpTBXMenuItemInfo); override; + function GetRightImageSize: TSize; override; + function GetRightImageRect: TRect; + function GetTextColor(State: TSpTBXSkinStatesType): TColor; override; + procedure InternalMouseMove(Shift: TShiftState; X, Y: Integer); override; + procedure Leaving; override; + public + function IsOnTabToolbar: Boolean; + property Item: TSpTBXTabItem read GetItem; // Hides the inherited TB2K Item property + property TabCloseButtonState: TSpTBXSkinStatesType read FTabCloseButtonState; + property TabPosition: TSpTBXTabPosition read GetTabPosition; + end; + + { TSpTBXTabToolbar } + + TSpTBXTabToolbarView = class(TSpTBXToolbarView) + public + procedure BeginUpdate; override; + procedure EndUpdate; override; + end; + + TSpTBXTabToolbar = class(TSpTBXToolbar) + private + FActiveTabRect: TRect; + FSkinType: TSpTBXSkinType; + FTabAutofit: Boolean; + FTabAutofitMaxSize: Integer; + FTabCloseButtonImageIndex: Integer; + FTabCloseButton: TSpTBXTabCloseButton; + FTabDragReorder: Boolean; + FTabBackgroundBorders: Boolean; + FTabColor: TColor; + FTabMaxSize: Integer; + FTabPosition: TSpTBXTabPosition; + procedure Scroll(ToRight: Boolean); + function GetActiveTab: TSpTBXTabItem; + procedure SetActiveTabIndex(Value: Integer); + procedure SetSkinType(const Value: TSpTBXSkinType); + procedure SetTabCloseButton(const Value: TSpTBXTabCloseButton); + procedure SetTabCloseButtonImageIndex(const Value: Integer); + procedure SetTabAutofit(const Value: Boolean); + procedure SetTabAutofitMaxSize(const Value: Integer); + procedure SetTabBackgroundBorders(const Value: Boolean); + procedure SetTabColor(const Value: TColor); + procedure SetTabMaxSize(const Value: Integer); + procedure SetTabPosition(const Value: TSpTBXTabPosition); + procedure CMDesignHitTest(var Message: TCMDesignHitTest); message CM_DESIGNHITTEST; + protected + FHiddenTabs: TSpTBXItemCacheCollection; + FActiveTabIndex: Integer; + FOwnerTabControl: TSpTBXCustomTabSet; + procedure Autofit; + function GetItemsTextColor(State: TSpTBXSkinStatesType): TColor; override; + function GetViewClass: TTBToolbarViewClass; override; + procedure InternalDrawBackground(ACanvas: TCanvas; ARect: TRect; PaintOnNCArea: Boolean; PaintBorders: Boolean = True); override; + procedure DoItemNotification(Ancestor: TTBCustomItem; Relayed: Boolean; Action: TTBItemChangedAction; Index: Integer; Item: TTBCustomItem); override; + procedure RightAlignItems; override; + + function CanDragCustomize(Button: TMouseButton; Shift: TShiftState; X, Y: Integer): Boolean; override; + procedure DoStartDrag(var DragObject: TDragObject); override; + procedure DragOver(Source: TObject; X: Integer; Y: Integer; State: TDragState; var Accept: Boolean); override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function GetTabsCount(VisibleOnly: Boolean): Integer; + procedure InvalidateActiveTab; + procedure InvalidateNC; + procedure MakeVisible(ATab: TSpTBXTabItem); + procedure ScrollLeft; + procedure ScrollRight; + procedure ScrollState(out CanScrollToLeft, CanScrollToRight: Boolean); + procedure TabClose(ATab: TSpTBXTabItem); + published + property ActiveTab: TSpTBXTabItem read GetActiveTab; + property ActiveTabIndex: Integer read FActiveTabIndex write SetActiveTabIndex; + property TabCloseButton: TSpTBXTabCloseButton read FTabCloseButton write SetTabCloseButton default tcbNone; + property TabCloseButtonImageIndex: Integer read FTabCloseButtonImageIndex write SetTabCloseButtonImageIndex default -1; + property TabBackgroundBorders: Boolean read FTabBackgroundBorders write SetTabBackgroundBorders; + property TabAutofit: Boolean read FTabAutofit write SetTabAutofit default False; + property TabAutofitMaxSize: Integer read FTabAutofitMaxSize write SetTabAutofitMaxSize default 200; + property TabColor: TColor read FTabColor write SetTabColor default clBtnFace; + property TabMaxSize: Integer read FTabMaxSize write SetTabMaxSize default -1; + property TabPosition: TSpTBXTabPosition read FTabPosition write SetTabPosition default ttpTop; + property TabDragReorder: Boolean read FTabDragReorder write FTabDragReorder default False; + property SkinType: TSpTBXSkinType read FSkinType write SetSkinType default sknSkin; + end; + + { TSpTBXTabSheet } + + TSpTBXTabSheet = class(TCustomControl) + private + FTabControl: TSpTBXCustomTabControl; + FItem: TSpTBXTabItem; + FItemName: String; + FPrevFocused: TWincontrol; + procedure ReadItemName(Reader: TReader); + procedure WriteItemName(Writer: TWriter); + function GetCaption: WideString; + function GetTabVisible: Boolean; + procedure SetCaption(const Value: WideString); + procedure SetTabVisible(const Value: Boolean); + function GetImageIndex: Integer; + procedure SetImageIndex(const Value: Integer); + procedure CMVisiblechanged(var Message: TMessage); message CM_VISIBLECHANGED; + procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; + procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; + protected + procedure CreateParams(var Params: TCreateParams); override; + procedure AdjustClientRect(var Rect: TRect); override; + procedure DefineProperties(Filer: TFiler); override; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure ReadState(Reader: TReader); override; + procedure VisibleChanging; override; + property Align default alClient; + property PrevFocused: TWincontrol read FPrevFocused; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + property Item: TSpTBXTabItem read FItem write FItem; + property TabControl: TSpTBXCustomTabControl read FTabControl write FTabControl; + published + {$IF CompilerVersion > 15} // For Delphi 2005 and up + property Padding; + property OnAlignInsertBefore; + property OnAlignPosition; + {$IFEND} + property PopupMenu; + property Caption: WideString read GetCaption write SetCaption; + property ImageIndex: Integer read GetImageIndex write SetImageIndex; + property TabVisible: Boolean read GetTabVisible write SetTabVisible default True; + end; + + { TSpTBXTabControl } + + TSpTBXCustomTabSet = class(TSpTBXCompoundItemsControl) + private + FItemMoveCount: Integer; + FItemMoved: TSpTBXTabItem; + FTabVisible: Boolean; + FLoadingActiveIndex: Integer; + FUpdatingIndex: Boolean; + FResizing: Boolean; + FOnDrawBackground: TSpTBXDrawEvent; + FOnActiveTabChange: TSpTBXTabChangeEvent; + FOnActiveTabChanging: TSpTBXTabChangingEvent; + FOnActiveTabReorder: TSpTBXTabChangeEvent; + FOnActiveTabReordering: TSpTBXTabChangingEvent; + procedure ReadHiddenItems(Reader: TReader); + procedure WriteHiddenItems(Writer: TWriter); + function GetActiveTabIndex: Integer; + procedure SetActiveTabIndex(Value: Integer); + function GetSkinType: TSpTBXSkinType; + procedure SetSkinType(const Value: TSpTBXSkinType); + function GetTabAutofit: Boolean; + procedure SetTabAutofit(const Value: Boolean); + function GetTabAutofitMaxSize: Integer; + procedure SetTabAutofitMaxSize(const Value: Integer); + function GetTabBackgroundBorders: Boolean; + procedure SetTabBackgroundBorders(const Value: Boolean); + function GetTabBackgroundColor: TColor; + procedure SetTabBackgroundColor(const Value: TColor); + function GetTabCloseButton: TSpTBXTabCloseButton; + procedure SetTabCloseButton(const Value: TSpTBXTabCloseButton); + function GetTabCloseButtonImageIndex: Integer; + procedure SetTabCloseButtonImageIndex(const Value: Integer); + function GetTabDragReorder: Boolean; + procedure SetTabDragReorder(const Value: Boolean); + function GetTabMaxSize: Integer; + procedure SetTabMaxSize(const Value: Integer); + function GetTabPosition: TSpTBXTabPosition; + procedure SetTabPosition(const Value: TSpTBXTabPosition); + procedure SetTabVisible(const Value: Boolean); + function GetTabToolbar: TSpTBXTabToolbar; + procedure CMColorchanged(var Message: TMessage); message CM_COLORCHANGED; + procedure CMSpTBXControlsInvalidate(var Message: TMessage); message CM_SPTBXCONTROLSINVALIDATE; + procedure WMEraseBkgnd(var Message: TMessage); message WM_ERASEBKGND; + procedure WMInvalidateTabBackground(var Message: TMessage); message WM_INVALIDATETABBACKGROUND; + procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; + function GetActiveTab: TSpTBXTabItem; + protected + FBackground: TBitmap; + // Painting + procedure DoDrawBackground(ACanvas: TCanvas; ARect: TRect; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); virtual; + function GetFullRepaint: Boolean; virtual; + + // Tabs + function CanActiveTabChange(const TabIndex, NewTabIndex: Integer): Boolean; virtual; + procedure DoActiveTabChange(const TabIndex: Integer); virtual; + function CanActiveTabReorder(const TabIndex, NewTabIndex: Integer): Boolean; virtual; + procedure DoActiveTabReorder(const TabIndex: Integer); virtual; + procedure ItemNotification(Ancestor: TTBCustomItem; Relayed: Boolean; + Action: TTBItemChangedAction; Index: Integer; Item: TTBCustomItem); virtual; // Items change notification + procedure TabInserted(Item: TSpTBXTabItem); virtual; + procedure TabDeleting(Item: TSpTBXTabItem; FreeTabSheet: Boolean = True); virtual; + + // Component + procedure DefineProperties(Filer: TFiler); override; + function GetToolbarClass: TSpTBXToolbarClass; override; + procedure Loaded; override; + + property Color default clBtnFace; + property ParentColor default False; + property ActiveTabIndex: Integer read GetActiveTabIndex write SetActiveTabIndex; + property TabAutofit: Boolean read GetTabAutofit write SetTabAutofit default False; + property TabAutofitMaxSize: Integer read GetTabAutofitMaxSize write SetTabAutofitMaxSize default 200; + property TabBackgroundColor: TColor read GetTabBackgroundColor write SetTabBackgroundColor default clNone; + property TabBackgroundBorders: Boolean read GetTabBackgroundBorders write SetTabBackgroundBorders default False; + property TabCloseButton: TSpTBXTabCloseButton read GetTabCloseButton write SetTabCloseButton default tcbNone; + property TabCloseButtonImageIndex: Integer read GetTabCloseButtonImageIndex write SetTabCloseButtonImageIndex default -1; + property TabDragReorder: Boolean read GetTabDragReorder write SetTabDragReorder default False; + property TabMaxSize: Integer read GetTabMaxSize write SetTabMaxSize default -1; + property TabPosition: TSpTBXTabPosition read GetTabPosition write SetTabPosition default ttpTop; + property TabVisible: Boolean read FTabVisible write SetTabVisible default True; + property SkinType: TSpTBXSkinType read GetSkinType write SetSkinType default sknSkin; + property OnActiveTabChange: TSpTBXTabChangeEvent read FOnActiveTabChange write FOnActiveTabChange; + property OnActiveTabChanging: TSpTBXTabChangingEvent read FOnActiveTabChanging write FOnActiveTabChanging; + property OnActiveTabReorder: TSpTBXTabChangeEvent read FOnActiveTabReorder write FOnActiveTabReorder; + property OnActiveTabReordering: TSpTBXTabChangingEvent read FOnActiveTabReordering write FOnActiveTabReordering; + property OnDrawBackground: TSpTBXDrawEvent read FOnDrawBackground write FOnDrawBackground; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function Add(ACaption: WideString): TSpTBXTabItem; + function Insert(NewIndex: Integer; ACaption: WideString): TSpTBXTabItem; + function DrawBackground(DC: HDC; ARect: TRect): Boolean; + function GetTabSetHeight: Integer; + procedure InvalidateBackground(InvalidateChildren: Boolean = True); override; + procedure MakeVisible(ATab: TSpTBXTabItem); + procedure ScrollLeft; + procedure ScrollRight; + procedure ScrollState(out Left, Right: Boolean); + procedure TabClick(ATab: TSpTBXTabItem); virtual; + property ActiveTab: TSpTBXTabItem read GetActiveTab; + property Canvas; + property Toolbar: TSpTBXTabToolbar read GetTabToolbar; + end; + + TSpTBXTabSet = class(TSpTBXCustomTabSet) + published + property Align; + property Anchors; + property BiDiMode; + property Color; + property Constraints; + property DockSite; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + property ParentColor; + property ParentBiDiMode; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property Visible; + {$IF CompilerVersion > 15} // For Delphi 2005 and up + property OnAlignInsertBefore; + property OnAlignPosition; + {$IFEND} + property OnCanResize; + property OnContextPopup; + property OnDockDrop; + property OnDockOver; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnGetSiteInfo; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnResize; + property OnStartDock; + property OnStartDrag; + property OnUnDock; + // TSpTBXCustomTabSet properties + property ActiveTabIndex; + property Images; + property TabAutofit; + property TabAutofitMaxSize; + property TabBackgroundColor; + property TabBackgroundBorders; + property TabCloseButton; + property TabCloseButtonImageIndex; + property TabDragReorder; + property TabMaxSize; + property TabPosition; + property TabVisible; + property SkinType; + property OnActiveTabChange; + property OnActiveTabChanging; + property OnActiveTabReorder; + property OnActiveTabReordering; + property OnDrawBackground; + end; + + { TSpTBXTabControl } + + TSpTBXCustomTabControl = class(TSpTBXCustomTabSet) + private + FEmptyTabSheet: TSpTBXTabSheet; + procedure RealignTabSheets; + function GetActivePage: TSpTBXTabSheet; + function GetPages(Index: Integer): TSpTBXTabSheet; + function GetPagesCount: Integer; + procedure SetActivePage(const Value: TSpTBXTabSheet); + procedure CMSpTBXControlsInvalidate(var Message: TMessage); message CM_SPTBXCONTROLSINVALIDATE; + procedure WMSpSkinChange(var Message: TMessage); message WM_SPSKINCHANGE; + protected + FPages: TList; + procedure DoActiveTabChange(const ItemIndex: Integer); override; + function GetFullRepaint: Boolean; override; + procedure TabInserted(Item: TSpTBXTabItem); override; + procedure TabDeleting(Item: TSpTBXTabItem; FreeTabSheet: Boolean = True); override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function GetPage(Item: TSpTBXTabItem): TSpTBXTabSheet; + property ActivePage: TSpTBXTabSheet read GetActivePage write SetActivePage; + property Pages[Index: Integer]: TSpTBXTabSheet read GetPages; + property PagesCount: Integer read GetPagesCount; + end; + + TSpTBXTabControl = class(TSpTBXCustomTabControl) + published + property Align; + property Anchors; + property BiDiMode; + property Color; + property Constraints; + property DockSite; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + property ParentColor; + property ParentBiDiMode; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property Visible; + property OnCanResize; + property OnContextPopup; + property OnDockDrop; + property OnDockOver; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnGetSiteInfo; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnResize; + property OnStartDock; + property OnStartDrag; + property OnUnDock; + // TSpTBXCustomTabControl properties + property ActiveTabIndex; + property Images; + property TabAutofit; + property TabAutofitMaxSize; + property TabBackgroundColor; + property TabBackgroundBorders; + property TabCloseButton; + property TabCloseButtonImageIndex; + property TabDragReorder; + property TabMaxSize; + property TabPosition; + property TabVisible; + property SkinType; + property OnActiveTabChange; + property OnActiveTabChanging; + property OnActiveTabReorder; + property OnActiveTabReordering; + property OnDrawBackground; + end; + +function SpGetNextTabItemViewer(View: TTBView; IV: TTBItemViewer; GoForward: Boolean; SearchType: TSpTBXSearchItemViewerType): TTBItemViewer; +procedure SpDrawXPTab(ACanvas: TCanvas; ARect: TRect; Enabled, Checked, HotTrack, Focused: Boolean; Position: TSpTBXTabPosition; SkinType: TSpTBXSkinType; Edge: TSpTBXTabEdge = tedNone); +procedure SpDrawXPTabControlBackground(ACanvas: TCanvas; ARect: TRect; AColor: TColor; BottomTabs: Boolean; SkinType: TSpTBXSkinType); + +implementation + +uses + Themes, UxTheme, Types; + +type + TTBItemViewerAccess = class(TTBItemViewer); + TSpTBXCustomItemAccess = class(TSpTBXCustomItem); + TSpTBXDockAccess = class(TSpTBXDock); + TSpTBXToolbarAccess = class(TSpTBXToolbar); + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ Helpers } + +function SpGetNextTabItemViewer(View: TTBView; IV: TTBItemViewer; GoForward: Boolean; + SearchType: TSpTBXSearchItemViewerType): TTBItemViewer; +// Returns the left or right Tab item depending on GoForward +// SearchType can be: +// sivtNormal: Normal search +// sivtInmediate: Search for the inmediate ItemViewer +// sivtInmediateSkipNonVisible: Search for the next inmediate ItemViewer, skipping non visible ones +begin + Result := nil; + while Result = nil do begin + IV := SpGetNextItemSameEdge(View, IV, GoForward, SearchType); + if not Assigned(IV) then + Break // Not found, exit + else + if IV.Item is TSpTBXTabItem then begin + Result := IV; // Found Tab + Break; + end + else begin + case SearchType of + sivtInmediate: + Break; // Inmediate not found, exit + sivtInmediateSkipNonVisible: + if IV.Item.Visible then Break; // Inmediate not found and visible, exit + end; + end; + end; +end; + +procedure SpDrawXPTab(ACanvas: TCanvas; ARect: TRect; + Enabled, Checked, HotTrack, Focused: Boolean; Position: TSpTBXTabPosition; + SkinType: TSpTBXSkinType; Edge: TSpTBXTabEdge = tedNone); +var + Part, Flags: Cardinal; + B: TBitmap; + R, FlippedR: TRect; + State: TSpTBXSkinStatesType; +begin + SkinType := SpTBXSkinType(SkinType); + if (SkinType = sknNone) and not Checked then + Exit; + + B := TBitmap.Create; + try + B.Width := ARect.Right - ARect.Left; + B.Height := ARect.Bottom - ARect.Top; + R := Rect(0, 0, B.Width, B.Height); + B.Canvas.Brush.Color := clFuchsia; + B.Canvas.FillRect(R); + B.TransparentColor := clFuchsia; + B.Transparent := True; + + case SkinType of + sknNone: + if Checked then begin + Position := ttpTop; // Don't need to flip + B.Canvas.Brush.Color := ACanvas.Brush.Color; + B.Canvas.FillRect(R); + ExtCtrls.Frame3D(B.Canvas, R, clWindow, clWindowFrame, 1); + ExtCtrls.Frame3D(B.Canvas, R, B.Canvas.Brush.Color, clBtnShadow, 1); + R := Rect(0, 0, B.Width, B.Height); // Frame3D changed R + end; + sknWindows: + begin + case Edge of + tedLeft: Part := TABP_TABITEMLEFTEDGE; + tedRight: Part := TABP_TABITEMRIGHTEDGE; + else + Part := TABP_TABITEM; + end; + + Flags := TIS_NORMAL; + if not Enabled then Flags := TIS_DISABLED + else + if Checked then Flags := TIS_SELECTED + else + if HotTrack then Flags := TIS_HOT; + DrawThemeBackground(ThemeServices.Theme[teTab], B.Canvas.Handle, Part, Flags, R, nil); + end; + sknSkin: + begin + State := CurrentSkin.GetState(Enabled, False, HotTrack, Checked); + CurrentSkin.PaintBackground(B.Canvas, R, skncTab, State, True, True); + end; + end; + + // Flip top to bottom + if Position = ttpBottom then begin + // Unclear why extra "-1" is needed here. + FlippedR := R; + FlippedR.Top := R.Bottom - 1; + FlippedR.Bottom := R.Top - 1; + B.Canvas.CopyRect(R, B.Canvas, FlippedR); + end; + + // Draw focus + if Checked and Focused then begin + InflateRect(R, -3, -3); + SpDrawFocusRect(B.Canvas, R); + end; + + ACanvas.Draw(ARect.Left, ARect.Top, B); + finally + B.Free; + end; +end; + +procedure SpDrawXPTabControlBackground(ACanvas: TCanvas; ARect: TRect; AColor: TColor; + BottomTabs: Boolean; SkinType: TSpTBXSkinType); +var + B: TBitmap; + R: TRect; +begin + SkinType := SpTBXSkinType(SkinType); + B := TBitmap.Create; + try + B.Width := ARect.Right - ARect.Left; + B.Height := ARect.Bottom - ARect.Top; + R := Rect(0, 0, B.Width, B.Height); + + // Draw the top/bottom border + case SkinType of + sknNone: + begin + BottomTabs := False; // Don't flip + B.Canvas.Brush.Color := AColor; + B.Canvas.FillRect(R); + ExtCtrls.Frame3D(B.Canvas, R, clWindow, clWindowFrame, 1); + ExtCtrls.Frame3D(B.Canvas, R, AColor, clBtnShadow, 1); + R := Rect(0, 0, B.Width, B.Height); // Frame3D changed R + end; + sknWindows: + DrawThemeBackground(ThemeServices.Theme[teTab], B.Canvas.Handle, TABP_PANE, 0, R, nil); + sknSkin: + begin + B.Canvas.Brush.Color := clWhite; + B.Canvas.FillRect(R); + CurrentSkin.PaintBackground(B.Canvas, R, skncTabBackground, sknsNormal, True, True); + end; + end; + + // Flip top to bottom + if BottomTabs then begin + // Unclear why extra "-1" is needed here. + R.Top := B.Height - 1; + R.Bottom := -1 + end; + + ACanvas.CopyRect(ARect, B.Canvas, R); + finally + B.Free; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXTabItemDragObject } + +constructor TSpTBXTabItemDragObject.Create(ASourceControl: TControl; + AItem: TTBCustomItem); +begin + inherited Create(ASourceControl, AItem); + DragCursorAccept := crDefault; + DragCursorCancel := crDefault; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXTabItem } + +constructor TSpTBXTabItem.Create(AOwner: TComponent); +begin + inherited; + DisplayMode := nbdmImageAndText; + GroupIndex := C_SpTBXTabGroupIndex; + Wrapping := twEndEllipsis; + Margins := 4; + FSkinType := sknSkin; +end; + +procedure TSpTBXTabItem.Click; +var + T: TSpTBXTabToolbar; + I: Integer; +begin + // Set the Checked property to True, Autocheck is False + // Checked will call Item.Invalidate, the TabSet.ItemNotification will + // handle the invalidation and set the ActiveTabIndex. + if not Checked and Enabled and Visible then begin + if GetTabToolbar(T) then begin + I := T.Items.IndexOf(Self); + if T.FOwnerTabControl.CanActiveTabChange(T.ActiveTabIndex, I) then + Checked := True; + end; + inherited; + end; +end; + +procedure TSpTBXTabItem.TabClose; +var + NextTab: TSpTBXTabItem; + T: TSpTBXTabToolbar; + CloseAndFree, CanTabClose: Boolean; +begin + if Visible then begin + GetTabToolbar(T); + if not Assigned(T) then Exit; + + CanTabClose := True; + CloseAndFree := False; + DoTabClosing(CanTabClose, CloseAndFree); + if CanTabClose then begin + // Check the next visible tab + NextTab := nil; + if Checked then begin + NextTab := GetNextTab(True, sivtInmediateSkipNonVisible); + if not Assigned(NextTab) then + NextTab := GetNextTab(False, sivtInmediateSkipNonVisible); + end; + + T.BeginUpdate; + try + Visible := False; + DoTabClose; + if CloseAndFree then + Free; // Removes the item from the parent, sends tbicDeleting notification and frees the item + if Assigned(NextTab) then + NextTab.Click; // Sends tbicInvalidate notification, which is handled by TSpTBXCustomTabSet.ItemNotification + finally + T.EndUpdate; + end; + end; + end; +end; + +function TSpTBXTabItem.DialogChar(CharCode: Word): Boolean; +begin + Result := inherited DialogChar(CharCode); + if Enabled and Visible and IsAccel(CharCode, Caption) then begin + Click; + Result := True; + end; +end; + +procedure TSpTBXTabItem.DoDrawTabCloseButton(ACanvas: TCanvas; + State: TSpTBXSkinStatesType; const PaintStage: TSpTBXPaintStage; + var AImageList: TCustomImageList; var AImageIndex: Integer; var ARect: TRect; + var PaintDefault: Boolean); +begin + if Assigned(FOnDrawTabCloseButton) then FOnDrawTabCloseButton(Self, ACanvas, State, PaintStage, + AImageList, AImageIndex, ARect, PaintDefault); +end; + +procedure TSpTBXTabItem.DoTabClose; +begin + if Assigned(FOnTabClose) then FOnTabClose(Self); +end; + +procedure TSpTBXTabItem.DoTabClosing(var Allow, CloseAndFree: Boolean); +begin + if Assigned(FOnTabClosing) then FOnTabClosing(Self, Allow, CloseAndFree); +end; + +function TSpTBXTabItem.GetItemViewerClass(AView: TTBView): TTBItemViewerClass; +begin + Result := TSpTBXTabItemViewer; +end; + +function TSpTBXTabItem.GetNextTab(GoForward: Boolean; SearchType: TSpTBXSearchItemViewerType): TSpTBXTabItem; +// Returns the left or right Tab item depending on GoForward, skipping all the non-visible ones. +// If Inmediate is true it will only search for the next inmediate tab +var + T: TSpTBXTabToolbar; + IV: TTBItemViewer; +begin + Result := nil; + + if GetTabToolbar(T) then begin + IV := SpFindItemViewer(T.View, Self); + if Assigned(IV) then begin + IV := SpGetNextTabItemViewer(T.View, IV, GoForward, SearchType); + if Assigned(IV) then + Result := IV.Item as TSpTBXTabItem + end; + end; +end; + +function TSpTBXTabItem.GetTabColor: TColor; +var + T: TSpTBXTabToolbar; +begin + Result := clBtnFace; + if GetTabToolbar(T) then + Result := T.TabColor; +end; + +function TSpTBXTabItem.GetSkinType: TSpTBXSkinType; +var + T: TSpTBXTabToolbar; +begin + if GetTabToolbar(T) then + FSkinType := T.SkinType; + Result := FSkinType; +end; + +procedure TSpTBXTabItem.SetSkinType(const Value: TSpTBXSkinType); +var + T: TSpTBXTabToolbar; +begin + // Don't change the SkinType if the item is inside a TabToolbar + if not GetTabToolbar(T) then begin + FSkinType := Value; + Change(False); + end; +end; + +function TSpTBXTabItem.IsFirstVisible: Boolean; +var + T: TSpTBXTabToolbar; + IV: TTBItemViewer; +begin + Result := False; + if GetTabToolbar(T) then begin + IV := SpFindItemViewer(T.View, Self); + if Assigned(IV) then + Result := T.View.NextSelectable(nil, True) = IV; + end; +end; + +function TSpTBXTabItem.IsFirstVisibleTab: Boolean; +var + T: TSpTBXTabToolbar; +begin + if GetTabToolbar(T) then + Result := not Assigned(GetNextTab(False, sivtNormal)) + else + Result := False; +end; + +function TSpTBXTabItem.IsLastVisibleTab: Boolean; +var + T: TSpTBXTabToolbar; +begin + if GetTabToolbar(T) then + Result := not Assigned(GetNextTab(True, sivtNormal)) + else + Result := False; +end; + +function TSpTBXTabItem.GetTabToolbar(out TabToolbar: TSpTBXTabToolbar): Boolean; +var + C: TComponent; +begin + C := GetParentComponent; + if Assigned(C) and (C is TSpTBXTabToolbar) then + TabToolbar := C as TSpTBXTabToolbar + else + TabToolbar := nil; + Result := Assigned(TabToolbar); +end; + +procedure TSpTBXTabItem.ToggleControl; +begin + // Do nothing, the Control property is the Tabsheet, and its visibility + // is setted by TabSet.ActiveTabIndex +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXTabItemViewer } + +procedure TSpTBXTabItemViewer.CalcSize(const Canvas: TCanvas; var AWidth, + AHeight: Integer); +var + TabMaxSize: Integer; +begin + inherited CalcSize(Canvas, AWidth, AHeight); + + if IsOnTabToolbar and not Item.Anchored then begin + TabMaxSize := TSpTBXTabToolbar(View.Window).TabMaxSize; + if TabMaxSize > 0 then + if IsRotated then begin + if AHeight > TabMaxSize then + AHeight := TabMaxSize; + end + else begin + if AWidth > TabMaxSize then + AWidth := TabMaxSize; + end; + end; +end; + +function TSpTBXTabItemViewer.CorrectTabRect(ARect: TRect): TRect; +// Offsets the rect to give a pushed effect on the tabs +begin + Result := ARect; + if not Item.Checked then + case TabPosition of + ttpTop: OffsetRect(Result, 0, 2); + ttpBottom: OffsetRect(Result, 0, -2); + end; +end; + +procedure TSpTBXTabItemViewer.DoDrawButton(ACanvas: TCanvas; ARect: TRect; + ItemInfo: TSpTBXMenuItemInfo; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +var + LeftT, RightT: TTBItemViewer; + IsHoverItem: Boolean; + R: TRect; + Position: TSpTBXTabPosition; + TT: TSpTBXSkinType; +begin + inherited; + + if (PaintStage = pstPrePaint) and PaintDefault then begin + PaintDefault := False; + IsHoverItem := (ItemInfo.State = sknsHotTrack) or (ItemInfo.State = sknsCheckedAndHotTrack); + Position := TabPosition; + + // Match the bottom of the Tab with the bottom of the TabSet + case Position of + ttpTop: ARect.Bottom := ARect.Bottom + 1; + ttpBottom: ARect.Top := ARect.Top - 1; + end; + R := ARect; + TT := SpTBXSkinType(Item.SkinType); + + case TT of + sknNone, sknSkin: + if Item.Checked or (IsHoverItem and (TT <> sknNone)) or + not CurrentSkin.Options(skncTab, sknsNormal).Body.IsEmpty or + not CurrentSkin.Options(skncTab, sknsNormal).Borders.IsEmpty then + begin + case Position of + ttpTop: Inc(R.Bottom, 5); + ttpBottom: Dec(R.Top, 5); + end; + DrawTab(ACanvas, R, Item.Enabled, Item.Checked, IsHoverItem, Position); + end + else begin + // Draw the separators + RightT := SpGetNextTabItemViewer(View, Self, True, sivtInmediateSkipNonVisible); + if Assigned(RightT) and not RightT.Item.Checked then + DrawTab(ACanvas, R, Item.Enabled, Item.Checked, IsHoverItem, Position, True); + end; + sknWindows: + begin + if IsOnTabToolbar then begin + // Find the inmediate left and right tabs + LeftT := SpGetNextTabItemViewer(View, Self, False, sivtInmediateSkipNonVisible); + RightT := SpGetNextTabItemViewer(View, Self, True, sivtInmediateSkipNonVisible); + end + else begin + LeftT := nil; + RightT := nil; + end; + + if Item.Checked then begin + // The left border of the Tab will be painted by the Left tab if + // its the first tab + if Assigned(LeftT) or (Item.IsFirstVisible) then + R.Left := R.Left - 2; + // The right border of the Tab will be painted by the Right tab + if Assigned(RightT) then + R.Right := R.Right + 2; + end + else begin + // Non checked tabs should be smaller + case Position of + ttpTop: Inc(R.Top, 2); + ttpBottom: Dec(R.Bottom, 2); + end; + end; + + // Draw the Tab + DrawTab(ACanvas, R, Item.Enabled, Item.Checked, IsHoverItem, Position); + + // If the Tab is not checked then it should paint the active tab borders + if not Item.Checked then begin + R := ARect; + // Draw the left border + if Assigned(LeftT) and LeftT.Item.Checked then begin + R.Right := R.Left + 2; + R.Left := R.Right - 10; + DrawTab(ACanvas, R, LeftT.Item.Enabled, True, IsHoverItem, Position); + end + else + // Draw the right border + if Assigned(RightT) and RightT.Item.Checked then begin + R.Left := R.Right - 2; + R.Right := R.Left + 10; + DrawTab(ACanvas, R, RightT.Item.Enabled, True, IsHoverItem, Position); + end; + end; + end; + end; + end; +end; + +procedure TSpTBXTabItemViewer.DoDrawCaption(ACanvas: TCanvas; ClientAreaRect: TRect; + State: TSpTBXSkinStatesType; var ACaption: WideString; var CaptionRect: TRect; + var CaptionFormat: Cardinal; IsTextRotated: Boolean; + const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); +begin + CaptionRect := CorrectTabRect(CaptionRect); // Offset the rect to give a pushed effect on the tabs + + // [Theme-Change] + // The Default theme paints the caption of the pushed button in a down + // state, this only happens when the item is in a toolbarstyle + if (State = sknsPushed) and (SkinManager.CurrentSkinName = 'Default') then + OffsetRect(CaptionRect, -1, -1); + + inherited DoDrawCaption(ACanvas, ClientAreaRect, State, ACaption, CaptionRect, + CaptionFormat, IsTextRotated, PaintStage, PaintDefault); +end; + +procedure TSpTBXTabItemViewer.DoDrawImage(ACanvas: TCanvas; + State: TSpTBXSkinStatesType; const PaintStage: TSpTBXPaintStage; + var AImageList: TCustomImageList; var AImageIndex: Integer; var ARect: TRect; + var PaintDefault: Boolean); +begin + ARect := CorrectTabRect(ARect); // Offset the rect to give a pushed effect on the tabs + inherited DoDrawImage(ACanvas, State, PaintStage, AImageList, AImageIndex, ARect, PaintDefault); +end; + +procedure TSpTBXTabItemViewer.DoDrawTabCloseButton(ACanvas: TCanvas; + State: TSpTBXSkinStatesType; const PaintStage: TSpTBXPaintStage; + var AImageList: TCustomImageList; var AImageIndex: Integer; var ARect: TRect; + var PaintDefault: Boolean); +begin + TSpTBXTabItem(Item).DoDrawTabCloseButton(ACanvas, State, PaintStage, AImageList, AImageIndex, ARect, PaintDefault); +end; + +procedure TSpTBXTabItemViewer.DrawBottomBorder(ACanvas: TCanvas; ARect: TRect); +var + CR, R: TRect; + Edge: TSpTBXTabEdge; + LeftT, RightT: Boolean; + Position: TSpTBXTabPosition; + B: TBitmap; + TT: TSpTBXSkinType; +begin + if not IsOnTabToolbar then Exit; + + TT := SpTBXSkinType(Item.SkinType); + Position := TabPosition; + Edge := tedNone; + CR := ARect; + + case Position of + ttpTop: + Inc(CR.Bottom, 2); + ttpBottom: + begin + // When sknNone the bottom border size is 2 + if TT = sknNone then + Dec(CR.Top, 2) + else + Dec(CR.Top, 2); + end; + end; + + if TT = sknWindows then begin + LeftT := Assigned(SpGetNextTabItemViewer(View, Self, False, sivtInmediateSkipNonVisible)); + RightT := Assigned(SpGetNextTabItemViewer(View, Self, True, sivtInmediateSkipNonVisible)); + + if Item.IsFirstVisible then // Is first IV? + Edge := tedLeft; + + if Edge = tedLeft then begin + CR.Left := CR.Left - 2; + if RightT then + CR.Right := CR.Right + 2; + end + else begin + if LeftT then + CR.Left := CR.Left - 2; + if RightT then + CR.Right := CR.Right + 2; + end; + end; + + B := TBitmap.Create; + try + B.Width := CR.Right - CR.Left; + B.Height := CR.Bottom - CR.Top + 4; // Larger than CR + R := Rect(0, 0, B.Width, B.Height); + DrawTab(B.Canvas, R, True, True, False, Position, False, Edge); + + case Position of + ttpTop: + R := Bounds(0, 0, CR.Right - CR.Left, CR.Bottom - CR.Top); // Copy from Y = 0 + ttpBottom: + R := Bounds(0, 2, CR.Right - CR.Left, CR.Bottom - CR.Top + 2); // Copy from Y = 2 + end; + + ACanvas.CopyRect(CR, B.Canvas, R); + finally + B.Free; + end; +end; + +procedure TSpTBXTabItemViewer.DrawItemRightImage(ACanvas: TCanvas; ARect: TRect; + ItemInfo: TSpTBXMenuItemInfo); +var + PaintDefault: Boolean; + ImgList: TCustomImageList; + ImgIndex: Integer; + PatternColor: TColor; +begin + if IsOnTabToolbar then begin + if not IsTabCloseButtonVisible then + Exit; + + GetTabCloseButtonImgList(ImgList, ImgIndex); + ARect := CorrectTabRect(ARect); // Offset the rect to give a pushed effect on the tabs + + ItemInfo.Pushed := False; + ItemInfo.Checked := False; + if ItemInfo.Enabled then + if FTabCloseButtonState = sknsHotTrack then + ItemInfo.State := sknsHotTrack + else begin + ItemInfo.Enabled := False; + ItemInfo.State := sknsDisabled; + end; + + PaintDefault := True; + DoDrawTabCloseButton(ACanvas, ItemInfo.State, pstPrePaint, ImgList, ImgIndex, ARect, PaintDefault); + if PaintDefault and Assigned(ImgList) and (FTabCloseButtonState = sknsHotTrack) then + if (ImgList = MDIButtonsImgList) or ((ImgIndex >= 0) and (ImgIndex < ImgList.Count)) then + SpDrawXPMenuItem(ACanvas, ARect, ItemInfo); + PaintDefault := True; + if ImgList = MDIButtonsImgList then begin + PatternColor := GetTextColor(ItemInfo.State); + SpDrawGlyphPattern(ACanvas, ARect, ImgIndex, PatternColor); + end + else + DoDrawTabCloseButton(ACanvas, ItemInfo.State, pstPostPaint, ImgList, ImgIndex, ARect, PaintDefault); + if PaintDefault and Assigned(ImgList) and (ImgIndex >= 0) and (ImgIndex < ImgList.Count) then begin + SpDrawXPMenuItemImage(ACanvas, ARect, ItemInfo, ImgList, ImgIndex); + end; + end; +end; + +procedure TSpTBXTabItemViewer.DrawTab(ACanvas: TCanvas; ARect: TRect; AEnabled, + AChecked, AHoverItem: Boolean; Position: TSpTBXTabPosition; + ASeparator: Boolean; AEdge: TSpTBXTabEdge); +begin + if ASeparator then begin + ARect.Left := ARect.Right - 2; + SpDrawXPMenuSeparator(ACanvas, ARect, False, True) + end + else begin + ACanvas.Brush.Color := Item.TabColor; + SpDrawXPTab(ACanvas, ARect, AEnabled, AChecked, AHoverItem, False, Position, Item.SkinType, AEdge); + end; +end; + +function TSpTBXTabItemViewer.GetItem: TSpTBXTabItem; +begin + Result := TSpTBXTabItem(inherited Item); +end; + +function TSpTBXTabItemViewer.GetRightImageRect: TRect; +var + RightGlyphSize: TSize; + R: TRect; +begin + RightGlyphSize := GetRightImageSize; + R := BoundsRect; + + Result.Left := R.Right - 4 - RightGlyphSize.cx; + Result.Right := Result.Left + RightGlyphSize.cx; + Result.Top := (R.Top + R.Bottom - RightGlyphSize.cy) div 2; + Result.Bottom := Result.Top + RightGlyphSize.cy; + + Result := CorrectTabRect(Result); // Offset the rect to give a pushed effect on the tabs +end; + +function TSpTBXTabItemViewer.GetRightImageSize: TSize; +var + ImgList: TCustomImageList; + ImgIndex: Integer; +begin + Result.cx := 0; + Result.cy := 0; + GetTabCloseButtonImgList(ImgList, ImgIndex); + if Assigned(ImgList) then + if ImgList = MDIButtonsImgList then begin + Result.cx := 15; + Result.cy := 15; + end + else if (ImgIndex >= 0) and (ImgIndex < ImgList.Count) then begin + Result.cx := ImgList.Width; + Result.cy := ImgList.Height; + end; +end; + +procedure TSpTBXTabItemViewer.GetTabCloseButtonImgList(var AImageList: TCustomImageList; + var AImageIndex: Integer); +var + T: TSpTBXTabToolbar; +begin + AImageList := nil; + AimageIndex := -1; + if IsOnTabToolbar then begin + T := TSpTBXTabToolbar(View.Window); + if T.TabCloseButton <> tcbNone then begin + AImageList := GetImageList; + AImageIndex := T.TabCloseButtonImageIndex; + if not Assigned(AImageList) or (AImageIndex < 0) or (AImageIndex >= AImageList.Count) then begin + AImageList := MDIButtonsImgList; + AImageIndex := 0; + end; + end; + end; +end; + +function TSpTBXTabItemViewer.GetTabPosition: TSpTBXTabPosition; +begin + if IsOnTabToolbar then + Result := TSpTBXTabToolbar(View.Window).TabPosition + else + Result := ttpTop; +end; + +function TSpTBXTabItemViewer.GetTextColor(State: TSpTBXSkinStatesType): TColor; +begin + Result := Item.FontSettings.Color; + if Result = clNone then begin + if View.Window is TSpTBXTabToolbar then + Result := TSpTBXToolbarAccess(View.Window).GetItemsTextColor(State); + if Result = clNone then + Result := CurrentSkin.GetTextColor(skncTab, State) + end; +end; + +procedure TSpTBXTabItemViewer.InternalMouseMove(Shift: TShiftState; X, + Y: Integer); +var + P: TPoint; + R: TRect; + NewState: TSpTBXSkinStatesType; +begin + inherited; + + if FTabCloseButtonState in [sknsNormal, sknsHotTrack] then begin + if not Item.Enabled then begin + FTabCloseButtonState := sknsDisabled; + Exit; + end; + P := Point(X, Y); + R := GetRightImageRect; + if PtInRect(R, P) then + NewState := sknsHotTrack + else + NewState := sknsNormal; + if NewState <> FTabCloseButtonState then begin + FTabCloseButtonState := NewState; + InvalidateRect(View.Window.Handle, @R, True) + end; + end; +end; + +function TSpTBXTabItemViewer.IsOnTabToolbar: Boolean; +begin + Result := Assigned(View.Window) and (View.Window is TSpTBXTabToolbar); +end; + +function TSpTBXTabItemViewer.IsTabCloseButtonVisible: Boolean; +var + T: TSpTBXTabToolbar; +begin + Result := False; + if IsOnTabToolbar then begin + T := TSpTBXTabToolbar(View.Window); + case T.TabCloseButton of + tcbNone: + Exit; + tcbActive: + if not Item.Checked then Exit; + end; + Result := True; + end; +end; + +procedure TSpTBXTabItemViewer.Leaving; +var + R: TRect; +begin + inherited; + if FTabCloseButtonState = sknsHotTrack then begin + FTabCloseButtonState := sknsNormal; + R := GetRightImageRect; + InvalidateRect(View.Window.Handle, @R, True) + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXTabToolbarView } + +procedure TSpTBXTabToolbarView.BeginUpdate; +var + T: TSpTBXTabToolbar; +begin + if (FUpdating = 0) and (Owner is TSpTBXTabToolbar) then begin + T := TSpTBXTabToolbar(Owner); + if Assigned(T.FOwnerTabControl) then + SendMessage(T.FOwnerTabControl.Handle, WM_SETREDRAW, 0, 0); + end; + inherited; +end; + +procedure TSpTBXTabToolbarView.EndUpdate; +var + T: TSpTBXTabToolbar; +begin + inherited; + if (FUpdating = 0) and (Owner is TSpTBXTabToolbar) then begin + T := TSpTBXTabToolbar(Owner); + if Assigned(T.FOwnerTabControl) then begin + SendMessage(T.FOwnerTabControl.Handle, WM_SETREDRAW, 1, 0); + SpInvalidateSpTBXControl(T.FOwnerTabControl, True, False); + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXTabToolbar } + +constructor TSpTBXTabToolbar.Create(AOwner: TComponent); +begin + inherited; + FHiddenTabs := TSpTBXItemCacheCollection.Create(TSpTBXItemCache); + if Owner is TSpTBXCustomTabSet then + FOwnerTabControl := Owner as TSpTBXCustomTabSet + else + FOwnerTabControl := nil; + FActiveTabIndex := -1; + FTabBackgroundBorders := False; + FSkinType := sknSkin; + FTabAutofitMaxSize := 200; + FTabCloseButtonImageIndex := -1; + FTabColor := clBtnFace; + FTabMaxSize := -1; + FTabPosition := ttpTop; +end; + +destructor TSpTBXTabToolbar.Destroy; +begin + FHiddenTabs.Free; + inherited; +end; + +procedure TSpTBXTabToolbar.DoItemNotification(Ancestor: TTBCustomItem; + Relayed: Boolean; Action: TTBItemChangedAction; Index: Integer; + Item: TTBCustomItem); +var + Tab: TSpTBXTabItem; + IV: TTBItemViewer; +begin + inherited; + if Action = tbicInvalidateAndResize then begin + // Invalidate the NC area, draw the bottom border of the active tab + // Instead of invalidating every time, save the Rect that needs to be drawn + // (bottom border of the active tab) and see if it needs to be repainted + if not IsItemMoving then begin + Tab := ActiveTab; + if Assigned(Tab) and Tab.Visible then begin + IV := SpFindItemViewer(View, Tab); + if Assigned(IV) then + if not EqualRect(FActiveTabRect, IV.BoundsRect) then + InvalidateNC; + end; + end; + end; +end; + +procedure TSpTBXTabToolbar.InternalDrawBackground(ACanvas: TCanvas; ARect: TRect; + PaintOnNCArea: Boolean; PaintBorders: Boolean = True); +var + B: TBitmap; + R, BitmapR, DestR: TRect; + Tab: TSpTBXTabItem; + IV: TTBItemViewer; + T: TSpTBXSkinType; + PrevDelta, NextDelta: Integer; +begin + T := SpTBXSkinType(SkinType); + if PaintOnNCArea and Assigned(FOwnerTabControl) then begin + B := TBitmap.Create; + B.Canvas.Lock; + try + R := ARect; + B.Width := R.Right - R.Left; + B.Height := R.Bottom - R.Top; + + SpDrawXPToolbar(Self, B.Canvas, R, PaintOnNCArea, FTabBackgroundBorders and (T <> sknNone), skncTabToolbar); + + // Draw the bottom border of the active tab + Tab := ActiveTab; + if Assigned(Tab) and Tab.Visible then begin + IV := SpFindItemViewer(View, Tab); + if Assigned(IV) then begin + FActiveTabRect := IV.BoundsRect; + DestR := IV.BoundsRect; + OffsetRect(DestR, 2, 2); // Add the toolbar margins + TSpTBXTabItemViewer(IV).DrawBottomBorder(B.Canvas, DestR); + end; + if T = sknWindows then begin + if Tab.IsFirstVisible or Assigned(Tab.GetNextTab(False, sivtInmediateSkipNonVisible)) then + PrevDelta := 1 + else + PrevDelta := -1; + if Assigned(Tab.GetNextTab(True, sivtInmediateSkipNonVisible)) then + NextDelta := 1 + else + NextDelta := -1; + if FTabPosition = ttpTop then + ExcludeClipRect(B.Canvas.Handle, DestR.Left - PrevDelta, R.Bottom - 2, DestR.Right + NextDelta, R.Bottom + 4) + else + ExcludeClipRect(B.Canvas.Handle, DestR.Left - PrevDelta, R.Top + 2, DestR.Right + NextDelta, R.Top - 4); + end + else + if FTabPosition = ttpTop then + ExcludeClipRect(B.Canvas.Handle, DestR.Left + 1, R.Bottom - 2, DestR.Right - 1, R.Bottom + 4) + else + ExcludeClipRect(B.Canvas.Handle, DestR.Left + 1, R.Top + 2, DestR.Right -1 , R.Top - 4); + end; + + // Draw the bottom border of the tabs pane + BitmapR := Rect(0, 0, FOwnerTabControl.FBackground.Width, FOwnerTabControl.FBackground.Height); + case FTabPosition of + ttpTop: + begin + DestR := Rect(R.Left, R.Bottom - 2, R.Right, R.Bottom); + BitmapR.Bottom := BitmapR.Top + 2; + end; + ttpBottom: + begin + DestR := Rect(R.Left, R.Top, R.Right, R.Top + 2); + BitmapR.Top := BitmapR.Bottom - 2; + end; + end; + + B.Canvas.CopyRect(DestR, FOwnerTabControl.FBackground.Canvas, BitmapR); + ACanvas.Draw(0, 0, B); + finally + B.Canvas.UnLock; + B.Free; + end; + end + else + SpDrawXPToolbar(Self, ACanvas, ARect, PaintOnNCArea, FTabBackgroundBorders and (T <> sknNone), skncTabToolbar); +end; + +procedure TSpTBXTabToolbar.InvalidateActiveTab; +var + Tab: TSpTBXTabItem; + IV: TTBItemViewer; +begin + Tab := ActiveTab; + if Assigned(Tab) then begin + IV := SpFindItemViewer(View, Tab); + if Assigned(IV) then + View.Invalidate(IV); + end; +end; + +procedure TSpTBXTabToolbar.InvalidateNC; +begin + if not IsUpdating and not (tstResizing in FState) and HandleAllocated then + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_FRAME); +end; + +function TSpTBXTabToolbar.GetActiveTab: TSpTBXTabItem; +var + Item: TTBCustomItem; +begin + Result := nil; + if Assigned(Items) and (FActiveTabIndex > -1) and (Items.Count > 0) and + (FActiveTabIndex < Items.Count) then + begin + Item := Items[FActiveTabIndex]; + if not (csDestroying in Item.ComponentState) and (Item is TSpTBXTabItem) and Assigned(Item.Parent) then + Result := Items[FActiveTabIndex] as TSpTBXTabItem; + end; +end; + +function TSpTBXTabToolbar.GetItemsTextColor(State: TSpTBXSkinStatesType): TColor; +begin + Result := CurrentSkin.GetTextColor(skncTabToolbar, State, SkinType); + // Don't call inherited GetItemsTextColor, let the TabItem decide the color. +end; + +function TSpTBXTabToolbar.GetTabsCount(VisibleOnly: Boolean): Integer; +var + I: Integer; + IV: TTBItemViewer; +begin + Result := 0; + for I := 0 to View.ViewerCount - 1 do begin + IV := View.Viewers[I]; + if IV.Item is TSpTBXTabItem then + if VisibleOnly then begin + if IV.Item.Visible then Inc(Result); + end + else + Inc(Result); + end; +end; + +function TSpTBXTabToolbar.GetViewClass: TTBToolbarViewClass; +begin + Result := TSpTBXTabToolbarView; +end; + +procedure TSpTBXTabToolbar.Autofit; +var + I, TabsCount, TabsWidth, TabsArea, NonTabsArea, RightAlignWidth: Integer; + IV: TTBItemViewer; + R: TRect; +begin + if not FTabAutofit or IsUpdating or (Items.Count = 0) then Exit; + + View.ValidatePositions; + View.BeginUpdate; + try + // Make all the clipped items visible + for I := 0 to FHiddenTabs.Count - 1 do + FHiddenTabs.Items[I].Item.Visible := True; + FHiddenTabs.Clear; + + TabsCount := 0; + TabsWidth := 0; + NonTabsArea := 0; + RightAlignWidth := 0; + + // Get TabsCount and NonTabsArea + for I := 0 to View.ViewerCount - 1 do begin + IV := View.Viewers[I]; + if IV.Item.Visible then begin + if IV.Item is TSpTBXTabItem then + Inc(TabsCount) + else + if IV.Item is TSpTBXRightAlignSpacerItem then + Inc(RightAlignWidth, 20) + else begin + R := SpGetBoundsRect(IV, Items); + Inc(NonTabsArea, R.Right - R.Left); + end; + end; + end; + + // Get TabsArea + if TabsCount > 0 then begin + TabsArea := CurrentDock.ClientWidth - 4 - NonTabsArea - RightAlignWidth; + TabsWidth := TabsArea div TabsCount; + if TabsWidth > FTabAutofitMaxSize then + TabsWidth := FTabAutofitMaxSize; + end; + + // Get RightAlignWidth + Inc(RightAlignWidth, CurrentDock.Width - ((TabsWidth * TabsCount) + NonTabsArea + RightAlignWidth)); + + // Set TabsWidth and RightAlignWidth to the Items + for I := 0 to View.ViewerCount - 1 do begin + IV := View.Viewers[I]; + if IV.Item.Visible then begin + if IV.Item is TSpTBXTabItem then + TSpTBXTabItem(IV.Item).CustomWidth := TabsWidth + else + if IV.Item is TSpTBXRightAlignSpacerItem then + TSpTBXRightAlignSpacerItem(IV.Item).CustomWidth := RightAlignWidth - GetRightAlignMargin; + end; + end; + finally + View.EndUpdate; + end; +end; + +procedure TSpTBXTabToolbar.RightAlignItems; +// Hide the items on resizing +var + I, J, W, H, VisibleTabsCount, iStart, iEnd: Integer; + VisibleWidth, RightAlignedWidth, SpacerW, RightAlignedBorder: Integer; + IV: TTBItemViewer; + Spacer: TSpTBXItemViewer; + RightAlignedList: TList; + IsRotated, IsFirstPartiallyVisible: Boolean; +begin + if (csDestroying in ComponentState) or (tstRightAligning in FState) or + not Assigned(CurrentDock) or (Items.Count <= 0) or + not Stretch or (ShrinkMode <> tbsmNone) or + (CurrentDock.Width <= 0) or (CurrentDock.Height <= 0) or IsUpdating then + Exit; + + if FTabAutofit then begin + Autofit; + Exit; + end; + + FState := FState + [tstRightAligning]; + View.ValidatePositions; + View.BeginUpdate; + RightAlignedList := TList.Create; + try + IsRotated := CurrentDock.Position in [dpLeft, dpRight]; + // Find the spacer and the right aligned items + Spacer := SpGetRightAlignedItems(View, RightAlignedList, IsRotated, VisibleWidth, RightAlignedWidth); + if Assigned(Spacer) then begin + SpacerW := Spacer.BoundsRect.Right - Spacer.BoundsRect.Left; + RightAlignedBorder := CurrentDock.Width - 2 - RightAlignedWidth + SpacerW; + VisibleWidth := VisibleWidth - SpacerW; + SpacerW := CurrentDock.Width - VisibleWidth - 4; + end + else begin + SpacerW := 0; + RightAlignedBorder := CurrentDock.Width - 2; + end; + + // Show items + VisibleTabsCount := GetTabsCount(True); + IsFirstPartiallyVisible := False; + if VisibleTabsCount = 1 then begin + if VisibleWidth > CurrentDock.Width - 2 then + IsFirstPartiallyVisible := True; + end; + + if not IsFirstPartiallyVisible then begin + IV := View.NextSelectable(nil, True); + if Assigned(IV) then begin + iStart := IV.Index; + iEnd := IV.Index; + end + else begin + iStart := 0; + iEnd := 0; + end; + // Show items from left side of the first visible tab + for I := iStart downto 0 do begin + IV := View.Viewers[I]; + if not IV.Item.Visible and (RightAlignedList.IndexOf(IV) = -1) then begin + // If the item was hidden and can be showed remove it from the HiddenList + J := FHiddenTabs.IndexOf(IV.Item); + if J > -1 then begin + W := 0; + H := 0; + TTBItemViewerAccess(IV).CalcSize(Canvas, W, H); + VisibleWidth := VisibleWidth + W; + if (VisibleTabsCount = 0) or (VisibleWidth < CurrentDock.Width - 2) then begin + SpacerW := SpacerW - W; + FHiddenTabs.Delete(J); + IV.Item.Visible := True; + Inc(VisibleTabsCount); + end + else + Break; + end; + end; + end; + // Show items from right side of the first visible tab + for I := iEnd to View.ViewerCount - 1 do begin + IV := View.Viewers[I]; + if not IV.Item.Visible and (RightAlignedList.IndexOf(IV) = -1) then begin + // If the item was hidden and can be showed remove it from the HiddenList + J := FHiddenTabs.IndexOf(IV.Item); + if J > -1 then begin + W := 0; + H := 0; + TTBItemViewerAccess(IV).CalcSize(Canvas, W, H); + VisibleWidth := VisibleWidth + W; + if (VisibleTabsCount = 0) or (VisibleWidth < CurrentDock.Width - 2) then begin + SpacerW := SpacerW - W; + FHiddenTabs.Delete(J); + IV.Item.Visible := True; + Inc(VisibleTabsCount); + end + else + Break; + end; + end; + end; + + // Hide items + if VisibleTabsCount > 1 then + for I := View.ViewerCount - 1 downto 0 do begin + IV := View.Viewers[I]; + if (VisibleTabsCount > 1) and (IV is TSpTBXTabItemViewer) and IV.Item.Visible and (IV.BoundsRect.Right > RightAlignedBorder) then + if RightAlignedList.IndexOf(IV) = -1 then begin + // If the item can't be showed add it to the HiddenList + SpacerW := SpacerW + (IV.BoundsRect.Right - IV.BoundsRect.Left); + FHiddenTabs.Add(IV.Item); + IV.Item.Visible := False; + Dec(VisibleTabsCount); + end; + end; + end; + + // Resize the spacer + if Assigned(Spacer) then + TSpTBXCustomItemAccess(Spacer.Item).CustomWidth := SpacerW; + + View.UpdatePositions; + finally + RightAlignedList.Free; + View.EndUpdate; + FState := FState - [tstRightAligning]; + end; +end; + +procedure TSpTBXTabToolbar.TabClose(ATab: TSpTBXTabItem); +begin + ATab.TabClose; +end; + +procedure TSpTBXTabToolbar.MakeVisible(ATab: TSpTBXTabItem); +var + TabIV, FirstIV, LastIV: TTBItemViewer; + I: Integer; + Spacer: TSpTBXItemViewer; +begin + if (Items.Count > 1) and Assigned(ATab) and (ATab.Visible = False) then begin + TabIV := View.Find(ATab); + FirstIV := View.NextSelectable(nil, True); + + // LastIV minus the right aligned items + Spacer := SpGetFirstRightAlignSpacer(View); + if Assigned(Spacer) then + LastIV := View.NextSelectable(Spacer, False) + else + LastIV := View.NextSelectable(nil, False); + + if Assigned(FirstIV) and Assigned(LastIV) then begin + for I := 0 to View.ViewerCount - 1 do begin + if TabIV.Index >= FirstIV.Index then + ScrollRight + else + ScrollLeft; + if TabIV.Item.Visible then + Break; + end; + end; + end; +end; + +procedure TSpTBXTabToolbar.Scroll(ToRight: Boolean); +var + FirstIV, LastIV: TTBItemViewer; + I, VisibleWidth: Integer; + Spacer: TSpTBXItemViewer; + + function ProcessScroll(IV: TTBItemViewer): Boolean; + var + IVIndex, ClippedIndex, VisibleTabsCount, W, H: Integer; + begin + Result := False; + + ClippedIndex := FHiddenTabs.IndexOf(IV.Item); + if Assigned(IV) and (ClippedIndex > -1) then begin + Result := True; // a clipped tab was found + BeginUpdate; + try + VisibleTabsCount := GetTabsCount(True); + // Try to hide all the necessary tabs + W := 0; + H := 0; + TTBItemViewerAccess(IV).CalcSize(Canvas, W, H); + if ToRight then begin + while Assigned(FirstIV) and (VisibleWidth + W >= CurrentDock.ClientWidth - 2) do begin + VisibleWidth := VisibleWidth - (FirstIV.BoundsRect.Right - FirstIV.BoundsRect.Left); + FHiddenTabs.Add(FirstIV.Item); + FirstIV.Item.Visible := False; + FirstIV := SpGetNextTabItemViewer(View, FirstIV, True, sivtNormal); + Dec(VisibleTabsCount); + end; + end + else begin + while Assigned(LastIV) and (VisibleWidth + W >= CurrentDock.ClientWidth - 2) do begin + VisibleWidth := VisibleWidth - (LastIV.BoundsRect.Right - LastIV.BoundsRect.Left); + FHiddenTabs.Add(LastIV.Item); + LastIV.Item.Visible := False; + LastIV := SpGetNextTabItemViewer(View, LastIV, False, sivtNormal); + Dec(VisibleTabsCount); + end; + end; + + // Try to show all the necessary clipped tabs + IVIndex := IV.Index; + while Assigned(IV) and (ClippedIndex > -1) and ((VisibleTabsCount = 0) or (VisibleWidth + W <= CurrentDock.ClientWidth - 2)) do begin + VisibleWidth := VisibleWidth + W; + IV.Item.Visible := True; + FHiddenTabs.Delete(ClippedIndex); + Inc(VisibleTabsCount); + + if ToRight then + Inc(IVIndex) + else + Dec(IVIndex); + + if (IVIndex > -1) and (IVIndex < View.ViewerCount) then begin + IV := View.Viewers[IVIndex]; + ClippedIndex := FHiddenTabs.IndexOf(IV.Item); + W := 0; + H := 0; + TTBItemViewerAccess(IV).CalcSize(Canvas, W, H); + end + else + Break; + end; + finally + EndUpdate; + end; + end; + end; + +begin + if (Items.Count > 1) and not FTabAutofit then begin + // Find the first Tab + FirstIV := SpGetNextTabItemViewer(View, nil, True, sivtNormal); + + // Get the VisibleWidth + LastIV := View.NextSelectable(nil, False); + if not Assigned(LastIV) then Exit; + VisibleWidth := LastIV.BoundsRect.Right; + + // LastIV minus the right aligned items + Spacer := SpGetFirstRightAlignSpacer(View); + if Assigned(Spacer) then begin + VisibleWidth := VisibleWidth - (Spacer.BoundsRect.Right - Spacer.BoundsRect.Left); + LastIV := View.NextSelectable(Spacer, False); + end; + if Assigned(LastIV) and not (LastIV.Item is TSpTBXTabItem) then + LastIV := SpGetNextTabItemViewer(View, LastIV, False, sivtNormal); + + if Assigned(FirstIV) and Assigned(LastIV) then begin + if ToRight then begin + // Find the first clipped tab from the right side of the tabset + for I := LastIV.Index + 1 to View.ViewerCount - 1 do + if ProcessScroll(View.Viewers[I]) then + Break; + end + else begin + // Find the first clipped tab from the left side of the tabset + for I := FirstIV.Index - 1 downto 0 do + if ProcessScroll(View.Viewers[I]) then + Break; + end; + end; + + end; +end; + +procedure TSpTBXTabToolbar.ScrollLeft; +begin + Scroll(False); +end; + +procedure TSpTBXTabToolbar.ScrollRight; +begin + Scroll(True); +end; + +procedure TSpTBXTabToolbar.ScrollState(out CanScrollToLeft, CanScrollToRight: Boolean); +var + FirstIV, LastIV: TTBItemViewer; + I, ClippedIndex: Integer; + Spacer: TSpTBXItemViewer; +begin + CanScrollToLeft := False; + CanScrollToRight := False; + if (FHiddenTabs.Count > 0) and not FTabAutofit then begin + // Find the first Tab + FirstIV := SpGetNextTabItemViewer(View, nil, True, sivtNormal); + + if Assigned(FirstIV) then begin + // Find the first clipped tab from the left side of the tabset + for I := FirstIV.Index - 1 downto 0 do begin + ClippedIndex := FHiddenTabs.IndexOf(View.Viewers[I].Item); + if ClippedIndex > -1 then begin + CanScrollToLeft := True; + Break; + end; + end; + end; + + // LastIV minus the right aligned items + Spacer := SpGetFirstRightAlignSpacer(View); + if Assigned(Spacer) then + LastIV := View.NextSelectable(Spacer, False) + else + LastIV := View.NextSelectable(nil, False); + // Find the first clipped tab from the right side of the tabset + if Assigned(LastIV) then begin + for I := LastIV.Index + 1 to View.ViewerCount - 1 do begin + ClippedIndex := FHiddenTabs.IndexOf(View.Viewers[I].Item); + if ClippedIndex > -1 then begin + CanScrollToRight := True; + Break; + end; + end; + end; + end; +end; + +procedure TSpTBXTabToolbar.SetActiveTabIndex(Value: Integer); +var + ATab, APrevTab: TSpTBXTabItem; + I: Integer; +begin + if not Assigned(FOwnerTabControl) then Exit; + + if (Value > -1) and (Value < Items.Count) and not (csDestroying in Items[Value].ComponentState) then begin + if not (Items[Value] is TSpTBXTabItem) then + Value := FActiveTabIndex; + end + else + Value := -1; + + if (Value <> FActiveTabIndex) and FOwnerTabControl.CanActiveTabChange(FActiveTabIndex, Value) then + begin + I := FActiveTabIndex; + FActiveTabIndex := Value; + + // Hide the previous TabSheet + if (I > -1) and (I < Items.Count) and not (csDestroying in Items[I].ComponentState) and + (Items[I] is TSpTBXTabItem) then + begin + APrevTab := Items[I] as TSpTBXTabItem; + APrevTab.Checked := False; + if Assigned(APrevTab.Control) then + APrevTab.Control.Visible := False; + end; + + // Check the item and invalidate NC + if FActiveTabIndex > -1 then begin + // Show the TabSheet + ATab := Items[FActiveTabIndex] as TSpTBXTabItem; + ATab.Checked := True; + if Assigned(ATab.Control) then begin + ATab.Control.Visible := True; + ATab.Control.BringToFront; + end; + MakeVisible(ATab); + end; + FOwnerTabControl.DoActiveTabChange(FActiveTabIndex); + // To avoid flicker don't call InvalidateNC, use the following instead + if not IsUpdating then begin + View.InvalidatePositions; + SetWindowPos(Handle, 0, 0, 0, 0, 0, SWP_NOZORDER or SWP_NOSIZE or + SWP_NOMOVE or SWP_DRAWFRAME or SWP_SHOWWINDOW); + end; + end; +end; + +procedure TSpTBXTabToolbar.SetTabCloseButton(const Value: TSpTBXTabCloseButton); +begin + if FTabCloseButton <> Value then begin + FTabCloseButton := Value; + View.InvalidatePositions; + RightAlignItems; + InvalidateNC; + end; +end; + +procedure TSpTBXTabToolbar.SetTabCloseButtonImageIndex(const Value: Integer); +begin + if FTabCloseButtonImageIndex <> Value then begin + FTabCloseButtonImageIndex := Value; + Invalidate; + end; +end; + +procedure TSpTBXTabToolbar.SetTabAutofit(const Value: Boolean); +begin + if FTabAutofit <> Value then begin + FTabAutofit := Value; + if FTabAutofit then begin + Autofit; + InvalidateNC; + end; + end; +end; + +procedure TSpTBXTabToolbar.SetTabAutofitMaxSize(const Value: Integer); +begin + if FTabAutofitMaxSize <> Value then begin + FTabAutofitMaxSize := Value; + if FTabAutofit then Autofit; + end; +end; + +procedure TSpTBXTabToolbar.SetTabBackgroundBorders(const Value: Boolean); +begin + if FTabBackgroundBorders <> Value then begin + FTabBackgroundBorders := Value; + InvalidateNC; + end; +end; + +procedure TSpTBXTabToolbar.SetTabColor(const Value: TColor); +begin + if (FTabColor <> Value) then begin + FTabColor := Value; + if FSkinType <> sknSkin then begin + Invalidate; + InvalidateNC; + end; + end; +end; + +procedure TSpTBXTabToolbar.SetTabMaxSize(const Value: Integer); +begin + if FTabMaxSize <> Value then begin + FTabMaxSize := Value; + View.InvalidatePositions; + RightAlignItems; + InvalidateNC; + end; +end; + +procedure TSpTBXTabToolbar.SetTabPosition(const Value: TSpTBXTabPosition); +begin + if FTabPosition <> Value then + FTabPosition := Value; +end; + +procedure TSpTBXTabToolbar.SetSkinType(const Value: TSpTBXSkinType); +begin + if FSkinType <> Value then begin + FSkinType := Value; + Invalidate; + InvalidateNC; + end; +end; + +procedure TSpTBXTabToolbar.CMDesignHitTest(var Message: TCMDesignHitTest); +var + P: TPoint; + IV: TTBItemViewer; + Shift: TShiftState; +begin + // Allow left-clicks on TabItems at design time + Shift := KeysToShiftState(Message.Keys); + if (csDesigning in ComponentState) and (ssLeft in Shift) and Assigned(View) then begin + P := SmallPointToPoint(Message.Pos); + IV := View.ViewerFromPoint(P); + if Assigned(IV) and Assigned(IV.Item) and (IV.Item is TSpTBXTabItem) then + IV.Item.Click; + end; + + inherited; +end; + +function TSpTBXTabToolbar.CanDragCustomize(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer): Boolean; +var + IV: TTBItemViewer; + TabIV: TSpTBXTabItemViewer; +begin + Result := False; + FBeginDragIV := nil; + + if not (csDesigning in ComponentState) and (Button = mbLeft) then begin + IV := SpGetItemViewerFromPoint(Items, View, Point(X, Y)); + if Assigned(IV) and (IV is TSpTBXTabItemViewer) and Assigned(IV.Item) and IV.Item.Enabled and IV.Item.Visible then begin + // Close the tab if the close button is pressed + TabIV := TSpTBXTabItemViewer(IV); + if (TabIV.TabCloseButtonState = sknsHotTrack) and TabIV.IsTabCloseButtonVisible then begin + Result := True; // Bypass the inherited mouse down + TabIV.Item.TabClose; + end + else begin + // Click the item on mouse down + if not IV.Item.Checked then begin + Result := True; // Bypass the inherited mouse down + IV.Item.Click; + if Assigned(OnMouseDown) then OnMouseDown(Self, Button, Shift, X, Y); + end; + // Drag reorder + if FTabDragReorder and not IsCustomizing and IV.Item.Checked then begin + Result := True; // Bypass the inherited mouse down + FBeginDragIV := IV; + BeginDrag(False, 2); + end; + end; + end + else + Result := inherited CanDragCustomize(Button, Shift, X, Y); + end; +end; + +procedure TSpTBXTabToolbar.DoStartDrag(var DragObject: TDragObject); +begin + if FTabDragReorder and Assigned(FBeginDragIV) and Assigned(FBeginDragIV.Item) and (FBeginDragIV is TSpTBXTabItemViewer) then begin + DragObject := TSpTBXTabItemDragObject.Create(Self, FBeginDragIV.Item); + inherited DoStartDrag(DragObject); + end + else + inherited DoStartDrag(DragObject); +end; + +procedure TSpTBXTabToolbar.DragOver(Source: TObject; X, Y: Integer; + State: TDragState; var Accept: Boolean); +var + D: TSpTBXTabItemDragObject; + DestIV, RightAlignIV: TTBItemViewer; + OrigItem: TTBCustomItem; + OrigPos, DestPos, RightAlignPos: Integer; +begin + inherited DragOver(Source, X, Y, State, Accept); + + if FTabDragReorder and Assigned(Source) and (Source is TSpTBXTabItemDragObject) then begin + D := Source as TSpTBXTabItemDragObject; + OrigItem := D.SouceItem; + OrigPos := OrigItem.Parent.IndexOf(OrigItem); + + // Move the dragging item in the toolbar + if OrigItem.Parent = Items then begin + Accept := True; + SpGetDropPosItemViewer(Items, View, Point(X, Y), OrigPos, DestIV, DestPos); + RightAlignIV := SpGetFirstRightAlignSpacer(View); + if Assigned(RightAlignIV) then + RightAlignPos := Items.IndexOf(RightAlignIV.Item) + else + RightAlignPos := -1; + if (OrigPos <> DestPos) and (DestPos > -1) and (DestPos < Items.Count) and (OrigItem <> DestIV.Item) and + not ((RightAlignPos > -1) and (DestPos >= RightAlignPos)) then + begin + if FOwnerTabControl.CanActiveTabReorder(OrigPos, DestPos) then begin + BeginItemMove; + View.BeginUpdate; + try + // The item is the active tab, we need to update the ActiveTabIndex + // Just set the internal value because the page didn't change + FActiveTabIndex := DestPos; + Items.Move(OrigPos, DestPos); + FOwnerTabControl.DoActiveTabReorder(DestPos); + finally + View.EndUpdate; + EndItemMove; + InvalidateNC; + end; + end; + end; + end; + end; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXTabSheet } + +procedure TSpTBXTabSheet.AdjustClientRect(var Rect: TRect); +var + Margin, XPMargin: Integer; +begin + inherited AdjustClientRect(Rect); + + if Assigned(FTabControl) then begin + Margin := 2; + XPMargin := 2; + // [Theme-Change] + // WinXP theme needs to have 4 pixel margin + if SpTBXSkinType(FTabControl.SkinType) = sknWindows then + XPMargin := Margin + 2; + + Inc(Rect.Left, Margin); + Dec(Rect.Right, XPMargin); + case FTabControl.TabPosition of + ttpTop: dec(Rect.Bottom, XPMargin); + ttpBottom: inc(Rect.Top, XPMargin); + end; + end; +end; + +constructor TSpTBXTabSheet.Create(AOwner: TComponent); +begin + inherited; + ControlStyle := ControlStyle + [csAcceptsControls, csSetCaption]; + Align := alClient; + Visible := False; +end; + +procedure TSpTBXTabSheet.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + if not (csDesigning in ComponentState) then begin + with Params do + Style := Style or WS_CLIPCHILDREN; + with Params.WindowClass do + Style := Style and not (CS_HREDRAW or CS_VREDRAW); + end; +end; + +procedure TSpTBXTabSheet.DefineProperties(Filer: TFiler); +begin + inherited; + Filer.DefineProperty('TabItem', ReadItemName, WriteItemName, True); +end; + +destructor TSpTBXTabSheet.Destroy; +begin + // If the Item <> nil it means the tabsheet was removed from the form at + // designtime or freed at runtime. + // If that happens TabDeleting was not called, we should call it before + // the tabsheet is destroyed to free the Item and delete it from the + // FPages list. + if Assigned(FItem) then + if Assigned(FTabControl) and not (csDestroying in FTabControl.ComponentState) then + FTabControl.TabDeleting(FItem, False); + + FTabControl := nil; + FItem := nil; + inherited; +end; + +procedure TSpTBXTabSheet.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited; + if Operation = opRemove then + if AComponent = FPrevFocused then FPrevFocused := nil; +end; + +procedure TSpTBXTabSheet.VisibleChanging; +begin + if not (csDesigning in ComponentState) then + if Visible then begin + // TabSheet will be hidden, save the focused control + if Assigned(FPrevFocused) then FPrevFocused.RemoveFreeNotification(Self); + SpIsFocused(Self, FPrevFocused); + if Assigned(FPrevFocused) then FPrevFocused.FreeNotification(Self); + end; + + inherited; +end; + +procedure TSpTBXTabSheet.CMVisiblechanged(var Message: TMessage); +begin + if not (csDesigning in ComponentState) then + if Visible then begin + // TabSheet was showed. + // Focus the previous focused control, or focus the first child + if Assigned(FPrevFocused) then begin + if SpCanFocus(FPrevFocused) then + FPrevFocused.SetFocus; + FPrevFocused.RemoveFreeNotification(Self); + FPrevFocused := nil; + end + else + SpFocusFirstChild(Self); + end; + + inherited; +end; + +function TSpTBXTabSheet.GetCaption: WideString; +begin + if Assigned(FItem) then Result := FItem.Caption + else Result := ''; +end; + +function TSpTBXTabSheet.GetImageIndex: Integer; +begin + if Assigned(FItem) then Result := FItem.ImageIndex + else Result := -1; +end; + +function TSpTBXTabSheet.GetTabVisible: Boolean; +begin + if Assigned(FItem) then Result := FItem.Visible + else Result := False; +end; + +procedure TSpTBXTabSheet.SetCaption(const Value: WideString); +begin + if Assigned(FItem) then FItem.Caption := Value; +end; + +procedure TSpTBXTabSheet.SetImageIndex(const Value: Integer); +begin + if Assigned(FItem) then FItem.ImageIndex := Value; +end; + +procedure TSpTBXTabSheet.SetTabVisible(const Value: Boolean); +begin + if Assigned(FItem) then FItem.Visible := Value; +end; + +procedure TSpTBXTabSheet.ReadItemName(Reader: TReader); +begin + case Reader.NextValue of + vaLString, vaString: + FItemName := Reader.ReadString; + else + FItemName := Reader.ReadWideString; + end; +end; + +procedure TSpTBXTabSheet.WriteItemName(Writer: TWriter); +begin + if Assigned(Item) then + FItemName := Item.Name; + Writer.WriteWideString(FItemName); +end; + +procedure TSpTBXTabSheet.ReadState(Reader: TReader); +var + C: TComponent; + TC: TSpTBXCustomTabControl; +begin + // The TabSheet is being created from the DFM stream + // We must set the initial values of TabControl, Item and add itself to + // the Pages list of the parent TabControl. + + inherited ReadState(Reader); + if Reader.Parent is TSpTBXCustomTabControl then begin + // Set TabControl + TC := TSpTBXCustomTabControl(Reader.Parent); + TabControl := TC; + // Set Item and add Self to TabControl.Pages + if not Assigned(FItem) and (FItemName <> '') then begin + C := Owner.FindComponent(FItemName); + if Assigned(C) and (C is TSpTBXTabItem) then begin + FItem := C as TSpTBXTabItem; + FItem.Control := Self; + if TC.FPages.IndexOf(Self) = -1 then + TC.FPages.Add(Self); + end; + end; + end; +end; + +procedure TSpTBXTabSheet.WMEraseBkgnd(var Message: TWMEraseBkgnd); +var + R: TRect; +begin + Message.Result := 1; + + if Assigned(FTabControl) and Visible then begin + if not DoubleBuffered or (TMessage(Message).wParam = TMessage(Message).lParam) then begin + R := ClientRect; + if FTabControl.TabVisible then begin + case FTabControl.TabPosition of + ttpTop: dec(R.Top, 4); + ttpBottom: inc(R.Bottom, 4); + end; + end; + FTabControl.DrawBackground(Message.DC, R); + end; + end; +end; + +procedure TSpTBXTabSheet.WMWindowPosChanged(var Message: TWMWindowPosChanged); +begin + inherited; + SpInvalidateSpTBXControl(Self, True, True); +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomTabSet } + +constructor TSpTBXCustomTabSet.Create(AOwner: TComponent); +begin + inherited; + ControlStyle := ControlStyle + [csAcceptsControls, csOpaque]; + + FTabVisible := True; + FBackground := TBitmap.Create; + + Width := 289; + Height := FDock.Height + 2; + ParentColor := False; + Color := clBtnFace; + + FToolbar.Items.RegisterNotification(ItemNotification); +end; + +destructor TSpTBXCustomTabSet.Destroy; +begin + FToolbar.Items.UnRegisterNotification(ItemNotification); + FreeAndNil(FBackground); + inherited; +end; + +procedure TSpTBXCustomTabSet.DefineProperties(Filer: TFiler); +begin + inherited; + Filer.DefineProperty('HiddenItems', ReadHiddenItems, WriteHiddenItems, True); +end; + +procedure TSpTBXCustomTabSet.ReadHiddenItems(Reader: TReader); +begin + if Reader.ReadValue = vaCollection then + Reader.ReadCollection(Toolbar.FHiddenTabs); +end; + +procedure TSpTBXCustomTabSet.WriteHiddenItems(Writer: TWriter); +begin + Writer.WriteCollection(Toolbar.FHiddenTabs); +end; + +procedure TSpTBXCustomTabSet.Loaded; +var + I: Integer; + CacheCollection: TSpTBXItemCacheCollection; + Cache: TSpTBXItemCache; + C: TComponent; +begin + ActiveTabIndex := FLoadingActiveIndex; + + inherited; + // Read the HiddenTabs collection, and fill the Item property of the + // collection items reading the Name from the DFM + CacheCollection := Toolbar.FHiddenTabs; + if Assigned(CacheCollection) then + for I := CacheCollection.Count - 1 downto 0 do begin + Cache := CacheCollection[I]; + if not Assigned(Cache.Item) then begin + if Cache.Name = '' then + CacheCollection.Delete(I) + else begin + C := Owner.FindComponent(Cache.Name); + if Assigned(C) and (C is TTBCustomItem) then begin + Cache.Item := C as TTBCustomItem; + // If the Item is visible then the entry is not valid, delete it + if Cache.Item.Visible then + CacheCollection.Delete(I); + end; + end; + end; + end; + + if TabAutofit then + Toolbar.Autofit; +end; + +function TSpTBXCustomTabSet.GetToolbarClass: TSpTBXToolbarClass; +begin + Result := TSpTBXTabToolbar; +end; + +function TSpTBXCustomTabSet.GetFullRepaint: Boolean; +begin + Result := True; +end; + +function TSpTBXCustomTabSet.Add(ACaption: WideString): TSpTBXTabItem; +var + I: Integer; + SpacerIV: TSpTBXItemViewer; +begin + Result := TSpTBXTabItem.Create(Self); + try + Result.Caption := ACaption; + SpacerIV := SpGetFirstRightAlignSpacer(View); + + if Assigned(SpacerIV) then begin + I := Items.IndexOf(SpacerIV.Item); + if I > -1 then + Items.Insert(I, Result); + end + else + Items.Add(Result); + except + Result.Free; + Result := nil; + end; +end; + +function TSpTBXCustomTabSet.Insert(NewIndex: Integer; ACaption: WideString): TSpTBXTabItem; +begin + Result := TSpTBXTabItem.Create(Self); + try + Result.Caption := ACaption; + Items.Insert(NewIndex, Result); + except + Result.Free; + Result := nil; + end; +end; + +procedure TSpTBXCustomTabSet.TabClick(ATab: TSpTBXTabItem); +begin + ATab.Click; // calls TabToolbar.DoTabClick and Self.DoTabClick +end; + +function TSpTBXCustomTabSet.CanActiveTabChange(const TabIndex, NewTabIndex: Integer): Boolean; +begin + Result := True; + if not (csLoading in ComponentState) then + if (NewTabIndex > -1) and not Items[NewTabIndex].Checked then + if Assigned(FOnActiveTabChanging) then FOnActiveTabChanging(Self, TabIndex, NewTabIndex, Result); +end; + +procedure TSpTBXCustomTabSet.DoActiveTabChange(const TabIndex: Integer); +begin + if not (csLoading in ComponentState) then + if Assigned(FOnActiveTabChange) then FOnActiveTabChange(Self, TabIndex); +end; + +function TSpTBXCustomTabSet.CanActiveTabReorder(const TabIndex, NewTabIndex: Integer): Boolean; +begin + Result := True; + if Assigned(FOnActiveTabReordering) then FOnActiveTabReordering(Self, TabIndex, NewTabIndex, Result); +end; + +procedure TSpTBXCustomTabSet.DoActiveTabReorder(const TabIndex: Integer); +begin + if Assigned(FOnActiveTabReorder) then FOnActiveTabReorder(Self, TabIndex); +end; + +procedure TSpTBXCustomTabSet.MakeVisible(ATab: TSpTBXTabItem); +begin + if Assigned(FToolbar) then Toolbar.MakeVisible(ATab); +end; + +procedure TSpTBXCustomTabSet.ScrollLeft; +begin + if Assigned(FToolbar) then Toolbar.ScrollLeft; +end; + +procedure TSpTBXCustomTabSet.ScrollRight; +begin + if Assigned(FToolbar) then Toolbar.ScrollRight; +end; + +procedure TSpTBXCustomTabSet.ScrollState(out Left, Right: Boolean); +begin + if Assigned(FToolbar) then Toolbar.ScrollState(Left, Right); +end; + +function TSpTBXCustomTabSet.GetActiveTab: TSpTBXTabItem; +begin + if Assigned(FToolbar) then + Result := Toolbar.ActiveTab + else + Result := nil; +end; + +function TSpTBXCustomTabSet.GetActiveTabIndex: Integer; +begin + if Assigned(FToolbar) then + Result := Toolbar.ActiveTabIndex + else + Result := -1; +end; + +procedure TSpTBXCustomTabSet.SetActiveTabIndex(Value: Integer); +begin + // When the component is reading from the DFM the Items are not created. + // We must save the value setted at design time and use it when the + // form is finally loaded. + if csReading in ComponentState then + FLoadingActiveIndex := Value + else + if Assigned(FToolbar) then + Toolbar.ActiveTabIndex := Value; +end; + +function TSpTBXCustomTabSet.GetTabCloseButton: TSpTBXTabCloseButton; +begin + if Assigned(FToolbar) then + Result := Toolbar.TabCloseButton + else + Result := tcbNone; +end; + +procedure TSpTBXCustomTabSet.SetTabCloseButton(const Value: TSpTBXTabCloseButton); +begin + if Assigned(FToolbar) then + Toolbar.TabCloseButton := Value; +end; + +function TSpTBXCustomTabSet.GetTabCloseButtonImageIndex: Integer; +begin + if Assigned(FToolbar) then + Result := Toolbar.TabCloseButtonImageIndex + else + Result := -1; +end; + +procedure TSpTBXCustomTabSet.SetTabCloseButtonImageIndex(const Value: Integer); +begin + if Assigned(FToolbar) then + Toolbar.TabCloseButtonImageIndex := Value; +end; + +function TSpTBXCustomTabSet.GetTabAutofit: Boolean; +begin + if Assigned(FToolbar) then + Result := Toolbar.TabAutofit + else + Result := False; +end; + +procedure TSpTBXCustomTabSet.SetTabAutofit(const Value: Boolean); +begin + if Assigned(FToolbar) then + Toolbar.TabAutofit := Value; +end; + +function TSpTBXCustomTabSet.GetTabAutofitMaxSize: Integer; +begin + if Assigned(FToolbar) then + Result := Toolbar.TabAutofitMaxSize + else + Result := -1; +end; + +procedure TSpTBXCustomTabSet.SetTabAutofitMaxSize(const Value: Integer); +begin + if Assigned(FToolbar) then + Toolbar.TabAutofitMaxSize := Value; +end; + +function TSpTBXCustomTabSet.GetTabBackgroundBorders: Boolean; +begin + if Assigned(FToolbar) then + Result := Toolbar.TabBackgroundBorders + else + Result := True; +end; + +procedure TSpTBXCustomTabSet.SetTabBackgroundBorders(const Value: Boolean); +begin + if Assigned(FToolbar) then Toolbar.TabBackgroundBorders := Value +end; + +function TSpTBXCustomTabSet.GetTabBackgroundColor: TColor; +begin + if Assigned(FToolbar) then + Result := FToolbar.Color + else + Result := clNone; +end; + +procedure TSpTBXCustomTabSet.SetTabBackgroundColor(const Value: TColor); +begin + if Assigned(FToolbar) then FToolbar.Color := Value +end; + +function TSpTBXCustomTabSet.GetTabDragReorder: Boolean; +begin + Result := False; + if Assigned(FToolbar) then + Result := Toolbar.TabDragReorder; +end; + +procedure TSpTBXCustomTabSet.SetTabDragReorder(const Value: Boolean); +begin + if Assigned(FToolbar) then + Toolbar.TabDragReorder := Value; +end; + +function TSpTBXCustomTabSet.GetTabMaxSize: Integer; +begin + Result := -1; + if Assigned(FToolbar) then + Result := Toolbar.TabMaxSize; +end; + +procedure TSpTBXCustomTabSet.SetTabMaxSize(const Value: Integer); +begin + if Assigned(FToolbar) then + Toolbar.TabMaxSize := Value; +end; + +function TSpTBXCustomTabSet.GetTabToolbar: TSpTBXTabToolbar; +begin + Result := FToolbar as TSpTBXTabToolbar; +end; + +function TSpTBXCustomTabSet.GetSkinType: TSpTBXSkinType; +begin + if Assigned(FToolbar) then + Result := Toolbar.SkinType + else + Result := sknNone; +end; + +procedure TSpTBXCustomTabSet.SetSkinType(const Value: TSpTBXSkinType); +begin + if Assigned(FToolbar) then begin + Toolbar.SkinType := Value; + InvalidateBackground; + end; +end; + +function TSpTBXCustomTabSet.GetTabPosition: TSpTBXTabPosition; +begin + if Assigned(FToolbar) then + Result := Toolbar.TabPosition + else + Result := ttpTop; +end; + +procedure TSpTBXCustomTabSet.SetTabPosition(const Value: TSpTBXTabPosition); +var + T: TSpTBXTabToolbar; +begin + if Assigned(FToolbar) and Assigned(FDock) then begin + T := Toolbar; + if T.TabPosition <> Value then begin + T.Visible := False; + T.Parent := nil; + T.TabPosition := Value; + case Value of + ttpTop: FDock.Position := dpTop; + ttpBottom: FDock.Position := dpBottom; + end; + T.CurrentDock := FDock; + T.Visible := True; + + InvalidateBackground; + end; + end; +end; + +procedure TSpTBXCustomTabSet.SetTabVisible(const Value: Boolean); +begin + if FTabVisible <> Value then begin + FTabVisible := Value; + if Assigned(FDock) then + FDock.Visible := Value; + end; +end; + +function TSpTBXCustomTabSet.GetTabSetHeight: Integer; +begin + if Assigned(FDock) then + Result := FDock.Height + else + Result := 0; +end; + +procedure TSpTBXCustomTabSet.DoDrawBackground(ACanvas: TCanvas; + ARect: TRect; const PaintStage: TSpTBXPaintStage; + var PaintDefault: Boolean); +begin + if Assigned(FOnDrawBackground) then FOnDrawBackground(Self, ACanvas, ARect, PaintStage, PaintDefault); +end; + +function TSpTBXCustomTabSet.DrawBackground(DC: HDC; ARect: TRect): Boolean; +var + ACanvas: TCanvas; + PaintDefault: Boolean; + R: TRect; +begin + Result := False; + if (csDestroying in ComponentState) or not Assigned(FDock) or + not Assigned(FBackground) or IsRectEmpty(ARect) then Exit; + + ACanvas := TCanvas.Create; + try + ACanvas.Handle := DC; + R := Rect(0, 0, ARect.Right - ARect.Left, ARect.Bottom - ARect.Top); + + if (FBackground.Width = R.Right) and (FBackground.Height = R.Bottom) and not Assigned(FOnDrawBackground) then + ACanvas.Draw(ARect.Left, ARect.Top, FBackground) + else begin + FBackground.Width := R.Right; + FBackground.Height := R.Bottom; + FBackground.Canvas.Brush.Color := clWhite; + FBackground.Canvas.FillRect(R); + + PaintDefault := True; + DoDrawBackground(FBackground.Canvas, R, pstPrePaint, PaintDefault); + if PaintDefault then + SpDrawXPTabControlBackground(FBackground.Canvas, R, Color, TabPosition = ttpBottom, SkinType); + PaintDefault := True; + DoDrawBackground(FBackground.Canvas, R, pstPostPaint, PaintDefault); + + ACanvas.Draw(ARect.Left, ARect.Top, FBackground); + end; + + Result := True; + finally + ACanvas.Handle := 0; + ACanvas.Free; + end; +end; + +procedure TSpTBXCustomTabSet.InvalidateBackground(InvalidateChildren: Boolean); +begin + // Force background repaint + if not (csDestroying in ComponentState) and Assigned(FToolbar) then begin + if Assigned(FBackground) then + FBackground.Width := 1; + SpInvalidateSpTBXControl(Self, InvalidateChildren, FResizing); + end; +end; + +procedure TSpTBXCustomTabSet.ItemNotification(Ancestor: TTBCustomItem; + Relayed: Boolean; Action: TTBItemChangedAction; Index: Integer; + Item: TTBCustomItem); +var + I: Integer; + Tab: TSpTBXTabItem; +begin + inherited; + + if Assigned(FToolbar) and not Relayed and not FToolbar.IsItemMoving then + case Action of + tbicSubitemsBeginUpdate: + begin + // When a Tab item is moved (TTBCustomItem.Move) + // tbicDeleting and tbicInserted change actions are fired + // but we don't want the associated TabSheet to be recreated + // because the children will be destroyed. + // When a TTBCustomItem is moved it is not recreated, it simply + // deletes and reinserts its reference in the items array. + // We need to find out if the item is being moved and stop the + // TabSheet recreation. + // The action sequence for a move operation is the following: + // tbicSubitemsBeginUpdate (FItemMoveCount = 1) + // tbicDeleting (FItemMoveCount = 2) + // tbicSubitemsBeginUpdate (FItemMoveCount = 1) + // tbicInserted (FItemMoveCount = 0) + // tbicSubitemsEndUpdate (FItemMoveCount = 0) + // tbicSubitemsEndUpdate (FItemMoveCount = 0) + FItemMoveCount := 1; + FItemMoved := nil; + end; + tbicSubitemsEndUpdate: + begin + // Destroy the TabSheet if the sequence was: + // tbicSubitemsBeginUpdate - tbicDeleting - tbicSubitemsEndUpdate + if FItemMoveCount = 2 then + TabDeleting(FItemMoved); + FItemMoveCount := 0; + FItemMoved := nil; + end; + tbicInserted: + if Assigned(Item) then begin + // Update the index if a new item is inserted before the ActiveTabIndex + I := Items.IndexOf(Item); + if (I > -1) and (I <= ActiveTabIndex) then begin + FUpdatingIndex := True; + try + // Don't change the ActiveTabIndex, just set the internal value + // because the page didn't change + Toolbar.FActiveTabIndex := Toolbar.FActiveTabIndex + 1; + finally + FUpdatingIndex := False; + end; + end; + if (Item is TSpTBXTabItem) then + TabInserted(Item as TSpTBXTabItem); + InvalidateBackground; + FItemMoveCount := 0; + FItemMoved := nil; + end; + tbicDeleting: + // The ItemViewer of the Item is not valid, it was destroyed by TTBView + // The Items array still has the Item. + if not (csDestroying in ComponentState) and Assigned(Item) then begin + FUpdatingIndex := True; + try + Tab := nil; + I := Items.IndexOf(Item); + if I > -1 then begin + if I < ActiveTabIndex then + // Don't change the ActiveTabIndex, just set the internal value + // because the page didn't change + Toolbar.FActiveTabIndex := Toolbar.FActiveTabIndex - 1 + else + if I = ActiveTabIndex then + if I = 0 then begin + if (Items.Count > 1) and (Items[1] is TSpTBXTabItem) then begin + // The first tab was deleted, change the internal value of + // Update the checked tab on WM_INVALIDATETABBACKGROUND + Tab := Items[1] as TSpTBXTabItem; + Tab.Click; + end + else + Toolbar.FActiveTabIndex := -1; + end + else begin + Dec(I); // Prev tab + if (I > -1) and (I < Items.Count) and (Items[I] is TSpTBXTabItem) then + SetActiveTabIndex(I) + else + Toolbar.FActiveTabIndex := -1; + end; + end; + + if (Item is TSpTBXTabItem) then + if FItemMoveCount = 1 then begin + FItemMoveCount := 2; + FItemMoved := Item as TSpTBXTabItem; + end + else begin + FItemMoveCount := 0; + TabDeleting(Item as TSpTBXTabItem); + end; + + if (csDesigning in ComponentState) or Assigned(Tab) then + PostMessage(Handle, WM_INVALIDATETABBACKGROUND, 0, 0) + else + InvalidateBackground; + finally + FUpdatingIndex := False; + end; + end; + tbicInvalidate: + // When the Item.Checked property changes we must reset the ActiveTabIndex + if not FUpdatingIndex and Assigned(Item) and (Item is TSpTBXTabItem) and + Item.Checked and Item.Enabled then + begin + I := Items.IndexOf(Item); + if I <> ActiveTabIndex then begin + FUpdatingIndex := True; + try + SetActiveTabIndex(I); + finally + FUpdatingIndex := False; + end; + end; + end; + end; +end; + +procedure TSpTBXCustomTabSet.TabDeleting(Item: TSpTBXTabItem; + FreeTabSheet: Boolean); +begin + if not (csDestroying in ComponentState) then + ScrollLeft; +end; + +procedure TSpTBXCustomTabSet.TabInserted(Item: TSpTBXTabItem); +var + I: Integer; + IV: TTBItemViewer; +begin + if not (csLoading in ComponentState) and Assigned(Item) and (Item is TSpTBXTabItem) then + if Items.Count = 1 then + Item.Click // Select the first Tab + else begin + // If the item is inserted after a hidden tab, we should also hide it + I := Items.IndexOf(Item) - 1; + if I > -1 then + if Toolbar.FHiddenTabs.IndexOf(Items[I]) > -1 then begin + IV := View.Find(Item); + if Assigned(IV) then begin + Toolbar.BeginUpdate; + try + Toolbar.FHiddenTabs.Add(Item); + Item.Visible := False; + finally + Toolbar.EndUpdate; + end; + end; + end; + end; +end; + +procedure TSpTBXCustomTabSet.CMColorchanged(var Message: TMessage); +begin + inherited; + if Assigned(FToolbar) then begin + Toolbar.TabColor := Color; + InvalidateBackground; + end; +end; + +procedure TSpTBXCustomTabSet.CMSpTBXControlsInvalidate(var Message: TMessage); +begin + InvalidateBackground; + Message.Result := 1; +end; + +procedure TSpTBXCustomTabSet.WMEraseBkgnd(var Message: TMessage); +var + R: TRect; +begin + if not DoubleBuffered or (Message.wParam = Message.lParam) then begin + if not (csDestroying in ComponentState) and GetFullRepaint then begin + R := ClientRect; + if FTabVisible then begin + case TabPosition of + ttpTop: Inc(R.Top, GetTabSetHeight - 2); + ttpBottom: Dec(R.Bottom, GetTabSetHeight - 2); + end; + end; + DrawBackground(TWMEraseBkgnd(Message).DC, R); + end; + end; + Message.Result := 1; +end; + +procedure TSpTBXCustomTabSet.WMInvalidateTabBackground(var Message: TMessage); +var + Tab: TSpTBXTabItem; + I: Integer; +begin + if Assigned(FToolbar) then begin + Tab := Toolbar.ActiveTab; + if Assigned(Tab) then begin + I := Items.IndexOf(Tab); + FUpdatingIndex := True; + try + Toolbar.FActiveTabIndex := -1; + SetActiveTabIndex(I); + finally + FUpdatingIndex := False; + end; + end; + if HandleAllocated then + RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN); + end; +end; + +procedure TSpTBXCustomTabSet.WMWindowPosChanged(var Message: TWMWindowPosChanged); +begin + FResizing := True; + inherited; + if GetFullRepaint then + InvalidateBackground; + FResizing := False; +end; + +//WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM +{ TSpTBXCustomTabControl } + +constructor TSpTBXCustomTabControl.Create(AOwner: TComponent); +begin + inherited; +// ControlStyle := ControlStyle - [csAcceptsControls]; + FPages := TList.Create; + + // FEmptyTabSheet is used to hide the rest of the TabSheets + // when ActiveTabIndex = -1 at design time. + FEmptyTabSheet := TSpTBXTabSheet.Create(Self); + FEmptyTabSheet.Parent := Self; + FEmptyTabSheet.TabControl := Self; + FEmptyTabSheet.Item := nil; + FEmptyTabSheet.Visible := True; + FEmptyTabSheet.BringToFront; + FEmptyTabSheet.ControlStyle := FEmptyTabSheet.ControlStyle - [csAcceptsControls]; + + Width := 289; + Height := 193; +end; + +destructor TSpTBXCustomTabControl.Destroy; +begin + FPages.Free; + inherited; +end; + +procedure TSpTBXCustomTabControl.DoActiveTabChange(const ItemIndex: Integer); +begin + if ItemIndex = -1 then begin + FEmptyTabSheet.Visible := True; + FEmptyTabSheet.BringToFront; + end + else + FEmptyTabSheet.Visible := False; + inherited; +end; + +procedure TSpTBXCustomTabControl.RealignTabSheets; +var + I, C: Integer; +begin + if HandleAllocated then begin + C := PagesCount; + for I := 0 to C - 1 do + Pages[I].Realign; + end; +end; + +function TSpTBXCustomTabControl.GetFullRepaint: Boolean; +begin + if not (csDestroying in ComponentState) then + Result := not Assigned(FPages) or (FPages.Count = 0) or not Assigned(FToolbar) or + not Assigned(Toolbar.ActiveTab) or not Toolbar.ActiveTab.Checked + else + Result := False; +end; + +function TSpTBXCustomTabControl.GetPage(Item: TSpTBXTabItem): TSpTBXTabSheet; +var + I: Integer; +begin + Result := nil; + I := Items.IndexOf(Item); + if (I > - 1) and Assigned(Item.Control) and (Item.Control is TSpTBXTabSheet) then + Result := Item.Control as TSpTBXTabSheet; +end; + +function TSpTBXCustomTabControl.GetActivePage: TSpTBXTabSheet; +begin + if ActiveTabIndex > -1 then + Result := GetPage(Items[ActiveTabIndex] as TSpTBXTabItem) + else + Result := nil; +end; + +procedure TSpTBXCustomTabControl.SetActivePage(const Value: TSpTBXTabSheet); +var + I: Integer; +begin + if Assigned(Value) and (FPages.IndexOf(Value) > -1) and Assigned(FToolbar) then begin + I := FToolbar.Items.IndexOf(Value.Item); + if I > -1 then ActiveTabIndex := I; + end; +end; + +function TSpTBXCustomTabControl.GetPages(Index: Integer): TSpTBXTabSheet; +begin + Result := TSpTBXTabSheet(FPages[Index]); +end; + +function TSpTBXCustomTabControl.GetPagesCount: Integer; +begin + Result := FPages.Count; +end; + +procedure TSpTBXCustomTabControl.TabInserted(Item: TSpTBXTabItem); +var + T: TSpTBXTabSheet; + I: Integer; +begin + // Create a TabSheet and Link it to the TabItem, only if the Item is created + // at DesignTime. + // If the Item is created from the DFM stream then the TabSheet will be + // automatically created, because it will also be streamed, but it won't be + // linked to the Item, this is done in TabSheet.ReadState + + if (csLoading in ComponentState) or not Assigned(Item) then Exit; + + for I := 0 to FPages.Count - 1 do begin + T := TSpTBXTabSheet(FPages[I]); + if T.Item = Item then begin + Exit; + raise Exception.Create('TabSheet Already Exists'); + end; + end; + + // Find unique name + I := 1; + while Owner.FindComponent('SpTBXTabSheet' + IntToStr(I)) <> nil do + inc(I); + + // The Form will be the owner, it will stream the tabsheet to the DFM + T := TSpTBXTabSheet.Create(Owner); + T.Name := 'SpTBXTabSheet' + IntToStr(I); + T.Parent := Self; + T.TabControl := Self; + T.Item := Item; + Item.Control := T; + T.SendToBack; + FPages.Add(T); + + inherited; +end; + +procedure TSpTBXCustomTabControl.TabDeleting(Item: TSpTBXTabItem; + FreeTabSheet: Boolean); +var + I: Integer; + T: TSpTBXTabSheet; +begin + inherited; + // The Toolbar will free the Items, and the Form will free the TabSheets + if (csDestroying in ComponentState) or not Assigned(Item) then Exit; + + for I := 0 to FPages.Count - 1 do begin + T := TSpTBXTabSheet(FPages[I]); + if Assigned(T) and Assigned(T.Item) and (T.Item = Item) then begin + FPages[I] := nil; + FPages.Delete(I); + if FreeTabSheet then begin + T.Item := nil; + T.Free; + end + else begin + // TabSheet deleted at design time, free the linked Item + T.Item.Free; + T.Item := nil; + end; + Break; + end; + end; +end; + +procedure TSpTBXCustomTabControl.CMSpTBXControlsInvalidate(var Message: TMessage); +var + I, C: Integer; +begin + // Force TabControl and TabSheets background repaint + inherited; + if not (csDestroying in ComponentState) and Assigned(FToolbar) then begin + C := PagesCount; + for I := 0 to C - 1 do + SpInvalidateSpTBXControl(Pages[I], True, True); + end; + Message.Result := 1; +end; + +procedure TSpTBXCustomTabControl.WMSpSkinChange(var Message: TMessage); +begin + inherited; + RealignTabSheets; +end; + +end. diff --git a/internal/2.4.4/1/SpTBXLib-LICENSE.txt b/internal/2.4.4/1/SpTBXLib-LICENSE.txt new file mode 100644 index 0000000..c7d8d2b --- /dev/null +++ b/internal/2.4.4/1/SpTBXLib-LICENSE.txt @@ -0,0 +1,57 @@ +SpTBXLib License v1.0 +===================== + +"Author" herein refers to Robert Lee. +"Software" refers to all files bearing this notice, as well as any other +files and source code included with SpTBXLib and all content in them, +regardless of whether any modifications have been made. + +Except where otherwise noted, all of the documentation and Software included +in the SpTBXLib package is copyrighted by Robert Lee (the Author). + +Copyright (C) Robert Lee. All rights reserved. + +This notice is only applicable to SpTBXLib package. + +Use and distribution of the software is permitted provided that all of the +following terms are accepted: + +1. Registration (payment) of the Software is required, such payment is made + to the Author of the Software. For information on registering see the + Registration.txt file or this web page: + http://www.silverpointdevelopment.com/sptbxlib/registration.htm + +2. The Software is provided "as-is," without any express or implied + warranty. In no event shall the Author be held liable for any damages + arising from the use of the Software. + +3. All redistributions of the Software's files must be in their original, + unmodified form. Distributions of modified versions of the files is not + permitted without express written permission of the Author. + +4. The origin of this Software must not be misrepresented; you must not + claim your authorship. + +5. None of the Software's files may be redistributed for profit or as part + of another software package without express written permission of the + Author. + +6. You are permitted to Compile the Software into any kind of applications. + ("Compile" here refers to the automatic process of translating the + Software's source code into executable machine code by a compiler such + as the one included with Borland's Delphi or C++Builder.) + +7. Redistribution of any of the Software's files in object form (including + but not limited to .DCU and .OBJ formats) is strictly prohibited without + express written permission of the Author. + +8. Full backward compatibility in future versions of the Software is not + guaranteed. In no event shall the Author be held liable for any + inconvenience or damages arising from lack of backward compatibility. + +If you do not agree to all of the above terms, you are not permitted to +use the Software in any way, and all copies of it must be deleted from your +system(s). + +Robert Lee +http://www.silverpointdevelopment.com \ No newline at end of file