FieldList Class Reference

#include <customgui_field.h>

Inheritance diagram for FieldList:

详细描述

Field custom GUI ( CUSTOMDATATYPE_FIELDLIST ) for the Field list data.

公共成员函数

maxon::Result < FieldOutput SampleListSimple ( BaseList2D &caller, const FieldInput &inputs, FIELDSAMPLE_FLAG flags= FIELDSAMPLE_FLAG::ALL )
maxon::Result < void >  SampleList (const FieldInfo &info, const FieldInput &inputs, FieldOutput &outputs)
maxon::Result < void >  SampleListWithLambda (const FieldInfo &info, const FieldLambdaInput &&inputFunc, const FieldLambdaOutput &&outputFunc)
maxon::Result < void >  DirectInitSampling (const FieldInfo &info)
maxon::Result < void >  DirectSample (const FieldInput &inputs, FieldOutputBlock &outputs, const FieldInfo &info)
void  DirectFreeSampling (const FieldInfo &info)
UInt32   GetDirty ( BaseDocument *doc) const
Int32   GetCount () const
void  Flush ()
maxon::Result < void >  InsertLayer ( FieldLayer *layer, FieldLayer *parent=nullptr, FieldLayer *prev=nullptr)
GeListHead GetLayersRoot () const
maxon::Result < void >  GetSelected ( maxon::BaseArray < FieldLayer * > &selected, Bool includeChildren=true) const
maxon::Result < void >  FindByReference ( FieldLayerLink link, BaseDocument *doc, maxon::BaseArray < FieldLayer * > &found) const
void  SetFlags ( FIELDLIST_FLAGS flags, Bool state)
FIELDLIST_FLAGS   GetFlags () const
Bool   CheckFlag ( FIELDLIST_FLAGS flag) const
Bool   HasContent ( FIELDLAYER_CHANNELFLAG channel= FIELDLAYER_CHANNELFLAG::COLOR | FIELDLAYER_CHANNELFLAG::DIRECTION | FIELDLAYER_CHANNELFLAG::VALUE | FIELDLAYER_CHANNELFLAG::ROTATION ) const

私有成员函数

  FieldList ()=default
  ~FieldList ()=default

Alloc/Free

static FieldList Alloc ()
static void  Free ( FieldList *&list)

构造函数 & 析构函数文档编制

◆  FieldList()

FieldList ( )
private default

Default constructor.

◆  ~FieldList()

~ FieldList ( )
private default

Destructor.

成员函数文档编制

◆  Alloc()

static FieldList * Alloc ( )
static

Allocates a field list data. Destroy the allocated field list data with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

返回
The allocated field list data, or nullptr if the allocation failed.

◆  Free()

static void Free ( FieldList *&  list )
static

Destructs field list data allocated with Alloc() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

参数
[in,out] list The field list data to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆  SampleListSimple()

maxon::Result < FieldOutput > SampleListSimple ( BaseList2D caller ,
const FieldInput inputs ,
FIELDSAMPLE_FLAG   flags = FIELDSAMPLE_FLAG::ALL  
)

Sample a block of values. Use this method to avoid to avoid having to pre create FieldInfo and FieldOuput structures. Sampling will be performed in the caller's document with default FieldInfo 参数。

参数
[in] caller The caller object, simply pass the BaseList2D you are invoking the sampling from.
[in] inputs The inputs to sample from.
[in] flags The channels to sample.
返回
The sampled FieldOutput .

◆  SampleList()

maxon::Result <void> SampleList ( const FieldInfo info ,
const FieldInput inputs ,
FieldOutput outputs  
)

Sample a block of values. Allows full parameter control to the user. You can supply a simple Vector as inputs to sample just one position. User needs to supply a valid FieldInfo filled with all parameters.

参数
[in] info The sampling informations, document, threading, flags... Should succeed IsPopulated().
[in] inputs The inputs to sample from.
[out] outputs Arrays that hold the sampling results, based on sampling flags.
返回
OK on success.

◆  SampleListWithLambda()

maxon::Result <void> SampleListWithLambda ( const FieldInfo info ,
const FieldLambdaInput &&  inputFunc ,
const FieldLambdaOutput &&  outputFunc  
)

Sample a block of specified length using the passed lambda's to initialize the FieldInput and apply the final FieldOutputBlock .

参数
[in] info The information required for execution. Should succeed IsPopulated().
[in] inputFunc The input function, fill the passed FieldInput arrays within this function.
[in] outputFunc The output function, make use of the calculated FieldOutputBlock within this function.
返回
OK on success.

