| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "BsEditorPrerequisites.h"
- #include "GUI/BsGUIOptions.h"
- #include "GUI/BsGUIContent.h"
- namespace bs
- {
- /** @addtogroup GUI-Editor
- * @{
- */
- /** Provides common options for initializing a GUI element used for editor fields. */
- struct BS_ED_EXPORT GUIFieldOptions
- {
- /**
- * Constructor for field options with a label.
- *
- * @param[in] labelContent Content to display in the editor field label.
- * @param[in] labelWidth Width of the label in pixels.
- * @param[in] options Options that allow you to control how is the element positioned and sized. This will
- * override any similar options set by style.
- * @param[in] style Optional style to use for the element. Style will be retrieved from GUISkin of the
- * GUIWidget the element is used on. If not specified default style is used.
- */
- GUIFieldOptions(const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& options,
- const String& style = StringUtil::BLANK)
- :labelContent(labelContent), labelWidth(labelWidth), options(options), style(style)
- { }
- /**
- * Constructor for field options with a label.
- *
- * @param[in] labelContent Content to display in the editor field label.
- * @param[in] options Options that allow you to control how is the element positioned and sized. This will
- * override any similar options set by style.
- * @param[in] style Optional style to use for the element. Style will be retrieved from GUISkin of the
- * GUIWidget the element is used on. If not specified default style is used.
- */
- GUIFieldOptions(const GUIContent& labelContent, const GUIOptions& options,
- const String& style = StringUtil::BLANK)
- :labelContent(labelContent), options(options), style(style)
- { }
- /**
- * Constructor for field options with a label.
- *
- * @param[in] labelText Text to display in the editor field label.
- * @param[in] labelWidth Width of the label in pixels.
- * @param[in] options Options that allow you to control how is the element positioned and sized. This will
- * override any similar options set by style.
- * @param[in] style Optional style to use for the element. Style will be retrieved from GUISkin of the
- * GUIWidget the element is used on. If not specified default style is used.
- */
- GUIFieldOptions(const HString& labelText, UINT32 labelWidth, const GUIOptions& options,
- const String& style = StringUtil::BLANK)
- :labelContent(labelText), labelWidth(labelWidth), options(options), style(style)
- { }
- /**
- * Constructor for field options with a label.
- *
- * @param[in] labelText Text to display in the editor field label.
- * @param[in] options Options that allow you to control how is the element positioned and sized. This will
- * override any similar options set by style.
- * @param[in] style Optional style to use for the element. Style will be retrieved from GUISkin of the
- * GUIWidget the element is used on. If not specified default style is used.
- */
- GUIFieldOptions(const HString& labelText, const GUIOptions& options,
- const String& style = StringUtil::BLANK)
- :labelContent(labelText), options(options), style(style)
- { }
- /**
- * Constructor for field options without a label.
- *
- * @param[in] options Options that allow you to control how is the element positioned and sized. This will
- * override any similar options set by style.
- * @param[in] style Optional style to use for the element. Style will be retrieved from GUISkin of the
- * GUIWidget the element is used on. If not specified default style is used.
- */
- GUIFieldOptions(const GUIOptions& options, const String& style = StringUtil::BLANK)
- :labelWidth(0), options(options), style(style)
- { }
- /**
- * Constructor.
- *
- * @param[in] labelContent Content to display in the editor field label.
- * @param[in] labelWidth Width of the label in pixels.
- * @param[in] style Optional style to use for the element. Style will be retrieved from GUISkin of the
- * GUIWidget the element is used on. If not specified default style is used.
- */
- GUIFieldOptions(const GUIContent& labelContent, UINT32 labelWidth, const String& style = StringUtil::BLANK)
- :labelContent(labelContent), labelWidth(labelWidth), style(style)
- { }
- /**
- * Constructor for field options with a label.
- *
- * @param[in] labelContent Content to display in the editor field label.
- * @param[in] style Optional style to use for the element. Style will be retrieved from GUISkin of the
- * GUIWidget the element is used on. If not specified default style is used.
- */
- GUIFieldOptions(const GUIContent& labelContent, const String& style = StringUtil::BLANK)
- :labelContent(labelContent), style(style)
- { }
- /**
- * Constructor for field options with a label.
- *
- * @param[in] labelText Text to display in the editor field label.
- * @param[in] labelWidth Width of the label in pixels.
- * @param[in] style Optional style to use for the element. Style will be retrieved from GUISkin of the
- * GUIWidget the element is used on. If not specified default style is used.
- */
- GUIFieldOptions(const HString& labelText, UINT32 labelWidth, const String& style = StringUtil::BLANK)
- :labelContent(labelText), labelWidth(labelWidth), style(style)
- { }
- /**
- * Constructor for field options with a label.
- *
- * @param[in] labelText Text to display in the editor field label.
- * @param[in] style Optional style to use for the element. Style will be retrieved from GUISkin of the
- * GUIWidget the element is used on. If not specified default style is used.
- */
- GUIFieldOptions(const HString& labelText, const String& style = StringUtil::BLANK)
- :labelContent(labelText), style(style)
- { }
- /**
- * Constructor for field options without a label.
- *
- * @param[in] style Optional style to use for the element. Style will be retrieved from GUISkin of the
- * GUIWidget the element is used on. If not specified default style is used.
- */
- GUIFieldOptions(const String& style = StringUtil::BLANK)
- :labelWidth(0), style(style)
- { }
- GUIContent labelContent;
- UINT32 labelWidth = 100;
- GUIOptions options;
- String style;
- };
- /** @} */
- }
|