GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LevelEditor.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2004 by Olivier Stezowski *
3  * stezow(AT)ipnl.in2p3.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
23 #ifndef GW_LEVELEDITOR_H
24 #define GW_LEVELEDITOR_H
25 
26 #ifndef ROOT_TGButton
27 #include "TGWidget.h"
28 #endif
29 #ifndef ROOT_TGedFrame
30 #include "TGedFrame.h"
31 #endif
32 
33 #ifndef GW_LEVEL_H
34 #include "Level.h"
35 #endif
36 
37 class TGColorSelect;
38 class TGTextEntry;
39 class TGNumberEntry;
40 
41 namespace Gw {
42 
54 class LevelEditor : public TGedFrame
55 {
56 protected:
57  Level *fLevel; // level object
58 
59  TGColorSelect *fColorSelect0; // text color widget for label 0
60  TGColorSelect *fColorSelect1; // text color widget for label 1
61  TGColorSelect *fColorSelect2; // text color widget for label 2
62  TGColorSelect *fColorSelect3; // text color widget for label 3
63 
64  TGTextEntry *fTextEntry0; // text entry for label 0
65  TGTextEntry *fTextEntry1; // text entry for label 1
66  TGTextEntry *fTextEntry2; // text entry for label 2
67  TGTextEntry *fTextEntry3; // text entry for label 3
68 
69  TGNumberEntry *fOffsetX0; //
70  TGNumberEntry *fOffsetY0; //
71  TGNumberEntry *fOffsetX1; //
72  TGNumberEntry *fOffsetY1; //
73  TGNumberEntry *fOffsetX2; //
74  TGNumberEntry *fOffsetY2; //
75  TGNumberEntry *fOffsetX3; //
76  TGNumberEntry *fOffsetY3; //
77 
78  virtual void ConnectSignals2Slots();
79 
80 public:
81  LevelEditor(const TGWindow *p = 0);
82  LevelEditor(const TGWindow *p, Int_t id);
83  virtual ~LevelEditor();
84 
86  virtual void SetModel(TObject *obj);
87 
89 
92  virtual void SetModel(TVirtualPad *pad, TObject *obj, Int_t event);
93 
94 
95  virtual void DoTextColor0(Pixel_t color);
96  virtual void DoTextColor1(Pixel_t color);
97  virtual void DoTextColor2(Pixel_t color);
98  virtual void DoTextColor3(Pixel_t color);
99 
100  virtual void DoTextEntry0(const Char_t *name = "");
101  virtual void DoTextEntry1(const Char_t *name = "");
102  virtual void DoTextEntry2(const Char_t *name = "");
103  virtual void DoTextEntry3(const Char_t *name = "");
104 
105  virtual void DoOffsetX0();
106  virtual void DoOffsetY0();
107  virtual void DoOffsetX1();
108  virtual void DoOffsetY1();
109  virtual void DoOffsetX2();
110  virtual void DoOffsetY2();
111  virtual void DoOffsetX3();
112  virtual void DoOffsetY3();
113 
114  ClassDef(LevelEditor,0) // GUI for editing line attributes
115 };
116 
117 }
118 
119 #endif
virtual ~LevelEditor()
TGNumberEntry * fOffsetX0
Definition: LevelEditor.h:69
TGNumberEntry * fOffsetX1
Definition: LevelEditor.h:71
virtual void DoOffsetY0()
Level GUI Editor : The goal of the level editor is to change graphical attributes for a level...
Definition: LevelEditor.h:54
virtual void DoOffsetX3()
TGColorSelect * fColorSelect3
Definition: LevelEditor.h:62
TGNumberEntry * fOffsetY3
Definition: LevelEditor.h:76
TGNumberEntry * fOffsetX2
Definition: LevelEditor.h:73
TGColorSelect * fColorSelect1
Definition: LevelEditor.h:60
virtual void ConnectSignals2Slots()
virtual void DoOffsetY3()
TGNumberEntry * fOffsetY2
Definition: LevelEditor.h:74
TGTextEntry * fTextEntry3
Definition: LevelEditor.h:67
TGNumberEntry * fOffsetX3
Definition: LevelEditor.h:75
TGTextEntry * fTextEntry2
Definition: LevelEditor.h:66
virtual void DoTextEntry3(const Char_t *name="")
virtual void DoOffsetY2()
Level * fLevel
Definition: LevelEditor.h:57
virtual void DoOffsetX2()
header file for a general Level
TGColorSelect * fColorSelect2
Definition: LevelEditor.h:61
TGTextEntry * fTextEntry1
Definition: LevelEditor.h:65
virtual void DoTextColor0(Pixel_t color)
TGNumberEntry * fOffsetY1
Definition: LevelEditor.h:72
LevelEditor(const TGWindow *p=0)
virtual void DoOffsetX0()
virtual void DoTextColor2(Pixel_t color)
TGTextEntry * fTextEntry0
Definition: LevelEditor.h:64
virtual void DoTextEntry1(const Char_t *name="")
virtual void DoOffsetX1()
virtual void DoTextEntry0(const Char_t *name="")
virtual void DoTextColor1(Pixel_t color)
virtual void DoTextColor3(Pixel_t color)
TGColorSelect * fColorSelect0
Definition: LevelEditor.h:59
virtual void DoOffsetY1()
virtual void SetModel(TObject *obj)
to connect the current Level to the Editor (for ROOTVERSION > 5.12)
virtual void DoTextEntry2(const Char_t *name="")
TGNumberEntry * fOffsetY0
Definition: LevelEditor.h:70
Base class describing a general level.
Definition: Level.h:53