◆  DirectInitSampling()

maxon::Result <void> DirectInitSampling ( const FieldInfo info )

Direct initialize to be used only with DirectSample function, DirectFree must be called afterwards.

参数
[in] info The pre-filled FieldInfo , caller owns the object.
返回
OK on success.

◆  DirectSample()

maxon::Result <void> DirectSample ( const FieldInput inputs ,
FieldOutputBlock outputs ,
const FieldInfo info  
)

Direct sample function, DirectInitSampling must be called before and DirectFree afterwards.

参数
[in] inputs The points to sample, caller owns the object.
[out] outputs The output, caller owns the object.
[in] info The pre-filled FieldInfo , caller owns the object.
返回
OK on success.

◆  DirectFreeSampling()

void DirectFreeSampling ( const FieldInfo info )

Direct free, must be called after DirectInitSampling

参数
[in] info The pre-filled FieldInfo , caller owns the object.

◆  GetDirty()

UInt32 GetDirty ( BaseDocument doc ) const

Gets the dirtiness of the field GUI and it's objects.

参数
[in] doc The document.
返回
The dirty.

◆  GetCount()

Int32 GetCount ( ) const

Retrieves the total number of fields and groups in the list.

返回
The count.

◆  Flush()

void Flush ( )

Empties the list of all entries, frees any used memory and resets the FieldList back to it's default state.

◆  InsertLayer()

maxon::Result <void> InsertLayer ( FieldLayer layer ,
FieldLayer parent = nullptr ,
FieldLayer prev = nullptr  
)

Inserts a pre-existing layer into the FieldList .

参数
[in] layer The layer to insert into the. FieldList . The caller must own this layer and it must not be already inserted in any other FieldList (or in the current fieldList in another location)
[in] parent The layer that will be the parent of the layer being inserted.
[in] prev The previous layer to the one being inserted.
返回
OK on success.

◆  GetLayersRoot()

GeListHead * GetLayersRoot ( ) const

Retrieves the root GeListHead that owns the layers in the FieldList .

返回
Null if it fails, else the root GeListHead FieldList . THe FieldList owns the passed object.

◆  GetSelected()

maxon::Result <void> GetSelected ( maxon::BaseArray < FieldLayer * > &  selected ,
Bool   includeChildren = true  
) const

Retrieves a list of all the selected layers in the FieldList , this may include the background layer.

参数
[out] selected [out] The selected FieldLayers in the FieldList .
[in] includeChildren (Optional) True to include, false to exclude the children.
返回
A maxon::Result <void>

◆  FindByReference()

maxon::Result <void> FindByReference ( FieldLayerLink   link ,
BaseDocument doc ,
maxon::BaseArray < FieldLayer * > &  found  
) const

Searches for the field Layers that match the passed Reference.

参数
[in] link The FieldLayerLink , this follows the same type of format as Drag & Drop data.
[in] doc The document.
[out] found [out] The list of FieldLayers found by the passed reference.
返回
A maxon::Result <void>

◆  SetFlags()

void SetFlags ( FIELDLIST_FLAGS   flags ,
Bool   state  
)

Sets the state of the FIELDLIST_FLAGS for this FieldList

参数
[in] flags The flags to set or clear.
[in] state True to set the flag, false to clear it.

◆  GetFlags()

FIELDLIST_FLAGS GetFlags ( ) const

Gets the FIELDLIST_FLAGS for this FieldList

返回
The complete set of flags.

◆  CheckFlag()

Bool CheckFlag ( FIELDLIST_FLAGS   flag ) const

Checks a specific flag (or combination) to see if they are set, all flags must be set to return a true result i.e. this is functionally the equivalent of ( GetFlags() &flag) == flag rather than just a check for any set flag within the passed flag value.

参数
[in] flag The flag(s) to check.
返回
True if the flag is set, false if it has not been set.

◆  HasContent()

Bool HasContent ( FIELDLAYER_CHANNELFLAG   channel = FIELDLAYER_CHANNELFLAG::COLOR|FIELDLAYER_CHANNELFLAG::DIRECTION|FIELDLAYER_CHANNELFLAG::VALUE|FIELDLAYER_CHANNELFLAG::ROTATION ) const

Query if the FieldList has content i.e. any FieldLayers in it in order to determine if it's worth evaluation

参数
[in] channel (Optional) The channels to check that content exists for.
返回
True if there are FieldLayers in the FieldList , false if not.