MyGUI: MyGUI_ComboBox.cpp Source File

MyGUI 3.4.3

MyGUI_ComboBox.cpp
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#include "MyGUI_Precompiled.h"
8#include "MyGUI_ComboBox.h"
9#include "MyGUI_ControllerManager.h"
10#include "MyGUI_InputManager.h"
11#include "MyGUI_WidgetManager.h"
12#include "MyGUI_Gui.h"
13#include "MyGUI_ListBox.h"
14#include "MyGUI_Button.h"
15#include "MyGUI_ResourceSkin.h"
16#include "MyGUI_LayerManager.h"
17#include "MyGUI_LanguageManager.h"
18
19namespace MyGUI
20{
21
22 const float COMBO_ALPHA_MAX = ALPHA_MAX;
23 const float COMBO_ALPHA_MIN = ALPHA_MIN;
24 const float COMBO_ALPHA_COEF = 4.0f;
25
26 void ComboBox::initialiseOverride()
27 {
28 Base::initialiseOverride();
29
31 assignWidget(mButton, "Button");
32 if (mButton != nullptr)
33 {
34 mButton->eventMouseButtonPressed += newDelegate(this, &ComboBox::notifyButtonPressed);
35 }
36
38 assignWidget(mList, "List");
39
40 if (mList == nullptr)
41 {
42 std::string_view list_skin = getUserString("ListSkin");
43 std::string_view list_layer = getUserString("ListLayer");
44
45 mList = static_cast<ListBox*>(_createSkinWidget(
46 WidgetStyle::Popup,
47 ListBox::getClassTypeName(),
48 list_skin,
49 IntCoord(),
50 Align::Default,
51 list_layer));
52 }
53
54 if (mList != nullptr)
55 {
56 mList->setActivateOnClick(true);
57
58 mList->setVisible(false);
59 mList->eventKeyLostFocus += newDelegate(this, &ComboBox::notifyListLostFocus);
60 mList->eventListSelectAccept += newDelegate(this, &ComboBox::notifyListSelectAccept);
61 mList->eventListMouseItemActivate += newDelegate(this, &ComboBox::notifyListMouseItemActivate);
62 mList->eventListChangePosition += newDelegate(this, &ComboBox::notifyListChangePosition);
63
64 mList->setNeedToolTip(true);
65 mList->eventToolTip += newDelegate(this, &ComboBox::notifyToolTip);
66 }
67
68 // подписываем дочерние классы на скролл
69 if (mScrollViewClient != nullptr)
70 {
71 mScrollViewClient->eventMouseWheel += newDelegate(this, &ComboBox::notifyMouseWheel);
72 mScrollViewClient->eventMouseButtonPressed += newDelegate(this, &ComboBox::notifyMousePressed);
73
74 mScrollViewClient->setNeedToolTip(true);
75 mScrollViewClient->eventToolTip += newDelegate(this, &ComboBox::notifyToolTip);
76 }
77
78 // подписываемся на изменения текста
79 eventEditTextChange += newDelegate(this, &ComboBox::notifyEditTextChange);
80 }
81
82 void ComboBox::shutdownOverride()
83 {
84 mList = nullptr;
85 mButton = nullptr;
86
87 Base::shutdownOverride();
88 }
89
90 void ComboBox::notifyButtonPressed(Widget* _sender, int _left, int _top, MouseButton _id)
91 {
92 if (MouseButton::Left != _id)
93 return;
94
95 mDropMouse = true;
96
97 if (mListShow)
98 hideList();
99 else
100 showList();
101 }
102
103 void ComboBox::notifyListLostFocus(Widget* _sender, Widget* _new)
104 {
105 if (mDropMouse)
106 {
107 mDropMouse = false;
108 Widget* focus = InputManager::getInstance().getMouseFocusWidget();
109
110 // кнопка сама уберет список
111 if (focus == mButton)
112 return;
113
114 // в режиме дропа все окна учавствуют
115 if (mModeDrop && focus == mScrollViewClient)
116 return;
117 }
118
119 hideList();
120 }
121
122 void ComboBox::notifyListSelectAccept(ListBox* _widget, size_t _position)
123 {
124 mItemIndex = _position;
125 Base::setCaption(mItemIndex != ITEM_NONE ? mList->getItemNameAt(mItemIndex) : UString());
126
127 mDropMouse = false;
128 InputManager::getInstance().setKeyFocusWidget(this);
129
130 if (mModeDrop)
131 {
132 _resetContainer(false);
133
134 eventComboAccept(this, mItemIndex);
135 }
136 }
137
138 void ComboBox::notifyListChangePosition(ListBox* _widget, size_t _position)
139 {
140 mItemIndex = _position;
141
142 _resetContainer(false);
143
144 eventComboChangePosition(this, _position);
145 }
146
147 void ComboBox::onKeyButtonPressed(KeyCode _key, Char _char)
148 {
149 Base::onKeyButtonPressed(_key, _char);
150
151 // при нажатии вниз, показываем лист
152 if (_key == KeyCode::ArrowDown)
153 {
154 // выкидываем список только если мыша свободна
155 if (!InputManager::getInstance().isCaptureMouse())
156 {
157 showList();
158 }
159 }
160 // нажат ввод в окне редиктирования
161 else if ((_key == KeyCode::Return) || (_key == KeyCode::NumpadEnter))
162 {
163 _resetContainer(false);
164
165 eventComboAccept(this, mItemIndex);
166 }
167 }
168
169 void ComboBox::notifyListMouseItemActivate(ListBox* _widget, size_t _position)
170 {
171 mItemIndex = _position;
172 Base::setCaption(mItemIndex != ITEM_NONE ? mList->getItemNameAt(mItemIndex) : UString());
173
174 InputManager::getInstance().setKeyFocusWidget(this);
175
176 if (mModeDrop)
177 {
178 _resetContainer(false);
179
180 eventComboAccept(this, mItemIndex);
181 }
182 }
183
184 void ComboBox::notifyMouseWheel(Widget* _sender, int _rel)
185 {
186 if (mList->getItemCount() == 0)
187 return;
188 if (InputManager::getInstance().getKeyFocusWidget() != this)
189 return;
190 if (InputManager::getInstance().isCaptureMouse())
191 return;
192
193 if (_rel > 0)
194 {
195 if (mItemIndex != 0)
196 {
197 if (mItemIndex == ITEM_NONE)
198 mItemIndex = 0;
199 else
200 mItemIndex--;
201 Base::setCaption(mList->getItemNameAt(mItemIndex));
202 mList->setIndexSelected(mItemIndex);
203 mList->beginToItemAt(mItemIndex);
204
205 _resetContainer(false);
206
207 eventComboChangePosition(this, mItemIndex);
208 }
209 }
210 else if (_rel < 0)
211 {
212 if ((mItemIndex + 1) < mList->getItemCount())
213 {
214 if (mItemIndex == ITEM_NONE)
215 mItemIndex = 0;
216 else
217 mItemIndex++;
218 Base::setCaption(mList->getItemNameAt(mItemIndex));
219 mList->setIndexSelected(mItemIndex);
220 mList->beginToItemAt(mItemIndex);
221
222 _resetContainer(false);
223
224 eventComboChangePosition(this, mItemIndex);
225 }
226 }
227 }
228
229 void ComboBox::notifyMousePressed(Widget* _sender, int _left, int _top, MouseButton _id)
230 {
231 // обязательно отдаем отцу, а то мы у него в наглую отняли
232 Base::notifyMousePressed(_sender, _left, _top, _id);
233
234 mDropMouse = true;
235
236 // показываем список
237 if (mModeDrop)
238 notifyButtonPressed(nullptr, _left, _top, _id);
239 }
240
241 void ComboBox::notifyEditTextChange(EditBox* _sender)
242 {
243 // сбрасываем выделенный элемент
244 if (ITEM_NONE != mItemIndex)
245 {
246 mItemIndex = ITEM_NONE;
247 mList->setIndexSelected(mItemIndex);
248 mList->beginToItemFirst();
249
250 _resetContainer(false);
251
252 eventComboChangePosition(this, mItemIndex);
253 }
254 }
255
256 void ComboBox::showList()
257 {
258 // пустой список не показываем
259 if (mList->getItemCount() == 0)
260 return;
261
262 if (mListShow)
263 return;
264 mListShow = true;
265
266 IntCoord coord = calculateListPosition();
267 mList->setCoord(coord);
268
269 if (mShowSmooth)
270 {
271 ControllerFadeAlpha* controller = createControllerFadeAlpha(COMBO_ALPHA_MAX, COMBO_ALPHA_COEF, true);
272 ControllerManager::getInstance().addItem(mList, controller);
273 }
274 else
275 {
276 mList->setVisible(true);
277 }
278
279 InputManager::getInstance().setKeyFocusWidget(mList);
280 }
281
282 void ComboBox::actionWidgetHide(Widget* _widget, ControllerItem* _controller)
283 {
284 _widget->setVisible(false);
285 _widget->setEnabled(true);
286 }
287
288 void ComboBox::hideList()
289 {
290 if (!mListShow)
291 return;
292 mListShow = false;
293
294 if (mShowSmooth)
295 {
296 ControllerFadeAlpha* controller = createControllerFadeAlpha(COMBO_ALPHA_MIN, COMBO_ALPHA_COEF, false);
297 controller->eventPostAction += newDelegate(this, &ComboBox::actionWidgetHide);
298 ControllerManager::getInstance().addItem(mList, controller);
299 }
300 else
301 {
302 mList->setVisible(false);
303 }
304 }
305
306 void ComboBox::setIndexSelected(size_t _index)
307 {
308 MYGUI_ASSERT_RANGE_AND_NONE(_index, mList->getItemCount(), "ComboBox::setIndexSelected");
309 mItemIndex = _index;
310 mList->setIndexSelected(_index);
311 if (_index == ITEM_NONE)
312 {
313 Base::setCaption(UString());
314 return;
315 }
316 Base::setCaption(mList->getItemNameAt(_index));
317 Base::updateView(); // hook for update
318 }
319
320 void ComboBox::setItemNameAt(size_t _index, const UString& _name)
321 {
322 mList->setItemNameAt(_index, _name);
323 mItemIndex = ITEM_NONE; //FIXME
324 mList->setIndexSelected(mItemIndex); //FIXME
325 }
326
327 void ComboBox::setItemDataAt(size_t _index, Any _data)
328 {
329 mList->setItemDataAt(_index, _data);
330 mItemIndex = ITEM_NONE; //FIXME
331 mList->setIndexSelected(mItemIndex); //FIXME
332 }
333
334 void ComboBox::insertItemAt(size_t _index, const UString& _item, Any _data)
335 {
336 mList->insertItemAt(_index, _item, _data);
337 mItemIndex = ITEM_NONE; //FIXME
338 mList->setIndexSelected(mItemIndex); //FIXME
339 }
340
341 void ComboBox::removeItemAt(size_t _index)
342 {
343 mList->removeItemAt(_index);
344 mItemIndex = ITEM_NONE; //FIXME
345 mList->clearIndexSelected(); //FIXME
346 }
347
348 void ComboBox::removeAllItems()
349 {
350 mItemIndex = ITEM_NONE; //FIXME
351 mList->removeAllItems(); //FIXME заново созданные строки криво стоят
352 }
353
354 void ComboBox::setComboModeDrop(bool _drop)
355 {
356 mModeDrop = _drop;
357 setEditStatic(mModeDrop);
358 }
359
360 ControllerFadeAlpha* ComboBox::createControllerFadeAlpha(float _alpha, float _coef, bool _enable)
361 {
362 ControllerItem* item = ControllerManager::getInstance().createItem(ControllerFadeAlpha::getClassTypeName());
363 ControllerFadeAlpha* controller = item->castType<ControllerFadeAlpha>();
364
365 controller->setAlpha(_alpha);
366 controller->setCoef(_coef);
367 controller->setEnabled(_enable);
368
369 return controller;
370 }
371
372 size_t ComboBox::findItemIndexWith(const UString& _name)
373 {
374 return mList->findItemIndexWith(_name);
375 }
376
377 void ComboBox::setFlowDirection(FlowDirection _value)
378 {
379 mFlowDirection = _value;
380 }
381
382 IntCoord ComboBox::calculateListPosition()
383 {
384 int length = 0;
385 if (mFlowDirection.isVertical())
386 length = mList->getOptimalHeight();
387 else
388 length = mMaxListLength;
389
390 if (mMaxListLength > 0 && length > mMaxListLength)
391 length = mMaxListLength;
392
393 // берем глобальные координаты выджета
394 IntCoord coord = getAbsoluteCoord();
395 // размер леера
396 IntSize sizeView = mList->getParentSize();
397
398 if (mFlowDirection == FlowDirection::TopToBottom)
399 {
400 if ((coord.bottom() + length) <= sizeView.height)
401 coord.top += coord.height;
402 else
403 coord.top -= length;
404 coord.height = length;
405 }
406 else if (mFlowDirection == FlowDirection::BottomToTop)
407 {
408 if ((coord.top - length) >= 0)
409 coord.top -= length;
410 else
411 coord.top += coord.height;
412 coord.height = length;
413 }
414 else if (mFlowDirection == FlowDirection::LeftToRight)
415 {
416 if ((coord.right() + length) <= sizeView.width)
417 coord.left += coord.width;
418 else
419 coord.left -= length;
420 coord.width = length;
421 }
422 else if (mFlowDirection == FlowDirection::RightToLeft)
423 {
424 if ((coord.left - length) >= 0)
425 coord.left -= length;
426 else
427 coord.left += coord.width;
428 coord.width = length;
429 }
430
431 return coord;
432 }
433
434 void ComboBox::setPropertyOverride(std::string_view _key, std::string_view _value)
435 {
437 if (_key == "ModeDrop")
438 setComboModeDrop(utility::parseValue<bool>(_value));
439
441 else if (_key == "FlowDirection")
442 setFlowDirection(utility::parseValue<FlowDirection>(_value));
443
445 else if (_key == "MaxListLength")
446 setMaxListLength(utility::parseValue<int>(_value));
447
449 else if (_key == "SmoothShow")
450 setSmoothShow(utility::parseValue<bool>(_value));
451
452 // не коментировать
453 else if (_key == "AddItem")
454 addItem(LanguageManager::getInstance().replaceTags(UString(_value)));
455
456 else
457 {
458 Base::setPropertyOverride(_key, _value);
459 return;
460 }
461
462 eventChangeProperty(this, _key, _value);
463 }
464
465 size_t ComboBox::getItemCount() const
466 {
467 return mList->getItemCount();
468 }
469
470 void ComboBox::addItem(const UString& _name, Any _data)
471 {
472 return insertItemAt(ITEM_NONE, _name, _data);
473 }
474
475 size_t ComboBox::getIndexSelected() const
476 {
477 return mItemIndex;
478 }
479
480 void ComboBox::clearIndexSelected()
481 {
482 setIndexSelected(ITEM_NONE);
483 }
484
485 void ComboBox::clearItemDataAt(size_t _index)
486 {
487 setItemDataAt(_index, Any::Null);
488 }
489
490 const UString& ComboBox::getItemNameAt(size_t _index) const
491 {
492 return mList->getItemNameAt(_index);
493 }
494
495 void ComboBox::beginToItemAt(size_t _index)
496 {
497 mList->beginToItemAt(_index);
498 }
499
500 void ComboBox::beginToItemFirst()
501 {
502 if (getItemCount())
503 beginToItemAt(0);
504 }
505
506 void ComboBox::beginToItemLast()
507 {
508 if (getItemCount())
509 beginToItemAt(getItemCount() - 1);
510 }
511
512 void ComboBox::beginToItemSelected()
513 {
514 if (getIndexSelected() != ITEM_NONE)
515 beginToItemAt(getIndexSelected());
516 }
517
518 bool ComboBox::getComboModeDrop() const
519 {
520 return mModeDrop;
521 }
522
523 void ComboBox::setSmoothShow(bool _value)
524 {
525 mShowSmooth = _value;
526 }
527
528 bool ComboBox::getSmoothShow() const
529 {
530 return mShowSmooth;
531 }
532
533 void ComboBox::setMaxListLength(int _value)
534 {
535 mMaxListLength = _value;
536 }
537
538 int ComboBox::getMaxListLength() const
539 {
540 return mMaxListLength;
541 }
542
543 FlowDirection ComboBox::getFlowDirection() const
544 {
545 return mFlowDirection;
546 }
547
548 void ComboBox::notifyToolTip(Widget* _sender, const ToolTipInfo& _info)
549 {
550 if (getNeedToolTip())
551 eventToolTip(this, _info);
552 }
553
554 size_t ComboBox::_getItemCount() const
555 {
556 return getItemCount();
557 }
558
559 void ComboBox::_addItem(const MyGUI::UString& _name)
560 {
561 addItem(_name);
562 }
563
564 void ComboBox::_removeItemAt(size_t _index)
565 {
566 removeItemAt(_index);
567 }
568
569 void ComboBox::_setItemNameAt(size_t _index, const UString& _name)
570 {
571 setItemNameAt(_index, _name);
572 }
573
574 const UString& ComboBox::_getItemNameAt(size_t _index) const
575 {
576 return getItemNameAt(_index);
577 }
578
579 void ComboBox::_resetContainer(bool _update)
580 {
581 Base::_resetContainer(_update);
582 if (mList != nullptr)
583 mList->_resetContainer(_update);
584 }
585
586} // namespace MyGUI
MyGUI_Button.h
MyGUI_ComboBox.h
MyGUI_ControllerManager.h
MYGUI_ASSERT_RANGE_AND_NONE
#define MYGUI_ASSERT_RANGE_AND_NONE(index, size, owner)
Definition MyGUI_Diagnostic.h:46
MyGUI_Gui.h
MyGUI_InputManager.h
MyGUI_LanguageManager.h
MyGUI_LayerManager.h
MyGUI_ListBox.h
MyGUI_Precompiled.h
MyGUI_ResourceSkin.h
MyGUI_WidgetManager.h
MyGUI::Any
Definition MyGUI_Any.h:56
MyGUI::Any::Null
static const Any Null
Definition MyGUI_Any.h:58
MyGUI::ComboBox::addItem
void addItem(const UString &_name, Any _data=Any::Null)
Add an item to the end of a array.
Definition MyGUI_ComboBox.cpp:470
MyGUI::ComboBox::beginToItemSelected
void beginToItemSelected()
Move all elements so selected becomes visible.
Definition MyGUI_ComboBox.cpp:512
MyGUI::ComboBox::eventComboAccept
EventPairAddParameter< EventHandle_WidgetVoid, EventHandle_ComboBoxPtrSizeT > eventComboAccept
Definition MyGUI_ComboBox.h:143
MyGUI::ComboBox::findItemIndexWith
size_t findItemIndexWith(const UString &_name)
Search item, returns the position of the first occurrence in array or ITEM_NONE if item not found.
Definition MyGUI_ComboBox.cpp:372
MyGUI::ComboBox::_setItemNameAt
void _setItemNameAt(size_t _index, const UString &_name) override
Definition MyGUI_ComboBox.cpp:569
MyGUI::ComboBox::clearIndexSelected
void clearIndexSelected()
Clear item selection.
Definition MyGUI_ComboBox.cpp:480
MyGUI::ComboBox::setItemNameAt
void setItemNameAt(size_t _index, const UString &_name)
Replace an item name at a specified position.
Definition MyGUI_ComboBox.cpp:320
MyGUI::ComboBox::setIndexSelected
void setIndexSelected(size_t _index)
Select specified _index.
Definition MyGUI_ComboBox.cpp:306
MyGUI::ComboBox::removeAllItems
void removeAllItems()
Remove all items.
Definition MyGUI_ComboBox.cpp:348
MyGUI::ComboBox::_addItem
void _addItem(const MyGUI::UString &_name) override
Definition MyGUI_ComboBox.cpp:559
MyGUI::ComboBox::onKeyButtonPressed
void onKeyButtonPressed(KeyCode _key, Char _char) override
Definition MyGUI_ComboBox.cpp:147
MyGUI::ComboBox::_getItemNameAt
const UString & _getItemNameAt(size_t _index) const override
Definition MyGUI_ComboBox.cpp:574
MyGUI::ComboBox::_removeItemAt
void _removeItemAt(size_t _index) override
Definition MyGUI_ComboBox.cpp:564
MyGUI::ComboBox::shutdownOverride
void shutdownOverride() override
Definition MyGUI_ComboBox.cpp:82
MyGUI::ComboBox::insertItemAt
void insertItemAt(size_t _index, const UString &_item, Any _data=Any::Null)
Insert an item into a array at a specified position.
Definition MyGUI_ComboBox.cpp:334
MyGUI::ComboBox::getIndexSelected
size_t getIndexSelected() const
Get index of selected item (ITEM_NONE if none selected).
Definition MyGUI_ComboBox.cpp:475
MyGUI::ComboBox::beginToItemAt
void beginToItemAt(size_t _index)
Move all elements so specified becomes visible.
Definition MyGUI_ComboBox.cpp:495
MyGUI::ComboBox::getSmoothShow
bool getSmoothShow() const
Get smooth show of list flag.
Definition MyGUI_ComboBox.cpp:528
MyGUI::ComboBox::setFlowDirection
void setFlowDirection(FlowDirection _value)
Set direction, where drop down list appears (TopToBottom by default).
Definition MyGUI_ComboBox.cpp:377
MyGUI::ComboBox::beginToItemLast
void beginToItemLast()
Move all elements so last becomes visible.
Definition MyGUI_ComboBox.cpp:506
MyGUI::ComboBox::setMaxListLength
void setMaxListLength(int _value)
Get max list length.
Definition MyGUI_ComboBox.cpp:533
MyGUI::ComboBox::initialiseOverride
void initialiseOverride() override
Definition MyGUI_ComboBox.cpp:26
MyGUI::ComboBox::getComboModeDrop
bool getComboModeDrop() const
Get drop list mode flag.
Definition MyGUI_ComboBox.cpp:518
MyGUI::ComboBox::eventComboChangePosition
EventPair< EventHandle_WidgetSizeT, EventHandle_ComboBoxPtrSizeT > eventComboChangePosition
Definition MyGUI_ComboBox.h:150
MyGUI::ComboBox::setSmoothShow
void setSmoothShow(bool _value)
Set smooth show of list.
Definition MyGUI_ComboBox.cpp:523
MyGUI::ComboBox::setItemDataAt
void setItemDataAt(size_t _index, Any _data)
Replace an item data at a specified position.
Definition MyGUI_ComboBox.cpp:327
MyGUI::ComboBox::_getItemCount
size_t _getItemCount() const override
Definition MyGUI_ComboBox.cpp:554
MyGUI::ComboBox::removeItemAt
void removeItemAt(size_t _index)
Remove item at a specified position.
Definition MyGUI_ComboBox.cpp:341
MyGUI::ComboBox::clearItemDataAt
void clearItemDataAt(size_t _index)
Clear an item data at a specified position.
Definition MyGUI_ComboBox.cpp:485
MyGUI::ComboBox::_resetContainer
void _resetContainer(bool _update) override
Definition MyGUI_ComboBox.cpp:579
MyGUI::ComboBox::getMaxListLength
int getMaxListLength() const
Set max list length.
Definition MyGUI_ComboBox.cpp:538
MyGUI::ComboBox::beginToItemFirst
void beginToItemFirst()
Move all elements so first becomes visible.
Definition MyGUI_ComboBox.cpp:500
MyGUI::ComboBox::getItemCount
size_t getItemCount() const
Get number of items.
Definition MyGUI_ComboBox.cpp:465
MyGUI::ComboBox::getFlowDirection
FlowDirection getFlowDirection() const
Get direction, where drop down list appears.
Definition MyGUI_ComboBox.cpp:543
MyGUI::ComboBox::setPropertyOverride
void setPropertyOverride(std::string_view _key, std::string_view _value) override
Definition MyGUI_ComboBox.cpp:434
MyGUI::ComboBox::getItemNameAt
const UString & getItemNameAt(size_t _index) const
Get item name from specified position.
Definition MyGUI_ComboBox.cpp:490
MyGUI::ComboBox::setComboModeDrop
void setComboModeDrop(bool _drop)
Set drop list mode (text can not be edited).
Definition MyGUI_ComboBox.cpp:354
MyGUI::ControllerFadeAlpha
Definition MyGUI_ControllerFadeAlpha.h:19
MyGUI::ControllerFadeAlpha::getClassTypeName
static std::string_view getClassTypeName()
Definition MyGUI_ControllerFadeAlpha.h:20
MyGUI::ControllerFadeAlpha::setAlpha
void setAlpha(float _value)
Definition MyGUI_ControllerFadeAlpha.cpp:83
MyGUI::ControllerFadeAlpha::setCoef
void setCoef(float _value)
Definition MyGUI_ControllerFadeAlpha.cpp:88
MyGUI::ControllerFadeAlpha::setEnabled
void setEnabled(bool _value)
Definition MyGUI_ControllerFadeAlpha.cpp:93
MyGUI::ControllerItem
Definition MyGUI_ControllerItem.h:26
MyGUI::ControllerManager::createItem
ControllerItem * createItem(std::string_view _type)
Definition MyGUI_ControllerManager.cpp:71
MyGUI::ControllerManager::getInstance
static ControllerManager & getInstance()
MyGUI::ControllerManager::addItem
void addItem(Widget *_widget, ControllerItem *_item)
Definition MyGUI_ControllerManager.cpp:77
MyGUI::EditBox
widget description should be here.
Definition MyGUI_EditBox.h:26
MyGUI::EditBox::updateView
void updateView()
Definition MyGUI_EditBox.cpp:1809
MyGUI::EditBox::setEditStatic
void setEditStatic(bool _value)
Definition MyGUI_EditBox.cpp:2028
MyGUI::EditBox::eventEditTextChange
EventPair< EventHandle_WidgetVoid, EventHandle_EditPtr > eventEditTextChange
Definition MyGUI_EditBox.h:248
MyGUI::EditBox::setCaption
void setCaption(const UString &_value) override
Definition MyGUI_EditBox.cpp:1638
MyGUI::ICroppedRectangle::getAbsoluteCoord
IntCoord getAbsoluteCoord() const
Definition MyGUI_ICroppedRectangle.h:76
MyGUI::IObject::castType
Type * castType(bool _throw=true)
Definition MyGUI_IObject.h:18
MyGUI::InputManager::setKeyFocusWidget
void setKeyFocusWidget(Widget *_widget)
Definition MyGUI_InputManager.cpp:388
MyGUI::InputManager::getMouseFocusWidget
Widget * getMouseFocusWidget() const
Definition MyGUI_InputManager.cpp:638
MyGUI::InputManager::getInstance
static InputManager & getInstance()
MyGUI::LanguageManager::getInstance
static LanguageManager & getInstance()
Definition MyGUI_LanguageManager.cpp:18
MyGUI::ListBox
widget description should be here.
Definition MyGUI_ListBox.h:28
MyGUI::ListBox::getClassTypeName
static std::string_view getClassTypeName()
Definition MyGUI_ListBox.h:29
MyGUI::ListBox::getItemNameAt
const UString & getItemNameAt(size_t _index) const
Get item name from specified position.
Definition MyGUI_ListBox.cpp:733
MyGUI::ListBox::getOptimalHeight
int getOptimalHeight() const
Return optimal height to fit all items in ListBox.
Definition MyGUI_ListBox.cpp:863
MyGUI::ScrollViewBase::mScrollViewClient
Widget * mScrollViewClient
Definition MyGUI_ScrollViewBase.h:45
MyGUI::UString
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
Definition MyGUI_UString.h:144
MyGUI::UserData::getUserString
std::string_view getUserString(std::string_view _key) const
Definition MyGUI_WidgetUserData.cpp:20
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:40
MyGUI::Widget::eventChangeProperty
EventHandle_WidgetStringString eventChangeProperty
Definition MyGUI_Widget.h:324
MyGUI::Widget::getParentSize
IntSize getParentSize() const
Definition MyGUI_Widget.cpp:1082
MyGUI::Widget::assignWidget
void assignWidget(T *&_widget, std::string_view _name)
Definition MyGUI_Widget.h:413
MyGUI::Widget::_createSkinWidget
Widget * _createSkinWidget(WidgetStyle _style, std::string_view _type, std::string_view _skin, const IntCoord &_coord, Align _align, std::string_view _layer={}, std::string_view _name={})
Definition MyGUI_Widget.cpp:1206
MyGUI::WidgetInput::getNeedToolTip
bool getNeedToolTip() const
Definition MyGUI_WidgetInput.cpp:127
MyGUI::WidgetInput::eventToolTip
EventHandle_WidgetToolTip eventToolTip
Definition MyGUI_WidgetInput.h:226
MyGUI::utility::parseValue
T parseValue(std::string_view _value)
Definition MyGUI_StringUtility.h:60
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::ALPHA_MAX
constexpr float ALPHA_MAX
Definition MyGUI_Macros.h:20
MyGUI::ALPHA_MIN
constexpr float ALPHA_MIN
Definition MyGUI_Macros.h:21
MyGUI::COMBO_ALPHA_MAX
const float COMBO_ALPHA_MAX
Definition MyGUI_ComboBox.cpp:22
MyGUI::COMBO_ALPHA_MIN
const float COMBO_ALPHA_MIN
Definition MyGUI_ComboBox.cpp:23
MyGUI::Char
unsigned int Char
Definition MyGUI_Types.h:50
MyGUI::ITEM_NONE
constexpr size_t ITEM_NONE
Definition MyGUI_Macros.h:19
MyGUI::IntCoord
types::TCoord< int > IntCoord
Definition MyGUI_Types.h:36
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::COMBO_ALPHA_COEF
const float COMBO_ALPHA_COEF
Definition MyGUI_ComboBox.cpp:24
MyGUI::newDelegate
delegates::DelegateFunction< Args... > * newDelegate(void(*_func)(Args... args))
Definition MyGUI_Delegate.h:100
MyGUI::Align::Default
@ Default
Definition MyGUI_Align.h:36
MyGUI::FlowDirection
Definition MyGUI_FlowDirection.h:19
MyGUI::FlowDirection::isVertical
bool isVertical() const
Definition MyGUI_FlowDirection.h:54
MyGUI::FlowDirection::TopToBottom
@ TopToBottom
Definition MyGUI_FlowDirection.h:24
MyGUI::FlowDirection::RightToLeft
@ RightToLeft
Definition MyGUI_FlowDirection.h:23
MyGUI::FlowDirection::BottomToTop
@ BottomToTop
Definition MyGUI_FlowDirection.h:25
MyGUI::FlowDirection::LeftToRight
@ LeftToRight
Definition MyGUI_FlowDirection.h:22
MyGUI::KeyCode
Definition MyGUI_KeyCode.h:16
MyGUI::KeyCode::NumpadEnter
@ NumpadEnter
Definition MyGUI_KeyCode.h:125
MyGUI::KeyCode::ArrowDown
@ ArrowDown
Definition MyGUI_KeyCode.h:145
MyGUI::KeyCode::Return
@ Return
Definition MyGUI_KeyCode.h:47
MyGUI::MouseButton
Definition MyGUI_MouseButton.h:16
MyGUI::MouseButton::Left
@ Left
Definition MyGUI_MouseButton.h:21
MyGUI::ToolTipInfo
Definition MyGUI_WidgetToolTip.h:18
MyGUI::WidgetStyle::Popup
@ Popup
Definition MyGUI_WidgetStyle.h:23
MyGUI::types::TCoord::height
T height
Definition MyGUI_TCoord.h:23
MyGUI::types::TCoord::right
T right() const
Definition MyGUI_TCoord.h:125
MyGUI::types::TCoord::width
T width
Definition MyGUI_TCoord.h:22
MyGUI::types::TCoord::top
T top
Definition MyGUI_TCoord.h:21
MyGUI::types::TCoord::left
T left
Definition MyGUI_TCoord.h:20
MyGUI::types::TCoord::bottom
T bottom() const
Definition MyGUI_TCoord.h:130
MyGUI::types::TSize::width
T width
Definition MyGUI_TSize.h:19
MyGUI::types::TSize::height
T height
Definition MyGUI_TSize.h:20