Proper constructor for FltkLCD

This commit is contained in:
Romain Goyet
2015-09-01 12:06:08 +02:00
parent cd3046b3ef
commit 50df2ac3a8
2 changed files with 5 additions and 3 deletions

View File

@@ -4,7 +4,8 @@
#include <FL/Fl_draw.H>
FltkLCD::FltkLCD(int x, int y, int w, int h) : Fl_Widget(x, y, w, h, NULL) {
FltkLCD::FltkLCD(int x, int y, int w, int h, const char * label) :
Fl_Widget(x, y, w, h, label) {
m_framebuffer = malloc(w*h);
// FIXME: Delete the framebuffer!
}

View File

@@ -5,9 +5,10 @@
class FltkLCD : public Fl_Widget {
public:
FltkLCD(int x, int y, int w, int h);
void draw();
FltkLCD(int x, int y, int w, int h, const char * label = 0);
void * m_framebuffer;
protected:
void draw();
};
#endif