Hasty Badger
Small UI library (a branch of Turbo Badger)
|
The default content factory for embedded content in TBEditField with styling enabled. More...
#include <tb_editfield.h>
Public Member Functions | |
virtual int | GetContent (const char *text) |
Should return then length of the text that represents content that can be created by this factory, or 0 there's no match with any content. More... | |
virtual TBTextFragmentContent * | CreateFragmentContent (const char *text, int text_len) |
Create content for a string previosly consumed by calling GetContent. More... | |
Public Attributes | |
class TBEditField * | editfield |
The default content factory for embedded content in TBEditField with styling enabled.
Creates all that TBTextFragmentContentFactory creates by default, and any type of widget from a inline resource string.
Syntax: <widget xxx>=""> Where xxx is parsed by TBWidgetsReader.
Example - Create a button with id "hello":
<widget TBButton: text: "Hello world!" id: "hello">
Example - Create a image from skin element "Icon48":
<widget TBSkinImage: skin: "Icon48">
|
virtual |
Create content for a string previosly consumed by calling GetContent.
Reimplemented from tb::TBTextFragmentContentFactory.
|
virtual |
Should return then length of the text that represents content that can be created by this factory, or 0 there's no match with any content.
F.ex if we can create contet for "<u>" it should return 3 if that is the beginning of text. That length will be consumed from the text output for the created content.
Reimplemented from tb::TBTextFragmentContentFactory.