OpenLexocad  28.0
OpenLxUI::UIDocument Class Reference

#include <UIDocument.h>

Public Types

enum  SnapMode {
  NOPOINT = 1 << 1, NEARESTPOINT = 1 << 2, MIDPOINT = 1 << 3, ENDPOINT = 1 << 4,
  GRIDPOINT = 1 << 5, BBOXPOINT = 1 << 6, INTERSECTIONPOINT = 1 << 7, EDGEPOINT = 1 << 8,
  ONLYVERTICES = 1 << 9, ONLYVIRTUALGEO = 1 << 10, CONTROLPOINT = 1 << 11, INVISIBLECONTROLPOINT = 1 << 12,
  AUXILIARYPOINT = 1 << 13
}
 
enum  Justification { Justification::LEFT = 1, Justification::RIGHT, Justification::CENTER }
 

Public Member Functions

std::shared_ptr< OpenLxApp::DocumentgetDocument () const
 
std::shared_ptr< OpenLxUI::SelectiongetSelection () const
 
std::shared_ptr< OpenLxUI::UIElementgetUIElement (std::shared_ptr< OpenLxApp::DocObject > aObj) const
 
std::shared_ptr< OpenLxUI::UIElementgetUIElement (Core::DocObject *aObj) const
 
bool pickPoint ()
 
Geom::Pnt getPickedPoint ()
 
std::shared_ptr< OpenLxApp::ElementgetPickedElement ()
 
bool hasPickedNormal ()
 
Geom::Dir getPickedNormal ()
 
Gui::PickingService * getPickingService ()
 
void setIntersectionPicking (bool onoff)
 
bool isIntersectionPickingEnabled ()
 
unsigned long getSnapMode ()
 
unsigned long getSnapfor2dElements ()
 
void setSnapMode (unsigned long mode)
 
void moveMouseToWorldPnt (const Geom::Pnt &pntTo)
 
std::shared_ptr< OpenLxApp::CartesianPointgetMidPoint (unsigned long snapMode)
 
void drawRubberBand (const Geom::Pnt &fromPnt)
 
void removeRubberBand ()
 
void highlightByShapeType (Topo::ShapeType shapeType)
 
void stopHighlightByShapeType ()
 
void drawElementPositionPreview (std::shared_ptr< OpenLxApp::Element > aElem, const Geom::Pnt &startPnt)
 
void hideElementAttributesInViewer ()
 
Gui::AbstractTangentArcPreview * createTangentArcPreview (const Geom::Pnt &pnt, const Geom::Vec &tangent)
 
Gui::AbstractLinePreview * createLinePreview (const Geom::Pnt &startPnt)
 
Gui::AbstractArc3PointsPreview * createArc3PointsPreview (const Geom::Pnt &startPnt, const Geom::Pnt &fixedPnt, Gui::AbstractArc3PointsPreview::PreviewMode mode=Gui::AbstractArc3PointsPreview::ENDPOINT_CHANGES)
 
void drawPreview (Gui::AbstractPreview *preview)
 
void removePreview (Gui::AbstractPreview *preview)
 
void removeAllPreviews ()
 
void getAllPreviews (std::set< Gui::AbstractPreview * > &pw)
 
void enablePreview (Gui::AbstractPreview *preview)
 
void disablePreview (Gui::AbstractPreview *preview)
 
void drawAngle (const Geom::Pnt &center, const Geom::Dir &normal, double angle)
 
void removeAngle ()
 
Gui::SG_Node drawOwnText2 (const Geom::Pnt &pnt, const Base::String &text, const Base::Color &color=Base::Color(255, 0, 0), float fontSize=32, const Base::String &fontName=Base::String(L"Arial"), bool bold=false, Justification ju=Justification::CENTER)
 
Gui::SG_Node drawOwnText2 (const std::vector< Geom::Pnt > &pnts, const Base::String &text, const Base::Color &color=Base::Color(255, 0, 0), float fontSize=32, const Base::String &fontName=Base::String(L"Arial"), bool bold=false, Justification ju=Justification::CENTER)
 
void removeOwnText2 (Gui::SG_Node aNode)
 
void drawHelpPoint (const Geom::Pnt &p)
 
void drawHelpVector (const Geom::Pnt &p, const Geom::Vec &v)
 
void drawHelpAx2 (const Geom::Ax2 &axis2, const double &magnitude)
 
void removeHelpObjects ()
 
