Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::RFrame Class Reference

Holds an area where drawing on user coordinate-system can be performed.

Authors
Axel Naumann axel@.nosp@m.cern.nosp@m..ch Sergey Linev s.lin.nosp@m.ev@g.nosp@m.si.de
Date
2017-09-26
Warning
This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!

Definition at line 39 of file RFrame.hxx.

Classes

class  RUserRanges
 
class  RZoomRequest
 

Public Member Functions

 RFrame (TRootIOCtor *)
 
RAttrLine & AttrBorder ()
 
RAttrFill & AttrFill ()
 
RAttrAxis & AttrX ()
 
RAttrAxis & AttrY ()
 
RAttrAxis & AttrZ ()
 
const RAttrLine & GetAttrBorder () const
 
const RAttrFill & GetAttrFill () const
 
const RAttrAxis & GetAttrX () const
 
const RAttrAxis & GetAttrY () const
 
const RAttrAxis & GetAttrZ () const
 
void GetClientRanges (unsigned connid, RUserRanges &ranges)
 Return ranges configured for the client.
 
bool GetGridX () const
 
bool GetGridY () const
 
const RAttrMargins & GetMargins () const
 
size_t GetNDimensions () const
 Get the number of axes.
 
bool GetSwapX () const
 
bool GetSwapY () const
 
int GetTicksX () const
 
int GetTicksY () const
 
RPadUserAxisBase & GetUserAxis (size_t dimension) const
 Get the current user coordinate system for a given dimension.
 
void GrowToDimensions (size_t nDimensions)
 Create nDimensions default axes for the user coordinate system.
 
RAttrMargins & Margins ()
 
RFrame & SetAttrBorder (const RAttrLine &border)
 
RFrame & SetAttrFill (const RAttrFill &fill)
 
RFrame & SetAttrX (const RAttrAxis &axis)
 
RFrame & SetAttrY (const RAttrAxis &axis)
 
RFrame & SetAttrZ (const RAttrAxis &axis)
 
RFrame & SetGridX (bool on=true)
 
RFrame & SetGridY (bool on=true)
 
RFrame & SetMargins (const RAttrMargins &margins)
 
RFrame & SetSwapX (bool on=true)
 
RFrame & SetSwapY (bool on=true)
 
RFrame & SetTicksX (int v=1)
 Configure X ticks drawing 0 - off, 1 - as configured for axis, 2 - both sides, 3 - labels on both side.
 
RFrame & SetTicksY (int v=1)
 Configure Y ticks drawing 0 - off, 1 - as configured for axis, 2 - both sides, 3 - labels on both side.
 
void SetUserAxis (std::vector< std::unique_ptr< RPadUserAxisBase > > &&axes)
 Set the user coordinate system.
 
std::array< RPadLength::Normal, 2 > UserToNormal (const std::array< RPadLength::User, 2 > &pos) const
 Convert user coordinates to normal coordinates.
 
- Public Member Functions inherited from ROOT::Experimental::RDrawable
 RDrawable (const std::string &type)
 
virtual ~RDrawable ()
 
void ClearStyle ()
 
const std::string & GetCssClass () const
 
const std::string & GetCssType () const
 
const std::string & GetId () const
 
void SetCssClass (const std::string &cl)
 
void SetId (const std::string &id)
 
virtual void UseStyle (const std::shared_ptr< RStyle > &style)
 

Protected Member Functions

void AssignZoomRange (unsigned ndim, RAttrAxis &axis, const RUserRanges &ranges)
 Internal - assign client zoomed range to specified axis.
 
void GetAxisRanges (unsigned ndim, const RAttrAxis &axis, RUserRanges &ranges) const
 Internal - extract range for specified axis.
 
void PopulateMenu (RMenuItems &) override
 Provide context menu items.
 
- Protected Member Functions inherited from ROOT::Experimental::RDrawable
 RDrawable (const RDrawable &)=delete
 
virtual void CollectShared (Internal::RIOSharedVector_t &)
 
virtual std::unique_ptr< RDisplayItem > Display (const RDisplayContext &)
 Creates display item for drawable By default item contains drawable data itself.
 
virtual void Execute (const std::string &)
 
RAttrMap & GetAttrMap ()
 
const RAttrMap & GetAttrMap () const
 
Version_t GetVersion () const
 
virtual bool IsFrameRequired () const
 
bool MatchSelector (const std::string &selector) const
 Preliminary method which checks if drawable matches with given selector Following selector are allowed: "type" or "#id" or ".class_name" Here type is drawable kind like 'rect' or 'pad' id is drawable identifier, specified with RDrawable::SetId() method class_name is drawable class name, specified with RDrawable::SetCssClass() method.
 
virtual void OnDisplayItemDestroyed (RDisplayItem *) const
 
