ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
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)
 
virtual ~TGLAnnotation ()
 Destructor. More...
 
void SetText (const TString &x)
 
const TStringGetText () const
 
void SetTransparency (Char_t x)
 
Char_t GetTransparency () const
 
void SetUseColorSet (Bool_t x)
 
Bool_t GetUseColorSet () const
 
void SetBackColor (Color_t x)
 
Color_t GetBackColor () const
 
void SetTextColor (Color_t x)
 
Color_t GetTextColor () const
 
void SetTextSize (Float_t x)
 
Float_t GetTextSize () const
 
void SetAllowClose (Bool_t x)
 
Bool_t GetAllowClose () const
 
TGLFont::ETextAlignH_e GetTextAlign () const
 
void SetTextAlign (TGLFont::ETextAlignH_e a)
 
virtual Bool_t MouseEnter (TGLOvlSelectRecord &selRec)
 Mouse has entered overlay area. More...
 
virtual Bool_t Handle (TGLRnrCtx &rnrCtx, TGLOvlSelectRecord &selRec, Event_t *event)
 Handle overlay event. More...
 
virtual void MouseLeave ()
 Mouse has left overlay area. More...
 
void CloseEditor ()
 Close the annotation editor. More...
 
void UpdateText ()
 Modify the annotation text from the text-edit widget. More...
 
virtual void Render (TGLRnrCtx &rnrCtx)
 Render the annotation. More...
 
 ClassDef (TGLAnnotation, 0)
 
- Public Member Functions inherited from TGLOverlayElement
 TGLOverlayElement (ERole r=kUser, EState s=kActive)
 
virtual ~TGLOverlayElement ()
 
virtual Bool_t MouseStillInside (TGLOvlSelectRecord &selRec)
 
ERole GetRole () const
 
void SetRole (ERole r)
 
EState GetState () const
 
void SetState (EState s)
 
void SetBinaryState (Bool_t s)
 

Protected Types

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

Protected Member Functions

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

Protected Attributes

Float_t fPosX
 
Float_t fPosY
 
Float_t fWidth
 
Float_t fHeight
 
Int_t fMouseX
 
Int_t fMouseY
 
EDrag fDrag
 last mouse position More...
 
Float_t fDrawW
 
Float_t fDrawH
 
Float_t fTextSizeDrag
 width and height when drawing More...
 
TGLVector3 fPointer
 text-size at start of drag More...
 
Bool_t fActive
 
TGMainFramefMainFrame
 
TGTextEditfTextEdit
 
TGLViewerfParent
 
TString fText
 
Float_t fTextSize
 
TGLFont fFont
 
TGLFont fMenuFont
 
TGLFont::ETextAlignH_e fTextAlign
 
Color_t fBackColor
 
Color_t fTextColor
 
Char_t fTransparency
 
Bool_t fDrawRefLine
 
Bool_t fUseColorSet
 
Bool_t fAllowClose
 
- 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 &)
 
TGLAnnotationoperator= (const TGLAnnotation &)
 

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

enum TGLAnnotation::EDrag
protected
Enumerator
kMove 
kResize 
kNone 

Definition at line 32 of file TGLAnnotation.h.

enum TGLAnnotation::ENameStack
protected
Enumerator
kMoveID 
kEditID 
kDeleteID 
kResizeID 

Definition at line 33 of file TGLAnnotation.h.

Constructor & Destructor Documentation

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

Definition at line 44 of file TGLAnnotation.cxx.

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

Definition at line 75 of file TGLAnnotation.cxx.

TGLAnnotation::~TGLAnnotation ( )
virtual

Destructor.

Definition at line 107 of file TGLAnnotation.cxx.

Member Function Documentation

TGLAnnotation::ClassDef ( TGLAnnotation  ,
 
)
void TGLAnnotation::CloseEditor ( )

Close the annotation editor.

Definition at line 533 of file TGLAnnotation.cxx.

Bool_t TGLAnnotation::GetAllowClose ( ) const
inline

