Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
ListenerCadMimicEditor Class Reference

#include <ListenerCadMimicEditor.hpp>

Inheritance diagram for ListenerCadMimicEditor:
[legend]
Collaboration diagram for ListenerCadMimicEditor:
[legend]

Classes

struct  Constants
 

Public Member Functions

 ListenerCadMimicEditor (CPanelMimicsEditor *panelEditor)
 
 ~ListenerCadMimicEditor () override
 
 ListenerCadMimicEditor (const ListenerCadMimicEditor &other)=delete
 
 ListenerCadMimicEditor (ListenerCadMimicEditor &&other)=delete
 
ListenerCadMimicEditoroperator= (const ListenerCadMimicEditor &other)=delete
 
ListenerCadMimicEditoroperator= (ListenerCadMimicEditor &&other)=delete
 
void runAddElement (CEventMotion *evt)
 
void runRotate (CEventMotion *evt)
 
void runFindAndReplace (CEventMotion *evt)
 
void runAlignment (CEventMotion *evt)
 
void runEquidistance (CEventMotion *evt)
 
void runCenter (CEventMotion *evt)
 
std::shared_ptr< std::vector< std::shared_ptr< IGraphics > > > beginObjsCatchable () const
 
void deleteObjCaptured ()
 
void drawObjCatchables (uint64_t indView, const std::shared_ptr< std::vector< std::shared_ptr< IGraphics > > > &graphics, iv::eLanguage drawingLanguage)
 
void drawObjCaptured (uint64_t indView, CGraphicsDXF *graphics, iv::eLanguage eLanguage)
 
void endObjCatchables (const std::shared_ptr< std::vector< std::shared_ptr< IGraphics > > > &graphics)
 
void endObjCaptured (CGraphicsDXF *graphics)
 
bool runBegin (CEventMotion *evt)
 
void runClick (CEventMotion *evt)
 
void runClickRelease (CEventMotion *evt)
 
void runKeyPressed (CEventMotion *evt)
 
void runMouseMoved (CEventMotion *evt)
 
bool runEnd (CEventMotion *evt)
 
void runEventMotion (CEventMotion *evt)
 
void runDraw (CEventMotion *evt)
 
void setFlagModify (bool *isFlagModify)
 

Protected Member Functions

virtual bool setHasObjCapturedInfo ()
 
void updateObjsCaptured ()
 
std::shared_ptr< std::vector< std::shared_ptr< AbstractObjCapture > > > getArrayObjsCaptured ()
 

Private Types

enum class  ePrvState {
  None , Dragging , SingleSelecting , WindowsSelecting ,
  CreatingElement
}
 
enum class  EPrvStateOption { STOPPED , MOVING }
 

Private Member Functions

bool runCreatingElement (CEventMotion *evt)
 
bool runDrawCreatingElement (CEventMotion *evt, IGraphics *graphics)
 
std::shared_ptr< std::vector< std::shared_ptr< AbstractObjCapture > > > getInteractableObjects () override
 Retrieves all interactable objects present in the canvas.
 
bool onBeginOption (CEventMotion *evt) override
 Handles the start launch of an interaction option.
 
void onClickWithCapture (CEventMotion *evt, uint64_t indObjCaptured, const std::shared_ptr< AbstractObjCapture > &objCatchable) override
 Handles a click event on a captured object.
 
void onClickWithoutCapture (CEventMotion *evt) override
 Handles a click event when no object is captured.
 
void onClickRelease (CEventMotion *evt) override
 Handles the release of a click event.
 
void onKeyPressed (CEventMotion *evt) override
 Handles a key press event.
 
void onMouseMoved (CEventMotion *evt) override
 Handles the mouse movement event.
 
bool onDrawOption (CEventMotion *evt, IGraphics *graphics) override
 Handles the drawing operation and determines if the canvas needs a redraw.
 
bool onEndOption (CEventMotion *evt) override
 Handles the stop of an interaction option.
 

Private Attributes

ePrvState m_state
 
std::optional< std::shared_ptr< AbstractBuilderMimicElement > > m_newMimicElementBuilder
 
