Skip to content
Permalink
7c65d5344b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
33 lines (24 sloc) 438 Bytes
#ifndef TEXTBOX_H
#define TEXTBOX_H
#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include "drawable.h"
class TextBox : public Drawable
{
public:
int width;
std::stringstream ss;
TextBox( int _x, int _y, int _width)
: Drawable( _x, _y ), width(_width) {}
void draw() const;
void clear();
};
template<typename T>
TextBox& operator<<( TextBox& os, T t )
{
os.ss << t;
return os;
}
#endif