From 62f12af48623c9f94c4508b1438bacdb65cdac12 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 27 Apr 2019 17:47:11 +0200 Subject: Implement selection of style in editor --- libstorycode/stylesheet.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libstorycode/stylesheet.c') diff --git a/libstorycode/stylesheet.c b/libstorycode/stylesheet.c index f625b19..77e37e1 100644 --- a/libstorycode/stylesheet.c +++ b/libstorycode/stylesheet.c @@ -560,3 +560,15 @@ const char *stylesheet_get_substyle_name(Stylesheet *s, const char *stn, int i) if ( i >= sty->n_substyles ) return NULL; return sty->substyles[i].name; } + + +const char *stylesheet_get_friendly_name(const char *in) +{ + if ( strcmp(in, "SLIDE") == 0 ) return "Slide"; + if ( strcmp(in, "NARRATIVE") == 0 ) return "Narrative"; + if ( strcmp(in, "BP") == 0 ) return "Bullet point"; + if ( strcmp(in, "SLIDETITLE") == 0 ) return "Slide title"; + if ( strcmp(in, "PRESTITLE") == 0 ) return "Presentation title"; + if ( strcmp(in, "TEXT") == 0 ) return "Text frame"; + return in; +} -- cgit v1.2.3