12 #ifndef ROOT_TGedPatternSelect
13 #define ROOT_TGedPatternSelect
47 class TGedPopup :
public TGCompositeFrame {
50 const TGWindow *fMsgWindow;
53 TGedPopup(
const TGWindow* p,
const TGWindow *m, UInt_t w, UInt_t h,
54 UInt_t options = 0, Pixel_t back = GetDefaultFrameBackground());
55 virtual ~TGedPopup() { }
57 virtual Bool_t HandleButton(Event_t *event);
58 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
59 void PlacePopup(Int_t x, Int_t y, UInt_t w, UInt_t h);
65 class TGedPatternFrame :
public TGFrame {
68 const TGWindow *fMsgWindow;
75 virtual void DoRedraw();
78 TGedPatternFrame(
const TGWindow *p, Style_t pattern, Int_t width = 40,
80 virtual ~TGedPatternFrame() {
delete fTip; }
82 virtual Bool_t HandleButton(Event_t *event);
83 virtual Bool_t HandleCrossing(Event_t *event);
84 virtual void DrawBorder();
86 void SetActive(Bool_t in) { fActive = in; gClient->NeedRedraw(
this); }
87 Style_t GetPattern()
const {
return fPattern; }
88 static void SetFillStyle(TGGC* gc, Style_t fstyle);
90 ClassDef(TGedPatternFrame,0)
93 class TGedPatternSelector :
public TGCompositeFrame {
97 const TGWindow *fMsgWindow;
98 TGedPatternFrame *fCe[27];
101 TGedPatternSelector(
const TGWindow *p);
102 virtual ~TGedPatternSelector();
104 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
105 void SetActive(Int_t newat);
106 Int_t GetActive()
const {
return fActive; }
108 ClassDef(TGedPatternSelector,0)
111 class TGedPatternPopup :
public TGedPopup {
114 Style_t fCurrentPattern;
117 TGedPatternPopup(
const TGWindow *p,
const TGWindow *m, Style_t pattern);
118 virtual ~TGedPatternPopup();
120 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
122 ClassDef(TGedPatternPopup,0)
125 class TGedSelect :
public TGCheckButton {
131 virtual void DoRedraw();
132 void DrawTriangle(GContext_t gc, Int_t x, Int_t y);
135 TGedSelect(
const TGWindow *p, Int_t
id);
136 virtual ~TGedSelect();
138 virtual Bool_t HandleButton(Event_t *event);
140 virtual void Enable();
141 virtual void Disable();
142 virtual void SetPopup(TGedPopup* p) { fPopup = p; }
144 ClassDef(TGedSelect,0)
147 class TGedPatternSelect :
public TGedSelect {
152 virtual void DoRedraw();
155 TGedPatternSelect(
const TGWindow *p, Style_t pattern, Int_t
id);
156 virtual ~TGedPatternSelect() {}
158 void SetPattern(Style_t pattern, Bool_t emit=kTRUE);
159 Style_t GetPattern()
const {
return fPattern; }
160 virtual TGDimension GetDefaultSize()
const {
return TGDimension(55, 21); }
161 virtual void PatternSelected(Style_t pattern = 0)
162 { Emit(
"PatternSelected(Style_t)", pattern ? pattern : GetPattern()); }
163 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
164 virtual void SavePrimitive(std::ostream &out, Option_t * =
"");
166 ClassDef(TGedPatternSelect,0)