mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 19:20:17 +08:00
Issue #1482: activate events on treeHelpers, SynCompletionProposal and SynMemoQuery
This commit is contained in:
@ -396,9 +396,9 @@ type
|
||||
procedure InvalidateVT(VT: TLazVirtualStringTree; RefreshTag: Integer; ImmediateRepaint: Boolean);
|
||||
function CharAtPos(Str: String; Pos: Integer): Char;
|
||||
function CompareAnyNode(Text1, Text2: String): Integer;
|
||||
//function StringListCompareAnythingAsc(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
//function StringListCompareAnythingDesc(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
//function StringListCompareByValue(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
function StringListCompareAnythingAsc(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
function StringListCompareAnythingDesc(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
function StringListCompareByValue(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
function StringListCompareByLength(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
//function GetImageLinkTimeStamp(const FileName: string): TDateTime;
|
||||
function IsEmpty(Str: String): Boolean;
|
||||
@ -427,7 +427,7 @@ type
|
||||
//function ThemeIsDark(ThemeName: String=''): Boolean;
|
||||
//function ProcessExists(pid: Cardinal; ExeNamePattern: String): Boolean;
|
||||
//procedure ToggleCheckBoxWithoutClick(chk: TCheckBox; State: Boolean);
|
||||
//function SynCompletionProposalPrettyText(ImageIndex: Integer; LeftText, CenterText, RightText: String; LeftColor: TColor=-1; CenterColor: TColor=-1; RightColor: TColor=-1): String;
|
||||
function SynCompletionProposalPrettyText(ImageIndex: Integer; LeftText, CenterText, RightText: String; LeftColor: TColor=-1; CenterColor: TColor=-1; RightColor: TColor=-1): String;
|
||||
function PopupComponent(Sender: TObject): TComponent;
|
||||
function IsWine: Boolean;
|
||||
function DirSep: Char;
|
||||
@ -2171,25 +2171,25 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{function StringListCompareAnythingAsc(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
function StringListCompareAnythingAsc(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
begin
|
||||
// Sort TStringList items, containing numbers or strings, ascending
|
||||
Result := CompareAnyNode(List[Index1], List[Index2]);
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{function StringListCompareAnythingDesc(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
function StringListCompareAnythingDesc(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
begin
|
||||
// Sort TStringList items, containing numbers or strings, descending
|
||||
Result := CompareAnyNode(List[Index2], List[Index1]);
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{function StringListCompareByValue(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
function StringListCompareByValue(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
begin
|
||||
// Sort TStringList items which are stored as name=value pairs
|
||||
Result := CompareAnyNode(List.ValueFromIndex[Index2], List.ValueFromIndex[Index1]);
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
function StringListCompareByLength(List: TStringList; Index1, Index2: Integer): Integer;
|
||||
@ -2878,17 +2878,17 @@ begin
|
||||
end;}
|
||||
|
||||
|
||||
{function SynCompletionProposalPrettyText(ImageIndex: Integer; LeftText, CenterText, RightText: String;
|
||||
function SynCompletionProposalPrettyText(ImageIndex: Integer; LeftText, CenterText, RightText: String;
|
||||
LeftColor: TColor=-1; CenterColor: TColor=-1; RightColor: TColor=-1): String;
|
||||
const}
|
||||
// LineFormat = '\image{%d}\hspace{5}\color{%s}%s\column{}\color{%s}%s\hspace{10}\color{%s}\style{+i}%s';
|
||||
{begin
|
||||
const
|
||||
LineFormat = '\image{%d}\hspace{5}\color{%s}%s\column{}\color{%s}%s\hspace{10}\color{%s}\style{+i}%s';
|
||||
begin
|
||||
// Return formatted item string for a TSynCompletionProposal
|
||||
if LeftColor = -1 then LeftColor := clGrayText;
|
||||
if CenterColor = -1 then CenterColor := clWindowText;
|
||||
if RightColor = -1 then RightColor := clGrayText;
|
||||
Result := Format(LineFormat, [ImageIndex, ColorToString(LeftColor), LeftText, ColorToString(CenterColor), CenterText, ColorToString(RightColor), RightText]);
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
function PopupComponent(Sender: TObject): TComponent;
|
||||
|
@ -717,6 +717,7 @@ object MainForm: TMainForm
|
||||
MouseLinkColor.Foreground = clBlue
|
||||
LineHighlightColor.Background = clNone
|
||||
LineHighlightColor.Foreground = clNone
|
||||
OnSpecialLineColors = SynMemoSQLLogSpecialLineColors
|
||||
inline SynLeftGutterPartList1: TSynGutterPartList
|
||||
end
|
||||
end
|
||||
@ -972,11 +973,11 @@ object MainForm: TMainForm
|
||||
Height = 316
|
||||
Top = 0
|
||||
Width = 780
|
||||
ActivePage = tabData
|
||||
ActivePage = tabQuery
|
||||
Align = alClient
|
||||
Images = ImageListIcons8
|
||||
PopupMenu = popupMainTabs
|
||||
TabIndex = 3
|
||||
TabIndex = 4
|
||||
TabOrder = 1
|
||||
OnChange = PageControlMainChange
|
||||
OnChanging = PageControlMainChanging
|
||||
@ -2774,11 +2775,43 @@ object MainForm: TMainForm
|
||||
Align = alClient
|
||||
DefaultText = 'Node'
|
||||
Header.AutoSizeIndex = 0
|
||||
Header.Columns = <>
|
||||
Header.MainColumn = -1
|
||||
Header.Columns = <
|
||||
item
|
||||
Position = 0
|
||||
Text = 'Main column'
|
||||
Width = 88
|
||||
end
|
||||
item
|
||||
Position = 1
|
||||
Text = 'Attributes'
|
||||
Width = 100
|
||||
end>
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoShowSortGlyphs]
|
||||
Images = ImageListIcons8
|
||||
IncrementalSearch = isVisibleOnly
|
||||
PopupMenu = popupQueryHelpers
|
||||
RootNodeCount = 6
|
||||
TabOrder = 1
|
||||
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScrollOnExpand, toAutoSort, toAutoSpanColumns, toAutoTristateTracking, toAutoDeleteMovedNodes, toAutoChangeScale]
|
||||
TreeOptions.MiscOptions = [toAcceptOLEDrop, toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toVariableNodeHeight, toEditOnClick]
|
||||
TreeOptions.PaintOptions = [toHotTrack, toShowButtons, toShowDropmark, toShowRoot, toShowTreeLines, toThemeAware, toUseBlendedImages, toUseExplorerTheme, toHideTreeLinesIfThemed]
|
||||
TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect, toMultiSelect, toRightClickSelect]
|
||||
OnBeforeCellPaint = treeQueryHelpersBeforeCellPaint
|
||||
OnChecking = treeQueryHelpersChecking
|
||||
OnContextPopup = treeQueryHelpersContextPopup
|
||||
OnCreateEditor = treeQueryHelpersCreateEditor
|
||||
OnDblClick = treeQueryHelpersDblClick
|
||||
OnEditing = treeQueryHelpersEditing
|
||||
OnFocusChanging = treeQueryHelpersFocusChanging
|
||||
OnFreeNode = treeQueryHelpersFreeNode
|
||||
OnGetText = treeQueryHelpersGetText
|
||||
OnPaintText = treeQueryHelpersPaintText
|
||||
OnGetImageIndex = treeQueryHelpersGetImageIndex
|
||||
OnInitChildren = treeQueryHelpersInitChildren
|
||||
OnInitNode = treeQueryHelpersInitNode
|
||||
OnNewText = treeQueryHelpersNewText
|
||||
OnNodeClick = treeQueryHelpersNodeClick
|
||||
OnResize = treeQueryHelpersResize
|
||||
end
|
||||
end
|
||||
object spltQueryHelpers: TSplitter
|
||||
@ -2803,6 +2836,9 @@ object MainForm: TMainForm
|
||||
ParentFont = False
|
||||
PopupMenu = popupQuery
|
||||
TabOrder = 2
|
||||
OnDragDrop = SynMemoQueryDragDrop
|
||||
OnDragOver = SynMemoQueryDragOver
|
||||
OnMouseWheel = AnySynMemoMouseWheel
|
||||
Gutter.Width = 0
|
||||
Gutter.MouseActions = <>
|
||||
RightGutter.Width = 0
|
||||
@ -3254,6 +3290,8 @@ object MainForm: TMainForm
|
||||
MouseLinkColor.Foreground = clBlue
|
||||
LineHighlightColor.Background = clNone
|
||||
LineHighlightColor.Foreground = clNone
|
||||
OnDropFiles = SynMemoQueryDropFiles
|
||||
OnSpecialLineColors = SynMemoQuerySpecialLineColors
|
||||
inline SynLeftGutterPartList1: TSynGutterPartList
|
||||
end
|
||||
end
|
||||
@ -19895,15 +19933,19 @@ object MainForm: TMainForm
|
||||
Top = 120
|
||||
end
|
||||
object SynCompletionProposal: TSynCompletion
|
||||
Position = 0
|
||||
OnExecute = SynCompletionProposalExecute
|
||||
Position = -1
|
||||
LinesInWindow = 6
|
||||
OnPositionChanged = SynCompletionProposalChange
|
||||
SelectedColor = clHighlight
|
||||
CaseSensitive = False
|
||||
Width = 262
|
||||
AutoUseSingleIdent = True
|
||||
ShortCut = 16416
|
||||
EndOfTokenChr = '()[].'
|
||||
OnCodeCompletion = SynCompletionProposalCodeCompletion
|
||||
ExecCommandID = ecSynCompletionExecute
|
||||
Editor = SynMemoQuery
|
||||
ToggleReplaceWhole = False
|
||||
Left = 56
|
||||
Top = 120
|
||||
|
511
source/main.pas
511
source/main.pas
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user