Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGLAnnotation Class Reference

GL-overlay annotation.

Definition at line 25 of file TGLAnnotation.h.

Public Member Functions

 TGLAnnotation (TGLViewerBase *parent, const char *text, Float_t posx, Float_t posy)
 
 TGLAnnotation (TGLViewerBase *parent, const char *text, Float_t posx, Float_t posy, TGLVector3 ref)
 
 ~TGLAnnotation () override
 Destructor.
 
void CloseEditor ()
 Close the annotation editor.
 
Bool_t GetAllowClose () const
 
Color_t GetBackColor () const
 
const TStringGetText () const
 
TGLFont::ETextAlignH_e GetTextAlign () const
 
Color_t GetTextColor () const
 
Float_t GetTextSize () const
 
Char_t GetTransparency () const
 
Bool_t GetUseColorSet () const
 
Bool_t Handle (TGLRnrCtx &rnrCtx, TGLOvlSelectRecord &selRec, Event_t *event) override
 Handle overlay event.
 
TClassIsA () const override
 
Bool_t MouseEnter (TGLOvlSelectRecord &selRec) override
 Mouse has entered overlay area.
 
void MouseLeave () override
 Mouse has left overlay area.
 
void Render (TGLRnrCtx &rnrCtx) override
 Render the annotation.
 
void SetAllowClose (Bool_t x)
 
void SetBackColor (Color_t x)
 
void SetText (const TString &x)
 
void SetTextAlign (TGLFont::ETextAlignH_e a)
 
void SetTextColor (Color_t x)
 
void SetTextSize (Float_t x)
 
void SetTransparency (Char_t x)
 
void SetUseColorSet (Bool_t x)
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
void UpdateText ()
 Modify the annotation text from the text-edit widget.
 
- Public Member Functions inherited from TGLOverlayElement
 TGLOverlayElement (ERole r=kUser, EState s=kActive)
 
virtual ~TGLOverlayElement ()
 
ERole GetRole () const
 
EState GetState () const
 
virtual Bool_t MouseStillInside (TGLOvlSelectRecord &selRec)
 
void SetBinaryState (Bool_t s)
 
void SetRole (ERole r)
 
void SetState (EState s)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Protected Types

enum  EDrag { kMove , kResize , kNone }
 
enum  ENameStack { kMoveID , kEditID , kDeleteID , kResizeID }
 

Protected Member Functions

Char_t GetLineTransparency () const
 Returns transparency of annotation outline.
 
void MakeEditor ()
 Show the annotation editor.
 
- Protected Member Functions inherited from TGLOverlayElement
void ProjectionMatrixPushIdentity ()
 

Protected Attributes

Bool_t fActive
 
Bool_t fAllowClose
 
Color_t fBackColor
 
EDrag fDrag
 last mouse position
 
Float_t fDrawH
 
Bool_t fDrawRefLine
 
Float_t fDrawW
 
TGLFont fFont
 
Float_t fHeight
 
TGMainFramefMainFrame
 
TGLFont fMenuFont
 
Int_t fMouseX
 
Int_t fMouseY
 
TGLViewerfParent
 
TGLVector3 fPointer
 text-size at start of drag
 
Float_t fPosX
 
Float_t fPosY
 
TString fText
 
TGLFont::ETextAlignH_e fTextAlign
 
Color_t fTextColor
 
TGTextEditfTextEdit
 
Float_t fTextSize
 
Float_t fTextSizeDrag
 width and height when drawing
 
Char_t fTransparency
 
Bool_t fUseColorSet
 
Float_t fWidth
 
- Protected Attributes inherited from TGLOverlayElement
ERole fRole
 
EState fState
 

Static Protected Attributes

static Color_t fgBackColor = kAzure + 10
 
static Color_t fgTextColor = kOrange
 

Private Member Functions

 TGLAnnotation (const TGLAnnotation &)=delete
 
TGLAnnotationoperator= (const TGLAnnotation &)=delete
 

Additional Inherited Members

- Public Types inherited from TGLOverlayElement
enum  ERole { kUser , kViewer , kAnnotation , kAll }
 
enum  EState { kInvisible = 1 , kDisabled = 2 , kActive = 4 , kAllVisible = kDisabled | kActive }
 

#include <TGLAnnotation.h>

Inheritance diagram for TGLAnnotation:
[legend]

Member Enumeration Documentation

◆ EDrag

enum TGLAnnotation::EDrag
protected
Enumerator
kMove 
kResize 
kNone 

Definition at line 32 of file TGLAnnotation.h.

◆ ENameStack

enum TGLAnnotation::ENameStack
protected
Enumerator
kMoveID 
kEditID 
kDeleteID 
kResizeID 

Definition at line 33 of file TGLAnnotation.h.

Constructor & Destructor Documentation

◆ TGLAnnotation() [1/3]

TGLAnnotation::TGLAnnotation ( const TGLAnnotation )
privatedelete

◆ TGLAnnotation() [2/3]

