32 DIALOG_SHIM( aParent, wxID_ANY,
_(
"Export 3D View" ), wxDefaultPosition, wxDefaultSize,
33 wxDEFAULT_DIALOG_STYLE ),
36 m_width( aCfg && aCfg->width > 0 ? aCfg->width : aCanvasSize.GetWidth() ),
37 m_height( aCfg && aCfg->height > 0 ? aCfg->height : aCanvasSize.GetHeight() ),
47 wxBoxSizer* mainSizer =
new wxBoxSizer( wxVERTICAL );
50 wxStaticText* imageSizeHeader =
new wxStaticText(
this, wxID_ANY,
_(
"Image Size" ) );
51 imageSizeHeader->SetFont( imageSizeHeader->GetFont().Bold() );
52 mainSizer->Add( imageSizeHeader, 0, wxLEFT | wxTOP, 10 );
54 wxFlexGridSizer* sizeGrid =
new wxFlexGridSizer( 2, 4, 5, 5 );
55 sizeGrid->AddGrowableCol( 1 );
58 sizeGrid->Add(
new wxStaticText(
this, wxID_ANY,
_(
"Width:" ) ), 0, wxALIGN_CENTER_VERTICAL );
59 m_spinWidth =
new wxSpinCtrlDouble(
this, wxID_ANY );
67 sizeGrid->Add(
m_lockButton, 0, wxALIGN_CENTER | wxALL, 2 );
79 sizeGrid->Add(
new wxStaticText(
this, wxID_ANY,
_(
"Height:" ) ), 0, wxALIGN_CENTER_VERTICAL );
85 sizeGrid->AddSpacer( 0 );
86 sizeGrid->AddSpacer( 0 );
88 mainSizer->Add( sizeGrid, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 10 );
96 wxStaticLine* line =
new wxStaticLine(
this );
97 mainSizer->Add( line, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 10 );
100 wxStaticText* resolutionHeader =
new wxStaticText(
this, wxID_ANY,
_(
"Resolution" ) );
101 resolutionHeader->SetFont( resolutionHeader->GetFont().Bold() );
102 mainSizer->Add( resolutionHeader, 0, wxLEFT | wxTOP, 10 );
104 wxFlexGridSizer* resGrid =
new wxFlexGridSizer( 2, 3, 5, 5 );
105 resGrid->AddGrowableCol( 1 );
108 resGrid->Add(
new wxStaticText(
this, wxID_ANY,
_(
"X resolution:" ) ), 0, wxALIGN_CENTER_VERTICAL );
122 resGrid->Add(
new wxStaticText(
this, wxID_ANY,
_(
"Y resolution:" ) ), 0, wxALIGN_CENTER_VERTICAL );
127 resGrid->AddSpacer( 0 );
129 mainSizer->Add( resGrid, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 10 );
132 wxStdDialogButtonSizer* btnSizer = CreateStdDialogButtonSizer( wxOK | wxCANCEL );
133 mainSizer->Add( btnSizer, 0, wxEXPAND | wxALL, 10 );
135 SetSizerAndFit( mainSizer );
352 if( aFromUnit == aToUnit )
368 wxSize pixelSize =
GetPixelSize( width, height, xRes, yRes, aFromUnit );
382 m_spinWidth->SetValue( pixelSize.GetWidth() * 25.4 / xRes );
383 m_spinHeight->SetValue( pixelSize.GetHeight() * 25.4 / yRes );
386 m_spinWidth->SetValue( pixelSize.GetWidth() / xRes );
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)