creaContours_lib
|
#include <interfMenuBar.h>
Public Member Functions | |
interfMenuBar (wxWindow *parent, int sizex, int sizey) | |
virtual void | initButtons (wxEvtHandler *evtHandler)=0 |
virtual void | addButtons (std::vector< std::string > vpath, std::vector< std::string > vnom) |
virtual wxBitmapButton * | getButton (std::string imgpath, int sizex, int sizey) |
virtual wxStaticText * | getText (std::string nom, int sizex, int sizey) |
virtual void | setVectorFunction (std::vector< wxObjectEventFunction > vectf) |
virtual void | connectEvents (wxEvtHandler *evtHandler) |
virtual void | connectEvents () |
virtual void | setButtonName (int i, const char c) |
void | onActionButtonPressed (wxCommandEvent &event) |
virtual void | setEventHandlers (std::vector< wxEvtHandler * > hand) |
Protected Attributes | |
std::string | datadir |
Private Attributes | |
std::vector< std::string > | vectimgpath |
std::vector< std::string > | vectnom |
std::vector< wxButton * > | vectbutton |
std::vector < wxObjectEventFunction > | vectfunct |
std::vector< wxEvtHandler * > | vecthand |
wxFlexGridSizer * | flexsizer |
Definition at line 42 of file interfMenuBar.h.
|
inline |
Definition at line 46 of file interfMenuBar.h.
|
inlinevirtual |
This method add a series of button in a line, it uses the method getbutton to create the button and static text to create the text, it also initialice the flexgridsizer to add the buttons and the text into the panel
vector | path, this parameter contains the path of the images to include in the path |
vector | nom, this parameter contains the names corresponding to each path of image given |
Definition at line 64 of file interfMenuBar.h.
References flexsizer, getButton(), and vectbutton.
Referenced by interfDeleteMenu::initButtons(), interfEditMenu::initButtons(), interfIOMenu::initButtons(), interfSegmentationMenu::initButtons(), interfImageToolsMenu::initButtons(), interfToolsMenu::initButtons(), and interfNewContourMenu::initButtons().
|
inlinevirtual |
This method connect the events seted in the vector vectfunct each function must have a button to relate with, see function setVectorFunction()
Definition at line 143 of file interfMenuBar.h.
References vectbutton, and vectfunct.
|
inlinevirtual |
This method connect the events seted in the vector vectfunct each function must have a button to relate with, see function setVectorFunction()
Definition at line 154 of file interfMenuBar.h.
References vectbutton, vectfunct, and vecthand.
Referenced by interfDeleteMenu::initButtons(), interfEditMenu::initButtons(), interfIOMenu::initButtons(), interfSegmentationMenu::initButtons(), interfImageToolsMenu::initButtons(), interfToolsMenu::initButtons(), and interfNewContourMenu::initButtons().
|
inlinevirtual |
This method creates the button with the given image and returns it
string | imgpath is the string containing the path to the image of the button being created |
int | x indicates the x coordinate where the button should be located |
int | y indicates the y coordinate where the button should be located |
Definition at line 102 of file interfMenuBar.h.
References vectbutton, and vectimgpath.
Referenced by addButtons().
|
inlinevirtual |
This method create the static text with the given string and returns it, it also push it back into the vector nom
string | nom text wich will be added to the statictext |
int | sizex size of the text |
int | sizey size of the text |
Definition at line 123 of file interfMenuBar.h.
References vectnom.
|
pure virtual |
Implemented in interfNewContourMenu, interfToolsMenu, interfImageToolsMenu, interfSegmentationMenu, interfDeleteMenu, interfEditMenu, and interfIOMenu.
|
inline |
Responds to the events of the buttons, when the same panel is responsible for it. It gets the name of the button corresponding to the method that has to be executed, it uses attribute eventHandler to call the methods define by the application. see setEventHandler(wxEventHandler*)
Definition at line 180 of file interfMenuBar.h.
|
inlinevirtual |
Sets the name of the button, this is used to relate the name of the button to a specific command int i index in the array of buttons use fuction setVectorFuncion(<vect>) to set the vector first const char name of the button see wxContour_ActionCommandsID.h to view the commands
Definition at line 167 of file interfMenuBar.h.
References vectbutton.
Referenced by interfEditMenu::initButtons().
|
inlinevirtual |
Definition at line 193 of file interfMenuBar.h.
References vecthand.
Referenced by interfNewContourMenu::initButtons().
|
inlinevirtual |
Sets the vector funcion, this vector must contain a function for each button created 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>)
Definition at line 133 of file interfMenuBar.h.
References vectfunct.
Referenced by interfDeleteMenu::initButtons(), interfEditMenu::initButtons(), interfIOMenu::initButtons(), interfSegmentationMenu::initButtons(), interfImageToolsMenu::initButtons(), interfToolsMenu::initButtons(), and interfNewContourMenu::initButtons().
|
protected |
Definition at line 212 of file interfMenuBar.h.
Referenced by interfDeleteMenu::initButtons(), interfEditMenu::initButtons(), interfIOMenu::initButtons(), interfImageToolsMenu::initButtons(), interfSegmentationMenu::initButtons(), interfToolsMenu::initButtons(), interfNewContourMenu::initButtons(), interfDeleteMenu::interfDeleteMenu(), interfEditMenu::interfEditMenu(), interfImageToolsMenu::interfImageToolsMenu(), interfIOMenu::interfIOMenu(), interfNewContourMenu::interfNewContourMenu(), interfSegmentationMenu::interfSegmentationMenu(), and interfToolsMenu::interfToolsMenu().
|
private |
Definition at line 208 of file interfMenuBar.h.
Referenced by addButtons().
|
private |
Definition at line 204 of file interfMenuBar.h.
Referenced by addButtons(), connectEvents(), getButton(), and setButtonName().
|
private |
Definition at line 205 of file interfMenuBar.h.
Referenced by connectEvents(), and setVectorFunction().
|
private |
Definition at line 206 of file interfMenuBar.h.
Referenced by connectEvents(), and setEventHandlers().
|
private |
Definition at line 201 of file interfMenuBar.h.
Referenced by getButton().
|
private |
Definition at line 202 of file interfMenuBar.h.
Referenced by getText().