RDrawable & operator= (const RDrawable &)=delete
 
virtual void SetDrawableVersion (Version_t vers)
 

Private Member Functions

 RFrame ()
 
 RFrame (const RFrame &)=delete
 
 RFrame (std::vector< std::unique_ptr< RPadUserAxisBase > > &&coords)
 Constructor taking user coordinate system, position and extent.
 
RFrame & operator= (const RFrame &)=delete
 
void SetClientRanges (unsigned connid, const RUserRanges &ranges, bool ismainconn)
 Remember client range, can be used for drawing or stats box calculations.
 

Private Attributes

RAttrLine fAttrBorder {this, "border"}
 ! line attributes for border
 
RAttrFill fAttrFill {this, "fill"}
 ! fill attributes for the frame
 
RAttrAxis fAttrX {this, "x"}
 ! drawing attributes for X axis
 
RAttrAxis fAttrY {this, "y"}
 ! drawing attributes for Y axis
 
RAttrAxis fAttrZ {this, "z"}
 ! drawing attributes for Z axis
 
std::map< unsigned, RUserRanges > fClientRanges
 ! individual client ranges
 
RAttrValue< bool > fGridX {this, "gridx", false}
 ! show grid for X axis
 
RAttrValue< bool > fGridY {this, "gridy", false}
 ! show grid for Y axis
 
RAttrMargins fMargins {this, "margin"}
 ! frame margins relative to pad
 
RAttrValue< bool > fSwapX {this, "swapx", false}
 ! swap position of X axis
 
RAttrValue< bool > fSwapY {this, "swapy", false}
 ! swap position of Y axis
 
RAttrValue< int > fTicksX {this, "ticksx", 1}
 ! X ticks drawing:
 
RAttrValue< int > fTicksY {this, "ticksy", 1}
 ! Y ticks drawing
 
std::vector< std::unique_ptr< RPadUserAxisBase > > fUserCoord
 Mapping of user coordinates to normal coordinates, one entry per dimension.
 

Friends

class RPadBase
 

Additional Inherited Members

- Public Types inherited from ROOT::Experimental::RDrawable
using Version_t = uint64_t
 

#include <ROOT/RFrame.hxx>

Inheritance diagram for ROOT::Experimental::RFrame:
[legend]

Constructor & Destructor Documentation

◆ RFrame() [1/4]

ROOT::Experimental::RFrame::RFrame ( const RFrame &  )
privatedelete

◆ RFrame() [2/4]

ROOT::Experimental::RFrame::RFrame ( )
inlineprivate

Definition at line 168 of file RFrame.hxx.

◆ RFrame() [3/4]

RFrame::RFrame ( std::vector< std::unique_ptr< RPadUserAxisBase > > &&  coords)
explicitprivate

Constructor taking user coordinate system, position and extent.

Deprecated constructor, to be removed soon.

Definition at line 25 of file RFrame.cxx.

◆ RFrame() [4/4]

ROOT::Experimental::RFrame::RFrame ( TRootIOCtor *  )
inline

Definition at line 200 of file RFrame.hxx.

Member Function Documentation

◆ AssignZoomRange()

void RFrame::AssignZoomRange ( unsigned  ndim,
RAttrAxis &  axis,
const RUserRanges &  ranges 
)
protected

Internal - assign client zoomed range to specified axis.

Definition at line 45 of file RFrame.cxx.

◆ AttrBorder()

RAttrLine & ROOT::Experimental::RFrame::AttrBorder ( )
inline

Definition at line 208 of file RFrame.hxx.

◆ AttrFill()

RAttrFill & ROOT::Experimental::RFrame::AttrFill ( )
inline

Definition at line 212 of file RFrame.hxx.

◆ AttrX()

RAttrAxis & ROOT::Experimental::RFrame::AttrX ( )
inline

Definition at line 216 of file RFrame.hxx.

◆ AttrY()

RAttrAxis & ROOT::Experimental::RFrame::AttrY ( )
inline

Definition at line 220 of file RFrame.hxx.

◆ AttrZ()

RAttrAxis & ROOT::Experimental::RFrame::AttrZ ( )
inline

Definition at line 224 of file RFrame.hxx.

◆ GetAttrBorder()

const RAttrLine & ROOT::Experimental::RFrame::GetAttrBorder ( ) const
inline

Definition at line 206 of file RFrame.hxx.

◆ GetAttrFill()

const RAttrFill & ROOT::Experimental::RFrame::GetAttrFill ( ) const
inline

Definition at line 210 of file RFrame.hxx.

◆ GetAttrX()

const RAttrAxis & ROOT::Experimental::RFrame::GetAttrX ( ) const
inline

Definition at line 214 of file RFrame.hxx.

