igor::iWidgetManager Class Reference

#include <iWidgetManager.h>

Inherits igor::iModule< iWidgetManager >.

Public Member Functions

void onEvent (iEvent &event)
 
void showTooltip (const iaVector2f &pos, const iaString &text)
 
void hideTooltip ()
 
iWidgetPtr getWidget (iWidgetID id) const
 
iDialogPtr getDialog (iWidgetID id)
 
iWidgetThemePtr getTheme () const
 
void setTheme (const iWidgetThemePtr &theme)
 
void setDesktopDimensions (uint32 width, uint32 height)
 
uint32 getDesktopWidth () const
 
uint32 getDesktopHeight () const
 
void draw ()
 
void setModal (iDialogPtr dialog)
 
iDialogPtr getModal () const
 
bool isModal (iDialogPtr dialog)
 
void resetModal ()
 
void onUpdate ()
 
bool inDrag () const
 
iDraggetDrag () const
 
void deleteWidget (iWidgetPtr widget)
 

Friends

class iModule< iWidgetManager >
 
class iWidget
 
class iDialog
 
class iDrag
 
class iWidgetSplitter
 
class iWidgetMenu
 

Additional Inherited Members

- Static Public Member Functions inherited from igor::iModule< iWidgetManager >
static IGOR_INLINE iWidgetManagergetInstance ()
 
static IGOR_INLINE bool isInstantiated ()
 
static void create ()
 
static void destroy ()
 
- Protected Member Functions inherited from igor::iModule< iWidgetManager >
 iModule ()=default
 
virtual ~iModule ()=default
 

Detailed Description

manages the widgets

Member Function Documentation

◆ deleteWidget()

void igor::iWidgetManager::deleteWidget ( iWidgetPtr  widget)

queues widget for deletion

widget can not have a parent

caller gives up ownership

Parameters
widgetthe widget to be deleted

◆ draw()

void igor::iWidgetManager::draw ( )

draws the widgets if theme is defined

needs to be called by application

make sure you have set up an orthogonal coordinate system with the same dimensions as set via setDesktopDimensions

◆ getDesktopHeight()

uint32 igor::iWidgetManager::getDesktopHeight ( ) const
Returns
desktop height

◆ getDesktopWidth()

uint32 igor::iWidgetManager::getDesktopWidth ( ) const
Returns
desktop width

◆ getDialog()

iDialogPtr igor::iWidgetManager::getDialog ( iWidgetID  id)
Returns
dialog by id
Parameters
idid of dialog

◆ getDrag()

iDrag & igor::iWidgetManager::getDrag ( ) const
Returns
current drag if exists

test with inDrag if it exists first

◆ getModal()

iDialogPtr igor::iWidgetManager::getModal ( ) const
Returns
current modal widget

◆ getTheme()

iWidgetThemePtr igor::iWidgetManager::getTheme ( ) const
Returns
the theme in use

◆ getWidget()

iWidgetPtr igor::iWidgetManager::getWidget ( iWidgetID  id) const
Returns
widget by id
Parameters
idid of widget

◆ hideTooltip()

void igor::iWidgetManager::hideTooltip ( )

hides the tooltip

◆ inDrag()

bool igor::iWidgetManager::inDrag ( ) const
Returns
true if in drag

◆ isModal()

bool igor::iWidgetManager::isModal ( iDialogPtr  dialog)
Returns
true: if widget is modal
Parameters
dialogthe dialog to check if it is modal

◆ onEvent()

void igor::iWidgetManager::onEvent ( iEvent event)

called on any other event

◆ onUpdate()

void igor::iWidgetManager::onUpdate ( )

updates recursively all widgets before rendering

◆ resetModal()

void igor::iWidgetManager::resetModal ( )

reset modal flag

◆ setDesktopDimensions()

void igor::iWidgetManager::setDesktopDimensions ( uint32  width,
uint32  height 
)

sets the desktop dimensions

you should update this e.g. when the window size changes

Parameters
widthwidth of desktop
heightheight of desktop

◆ setModal()

void igor::iWidgetManager::setModal ( iDialogPtr  dialog)

set this widget exclusively modal

◆ setTheme()

void igor::iWidgetManager::setTheme ( const iWidgetThemePtr theme)

sets the theme to use

Parameters
themethe theme to use

◆ showTooltip()

void igor::iWidgetManager::showTooltip ( const iaVector2f pos,
const iaString text 
)

shows tooltip at given position

Parameters
posthe position to show the tooltip
textthe text of the tooltip

Friends And Related Function Documentation

◆ iDialog

friend class iDialog
friend

◆ iDrag

friend class iDrag
friend

◆ iModule< iWidgetManager >

friend class iModule< iWidgetManager >
friend

◆ iWidget

friend class iWidget
friend

◆ iWidgetMenu

friend class iWidgetMenu
friend

◆ iWidgetSplitter

friend class iWidgetSplitter
friend

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