////////////////////////////////////////////////////////////////////////////////
// GLLabel.h
// Copyright Bjoern Ganster 2007-2010
////////////////////////////////////////////////////////////////////////////////

#ifndef GLLabel__H
#define GLLabel__H

#include "GLWindow.h"
#include "BGCPString.h"

////////////////////////////////////////////////////////////////////////////////
// Base class for a button

class GLLabel: public GLWindow {
public:
   Color textColor;

   // Constructor
   GLLabel (GLWindow* _parent = NULL, int _left = 0, int _top = 0, 
             int _width = 0, int _height = 0);

   // Destructor
	~GLLabel() OVERRIDE;

   // Title access
   const BGCPString& getTitle () const
   { return title; }
   void setTitle (const BGCPString& newTitle) 
   { title = newTitle; }
   void setTitle (int textNum)
   { title = tr(textNum); }
   void setInt (int newVal) 
   { title = BGCPString::fromInt(newVal); }

   // Render
	void render(int x, int y, int w, int h) OVERRIDE;

   // Events
	void keypressed (BGKey /*key*/, bool /*shiftHeld*/, bool /*ctrlHeld*/, bool /*down*/, bool /*repeat*/)
		OVERRIDE
   {}

   // Button state changed over a window: returns child that was clicked
	GLWindow* buttonStateChanged (int /*button*/, bool /*down*/, int /*x*/, int /*y*/) OVERRIDE
   { return NULL; }
   
	virtual void mouseMoved (int /*x*/, int /*y*/) OVERRIDE
   {}

protected:
   BGCPString title;
};

#endif
