![]() |
|
User-friendly programming interface for alignment considering two elements. More...
#include <AlignSVG.h>


Public Types | |
| enum | Owner { OBJECT = 0 , ANCHOR = 1 } |
| typedef Alignment< const AlignBase::Axis, AlignBase::Axis::HORZ > | HorzAlign |
| typedef Alignment< const AlignBase::Axis, AlignBase::Axis::VERT > | VertAlign |
Public Member Functions | |
| template<typename OBJ , typename A , typename V > | |
| void | setAlign (const OBJ &owner, const A &axis, const V &value) |
| Low-level, "atomic" setter of alignment for OBJECT itself or its ANCHOR object. | |
| void | setAlign (const AlignBase::Axis &axis, const AlignBase::Pos &pos, MutualAlign::Topol topol=MutualAlign::Topol::INSIDE) |
| Set a single alignment setting. "Intermediate-level": axis and pos are given separately. | |
| template<typename ... T, typename AX , AlignBase::Axis A> | |
| void | setAlign (const Alignment< AX, A > &align, const T... args) |
| NEW High-level, user friendlier interface for setting INSIDE the alignments for both OBJECT itself and its ANCHOR object. | |
| template<typename AX1 , AlignBase::Axis A1, typename AX2 , AlignBase::Axis A2> | |
| void | setAlign (const Alignment< AX1, A1 > &align1, const Alignment< AX2, A2 > &align2) |
| template<typename AX1 , AlignBase::Axis A1> | |
| void | setAlign (const CompleteAlignment< AX1, A1 > &align1) |
| template<typename AX , AlignBase::Axis A> | |
| void | setAlign (const Alignment< AX, A > &align1, const Alignment< AX, A > &align2) |
Compiler trap: unimplemented for two of same kind: either HorzAlign or VertAlign twice. | |
| template<typename T > | |
| void | setAlign (const std::string &align, const T &topol) |
| High-level, user friendlier interface for setting the alignments for both OBJECT itself and its ANCHOR object. | |
| void | setAlign (const std::string &align) |
| High-level, user friendly interface for setting the alignments for both OBJECT itself and its ANCHOR object. | |
| bool | isAligned () const |
| Returns true, if any setting is set... | |
| void | resetAlign () |
| void | swapAlign (AlignSVG &align) |
| template<typename P , typename A > | |
| AlignBase::Pos & | getAlignPos (const P &pos, const A &axis) |
| Return alignment setting of an object along horizontal or vertical axis . | |
| template<typename P , typename A > | |
| const AlignBase::Pos & | getAlignPos (const P &pos, const A &axis) const |
| Return alignment setting of an object along horizontal or vertical axis . | |
| void | confToStream (std::ostream &ostr) const |
| const std::string & | getAlignStr () const |
| void | swapAlign () |
| template<typename OBJ , typename A > | |
| AlignBase::Pos & | getAlignPos (const OBJ &owner, const A &axis) |
| template<typename OBJ , typename A > | |
| const AlignBase::Pos & | getAlignPos (const OBJ &owner, const A &axis) const |
Static Public Attributes | |
| static const HorzAlign | LEFT |
| Alias for {HORZ:MIN}. | |
| static const HorzAlign | CENTER |
| Alias for {HORZ:MID}. | |
| static const HorzAlign | RIGHT |
| Alias for {HORZ:MAX}. | |
| static const HorzAlign | HORZ_FILL |
| Alias for {HORZ:FILL}. | |
| static const HorzAlign | UNDEFINED_HORZ |
| static const VertAlign | TOP |
| Alias for {VERT:MIN}. | |
| static const VertAlign | MIDDLE |
| Alias for {VERT:MID}. | |
| static const VertAlign | BOTTOM |
| Alias for {VERT:MAX}. | |
| static const VertAlign | VERT_FILL |
| Alias for {VERT:FILL}. | |
| static const VertAlign | UNDEFINED_VERT |
Protected Types | |
| typedef int | bitvect_t |
| typedef std::vector< AlignBase::Pos > | align_vect_t |
| typedef std::vector< align_vect_t > | align_conf_t |
Protected Attributes | |
| bitvect_t | alignment = 0 |
| std::string | alignStr |
| align_conf_t | alignments = align_conf_t(2, align_vect_t(2, AlignBase::Pos::UNDEFINED_POS)) |
User-friendly programming interface for alignment considering two elements.
Designed to be contained by SVG elements. Considers two elements, or more specifically, the bounding boxes of two elements.
TODO: insert CompleteAlign above this
| void confToStream | ( | std::ostream & | ostr | ) | const |
For some reason, toStream() conflicts with: drain::NodeXML<T>::toStream(std::ostream&, const T&, const string&, int)
|
inline |
Set a single alignment setting. "Intermediate-level": axis and pos are given separately.
| topol | - INSIDE or OUTSIDE |
| axis | - HORZ or VERT |
| pos | - MIN , MID , or MAX |
Used by file-svg.cpp
| void setAlign | ( | const std::string & | align | ) |
High-level, user friendly interface for setting the alignments for both OBJECT itself and its ANCHOR object.
Handler for command line or configuration file arguments.
Handler for command line or configuration file arguments
1.9.8