creaContours_lib
|
#include <interfImageToolsMenu.h>
Public Member Functions | |
interfImageToolsMenu (wxWindow *parent, int sizex, int sizey, wxEvtHandler *evtHandler, std::string datdir="data/Icons") | |
~interfImageToolsMenu () | |
virtual void | initButtons (wxEvtHandler *evtHandler) |
void | onInformationPressed (wxCommandEvent &event) |
void | onConfigurationPressed (wxCommandEvent &event) |
void | onThreshold (wxCommandEvent &event) |
void | onColorLayerImage (wxCommandEvent &event) |
void | onHelpPressed (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 34 of file interfImageToolsMenu.h.
interfImageToolsMenu::interfImageToolsMenu | ( | wxWindow * | parent, |
int | sizex, | ||
int | sizey, | ||
wxEvtHandler * | evtHandler, | ||
std::string | datdir = "data/Icons" |
||
) |
Definition at line 29 of file interfImageToolsMenu.cxx.
References interfMenuBar::datadir, and initButtons().
interfImageToolsMenu::~interfImageToolsMenu | ( | ) |
Definition at line 94 of file interfImageToolsMenu.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(), interfSegmentationMenu::initButtons(), initButtons(), interfToolsMenu::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(), interfSegmentationMenu::initButtons(), initButtons(), interfToolsMenu::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 47 of file interfImageToolsMenu.cxx.
References interfMenuBar::addButtons(), interfMenuBar::connectEvents(), interfMenuBar::datadir, onColorLayerImage(), onConfigurationPressed(), onHelpPressed(), onInformationPressed(), onThreshold(), and interfMenuBar::setVectorFunction().
Referenced by interfImageToolsMenu().
|
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 interfImageToolsMenu::onColorLayerImage | ( | wxCommandEvent & | event | ) |
Definition at line 137 of file interfImageToolsMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onColorLayerImagePressed().
Referenced by initButtons().
void interfImageToolsMenu::onConfigurationPressed | ( | wxCommandEvent & | event | ) |
Definition at line 127 of file interfImageToolsMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onConfigurationPressed().
Referenced by initButtons().
void interfImageToolsMenu::onHelpPressed | ( | wxCommandEvent & | event | ) |
Definition at line 142 of file interfImageToolsMenu.cxx.
Referenced by initButtons().
void interfImageToolsMenu::onInformationPressed | ( | 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 122 of file interfImageToolsMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onInformationPressed().
Referenced by initButtons().
void interfImageToolsMenu::onThreshold | ( | wxCommandEvent & | event | ) |
Definition at line 132 of file interfImageToolsMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onThresholdPressed().
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(), interfSegmentationMenu::initButtons(), initButtons(), interfToolsMenu::initButtons(), and interfNewContourMenu::initButtons().
|
protectedinherited |
Definition at line 212 of file interfMenuBar.h.
Referenced by interfDeleteMenu::initButtons(), interfEditMenu::initButtons(), interfIOMenu::initButtons(), initButtons(), interfSegmentationMenu::initButtons(), interfToolsMenu::initButtons(), interfNewContourMenu::initButtons(), interfDeleteMenu::interfDeleteMenu(), interfEditMenu::interfEditMenu(), interfImageToolsMenu(), interfIOMenu::interfIOMenu(), interfNewContourMenu::interfNewContourMenu(), interfSegmentationMenu::interfSegmentationMenu(), and interfToolsMenu::interfToolsMenu().