◆ GetAttrY()

const RAttrAxis & ROOT::Experimental::RFrame::GetAttrY ( ) const
inline

Definition at line 218 of file RFrame.hxx.

◆ GetAttrZ()

const RAttrAxis & ROOT::Experimental::RFrame::GetAttrZ ( ) const
inline

Definition at line 222 of file RFrame.hxx.

◆ GetAxisRanges()

void RFrame::GetAxisRanges ( unsigned  ndim,
const RAttrAxis &  axis,
RUserRanges &  ranges 
) const
protected

Internal - extract range for specified axis.

Definition at line 33 of file RFrame.cxx.

◆ GetClientRanges()

void RFrame::GetClientRanges ( unsigned  connid,
RUserRanges &  ranges 
)

Return ranges configured for the client.

Definition at line 114 of file RFrame.cxx.

◆ GetGridX()

bool ROOT::Experimental::RFrame::GetGridX ( ) const
inline

Definition at line 227 of file RFrame.hxx.

◆ GetGridY()

bool ROOT::Experimental::RFrame::GetGridY ( ) const
inline

Definition at line 230 of file RFrame.hxx.

◆ GetMargins()

const RAttrMargins & ROOT::Experimental::RFrame::GetMargins ( ) const
inline

Definition at line 202 of file RFrame.hxx.

◆ GetNDimensions()

size_t ROOT::Experimental::RFrame::GetNDimensions ( ) const
inline

Get the number of axes.

Definition at line 252 of file RFrame.hxx.

◆ GetSwapX()

bool ROOT::Experimental::RFrame::GetSwapX ( ) const
inline

Definition at line 233 of file RFrame.hxx.

◆ GetSwapY()

bool ROOT::Experimental::RFrame::GetSwapY ( ) const
inline

Definition at line 236 of file RFrame.hxx.

◆ GetTicksX()

int ROOT::Experimental::RFrame::GetTicksX ( ) const
inline

Definition at line 240 of file RFrame.hxx.

◆ GetTicksY()

int ROOT::Experimental::RFrame::GetTicksY ( ) const
inline

Definition at line 244 of file RFrame.hxx.

◆ GetUserAxis()

RPadUserAxisBase & ROOT::Experimental::RFrame::GetUserAxis ( size_t  dimension) const
inline

Get the current user coordinate system for a given dimension.

Definition at line 255 of file RFrame.hxx.

◆ GrowToDimensions()

void RFrame::GrowToDimensions ( size_t  nDimensions)

Create nDimensions default axes for the user coordinate system.

Deprecated, to be removed soon.

Definition at line 60 of file RFrame.cxx.

◆ Margins()

RAttrMargins & ROOT::Experimental::RFrame::Margins ( )
inline

Definition at line 204 of file RFrame.hxx.

◆ operator=()

RFrame & ROOT::Experimental::RFrame::operator= ( const RFrame &  )
privatedelete

◆ PopulateMenu()

void RFrame::PopulateMenu ( RMenuItems &  )
overrideprotectedvirtual

Provide context menu items.

Reimplemented from ROOT::Experimental::RDrawable.

Definition at line 74 of file RFrame.cxx.

◆ SetAttrBorder()

RFrame & ROOT::Experimental::RFrame::SetAttrBorder ( const RAttrLine &  border)
inline

Definition at line 207 of file RFrame.hxx.

◆ SetAttrFill()

RFrame & ROOT::Experimental::RFrame::SetAttrFill ( const RAttrFill &  fill)
inline

Definition at line 211 of file RFrame.hxx.

◆ SetAttrX()

RFrame & ROOT::Experimental::RFrame::SetAttrX ( const RAttrAxis &  axis)
inline

Definition at line 215 of file RFrame.hxx.

◆ SetAttrY()

RFrame & ROOT::Experimental::RFrame::SetAttrY ( const RAttrAxis &  axis)
inline

Definition at line 219 of file RFrame.hxx.

◆ SetAttrZ()

RFrame & ROOT::Experimental::RFrame::SetAttrZ ( const RAttrAxis &  axis)
inline

Definition at line 223 of file RFrame.hxx.

◆ SetClientRanges()

void RFrame::SetClientRanges ( unsigned  connid,
const RUserRanges &  ranges,
bool  ismainconn 
)
private

Remember client range, can be used for drawing or stats box calculations.

Definition at line 94 of file RFrame.cxx.

◆ SetGridX()

RFrame & ROOT::Experimental::RFrame::SetGridX ( bool  on = true)
inline

Definition at line 226 of file RFrame.hxx.

◆ SetGridY()

RFrame & ROOT::Experimental::RFrame::SetGridY ( bool  on = true)
inline

Definition at line 229 of file RFrame.hxx.

◆ SetMargins()