Definition at line 97 of file TGLAnnotation.h.

Color_t TGLAnnotation::GetBackColor ( ) const
inline

Definition at line 88 of file TGLAnnotation.h.

Char_t TGLAnnotation::GetLineTransparency ( ) const
protected

Returns transparency of annotation outline.

If annotation is selected enforce visibility of outline.

Definition at line 476 of file TGLAnnotation.cxx.

Referenced by Render().

const TString& TGLAnnotation::GetText ( ) const
inline

Definition at line 79 of file TGLAnnotation.h.

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

Definition at line 99 of file TGLAnnotation.h.

Color_t TGLAnnotation::GetTextColor ( ) const
inline

Definition at line 91 of file TGLAnnotation.h.

Float_t TGLAnnotation::GetTextSize ( ) const
inline

Definition at line 94 of file TGLAnnotation.h.

Char_t TGLAnnotation::GetTransparency ( ) const
inline

Definition at line 82 of file TGLAnnotation.h.

Bool_t TGLAnnotation::GetUseColorSet ( ) const
inline

Definition at line 85 of file TGLAnnotation.h.

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

Handle overlay event.

Return TRUE if event was handled.

Reimplemented from TGLOverlayElement.

Definition at line 117 of file TGLAnnotation.cxx.

void TGLAnnotation::MakeEditor ( )
protected

Show the annotation editor.

Definition at line 487 of file TGLAnnotation.cxx.

Referenced by Handle().

Bool_t TGLAnnotation::MouseEnter ( TGLOvlSelectRecord selRec)
virtual

Mouse has entered overlay area.

Reimplemented from TGLOverlayElement.

Definition at line 194 of file TGLAnnotation.cxx.

void TGLAnnotation::MouseLeave ( )
virtual

Mouse has left overlay area.

Reimplemented from TGLOverlayElement.

Definition at line 203 of file TGLAnnotation.cxx.

TGLAnnotation& TGLAnnotation::operator= ( const TGLAnnotation )
private
void TGLAnnotation::Render ( TGLRnrCtx rnrCtx)
virtual

Render the annotation.

Implements TGLOverlayElement.

Definition at line 211 of file TGLAnnotation.cxx.

void TGLAnnotation::SetAllowClose ( Bool_t  x)
inline

Definition at line 96 of file TGLAnnotation.h.

void TGLAnnotation::SetBackColor ( Color_t  x)
inline

Definition at line 87 of file TGLAnnotation.h.

void TGLAnnotation::SetText ( const TString x)
inline

Definition at line 78 of file TGLAnnotation.h.

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

Definition at line 100 of file TGLAnnotation.h.

void TGLAnnotation::SetTextColor ( Color_t  x)
inline

Definition at line 90 of file TGLAnnotation.h.

void TGLAnnotation::SetTextSize ( Float_t  x)
inline

Definition at line 93 of file TGLAnnotation.h.

void TGLAnnotation::SetTransparency ( Char_t  x)
inline

Definition at line 81 of file TGLAnnotation.h.

void TGLAnnotation::SetUseColorSet ( Bool_t  x)
inline

Definition at line 84 of file TGLAnnotation.h.

void TGLAnnotation::UpdateText ( )

Modify the annotation text from the text-edit widget.

Definition at line 541 of file TGLAnnotation.cxx.

Member Data Documentation

Bool_t TGLAnnotation::fActive
protected

Definition at line 49 of file TGLAnnotation.h.

Referenced by GetLineTransparency(), MouseEnter(), MouseLeave(), and Render().

Bool_t TGLAnnotation::fAllowClose
protected

Definition at line 71 of file TGLAnnotation.h.

Referenced by GetAllowClose(), Render(), and SetAllowClose().

Color_t TGLAnnotation::fBackColor
protected

Definition at line 65 of file TGLAnnotation.h.

Referenced by GetBackColor(), Render(), and SetBackColor().

EDrag TGLAnnotation::fDrag
protected

last mouse position

Definition at line 44 of file TGLAnnotation.h.

