#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GLToolbar.hpp>
Classes | |
| struct | Layout |
| struct | MouseCapture |
Public Types | |
| enum | EType : unsigned char { Normal , Radio , Num_Types } |
Static Public Attributes | |
| static const float | Default_Icons_Size = 40.0f |
Private Types | |
| typedef std::vector< GLToolbarItem * > | ItemsList |
Private Member Functions | |
| void | calc_layout () |
| float | get_width_horizontal () const |
| float | get_width_vertical () const |
| float | get_height_horizontal () const |
| float | get_height_vertical () const |
| float | get_main_size () const |
| void | do_action (GLToolbarItem::EActionType type, int item_id, GLCanvas3D &parent, bool check_hover) |
| void | update_hover_state (const Vec2d &mouse_pos, GLCanvas3D &parent) |
| void | update_hover_state_horizontal (const Vec2d &mouse_pos, GLCanvas3D &parent) |
| void | update_hover_state_vertical (const Vec2d &mouse_pos, GLCanvas3D &parent) |
| int | contains_mouse (const Vec2d &mouse_pos, const GLCanvas3D &parent) const |
| int | contains_mouse_horizontal (const Vec2d &mouse_pos, const GLCanvas3D &parent) const |
| int | contains_mouse_vertical (const Vec2d &mouse_pos, const GLCanvas3D &parent) const |
| void | render_background (float left, float top, float right, float bottom, float border_w, float border_h) const |
| void | render_horizontal (const GLCanvas3D &parent, GLToolbarItem::EType type, bool draw_icons) |
| void | render_vertical (const GLCanvas3D &parent, bool draw_icons) |
| bool | generate_icons_texture () |
| bool | update_items_visibility () |
| bool | update_items_enabled_state () |
Private Attributes | |
| EType | m_type |
| std::string | m_name |
| bool | m_enabled |
| GLTexture | m_icons_texture |
| bool | m_icons_texture_dirty |
| GLTexture | m_images_texture |
| BackgroundTexture | m_background_texture |
| GLTexture | m_arrow_texture |
| Layout | m_layout |
| ItemsList | m_items |
| MouseCapture | m_mouse_capture |
| int | m_pressed_toggable_id |
|
private |
| enum Slic3r::GUI::GLToolbar::EType : unsigned char |
| Slic3r::GUI::GLToolbar::GLToolbar | ( | GLToolbar::EType | type, |
| const std::string & | name ) |
References m_enabled, m_icons_texture_dirty, m_name, m_pressed_toggable_id, and m_type.
| Slic3r::GUI::GLToolbar::~GLToolbar | ( | ) |
References m_items.
| bool Slic3r::GUI::GLToolbar::add_item | ( | const GLToolbarItem::Data & | data, |
| GLToolbarItem::EType | type = GLToolbarItem::Action ) |
References m_items, and m_layout.
Referenced by Slic3r::GUI::setup_collapse_toolbar().
| bool Slic3r::GUI::GLToolbar::add_separator | ( | ) |
References m_items, m_layout, and Slic3r::GUI::GLToolbarItem::Separator.
|
private |
References get_height_horizontal(), get_height_vertical(), get_width_horizontal(), get_width_vertical(), Slic3r::GUI::GLToolbar::Layout::Horizontal, m_layout, and Slic3r::GUI::GLToolbar::Layout::Vertical.
Referenced by get_height(), and get_width().
|
private |
References contains_mouse_horizontal(), contains_mouse_vertical(), Slic3r::GUI::GLToolbar::Layout::Horizontal, m_enabled, m_layout, and Slic3r::GUI::GLToolbar::Layout::Vertical.
Referenced by on_mouse().
|
private |
References Slic3r::GUI::GLCanvas3D::get_canvas_size(), Slic3r::GUI::GLToolbarItem::get_extra_size_ratio(), Slic3r::GUI::Size::get_height(), Slic3r::GUI::Size::get_width(), Slic3r::GUI::GLToolbarItem::is_action_with_text(), Slic3r::GUI::GLToolbarItem::is_separator(), Slic3r::GUI::GLToolbarItem::is_visible(), m_items, and m_layout.
Referenced by contains_mouse().
|
private |
References Slic3r::GUI::GLCanvas3D::get_canvas_size(), Slic3r::GUI::GLToolbarItem::get_extra_size_ratio(), Slic3r::GUI::Size::get_height(), Slic3r::GUI::Size::get_width(), Slic3r::GUI::GLToolbarItem::is_action_with_text(), Slic3r::GUI::GLToolbarItem::is_action_with_text_image(), Slic3r::GUI::GLToolbarItem::is_separator(), Slic3r::GUI::GLToolbarItem::is_visible(), m_items, and m_layout.
Referenced by contains_mouse().
| bool Slic3r::GUI::GLToolbar::del_all_item | ( | ) |
References m_items, and m_layout.
Referenced by Slic3r::GUI::setup_collapse_toolbar().
|
private |
References Slic3r::GUI::GLToolbarItem::Disabled, Slic3r::GUI::GLToolbarItem::do_left_action(), Slic3r::GUI::GLToolbarItem::do_right_action(), Slic3r::GUI::GLToolbarItem::get_name(), Slic3r::GUI::GLToolbarItem::get_state(), Slic3r::GUI::GLToolbarItem::Hover, Slic3r::GUI::GLToolbarItem::HoverPressed, Slic3r::GUI::GLToolbarItem::is_disabled(), Slic3r::GUI::GLToolbarItem::is_hovered(), Slic3r::GUI::GLToolbarItem::is_left_toggable(), Slic3r::GUI::GLToolbarItem::is_pressed(), Slic3r::GUI::GLToolbarItem::is_right_toggable(), Slic3r::GUI::GLToolbarItem::is_separator(), Slic3r::GUI::GLToolbarItem::Left, m_items, m_pressed_toggable_id, m_type, Normal, Slic3r::GUI::GLToolbarItem::Normal, Slic3r::GUI::GLToolbarItem::Pressed, Radio, Slic3r::GUI::GLCanvas3D::render(), Slic3r::GUI::GLToolbarItem::reset_last_action_type(), Slic3r::GUI::GLToolbarItem::Right, select_item(), and Slic3r::GUI::GLToolbarItem::set_state().
Referenced by force_left_action(), force_right_action(), and on_mouse().
|
inline |
References do_action(), and Slic3r::GUI::GLToolbarItem::Left.
|
inline |
References do_action(), and Slic3r::GUI::GLToolbarItem::Right.
| int Slic3r::GUI::GLToolbar::generate_button_text_textures | ( | wxFont & | font | ) |
References Slic3r::GUI::GLToolbarItem::generate_texture(), Slic3r::GUI::GLToolbarItem::is_action_with_text(), Slic3r::GUI::GLToolbarItem::is_action_with_text_image(), and m_items.
|
private |
References m_icons_texture, m_icons_texture_dirty, m_items, m_layout, m_type, Normal, and Slic3r::resources_dir().
Referenced by render().
| int Slic3r::GUI::GLToolbar::generate_image_textures | ( | ) |
References Slic3r::GUI::GLToolbarItem::generate_image_texture(), Slic3r::GUI::GLToolbarItem::is_action_with_text_image(), and m_items.
| void Slic3r::GUI::GLToolbar::get_additional_tooltip | ( | int | item_id, |
| std::string & | text ) |
| float Slic3r::GUI::GLToolbar::get_height | ( | ) |
References calc_layout(), and m_layout.
Referenced by Slic3r::GUI::GLCanvas3D::get_collapse_toolbar_height(), render_horizontal(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_variable_layer_height_dialog(), and render_vertical().
|
private |
|
private |
References get_main_size().
Referenced by calc_layout().
|
inline |
|
inline |
| GLToolbarItem * Slic3r::GUI::GLToolbar::get_item | ( | const std::string & | item_name | ) |
References m_enabled, and m_items.
Referenced by Slic3r::GUI::GLCanvas3D::LayersEditing::render_variable_layer_height_dialog().
| int Slic3r::GUI::GLToolbar::get_item_id | ( | const std::string & | name | ) | const |
|
inline |
| GLToolbar::Layout::EType Slic3r::GUI::GLToolbar::get_layout_type | ( | ) | const |
|
private |
References m_items, and m_layout.
Referenced by get_height_vertical().
| float Slic3r::GUI::GLToolbar::get_scaled_icon_size | ( | ) |
| size_t Slic3r::GUI::GLToolbar::get_state_hash | ( | ) | const |
| std::string Slic3r::GUI::GLToolbar::get_tooltip | ( | ) | const |
References m_items.
Referenced by Slic3r::GUI::GLCanvas3D::_render_frame().
|
inline |
| int Slic3r::GUI::GLToolbar::get_visible_items_cnt | ( | ) | const |
| float Slic3r::GUI::GLToolbar::get_width | ( | ) |
References calc_layout(), and m_layout.
Referenced by Slic3r::GUI::GLCanvas3D::get_collapse_toolbar_width(), render_horizontal(), and render_vertical().
|
private |
|
private |
References m_items, and m_layout.
Referenced by calc_layout().
| bool Slic3r::GUI::GLToolbar::init | ( | const BackgroundTexture::Metadata & | background_texture | ) |
References Slic3r::GUI::BackgroundTexture::Metadata::filename, m_background_texture, Slic3r::resources_dir(), and Slic3r::GUI::GLTexture::SingleThreaded.
Referenced by Slic3r::GUI::GLCanvas3D::_switch_toolbars_icon_filename().
| bool Slic3r::GUI::GLToolbar::init_arrow | ( | const std::string & | filename | ) |
References m_arrow_texture, and Slic3r::resources_dir().
| bool Slic3r::GUI::GLToolbar::is_any_item_pressed | ( | ) | const |
References m_items.
Referenced by update_items_state().
|
inline |
| bool Slic3r::GUI::GLToolbar::is_item_disabled | ( | const std::string & | name | ) | const |
References m_items.
Referenced by select_item().
| bool Slic3r::GUI::GLToolbar::is_item_pressed | ( | const std::string & | name | ) | const |
| bool Slic3r::GUI::GLToolbar::is_item_visible | ( | const std::string & | name | ) | const |
| bool Slic3r::GUI::GLToolbar::on_mouse | ( | wxMouseEvent & | evt, |
| GLCanvas3D & | parent ) |
References contains_mouse(), do_action(), Slic3r::GUI::GLToolbarItem::Left, m_enabled, m_items, m_mouse_capture, m_pressed_toggable_id, Slic3r::GUI::GLToolbarItem::Right, Slic3r::GUI::GLCanvas3D::set_as_dirty(), update_hover_state(), and Slic3r::GUI::wxMouseEvent.
| void Slic3r::GUI::GLToolbar::render | ( | const GLCanvas3D & | parent, |
| GLToolbarItem::EType | type = GLToolbarItem::Action ) |
References generate_icons_texture(), Slic3r::GUI::GLToolbar::Layout::Horizontal, m_enabled, m_icons_texture_dirty, m_items, m_layout, render_horizontal(), render_vertical(), and Slic3r::GUI::GLToolbar::Layout::Vertical.
| void Slic3r::GUI::GLToolbar::render_arrow | ( | const GLCanvas3D & | parent, |
| GLToolbarItem * | highlighted_item ) |
References Slic3r::GUI::GLToolbarItem::get_name(), m_arrow_texture, m_items, m_layout, and Slic3r::GUI::GLTexture::render_sub_texture().
|
private |
References Slic3r::GUI::GLToolbar::Layout::HO_Left, Slic3r::GUI::GLToolbar::Layout::HO_Right, m_background_texture, m_layout, Slic3r::GUI::GLTexture::render_sub_texture(), Slic3r::GUI::GLToolbar::Layout::VO_Bottom, and Slic3r::GUI::GLToolbar::Layout::VO_Top.
Referenced by render_horizontal(), and render_vertical().
|
private |
References Slic3r::GUI::GLCanvas3D::get_canvas_size(), get_height(), Slic3r::GUI::Size::get_height(), get_width(), Slic3r::GUI::Size::get_width(), m_icons_texture, m_items, m_layout, render_background(), and Slic3r::GUI::GLToolbarItem::SeparatorLine.
Referenced by render(), and render_item_windows().
| void Slic3r::GUI::GLToolbar::render_item_windows | ( | const GLCanvas3D & | parent | ) |
References Slic3r::GUI::GLToolbarItem::Action, Slic3r::GUI::GLToolbar::Layout::Horizontal, m_enabled, m_items, m_layout, render_horizontal(), render_vertical(), and Slic3r::GUI::GLToolbar::Layout::Vertical.
|
private |
References Slic3r::GUI::GLCanvas3D::get_canvas_size(), get_height(), Slic3r::GUI::Size::get_height(), get_width(), Slic3r::GUI::Size::get_width(), m_icons_texture, m_items, m_layout, and render_background().
Referenced by render(), and render_item_windows().
| void Slic3r::GUI::GLToolbar::select_item | ( | const std::string & | name | ) |
References Slic3r::GUI::GLToolbarItem::Hover, Slic3r::GUI::GLToolbarItem::HoverPressed, is_item_disabled(), m_items, Slic3r::GUI::GLToolbarItem::Normal, and Slic3r::GUI::GLToolbarItem::Pressed.
Referenced by do_action().
| void Slic3r::GUI::GLToolbar::set_additional_tooltip | ( | int | item_id, |
| const std::string & | text ) |
| void Slic3r::GUI::GLToolbar::set_border | ( | float | border | ) |
References m_layout.
Referenced by Slic3r::GUI::setup_collapse_toolbar().
|
inline |
| void Slic3r::GUI::GLToolbar::set_gap_size | ( | float | size | ) |
References m_layout.
Referenced by Slic3r::GUI::setup_collapse_toolbar().
|
inline |
References m_layout.
Referenced by Slic3r::GUI::setup_collapse_toolbar().
|
inline |
References m_icons_texture_dirty.
Referenced by Slic3r::GUI::GLCanvas3D::on_change_color_mode().
| void Slic3r::GUI::GLToolbar::set_icons_size | ( | float | size | ) |
References m_icons_texture_dirty, and m_layout.
| void Slic3r::GUI::GLToolbar::set_layout_type | ( | Layout::EType | type | ) |
References m_layout.
Referenced by Slic3r::GUI::setup_collapse_toolbar().
| void Slic3r::GUI::GLToolbar::set_position | ( | float | top, |
| float | left ) |
| void Slic3r::GUI::GLToolbar::set_scale | ( | float | scale | ) |
References m_icons_texture_dirty, m_layout, and scale().
| void Slic3r::GUI::GLToolbar::set_separator_size | ( | float | size | ) |
References m_layout.
Referenced by Slic3r::GUI::setup_collapse_toolbar().
| void Slic3r::GUI::GLToolbar::set_text_size | ( | float | size | ) |
| void Slic3r::GUI::GLToolbar::set_tooltip | ( | int | item_id, |
| const std::string & | text ) |
|
inline |
References m_layout.
Referenced by Slic3r::GUI::setup_collapse_toolbar().
|
private |
References Slic3r::GUI::GLToolbar::Layout::Horizontal, m_enabled, m_layout, update_hover_state_horizontal(), update_hover_state_vertical(), and Slic3r::GUI::GLToolbar::Layout::Vertical.
Referenced by on_mouse().
|
private |
References Slic3r::GUI::GLToolbarItem::Disabled, Slic3r::GUI::GLCanvas3D::get_canvas_size(), Slic3r::GUI::Size::get_height(), Slic3r::GUI::Size::get_width(), Slic3r::GUI::GLToolbarItem::Hover, Slic3r::GUI::GLToolbarItem::HoverDisabled, Slic3r::GUI::GLToolbarItem::HoverPressed, m_items, m_layout, Slic3r::GUI::GLToolbarItem::Normal, Slic3r::GUI::GLToolbarItem::Pressed, and Slic3r::GUI::GLCanvas3D::set_as_dirty().
Referenced by update_hover_state().
|
private |
References Slic3r::GUI::GLToolbarItem::Disabled, Slic3r::GUI::GLCanvas3D::get_canvas_size(), Slic3r::GUI::Size::get_height(), Slic3r::GUI::Size::get_width(), Slic3r::GUI::GLToolbarItem::Hover, Slic3r::GUI::GLToolbarItem::HoverDisabled, Slic3r::GUI::GLToolbarItem::HoverPressed, m_items, m_layout, Slic3r::GUI::GLToolbarItem::Normal, Slic3r::GUI::GLToolbarItem::Pressed, and Slic3r::GUI::GLCanvas3D::set_as_dirty().
Referenced by update_hover_state().
|
private |
References Slic3r::GUI::GLToolbarItem::Disabled, Slic3r::GUI::GLToolbarItem::is_enabled(), m_items, m_layout, m_pressed_toggable_id, Slic3r::GUI::GLToolbarItem::set_state(), and Slic3r::GUI::GLToolbarItem::update_enabled_state().
Referenced by update_items_state().
| bool Slic3r::GUI::GLToolbar::update_items_state | ( | ) |
References is_any_item_pressed(), m_pressed_toggable_id, update_items_enabled_state(), and update_items_visibility().
Referenced by Slic3r::GUI::GLCanvas3D::on_idle().
|
private |
References m_items, and m_layout.
Referenced by update_items_state().
|
static |
|
private |
Referenced by init_arrow(), and render_arrow().
|
private |
Referenced by init(), and render_background().
|
private |
Referenced by GLToolbar(), contains_mouse(), get_item(), get_state_hash(), is_enabled(), on_mouse(), render(), render_item_windows(), set_enabled(), and update_hover_state().
|
private |
Referenced by generate_icons_texture(), render_horizontal(), and render_vertical().
|
private |
Referenced by GLToolbar(), generate_icons_texture(), render(), set_icon_dirty(), set_icons_size(), and set_scale().
|
mutableprivate |
|
private |
Referenced by ~GLToolbar(), add_item(), add_separator(), contains_mouse_horizontal(), contains_mouse_vertical(), del_all_item(), do_action(), generate_button_text_textures(), generate_icons_texture(), generate_image_textures(), get_additional_tooltip(), get_item(), get_item_id(), get_items_count(), get_main_size(), get_state_hash(), get_tooltip(), get_visible_items_cnt(), get_width_horizontal(), get_width_vertical(), is_any_item_pressed(), is_item_disabled(), is_item_pressed(), is_item_visible(), on_mouse(), render(), render_arrow(), render_horizontal(), render_item_windows(), render_vertical(), select_item(), set_additional_tooltip(), set_tooltip(), update_hover_state_horizontal(), update_hover_state_vertical(), update_items_enabled_state(), and update_items_visibility().
|
private |
Referenced by add_item(), add_separator(), calc_layout(), contains_mouse(), contains_mouse_horizontal(), contains_mouse_vertical(), del_all_item(), generate_icons_texture(), get_height(), get_height_horizontal(), get_horizontal_orientation(), get_icons_size(), get_layout_type(), get_main_size(), get_scaled_icon_size(), get_vertical_orientation(), get_width(), get_width_horizontal(), get_width_vertical(), render(), render_arrow(), render_background(), render_horizontal(), render_item_windows(), render_vertical(), set_border(), set_gap_size(), set_horizontal_orientation(), set_icons_size(), set_layout_type(), set_position(), set_scale(), set_separator_size(), set_text_size(), set_vertical_orientation(), update_hover_state(), update_hover_state_horizontal(), update_hover_state_vertical(), update_items_enabled_state(), and update_items_visibility().
|
private |
Referenced by on_mouse().
|
private |
Referenced by GLToolbar().
|
private |
Referenced by GLToolbar(), do_action(), on_mouse(), update_items_enabled_state(), and update_items_state().
|
private |
Referenced by GLToolbar(), do_action(), and generate_icons_texture().