diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /hammer/op_input.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/op_input.h')
| -rw-r--r-- | hammer/op_input.h | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/hammer/op_input.h b/hammer/op_input.h new file mode 100644 index 0000000..cf82e13 --- /dev/null +++ b/hammer/op_input.h @@ -0,0 +1,104 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef OP_INPUT_H +#define OP_INPUT_H +#pragma once + +#include "ObjectPage.h" +#include "Resource.h" +#include "MapEntity.h" +#include "AnchorMgr.h" + +#define OUTPUT_LIST_NUM_COLUMNS 6 + + +enum SortDirection_t; + +// A list of connections and entites that send them +class CInputConnection +{ +public: + CMapEntity* m_pEntity; + CEntityConnection* m_pConnection; + bool m_bIsValid; +}; + + +// ############################################################################# +class COP_Input : public CObjectPage +{ + public: + static CImageList *m_pImageList; + + public: + + DECLARE_DYNCREATE(COP_Input) + + // Construction + COP_Input(void); + ~COP_Input(void); + + void UpdateData( int Mode, PVOID pData, bool bCanEdit ); + void SetSelectedConnection(CEntityConnection *pConnection); + + protected: + + void AddEntityConnections(const char *pTargetName, CMapEntity *pTestEntity); + void UpdateConnectionList(void); + void UpdateEntityList(void); + void RemoveAllEntityConnections(void); + + void SortListByColumn(int nColumn, SortDirection_t eDirection); + void SetSortColumn(int nColumn, SortDirection_t eDirection); + void UpdateColumnHeaderText(int nColumn, bool bIsSortColumn, SortDirection_t eDirection); + + // Connection validity + void UpdateItemValidity(int nItem); + bool ValidateConnections(int nItem); + + + protected: + + CAnchorMgr m_AnchorMgr; + + CMapEntityList *m_pEntityList; // Object list filtered for entities + CEditGameClass *m_pEditGameClass; + CMapEntity *m_pEntity; + + CMapEntityList *m_pTargetEntityList; // List of entites that target me + CEntityConnectionList *m_pConnectionList; // List of all the connections that target me + bool m_bMultipleTargetNames; // Entities with multiple target names selected + // + // Cached data for sorting the list view. + // + int m_nSortColumn; // Current column used for sorting. + SortDirection_t m_eSortDirection[OUTPUT_LIST_NUM_COLUMNS]; // Last sort direction per column. + + //{{AFX_DATA(COP_Input) + enum { IDD = IDD_OBJPAGE_INPUT }; + CListCtrl m_ListCtrl; + //}}AFX_DATA + + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(COP_Input) + virtual void DoDataExchange(CDataExchange* pDX); + virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT *pResult); + //}}AFX_VIRTUAL + + // Generated message map functions + //{{AFX_MSG(COP_Input) + afx_msg void OnMark(void); + afx_msg void OnSize( UINT nType, int cx, int cy ); + virtual BOOL OnInitDialog(void); + virtual void OnDestroy(void); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +#endif // OP_INPUT_H |