Gui::SG_Node drawOwnDirection (const Geom::Pnt &pnt, const Geom::Dir &dir, const Base::Color &color=Base::Color(255, 0, 0))
 
Gui::SG_Node drawOwnDirectionToPoint (const Geom::Pnt &pnt, const Geom::Dir &dir, const Base::Color &color=Base::Color(255, 0, 0))
 
void removeOwnDirection (Gui::SG_Node ownDirection)
 
Gui::SG_Node drawOwnLine (const std::vector< Geom::Pnt > &pnts, int thickenss, const Base::Color &color=Base::Color(255, 0, 0), bool dashed=false)
 
Gui::SG_Node drawOwnOverlayLine (const std::vector< Geom::Pnt > &pnts, int thickenss, const Base::Color &color=Base::Color(255, 0, 0), bool dashed=false)
 
void removeOwnLine (Gui::SG_Node ownLine)
 
Gui::SG_Node drawOwnMesh (const std::vector< Geom::Pnt > &points, const std::vector< int > &model, const Base::Color &color, int transparency, const Base::Color &emissiveColor=Base::Color(0, 0, 0))
 
void removeOwnMesh (Gui::SG_Node ownMesh)
 
void drawAuxiliaryLine (const Geom::Pnt &orgin, const Geom::Dir &dir)
 
void drawHelpPointMeasure (const std::string &name, const Geom::Pnt &pos, float red=1.0f, float green=1.0f, float blue=0.0f)
 
void removeHelpPointsMeasure ()
 
std::vector< std::shared_ptr< OpenLxApp::Element > > getVisibleElements () const
 
std::vector< std::shared_ptr< OpenLxApp::Element > > getSelectedElements () const
 
std::shared_ptr< OpenLxApp::ElementgetActiveElement () const
 
std::shared_ptr< OpenLxApp::SubElementgetActiveSubElement () const
 
bool hasActivePoint () const
 
Geom::Pnt getActivePoint () const
 
std::shared_ptr< ActiveVertexgetActiveVertex () const
 
std::shared_ptr< ActiveEdgegetActiveEdge () const
 
std::shared_ptr< ActiveFacegetActiveFace () const
 
 ~UIDocument ()
 

Static Public Member Functions

static bool getPlaneMode (Geom::Pln &p)
 

Friends

class UIApplication
 

Detailed Description

Since
24.0

Member Enumeration Documentation

◆ Justification

Enumerator
LEFT 
RIGHT 
CENTER 

◆ SnapMode

Enumerator
NOPOINT 
NEARESTPOINT 
MIDPOINT 
ENDPOINT 
GRIDPOINT 
BBOXPOINT 
INTERSECTIONPOINT 
EDGEPOINT 
ONLYVERTICES 
ONLYVIRTUALGEO 
CONTROLPOINT 
INVISIBLECONTROLPOINT 
AUXILIARYPOINT 

Constructor & Destructor Documentation

◆ ~UIDocument()

OpenLxUI::UIDocument::~UIDocument ( )

Member Function Documentation

◆ createArc3PointsPreview()

Gui::AbstractArc3PointsPreview* OpenLxUI::UIDocument::createArc3PointsPreview ( const Geom::Pnt startPnt,
const Geom::Pnt fixedPnt,
Gui::AbstractArc3PointsPreview::PreviewMode  mode = Gui::AbstractArc3PointsPreview::ENDPOINT_CHANGES 
)

◆ createLinePreview()

Gui::AbstractLinePreview* OpenLxUI::UIDocument::createLinePreview ( const Geom::Pnt startPnt)

◆ createTangentArcPreview()

Gui::AbstractTangentArcPreview* OpenLxUI::UIDocument::createTangentArcPreview ( const Geom::Pnt pnt,
const Geom::Vec tangent 
)

◆ disablePreview()

void OpenLxUI::UIDocument::disablePreview ( Gui::AbstractPreview *  preview)

◆ drawAngle()

void OpenLxUI::UIDocument::drawAngle ( const Geom::Pnt center,
const Geom::Dir normal,
double  angle 
)

◆ drawAuxiliaryLine()

void OpenLxUI::UIDocument::drawAuxiliaryLine ( const Geom::Pnt orgin,
const Geom::Dir dir 
)

◆ drawElementPositionPreview()

void OpenLxUI::UIDocument::drawElementPositionPreview ( std::shared_ptr< OpenLxApp::Element aElem,
const Geom::Pnt startPnt 
)

