Ejemplo n.º 1
0
ListesAuxShowListeImages::ListesAuxShowListeImages(wxWindow *parent, wxString itemSelected, int &nbImg)
    : wxFrame(parent, wxID_ANY, wxEmptyString) {
    try {
        ObjPhotoGenealogy *objPhotoGenealogy = new ObjPhotoGenealogy();
        vector<wxImage> imgVect;
        imgVect = model->arrayImageMicroFromNomLatin(itemSelected);
        wxArrayInt idVect = model->idImageMicroArrayFromNomLatin(itemSelected);
        for (int ijk = 0; ijk < imgVect.size(); ijk++) {
            wxImage imgAux = imgVect[ijk];
            wxString title = objPhotoGenealogy->getFullNomFromIdPhoto(idVect[ijk]);
            wxRect rect = parent->GetScreenRect();
            int x0 = rect.x ;
            int y0 = rect.y ;
            int w0 = rect.width ;
            int xPos = x0+w0+x0+(nbImg+ijk)*16;
            int yPos = y0+(nbImg+ijk)*16;
            ImageFrame *imageFrame = new ImageFrame(parent, imgAux, title, wxPoint(xPos, yPos), wxDEFAULT_FRAME_STYLE);
            imageFrame->SetBackgroundColour(Couleurs::backgColor);
            imageFrame->Show();
        }
        nbImg = nbImg + (int)imgVect.size();

    } catch (const exception &e) {
        Aux::logsStr("", e.what(), logPut);
    }
}