diff --git a/applications/fpvviewer/fpvv_drawer.pas b/applications/fpvviewer/fpvv_drawer.pas index c70c6ac0a..fa054545e 100644 --- a/applications/fpvviewer/fpvv_drawer.pas +++ b/applications/fpvviewer/fpvv_drawer.pas @@ -29,6 +29,22 @@ type procedure HandleMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Clear; + public + property OnDblClick; + property OnTripleClick; + property OnQuadClick; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnMouseEnter; + property OnMouseLeave; + property OnMouseWheel; + property OnMouseWheelDown; + property OnMouseWheelUp; end; implementation diff --git a/applications/fpvviewer/fpvv_mainform.lfm b/applications/fpvviewer/fpvv_mainform.lfm index 06aabe6cb..951fbd85d 100644 --- a/applications/fpvviewer/fpvv_mainform.lfm +++ b/applications/fpvviewer/fpvv_mainform.lfm @@ -14,7 +14,7 @@ object frmFPVViewer: TfrmFPVViewer Height = 424 Top = 176 Width = 485 - PageIndex = 0 + PageIndex = 1 Align = alClient Anchors = [akLeft, akBottom] TabOrder = 0 @@ -26,7 +26,7 @@ object frmFPVViewer: TfrmFPVViewer AnchorSideTop.Control = btnSearchInTokens AnchorSideTop.Side = asrBottom Left = 0 - Height = 378 + Height = 392 Top = 32 Width = 485 Align = alBottom @@ -65,7 +65,7 @@ object frmFPVViewer: TfrmFPVViewer TabOrder = 1 object editFileName: TFileNameEdit Left = 8 - Height = 22 + Height = 23 Top = 8 Width = 304 DialogOptions = [] @@ -87,7 +87,7 @@ object frmFPVViewer: TfrmFPVViewer end object spinScale: TFloatSpinEdit Left = 72 - Height = 16 + Height = 23 Top = 97 Width = 168 DecimalPlaces = 6 @@ -100,9 +100,9 @@ object frmFPVViewer: TfrmFPVViewer end object Label1: TLabel Left = 8 - Height = 16 + Height = 15 Top = 97 - Width = 55 + Width = 46 Caption = 'Scale by:' ParentColor = False end @@ -144,15 +144,15 @@ object frmFPVViewer: TfrmFPVViewer end object Label2: TLabel Left = 8 - Height = 16 + Height = 15 Top = 72 - Width = 88 + Width = 73 Caption = 'Y adjustment:' ParentColor = False end object spinAdjustY: TSpinEdit Left = 80 - Height = 16 + Height = 23 Top = 72 Width = 72 Increment = 100 @@ -162,7 +162,7 @@ object frmFPVViewer: TfrmFPVViewer end object spinAdjustX: TSpinEdit Left = 232 - Height = 16 + Height = 23 Top = 72 Width = 72 Increment = 50 @@ -172,9 +172,9 @@ object frmFPVViewer: TfrmFPVViewer end object Label3: TLabel Left = 160 - Height = 16 + Height = 15 Top = 72 - Width = 88 + Width = 73 Caption = 'X adjustment:' ParentColor = False end @@ -189,18 +189,18 @@ object frmFPVViewer: TfrmFPVViewer end object Label4: TLabel Left = 9 - Height = 16 + Height = 15 Top = 126 - Width = 153 + Width = 128 Caption = 'Force encoding on read:' ParentColor = False end object comboEncoding: TComboBox Left = 144 - Height = 20 + Height = 23 Top = 126 Width = 128 - ItemHeight = 0 + ItemHeight = 15 ItemIndex = 0 Items.Strings = ( 'Read from the file' @@ -236,17 +236,17 @@ object frmFPVViewer: TfrmFPVViewer end object labelFileEncoding: TLabel Left = 278 - Height = 16 + Height = 15 Top = 130 - Width = 88 + Width = 74 Caption = 'File encoding:' ParentColor = False end object checkForceWhiteBackground: TCheckBox Left = 9 - Height = 18 + Height = 19 Top = 152 - Width = 178 + Width = 153 Caption = 'Force white background?' TabOrder = 11 end diff --git a/applications/fpvviewer/fpvv_mainform.pas b/applications/fpvviewer/fpvv_mainform.pas index 64407d4cb..f0e3f3e90 100644 --- a/applications/fpvviewer/fpvv_mainform.pas +++ b/applications/fpvviewer/fpvv_mainform.pas @@ -51,6 +51,8 @@ type private procedure MyContourLineDrawingProc(z,x1,y1,x2,y2: Double); function FPVDebugAddItemProc(AStr: string; AParent: Pointer): Pointer; + procedure HandleDrawerMouseWheel(Sender: TObject; Shift: TShiftState; + WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); public { public declarations } Drawer: TFPVVDrawer; @@ -357,6 +359,7 @@ begin Drawer.Left := 5; Drawer.AnchorClient(5); Drawer.TabStop := True; + Drawer.OnMouseWheel := @HandleDrawerMouseWheel; end; procedure TfrmFPVViewer.FormDestroy(Sender: TObject); @@ -390,5 +393,17 @@ begin Result := lTreeItem; end; +procedure TfrmFPVViewer.HandleDrawerMouseWheel(Sender: TObject; + Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; + var Handled: Boolean); +begin + if WheelDelta > 0 then + spinScale.Value := spinScale.Value + spinScale.Increment + else + spinScale.Value := spinScale.Value - spinScale.Increment; + + btnVisualize.Click(); +end; + end.