A field type that can handle fields with text or bitmap labels, with a small range of styles for implementing rectangular fields and fields that can be used for start and end tags.
The border, text and background colours can be customised; the default is white text on a black background.
The following display styles can be used.
Styles
This class supports the following styles:
- wxRICHTEXT_FIELD_STYLE_COMPOSITE:
Creates a composite field; you will probably need to derive a new class to implement UpdateField.
- wxRICHTEXT_FIELD_STYLE_RECTANGLE:
Shows a rounded rectangle background.
- wxRICHTEXT_FIELD_STYLE_NO_BORDER:
Suppresses the background and border; mostly used with a bitmap label.
- wxRICHTEXT_FIELD_STYLE_START_TAG:
Shows a start tag background, with the pointy end facing right.
- wxRICHTEXT_FIELD_STYLE_END_TAG:
Shows an end tag background, with the pointy end facing left.
- See Also
- wxRichTextFieldType, wxRichTextField, wxRichTextBuffer, wxRichTextCtrl
|
| wxRichTextFieldTypeStandard (const wxString &name, const wxString &label, int displayStyle=wxRICHTEXT_FIELD_STYLE_RECTANGLE) |
| Constructor, creating a field type definition with a text label.
|
|
| wxRichTextFieldTypeStandard (const wxString &name, const wxBitmap &bitmap, int displayStyle=wxRICHTEXT_FIELD_STYLE_NO_BORDER) |
| Constructor, creating a field type definition with a bitmap label.
|
|
| wxRichTextFieldTypeStandard () |
| The default constructor.
|
|
| wxRichTextFieldTypeStandard (const wxRichTextFieldTypeStandard &field) |
| The copy constructor.
|
|
void | Init () |
| Initialises the object.
|
|
void | Copy (const wxRichTextFieldTypeStandard &field) |
| Copies the object.
|
|
void | operator= (const wxRichTextFieldTypeStandard &field) |
| The assignment operator.
|
|
virtual bool | Draw (wxRichTextField *obj, wxDC &dc, wxRichTextDrawingContext &context, const wxRichTextRange &range, const wxRichTextSelection &selection, const wxRect &rect, int descent, int style) |
| Draw the item, within the given range.
|
|
virtual bool | Layout (wxRichTextField *obj, wxDC &dc, wxRichTextDrawingContext &context, const wxRect &rect, const wxRect &parentRect, int style) |
| Lay the item out at the specified position with the given size constraint.
|
|
virtual bool | GetRangeSize (wxRichTextField *obj, const wxRichTextRange &range, wxSize &size, int &descent, wxDC &dc, wxRichTextDrawingContext &context, int flags, const wxPoint &position=wxPoint(0, 0), const wxSize &parentSize=wxDefaultSize, wxArrayInt *partialExtents=NULL) const |
| Returns the object size for the given range.
|
|
wxSize | GetSize (wxRichTextField *obj, wxDC &dc, wxRichTextDrawingContext &context, int style) const |
| Get the size of the field, given the label, font size, and so on.
|
|
virtual bool | IsTopLevel (wxRichTextField *obj) const |
| Returns true if the display type is wxRICHTEXT_FIELD_STYLE_COMPOSITE, false otherwise.
|
|
void | SetLabel (const wxString &label) |
| Sets the text label for fields of this type.
|
|
const wxString & | GetLabel () const |
| Returns the text label for fields of this type.
|
|
void | SetBitmap (const wxBitmap &bitmap) |
| Sets the bitmap label for fields of this type.
|
|
const wxBitmap & | GetBitmap () const |
| Gets the bitmap label for fields of this type.
|
|
int | GetDisplayStyle () const |
| Gets the display style for fields of this type.
|
|
void | SetDisplayStyle (int displayStyle) |
| Sets the display style for fields of this type.
|
|
const wxFont & | GetFont () const |
| Gets the font used for drawing the text label.
|
|
void | SetFont (const wxFont &font) |
| Sets the font used for drawing the text label.
|
|
const wxColour & | GetTextColour () const |
| Gets the colour used for drawing the text label.
|
|
void | SetTextColour (const wxColour &colour) |
| Sets the colour used for drawing the text label.
|
|
const wxColour & | GetBorderColour () const |
| Gets the colour used for drawing the field border.
|
|
void | SetBorderColour (const wxColour &colour) |
| Sets the colour used for drawing the field border.
|
|
const wxColour & | GetBackgroundColour () const |
| Gets the colour used for drawing the field background.
|
|
void | SetBackgroundColour (const wxColour &colour) |
| Sets the colour used for drawing the field background.
|
|
void | SetVerticalPadding (int padding) |
| Sets the vertical padding (the distance between the border and the text).
|
|
int | GetVerticalPadding () const |
| Gets the vertical padding (the distance between the border and the text).
|
|
void | SetHorizontalPadding (int padding) |
| Sets the horizontal padding (the distance between the border and the text).
|
|
int | GetHorizontalPadding () const |
| Sets the horizontal padding (the distance between the border and the text).
|
|
void | SetHorizontalMargin (int margin) |
| Sets the horizontal margin surrounding the field object.
|
|
int | GetHorizontalMargin () const |
| Gets the horizontal margin surrounding the field object.
|
|
void | SetVerticalMargin (int margin) |
| Sets the vertical margin surrounding the field object.
|
|
int | GetVerticalMargin () const |
| Gets the vertical margin surrounding the field object.
|
|
| wxRichTextFieldType (const wxString &name=wxEmptyString) |
| Creates a field type definition.
|
|
| wxRichTextFieldType (const wxRichTextFieldType &fieldType) |
| Copy constructor.
|
|
void | Copy (const wxRichTextFieldType &fieldType) |
|
virtual bool | CanEditProperties (wxRichTextField *obj) const |
| Returns true if we can edit the object's properties via a GUI.
|
|
virtual bool | EditProperties (wxRichTextField *obj, wxWindow *parent, wxRichTextBuffer *buffer) |
| Edits the object's properties via a GUI.
|
|
virtual wxString | GetPropertiesMenuLabel (wxRichTextField *obj) const |
| Returns the label to be used for the properties context menu item.
|
|
virtual bool | UpdateField (wxRichTextBuffer *buffer, wxRichTextField *obj) |
| Update the field.
|
|
void | SetName (const wxString &name) |
| Sets the field type name.
|
|
wxString | GetName () const |
| Returns the field type name.
|
|
| wxObject () |
| Default ctor; initializes to NULL the internal reference data.
|
|
| wxObject (const wxObject &other) |
| Copy ctor.
|
|
virtual | ~wxObject () |
| Destructor.
|
|
virtual wxClassInfo * | GetClassInfo () const |
| This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar).
|
|
wxObjectRefData * | GetRefData () const |
| Returns the wxObject::m_refData pointer, i.e. the data referenced by this object.
|
|
bool | IsKindOf (const wxClassInfo *info) const |
| Determines whether this class is a subclass of (or the same class as) the given class.
|
|
bool | IsSameAs (const wxObject &obj) const |
| Returns true if this object has the same data pointer as obj.
|
|
void | Ref (const wxObject &clone) |
| Makes this object refer to the data in clone.
|
|
void | SetRefData (wxObjectRefData *data) |
| Sets the wxObject::m_refData pointer.
|
|
void | UnRef () |
| Decrements the reference count in the associated data, and if it is zero, deletes the data.
|
|
void | UnShare () |
| This is the same of AllocExclusive() but this method is public.
|
|
void | operator delete (void *buf) |
| The delete operator is defined for debugging versions of the library only, when the identifier WXDEBUG is defined.
|
|
void * | operator new (size_t size, const wxString &filename=NULL, int lineNum=0) |
| The new operator is defined for debugging versions of the library only, when the identifier WXDEBUG is defined.
|
|