From c87c92af549e3991a249067d67b20d9dec09c591 Mon Sep 17 00:00:00 2001 From: utak3r Date: Mon, 31 Aug 2009 23:31:09 +0000 Subject: [PATCH] Initial version of thumbnails generating in listview. TODO: make it calculating in a separate thread... --- 2.10/Source/Main.dfm | 268 ++++++++++++++++++++++++------------------- 2.10/Source/Main.pas | 63 ++++++++-- 2 files changed, 203 insertions(+), 128 deletions(-) diff --git a/2.10/Source/Main.dfm b/2.10/Source/Main.dfm index 67943ef..a3a3a76 100644 --- a/2.10/Source/Main.dfm +++ b/2.10/Source/Main.dfm @@ -28,10 +28,10 @@ object MainForm: TMainForm PixelsPerInch = 96 TextHeight = 13 object Splitter: TSplitter - Left = 160 + Left = 137 Top = 28 Width = 4 - Height = 430 + Height = 436 end object ToolBar: TToolBar Left = 0 @@ -75,9 +75,31 @@ object MainForm: TMainForm ImageIndex = 8 Style = tbsSeparator end - object btnUndo: TToolButton + object tbShowIcons: TToolButton Left = 77 Top = 0 + Caption = 'tbShowIcons' + ImageIndex = 55 + OnClick = tbShowIconsClick + end + object tbShowList: TToolButton + Left = 100 + Top = 0 + Caption = 'tbShowList' + ImageIndex = 54 + OnClick = tbShowListClick + end + object ToolButton8: TToolButton + Left = 123 + Top = 0 + Width = 8 + Caption = 'ToolButton8' + ImageIndex = 41 + Style = tbsSeparator + end + object btnUndo: TToolButton + Left = 131 + Top = 0 Hint = 'Undo (Ctrl+Z)|Undo the last action' Caption = 'btnUndo' Enabled = False @@ -85,7 +107,7 @@ object MainForm: TMainForm OnClick = mnuUndoClick end object btnRedo: TToolButton - Left = 100 + Left = 154 Top = 0 Hint = 'Redo (Ctrl+Y)|Redo the last action' Caption = 'btnRedo' @@ -94,14 +116,14 @@ object MainForm: TMainForm OnClick = mnuRedoClick end object ToolButton1: TToolButton - Left = 123 + Left = 177 Top = 0 Width = 8 ImageIndex = 18 Style = tbsSeparator end object btnReset: TToolButton - Left = 131 + Left = 185 Top = 0 Hint = 'Reset Location (F12)' Caption = 'btnReset' @@ -109,7 +131,7 @@ object MainForm: TMainForm OnClick = mnuResetLocationClick end object tbQualityBox: TComboBox - Left = 154 + Left = 208 Top = 0 Width = 40 Height = 21 @@ -129,7 +151,7 @@ object MainForm: TMainForm '100') end object btnFullScreen: TToolButton - Left = 194 + Left = 248 Top = 0 Hint = 'Fullscreen View (F3)|Show full-screen view of the flame' Caption = 'btnFullScreen' @@ -137,14 +159,14 @@ object MainForm: TMainForm OnClick = mnuFullScreenClick end object ToolButton3: TToolButton - Left = 217 + Left = 271 Top = 0 Width = 8 ImageIndex = 8 Style = tbsSeparator end object btnEditor: TToolButton - Left = 225 + Left = 279 Top = 0 Hint = 'Editor (F4)|Show Transform Editor' Caption = 'btnEditor' @@ -152,7 +174,7 @@ object MainForm: TMainForm OnClick = mnuEditorClick end object btnAdjust: TToolButton - Left = 248 + Left = 302 Top = 0 Hint = 'Adjust (F5)|Adjust render-settings' Caption = 'btnAdjust' @@ -160,7 +182,7 @@ object MainForm: TMainForm OnClick = mnuAdjustClick end object btnGradient: TToolButton - Left = 271 + Left = 325 Top = 0 Hint = 'Gradient (F6)|Shows the Gradient window' Caption = 'btnGradient' @@ -168,7 +190,7 @@ object MainForm: TMainForm OnClick = mnuGradClick end object btnMutate: TToolButton - Left = 294 + Left = 348 Top = 0 Hint = 'Mutation (F7)|Shows the Mutation window' Caption = 'btnMutate' @@ -176,7 +198,7 @@ object MainForm: TMainForm OnClick = mnuMutateClick end object btnSize: TToolButton - Left = 317 + Left = 371 Top = 0 Hint = 'Image Size|Adjust image size' Caption = 'ma' @@ -184,14 +206,14 @@ object MainForm: TMainForm OnClick = mnuImageSizeClick end object ToolButton4: TToolButton - Left = 340 + Left = 394 Top = 0 Width = 8 ImageIndex = 14 Style = tbsSeparator end object btnDefine: TToolButton - Left = 348 + Left = 402 Top = 0 Hint = 'Edit Script|Open the Script Editor' Caption = 'btnDefine' @@ -199,7 +221,7 @@ object MainForm: TMainForm OnClick = mnuEditScriptClick end object btnRun: TToolButton - Left = 371 + Left = 425 Top = 0 Hint = 'Run Script (F9)|Run Script' Caption = 'Run' @@ -207,7 +229,7 @@ object MainForm: TMainForm OnClick = btnRunClick end object btnStop: TToolButton - Left = 394 + Left = 448 Top = 0 Hint = 'Stop Script (F10)|Stop Script' Caption = 'Stop' @@ -215,14 +237,14 @@ object MainForm: TMainForm OnClick = mnuStopClick end object ToolButton5: TToolButton - Left = 417 + Left = 471 Top = 0 Width = 8 ImageIndex = 42 Style = tbsSeparator end object btnOptions: TToolButton - Left = 425 + Left = 479 Top = 0 Hint = 'Options (Ctrl+P)|Shows the Options dialog' Caption = 'btnOptions' @@ -230,7 +252,7 @@ object MainForm: TMainForm OnClick = mnuOptionsClick end object tbShowAlpha: TToolButton - Left = 448 + Left = 502 Top = 0 Hint = 'Show transparency' Caption = 'tbShowAlpha' @@ -239,14 +261,14 @@ object MainForm: TMainForm OnClick = tbShowAlphaClick end object ToolButton6: TToolButton - Left = 471 + Left = 525 Top = 0 Width = 8 ImageIndex = 42 Style = tbsSeparator end object tbzoomwindow: TToolButton - Left = 479 + Left = 533 Top = 0 Hint = 'Zoom to rectangle' Caption = 'tbzoomwindow' @@ -256,7 +278,7 @@ object MainForm: TMainForm OnClick = tbzoomwindowClick end object tbzoomoutwindow: TToolButton - Left = 502 + Left = 556 Top = 0 Hint = 'Zoom out using rectangle' Caption = 'tbzoomoutwindow' @@ -266,7 +288,7 @@ object MainForm: TMainForm OnClick = tbzoomoutwindowClick end object tbDrag: TToolButton - Left = 525 + Left = 579 Top = 0 Hint = 'Translate image' Caption = 'tbDrag' @@ -277,7 +299,7 @@ object MainForm: TMainForm OnClick = tbDragClick end object tbRotate: TToolButton - Left = 548 + Left = 602 Top = 0 Hint = 'Rotate' Caption = 'tbRotate' @@ -287,7 +309,7 @@ object MainForm: TMainForm OnClick = tbRotateClick end object tbTraceSeparator: TToolButton - Left = 571 + Left = 625 Top = 0 Width = 8 Enabled = False @@ -296,7 +318,7 @@ object MainForm: TMainForm Visible = False end object tbShowTrace: TToolButton - Left = 579 + Left = 633 Top = 0 Hint = 'Show trace window' Caption = 'tbShowTrace' @@ -309,8 +331,8 @@ object MainForm: TMainForm object ListView: TListView Left = 0 Top = 28 - Width = 160 - Height = 430 + Width = 137 + Height = 436 Align = alLeft BevelOuter = bvNone Columns = < @@ -319,12 +341,11 @@ object MainForm: TMainForm Width = 150 end> HideSelection = False + LargeImages = Thumbnails ParentShowHint = False PopupMenu = ListPopUp ShowHint = True - SmallImages = SmallImages TabOrder = 0 - ViewStyle = vsReport OnChange = ListViewChange OnChanging = ListViewChanging OnEdited = ListViewEdited @@ -332,10 +353,10 @@ object MainForm: TMainForm OnSelectItem = ListViewSelectItem end object BackPanel: TPanel - Left = 164 + Left = 141 Top = 28 - Width = 557 - Height = 430 + Width = 580 + Height = 436 Align = alClient BevelInner = bvLowered BevelOuter = bvNone @@ -345,8 +366,8 @@ object MainForm: TMainForm object Image: TImage Left = 1 Top = 1 - Width = 555 - Height = 428 + Width = 578 + Height = 434 Align = alClient Anchors = [] Center = True @@ -360,7 +381,7 @@ object MainForm: TMainForm end object StatusBar: TStatusBar Left = 0 - Top = 458 + Top = 464 Width = 721 Height = 19 Panels = < @@ -378,7 +399,7 @@ object MainForm: TMainForm Left = 8 Top = 56 Bitmap = { - 494C010136003B00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C010138003B00040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600 000000000000360000002800000040000000F0000000010020000000000000F0 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 @@ -520,123 +541,123 @@ object MainForm: TMainForm 8C001810630018186B0018187B00081829000000000000000000000000001818 6B00181863001818630018186B0029187B000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000829 + 00000000000000000000000000000000000000000000B9A39500634935006349 + 3500634935006349350063493500634935006349350063493500634935006349 + 350063493500634935006349350000000000B7A2930063493500634935006349 + 3500634935006349350063493500634935006349350063493500634935006349 + 3500634935006349350063493500634935000000000000000000000000000829 630000000000081042001042940000000000000000000842730018294A000010 4200000008000000080000000000101863000000000000000000FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00A5A5A500A5A5A500A5A5A500A5A5 - A500A5A5A500A5A5A50000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000821 + A500A5A5A500A5A5A500000000000000000000000000B9A39500FEFDF200DEDB + D500DAD2CB00D7CBC200D3C2B700CEBAAD00C7B0A300C1A99C00BAA19300B297 + 8900AB908100A5897A006349350000000000B7A29300FBF6F000E4E1DC00E0DD + D700DFD7CE00DFD3C800E0D0C100E0CCBE00E3C8B600E3C7B300E3C4AE00E3C3 + AC00E3C3AC00E3C3AC00E3C3AC00634935000000000000000000000000000821 52000008100008297B003163A50000000000000000002152A5004A9CD6001839 6B0000001800000008000000000018186B000000000000000000FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00A5A5A500A5A5A500A5A5A500A5A5 - A500A5A5A500A5A5A50000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000818 + A500A5A5A500A5A5A500000000000000000000000000B9A39500FFFFF600B3D0 + DD00337085009DA7AB00FADCC600F9D2B800F4C6AA00EFBDA000E7B39500DDA7 + 8900D39C7D00AB9081006349350000000000B7A29300FCF8F400AF8D7A00A37A + 65008C5D440076452C006F3E2500FAEEE400AF8D7A00A37A65008C5D44007645 + 2C006F3E2500F9E6D900E3C5AF00634935000000000000000000000000000818 4A0000182100216BC6000000000000000000105A7B002973AD0018529C00214A 9400103152000818290000000800181863000000000000000000FFFFFF00FFFF FF00A5A5A500A5A5A500A5A5A500A5A5A500FFFFFF00FFFFFF00FFFFFF00FFFF - FF00A5A5A500A5A5A50000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000003110 + FF00A5A5A500A5A5A500000000000000000000000000B9A39500FFFFF60000AF + FC00C1FDFF002D677F00FBE4D200B7A39900B49F9200B69B8E00AF948500AD8F + 7F00DDA78900B29789006349350000000000B7A29300FCFAF600C8AD9B00E5D2 + C700D0A69100A984780084523700FAEFE500C8AD9B00E5D2C700D0A69100A984 + 780084523700F9E7DA00E2C8B400634935000000000000000000000000003110 000018080000180800000000000000000000000000002163A500184A94003163 B5002163B5003973C6000810210010105A000000000000000000FFFFFF00FFFF FF00A5A5A500A5A5A500A5A5A500A5A5A500FFFFFF00FFFFFF00FFFFFF00FFFF - FF00A5A5A500A5A5A50000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000846B5A0029080000B57B + FF00A5A5A500A5A5A500000000000000000000000000BAA59600FFFFF600B6DD + EF0000AFFC00B2D2DC00FCEDDD00FBE2CE00F9D7C000F8CDB200F4C3A600EFBD + A000E7B39500BAA193006349350000000000B7A29300FDFCF900CEB6A700B9E4 + FF00AFBFFF004E87FF00A3765F00FAF0E700CEB6A700B9E4FF00AFBFFF004E87 + FF00A3765F00F9E8DB00E1CBB9006349350000000000846B5A0029080000B57B 5A00EFE7DE00E7CEC600AD735200290800006B73730008429400184A9C00296B AD0008297300214A8C001021520018106B000000000000000000FFFFFF00FFFF FF00A5A5A500A5A5A500A5A5A500A5A5A500FFFFFF00FFFFFF00FFFFFF00FFFF - FF00A5A5A500A5A5A50000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000031080000EFDECE00EFE7 + FF00A5A5A500A5A5A500000000000000000000000000BCA69800FFFFF600FFFF + F600FFFFF600FEFCF200FEF5E800FCEAD900FBDFCB00F9D4BC00F8CCB000F4C3 + A600EFBDA000C1A99C006349350000000000BAA59600FDFDFB00D4BEB200D1BB + AB00CBB09E00C1A38F00B2917A00FAF1EA00D4BEB200D1BBAB00CBB09E00C1A3 + 8F00B2917A00F9E9DD00E0CEBF00634935000000000031080000EFDECE00EFE7 D600FFEFE700F7EFE700FFF7EF00E7D6CE0039100800637B940008297300216B AD007BB5D60031528C0000105A00181873000000000000000000FFFFFF00FFFF FF00A5A5A500A5A5A500A5A5A500A5A5A500FFFFFF00FFFFFF00FFFFFF00FFFF - FF00A5A5A500A5A5A50000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000039292100D6AD9400FFEFD600CEAD + FF00A5A5A500A5A5A500000000000000000000000000BEA89900FFFFF60095A3 + FF002E3BA5008F96CD00FEFAF000FDF2E400FCE8D500FADCC600F9D2B800F8CA + AE00F4C3A600C7B0A3006349350000000000BEA99A00FEFEFD00FDFDFB00FDFB + F900FCFAF600FCF8F300FCF6F000FBF3ED00FAF2E900FAEFE600FAEEE400FAEC + E200FAEBE000FAEADE00E0D2C5006349350039292100D6AD9400FFEFD600CEAD 9C00EFD6C600EFDECE00F7E7D600EFE7D600D6B5A50018181000528CC600427B B5006BADDE00294A8C000000310018186B000000000000000000A5A5A500A5A5 A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00A5A5A500A5A5A500A5A5A500A5A5 - A500FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000F7E7D600F7CEB500AD7B + A500FFFFFF00FFFFFF00000000000000000000000000C0AA9C00FFFFF6004360 + FF0095B3FF002F39AD00FFFFF600B9A79E00B6A29700B49D9100B2998B00B096 + 8800F7C8AC00CCB6A9006349350000000000BEA99A00FFFEFE00AF8D7A00A37A + 65008C5D440076452C006F3E2500FCF5EF00AF8D7A00A37A65008C5D44007645 + 2C006F3E2500FAEBDF00DFD5CB006349350000000000F7E7D600F7CEB500AD7B 6300A5735A00A57B6300B5947B00DEC6AD00FFF7DE00000000005294C600396B AD007BADD600397BAD000018520018186B000000000000000000A5A5A500A5A5 A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00A5A5A500A5A5A500A5A5A500A5A5 - A500FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFEFDE00EFB59C009C5A + A500FFFFFF00FFFFFF00000000000000000000000000C3AE9E00FFFFF60096A3 + FF004661FF0094A1FF00FFFFF600FFFEF500FEF7EA00FCEDDD00FBE2CE00F9D7 + BF00F8CDB200CEB8AB006349350000000000C3AE9E00FFFFFE00C8AD9B00E5D2 + C700D0A69100A984780084523700FCF8F300C8AD9B00E5D2C700D0A69100A984 + 780084523700FAECE100DED8D0006349350000000000FFEFDE00EFB59C009C5A 4200E7A58C00EFAD9400EFBD9C00CEA58C00FFEFD600080800002973AD008CBD DE00ADE7FF001831730000185200182173000000000000000000A5A5A500A5A5 A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00A5A5A500A5A5A500A5A5A500A5A5 - A500FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFE7D600F7B59C00A552 + A500FFFFFF00FFFFFF00000000000000000000000000C5B0A000FFFFF600FFFF + F600FFFFF600FFFFF600FFFFF600FFFFF600FFFDF300FEF4E700FCEAD900FADE + CA00F9D4BC00D0BBB0006349350000000000C8B2A300FFFFFF00CEB6A700B9E4 + FF00AFBFFF004E87FF00A3765F00FCFAF700CEB6A700B9E4FF00AFBFFF004E87 + FF00A3765F00FAEDE200DEDBD5006349350000000000FFE7D600F7B59C00A552 3100E7948400E79C8400EFAD8C00D69C8400EFCEB50008080800427BBD00738C B500395294000010630008104A0018186B000000000000000000A5A5A500A5A5 A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00A5A5A500A5A5A500A5A5A500A5A5 - A500FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000063525200B57B5A00FFCEBD00CE84 + A500FFFFFF00FFFFFF00000000000000000000000000C7B1A200FFFFF600FF9B + 9900B8303000FF8D6A00FFFFF600FFFFF600FFFFF600FEFAF000FDF1E400FCE7 + D500FADCC700D3C1B6006349350000000000CCB6A700FFFFFF00D4BEB200D1BB + AB00CBB09E00C1A38F00B2917A00FDFCF900D4BEB200D1BBAB00CBB09E00C1A3 + 8F00B2917A00FAEFE600E2E1DB00644A360063525200B57B5A00FFCEBD00CE84 6B00F79C7B00F79C8400F7B59400EFB594009452390052424200101852000000 100000001000000831000010390018186B000000000000000000A5A5A500A5A5 A500A5A5A500A5A5A500A5A5A500A5A5A500FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000063423900BD8C7300FFDE + FF00FFFFFF00FFFFFF00000000000000000000000000C9B3A500FFFFF600FF83 + 7E00FFC3C400B7252500FFFFF600BAAAA100B8A69C00B6A29600B39D9000B198 + 8B00FBE4D200D6C7BD006349350000000000CCB6A700FFFFFF00FFFFFF00FFFF + FF00FFFFFE00FFFEFE00FEFDFD00FEFDFB00FDFBF900FDFAF700FCF8F300FCF5 + EF00FBF4EC00FBF1E900FAEFE600644A36000000000063423900BD8C7300FFDE C600F7CEB500EFB59C00F7BDA5008C4A31000800000008317B0008296B000831 63000831730008316B0008296300083184000000000000000000A5A5A500A5A5 A500A5A5A500A5A5A500A5A5A500A5A5A500FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000524242000000 + FF00FFFFFF00FFFFFF00000000000000000000000000CBB5A600FFFFF600FFA9 + A900FF827F00FF989300FFFFF600FFFFF600FFFFF600FFFFF600FFFEF400FDF7 + EB00FCEDDD00D7CCC3006349350000000000EAAA8B00EAAA8B00E9A78700E9A2 + 8000E99D7700E7976D00E6906500E6895B00E4825100E37B4800E3764100E273 + 3A00E2723800E2723900E2723900C8622F000000000000000000524242000000 00005A3921004229180000000000423931000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000CBB5A600FFFFF600FFFF + F600FFFFF600FFFFF600FFFFF600FFFFF600FFFFF600FFFFF600FFFFF600FEFC + F300FDF4E700FCEADA006349350000000000EAAA8B00FFC2A200FEBF9D00FCBB + 9800FCB89400FBB59000FAB18C00F9AD8700F9A98100F8A67C00F6A27800F59F + 7300F59B6D00F4986800F3956500CD6531000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000CCB6A700CCB6A700CAB5 + A600CAB3A400C8B2A300C5AFA100C3AD9E00C0AB9C00BEA99A00BCA69700BAA4 + 9600B8A39400B8A39400B8A3940000000000EAAA8B00EAAA8B00EAAA8C00EAA9 + 8900EAA58400E9A17F00E89D7800E7977000E7926800E68D6000E5885900E483 + 5100E47E4A00E4794300E3763E00E27239000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000292929000000 @@ -2306,11 +2327,11 @@ object MainForm: TMainForm 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000FF1FFFFF00000000E000800100000000 - E000800100000000E000800100000000E000800100000000E000800100000000 - 8000800100000000800080010000000000008001000000000000800100000000 - 0000800100000000000080010000000000008001000000008000800100000000 - C0FF800100000000FFFFFFFF00000000FBF7FFC7FFC7800FFBF7FFCFFFCF800F + 00000000000000000000000000000000FF1FFFFFFFFFFFFFE000800180010000 + E000800180010000E000800180010000E000800180010000E000800180010000 + 8000800180010000800080018001000000008001800100000000800180010000 + 0000800180010000000080018001000000008001800100008000800180010000 + C0FF800180010000FFFFFFFF80010000FBF7FFC7FFC7800FFBF7FFCFFFCF800F F7F7FF8FFF8F800FEFFBFF9FFF9F8000DFFBFF1FFF1F8000DFFDF83FF83F8000 BFFDE01FE01F800077FDE00FE00F800067FEC00FC00F800097F6C00FC00F8000 EDB6C00FC00F8000CDB2C00FC00F8000D9B5C00FC00F800FE5B7E01FE01F800F @@ -2362,8 +2383,7 @@ object MainForm: TMainForm C003000F80018000C003000780018000C003000380018000C003000180018000 C003000180018000C003001F80018000C003001F80018001C003001F80018001 C0038FF180018001C007FFF980018001C00FFF7580018001C01FFF8F80018001 - C03FFFFF80018001FFFFFFFFFFFFFFFF00000000000000000000000000000000 - 000000000000} + C03FFFFF80018001FFFFFFFFFFFFFFFF} end object SmallImages: TImageList Left = 40 @@ -2979,4 +2999,10 @@ object MainForm: TMainForm Left = 72 Top = 120 end + object Thumbnails: TImageList + Height = 64 + Width = 64 + Left = 104 + Top = 120 + end end diff --git a/2.10/Source/Main.pas b/2.10/Source/Main.pas index e25fb12..0fc2fd2 100644 --- a/2.10/Source/Main.pas +++ b/2.10/Source/Main.pas @@ -188,6 +188,10 @@ type mnuRenderAll: TMenuItem; mnuBuiltinVars: TMenuItem; mnuPluginVars: TMenuItem; + Thumbnails: TImageList; + tbShowIcons: TToolButton; + tbShowList: TToolButton; + ToolButton8: TToolButton; procedure tbzoomoutwindowClick(Sender: TObject); procedure mnuimageClick(Sender: TObject); procedure mnuExitClick(Sender: TObject); @@ -295,6 +299,8 @@ type Attributes: TAttrList); procedure ListViewSelectItem(Sender: TObject; Item: TListItem; Selected: Boolean); + procedure tbShowIconsClick(Sender: TObject); + procedure tbShowListClick(Sender: TObject); private Renderer: TRenderThread; @@ -1991,13 +1997,17 @@ var ListItem: TListItem; FileStrings: TStringList; ParamStrings: TStringList; + Bitmap: TBitmap; + lcp: TControlPoint; + RenderEngine: TRenderer; begin FileStrings := TStringList.Create; FileStrings.LoadFromFile(FileName); ParamStrings := TStringList.Create; try - MainForm.ListView.Items.BeginUpdate; + //MainForm.ListView.Items.BeginUpdate; MainForm.ListView.Items.Clear; + MainForm.Thumbnails.Clear; if (Pos(' 0) then begin i := 0; @@ -2012,7 +2022,7 @@ begin ParamStrings.Add(FileStrings[i]); until pos('', Lowercase(FileStrings[i])) <> 0; - Assert(xmlErrorsList.Count = 0); + //Assert(xmlErrorsList.Count = 0); pname := ''; ptime := ''; pversion := ''; @@ -2025,19 +2035,48 @@ begin if Title <> '' then begin { Otherwise bad format } + + if xmlErrorsList.Count = 0 then + begin + lcp := TControlPoint.Create; + lcp.Clear; + MainForm.ParseXML(lcp, PCHAR(ParamStrings.Text)); + + if xmlErrorsList.Count = 0 then + begin + lcp.sample_density := 0.5; + lcp.spatial_oversample := 1; + lcp.spatial_filter_radius := 0.3; + lcp.AdjustScale(MainForm.Thumbnails.Width, MainForm.Thumbnails.Height); + lcp.Transparency := false; + lcp.Width := MainForm.Thumbnails.Width; + lcp.Height := MainForm.Thumbnails.Height; + try + RenderEngine := TRenderer.Create; + assert(RenderEngine <> nil); + RenderEngine.SetCP(lcp); + RenderEngine.Render; + except + end; + MainForm.Thumbnails.Add(RenderEngine.GetImage, nil); + RenderEngine.Free; + end; + lcp.Free; + end; ListItem := MainForm.ListView.Items.Add; ListItem.Caption := Title; - if xmlErrorsList.Count > 0 then begin - ListItem.ImageIndex := 1; + if xmlErrorsList.Count = 0 then + ListItem.ImageIndex := MainForm.Thumbnails.Count-1 + else xmlErrorsList.Clear; - end; end; ParamStrings.Clear; + Application.ProcessMessages; end; Inc(i); end; end; - MainForm.ListView.Items.EndUpdate; + //MainForm.ListView.Items.EndUpdate; case sel of 0: MainForm.ListView.Selected := MainForm.ListView.Items[MainForm.ListView.Items.Count - 1]; 1: MainForm.ListView.Selected := MainForm.ListView.Items[0]; @@ -2824,7 +2863,7 @@ begin end; end; repeat - inc(i); + inc(i); ParamStrings.Add(FileStrings[i]); until pos('', Lowercase(FileStrings[i])) <> 0; @@ -5272,4 +5311,14 @@ begin } end; +procedure TMainForm.tbShowIconsClick(Sender: TObject); +begin + ListView.ViewStyle := vsIcon; +end; + +procedure TMainForm.tbShowListClick(Sender: TObject); +begin + ListView.ViewStyle := vsReport; +end; + end.