MyGUI::LayoutManager Class Reference

`#include <MyGUI_LayoutManager.h>`

Inheritance diagram for MyGUI::LayoutManager:
[legend]

## Public Member Functions

| LayoutManager (const LayoutManager &)=delete
LayoutManager & | operator= (const LayoutManager &)=delete
| LayoutManager ()
void | initialise ()
void | shutdown ()
VectorWidgetPtr | loadLayout (std::string_view _file, std::string_view _prefix={}, Widget *_parent=nullptr)
void | unloadLayout (VectorWidgetPtr &_widgets)
ResourceLayout * | getByName (std::string_view _name, bool _throw=true) const
bool | isExist (std::string_view _name) const
const std::string & | getCurrentLayout () const
Public Member Functions inherited from MyGUI::MemberObsolete< LayoutManager >
VectorWidgetPtr | load (std::string_view _file)

## Static Public Member Functions

static LayoutManager & | getInstance ()
static LayoutManager * | getInstancePtr ()
static std::string_view | getClassTypeName ()

## Data Fields

EventHandle_CreateWidgetDelegate | eventCreateWidget
EventHandle_AddUserStringDelegate | eventAddUserString

## Detailed Description

Definition at line 26 of file MyGUI_LayoutManager.h.

## Constructor & Destructor Documentation

## LayoutManager() [1/2]

MyGUI::LayoutManager::LayoutManager | ( | const LayoutManager & |  | ) |

delete

## LayoutManager() [2/2]

MyGUI::LayoutManager::LayoutManager | ( |  | ) |

Definition at line 18 of file MyGUI_LayoutManager.cpp.

## Member Function Documentation

## getByName()

ResourceLayout * MyGUI::LayoutManager::getByName | ( | std::string_view | _name,
|  | bool | _throw = true ) const

Get ResourceLayout by name

Definition at line 86 of file MyGUI_LayoutManager.cpp.

## getClassTypeName()

std::string_view MyGUI::LayoutManager::getClassTypeName | ( |  | ) |

static

## getCurrentLayout()

const std::string & MyGUI::LayoutManager::getCurrentLayout | ( |  | ) | const

Definition at line 105 of file MyGUI_LayoutManager.cpp.

## getInstance()

LayoutManager & MyGUI::LayoutManager::getInstance | ( |  | ) |

static

## getInstancePtr()

LayoutManager * MyGUI::LayoutManager::getInstancePtr | ( |  | ) |

static

## initialise()

void MyGUI::LayoutManager::initialise | ( |  | ) |

Definition at line 24 of file MyGUI_LayoutManager.cpp.

## isExist()

bool MyGUI::LayoutManager::isExist | ( | std::string_view | _name | ) | const

Check if skin with specified name exist

Definition at line 110 of file MyGUI_LayoutManager.cpp.

## loadLayout()

VectorWidgetPtr MyGUI::LayoutManager::loadLayout | ( | std::string_view | _file,
|  | std::string_view | _prefix = {},
|  | Widget * | _parent = nullptr )

Load layout file

Parameters

  _file | name of layout
  _prefix | will be added to all loaded widgets names
  _parent | widget to load on

Returns
  Return vector of pointers of loaded root widgets (root == without parents)

Definition at line 59 of file MyGUI_LayoutManager.cpp.

## operator=()

LayoutManager & MyGUI::LayoutManager::operator= | ( | const LayoutManager & |  | ) |

delete

## shutdown()

void MyGUI::LayoutManager::shutdown | ( |  | ) |

Definition at line 39 of file MyGUI_LayoutManager.cpp.

## unloadLayout()

void MyGUI::LayoutManager::unloadLayout | ( | VectorWidgetPtr & | _widgets | ) |

Unload layout (actually deletes vector of widgets returned by loadLayout)

Definition at line 81 of file MyGUI_LayoutManager.cpp.

## Field Documentation

## eventAddUserString

EventHandle_AddUserStringDelegate MyGUI::LayoutManager::eventAddUserString

Event : Multidelegate. UserString was added from layout.
signature : void method(MyGUI::Widget* _widget, std::string_view _key, std::string_view _value)

Parameters

  _widget | Widget that got new UserString.
  _key | UserString key.
  _key | UserString value.

Note
  Happens only when UserString was loaded from layout, but not when it was added in code.

Definition at line 69 of file MyGUI_LayoutManager.h.

## eventCreateWidget

EventHandle_CreateWidgetDelegate MyGUI::LayoutManager::eventCreateWidget

Event : Multidelegate. Widget was created from layout.
signature : void method(MyGUI::Widget* _sender, const MyGUI::WidgetInfo& _widgetInfo)

Parameters

  _widget | Widget that got new UserString.
  _key | UserString key.
  _key | UserString value.

Note
  Happens only when Widget was loaded from layout, but not when it was created in code.

Definition at line 60 of file MyGUI_LayoutManager.h.

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

- MyGUI_LayoutManager.h
- MyGUI_LayoutManager.cpp