TGLAnnotation::TGLAnnotation ( TGLViewerBase parent,
const char *  text,
Float_t  posx,
Float_t  posy 
)

Definition at line 43 of file TGLAnnotation.cxx.

◆ TGLAnnotation() [3/3]

TGLAnnotation::TGLAnnotation ( TGLViewerBase parent,
const char *  text,
Float_t  posx,
Float_t  posy,
TGLVector3  ref 
)

Definition at line 74 of file TGLAnnotation.cxx.

◆ ~TGLAnnotation()

TGLAnnotation::~TGLAnnotation ( )
override

Destructor.

Definition at line 106 of file TGLAnnotation.cxx.

Member Function Documentation

◆ Class()

static TClass * TGLAnnotation::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TGLAnnotation::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TGLAnnotation::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 113 of file TGLAnnotation.h.

◆ CloseEditor()

void TGLAnnotation::CloseEditor ( )

Close the annotation editor.

Definition at line 532 of file TGLAnnotation.cxx.

◆ DeclFileName()

static const char * TGLAnnotation::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 113 of file TGLAnnotation.h.

◆ GetAllowClose()

Bool_t TGLAnnotation::GetAllowClose ( ) const
inline

Definition at line 97 of file TGLAnnotation.h.

◆ GetBackColor()

Color_t TGLAnnotation::GetBackColor ( ) const
inline

Definition at line 88 of file TGLAnnotation.h.

◆ GetLineTransparency()

Char_t TGLAnnotation::GetLineTransparency ( ) const
protected

Returns transparency of annotation outline.

If annotation is selected enforce visibility of outline.

Definition at line 475 of file TGLAnnotation.cxx.

◆ GetText()

const TString & TGLAnnotation::GetText ( ) const
inline

Definition at line 79 of file TGLAnnotation.h.

◆ GetTextAlign()

TGLFont::ETextAlignH_e TGLAnnotation::GetTextAlign ( ) const
inline

Definition at line 99 of file TGLAnnotation.h.

◆ GetTextColor()

Color_t TGLAnnotation::GetTextColor ( ) const
inline

Definition at line 91 of file TGLAnnotation.h.

◆ GetTextSize()

Float_t TGLAnnotation::GetTextSize ( ) const
inline

Definition at line 94 of file TGLAnnotation.h.

◆ GetTransparency()

Char_t TGLAnnotation::GetTransparency ( ) const
inline

Definition at line 82 of file TGLAnnotation.h.

◆ GetUseColorSet()

Bool_t TGLAnnotation::GetUseColorSet ( ) const
inline

Definition at line 85 of file TGLAnnotation.h.

◆ Handle()

Bool_t TGLAnnotation::Handle ( TGLRnrCtx rnrCtx,
TGLOvlSelectRecord selRec,
Event_t event 
)
overridevirtual

Handle overlay event.

Return TRUE if event was handled.

Reimplemented from TGLOverlayElement.

Definition at line 116 of file TGLAnnotation.cxx.

◆ IsA()

TClass * TGLAnnotation::IsA ( ) const
inlineoverride
Returns
TClass describing current object

Definition at line 113 of file TGLAnnotation.h.

◆ MakeEditor()

void TGLAnnotation::MakeEditor ( )
protected

Show the annotation editor.

Definition at line 486 of file TGLAnnotation.cxx.

◆ MouseEnter()

Bool_t TGLAnnotation::MouseEnter ( TGLOvlSelectRecord selRec)
overridevirtual

Mouse has entered overlay area.

Reimplemented from TGLOverlayElement.

Definition at line 193 of file TGLAnnotation.cxx.

◆ MouseLeave()

void TGLAnnotation::MouseLeave ( )
overridevirtual

Mouse has left overlay area.

Reimplemented from TGLOverlayElement.

Definition at line 202 of file TGLAnnotation.cxx.

◆ operator=()

TGLAnnotation & TGLAnnotation::operator= ( const TGLAnnotation )
privatedelete

◆ Render()

void TGLAnnotation::Render ( TGLRnrCtx rnrCtx)
overridevirtual

Render the annotation.

Implements TGLOverlayElement.

Definition at line 210 of file TGLAnnotation.cxx.

◆ SetAllowClose()

void TGLAnnotation::SetAllowClose ( Bool_t  x)
inline

Definition at line 96 of file TGLAnnotation.h.

◆ SetBackColor()

void TGLAnnotation::SetBackColor ( Color_t  x)
inline

Definition at line 87 of file TGLAnnotation.h.

◆ SetText()

void TGLAnnotation::SetText ( const TString x)
inline

Definition at line 78 of file TGLAnnotation.h.

◆ SetTextAlign()

void TGLAnnotation::SetTextAlign ( TGLFont::ETextAlignH_e  a)
inline

Definition at line 100 of file TGLAnnotation.h.

◆ SetTextColor()

void TGLAnnotation::SetTextColor ( Color_t  x)
inline