std::optional< iv::math::geometry::Point2dm_newMimicElementFirstPointWorld
 
std::optional< iv::math::geometry::Point2dm_newMimicElementFirstPointRelative
 
std::optional< std::vector< iv::math::geometry::Point2d > > m_newMimicElementPointsWorld
 
std::optional< std::vector< iv::math::geometry::Point2d > > m_newMimicElementPointsRelative
 
std::optional< uint64_t > m_singleSelectionObjIndex
 
std::optional< std::set< uint64_t > > m_selectedObjsIndices
 
std::optional< iv::math::geometry::Point2dm_firstPointArea
 
std::optional< iv::math::geometry::Point2dm_pointBaseOpt
 
std::optional< iv::math::geometry::Point2dm_startPointDrag
 
std::optional< bool > m_isDragging
 
std::optional< std::set< uint64_t > > m_copyingObjsIndices
 
std::optional< iv::types::coordm_pastingPositionOffset
 
CPanelMimicsEditorm_panelRef
 
bool * m_isFlagModifyOpt
 
std::optional< iv::math::geometry::Point2dm_previousMotionCoordinate
 
bool m_hasObjInfo
 
std::optional< uint64_t > m_indObjCapturedOpt
 
std::shared_ptr< std::vector< std::shared_ptr< AbstractObjCapture > > > m_objsCatchableOpt
 

Member Enumeration Documentation

◆ ePrvState

enum class ListenerCadMimicEditor::ePrvState
strongprivate
Enumerator
None 
Dragging 
SingleSelecting 
WindowsSelecting 
CreatingElement 

◆ EPrvStateOption

enum class AbstractListenerOptionCad::EPrvStateOption
strongprivateinherited
Enumerator
STOPPED 
MOVING 

Constructor & Destructor Documentation

◆ ListenerCadMimicEditor() [1/3]

ListenerCadMimicEditor::ListenerCadMimicEditor ( CPanelMimicsEditor * panelEditor)
explicit

◆ ~ListenerCadMimicEditor()

ListenerCadMimicEditor::~ListenerCadMimicEditor ( )
overridedefault

◆ ListenerCadMimicEditor() [2/3]

ListenerCadMimicEditor::ListenerCadMimicEditor ( const ListenerCadMimicEditor & other)
delete

◆ ListenerCadMimicEditor() [3/3]

ListenerCadMimicEditor::ListenerCadMimicEditor ( ListenerCadMimicEditor && other)
delete

Member Function Documentation

◆ beginObjsCatchable()

std::shared_ptr< std::vector< std::shared_ptr< IGraphics > > > AbstractListenerOptionCad::beginObjsCatchable ( ) const
inherited

◆ deleteObjCaptured()

void AbstractListenerOptionCad::deleteObjCaptured ( )
inherited

◆ drawObjCaptured()

void AbstractListenerOptionCad::drawObjCaptured ( uint64_t indView,
CGraphicsDXF * graphics,
iv::eLanguage eLanguage )
inherited

◆ drawObjCatchables()

void AbstractListenerOptionCad::drawObjCatchables ( uint64_t indView,
const std::shared_ptr< std::vector< std::shared_ptr< IGraphics > > > & graphics,
iv::eLanguage drawingLanguage )
inherited

◆ endObjCaptured()

void AbstractListenerOptionCad::endObjCaptured ( CGraphicsDXF * graphics)
inherited

◆ endObjCatchables()

void AbstractListenerOptionCad::endObjCatchables ( const std::shared_ptr< std::vector< std::shared_ptr< IGraphics > > > & graphics)
inherited

◆ getArrayObjsCaptured()

std::shared_ptr< std::vector< std::shared_ptr< AbstractObjCapture > > > AbstractListenerOptionCad::getArrayObjsCaptured ( )
protectedinherited

◆ getInteractableObjects()

std::shared_ptr< std::vector< std::shared_ptr< AbstractObjCapture > > > ListenerCadMimicEditor::getInteractableObjects ( )
overrideprivatevirtual

Retrieves all interactable objects present in the canvas.

Returns
A shared pointer to a vector containing the interactable objects.

Implements AbstractListenerOptionCad.

