28namespace Experimental {
72 if (ndim*2 >
values.size()) {
74 flags.resize(ndim*2,
false);
82 void AssignMin(
unsigned ndim,
double value,
bool force =
false)
84 if (!
HasMin(ndim) || force) {
91 bool HasMax(
unsigned ndim)
const {
return (ndim*2+1 <
flags.size()) &&
flags[ndim*2+1]; }
92 double GetMax(
unsigned ndim)
const {
return (ndim*2+1 <
values.size()) ?
values[ndim*2+1] : 0.; }
95 void AssignMax(
unsigned ndim,
double value,
bool force =
false)
97 if (!
HasMax(ndim) || force) {
100 flags[ndim*2+1] =
true;
107 return (ndim*2+1 <
flags.size()) && (ndim*2+1 <
values.size()) &&
115 for (
auto fl :
flags)
150 explicit RFrame(std::vector<std::unique_ptr<RPadUserAxisBase>> &&coords);
152 void SetClientRanges(
unsigned connid,
const RUserRanges &ranges,
bool ismainconn);
167 std::unique_ptr<RDrawableReply>
Process()
override
223 std::array<RPadLength::Normal, 2>
UserToNormal(
const std::array<RPadLength::User, 2> &pos)
const
All kind of drawing a axis: line, text, ticks, min/max, log, invert, ...
Base class for all attributes, used with RDrawable.
void SetValue(const std::string &name, bool value)
Set boolean value.
T GetValue(const std::string &name) const
Drawing fill attributes for different objects.
Drawing line attributes for different objects.
A margins attributes. Only relative and pixel coordinates are allowed.
Base class for requests which can be submitted from the clients.
const RDrawable::RDisplayContext & GetContext() const
unsigned GetConnId() const
RDrawable * GetDrawable() const
Base class for drawable entities: objects that can be painted on a RPad.
R__ATTR_CLASS(RFrameAttrs, "", AddBool("gridx", false).AddBool("gridy", false))
bool IsUnzoom(unsigned ndim) const
Returns true if axis configured as unzoomed, can be specified from client.
bool HasMin(unsigned ndim) const
RUserRanges(double xmin, double xmax, double ymin, double ymax)
void AssignMin(unsigned ndim, double value, bool force=false)
bool HasMax(unsigned ndim) const
std::vector< double > values
min/max values for all dimensions
double GetMax(unsigned ndim) const
void AssignMax(unsigned ndim, double value, bool force=false)
RUserRanges(double xmin, double xmax)
std::vector< bool > flags
flag if values available
double GetMin(unsigned ndim) const
void Extend(unsigned ndim=3)
std::unique_ptr< RDrawableReply > Process() override
Holds an area where drawing on user coordinate-system can be performed.
std::array< RPadLength::Normal, 2 > UserToNormal(const std::array< RPadLength::User, 2 > &pos) const
Convert user coordinates to normal coordinates.
RFrame & SetAttrX(const RAttrAxis &axis)
RFrame & SetGridX(bool on=true)
std::map< unsigned, RUserRanges > fClientRanges
! individual client ranges
const RAttrAxis & GetAttrY() const
RFrame & SetAttrFill(const RAttrFill &fill)
RFrame(const RFrame &)=delete
const RAttrAxis & GetAttrZ() const
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.
RFrame & SetMargins(const RAttrMargins &margins)
const RAttrAxis & GetAttrX() const
void GetClientRanges(unsigned connid, RUserRanges &ranges)
Return ranges configured for the client.
RFrame & operator=(const RFrame &)=delete
size_t GetNDimensions() const
Get the number of axes.
void SetUserAxis(std::vector< std::unique_ptr< RPadUserAxisBase > > &&axes)
Set the user coordinate system.
RFrame & SetAttrZ(const RAttrAxis &axis)
const RAttrMargins & GetMargins() const
const RAttrFill & GetAttrFill() const
const RAttrLine & GetAttrBorder() const
std::vector< std::unique_ptr< RPadUserAxisBase > > fUserCoord
Mapping of user coordinates to normal coordinates, one entry per dimension.
RFrame & SetAttrBorder(const RAttrLine &border)
RPadUserAxisBase & GetUserAxis(size_t dimension) const
Get the current user coordinate system for a given dimension.
void SetClientRanges(unsigned connid, const RUserRanges &ranges, bool ismainconn)
Remember client range, can be used for drawing or stats box calculations.
RFrame & SetAttrY(const RAttrAxis &axis)
void PopulateMenu(RMenuItems &) override
Provide context menu items.
RFrameAttrs fAttr
! own frame attributes
RFrame & SetGridY(bool on=true)
void GrowToDimensions(size_t nDimensions)
Create nDimensions default axes for the user coordinate system.
Base class for graphic containers for RDrawable-s.
Base class for user coordinates (e.g.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...