Classes | |
| struct | Limit |
| struct | Limits |
| struct | TextDataBase |
| struct | FaceName |
| struct | Facenames |
| struct | GuiCfg |
Enumerations | |
| enum class | IconType : unsigned { rename = 0 , erase , add , save , undo , italic , unitalic , bold , unbold , system_selector , open_file , exclamation , lock , lock_bold , unlock , unlock_bold , align_horizontal_left , align_horizontal_center , align_horizontal_right , align_vertical_top , align_vertical_center , align_vertical_bottom , _count } |
| enum class | IconState : unsigned { activable = 0 , hovered , disabled } |
Functions | |
| std::unique_ptr< DataBase > | create_emboss_data_base (const std::string &text, StyleManager &style_manager, TextLinesModel &text_lines, const Selection &selection, ModelVolumeType type, std::shared_ptr< std::atomic< bool > > &cancel) |
| Prepare data for emboss. | |
| CreateVolumeParams | create_input (GLCanvas3D &canvas, const StyleManager::Style &style, RaycastManager &raycaster, ModelVolumeType volume_type) |
| ImVec2 | calc_fine_position (const Selection &selection, const ImVec2 &windows_size, const Size &canvas_size) |
| Move window for edit emboss text near to embossed object NOTE: embossed object must be selected. | |
| const IconManager::Icon & | get_icon (const IconManager::VIcons &icons, IconType type, IconState state) |
| bool | draw_button (const IconManager::VIcons &icons, IconType type, bool disable=false) |
| bool | store (const Facenames &facenames) |
| bool | load (Facenames &facenames) |
| void | init_face_names (Facenames &facenames) |
| void | init_truncated_names (Facenames &face_names, float max_width) |
| GuiCfg | create_gui_configuration () |
| void | draw_font_preview (FaceName &face, const std::string &text, Facenames &faces, const GuiCfg &cfg, bool is_visible) |
| void | init_text_lines (TextLinesModel &text_lines, const Selection &selection, StyleManager &style_manager, unsigned count_lines=0) |
| ModelVolumePtrs | prepare_volumes_to_slice (const ModelVolume &mv) |
| bool | check (ModelVolumeType volume_type) |
| bool | can_write (StyleManager &style_manager, const std::string &text) |
| bool | can_write (const EmbossStyle &style, const std::string &text) |
| void | add_style_for_default_text (EmbossStyles &styles) |
| std::optional< wxString > | get_installed_face_name (const std::optional< std::string > &face_name_opt, ::Facenames &face_names) |
| Check installed fonts whether optional face name exist in installed fonts. | |
| void | fix_transformation (const StyleManager::Style &from, const StyleManager::Style &to, GLCanvas3D &canvas) |
| bool | is_text_empty (std::string_view text) |
| std::string | concat (std::vector< wxString > data) |
| boost::filesystem::path | get_fontlist_cache_path () |
Variables | |
| const std::string | rotation_snapshot_name = L("Text rotate") |
| const std::string | move_snapshot_name = L("Text move") |
| static const struct anonymous_namespace{GLGizmoEmboss.cpp}::Limits | limits |
| static const float | SELECTABLE_INNER_OFFSET = 8.0f |
| const char *const | default_text = L("Embossed text") |
| struct anonymous_namespace{GLGizmoEmboss.cpp}::Limit |
| struct anonymous_namespace{GLGizmoEmboss.cpp}::Limits |
| Class Members | ||
|---|---|---|
| MinMax< float > | angle {-180.f, 180.f} | |
| Limit< float > | boldness {{-.5f, .5f}, {-5e5f, 5e5f}} | |
| MinMax< int > | char_gap {-20000, 20000} | |
| MinMax< double > | emboss {0.01, 1e4} | |
| MinMax< int > | line_gap {-20000, 20000} | |
| MinMax< float > | size_in_mm {0.1f, 1000.f} | |
| Limit< float > | skew {{-1.f, 1.f}, {-100.f, 100.f}} | |
| struct anonymous_namespace{GLGizmoEmboss.cpp}::FaceName |
| struct anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg |
| Class Members | ||
|---|---|---|
| float | advanced_input_offset = 0.f | |
| bool | dark_mode = false | |
| float | delete_pos_x = 0.f | |
| Vec2i32 | face_name_size = Vec2i32(0, 0) | |
| float | face_name_texture_offset_x = 0.f | |
| float | height_of_volume_type_selector = 0.f | |
| unsigned int | icon_width = 0 | |
| float | indent = 0.f | |
| float | input_offset = 0.f | |
| float | input_width = 0.f | |
| float | lock_offset = 0.f | |
| unsigned int | max_count_opened_font_files = 10 | |
| Vec2i32 | max_style_image_size = Vec2i32(0, 0) | |
| float | max_style_name_width = 0.f | |
| float | max_tooltip_width = 0.f | |
| double | screen_scale | |
| ImVec2 | text_size | |
| Translations | translations | |
|
strong |
|
strong |
| void anonymous_namespace{GLGizmoEmboss.cpp}::add_style_for_default_text | ( | EmbossStyles & | styles | ) |
References _u8L, add_style_for_default_text(), can_write(), Slic3r::GUI::WxFontUtils::create_emboss_style(), default_text, and style.
Referenced by add_style_for_default_text().
| ImVec2 anonymous_namespace{GLGizmoEmboss.cpp}::calc_fine_position | ( | const Selection & | selection, |
| const ImVec2 & | windows_size, | ||
| const Size & | canvas_size ) |
Move window for edit emboss text near to embossed object NOTE: embossed object must be selected.
References Slic3r::GUI::CameraUtils::create_hull2d(), Slic3r::GUI::Size::get_height(), Slic3r::GUI::Selection::get_volume(), Slic3r::GUI::Selection::get_volume_idxs(), Slic3r::GUI::Size::get_width(), Slic3r::offset(), and Slic3r::GUI::ImGuiWrapper::suggest_location().
| bool anonymous_namespace{GLGizmoEmboss.cpp}::can_write | ( | const EmbossStyle & | style, |
| const std::string & | text ) |
References can_write(), Slic3r::GUI::Emboss::StyleManager::load_style(), and style.
| bool anonymous_namespace{GLGizmoEmboss.cpp}::can_write | ( | StyleManager & | style_manager, |
| const std::string & | text ) |
References can_write(), Slic3r::FontProp::collection_number, Slic3r::Emboss::create_range_text(), Slic3r::Emboss::FontFileWithCache::font_file, Slic3r::GUI::Emboss::StyleManager::get_font_file_with_cache(), and Slic3r::GUI::Emboss::StyleManager::get_font_prop().
Referenced by add_style_for_default_text(), can_write(), and can_write().
| bool anonymous_namespace{GLGizmoEmboss.cpp}::check | ( | ModelVolumeType | volume_type | ) |
References check(), Slic3r::MODEL_PART, Slic3r::NEGATIVE_VOLUME, and Slic3r::PARAMETER_MODIFIER.
Referenced by check().
| std::string anonymous_namespace{GLGizmoEmboss.cpp}::concat | ( | std::vector< wxString > | data | ) |
Referenced by init_face_names().
| std::unique_ptr< DataBase > anonymous_namespace{GLGizmoEmboss.cpp}::create_emboss_data_base | ( | const std::string & | text, |
| StyleManager & | style_manager, | ||
| TextLinesModel & | text_lines, | ||
| const Selection & | selection, | ||
| ModelVolumeType | type, | ||
| std::shared_ptr< std::atomic< bool > > & | cancel ) |
Prepare data for emboss.
| text | Text to emboss |
| style_manager | Keep actual selected style |
| text_lines | Needed when transform per glyph |
| selection | Needed for transform per glyph |
| type | Define type of volume - side of surface(in / out) |
| cancel | Cancel for previous job |
References Slic3r::GUI::Emboss::StyleManager::get_font_file_with_cache(), Slic3r::GUI::TextLinesModel::get_lines(), Slic3r::GUI::Emboss::StyleManager::get_style(), Slic3r::GUI::Emboss::StyleManager::get_wx_font(), init_text_lines(), Slic3r::GUI::Emboss::StyleManager::is_active_font(), Slic3r::GUI::TextLinesModel::is_init(), Slic3r::GUI::Emboss::StyleManager::load_valid_style(), Slic3r::MODEL_PART, Slic3r::GUI::TextLinesModel::reset(), Slic3r::GUI::WxFontUtils::store_wxFont(), and style.
| GuiCfg anonymous_namespace{GLGizmoEmboss.cpp}::create_gui_configuration | ( | ) |
References _u8L, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::advanced_input_offset, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::alignment, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::boldness, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::char_gap, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::collection, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::delete_pos_x, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::depth, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::face_name_size, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::face_name_texture_offset_x, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::font, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::from_surface, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::height, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::height_of_volume_type_selector, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::icon_width, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::indent, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::input_offset, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::input_width, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::keep_up, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::line_gap, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::lock_offset, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::max_style_image_size, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::max_style_name_width, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::max_tooltip_width, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::per_glyph, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::rotation, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::skew_ration, style, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::text_size, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::translations, and anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::Translations::use_surface.
| CreateVolumeParams anonymous_namespace{GLGizmoEmboss.cpp}::create_input | ( | GLCanvas3D & | canvas, |
| const StyleManager::Style & | style, | ||
| RaycastManager & | raycaster, | ||
| ModelVolumeType | volume_type ) |
References Slic3r::GUI::GLGizmosManager::Emboss, Slic3r::GUI::get_first_hovered_gl_volume(), Slic3r::GUI::plater(), and style.
| bool anonymous_namespace{GLGizmoEmboss.cpp}::draw_button | ( | const IconManager::VIcons & | icons, |
| IconType | type, | ||
| bool | disable = false ) |
References activable, Slic3r::GUI::button(), disabled, draw_button(), get_icon(), and hovered.
Referenced by draw_button().
| void anonymous_namespace{GLGizmoEmboss.cpp}::draw_font_preview | ( | FaceName & | face, |
| const std::string & | text, | ||
| Facenames & | faces, | ||
| const GuiCfg & | cfg, | ||
| bool | is_visible ) |
References _u8L, anonymous_namespace{GLGizmoEmboss.cpp}::FaceName::cancel, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::count_cached_textures, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::count_opened_font_files, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::encoding, Slic3r::f(), anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::face_name_size, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::face_name_texture_offset_x, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::faces, Slic3r::format(), GL_RGBA, GL_UNSIGNED_BYTE, anonymous_namespace{GLGizmoEmboss.cpp}::FaceName::is_created, anonymous_namespace{GLGizmoEmboss.cpp}::GuiCfg::max_count_opened_font_files, Slic3r::GUI::queue_job(), anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::texture_id, anonymous_namespace{GLGizmoEmboss.cpp}::FaceName::texture_index, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::texture_index, and anonymous_namespace{GLGizmoEmboss.cpp}::FaceName::wx_name.
| void anonymous_namespace{GLGizmoEmboss.cpp}::fix_transformation | ( | const StyleManager::Style & | from, |
| const StyleManager::Style & | to, | ||
| GLCanvas3D & | canvas ) |
References Slic3r::GUI::Emboss::StyleManager::Style::angle, Slic3r::GUI::Emboss::StyleManager::Style::distance, Slic3r::GUI::do_local_z_move(), Slic3r::GUI::do_local_z_rotate(), Slic3r::GUI::GLCanvas3D::do_move(), Slic3r::GUI::GLCanvas3D::do_rotate(), fix_transformation(), Slic3r::GUI::GLCanvas3D::get_selection(), and Slic3r::is_approx().
Referenced by fix_transformation().
| boost::filesystem::path anonymous_namespace{GLGizmoEmboss.cpp}::get_fontlist_cache_path | ( | ) |
References Slic3r::data_dir().
Referenced by init_face_names(), load(), and store().
| const IconManager::Icon & anonymous_namespace{GLGizmoEmboss.cpp}::get_icon | ( | const IconManager::VIcons & | icons, |
| IconType | type, | ||
| IconState | state ) |
References get_icon().
Referenced by draw_button(), and get_icon().
| std::optional< wxString > anonymous_namespace{GLGizmoEmboss.cpp}::get_installed_face_name | ( | const std::optional< std::string > & | face_name_opt, |
| ::Facenames & | face_names ) |
Check installed fonts whether optional face name exist in installed fonts.
| face_name_opt | Name from style - style.prop.face_name |
| face_names | All installed good and bad fonts - not const must be possible to initialize it |
References Slic3r::GUI::WxFontUtils::create_font_file(), get_installed_face_name(), init_face_names(), and anonymous_namespace{GLGizmoEmboss.cpp}::FaceName::wx_name.
Referenced by get_installed_face_name().
| void anonymous_namespace{GLGizmoEmboss.cpp}::init_face_names | ( | Facenames & | facenames | ) |
References anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::bad, Slic3r::GUI::WxFontUtils::can_load(), concat(), anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::encoding, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::faces, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::faces_names, get_fontlist_cache_path(), anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::has_truncated_names, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::hash, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::is_init, load(), and store().
Referenced by get_installed_face_name().
| void anonymous_namespace{GLGizmoEmboss.cpp}::init_text_lines | ( | TextLinesModel & | text_lines, |
| const Selection & | selection, | ||
| StyleManager & | style_manager, | ||
| unsigned | count_lines = 0 ) |
References Slic3r::ModelVolume::emboss_shape, Slic3r::EmbossShape::fix_3mf_tr, Slic3r::Emboss::get_count_lines(), Slic3r::GUI::Selection::get_first_volume(), Slic3r::Geometry::Transformation::get_matrix(), Slic3r::GUI::Selection::get_model(), Slic3r::GUI::get_model_volume(), Slic3r::GLVolume::get_volume_transformation(), Slic3r::GUI::TextLinesModel::init(), init_text_lines(), Slic3r::ModelVolume::is_the_only_one_part(), Slic3r::Model::objects, prepare_volumes_to_slice(), Slic3r::TextConfiguration::text, and Slic3r::ModelVolume::text_configuration.
Referenced by create_emboss_data_base(), and init_text_lines().
| void anonymous_namespace{GLGizmoEmboss.cpp}::init_truncated_names | ( | Facenames & | face_names, |
| float | max_width ) |
References anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::faces, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::has_truncated_names, anonymous_namespace{GLGizmoEmboss.cpp}::FaceName::name_truncated, Slic3r::GUI::ImGuiWrapper::trunc(), and anonymous_namespace{GLGizmoEmboss.cpp}::FaceName::wx_name.
| bool anonymous_namespace{GLGizmoEmboss.cpp}::is_text_empty | ( | std::string_view | text | ) |
References is_text_empty().
Referenced by is_text_empty().
| bool anonymous_namespace{GLGizmoEmboss.cpp}::load | ( | Facenames & | facenames | ) |
References anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::bad, FacenamesSerializer::bad, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::faces, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::faces_names, get_fontlist_cache_path(), FacenamesSerializer::good, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::hash, and FacenamesSerializer::hash.
Referenced by init_face_names().
| ModelVolumePtrs anonymous_namespace{GLGizmoEmboss.cpp}::prepare_volumes_to_slice | ( | const ModelVolume & | mv | ) |
References Slic3r::ModelVolume::get_object(), Slic3r::ObjectBase::id(), Slic3r::ObjectID::id, prepare_volumes_to_slice(), and Slic3r::ModelObject::volumes.
Referenced by init_text_lines(), and prepare_volumes_to_slice().
| bool anonymous_namespace{GLGizmoEmboss.cpp}::store | ( | const Facenames & | facenames | ) |
References anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::bad, FacenamesSerializer::bad, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::faces, get_fontlist_cache_path(), FacenamesSerializer::good, anonymous_namespace{GLGizmoEmboss.cpp}::Facenames::hash, and anonymous_namespace{GLGizmoEmboss.cpp}::FaceName::wx_name.
Referenced by init_face_names().
| const char* const anonymous_namespace{GLGizmoEmboss.cpp}::default_text = L("Embossed text") |
Referenced by add_style_for_default_text().
|
static |
| const std::string anonymous_namespace{GLGizmoEmboss.cpp}::move_snapshot_name = L("Text move") |
| const std::string anonymous_namespace{GLGizmoEmboss.cpp}::rotation_snapshot_name = L("Text rotate") |
|
static |