creaContours_lib
|
#include <interfNewContourMenu.h>
Public Member Functions | |
interfNewContourMenu (wxWindow *parent, int sizex, int sizey, wxEvtHandler *evtHandler, std::string datadir="data/Icons") | |
~interfNewContourMenu () | |
virtual void | initButtons (wxEvtHandler *evtHandler) |
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 Member Functions | |
void | onCreateContourBullseye (wxCommandEvent &event) |
void | onCreateContourSpline (wxCommandEvent &event) |
void | onCreateContourRectangle (wxCommandEvent &event) |
void | onCreateContourCircle (wxCommandEvent &event) |
void | onCreateContourLine (wxCommandEvent &event) |
void | onCreateContourPoints (wxCommandEvent &event) |
void | onCreateContourPolygon (wxCommandEvent &event) |
Private Attributes | |
wxPanel * | panBull |
bool | created |
Definition at line 36 of file interfNewContourMenu.h.
interfNewContourMenu::interfNewContourMenu | ( | wxWindow * | parent, |
int | sizex, | ||
int | sizey, | ||
wxEvtHandler * | evtHandler, | ||
std::string | datadir = "data/Icons" |
||
) |
Definition at line 29 of file interfNewContourMenu.cxx.
References created, interfMenuBar::datadir, initButtons(), and panBull.
interfNewContourMenu::~interfNewContourMenu | ( | ) |
Definition at line 96 of file interfNewContourMenu.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(), interfToolsMenu::initButtons(), and 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(), interfToolsMenu::initButtons(), and 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 41 of file interfNewContourMenu.cxx.
References interfMenuBar::addButtons(), interfMenuBar::connectEvents(), interfMenuBar::datadir, onCreateContourBullseye(), onCreateContourCircle(), onCreateContourLine(), onCreateContourPoints(), onCreateContourPolygon(), onCreateContourRectangle(), onCreateContourSpline(), interfMenuBar::setEventHandlers(), and interfMenuBar::setVectorFunction().
Referenced by interfNewContourMenu().
|
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.
|
private |
This method is in charge of capturing the event when the button is clicked
Definition at line 100 of file interfNewContourMenu.cxx.
References created, interfMainPanel::getInstance(), interfMainPanel::onCreateContoursBullEye(), panBull, and interfMainPanel::showPanel().
Referenced by initButtons().
|
private |
This method is in charge of capturing the event when the button is clicked
Definition at line 121 of file interfNewContourMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onCreateContourCircle().
Referenced by initButtons().
|
private |
This method is in charge of capturing the event when the button is clicked
Definition at line 124 of file interfNewContourMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onCreateContourLine().
Referenced by initButtons().
|
private |
This method is in charge of capturing the event when the button is clicked
Definition at line 129 of file interfNewContourMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onCreateContourPoints().
Referenced by initButtons().
|
private |
This method is in charge of capturing the event when the button is clicked
RaC - Creates a new Polygon contour
Definition at line 135 of file interfNewContourMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onCreateContourPolygon().
Referenced by initButtons().
|
private |
This method is in charge of capturing the event when the button is clicked
Definition at line 118 of file interfNewContourMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onCreateContourRectangle().
Referenced by initButtons().
|
private |
This method is in charge of capturing the event when the button is clicked
Definition at line 115 of file interfNewContourMenu.cxx.
References interfMainPanel::getInstance(), and interfMainPanel::onCreateContourSpline().
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 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(), interfToolsMenu::initButtons(), and initButtons().
|
private |
Definition at line 51 of file interfNewContourMenu.h.
Referenced by interfNewContourMenu(), and onCreateContourBullseye().
|
protectedinherited |
Definition at line 212 of file interfMenuBar.h.
Referenced by interfDeleteMenu::initButtons(), interfEditMenu::initButtons(), interfIOMenu::initButtons(), interfImageToolsMenu::initButtons(), interfSegmentationMenu::initButtons(), interfToolsMenu::initButtons(), initButtons(), interfDeleteMenu::interfDeleteMenu(), interfEditMenu::interfEditMenu(), interfImageToolsMenu::interfImageToolsMenu(), interfIOMenu::interfIOMenu(), interfNewContourMenu(), interfSegmentationMenu::interfSegmentationMenu(), and interfToolsMenu::interfToolsMenu().
|
private |
Definition at line 50 of file interfNewContourMenu.h.
Referenced by interfNewContourMenu(), and onCreateContourBullseye().