INOS
CTFTIncoVariable Class Reference

#include <cinossiotftexp.h>

Inheritance diagram for CTFTIncoVariable:

Public Types

typedef void(* OnValueChanged) (CTFTIncoVariable *, void *, const double)
 Callback used to inform about a value change.
 
typedef double(* OnValueConversion) (CTFTIncoVariable *, void *, const double, bool)
 Callback used to specify a conversion upon Get/PutVariables, e.g. to display values in inch while they are actually stored in mm.
 

Public Member Functions

 CTFTIncoVariable (CINOSSioTftExpTab *apParent, XMLNode axVarNode)
 Constructor.
 
virtual ~CTFTIncoVariable ()
 Destructor.
 
virtual void GetValueLimited (char *apBuf, uint32 auSize)
 Get string form of current value but limits the text length for string types, if required.
 
virtual void GetValue (char *apBuf, uint32 auSize)
 Get string form of current value.
 
virtual void SetValue (char *apBuf)
 Set new value.
 
virtual void GetUnit (char *apBuf, uint32 auSize)
 Get unit of member.
 
virtual uint32 GetCharacteristics ()
 Get characteristics of member.
 
virtual bool IsWritable (uint32 auUserLevel)
 Check if member is writable for editing with given level.
 
virtual bool UpdateInco ()
 Update inco item pointer e.g. after new registrations.
 
virtual bool RepaintNeeded ()
 Update member and check if anything requires a repaint.
 
virtual const charFindName (const char *apLangName=NULL)
 Find member name according to given language.
 
virtual bool CanToggle ()
 Returns true if the member can be toggled.
 
virtual void Toggle ()
 Toggles the value of this member.
 
virtual CINCOItemGetItem () const
 Returns the pointer to the INCO-tree item.
 
virtual void SetDigits (int8 aiDigits)
 To change or set the required number of digits for the value representation (see GetValue)
 
- Public Member Functions inherited from CTFTIncoMember
 CTFTIncoMember (CINOSSioTftExpTab *apParent, XMLNode axVarNode)
 Constructor.
 
virtual ~CTFTIncoMember ()
 Destructor.
 
bool SetCharacteristics (uint32 auChar, ETFTCharCmd aeCmd)
 Change characteristics.
 
virtual void SelLanguage (const char *apLangName, const char *apLangFile, const char *apLangFileEnd)
 Set name according to selected language (or default).
 
virtual const charGetName ()
 Get current name of member (depends on selected language).
 
virtual void GetDefaultName (char *apBuf, uint32 auSize)
 Get default name independent of language.
 
virtual uint16 GetCoordX ()
 
virtual uint16 GetCoordY ()
 
virtual void SetCoordY (uint16 auCoordY)
 
virtual uint16 GetSizeX ()
 
virtual uint16 GetSizeY ()
 
virtual bool HitTest (uint16 auCoordX, uint16 auCoordY)
 
virtual EBlockTextAlignment GetAlignment ()
 
uint8 GetForeColor ()
 
uint8 GetBackColor ()
 
void SetBackColor (uint8 auColor)
 
uint8 GetFrame ()
 
STFTFontInfoGetFont ()
 
void SetReadOnly ()
 
void SetWritable ()
 
uint8 GetKeyBoard () const
 

Static Public Member Functions

static void setConversionFunc (OnValueConversion func, void *apContext)
 Setter for conversion function called upon Get/PutVariable to convert values between display and internal representation.
 
static void setValueChangeFunc (OnValueChanged func, void *apContext)
 Setter for callback function called at value change.
 

Protected Member Functions

void ValueChanged (const double value)
 Invokes the value change callback.
 

Protected Attributes

CINCOItemm_pItem
 Inco item of registered variable.
 
uint16 m_uIndex
 Inco index if member is an array's element.
 
int8 m_iDigits
 Stores the defined digits, negative values mean 'undefined'.
 
real64 m_dMin
 Range restriction.
 
real64 m_dMax
 
- Protected Attributes inherited from CTFTIncoMember
CINOSSioTftExpTabm_pParent
 
