+/*# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
#ifndef __interfMENUBARH__
#define __interfMENUBARH__
int sizex = 80;
int sizey = 80;
- flexsizer = new wxFlexGridSizer(2,vpath.size(),2,2);
+ //RaC 11-09
+ //This constructor function as well but it is neccessary to change vpath.size() by 6
+ //flexsizer = new wxFlexGridSizer(2,vpath.size(),2,2);
+ flexsizer = new wxFlexGridSizer(5);
this->SetSizer(flexsizer, true);
this->SetAutoLayout( true );
-
//first row of the sizer, the buttons are being added
- for(int i = 0; i < (int)(vpath.size());i++){
+ for(int i = 0; i < (int)(vpath.size());i++)
+ {
std::string p = vpath[i];
wxBitmapButton* bitmapbutton = this->getButton(p, sizex, sizey);
flexsizer->Add(bitmapbutton,wxFIXED_MINSIZE);
}
//second row of the sizer, the names are being added
- for(int i = 0; i < (int)(vnom.size()); i++){
+ for(int i = 0; i < (int)(vnom.size()); i++)
+ {
//sizex = vectbutton[i]->GetSize().GetWidth();
std::string n = vnom[i];
vectbutton[i]->SetToolTip(wxString(n.c_str(),wxConvUTF8));
** @param int y indicates the y coordinate where the button should be located
**/
- virtual wxBitmapButton* getButton(std::string imgpath, int sizex, int sizey){
- vectimgpath.push_back(imgpath);
-
-
+ virtual wxBitmapButton* getButton(std::string imgpath, int sizex, int sizey)
+ {
+ vectimgpath.push_back(imgpath);
wxBitmap* bitmap = new wxBitmap(wxString(imgpath.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
//wxSize(sizex,sizey)
** @param int sizex size of the text
** @param int sizey size of the text
**/
- virtual wxStaticText* getText(std::string nom, int sizex, int sizey){
+ virtual wxStaticText* getText(std::string nom, int sizex, int sizey)
+ {
vectnom.push_back(nom);
return new wxStaticText(this, -1, wxString(nom.c_str(),wxConvUTF8), wxDefaultPosition,
wxSize(sizex,sizey), wxALIGN_CENTRE, wxString(nom.c_str(),wxConvUTF8));
** they must be ordered in the same way as the vector that contains the image path
** and name of the button. See addButton(<vect>, <vect>)
**/
- virtual void setVectorFunction(std::vector<wxObjectEventFunction> vectf){
- for(int i = 0; i < (int)(vectf.size());i++){
+ virtual void setVectorFunction(std::vector<wxObjectEventFunction> vectf)
+ {
+ for(int i = 0; i < (int)(vectf.size());i++)
+ {
vectfunct.push_back(vectf[i]);
}
}