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

cardcontainer.h

00001 /***************************************************************************
00002                           cardcontainer.h  -  description
00003                              -------------------
00004     begin                : Thu Aug 28 2003
00005     copyright            : (C) 2003 by Gabor Torok
00006     email                : cctorok@yahoo.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 CARD_CONTAINER_H
00019 #define CARD_CONTAINER_H
00020 
00021 #include "../constants.h"
00022 #include "widget.h"
00023 #include "window.h"
00024 
00028 class Button;
00029 class Label;
00030 class Checkbox;
00031 
00032 class CardContainer {
00033  protected:
00034   static const int MAX_CARDS = 10;
00035   static const int MAX_WIDGETS = 100;
00036   
00037   Widget *containedWidget[MAX_CARDS][MAX_WIDGETS];
00038   int cardCount;
00039   int widgetCount[MAX_CARDS];
00040   int activeCard;
00041   Window *window;
00042 
00043  public: 
00044   CardContainer(Window *window);
00045   virtual ~CardContainer();
00046 
00047   // widget managment functions
00048   Button    * createButton(int x1, int y1, int x2, int y2, char *label, int card, bool toggle=false);   
00049   Label     * createLabel(int x1, int x2, char * label, int card, int color=Constants::DEFAULT_COLOR); 
00050   Checkbox  * createCheckbox(int x1, int y1, int x2, int y2, char *label, int card);  
00051 
00052   void setActiveCard(int card);
00053   inline int getActiveCard() { return activeCard; }
00054   void addWidget(Widget *w, int card, bool addToWindow=true); 
00055 };
00056 
00057 #endif
00058 

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