44 if (mButton !=
nullptr)
95 void ComboBox::notifyButtonPressed(
Widget* _sender,
int _left,
int _top,
MouseButton _id)
108 void ComboBox::notifyListLostFocus(Widget* _sender, Widget* _new)
116 if (focus == mButton)
120 if (mModeDrop && focus ==
mClient)
127 void ComboBox::notifyListSelectAccept(ListBox* _widget,
size_t _position)
129 mItemIndex = _position;
144 void ComboBox::notifyListChangePosition(ListBox* _widget,
size_t _position)
146 mItemIndex = _position;
176 void ComboBox::notifyListMouseItemActivate(
ListBox* _widget,
size_t _position)
178 mItemIndex = _position;
192 void ComboBox::notifyMouseWheel(Widget* _sender,
int _rel)
237 void ComboBox::notifyMousePressed(Widget* _sender,
int _left,
int _top, MouseButton _id)
240 Base::notifyMousePressed(_sender, _left, _top, _id);
246 notifyButtonPressed(
nullptr, _left, _top, _id);
249 void ComboBox::notifyEditTextChange(EditBox* _sender)
264 void ComboBox::showList()
272 IntCoord coord = calculateListPosition();
288 void ComboBox::actionWidgetHide(Widget* _widget, ControllerItem* _controller)
290 _widget->setVisible(
false);
291 _widget->setEnabled(
true);
294 void ComboBox::hideList()
301 controller->eventPostAction +=
newDelegate(
this, &ComboBox::actionWidgetHide);
364 ControllerFadeAlpha* ComboBox::createControllerFadeAlpha(
float _alpha,
float _coef,
bool _enable)
383 mFlowDirection = _value;
386 IntCoord ComboBox::calculateListPosition()
392 length = mMaxListLength;
394 if (mMaxListLength > 0 && length > mMaxListLength)
395 length = mMaxListLength;
412 if ((coord.
top - length) >= 0)
420 if ((coord.
right() + length) <= sizeView.
width)
423 coord.
left -= length;
424 coord.
width = length;
428 if ((coord.
left - length) >= 0)
429 coord.
left -= length;
432 coord.
width = length;
441 if (_key ==
"ModeDrop")
445 else if (_key ==
"FlowDirection")
449 else if (_key ==
"MaxListLength")
453 else if (_key ==
"SmoothShow")
457 else if (_key ==
"AddItem")
529 mShowSmooth = _value;
539 mMaxListLength = _value;
544 return mMaxListLength;
549 return mFlowDirection;
586 if (mList !=
nullptr)