#ifndef TITLE_H
#define TITLE_H
+#define USE_STROKER
+
+#define KW_NUDGE _("nudge")
+#define KW_COLOR _("color")
+#define KW_ALPHA _("alpha")
+#define KW_FONT _("font")
+#define KW_SIZE _("size")
+#define KW_BOLD _("bold")
+#define KW_ITALIC _("italic")
+#define KW_CAPS _("caps")
+#define KW_UL _("ul")
+#define KW_BLINK _("blink")
+#define KW_FIXED _("fixed")
+#define KW_SUP _("sup")
+#define KW_PNG _("png")
class TitleConfig;
class TitleGlyph;
#include <ft2build.h>
#include FT_FREETYPE_H
#include <sys/types.h>
+#include <wchar.h>
+#include <wctype.h>
// Motion strategy
#define TOTAL_PATHS 5
double fade_in, fade_out;
float pixels_per_second; // Speed of motion
// Text to display
- wchar_t wtext[BCTEXTLEN];
+ wchar_t wtext[3*BCTEXTLEN];
int wlen;
// Position in frame relative to top left
float title_x, title_y;
class TitleCurFont : public TitleStack<BC_FontEntry*>
{
public:
- BC_FontEntry* get(const char *txt, int style);
- int set(const char *txt, int style);
+ BC_FontEntry *get(const char *txt, int style);
+ BC_FontEntry *set(const char *txt, int style);
int style();
virtual int set(const char *txt=0);
virtual int unset(const char *txt);
int wcur() { return eof() ? -1 : *out; }
int wnext() { return eof() ? -1 : *out++; }
int wget(wchar_t &wch);
+ int tget(wchar_t &wch);
+ wchar_t wid[BCSTRLEN], wtxt[BCTEXTLEN];
char id[BCSTRLEN], text[BCTEXTLEN];
int set_attributes(int ret);
void update_gui();
void save_data(KeyFrame *keyframe);
void read_data(KeyFrame *keyframe);
+ void insert_text(const wchar_t *wtxt, int pos);
void build_previews(TitleWindow *gui);
void reset_render();
Indexable *open_background(const char *filename);
int read_background(VFrame *frame, int64_t position, int color_model);
void draw_background();
- BC_FontEntry* get_font(const char *font_name, int style);
+ static BC_FontEntry* get_font(const char *font_name, int style);
BC_FontEntry* config_font();
TitleGlyph *get_glyph(FT_ULong char_code, BC_FontEntry *font, int size, int style);
int get_width(TitleGlyph *cur, TitleGlyph *nxt);