Envision
A visual programming IDE for object-oriented languages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes
OOInteraction::StringOffsetProvider Class Referenceabstract
Inheritance diagram for OOInteraction::StringOffsetProvider:
OOInteraction::CompoundObjectStringOffsetProvider OOInteraction::EmptyExpressionStringOffsetProvider OOInteraction::GridBasedOffsetProvider OOInteraction::InitializerStringOffsetProvider OOInteraction::StaticStringOffsetProvider OOInteraction::TextRendererStringOffsetProvider

Public Types

using AllowGridBasedProviderFunction = std::function< bool(Visualization::Item *)>
 
using BaseAdapteeType = Visualization::Item
 

Public Member Functions

 StringOffsetProvider (Visualization::Item *item)
 
virtual ~StringOffsetProvider ()
 
virtual bool isIndivisible ()
 Returns true when the visualization corresponding to this StringProvider is an indivisible entity. More...
 
Visualization::Itemitem () const
 
virtual int offset (Qt::Key key)=0
 
virtual void setOffset (int newOffset)=0
 
virtual QString string ()
 

Static Public Member Functions

static void allowGridBasedProvider (AllowGridBasedProviderFunction allow)
 
static QStringList components (Model::Node *node)
 
static StringOffsetProviderdefaultProvider (Visualization::Item *item)
 
static int itemOffset (Visualization::Item *item, int stringComponentLenght, Qt::Key key)
 
static int listItemOffset (Visualization::VList *list, const QString &prefix, const QString &separator, const QString &postfix, Qt::Key key)
 
static bool setOffsetInItem (int offset, Visualization::Item *item)
 
static bool setOffsetInListItem (int &offset, Visualization::VList *list, const QString &prefix, const QString &separator, const QString &postfix)
 
static QString stringFromComponenets (Model::Node *node)
 
static QString stringFromComponenets (Visualization::Item *item)
 
static QString stringFromStringOffsetProvider (Visualization::Item *item)
 

Protected Member Functions

virtual QStringList components ()
 

Private Attributes

Visualization::Itemvis_
 

Static Private Attributes

static QList< AllowGridBasedProviderFunctionallowGridBasedProviderFunctions_
 

Member Typedef Documentation

◆ AllowGridBasedProviderFunction

◆ BaseAdapteeType

Constructor & Destructor Documentation

◆ StringOffsetProvider()

OOInteraction::StringOffsetProvider::StringOffsetProvider ( Visualization::Item item)

◆ ~StringOffsetProvider()

OOInteraction::StringOffsetProvider::~StringOffsetProvider ( )
virtual

Member Function Documentation

◆ allowGridBasedProvider()

void OOInteraction::StringOffsetProvider::allowGridBasedProvider ( AllowGridBasedProviderFunction  allow)
static

◆ components() [1/2]

QStringList OOInteraction::StringOffsetProvider::components ( )
protectedvirtual

◆ components() [2/2]

QStringList OOInteraction::StringOffsetProvider::components ( Model::Node node)
static

◆ defaultProvider()

StringOffsetProvider * OOInteraction::StringOffsetProvider::defaultProvider ( Visualization::Item item)
static

◆ isIndivisible()

bool OOInteraction::StringOffsetProvider::isIndivisible ( )
virtual

Returns true when the visualization corresponding to this StringProvider is an indivisible entity.

An indivisible entity's offset should be ignored and the cursor should be placed either before or after it. This is important for example for Static text symbols which are rendered as text but actually are represented in the expression editor as different text. The same is true of icons which have a text representation.

Reimplemented in OOInteraction::StaticStringOffsetProvider.

◆ item()

Visualization::Item * OOInteraction::StringOffsetProvider::item ( ) const
inline

◆ itemOffset()

int OOInteraction::StringOffsetProvider::itemOffset ( Visualization::Item item,
int  stringComponentLenght,
Qt::Key  key 
)
static

◆ listItemOffset()

int OOInteraction::StringOffsetProvider::listItemOffset ( Visualization::VList list,
const QString &  prefix,
const QString &  separator,
const QString &  postfix,
Qt::Key  key 
)
static

◆ offset()

virtual int OOInteraction::StringOffsetProvider::offset ( Qt::Key  key)
pure virtual

◆ setOffset()

virtual void OOInteraction::StringOffsetProvider::setOffset ( int  newOffset)
pure virtual

◆ setOffsetInItem()

bool OOInteraction::StringOffsetProvider::setOffsetInItem ( int  offset,
Visualization::Item item 
)
static

◆ setOffsetInListItem()

bool OOInteraction::StringOffsetProvider::setOffsetInListItem ( int &  offset,
Visualization::VList list,
const QString &  prefix,
const QString &  separator,
const QString &  postfix 
)
static

◆ string()

QString OOInteraction::StringOffsetProvider::string ( )
virtual

◆ stringFromComponenets() [1/2]

QString OOInteraction::StringOffsetProvider::stringFromComponenets ( Model::Node node)
static

◆ stringFromComponenets() [2/2]

QString OOInteraction::StringOffsetProvider::stringFromComponenets ( Visualization::Item item)
static

◆ stringFromStringOffsetProvider()

QString OOInteraction::StringOffsetProvider::stringFromStringOffsetProvider ( Visualization::Item item)
static

Member Data Documentation

◆ allowGridBasedProviderFunctions_

QList< StringOffsetProvider::AllowGridBasedProviderFunction > OOInteraction::StringOffsetProvider::allowGridBasedProviderFunctions_
staticprivate

◆ vis_

Visualization::Item* OOInteraction::StringOffsetProvider::vis_
private