#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/CAD/DesignRowList.hpp>
Classes | |
| struct | Action |
| struct | Row |
| struct | Hit |
Public Member Functions | |
| DesignRowList (wxWindow *parent, int max_visible, bool selectable=true, long style=wxBORDER_SIMPLE) | |
| void | set_rows (std::vector< Row > rows) |
| int | selection () const |
| void | select (int row) |
| void | unselect () |
| void | begin_rename (int row) |
| void | Rescale () |
| bool | AcceptsFocus () const override |
Public Attributes | |
| std::function< void()> | on_select |
| std::function< void()> | on_activate |
| std::function< void(int row, int id)> | on_action |
| std::function< void(int row, const wxPoint &screen)> | on_menu |
| std::function< void(int row, const wxString &name)> | on_rename |
Static Public Attributes | |
| static constexpr const char * | hover_chip = "#D4D4D4" |
Protected Member Functions | |
| void | OnDrawItem (wxDC &dc, const wxRect &rect, size_t n) const override |
| void | OnDrawBackground (wxDC &dc, const wxRect &rect, size_t n) const override |
| wxCoord | OnMeasureItem (size_t n) const override |
Private Member Functions | |
| Hit | hit_test (const wxPoint &pt) const |
| wxRect | cell_rect (const wxRect &row, size_t count, size_t i) const |
| wxRect | label_rect (const wxRect &row, const Row &r) const |
| const ScalableBitmap * | icon (const std::string &name) const |
| void | load_icons () |
| void | set_hover (const Hit &h) |
| void | open_editor (int row) |
| void | end_rename (bool commit) |
| void | measure_row () |
| void | fit_rows () |
Private Attributes | |
| std::vector< Row > | m_rows |
| std::map< std::string, ScalableBitmap > | m_icons |
| int | m_max_visible |
| bool | m_selectable |
| int | m_row_h {0} |
| Hit | m_hover |
| Hit | m_pressed |
| wxTextCtrl * | m_editor {nullptr} |
| int | m_edit_row {wxNOT_FOUND} |
| struct Slic3r::GUI::DesignRowList::Action |
| struct Slic3r::GUI::DesignRowList::Row |
| Class Members | ||
|---|---|---|
| vector< Action > | actions | |
| wxColour | colour | |
| wxString | edit_text | |
| string | icon | |
| wxString | label | |
| Slic3r::GUI::DesignRowList::DesignRowList | ( | wxWindow * | parent, |
| int | max_visible, | ||
| bool | selectable = true, | ||
| long | style = wxBORDER_SIMPLE ) |
References Slic3r::GUI::DesignRowList::Hit::cell, end_rename(), fit_rows(), hit_test(), m_max_visible, m_pressed, m_rows, m_selectable, measure_row(), on_activate, on_menu, on_select, Slic3r::GUI::DesignRowList::Hit::row, select(), Slic3r::GUI::selectable(), set_hover(), style, and Slic3r::GUI::wxMouseEvent.
|
inlineoverride |
References m_selectable.
| void Slic3r::GUI::DesignRowList::begin_rename | ( | int | row | ) |
|
private |
References count, Slic3r::GUI::kCellDip, and Slic3r::GUI::kPadDip.
Referenced by hit_test(), label_rect(), and OnDrawItem().
|
private |
References m_edit_row, m_editor, and on_rename.
Referenced by DesignRowList(), open_editor(), and set_rows().
|
private |
References m_max_visible, and m_row_h.
Referenced by DesignRowList(), Rescale(), and set_rows().
|
private |
References Slic3r::GUI::DesignRowList::Hit::cell, cell_rect(), icon(), m_rows, and Slic3r::GUI::DesignRowList::Hit::row.
Referenced by DesignRowList().
|
private |
References m_icons.
Referenced by hit_test(), label_rect(), and OnDrawItem().
|
private |
References Slic3r::GUI::DesignRowList::Row::actions, cell_rect(), icon(), Slic3r::GUI::DesignRowList::Row::icon, Slic3r::GUI::kGapDip, and Slic3r::GUI::kPadDip.
Referenced by OnDrawItem(), open_editor(), and set_hover().
|
private |
References Slic3r::GUI::DesignRowList::Action::icon, Slic3r::GUI::kIconPx, load(), m_icons, and m_rows.
Referenced by Rescale(), and set_rows().
|
private |
References Slic3r::GUI::kCellDip, and m_row_h.
Referenced by DesignRowList(), and Rescale().
|
overrideprotected |
References StateColor::darkModeColorFor(), m_hover, and m_selectable.
|
overrideprotected |
References Slic3r::GUI::DesignRowList::Row::actions, cell_rect(), Slic3r::GUI::DesignRowList::Row::colour, StateColor::darkModeColorFor(), hover_chip, icon(), Slic3r::GUI::DesignRowList::Row::icon, Slic3r::GUI::kPadDip, Slic3r::GUI::DesignRowList::Row::label, label_rect(), m_hover, and m_rows.
|
overrideprotected |
|
private |
References Slic3r::GUI::DesignRowList::Row::colour, Slic3r::GUI::DesignRowList::Row::edit_text, end_rename(), Slic3r::GUI::DesignRowList::Row::label, label_rect(), m_edit_row, m_editor, and m_rows.
Referenced by begin_rename().
| void Slic3r::GUI::DesignRowList::Rescale | ( | ) |
References fit_rows(), load_icons(), m_icons, and measure_row().
| void Slic3r::GUI::DesignRowList::select | ( | int | row | ) |
References on_select.
Referenced by DesignRowList(), and unselect().
|
inline |
|
private |
References Slic3r::GUI::DesignRowList::Row::actions, Slic3r::GUI::DesignRowList::Hit::cell, Slic3r::GUI::DesignRowList::Row::label, label_rect(), m_hover, m_rows, and Slic3r::GUI::DesignRowList::Hit::row.
Referenced by DesignRowList().
| void Slic3r::GUI::DesignRowList::set_rows | ( | std::vector< Row > | rows | ) |
References end_rename(), fit_rows(), load_icons(), m_hover, m_pressed, and m_rows.
|
inline |
|
staticconstexpr |
Referenced by OnDrawItem(), and Slic3r::GUI::style_sidebar_icon_btn().
|
private |
Referenced by end_rename(), and open_editor().
|
private |
Referenced by end_rename(), and open_editor().
|
private |
Referenced by OnDrawBackground(), OnDrawItem(), set_hover(), and set_rows().
|
private |
Referenced by icon(), load_icons(), and Rescale().
|
private |
Referenced by DesignRowList(), and fit_rows().
|
private |
Referenced by DesignRowList(), and set_rows().
|
private |
Referenced by fit_rows(), measure_row(), and OnMeasureItem().
|
private |
Referenced by DesignRowList(), hit_test(), load_icons(), OnDrawItem(), open_editor(), set_hover(), and set_rows().
|
private |
Referenced by DesignRowList(), AcceptsFocus(), and OnDrawBackground().
| std::function<void(int row, int id)> Slic3r::GUI::DesignRowList::on_action |
| std::function<void()> Slic3r::GUI::DesignRowList::on_activate |
Referenced by DesignRowList().
| std::function<void(int row, const wxPoint& screen)> Slic3r::GUI::DesignRowList::on_menu |
Referenced by DesignRowList().
| std::function<void(int row, const wxString& name)> Slic3r::GUI::DesignRowList::on_rename |
Referenced by end_rename().
| std::function<void()> Slic3r::GUI::DesignRowList::on_select |
Referenced by DesignRowList(), and select().