OpenASIP  2.0
Public Member Functions | Private Member Functions | List of all members
FocusTrackingTextCtrl Class Reference

#include <FocusTrackingTextCtrl.hh>

Inheritance diagram for FocusTrackingTextCtrl:
Inheritance graph
Collaboration diagram for FocusTrackingTextCtrl:
Collaboration graph

Public Member Functions

 FocusTrackingTextCtrl (wxWindow *parent, wxWindowID id, const wxString &value=_T(""), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name=_T("FocusTrackingTextCtrl"))
 
 ~FocusTrackingTextCtrl ()
 

Private Member Functions

void onKillFocus (wxFocusEvent &event)
 

Detailed Description

Textfield widget which emits a wxEVT_COMMAND_TEXT_ENTER when losing keyboard focus.

This widget behaves exactly like wxTextCtrl except for the event emited when focus is lost. This widget is useful for textfields which are validated when the user presses enter on the widget or changes the keyboard focus to another window. The created text widget has always the wxTE_PROCESS_ENTER style set.

Definition at line 47 of file FocusTrackingTextCtrl.hh.

Constructor & Destructor Documentation

◆ FocusTrackingTextCtrl()

FocusTrackingTextCtrl::FocusTrackingTextCtrl ( wxWindow *  parent,
wxWindowID  id,
const wxString &  value = _T(""),
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = 0,
const wxValidator &  validator = wxDefaultValidator,
const wxString &  name = _T("FocusTrackingTextCtrl") 
)

The Constructor.

Parameters
parentParent window of the control.
idNumeric id for the control.
valueInitial value of the text field.
posPosition of the control.
sizeSize of the control.
styleStyle flags for the text control.
validatorValidator for the control.
nameName of the control.

Definition at line 50 of file FocusTrackingTextCtrl.cc.

58  :
59  wxTextCtrl(parent, id, value, pos, size,
60  (style | wxTE_PROCESS_ENTER) , validator, name) {
61 
62 }

◆ ~FocusTrackingTextCtrl()

FocusTrackingTextCtrl::~FocusTrackingTextCtrl ( )

The Destructor.

Definition at line 67 of file FocusTrackingTextCtrl.cc.

67  {
68 }

Member Function Documentation

◆ onKillFocus()

void FocusTrackingTextCtrl::onKillFocus ( wxFocusEvent &  event)
private

Emits a wxEVT_COMMAND_TEXT_ENTER event when the control loses focus.

Parameters
eventFocus event of the control losing focus.

Definition at line 76 of file FocusTrackingTextCtrl.cc.

76  {
77  wxCommandEvent textEntered =
78  wxCommandEvent(wxEVT_COMMAND_TEXT_ENTER, GetId());
79  AddPendingEvent(textEntered);
80  event.Skip();
81 }

The documentation for this class was generated from the following files: