r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / plugins / holo / holowindow.C
blob028de802bd18466cdc13567897124cda070ccd76
1 #include "bcdisplayinfo.h"
2 #include "holowindow.h"
4 #include <libintl.h>
5 #define _(String) gettext(String)
6 #define gettext_noop(String) String
7 #define N_(String) gettext_noop (String)
10 HoloThread::HoloThread(HoloMain *client)
11  : Thread()
13         this->client = client;
14         set_synchronous(0);
15         gui_started.lock();
16         completion.lock();
19 HoloThread::~HoloThread()
21 // Window always deleted here
22         delete window;
24         
25 void HoloThread::run()
27         BC_DisplayInfo info;
28         window = new HoloWindow(client, 
29                 info.get_abs_cursor_x() - 105, 
30                 info.get_abs_cursor_y() - 100);
31         window->create_objects();
32         gui_started.unlock();
33         int result = window->run_window();
34         completion.unlock();
35 // Last command executed in thread
36         if(result) client->client_side_close();
44 HoloWindow::HoloWindow(HoloMain *client, int x, int y)
45  : BC_Window(client->gui_string, 
46         x,
47         y,
48         300, 
49         170, 
50         300, 
51         170, 
52         0, 
53         0,
54         1)
55
56         this->client = client; 
59 HoloWindow::~HoloWindow()
63 int HoloWindow::create_objects()
65         int x = 10, y = 10;
66         add_subwindow(new BC_Title(x, y, 
67                 _("HolographicTV from EffectTV\n"
68                 "Copyright (C) 2001 FUKUCHI Kentarou")
69         ));
71         show_window();
72         flush();
73         return 0;
76 int HoloWindow::close_event()
78 // Set result to 1 to indicate a client side close
79         set_done(1);
80         return 1;