00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
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