From a79fcf6a937e1bfe57014d2c99f1bb9f98bfa892 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期二, 10 二月 2026 10:20:17 +0800
Subject: [PATCH] 1.完善日志; 2.背景图表配置 3.更改EAP通讯端口和设备名;
---
SourceCode/Bond/Servo/EqsGraphWnd.h | 44 +++++++++++++++++++++++++++++++++-----------
1 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/SourceCode/Bond/Servo/EqsGraphWnd.h b/SourceCode/Bond/Servo/EqsGraphWnd.h
index c54d768..d39e88c 100644
--- a/SourceCode/Bond/Servo/EqsGraphWnd.h
+++ b/SourceCode/Bond/Servo/EqsGraphWnd.h
@@ -1,5 +1,6 @@
-#pragma once
+锘�#pragma once
#include <functional>
+#include <vector>
#ifndef EQSGRAPHWND_TAG
@@ -35,6 +36,16 @@
#define MAX(X,Y) (((X)>(Y))?(X):(Y))
#endif
+#define EQITEM_INDICATOR_COUNT 8
+
+
+enum EIndicatorState
+{
+ INDICATOR_STATE_HIDDEN = 0,
+ INDICATOR_STATE_HIGHLIGHT = 1,
+ INDICATOR_STATE_GRAY = 2,
+};
+
typedef struct tagEQSGRAPHWND_NMHDR
{
NMHDR nmhdr;
@@ -54,7 +65,7 @@
DWORD_PTR pInPins;
DWORD_PTR pOutPins;
int nFlashFlag;
- BOOL bShowIndicator[2];
+ BYTE nIndicatorState[EQITEM_INDICATOR_COUNT]; // 0=闅愯棌, 1=楂樹寒, 2=鐏拌壊
} EQITEM;
typedef struct tagPIN
@@ -144,7 +155,10 @@
void SetItemPos(EQITEM* pItem, int x, int y);
void FlashItem(EQITEM* pItem);
void AnimationItem(EQITEM*pItem);
- void ShowItemIndicator(DWORD_PTR dwItemData, BOOL bShow);
+ void ShowItemIndicator(DWORD_PTR dwItemData, int state, int nIndex = 0);
+ void SetIndicatorSize(int nSize);
+ void SetIndicatorMargin(int nMargin);
+ void SetManualRoute(PIN* pOutPin, PIN* pInPin, BOOL bUp);
private:
void Init();
@@ -187,12 +201,17 @@
LRESULT OnNitify(WPARAM wParam, LPARAM lParam);
private:
+ struct LineSeg {
+ POINT a;
+ POINT b;
+ };
+
EQITEM* m_pCurItem;
int m_nFlashCount;
EQITEM* m_pFlashItem;
EQITEM* m_pAnimationItem;
PIN * m_pCurPin;
- PIN * m_pSelLineOutPin; // 选中的连线的两个pin中的out pin
+ PIN * m_pSelLineOutPin; // 閫変腑鐨勮繛绾跨殑涓や釜pin涓殑out pin
private:
HWND m_hWnd;
@@ -201,12 +220,12 @@
HFONT m_hFontTitle;
private:
- BOOL m_bUseGdiPlus; // 使用GDI+绘图?
- COLORREF m_crItemBackground[2]; // item的颜色,normal, active
- COLORREF m_crItemFrame[2]; // item的边框,normal, active
+ BOOL m_bUseGdiPlus; // 浣跨敤GDI+缁樺浘锛�
+ COLORREF m_crItemBackground[2]; // item鐨勯鑹诧紝normal锛� active
+ COLORREF m_crItemFrame[2]; // item鐨勮竟妗嗭紝normal锛� active
COLORREF m_crItemNameText[2];
COLORREF m_crItemIdText[2];
- COLORREF m_crPinBkgnd[3]; // pin的颜色,normal, active, enable connect
+ COLORREF m_crPinBkgnd[3]; // pin鐨勯鑹诧紝normal, active, enable connect
int m_nCurSel;
EqsGraphListener m_listener;
CPtrArray m_arItem;
@@ -214,18 +233,20 @@
int m_nItemRound;
private:
- int m_nStageCx; // 画布大小
+ int m_nStageCx; // 鐢诲竷澶у皬
int m_nStageCy;
int m_nOffsetX;
int m_nOffsetY;
+ int m_nIndicatorSize;
+ int m_nIndicatorMargin;
- // 动画
+ // 鍔ㄧ敾
RECTF m_rcAnimation;
RECTF m_rcAninationStep;
int m_nAninationStep;
int m_nAninationDuration; // ms
- // 字体
+ // 瀛椾綋
HFONT m_hFontName;
HFONT m_hFontId;
@@ -234,5 +255,6 @@
BOOL m_bEnableScroll;
int m_nMagneticLinHoz;
int m_nMagneticLinVer;
+ std::vector<LineSeg> m_verticalSegments;
};
--
Gitblit v1.9.3