00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef STAGE_H
00023 #define STAGE_H
00024
00025 #include "Displayable.h"
00026 #include "DispCmds.h"
00027
00029 class Stage : public Displayable {
00030 public:
00032 enum StagePos { NO_STAGE = 0, STAGE_ORIGIN, STAGE_LOWER, STAGE_UPPER,
00033 STAGE_LEFT, STAGE_RIGHT, STAGE_BEHIND, STAGEPOS_TOTAL };
00034
00035 private:
00036 int usecolors[2];
00037 int Panels;
00038 float Size;
00039 float inc;
00040 int stagePos;
00041 int need_update;
00042 DispCmdColorIndex cmdColor;
00043 DispCmdSquare cmdSquare;
00044 int colorCat;
00045 int movedStage;
00046
00048 void create_cmdlist(void);
00049
00050 protected:
00051 virtual void do_color_changed(int);
00052
00053 public:
00055 Stage(Displayable *);
00056
00058 int location(int);
00059
00061 int location(void) { return stagePos; }
00062
00064 char *loc_description(int);
00065
00067 int locations(void) { return STAGEPOS_TOTAL; }
00068
00070 int panels(void) { return Panels; }
00071
00073 int panels(int newp) {
00074 if (newp == Panels) return TRUE;
00075 if (newp >= 1 && newp <= 30) {
00076 Panels = newp;
00077 inc = (Size * 2.0f) / (float) Panels;
00078 need_update = TRUE;
00079 return TRUE;
00080 }
00081 return FALSE;
00082 }
00083
00084
00086 float size(void) { return Size; }
00087
00089 float size(float newsize) {
00090 Size = newsize;
00091 inc = (Size * 2.0f) / (float) Panels;
00092 need_update = TRUE;
00093 return TRUE;
00094 }
00095
00096
00097
00098
00099
00101 virtual void prepare();
00102
00109 virtual void pick_move(PickMode *, DisplayDevice *, int, int, const float *);
00110
00111 };
00112
00113 #endif
00114