| | |
| | | #define HMGRAPH_HT_NOWHERE 0x1 |
| | | #define HMGRAPH_HT_ITEM 0x2 |
| | | |
| | | enum class SlotBarPos { |
| | | None = 0, |
| | | Top, |
| | | Bottom |
| | | }; |
| | | |
| | | class CServoGraph |
| | | { |
| | |
| | | this->box2FrameColor = RGB(255, 255, 0);; |
| | | this->bBox2Visible = FALSE; |
| | | this->m_pData = nullptr; |
| | | this->slotBarPos = SlotBarPos::None; |
| | | }; |
| | | ~INDICATEBOX() {}; |
| | | |
| | |
| | | BOOL bBox2Visible; |
| | | std::vector<void*> m_contexts; |
| | | void* m_pData; |
| | | SlotBarPos slotBarPos; |
| | | std::vector<COLORREF> slotColors; |
| | | }; |
| | | |
| | | class INDICATEBKGND |
| | |
| | | LRESULT OnTimer(WPARAM wParam, LPARAM lParam); |
| | | LRESULT OnPaint(WPARAM wParam, LPARAM lParam); |
| | | LRESULT OnMouseMove(WPARAM wParam, LPARAM lParam); |
| | | LRESULT OnSize(WPARAM wParam, LPARAM lParam); |
| | | LRESULT OnLButtonDown(WPARAM wParam, LPARAM lParam); |
| | | |
| | | public: |
| | | void Invalidata(); |
| | | void AddImage(int id, char* pszPath, int x, int y); |
| | | void AddIndicateBox(int id, int x, int y, int width); |
| | | void AddIndicateBox(int id, int x, int y, int width, |
| | |
| | | void UpdateImageAngle(int id, float angle); |
| | | void UpdateIndicateBox1Colors(int id, COLORREF newBackgroundColor, COLORREF newFrameColor1, COLORREF newFrameColor2); |
| | | void UpdateIndicateBox2Colors(int id, COLORREF newBackgroundColor, COLORREF newFrameColor); |
| | | void SetIndicateBoxSlotBarPosition(int id, SlotBarPos pos); |
| | | void SetIndicateBoxSlotColors(int id, const std::vector<COLORREF>& colors); |
| | | void SetSlotBarSize(int size); |
| | | |
| | | private: |
| | | void DrawImage(HDC hMemDC, IMAGE& item); |
| | |
| | | std::vector<INDICATEBKGND> m_indicateBkgnds; |
| | | void* m_pHighItem; |
| | | HWND m_hWndTooltip; |
| | | int m_slotBarSize; |
| | | }; |
| | | |
| | | #endif // !defined(AFX_EQUIPMENTGRAPH_H__FBB8916A_DE77_4EA3_9C21_E51E6B06194C__INCLUDED_) |