- sizer->Add (_frames);
- _set_button = new wxButton (this, wxID_ANY, _("Set"));
- sizer->Add (_set_button, 0, wxLEFT | wxRIGHT, 8);
-
- _hours->Connect (wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (Timecode::changed), 0, this);
- _minutes->Connect (wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (Timecode::changed), 0, this);
- _seconds->Connect (wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (Timecode::changed), 0, this);
- _frames->Connect (wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (Timecode::changed), 0, this);
- _set_button->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (Timecode::set_clicked), 0, this);
-
- _set_button->Enable (false);
-
- SetSizerAndFit (sizer);
+ editable_sizer->Add (_frames);
+ if (set_button) {
+ _set_button = new Button (_editable, _("Set"));
+ editable_sizer->Add (_set_button, 0, wxLEFT | wxRIGHT, 8);
+ }
+ _editable->SetSizerAndFit (editable_sizer);
+ _sizer->Add (_editable);
+
+ _fixed = add_label_to_sizer (_sizer, this, wxT ("42"), false);
+
+ _hours->Bind (wxEVT_TEXT, boost::bind (&TimecodeBase::changed, this));
+ _minutes->Bind (wxEVT_TEXT, boost::bind (&TimecodeBase::changed, this));
+ _seconds->Bind (wxEVT_TEXT, boost::bind (&TimecodeBase::changed, this));
+ _frames->Bind (wxEVT_TEXT, boost::bind (&TimecodeBase::changed, this));
+ if (_set_button) {
+ _set_button->Bind (wxEVT_BUTTON, boost::bind (&TimecodeBase::set_clicked, this));
+ _set_button->Enable (false);
+ }
+
+ set_editable (true);
+
+ SetSizerAndFit (_sizer);