From f0b3199b96b34778d011e8a67648672259b0054b Mon Sep 17 00:00:00 2001 From: perez Date: Mon, 2 Nov 2009 08:32:30 +0000 Subject: [PATCH] *** empty log message *** --- .../wxMaracasRenderImageManagementPanel.cpp | 168 ++++++++++++++++++ .../wxMaracasRenderImageManagementPanel.h | 41 +++++ 2 files changed, 209 insertions(+) create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRenderImageManagementPanel.cpp create mode 100644 lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRenderImageManagementPanel.h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRenderImageManagementPanel.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRenderImageManagementPanel.cpp new file mode 100644 index 0000000..6a2d5b3 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRenderImageManagementPanel.cpp @@ -0,0 +1,168 @@ +#include "wxMaracasRenderImageManagementPanel.h" + +#include + +/** +** Class constructor +**/ +wxMaracasRenderImageManagementPanel::wxMaracasRenderImageManagementPanel(wxWindow* parent) +: wxDialog(parent, -1, _T("Image Position Parameters"), wxDefaultPosition, wxDefaultSize, wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE) +{ + createControls(); +} + +/** +** +**/ +void wxMaracasRenderImageManagementPanel::createControls() +{ + wxFlexGridSizer* sizersliders = new wxFlexGridSizer(1); + + wxStaticText* tx = new wxStaticText(this, -1, wxString(_T(" Translate X "))); + sliderTranslateX = new wxSlider(this, -1, 0, -200, 200, wxDefaultPosition, wxDefaultSize, wxSL_LABELS); + Connect(sliderTranslateX->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&wxMaracasRenderImageManagementPanel::TranslateX); + sizersliders->Add(tx, wxFIXED_MINSIZE); + sizersliders->Add(sliderTranslateX,wxSizerFlags().Expand().Center()); + + wxStaticText* ty = new wxStaticText(this, -1, wxString(_T(" Translate Y "))); + sliderTranslateY = new wxSlider(this, -1, 0, -200, 200, wxDefaultPosition, wxDefaultSize, wxSL_LABELS); + Connect(sliderTranslateY->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&wxMaracasRenderImageManagementPanel::TranslateY); + sizersliders->Add(ty, wxFIXED_MINSIZE); + sizersliders->Add(sliderTranslateY,wxSizerFlags().Expand().Center()); + + wxStaticText* tz = new wxStaticText(this, -1, wxString(_T(" Translate Z "))); + sliderTranslateZ = new wxSlider(this, -1, 0, -200, 200, wxDefaultPosition, wxDefaultSize, wxSL_LABELS); + Connect(sliderTranslateZ->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&wxMaracasRenderImageManagementPanel::TranslateZ); + sizersliders->Add(tz, wxFIXED_MINSIZE); + sizersliders->Add(sliderTranslateZ,wxSizerFlags().Expand().Center()); + + wxStaticText* rx = new wxStaticText(this, -1, wxString(_T(" Rotate X "))); + sliderRotateX = new wxSlider(this, -1, 0, -360, 360, wxDefaultPosition, wxDefaultSize, wxSL_LABELS); + Connect(sliderRotateX->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&wxMaracasRenderImageManagementPanel::RotateX); + sizersliders->Add(rx, wxFIXED_MINSIZE); + sizersliders->Add(sliderRotateX,wxSizerFlags().Expand().Center()); + + wxStaticText* ry = new wxStaticText(this, -1, wxString(_T(" Rotate Y "))); + sliderRotateY = new wxSlider(this, -1, 0, -360, 360, wxDefaultPosition, wxDefaultSize, wxSL_LABELS); + Connect(sliderRotateY->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&wxMaracasRenderImageManagementPanel::RotateY); + sizersliders->Add(ry, wxFIXED_MINSIZE); + sizersliders->Add(sliderRotateY,wxSizerFlags().Expand().Center()); + + wxStaticText* rz = new wxStaticText(this, -1, wxString(_T(" Rotate Z "))); + sliderRotateZ = new wxSlider(this, -1, 0, -360, 360, wxDefaultPosition, wxDefaultSize, wxSL_LABELS); + Connect(sliderRotateZ->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&wxMaracasRenderImageManagementPanel::RotateZ); + sizersliders->Add(rz, wxFIXED_MINSIZE); + sizersliders->Add(sliderRotateZ,wxSizerFlags().Expand().Center()); + + wxStaticText* sx = new wxStaticText(this, -1, wxString(_T(" Scale X "))); + sliderScaleX = new wxSlider(this, -1, 0, -100, 100, wxDefaultPosition, wxDefaultSize, wxSL_LABELS); + Connect(sliderScaleX->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&wxMaracasRenderImageManagementPanel::ScaleX); + sizersliders->Add(sx, wxFIXED_MINSIZE); + sizersliders->Add(sliderScaleX,wxSizerFlags().Expand().Center()); + + wxStaticText* sy = new wxStaticText(this, -1, wxString(_T(" Scale Y "))); + sliderScaleY = new wxSlider(this, -1, 0, -100, 100, wxDefaultPosition, wxDefaultSize, wxSL_LABELS); + Connect(sliderScaleY->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&wxMaracasRenderImageManagementPanel::ScaleY); + sizersliders->Add(sy, wxFIXED_MINSIZE); + sizersliders->Add(sliderScaleY,wxSizerFlags().Expand().Center()); + + wxStaticText* sz = new wxStaticText(this, -1, wxString(_T(" Scale Z "))); + sliderScaleZ = new wxSlider(this, -1, 0, -100, 100, wxDefaultPosition, this->GetSize(), wxSL_LABELS); + Connect(sliderScaleZ->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&wxMaracasRenderImageManagementPanel::ScaleZ); + sizersliders->Add(sz, wxFIXED_MINSIZE); + sizersliders->Add(sliderScaleZ,wxSizerFlags().Expand().Center()); + + //ATENTION!! A SUPRIMER LES LIGNES ON BAS SI ELES NE SONT PAS NECESSAIRES!! + + /* + //wxString choices[2]; + //choices[0] = wxString(_T("On")); + //choices[1] = wxString(_T("Off")); + checkboxSA = new wxCheckBox(this,-1,wxString(_T("Surface Rendering A"))); + Connect(checkboxSA->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasRenderTabbedPanel::onCheckBoxSAChange); + checkboxSA->SetValue(true); + + sizercheck->Add(checkboxSA, wxFIXED_MINSIZE); + + //wxString choices[2]; + //choices[0] = wxString(_T("On")); + //choices[1] = wxString(_T("Off")); + checkboxSB = new wxCheckBox(this,-1,wxString(_T("Surface Rendering B"))); + Connect(checkboxSB->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasRenderTabbedPanel::onCheckBoxSBChange); + checkboxSB->SetValue(true); + + sizercheck->Add(checkboxSB, wxFIXED_MINSIZE); + + //wxString choices[2]; + //choices[0] = wxString(_T("On")); + //choices[1] = wxString(_T("Off")); + checkboxSC = new wxCheckBox(this,-1,wxString(_T("Surface Rendering C"))); + Connect(checkboxSC->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasRenderTabbedPanel::onCheckBoxSCChange); + checkboxSC->SetValue(true); + + sizercheck->Add(checkboxSC, wxFIXED_MINSIZE); + sizerrenderprop->Add(sizercheck, wxFIXED_MINSIZE);*/ + + this->SetSizer(sizersliders, true); + this->SetAutoLayout(true); +} + +/** +** Class destructor +**/ +wxMaracasRenderImageManagementPanel::~wxMaracasRenderImageManagementPanel(){ +} + +/** +** Transforms a volume by the given value for the X axis +**/ +void wxMaracasRenderImageManagementPanel::TranslateX(int val){ +} + +/** +** Transforms a volume by the given value for the Y axis +**/ +void wxMaracasRenderImageManagementPanel::TranslateY(int val){ +} + +/** +** Transforms a volume by the given value for the Z axis +**/ +void wxMaracasRenderImageManagementPanel::TranslateZ(int val){ +} + +/** +** Rotates a volume by the given degree for the X axis +**/ +void wxMaracasRenderImageManagementPanel::RotateX(int degr){ +} + +/** +** Rotates a volume by the given degree for the Y axis +**/ +void wxMaracasRenderImageManagementPanel::RotateY(int degr){ +} + +/** +** Rotates a volume by the given degree for the Z axis +**/ +void wxMaracasRenderImageManagementPanel::RotateZ(int degr){ +} + +/** +** Scales a volume by the given value for the X axis +**/ +void wxMaracasRenderImageManagementPanel::ScaleX(int val){ +} + +/** +** Scales a volume by the given value for the Y axis +**/ +void wxMaracasRenderImageManagementPanel::ScaleY(int val){ +} + +/** +** Scales a volume by the given value for the Z axis +**/ +void wxMaracasRenderImageManagementPanel::ScaleZ(int val){ +} \ No newline at end of file diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRenderImageManagementPanel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRenderImageManagementPanel.h new file mode 100644 index 0000000..0998105 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRenderImageManagementPanel.h @@ -0,0 +1,41 @@ +#ifndef wxMaracasRenderImageManagementPanel_H_ +#define wxMaracasRenderImageManagementPanel_H_ + + +#include + + +class wxMaracasRenderImageManagementPanel : public wxDialog +{ +public: + + wxMaracasRenderImageManagementPanel(wxWindow* parent); + ~wxMaracasRenderImageManagementPanel(); + + void createControls(); + void TranslateX(int val); + void TranslateY(int val); + void TranslateZ(int val); + void RotateX(int degr); + void RotateY(int degr); + void RotateZ(int degr); + void ScaleX(int val); + void ScaleY(int val); + void ScaleZ(int val); + +private: + + wxSlider* sliderTranslateX; + wxSlider* sliderTranslateY; + wxSlider* sliderTranslateZ; + + wxSlider* sliderRotateX; + wxSlider* sliderRotateY; + wxSlider* sliderRotateZ; + + wxSlider* sliderScaleX; + wxSlider* sliderScaleY; + wxSlider* sliderScaleZ; +}; + +#endif \ No newline at end of file -- 2.47.0