20 #ifndef ofxOuiTextInput_hpp 21 #define ofxOuiTextInput_hpp 23 #include "../core/ofxOuiComponent.hpp" 56 template <
typename T,
typename args,
class ListenerClass>
57 void onTextInput(T *owner,
void (ListenerClass::*listenerMethod)(args)) {
58 using namespace std::placeholders;
72 TextInput(
int x_ = 0,
int y_ = 0,
int width_ = 0,
int height_ = 0);
Event arguments for text editing events.
Definition: ofxOuiTextInput.hpp:36
void keyPressed(ofKeyEventArgs &e)
Definition: ofxOuiTextInput.cpp:90
void mouseDragged(ofMouseEventArgs &e)
Definition: ofxOuiTextInput.cpp:65
TextInputEvent(TextInput *sender_, string text_)
Definition: ofxOuiTextInput.cpp:111
Base UI Component (equivalent to a label)
Definition: ofxOuiComponent.hpp:33
void mouseReleased(ofMouseEventArgs &e)
Definition: ofxOuiTextInput.cpp:86
void mousePressed(ofMouseEventArgs &e)
Definition: ofxOuiTextInput.cpp:70
string text
Definition: ofxOuiTextInput.hpp:45
void mouseMoved(ofMouseEventArgs &e)
Definition: ofxOuiTextInput.cpp:60
Text input component (single-line)
Definition: ofxOuiTextInput.hpp:31
void onTextInput(T *owner, void(ListenerClass::*listenerMethod)(args))
Set callback function for text input events.
Definition: ofxOuiTextInput.hpp:57
TextInput * sender
pointer to the sender component
Definition: ofxOuiTextInput.hpp:43
Definition: ofxOuiColormap.hpp:25
virtual void drawLabel()
Definition: ofxOuiTextInput.cpp:51
TextInput(int x_=0, int y_=0, int width_=0, int height_=0)
Constructor.
Definition: ofxOuiTextInput.cpp:22
std::function< void(TextInput::TextInputEvent &)> text_input_event_callback_
Definition: ofxOuiTextInput.hpp:88
bool erase_on_next_input_
Definition: ofxOuiTextInput.hpp:87
virtual ~TextInput()
Destructor.
Definition: ofxOuiTextInput.cpp:38