r1053: Add Russian translation.
[cinelerra_cv.git] / guicast / bcdialog.h
blob0ef9c937ed38d24da502188744bdde5129078b6d
1 #ifndef BCDIALOG_H
2 #define BCDIALOG_H
4 #include "bcdialog.inc"
5 #include "condition.inc"
6 #include "guicast.h"
7 #include "mutex.inc"
8 #include "thread.h"
11 // Generic dialog box with static thread and proper locking.
12 // Create the thread object at startup. Call start() to do the dialog.
13 // Only one dialog instance is allowed at a time. These must be overridden
14 // to add functionality.
16 class BC_DialogThread : public Thread
18 public:
19 BC_DialogThread();
20 virtual ~BC_DialogThread();
22 // User calls this to create or raise the dialog box.
23 void start();
24 void run();
26 // After the window is closed, this is called
27 virtual void handle_done_event(int result);
29 // After the window is closed and deleted, this is called.
30 virtual void handle_close_event(int result);
32 // User creates the window and initializes it here.
33 virtual BC_Window* new_gui();
34 BC_Window* get_gui();
36 // Called by user to access the gui pointer
37 void lock_window(char *location);
38 void unlock_window();
40 private:
41 BC_Window *gui;
42 Condition *startup_lock;
43 Mutex *window_lock;
53 #endif