From: <da...@us...> - 2008-01-31 17:57:08
|
Revision: 2747 http://hugin.svn.sourceforge.net/hugin/?rev=2747&view=rev Author: dangelo Date: 2008-01-31 09:57:05 -0800 (Thu, 31 Jan 2008) Log Message: ----------- replaced unknown class with custom XRC handler on Assistant, Lens and CPEditor panels. Modified Paths: -------------- hugin/trunk/src/hugin1/hugin/AssistantPanel.cpp hugin/trunk/src/hugin1/hugin/AssistantPanel.h hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp hugin/trunk/src/hugin1/hugin/CropPanel.cpp hugin/trunk/src/hugin1/hugin/ImagesList.cpp hugin/trunk/src/hugin1/hugin/ImagesList.h hugin/trunk/src/hugin1/hugin/ImagesPanel.cpp hugin/trunk/src/hugin1/hugin/LensPanel.cpp hugin/trunk/src/hugin1/hugin/LensPanel.h hugin/trunk/src/hugin1/hugin/MainFrame.cpp hugin/trunk/src/hugin1/hugin/OptimizePanel.cpp hugin/trunk/src/hugin1/hugin/huginApp.cpp hugin/trunk/src/hugin1/hugin/xrc/assistant_panel.xrc hugin/trunk/src/hugin1/hugin/xrc/crop_panel.xrc hugin/trunk/src/hugin1/hugin/xrc/images_panel.xrc hugin/trunk/src/hugin1/hugin/xrc/lens_panel.xrc hugin/trunk/src/hugin1/hugin/xrc/main_frame.xrc Modified: hugin/trunk/src/hugin1/hugin/AssistantPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/AssistantPanel.cpp 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/AssistantPanel.cpp 2008-01-31 17:57:05 UTC (rev 2747) @@ -117,7 +117,6 @@ { DEBUG_TRACE(""); m_pano = 0; - m_restoreLayoutOnResize = false; m_noImage = true; if (! wxPanel::Create(parent, id, pos, size, style, name)) { @@ -129,7 +128,14 @@ wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); topsizer->Add(panel, 1, wxEXPAND, 0); + SetSizer( topsizer ); + topsizer->SetSizeHints( this ); +#ifdef DEBUG + SetBackgroundColour(wxTheColourDatabase->Find(wxT("RED"))); + panel->SetBackgroundColour(wxTheColourDatabase->Find(wxT("BLUE"))); +#endif + m_imagesText = XRCCTRL(*this, "ass_load_images_text", wxStaticText); DEBUG_ASSERT(m_imagesText); @@ -177,8 +183,6 @@ m_degDigits = 2; - SetSizer( topsizer ); -// topsizer->SetSizeHints( this ); return true; } @@ -199,19 +203,12 @@ DEBUG_TRACE("dtor end"); } -void AssistantPanel::RestoreLayout() -{ - DEBUG_TRACE(""); - int winWidth, winHeight; - GetClientSize(&winWidth, &winHeight); - DEBUG_INFO( "window size: " << winWidth <<"x"<< winHeight); -} // We need to override the default handling of size events because the // sizers set the virtual size but not the actual size. We reverse // the standard handling and fit the child to the parent rather than // fitting the parent around the child - +/* void AssistantPanel::OnSize( wxSizeEvent & e ) { wxSize new_size = GetSize(); @@ -225,7 +222,7 @@ e.Skip(); } - +*/ void AssistantPanel::panoramaImagesChanged(PT::Panorama &pano, const PT::UIntSet & _imgNr) { Modified: hugin/trunk/src/hugin1/hugin/AssistantPanel.h =================================================================== --- hugin/trunk/src/hugin1/hugin/AssistantPanel.h 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/AssistantPanel.h 2008-01-31 17:57:05 UTC (rev 2747) @@ -44,15 +44,6 @@ virtual ~AssistantPanel(void) ; - /** restore layout after hugin start */ - void RestoreLayout(); - - /// hack to restore the layout on next resize - void RestoreLayoutOnNextResize() - { - m_restoreLayoutOnResize = true; - } - /** this is called whenever the panorama has changed. * * This function must now update all the gui representations @@ -72,7 +63,7 @@ private: // a window event - void OnSize(wxSizeEvent & e); + //void OnSize(wxSizeEvent & e); /** the model */ Panorama * m_pano; @@ -102,8 +93,6 @@ int m_degDigits; - bool m_restoreLayoutOnResize; - bool m_noImage; DECLARE_EVENT_TABLE() Modified: hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/CPEditorPanel.cpp 2008-01-31 17:57:05 UTC (rev 2747) @@ -120,6 +120,7 @@ m_pano = 0; } + bool CPEditorPanel::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, @@ -300,7 +301,7 @@ OnZoom(dummy); SetSizer( topsizer ); - topsizer->SetSizeHints( this ); +// topsizer->SetSizeHints( this ); return true; } Modified: hugin/trunk/src/hugin1/hugin/CropPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/CropPanel.cpp 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/CropPanel.cpp 2008-01-31 17:57:05 UTC (rev 2747) @@ -74,12 +74,16 @@ wxXmlResource::Get()->LoadPanel (this, wxT("crop_panel")); + m_imagesList = XRCCTRL(*this, "crop_list_unknown", ImagesListCrop); + m_imagesList->Init(pano); + + /* m_imagesList = new ImagesListCrop (parent, pano); wxXmlResource::Get()->AttachUnknownControl ( wxT("crop_list_unknown"), m_imagesList ); + */ - m_Canvas = new CenterCanvas (this,this); wxXmlResource::Get()->AttachUnknownControl ( wxT("crop_edit_unknown"), @@ -389,7 +393,6 @@ wxMemoryDC memDC; m_display_img.Create(m_scaled_img.GetWidth(), m_scaled_img.GetHeight()); memDC.SelectObject (m_display_img); - memDC.BeginDrawing (); // copy resized image into buffer memDC.DrawBitmap(m_scaled_img,0,0,false); @@ -441,8 +444,6 @@ } } // memDC.SelectObject(wxNullBitmap); - memDC.EndDrawing (); - } void CenterCanvas::ChangeMode(PointState m) Modified: hugin/trunk/src/hugin1/hugin/ImagesList.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/ImagesList.cpp 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/ImagesList.cpp 2008-01-31 17:57:05 UTC (rev 2747) @@ -48,12 +48,24 @@ END_EVENT_TABLE() // Define a constructor for the Images Panel -ImagesList::ImagesList( wxWindow* parent, Panorama* pano) - : wxListCtrl(parent, -1, wxDefaultPosition, wxDefaultSize, wxLC_REPORT), //|wxSUNKEN_BORDER|wxLC_HRULES), -pano(*pano) +ImagesList::ImagesList() { - DEBUG_TRACE(""); + pano = 0; +} +bool ImagesList::Create(wxWindow* parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + DEBUG_TRACE("List"); + if (! wxListCtrl::Create(parent, id, pos, size, wxLC_REPORT | style) ) { + return false; + } + + DEBUG_TRACE("List, adding columns"); + m_notifyParents = true; InsertColumn( 0, _("#"), wxLIST_FORMAT_RIGHT, 35 ); @@ -65,7 +77,6 @@ //m_smallIcons = new wxImageList(m_iconHeight, m_iconHeight); //AssignImageList(m_smallIcons,wxIMAGE_LIST_SMALL); - pano->addObserver(this); DEBUG_TRACE(""); m_degDigits = wxConfigBase::Get()->Read(wxT("/General/DegreeFractionalDigits"),1); m_pixelDigits = wxConfigBase::Get()->Read(wxT("/General/PixelFractionalDigits"),1); @@ -73,12 +84,19 @@ #ifdef __WXMAC__ SetDropTarget(new PanoDropTarget(*pano, true)); #endif + return true; } +void ImagesList::Init(PT::Panorama * panorama) +{ + pano = panorama; + pano->addObserver(this); +} + ImagesList::~ImagesList(void) { DEBUG_TRACE(""); - pano.removeObserver(this); + pano->removeObserver(this); } void ImagesList::panoramaImagesChanged(Panorama &pano, const UIntSet &changed) @@ -150,7 +168,7 @@ void ImagesList::createIcon(wxBitmap & bitmap, unsigned int imgNr, unsigned int size) { ImageCache::Entry * cacheEntry = ImageCache::getInstance().getSmallImage( - pano.getImage(imgNr).getFilename()); + pano->getImage(imgNr).getFilename()); if (! cacheEntry) { return; } @@ -280,11 +298,36 @@ } } -ImagesListImage::ImagesListImage(wxWindow * parent, Panorama * pano) - : ImagesList(parent, pano) +void ImagesList::UpdateItem(unsigned int imgNr) { + +} + +IMPLEMENT_DYNAMIC_CLASS(ImagesList, wxListCtrl) + +// ============================================================================ +// ============================================================================ +// Image + +ImagesListImage::ImagesListImage() +{ + +} + + +bool ImagesListImage::Create(wxWindow* parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + DEBUG_TRACE("ListImage"); + if (! ImagesList::Create(parent, id, pos, size, style, name)) { + return false; + } + m_configClassName = wxT("/ImagesListImage"); - + InsertColumn( 1, _("Filename"), wxLIST_FORMAT_LEFT, 200 ); InsertColumn( 2, _("width"), wxLIST_FORMAT_RIGHT, 60 ); InsertColumn( 3, _("height"), wxLIST_FORMAT_RIGHT, 60 ); @@ -302,15 +345,21 @@ if(width != -1) SetColumnWidth(j, width); } + return true; } +void ImagesListImage::Init(PT::Panorama * panorama) +{ + ImagesList::Init(panorama); +} + void ImagesListImage::UpdateItem(unsigned int imgNr) { DEBUG_DEBUG("update image list item " << imgNr); DEBUG_ASSERT((int)imgNr < GetItemCount()); - const PanoImage & img = pano.getImage(imgNr); + const PanoImage & img = pano->getImage(imgNr); wxFileName fn(wxString (img.getFilename().c_str(), *wxConvCurrent)); - VariableMap var = pano.getImageVariables(imgNr); + VariableMap var = pano->getImageVariables(imgNr); // wxLogMessage(wxString::Format(_("updating image list item %d, filename %s"),imgNr, fn.GetFullName())); @@ -321,15 +370,15 @@ SetItem(imgNr, 5, doubleTowxString( map_get(var,"p").getValue(),m_degDigits)); SetItem(imgNr, 6, doubleTowxString( map_get(var,"r").getValue(),m_degDigits)); wxChar flags[] = wxT("--"); - if (pano.getOptions().optimizeReferenceImage == imgNr) { + if (pano->getOptions().optimizeReferenceImage == imgNr) { flags[0]='A'; } - if (pano.getOptions().colorReferenceImage == imgNr) { + if (pano->getOptions().colorReferenceImage == imgNr) { flags[1]='C'; } SetItem(imgNr,7, wxString(flags, *wxConvCurrent)); // urgh.. slow.. stupid.. traverse control point list for each image.. - const CPVector & cps = pano.getCtrlPoints(); + const CPVector & cps = pano->getCtrlPoints(); int nCP=0; for (CPVector::const_iterator it = cps.begin(); it != cps.end(); ++it) { if ((*it).image1Nr == imgNr || (*it).image2Nr == imgNr) { @@ -339,9 +388,60 @@ SetItem(imgNr, 8, wxString::Format(wxT("%d"), nCP)); } -ImagesListLens::ImagesListLens(wxWindow * parent, Panorama * pano) - : ImagesList(parent, pano) +IMPLEMENT_DYNAMIC_CLASS(ImagesListImage, ImagesList) + +ImagesListImageXmlHandler::ImagesListImageXmlHandler() + : wxXmlResourceHandler() { + AddWindowStyles(); +} + +wxObject *ImagesListImageXmlHandler::DoCreateResource() +{ + XRC_MAKE_INSTANCE(cp, ImagesListImage) + + cp->Create(m_parentAsWindow, + GetID(), + GetPosition(), GetSize(), + GetStyle(wxT("style")), + GetName()); + + SetupWindow( cp); + + return cp; +} + +bool ImagesListImageXmlHandler::CanHandle(wxXmlNode *node) +{ + return IsOfClass(node, wxT("ImagesListImage")); +} + +IMPLEMENT_DYNAMIC_CLASS(ImagesListImageXmlHandler, wxXmlResourceHandler) + + +// ============================================================================ +// ============================================================================ +// Lens + + +ImagesListLens::ImagesListLens() +{ + +} + + +bool ImagesListLens::Create(wxWindow* parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + DEBUG_TRACE("ListLens"); + if (! ImagesList::Create(parent, id, pos, size, style, name)) { + return false; + } + DEBUG_TRACE("ListLens: Add list headers"); + m_configClassName = wxT("/ImagesListLens"); InsertColumn( 1, _("Filename"), wxLIST_FORMAT_LEFT, 200 ); @@ -364,17 +464,23 @@ if(width != -1) SetColumnWidth(j, width); } + return true; } +void ImagesListLens::Init(PT::Panorama * panorama) +{ + ImagesList::Init(panorama); +} + void ImagesListLens::UpdateItem(unsigned int imgNr) { - const PanoImage & img = pano.getImage(imgNr); + const PanoImage & img = pano->getImage(imgNr); wxFileName fn(wxString (img.getFilename().c_str(), *wxConvCurrent)); SetItem(imgNr, 1, fn.GetFullName() ); SetItem(imgNr, 2, wxString::Format(wxT("%d"),img.getLensNr())); - VariableMap var = pano.getImageVariables(imgNr); - const Lens & lens = pano.getLens( img.getLensNr()); + VariableMap var = pano->getImageVariables(imgNr); + const Lens & lens = pano->getLens( img.getLensNr()); wxString ps; switch ( (int) lens.getProjection() ) { case Lens::RECTILINEAR: ps << _("Normal (rectilinear)"); break; @@ -394,9 +500,59 @@ SetItem(imgNr, 11, doubleTowxString( map_get(var, "t").getValue(),m_distDigits)); } -ImagesListCrop::ImagesListCrop(wxWindow * parent, Panorama * pano) - : ImagesList(parent, pano) + +IMPLEMENT_DYNAMIC_CLASS(ImagesListLens, ImagesList) + +ImagesListLensXmlHandler::ImagesListLensXmlHandler() + : wxXmlResourceHandler() { + AddWindowStyles(); +} + +wxObject *ImagesListLensXmlHandler::DoCreateResource() +{ + XRC_MAKE_INSTANCE(cp, ImagesListLens) + + cp->Create(m_parentAsWindow, + GetID(), + GetPosition(), GetSize(), + GetStyle(wxT("style")), + GetName()); + + SetupWindow( cp); + + return cp; +} + +bool ImagesListLensXmlHandler::CanHandle(wxXmlNode *node) +{ + return IsOfClass(node, wxT("ImagesListLens")); +} + +IMPLEMENT_DYNAMIC_CLASS(ImagesListLensXmlHandler, wxXmlResourceHandler) + + +// ============================================================================ +// ============================================================================ +// Crop + + +ImagesListCrop::ImagesListCrop() +{ + +} + + +bool ImagesListCrop::Create(wxWindow* parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + DEBUG_TRACE(""); + if (!ImagesList::Create(parent, id, pos, size, style, name)) + return false; + m_configClassName = wxT("/ImagesListCrop"); InsertColumn(1, _("Crop"), wxLIST_FORMAT_RIGHT,120); @@ -409,11 +565,18 @@ if(width != -1) SetColumnWidth(j, width); } + return true; } + +void ImagesListCrop::Init(PT::Panorama * panorama) +{ + ImagesList::Init(panorama); +} + void ImagesListCrop::UpdateItem(unsigned int imgNr) { - const PanoImage & img = pano.getImage(imgNr); + const PanoImage & img = pano->getImage(imgNr); wxFileName fn(wxString (img.getFilename().c_str(), *wxConvCurrent)); wxString cropstr(wxT("-")); @@ -423,3 +586,34 @@ } SetItem(imgNr, 1, cropstr); } + +IMPLEMENT_DYNAMIC_CLASS(ImagesListCrop, ImagesList) + +ImagesListCropXmlHandler::ImagesListCropXmlHandler() + : wxXmlResourceHandler() +{ + AddWindowStyles(); +} + +wxObject *ImagesListCropXmlHandler::DoCreateResource() +{ + XRC_MAKE_INSTANCE(cp, ImagesListCrop) + + cp->Create(m_parentAsWindow, + GetID(), + GetPosition(), GetSize(), + GetStyle(wxT("style")), + GetName()); + + SetupWindow( cp); + + return cp; +} + +bool ImagesListCropXmlHandler::CanHandle(wxXmlNode *node) +{ + return IsOfClass(node, wxT("ImagesListCrop")); +} + +IMPLEMENT_DYNAMIC_CLASS(ImagesListCropXmlHandler, wxXmlResourceHandler) + Modified: hugin/trunk/src/hugin1/hugin/ImagesList.h =================================================================== --- hugin/trunk/src/hugin1/hugin/ImagesList.h 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/ImagesList.h 2008-01-31 17:57:05 UTC (rev 2747) @@ -56,8 +56,13 @@ */ class ImagesList: public wxListCtrl, public PT::PanoramaObserver { - public: - ImagesList( wxWindow * win, Panorama * pano); +public: + ImagesList(); + + bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel")); + + void Init(PT::Panorama * pano); + virtual ~ImagesList(void) ; /** receive the update signal and update display accordingly @@ -75,7 +80,7 @@ /** update the information in an already existing list item */ - virtual void UpdateItem(unsigned int imgNr) = 0; + virtual void UpdateItem(unsigned int imgNr); /** remove an existing list item * @@ -95,7 +100,7 @@ protected: // the model - Panorama &pano; + Panorama * pano; // update selected map void OnItemSelected ( wxListEvent & e ); @@ -121,8 +126,8 @@ //for saving column width wxString m_configClassName; - DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(ImagesListImage) }; /** specialized to display image data (width, position) @@ -130,28 +135,59 @@ class ImagesListImage : public ImagesList { public: - ImagesListImage(wxWindow * parent, Panorama * pano); + ImagesListImage(); + bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel")); + + void Init(PT::Panorama * pano); + /** update the information in an already existing list item */ virtual void UpdateItem(unsigned int imgNr); + DECLARE_DYNAMIC_CLASS(ImagesListImage) +}; +/** xrc handler */ +class ImagesListImageXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(ImagesListImageXmlHandler) + + public: + ImagesListImageXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); }; - /** specialized to display the lens aspect of images */ class ImagesListLens : public ImagesList { public: + ImagesListLens(); + + bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel")); + + void Init(PT::Panorama * pano); + ImagesListLens(wxWindow * parent, Panorama * pano); /** update the information in an already existing list item */ virtual void UpdateItem(unsigned int imgNr); + DECLARE_DYNAMIC_CLASS(ImagesListLens) +}; +/** xrc handler */ +class ImagesListLensXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(ImagesListLensXmlHandler) + + public: + ImagesListLensXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); }; /** specialized to display the crop aspect of images @@ -159,13 +195,28 @@ class ImagesListCrop : public ImagesList { public: - ImagesListCrop(wxWindow * parent, Panorama * pano); + ImagesListCrop(); + bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel")); + + void Init(PT::Panorama * pano); + /** update the information in an already existing list item */ virtual void UpdateItem(unsigned int imgNr); + DECLARE_DYNAMIC_CLASS(ImagesListCrop) +}; +/** xrc handler */ +class ImagesListCropXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(ImagesListCropXmlHandler) + + public: + ImagesListCropXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); }; Modified: hugin/trunk/src/hugin1/hugin/ImagesPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/ImagesPanel.cpp 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/ImagesPanel.cpp 2008-01-31 17:57:05 UTC (rev 2747) @@ -89,10 +89,15 @@ m_showImgNr = INT_MAX; wxXmlResource::Get()->LoadPanel (this, wxT("images_panel")); + images_list = XRCCTRL(*this, "images_list_unknown", ImagesListImage); + assert(images_list); + images_list->Init(pano); + /* images_list = new ImagesListImage (parent, pano); wxXmlResource::Get()->AttachUnknownControl ( wxT("images_list_unknown"), images_list ); + */ m_optAnchorButton = XRCCTRL(*this, "images_opt_anchor_button", wxButton); DEBUG_ASSERT(m_optAnchorButton); Modified: hugin/trunk/src/hugin1/hugin/LensPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/LensPanel.cpp 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/LensPanel.cpp 2008-01-31 17:57:05 UTC (rev 2747) @@ -69,7 +69,6 @@ //------------------------------------------------------------------------------ BEGIN_EVENT_TABLE(LensPanel, wxWindow) //wxEvtHandler) - EVT_SIZE ( LensPanel::OnSize ) EVT_LIST_ITEM_SELECTED( XRCID("lenses_list_unknown"), LensPanel::ListSelectionChanged ) EVT_LIST_ITEM_DESELECTED( XRCID("lenses_list_unknown"), @@ -122,22 +121,46 @@ END_EVENT_TABLE() // Define a constructor for the Lenses Panel +LensPanel::LensPanel() +{ + pano = 0, + m_restoreLayoutOnResize = false; +} -LensPanel::LensPanel(wxWindow *parent, const wxPoint& pos, const wxSize& size, Panorama* pano) - : wxPanel (parent, -1, wxDefaultPosition, wxDefaultSize, wxEXPAND|wxGROW), - pano(*pano), m_restoreLayoutOnResize(false) + +bool LensPanel::Create(wxWindow* parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) { - DEBUG_TRACE("ctor"); - pano->addObserver(this); + DEBUG_TRACE(" Create called *************"); + if (! wxPanel::Create(parent, id, pos, size, style, name) ) { + return false; + } - // This controls must called by xrc handler and after it we play with it. - wxXmlResource::Get()->LoadPanel (this, wxT("lens_panel")); + DEBUG_TRACE(""); + wxXmlResource::Get()->LoadPanel(this, wxT("lens_panel")); + wxPanel * panel = XRCCTRL(*this, "lens_panel", wxPanel); + wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); + topsizer->Add(panel, 1, wxEXPAND, 0); + SetSizer( topsizer ); + topsizer->SetSizeHints( panel ); + +#ifdef DEBUG + SetBackgroundColour(wxTheColourDatabase->Find(wxT("RED"))); + panel->SetBackgroundColour(wxTheColourDatabase->Find(wxT("BLUE"))); +#endif + // The following control creates itself. We dont care about xrc loading. + images_list = XRCCTRL(*this, "lenses_list_unknown", ImagesListLens); + /* images_list = new ImagesListLens (parent, pano); wxXmlResource::Get()->AttachUnknownControl ( wxT("lenses_list_unknown"), images_list ); + */ // images_list->AssignImageList(img_icons, wxIMAGE_LIST_SMALL ); // converts KILL_FOCUS events to usable TEXT_ENTER events @@ -172,31 +195,32 @@ m_lens_ctrls = XRCCTRL(*this, "lens_control_panel", wxScrolledWindow); DEBUG_ASSERT(m_lens_ctrls); - m_lens_splitter = XRCCTRL(*this, "lens_panel_splitter", wxSplitterWindow); - DEBUG_ASSERT(m_lens_splitter); - m_lens_ctrls->FitInside(); - m_lens_ctrls->SetScrollRate(10, 10); +// m_lens_ctrls->FitInside(); +// m_lens_ctrls->SetScrollRate(10, 10); // resize only the images list, and keep the control parameters at the same size - m_lens_splitter->SetSashGravity(1); - m_lens_splitter->SetMinimumPaneSize(200); // dummy to disable controls wxListEvent ev; ListSelectionChanged(ev); + DEBUG_TRACE("");; + + return true; } +void LensPanel::Init(PT::Panorama * panorama) +{ + pano = panorama; + images_list->Init(pano); + pano->addObserver(this); +} + LensPanel::~LensPanel(void) { DEBUG_TRACE("dtor"); - int sashPos; - sashPos = m_lens_splitter->GetSashPosition(); - DEBUG_INFO("Lens panel sash pos: " << sashPos); - wxConfigBase::Get()->Write(wxT("/LensFrame/sashPos"), sashPos); - XRCCTRL(*this, "lens_val_v", wxTextCtrl)->PopEventHandler(true); XRCCTRL(*this, "lens_val_focalLength", wxTextCtrl)->PopEventHandler(true); XRCCTRL(*this, "lens_val_flFactor", wxTextCtrl)->PopEventHandler(true); @@ -222,42 +246,16 @@ XRCCTRL(*this, "lens_val_Rd", wxTextCtrl)->PopEventHandler(true); XRCCTRL(*this, "lens_val_Re", wxTextCtrl)->PopEventHandler(true); - pano.removeObserver(this); + pano->removeObserver(this); DEBUG_TRACE("dtor about to finish"); } -void LensPanel::RestoreLayout() -{ - DEBUG_TRACE(""); - int winWidth, winHeight; - GetClientSize(&winWidth, &winHeight); - int sP = wxConfigBase::Get()->Read(wxT("/LensFrame/sashPos"),winHeight/2); - m_lens_splitter->SetSashPosition(sP); - DEBUG_INFO( "lens panel: " << winWidth <<"x"<< winHeight << " sash pos: " << sP); -} - // We need to override the default handling of size events because the // sizers set the virtual size but not the actual size. We reverse // the standard handling and fit the child to the parent rather than // fitting the parent around the child -void LensPanel::OnSize( wxSizeEvent & e ) -{ - int winWidth, winHeight; - GetClientSize(&winWidth, &winHeight); - XRCCTRL(*this, "lens_panel", wxPanel)->SetSize (winWidth, winHeight); - DEBUG_INFO( "lens panel: " << winWidth <<"x"<< winHeight ); - m_lens_splitter->SetSize( winWidth, winHeight ); - m_lens_splitter->GetWindow2()->GetSize(&winWidth, &winHeight); - DEBUG_INFO( "lens controls: " << winWidth <<"x"<< winHeight ); - m_lens_ctrls->SetSize(winWidth, winHeight); - if (m_restoreLayoutOnResize) { - m_restoreLayoutOnResize = false; - RestoreLayout(); - } -} - void LensPanel::UpdateLensDisplay () { DEBUG_TRACE(""); @@ -277,8 +275,8 @@ return; } - const Lens & lens = pano.getLens(*(m_selectedLenses.begin())); - const VariableMap & imgvars = pano.getImageVariables(*m_selectedImages.begin()); + const Lens & lens = pano->getLens(*(m_selectedLenses.begin())); + const VariableMap & imgvars = pano->getImageVariables(*m_selectedImages.begin()); // update gui int guiPF = XRCCTRL(*this, "lens_val_projectionFormat", @@ -291,7 +289,7 @@ // set response type XRCCTRL(*this, "lens_val_responseType", wxChoice)->SetSelection( - pano.getImage(*m_selectedImages.begin()).getOptions().responseType); + pano->getImage(*m_selectedImages.begin()).getOptions().responseType); for (const char** varname = m_varNames; *varname != 0; ++varname) { // update parameters @@ -356,7 +354,7 @@ } -// Here we change the pano. +// Here we change the pano-> void LensPanel::LensTypeChanged ( wxCommandEvent & e ) { DEBUG_TRACE (""); @@ -366,14 +364,14 @@ { // get lens from pano unsigned int lNr = *it; - Lens lens = pano.getLens(lNr); + Lens lens = pano->getLens(lNr); // uses enum Lens::LensProjectionFormat from PanoramaMemento.h int var = XRCCTRL(*this, "lens_val_projectionFormat", wxChoice)->GetSelection(); if (lens.getProjection() != (Lens::LensProjectionFormat) var) { lens.setProjection((Lens::LensProjectionFormat) (var)); GlobalCmdHist::getInstance().addCommand( - new PT::ChangeLensCmd( pano, *it, lens ) + new PT::ChangeLensCmd( *pano, *it, lens ) ); DEBUG_INFO ("lens " << *it << " Lenstype " << var); } @@ -387,16 +385,16 @@ if (m_selectedLenses.size() > 0) { std::vector<ImageOptions> opts; UIntSet imgs; - for (size_t i = 0 ; i < pano.getNrOfImages(); i++) { - if ( set_contains(m_selectedLenses,pano.getImage(i).getLensNr()) ) { + for (size_t i = 0 ; i < pano->getNrOfImages(); i++) { + if ( set_contains(m_selectedLenses,pano->getImage(i).getLensNr()) ) { imgs.insert(i); - ImageOptions opt = pano.getImage(i).getOptions(); + ImageOptions opt = pano->getImage(i).getOptions(); opt.responseType = e.GetSelection(); opts.push_back(opt); } } GlobalCmdHist::getInstance().addCommand( - new PT::UpdateImageOptionsCmd( pano, opts, imgs ) + new PT::UpdateImageOptionsCmd( *pano, opts, imgs ) ); } } @@ -418,14 +416,14 @@ it != m_selectedImages.end(); ++it) { - vars.push_back(pano.getImageVariables(*it)); - Lens l = pano.getLens(pano.getImage(*it).getLensNr()); + vars.push_back(pano->getImageVariables(*it)); + Lens l = pano->getLens(pano->getImage(*it).getLensNr()); l.setFocalLength(val); map_get(vars.back(),"v").setValue( map_get(l.variables,"v").getValue() ); } GlobalCmdHist::getInstance().addCommand( - new PT::UpdateImagesVariablesCmd(pano, m_selectedImages, vars) + new PT::UpdateImagesVariablesCmd(*pano, m_selectedImages, vars) ); } } @@ -447,20 +445,20 @@ it != m_selectedImages.end(); ++it) { - lensNrs.insert(pano.getImage(*it).getLensNr()); + lensNrs.insert(pano->getImage(*it).getLensNr()); } vector<Lens> lenses; for (UIntSet::const_iterator it=lensNrs.begin(); it != lensNrs.end(); ++it) { - lenses.push_back(pano.getLens(*it)); + lenses.push_back(pano->getLens(*it)); double fl = lenses.back().getFocalLength(); lenses.back().setCropFactor(val); lenses.back().setFocalLength(fl); } GlobalCmdHist::getInstance().addCommand( - new PT::ChangeLensesCmd( pano, lensNrs, lenses) + new PT::ChangeLensesCmd( *pano, lensNrs, lenses) ); } } @@ -529,7 +527,7 @@ } Variable var(varname,val); GlobalCmdHist::getInstance().addCommand( - new PT::SetVariableCmd(pano, m_selectedImages, var) + new PT::SetVariableCmd(*pano, m_selectedImages, var) ); } } @@ -604,14 +602,14 @@ unsigned int lensNr = *it; LensVarMap lmap; for (unsigned i=0; i < varnames.size(); i++) { - LensVariable lv = const_map_get(pano.getLens(lensNr).variables, varnames[i]); + LensVariable lv = const_map_get(pano->getLens(lensNr).variables, varnames[i]); lv.setLinked(inherit); lmap.insert(make_pair(lv.getName(),lv)); } lmaps.push_back(lmap); } GlobalCmdHist::getInstance().addCommand( - new PT::SetLensesVariableCmd(pano, m_selectedLenses, lmaps) + new PT::SetLensesVariableCmd(*pano, m_selectedLenses, lmaps) ); } } @@ -633,7 +631,7 @@ for (UIntSet::iterator it = m_selectedImages.begin(); it != m_selectedImages.end(); it++) { - m_selectedLenses.insert(pano.getImage(*it).getLensNr()); + m_selectedLenses.insert(pano->getImage(*it).getLensNr()); } DEBUG_DEBUG("selected Images: " << m_selectedImages.size()); if (m_selectedImages.size() == 0) { @@ -797,7 +795,7 @@ { unsigned int imgNr = *it; // check file extension - wxFileName file(wxString(pano.getImage(imgNr).getFilename().c_str(), *wxConvCurrent)); + wxFileName file(wxString(pano->getImage(imgNr).getFilename().c_str(), *wxConvCurrent)); #ifndef HUGIN_USE_EXIV2 if (file.GetExt().CmpNoCase(wxT("jpg")) == 0 || file.GetExt().CmpNoCase(wxT("jpeg")) == 0 ) @@ -805,14 +803,14 @@ #endif double cropFactor = 0; double focalLength = 0; - SrcPanoImage srcImg = pano.getSrcImage(imgNr); + SrcPanoImage srcImg = pano->getSrcImage(imgNr); bool ok = initImageFromFile(srcImg, focalLength, cropFactor); if (! ok) { getLensDataFromUser(this, srcImg, focalLength, cropFactor); } - //initLensFromFile(pano.getImage(imgNr).getFilename().c_str(), c, lens, vars, imgopts, true); + //initLensFromFile(pano->getImage(imgNr).getFilename().c_str(), c, lens, vars, imgopts, true); GlobalCmdHist::getInstance().addCommand( - new PT::UpdateSrcImageCmd( pano, imgNr, srcImg) + new PT::UpdateSrcImageCmd( *pano, imgNr, srcImg) ); #ifndef HUGIN_USE_EXIV2 } else { @@ -833,9 +831,9 @@ DEBUG_TRACE("") if (m_selectedImages.size() == 1) { unsigned int imgNr = *(m_selectedImages.begin()); - unsigned int lensNr = pano.getImage(imgNr).getLensNr(); - const Lens & lens = pano.getLens(lensNr); - const VariableMap & vars = pano.getImageVariables(imgNr); + unsigned int lensNr = pano->getImage(imgNr).getLensNr(); + const Lens & lens = pano->getLens(lensNr); + const VariableMap & vars = pano->getImageVariables(imgNr); // get the variable map wxString fname; wxFileDialog dlg(this, @@ -873,7 +871,7 @@ varname++; } - ImageOptions imgopts = pano.getImage(imgNr).getOptions(); + ImageOptions imgopts = pano->getImage(imgNr).getOptions(); cfg.Write(wxT("Lens/vigCorrMode"), imgopts.m_vigCorrMode); cfg.Write(wxT("Lens/flatfield"), wxString(imgopts.m_flatfield.c_str(), *wxConvCurrent) ); @@ -886,7 +884,7 @@ cfg.Write(wxT("Lens/crop/bottom"), imgopts.cropRect.bottom()); // try to read the exif data and add that to the lens ini file - wxFileName file(wxString(pano.getImage(imgNr).getFilename().c_str(), *wxConvCurrent)); + wxFileName file(wxString(pano->getImage(imgNr).getFilename().c_str(), *wxConvCurrent)); if (file.GetExt().CmpNoCase(wxT("jpg")) == 0 || file.GetExt().CmpNoCase(wxT("jpeg")) == 0 ) { @@ -899,7 +897,7 @@ exif.FlashUsed = -1; exif.MeteringMode = -1; - if (ReadJpegFile(exif,pano.getImage(imgNr).getFilename().c_str(), READ_EXIF)){ + if (ReadJpegFile(exif,pano->getImage(imgNr).getFilename().c_str(), READ_EXIF)){ // calculate crop factor, if possible double cropFactor=0; if (exif.FocalLength > 0 && exif.CCDHeight > 0 && exif.CCDWidth > 0) { @@ -933,29 +931,29 @@ { if (m_selectedImages.size() == 1) { unsigned int imgNr = *(m_selectedImages.begin()); - unsigned int lensNr = pano.getImage(imgNr).getLensNr(); - Lens lens = pano.getLens(lensNr); - VariableMap vars = pano.getImageVariables(imgNr); - ImageOptions imgopts = pano.getImage(imgNr).getOptions(); + unsigned int lensNr = pano->getImage(imgNr).getLensNr(); + Lens lens = pano->getLens(lensNr); + VariableMap vars = pano->getImageVariables(imgNr); + ImageOptions imgopts = pano->getImage(imgNr).getOptions(); if (LoadLensParametersChoose(this, lens, vars, imgopts)) { GlobalCmdHist::getInstance().addCommand( - new PT::ChangeLensCmd(pano, lensNr, lens) + new PT::ChangeLensCmd(*pano, lensNr, lens) ); GlobalCmdHist::getInstance().addCommand( - new PT::UpdateImageVariablesCmd(pano, imgNr, vars) + new PT::UpdateImageVariablesCmd(*pano, imgNr, vars) ); // get all images with the current lens. UIntSet imgs; - for (unsigned int i = 0; i < pano.getNrOfImages(); i++) { - if (pano.getImage(i).getLensNr() == lensNr) { + for (unsigned int i = 0; i < pano->getNrOfImages(); i++) { + if (pano->getImage(i).getLensNr() == lensNr) { imgs.insert(i); } } // set image options. GlobalCmdHist::getInstance().addCommand( - new PT::SetImageOptionsCmd(pano, imgopts, imgs) ); + new PT::SetImageOptionsCmd(*pano, imgopts, imgs) ); } } else { wxLogError(_("Please select an image and try again")); @@ -1069,9 +1067,9 @@ if (m_selectedImages.size() > 0) { // create a new lens, start with a copy of the old lens. unsigned int imgNr = *(m_selectedImages.begin()); - Lens l = pano.getLens(pano.getImage(imgNr).getLensNr()); + Lens l = pano->getLens(pano->getImage(imgNr).getLensNr()); GlobalCmdHist::getInstance().addCommand( - new PT::AddNewLensToImagesCmd(pano, l, m_selectedImages) + new PT::AddNewLensToImagesCmd(*pano, l, m_selectedImages) ); } else { wxLogError(_("Please select an image and try again")); @@ -1084,11 +1082,11 @@ // ask user for lens number. long nr = wxGetNumberFromUser(_("Enter new lens number"), _("Lens number"), _("Change lens number"), 0, 0, - pano.getNrOfLenses()-1); + pano->getNrOfLenses()-1); if (nr >= 0) { // user accepted GlobalCmdHist::getInstance().addCommand( - new PT::SetImageLensCmd(pano, m_selectedImages, nr) + new PT::SetImageLensCmd(*pano, m_selectedImages, nr) ); } } else { @@ -1101,3 +1099,34 @@ "Vb", "Vc", "Vd", "Vx", "Vy", "Ra", "Rb", "Rc", "Rd", "Re", 0}; +IMPLEMENT_DYNAMIC_CLASS(LensPanel, wxPanel) + + +LensPanelXmlHandler::LensPanelXmlHandler() +: wxXmlResourceHandler() +{ + AddWindowStyles(); +} + +wxObject *LensPanelXmlHandler::DoCreateResource() +{ + XRC_MAKE_INSTANCE(cp, LensPanel) + + cp->Create(m_parentAsWindow, + GetID(), + GetPosition(), GetSize(), + GetStyle(wxT("style")), + GetName()); + + SetupWindow( cp); + + return cp; +} + +bool LensPanelXmlHandler::CanHandle(wxXmlNode *node) +{ + return IsOfClass(node, wxT("LensPanel")); +} + +IMPLEMENT_DYNAMIC_CLASS(LensPanelXmlHandler, wxXmlResourceHandler) + Modified: hugin/trunk/src/hugin1/hugin/LensPanel.h =================================================================== --- hugin/trunk/src/hugin1/hugin/LensPanel.h 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/LensPanel.h 2008-01-31 17:57:05 UTC (rev 2747) @@ -41,13 +41,14 @@ class LensPanel: public wxPanel, public PT::PanoramaObserver { public: - LensPanel( wxWindow *parent, const wxPoint& pos, const wxSize& size, - Panorama * pano ); + LensPanel( ); + + bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel")); + + void Init(PT::Panorama * pano); + virtual ~LensPanel(void) ; - /** restore layout after hugin start */ - void RestoreLayout(); - /// hack to restore the layout on next resize void RestoreLayoutOnNextResize() { @@ -81,7 +82,7 @@ private: // a window event - void OnSize(wxSizeEvent & e); + //void OnSize(wxSizeEvent & e); // event handlers /** changes lens type */ @@ -119,7 +120,7 @@ // the model - Panorama &pano; + Panorama * pano; ImagesListLens * images_list; @@ -135,15 +136,27 @@ int m_pixelDigits; wxScrolledWindow *m_lens_ctrls; - wxSplitterWindow *m_lens_splitter; bool m_restoreLayoutOnResize; static const char *m_varNames[]; DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(LensPanel) + }; +/** xrc handler */ +class LensPanelXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(LensPanelXmlHandler) + +public: + LensPanelXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + /** load lens parameters from lens ini file */ bool LoadLensParametersChoose(wxWindow * parent, Lens & lens, VariableMap & vars, ImageOptions & imgopts); Modified: hugin/trunk/src/hugin1/hugin/MainFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2008-01-31 17:57:05 UTC (rev 2747) @@ -273,13 +273,10 @@ // m_notebook = ((wxNotebook*) (FindWindow(XRCID("controls_notebook")))); DEBUG_ASSERT(m_notebook); - // the lens_panel, see as well images_panel - lens_panel = new LensPanel( this, wxDefaultPosition, - wxDefaultSize, &pano); - // show the lens_panel - wxXmlResource::Get()->AttachUnknownControl ( - wxT("lens_panel_unknown"), - lens_panel ); + // the lens_panel + lens_panel = XRCCTRL(*this, "lens_panel_unknown", LensPanel); + assert(lens_panel); + lens_panel->Init(&pano); // the crop panel @@ -1423,10 +1420,8 @@ { cout << "MainFrame::RestoreLayoutOnNextResize()" << endl; m_doRestoreLayout = true; - cpe->RestoreLayoutOnNextResize(); - lens_panel->RestoreLayoutOnNextResize(); //crop_panel->RestoreLayoutOnNextResize(); - images_panel->RestoreLayoutOnNextResize(); + //images_panel->RestoreLayoutOnNextResize(); } const wxString & MainFrame::GetXRCPath() Modified: hugin/trunk/src/hugin1/hugin/OptimizePanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/OptimizePanel.cpp 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/OptimizePanel.cpp 2008-01-31 17:57:05 UTC (rev 2747) @@ -90,6 +90,10 @@ SetSizer( topsizer ); topsizer->SetSizeHints( this ); +#ifdef DEBUG + SetBackgroundColour(wxTheColourDatabase->Find(wxT("RED"))); + panel->SetBackgroundColour(wxTheColourDatabase->Find(wxT("BLUE"))); +#endif m_yaw_list = XRCCTRL(*this, "optimizer_yaw_list", wxCheckListBox); m_pitch_list = XRCCTRL(*this, "optimizer_pitch_list", wxCheckListBox); Modified: hugin/trunk/src/hugin1/hugin/huginApp.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/huginApp.cpp 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/huginApp.cpp 2008-01-31 17:57:05 UTC (rev 2747) @@ -36,6 +36,8 @@ #include "hugin/PanoPanel.h" #include "hugin/CPEditorPanel.h" #include "hugin/AssistantPanel.h" +#include "hugin/LensPanel.h" +#include "hugin/ImagesList.h" #include "base_wx/PTWXDlg.h" #include "hugin/CommandHistory.h" #include "hugin/wxPanoCommand.h" @@ -189,6 +191,10 @@ // add custom XRC handlers wxXmlResource::Get()->AddHandler(new AssistantPanelXmlHandler()); + wxXmlResource::Get()->AddHandler(new LensPanelXmlHandler()); + wxXmlResource::Get()->AddHandler(new ImagesListImageXmlHandler()); + wxXmlResource::Get()->AddHandler(new ImagesListLensXmlHandler()); + wxXmlResource::Get()->AddHandler(new ImagesListCropXmlHandler()); wxXmlResource::Get()->AddHandler(new CPEditorPanelXmlHandler()); wxXmlResource::Get()->AddHandler(new CPImageCtrlXmlHandler()); wxXmlResource::Get()->AddHandler(new OptimizePanelXmlHandler()); Modified: hugin/trunk/src/hugin1/hugin/xrc/assistant_panel.xrc =================================================================== --- hugin/trunk/src/hugin1/hugin/xrc/assistant_panel.xrc 2008-01-31 11:15:45 UTC (rev 2746) +++ hugin/trunk/src/hugin1/hugin/xrc/assistant_panel.xrc 2008-01-31 17:57:05 UTC (rev 2747) @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <resource> <object class="wxPanel" name="assistant_panel"> - <style>wxTAB_TRAVERSAL</style> <object class="wxBoxSizer"> <orient>wxHORIZONTAL</orient> <object class="sizeritem"> @@ -9,21 +8,16 @@ <object class="wxBoxSizer"> <orient>wxVERTICAL</orient> <object class="spacer"> - <size>0,12</size> - </object> + </object> <object class="sizeritem"> <object class="wxBoxSizer"> <object class="sizeritem"> <object class="wxButton" name="ass_load_images_button"> - <label>1. Load images...</label> - <tooltip>load a series of photos</tooltip> - </object> - + </object> <flag>wxBOTTOM</flag> - <border>12</border> </object> <object class="sizeritem"> @@ -31,18 +25,13 @@ <orient>wxVERTICAL</orient> <object class="sizeritem"> <object class="wxStaticText" name="ass_load_images_text"> - <label>no images loaded</label> - </object> - + </object> <flag>wxBOTTOM|wxEXPAND|wxADJUST_MINSIZE</flag> - <border>6</border> </object> </object> - <flag>wxLEFT|wxEXPAND</flag> - <border>15</border> </object> <object class="sizeritem"> @@ -50,12 +39,9 @@ <orient>wxVERTICAL</orient> <object class="sizeritem"> <object class="wxCheckBox" name="ass_exif_cb"> - <label>Automatic (use EXIF data)</label> - </object> - + </object> <flag>wxTOP|wxBOTTOM</flag> - <border>6</border> </object> <object class="sizeritem"> @@ -66,17 +52,13 @@ <object class="wxFlexGridSizer"> <object class="sizeritem"> <object class="wxStaticText"> - <label>Lens type:</label> - <style>wxALIGN_RIGHT</style> </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> </object> <object class="sizeritem"> <object class="wxChoice" name="ass_lens_proj_choice"> - <content> <item>Normal (rectilinear)</item> <item>Panoramic (cylindrical)</item> @@ -89,25 +71,19 @@ <cols>2</cols> <hgap>6</hgap> </object> - <flag>wxLEFT|wxEXPAND</flag> - <border>12</border> </object> <object class="spacer"> - <size>0,6</size> </object> <object class="sizeritem"> <object class="wxFlexGridSizer"> <object class="sizeritem"> <object class="wxStaticText"> - <label>Focal length:</label> - <style>wxALIGN_RIGHT</style> </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> </object> <object class="sizeritem"> @@ -117,20 +93,15 @@ <hgap>6</hgap> <object class="sizeritem"> <object class="wxStaticText"> - <label>mm</label> </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> </object> <object class="sizeritem"> <object class="wxStaticText"> - <label>Focal length multiplier:</label> </object> - <flag>wxLEFT|wxALIGN_CENTRE_VERTICAL</flag> - <border>20</border> </object> <object class="sizeritem"> @@ -138,112 +109,80 @@ </object> <object class="sizeritem"> <object class="wxStaticText"> - <label>x</label> </object> - <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> </object> </object> - <flag>wxLEFT|wxEXPAND</flag> - <border>12</border> </object> <object class="spacer"> - <size>0,6</size> </object> <object class="sizeritem"> <object class="wxButton" name="ass_load_lens_button"> - <label>Load lens...</label> - </object> - + </object> <flag>wxLEFT</flag> - <border>12</border> </object> </object> </object> - <flag>wxEXPAND</flag> </object> <label>Camera and Lens</label> </object> - <flag>wxLEFT</flag> - <border>15</border> </object> <object class="spacer"> - <size>0,20</size> </object> <object class="sizeritem"> <object class="wxButton" name="ass_align_button"> - <label>2. Align...</label> - <tooltip>Align all images. Creates control points and optimizes the image positions</tooltip> - </object> - + </object> <flag>wxBOTTOM</flag> - <border>12</border> </object> <object class="sizeritem"> <object class="wxStaticText" name="ass_align_text"> - <label>\n\n\n\n</label> - <style></style> </object> - <flag>wxLEFT|wxEXPAND|wxADJUST_MINSIZE</flag> - <border>15</border> </object> <object class="spacer"> - <size>0,20</size> </object> <object class="sizeritem"> <object class="wxButton" name="ass_create_button"> - <label>3. Create panorama...</label> - <tooltip>Create a high resolution panorama.</tooltip> - </object> - </object> + </object> + </object> <orient>wxVERTICAL</orient> </object> - <option>1</option> - <flag>wxEXPAND</flag> - </object> + </object> <object class="spacer"> - <size>0,12</size> - </object> + </object> <object class="sizeritem"> <object class="unknown" name="ass_druid"> - <hidden>1</hidden> </object> - <flag>wxRIGHT</flag> - <border>10</border> </object> </object> </object> - <option>1</option> - <flag>wxLEFT|wxEXPAND</flag> - <border>10</border> </object> </object> @@ -257,36 +196,28 @@ <orient>wxVERTICAL</orient> <object class="sizeritem"> <object class="wxStaticText" name="lensdlg_message"> - <label>a b c d</label> </object> - <flag>wxADJUST_MINSIZE</flag> </object> <object class="spacer"> - <size>0,10</size> </object> <object class="sizeritem"> <object class="wxBoxSizer"> <object class="sizeritem"> <object class="wxStaticText"> - <label>Lens type:</label> - <style>wxALIGN_RIGHT</style> </object> - <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> - <border>6</border> </object> <object class="sizeritem"> <object class="wxChoice" name="lensdlg_type_choice"> - <content> <item>Normal (rectilinear)</item> <item>Panoramic (cylindrical)</item> @@ -294,183 +225,134 @@ <item>Full frame fisheye</item> <item>Equirectangular</item> </content> - <selection>0</selection> </object> </object> <object class="spacer"> - <option>1</option> - <flag>wxEXPAND</flag> </object> <object class="sizeritem"> <object class="wxButton" name="lensdlg_load_lens_button"> - <label>Load lens data...</label> - <style></style> </object> - <flag>wxLEFT|wxALIGN_RIGHT</flag> - <border>12</border> - </object> + </object> <orient>wxHORIZONTAL</orient> </object> - <flag>wxLEFT|wxEXPAND</flag> - <border>12</border> </object> <object class="spacer"> - <size>0,10</size> </object> <object class="sizeritem"> <object class="wxStaticText"> - <label>Enter horizontal field of view (HFOV) or focal length and crop factor:</label> </object> - <flag>wxEXPAND</flag> </object> <object class="spacer"> - <size>0,6</size> </object> <object class="sizeritem"> <object class="wxFlexGridSizer"> <object class="sizeritem"> <object class="wxStaticText"> - <label>HFOV (v):</label> - <style>wxALIGN_RIGHT</style> </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> </object> <object class="sizeritem"> - <object class="wxTextCtrl" name="lensdlg_hfov_text"> - </object> + <object class="wxTextCtrl" name="lensdlg_hfov_text"/> </object> <object class="sizeritem"> <object class="wxStaticText"> - <label>degrees</label> </object> - <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> </object> <object class="spacer"> - <size>0,0</size> </object> <object class="spacer"> - <size>0,0</size> </object> <object class="spacer"> - <size>0,0</size> </object> <object class="sizeritem"> <object class="wxStaticText"> - <label>Focal length:</label> - <style>wxALIGN_RIGHT</style> </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> </object> <object class="sizeritem"> - <object class="wxTextCtrl" name="lensdlg_focallength_text"> - </object> + <object class="wxTextCtrl" name="lensdlg_focallength_text"/> </object> <cols>6</cols> <vgap>6</vgap> <hgap>6</hgap> <object class="sizeritem"> <object class="wxStaticText"> - <label>mm</label> </object> - <flag>wxRIGHT|wxALIGN_CENTRE_VERTICAL</flag> </object> <object class="sizeritem"> <object class="wxStaticText"> - <label>Focal length multiplier:</label> </object> - <flag>wxLEFT|wxALIGN_CENTRE_VERTICAL... [truncated message content] |