Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
GraphicsContext Class Referenceabstract
Inheritance diagram for GraphicsContext:
Inheritance graph
[legend]
Collaboration diagram for GraphicsContext:
Collaboration graph
[legend]

Public Member Functions

 GraphicsContext ()
 Default constructor.
 
 GraphicsContext (const GraphicsContext &ctx)
 Copy constructor.
 
virtual ~GraphicsContext ()
 Destructor.
 
drain::image::TreeSVG & getSVG ()
 
void ensureScript (const std::string &label, const std::string &code)
 Reserve slot for JavaScript code.
 
drain::image::TreeSVG & getStyle ()
 Some SVG style classes. Identifiers for IMAGE and RECT elements over which TEXT elements will be aligned.
 
drain::image::TreeSVG & ensureOnLoad (const std::string &function)
 
drain::image::TreeSVG & getJavaScriptDefs ()
 
drain::image::TreeSVG & addJavaScripsDef (const std::string &key, const std::string &section="cls")
 key => Rack.cls.key = 'key';
 
bool consumeAlignRequest (drain::image::NodeSVG &node)
 Some SVG style classes. Identifiers for IMAGE and RECT elements over which TEXT elements will be aligned.
 
bool applyInclusion (const drain::FilePath &filepath)
 
drain::image::TreeSVG & getCurrentAdapterGroup ()
 
drain::image::TreeSVG & getImagePanelGroup (const drain::FilePath &filepath, bool unique=false)
 Applicable for PNG images.
 
drain::image::TreeSVG & getImagePanelGroup ()
 Returns the last applicable.
 
drain::image::TreeSVG & getImagePanelGroup (const drain::Frame2D< int > &frame)
 
drain::image::TreeSVG & getMainGroup ()
 Top-level GROUP used by Rack. All the graphic elements will be created inside this element.
 

Static Public Member Functions

static drain::image::TreeSVG & ensureAdapterGroup (drain::image::TreeSVG &group)
 

Public Attributes

drain::image::TreeSVG svgTrack
 
ConfSVG svgPanelConf
 
AlignBase::Axis mainOrientation = AlignBase::Axis::HORZ
 
LayoutSVG::DirectionHorz mainDirectionHorz = LayoutSVG::DirectionHorz::RIGHT
 
LayoutSVG::DirectionVert mainDirectionVert = LayoutSVG::DirectionVert::DOWN
 
CompleteAlignment< const AlignBase::Axis, AlignBase::Axis::HORZ > alignHorz = {MutualAlign::Topol::INSIDE, AlignBase::Pos::UNDEFINED_POS}
 
CompleteAlignment< const AlignBase::Axis, AlignBase::Axis::VERT > alignVert = {MutualAlign::Topol::INSIDE, AlignBase::Pos::UNDEFINED_POS}
 
AlignAnchorSVG::anchor_t anchorHorz
 
AlignAnchorSVG::anchor_t anchorVert
 
std::string currentImagePanel
 

Protected Member Functions

virtual drain::image::TreeSVG & getStackedGroup ()=0
 

Member Function Documentation

◆ addJavaScripsDef()

drain::image::TreeSVG & addJavaScripsDef ( const std::string &  key,
const std::string &  section = "cls" 
)

key => Rack.cls.key = 'key';

TODO template

◆ consumeAlignRequest()

bool consumeAlignRequest ( drain::image::NodeSVG &  node)

Some SVG style classes. Identifiers for IMAGE and RECT elements over which TEXT elements will be aligned.

Returns
true , if any alignment setting was given.

◆ ensureAdapterGroup()

drain::image::TreeSVG & ensureAdapterGroup ( drain::image::TreeSVG &  group)
static

Intermediate group "hiding" translation that moves upper left corner of the object to the origin.

◆ ensureScript()

void ensureScript ( const std::string &  label,
const std::string &  code 
)
inline

Reserve slot for JavaScript code.

For consistency, the label should be same as the filename (base). For example, if the code is in file "js/mouse_listener.h", the label should be "mouse_listener"

◆ getJavaScriptDefs()

drain::image::TreeSVG & getJavaScriptDefs ( )

// static Rack = { cls = {},

} Rack.cls.SELECTOR = 'SELECTOR';

◆ getStyle()

drain::image::TreeSVG & getStyle ( )
inline

Some SVG style classes. Identifiers for IMAGE and RECT elements over which TEXT elements will be aligned.

Initialize styles, if undone.


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