diff options
Diffstat (limited to 'tools/vcdblock/infotargetpropertiespanel.h')
| -rw-r--r-- | tools/vcdblock/infotargetpropertiespanel.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/tools/vcdblock/infotargetpropertiespanel.h b/tools/vcdblock/infotargetpropertiespanel.h new file mode 100644 index 0000000..b43b62b --- /dev/null +++ b/tools/vcdblock/infotargetpropertiespanel.h @@ -0,0 +1,76 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//===========================================================================// + +#ifndef INFOTARGETPROPERTIESPANEL_H +#define INFOTARGETPROPERTIESPANEL_H +#ifdef _WIN32 +#pragma once +#endif + +#include "vgui_controls/editablepanel.h" +#include "tier1/utlstring.h" +#include "datamodel/dmehandle.h" + + +//----------------------------------------------------------------------------- +// Forward declarations +//----------------------------------------------------------------------------- +class CVcdBlockDoc; +class CDmeVMFEntity; +class CScrollableEditablePanel; + +namespace vgui +{ + class ComboBox; + class Button; + class TextEntry; + class ListPanel; + class CheckButton; + class RadioButton; +} + + +//----------------------------------------------------------------------------- +// Panel that shows all entities in the level +//----------------------------------------------------------------------------- +class CInfoTargetPropertiesPanel : public vgui::EditablePanel +{ + DECLARE_CLASS_SIMPLE( CInfoTargetPropertiesPanel, vgui::EditablePanel ); + +public: + CInfoTargetPropertiesPanel( CVcdBlockDoc *pDoc, vgui::Panel* pParent ); // standard constructor + + // Sets the object to look at + void SetObject( CDmeVMFEntity *pEntity ); + +private: + // Populates the info_target fields + void PopulateInfoTargetFields(); + + // Text to attribute... + void TextEntryToAttribute( vgui::TextEntry *pEntry, const char *pAttributeName ); + void TextEntriesToVector( vgui::TextEntry *pEntry[3], const char *pAttributeName ); + + // Updates entity state when text fields change + void UpdateInfoTarget(); + + // Messages handled + MESSAGE_FUNC_PARAMS( OnTextChanged, "TextChanged", kv ); + + CVcdBlockDoc *m_pDoc; + + vgui::EditablePanel *m_pInfoTargetScroll; + vgui::EditablePanel *m_pInfoTarget; + + vgui::TextEntry *m_pTargetName; + vgui::TextEntry *m_pTargetPosition[3]; + vgui::TextEntry *m_pTargetOrientation[3]; + + CDmeHandle< CDmeVMFEntity > m_hEntity; +}; + + +#endif // INFOTARGETPROPERTIESPANEL_H |