You.i Engine
CYIDevWidgetWithView Class Referenceabstract

Detailed Description

A dev widget that displays a scene view when activated.

This class provides an easy way to display a scene view when the dev widget is activated. At a minimum, the CreateView() function must be implemented to create the desired view. This function is called when the widget is activated, and the view is automatically deleted when the widget is deactivated. If the created view has an 'In' (and, optionally, an 'Out') timeline, then that timeline is used to animate the view in and out when the widget is activated.

#include <debug/YiDevWidgetWithView.h>

Inheritance diagram for CYIDevWidgetWithView:

Public Member Functions

 CYIDevWidgetWithView (const CYIString &title, const CYIString &subtitle="")
virtual ~CYIDevWidgetWithView ()
virtual void RefreshState () override
virtual void OnPanelItemClicked () override
- Public Member Functions inherited from CYIDevWidget
 CYIDevWidget (const CYIString &title, const CYIString &subtitle="")
virtual ~CYIDevWidget ()
bool IsUsingIndicator () const
bool IsUsingSimulatedKeys () const
bool IsCapturingAllEvents () const
bool IsUsingConfigurationItems () const
State GetState () const
virtual const CYIStringGetTitle () const
virtual const CYIStringGetSubtitle () const
void SetParentPanel (CYIDevPanel *pPanel, size_t indexInPanel)
size_t GetIndexInPanel () const
void UpdateWidgetState ()
virtual void OnConfigureButtonClicked ()
virtual void OnConfigurationItemClicked (size_t buttonID)
virtual void OnConfigurationSubpanelClosed ()
virtual void OnDraw ()
virtual bool OnUpdate (bool *pSkipUpdate=nullptr)
virtual bool OnHandleKeyInputs (const CYIKeyEvent &keyEvent)
virtual bool OnHandleActionInputs (int32_t x, int32_t y, int32_t wheelDelta, CYIActionEvent::ButtonType button, CYIEvent::Type eventType, uint8_t pointerID, bool hover)
virtual bool OnPreFilterEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent, CYIEventHandler *pDestination)
void SimulatePanelItemClicked ()
bool SimulateKeyPress (const CYIKeyEvent &keyEvent)
void SimulatedKeyPressesEnded ()
- Public Member Functions inherited from CYISignalHandler
 CYISignalHandler ()
 CYISignalHandler (const CYISignalHandler &rSignalHandler)
virtual ~CYISignalHandler ()
CYISignalHandleroperator= (const CYISignalHandler &rSignalHandler)
void MoveToThread (CYIThread *pThread)
 This function allows the user to override the default thread affinity to any CYIThread that may or may not be running. More...
CYIThreadHandle GetThreadAffinity () const
void SetThreadAffinity (const CYIThreadHandle &rThreadAffinity)
virtual bool IsConnected () const
virtual bool IsConnected (const CYISignalBase &rSignal) const
void Disconnect (CYISignalBase &rSignal)
void DisconnectFromAllSignals ()
- Public Member Functions inherited from CYIThread::Listener
 Listener ()
virtual ~Listener ()
virtual void OnThreadStarted (CYIThread *)
virtual void OnThreadTerminated (CYIThread *)
virtual void OnThreadFinished (CYIThread *)

Protected Member Functions

virtual std::unique_ptr< CYISceneViewCreateView ()=0
virtual void DeleteView ()
virtual void OnShow ()
virtual void OnHide ()
- Protected Member Functions inherited from CYIDevWidget
void SetUseSimulatedKeys (bool useSimulatedKeys)
void SetCaptureAllEvents (bool captureAllEvents)
void SetUsesConfigurationItems (bool usesConfigurationItems)
virtual std::vector< std::pair< CYIString, CYIString > > GetConfigurationButtonTitles ()
CYISceneNodeGetLogicalRoot () const

Protected Attributes

CYIAnimationToggleController m_toggleController
- Protected Attributes inherited from CYIDevWidget
size_t m_indexInPanel
State m_state
CYIString m_title
CYIString m_subtitle

Additional Inherited Members

- Public Types inherited from CYIDevWidget
enum  State {
  State::Off = 0,

Constructor & Destructor Documentation

◆ CYIDevWidgetWithView()

CYIDevWidgetWithView::CYIDevWidgetWithView ( const CYIString title,
const CYIString subtitle = "" 

◆ ~CYIDevWidgetWithView()

virtual CYIDevWidgetWithView::~CYIDevWidgetWithView ( )

Member Function Documentation

◆ CreateView()

virtual std::unique_ptr<CYISceneView> CYIDevWidgetWithView::CreateView ( )
protectedpure virtual

Creates and returns the view that is to be managed by this dev widget. After creating, the view will be available through the m_pView member variable. Note that views can be created multiple times through the lifetime of the widget, as the widget can be activated and deactivated multiple times.

◆ DeleteView()

virtual void CYIDevWidgetWithView::DeleteView ( )

Deletes the view held by this widget. This is called by the widget when the view's 'Out' animation completes. The default implementation just deletes the scene view, but sub-classes may override this function to perform more complex deletion.

◆ OnHide()

virtual void CYIDevWidgetWithView::OnHide ( )

Called when the widget has been deactivated and the view has finished animating out. This is called prior to the view being deleted.

◆ OnPanelItemClicked()

virtual void CYIDevWidgetWithView::OnPanelItemClicked ( )

Handles automatically creating/destroying a scene view when the widget is activated/deactivated. Sub-classes should not override this.

Implements CYIDevWidget.

◆ OnShow()

virtual void CYIDevWidgetWithView::OnShow ( )

Called when the widget is activated and the view has started animating in. When this function is called, the view has been created but may not yet be visible due to the 'In' animation playing.

◆ RefreshState()

virtual void CYIDevWidgetWithView::RefreshState ( )

Refreshes the state of the widget.

Reimplemented from CYIDevWidget.

Member Data Documentation

◆ m_pView

CYISceneView* CYIDevWidgetWithView::m_pView

◆ m_toggleController

CYIAnimationToggleController CYIDevWidgetWithView::m_toggleController

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