f->Show ();
ui_signaller = new wxUISignaller (this);
- this->Connect (-1, wxEVT_IDLE, wxIdleEventHandler (App::idle));
+ this->Bind (wxEVT_IDLE, boost::bind (&App::idle, this));
return true;
}
return true;
}
- void idle (wxIdleEvent &)
+ void idle ()
{
ui_signaller->ui_idle ();
}
setup_menu (bar);
SetMenuBar (bar);
- Connect (ID_file_add_film, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::file_add_film));
- Connect (ID_file_quit, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::file_quit));
- Connect (ID_help_about, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::help_about));
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_add_film, this), ID_file_add_film);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_quit, this), ID_file_quit);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::help_about, this), ID_help_about);
wxPanel* panel = new wxPanel (this);
wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
wxSizer* buttons = new wxBoxSizer (wxHORIZONTAL);
wxButton* add = new wxButton (panel, wxID_ANY, _("Add Film..."));
- add->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (Frame::add_film));
+ add->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&Frame::add_film, this));
buttons->Add (add, 1, wxALL, 6);
sizer->Add (buttons, 0, wxALL, 6);
panel->SetSizer (sizer);
- Connect (wxID_ANY, wxEVT_CLOSE_WINDOW, wxCloseEventHandler (Frame::close));
+ Bind (wxEVT_CLOSE_WINDOW, boost::bind (&Frame::close, this, _1));
}
private:
ev.Skip ();
}
- void file_add_film (wxCommandEvent& ev)
+ void file_add_film ()
{
- add_film (ev);
+ add_film ();
}
- void file_quit (wxCommandEvent &)
+ void file_quit ()
{
if (should_close ()) {
Close (true);
}
}
- void help_about (wxCommandEvent &)
+ void help_about ()
{
wxAboutDialogInfo info;
info.SetName (_("DCP-o-matic Batch Converter"));
wxAboutBox (info);
}
- void add_film (wxCommandEvent &)
+ void add_film ()
{
wxDirDialog* c = new wxDirDialog (this, _("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST);
int r;
f->Show ();
ui_signaller = new wxUISignaller (this);
- this->Connect (-1, wxEVT_IDLE, wxIdleEventHandler (App::idle));
+ this->Bind (wxEVT_IDLE, boost::bind (&App::idle, this));
return true;
}
- void idle (wxIdleEvent &)
+ void idle ()
{
ui_signaller->ui_idle ();
}
SetSizer (_sizer);
_sizer->Layout ();
- Connect (ID_timer, wxEVT_TIMER, wxTimerEventHandler (StatusDialog::update));
+ Bind (wxEVT_TIMER, boost::bind (&StatusDialog::update, this), ID_timer);
_timer.Start (1000);
}
private:
- void update (wxTimerEvent &)
+ void update ()
{
_text->ChangeValue (std_to_wx (memory_log->get ()));
_sizer->Layout ();
SetIcon (icon, std_to_wx ("DCP-o-matic encode server"));
#endif
- Connect (ID_status, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (TaskBarIcon::status));
- Connect (ID_quit, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (TaskBarIcon::quit));
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&TaskBarIcon::status, this), ID_status);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&TaskBarIcon::quit, this), ID_quit);
}
wxMenu* CreatePopupMenu ()
}
private:
- void status (wxCommandEvent &)
+ void status ()
{
StatusDialog* d = new StatusDialog;
d->Show ();
}
- void quit (wxCommandEvent &)
+ void quit ()
{
wxTheApp->ExitMainLoop ();
}
for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) {
_channel_checkbox[i] = new wxCheckBox (this, wxID_ANY, std_to_wx (audio_channel_name (i)));
side->Add (_channel_checkbox[i], 1, wxEXPAND | wxALL, 3);
- _channel_checkbox[i]->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (AudioDialog::channel_clicked), 0, this);
+ _channel_checkbox[i]->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AudioDialog::channel_clicked, this, _1));
}
{
for (int i = 0; i < AudioPoint::COUNT; ++i) {
_type_checkbox[i] = new wxCheckBox (this, wxID_ANY, types[i]);
side->Add (_type_checkbox[i], 1, wxEXPAND | wxALL, 3);
- _type_checkbox[i]->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (AudioDialog::type_clicked), 0, this);
+ _type_checkbox[i]->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AudioDialog::type_clicked, this, _1));
}
{
}
_smoothing = new wxSlider (this, wxID_ANY, AudioPlot::max_smoothing / 2, 1, AudioPlot::max_smoothing);
- _smoothing->Connect (wxID_ANY, wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler (AudioDialog::smoothing_changed), 0, this);
+ _smoothing->Bind (wxEVT_SCROLL_THUMBTRACK, boost::bind (&AudioDialog::smoothing_changed, this));
side->Add (_smoothing, 1, wxEXPAND);
sizer->Add (side, 0, wxALL, 12);
}
void
-AudioDialog::smoothing_changed (wxScrollEvent &)
+AudioDialog::smoothing_changed ()
{
_plot->set_smoothing (_smoothing->GetValue ());
}
void content_changed (int);
void channel_clicked (wxCommandEvent &);
void type_clicked (wxCommandEvent &);
- void smoothing_changed (wxScrollEvent &);
+ void smoothing_changed ();
void try_to_load_analysis ();
void analysis_finished ();
_sizer->Add (_grid, 1, wxEXPAND | wxALL);
SetSizerAndFit (_sizer);
- Connect (wxID_ANY, wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler (AudioMappingView::left_click), 0, this);
+ Bind (wxEVT_GRID_CELL_LEFT_CLICK, boost::bind (&AudioMappingView::left_click, this, _1));
}
void
_colours.push_back (wxColour ( 0, 0, 255));
_colours.push_back (wxColour (100, 100, 100));
- Connect (wxID_ANY, wxEVT_PAINT, wxPaintEventHandler (AudioPlot::paint), 0, this);
+ Bind (wxEVT_PAINT, boost::bind (&AudioPlot::paint, this));
SetMinSize (wxSize (640, 512));
}
}
void
-AudioPlot::paint (wxPaintEvent &)
+AudioPlot::paint ()
{
wxPaintDC dc (this);
static const int max_smoothing;
private:
- void paint (wxPaintEvent &);
+ void paint ();
boost::shared_ptr<AudioAnalysis> _analysis;
bool _channel_visible[MAX_AUDIO_CHANNELS];
setup_language_sensitivity ();
- _set_language->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (ConfigDialog::set_language_changed), 0, this);
- _language->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (ConfigDialog::language_changed), 0, this);
+ _set_language->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&ConfigDialog::set_language_changed, this));
+ _language->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&ConfigDialog::language_changed, this));
_num_local_encoding_threads->SetRange (1, 128);
_num_local_encoding_threads->SetValue (config->num_local_encoding_threads ());
- _num_local_encoding_threads->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (ConfigDialog::num_local_encoding_threads_changed), 0, this);
+ _num_local_encoding_threads->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&ConfigDialog::num_local_encoding_threads_changed, this));
_default_still_length->SetRange (1, 3600);
_default_still_length->SetValue (config->default_still_length ());
- _default_still_length->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (ConfigDialog::default_still_length_changed), 0, this);
+ _default_still_length->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&ConfigDialog::default_still_length_changed, this));
_default_directory->SetPath (std_to_wx (config->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir()))));
- _default_directory->Connect (wxID_ANY, wxEVT_COMMAND_DIRPICKER_CHANGED, wxCommandEventHandler (ConfigDialog::default_directory_changed), 0, this);
+ _default_directory->Bind (wxEVT_COMMAND_DIRPICKER_CHANGED, boost::bind (&ConfigDialog::default_directory_changed, this));
- _default_dci_metadata_button->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (ConfigDialog::edit_default_dci_metadata_clicked), 0, this);
+ _default_dci_metadata_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ConfigDialog::edit_default_dci_metadata_clicked, this));
vector<Ratio const *> ratio = Ratio::all ();
int n = 0;
++n;
}
- _default_container->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (ConfigDialog::default_container_changed), 0, this);
+ _default_container->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&ConfigDialog::default_container_changed, this));
vector<DCPContentType const *> const ct = DCPContentType::all ();
n = 0;
++n;
}
- _default_dcp_content_type->Connect (wxID_ANY, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler (ConfigDialog::default_dcp_content_type_changed), 0, this);
+ _default_dcp_content_type->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&ConfigDialog::default_dcp_content_type_changed, this));
_default_j2k_bandwidth->SetRange (50, 250);
_default_j2k_bandwidth->SetValue (config->default_j2k_bandwidth() / 1e6);
- _default_j2k_bandwidth->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (ConfigDialog::default_j2k_bandwidth_changed), 0, this);
+ _default_j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&ConfigDialog::default_j2k_bandwidth_changed, this));
}
void
Config* config = Config::instance ();
_tms_ip->SetValue (std_to_wx (config->tms_ip ()));
- _tms_ip->Connect (wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (ConfigDialog::tms_ip_changed), 0, this);
+ _tms_ip->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&ConfigDialog::tms_ip_changed, this));
_tms_path->SetValue (std_to_wx (config->tms_path ()));
- _tms_path->Connect (wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (ConfigDialog::tms_path_changed), 0, this);
+ _tms_path->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&ConfigDialog::tms_path_changed, this));
_tms_user->SetValue (std_to_wx (config->tms_user ()));
- _tms_user->Connect (wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (ConfigDialog::tms_user_changed), 0, this);
+ _tms_user->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&ConfigDialog::tms_user_changed, this));
_tms_password->SetValue (std_to_wx (config->tms_password ()));
- _tms_password->Connect (wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (ConfigDialog::tms_password_changed), 0, this);
+ _tms_password->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&ConfigDialog::tms_password_changed, this));
}
void
Config* config = Config::instance ();
_issuer->SetValue (std_to_wx (config->dcp_metadata().issuer));
- _issuer->Connect (wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (ConfigDialog::issuer_changed), 0, this);
+ _issuer->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&ConfigDialog::issuer_changed, this));
_creator->SetValue (std_to_wx (config->dcp_metadata().creator));
- _creator->Connect (wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (ConfigDialog::creator_changed), 0, this);
+ _creator->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&ConfigDialog::creator_changed, this));
}
void
add_server_to_control (*i);
}
- _add_server->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (ConfigDialog::add_server_clicked), 0, this);
- _edit_server->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (ConfigDialog::edit_server_clicked), 0, this);
- _remove_server->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (ConfigDialog::remove_server_clicked), 0, this);
-
- _servers->Connect (wxID_ANY, wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler (ConfigDialog::server_selection_changed), 0, this);
- _servers->Connect (wxID_ANY, wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler (ConfigDialog::server_selection_changed), 0, this);
- wxListEvent ev;
- server_selection_changed (ev);
+ _add_server->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ConfigDialog::add_server_clicked, this));
+ _edit_server->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ConfigDialog::edit_server_clicked, this));
+ _remove_server->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ConfigDialog::remove_server_clicked, this));
+
+ _servers->Bind (wxEVT_COMMAND_LIST_ITEM_SELECTED, boost::bind (&ConfigDialog::server_selection_changed, this));
+ _servers->Bind (wxEVT_COMMAND_LIST_ITEM_DESELECTED, boost::bind (&ConfigDialog::server_selection_changed, this));
+ server_selection_changed ();
}
void
-ConfigDialog::language_changed (wxCommandEvent &)
+ConfigDialog::language_changed ()
{
switch (_language->GetSelection ()) {
case 0:
}
void
-ConfigDialog::tms_ip_changed (wxCommandEvent &)
+ConfigDialog::tms_ip_changed ()
{
Config::instance()->set_tms_ip (wx_to_std (_tms_ip->GetValue ()));
}
void
-ConfigDialog::tms_path_changed (wxCommandEvent &)
+ConfigDialog::tms_path_changed ()
{
Config::instance()->set_tms_path (wx_to_std (_tms_path->GetValue ()));
}
void
-ConfigDialog::tms_user_changed (wxCommandEvent &)
+ConfigDialog::tms_user_changed ()
{
Config::instance()->set_tms_user (wx_to_std (_tms_user->GetValue ()));
}
void
-ConfigDialog::tms_password_changed (wxCommandEvent &)
+ConfigDialog::tms_password_changed ()
{
Config::instance()->set_tms_password (wx_to_std (_tms_password->GetValue ()));
}
void
-ConfigDialog::num_local_encoding_threads_changed (wxCommandEvent &)
+ConfigDialog::num_local_encoding_threads_changed ()
{
Config::instance()->set_num_local_encoding_threads (_num_local_encoding_threads->GetValue ());
}
void
-ConfigDialog::default_directory_changed (wxCommandEvent &)
+ConfigDialog::default_directory_changed ()
{
Config::instance()->set_default_directory (wx_to_std (_default_directory->GetPath ()));
}
}
void
-ConfigDialog::add_server_clicked (wxCommandEvent &)
+ConfigDialog::add_server_clicked ()
{
ServerDialog* d = new ServerDialog (this, 0);
d->ShowModal ();
}
void
-ConfigDialog::edit_server_clicked (wxCommandEvent &)
+ConfigDialog::edit_server_clicked ()
{
int i = _servers->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (i == -1) {
}
void
-ConfigDialog::remove_server_clicked (wxCommandEvent &)
+ConfigDialog::remove_server_clicked ()
{
int i = _servers->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (i >= 0) {
}
void
-ConfigDialog::server_selection_changed (wxListEvent &)
+ConfigDialog::server_selection_changed ()
{
int const i = _servers->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
_edit_server->Enable (i >= 0);
}
void
-ConfigDialog::edit_default_dci_metadata_clicked (wxCommandEvent &)
+ConfigDialog::edit_default_dci_metadata_clicked ()
{
DCIMetadataDialog* d = new DCIMetadataDialog (this, Config::instance()->default_dci_metadata ());
d->ShowModal ();
}
void
-ConfigDialog::set_language_changed (wxCommandEvent& ev)
+ConfigDialog::set_language_changed ()
{
setup_language_sensitivity ();
if (_set_language->GetValue ()) {
- language_changed (ev);
+ language_changed ();
} else {
Config::instance()->unset_language ();
}
}
void
-ConfigDialog::default_still_length_changed (wxCommandEvent &)
+ConfigDialog::default_still_length_changed ()
{
Config::instance()->set_default_still_length (_default_still_length->GetValue ());
}
void
-ConfigDialog::default_container_changed (wxCommandEvent &)
+ConfigDialog::default_container_changed ()
{
vector<Ratio const *> ratio = Ratio::all ();
Config::instance()->set_default_container (ratio[_default_container->GetSelection()]);
}
void
-ConfigDialog::default_dcp_content_type_changed (wxCommandEvent &)
+ConfigDialog::default_dcp_content_type_changed ()
{
vector<DCPContentType const *> ct = DCPContentType::all ();
Config::instance()->set_default_dcp_content_type (ct[_default_dcp_content_type->GetSelection()]);
}
void
-ConfigDialog::issuer_changed (wxCommandEvent &)
+ConfigDialog::issuer_changed ()
{
libdcp::XMLMetadata m = Config::instance()->dcp_metadata ();
m.issuer = wx_to_std (_issuer->GetValue ());
}
void
-ConfigDialog::creator_changed (wxCommandEvent &)
+ConfigDialog::creator_changed ()
{
libdcp::XMLMetadata m = Config::instance()->dcp_metadata ();
m.creator = wx_to_std (_creator->GetValue ());
}
void
-ConfigDialog::default_j2k_bandwidth_changed (wxCommandEvent &)
+ConfigDialog::default_j2k_bandwidth_changed ()
{
Config::instance()->set_default_j2k_bandwidth (_default_j2k_bandwidth->GetValue() * 1e6);
}
ConfigDialog (wxWindow *);
private:
- void set_language_changed (wxCommandEvent &);
- void language_changed (wxCommandEvent &);
- void tms_ip_changed (wxCommandEvent &);
- void tms_path_changed (wxCommandEvent &);
- void tms_user_changed (wxCommandEvent &);
- void tms_password_changed (wxCommandEvent &);
- void num_local_encoding_threads_changed (wxCommandEvent &);
- void default_still_length_changed (wxCommandEvent &);
- void default_directory_changed (wxCommandEvent &);
- void edit_default_dci_metadata_clicked (wxCommandEvent &);
- void add_server_clicked (wxCommandEvent &);
- void edit_server_clicked (wxCommandEvent &);
- void remove_server_clicked (wxCommandEvent &);
- void server_selection_changed (wxListEvent &);
- void default_container_changed (wxCommandEvent &);
- void default_dcp_content_type_changed (wxCommandEvent &);
- void issuer_changed (wxCommandEvent &);
- void creator_changed (wxCommandEvent &);
- void default_j2k_bandwidth_changed (wxCommandEvent &);
+ void set_language_changed ();
+ void language_changed ();
+ void tms_ip_changed ();
+ void tms_path_changed ();
+ void tms_user_changed ();
+ void tms_password_changed ();
+ void num_local_encoding_threads_changed ();
+ void default_still_length_changed ();
+ void default_directory_changed ();
+ void edit_default_dci_metadata_clicked ();
+ void add_server_clicked ();
+ void edit_server_clicked ();
+ void remove_server_clicked ();
+ void server_selection_changed ();
+ void default_container_changed ();
+ void default_dcp_content_type_changed ();
+ void issuer_changed ();
+ void creator_changed ();
+ void default_j2k_bandwidth_changed ();
void add_server_to_control (ServerDescription *);
void setup_language_sensitivity ();
SetSizerAndFit (_sizer);
- _browse->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (DirPickerCtrl::browse_clicked), 0, this);
+ _browse->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&DirPickerCtrl::browse_clicked, this));
}
void
}
void
-DirPickerCtrl::browse_clicked (wxCommandEvent &)
+DirPickerCtrl::browse_clicked ()
{
wxDirDialog* d = new wxDirDialog (this);
if (d->ShowModal () == wxID_OK) {
void SetPath (wxString);
private:
- void browse_clicked (wxCommandEvent &);
+ void browse_clicked ();
wxWindow* _parent;
wxStaticText* _folder;
_back_button->SetMinSize (wxSize (32, -1));
_forward_button->SetMinSize (wxSize (32, -1));
- _panel->Connect (wxID_ANY, wxEVT_PAINT, wxPaintEventHandler (FilmViewer::paint_panel), 0, this);
- _panel->Connect (wxID_ANY, wxEVT_SIZE, wxSizeEventHandler (FilmViewer::panel_sized), 0, this);
- _slider->Connect (wxID_ANY, wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler (FilmViewer::slider_moved), 0, this);
- _slider->Connect (wxID_ANY, wxEVT_SCROLL_PAGEUP, wxScrollEventHandler (FilmViewer::slider_moved), 0, this);
- _slider->Connect (wxID_ANY, wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler (FilmViewer::slider_moved), 0, this);
- _play_button->Connect (wxID_ANY, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler (FilmViewer::play_clicked), 0, this);
- _timer.Connect (wxID_ANY, wxEVT_TIMER, wxTimerEventHandler (FilmViewer::timer), 0, this);
- _back_button->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmViewer::back_clicked), 0, this);
- _forward_button->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (FilmViewer::forward_clicked), 0, this);
+ _panel->Bind (wxEVT_PAINT, boost::bind (&FilmViewer::paint_panel, this));
+ _panel->Bind (wxEVT_SIZE, boost::bind (&FilmViewer::panel_sized, this, _1));
+ _slider->Bind (wxEVT_SCROLL_THUMBTRACK, boost::bind (&FilmViewer::slider_moved, this));
+ _slider->Bind (wxEVT_SCROLL_PAGEUP, boost::bind (&FilmViewer::slider_moved, this));
+ _slider->Bind (wxEVT_SCROLL_PAGEDOWN, boost::bind (&FilmViewer::slider_moved, this));
+ _play_button->Bind (wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, boost::bind (&FilmViewer::play_clicked, this));
+ _timer.Bind (wxEVT_TIMER, boost::bind (&FilmViewer::timer, this));
+ _back_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmViewer::back_clicked, this));
+ _forward_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmViewer::forward_clicked, this));
set_film (f);
}
void
-FilmViewer::timer (wxTimerEvent &)
+FilmViewer::timer ()
{
if (!_player) {
return;
void
-FilmViewer::paint_panel (wxPaintEvent &)
+FilmViewer::paint_panel ()
{
wxPaintDC dc (_panel);
void
-FilmViewer::slider_moved (wxScrollEvent &)
+FilmViewer::slider_moved ()
{
if (_film && _player) {
_player->seek (_slider->GetValue() * _film->length() / 4096, false);
}
void
-FilmViewer::play_clicked (wxCommandEvent &)
+FilmViewer::play_clicked ()
{
check_play_state ();
}
}
void
-FilmViewer::back_clicked (wxCommandEvent &)
+FilmViewer::back_clicked ()
{
if (!_player) {
return;
}
void
-FilmViewer::forward_clicked (wxCommandEvent &)
+FilmViewer::forward_clicked ()
{
if (!_player) {
return;
void set_film (boost::shared_ptr<Film>);
private:
- void paint_panel (wxPaintEvent &);
+ void paint_panel ();
void panel_sized (wxSizeEvent &);
- void slider_moved (wxScrollEvent &);
- void play_clicked (wxCommandEvent &);
- void timer (wxTimerEvent &);
+ void slider_moved ();
+ void play_clicked ();
+ void timer ();
void process_video (boost::shared_ptr<const Image>, Eyes, Time);
void calculate_sizes ();
void check_play_state ();
void fetch_current_frame_again ();
void fetch_next_frame ();
void active_jobs_changed (bool);
- void back_clicked (wxCommandEvent &);
- void forward_clicked (wxCommandEvent &);
+ void back_clicked ();
+ void forward_clicked ();
void player_changed (bool);
void set_position_text (Time);
bool const a = find (active.begin(), active.end(), *j) != active.end ();
b->SetValue (a);
_filters[*j] = b;
- b->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilterView::filter_toggled), 0, this);
+ b->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&FilterView::filter_toggled, this));
sizer->Add (b);
}
}
void
-FilterView::filter_toggled (wxCommandEvent &)
+FilterView::filter_toggled ()
{
ActiveChanged ();
}
boost::signals2::signal<void()> ActiveChanged;
private:
- void filter_toggled (wxCommandEvent &);
+ void filter_toggled ();
std::map<Filter const *, wxCheckBox *> _filters;
};
_threads = new wxSpinCtrl (this, wxID_ANY);
table->Add (_threads, 1, wxEXPAND);
- _host->Connect (wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (ServerDialog::host_changed), 0, this);
+ _host->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&ServerDialog::host_changed, this));
_threads->SetRange (0, 256);
- _threads->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (ServerDialog::threads_changed), 0, this);
+ _threads->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&ServerDialog::threads_changed, this));
_host->SetValue (std_to_wx (_server->host_name ()));
_threads->SetValue (_server->threads ());
}
void
-ServerDialog::host_changed (wxCommandEvent &)
+ServerDialog::host_changed ()
{
_server->set_host_name (wx_to_std (_host->GetValue ()));
}
void
-ServerDialog::threads_changed (wxCommandEvent &)
+ServerDialog::threads_changed ()
{
_server->set_threads (_threads->GetValue ());
}
ServerDescription* server () const;
private:
- void host_changed (wxCommandEvent &);
- void threads_changed (wxCommandEvent &);
+ void host_changed ();
+ void threads_changed ();
ServerDescription* _server;
wxTextCtrl* _host;
_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);
+ _hours->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&Timecode::changed, this));
+ _minutes->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&Timecode::changed, this));
+ _seconds->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&Timecode::changed, this));
+ _frames->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&Timecode::changed, this));
+ _set_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&Timecode::set_clicked, this));
_set_button->Enable (false);
}
void
-Timecode::changed (wxCommandEvent &)
+Timecode::changed ()
{
_set_button->Enable (true);
}
void
-Timecode::set_clicked (wxCommandEvent &)
+Timecode::set_clicked ()
{
Changed ();
_set_button->Enable (false);
boost::signals2::signal<void ()> Changed;
private:
- void changed (wxCommandEvent &);
- void set_clicked (wxCommandEvent &);
+ void changed ();
+ void set_clicked ();
wxTextCtrl* _hours;
wxTextCtrl* _minutes;
SetDoubleBuffered (true);
#endif
- Connect (wxID_ANY, wxEVT_PAINT, wxPaintEventHandler (Timeline::paint), 0, this);
- Connect (wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler (Timeline::left_down), 0, this);
- Connect (wxID_ANY, wxEVT_LEFT_UP, wxMouseEventHandler (Timeline::left_up), 0, this);
- Connect (wxID_ANY, wxEVT_RIGHT_DOWN, wxMouseEventHandler (Timeline::right_down), 0, this);
- Connect (wxID_ANY, wxEVT_MOTION, wxMouseEventHandler (Timeline::mouse_moved), 0, this);
- Connect (wxID_ANY, wxEVT_SIZE, wxSizeEventHandler (Timeline::resized), 0, this);
+ Bind (wxEVT_PAINT, boost::bind (&Timeline::paint, this));
+ Bind (wxEVT_LEFT_DOWN, boost::bind (&Timeline::left_down, this, _1));
+ Bind (wxEVT_LEFT_UP, boost::bind (&Timeline::left_up, this, _1));
+ Bind (wxEVT_RIGHT_DOWN, boost::bind (&Timeline::right_down, this, _1));
+ Bind (wxEVT_MOTION, boost::bind (&Timeline::mouse_moved, this, _1));
+ Bind (wxEVT_SIZE, boost::bind (&Timeline::resized, this));
playlist_changed ();
}
void
-Timeline::paint (wxPaintEvent &)
+Timeline::paint ()
{
wxPaintDC dc (this);
}
void
-Timeline::resized (wxSizeEvent &)
+Timeline::resized ()
{
setup_pixels_per_time_unit ();
}
void setup_pixels_per_time_unit ();
private:
- void paint (wxPaintEvent &);
+ void paint ();
void left_down (wxMouseEvent &);
void left_up (wxMouseEvent &);
void right_down (wxMouseEvent &);
void mouse_moved (wxMouseEvent &);
void playlist_changed ();
- void resized (wxSizeEvent &);
+ void resized ();
void assign_tracks ();
void set_start_from_event (wxMouseEvent &);
void clear_selection ();
ThreadedStaticText::ThreadedStaticText (wxWindow* parent, wxString initial, function<string ()> fn)
: wxStaticText (parent, wxID_ANY, initial)
{
- Connect (_update_event_id, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (ThreadedStaticText::thread_finished), 0, this);
+ Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&ThreadedStaticText::thread_finished, this, _1), _update_event_id);
_thread = new thread (bind (&ThreadedStaticText::run, this, fn));
}