r1009: Move the dependencies to newer package names
[cinelerra_cv/mob.git] / cinelerra / localsession.h
blob54abe398dee711368be8eb006634162404dee3ee
1 #ifndef LOCALSESSION_H
2 #define LOCALSESSION_H
4 #include "bcwindowbase.inc"
5 #include "bchash.inc"
6 #include "edl.inc"
7 #include "filexml.inc"
10 // Unique session for every EDL
12 class LocalSession
14 public:
15 LocalSession(EDL *edl);
16 ~LocalSession();
19 // Get selected range based on precidence of in/out points and
20 // highlighted region.
21 // 1) If a highlighted selection exists it's used.
22 // 2) If in_point or out_point exists they're used.
23 // 3) If no in/out points exist, the insertion point is returned.
24 // highlight_only - forces it to use highlighted region only.
25 double get_selectionstart(int highlight_only = 0);
26 double get_selectionend(int highlight_only = 0);
27 double get_inpoint();
28 double get_outpoint();
29 int inpoint_valid();
30 int outpoint_valid();
31 void set_selectionstart(double value);
32 void set_selectionend(double value);
33 void set_inpoint(double value);
34 void set_outpoint(double value);
35 void unset_inpoint();
36 void unset_outpoint();
39 void copy_from(LocalSession *that);
40 void save_xml(FileXML *file, double start);
41 void load_xml(FileXML *file, unsigned long load_flags);
42 int load_defaults(BC_Hash *defaults);
43 int save_defaults(BC_Hash *defaults);
44 // Used to copy parameters that affect rendering.
45 void synchronize_params(LocalSession *that);
47 void boundaries();
50 EDL *edl;
53 // Variables specific to each EDL
54 // Number of samples if pasted from a clipboard.
55 // If 0 use longest track
56 double clipboard_length;
57 // Title if clip
58 char clip_title[BCTEXTLEN];
59 char clip_notes[BCTEXTLEN];
60 // Folder in parent EDL of clip
61 char folder[BCTEXTLEN];
63 int loop_playback;
64 double loop_start;
65 double loop_end;
66 // Vertical start of track view
67 int64_t track_start;
68 // Horizontal start of view in pixels. This has to be pixels since either
69 // samples or seconds would require drawing in fractional pixels.
70 int64_t view_start;
71 // Zooming of the timeline. Number of samples per pixel.
72 int64_t zoom_sample;
73 // Amplitude zoom
74 int64_t zoom_y;
75 // Track zoom
76 int64_t zoom_track;
77 // Vertical automation scale
78 float automation_mins[6];
79 float automation_maxs[6];
80 int zoombar_showautotype;
82 // Eye dropper
83 float red, green, blue;
85 // Range for CWindow and VWindow preview in seconds.
86 double preview_start;
87 double preview_end;
89 private:
90 // The reason why selection ranges and inpoints have to be separate:
91 // The selection position has to change to set new in points.
92 // For editing functions we have a precidence for what determines
93 // the selection.
95 double selectionstart, selectionend;
96 double in_point, out_point;
99 #endif