2003-12-27 07:26:03 +01:00
|
|
|
/*
|
|
|
|
GUI Object Base - Scroll-bar owner
|
|
|
|
by Gustav Larsson
|
|
|
|
gee@pyro.nu
|
|
|
|
|
|
|
|
--Overview--
|
|
|
|
|
|
|
|
Base-class this if you want scroll-bars in an object.
|
|
|
|
|
|
|
|
--More info--
|
|
|
|
|
|
|
|
Check GUI.h
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef IGUIScrollBarOwner_H
|
|
|
|
#define IGUIScrollBarOwner_H
|
|
|
|
|
|
|
|
//--------------------------------------------------------
|
|
|
|
// Includes / Compiler directives
|
|
|
|
//--------------------------------------------------------
|
|
|
|
#include "GUI.h"
|
|
|
|
|
|
|
|
struct SGUIScrollBarStyle;
|
|
|
|
|
|
|
|
//--------------------------------------------------------
|
|
|
|
// Macros
|
|
|
|
//--------------------------------------------------------
|
|
|
|
|
|
|
|
//--------------------------------------------------------
|
|
|
|
// Types
|
|
|
|
//--------------------------------------------------------
|
|
|
|
|
|
|
|
//--------------------------------------------------------
|
|
|
|
// Declarations
|
|
|
|
//--------------------------------------------------------
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Gustav Larsson
|
|
|
|
*
|
|
|
|
* Base-class this if you want an object to contain
|
|
|
|
* one, or several, scroll-bars.
|
|
|
|
*
|
|
|
|
* @see IGUIObject
|
|
|
|
* @see IGUIScrollBar
|
|
|
|
*/
|
|
|
|
class IGUIScrollBarOwner : virtual public IGUIObject
|
|
|
|
{
|
2004-05-29 06:06:50 +02:00
|
|
|
friend class IGUIScrollBar;
|
|
|
|
|
2003-12-27 07:26:03 +01:00
|
|
|
public:
|
|
|
|
IGUIScrollBarOwner();
|
|
|
|
virtual ~IGUIScrollBarOwner();
|
|
|
|
|
|
|
|
virtual void Draw();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @see IGUIObject#HandleMessage()
|
|
|
|
*/
|
|
|
|
virtual void HandleMessage(const SGUIMessage &Message);
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
virtual void ResetStates();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface for the m_ScrollBar to use.
|
|
|
|
*/
|
2004-06-18 16:07:06 +02:00
|
|
|
virtual const SGUIScrollBarStyle *GetScrollBarStyle(const CStr& style) const;
|
2003-12-27 07:26:03 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add a scroll-bar
|
|
|
|
*/
|
|
|
|
virtual void AddScrollBar(IGUIScrollBar * scrollbar);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get Scroll Bar reference (it should be transparent it's actually
|
|
|
|
* pointers).
|
|
|
|
*/
|
|
|
|
virtual IGUIScrollBar & GetScrollBar(const int &index)
|
|
|
|
{
|
|
|
|
return *m_ScrollBars[index];
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Predominately you will only have one, but you can have
|
|
|
|
* as many as you like.
|
|
|
|
*/
|
2004-06-11 04:23:00 +02:00
|
|
|
std::vector<IGUIScrollBar*> m_ScrollBars;
|
2003-12-27 07:26:03 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|