projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add boxblur drag box
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
plugins
/
titler
/
titlerwindow.C
diff --git
a/cinelerra-5.1/plugins/titler/titlerwindow.C
b/cinelerra-5.1/plugins/titler/titlerwindow.C
index 84f50a36ca6dd01a2b25b8edd5ef781f66b738f5..9b9ebb6432d119546ee869b761eb98f2083ac17e 100644
(file)
--- a/
cinelerra-5.1/plugins/titler/titlerwindow.C
+++ b/
cinelerra-5.1/plugins/titler/titlerwindow.C
@@
-40,6
+40,7
@@
#include "pluginserver.h"
#include "theme.h"
#include "track.h"
#include "pluginserver.h"
#include "theme.h"
#include "track.h"
+#include "tracks.h"
#include "titlerwindow.h"
#include "bcfontentry.h"
#include "titlerwindow.h"
#include "bcfontentry.h"
@@
-138,6
+139,8
@@
TitleWindow::~TitleWindow()
delete timecode_format;
delete title_x;
delete title_y;
delete timecode_format;
delete title_x;
delete title_y;
+ delete title_w;
+ delete title_y;
}
void TitleWindow::create_objects()
}
void TitleWindow::create_objects()
@@
-530,9
+533,9
@@
int TitleWindow::insert_ibeam(const char *txt, int ofs)
{
int ibeam = cur_ibeam;
int ilen = strlen(txt)+1;
{
int ibeam = cur_ibeam;
int ilen = strlen(txt)+1;
- wch
a
r_t wtxt[ilen];
+ wchr_t wtxt[ilen];
int len = BC_Resources::encode(client->config.encoding, BC_Resources::wide_encoding,
int len = BC_Resources::encode(client->config.encoding, BC_Resources::wide_encoding,
- (char*)txt,ilen, (char *)wtxt,ilen*sizeof(wtxt[0])) / sizeof(wch
a
r_t);
+ (char*)txt,ilen, (char *)wtxt,ilen*sizeof(wtxt[0])) / sizeof(wchr_t);
client->insert_text(wtxt, ibeam);
while( len > 0 && !wtxt[len] ) --len;
int adv = len+1 + ofs;
client->insert_text(wtxt, ibeam);
while( len > 0 && !wtxt[len] ) --len;
int adv = len+1 + ofs;
@@
-582,7
+585,8
@@
void TitleWindow::update_gui()
fade_out->update((float)client->config.fade_out);
font->update(client->config.font);
check_style(client->config.font,0);
fade_out->update((float)client->config.fade_out);
font->update(client->config.font);
check_style(client->config.font,0);
- text->update(client->config.wtext ? &client->config.wtext[0] : L"");
+ wchr_t wz[1] = { 0 };
+ text->update(client->config.wtext ? &client->config.wtext[0] : wz);
speed->update(client->config.pixels_per_second);
outline->update((int64_t)client->config.outline_size);
#ifdef USE_STROKER
speed->update(client->config.pixels_per_second);
outline->update((int64_t)client->config.outline_size);
#ifdef USE_STROKER
@@
-987,10
+991,10
@@
int TitleText::button_press_event()
int TitleText::handle_event()
{
window->fonts_popup->deactivate();
int TitleText::handle_event()
{
window->fonts_popup->deactivate();
- const wch
a
r_t *wtext = get_wtext();
- long wlen = w
cs
len(wtext);
+ const wchr_t *wtext = get_wtext();
+ long wlen = w
str
len(wtext);
client->config.demand(wlen);
client->config.demand(wlen);
- w
cs
ncpy(client->config.wtext, wtext, client->config.wsize);
+ w
str
ncpy(client->config.wtext, wtext, client->config.wsize);
client->config.wlen = wlen;
window->update_stats();
window->send_configure_change();
client->config.wlen = wlen;
window->update_stats();
window->send_configure_change();
@@
-1236,8
+1240,10
@@
TitleDrag::TitleDrag(TitleMain *client, TitleWindow *window, int x, int y)
Track *TitleDrag::get_drag_track()
{
Track *TitleDrag::get_drag_track()
{
- return !client->server->plugin ? 0 :
- client->server->plugin->track;
+ PluginServer *server = client->server;
+ int plugin_id = server->plugin_id;
+ Plugin *plugin = server->edl->tracks->plugin_exists(plugin_id);
+ return !plugin ? 0 : plugin->track;
}
int64_t TitleDrag::get_drag_position()
{
}
int64_t TitleDrag::get_drag_position()
{
@@
-1545,7
+1551,7
@@
void TitlePngPopup::handle_done_event(int result)
if( result ) return;
BrowseButtonWindow *gui = (BrowseButtonWindow *)get_gui();
const char *path = gui->get_submitted_path();
if( result ) return;
BrowseButtonWindow *gui = (BrowseButtonWindow *)get_gui();
const char *path = gui->get_submitted_path();
- char txt[BC
STR
LEN]; sprintf(txt, "<%s %s>", _(KW_PNG), path);
+ char txt[BC
TEXT
LEN]; sprintf(txt, "<%s %s>", _(KW_PNG), path);
window->lock_window("TitlePngPopup::handle_done_event");
window->insert_ibeam(txt);
window->unlock_window();
window->lock_window("TitlePngPopup::handle_done_event");
window->insert_ibeam(txt);
window->unlock_window();