Added the language tag stuff to the example program. More TODOs.
This commit is contained in:
parent
669538e9ce
commit
6761c0a9f7
|
@ -139,6 +139,31 @@ static void setupAttributedString(void)
|
||||||
|
|
||||||
uiAttributedStringAppendUnattributed(attrstr, ", ");
|
uiAttributedStringAppendUnattributed(attrstr, ", ");
|
||||||
|
|
||||||
|
next = "\xD0\xB1\xD0\xB3\xD0\xB4\xD0\xBF\xD1\x82";
|
||||||
|
uiAttributedStringAppendUnattributed(attrstr, "multiple languages (compare ");
|
||||||
|
start = uiAttributedStringLen(attrstr);
|
||||||
|
end = start + strlen(next);
|
||||||
|
uiAttributedStringAppendUnattributed(attrstr, next);
|
||||||
|
spec.Type = uiAttributeItalic;
|
||||||
|
spec.Value = uiDrawTextItalicItalic;
|
||||||
|
uiAttributedStringSetAttribute(attrstr, &spec, start, end);
|
||||||
|
spec.Type = uiAttributeLanguage;
|
||||||
|
spec.Value = (uintptr_t) "ru";
|
||||||
|
uiAttributedStringSetAttribute(attrstr, &spec, start, end);
|
||||||
|
uiAttributedStringAppendUnattributed(attrstr, " to ");
|
||||||
|
start = uiAttributedStringLen(attrstr);
|
||||||
|
end = start + strlen(next);
|
||||||
|
uiAttributedStringAppendUnattributed(attrstr, next);
|
||||||
|
spec.Type = uiAttributeItalic;
|
||||||
|
spec.Value = uiDrawTextItalicItalic;
|
||||||
|
uiAttributedStringSetAttribute(attrstr, &spec, start, end);
|
||||||
|
spec.Type = uiAttributeLanguage;
|
||||||
|
spec.Value = (uintptr_t) "sr";
|
||||||
|
uiAttributedStringSetAttribute(attrstr, &spec, start, end);
|
||||||
|
uiAttributedStringAppendUnattributed(attrstr, " \xE2\x80\x94 may require changing the font)");
|
||||||
|
|
||||||
|
uiAttributedStringAppendUnattributed(attrstr, ", ");
|
||||||
|
|
||||||
next = "multiple TODO";
|
next = "multiple TODO";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
// 17 january 2017
|
// 17 january 2017
|
||||||
#include "drawtext.h"
|
#include "drawtext.h"
|
||||||
|
|
||||||
|
// okay everything is definitely bugged in the OS X code
|
||||||
|
// - occasional segfaults on startup
|
||||||
|
// - very rare size attributes in the attributed string example don't terminate for a while, making everything big
|
||||||
|
// - very very rare trace/bpt faults on startup
|
||||||
|
|
||||||
static uiWindow *mainwin;
|
static uiWindow *mainwin;
|
||||||
static uiBox *box;
|
static uiBox *box;
|
||||||
static uiCombobox *exampleList;
|
static uiCombobox *exampleList;
|
||||||
|
|
Loading…
Reference in New Issue