creaContours_lib
|
#include <interfToolsMenu.h>
Public Member Functions | |
interfToolsMenu (wxWindow *parent, int sizex, int sizey, wxEvtHandler *evtHandler, std::string datdir="data/Icons") | |
~interfToolsMenu () | |
virtual void | initButtons (wxEvtHandler *evtHandler) |
void | onRigidPressed (wxCommandEvent &event) |
void | onSpreadPressed (wxCommandEvent &event) |
void | onMirrorPressed (wxCommandEvent &event) |
void | onPrintLabel (wxCommandEvent &event) |
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 |
Definition at line 35 of file interfToolsMenu.h.
interfToolsMenu::interfToolsMenu | ( | wxWindow * | parent, |
int | sizex, | ||
int | sizey, | ||
wxEvtHandler * | evtHandler, | ||
std::string | datdir = "data/Icons" |
||
) |
Definition at line 29 of file interfToolsMenu.cxx.
References interfMenuBar::datadir, and initButtons().
interfToolsMenu::~interfToolsMenu | ( | ) |
Definition at line 82 of file interfToolsMenu.cxx.
|
inlinevirtualinherited |
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 interfMenuBar::flexsizer, interfMenuBar::getButton(), and interfMenuBar::vectbutton.
Referenced by interfDeleteMenu::initButtons(), interfEditMenu::initButtons(), interfIOMenu::initButtons(), interfImageToolsMenu::initButtons(), interfSegmentationMenu::initButtons(), initButtons(), and interfNewContourMenu::initButtons().
|
inlinevirtualinherited |
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 interfMenuBar::vectbutton, and interfMenuBar::vectfunct.
|
inlinevirtualinherited |
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 interfMenuBar::vectbutton, interfMenuBar::vectfunct, and interfMenuBar::vecthand.
Referenced by interfDeleteMenu::initButtons(), interfEditMenu::initButtons(), interfIOMenu::initButtons(), interfImageToolsMenu::initButtons(), interfSegmentationMenu::initButtons(), initButtons(), and interfNewContourMenu::initButtons().
|
inlinevirtualinherited |
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 interfMenuBar::vectbutton, and interfMenuBar::vectimgpath.
Referenced by interfMenuBar::addButtons().
|
inlinevirtualinherited |
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 interfMenuBar::vectnom.
|
virtual |
Implements interfMenuBar.
Definition at line 48 of file interfToolsMenu.cxx.
References interfMenuBar::addButtons(), interfMenuBar::connectEvents(), interfMenuBar::datadir, onMirrorPressed(), onPrintLabel(), onRigidPressed(), onSpreadPressed(), and interfMenuBar::setVectorFunction().
Referenced by interfToolsMenu().
|
inlineinherited |
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.
void interfToolsMenu::onMirrorPressed | ( | wxCommandEvent & | event | ) |
Definition at line 102 of file interfToolsMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onMirrorPressed().
Referenced by initButtons().
void interfToolsMenu::onPrintLabel | ( | wxCommandEvent & | event | ) |
Definition at line 107 of file interfToolsMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onPrintLabel().
Referenced by initButtons().
void interfToolsMenu::onRigidPressed | ( | wxCommandEvent & | event | ) |
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 92 of file interfToolsMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onRigidPressed().
Referenced by initButtons().
void interfToolsMenu::onSpreadPressed | ( | wxCommandEvent & | event | ) |
Definition at line 97 of file interfToolsMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onSpreadPressed().
Referenced by initButtons().
|
inlinevirtualinherited |
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 interfMenuBar::vectbutton.
Referenced by interfEditMenu::initButtons().
|
inlinevirtualinherited |
Definition at line 193 of file interfMenuBar.h.
References interfMenuBar::vecthand.
Referenced by interfNewContourMenu::initButtons().
|
inlinevirtualinherited |
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 interfMenuBar::vectfunct.
Referenced by interfDeleteMenu::initButtons(), interfEditMenu::initButtons(), interfIOMenu::initButtons(), interfImageToolsMenu::initButtons(), interfSegmentationMenu::initButtons(), initButtons(), and interfNewContourMenu::initButtons().
|
protectedinherited |
Definition at line 212 of file interfMenuBar.h.
Referenced by interfDeleteMenu::initButtons(), interfEditMenu::initButtons(), interfIOMenu::initButtons(), interfImageToolsMenu::initButtons(), interfSegmentationMenu::initButtons(), initButtons(), interfNewContourMenu::initButtons(), interfDeleteMenu::interfDeleteMenu(), interfEditMenu::interfEditMenu(), interfImageToolsMenu::interfImageToolsMenu(), interfIOMenu::interfIOMenu(), interfNewContourMenu::interfNewContourMenu(), interfSegmentationMenu::interfSegmentationMenu(), and interfToolsMenu().