1
0
forked from 0ad/0ad
0ad/source/gui/CGUIButtonBehavior.h
janwas 5cc814759f Initial revision
This was SVN commit r9.
2003-11-03 16:22:45 +00:00

59 lines
1.5 KiB
C++
Executable File

/*
GUI Object - Button
by Gustav Larsson
gee@pyro.nu
--Overview--
Interface class that enhance the CGUIObject with
buttony behavior (click and release to click a button),
and the GUI message GUIM_PRESSED.
When creating a class with extended settings and
buttony behavior, just do a multiple inheritance.
--More info--
Check GUI.h
*/
#ifndef CGUIButtonBehavior_H
#define CGUIButtonBehavior_H
//--------------------------------------------------------
// Includes / Compiler directives
//--------------------------------------------------------
#include "GUI.h"
//--------------------------------------------------------
// Macros
//--------------------------------------------------------
//--------------------------------------------------------
// Types
//--------------------------------------------------------
//--------------------------------------------------------
// Declarations
//--------------------------------------------------------
// Abstract Data Type
class CGUIButtonBehavior : virtual public CGUIObject
{
public:
CGUIButtonBehavior();
virtual ~CGUIButtonBehavior();
// Handle Messages
virtual void HandleMessage(const EGUIMessage &Message);
protected:
// Everybody knows how a button works, you don't simply press it,
// you have to first press the button, and then release it...
// in between those two steps you can actually leave the button
// area, as long as you release it within the button area... Anyway
// this lets us know we are done with step one (clicking).
bool m_Pressed;
};
#endif