#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GLToolbar.hpp>
Classes | |
| struct | Data |
Public Types | |
| enum | EType : unsigned char { Action , Separator , ActionWithText , ActionWithTextImage , SeparatorLine , Num_Types } |
| enum | EActionType : unsigned char { Undefined , Left , Right , Num_Action_Types } |
| enum | EState : unsigned char { Normal , Pressed , Disabled , Hover , HoverPressed , HoverDisabled , Num_States } |
| enum | EHighlightState : unsigned char { HighlightedShown , HighlightedHidden , Num_Rendered_Highlight_States , NotHighlighted } |
| typedef std::function< void()> | ActionCallback |
| typedef std::function< bool()> | VisibilityCallback |
| typedef std::function< bool()> | EnablingCallback |
| typedef std::function< void(float, float, float, float)> | RenderCallback |
Public Member Functions | |
| GLToolbarItem (EType type, const Data &data) | |
| EState | get_state () const |
| void | set_state (EState state) |
| EHighlightState | get_highlight () const |
| void | set_highlight (EHighlightState state) |
| const std::string & | get_name () const |
| const std::string & | get_icon_filename () const |
| void | set_icon_filename (const std::string &filename) |
| const std::string & | get_tooltip () const |
| const std::string & | get_additional_tooltip () const |
| void | set_additional_tooltip (const std::string &text) |
| void | set_tooltip (const std::string &text) |
| void | do_left_action () |
| void | do_right_action () |
| bool | is_enabled () const |
| bool | is_disabled () const |
| bool | is_hovered () const |
| bool | is_pressed () const |
| bool | is_visible () const |
| bool | is_separator () const |
| bool | is_left_toggable () const |
| bool | is_right_toggable () const |
| bool | has_left_render_callback () const |
| bool | has_right_render_callback () const |
| EActionType | get_last_action_type () const |
| void | reset_last_action_type () |
| bool | update_visibility () |
| bool | update_enabled_state () |
| bool | is_action () const |
| bool | is_action_with_text () const |
| bool | is_action_with_text_image () const |
| const std::string & | get_button_text () const |
| void | set_button_text (const std::string &text) |
| float | get_extra_size_ratio () const |
| void | set_extra_size_ratio (const float ratio) |
| void | render_text (float left, float right, float bottom, float top) const |
| int | generate_texture (wxFont &font) |
| int | generate_image_texture () |
| void | render (unsigned int tex_id, float left, float right, float bottom, float top, unsigned int tex_width, unsigned int tex_height, unsigned int icon_size) const |
| void | render_window (float left, float right, float bottom, float top) const |
| void | render_image (unsigned int tex_id, float left, float right, float bottom, float top, unsigned int tex_width, unsigned int tex_height, unsigned int icon_size) const |
Public Attributes | |
| float | render_left_pos |
Static Public Attributes | |
| static const ActionCallback | Default_Action_Callback = [](){} |
| static const VisibilityCallback | Default_Visibility_Callback = []()->bool { return true; } |
| static const EnablingCallback | Default_Enabling_Callback = []()->bool { return true; } |
| static const RenderCallback | Default_Render_Callback = [](float, float, float, float){} |
Private Member Functions | |
| void | set_visible (bool visible) |
Private Attributes | |
| EType | m_type |
| EState | m_state |
| Data | m_data |
| EActionType | m_last_action_type |
| EHighlightState | m_highlight_state |
Friends | |
| class | GLToolbar |
| typedef std::function<void()> Slic3r::GUI::GLToolbarItem::ActionCallback |
| typedef std::function<bool()> Slic3r::GUI::GLToolbarItem::EnablingCallback |
| typedef std::function<void(float, float, float, float)> Slic3r::GUI::GLToolbarItem::RenderCallback |
| typedef std::function<bool()> Slic3r::GUI::GLToolbarItem::VisibilityCallback |
| enum Slic3r::GUI::GLToolbarItem::EActionType : unsigned char |
| enum Slic3r::GUI::GLToolbarItem::EHighlightState : unsigned char |
| Enumerator | |
|---|---|
| HighlightedShown | |
| HighlightedHidden | |
| Num_Rendered_Highlight_States | |
| NotHighlighted | |
| enum Slic3r::GUI::GLToolbarItem::EState : unsigned char |
| Enumerator | |
|---|---|
| Normal | |
| Pressed | |
| Disabled | |
| Hover | |
| HoverPressed | |
| HoverDisabled | |
| Num_States | |
| enum Slic3r::GUI::GLToolbarItem::EType : unsigned char |
| Enumerator | |
|---|---|
| Action | |
| Separator | |
| ActionWithText | |
| ActionWithTextImage | |
| SeparatorLine | |
| Num_Types | |
| Slic3r::GUI::GLToolbarItem::GLToolbarItem | ( | GLToolbarItem::EType | type, |
| const Data & | data ) |
References m_data, m_highlight_state, m_last_action_type, m_state, m_type, Normal, NotHighlighted, render_left_pos, and Undefined.
|
inline |
References Left, m_data, and m_last_action_type.
Referenced by Slic3r::GUI::GLToolbar::do_action().
|
inline |
References m_data, m_last_action_type, and Right.
Referenced by Slic3r::GUI::GLToolbar::do_action().
| int Slic3r::GUI::GLToolbarItem::generate_image_texture | ( | ) |
References ActionWithTextImage, generate_image_texture(), m_data, m_type, and Slic3r::resources_dir().
Referenced by generate_image_texture(), and Slic3r::GUI::GLToolbar::generate_image_textures().
| int Slic3r::GUI::GLToolbarItem::generate_texture | ( | wxFont & | font | ) |
References ActionWithText, ActionWithTextImage, generate_texture(), m_data, and m_type.
Referenced by Slic3r::GUI::GLToolbar::generate_button_text_textures(), and generate_texture().
|
inline |
|
inline |
|
inline |
References m_data.
Referenced by Slic3r::GUI::GLToolbar::contains_mouse_horizontal(), and Slic3r::GUI::GLToolbar::contains_mouse_vertical().
|
inline |
References m_highlight_state.
|
inline |
|
inline |
References m_last_action_type.
|
inline |
References m_data.
Referenced by Slic3r::GUI::GLToolbar::do_action(), and Slic3r::GUI::GLToolbar::render_arrow().
|
inline |
References m_state.
Referenced by Slic3r::GUI::GLToolbar::do_action().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References ActionWithText, and m_type.
Referenced by Slic3r::GUI::GLToolbar::contains_mouse_horizontal(), Slic3r::GUI::GLToolbar::contains_mouse_vertical(), and Slic3r::GUI::GLToolbar::generate_button_text_textures().
|
inline |
References ActionWithTextImage, and m_type.
Referenced by Slic3r::GUI::GLToolbar::contains_mouse_vertical(), Slic3r::GUI::GLToolbar::generate_button_text_textures(), and Slic3r::GUI::GLToolbar::generate_image_textures().
|
inline |
References Disabled, HoverDisabled, and m_state.
Referenced by Slic3r::GUI::GLToolbar::do_action().
|
inline |
References Disabled, HoverDisabled, and m_state.
Referenced by update_enabled_state(), and Slic3r::GUI::GLToolbar::update_items_enabled_state().
|
inline |
References Hover, HoverDisabled, HoverPressed, and m_state.
Referenced by Slic3r::GUI::GLToolbar::do_action().
|
inline |
References m_data.
Referenced by Slic3r::GUI::GLToolbar::do_action().
|
inline |
References HoverPressed, m_state, and Pressed.
Referenced by Slic3r::GUI::GLToolbar::do_action(), and render_window().
|
inline |
References m_data.
Referenced by Slic3r::GUI::GLToolbar::do_action().
|
inline |
References m_type, and Separator.
Referenced by Slic3r::GUI::GLToolbar::contains_mouse_horizontal(), Slic3r::GUI::GLToolbar::contains_mouse_vertical(), Slic3r::GUI::GLToolbar::do_action(), and update_visibility().
|
inline |
References m_data.
Referenced by Slic3r::GUI::GLToolbar::contains_mouse_horizontal(), Slic3r::GUI::GLToolbar::contains_mouse_vertical(), and Slic3r::GUI::GLCanvas3D::highlight_toolbar_item().
| void Slic3r::GUI::GLToolbarItem::render | ( | unsigned int | tex_id, |
| float | left, | ||
| float | right, | ||
| float | bottom, | ||
| float | top, | ||
| unsigned int | tex_width, | ||
| unsigned int | tex_height, | ||
| unsigned int | icon_size ) const |
References Slic3r::GUI::GLTexture::Quad_UVs::left_bottom, Slic3r::GUI::GLTexture::Quad_UVs::left_top, m_data, m_highlight_state, m_state, NotHighlighted, Num_Rendered_Highlight_States, Num_States, render(), Slic3r::GUI::GLTexture::render_sub_texture(), Slic3r::GUI::GLTexture::Quad_UVs::right_bottom, and Slic3r::GUI::GLTexture::Quad_UVs::right_top.
Referenced by render().
| void Slic3r::GUI::GLToolbarItem::render_image | ( | unsigned int | tex_id, |
| float | left, | ||
| float | right, | ||
| float | bottom, | ||
| float | top, | ||
| unsigned int | tex_width, | ||
| unsigned int | tex_height, | ||
| unsigned int | icon_size ) const |
References render_image(), and Slic3r::GUI::GLTexture::render_sub_texture().
Referenced by render_image().
| void Slic3r::GUI::GLToolbarItem::render_text | ( | float | left, |
| float | right, | ||
| float | bottom, | ||
| float | top ) const |
References m_data, and Slic3r::GUI::GLTexture::render_sub_texture().
| void Slic3r::GUI::GLToolbarItem::render_window | ( | float | left, |
| float | right, | ||
| float | bottom, | ||
| float | top ) const |
References is_pressed(), Left, m_data, m_last_action_type, render_window(), and Right.
Referenced by render_window().
|
inline |
References m_last_action_type, and Undefined.
Referenced by Slic3r::GUI::GLToolbar::do_action().
|
inline |
|
inline |
|
inline |
|
inline |
References m_highlight_state.
|
inline |
References m_data.
Referenced by Slic3r::GUI::GLCanvas3D::_switch_toolbars_icon_filename().
|
inline |
References m_state.
Referenced by Slic3r::GUI::GLToolbar::do_action(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_variable_layer_height_dialog(), and Slic3r::GUI::GLToolbar::update_items_enabled_state().
|
inline |
|
inlineprivate |
| bool Slic3r::GUI::GLToolbarItem::update_enabled_state | ( | ) |
References Disabled, is_enabled(), m_data, m_state, and Normal.
Referenced by Slic3r::GUI::GLToolbar::update_items_enabled_state().
| bool Slic3r::GUI::GLToolbarItem::update_visibility | ( | ) |
References is_separator(), and m_data.
|
static |
Referenced by Slic3r::GUI::GLToolbarItem::Data::Option::Option(), and Slic3r::GUI::wxDEFINE_EVENT().
|
static |
Referenced by Slic3r::GUI::GLToolbarItem::Data::Data().
|
static |
|
static |
|
private |
Referenced by GLToolbarItem(), do_left_action(), do_right_action(), generate_image_texture(), generate_texture(), get_additional_tooltip(), get_button_text(), get_extra_size_ratio(), get_icon_filename(), get_name(), get_tooltip(), has_left_render_callback(), has_right_render_callback(), is_left_toggable(), is_right_toggable(), is_visible(), render(), render_text(), render_window(), set_additional_tooltip(), set_button_text(), set_extra_size_ratio(), set_icon_filename(), set_tooltip(), set_visible(), update_enabled_state(), and update_visibility().
|
private |
Referenced by GLToolbarItem(), get_highlight(), render(), and set_highlight().
|
private |
Referenced by GLToolbarItem(), do_left_action(), do_right_action(), get_last_action_type(), render_window(), and reset_last_action_type().
|
private |
Referenced by GLToolbarItem(), get_state(), is_disabled(), is_enabled(), is_hovered(), is_pressed(), render(), set_state(), and update_enabled_state().
|
private |
|
mutable |