#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/DropDown.hpp>
Classes | |
| struct | Item |
Public Member Functions | |
| DropDown (std::vector< Item > &items) | |
| DropDown (wxWindow *parent, std::vector< Item > &items, long style=0) | |
| void | Create (wxWindow *parent, long style=0) |
| void | Invalidate (bool clear=false) |
| int | GetSelection () const |
| void | SetSelection (int n) |
| wxString | GetValue () const |
| void | SetValue (const wxString &value) |
| void | SetCornerRadius (double radius) |
| void | SetBorderColor (StateColor const &color) |
| void | SetSelectorBorderColor (StateColor const &color) |
| void | SetTextColor (StateColor const &color) |
| void | SetSelectorBackgroundColor (StateColor const &color) |
| void | SetUseContentWidth (bool use, bool limit_max_content_width=false) |
| void | SetAlignIcon (bool align) |
| void | Rescale () |
| bool | HasDismissLongTime () |
| void | Popup (wxWindow *focus=nullptr) override |
| bool | Create (wxWindow *parent, int flags=wxBORDER_NONE) |
Protected Member Functions | |
| void | Dismiss () override |
| void | OnDismiss () override |
| bool | ShouldDismissOnTopWindowDeactivate () override |
Private Member Functions | |
| void | paintEvent (wxPaintEvent &evt) |
| void | paintNow () |
| void | render (wxDC &dc) |
| int | hoverIndex () |
| int | selectedItem () |
| std::pair< int, int > | actionColumn () const |
| void | messureSize () |
| void | autoPosition () |
| void | mouseDown (wxMouseEvent &event) |
| void | mouseReleased (wxMouseEvent &event) |
| void | mouseCaptureLost (wxMouseCaptureLostEvent &event) |
| void | mouseMove (wxMouseEvent &event) |
| void | mouseWheelMoved (wxMouseEvent &event) |
| void | sendDropDownEvent () |
| void | sendDropDownActionEvent (int index) |
Private Attributes | |
| std::vector< Item > & | items |
| size_t | count = 0 |
| wxString | group |
| bool | need_sync = false |
| int | selection = -1 |
| int | hover_item = -1 |
| DropDown * | subDropDown { nullptr } |
| DropDown * | mainDropDown { nullptr } |
| double | radius = 0 |
| bool | use_content_width = false |
| bool | limit_max_content_width = false |
| bool | align_icon = false |
| bool | text_off = false |
| wxSize | textSize |
| wxSize | iconSize |
| int | actionIconWidth = 0 |
| wxSize | rowSize |
| StateHandler | state_handler |
| StateColor | text_color |
| StateColor | border_color |
| StateColor | selector_border_color |
| StateColor | selector_background_color |
| ScalableBitmap | check_bitmap |
| ScalableBitmap | arrow_bitmap |
| bool | pressedDown = false |
| boost::posix_time::ptime | dismissTime |
| wxPoint | offset |
| wxPoint | dragStart |
Friends | |
| class | ComboBox |
| struct DropDown::Item |
| Class Members | ||
|---|---|---|
| wxBitmap | action_icon | |
| wxString | alias {} | |
| void * | data {nullptr} | |
| int | flag {0} | |
| wxString | group_key {} | |
| wxString | group_label {} | |
| wxBitmap | icon | |
| wxBitmap | icon_textctrl | |
| int | style { 0 } | |
| wxString | text | |
| wxString | text_static_tips | |
| wxString | tip {} | |
| DropDown::DropDown | ( | std::vector< Item > & | items | ) |
References DropDown(), border_color, items, selector_background_color, selector_border_color, state_handler, and text_color.
Referenced by DropDown(), DropDown(), and messureSize().
| DropDown::DropDown | ( | wxWindow * | parent, |
| std::vector< Item > & | items, | ||
| long | style = 0 ) |
References DropDown(), Create(), items, and style.
|
private |
References actionIconWidth, count, and rowSize.
Referenced by mouseReleased(), and render().
|
private |
References count, mainDropDown, messureSize(), offset, rowSize, selection, and use_content_width.
| void DropDown::Create | ( | wxWindow * | parent, |
| long | style = 0 ) |
References arrow_bitmap, Label::Body_14, border_color, check_bitmap, PopupWindow::Create(), DD_NO_CHECK_ICON, DD_NO_TEXT, selector_background_color, selector_border_color, state_handler, style, text_color, and text_off.
Referenced by DropDown().
|
inherited |
References GetTopParent(), and style.
Referenced by PopupWindow(), and DropDown::Create().
|
overrideprotected |
References subDropDown.
| wxString DropDown::GetValue | ( | ) | const |
| bool DropDown::HasDismissLongTime | ( | ) |
References dismissTime.
|
private |
References count, group, hover_item, items, and subDropDown.
Referenced by mouseMove(), mouseReleased(), mouseWheelMoved(), render(), and sendDropDownEvent().
| void DropDown::Invalidate | ( | bool | clear = false | ) |
|
private |
References DropDown(), actionIconWidth, align_icon, arrow_bitmap, check_bitmap, count, GetBmpSize(), group, iconSize, items, limit_max_content_width, main(), mainDropDown, mouseMove(), need_sync, rowSize, subDropDown, text_off, textSize, and use_content_width.
Referenced by autoPosition(), SetSelection(), and SetUseContentWidth().
|
private |
References mouseReleased().
Referenced by wxDEFINE_EVENT().
|
private |
References dragStart, mouseMove(), and pressedDown.
Referenced by wxDEFINE_EVENT().
|
private |
References count, dragStart, hover_item, hoverIndex(), items, mainDropDown, offset, paintNow(), pressedDown, rowSize, and subDropDown.
Referenced by messureSize(), mouseDown(), and wxDEFINE_EVENT().
|
private |
References actionColumn(), dragStart, hover_item, hoverIndex(), items, mainDropDown, paintNow(), pressedDown, sendDropDownActionEvent(), sendDropDownEvent(), and subDropDown.
Referenced by mouseCaptureLost(), and wxDEFINE_EVENT().
|
private |
References count, hover_item, hoverIndex(), items, offset, paintNow(), and rowSize.
Referenced by wxDEFINE_EVENT().
|
overrideprotected |
References dismissTime, hover_item, mainDropDown, and subDropDown.
|
private |
References render().
Referenced by wxDEFINE_EVENT().
|
private |
Referenced by mouseMove(), mouseReleased(), mouseWheelMoved(), SetBorderColor(), SetCornerRadius(), SetSelection(), SetSelectorBackgroundColor(), SetSelectorBorderColor(), and SetTextColor().
|
override |
References mainDropDown.
|
private |
References _DrawSplitItem(), actionColumn(), arrow_bitmap, border_color, check_bitmap, StateColor::Checked, count, StateColor::darkModeColorFor(), DD_ITEM_STYLE_DIMMED, DD_ITEM_STYLE_DISABLED, DD_ITEM_STYLE_SPLIT_ITEM, StateColor::Enabled, GetBmpSize(), group, hover_item, StateColor::Hovered, hoverIndex(), iconSize, items, offset, radius, rowSize, selectedItem(), selector_background_color, selector_border_color, state_handler, style, subDropDown, text_color, text_off, and textSize.
Referenced by paintEvent().
|
private |
References count, group, items, selection, and subDropDown.
Referenced by render().
|
private |
References DD_ITEM_STYLE_DISABLED, and items.
Referenced by mouseReleased().
|
private |
References DD_ITEM_STYLE_DISABLED, hoverIndex(), items, and style.
Referenced by mouseReleased().
| void DropDown::SetAlignIcon | ( | bool | align | ) |
References align_icon.
| void DropDown::SetBorderColor | ( | StateColor const & | color | ) |
| void DropDown::SetCornerRadius | ( | double | radius | ) |
| void DropDown::SetSelection | ( | int | n | ) |
References items, messureSize(), need_sync, paintNow(), selection, and subDropDown.
| void DropDown::SetSelectorBackgroundColor | ( | StateColor const & | color | ) |
References paintNow(), selector_background_color, and state_handler.
| void DropDown::SetSelectorBorderColor | ( | StateColor const & | color | ) |
References paintNow(), selector_border_color, and state_handler.
| void DropDown::SetTextColor | ( | StateColor const & | color | ) |
| void DropDown::SetUseContentWidth | ( | bool | use, |
| bool | limit_max_content_width = false ) |
References limit_max_content_width, messureSize(), need_sync, and use_content_width.
Referenced by Slic3r::GUI::PlaterPresetComboBox::PlaterPresetComboBox(), Slic3r::GUI::TabPresetComboBox::TabPresetComboBox(), Slic3r::GUI::Choice::BUILD(), Slic3r::GUI::PrinterAgentChoice::BUILD(), and BitmapChoiceRenderer::CreateEditorCtrl().
| void DropDown::SetValue | ( | const wxString & | value | ) |
|
overrideprotectedvirtual |
Reimplemented from PopupWindow.
References mainDropDown, and subDropDown.
|
private |
Referenced by actionColumn(), and messureSize().
|
private |
Referenced by messureSize(), and SetAlignIcon().
|
private |
Referenced by Create(), messureSize(), and render().
|
private |
Referenced by DropDown(), Create(), render(), and SetBorderColor().
|
private |
Referenced by Create(), messureSize(), and render().
|
private |
Referenced by actionColumn(), autoPosition(), hoverIndex(), messureSize(), mouseMove(), mouseWheelMoved(), render(), and selectedItem().
|
private |
Referenced by HasDismissLongTime(), and OnDismiss().
|
private |
Referenced by mouseDown(), mouseMove(), and mouseReleased().
|
private |
Referenced by hoverIndex(), messureSize(), render(), and selectedItem().
|
private |
Referenced by hoverIndex(), Invalidate(), mouseMove(), mouseReleased(), mouseWheelMoved(), OnDismiss(), and render().
|
private |
Referenced by messureSize(), and render().
|
private |
|
private |
Referenced by messureSize(), and SetUseContentWidth().
Referenced by autoPosition(), messureSize(), mouseMove(), mouseReleased(), OnDismiss(), Popup(), and ShouldDismissOnTopWindowDeactivate().
|
private |
Referenced by Invalidate(), messureSize(), Rescale(), SetSelection(), and SetUseContentWidth().
|
private |
Referenced by autoPosition(), Invalidate(), mouseMove(), mouseWheelMoved(), and render().
|
private |
Referenced by mouseDown(), mouseMove(), and mouseReleased().
|
private |
Referenced by render(), and SetCornerRadius().
|
private |
Referenced by actionColumn(), autoPosition(), messureSize(), mouseMove(), mouseWheelMoved(), and render().
|
private |
Referenced by autoPosition(), GetSelection(), GetValue(), Invalidate(), selectedItem(), SetSelection(), and SetValue().
|
private |
Referenced by DropDown(), Create(), render(), and SetSelectorBackgroundColor().
|
private |
Referenced by DropDown(), Create(), render(), and SetSelectorBorderColor().
|
private |
Referenced by DropDown(), Create(), render(), SetBorderColor(), SetSelectorBackgroundColor(), SetSelectorBorderColor(), and SetTextColor().
Referenced by Dismiss(), hoverIndex(), messureSize(), mouseMove(), mouseReleased(), OnDismiss(), render(), selectedItem(), SetSelection(), and ShouldDismissOnTopWindowDeactivate().
|
private |
Referenced by DropDown(), Create(), render(), and SetTextColor().
|
private |
Referenced by Create(), messureSize(), and render().
|
private |
Referenced by messureSize(), and render().
|
private |
Referenced by autoPosition(), messureSize(), and SetUseContentWidth().