diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-04-27 17:47:11 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-04-27 18:19:32 +0200 |
commit | 62f12af48623c9f94c4508b1438bacdb65cdac12 (patch) | |
tree | 0ce658a467edb5d22da9ef990384074e10ef2d05 /libstorycode | |
parent | c9155a34b2e233cff07afb7638a591577b7a767d (diff) |
Implement selection of style in editor
Diffstat (limited to 'libstorycode')
-rw-r--r-- | libstorycode/stylesheet.c | 12 | ||||
-rw-r--r-- | libstorycode/stylesheet.h | 2 |
2 files changed, 14 insertions, 0 deletions
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; +} diff --git a/libstorycode/stylesheet.h b/libstorycode/stylesheet.h index f814e01..f7a3d21 100644 --- a/libstorycode/stylesheet.h +++ b/libstorycode/stylesheet.h @@ -109,4 +109,6 @@ extern const char *stylesheet_get_substyle_name(Stylesheet *s, const char *stn, extern char *stylesheet_serialise(Stylesheet *s); +extern const char *stylesheet_get_friendly_name(const char *in); + #endif /* STYLESHEET_H */ |