◆ onBeginOption()

bool ListenerCadMimicEditor::onBeginOption ( CEventMotion * evt)
overrideprivatevirtual

Handles the start launch of an interaction option.

Parameters
evtThe motion event that triggered this action.
Returns
True if the interaction option has successfully started.

Implements AbstractListenerOptionCad.

◆ onClickRelease()

void ListenerCadMimicEditor::onClickRelease ( CEventMotion * evt)
overrideprivatevirtual

Handles the release of a click event.

Parameters
evtThe motion event representing the release.

Reimplemented from AbstractListenerOptionCad.

◆ onClickWithCapture()

void ListenerCadMimicEditor::onClickWithCapture ( CEventMotion * evt,
uint64_t indObjCaptured,
const std::shared_ptr< AbstractObjCapture > & objCatchable )
overrideprivatevirtual

Handles a click event on a captured object.

Parameters
evtThe motion event representing the click.
capturedObjectIndexIndex of the captured object.
capturedObjectShared pointer to the captured object instance.

Implements AbstractListenerOptionCad.

◆ onClickWithoutCapture()

void ListenerCadMimicEditor::onClickWithoutCapture ( CEventMotion * evt)
overrideprivatevirtual

Handles a click event when no object is captured.

Parameters
evtThe motion event representing the click.

Implements AbstractListenerOptionCad.

◆ onDrawOption()

bool ListenerCadMimicEditor::onDrawOption ( CEventMotion * evt,
IGraphics * graphics )
overrideprivatevirtual

Handles the drawing operation and determines if the canvas needs a redraw.

Parameters
evtThe motion event that triggered the drawing.
graphicsGraphics context to perform the drawing.
Returns
True if the canvas requires a redraw after this operation.

Reimplemented from AbstractListenerOptionCad.

◆ onEndOption()

bool ListenerCadMimicEditor::onEndOption ( CEventMotion * evt)
overrideprivatevirtual

Handles the stop of an interaction option.

Parameters
evtThe motion event that triggered this action.
Returns
True if the interaction option has successfully ended.

Implements AbstractListenerOptionCad.

◆ onKeyPressed()

void ListenerCadMimicEditor::onKeyPressed ( CEventMotion * evt)
overrideprivatevirtual

Handles a key press event.

Parameters
evtThe motion event triggered by the key press.

Reimplemented from AbstractListenerOptionCad.

◆ onMouseMoved()

void ListenerCadMimicEditor::onMouseMoved ( CEventMotion * evt)
overrideprivatevirtual

Handles the mouse movement event.

Parameters
evtThe motion event representing the movement.

Reimplemented from AbstractListenerOptionCad.

◆ operator=() [1/2]

ListenerCadMimicEditor & ListenerCadMimicEditor::operator= ( const ListenerCadMimicEditor & other)
delete

◆ operator=() [2/2]

ListenerCadMimicEditor & ListenerCadMimicEditor::operator= ( ListenerCadMimicEditor && other)
delete

◆ runAddElement()

void ListenerCadMimicEditor::runAddElement ( CEventMotion * evt)

◆ runAlignment()

void ListenerCadMimicEditor::runAlignment ( CEventMotion * evt)

◆ runBegin()

bool AbstractListenerOptionCad::runBegin ( CEventMotion * evt)
inherited

◆ runCenter()

void ListenerCadMimicEditor::runCenter ( CEventMotion * evt)

◆ runClick()

void AbstractListenerOptionCad::runClick ( CEventMotion * evt)
inherited

◆ runClickRelease()

void AbstractListenerOptionCad::runClickRelease ( CEventMotion * evt)
inherited

◆ runCreatingElement()

bool ListenerCadMimicEditor::runCreatingElement ( CEventMotion * evt)
private

◆ runDraw()

void AbstractListenerOptionCad::runDraw ( CEventMotion * evt)
inherited

◆ runDrawCreatingElement()

bool ListenerCadMimicEditor::runDrawCreatingElement ( CEventMotion * evt,
IGraphics * graphics )
private

◆ runEnd()

bool AbstractListenerOptionCad::runEnd ( CEventMotion * evt)
inherited

