36 DIALOG_SHIM( aParent, wxID_ANY,
_(
"Export 3D View" ), wxDefaultPosition, wxDefaultSize,
37 wxDEFAULT_DIALOG_STYLE ),
40 m_width( aCfg && aCfg->width > 0 ? aCfg->width : aCanvasSize.GetWidth() ),
41 m_height( aCfg && aCfg->height > 0 ? aCfg->height : aCanvasSize.GetHeight() ),
51 wxBoxSizer* mainSizer =
new wxBoxSizer( wxVERTICAL );
54 wxStaticText* imageSizeHeader =
new wxStaticText(
this, wxID_ANY,
_(
"Image Size" ) );
55 imageSizeHeader->SetFont( imageSizeHeader->GetFont().Bold() );
56 mainSizer->Add( imageSizeHeader, 0, wxLEFT | wxTOP, 10 );
58 wxFlexGridSizer* sizeGrid =
new wxFlexGridSizer( 2, 4, 5, 5 );
59 sizeGrid->AddGrowableCol( 1 );
62 sizeGrid->Add(
new wxStaticText(
this, wxID_ANY,
_(
"Width:" ) ), 0, wxALIGN_CENTER_VERTICAL );
63 m_spinWidth =
new wxSpinCtrlDouble(
this, wxID_ANY );
71 sizeGrid->Add(
m_lockButton, 0, wxALIGN_CENTER | wxALL, 2 );
83 sizeGrid->Add(
new wxStaticText(
this, wxID_ANY,
_(
"Height:" ) ), 0, wxALIGN_CENTER_VERTICAL );
89 sizeGrid->AddSpacer( 0 );
90 sizeGrid->AddSpacer( 0 );
92 mainSizer->Add( sizeGrid, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 10 );
100 wxStaticLine* line =
new wxStaticLine(
this );
101 mainSizer->Add( line, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 10 );
104 wxStaticText* resolutionHeader =
new wxStaticText(
this, wxID_ANY,
_(
"Resolution" ) );
105 resolutionHeader->SetFont( resolutionHeader->GetFont().Bold() );
106 mainSizer->Add( resolutionHeader, 0, wxLEFT | wxTOP, 10 );
108 wxFlexGridSizer* resGrid =
new wxFlexGridSizer( 2, 3, 5, 5 );
109 resGrid->AddGrowableCol( 1 );
112 resGrid->Add(
new wxStaticText(
this, wxID_ANY,
_(
"X resolution:" ) ), 0, wxALIGN_CENTER_VERTICAL );
126 resGrid->Add(
new wxStaticText(
this, wxID_ANY,
_(
"Y resolution:" ) ), 0, wxALIGN_CENTER_VERTICAL );
131 resGrid->AddSpacer( 0 );
133 mainSizer->Add( resGrid, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 10 );
136 wxStdDialogButtonSizer* btnSizer = CreateStdDialogButtonSizer( wxOK | wxCANCEL );
137 mainSizer->Add( btnSizer, 0, wxEXPAND | wxALL, 10 );
139 SetSizerAndFit( mainSizer );
356 if( aFromUnit == aToUnit )
372 wxSize pixelSize =
GetPixelSize( width, height, xRes, yRes, aFromUnit );
386 m_spinWidth->SetValue( pixelSize.GetWidth() * 25.4 / xRes );
387 m_spinHeight->SetValue( pixelSize.GetHeight() * 25.4 / yRes );
390 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)