Fix CheckboxFileDialog
This commit is contained in:
parent
42a77316ba
commit
b6251dd85b
2 changed files with 8 additions and 1 deletions
|
@ -48,7 +48,7 @@ CheckboxFileDialog::CheckboxFileDialog(wxWindow *parent,
|
||||||
return panel;
|
return panel;
|
||||||
};
|
};
|
||||||
|
|
||||||
SetExtraControlCreator(*extra_control_creator.target<ExtraControlCreatorFunction>());
|
SetExtraControlCreator(control_creator_trampoline);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckboxFileDialog::get_checkbox_value() const
|
bool CheckboxFileDialog::get_checkbox_value() const
|
||||||
|
@ -56,6 +56,11 @@ bool CheckboxFileDialog::get_checkbox_value() const
|
||||||
return this->cbox != nullptr ? cbox->IsChecked() : false;
|
return this->cbox != nullptr ? cbox->IsChecked() : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxWindow* CheckboxFileDialog::control_creator_trampoline(wxWindow *parent)
|
||||||
|
{
|
||||||
|
auto *self = dynamic_cast<CheckboxFileDialog*>(parent);
|
||||||
|
return self != nullptr ? self->extra_control_creator(parent) : nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
WindowMetrics WindowMetrics::from_window(wxTopLevelWindow *window)
|
WindowMetrics WindowMetrics::from_window(wxTopLevelWindow *window)
|
||||||
|
|
|
@ -39,6 +39,8 @@ public:
|
||||||
private:
|
private:
|
||||||
std::function<wxWindow*(wxWindow*)> extra_control_creator;
|
std::function<wxWindow*(wxWindow*)> extra_control_creator;
|
||||||
wxCheckBox *cbox;
|
wxCheckBox *cbox;
|
||||||
|
|
||||||
|
static wxWindow* control_creator_trampoline(wxWindow *);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue