1
0
forked from 0ad/0ad
0ad/source/gui/CButton.h

80 lines
1.4 KiB
C
Raw Normal View History

/*
GUI Object - Button
by Gustav Larsson
gee@pyro.nu
--Overview--
GUI Object representing a simple button
--More info--
Check GUI.h
*/
#ifndef CButton_H
#define CButton_H
//--------------------------------------------------------
// Includes / Compiler directives
//--------------------------------------------------------
#include "GUI.h"
//--------------------------------------------------------
// Macros
//--------------------------------------------------------
//--------------------------------------------------------
// Types
//--------------------------------------------------------
//--------------------------------------------------------
// Declarations
//--------------------------------------------------------
/**
* @author Gustav Larsson
*
* Button
*
2003-11-24 03:18:41 +01:00
* @see IGUIObject
* @see IGUIButtonBehavior
*/
2004-05-29 06:06:50 +02:00
class CButton : public IGUIButtonBehavior, public IGUITextOwner
{
GUI_OBJECT(CButton)
public:
CButton();
virtual ~CButton();
2003-11-25 04:21:11 +01:00
virtual void ResetStates() { IGUIButtonBehavior::ResetStates(); }
/**
* Handle Messages
*
* @param Message GUI Message
*/
virtual void HandleMessage(const SGUIMessage &Message);
/**
* Draws the Button
*/
virtual void Draw();
2004-05-29 06:06:50 +02:00
protected:
/**
* Sets up text, should be called every time changes has been
* made that can change the visual.
*/
void SetupText();
/**
* Placement of text.
*/
CPos m_TextPos;
};
2003-11-24 18:13:37 +01:00
#endif