JG ROOT Tools libraries  version 5.0 - august 2014
RGItem Class Reference

#include <RGItem.hh>

Inheritance diagram for RGItem:

Public Member Functions

Constructors, affectation, destructor
 RGItem (const string &s, void *ptr=NULL, const int n=0, const TGPicture *pict=NULL)
 
 RGItem (const GItem &item)
 
 RGItem (const RGItem &original)
 
 RGItem (GItem *p, const bool udat=true)
 
virtual ~RGItem ()
 
RGItemoperator= (const RGItem &original)
 
Specific functions
void SetIcon (const TGPicture *icon)
 
void SetIcon (const string &icon_name)
 
const TGPicture * GetIcon () const
 
void SetInfoPtr (void *ptr)
 
void * GetInfoPtr () const
 
Overloaded functions
bool operator== (const RGItem &item)
 

Protected Attributes

const TGPicture * icon_ptr
 Pointer to the ROOT icon picture.
 
void * info_ptr
 Pointer for additional information.
 

Private Member Functions

 GObject (RGItem)
 

Detailed Description

This class is derived from GItem, for items that require addidional display information (icon,...)

An additional information pointer is provided, for exemple to store the pointer to ROOT GUI objects referring to this item (this is the case in RGItemTreeList widget).

Constructor & Destructor Documentation

RGItem::RGItem ( const string &  s,
void *  ptr = NULL,
const int  n = 0,
const TGPicture *  pict = NULL 
)
inline

Constructor.

Parameters
sdisplay string (name)
ptrobject (user data) pointer
nidentification number for ROOT widgets
pictpointer to icon picture

References icon_ptr, and info_ptr.

RGItem::RGItem ( const GItem &  item)
inline

Constructor from a simple item.

Parameters
itemitem to copy

References icon_ptr, and info_ptr.

RGItem::RGItem ( const RGItem original)
inline

Copy constructor.

Parameters
originalitem to copy

References icon_ptr, and info_ptr.

RGItem::RGItem ( GItem *  p,
const bool  udat = true 
)
inline

Constructor from a main list element: the argument is copied and its address is set as parent pointer.

Parameters
ppointer on parent list element
udatindicates if the user data pointer should be copied

References icon_ptr, and info_ptr.

RGItem::~RGItem ( )
inlinevirtual

Destructor.

Member Function Documentation

RGItem::GObject ( RGItem  )
private

Macro from GCpp library that defines the following functions:

  • ClassName(): return the real class name of the object
  • StaticClassName(): return the used class name of the object (that may be a base class of the real object).
  • IsInstanceOf<T>(): return true if the current object is an instance of the template class name argument
  • Clone(): return an allocated copy of the object.
RGItem & RGItem::operator= ( const RGItem original)

Affectation operator.

Parameters
originalsub-item to copy

References icon_ptr.

void RGItem::SetIcon ( const TGPicture *  icon)
inline

Set the icon associated to the item.

Parameters
iconpointer to ROOT icon picture

References icon_ptr.

void RGItem::SetIcon ( const string &  icon_name)
inline

Set the icon associated to the item.

Parameters
icon_namename of the ROOT icon picture

References icon_ptr.

const TGPicture * RGItem::GetIcon ( ) const
inline

Return the picture pointer of the item icon.

References icon_ptr.

Referenced by RGItemTreeSelector::RecreateTreeSubDisplay().

void RGItem::SetInfoPtr ( void *  ptr)
inline

Set an additionnal information pointer.

Parameters
ptrinformation pointer

References info_ptr.

void * RGItem::GetInfoPtr ( ) const
inline

Return the additionnal information pointer.

References info_ptr.

bool RGItem::operator== ( const RGItem item)
inline

Comparison operator: it compares the GItem base class.

Parameters
itemelement to compare

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