1 Star 0 Fork 0

yoyojacky/CSMoE

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ExpandButton.h 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
//===== Copyright ?1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose: A button with no borders that shows a left-pointing or down-pointing triangle
//
// $NoKeywords: $
//===========================================================================//
#ifndef EXPANDBUTTON_H
#define EXPANDBUTTON_H
#ifdef _WIN32
#pragma once
#endif
#include <vgui/VGUI2.h>
#include "ToggleButton.h"
namespace vgui2
{
//-----------------------------------------------------------------------------
// Purpose: A button with no borders that shows a left-pointing or down-pointing arrow
//-----------------------------------------------------------------------------
class ExpandButton : public ToggleButton
{
DECLARE_CLASS_SIMPLE( ExpandButton, ToggleButton );
public:
ExpandButton( Panel *parent, const char *panelName );
~ExpandButton();
// Expand the button (selected == expanded)
virtual void SetSelected( bool bExpand );
// sets whether or not the state of the check can be changed
// if this is set to false, then no input in the code or by the user can change it's state
void SetExpandable(bool state);
virtual void Paint();
protected:
virtual void ApplySchemeSettings(IScheme *pScheme);
MESSAGE_FUNC_PTR( OnExpanded, "Expanded", panel );
virtual IBorder *GetBorder(bool depressed, bool armed, bool selected, bool keyfocus);
/* MESSAGES SENT
"Expanded" - sent when the expand button state is changed
"state" - button state: 1 is expanded, 0 is unexpanded
*/
private:
bool m_bExpandable;
HFont m_hFont;
Color m_Color;
};
} // namespace vgui
#endif // EXPANDBUTTON_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yoyojacky/CSMoE.git
git@gitee.com:yoyojacky/CSMoE.git
yoyojacky
CSMoE
CSMoE
master

搜索帮助