◆ runEquidistance()

void ListenerCadMimicEditor::runEquidistance ( CEventMotion * evt)

◆ runEventMotion()

void AbstractListenerOptionCad::runEventMotion ( CEventMotion * evt)
inherited

◆ runFindAndReplace()

void ListenerCadMimicEditor::runFindAndReplace ( CEventMotion * evt)

◆ runKeyPressed()

void AbstractListenerOptionCad::runKeyPressed ( CEventMotion * evt)
inherited

◆ runMouseMoved()

void AbstractListenerOptionCad::runMouseMoved ( CEventMotion * evt)
inherited

◆ runRotate()

void ListenerCadMimicEditor::runRotate ( CEventMotion * evt)

◆ setFlagModify()

void AbstractListenerOptionCad::setFlagModify ( bool * isFlagModify)
inherited

◆ setHasObjCapturedInfo()

bool AbstractListenerOptionCad::setHasObjCapturedInfo ( )
protectedvirtualinherited

◆ updateObjsCaptured()

void AbstractListenerOptionCad::updateObjsCaptured ( )
protectedinherited

Member Data Documentation

◆ m_copyingObjsIndices

std::optional<std::set<uint64_t> > ListenerCadMimicEditor::m_copyingObjsIndices
private

◆ m_firstPointArea

std::optional<iv::math::geometry::Point2d> ListenerCadMimicEditor::m_firstPointArea
private

◆ m_hasObjInfo

bool AbstractListenerOptionCad::m_hasObjInfo
privateinherited

◆ m_indObjCapturedOpt

std::optional<uint64_t> AbstractListenerOptionCad::m_indObjCapturedOpt
privateinherited

◆ m_isDragging

std::optional<bool> ListenerCadMimicEditor::m_isDragging
private

◆ m_isFlagModifyOpt

bool* AbstractListenerOptionCad::m_isFlagModifyOpt
privateinherited

◆ m_newMimicElementBuilder

std::optional<std::shared_ptr<AbstractBuilderMimicElement> > ListenerCadMimicEditor::m_newMimicElementBuilder
private

◆ m_newMimicElementFirstPointRelative

std::optional<iv::math::geometry::Point2d> ListenerCadMimicEditor::m_newMimicElementFirstPointRelative
private

◆ m_newMimicElementFirstPointWorld

std::optional<iv::math::geometry::Point2d> ListenerCadMimicEditor::m_newMimicElementFirstPointWorld
private

◆ m_newMimicElementPointsRelative

std::optional<std::vector<iv::math::geometry::Point2d> > ListenerCadMimicEditor::m_newMimicElementPointsRelative
private

◆ m_newMimicElementPointsWorld

std::optional<std::vector<iv::math::geometry::Point2d> > ListenerCadMimicEditor::m_newMimicElementPointsWorld
private

◆ m_objsCatchableOpt

std::shared_ptr<std::vector<std::shared_ptr<AbstractObjCapture> > > AbstractListenerOptionCad::m_objsCatchableOpt
privateinherited

◆ m_panelRef

CPanelMimicsEditor* ListenerCadMimicEditor::m_panelRef
private

◆ m_pastingPositionOffset

std::optional<iv::types::coord> ListenerCadMimicEditor::m_pastingPositionOffset
private

◆ m_pointBaseOpt

std::optional<iv::math::geometry::Point2d> ListenerCadMimicEditor::m_pointBaseOpt
private

◆ m_previousMotionCoordinate

std::optional<iv::math::geometry::Point2d> AbstractListenerOptionCad::m_previousMotionCoordinate
privateinherited

◆ m_selectedObjsIndices

std::optional<std::set<uint64_t> > ListenerCadMimicEditor::m_selectedObjsIndices
private

◆ m_singleSelectionObjIndex

std::optional<uint64_t> ListenerCadMimicEditor::m_singleSelectionObjIndex
private

◆ m_startPointDrag

std::optional<iv::math::geometry::Point2d> ListenerCadMimicEditor::m_startPointDrag
private

◆ m_state

ePrvState ListenerCadMimicEditor::m_state
private

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