MatOCAD Logo

Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

TxtValue Class Reference

Numeric value container. More...

#include <TxtValue.h>

List of all members.

Public Member Functions

 TxtValue (wxWindow *parent, const wxWindowID id=-1, const wxString &value=_T(""), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name=_T("TxtValue"))
 Constructor.
void OnKillFocus (wxFocusEvent &event)
 Handle the kill focus event.
void OnKeyDown (wxKeyEvent &event)
 Handle the key down event.

Private Attributes

wxString old_value
 Contains the last value inserted and confirmed.


Detailed Description

Numeric value container.

Txt value contains value and when it changed it raises a custum event ValueChangedEvent to the Parent widget. It derives from wxTextCtrl

Definition at line 26 of file TxtValue.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 31 of file TxtValue.cpp.


Member Function Documentation

void TxtValue::OnKeyDown wxKeyEvent &  event  ) 
 

Handle the key down event.

Definition at line 86 of file TxtValue.cpp.

References EVT_VALUE_CHANGED, Isnumeric(), old_value, ValueChangedEvent::valid, and ValueChangedEvent::value.

void TxtValue::OnKillFocus wxFocusEvent &  event  ) 
 

Handle the kill focus event.

Definition at line 53 of file TxtValue.cpp.

References EVT_VALUE_CHANGED, Isnumeric(), old_value, ValueChangedEvent::valid, and ValueChangedEvent::value.


Member Data Documentation

wxString TxtValue::old_value [private]
 

Contains the last value inserted and confirmed.

Definition at line 32 of file TxtValue.h.

Referenced by OnKeyDown(), and OnKillFocus().


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

 

SourceForge Logo