Pyro higlevel API
|
Classes | |
struct | UndoNode |
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. More... | |
virtual void | FontChanged (Font *pcNewFont) |
Called to notify the view that the font has changed. More... | |
virtual void | FrameSized (const Point &cDelta) |
Virtual hook called by the system when the view is resized. More... | |
virtual void | Paint (const Rect &cUpdateRect) |
Called by the system update "damaged" areas of the view. More... | |
void | MouseMove (const Point &cNewPos, int nCode, uint32 nButtons, Message *pcData) |
Hook called by the system when the mouse is moved. More... | |
void | MouseDown (const Point &cPosition, uint32 nButtons) |
Hook called by the system when a mouse button is pressed. More... | |
void | MouseUp (const Point &cPosition, uint32 nButtons, Message *pcData) |
Hook called by the system when a mouse button is release. More... | |
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 Member Functions inherited from os::View | |
View (const Rect &cFrame, const String &cTitle, uint32 nResizeMask=CF_FOLLOW_LEFT|CF_FOLLOW_TOP, uint32 nFlags=WID_WILL_DRAW|WID_CLEAR_BACKGROUND) | |
View constructor. More... | |
virtual | ~View () |
View destructor. More... | |
virtual void | AttachedToWindow () |
virtual void | AllAttached () |
virtual void | DetachedFromWindow () |
virtual void | AllDetached () |
virtual void | WindowActivated (bool bIsActive) |
Hook called when the window hosting this view gain or loose focus. More... | |
virtual void | KeyDown (const char *pzString, const char *pzRawString, uint32 nQualifiers) |
Hook called by the system when a key is pressed while the view has focus. More... | |
virtual void | KeyUp (const char *pzString, const char *pzRawString, uint32 nQualifiers) |
Hook called by the system when a key is released while the view has focus. More... | |
virtual void | FrameMoved (const Point &cDelta) |
Virtual hook called by the system when the view is moved within it's parent. More... | |
virtual void | ViewScrolled (const Point &cDelta) |
Virtual hook called by the system when the view content is scrolled. More... | |
virtual Point | GetContentSize () const |
virtual void | WheelMoved (const Point &cDelta) |
Hook called by the system when the scroll-wheel is rotated. More... | |
virtual void | AddChild (View *pcView, bool bAssignTabOrder=false) |
void | RemoveChild (View *pcChild) |
void | RemoveThis () |
View * | GetChildAt (const Point &cPos) const |
View * | GetChildAt (int nIndex) const |
View * | GetParent () const |
ScrollBar * | GetVScrollBar () const |
ScrollBar * | GetHScrollBar () const |
Window * | GetWindow () const |
String | GetTitle () const |
virtual int | GetTabOrder () const |
Get the keybord manouvering order. More... | |
virtual void | SetTabOrder (int nOrder=NEXT_TAB_ORDER) |
Set the keyboard manouvering sorting order. More... | |
virtual const ShortcutKey & | GetShortcut () const |
virtual void | SetShortcut (const ShortcutKey &cShortcut) |
Set keyboard shortcut. More... | |
virtual void | SetShortcutFromLabel (const String &cLabel) |
Set keyboard shortcut from Label. More... | |
void | SetContextMenu (Menu *pcMenu) |
Set popup menu for a View. More... | |
Menu * | GetContextMenu () const |
Get popup menu. More... | |
uint32 | GetQualifiers () const |
void | GetMouse (Point *pcPosition, uint32 *pnButtons) const |
void | SetMousePos (const Point &cPosition) |
void | BeginDrag (Message *pcData, const Point &cOffset, const Bitmap *pcBitmap, Handler *pcReplyTarget=NULL) |
Start a drag and drop operation. More... | |
void | BeginDrag (Message *pcData, const Point &cOffset, const Rect &cBounds, Handler *pcReplyTarget=NULL) |
Start a drag and drop operation. More... | |
void | SetFlags (uint32 nFlags) |
uint32 | GetFlags (uint32 nMask=~0L) const |
void | SetResizeMask (uint32 nFlags) |
uint32 | GetResizeMask () const |
void | Show (bool bVisible=true) |
Show/hide a view and all it's children. More... | |
void | Hide () |
bool | IsVisible () const |
virtual void | MakeFocus (bool bFocus=true) |
virtual bool | HasFocus () const |
Rect | GetFrame () const |
Rect | GetBounds () const |
Rect | GetNormalizedBounds () const |
float | Width () const |
float | Height () const |
Point | GetLeftTop () const |
virtual void | SetFrame (const Rect &cRect, bool bNotifyServer=true) |
Set the size and position relative to the parent view. More... | |
virtual void | MoveBy (const Point &cDelta) |
Move the view within the parent coordinate system. More... | |
virtual void | MoveBy (float vDeltaX, float vDeltaY) |
virtual void | MoveTo (const Point &cPos) |
Set the views position within the parent coordinate system. More... | |
virtual void | MoveTo (float x, float y) |
virtual void | ResizeBy (const Point &cDelta) |
virtual void | ResizeBy (float vDeltaW, float vDeltaH) |
virtual void | ResizeTo (const Point &cSize) |
Set a new absolute size for the view. More... | |
virtual void | ResizeTo (float W, float H) |
Set a new absolute size for the view. More... | |
void | SetDrawingRegion (const Region &cReg) |
Restrict rendering using a clipping region. More... | |
void | ClearDrawingRegion () |
Remove any previously assigned drawing region. More... | |
void | SetShapeRegion (const Region &cReg) |
Define a non-square shape for the view. More... | |
void | ClearShapeRegion () |
Remove any previously assigned shape region. More... | |
virtual int | ToggleDepth () |
Point | ConvertFromParent (const Point &cPoint) const |
void | ConvertFromParent (Point *cPoint) const |
Rect | ConvertFromParent (const Rect &cRect) const |
void | ConvertFromParent (Rect *cRect) const |
Point | ConvertToWindow (const Point &cPoint) const |
void | ConvertToWindow (Point *cPoint) const |
Rect | ConvertToWindow (const Rect &cRect) const |
void | ConvertToWindow (Rect *cRect) const |
Point | ConvertFromWindow (const Point &cPoint) const |
void | ConvertFromWindow (Point *cPoint) const |
Rect | ConvertFromWindow (const Rect &cRect) const |
void | ConvertFromWindow (Rect *cRect) const |
Point | ConvertToScreen (const Point &cPoint) const |
void | ConvertToScreen (Point *cPoint) const |
Rect | ConvertToScreen (const Rect &cRect) const |
void | ConvertToScreen (Rect *cRect) const |
Point | ConvertFromScreen (const Point &cPoint) const |
void | ConvertFromScreen (Point *cPoint) const |
Rect | ConvertFromScreen (const Rect &cRect) const |
void | ConvertFromScreen (Rect *cRect) const |
void | Invalidate (const Rect &cRect, bool bRecurse=false) |
Add a rectangle to the damage list. More... | |
void | Invalidate (bool bRecurse=false) |
Invalidate the whole view. More... | |
void | Flush () |
Flush the render queue. More... | |
void | Sync () |
Flush the render queue. More... | |
void | SetDrawingMode (drawing_mode nMode) |
drawing_mode | GetDrawingMode () const |
void | SetFont (Font *pcFont) |
Change the views text font. More... | |
Font * | GetFont () const |
void | SetFgColor (int nRed, int nGreen, int nBlue, int nAlpha=255) |
void | SetFgColor (Color32_s sColor) |
Color32_s | GetFgColor () const |
void | SetBgColor (int nRed, int nGreen, int nBlue, int nAlpha=255) |
void | SetBgColor (Color32_s sColor) |
Color32_s | GetBgColor () const |
void | SetEraseColor (int nRed, int nGreen, int nBlue, int nAlpha=255) |
void | SetEraseColor (Color32_s sColor) |
Color32_s | GetEraseColor () const |
void | MovePenTo (const Point &cPos) |
void | MovePenTo (float x, float y) |
void | MovePenBy (const Point &cPos) |
void | MovePenBy (float x, float y) |
Point | GetPenPosition () const |
Get the current pen position. More... | |
void | DrawLine (const Point &cToPoint) |
void | DrawLine (const Point &cFromPnt, const Point &cToPnt) |
virtual void | ScrollBy (const Point &cDelta) |
virtual void | ScrollBy (float vDeltaX, float vDeltaY) |
virtual void | ScrollTo (Point cTopLeft) |
virtual void | ScrollTo (float x, float y) |
Point | GetScrollOffset () const |
void | ScrollRect (const Rect &cSrcRect, const Rect &cDstRect) |
Copy a rectangle from one location to another within the view. More... | |
void | FillRect (const Rect &cRect) |
void | FillRect (const Rect &cRect, Color32_s sColor) |
void | DrawBitmap (const Bitmap *pcBitmap, const Rect &cSrcRect, const Rect &cDstRect) |
Render a bitmap into the view. More... | |
void | EraseRect (const Rect &cRect) |
void | DrawFrame (const Rect &cRect, uint32 nFlags) |
void | DrawRoundedFrame (const os::Rect &cReizeFrame=os::Rect(1, 4,-1,-4), const os::Color32_s &cColor=get_default_color(COL_SHADOW)) |
void | DrawRoundedFrame (const os::Rect &cFrame, const os::Rect &cReizeFrame=os::Rect(1, 4,-1,-4), const os::Color32_s &cColor=get_default_color(COL_SHADOW)) |
void | DrawString (const Point &cPos, const String &cString) |
void | DrawString (const String &cString) |
Render a text-string at the current pen position. More... | |
void | DrawString (const char *pzStr, int Len=-1) |
void | DrawText (const Rect &cPos, const String &cString, uint32 nFlags=0) |
Render a text-string in a specified rectangle. More... | |
void | DrawSelectedText (const Rect &cPos, const String &cString, const IPoint &cSel1, const IPoint &cSel2, uint32 nMode=SEL_CHAR, uint32 nFlags=0) |
void | GetSelection (const String &cClipboard="__system_clipboard__") |
void | GetTruncatedStrings (const char **pazStringArray, int nStringCount, uint32 nMode, float nWidth, char **pazResultArray) const |
float | GetStringWidth (const String &cString) const |
float | GetStringWidth (const char *pzString, int nLen=-1) const |
void | GetStringWidths (const char **apzStringArray, const int *anLengthArray, int nStringCount, float *avWidthArray) const |
Point | GetTextExtent (const String &cString, uint32 nFlags=0, int nTargetWidth=-1) const |
int | GetStringLength (const String &cString, float vWidth, bool bIncludeLast=false) const |
int | GetStringLength (const char *pzString, int nLen, float vWidth, bool bIncludeLast=false) const |
void | GetStringLengths (const char **apzStringArray, const int *anLengthArray, int nStringCount, float vWidth, int *anMaxLengthArray, bool bIncludeLast=false) const |
void | GetFontHeight (font_height *psHeight) const |
void | Ping (int nSize=0) const |
void | SetToolTip (const os::String &t) |
os::String | GetToolTip () const |
Point | ConvertToParent (const Point &cPoint) const |
Translate a os::Point into our parents coordinate system. More... | |
void | ConvertToParent (Point *cPoint) const |
Translate a os::Point into our parents coordinate system. More... | |
Rect | ConvertToParent (const Rect &cRect) const |
void | ConvertToParent (Rect *cRect) const |
Public Member Functions inherited from os::Handler | |
Handler (const String &cName) | |
Construct a handler. More... | |
virtual | ~Handler () |
Destructor. More... | |
virtual void | TimerTick (int nID) |
Timer dispatch member. More... | |
virtual void | HandleMessage (Message *pcMessage) |
Handle a message targeted at this handler. More... | |
String | GetName () const |
Get the handlers name. More... | |
void | SetName (const String &cName) |
Rename the handler. More... | |
Looper * | GetLooper () const |
Get a pointer to the looper this handler belongs to. More... | |
void | SetNextHandler (Handler *pcNextHandler) |
Set a handler that should handle messages this handler is not interrested in. More... | |
Handler * | GetNextHandler () const |
Get the next handler in a handler chain. More... | |
void | AddFilter (MessageFilter *pcFilter) |
void | RemoveFilter (MessageFilter *pcFilter) |
const MsgFilterList & | GetFilterList () const |
const uint32 | GetToken () |
Get the handlers token. More... | |
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 |
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 |
||
) |
References os::font_height::ascender, os::font_height::descender, os::TextView::EI_CONTENT_CHANGED, os::TextView::EI_ENTER_PRESSED, os::TextView::EI_FOCUS_LOST, os::TextView::EI_WAS_EDITED, os::View::GetFontHeight(), os::font_height::line_gap, m_bEnabled, m_bEnforceBackBuffer, m_bIBeamActive, m_bMouseDownSeen, m_bMultiLine, m_bNumeric, m_bPassword, m_bReadOnly, m_bRegionActive, m_cBuffer, m_cLineSizes, m_nCurrentLength, m_nEventMask, m_nMaxLength, m_nMaxUndoSize, m_nPendingEvents, m_nUndoMemSize, m_pcBackBuffer, m_pcBgView, m_pcParent, m_sFontHeight, m_vCsrGfxPos, m_vGlyphHeight, UpdateBackBuffer(), and os::View::View().
TextEdit::~TextEdit | ( | ) |
|
virtual |
The window is locked when this member is called.
bIsActive | - true if the view gain and false if it loose focus. |
Reimplemented from os::View.
References CommitEvents(), os::TextView::EI_FOCUS_LOST, os::View::Flush(), InvalidateLines(), m_cCsrPos, m_nPendingEvents, and os::IPoint::y.
Referenced by os::TextView::Activated().
void TextEdit::AddUndoNode | ( | UndoNode * | psNode | ) |
References os::TextEdit::UndoNode::m_cText, m_cUndoStack, m_iUndoIterator, m_nMaxUndoSize, m_nUndoMemSize, and os::String::size().
Referenced by Delete(), and InsertString().
void TextEdit::Clear | ( | ) |
References os::TextView::EI_CONTENT_CHANGED, os::TextView::EI_MAX_SIZE_LEFT, os::View::Invalidate(), LEFT_BORDER, m_bRegionActive, m_cBuffer, m_cLineSizes, m_cPreferredSize, m_cUndoStack, m_nCurrentLength, m_nMaxLength, m_nPendingEvents, m_nUndoMemSize, m_pcParent, m_vGlyphHeight, RIGHT_BORDER, os::View::ScrollTo(), SetCursor(), TOP_BORDER, os::Point::x, and os::Point::y.
Referenced by os::TextView::Clear(), and os::TextView::Set().
void TextEdit::ClearSelection | ( | ) |
References os::TextView::EI_SELECTION_CHANGED, os::View::Flush(), InvalidateLines(), m_bRegionActive, m_cRegionEnd, m_cRegionStart, m_nPendingEvents, and os::IPoint::y.
Referenced by os::TextView::ClearSelection(), and SetCursor().
void TextEdit::CommitEvents | ( | ) |
References os::TextView::EI_CONTENT_CHANGED, os::TextView::EI_CURSOR_MOVED, os::TextView::EI_ENTER_PRESSED, os::TextView::EI_FOCUS_LOST, os::TextView::EI_WAS_EDITED, os::Invoker::Invoke(), m_cCsrPos, m_cPrevCursorPos, m_nEventMask, m_nPendingEvents, and m_pcParent.
Referenced by Activated(), os::TextView::Clear(), os::TextView::ClearSelection(), os::TextView::Cut(), os::TextView::Delete(), HandleKeyDown(), os::TextView::Insert(), MouseDown(), MouseMove(), MouseUp(), os::TextView::Paste(), os::TextView::Select(), os::TextView::SelectAll(), os::TextView::Set(), and os::TextView::SetCursor().
References AddUndoNode(), BOTTOM_BORDER, os::TextView::EI_CONTENT_CHANGED, os::TextView::EI_MAX_SIZE_LEFT, os::View::Flush(), GetPixelPosX(), GetRegion(), os::View::Invalidate(), InvalidateLines(), m_cBuffer, m_cCsrPos, os::TextEdit::UndoNode::m_cEndPos, m_cLineSizes, os::TextEdit::UndoNode::m_cPos, m_cPreferredSize, os::TextEdit::UndoNode::m_cText, m_nCurrentLength, m_nMaxLength, m_nPendingEvents, m_vGlyphHeight, MakeCsrVisible(), RecalcPrefWidth(), RIGHT_BORDER, TOP_BORDER, UNDO_DELETE, os::IPoint::x, os::Point::y, and os::IPoint::y.
Referenced by os::TextView::Cut(), and os::TextView::Delete().
void TextEdit::Delete | ( | ) |
References m_bRegionActive, m_cBuffer, m_cCsrPos, m_cRegionEnd, m_cRegionStart, os::utf8_char_length(), os::IPoint::x, and os::IPoint::y.
Referenced by HandleKeyDown(), Redo(), and Undo().
void TextEdit::DrawCursor | ( | View * | pcView = NULL , |
float | vHOffset = 0.0f , |
||
float | vVOffset = 0.0f |
||
) |
References os::font_height::ascender, os::font_height::descender, DM_COPY, DM_INVERT, os::View::DrawLine(), os::View::GetBounds(), GetPixelPosX(), os::View::HasFocus(), os::Rect::Height(), m_bEnabled, m_bMultiLine, m_bReadOnly, m_bRegionActive, m_cBuffer, m_cCsrPos, m_cRegionEnd, m_pcParent, m_sCurFgColor, m_sFontHeight, m_vGlyphHeight, os::View::SetDrawingMode(), os::View::SetFgColor(), TOP_BORDER, os::IPoint::x, and os::IPoint::y.
Referenced by RenderLine().
|
virtual |
pcNewFont | Pointer to the affected font (same as returned by GetFont()). |
Reimplemented from os::View.
References os::font_height::ascender, BOTTOM_BORDER, os::font_height::descender, os::View::Flush(), os::View::GetFontHeight(), GetPixelPosX(), os::View::Invalidate(), LEFT_BORDER, os::font_height::line_gap, m_bEnforceBackBuffer, m_cBuffer, m_cLineSizes, m_cPreferredSize, m_pcBgView, m_pcParent, m_sFontHeight, m_vGlyphHeight, RIGHT_BORDER, os::View::SetFont(), TOP_BORDER, UpdateBackBuffer(), os::Point::x, and os::Point::y.
|
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.
References MakeCsrVisible(), and UpdateBackBuffer().
|
inline |
References m_cBuffer.
Referenced by os::TextView::GetBuffer().
int TextEdit::GetCharPosX | ( | const String & | cString, |
float | vPos | ||
) |
References os::String::c_str(), os::View::GetStringLength(), os::View::GetStringWidth(), and os::String::size().
Referenced by MouseDown(), MouseMove(), and MoveVert().
size_t TextEdit::GetCurrentLength | ( | ) | const |
References m_nCurrentLength.
Referenced by os::TextView::GetCurrentLength().
IPoint TextEdit::GetCursor | ( | ) | const |
References m_cCsrPos.
Referenced by os::TextView::GetCursor().
uint32 TextEdit::GetEventMask | ( | ) | const |
References m_nEventMask.
Referenced by os::TextView::GetEventMask().
size_t TextEdit::GetMaxLength | ( | ) | const |
References m_nMaxLength.
Referenced by os::TextView::GetMaxLength().
IPoint TextEdit::GetMaxPreferredSize | ( | ) | const |
References m_cMaxPreferredSize.
Referenced by os::TextView::GetMaxPreferredSize().
|
inline |
References m_nMaxUndoSize.
Referenced by os::TextView::GetMaxUndoSize().
IPoint TextEdit::GetMinPreferredSize | ( | ) | const |
References m_cMinPreferredSize.
Referenced by os::TextView::GetMinPreferredSize().
|
inline |
References m_bMultiLine.
Referenced by os::TextView::GetMultiLine(), and os::TextView::SetMultiLine().
|
inline |
References m_bNumeric.
Referenced by os::TextView::GetNumeric().
bool TextEdit::GetPasswordMode | ( | ) | const |
References m_bPassword.
Referenced by os::TextView::GetPasswordMode().
float TextEdit::GetPixelPosX | ( | const String & | cString, |
int | x | ||
) |
References os::String::c_str(), os::View::GetStringWidth(), LEFT_BORDER, m_bPassword, and os::String::size().
Referenced by Delete(), DrawCursor(), FontChanged(), InsertString(), MakeCsrVisible(), MoveVert(), and RenderLine().
float TextEdit::GetPixelPosY | ( | int | y | ) |
References m_vGlyphHeight, and TOP_BORDER.
|
virtual |
Reimplemented from os::View.
References BOTTOM_BORDER, os::View::GetStringWidth(), LEFT_BORDER, m_bMultiLine, m_cBuffer, m_cMaxPreferredSize, m_cMinPreferredSize, m_vGlyphHeight, RIGHT_BORDER, TOP_BORDER, os::IPoint::x, and os::IPoint::y.
Referenced by os::TextView::GetPreferredSize().
bool TextEdit::GetReadOnly | ( | ) | const |
References m_bReadOnly.
Referenced by os::TextView::GetReadOnly().
void TextEdit::GetRegion | ( | IPoint | cStart, |
IPoint | cEnd, | ||
String * | pcBuffer, | ||
bool | bAddToClipboard = true |
||
) | const |
References os::Message::AddString(), os::Clipboard::Clear(), os::Clipboard::Commit(), os::Clipboard::GetData(), os::Clipboard::Lock(), m_bPassword, m_cBuffer, os::Clipboard::Unlock(), os::IPoint::x, and os::IPoint::y.
Referenced by os::TextView::Copy(), os::TextView::Cut(), Delete(), os::TextView::GetRegion(), GetRegion(), os::TextView::GetValue(), and HandleKeyDown().
void TextEdit::GetRegion | ( | String * | pcBuffer, |
bool | bAddToClipboard = true |
||
) | const |
References GetRegion(), m_cRegionEnd, and m_cRegionStart.
References m_bRegionActive, m_cRegionEnd, and m_cRegionStart.
Referenced by os::TextView::GetSelection().
bool TextEdit::HandleKeyDown | ( | const char * | pzString, |
const char * | pzRawString, | ||
uint32 | nQualifiers | ||
) |
References os::String::c_str(), CommitEvents(), Delete(), os::TextView::EI_ENTER_PRESSED, os::TextView::EI_ESC_PRESSED, os::TextView::FilterKeyStroke(), os::Message::FindString(), os::View::GetBounds(), os::Clipboard::GetData(), GetRegion(), os::View::Height(), InsertString(), os::is_first_utf8_byte(), os::Clipboard::Lock(), m_bEnabled, m_bMultiLine, m_bNumeric, m_bReadOnly, m_bRegionActive, m_cBuffer, m_cCsrPos, m_nPendingEvents, m_pcParent, m_vCsrGfxPos, m_vGlyphHeight, os::View::MakeFocus(), MoveHoriz(), MoveVert(), MoveWord(), QUAL_ALT, QUAL_CTRL, QUAL_DEADKEY, QUAL_LALT, QUAL_SHIFT, Redo(), SetCursor(), Undo(), os::Clipboard::Unlock(), os::utf8_char_length(), VK_BACKSPACE, VK_DELETE, VK_DOWN_ARROW, VK_END, VK_ENTER, VK_ESCAPE, VK_HOME, VK_INSERT, VK_LEFT_ARROW, VK_PAGE_DOWN, VK_PAGE_UP, VK_RIGHT_ARROW, VK_UP_ARROW, os::IPoint::x, and os::IPoint::y.
Referenced by os::TextView::KeyDown().
void TextEdit::InsertChar | ( | char | nChar | ) |
References InsertString().
void TextEdit::InsertString | ( | IPoint * | pcPos, |
const char * | pzBuffer, | ||
bool | bMakeUndo = true |
||
) |
References AddUndoNode(), os::Rect::bottom, os::TextView::EI_CONTENT_CHANGED, os::TextView::EI_MAX_SIZE_REACHED, os::View::Flush(), os::View::GetBounds(), GetPixelPosX(), os::View::Invalidate(), os::Rect::left, m_bMultiLine, m_cBuffer, m_cCsrPos, os::TextEdit::UndoNode::m_cEndPos, m_cLineSizes, os::TextEdit::UndoNode::m_cPos, m_cPreferredSize, os::TextEdit::UndoNode::m_cText, m_nCurrentLength, m_nMaxLength, m_nPendingEvents, m_vCsrGfxPos, m_vGlyphHeight, MakeCsrVisible(), RecalcPrefWidth(), RIGHT_BORDER, os::String::size(), os::Rect::top, TOP_BORDER, UNDO_INSERT, os::utf8_char_length(), os::Point::x, os::IPoint::x, os::Point::y, and os::IPoint::y.
Referenced by HandleKeyDown(), os::TextView::Insert(), InsertChar(), os::TextView::Paste(), Redo(), os::TextView::Set(), and Undo().
void TextEdit::InvalidateLines | ( | int | nFirst, |
int | nLast | ||
) |
References os::Rect::bottom, os::View::GetBounds(), os::View::Invalidate(), m_bMultiLine, m_vGlyphHeight, os::Rect::top, and TOP_BORDER.
Referenced by Activated(), ClearSelection(), Delete(), Select(), and SetCursor().
bool TextEdit::IsEnabled | ( | ) | const |
References m_bEnabled.
void TextEdit::MakeCsrVisible | ( | ) |
References os::Rect::bottom, BOTTOM_BORDER, os::View::GetBounds(), GetPixelPosX(), os::Rect::left, LEFT_BORDER, m_bMultiLine, m_cBuffer, m_cCsrPos, m_pcParent, m_vGlyphHeight, os::Rect::right, RIGHT_BORDER, os::Rect::top, TOP_BORDER, os::IPoint::x, and os::IPoint::y.
Referenced by Delete(), FrameSized(), InsertString(), os::TextView::MakeCsrVisible(), and SetCursor().
void TextEdit::MaybeDrawString | ( | View * | pcView, |
float | vHOffset, | ||
const char * | pzString, | ||
int | nLength | ||
) |
References os::View::DrawString(), os::View::GetPenPosition(), m_bPassword, os::View::MovePenBy(), os::View::Sync(), and os::Point::x.
Referenced by RenderLine().
|
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.
References CommitEvents(), os::View::Flush(), GetCharPosX(), m_bEnabled, m_bMouseDownSeen, m_cBuffer, m_pcParent, m_vGlyphHeight, os::View::MakeFocus(), os::View::MouseDown(), SetCursor(), TOP_BORDER, os::Point::x, os::IPoint::x, os::Point::y, and os::IPoint::y.
|
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.
References CommitEvents(), os::View::GetBounds(), GetCharPosX(), os::Application::GetInstance(), m_bEnabled, m_bIBeamActive, m_bMouseDownSeen, m_cBuffer, m_vGlyphHeight, os::MOUSE_ENTERED, os::MOUSE_EXITED, os::View::MouseMove(), MPTR_MONO, POINTER_HEIGHT, POINTER_WIDTH, os::Application::PopCursor(), os::Application::PushCursor(), SetCursor(), TOP_BORDER, os::Point::x, os::IPoint::x, os::Point::y, and os::IPoint::y.
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.
References CommitEvents(), os::TextView::EI_SELECTION_CHANGED, m_bMouseDownSeen, m_bRegionActive, m_cRegionEnd, m_cRegionStart, m_nPendingEvents, and os::View::MouseUp().
void TextEdit::MoveHoriz | ( | int | nDelta, |
bool | bExpBlock | ||
) |
References m_bMultiLine, m_cBuffer, m_cCsrPos, SetCursor(), os::IPoint::x, and os::IPoint::y.
Referenced by HandleKeyDown().
void TextEdit::MoveVert | ( | int | nDelta, |
bool | bExpBlock | ||
) |
References GetCharPosX(), GetPixelPosX(), m_bMultiLine, m_cBuffer, m_cCsrPos, m_vCsrGfxPos, SetCursor(), os::IPoint::x, and os::IPoint::y.
Referenced by HandleKeyDown().
void TextEdit::MoveWord | ( | bool | bDirection, |
bool | bExpBlock | ||
) |
References m_cBuffer, m_cCsrPos, SetCursor(), os::IPoint::x, and os::IPoint::y.
Referenced by HandleKeyDown().
|
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.
References os::Rect::bottom, os::Rect::Bounds(), os::View::DrawBitmap(), os::View::FillRect(), os::Bitmap::GetBounds(), os::View::GetBounds(), os::View::GetStringWidth(), os::Rect::left, LEFT_BORDER, m_bEnforceBackBuffer, m_bMultiLine, m_cBuffer, m_cCsrPos, m_pcBackBuffer, m_pcBgView, m_sCurBgColor, m_vGlyphHeight, RenderLine(), os::Rect::right, RIGHT_BORDER, os::View::SetFgColor(), os::View::Sync(), os::Rect::top, TOP_BORDER, os::View::Width(), and os::IPoint::x.
void TextEdit::RecalcPrefWidth | ( | ) |
References LEFT_BORDER, m_cBuffer, m_cLineSizes, m_cPreferredSize, RIGHT_BORDER, and os::Point::x.
Referenced by Delete(), and InsertString().
void TextEdit::Redo | ( | ) |
References os::String::c_str(), Delete(), InsertString(), m_bRegionActive, m_cCsrPos, os::TextEdit::UndoNode::m_cEndPos, os::TextEdit::UndoNode::m_cPos, os::TextEdit::UndoNode::m_cText, m_cUndoStack, m_iUndoIterator, os::TextEdit::UndoNode::m_nMode, UNDO_DELETE, and UNDO_INSERT.
Referenced by HandleKeyDown(), and os::TextView::Redo().
void TextEdit::RenderLine | ( | View * | pcView, |
int | y, | ||
float | vHOffset, | ||
float | vVOffset, | ||
bool | bClear = true |
||
) |
References os::font_height::ascender, os::Rect::bottom, os::font_height::descender, DrawCursor(), os::View::FillRect(), os::View::GetBounds(), GetPixelPosX(), os::Rect::Height(), os::Rect::left, LEFT_BORDER, os::font_height::line_gap, m_bMultiLine, m_bRegionActive, m_cBuffer, m_cCsrPos, m_cRegionEnd, m_cRegionStart, m_sCurBgColor, m_sCurFgColor, m_sFontHeight, m_vGlyphHeight, MaybeDrawString(), os::View::MovePenTo(), os::Rect::right, os::View::SetBgColor(), os::View::SetFgColor(), os::Rect::top, TOP_BORDER, os::IPoint::x, and os::IPoint::y.
Referenced by Paint().
References os::TextView::EI_SELECTION_CHANGED, InvalidateLines(), m_bRegionActive, m_cRegionEnd, m_cRegionStart, m_nPendingEvents, os::IPoint::x, and os::IPoint::y.
Referenced by os::TextView::Select(), SelectAll(), and SetCursor().
void TextEdit::SelectAll | ( | ) |
References m_cBuffer, and Select().
Referenced by os::TextView::SelectAll().
void TextEdit::SetCursor | ( | const IPoint & | cPos, |
bool | bSelect | ||
) |
References ClearSelection(), os::TextView::EI_CURSOR_MOVED, os::View::Flush(), InvalidateLines(), m_bMultiLine, m_bRegionActive, m_cBuffer, m_cCsrPos, m_cRegionStart, m_nPendingEvents, MakeCsrVisible(), Select(), os::IPoint::x, and os::IPoint::y.
Referenced by Clear(), HandleKeyDown(), os::TextView::Insert(), MouseDown(), MouseMove(), MoveHoriz(), MoveVert(), MoveWord(), os::TextView::Set(), and os::TextView::SetCursor().
void TextEdit::SetEnable | ( | bool | bEnabled = true | ) |
References os::COL_NORMAL, os::View::Flush(), os::get_default_color(), os::View::GetBounds(), os::View::Invalidate(), m_bEnabled, m_sCurBgColor, and m_sCurFgColor.
Referenced by os::TextView::EnableStatusChanged().
void TextEdit::SetEventMask | ( | uint32 | nMask | ) |
References m_nEventMask.
Referenced by os::TextView::SetEventMask().
void TextEdit::SetMaxLength | ( | size_t | nMaxLength | ) |
References m_nMaxLength.
Referenced by os::TextView::SetMaxLength().
void TextEdit::SetMaxPreferredSize | ( | int | nWidthChars, |
int | nHeightChars | ||
) |
References m_cMaxPreferredSize.
Referenced by os::TextView::SetMaxPreferredSize().
void TextEdit::SetMaxUndoSize | ( | int | nSize | ) |
References os::TextEdit::UndoNode::m_cText, m_cUndoStack, m_nMaxUndoSize, m_nUndoMemSize, and os::String::size().
Referenced by os::TextView::SetMaxUndoSize().
void TextEdit::SetMinPreferredSize | ( | int | nWidthChars, |
int | nHeightChars | ||
) |
References m_cMinPreferredSize.
Referenced by os::TextView::SetMinPreferredSize().
|
inline |
References m_bMultiLine.
Referenced by os::TextView::SetMultiLine().
|
inline |
References m_bNumeric.
Referenced by os::TextView::SetNumeric().
void TextEdit::SetPasswordMode | ( | bool | bPassword | ) |
References m_bPassword.
Referenced by os::TextView::SetPasswordMode().
void TextEdit::SetReadOnly | ( | bool | bFlag | ) |
References m_bReadOnly, and UpdateBackBuffer().
Referenced by os::TextView::SetReadOnly().
void TextEdit::Undo | ( | ) |
References os::String::c_str(), Delete(), InsertString(), m_bRegionActive, m_cCsrPos, os::TextEdit::UndoNode::m_cEndPos, os::TextEdit::UndoNode::m_cPos, os::TextEdit::UndoNode::m_cText, m_cUndoStack, m_iUndoIterator, os::TextEdit::UndoNode::m_nMode, UNDO_DELETE, and UNDO_INSERT.
Referenced by HandleKeyDown(), and os::TextView::Undo().
void TextEdit::UpdateBackBuffer | ( | ) |
References os::Bitmap::ACCEPT_VIEWS, os::Bitmap::AddChild(), CS_RGB16, os::Bitmap::GetBounds(), os::View::GetBounds(), os::Rect::Height(), m_bMultiLine, m_pcBackBuffer, m_pcBgView, m_vGlyphHeight, os::Bitmap::RemoveChild(), os::View::SetFrame(), and os::Rect::Width().
Referenced by FontChanged(), FrameSized(), SetReadOnly(), and TextEdit().
bool os::TextEdit::m_bEnabled |
Referenced by DrawCursor(), HandleKeyDown(), IsEnabled(), MouseDown(), MouseMove(), SetEnable(), and TextEdit().
bool os::TextEdit::m_bEnforceBackBuffer |
Referenced by FontChanged(), Paint(), and TextEdit().
bool os::TextEdit::m_bIBeamActive |
Referenced by MouseMove(), TextEdit(), and ~TextEdit().
bool os::TextEdit::m_bMouseDownSeen |
Referenced by MouseDown(), MouseMove(), MouseUp(), and TextEdit().
bool os::TextEdit::m_bMultiLine |
bool os::TextEdit::m_bNumeric |
Referenced by GetNumeric(), HandleKeyDown(), SetNumeric(), and TextEdit().
bool os::TextEdit::m_bPassword |
Referenced by GetPasswordMode(), GetPixelPosX(), GetRegion(), MaybeDrawString(), SetPasswordMode(), and TextEdit().
bool os::TextEdit::m_bReadOnly |
Referenced by DrawCursor(), GetReadOnly(), HandleKeyDown(), SetReadOnly(), and TextEdit().
bool os::TextEdit::m_bRegionActive |
Referenced by Clear(), ClearSelection(), Delete(), DrawCursor(), GetSelection(), HandleKeyDown(), MouseUp(), Redo(), RenderLine(), Select(), SetCursor(), TextEdit(), and Undo().
TextView::buffer_type os::TextEdit::m_cBuffer |
Referenced by Clear(), Delete(), DrawCursor(), FontChanged(), GetBuffer(), GetPreferredSize(), GetRegion(), HandleKeyDown(), InsertString(), MakeCsrVisible(), MouseDown(), MouseMove(), MoveHoriz(), MoveVert(), MoveWord(), Paint(), RecalcPrefWidth(), RenderLine(), SelectAll(), SetCursor(), and TextEdit().
IPoint os::TextEdit::m_cCsrPos |
Referenced by Activated(), CommitEvents(), Delete(), DrawCursor(), GetCursor(), HandleKeyDown(), InsertString(), os::TextView::Invoked(), MakeCsrVisible(), MoveHoriz(), MoveVert(), MoveWord(), Paint(), Redo(), RenderLine(), SetCursor(), and Undo().
std::vector< float > os::TextEdit::m_cLineSizes |
Referenced by Clear(), Delete(), FontChanged(), InsertString(), RecalcPrefWidth(), and TextEdit().
IPoint os::TextEdit::m_cMaxPreferredSize |
Referenced by GetMaxPreferredSize(), GetPreferredSize(), and SetMaxPreferredSize().
IPoint os::TextEdit::m_cMinPreferredSize |
Referenced by GetMinPreferredSize(), GetPreferredSize(), and SetMinPreferredSize().
Point os::TextEdit::m_cPreferredSize |
Referenced by Clear(), Delete(), FontChanged(), InsertString(), and RecalcPrefWidth().
IPoint os::TextEdit::m_cPrevCursorPos |
Referenced by CommitEvents(), and os::TextView::Invoked().
IPoint os::TextEdit::m_cRegionEnd |
Referenced by ClearSelection(), Delete(), DrawCursor(), GetRegion(), GetSelection(), MouseUp(), RenderLine(), and Select().
IPoint os::TextEdit::m_cRegionStart |
Referenced by ClearSelection(), Delete(), GetRegion(), GetSelection(), MouseUp(), RenderLine(), Select(), and SetCursor().
std::list<UndoNode * > os::TextEdit::m_cUndoStack |
Referenced by AddUndoNode(), Clear(), Redo(), SetMaxUndoSize(), Undo(), and ~TextEdit().
std::list<UndoNode * >::iterator os::TextEdit::m_iUndoIterator |
Referenced by AddUndoNode(), Redo(), and Undo().
int os::TextEdit::m_nCurrentLength |
Referenced by Clear(), Delete(), GetCurrentLength(), InsertString(), and TextEdit().
uint32 os::TextEdit::m_nEventMask |
Referenced by CommitEvents(), GetEventMask(), os::TextView::Invoked(), SetEventMask(), and TextEdit().
int os::TextEdit::m_nMaxLength |
Referenced by Clear(), Delete(), GetMaxLength(), InsertString(), SetMaxLength(), and TextEdit().
int os::TextEdit::m_nMaxUndoSize |
Referenced by AddUndoNode(), GetMaxUndoSize(), SetMaxUndoSize(), and TextEdit().
uint32 os::TextEdit::m_nPendingEvents |
Referenced by Activated(), Clear(), ClearSelection(), CommitEvents(), Delete(), HandleKeyDown(), InsertString(), os::TextView::Invoked(), MouseUp(), Select(), SetCursor(), and TextEdit().
int os::TextEdit::m_nUndoMemSize |
Referenced by AddUndoNode(), Clear(), SetMaxUndoSize(), and TextEdit().
Bitmap* os::TextEdit::m_pcBackBuffer |
Referenced by Paint(), TextEdit(), UpdateBackBuffer(), and ~TextEdit().
View* os::TextEdit::m_pcBgView |
Referenced by FontChanged(), Paint(), TextEdit(), UpdateBackBuffer(), and ~TextEdit().
TextView* os::TextEdit::m_pcParent |
Referenced by Clear(), CommitEvents(), DrawCursor(), FontChanged(), HandleKeyDown(), MakeCsrVisible(), MouseDown(), and TextEdit().
Color32_s os::TextEdit::m_sCurBgColor |
Referenced by Paint(), RenderLine(), and SetEnable().
Color32_s os::TextEdit::m_sCurFgColor |
Referenced by DrawCursor(), RenderLine(), and SetEnable().
font_height os::TextEdit::m_sFontHeight |
Referenced by DrawCursor(), FontChanged(), RenderLine(), and TextEdit().
float os::TextEdit::m_vCsrGfxPos |
Referenced by HandleKeyDown(), InsertString(), MoveVert(), and TextEdit().
float os::TextEdit::m_vGlyphHeight |