Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

localsession.h

Go to the documentation of this file.
00001 #ifndef LOCALSESSION_H
00002 #define LOCALSESSION_H
00003 
00004 #include "bcwindowbase.inc"
00005 #include "defaults.inc"
00006 #include "edl.inc"
00007 #include "filexml.inc"
00008 
00009 
00010 
00011 // Unique session for every EDL
00012 
00013 class LocalSession
00014 {
00015 public:
00016         LocalSession(EDL *edl);
00017         ~LocalSession();
00018 
00019 
00020 // Get selected range based on precidence of in/out points and
00021 // highlighted region.
00022 // 1) If a highlighted selection exists it's used.
00023 // 2) If in_point or out_point exists they're used.
00024 // 3) If no in/out points exist, the insertion point is returned.
00025 // highlight_only - forces it to use highlighted region only.
00026         double get_selectionstart(int highlight_only = 0);
00027         double get_selectionend(int highlight_only = 0);
00028         double get_inpoint();
00029         double get_outpoint();
00030         int inpoint_valid();
00031         int outpoint_valid();
00032         void set_selectionstart(double value);
00033         void set_selectionend(double value);
00034         void set_inpoint(double value);
00035         void set_outpoint(double value);
00036         void unset_inpoint();
00037         void unset_outpoint();
00038 
00039 
00040         void copy_from(LocalSession *that);
00041         void save_xml(FileXML *file, double start);
00042         void load_xml(FileXML *file, unsigned long load_flags);
00043         int load_defaults(Defaults *defaults);
00044         int save_defaults(Defaults *defaults);
00045 // Used to copy parameters that affect rendering.
00046         void synchronize_params(LocalSession *that);
00047 
00048         void boundaries();
00049 
00050 
00051         EDL *edl;
00052 
00053 
00054 // Variables specific to each EDL
00055 // Number of samples if pasted from a clipboard.
00056 // If 0 use longest track
00057         double clipboard_length;
00058 // Title if clip
00059         char clip_title[BCTEXTLEN];
00060         char clip_notes[BCTEXTLEN];
00061 // Folder in parent EDL of clip
00062         char folder[BCTEXTLEN];
00063 
00064         int loop_playback;
00065         double loop_start;
00066         double loop_end;
00067 // Vertical start of track view
00068         int64_t track_start;
00069 // Horizontal start of view in pixels.  This has to be pixels since either
00070 // samples or seconds would require drawing in fractional pixels.
00071         int64_t view_start;
00072 // Zooming of the timeline.  Number of samples per pixel.  
00073         int64_t zoom_sample;
00074 // Amplitude zoom
00075         int64_t zoom_y;
00076 // Track zoom
00077         int64_t zoom_track;
00078 // Vertical automation scale
00079         float automation_min;
00080         float automation_max;
00081 
00082 // Eye dropper
00083         float red, green, blue;
00084 
00085 // Range for CWindow and VWindow preview in seconds.
00086         double preview_start;
00087         double preview_end;
00088 
00089 private:
00090 // The reason why selection ranges and inpoints have to be separate:
00091 // The selection position has to change to set new in points.
00092 // For editing functions we have a precidence for what determines
00093 // the selection.
00094 
00095         double selectionstart, selectionend;
00096         double in_point, out_point;
00097 };
00098 
00099 #endif

Generated on Sun Jan 8 13:38:56 2006 for Cinelerra-svn by  doxygen 1.4.4