VCF::Win32Edit Class Reference
#include <Win32Edit.h>
Inheritance diagram for VCF::Win32Edit:

Public Types | |
| enum | EditState { esMultiLined = 0x0001, esStyleChanging = 0x0010, esPeerTextChanging = 0x0100, esModelTextChanging = 0x0200, esExternalTextChanging = 0x0400, esKeyEvent = 0x1000 } |
Public Member Functions | |
| Win32Edit (TextControl *component, const bool &isMultiLineControl) | |
| virtual | ~Win32Edit () |
| virtual void | create (Control *owningControl) |
| This is called to actually create any neccessary windowing system resources specific to a new control (or widget/window/etc) instance for the platform. | |
| virtual void | setText (const VCF::String &text) |
| sets the text for the widget | |
| virtual VCF::String | getText () |
| returns a text associated with the component. | |
| virtual CreateParams | createParams () |
| called before the create window is called. | |
| virtual bool | handleEventMessages (UINT message, WPARAM wParam, LPARAM lParam, LRESULT &wndProcResult, WNDPROC defaultWndProc=NULL) |
| returns true if no further handling is required, otherwise returns false, which means the rest of the handling needs to be done by the default wnd proc. | |
| virtual void | repaint (Rect *repaintRect=NULL) |
| virtual bool | acceptsWMCommandMessages () |
| virtual OSHandleID | getTextObjectHandle () |
| Return the native text object handle. | |
| virtual void | insertText (unsigned int start, const String &text) |
| virtual void | deleteText (unsigned int start, unsigned int length) |
| virtual unsigned int | getTextLength () |
| virtual String | getText (unsigned int start, unsigned int length) |
| virtual void | paint (GraphicsContext *context, const Rect &paintRect) |
| virtual void | setRightMargin (const double &rightMargin) |
| virtual void | setLeftMargin (const double &leftMargin) |
| virtual void | setTopMargin (const double &topMargin) |
| virtual void | setBottomMargin (const double &bottomMargin) |
| virtual double | getLeftMargin () |
| virtual double | getRightMargin () |
| virtual double | getTopMargin () |
| virtual double | getBottomMargin () |
| virtual uint32 | getLineCount () |
| virtual Rect | getContentBoundsForWidth (const double &width) |
| virtual void | setStyle (unsigned int start, unsigned int length, Dictionary &styles) |
| This sets the style for the text. | |
| virtual void | getStyle (unsigned int start, unsigned int length, Dictionary &styles) |
| gets the current style of the text. | |
| virtual void | setDefaultStyle (Dictionary &styles) |
| call this to set the defaults for the text peer. | |
| virtual Point * | getPositionFromCharIndex (const uint32 &index) |
| virtual uint32 | getCharIndexFromPosition (Point *point) |
| virtual uint32 | getCaretPosition () |
| returns the current caret position with in the text control this is specified by a zero based number representing the insertion point with the text control's text (stored in the text control's Model). | |
| virtual void | setCaretPosition (const uint32 &caretPos) |
| virtual uint32 | getCurrentLinePosition () |
| virtual uint32 | getSelectionStart () |
| returns the zero based index that indicates where the current selection begins may be the same index that getCaretPosition() returns | |
| virtual uint32 | getSelectionCount () |
| returns the number of characters selected | |
| virtual void | setSelectionMark (const uint32 &start, const uint32 &count) |
| virtual void | clearSelection () |
| virtual void | scrollToLine (const uint32 &lineIndex) |
| virtual void | scrollToSelection (const bool &_showEndSel=false) |
| virtual void | setReadOnly (const bool &readonly) |
| virtual void | print (PrintContext *context, const int32 &page) |
| This attempts to print a single page and render in to the printer context that's passed in. | |
| virtual void | finishPrinting () |
| virtual uint32 | getTotalPrintablePageCount (PrintContext *context) |
| virtual void | cut () |
| Cuts the selection and places it in the clipboard. | |
| virtual void | copy () |
| Copies the selection and places it in the clipboard. | |
| virtual void | paste () |
| Pastes the contents of the clipboard into the text control. | |
| virtual bool | canUndo () |
| Returns a bool to indicate whether or not an undo operation can be performed. | |
| virtual bool | canRedo () |
| Returns a bool to indicate whether or not a redo operation can be performed. | |
| virtual void | undo () |
| Undoes the last operation. | |
| virtual void | redo () |
| Redoes the last operation. | |
| virtual void | setTextWrapping (const bool &val) |
| virtual bool | getTextWrapping () |
Protected Member Functions | |
| bool | stateAllowsModelChange () |
| void | onTextModelTextChanged (ModelEvent *event) |
| int | getCRCount (const uint32 &begin, const uint32 &end, const bool &limitCountsAreExact) |
| this is a fix from Marcello to work around an apparent bug in Win32's handling of crlf's | |
| void | getSelectionMark (long &start, long &end) |
| void | onControlModelChanged (Event *e) |
Protected Attributes | |
| VCF::Point | posAtChar_ |
| HBRUSH | backgroundBrush_ |
| int | currentSelLength_ |
| int | currentSelStart_ |
| TextControl * | textControl_ |
| int | editState_ |
| std::map< uint32, uint32 > | printPageMap_ |
| bool | textWrapping_ |
| Win32RichEditOleCallback * | richEditCallback_ |
Member Enumeration Documentation
|
|
|
Constructor & Destructor Documentation
|
||||||||||||
|
|
|
|
|
Member Function Documentation
|
|
Reimplemented from VCF::Win32Object. |
|
|
Returns a bool to indicate whether or not a redo operation can be performed.
Implements VCF::TextEditPeer. |
|
|
Returns a bool to indicate whether or not an undo operation can be performed.
Implements VCF::TextEditPeer. |
|
|
Implements VCF::TextEditPeer. |
|
|
Copies the selection and places it in the clipboard.
Implements VCF::TextEditPeer. |
|
|
This is called to actually create any neccessary windowing system resources specific to a new control (or widget/window/etc) instance for the platform. create() must be called by the containing VCF::Control subclass, typically in the classes constructor, after retreiving the new peer instance from the appropriate UIToolkit::createXXX() call. Reimplemented from VCF::AbstractWin32Component. |
|
|
called before the create window is called. Overide this to change the style and style ex parameters. Returns a pair, the pair.first is the style parameter, the pair.second is the style ex paramater. Reimplemented from VCF::Win32Object. |
|
|
Cuts the selection and places it in the clipboard.
Implements VCF::TextEditPeer. |
|
||||||||||||
|
Reimplemented from VCF::Win32TextPeer. |
|
|
Implements VCF::TextEditPeer. |
|
|
Reimplemented from VCF::Win32TextPeer. |
|
|
returns the current caret position with in the text control this is specified by a zero based number representing the insertion point with the text control's text (stored in the text control's Model).
Implements VCF::TextEditPeer. |
|
|
Implements VCF::TextEditPeer. |
|
|
Reimplemented from VCF::Win32TextPeer. |
|
||||||||||||||||
|
this is a fix from Marcello to work around an apparent bug in Win32's handling of crlf's
|
|
|
Implements VCF::TextEditPeer. |
|
|
Reimplemented from VCF::Win32TextPeer. |
|
|
Reimplemented from VCF::Win32TextPeer. |
|
|
Implements VCF::TextEditPeer. |
|
|
Reimplemented from VCF::Win32TextPeer. |
|
|
returns the number of characters selected
Implements VCF::TextEditPeer. |
|
||||||||||||
|
|
|
|
returns the zero based index that indicates where the current selection begins may be the same index that getCaretPosition() returns
Implements VCF::TextEditPeer. |
|
||||||||||||||||
|
gets the current style of the text.
Reimplemented from VCF::Win32TextPeer. |
|
||||||||||||
|
Reimplemented from VCF::Win32TextPeer. |
|
|
returns a text associated with the component. This usually gets used in the Control::getCaption() method. Reimplemented from VCF::AbstractWin32Component. |
|
|
Reimplemented from VCF::Win32TextPeer. |
|
|
Return the native text object handle. For Win32 systems this will be an IUnknown interface that may be queried for either ITextServices or ITextDocument. For OSX this will be a TXNObject instance. Reimplemented from VCF::Win32TextPeer. |
|
|
Implements VCF::TextEditPeer. |
|
|
Reimplemented from VCF::Win32TextPeer. |
|
|
Implements VCF::TextEditPeer. |
|
||||||||||||||||||||||||
|
returns true if no further handling is required, otherwise returns false, which means the rest of the handling needs to be done by the default wnd proc.
Reimplemented from VCF::AbstractWin32Component. |
|
||||||||||||
|
Reimplemented from VCF::Win32TextPeer. |
|
|
|
|
|
|
|
||||||||||||
|
Reimplemented from VCF::Win32TextPeer. |
|
|
Pastes the contents of the clipboard into the text control.
Implements VCF::TextEditPeer. |
|
||||||||||||
|
This attempts to print a single page and render in to the printer context that's passed in. Note that some platforms may not support this, as printing support varies widely. It will work on Win32, and should work on Mac OS X as well. Implements VCF::TextEditPeer. |
|
|
Redoes the last operation.
Implements VCF::TextEditPeer. |
|
|
|
|
|
Implements VCF::TextEditPeer. |
|
|
Implements VCF::TextEditPeer. |
|
|
Reimplemented from VCF::Win32TextPeer. |
|
|
Implements VCF::TextEditPeer. |
|
|
call this to set the defaults for the text peer. If this is not called, then the default font is that used for label controls and the defaul paragraph alignment is left aligned. Reimplemented from VCF::Win32TextPeer. |
|
|
Reimplemented from VCF::Win32TextPeer. |
|
|
Implements VCF::TextEditPeer. |
|
|
Reimplemented from VCF::Win32TextPeer. |
|
||||||||||||
|
Implements VCF::TextEditPeer. |
|
||||||||||||||||
|
This sets the style for the text. Pass in a Dictionary with a set of values for each style attribute. Example: TextPeer* textPeer = .... Dictionary styles; style [Text::fsFontName] = "Arial"; style [Text::fsPointSize] = 15.0; style [Text::fsBold] = true; textPeer->setStyle( 5, 10, styles ); this changes the font at position 5, for a length of 10, to be "arial", bold and a point size of 15. Reimplemented from VCF::Win32TextPeer. |
|
|
sets the text for the widget
Reimplemented from VCF::AbstractWin32Component. |
|
|
Implements VCF::TextEditPeer. |
|
|
Reimplemented from VCF::Win32TextPeer. |
|
|
|
|
|
Undoes the last operation.
Implements VCF::TextEditPeer. |
Member Data Documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/Win32Edit.h