Definition at line 90 of file TGLAnnotation.h.

◆ SetTextSize()

void TGLAnnotation::SetTextSize ( Float_t  x)
inline

Definition at line 93 of file TGLAnnotation.h.

◆ SetTransparency()

void TGLAnnotation::SetTransparency ( Char_t  x)
inline

Definition at line 81 of file TGLAnnotation.h.

◆ SetUseColorSet()

void TGLAnnotation::SetUseColorSet ( Bool_t  x)
inline

Definition at line 84 of file TGLAnnotation.h.

◆ Streamer()

void TGLAnnotation::Streamer ( TBuffer )
override

◆ StreamerNVirtual()

void TGLAnnotation::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 113 of file TGLAnnotation.h.

◆ UpdateText()

void TGLAnnotation::UpdateText ( )

Modify the annotation text from the text-edit widget.

Definition at line 540 of file TGLAnnotation.cxx.

Member Data Documentation

◆ fActive

Bool_t TGLAnnotation::fActive
protected

Definition at line 49 of file TGLAnnotation.h.

◆ fAllowClose

Bool_t TGLAnnotation::fAllowClose
protected

Definition at line 71 of file TGLAnnotation.h.

◆ fBackColor

Color_t TGLAnnotation::fBackColor
protected

Definition at line 65 of file TGLAnnotation.h.

◆ fDrag

EDrag TGLAnnotation::fDrag
protected

last mouse position

Definition at line 44 of file TGLAnnotation.h.

◆ fDrawH

Float_t TGLAnnotation::fDrawH
protected

Definition at line 45 of file TGLAnnotation.h.

◆ fDrawRefLine

Bool_t TGLAnnotation::fDrawRefLine
protected

Definition at line 69 of file TGLAnnotation.h.

◆ fDrawW

Float_t TGLAnnotation::fDrawW
protected

Definition at line 45 of file TGLAnnotation.h.

◆ fFont

TGLFont TGLAnnotation::fFont
protected

Definition at line 61 of file TGLAnnotation.h.

◆ fgBackColor

Color_t TGLAnnotation::fgBackColor = kAzure + 10
staticprotected

Definition at line 54 of file TGLAnnotation.h.

◆ fgTextColor

Color_t TGLAnnotation::fgTextColor = kOrange
staticprotected

Definition at line 55 of file TGLAnnotation.h.

◆ fHeight

Float_t TGLAnnotation::fHeight
protected

Definition at line 41 of file TGLAnnotation.h.

◆ fMainFrame

TGMainFrame* TGLAnnotation::fMainFrame
protected

Definition at line 51 of file TGLAnnotation.h.

◆ fMenuFont

TGLFont TGLAnnotation::fMenuFont
protected

Definition at line 62 of file TGLAnnotation.h.

◆ fMouseX

Int_t TGLAnnotation::fMouseX
protected

Definition at line 43 of file TGLAnnotation.h.

◆ fMouseY

Int_t TGLAnnotation::fMouseY
protected

Definition at line 43 of file TGLAnnotation.h.

◆ fParent

TGLViewer* TGLAnnotation::fParent
protected

Definition at line 57 of file TGLAnnotation.h.

◆ fPointer

TGLVector3 TGLAnnotation::fPointer
protected

text-size at start of drag

Definition at line 48 of file TGLAnnotation.h.

◆ fPosX

Float_t TGLAnnotation::fPosX
protected

Definition at line 38 of file TGLAnnotation.h.

◆ fPosY

Float_t TGLAnnotation::fPosY
protected

Definition at line 39 of file TGLAnnotation.h.

◆ fText

TString TGLAnnotation::fText
protected

Definition at line 59 of file TGLAnnotation.h.

◆ fTextAlign

TGLFont::ETextAlignH_e TGLAnnotation::fTextAlign
protected

Definition at line 63 of file TGLAnnotation.h.

◆ fTextColor

Color_t TGLAnnotation::fTextColor
protected

Definition at line 66 of file TGLAnnotation.h.

◆ fTextEdit

TGTextEdit* TGLAnnotation::fTextEdit
protected

Definition at line 52 of file TGLAnnotation.h.

◆ fTextSize

Float_t TGLAnnotation::fTextSize
protected

Definition at line 60 of file TGLAnnotation.h.

◆ fTextSizeDrag

Float_t TGLAnnotation::fTextSizeDrag
protected

width and height when drawing

Definition at line 46 of file TGLAnnotation.h.

◆ fTransparency

Char_t TGLAnnotation::fTransparency
protected

Definition at line 67 of file TGLAnnotation.h.

◆ fUseColorSet

Bool_t TGLAnnotation::fUseColorSet
protected

Definition at line 70 of file TGLAnnotation.h.

◆ fWidth

Float_t TGLAnnotation::fWidth
protected

Definition at line 40 of file TGLAnnotation.h.

Libraries for TGLAnnotation:

The documentation for this class was generated from the following files: