aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2020-01-13 22:53:46 +0100
committerThomas White <taw@bitwiz.me.uk>2020-01-13 22:53:46 +0100
commit588d51ef1e462eefc3761e55dc9ae87f75a3115c (patch)
tree1a1bad48c8064fce743162be1d3cf7bfd44a3035
parent1f2629403b9d62ecf44420f789b5c679a8ae1c98 (diff)
Styling for segment start markers
-rw-r--r--libstorycode/narrative_render_cairo.c2
-rw-r--r--libstorycode/storycode.y6
-rw-r--r--libstorycode/stylesheet.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/libstorycode/narrative_render_cairo.c b/libstorycode/narrative_render_cairo.c
index 0a188f4..e00ea78 100644
--- a/libstorycode/narrative_render_cairo.c
+++ b/libstorycode/narrative_render_cairo.c
@@ -314,7 +314,7 @@ int narrative_wrap_range(Narrative *n, Stylesheet *stylesheet, PangoLanguage *la
break;
case NARRATIVE_ITEM_SEGSTART :
- stn = "NARRATIVE.SEGSTART";
+ stn = "NARRATIVE.SEGMENT_START";
break;
case NARRATIVE_ITEM_EOP :
diff --git a/libstorycode/storycode.y b/libstorycode/storycode.y
index eec1abb..6bb0e85 100644
--- a/libstorycode/storycode.y
+++ b/libstorycode/storycode.y
@@ -153,6 +153,7 @@
%type <ss> stylesheet
%type <style> style_narrative_bp
%type <style> style_narrative_prestitle
+%type <style> style_narrative_segstart
%type <style> styledefs
%type <style> styledef
%type <style> slide_geom
@@ -556,6 +557,7 @@ style_slide_defs:
style_narrative_def:
style_narrative_prestitle { set_stylesheet(n, &$1, "NARRATIVE.PRESTITLE"); }
| style_narrative_bp { set_stylesheet(n, &$1, "NARRATIVE.BP"); }
+| style_narrative_segstart { set_stylesheet(n, &$1, "NARRATIVE.SEGMENT_START"); }
| styledef { set_stylesheet(n, &$1, "NARRATIVE"); }
;
@@ -576,6 +578,10 @@ style_narrative_bp:
BP '{' styledefs '}' { $$ = $3; }
;
+style_narrative_segstart:
+ SEG_START '{' styledefs '}' { $$ = $3; }
+;
+
background:
BGCOL colour { copy_col(&$$.bgcol, $2);
$$.bggrad = GRAD_NONE;
diff --git a/libstorycode/stylesheet.c b/libstorycode/stylesheet.c
index 8fd09d4..bc22852 100644
--- a/libstorycode/stylesheet.c
+++ b/libstorycode/stylesheet.c
@@ -225,7 +225,7 @@ Stylesheet *stylesheet_new()
create_style(ss, "", "NARRATIVE");
create_style(ss, "NARRATIVE", "BP");
create_style(ss, "NARRATIVE", "PRESTITLE");
- create_style(ss, "NARRATIVE", "SEGSTART");
+ create_style(ss, "NARRATIVE", "SEGMENT_START");
sty = create_style(ss, "", "SLIDE");
sty->geom.w.unit = LENGTH_UNIT;
sty->geom.w.len = 1024.0;
@@ -566,7 +566,7 @@ const char *stylesheet_get_friendly_name(const char *in)
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, "SEGSTART") == 0 ) return "Start of segment";
+ if ( strcmp(in, "SEGMENT_START") == 0 ) return "Start of segment";
if ( strcmp(in, "TEXT") == 0 ) return "Text frame";
if ( strcmp(in, "FOOTER") == 0 ) return "Footer";
return in;