MWidgets::TextBox Class Reference

Class that represent textbox widget. More...

#include <textbox.h>

Inheritance diagram for MWidgets::TextBox:

MWidgets::Widget List of all members.

Public Member Functions

 TextBox ()
 Constructor.
 ~TextBox ()
 Destructor.
virtual void Create (Widget *parent, int x, int y, int w, int h)
 Create widgets window.
template<class T>
void SetOnChangeHandler (T *pProcessor, void(T::*EventCallBack)(Widget *sender))
 Create event handler object for OnClick event;.
virtual void OnChange ()
 Virtual callback function for clicked event.
virtual WIDGET_TYPE GetType ()
 Returns class's identifier like WINDOW or BUTTON.

Protected Member Functions

virtual void OnCommand (WORD code, WORD id)
 Function starts callbacks.

Protected Attributes

BaseEventHandlerm_pOnChangeHandler
 OnClick event handler.

Detailed Description

Class that represent textbox widget.

Definition at line 14 of file textbox.h.


Constructor & Destructor Documentation

MWidgets::TextBox::TextBox (  ) 

Constructor.

Definition at line 19 of file textbox.cpp.

References m_pOnChangeHandler.

MWidgets::TextBox::~TextBox (  ) 

Destructor.

Definition at line 24 of file textbox.cpp.

References m_pOnChangeHandler.


Member Function Documentation

void MWidgets::TextBox::Create ( Widget parent,
int  x,
int  y,
int  w,
int  h 
) [virtual]

Create widgets window.

Parameters:
parent parent widget.
w new TextBox's width.
h new TextBox's height.

Definition at line 30 of file textbox.cpp.

References MWidgets::Widget::Create(), and MWidgets::Widget::GetHwnd().

WIDGET_TYPE MWidgets::TextBox::GetType (  )  [virtual]

Returns class's identifier like WINDOW or BUTTON.

Implements MWidgets::Widget.

Definition at line 49 of file textbox.cpp.

References MWidgets::TEXTBOX.

void MWidgets::TextBox::OnChange (  )  [virtual]

Virtual callback function for clicked event.

Definition at line 41 of file textbox.cpp.

References MWidgets::BaseEventHandler::Call(), and m_pOnChangeHandler.

Referenced by OnCommand().

void MWidgets::TextBox::OnCommand ( WORD  code,
WORD  id 
) [protected, virtual]

Function starts callbacks.

Reimplemented from MWidgets::Widget.

Definition at line 35 of file textbox.cpp.

References OnChange().

template<class T>
void MWidgets::TextBox::SetOnChangeHandler ( T *  pProcessor,
void(T::*)(Widget *sender)  EventCallBack 
) [inline]

Create event handler object for OnClick event;.

Parameters:
pProcessor object that own EventCallBack; method that realize event handler.

Definition at line 37 of file textbox.h.

References m_pOnChangeHandler.


Member Data Documentation

BaseEventHandler* MWidgets::TextBox::m_pOnChangeHandler [protected]

OnClick event handler.

Definition at line 21 of file textbox.h.

Referenced by OnChange(), SetOnChangeHandler(), TextBox(), and ~TextBox().


The documentation for this class was generated from the following files:
Generated on Thu Oct 26 13:47:46 2006 for MWidgets by  doxygen 1.4.7