For store/load emboss style to/from AppConfig. More...
Typedefs | |
| using | HorizontalAlignToName = boost::bimap<FontProp::HorizontalAlign, std::string_view> |
| using | VerticalAlignToName = boost::bimap<FontProp::VerticalAlign, std::string_view> |
| using | Section = std::map<std::string,std::string> |
Functions | |
| void | store_style_index (AppConfig &cfg, size_t index) |
| ::std::optional< size_t > | load_style_index (const AppConfig &cfg) |
| StyleManager::Styles | load_styles (const AppConfig &cfg) |
| void | store_styles (AppConfig &cfg, const StyleManager::Styles &styles) |
| void | make_unique_name (const StyleManager::Styles &styles, std::string &name) |
| std::string | create_section_name (unsigned index) |
| bool | read (const Section §ion, const std::string &key, bool &value) |
| bool | read (const Section §ion, const std::string &key, Slic3r::FontProp::HorizontalAlign &value) |
| bool | read (const Section §ion, const std::string &key, Slic3r::FontProp::VerticalAlign &value) |
| bool | read (const Section §ion, const std::string &key, float &value) |
| bool | read (const Section §ion, const std::string &key, std::optional< int > &value) |
| bool | read (const Section §ion, const std::string &key, std::optional< unsigned int > &value) |
| bool | read (const Section §ion, const std::string &key, std::optional< float > &value) |
| std::optional< StyleManager::Style > | load_style (const Section &app_cfg_section) |
| void | store_style (AppConfig &cfg, const StyleManager::Style &s, unsigned index) |
Variables | |
| const HorizontalAlignToName | horizontal_align_to_name |
| const VerticalAlignToName | vertical_align_to_name |
| const std::string | APP_CONFIG_FONT_NAME = "name" |
| const std::string | APP_CONFIG_FONT_DESCRIPTOR = "descriptor" |
| const std::string | APP_CONFIG_FONT_LINE_HEIGHT = "line_height" |
| const std::string | APP_CONFIG_FONT_DEPTH = "depth" |
| const std::string | APP_CONFIG_FONT_USE_SURFACE = "use_surface" |
| const std::string | APP_CONFIG_PER_GLYPH = "per_glyph" |
| const std::string | APP_CONFIG_VERTICAL_ALIGN = "vertical_align" |
| const std::string | APP_CONFIG_HORIZONTAL_ALIGN = "horizontal_align" |
| const std::string | APP_CONFIG_FONT_BOLDNESS = "boldness" |
| const std::string | APP_CONFIG_FONT_SKEW = "skew" |
| const std::string | APP_CONFIG_FONT_DISTANCE = "distance" |
| const std::string | APP_CONFIG_FONT_ANGLE = "angle" |
| const std::string | APP_CONFIG_FONT_COLLECTION = "collection" |
| const std::string | APP_CONFIG_FONT_CHAR_GAP = "char_gap" |
| const std::string | APP_CONFIG_FONT_LINE_GAP = "line_gap" |
| const std::string | APP_CONFIG_ACTIVE_FONT = "active_font" |
For store/load emboss style to/from AppConfig.
| using anonymous_namespace{EmbossStyleManager.cpp}::HorizontalAlignToName = boost::bimap<FontProp::HorizontalAlign, std::string_view> |
| using anonymous_namespace{EmbossStyleManager.cpp}::Section = std::map<std::string,std::string> |
| using anonymous_namespace{EmbossStyleManager.cpp}::VerticalAlignToName = boost::bimap<FontProp::VerticalAlign, std::string_view> |
| std::string anonymous_namespace{EmbossStyleManager.cpp}::create_section_name | ( | unsigned | index | ) |
References create_section_name(), and Slic3r::AppConfig::SECTION_EMBOSS_STYLE.
Referenced by create_section_name(), load_styles(), store_style(), and store_styles().
| std::optional< StyleManager::Style > anonymous_namespace{EmbossStyleManager.cpp}::load_style | ( | const Section & | app_cfg_section | ) |
References Slic3r::FontProp::align, Slic3r::GUI::Emboss::StyleManager::Style::angle, APP_CONFIG_FONT_ANGLE, APP_CONFIG_FONT_BOLDNESS, APP_CONFIG_FONT_CHAR_GAP, APP_CONFIG_FONT_COLLECTION, APP_CONFIG_FONT_DEPTH, APP_CONFIG_FONT_DESCRIPTOR, APP_CONFIG_FONT_DISTANCE, APP_CONFIG_FONT_LINE_GAP, APP_CONFIG_FONT_LINE_HEIGHT, APP_CONFIG_FONT_NAME, APP_CONFIG_FONT_SKEW, APP_CONFIG_FONT_USE_SURFACE, APP_CONFIG_HORIZONTAL_ALIGN, APP_CONFIG_PER_GLYPH, APP_CONFIG_VERTICAL_ALIGN, Slic3r::FontProp::boldness, Slic3r::FontProp::char_gap, Slic3r::FontProp::collection_number, Slic3r::EmbossProjection::depth, Slic3r::GUI::Emboss::StyleManager::Style::distance, Slic3r::GUI::WxFontUtils::get_current_type(), Slic3r::FontProp::line_gap, load_style(), Slic3r::EmbossStyle::name, Slic3r::EmbossStyle::path, Slic3r::FontProp::per_glyph, Slic3r::GUI::Emboss::StyleManager::Style::projection, Slic3r::EmbossStyle::prop, read(), Slic3r::FontProp::size_in_mm, Slic3r::FontProp::skew, Slic3r::EmbossStyle::type, and Slic3r::EmbossProjection::use_surface.
Referenced by load_style(), and load_styles().
| std::optional< size_t > anonymous_namespace{EmbossStyleManager.cpp}::load_style_index | ( | const AppConfig & | cfg | ) |
References APP_CONFIG_ACTIVE_FONT, Slic3r::AppConfig::get_section(), Slic3r::AppConfig::has_section(), load_style_index(), and Slic3r::AppConfig::SECTION_EMBOSS_STYLE.
Referenced by load_style_index().
| StyleManager::Styles anonymous_namespace{EmbossStyleManager.cpp}::load_styles | ( | const AppConfig & | cfg | ) |
References create_section_name(), Slic3r::AppConfig::get_section(), Slic3r::AppConfig::has_section(), load_style(), load_styles(), make_unique_name(), and Slic3r::GUI::section_name().
Referenced by load_styles().
| void anonymous_namespace{EmbossStyleManager.cpp}::make_unique_name | ( | const StyleManager::Styles & | styles, |
| std::string & | name ) |
References make_unique_name().
Referenced by load_styles(), and make_unique_name().
| bool anonymous_namespace{EmbossStyleManager.cpp}::read | ( | const Section & | section, |
| const std::string & | key, | ||
| bool & | value ) |
References read().
Referenced by load_style(), read(), read(), read(), read(), read(), read(), and read().
| bool anonymous_namespace{EmbossStyleManager.cpp}::read | ( | const Section & | section, |
| const std::string & | key, | ||
| float & | value ) |
References read().
| bool anonymous_namespace{EmbossStyleManager.cpp}::read | ( | const Section & | section, |
| const std::string & | key, | ||
| Slic3r::FontProp::HorizontalAlign & | value ) |
References Slic3r::FontProp::center, horizontal_align_to_name, and read().
| bool anonymous_namespace{EmbossStyleManager.cpp}::read | ( | const Section & | section, |
| const std::string & | key, | ||
| Slic3r::FontProp::VerticalAlign & | value ) |
References Slic3r::FontProp::center, read(), and vertical_align_to_name.
| bool anonymous_namespace{EmbossStyleManager.cpp}::read | ( | const Section & | section, |
| const std::string & | key, | ||
| std::optional< float > & | value ) |
References read().
| bool anonymous_namespace{EmbossStyleManager.cpp}::read | ( | const Section & | section, |
| const std::string & | key, | ||
| std::optional< int > & | value ) |
References read().
| bool anonymous_namespace{EmbossStyleManager.cpp}::read | ( | const Section & | section, |
| const std::string & | key, | ||
| std::optional< unsigned int > & | value ) |
References read().
| void anonymous_namespace{EmbossStyleManager.cpp}::store_style | ( | AppConfig & | cfg, |
| const StyleManager::Style & | s, | ||
| unsigned | index ) |
References Slic3r::FontProp::align, Slic3r::GUI::Emboss::StyleManager::Style::angle, APP_CONFIG_FONT_ANGLE, APP_CONFIG_FONT_BOLDNESS, APP_CONFIG_FONT_CHAR_GAP, APP_CONFIG_FONT_COLLECTION, APP_CONFIG_FONT_DEPTH, APP_CONFIG_FONT_DESCRIPTOR, APP_CONFIG_FONT_DISTANCE, APP_CONFIG_FONT_LINE_GAP, APP_CONFIG_FONT_LINE_HEIGHT, APP_CONFIG_FONT_NAME, APP_CONFIG_FONT_SKEW, APP_CONFIG_FONT_USE_SURFACE, APP_CONFIG_HORIZONTAL_ALIGN, APP_CONFIG_PER_GLYPH, APP_CONFIG_VERTICAL_ALIGN, Slic3r::FontProp::boldness, Slic3r::FontProp::center, Slic3r::FontProp::char_gap, Slic3r::FontProp::collection_number, create_section_name(), Slic3r::EmbossProjection::depth, Slic3r::GUI::Emboss::StyleManager::Style::distance, horizontal_align_to_name, Slic3r::FontProp::line_gap, Slic3r::EmbossStyle::name, Slic3r::EmbossStyle::path, Slic3r::FontProp::per_glyph, Slic3r::GUI::Emboss::StyleManager::Style::projection, Slic3r::EmbossStyle::prop, Slic3r::AppConfig::set_section(), Slic3r::FontProp::size_in_mm, Slic3r::FontProp::skew, store_style(), Slic3r::EmbossProjection::use_surface, and vertical_align_to_name.
Referenced by store_style(), and store_styles().
| void anonymous_namespace{EmbossStyleManager.cpp}::store_style_index | ( | AppConfig & | cfg, |
| size_t | index ) |
References APP_CONFIG_ACTIVE_FONT, Slic3r::AppConfig::SECTION_EMBOSS_STYLE, Slic3r::AppConfig::set_section(), and store_style_index().
Referenced by store_style_index().
| void anonymous_namespace{EmbossStyleManager.cpp}::store_styles | ( | AppConfig & | cfg, |
| const StyleManager::Styles & | styles ) |
References Slic3r::AppConfig::clear_section(), create_section_name(), Slic3r::GUI::WxFontUtils::get_current_type(), Slic3r::AppConfig::has_section(), Slic3r::GUI::section_name(), store_style(), store_styles(), and style.
Referenced by store_styles().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_ACTIVE_FONT = "active_font" |
Referenced by load_style_index(), and store_style_index().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_FONT_ANGLE = "angle" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_FONT_BOLDNESS = "boldness" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_FONT_CHAR_GAP = "char_gap" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_FONT_COLLECTION = "collection" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_FONT_DEPTH = "depth" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_FONT_DESCRIPTOR = "descriptor" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_FONT_DISTANCE = "distance" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_FONT_LINE_GAP = "line_gap" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_FONT_LINE_HEIGHT = "line_height" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_FONT_NAME = "name" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_FONT_SKEW = "skew" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_FONT_USE_SURFACE = "use_surface" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_HORIZONTAL_ALIGN = "horizontal_align" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_PER_GLYPH = "per_glyph" |
Referenced by load_style(), and store_style().
| const std::string anonymous_namespace{EmbossStyleManager.cpp}::APP_CONFIG_VERTICAL_ALIGN = "vertical_align" |
Referenced by load_style(), and store_style().
| const HorizontalAlignToName anonymous_namespace{EmbossStyleManager.cpp}::horizontal_align_to_name |
Referenced by read(), and store_style().
| const VerticalAlignToName anonymous_namespace{EmbossStyleManager.cpp}::vertical_align_to_name |
Referenced by read(), and store_style().