Referenced by Handle().

Float_t TGLAnnotation::fDrawH
protected

Definition at line 45 of file TGLAnnotation.h.

Referenced by Handle(), and Render().

Bool_t TGLAnnotation::fDrawRefLine
protected

Definition at line 69 of file TGLAnnotation.h.

Referenced by Render().

Float_t TGLAnnotation::fDrawW
protected

Definition at line 45 of file TGLAnnotation.h.

Referenced by Handle(), and Render().

TGLFont TGLAnnotation::fFont
protected

Definition at line 61 of file TGLAnnotation.h.

Referenced by Render().

Color_t TGLAnnotation::fgBackColor = kAzure + 10
staticprotected

Definition at line 54 of file TGLAnnotation.h.

Color_t TGLAnnotation::fgTextColor = kOrange
staticprotected

Definition at line 55 of file TGLAnnotation.h.

Float_t TGLAnnotation::fHeight
protected

Definition at line 41 of file TGLAnnotation.h.

TGMainFrame* TGLAnnotation::fMainFrame
protected

Definition at line 51 of file TGLAnnotation.h.

Referenced by CloseEditor(), MakeEditor(), UpdateText(), and ~TGLAnnotation().

TGLFont TGLAnnotation::fMenuFont
protected

Definition at line 62 of file TGLAnnotation.h.

Int_t TGLAnnotation::fMouseX
protected

Definition at line 43 of file TGLAnnotation.h.

Referenced by Handle().

Int_t TGLAnnotation::fMouseY
protected

Definition at line 43 of file TGLAnnotation.h.

Referenced by Handle().

TGLViewer* TGLAnnotation::fParent
protected

Definition at line 57 of file TGLAnnotation.h.

Referenced by Handle(), TGLAnnotation(), UpdateText(), and ~TGLAnnotation().

TGLVector3 TGLAnnotation::fPointer
protected

text-size at start of drag

Definition at line 48 of file TGLAnnotation.h.

Referenced by Render(), and TGLAnnotation().

Float_t TGLAnnotation::fPosX
protected

Definition at line 38 of file TGLAnnotation.h.

Referenced by Handle(), and Render().

Float_t TGLAnnotation::fPosY
protected

Definition at line 39 of file TGLAnnotation.h.

Referenced by Handle(), and Render().

TString TGLAnnotation::fText
protected

Definition at line 59 of file TGLAnnotation.h.

Referenced by GetText(), MakeEditor(), Render(), SetText(), and UpdateText().

TGLFont::ETextAlignH_e TGLAnnotation::fTextAlign
protected

Definition at line 63 of file TGLAnnotation.h.

Referenced by GetTextAlign(), Render(), and SetTextAlign().

Color_t TGLAnnotation::fTextColor
protected

Definition at line 66 of file TGLAnnotation.h.

Referenced by GetTextColor(), Render(), and SetTextColor().

TGTextEdit* TGLAnnotation::fTextEdit
protected

Definition at line 52 of file TGLAnnotation.h.

Referenced by MakeEditor(), and UpdateText().

Float_t TGLAnnotation::fTextSize
protected

Definition at line 60 of file TGLAnnotation.h.

Referenced by GetTextSize(), Handle(), Render(), and SetTextSize().

Float_t TGLAnnotation::fTextSizeDrag
protected

width and height when drawing

Definition at line 46 of file TGLAnnotation.h.

Referenced by Handle().

Char_t TGLAnnotation::fTransparency
protected

Definition at line 67 of file TGLAnnotation.h.

Referenced by GetLineTransparency(), GetTransparency(), Render(), and SetTransparency().

Bool_t TGLAnnotation::fUseColorSet
protected

Definition at line 70 of file TGLAnnotation.h.

Referenced by GetUseColorSet(), Render(), and SetUseColorSet().

Float_t TGLAnnotation::fWidth
protected

Definition at line 40 of file TGLAnnotation.h.

Collaboration diagram for TGLAnnotation:
[legend]

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