32 std::function<
void(
double,
bool )> aOnChange ) :
33 DIALOG_SHIM( aParent, wxID_ANY,
_(
"Convert to Outlines" ) ),
39 wxBoxSizer* mainSizer =
new wxBoxSizer( wxVERTICAL );
41 wxStaticText* thresholdLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Black / white threshold:" ) );
42 mainSizer->Add( thresholdLabel, 0, wxTOP | wxRIGHT | wxLEFT, 5 );
45 new wxSlider(
this, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS );
46 m_threshold->SetMinSize( wxSize( FromDIP( 360 ), -1 ) );
47 mainSizer->Add(
m_threshold, 0, wxEXPAND | wxRIGHT | wxLEFT, 5 );
49 m_invert =
new wxCheckBox(
this, wxID_ANY,
_(
"Invert Colors" ) );
50 mainSizer->Add(
m_invert, 0, wxALL, 5 );
52 if( !aLayerNames.IsEmpty() )
54 wxBoxSizer* layerSizer =
new wxBoxSizer( wxHORIZONTAL );
56 wxStaticText* layerLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Layer:" ) );
57 layerSizer->Add( layerLabel, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5 );
59 m_layer =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, aLayerNames );
60 m_layer->SetSelection( aSelectedLayer );
65 layerSizer->Add(
m_layer, 1, wxALIGN_CENTER_VERTICAL, 5 );
67 mainSizer->Add( layerSizer, 0, wxEXPAND | wxALL, 5 );
70 wxStdDialogButtonSizer* buttonSizer =
new wxStdDialogButtonSizer();
71 buttonSizer->AddButton(
new wxButton(
this, wxID_OK ) );
72 buttonSizer->AddButton(
new wxButton(
this, wxID_CANCEL ) );
73 buttonSizer->Realize();
75 mainSizer->Add( buttonSizer, 0, wxALL | wxEXPAND, 5 );
77 m_hash_key =
"DIALOG_CONVERT_IMAGE_TO_OUTLINES";
79 SetSizer( mainSizer );
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)