[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring. Add TextLine and TextParagraph classes. Handle UTF-16 input on macOS and Windows.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
#include "scene/gui/base_button.h"
|
||||
#include "scene/resources/bit_map.h"
|
||||
#include "scene/resources/text_line.h"
|
||||
|
||||
class LinkButton : public BaseButton {
|
||||
GDCLASS(LinkButton, BaseButton);
|
||||
@@ -46,17 +47,46 @@ public:
|
||||
|
||||
private:
|
||||
String text;
|
||||
Ref<TextLine> text_buf;
|
||||
UnderlineMode underline_mode;
|
||||
|
||||
Dictionary opentype_features;
|
||||
String language;
|
||||
TextDirection text_direction = TEXT_DIRECTION_AUTO;
|
||||
Control::StructuredTextParser st_parser = STRUCTURED_TEXT_DEFAULT;
|
||||
Array st_args;
|
||||
|
||||
void _shape();
|
||||
|
||||
protected:
|
||||
virtual Size2 get_minimum_size() const override;
|
||||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
|
||||
bool _set(const StringName &p_name, const Variant &p_value);
|
||||
bool _get(const StringName &p_name, Variant &r_ret) const;
|
||||
void _get_property_list(List<PropertyInfo> *p_list) const;
|
||||
|
||||
public:
|
||||
void set_text(const String &p_text);
|
||||
String get_text() const;
|
||||
|
||||
void set_structured_text_bidi_override(Control::StructuredTextParser p_parser);
|
||||
Control::StructuredTextParser get_structured_text_bidi_override() const;
|
||||
|
||||
void set_structured_text_bidi_override_options(Array p_args);
|
||||
Array get_structured_text_bidi_override_options() const;
|
||||
|
||||
void set_text_direction(TextDirection p_text_direction);
|
||||
TextDirection get_text_direction() const;
|
||||
|
||||
void set_opentype_feature(const String &p_name, int p_value);
|
||||
int get_opentype_feature(const String &p_name) const;
|
||||
void clear_opentype_features();
|
||||
|
||||
void set_language(const String &p_language);
|
||||
String get_language() const;
|
||||
|
||||
void set_underline_mode(UnderlineMode p_underline_mode);
|
||||
UnderlineMode get_underline_mode() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user