35 #ifndef STAGE_WIDGET_TIMECODE_WIDGET_H 36 #define STAGE_WIDGET_TIMECODE_WIDGET_H 41 #include <gtkmm/box.h> 42 #include <gtkmm/menu.h> 43 #include <gtkmm/eventbox.h> 44 #include <gtkmm/label.h> 45 #include <gtkmm/frame.h> 83 Mode mode()
const {
return _mode; }
87 void set(
Time when,
bool force =
false);
90 void set_widget_name(
string);
92 string name()
const {
return _name; }
94 Time current_time (
Time position = Time::ZERO)
const;
95 Time current_duration (
Time position = Time::ZERO)
const;
97 sigc::signal<void> ValueChanged;
98 sigc::signal<void> ChangeAborted;
100 static sigc::signal<void> ModeChanged;
103 static bool has_focus() {
return _has_focus; }
107 uint key_entry_state;
115 Gtk::HBox smpte_packer_hbox;
116 Gtk::HBox smpte_packer;
118 Gtk::HBox minsec_packer_hbox;
119 Gtk::HBox minsec_packer;
121 Gtk::HBox frames_packer_hbox;
122 Gtk::HBox frames_packer;
135 Gtk::EventBox audio_frames_ebox;
136 Gtk::Label audio_frames_label;
140 Gtk::EventBox hours_ebox;
141 Gtk::EventBox minutes_ebox;
142 Gtk::EventBox seconds_ebox;
143 Gtk::EventBox frames_ebox;
145 Gtk::EventBox ms_hours_ebox;
146 Gtk::EventBox ms_minutes_ebox;
147 Gtk::EventBox ms_seconds_ebox;
149 Gtk::Label hours_label;
150 Gtk::Label minutes_label;
151 Gtk::Label seconds_label;
152 Gtk::Label frames_label;
153 Gtk::Label colon1, colon2, colon3;
155 Gtk::Label ms_hours_label;
156 Gtk::Label ms_minutes_label;
157 Gtk::Label ms_seconds_label;
158 Gtk::Label colon4, colon5;
160 Gtk::EventBox clock_base;
161 Gtk::Frame clock_frame;
184 bool field_motion_notify_event (GdkEventMotion *ev, Field);
185 bool field_button_press_event (GdkEventButton *ev, Field);
186 bool field_button_release_event (GdkEventButton *ev, Field);
187 bool field_button_scroll_event (GdkEventScroll *ev, Field);
188 bool field_key_press_event (GdkEventKey *ev, Field);
189 bool field_key_release_event (GdkEventKey *ev, Field);
191 bool field_focus_loss_event (GdkEventFocus*, Field);
192 bool drop_focus_handler (GdkEventFocus *ev);
194 void set_smpte (
Time,
bool);
195 void set_minsec (
Time,
bool);
196 void set_frames (
Time,
bool);
198 int get_frames (Field,
Time pos = Time::ZERO,
int dir=1);
200 void smpte_sanitize_display();
201 Time smpte_time_from_display()
const;
202 Time minsec_time_from_display()
const;
203 Time audio_time_from_display()
const;
205 void build_ops_menu();
208 void smpte_offset_changed();
209 void set_size_requests();
211 static const uint field_length[(int)VFrames+1];
212 static bool _has_focus;
214 void set_size_request_to_display_given_text (Gtk::Widget &w,
const gchar *text, gint hpadding, gint vpadding);
215 void get_ink_pixel_size (Glib::RefPtr<Pango::Layout> layout,
int& width,
int& height);
a mutable time value, behaving like a plain number, allowing copy and re-accessing ...
Lumiera's internal time value datatype.
Lumiera GTK UI implementation root.
a family of time value like entities and their relationships.
basic constant internal time value.
A set of basic GTK includes for the UI.