[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

hugin1/hugin/ImagesList.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00026 #ifndef _IMAGESLIST_H
00027 #define _IMAGESLIST_H
00028 
00029 
00030 #include "PT/Panorama.h"
00031 #include <panodata/StandardImageVariableGroups.h>
00032 //#include "hugin/MainFrame.h"
00033 
00034 using namespace PT;
00035 
00058 class ImagesList: public wxListCtrl, public PT::PanoramaObserver
00059 {
00060 public:
00061     ImagesList();
00062 
00063     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"));
00064 
00065     void Init(PT::Panorama * pano);
00066    
00067     virtual ~ImagesList(void) ;
00068 
00071     void panoramaImagesChanged(PT::Panorama &pano, const PT::UIntSet & imgNr);
00072 
00080     virtual void CreateItem(unsigned int imgNr);
00081 
00084     virtual void UpdateItem(unsigned int imgNr);
00085     
00091     virtual void UpdatePartNumbersForItem(unsigned int imgNr);
00092     
00098     virtual void RemoveItem(unsigned int imgNr);
00099 
00104     void SelectSingleImage(unsigned int imgNr);
00105 
00107     const UIntSet & GetSelected() const;
00108 
00109 protected:
00110     // the model
00111     Panorama * pano;
00112     
00113     // image variable group information
00114     HuginBase::StandardImageVariableGroups * variable_groups;
00115 
00116     // update selected map
00117     void OnItemSelected ( wxListEvent & e );
00118     // update selected map
00119     void OnItemDeselected ( wxListEvent & e );
00120     // save the column width when changed
00121     void OnColumnWidthChange( wxListEvent & e );
00122 
00124     //void createIcon(wxBitmap & bitmap, unsigned int imgNr, unsigned int size);
00125 
00126     UIntSet selectedItems;
00127 
00128     // image icons.
00129     wxImageList *m_smallIcons;
00130     int m_iconHeight;
00131     int m_degDigits;
00132     int m_distDigits;
00133     int m_pixelDigits;
00134 
00135     // propagate list selections/deselections to client.
00136     bool m_notifyParents;
00137 
00138     //for saving column width
00139     wxString m_configClassName;
00140     DECLARE_EVENT_TABLE()
00141     DECLARE_DYNAMIC_CLASS(ImagesListImage)
00142 };
00143 
00146 class ImagesListImage : public ImagesList
00147 {
00148 public:
00149     ImagesListImage();
00150 
00151     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"));
00152 
00153     void Init(PT::Panorama * pano);
00154 
00157     virtual void UpdateItem(unsigned int imgNr);
00158     
00160     virtual void UpdatePartNumbersForItem(unsigned int imgNr);
00161 
00162     DECLARE_DYNAMIC_CLASS(ImagesListImage)
00163 };
00164 
00166 class ImagesListImageXmlHandler : public wxXmlResourceHandler
00167 {
00168     DECLARE_DYNAMIC_CLASS(ImagesListImageXmlHandler)
00169 
00170     public:
00171         ImagesListImageXmlHandler();
00172         virtual wxObject *DoCreateResource();
00173         virtual bool CanHandle(wxXmlNode *node);
00174 };
00175 
00178 class ImagesListLens : public ImagesList
00179 {
00180 public:
00181     ImagesListLens();
00182 
00183     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"));
00184 
00185     void Init(PT::Panorama * pano);
00186 
00187     ImagesListLens(wxWindow * parent, Panorama * pano);
00188 
00191     virtual void UpdateItem(unsigned int imgNr);
00192     
00195     virtual void UpdatePartNumbersForItem(unsigned int imgNr);
00196 
00197     DECLARE_DYNAMIC_CLASS(ImagesListLens)
00198 };
00199 
00201 class ImagesListLensXmlHandler : public wxXmlResourceHandler
00202 {
00203     DECLARE_DYNAMIC_CLASS(ImagesListLensXmlHandler)
00204 
00205     public:
00206         ImagesListLensXmlHandler();
00207         virtual wxObject *DoCreateResource();
00208         virtual bool CanHandle(wxXmlNode *node);
00209 };
00210 
00213 class ImagesListCrop : public ImagesList
00214 {
00215 public:
00216     ImagesListCrop();
00217 
00218     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"));
00219 
00220     void Init(PT::Panorama * pano);
00221 
00224     virtual void UpdateItem(unsigned int imgNr);
00225 
00226     DECLARE_DYNAMIC_CLASS(ImagesListCrop)
00227 };
00228 
00230 class ImagesListCropXmlHandler : public wxXmlResourceHandler
00231 {
00232     DECLARE_DYNAMIC_CLASS(ImagesListCropXmlHandler)
00233 
00234     public:
00235         ImagesListCropXmlHandler();
00236         virtual wxObject *DoCreateResource();
00237         virtual bool CanHandle(wxXmlNode *node);
00238 };
00239 
00242 class ImagesListMask : public ImagesList
00243 {
00244 public:
00245     ImagesListMask();
00246 
00247     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"));
00248 
00249     void Init(PT::Panorama * pano);
00250 
00253     virtual void UpdateItem(unsigned int imgNr);
00254 
00255     DECLARE_DYNAMIC_CLASS(ImagesListMask)
00256 };
00257 
00259 class ImagesListMaskXmlHandler : public wxXmlResourceHandler
00260 {
00261     DECLARE_DYNAMIC_CLASS(ImagesListMaskXmlHandler)
00262 
00263     public:
00264         ImagesListMaskXmlHandler();
00265         virtual wxObject *DoCreateResource();
00266         virtual bool CanHandle(wxXmlNode *node);
00267 };
00268 
00269 
00270 #endif // _LIST_H

Generated on Mon Sep 20 01:01:26 2010 for Hugintrunk by doxygen 1.3.9.1