Lephisto/src/gui_fixed.h

26 lines
621 B
C++

#pragma once
#include "gui_widget.h"
#include "gui_container.h"
/* Fixed position widget container. */
namespace Gui {
class Fixed : public Container {
public:
Fixed(float x, float y, float w, float h);
void Add(Widget* child, float x, float y);
void Remove(Widget* child);
virtual void Draw(void);
virtual ~Fixed(void);
virtual void GetSizeRequested(float size[2]);
void SetBgColor(float rgb[3]);
void SetBgColor(float r, float g, float b);
void SetTransparency(bool a) { m_transparent = a; }
private:
float m_w, m_h;
float m_bgcol[3];
bool m_transparent;
};
}