DDNet documentation
Loading...
Searching...
No Matches
CEditorComponent Class Reference

#include <component.h>

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

Public Member Functions

void OnInit (CEditor *pEditor) override
virtual void OnReset ()
virtual void OnMapLoad ()
virtual bool OnInput (const IInput::CEvent &Event)
virtual void OnUpdate ()
void InitSubComponents ()
void RegisterSubComponent (CEditorComponent &Component)
Public Member Functions inherited from CEditorObject
virtual ~CEditorObject ()=default
CEditor * Editor ()
const CEditor * Editor () const
CEditorMap * Map ()
const CEditorMap * Map () const
IInput * Input ()
const IInput * Input () const
IClient * Client ()
const IClient * Client () const
CConfig * Config ()
const CConfig * Config () const
IEngine * Engine ()
const IEngine * Engine () const
IGraphics * Graphics ()
const IGraphics * Graphics () const
ISound * Sound ()
const ISound * Sound () const
ITextRender * TextRender ()
const ITextRender * TextRender () const
IStorage * Storage ()
const IStorage * Storage () const
CUi * Ui ()
const CUi * Ui () const
CRenderMap * RenderMap ()
const CRenderMap * RenderMap () const

Private Attributes

std::vector< std::reference_wrapper< CEditorComponent > > m_vSubComponents

Member Function Documentation

◆ InitSubComponents()

void CEditorComponent::InitSubComponents ( )

Initialize all registered subcomponents. Needs to be called after the interfaces have been initialized.

◆ OnInit()

void CEditorComponent::OnInit ( CEditor * pEditor)
overridevirtual

Initialize the component and interface pointers. Needs to be the first function that is called. The default implementation also resets the component.

Reimplemented from CEditorObject.

Reimplemented in CFontTyper, CLayerSelector, CMapSettingsBackend, CMapView, CPrompt, and CProofMode.

◆ OnInput()

bool CEditorComponent::OnInput ( const IInput::CEvent & Event)
virtual

Should return true if the event was consumed.

Reimplemented in CFontTyper, and CPrompt.

◆ OnMapLoad()

void CEditorComponent::OnMapLoad ( )
virtual

Reimplemented in CMapSettingsBackend, CMapView, and CProofMode.

◆ OnReset()

void CEditorComponent::OnReset ( )
virtual

Reimplemented in CEnvelopeEditor.

◆ OnUpdate()

void CEditorComponent::OnUpdate ( )
virtual

◆ RegisterSubComponent()

void CEditorComponent::RegisterSubComponent ( CEditorComponent & Component)

Member Data Documentation

◆ m_vSubComponents

std::vector<std::reference_wrapper<CEditorComponent> > CEditorComponent::m_vSubComponents
private

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