XMLNode m_xVarNode
 Config node for this member.
 
const charm_pName
 Pointer to current name (depending on language).
 
uint32 m_uType
 Type of member.
 
uint16 m_uColumns
 Column setting (value, unit) for this member.
 
uint16 m_uCoordX
 X coordinate of member (to check for touches).
 
uint16 m_uCoordY
 Y coordinate of member (to check for touches).
 
uint8 m_uHeight
 Height of this member.
 
uint16 m_uSizeX
 X size of member.
 
uint16 m_uSizeY
 Y size of member.
 
EBlockTextAlignment m_eAlign
 
uint8 m_uColFore
 
uint8 m_uColBack
 
uint8 m_uFrame
 
uint8 m_uKeyboard
 required keyboard
 
bool m_bReadOnly
 Flag indicating if the user is not allowed to change the member.
 
bool m_bUserReadOnly
 Flag indicating if the user is not allowed to change the member in this state.
 
STFTFontInfo m_Font
 Font for this member.
 

Static Protected Attributes

static OnValueConversion s_pConversionFunc
 Conversion callback.
 
static OnValueChanged s_pValueChangedFunc
 on value change callback
 
static voids_pContext
 Context for callback functions.
 

Friends

class CINOSSioTftExpTab
 

Detailed Description

Registered variable.

Member Function Documentation

◆ CanToggle()

virtual bool CTFTIncoVariable::CanToggle ( )
virtual

Returns true if the member can be toggled.

Reimplemented from CTFTIncoMember.

◆ FindName()

virtual const char * CTFTIncoVariable::FindName ( const char apLangName = NULL)
virtual

Find member name according to given language.

Parameters
apLangNameName of language to look for, NULL for default name.
Returns
Matching member name (or default).

Reimplemented from CTFTIncoMember.

◆ GetCharacteristics()

virtual uint32 CTFTIncoVariable::GetCharacteristics ( )
virtual

Get characteristics of member.

Returns
Member characteristics.

Reimplemented from CTFTIncoMember.

◆ GetUnit()

virtual void CTFTIncoVariable::GetUnit ( char apBuf,
uint32  auSize 
)
virtual

Get unit of member.

Parameters
apBufBuffer to receive unit string.
auSizeSize of string buffer.

Reimplemented from CTFTIncoMember.

◆ GetValue()

virtual void CTFTIncoVariable::GetValue ( char apBuf,
uint32  auSize 
)
virtual

Get string form of current value.

Parameters
apBufBuffer to receive value string.
auSizeSize of string buffer.

Reimplemented from CTFTIncoMember.

◆ GetValueLimited()

virtual void CTFTIncoVariable::GetValueLimited ( char apBuf,
uint32  auSize 
)
virtual

Get string form of current value but limits the text length for string types, if required.

Parameters
apBufBuffer to receive value string.
auSizeSize of string buffer.

Reimplemented from CTFTIncoMember.

◆ IsWritable()

virtual bool CTFTIncoVariable::IsWritable ( uint32  auUserLevel)
virtual

Check if member is writable for editing with given level.

Parameters
auUserLevelUser level to check against for writing.
Returns
True if member is writable for this user.

Reimplemented from CTFTIncoMember.

◆ RepaintNeeded()

virtual bool CTFTIncoVariable::RepaintNeeded ( )
virtual

Update member and check if anything requires a repaint.

Returns
True if member changed.

Reimplemented from CTFTIncoMember.

◆ SetValue()

virtual void CTFTIncoVariable::SetValue ( char apBuf)
virtual

Set new value.

Parameters
Stringform of new value to set.

Reimplemented from CTFTIncoMember.

◆ Toggle()

virtual void CTFTIncoVariable::Toggle ( )
virtual

Toggles the value of this member.

Reimplemented from CTFTIncoMember.

◆ UpdateInco()

virtual bool CTFTIncoVariable::UpdateInco ( )
virtual

Update inco item pointer e.g. after new registrations.

Returns
True if pointer changed.

Reimplemented from CTFTIncoMember.


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