You've already forked lazarus-ccr
jvcllaz: Add missing required units for JvPageComps
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6271 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
545
components/jvcllaz/design/JvPageComps/JvPageListEditorForm.lfm
Normal file
545
components/jvcllaz/design/JvPageComps/JvPageListEditorForm.lfm
Normal file
@ -0,0 +1,545 @@
|
||||
object frmPageListEditor: TfrmPageListEditor
|
||||
Left = 446
|
||||
Top = 114
|
||||
ClientWidth = 150
|
||||
ClientHeight = 247
|
||||
Caption = 'PageList Editor'
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Shell Dlg 2'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 150
|
||||
Height = 23
|
||||
AutoSize = True
|
||||
ButtonHeight = 23
|
||||
Caption = 'ToolBar1'
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Flat = True
|
||||
Images = ilButtons
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
object btnAdd: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
Hint = 'Add page'
|
||||
Action = acAdd
|
||||
end
|
||||
object btnDelete: TToolButton
|
||||
Left = 23
|
||||
Top = 0
|
||||
Hint = 'Delete page'
|
||||
Action = acDelete
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 46
|
||||
Top = 0
|
||||
Width = 8
|
||||
Caption = 'ToolButton1'
|
||||
ImageIndex = 3
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object tbMoveUp: TToolButton
|
||||
Left = 54
|
||||
Top = 0
|
||||
Action = acMoveUp
|
||||
end
|
||||
object tbMoveDown: TToolButton
|
||||
Left = 77
|
||||
Top = 0
|
||||
Action = acMoveDown
|
||||
end
|
||||
end
|
||||
object lbPages: TListBox
|
||||
Left = 0
|
||||
Top = 23
|
||||
Width = 150
|
||||
Height = 207
|
||||
Align = alClient
|
||||
ItemHeight = 13
|
||||
PopupMenu = popEditor
|
||||
TabOrder = 1
|
||||
OnClick = lbPagesClick
|
||||
OnKeyPress = lbPagesKeyPress
|
||||
end
|
||||
object StatusBar1: TStatusBar
|
||||
Left = 0
|
||||
Top = 230
|
||||
Width = 150
|
||||
Height = 19
|
||||
Panels = <>
|
||||
end
|
||||
object alEditor: TActionList
|
||||
Images = ilButtons
|
||||
OnUpdate = alEditorUpdate
|
||||
Left = 86
|
||||
Top = 34
|
||||
object acAdd: TAction
|
||||
Caption = 'Add'
|
||||
Hint = 'Add Welcome page'
|
||||
ImageIndex = 0
|
||||
ShortCut = 45
|
||||
OnExecute = acAddExecute
|
||||
end
|
||||
object acDelete: TAction
|
||||
Caption = 'Delete'
|
||||
Hint = 'Delete selected page(s)'
|
||||
ImageIndex = 1
|
||||
ShortCut = 46
|
||||
OnExecute = acDeleteExecute
|
||||
OnUpdate = acDeleteUpdate
|
||||
end
|
||||
object acMoveUp: TAction
|
||||
Caption = 'Move Up'
|
||||
Hint = 'Move Up'
|
||||
ImageIndex = 2
|
||||
ShortCut = 16422
|
||||
OnExecute = acMoveUpExecute
|
||||
end
|
||||
object acMoveDown: TAction
|
||||
Caption = 'Move Down'
|
||||
Hint = 'Move Down'
|
||||
ImageIndex = 3
|
||||
ShortCut = 16424
|
||||
OnExecute = acMoveDownExecute
|
||||
end
|
||||
end
|
||||
object ilButtons: TImageList
|
||||
Left = 20
|
||||
Top = 30
|
||||
Bitmap = {
|
||||
494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
||||
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
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000848484008484
|
||||
8400848484008484840084848400848484008484840084848400848484008484
|
||||
8400848484008484840084848400848484000000000000000000848484008484
|
||||
8400848484008484840084848400848484008484840084848400848484008484
|
||||
8400848484008484840084848400848484000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000848484000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000848484000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000FFFFFF0000FF
|
||||
FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
|
||||
0000FFFFFF0000FFFF0000000000848484000000000000000000FFFFFF0000FF
|
||||
FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
|
||||
0000FFFFFF0000FFFF0000000000848484000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000FFFF00FFFF
|
||||
FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6
|
||||
C60000000000FFFFFF000000000084848400848484000000000000FFFF00FFFF
|
||||
FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6
|
||||
C60000000000FFFFFF0000000000848484000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000FFFFFF0000FF
|
||||
FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FF
|
||||
FF00C6C6C6000000000000000000848484000000840000000000FFFFFF0000FF
|
||||
FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FF
|
||||
FF00C6C6C6000000000000000000848484000000000000000000000000000000
|
||||
0000000000000000000084840000848400008484000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000848400000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000FFFF00FFFF
|
||||
FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
|
||||
000000000000000000000000000084848400000084000000840000FFFF00FFFF
|
||||
FF0000FFFF00FFFFFF00848484000000840000FFFF00FFFFFF00000000000000
|
||||
0000000000000000000000000000848484000000000000000000000000000000
|
||||
0000000000000000000084840000848400008484000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000084840000848400008484000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF0000000000FFFFFF008484
|
||||
840000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000FFFF00FFFFFF0000FF
|
||||
FF00FFFFFF0000FFFF00000000008484840084848400000084008484840000FF
|
||||
FF00FFFFFF00848484000000840084848400FFFFFF0000FFFF00FFFFFF0000FF
|
||||
FF00FFFFFF0000FFFF0000000000848484000000000000000000000000000000
|
||||
0000000000000000000084840000848400008484000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000008484000084840000848400008484000084840000000000000000
|
||||
0000000000000000000000000000000000008484840000FFFF0000FFFF008484
|
||||
8400FFFFFF0000FFFF008484840000FFFF00FFFFFF00FFFFFF0000FFFF00FFFF
|
||||
FF0000FFFF00FFFFFF0000000000848484000000000000008400000084008484
|
||||
840000FFFF000000840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
|
||||
FF0000FFFF00FFFFFF0000000000848484000000000000000000000000000000
|
||||
0000000000000000000084840000848400008484000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000848400008484000084840000848400008484000084840000848400000000
|
||||
0000000000000000000000000000000000000000000084848400FFFFFF008484
|
||||
840000FFFF008484840000FFFF00FFFFFF0000FFFF0000FFFF00FFFFFF0000FF
|
||||
FF00FFFFFF0000FFFF0000000000848484000000000084848400000084000000
|
||||
84000000840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
|
||||
FF00FFFFFF0000FFFF0000000000848484000000000000000000000000000000
|
||||
0000848400008484000084840000848400008484000084840000848400000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000084840000848400008484000000000000000000000000
|
||||
000000000000000000000000000000000000848484008484840084848400FFFF
|
||||
FF0084848400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
|
||||
FF0000FFFF00FFFFFF0000000000848484000000000084848400000084000000
|
||||
840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
|
||||
FF0000FFFF00FFFFFF0000000000848484000000000000000000000000000000
|
||||
0000000000008484000084840000848400008484000084840000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000084840000848400008484000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF0000FFFF008484840000FF
|
||||
FF00FFFFFF008484840084848400848484008484840000000000000000000000
|
||||
0000000000000000000000000000000000008484840000008400000084000000
|
||||
8400000084008484840000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000084840000848400008484000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000084840000848400008484000000000000000000000000
|
||||
000000000000000000000000000000000000000000008484840000FFFF008484
|
||||
840000FFFF008484840000FFFF00000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000840000008400848484000000
|
||||
0000000084000000840084848400000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000848400000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000084840000848400008484000000000000000000000000
|
||||
0000000000000000000000000000000000008484840000FFFF00000000008484
|
||||
8400FFFFFF00000000008484840000FFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000840000008400848484000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000FFFF0000000000000000008484
|
||||
840000FFFF000000000000000000848484000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000008400000084008484840000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000008484
|
||||
8400FFFFFF000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000424D3E000000000000003E000000
|
||||
2800000040000000300000000100010000000000800100000000000000000000
|
||||
000000000000000000000000FFFFFF0000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000FFFFFFFFFFFFFFFFC000C000FFFFFFFF
|
||||
80008000FFFFFFFF80008000FFFFFFFF80000000F83FFEFF80000000F83FFC7F
|
||||
80000000F83FF83F00000000F83FF01F00008000C007E00F80008000E00FC007
|
||||
00008000F01FF83F00010001F83FF83F81FF11FFFC7FF83F24FFF8FFFEFFF83F
|
||||
66FFFC7FFFFFFFFFE7FFFFFFFFFFFFFF00000000000000000000000000000000
|
||||
000000000000}
|
||||
end
|
||||
object popEditor: TPopupMenu
|
||||
Images = ilButtons
|
||||
Left = 54
|
||||
Top = 120
|
||||
object Add1: TMenuItem
|
||||
Action = acAdd
|
||||
end
|
||||
object Delete1: TMenuItem
|
||||
Action = acDelete
|
||||
end
|
||||
object N1: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object MoveUp1: TMenuItem
|
||||
Action = acMoveUp
|
||||
end
|
||||
object MoveDown1: TMenuItem
|
||||
Action = acMoveDown
|
||||
end
|
||||
end
|
||||
end
|
334
components/jvcllaz/design/JvPageComps/JvPageListEditorForm.pas
Normal file
334
components/jvcllaz/design/JvPageComps/JvPageListEditorForm.pas
Normal file
@ -0,0 +1,334 @@
|
||||
{-----------------------------------------------------------------------------
|
||||
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/MPL-1.1.html
|
||||
|
||||
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 Original Code is: JvPageListEditorForm.PAS, released on 2004-03-28.
|
||||
|
||||
The Initial Developer of the Original Code is Peter Thornqvist <peter3 at sourceforge dot net>
|
||||
Portions created by Peter Thornqvist are Copyright (C) 2004 Peter Thornqvist.
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
|
||||
located at http://jvcl.delphi-jedi.org
|
||||
|
||||
Known Issues:
|
||||
-----------------------------------------------------------------------------}
|
||||
// $Id$
|
||||
|
||||
unit JvPageListEditorForm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ActnList, ImgList, ComCtrls, StdCtrls, ToolWin, Menus,
|
||||
JvPageList;
|
||||
|
||||
type
|
||||
TfrmPageListEditor = class(TForm) //class(TDesignWindow)
|
||||
ToolBar1: TToolBar;
|
||||
btnAdd: TToolButton;
|
||||
btnDelete: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
tbMoveUp: TToolButton;
|
||||
tbMoveDown: TToolButton;
|
||||
lbPages: TListBox;
|
||||
alEditor: TActionList;
|
||||
acAdd: TAction;
|
||||
acDelete: TAction;
|
||||
acMoveUp: TAction;
|
||||
acMoveDown: TAction;
|
||||
ilButtons: TImageList;
|
||||
StatusBar1: TStatusBar;
|
||||
popEditor: TPopupMenu;
|
||||
Add1: TMenuItem;
|
||||
Delete1: TMenuItem;
|
||||
N1: TMenuItem;
|
||||
MoveUp1: TMenuItem;
|
||||
MoveDown1: TMenuItem;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure acAddExecute(Sender: TObject);
|
||||
procedure acDeleteExecute(Sender: TObject);
|
||||
procedure acMoveUpExecute(Sender: TObject);
|
||||
procedure acMoveDownExecute(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var AAction: TCloseAction);
|
||||
procedure acDeleteUpdate(Sender: TObject);
|
||||
procedure lbPagesClick(Sender: TObject);
|
||||
procedure alEditorUpdate(AAction: TBasicAction; var Handled: Boolean);
|
||||
procedure lbPagesKeyPress(Sender: TObject; var Key: Char);
|
||||
private
|
||||
FPageList: TJvCustomPageList;
|
||||
procedure SetPageList(const Value: TJvCustomPageList);
|
||||
procedure UpdateList(ItemIndex: Integer);
|
||||
procedure SelectPage(const Index: Integer);
|
||||
procedure Add(Page: TJvCustomPage);
|
||||
public
|
||||
property PageList:TJvCustomPageList read FPageList write SetPageList;
|
||||
(*
|
||||
procedure Activated; override;
|
||||
procedure ItemDeleted(const ADesigner: IDesigner; Item: TPersistent); override;
|
||||
procedure DesignerClosed(const Designer: IDesigner; AGoingDormant: Boolean); override;
|
||||
procedure ItemsModified(const Designer: IDesigner); override;
|
||||
function GetEditState: TEditState; override;
|
||||
*)
|
||||
end;
|
||||
|
||||
procedure ShowPageListEditor(Designer: IDesigner; APageList: TJvCustomPageList);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
JvDsgnConsts;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
procedure ShowPageListEditor(Designer: IDesigner; APageList: TJvCustomPageList);
|
||||
var
|
||||
I: Integer;
|
||||
APageListEditor: TfrmPageListEditor;
|
||||
begin
|
||||
APageListEditor := nil;
|
||||
for I := 0 to Screen.FormCount - 1 do
|
||||
if Screen.Forms[I] is TfrmPageListEditor then
|
||||
if TfrmPageListEditor(Screen.Forms[I]).PageList = APageList then
|
||||
begin
|
||||
APageListEditor := TfrmPageListEditor(Screen.Forms[I]);
|
||||
Break;
|
||||
end;
|
||||
// Show the editor
|
||||
if Assigned(APageListEditor) then
|
||||
begin
|
||||
APageListEditor.Show;
|
||||
if APageListEditor.WindowState = wsMinimized then
|
||||
APageListEditor.WindowState := wsNormal;
|
||||
end
|
||||
else
|
||||
begin
|
||||
APageListEditor := TfrmPageListEditor.Create(Application);
|
||||
try
|
||||
APageListEditor.Designer := Designer;
|
||||
APageListEditor.PageList := APageList;
|
||||
APageListEditor.Show;
|
||||
except
|
||||
APageListEditor.Free;
|
||||
raise;
|
||||
end;
|
||||
end;
|
||||
if APageListEditor <> nil then
|
||||
APageListEditor.Caption := Format(RsFmtCaption,[APageList.Name]);
|
||||
end;
|
||||
|
||||
type
|
||||
TJvCustomPageAccess = class(TJvCustomPage);
|
||||
|
||||
procedure TfrmPageListEditor.acAddExecute(Sender: TObject);
|
||||
var
|
||||
APage: TJvCustomPage;
|
||||
begin
|
||||
APage := PageList.GetPageClass.Create(Designer.GetRoot);
|
||||
try
|
||||
APage.Name := UniqueName(APage);
|
||||
Add(APage);
|
||||
except
|
||||
APage.Free;
|
||||
raise;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.acDeleteExecute(Sender: TObject);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
if Assigned(PageList.ActivePage) then
|
||||
begin
|
||||
I := lbPages.ItemIndex;
|
||||
if lbPages.ItemIndex >= 0 then
|
||||
lbPages.Items.Delete(TJvCustomPageAccess(PageList.ActivePage).PageIndex);
|
||||
Designer.SelectComponent(PageList);
|
||||
PageList.ActivePage.Free;
|
||||
if I >= lbPages.Items.Count then
|
||||
Dec(I);
|
||||
if (I >= 0) and (I < lbPages.Items.Count) then
|
||||
begin
|
||||
lbPages.ItemIndex := I;
|
||||
SelectPage(I);
|
||||
end
|
||||
else
|
||||
Designer.Modified;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.acMoveUpExecute(Sender: TObject);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
I := lbPages.ItemIndex;
|
||||
lbPages.Items.Move(I, I-1);
|
||||
if Assigned(PageList) then
|
||||
begin
|
||||
TJvCustomPageAccess(PageList.Pages[I]).PageIndex := I - 1;
|
||||
lbPages.ItemIndex := I - 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.acMoveDownExecute(Sender: TObject);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
I := lbPages.ItemIndex;
|
||||
lbPages.Items.Move(I, I+1);
|
||||
if Assigned(PageList) then
|
||||
begin
|
||||
TJvCustomPageAccess(PageList.Pages[I]).PageIndex := I + 1;
|
||||
lbPages.ItemIndex := I + 1;
|
||||
end;
|
||||
end;
|
||||
(*
|
||||
procedure TfrmPageListEditor.Activated;
|
||||
begin
|
||||
if (lbPages.ItemIndex < 0) and (lbPages.Items.Count > 0) then
|
||||
lbPages.ItemIndex := 0;
|
||||
if Assigned(FPageList) and Assigned(FPageList.ActivePage) and
|
||||
(TJvCustomPageAccess(FPageList.ActivePage).PageIndex <> lbPages.ItemIndex) then
|
||||
lbPages.ItemIndex := TJvCustomPageAccess(FPageList.ActivePage).PageIndex;
|
||||
SelectPage(lbPages.ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.DesignerClosed(const Designer: IDesigner;
|
||||
AGoingDormant: Boolean);
|
||||
begin
|
||||
if Designer = Self.Designer then
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.ItemDeleted(const ADesigner: IDesigner;
|
||||
Item: TPersistent);
|
||||
begin
|
||||
if Item = FPageList then
|
||||
begin
|
||||
FPageList := nil;
|
||||
Close;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.ItemsModified(const Designer: IDesigner);
|
||||
begin
|
||||
if not (csDestroying in ComponentState) then
|
||||
UpdateList(lbPages.ItemIndex);
|
||||
end;
|
||||
|
||||
function TfrmPageListEditor.GetEditState: TEditState;
|
||||
begin
|
||||
Result := [];
|
||||
end; *)
|
||||
|
||||
procedure TfrmPageListEditor.SetPageList(const Value: TJvCustomPageList);
|
||||
begin
|
||||
if FPageList <> Value then
|
||||
begin
|
||||
FPageList := Value;
|
||||
UpdateList(0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.Add(Page: TJvCustomPage);
|
||||
begin
|
||||
Page.Parent := PageList;
|
||||
Page.PageList := PageList;
|
||||
PageList.ActivePage := Page;
|
||||
Designer.SelectComponent(Page);
|
||||
//Designer.Modified;
|
||||
lbPages.ItemIndex := lbPages.Items.Add(Page.Name);
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.SelectPage(const Index: Integer);
|
||||
var
|
||||
Page: TJvCustomPageAccess;
|
||||
begin
|
||||
if Assigned(FPageList) and Active then
|
||||
begin
|
||||
Page := nil;
|
||||
if (Index >= 0) and (Index < FPageList.PageCount) then
|
||||
Page := TJvCustomPageAccess(FPageList.Pages[Index]);
|
||||
PageList.ActivePage := Page;
|
||||
Designer.SelectComponent(Page);
|
||||
Designer.Modified;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.UpdateList(ItemIndex: Integer);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
if Assigned(FPageList) then
|
||||
begin
|
||||
lbPages.Items.BeginUpdate;
|
||||
try
|
||||
lbPages.Items.Clear;
|
||||
for I := 0 to FPageList.PageCount - 1 do
|
||||
lbPages.Items.Add(TJvCustomPageAccess(FPageList.Pages[I]).Name);
|
||||
if (ItemIndex >= 0) and (ItemIndex < lbPages.Items.Count) then
|
||||
lbPages.ItemIndex := ItemIndex
|
||||
else
|
||||
lbPages.ItemIndex := -1;
|
||||
finally
|
||||
lbPages.Items.EndUpdate;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.FormClose(Sender: TObject;
|
||||
var AAction: TCloseAction);
|
||||
begin
|
||||
AAction := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.acDeleteUpdate(Sender: TObject);
|
||||
begin
|
||||
(Sender as TAction).Enabled :=
|
||||
(lbPages.Items.Count > 0) and (lbPages.ItemIndex >= 0);
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.lbPagesClick(Sender: TObject);
|
||||
begin
|
||||
SelectPage(lbPages.ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.alEditorUpdate(AAction: TBasicAction;
|
||||
var Handled: Boolean);
|
||||
begin
|
||||
acMoveUp.Enabled := lbPages.ItemIndex > 0;
|
||||
acMoveDown.Enabled :=
|
||||
(lbPages.ItemIndex <> -1) and
|
||||
(lbPages.ItemIndex < lbPages.Items.Count - 1);
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.lbPagesKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
begin
|
||||
if lbPages.ItemIndex <> -1 then
|
||||
begin
|
||||
SelectPage(lbPages.ItemIndex);
|
||||
ActivateInspector(Key);
|
||||
Key := #0;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPageListEditor.FormCreate(Sender: TObject);
|
||||
begin
|
||||
{$IFDEF COMPILER9_UP}
|
||||
FormStyle := fsStayOnTop;
|
||||
{$ENDIF COMPILER9_UP}
|
||||
end;
|
||||
|
||||
end.
|
411
components/jvcllaz/design/JvPageComps/JvPageListEditors.pas
Normal file
411
components/jvcllaz/design/JvPageComps/JvPageListEditors.pas
Normal file
@ -0,0 +1,411 @@
|
||||
{-----------------------------------------------------------------------------
|
||||
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/MPL-1.1.html
|
||||
|
||||
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 Original Code is: JvPageListEditors.PAS, released on 2004-03-31.
|
||||
|
||||
The Initial Developer of the Original Code is Peter Th�rnqvist [peter3 at sourceforge dot net] .
|
||||
Portions created by Peter Th�rnqvist are Copyright (C) 2003 Peter Th�rnqvist.
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
|
||||
located at http://jvcl.delphi-jedi.org
|
||||
|
||||
Known Issues:
|
||||
-----------------------------------------------------------------------------}
|
||||
// $Id$
|
||||
|
||||
unit JvPageListEditors;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, ImgList, Menus,
|
||||
PropEdits, GraphPropEdits, ComponentEditors,
|
||||
JvPageList; //, JvDsgnEditors;
|
||||
|
||||
type
|
||||
(*
|
||||
{ a property editor for the ActivePage property of TJvPageList }
|
||||
TJvActivePageProperty = class(TComponentProperty)
|
||||
public
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
procedure GetValues(Proc: TGetStrProc); override;
|
||||
end;
|
||||
*)
|
||||
TJvShowDesignCaptionProperty = class(TEnumProperty)
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
end;
|
||||
|
||||
{ a component editor for the TJvPageList }
|
||||
|
||||
// adapted from TUntabbedNotebookComponentEditor)
|
||||
TJvCustomPageListEditor = class(TDefaultComponentEditor)
|
||||
protected
|
||||
procedure AddNewPageToDesigner(Index: integer); virtual;
|
||||
procedure DoAddPage; virtual;
|
||||
procedure DoDeletePage; virtual;
|
||||
procedure AddMenuItemsForPages(ParentMenuItem: TMenuItem); virtual;
|
||||
procedure ShowPageMenuItemClick(Sender: TObject);
|
||||
public
|
||||
procedure ExecuteVerb(Index: Integer); override;
|
||||
function GetVerb(Index: Integer): string; override;
|
||||
function GetVerbCount: Integer; override;
|
||||
procedure PrepareItem(Index: Integer; const AnItem: TMenuItem); override;
|
||||
function PageList: TJvCustomPageList; virtual;
|
||||
end;
|
||||
|
||||
TJvCustomPageEditor = class(TJvCustomPageListEditor)
|
||||
public
|
||||
function PageList: TJvCustomPageList; override;
|
||||
function Page: TJvCustomPage; virtual;
|
||||
end;
|
||||
|
||||
(*
|
||||
TJvCustomPageEditor = class(TComponentEditor)
|
||||
private
|
||||
procedure InsertPage;
|
||||
procedure PrevPage;
|
||||
procedure NextPage;
|
||||
procedure RemovePage;
|
||||
function GetPageControl: TJvCustomPageList;
|
||||
public
|
||||
function GetVerb(Index: Integer): string; override;
|
||||
function GetVerbCount: Integer; override;
|
||||
procedure ExecuteVerb(Index: Integer); override;
|
||||
procedure Edit; override;
|
||||
end; *)
|
||||
|
||||
TJvSettingsTreeImagesProperty = class(TImageIndexPropertyEditor)
|
||||
protected
|
||||
function GetImageList: TCustomImageList; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
LazLogger,
|
||||
TypInfo,
|
||||
JvDsgnConsts, JvPageListTreeView; //, JvPageListEditorForm;
|
||||
|
||||
type
|
||||
THackPageList = class(TJvPageList);
|
||||
THackTreeView = class(TJvCustomPageListTreeView);
|
||||
|
||||
const
|
||||
cShowEditor = 0;
|
||||
cDash = 1;
|
||||
cNewPage = 2;
|
||||
cNextPage = 3;
|
||||
cPrevPage = 4;
|
||||
cDelPage = 5;
|
||||
|
||||
cElementCount = 6;
|
||||
|
||||
const
|
||||
unbvAddPage = 0;
|
||||
unbvDeletePage = 1;
|
||||
unbvShowPage = 2;
|
||||
|
||||
|
||||
{ TJvCustomPageListEditor }
|
||||
{ adapted from TUntabbedNotebookComponentEditor for LCL's Notebook
|
||||
originally named "TJvCustomPageEditor" }
|
||||
|
||||
function TJvCustomPageListEditor.PageList: TJvCustomPageList;
|
||||
begin
|
||||
Result := TJvCustomPageList(GetComponent);
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListEditor.AddNewPageToDesigner(Index: integer);
|
||||
var
|
||||
Hook: TPropertyEditorHook;
|
||||
newPage: TJvCustomPage;
|
||||
newName: string;
|
||||
begin
|
||||
Hook := nil;
|
||||
if not GetHook(Hook) then exit;
|
||||
DebugLn('GetHook ' + Hook.ClassName);
|
||||
newPage := PageList.Pages[Index];
|
||||
newName := GetDesigner.CreateUniqueComponentName(newPage.ClassName);
|
||||
newPage.Caption := newName;
|
||||
newPage.Name := newName;
|
||||
PageList.ActivePageIndex := Index;
|
||||
Hook.PersistentAdded(newPage, true);
|
||||
Modified;
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListEditor.DoAddPage;
|
||||
begin
|
||||
DebugLn('DoAddPage: ENTER');
|
||||
if not HasHook then exit;
|
||||
|
||||
DebugLn('DoAddPage');
|
||||
|
||||
THackPageList(PageList).AddPage('');
|
||||
DebugLn('DoAddPage: PageCount=' + IntToStr(PageList.pageCount));
|
||||
AddNewPageToDesigner(PageList.PageCount-1);
|
||||
DebugLn('DoAddPage: EXIT');
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListEditor.DoDeletePage;
|
||||
var
|
||||
Hook: TPropertyEditorHook;
|
||||
OldIndex: integer;
|
||||
PageComponent: TPersistent;
|
||||
begin
|
||||
OldIndex := PageList.ActivePageIndex;
|
||||
if (OldIndex >= 0) and (OldIndex < PageList.PageCount) then
|
||||
begin
|
||||
if not GetHook(Hook) then exit;
|
||||
PageComponent := TPersistent(PageList.Pages[OldIndex]);
|
||||
Hook.DeletePersistent(PageComponent);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListEditor.AddMenuItemsForPages(ParentMenuItem: TMenuItem);
|
||||
var
|
||||
n: Integer;
|
||||
i: integer;
|
||||
NewMenuItem: TMenuItem;
|
||||
begin
|
||||
n := PageList.PageCount;
|
||||
ParentMenuItem.Enabled := n > 0;
|
||||
for i := 0 to n - 1 do
|
||||
begin
|
||||
NewMenuItem := TMenuItem.Create(ParentMenuItem);
|
||||
NewMenuItem.Name := 'ShowPage' + IntToStr(i);
|
||||
NewMenuItem.Caption := PageList.Pages[i].Name + ' "' + PageList.Pages[i].Caption + '"';
|
||||
NewMenuItem.OnClick := @ShowPageMenuItemClick;
|
||||
ParentMenuItem.Add(NewMenuItem);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListEditor.ShowPageMenuItemClick(Sender: TObject);
|
||||
var
|
||||
AMenuItem: TMenuItem;
|
||||
NewPageIndex: integer;
|
||||
begin
|
||||
AMenuItem := TMenuItem(Sender);
|
||||
if (AMenuItem = nil) or (not (AMenuItem is TMenuItem)) then exit;
|
||||
NewPageIndex := AMenuItem.MenuIndex;
|
||||
if (NewPageIndex < 0) or (NewPageIndex >= PageList.PageCount) then exit;
|
||||
PageList.ActivePageIndex := NewPageIndex;
|
||||
GetDesigner.SelectOnlyThisComponent(PageList.Pages[NewPageIndex]);
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListEditor.ExecuteVerb(Index: Integer);
|
||||
begin
|
||||
case Index of
|
||||
unbvAddPage : DoAddPage;
|
||||
unbvDeletePage : DoDeletePage; // beware: this can free the editor itself
|
||||
end;
|
||||
end;
|
||||
|
||||
function TJvCustomPageListEditor.GetVerb(Index: Integer): string;
|
||||
begin
|
||||
case Index of
|
||||
unbvAddPage : Result := RsNewPage;
|
||||
unbvDeletePage : Result := RsDelPage;
|
||||
unbvShowPage : Result := RsShowPage;
|
||||
else
|
||||
Result := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
function TJvCustomPageListEditor.GetVerbCount: Integer;
|
||||
begin
|
||||
Result := 3;
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListEditor.PrepareItem(Index: Integer;
|
||||
const AnItem: TMenuItem);
|
||||
begin
|
||||
inherited PrepareItem(Index, AnItem);
|
||||
case Index of
|
||||
unbvAddPage : ;
|
||||
unbvDeletePage : AnItem.Enabled := PageList.ActivePageIndex >= 0;
|
||||
unbvShowPage : AddMenuItemsForPages(AnItem);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{ TJvCustomPageEditor }
|
||||
{ adapted from TUNBPageComponentEditor for LCL's Notebook pages }
|
||||
|
||||
function TJvCustomPageEditor.PageList: TJvCustomPageList;
|
||||
var
|
||||
lPage: TJvCustomPage;
|
||||
begin
|
||||
lPage := Page;
|
||||
if (lPage.Parent <> nil) and (lPage.Parent is TJvCustomPageList) then
|
||||
Result := TJvCustomPageList(lPage.Parent)
|
||||
else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
function TJvCustomPageEditor.Page: TJvCustomPage;
|
||||
begin
|
||||
Result := TJvCustomPage(GetComponent);
|
||||
end;
|
||||
|
||||
|
||||
(*
|
||||
|
||||
procedure TJvCustomPageEditor.Edit;
|
||||
begin
|
||||
ExecuteVerb(cShowEditor);
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageEditor.ExecuteVerb(Index: Integer);
|
||||
begin
|
||||
case Index of
|
||||
cShowEditor:
|
||||
ShowMessage('NOT IMPLEMENTED');
|
||||
// ShowPageListEditor(Designer, GetPageControl);
|
||||
cNextPage:
|
||||
NextPage;
|
||||
cPrevPage:
|
||||
PrevPage;
|
||||
cNewPage:
|
||||
InsertPage;
|
||||
cDelPage:
|
||||
RemovePage;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TJvCustomPageEditor.GetPageControl: TJvCustomPageList;
|
||||
begin
|
||||
if Component is TJvCustomPageList then
|
||||
Result := TJvCustomPageList(Component)
|
||||
else
|
||||
Result := TJvCustomPageList(TJvCustomPage(Component).PageList);
|
||||
end;
|
||||
|
||||
function TJvCustomPageEditor.GetVerb(Index: Integer): string;
|
||||
begin
|
||||
case Index of
|
||||
cShowEditor:
|
||||
Result := RsPageListEditorEllipsis;
|
||||
cDash:
|
||||
Result := '-';
|
||||
cNewPage:
|
||||
Result := RsNewPage;
|
||||
cNextPage:
|
||||
Result := RsNextPageAmp;
|
||||
cPrevPage:
|
||||
Result := RsPrevPage;
|
||||
cDelPage:
|
||||
Result := RsDelPage;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TJvCustomPageEditor.GetVerbCount: Integer;
|
||||
begin
|
||||
Result := cElementCount; // list, div, new, next, previous, delete
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageEditor.InsertPage;
|
||||
var
|
||||
P: TJvCustomPage;
|
||||
C: TJvCustomPageList;
|
||||
begin
|
||||
C := GetPageControl;
|
||||
P := C.GetPageClass.Create(Designer.LookupRoot);
|
||||
try
|
||||
P.Parent := C;
|
||||
P.Name := Designer.UniqueName(C.GetPageClass.ClassName);
|
||||
P.PageList := C;
|
||||
C.ActivePage := P;
|
||||
except
|
||||
P.Free;
|
||||
raise;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageEditor.NextPage;
|
||||
begin
|
||||
GetPageControl.NextPage;
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageEditor.PrevPage;
|
||||
begin
|
||||
GetPageControl.PrevPage;
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageEditor.RemovePage;
|
||||
var
|
||||
AList: TJvCustomPageList;
|
||||
APage: TJvCustomPage;
|
||||
begin
|
||||
AList := GetPageControl;
|
||||
if (AList <> nil) and (AList.ActivePage <> nil) then
|
||||
begin
|
||||
APage := AList.ActivePage;
|
||||
// Designer.SelectComponent(APage);
|
||||
Designer.SelectOnlyThisComponent(APage);
|
||||
APage.PageList := nil;
|
||||
APage.Free;
|
||||
Designer.Modified;
|
||||
end;
|
||||
end;
|
||||
*)
|
||||
|
||||
|
||||
//=== { TJvActivePageProperty } ==============================================
|
||||
(*
|
||||
function TJvActivePageProperty.GetAttributes: TPropertyAttributes;
|
||||
begin
|
||||
Result := [paValueList];
|
||||
end;
|
||||
|
||||
procedure TJvActivePageProperty.GetValues(Proc: TGetStrProc);
|
||||
var
|
||||
I: Integer;
|
||||
Component: TComponent;
|
||||
begin
|
||||
for I := 0 to Designer.GetRoot.ComponentCount - 1 do
|
||||
begin
|
||||
Component := Designer.GetRoot.Components[I];
|
||||
if (Component.Name <> '') and (Component is TJvCustomPage) and
|
||||
(TJvCustomPage(Component).PageList = GetComponent(0)) then
|
||||
Proc(Component.Name);
|
||||
end;
|
||||
end;
|
||||
*)
|
||||
|
||||
//=== { TJvSettingsTreeImagesProperty } ======================================
|
||||
|
||||
function TJvSettingsTreeImagesProperty.GetImageList: TCustomImageList;
|
||||
var
|
||||
T: TJvCustomPageListTreeView;
|
||||
begin
|
||||
if (GetComponent(0) is TJvSettingsTreeImages) and
|
||||
(TJvSettingsTreeImages(GetComponent(0)).TreeView <> nil) then
|
||||
begin
|
||||
T := TJvSettingsTreeImages(GetComponent(0)).TreeView;
|
||||
Result := THackTreeView(T).Images;
|
||||
end
|
||||
else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
//=== { TJvShowDesignCaptionProperty } =======================================
|
||||
|
||||
function TJvShowDesignCaptionProperty.GetAttributes: TPropertyAttributes;
|
||||
begin
|
||||
// we don't want sorting for this property
|
||||
Result := [paMultiSelect, paValueList, paRevertable];
|
||||
end;
|
||||
|
||||
end.
|
830
components/jvcllaz/run/JvPageComps/JvPageListTreeView.pas
Normal file
830
components/jvcllaz/run/JvPageComps/JvPageListTreeView.pas
Normal file
@ -0,0 +1,830 @@
|
||||
{-----------------------------------------------------------------------------
|
||||
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/MPL-1.1.html
|
||||
|
||||
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 Original Code is: JvPageListTreeView.PAS, released on 2003-01-22.
|
||||
|
||||
The Initial Developer of the Original Code is Peter Thörnqvist [peter3 at sourceforge dot net] .
|
||||
Portions created by Peter Thörnqvist are Copyright (C) 2003 Peter Thörnqvist.
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
|
||||
located at http://jvcl.delphi-jedi.org
|
||||
|
||||
Changes:
|
||||
2002-10-22:
|
||||
Changed TJvPageIndexNode.SetPageIndex to only set the parent PageIndex if the Treeview is a
|
||||
TJvCustomSettingsTreeView since this is the first class implementing this behaviour
|
||||
|
||||
Known Issues:
|
||||
-----------------------------------------------------------------------------}
|
||||
// $Id$
|
||||
|
||||
unit JvPageListTreeView;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
LCLIntf,
|
||||
SysUtils, Classes,
|
||||
Graphics, Controls, ImgList, ComCtrls,
|
||||
JvPageList; //, JvExComCtrls;
|
||||
|
||||
type
|
||||
TJvCustomPageListTreeView = class;
|
||||
|
||||
TJvPageIndexNode = class(TTreeNode)
|
||||
private
|
||||
FPageIndex: Integer;
|
||||
procedure SetPageIndex(const Value: Integer);
|
||||
published
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
property PageIndex: Integer read FPageIndex write SetPageIndex;
|
||||
end;
|
||||
|
||||
TJvPageIndexNodes = class(TTreeNodes)
|
||||
private
|
||||
procedure ReadData(Stream: TStream);
|
||||
procedure WriteData(Stream: TStream);
|
||||
protected
|
||||
procedure DefineProperties(Filer: TFiler); override;
|
||||
end;
|
||||
|
||||
// this is a "fake" class so we have something to anchor the design-time editor with
|
||||
TJvPageLinks = class(TPersistent)
|
||||
private
|
||||
FTreeView: TJvCustomPageListTreeView;
|
||||
public
|
||||
property TreeView: TJvCustomPageListTreeView read FTreeView;
|
||||
end;
|
||||
|
||||
{ TJvCustomPageListTreeView is a base treeview class that can be hooked up with an IPageList
|
||||
implementor. When the selected tree node is changed, the associated page in the IPageList is changed too as
|
||||
determined by the TJvPageIndexNode.PageIndex property
|
||||
Properties:
|
||||
* PageDefault is the default PageIndex to assign to new nodes
|
||||
* PageLinks is the property used att design time to set up a Nodes PageIndex. At run-time, use
|
||||
TJvPageIndexNode(Node).PageIndex := Value;
|
||||
* PageList is the IPageList implementor that is attached to this control
|
||||
* CanChange calls IPageList.CanChange method and Change calls IPageList.SetActivePageIndex
|
||||
* IPageList.getPageCaption is only used by the design-time editor for the PageLinks property
|
||||
}
|
||||
|
||||
TJvCustomPageListTreeView = class(TCustomTreeView) //(TJvExCustomTreeView)
|
||||
private
|
||||
FItems: TJvPageIndexNodes;
|
||||
FPageList: IPageList;
|
||||
FPageDefault: Integer;
|
||||
FLinks: TJvPageLinks;
|
||||
FMemStream: TMemoryStream;
|
||||
procedure SetPageDefault(const Value: Integer);
|
||||
procedure SetLinks(const Value: TJvPageLinks);
|
||||
procedure SetPageList(const Value: IPageList);
|
||||
function GetItems: TJvPageIndexNodes;
|
||||
procedure SetItems(const Value: TJvPageIndexNodes);
|
||||
protected
|
||||
procedure CreateWnd; override;
|
||||
procedure DestroyWnd; override;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
function CreateNode: TTreeNode; override;
|
||||
function CreateNodes: TTreeNodes; override;
|
||||
function CanChange(Node: TTreeNode): Boolean; override;
|
||||
procedure Change(Node: TTreeNode); override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
property PageDefault: Integer read FPageDefault write SetPageDefault;
|
||||
property PageLinks: TJvPageLinks read FLinks write SetLinks;
|
||||
property PageList: IPageList read FPageList write SetPageList;
|
||||
protected
|
||||
property AutoExpand default True;
|
||||
property ShowButtons default False;
|
||||
property ShowLines default False;
|
||||
property ReadOnly default True;
|
||||
property Items: TJvPageIndexNodes read GetItems write SetItems;
|
||||
end;
|
||||
|
||||
{ TJvSettingsTreeImages is a property class that describes the images used in a
|
||||
TJvCustomSettingsTreeView as the usage of images in this control differs from the normal
|
||||
TreeView
|
||||
}
|
||||
TJvSettingsTreeImages = class(TPersistent)
|
||||
private
|
||||
FSelectedIndex: TImageIndex;
|
||||
FCollapsedIndex: TImageIndex;
|
||||
FImageIndex: TImageIndex;
|
||||
FExpandedIndex: TImageIndex;
|
||||
FTreeView: TJvCustomPageListTreeView;
|
||||
public
|
||||
constructor Create;
|
||||
property TreeView: TJvCustomPageListTreeView read FTreeView write FTreeView;
|
||||
published
|
||||
property CollapsedIndex: TImageIndex read FCollapsedIndex write FCollapsedIndex default 0;
|
||||
property ExpandedIndex: TImageIndex read FExpandedIndex write FExpandedIndex default 1;
|
||||
property SelectedIndex: TImageIndex read FSelectedIndex write FSelectedIndex default 2;
|
||||
property ImageIndex: TImageIndex read FImageIndex write FImageIndex default -1;
|
||||
end;
|
||||
|
||||
{ TJvCustomSettingsTreeView is a base class for treeviews that behave like the
|
||||
treeview in the Settings Dialog in Visual Studio: When a node in the treeview
|
||||
is selected, a new page of settings is shown on a panel to the right.
|
||||
|
||||
Specifically, the following is True:
|
||||
|
||||
* The normal ImageIndex/SelectedIndex is ignored for nodes - use PageNodeImages instead. You still
|
||||
need to assign a TImageList to the Images property
|
||||
* When a node is expanded, it is assigned the expanded image until it is collapsed, regardless
|
||||
whether it's selected or not
|
||||
* When a parent folder is selected, the first non-folder child has it's
|
||||
normal image set as the selected image
|
||||
* By default, AutoExpand and ReadOnly is True, ShowButtons and ShowLines are False
|
||||
|
||||
Other than that, it should work like a normal TreeView. Note that the treeview was designed with AutoExpand = True
|
||||
in mind but should work with AutoExpand = False
|
||||
|
||||
To get the VS look , Images should contain:
|
||||
Image 0: Closed Folder
|
||||
Image 1: Open Folder
|
||||
Image 2: Right-pointing teal-colored arrow
|
||||
|
||||
PageNodeImages should then be set to (the defaults):
|
||||
ClosedFolder = 0;
|
||||
ImageIndex = -1; (no image)
|
||||
OpenFolder = 1;
|
||||
SelectedIndex = 2;
|
||||
}
|
||||
|
||||
TJvCustomSettingsTreeView = class(TJvCustomPageListTreeView)
|
||||
private
|
||||
FNodeImages: TJvSettingsTreeImages;
|
||||
FOnGetImageIndex: TTVExpandedEvent;
|
||||
FOnGetSelectedIndex: TTVExpandedEvent;
|
||||
procedure SetImageSelection(const Value: TJvSettingsTreeImages);
|
||||
protected
|
||||
FLastSelected: TTreeNode;
|
||||
procedure Delete(Node: TTreeNode); override;
|
||||
procedure DoGetImageIndex(Sender: TObject; Node: TTreeNode);
|
||||
procedure DoGetSelectedIndex(Sender: TObject; Node: TTreeNode);
|
||||
procedure GetSelectedIndex(Node: TTreeNode); override;
|
||||
procedure GetImageIndex(Node: TTreeNode); override;
|
||||
function CanChange(Node: TTreeNode): Boolean; override;
|
||||
procedure Change(Node: TTreeNode); override;
|
||||
procedure ResetPreviousNode(NewNode: TTreeNode); virtual;
|
||||
procedure SetPreviousNode(NewNode: TTreeNode); virtual;
|
||||
procedure Loaded; override;
|
||||
procedure Expand(Node: TTreeNode); override;
|
||||
procedure Collapse(Node: TTreeNode); override;
|
||||
property PageNodeImages: TJvSettingsTreeImages read FNodeImages write SetImageSelection;
|
||||
property OnGetImageIndex: TTVExpandedEvent read FOnGetImageIndex write FOnGetImageIndex;
|
||||
property OnGetSelectedIndex: TTVExpandedEvent read FOnGetSelectedIndex write FOnGetSelectedIndex;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
{$IFDEF RTL230_UP}
|
||||
[ComponentPlatformsAttribute(pidWin32 or pidWin64)]
|
||||
{$ENDIF RTL230_UP}
|
||||
TJvPageListTreeView = class(TJvCustomPageListTreeView)
|
||||
published
|
||||
property AutoExpand;
|
||||
property ShowButtons;
|
||||
property ShowLines;
|
||||
property ReadOnly;
|
||||
property PageDefault;
|
||||
property PageLinks;
|
||||
property PageList;
|
||||
property OnMouseEnter;
|
||||
property OnMouseLeave;
|
||||
// property OnParentColorChange;
|
||||
property Align;
|
||||
property Anchors;
|
||||
// property BevelEdges;
|
||||
// property BevelInner;
|
||||
// property BevelOuter;
|
||||
// property BevelKind default bkNone;
|
||||
// property BevelWidth;
|
||||
property BiDiMode;
|
||||
property DragKind;
|
||||
property DragCursor;
|
||||
property ParentBiDiMode;
|
||||
property OnEndDock;
|
||||
property OnStartDock;
|
||||
property BorderWidth;
|
||||
// property ChangeDelay;
|
||||
property HideSelection;
|
||||
property HotTrack;
|
||||
property MultiSelect;
|
||||
property MultiSelectStyle;
|
||||
property StateImages;
|
||||
property ToolTips;
|
||||
property OnAdvancedCustomDraw;
|
||||
property OnAdvancedCustomDrawItem;
|
||||
property ShowRoot;
|
||||
property RightClickSelect;
|
||||
property BorderStyle;
|
||||
property Color;
|
||||
property Constraints;
|
||||
property DragMode;
|
||||
property Enabled;
|
||||
property Font;
|
||||
property Images;
|
||||
property Indent;
|
||||
property ParentColor default False;
|
||||
property ParentFont;
|
||||
property ParentShowHint;
|
||||
property PopupMenu;
|
||||
property RowSelect;
|
||||
property ShowHint;
|
||||
property SortType;
|
||||
property TabOrder;
|
||||
property TabStop default True;
|
||||
property Visible;
|
||||
property OnChange;
|
||||
property OnChanging;
|
||||
property OnClick;
|
||||
property OnCollapsed;
|
||||
property OnCollapsing;
|
||||
property OnContextPopup;
|
||||
property OnCompare;
|
||||
property OnAddition;
|
||||
property OnCreateNodeClass;
|
||||
property OnCustomDraw;
|
||||
property OnCustomDrawItem;
|
||||
property OnDblClick;
|
||||
property OnDeletion;
|
||||
property OnDragDrop;
|
||||
property OnDragOver;
|
||||
property OnEdited;
|
||||
property OnEditing;
|
||||
property OnEndDrag;
|
||||
property OnEnter;
|
||||
property OnExit;
|
||||
property OnExpanding;
|
||||
property OnExpanded;
|
||||
property OnGetImageIndex;
|
||||
property OnGetSelectedIndex;
|
||||
property OnKeyDown;
|
||||
property OnKeyPress;
|
||||
property OnKeyUp;
|
||||
property OnMouseDown;
|
||||
property OnMouseMove;
|
||||
property OnMouseUp;
|
||||
property OnStartDrag;
|
||||
property Items;
|
||||
end;
|
||||
|
||||
{$IFDEF RTL230_UP}
|
||||
[ComponentPlatformsAttribute(pidWin32 or pidWin64)]
|
||||
{$ENDIF RTL230_UP}
|
||||
TJvSettingsTreeView = class(TJvCustomSettingsTreeView)
|
||||
published
|
||||
property AutoExpand;
|
||||
property ShowButtons;
|
||||
property ShowLines;
|
||||
property ReadOnly;
|
||||
property PageDefault;
|
||||
property PageNodeImages;
|
||||
property PageLinks;
|
||||
property PageList;
|
||||
|
||||
property OnMouseEnter;
|
||||
property OnMouseLeave;
|
||||
// property OnParentColorChange;
|
||||
|
||||
property Align;
|
||||
property Anchors;
|
||||
// property BevelEdges;
|
||||
// property BevelInner;
|
||||
// property BevelOuter;
|
||||
// property BevelKind default bkNone;
|
||||
// property BevelWidth;
|
||||
property BiDiMode;
|
||||
property BorderWidth;
|
||||
// property ChangeDelay;
|
||||
property DragKind;
|
||||
property DragCursor;
|
||||
property HideSelection;
|
||||
property HotTrack;
|
||||
property ParentBiDiMode;
|
||||
property OnAddition;
|
||||
property OnCreateNodeClass;
|
||||
property OnCustomDraw;
|
||||
property OnEndDock;
|
||||
property OnStartDock;
|
||||
property OnAdvancedCustomDraw;
|
||||
property OnAdvancedCustomDrawItem;
|
||||
property OnCompare;
|
||||
property RightClickSelect;
|
||||
property ShowRoot;
|
||||
property StateImages;
|
||||
property ToolTips;
|
||||
property BorderStyle;
|
||||
property Color;
|
||||
property Constraints;
|
||||
property DragMode;
|
||||
property Enabled;
|
||||
property Font;
|
||||
property Images;
|
||||
property Indent;
|
||||
// don't use!
|
||||
// property MultiSelect;
|
||||
// property MultiSelectStyle;
|
||||
property ParentColor default False;
|
||||
property ParentFont;
|
||||
property ParentShowHint;
|
||||
property PopupMenu;
|
||||
property RowSelect;
|
||||
property ShowHint;
|
||||
property SortType;
|
||||
property TabOrder;
|
||||
property TabStop default True;
|
||||
property Visible;
|
||||
property OnChange;
|
||||
property OnChanging;
|
||||
property OnClick;
|
||||
property OnCollapsed;
|
||||
property OnCollapsing;
|
||||
property OnContextPopup;
|
||||
property OnCustomDrawItem;
|
||||
property OnDblClick;
|
||||
property OnDeletion;
|
||||
property OnDragDrop;
|
||||
property OnDragOver;
|
||||
property OnEdited;
|
||||
property OnEditing;
|
||||
property OnEndDrag;
|
||||
property OnEnter;
|
||||
property OnExit;
|
||||
property OnExpanding;
|
||||
property OnExpanded;
|
||||
property OnGetImageIndex;
|
||||
property OnGetSelectedIndex;
|
||||
property OnKeyDown;
|
||||
property OnKeyPress;
|
||||
property OnKeyUp;
|
||||
property OnMouseDown;
|
||||
property OnMouseMove;
|
||||
property OnMouseUp;
|
||||
property OnStartDrag;
|
||||
property Items;
|
||||
end;
|
||||
|
||||
{$IFDEF UNITVERSIONING}
|
||||
const
|
||||
UnitVersioning: TUnitVersionInfo = (
|
||||
RCSfile: '$URL$';
|
||||
Revision: '$Revision$';
|
||||
Date: '$Date$';
|
||||
LogPath: 'JVCL\run'
|
||||
);
|
||||
{$ENDIF UNITVERSIONING}
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Forms;
|
||||
|
||||
procedure ResetSiblingFolders(Node: TTreeNode; ImageIndex, SelectedIndex: Integer; Recurse: Boolean = False);
|
||||
var
|
||||
N: TTreeNode;
|
||||
begin
|
||||
N := Node.getPrevSibling;
|
||||
while Assigned(N) do
|
||||
begin
|
||||
if N.HasChildren then
|
||||
begin
|
||||
N.ImageIndex := ImageIndex;
|
||||
N.SelectedIndex := SelectedIndex;
|
||||
if Recurse then
|
||||
ResetSiblingFolders(N.getFirstChild, ImageIndex, SelectedIndex, Recurse);
|
||||
end;
|
||||
N := N.getPrevSibling;
|
||||
end;
|
||||
N := Node.getNextSibling;
|
||||
while Assigned(N) do
|
||||
begin
|
||||
if N.HasChildren then
|
||||
begin
|
||||
N.ImageIndex := ImageIndex;
|
||||
N.SelectedIndex := SelectedIndex;
|
||||
if Recurse then
|
||||
ResetSiblingFolders(N.getFirstChild, ImageIndex, SelectedIndex, Recurse);
|
||||
end;
|
||||
N := N.getNextSibling;
|
||||
end;
|
||||
end;
|
||||
|
||||
//=== { TJvCustomPageListTreeView } ==========================================
|
||||
|
||||
constructor TJvCustomPageListTreeView.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FLinks := TJvPageLinks.Create;
|
||||
FLinks.FTreeView := Self;
|
||||
ReadOnly := True;
|
||||
ShowLines := False;
|
||||
AutoExpand := True;
|
||||
ShowButtons := False;
|
||||
end;
|
||||
|
||||
destructor TJvCustomPageListTreeView.Destroy;
|
||||
begin
|
||||
FLinks.Free;
|
||||
FMemStream.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TJvCustomPageListTreeView.CanChange(Node: TTreeNode): Boolean;
|
||||
begin
|
||||
Result := inherited CanChange(Node);
|
||||
if Result and Assigned(Node) and Assigned(FPageList) then
|
||||
Result := FPageList.CanChange(TJvPageIndexNode(Node).PageIndex);
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListTreeView.Change(Node: TTreeNode);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
inherited Change(Node);
|
||||
if Assigned(FPageList) and Assigned(Node) then
|
||||
begin
|
||||
I := TJvPageIndexNode(Node).PageIndex;
|
||||
if (I >= 0) and (I < FPageList.GetPageCount) then
|
||||
FPageList.SetActivePageIndex(I)
|
||||
else
|
||||
if (PageDefault >= 0) and (PageDefault < FPageList.GetPageCount) then
|
||||
FPageList.SetActivePageIndex(PageDefault)
|
||||
else
|
||||
FPageList.SetActivePageIndex(-1);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TJvCustomPageListTreeView.CreateNode: TTreeNode;
|
||||
begin
|
||||
Result := TJvPageIndexNode.Create(Items);
|
||||
TJvPageIndexNode(Result).PageIndex := PageDefault;
|
||||
end;
|
||||
|
||||
function TJvCustomPageListTreeView.CreateNodes: TTreeNodes;
|
||||
begin
|
||||
if (FItems = nil) and not (csDestroying in ComponentState) then
|
||||
FItems := TJvPageIndexNodes.Create(Self);
|
||||
Result := FItems;
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListTreeView.CreateWnd;
|
||||
begin
|
||||
inherited CreateWnd;
|
||||
|
||||
if FMemStream <> nil then
|
||||
begin
|
||||
Items.BeginUpdate;
|
||||
try
|
||||
Items.ReadData(FMemStream);
|
||||
FreeAndNil(FMemStream);
|
||||
finally
|
||||
Items.EndUpdate;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListTreeView.DestroyWnd;
|
||||
begin
|
||||
(*
|
||||
if CreateWndRestores and
|
||||
{$IFDEF COMPILER10_UP}
|
||||
(csRecreating in ControlState) and
|
||||
{$ENDIF COMPILER10_UP}
|
||||
(Items.Count > 0) then
|
||||
begin
|
||||
FMemStream := TMemoryStream.Create;
|
||||
Items.WriteData(FMemStream);
|
||||
FMemStream.Position := 0;
|
||||
end;
|
||||
*)
|
||||
inherited DestroyWnd;
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListTreeView.Notification(AComponent: TComponent;
|
||||
Operation: TOperation);
|
||||
begin
|
||||
inherited Notification(AComponent, Operation);
|
||||
if (Operation = opRemove) then
|
||||
begin
|
||||
if AComponent.IsImplementorOf(PageList) then
|
||||
PageList := nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListTreeView.SetPageDefault(const Value: Integer);
|
||||
var
|
||||
N: TTreeNode;
|
||||
begin
|
||||
if FPageDefault <> Value then
|
||||
begin
|
||||
N := Items.GetFirstNode;
|
||||
while Assigned(N) do
|
||||
begin
|
||||
if TJvPageIndexNode(N).PageIndex = FPageDefault then
|
||||
TJvPageIndexNode(N).PageIndex := Value;
|
||||
N := N.GetNext;
|
||||
end;
|
||||
FPageDefault := Value;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListTreeView.SetLinks(const Value: TJvPageLinks);
|
||||
begin
|
||||
FLinks.Assign(Value);
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListTreeView.SetPageList(const Value: IPageList);
|
||||
begin
|
||||
if FPageList <> Value then
|
||||
begin
|
||||
ReferenceInterface(FPageList, opRemove);
|
||||
FPageList := Value;
|
||||
ReferenceInterface(FPageList, opInsert);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TJvCustomPageListTreeView.GetItems: TJvPageIndexNodes;
|
||||
begin
|
||||
Result := TJvPageIndexNodes(CreateNodes);
|
||||
end;
|
||||
|
||||
procedure TJvCustomPageListTreeView.SetItems(const Value: TJvPageIndexNodes);
|
||||
begin
|
||||
inherited Items := Value;
|
||||
end;
|
||||
|
||||
//=== { TJvPageIndexNode } ===================================================
|
||||
|
||||
procedure TJvPageIndexNode.Assign(Source: TPersistent);
|
||||
begin
|
||||
inherited Assign(Source);
|
||||
if Source is TJvPageIndexNode then
|
||||
PageIndex := TJvPageIndexNode(Source).PageIndex;
|
||||
end;
|
||||
|
||||
procedure TJvPageIndexNode.SetPageIndex(const Value: Integer);
|
||||
begin
|
||||
if FPageIndex <> Value then
|
||||
begin
|
||||
FPageIndex := Value;
|
||||
if (TreeView is TJvCustomSettingsTreeView) and (Parent <> nil) and
|
||||
(Parent.getFirstChild = Self) and not HasChildren then
|
||||
TJvPageIndexNode(Parent).PageIndex := Value;
|
||||
end;
|
||||
end;
|
||||
|
||||
//=== { TJvPageIndexNodes } ==================================================
|
||||
|
||||
procedure TJvPageIndexNodes.DefineProperties(Filer: TFiler);
|
||||
begin
|
||||
inherited DefineProperties(Filer);
|
||||
Filer.DefineBinaryProperty('Links', @ReadData, @WriteData, True);
|
||||
end;
|
||||
|
||||
procedure TJvPageIndexNodes.ReadData(Stream: TStream);
|
||||
var
|
||||
APageIndex, ACount: Integer;
|
||||
LNode: TTreeNode;
|
||||
LHandleAllocated: Boolean;
|
||||
begin
|
||||
LHandleAllocated := Owner.HandleAllocated;
|
||||
if LHandleAllocated then
|
||||
BeginUpdate;
|
||||
try
|
||||
Stream.Read(ACount, SizeOf(ACount));
|
||||
if ACount > 0 then
|
||||
begin
|
||||
LNode := GetFirstNode;
|
||||
while Assigned(LNode) and (ACount > 0) do
|
||||
begin
|
||||
Stream.Read(APageIndex, SizeOf(APageIndex));
|
||||
TJvPageIndexNode(LNode).PageIndex := APageIndex;
|
||||
LNode := LNode.GetNext;
|
||||
Dec(ACount);
|
||||
end;
|
||||
// read any "left-overs" (should never happen)
|
||||
while ACount > 0 do
|
||||
begin
|
||||
Stream.Read(APageIndex, SizeOf(APageIndex));
|
||||
Dec(ACount);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
if LHandleAllocated then
|
||||
EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvPageIndexNodes.WriteData(Stream: TStream);
|
||||
var
|
||||
Node: TTreeNode;
|
||||
APageIndex: Integer;
|
||||
ACount: Integer;
|
||||
begin
|
||||
ACount := Count;
|
||||
Stream.Write(ACount, SizeOf(Count));
|
||||
if ACount > 0 then
|
||||
begin
|
||||
Node := GetFirstNode;
|
||||
while (Node <> nil) do
|
||||
begin
|
||||
APageIndex := TJvPageIndexNode(Node).PageIndex;
|
||||
Stream.Write(APageIndex, SizeOf(APageIndex));
|
||||
Node := Node.GetNext;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
//=== { TJvSettingsTreeImages } ==============================================
|
||||
|
||||
constructor TJvSettingsTreeImages.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
FCollapsedIndex := 0;
|
||||
FExpandedIndex := 1;
|
||||
FSelectedIndex := 2;
|
||||
FImageIndex := -1;
|
||||
end;
|
||||
|
||||
//=== { TJvCustomSettingsTreeView } ==========================================
|
||||
|
||||
constructor TJvCustomSettingsTreeView.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FNodeImages := TJvSettingsTreeImages.Create;
|
||||
FNodeImages.TreeView := Self;
|
||||
AutoExpand := True;
|
||||
ShowButtons := False;
|
||||
ReadOnly := True;
|
||||
ShowLines := False;
|
||||
// we need to assign to these since the TTreeView checks if they are assigned
|
||||
// and won't call GetImageIndex without them
|
||||
inherited OnGetImageIndex := @DoGetImageIndex;
|
||||
inherited OnGetSelectedIndex := @DoGetSelectedIndex;
|
||||
end;
|
||||
|
||||
destructor TJvCustomSettingsTreeView.Destroy;
|
||||
begin
|
||||
FNodeImages.TreeView := nil;
|
||||
FNodeImages.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TJvCustomSettingsTreeView.CanChange(Node: TTreeNode): Boolean;
|
||||
begin
|
||||
Result := inherited CanChange(Node);
|
||||
if Result and (Selected <> nil) and not Selected.HasChildren then // Selected is the previous selected node
|
||||
begin
|
||||
Selected.ImageIndex := FNodeImages.ImageIndex;
|
||||
Selected.SelectedIndex := FNodeImages.ImageIndex;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvCustomSettingsTreeView.Change(Node: TTreeNode);
|
||||
begin
|
||||
inherited Change(Node);
|
||||
if not AutoExpand and Node.Expanded then
|
||||
Node.Expand(False); // refresh node and children
|
||||
end;
|
||||
|
||||
procedure TJvCustomSettingsTreeView.Collapse(Node: TTreeNode);
|
||||
begin
|
||||
inherited Collapse(Node);
|
||||
if Node.HasChildren then
|
||||
begin
|
||||
Node.ImageIndex := FNodeImages.CollapsedIndex;
|
||||
Node.SelectedIndex := FNodeImages.CollapsedIndex;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvCustomSettingsTreeView.Delete(Node: TTreeNode);
|
||||
begin
|
||||
inherited Delete(Node);
|
||||
if Node = FLastSelected then
|
||||
FLastSelected := nil;
|
||||
end;
|
||||
|
||||
procedure TJvCustomSettingsTreeView.DoGetImageIndex(Sender: TObject;
|
||||
Node: TTreeNode);
|
||||
begin
|
||||
if Assigned(FOnGetImageIndex) then
|
||||
FOnGetImageIndex(Sender, Node)
|
||||
else
|
||||
GetImageIndex(Node);
|
||||
end;
|
||||
|
||||
procedure TJvCustomSettingsTreeView.DoGetSelectedIndex(Sender: TObject;
|
||||
Node: TTreeNode);
|
||||
begin
|
||||
if Assigned(FOnGetSelectedIndex) then
|
||||
FOnGetSelectedIndex(Sender, Node)
|
||||
else
|
||||
GetSelectedIndex(Node);
|
||||
end;
|
||||
|
||||
procedure TJvCustomSettingsTreeView.Expand(Node: TTreeNode);
|
||||
var
|
||||
N: TTreeNode;
|
||||
R: TRect;
|
||||
begin
|
||||
if Node.HasChildren then
|
||||
begin
|
||||
if AutoExpand then
|
||||
ResetSiblingFolders(Node, FNodeImages.CollapsedIndex, FNodeImages.CollapsedIndex, True);
|
||||
Node.ImageIndex := FNodeImages.ExpandedIndex;
|
||||
Node.SelectedIndex := FNodeImages.ExpandedIndex;
|
||||
N := Node.getFirstChild;
|
||||
if (N <> nil) and not N.HasChildren then
|
||||
begin
|
||||
ResetPreviousNode(N);
|
||||
N.ImageIndex := FNodeImages.SelectedIndex;
|
||||
N.SelectedIndex := FNodeImages.SelectedIndex;
|
||||
R := N.DisplayRect(False);
|
||||
InvalidateRect(Handle, @R, True);
|
||||
SetPreviousNode(N);
|
||||
end;
|
||||
end;
|
||||
inherited Expand(Node);
|
||||
end;
|
||||
|
||||
|
||||
procedure TJvCustomSettingsTreeView.GetImageIndex(Node: TTreeNode);
|
||||
begin
|
||||
if Node.HasChildren then
|
||||
begin
|
||||
if Node.Expanded then
|
||||
Node.ImageIndex := FNodeImages.ExpandedIndex
|
||||
else
|
||||
Node.ImageIndex := FNodeImages.CollapsedIndex;
|
||||
end
|
||||
else
|
||||
if Node.Selected or
|
||||
((Node.Parent <> nil) and Node.Parent.Selected and
|
||||
(Node.Parent.getFirstChild = Node)) then
|
||||
begin
|
||||
ResetPreviousNode(Node);
|
||||
Node.ImageIndex := FNodeImages.SelectedIndex;
|
||||
SetPreviousNode(Node);
|
||||
end
|
||||
else
|
||||
Node.ImageIndex := FNodeImages.ImageIndex;
|
||||
Node.SelectedIndex := Node.ImageIndex;
|
||||
end;
|
||||
|
||||
procedure TJvCustomSettingsTreeView.GetSelectedIndex(Node: TTreeNode);
|
||||
begin
|
||||
GetImageIndex(Node);
|
||||
end;
|
||||
|
||||
procedure TJvCustomSettingsTreeView.Loaded;
|
||||
begin
|
||||
inherited Loaded;
|
||||
if Items.Count > 0 then
|
||||
begin
|
||||
ResetSiblingFolders(Items[0], FNodeImages.CollapsedIndex, FNodeImages.CollapsedIndex, True);
|
||||
Items[0].MakeVisible;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvCustomSettingsTreeView.ResetPreviousNode(NewNode: TTreeNode);
|
||||
var
|
||||
R: TRect;
|
||||
begin
|
||||
if (FLastSelected <> nil) and (FLastSelected <> NewNode) and
|
||||
(NewNode <> nil) and not NewNode.HasChildren then
|
||||
begin
|
||||
FLastSelected.ImageIndex := FNodeImages.ImageIndex;
|
||||
FLastSelected.SelectedIndex := FNodeImages.ImageIndex;
|
||||
R := FLastSelected.DisplayRect(False);
|
||||
InvalidateRect(Handle, @R, True);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvCustomSettingsTreeView.SetImageSelection(const Value: TJvSettingsTreeImages);
|
||||
begin
|
||||
// FNodeImages := Value;
|
||||
end;
|
||||
|
||||
procedure TJvCustomSettingsTreeView.SetPreviousNode(NewNode: TTreeNode);
|
||||
begin
|
||||
FLastSelected := NewNode;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
Reference in New Issue
Block a user