Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

os::TextEdit Class Reference

#include <textview.h>

Inheritance diagram for os::TextEdit:

os::View os::Handler List of all members.

Public Methods

 TextEdit (TextView *pcParent, const Rect &cFrame, const char *pzTitle, uint32 nResizeMask=CF_FOLLOW_LEFT|CF_FOLLOW_TOP, uint32 nFlags=WID_WILL_DRAW|WID_CLEAR_BACKGROUND)
 ~TextEdit ()
void SetEnable (bool bEnabled=true)
bool IsEnabled () const
void SetMultiLine (bool bMultiLine)
bool GetMultiLine ()
void SetPasswordMode (bool bPassword)
bool GetPasswordMode () const
void SetNumeric (bool bNumeric)
bool GetNumeric () const
void SetReadOnly (bool bFlag)
bool GetReadOnly () const
int GetMaxUndoSize () const
void SetMaxUndoSize (int nSize)
void SetMinPreferredSize (int nWidthChars, int nHeightChars)
IPoint GetMinPreferredSize () const
void SetMaxPreferredSize (int nWidthChars, int nHeightChars)
IPoint GetMaxPreferredSize () const
void GetRegion (IPoint cStart, IPoint cEnd, std::string *pcBuffer, bool bAddToClipboard=true)
void GetRegion (std::string *pcBuffer, bool bAddToClipboard=true)
void MakeCsrVisible ()
void InsertString (IPoint *pcPos, const char *pzBuffer, bool bMakeUndo=true)
void Delete (IPoint cStart, IPoint cEnd, bool bMakeUndo=true)
void Delete ()
void Clear ()
void SetCursor (int x, int y)
const std::vector<std::string>& GetBuffer () const
virtual Point GetPreferredSize (bool bLargest) const
virtual void Activated (bool bIsActive)
 Hook called when the view gain or loose focus. More...

virtual void FontChanged (Font *pcNewFont)
 Called to notify the view that the font has changed. More...

virtual void FrameSized (const Point &cDelta)
virtual void Paint (const Rect &cUpdateRect)
 Called by the system update "damaged" areas of the view. More...

virtual void MouseMove (const Point &cNewPos, int nCode, uint32 nButtons, Message *pcData)
virtual void MouseDown (const Point &cPosition, uint32 nButtons)
virtual void MouseUp (const Point &cPosition, uint32 nButtons, Message *pcData)
virtual void KeyDown (const char *pzString, const char *pzRawString, uint32 nQualifiers)

Constructor & Destructor Documentation

TextEdit::TextEdit ( TextView * pcParent,
const Rect & cFrame,
const char * pzTitle,
uint32 nResizeMask = CF_FOLLOW_LEFT | CF_FOLLOW_TOP,
uint32 nFlags = WID_WILL_DRAW | WID_CLEAR_BACKGROUND )
 

TextEdit::~TextEdit ( )
 


Member Function Documentation

void TextEdit::Activated ( bool bIsActive ) [virtual]
 

Hook called when the view gain or loose focus.

Description:
This is a callback member that can be overloaded by derived classes to learn when the view is activated and when it is deactivated. The bIsActive parameter tell whether the focus was lost or gained.

The view has focus when it is the active view in the active window.
Note:
This is a hook function that is called by the system to notify about an event. You should never call this member yourself.

The window is locked when this member is called.
Parameters:
bIsActive   - true if the view gain and false if it loose focus.
See also:
MakeFocus(), WindowActivated()
Author(s):
Kurt Skauen (kurt.skauen@c2i.net)

Reimplemented from os::View.

void TextEdit::Clear ( )
 

void TextEdit::Delete ( )
 

void TextEdit::Delete ( IPoint cStart,
IPoint cEnd,
bool bMakeUndo = true )
 

void TextEdit::FontChanged ( Font * pcNewFont ) [virtual]
 

Called to notify the view that the font has changed.

Description:
FontChanged() is a virtual hook function that can be overloaded by inheriting classes to track changes to the view's font.

