Inheritance diagram for os::TextEdit:
Public Types | |
enum | { UNDO_INSERT, UNDO_DELETE } |
Public Member Functions | |
TextEdit (TextView *pcParent, const Rect &cFrame, const String &cTitle, 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 () const |
void | SetPasswordMode (bool bPassword) |
bool | GetPasswordMode () const |
void | SetNumeric (bool bNumeric) |
bool | GetNumeric () const |
void | SetReadOnly (bool bFlag) |
bool | GetReadOnly () const |
uint32 | GetEventMask () const |
void | SetEventMask (uint32 nMask) |
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, String *pcBuffer, bool bAddToClipboard=true) const |
void | GetRegion (String *pcBuffer, bool bAddToClipboard=true) const |
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 | Select (const IPoint &cStart, const IPoint &cEnd) |
void | SelectAll () |
void | ClearSelection () |
bool | GetSelection (IPoint *pcStart, IPoint *pcEnd) const |
void | SetCursor (const IPoint &cPos, bool bSelect) |
IPoint | GetCursor () const |
void | SetMaxLength (size_t nMaxLength) |
size_t | GetMaxLength () const |
size_t | GetCurrentLength () const |
const TextView::buffer_type & | GetBuffer () const |
virtual Point | GetPreferredSize (bool bLargest) const |
virtual void | Activated (bool bIsActive) |
Hook called when the view gain or loose focus. | |
virtual void | FontChanged (Font *pcNewFont) |
Called to notify the view that the font has changed. | |
virtual void | FrameSized (const Point &cDelta) |
Virtual hook called by the system when the view is resized. | |
virtual void | Paint (const Rect &cUpdateRect) |
Called by the system update "damaged" areas of the view. | |
void | MouseMove (const Point &cNewPos, int nCode, uint32 nButtons, Message *pcData) |
Hook called by the system when the mouse is moved. | |
void | MouseDown (const Point &cPosition, uint32 nButtons) |
Hook called by the system when a mouse button is pressed. | |
void | MouseUp (const Point &cPosition, uint32 nButtons, Message *pcData) |
Hook called by the system when a mouse button is release. | |
bool | HandleKeyDown (const char *pzString, const char *pzRawString, uint32 nQualifiers) |
void | UpdateBackBuffer () |
void | CommitEvents () |
void | DrawCursor (View *pcView=NULL, float vHOffset=0.0f, float vVOffset=0.0f) |
float | GetPixelPosX (const String &cString, int x) |
float | GetPixelPosY (int y) |
int | GetCharPosX (const String &cString, float vPos) |
void | MaybeDrawString (View *pcView, float vHOffset, const char *pzString, int nLength) |
void | RenderLine (View *pcView, int y, float vHOffset, float vVOffset, bool bClear=true) |
void | InsertChar (char nChar) |
void | MoveHoriz (int nDelta, bool bExpBlock) |
void | MoveVert (int nDelta, bool bExpBlock) |
void | MoveWord (bool bDirection, bool bExpBlock) |
void | RecalcPrefWidth () |
void | AddUndoNode (UndoNode *psNode) |
void | Undo () |
void | Redo () |
void | InvalidateLines (int nFirst, int nLast) |
Public Attributes | |
uint32 | m_nEventMask |
uint32 | m_nPendingEvents |
float | m_vCsrGfxPos |
font_height | m_sFontHeight |
float | m_vGlyphHeight |
IPoint | m_cCsrPos |
IPoint | m_cPrevCursorPos |
IPoint | m_cRegionStart |
IPoint | m_cRegionEnd |
bool | m_bRegionActive |
bool | m_bMultiLine |
bool | m_bPassword |
bool | m_bReadOnly |
bool | m_bNumeric |
bool | m_bEnabled |
bool | m_bEnforceBackBuffer |
bool | m_bMouseDownSeen |
bool | m_bIBeamActive |
TextView::buffer_type | m_cBuffer |
std::vector< float > | m_cLineSizes |
TextView * | m_pcParent |
Point | m_cPreferredSize |
std::list< UndoNode * > | m_cUndoStack |
std::list< UndoNode * >::iterator | m_iUndoIterator |
int | m_nUndoMemSize |
int | m_nMaxUndoSize |
IPoint | m_cMinPreferredSize |
IPoint | m_cMaxPreferredSize |
Color32_s | m_sCurFgColor |
Color32_s | m_sCurBgColor |
int | m_nMaxLength |
int | m_nCurrentLength |
Bitmap * | m_pcBackBuffer |
View * | m_pcBgView |
Classes | |
struct | UndoNode |
TextEdit::TextEdit | ( | TextView * | pcParent, | |
const Rect & | cFrame, | |||
const String & | cTitle, | |||
uint32 | nResizeMask = CF_FOLLOW_LEFT|CF_FOLLOW_TOP , |
|||
uint32 | nFlags = WID_WILL_DRAW|WID_CLEAR_BACKGROUND | |||
) |
TextEdit::~TextEdit | ( | ) |
void TextEdit::SetEnable | ( | bool | bEnabled = true |
) |
bool TextEdit::IsEnabled | ( | ) | const |
void os::TextEdit::SetMultiLine | ( | bool | bMultiLine | ) | [inline] |
bool os::TextEdit::GetMultiLine | ( | ) | const [inline] |
void TextEdit::SetPasswordMode | ( | bool | bPassword | ) |
bool TextEdit::GetPasswordMode | ( | ) | const |
void os::TextEdit::SetNumeric | ( | bool | bNumeric | ) | [inline] |
bool os::TextEdit::GetNumeric | ( | ) | const [inline] |
void TextEdit::SetReadOnly | ( | bool | bFlag | ) |
bool TextEdit::GetReadOnly | ( | ) | const |
uint32 TextEdit::GetEventMask | ( | ) | const |
void TextEdit::SetEventMask | ( | uint32 | nMask | ) |
int os::TextEdit::GetMaxUndoSize | ( | ) | const [inline] |
void TextEdit::SetMaxUndoSize | ( | int | nSize | ) |
void TextEdit::SetMinPreferredSize | ( | int | nWidthChars, | |
int | nHeightChars | |||
) |
IPoint TextEdit::GetMinPreferredSize | ( | ) | const |
void TextEdit::SetMaxPreferredSize | ( | int | nWidthChars, | |
int | nHeightChars | |||
) |
IPoint TextEdit::GetMaxPreferredSize | ( | ) | const |
void TextEdit::GetRegion | ( | IPoint | cStart, | |
IPoint | cEnd, | |||
String * | pcBuffer, | |||
bool | bAddToClipboard = true | |||
) | const |
void TextEdit::GetRegion | ( | String * | pcBuffer, | |
bool | bAddToClipboard = true | |||
) | const |
void TextEdit::MakeCsrVisible | ( | ) |
void TextEdit::InsertString | ( | IPoint * | pcPos, | |
const char * | pzBuffer, | |||
bool | bMakeUndo = true | |||
) |
void TextEdit::Delete | ( | ) |
void TextEdit::Clear | ( | ) |
void TextEdit::SelectAll | ( | ) |
void TextEdit::ClearSelection | ( | ) |
void TextEdit::SetCursor | ( | const IPoint & | cPos, | |
bool | bSelect | |||
) |
IPoint TextEdit::GetCursor | ( | ) | const |
void TextEdit::SetMaxLength | ( | size_t | nMaxLength | ) |
size_t TextEdit::GetMaxLength | ( | ) | const |
size_t TextEdit::GetCurrentLength | ( | ) | const |
const TextView::buffer_type& os::TextEdit::GetBuffer | ( | ) | const [inline] |
void TextEdit::Activated | ( | bool | bIsActive | ) | [virtual] |
bIsActive | - true if the view gain and false if it loose focus. |
Reimplemented from os::View.
void TextEdit::FontChanged | ( | Font * | pcNewFont | ) | [virtual] |
pcNewFont | Pointer to the affected font (same as returned by GetFont()). |
Reimplemented from os::View.
void TextEdit::FrameSized | ( | const Point & | cDelta | ) | [virtual] |
cDelta
calue from the current size. cDelta | The distance the bottom/right corner was moved relative to the upper/left corner. |
Reimplemented from os::View.
void TextEdit::Paint | ( | const Rect & | cUpdateRect | ) | [virtual] |
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. |
Reimplemented from os::View.
void TextEdit::MouseMove | ( | const Point & | cNewPos, | |
int | nCode, | |||
uint32 | nButtons, | |||
Message * | pcData | |||
) | [virtual] |
cNewPos | New mouse position given in the views coordinate system. | |
nCode | Enter/exit code. This is MOUSE_ENTERED when the mouse first enter the view, MOUSE_EXITED when the mouse leaves the view, MOUSE_INSIDE whenever the mouse move withing the boundary of the view and MOUSE_OUTSIDE when the mouse move outside the view (will only happen if the view has focus). | |
nButtons | Bitmask telling which buttons that are currently pressed. Bit 0 is button 1 (left), bit 1 is button 2 (right), and bit 2 is button 3 (middle), and so on. | |
pcData | Pointer to a Message object containing the dragged data if the user is in the middle of a drag and drop operation. Otherwise this pointer is NULL. Look at BeginDrag() for a more detailed description of the drag and drop system. |
Reimplemented from os::View.
void TextEdit::MouseDown | ( | const Point & | cPosition, | |
uint32 | nButtons | |||
) | [virtual] |
cPosition | Mouse position in the views coordinate system at the time the mouse was pressed. | |
nButtons | Index of the pressed button. Buttons start at 1 for the left button, 2 for the right button, 3 for the middle button. Additional buttons might be supported by the mouse driver and will then be assigned numbers from 4 and up. |
Reimplemented from os::View.
pcData
member will point to a Message containing the dragged data. Look at BeginDrag() for a more detailed description of the drag and drop system. cPosition | Mouse position in the views coordinate system at the time the mouse was pressed. | |
nButtons | Index of the pressed button. Buttons start at 1 for the left button, 2 for the right button, 3 for the middle button. Additional buttons might be supported by the mouse driver and will then be assigned numbers from 4 and up. | |
pcData | Pointer to a Message object containing the dragged data if this mouse-up was the end of a drag and drop operation. If no data was dragged it will be NULL. |
Reimplemented from os::View.
bool TextEdit::HandleKeyDown | ( | const char * | pzString, | |
const char * | pzRawString, | |||
uint32 | nQualifiers | |||
) |
void TextEdit::UpdateBackBuffer | ( | ) |
void TextEdit::CommitEvents | ( | ) |
void TextEdit::DrawCursor | ( | View * | pcView = NULL , |
|
float | vHOffset = 0.0f , |
|||
float | vVOffset = 0.0f | |||
) |
float TextEdit::GetPixelPosX | ( | const String & | cString, | |
int | x | |||
) |
float TextEdit::GetPixelPosY | ( | int | y | ) |
int TextEdit::GetCharPosX | ( | const String & | cString, | |
float | vPos | |||
) |
void TextEdit::MaybeDrawString | ( | View * | pcView, | |
float | vHOffset, | |||
const char * | pzString, | |||
int | nLength | |||
) |
void TextEdit::RenderLine | ( | View * | pcView, | |
int | y, | |||
float | vHOffset, | |||
float | vVOffset, | |||
bool | bClear = true | |||
) |
void TextEdit::InsertChar | ( | char | nChar | ) |
void TextEdit::MoveHoriz | ( | int | nDelta, | |
bool | bExpBlock | |||
) |
void TextEdit::MoveVert | ( | int | nDelta, | |
bool | bExpBlock | |||
) |
void TextEdit::MoveWord | ( | bool | bDirection, | |
bool | bExpBlock | |||
) |
void TextEdit::RecalcPrefWidth | ( | ) |
void TextEdit::AddUndoNode | ( | UndoNode * | psNode | ) |
void TextEdit::Undo | ( | ) |
void TextEdit::Redo | ( | ) |
void TextEdit::InvalidateLines | ( | int | nFirst, | |
int | nLast | |||
) |
uint32 os::TextEdit::m_nEventMask |
std::vector< float > os::TextEdit::m_cLineSizes |
std::list<UndoNode * > os::TextEdit::m_cUndoStack |
std::list<UndoNode * >::iterator os::TextEdit::m_iUndoIterator |