textbox positions array deleted, 3K bytes + stats for titler
[goodguy/history.git] / cinelerra-5.1 / plugins / titler / titler.h
index 2b957a2c511358ac53f2e236f3428595c71cde73..bca0076560623faf24e96a6f91c5e23c67b810d8 100644 (file)
 
 #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;
@@ -72,6 +87,8 @@ class TitleMain;
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include <sys/types.h>
+#include <wchar.h>
+#include <wctype.h>
 
 // Motion strategy
 #define TOTAL_PATHS 5
@@ -139,7 +156,7 @@ public:
        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;
@@ -532,6 +549,8 @@ public:
        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);
 
@@ -566,7 +585,7 @@ public:
        void update_gui();
        void save_data(KeyFrame *keyframe);
        void read_data(KeyFrame *keyframe);
-       void insert_text(const char *txt, int pos);
+       void insert_text(const wchar_t *wtxt, int pos);
 
        void build_previews(TitleWindow *gui);
        void reset_render();
@@ -594,7 +613,7 @@ public:
        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);