#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>

#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>

#include "Controle.h"
#include "Label.h"
#include "Couleur.h"
#include "ModuleFont.h"

#define UNREFERENCED_PARAMETER(P) (P)

Label::Label(void):Controle() {
  strcpy(titre,"");
}

Label::Label(int px,int py,Couleur *coul,const char *titre):Controle(px,py,coul) {
  strcpy(this->titre,titre);
}

Label::~Label(void) {
}

void Label::dessiner(void) {
  glDisable(GL_LIGHTING);
  glPushMatrix();
  glTranslatef(px,py,0.0F);
  setGLColor((float *) coul);
  { setFont(GLUT_BITMAP_8_BY_13,LEFT);
    glPushMatrix();
    bitmapStringOutput(0.0F,0.0F,0.0F,titre);
    glPopMatrix(); }
  glPopMatrix();
}

void Label::sauve(void) {
}

void Label::annule(void) {
}

int Label::selection(int x,int y) {
  UNREFERENCED_PARAMETER(x);
  UNREFERENCED_PARAMETER(y);
  return(-1);
}

void Label::setText(const char *stitre) {
  strcpy(this->titre,stitre);
}