RFrame & ROOT::Experimental::RFrame::SetMargins ( const RAttrMargins &  margins)
inline

Definition at line 203 of file RFrame.hxx.

◆ SetSwapX()

RFrame & ROOT::Experimental::RFrame::SetSwapX ( bool  on = true)
inline

Definition at line 232 of file RFrame.hxx.

◆ SetSwapY()

RFrame & ROOT::Experimental::RFrame::SetSwapY ( bool  on = true)
inline

Definition at line 235 of file RFrame.hxx.

◆ SetTicksX()

RFrame & ROOT::Experimental::RFrame::SetTicksX ( int  v = 1)
inline

Configure X ticks drawing 0 - off, 1 - as configured for axis, 2 - both sides, 3 - labels on both side.

Definition at line 239 of file RFrame.hxx.

◆ SetTicksY()

RFrame & ROOT::Experimental::RFrame::SetTicksY ( int  v = 1)
inline

Configure Y ticks drawing 0 - off, 1 - as configured for axis, 2 - both sides, 3 - labels on both side.

Definition at line 243 of file RFrame.hxx.

◆ SetUserAxis()

void ROOT::Experimental::RFrame::SetUserAxis ( std::vector< std::unique_ptr< RPadUserAxisBase > > &&  axes)
inline

Set the user coordinate system.

Definition at line 258 of file RFrame.hxx.

◆ UserToNormal()

std::array< RPadLength::Normal, 2 > ROOT::Experimental::RFrame::UserToNormal ( const std::array< RPadLength::User, 2 > &  pos) const
inline

Convert user coordinates to normal coordinates.

Definition at line 261 of file RFrame.hxx.

Friends And Related Symbol Documentation

◆ RPadBase

friend class RPadBase
friend

Definition at line 41 of file RFrame.hxx.

Member Data Documentation

◆ fAttrBorder

RAttrLine ROOT::Experimental::RFrame::fAttrBorder {this, "border"}
private

! line attributes for border

Definition at line 148 of file RFrame.hxx.

◆ fAttrFill

RAttrFill ROOT::Experimental::RFrame::fAttrFill {this, "fill"}
private

! fill attributes for the frame

Definition at line 149 of file RFrame.hxx.

◆ fAttrX

RAttrAxis ROOT::Experimental::RFrame::fAttrX {this, "x"}
private

! drawing attributes for X axis

Definition at line 150 of file RFrame.hxx.

◆ fAttrY

RAttrAxis ROOT::Experimental::RFrame::fAttrY {this, "y"}
private

! drawing attributes for Y axis

Definition at line 151 of file RFrame.hxx.

◆ fAttrZ

RAttrAxis ROOT::Experimental::RFrame::fAttrZ {this, "z"}
private

! drawing attributes for Z axis

Definition at line 152 of file RFrame.hxx.

◆ fClientRanges

std::map<unsigned, RUserRanges> ROOT::Experimental::RFrame::fClientRanges
private

! individual client ranges

Definition at line 159 of file RFrame.hxx.

◆ fGridX

RAttrValue<bool> ROOT::Experimental::RFrame::fGridX {this, "gridx", false}
private

! show grid for X axis

Definition at line 153 of file RFrame.hxx.

◆ fGridY

RAttrValue<bool> ROOT::Experimental::RFrame::fGridY {this, "gridy", false}
private

! show grid for Y axis

Definition at line 154 of file RFrame.hxx.

◆ fMargins

RAttrMargins ROOT::Experimental::RFrame::fMargins {this, "margin"}
private

! frame margins relative to pad

Definition at line 147 of file RFrame.hxx.

◆ fSwapX

RAttrValue<bool> ROOT::Experimental::RFrame::fSwapX {this, "swapx", false}
private

! swap position of X axis

Definition at line 155 of file RFrame.hxx.

◆ fSwapY

RAttrValue<bool> ROOT::Experimental::RFrame::fSwapY {this, "swapy", false}
private

! swap position of Y axis

Definition at line 156 of file RFrame.hxx.

◆ fTicksX

RAttrValue<int> ROOT::Experimental::RFrame::fTicksX {this, "ticksx", 1}
private

! X ticks drawing:

Definition at line 157 of file RFrame.hxx.

◆ fTicksY

RAttrValue<int> ROOT::Experimental::RFrame::fTicksY {this, "ticksy", 1}
private

! Y ticks drawing

Definition at line 158 of file RFrame.hxx.

◆ fUserCoord

std::vector<std::unique_ptr<RPadUserAxisBase> > ROOT::Experimental::RFrame::fUserCoord
private

Mapping of user coordinates to normal coordinates, one entry per dimension.

Definition at line 162 of file RFrame.hxx.

Libraries for ROOT::Experimental::RFrame:

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