◆ drawHelpAx2()

void OpenLxUI::UIDocument::drawHelpAx2 ( const Geom::Ax2 axis2,
const double &  magnitude 
)

◆ drawHelpPoint()

void OpenLxUI::UIDocument::drawHelpPoint ( const Geom::Pnt p)

◆ drawHelpPointMeasure()

void OpenLxUI::UIDocument::drawHelpPointMeasure ( const std::string &  name,
const Geom::Pnt pos,
float  red = 1.0f,
float  green = 1.0f,
float  blue = 0.0f 
)

◆ drawHelpVector()

void OpenLxUI::UIDocument::drawHelpVector ( const Geom::Pnt p,
const Geom::Vec v 
)

◆ drawOwnDirection()

Gui::SG_Node OpenLxUI::UIDocument::drawOwnDirection ( const Geom::Pnt pnt,
const Geom::Dir dir,
const Base::Color color = Base::Color(255, 0, 0) 
)

◆ drawOwnDirectionToPoint()

Gui::SG_Node OpenLxUI::UIDocument::drawOwnDirectionToPoint ( const Geom::Pnt pnt,
const Geom::Dir dir,
const Base::Color color = Base::Color(255, 0, 0) 
)

◆ drawOwnLine()

Gui::SG_Node OpenLxUI::UIDocument::drawOwnLine ( const std::vector< Geom::Pnt > &  pnts,
int  thickenss,
const Base::Color color = Base::Color(255, 0, 0),
bool  dashed = false 
)

◆ drawOwnMesh()

Gui::SG_Node OpenLxUI::UIDocument::drawOwnMesh ( const std::vector< Geom::Pnt > &  points,
const std::vector< int > &  model,
const Base::Color color,
int  transparency,
const Base::Color emissiveColor = Base::Color(0, 0, 0) 
)

◆ drawOwnOverlayLine()

Gui::SG_Node OpenLxUI::UIDocument::drawOwnOverlayLine ( const std::vector< Geom::Pnt > &  pnts,
int  thickenss,
const Base::Color color = Base::Color(255, 0, 0),
bool  dashed = false 
)

◆ drawOwnText2() [1/2]

Gui::SG_Node OpenLxUI::UIDocument::drawOwnText2 ( const Geom::Pnt pnt,
const Base::String text,
const Base::Color color = Base::Color(255, 0, 0),
float  fontSize = 32,
const Base::String fontName = Base::String(L"Arial"),
bool  bold = false,
Justification  ju = Justification::CENTER 
)

◆ drawOwnText2() [2/2]

Gui::SG_Node OpenLxUI::UIDocument::drawOwnText2 ( const std::vector< Geom::Pnt > &  pnts,
const Base::String text,
const Base::Color color = Base::Color(255, 0, 0),
float  fontSize = 32,
const Base::String fontName = Base::String(L"Arial"),
bool  bold = false,
Justification  ju = Justification::CENTER 
)

◆ drawPreview()

void OpenLxUI::UIDocument::drawPreview ( Gui::AbstractPreview *  preview)

◆ drawRubberBand()

void OpenLxUI::UIDocument::drawRubberBand ( const Geom::Pnt fromPnt)

◆ enablePreview()

void OpenLxUI::UIDocument::enablePreview ( Gui::AbstractPreview *  preview)

◆ getActiveEdge()

std::shared_ptr<ActiveEdge> OpenLxUI::UIDocument::getActiveEdge ( ) const

◆ getActiveElement()

std::shared_ptr<OpenLxApp::Element> OpenLxUI::UIDocument::getActiveElement ( ) const

◆ getActiveFace()

std::shared_ptr<ActiveFace> OpenLxUI::UIDocument::getActiveFace ( ) const

◆ getActivePoint()

Geom::Pnt OpenLxUI::UIDocument::getActivePoint ( ) const

◆ getActiveSubElement()

std::shared_ptr<OpenLxApp::SubElement> OpenLxUI::UIDocument::getActiveSubElement ( ) const

◆ getActiveVertex()

std::shared_ptr<ActiveVertex> OpenLxUI::UIDocument::getActiveVertex ( ) const

◆ getAllPreviews()

void OpenLxUI::UIDocument::getAllPreviews ( std::set< Gui::AbstractPreview * > &  pw)

◆ getDocument()

