58 if (mButton !=
nullptr)
108 void ComboBox::notifyButtonPressed(
Widget* _sender,
int _left,
int _top,
MouseButton _id)
121 void ComboBox::notifyListLostFocus(Widget* _sender, Widget* _new)
129 if (focus == mButton)
133 if (mModeDrop && focus ==
mClient)
140 void ComboBox::notifyListSelectAccept(ListBox* _widget,
size_t _position)
142 mItemIndex = _position;
157 void ComboBox::notifyListChangePosition(ListBox* _widget,
size_t _position)
159 mItemIndex = _position;
189 void ComboBox::notifyListMouseItemActivate(
ListBox* _widget,
size_t _position)
191 mItemIndex = _position;
205 void ComboBox::notifyMouseWheel(Widget* _sender,
int _rel)
250 void ComboBox::notifyMousePressed(Widget* _sender,
int _left,
int _top, MouseButton _id)
253 Base::notifyMousePressed(_sender, _left, _top, _id);
259 notifyButtonPressed(
nullptr, _left, _top, _id);
262 void ComboBox::notifyEditTextChange(EditBox* _sender)
277 void ComboBox::showList()
285 IntCoord coord = calculateListPosition();
301 void ComboBox::actionWidgetHide(Widget* _widget)
303 _widget->setVisible(
false);
304 _widget->setEnabled(
true);
307 void ComboBox::hideList()
314 controller->eventPostAction +=
newDelegate(
this, &ComboBox::actionWidgetHide);
377 ControllerFadeAlpha* ComboBox::createControllerFadeAlpha(
float _alpha,
float _coef,
bool _enable)
396 mFlowDirection = _value;
399 IntCoord ComboBox::calculateListPosition()
405 length = mMaxListLength;
407 if (mMaxListLength > 0 && length > mMaxListLength)
408 length = mMaxListLength;
425 if ((coord.
top - length) >= 0)
433 if ((coord.
right() + length) <= sizeView.
width)
436 coord.
left -= length;
437 coord.
width = length;
441 if ((coord.
left - length) >= 0)
442 coord.
left -= length;
445 coord.
width = length;
453 if (_key ==
"ModeDrop")
455 else if (_key ==
"FlowDirection")
457 else if (_key ==
"MaxListLength")
459 else if (_key ==
"SmoothShow")
461 else if (_key ==
"AddItem")
531 mShowSmooth = _value;
541 mMaxListLength = _value;
546 return mMaxListLength;
551 return mFlowDirection;
588 if (mList !=
nullptr)