FEMSuite
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ObjectManager Class Reference
Inheritance diagram for ObjectManager:
Inheritance graph
[legend]

Public Types

enum  Mode : unsigned int {
  None, Create, Move, Rotate,
  Scale, Deform
}
 This describes all the things a Object can do More...
 

Public Member Functions

Mode GetMode () const
 
void SetMode (const Mode mode)
 
virtual bool MouseDown (IScreen *, const ScreenCoords &)
 Handler for a mouse down event More...
 
virtual bool MouseUp (IScreen *, const ScreenCoords &)
 Handler for a mouse up event More...
 
virtual bool MouseMove (IScreen *, const ScreenCoords &)
 Handler for a mouse move event More...
 
virtual bool RightClick (IScreen *, const ScreenCoords &)
 Handler for a right click event More...
 
ScreenCoords GetLastScreenCoords () const
 
void SetLastScreenCoords (const ScreenCoords lastScreenCoords)
 
virtual IScreen::CursorType GetCursor (IScreen *, const ScreenCoords &) const
 Returns the cursor that should be used More...
 
void Drag (std::shared_ptr< IInteractiveObject > o)
 Enables automatic movement of object o (through a simulated click) until the mouse is clicked. More...
 
IInteractiveObjectGetSelectedObject () const
 
virtual void SetSelectedObject (IInteractiveObject *const o)
 
void SetSelectedObject (std::shared_ptr< IInteractiveObject > o)
 
IInteractiveObjectGetHoveredObject () const
 
void SetHoveredObject (IInteractiveObject *const o)
 
void SetHoveredObject (std::shared_ptr< IInteractiveObject > o)
 
std::pair< std::shared_ptr< IInteractiveObject >, ModeGetObject (const ScreenCoords &, const Flags=0)
 Checks if an object exists at a given point and if so returns it and the mode in which it should be manipulated. More...
 
template<class I , typename... Args>
std::shared_ptr< I > AddInteractiveObject (Args...args)
 
std::shared_ptr< IInteractiveObjectGetIInteractiveObject (const std::string &name)
 Retrieves an object by name More...
 
std::shared_ptr< IInteractiveObjectGetIInteractiveObject (const IInteractiveObject *)
 Accessor for objects by base pointer More...
 
template<class T >
std::shared_ptr< T > GetInteractiveObject (const std::string &name)
 Retrieves an object by name and enables casting More...
 
void DrawGrid ()
 
void DrawAll2D ()
 
IScreenGetScreen () const
 
void SetScreen (IScreen *const s)
 
Pixel GetHorizontalScreenShift () const
 
void SetHorizontalScreenShift (const Pixel horizontalScreenShift)
 
Pixel GetVerticalScreenShift () const
 
void SetVerticalScreenShift (const Pixel verticalScreenShift)
 
double CalculateGridSpacingPixels () const
 
double GetPointToGridIndexRatio () const
 
GridIndex ToGridIndex (const Point< Spatial > &) const
 Converts a supplied point to a grid index More...
 
Point< Spatial > ToPoint (const GridIndex &) const
 Converts a supplied grid index to a point More...
 
std::array< Point< Spatial >, 4 > GetGridIndexRect (const GridIndex &) const
 Returns a rectangle representing the four corners of a supplied grid index More...
 
void SetStatus (const std::string &)
 
virtual void Event (ParserString id, std::shared_ptr< IParameter >=nullptr)
 This handles events sent by different parts of the program (e.g. configuration panels) More...
 
std::shared_ptr< ProgressorGetProgressor (const std::string &name)
 
std::shared_ptr< ProgressorAddProgressor (const std::string &name)
 
std::map< std::string, std::shared_ptr< Progressor > > GetProgressors () const
 

Protected Member Functions

void ConfUpdate_SimulationSettings (std::shared_ptr< IParameter > simSettingsParamCollection)
 This handles updates resulting from changing one of the values of the simulation settings screen More...
 

Protected Attributes

std::vector< std::shared_ptr< IInteractiveObject > > m_InteractiveObjects
 Stores all boundraries More...
 
Spatial m_PointToGridIndexRatio
 This is a multiplier for grid spacing More...
 
std::map< std::string, std::shared_ptr< Progressor > > m_Progressors
 

Member Enumeration Documentation

enum ObjectManager::Mode : unsigned int
strong

This describes all the things a Object can do

Member Function Documentation

void ObjectManager::ConfUpdate_SimulationSettings ( std::shared_ptr< IParameter simSettingsParamCollection)
protected

This handles updates resulting from changing one of the values of the simulation settings screen

void ObjectManager::Drag ( std::shared_ptr< IInteractiveObject o)

Enables automatic movement of object o (through a simulated click) until the mouse is clicked.

void ObjectManager::Event ( ParserString  id,
std::shared_ptr< IParameter p = nullptr 
)
virtual

This handles events sent by different parts of the program (e.g. configuration panels)

IScreen::CursorType ObjectManager::GetCursor ( IScreen screen,
const ScreenCoords sc 
) const
virtual

Returns the cursor that should be used

std::array< Point< Spatial >, 4 > ObjectManager::GetGridIndexRect ( const GridIndex gi) const

Returns a rectangle representing the four corners of a supplied grid index

std::shared_ptr< IInteractiveObject > ObjectManager::GetIInteractiveObject ( const std::string &  name)

Retrieves an object by name

std::shared_ptr< IInteractiveObject > ObjectManager::GetIInteractiveObject ( const IInteractiveObject base)

Accessor for objects by base pointer

template<class T >
std::shared_ptr<T> ObjectManager::GetInteractiveObject ( const std::string &  name)
inline

Retrieves an object by name and enables casting

std::pair< std::shared_ptr< IInteractiveObject >, ObjectManager::Mode > ObjectManager::GetObject ( const ScreenCoords sC,
const Flags  flags = 0 
)

Checks if an object exists at a given point and if so returns it and the mode in which it should be manipulated.

Parameters
flagsOptional paramter - can be one of OBJM_USE_STRICT_FOOTPRINT </praram>
bool ObjectManager::MouseDown ( IScreen screen,
const ScreenCoords sC 
)
virtual

Handler for a mouse down event

bool ObjectManager::MouseMove ( IScreen screen,
const ScreenCoords sC 
)
virtual

Handler for a mouse move event

Reimplemented in GUIObjectManager.

bool ObjectManager::MouseUp ( IScreen screen,
const ScreenCoords sC 
)
virtual

Handler for a mouse up event

bool ObjectManager::RightClick ( IScreen screen,
const ScreenCoords sC 
)
virtual

Handler for a right click event

GridIndex ObjectManager::ToGridIndex ( const Point< Spatial > &  p) const

Converts a supplied point to a grid index

Point< Spatial > ObjectManager::ToPoint ( const GridIndex gi) const

Converts a supplied grid index to a point

Member Data Documentation

std::vector<std::shared_ptr<IInteractiveObject> > ObjectManager::m_InteractiveObjects
protected

Stores all boundraries

Spatial ObjectManager::m_PointToGridIndexRatio
protected

This is a multiplier for grid spacing


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