diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-23 17:43:25 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-23 17:43:25 +0300 |
commit | 66437a62a73966de8ccb673473ba69d6c1ed66a3 (patch) | |
tree | 6b200663643b67dea804e8b9805abf128a010493 /source/blender/blenkernel/BKE_font.h | |
parent | f4133b730c93f6db985b6751d18b72ea7f429c34 (diff) |
2.5
Font object + editing back.
Was quite some work due to a myriad of globals all over!
Works nicely 100% local now.
To enable a single textedit operator, I've added a new
keymap entry KM_TEXTEDIT, which gives all keyboard events
to the handler. Also had to add a new keymap-add function
to force a keymap handler in beginning of region handlers.
In future this can be used to prioritize handlers.
Also: split off the arrow keys (frame change) to a separate
region level handler. Can be set with default flag in
regiontype->keymapflag ED_KEYMAP_FRAMES
Diffstat (limited to 'source/blender/blenkernel/BKE_font.h')
-rw-r--r-- | source/blender/blenkernel/BKE_font.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_font.h b/source/blender/blenkernel/BKE_font.h index 3445e5b1ce2..d328ccd57f4 100644 --- a/source/blender/blenkernel/BKE_font.h +++ b/source/blender/blenkernel/BKE_font.h @@ -43,6 +43,7 @@ struct Object; struct Curve; struct objfnt; struct TmpFont; +struct CharInfo; struct chartrans { float xof, yof; @@ -55,20 +56,31 @@ typedef struct SelBox { float x, y, w, h; } SelBox; -extern struct SelBox *selboxes; +typedef struct EditFont { + wchar_t *copybuf; + wchar_t *copybufinfo; + + wchar_t *textbuf; + struct CharInfo *textbufinfo; + wchar_t *oldstr; + struct CharInfo *oldstrinfo; + + float textcurs[4][2]; + +} EditFont; + void BKE_font_register_builtin(void *mem, int size); void free_vfont(struct VFont *sc); void free_ttfont(void); +struct VFont *get_builtin_font(void); struct VFont *load_vfont(char *name); struct TmpFont *vfont_find_tmpfont(struct VFont *vfont); -struct chartrans *text_to_curve(struct Scene *scene, struct Object *ob, int mode); -int style_to_sel(int style, int toggle); -int mat_to_sel(void); +struct chartrans *BKE_text_to_curve(struct Scene *scene, struct Object *ob, int mode); -int getselection(struct Object *ob, int *start, int *end); +int BKE_font_getselection(struct Object *ob, int *start, int *end); void chtoutf8(unsigned long c, char *o); void wcs2utf8s(char *dst, wchar_t *src); |