Public Member Functions | |
| TextView (Window *pParent, const Rect rFrame, unsigned int nWindowLayoutFlags, unsigned int uiTextViewFlags=0) | |
| TextView (Window *pParent, const Point pPos, unsigned int nWindowLayoutFlags, unsigned int uiTextViewFlags=TEXTVIEW_FLAG_SINGLE_LINE) | |
| ~TextView () | |
| void | Paint (const Rect &rDirty) |
| void | SetTextFlags (TextFlags nTextFlags) |
| TextFlags | GetTextFlags () |
| Point | GetSizeHint (enumSizeHint nSizeHint) |
| void | HandleMessage (const Message *pMessage) |
| void | ScrollToLine (int iTopLine) |
| void | KeyDown (const InputEvent &nInputEvent) |
| void | OnTimer (int iTimerID, void *vpCookie) |
| bool | FocusGet () |
| bool | FocusLost () |
| void | MouseDown (const InputEvent &nInputEvent) |
| void | MouseWheel (const InputEvent &nInputEvent) |
| void | Sized (const Point &pDelta) |
| Document * | GetDocument () |
| DocumentBuffer & | GetBuffer () |
| int | GetLines () |
| void | Set (const String &pString) |
| void | Insert (const String &pString, const Point &cPos, bool bUndoAble=false, Rect *rUpdateRect=NULL, Point *pNewPos=NULL) |
| void | Append (const String &pString, bool bAsNewLine=false, bool bUndoAble=false) |
| void | Remove (const Point &cPos, bool bUndoAble=false, Rect *rUpdateRect=NULL, Point *pNewPos=NULL) |
| void | Remove (const Point &cTL, const Point &cBR, bool bUndoAble=false) |
| void | Clear () |
| bool | LoseFocus () |
| void | Enable (bool bEnable=true) |
| void | SetPasswordMode (bool bEnable) |
| bool | GetPasswordMode () |
| void | SetLeadingImage (Image *pImage, int iLeadingSpacing) |
| virtual void | OnChanged () |
| virtual void | OnConfirm () |
| virtual void | SetCursor (unsigned int uiCursorPositionFlag) |
| virtual void | SetDocumentParser (DocumentParser *pDocumentParser) |
| DocumentParser * | GetDocumentParser () |
| void | MouseMove (const InputEvent &nInputEvent) |
| void | MouseUp (const InputEvent &nInputEvent) |
| bool | LoadDocument (const String &szFilePath) |
| bool | SaveDocument (const String &szFilePath) |
| bool | SetFont (Font *pFont) |
| void | SetSelection (const Point &cTopLeft, const Point &cBottomRight) |
| void | ClearSelection (bool bRemoveSelectedText) |
| bool | GetSelectionRectangle (Point &pRectTopLeft, Point &pRectBottomRight) |
| void | MoveCursorHorizontal (int iDelta, bool bSelect=false) |
| void | MoveCursorVertical (int iDelta, bool bSelect=false) |
| bool | GetSelectedText (String *pText) |
| bool | GetText (String *pText, int iLeft, int iTop, int iRight, int iBottom) |
| void | Copy () |
| void | Paste () |
| void | Delete () |
| void | Cut () |
| void | SelectAll () |
| bool | PointInsideSelection (const Point &pPoint) |
| void | AddUndoNode (const String &szText, int enumAction, const Point &pPos) |
| void | Undo () |
| void | Redo () |
| void | ClearUndoNodes () |
| int | UndoCount () |
| int | RedoCount () |
| bool | IsDirty () |
| void | SetDirty (bool bDirty) |
| void | ScrollToEnd () |
| void | ScrollToBegin () |
| bool | ScrollUp (int iLines=1) |
| bool | ScrollDown (int iLines=1) |
| void | SwitchFocusOnEnter (bool bSwitch) |
| virtual void | OnContextMenu (const InputEvent &nInputEvent) |
| virtual void | OnCursorPositionChanged (const Point &pPosition) |
| Point | GetCursorPosition () |
| void | EnableFindBar (bool bEnable) |
| bool | FindBarEnabled () |
| void | ShowFindBar () |
| void | OnVerticalScroll (int iValue, int iOldValue) |
| DocumentLine * | GetLine (int iLine) |
| String | GetWordAt (const Point &cPos) |
| String | GetWordAt (const Point &cPos, Rect &rRect) |
| bool | IsTextSelected () |
Public Attributes | |
| signal0 | Changed |
| signal0 | Confirm |
| signal1< const InputEvent & > | ContextMenu |
| signal1< const Point & > | CursorPositionChanged |
| signal0 | Dirty |
Protected Member Functions | |
| void | SetCursorPosition (const Point &nNewPos, bool bUpdateLayer, bool bShift, bool bRemoveSelection, bool bClearSelection=true) |
| void | InvalidateLine (int iLine, int iNumLines=1) |
| void | InvalidateUpdateRect (const Rect &rUpdateRect) |
clipboard.cpp, diskdevice.cpp, eventthread.cpp, layoutview.cpp, listview.cpp, localization.cpp, messagebox.cpp, networkinterface.cpp, progressbar.cpp, splitter.cpp, tabview.cpp, textview.cpp, and thread.cpp.
| TextView::TextView | ( | Window * | pParent, | |
| const Rect | rFrame, | |||
| unsigned int | nWindowLayoutFlags, | |||
| unsigned int | uiTextViewFlags = 0 | |||
| ) |
TextView Constructor
| pParent | Passed to the Window constructor | |
| rFrame | Passed to the Window constructor | |
| nWindowLayoutFlags | Passed to the Window constructor | |
| uiTextViewFlags | TextView specific flags |
| TextView::TextView | ( | Window * | pParent, | |
| const Point | pPos, | |||
| unsigned int | nWindowLayoutFlags, | |||
| unsigned int | uiTextViewFlags = TEXTVIEW_FLAG_SINGLE_LINE | |||
| ) |
| TextView::~TextView | ( | ) |
| void TextView::Paint | ( | const Rect & | rDirty | ) | [virtual] |
Paint window content
| rDirty | - Dirty rectangular region which has to be redrawn. Prior entering this function the painters clip region is automatically set to this dirty region. |
Reimplemented from SkyGI::ScrollView.
| void TextView::SetTextFlags | ( | TextFlags | nTextFlags | ) |
| TextFlags TextView::GetTextFlags | ( | ) |
| Point TextView::GetSizeHint | ( | enumSizeHint | nSizeHint | ) | [virtual] |
Get size hint
Reimplemented from SkyGI::Window.
| void TextView::HandleMessage | ( | const Message * | pMessage | ) | [virtual] |
Reimplemented from SkyGI::Window.
| void TextView::ScrollToLine | ( | int | iTopLine | ) |
| void TextView::KeyDown | ( | const InputEvent & | nInputEvent | ) | [virtual] |
Reimplemented from SkyGI::Window.
Reimplemented in SkyGI::ComboTextView, FindBarTextView, and SkyGI::ListViewNodeEdit.
| void TextView::OnTimer | ( | int | iTimerID, | |
| void * | vpCookie | |||
| ) | [virtual] |
Reimplemented from SkyGI::Window.
| bool TextView::FocusGet | ( | ) | [virtual] |
Reimplemented from SkyGI::Window.
| bool TextView::FocusLost | ( | ) | [virtual] |
| void TextView::MouseDown | ( | const InputEvent & | nInputEvent | ) | [virtual] |
Mouse pressed
| nButton | - MouseButton which was pressed | |
| nMouseButtonMask | - Mask showing which mouse buttons were pressed when the mouse press occured | |
| nInputEvent | - INPUT_EVENT_MOUSE_PRESS for a single and INPUTE_EVENT_MOUSE_DOUBLECLICK for a doubleclick |
Reimplemented from SkyGI::Window.
| void TextView::MouseWheel | ( | const InputEvent & | nInputEvent | ) | [virtual] |
Reimplemented from SkyGI::Window.
| void TextView::Sized | ( | const Point & | pDelta | ) | [virtual] |
Called when window is resized
| pDelta | - Size the window was resized |
Reimplemented from SkyGI::Window.
| Document * TextView::GetDocument | ( | ) |
| DocumentBuffer & TextView::GetBuffer | ( | ) |
Get the TextView content
| int TextView::GetLines | ( | ) |
| void TextView::Set | ( | const String & | pString | ) |
Set text of text view
| pString | Text to insert |
| void TextView::Append | ( | const String & | pString, | |
| bool | bAsNewLine = false, |
|||
| bool | bUndoAble = false | |||
| ) |
Append text to the TextView
| pString | Text to add, may contain a newline to add multiple lines at once | |
| bAsNewLine | If true the text will be added at the bottom starting in a new line |
| void TextView::Remove | ( | const Point & | cPos, | |
| bool | bUndoAble = false, |
|||
| Rect * | rUpdateRect = NULL, |
|||
| Point * | pNewPos = NULL | |||
| ) |
| void TextView::Clear | ( | ) |
| bool TextView::LoseFocus | ( | ) | [virtual] |
Focus about to be removed
Reimplemented from SkyGI::Window.
| void TextView::Enable | ( | bool | bEnable = true |
) | [virtual] |
Reimplemented from SkyGI::Window.
| void TextView::SetPasswordMode | ( | bool | bEnable | ) |
| bool TextView::GetPasswordMode | ( | ) |
| void TextView::SetLeadingImage | ( | Image * | pImage, | |
| int | iLeadingSpacing | |||
| ) |
| void TextView::OnChanged | ( | ) | [virtual] |
| void TextView::OnConfirm | ( | ) | [virtual] |
Reimplemented in SkyGI::ListViewNodeEdit.
| void TextView::SetCursor | ( | unsigned int | uiCursorPositionFlag | ) | [virtual] |
| void TextView::SetDocumentParser | ( | DocumentParser * | pDocumentParser | ) | [virtual] |
| DocumentParser * TextView::GetDocumentParser | ( | ) |
| void TextView::MouseMove | ( | const InputEvent & | nInputEvent | ) | [virtual] |
Mouse move
| pNewPosition | - Current mouse cursor position | |
| pOldPosition | - Old mouse cursor position | |
| nMouseButtonMask | - Mask showing which mouse buttons were pressed when the mouse move occured |
Reimplemented from SkyGI::Window.
| void TextView::MouseUp | ( | const InputEvent & | nInputEvent | ) | [virtual] |
Mouse release
| nButton | - MouseButton which was released | |
| nMouseButtonMask | - Mask showing which additional mouse buttons were pressed when the mouse release occured | |
| nInputEvent | - INPUT_EVENT_MOUSE_RELEASE |
Reimplemented from SkyGI::Window.
| bool TextView::LoadDocument | ( | const String & | szFilePath | ) |
| bool TextView::SaveDocument | ( | const String & | szFilePath | ) |
| bool TextView::SetFont | ( | Font * | pFont | ) | [virtual] |
Reimplemented from SkyGI::Window.
| void TextView::ClearSelection | ( | bool | bRemoveSelectedText | ) |
| void TextView::MoveCursorHorizontal | ( | int | iDelta, | |
| bool | bSelect = false | |||
| ) |
| void TextView::MoveCursorVertical | ( | int | iDelta, | |
| bool | bSelect = false | |||
| ) |
| bool TextView::GetSelectedText | ( | String * | pText | ) |
| bool TextView::GetText | ( | String * | pText, | |
| int | iLeft, | |||
| int | iTop, | |||
| int | iRight, | |||
| int | iBottom | |||
| ) |
| void TextView::Copy | ( | ) |
| void TextView::Paste | ( | ) |
| void TextView::Delete | ( | ) |
| void TextView::Cut | ( | ) |
| void TextView::SelectAll | ( | ) |
| bool TextView::PointInsideSelection | ( | const Point & | pPoint | ) |
| void TextView::Undo | ( | ) |
| void TextView::Redo | ( | ) |
| void TextView::ClearUndoNodes | ( | ) |
| int TextView::UndoCount | ( | ) |
| int TextView::RedoCount | ( | ) |
| bool TextView::IsDirty | ( | ) |
| void TextView::SetDirty | ( | bool | bDirty | ) |
| void TextView::ScrollToEnd | ( | ) |
| void TextView::ScrollToBegin | ( | ) |
| bool TextView::ScrollUp | ( | int | iLines = 1 |
) |
| bool TextView::ScrollDown | ( | int | iLines = 1 |
) |
| void SkyGI::TextView::SwitchFocusOnEnter | ( | bool | bSwitch | ) | [inline] |
| void TextView::OnContextMenu | ( | const InputEvent & | nInputEvent | ) | [virtual] |
| void TextView::OnCursorPositionChanged | ( | const Point & | pPosition | ) | [virtual] |
| Point TextView::GetCursorPosition | ( | ) |
| void SkyGI::TextView::EnableFindBar | ( | bool | bEnable | ) | [inline] |
| bool SkyGI::TextView::FindBarEnabled | ( | ) | [inline] |
| void TextView::ShowFindBar | ( | ) |
| void TextView::OnVerticalScroll | ( | int | iValue, | |
| int | iOldValue | |||
| ) | [virtual] |
Gets called when a ScrollBar action occured
Overload this method to react on ScrollBar events. Optionally you can directly connect to a method to the ScrollBar::Changed signal.
Reimplemented from SkyGI::ScrollView.
| DocumentLine * TextView::GetLine | ( | int | iLine | ) |
| bool TextView::IsTextSelected | ( | ) |
| void TextView::SetCursorPosition | ( | const Point & | nNewPos, | |
| bool | bUpdateLayer, | |||
| bool | bShift, | |||
| bool | bRemoveSelection, | |||
| bool | bClearSelection = true | |||
| ) | [protected] |
| void TextView::InvalidateLine | ( | int | iLine, | |
| int | iNumLines = 1 | |||
| ) | [protected] |
| void TextView::InvalidateUpdateRect | ( | const Rect & | rUpdateRect | ) | [protected] |
| signal0 SkyGI::TextView::Changed |
| signal0 SkyGI::TextView::Confirm |
| signal1<const InputEvent&> SkyGI::TextView::ContextMenu |
| signal1<const Point&> SkyGI::TextView::CursorPositionChanged |
| signal0 SkyGI::TextView::Dirty |
1.5.1-p1