This hook function is called whenver the font is replaced through the View::SetFont() member or if the currently assigned font is modified in a way that whould alter the graphical appearance of the font.
Note:
View::SetFont() will call FontChanged() syncronously and will cause FontChanged() to be called even if the view is not yet added to a window. Changes done to the font-object cause a message to be sendt to the window thread and FontChanged() will then be called asyncronously from the window thread when the message arrive. For this reason it is only possible to track changes done to the font object itself when the view is added to a window.
Parameters:
pcNewFont   Pointer to the affected font (same as returned by GetFont()).

See also:
SetFont(), os::Font
Author(s):
Kurt Skauen (kurt@atheos.cx)

Reimplemented from os::View.

void TextEdit::FrameSized ( const Point & cDelta ) [virtual]
 

Reimplemented from os::View.

const std::vector< std::string > & os::TextEdit::GetBuffer<std::string> ( ) const [inline]
 

IPoint TextEdit::GetMaxPreferredSize ( ) const
 

int os::TextEdit::GetMaxUndoSize ( ) const [inline]
 

IPoint TextEdit::GetMinPreferredSize ( ) const
 

bool os::TextEdit::GetMultiLine ( ) [inline]
 

bool os::TextEdit::GetNumeric ( ) const [inline]
 

bool TextEdit::GetPasswordMode ( ) const
 

Point TextEdit::GetPreferredSize ( bool bLargest ) const [virtual]
 

Reimplemented from os::View.

bool TextEdit::GetReadOnly ( ) const
 

void TextEdit::GetRegion ( std::string * pcBuffer,
bool bAddToClipboard = true )
 

void TextEdit::GetRegion ( IPoint cStart,
IPoint cEnd,
std::string * pcBuffer,
bool bAddToClipboard = true )
 

void TextEdit::InsertString ( IPoint * pcPos,
const char * pzBuffer,
bool bMakeUndo = true )
 

bool TextEdit::IsEnabled ( ) const
 

void TextEdit::KeyDown ( const char * pzString,
const char * pzRawString,
uint32 nQualifiers ) [virtual]
 

Reimplemented from os::View.

void TextEdit::MakeCsrVisible ( )
 

void TextEdit::MouseDown ( const Point & cPosition,
uint32 nButton ) [virtual]
 

Reimplemented from os::View.

void TextEdit::MouseMove ( const Point & cPosition,
int nCode,
uint32 nButtons,
Message * pcData ) [virtual]
 

Reimplemented from os::View.

void TextEdit::MouseUp ( const Point & cPosition,
uint32 nButtons,
Message * pcData ) [virtual]
 

Reimplemented from os::View.

void TextEdit::Paint ( const Rect & cUpdateRect ) [virtual]
 

Called by the system update "damaged" areas of the view.

Description:
Note:
Warning:
Parameters:
cUpdateRect   A rectangle enclosing all damaged areas. This is just a rough "worst-case", further fine-grained clipping will be performed by the Application Server to avoid updating non-damaged pixels and make the update as fast and flicker-free as possible.

See also:
Invalidate(), Flush()
Author(s):
Kurt Skauen (kurt@atheos.cx)

Reimplemented from os::View.

void TextEdit::SetCursor ( int x,
int y )
 

void TextEdit::SetEnable ( bool bEnabled = true )
 

void TextEdit::SetMaxPreferredSize ( int nWidthChars,
int nHeightChars )
 

void TextEdit::SetMaxUndoSize ( int nSize )
 

void TextEdit::SetMinPreferredSize ( int nWidthChars,
int nHeightChars )
 

void os::TextEdit::SetMultiLine ( bool bMultiLine ) [inline]
 

void os::TextEdit::SetNumeric ( bool bNumeric ) [inline]
 

void TextEdit::SetPasswordMode ( bool bPassword )
 

void TextEdit::SetReadOnly ( bool bFlag )
 


The documentation for this class was generated from the following files:
Generated at Sat Apr 7 16:11:43 2001 for AtheOS higlevel API by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001