Hasty Badger
Small UI library (a branch of Turbo Badger)
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
tb::TBEditFieldContentFactory Class Reference

The default content factory for embedded content in TBEditField with styling enabled. More...

#include <tb_editfield.h>

Inheritance diagram for tb::TBEditFieldContentFactory:
tb::TBTextFragmentContentFactory

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 TBTextFragmentContentCreateFragmentContent (const char *text, int text_len)
 Create content for a string previosly consumed by calling GetContent. More...
 

Public Attributes

class TBEditFieldeditfield
 

Detailed Description

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">

Member Function Documentation

TBTextFragmentContent * tb::TBEditFieldContentFactory::CreateFragmentContent ( const char *  text,
int  text_len 
)
virtual

Create content for a string previosly consumed by calling GetContent.

Reimplemented from tb::TBTextFragmentContentFactory.

int tb::TBEditFieldContentFactory::GetContent ( const char *  text)
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.


The documentation for this class was generated from the following files: