Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGedPatternSelect.h
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Marek Biskup, Ilka Antcheva 24/07/03
3
4/*************************************************************************
5 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGedPatternSelect
13#define ROOT_TGedPatternSelect
14
15
16#include "TGButton.h"
17#include "TGToolTip.h"
18
19
21
22protected:
24
25public:
26 TGedPopup(const TGWindow* p, const TGWindow *m, UInt_t w, UInt_t h,
27 UInt_t options = 0, Pixel_t back = GetDefaultFrameBackground());
28 virtual ~TGedPopup() { }
29
31 virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2);
33 void EndPopup();
34
35 ClassDef(TGedPopup,0) //popup window
36};
37
38class TGedPatternFrame : public TGFrame {
39
40protected:
44 static TGGC *fgGC;
45 TGToolTip *fTip; ///< tool tip associated with a button
46 char fTipText[7];
47
48 virtual void DoRedraw();
49
50public:
51 TGedPatternFrame(const TGWindow *p, Style_t pattern, Int_t width = 40,
52 Int_t height = 20);
53 virtual ~TGedPatternFrame() { delete fTip; }
54
57 virtual void DrawBorder();
58
59 void SetActive(Bool_t in) { fActive = in; gClient->NeedRedraw(this); }
60 Style_t GetPattern() const { return fPattern; }
61 static void SetFillStyle(TGGC* gc, Style_t fstyle); //set fill style for given GC
62
63 ClassDef(TGedPatternFrame,0) //pattern frame
64};
65
67
68protected:
72
73public:
75 virtual ~TGedPatternSelector();
76
77 virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2);
78 void SetActive(Int_t newat);
79 Int_t GetActive() const { return fActive; }
80
81 ClassDef(TGedPatternSelector,0) //select pattern frame
82};
83
85
86protected:
88
89public:
90 TGedPatternPopup(const TGWindow *p, const TGWindow *m, Style_t pattern);
91 virtual ~TGedPatternPopup();
92
93 virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2);
94
95 ClassDef(TGedPatternPopup,0) // Color selector popup
96};
97
98class TGedSelect : public TGCheckButton {
99
100protected:
103
104 virtual void DoRedraw();
106
107public:
108 TGedSelect(const TGWindow *p, Int_t id);
109 virtual ~TGedSelect();
110
112
113 virtual void Enable();
114 virtual void Disable();
115 virtual void SetPopup(TGedPopup* p) { fPopup = p; } // popup will be deleted in destructor.
116
117 ClassDef(TGedSelect,0) //selection check-button
118};
119
121
122protected:
124
125 virtual void DoRedraw();
126
127public:
128 TGedPatternSelect(const TGWindow *p, Style_t pattern, Int_t id);
130
131 void SetPattern(Style_t pattern, Bool_t emit=kTRUE);
132 Style_t GetPattern() const { return fPattern; }
133 virtual TGDimension GetDefaultSize() const { return TGDimension(55, 21); }
134 virtual void PatternSelected(Style_t pattern = 0)
135 { Emit("PatternSelected(Style_t)", pattern ? pattern : GetPattern()); } // *SIGNAL*
136 virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2);
137 virtual void SavePrimitive(std::ostream &out, Option_t * = "");
138
139 ClassDef(TGedPatternSelect,0) //pattern selection check-button
140};
141
142#endif
Handle_t GContext_t
Graphics context handle.
Definition GuiTypes.h:38
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define h(i)
Definition RSha256.hxx:106
short Style_t
Definition RtypesCore.h:89
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
long Longptr_t
Definition RtypesCore.h:82
unsigned int UInt_t
Definition RtypesCore.h:46
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:337
#define gClient
Definition TGClient.h:157
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t SetFillStyle
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void gc
Selects different options.
Definition TGButton.h:264
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition TGFrame.h:80
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition TGFrame.cxx:683
Encapsulate a graphics context used in the low level graphics.
Definition TGGC.h:22
A tooltip can be a one or multiple lines help text that is displayed in a window when the mouse curso...
Definition TGToolTip.h:24
ROOT GUI Window base class.
Definition TGWindow.h:23
The TGedPatternFrame is a small frame with border showing a specific pattern (fill style.
void SetActive(Bool_t in)
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event.
const TGWindow * fMsgWindow
TGToolTip * fTip
tool tip associated with a button
Style_t GetPattern() const
virtual ~TGedPatternFrame()
virtual void DrawBorder()
Draw border.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event.
virtual void DoRedraw()
Redraw selected pattern.
The TGedPatternPopup is a popup containing a TGedPatternSelector.
virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Process messages generated by pattern popup window.
virtual ~TGedPatternPopup()
Destructor of pattern popup window.
is a button with pattern area with a little down arrow.
virtual void DoRedraw()
Draw selected pattern as current one.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the pattern select widget as a C++ statement(s) on output stream out.
virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Process message according to the user input.
virtual TGDimension GetDefaultSize() const
default size
virtual void PatternSelected(Style_t pattern=0)
Style_t GetPattern() const
void SetPattern(Style_t pattern, Bool_t emit=kTRUE)
Set pattern.
The TGedPatternSelector is a composite frame with TGedPatternFrames of all diferent styles.
void SetActive(Int_t newat)
Set selected the current style.
const TGWindow * fMsgWindow
virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Process message generated by pattern popup window.
virtual ~TGedPatternSelector()
Delete pattern popup window.
TGedPatternFrame * fCe[27]
is a popup window.
void EndPopup()
Ungrab pointer and unmap popup window.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in popup window.
virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Process messages generated by popup window.
const TGWindow * fMsgWindow
void PlacePopup(Int_t x, Int_t y, UInt_t w, UInt_t h)
Place popup window at the specified place.
virtual ~TGedPopup()
is button that shows popup window when clicked.
virtual ~TGedSelect()
Destructor of pattern select button.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events in pattern select button.
void DrawTriangle(GContext_t gc, Int_t x, Int_t y)
Draw small triangle.
TGedPopup * fPopup
virtual void Enable()
Set widget state flag (kTRUE=enabled, kFALSE=disabled).
virtual void Disable()
Clear widget state flag.
virtual void DoRedraw()
Draw separator and arrow.
virtual void SetPopup(TGedPopup *p)
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition TQObject.h:164
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
Event structure.
Definition GuiTypes.h:174
TMarker m
Definition textangle.C:8