forked from hitmen047/Source-PlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenuBar.h
54 lines (41 loc) · 1.27 KB
/
MenuBar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef MENUBAR_H
#define MENUBAR_H
#ifdef _WIN32
#pragma once
#endif
#include <vgui_controls/Panel.h>
#include <utlvector.h>
namespace vgui
{
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
class MenuBar : public Panel
{
DECLARE_CLASS_SIMPLE( MenuBar, Panel );
public:
MenuBar(Panel *parent, const char *panelName);
~MenuBar();
virtual void AddButton(MenuButton *button); // add button to end of menu list
virtual void AddMenu( const char *pButtonName, Menu *pMenu );
virtual void GetContentSize( int& w, int&h );
protected:
virtual void OnKeyCodeTyped(KeyCode code);
virtual void OnKeyTyped(wchar_t unichar);
virtual void ApplySchemeSettings(IScheme *pScheme);
virtual void PerformLayout();
virtual void Paint();
MESSAGE_FUNC( OnMenuClose, "MenuClose" );
MESSAGE_FUNC_INT( OnCursorEnteredMenuButton, "CursorEnteredMenuButton", VPanel);
private:
CUtlVector<MenuButton *> m_pMenuButtons;
int m_nRightEdge;
};
} // namespace vgui
#endif // MENUBAR_H