Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields

checkbox.h

00001 /***************************************************************************
00002                       checkbox.h  -  description
00003                              -------------------
00004     begin                : Sat Mar 13 2004
00005     copyright            : (C) 2004 by Daroth-U
00006     email                : daroth-u@ifrance.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef CHECKBOX_H
00019 #define CHECKBOX_H
00020 
00021 
00022 #include <vector>
00023 #include "../constants.h"
00024 #include "widget.h"
00025 #include "label.h"
00026 #include "button.h"
00027 
00032 #define CHECKBOX_SIZE  15
00033 
00034 class SDLHandler;
00035 class Label;
00036 class Button;
00037 
00038 class Checkbox : public Widget {
00039  private:
00040   int x2, y2;
00041   Label *staticLabel;
00042   Button * checkButton;  
00043   bool inside;  
00044   bool checked;
00045   void toggleCheck();
00046   void applyCheck();
00047   
00048  public: 
00049 
00050   Checkbox(int x1, int y1, int x2, int y2, GLuint highlight, char *staticText);
00051   ~Checkbox();
00052   bool isInside(int x, int y); 
00053   inline bool isChecked() { return checked; } 
00054   void setCheck(bool val);
00055         
00056   bool handleEvent(Widget *parent, SDL_Event *event, int x, int y);
00057   void drawWidget(Widget *parent);
00058 };
00059 
00060 #endif
00061 

Generated on Thu Jun 16 21:50:42 2005 for scourge by  doxygen 1.4.0