aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-05-01 15:59:10 +0200
committerThomas White <taw@bitwiz.me.uk>2019-05-01 15:59:10 +0200
commit97d1fbc1653280857499d76f5203a379892a8e3e (patch)
tree7c8c03bcbbca23ba6e2ae60058a9d38df572fd51
parent790b6dee8468ded9b795cba008db66916217018b (diff)
Add style for footer
-rw-r--r--data/demo.sc8
-rw-r--r--libstorycode/storycode.y5
-rw-r--r--libstorycode/stylesheet.c2
3 files changed, 15 insertions, 0 deletions
diff --git a/data/demo.sc b/data/demo.sc
index 96186f8..2a358df 100644
--- a/data/demo.sc
+++ b/data/demo.sc
@@ -38,6 +38,14 @@ STYLES {
FGCOL #eeeeee
BGCOL 0,0,0,0
}
+ FOOTER {
+ GEOMETRY 1f x 35u +0u +738u
+ FGCOL 1.00,1.00,1.00,1.00
+ BGCOL 0.76,0.49,0.07,1.00
+ PARASPACE 0u,0u,0u,0u
+ PAD 0u,0u,0u,0u
+ ALIGN right
+ }
}
}
diff --git a/libstorycode/storycode.y b/libstorycode/storycode.y
index 4c418eb..a9c3f13 100644
--- a/libstorycode/storycode.y
+++ b/libstorycode/storycode.y
@@ -371,6 +371,7 @@ style_slide_def:
| style_slide_def style_slide_prestitle { }
| style_slide_def style_slide_text { }
| style_slide_def style_slide_title { }
+| style_slide_def style_slide_footer { }
;
background:
@@ -400,6 +401,10 @@ style_slide_text:
TEXTFRAME '{' styledefs '}' { set_style(ctx, "SLIDE.TEXT"); }
;
+style_slide_footer:
+ FOOTER '{' styledefs '}' { set_style(ctx, "SLIDE.FOOTER"); }
+;
+
styledefs:
%empty
| styledefs styledef
diff --git a/libstorycode/stylesheet.c b/libstorycode/stylesheet.c
index eb8b2cb..c4625f2 100644
--- a/libstorycode/stylesheet.c
+++ b/libstorycode/stylesheet.c
@@ -220,6 +220,7 @@ Stylesheet *stylesheet_new()
create_style(ss, "SLIDE", "TEXT");
create_style(ss, "SLIDE", "PRESTITLE");
create_style(ss, "SLIDE", "SLIDETITLE");
+ create_style(ss, "SLIDE", "FOOTER");
return ss;
}
@@ -552,5 +553,6 @@ const char *stylesheet_get_friendly_name(const char *in)
if ( strcmp(in, "SLIDETITLE") == 0 ) return "Slide title";
if ( strcmp(in, "PRESTITLE") == 0 ) return "Presentation title";
if ( strcmp(in, "TEXT") == 0 ) return "Text frame";
+ if ( strcmp(in, "FOOTER") == 0 ) return "Footer";
return in;
}