std::shared_ptr<OpenLxApp::Document> OpenLxUI::UIDocument::getDocument ( ) const

◆ getMidPoint()

std::shared_ptr<OpenLxApp::CartesianPoint> OpenLxUI::UIDocument::getMidPoint ( unsigned long  snapMode)

◆ getPickedElement()

std::shared_ptr<OpenLxApp::Element> OpenLxUI::UIDocument::getPickedElement ( )

◆ getPickedNormal()

Geom::Dir OpenLxUI::UIDocument::getPickedNormal ( )

◆ getPickedPoint()

Geom::Pnt OpenLxUI::UIDocument::getPickedPoint ( )

◆ getPickingService()

Gui::PickingService* OpenLxUI::UIDocument::getPickingService ( )

◆ getPlaneMode()

static bool OpenLxUI::UIDocument::getPlaneMode ( Geom::Pln p)
static

◆ getSelectedElements()

std::vector<std::shared_ptr<OpenLxApp::Element> > OpenLxUI::UIDocument::getSelectedElements ( ) const

◆ getSelection()

std::shared_ptr<OpenLxUI::Selection> OpenLxUI::UIDocument::getSelection ( ) const

◆ getSnapfor2dElements()

unsigned long OpenLxUI::UIDocument::getSnapfor2dElements ( )

◆ getSnapMode()

unsigned long OpenLxUI::UIDocument::getSnapMode ( )

◆ getUIElement() [1/2]

std::shared_ptr<OpenLxUI::UIElement> OpenLxUI::UIDocument::getUIElement ( Core::DocObject aObj) const

◆ getUIElement() [2/2]

std::shared_ptr<OpenLxUI::UIElement> OpenLxUI::UIDocument::getUIElement ( std::shared_ptr< OpenLxApp::DocObject aObj) const

◆ getVisibleElements()

std::vector<std::shared_ptr<OpenLxApp::Element> > OpenLxUI::UIDocument::getVisibleElements ( ) const

◆ hasActivePoint()

bool OpenLxUI::UIDocument::hasActivePoint ( ) const

◆ hasPickedNormal()

bool OpenLxUI::UIDocument::hasPickedNormal ( )

◆ hideElementAttributesInViewer()

void OpenLxUI::UIDocument::hideElementAttributesInViewer ( )

◆ highlightByShapeType()

void OpenLxUI::UIDocument::highlightByShapeType ( Topo::ShapeType  shapeType)

◆ isIntersectionPickingEnabled()

bool OpenLxUI::UIDocument::isIntersectionPickingEnabled ( )

◆ moveMouseToWorldPnt()

void OpenLxUI::UIDocument::moveMouseToWorldPnt ( const Geom::Pnt pntTo)

◆ pickPoint()

bool OpenLxUI::UIDocument::pickPoint ( )

◆ removeAllPreviews()

void OpenLxUI::UIDocument::removeAllPreviews ( )

◆ removeAngle()

void OpenLxUI::UIDocument::removeAngle ( )

◆ removeHelpObjects()

void OpenLxUI::UIDocument::removeHelpObjects ( )

◆ removeHelpPointsMeasure()

void OpenLxUI::UIDocument::removeHelpPointsMeasure ( )

◆ removeOwnDirection()

void OpenLxUI::UIDocument::removeOwnDirection ( Gui::SG_Node  ownDirection)

◆ removeOwnLine()

void OpenLxUI::UIDocument::removeOwnLine ( Gui::SG_Node  ownLine)

◆ removeOwnMesh()

void OpenLxUI::UIDocument::removeOwnMesh ( Gui::SG_Node  ownMesh)

◆ removeOwnText2()

void OpenLxUI::UIDocument::removeOwnText2 ( Gui::SG_Node  aNode)

◆ removePreview()

void OpenLxUI::UIDocument::removePreview ( Gui::AbstractPreview *  preview)

◆ removeRubberBand()

void OpenLxUI::UIDocument::removeRubberBand ( )

◆ setIntersectionPicking()

void OpenLxUI::UIDocument::setIntersectionPicking ( bool  onoff)

◆ setSnapMode()

void OpenLxUI::UIDocument::setSnapMode ( unsigned long  mode)

◆ stopHighlightByShapeType()

void OpenLxUI::UIDocument::stopHighlightByShapeType ( )

Friends And Related Function Documentation

◆ UIApplication

friend class UIApplication
friend

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