Envision
A visual programming IDE for object-oriented languages
|
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::Item * | item () 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 StringOffsetProvider * | defaultProvider (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::Item * | vis_ |
Static Private Attributes | |
static QList< AllowGridBasedProviderFunction > | allowGridBasedProviderFunctions_ |
using OOInteraction::StringOffsetProvider::AllowGridBasedProviderFunction = std::function<bool (Visualization::Item*)> |
OOInteraction::StringOffsetProvider::StringOffsetProvider | ( | Visualization::Item * | item | ) |
|
virtual |
|
static |
|
protectedvirtual |
Reimplemented in OOInteraction::GridBasedOffsetProvider.
|
static |
|
static |
|
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.
|
inline |
|
static |
|
static |
|
pure virtual |
Implemented in OOInteraction::GridBasedOffsetProvider, OOInteraction::TextRendererStringOffsetProvider, OOInteraction::StaticStringOffsetProvider, OOInteraction::InitializerStringOffsetProvider, OOInteraction::EmptyExpressionStringOffsetProvider, and OOInteraction::CompoundObjectStringOffsetProvider.
|
pure virtual |
Implemented in OOInteraction::TextRendererStringOffsetProvider, OOInteraction::StaticStringOffsetProvider, OOInteraction::InitializerStringOffsetProvider, OOInteraction::CompoundObjectStringOffsetProvider, OOInteraction::GridBasedOffsetProvider, and OOInteraction::EmptyExpressionStringOffsetProvider.
|
static |
|
static |
|
virtual |
Reimplemented in OOInteraction::TextRendererStringOffsetProvider, and OOInteraction::StaticStringOffsetProvider.
|
static |
|
static |
|
static |
|
staticprivate |
|
private |