Q3270
A Qt-based 3270 Terminal Emulator
Loading...
Searching...
No Matches
Cell Class Reference

Public Member Functions

 Cell ()
 Cell represents a single character cell on the display matrix and all the attributes that go with that (underscore, blink and so on).
 
void setChar (const uchar ebcdic)
 Cell::setChar - set the cell to the character specified.
 
uchar getEBCDIC () const
 
bool isFieldStart () const
 
bool isAutoSkip () const
 
bool isNumeric () const
 
bool isGraphic () const
 
bool isMdtOn () const
 
bool isPenSelect () const
 
bool isIntensify () const
 
bool isExtended () const
 
bool isUScore () const
 
bool isReverse () const
 
bool isBlink () const
 
Q3270::Highlight getHighlight () const
 Cell::getHighlight - return the highlight status of this cell.
 
Q3270::Colour getColour () const
 
bool isProtected () const
 Cell::isProtected - return whether this field is protected or not.
 
bool isDisplay () const
 Cell::isProtected - is this cell protected?
 
CellgetField ()
 Cell::getField - get the address of the field cell that owns this one.
 
bool hasCharAttrs (const Q3270::CharAttr) const
 Cell::hasCharAttrs - return the status of the specified character attribute.
 
void setField (Cell *c)
 Cell::setField - set this cell's field pointer.
 
void setColour (const Q3270::Colour col)
 Cell::setColour - set the cell to colour specified.
 
void setFieldStart (const bool fs)
 Cell::setFieldStart - set the 'Field' flag to show whether this cell is the start of a field.
 
void setNumeric (const bool num)
 Cell::setNumeric - set the cell to be numeric input only.
 
void setGraphic (const bool ge)
 Cell::setGraphic - set the 'graphic escape' flag.
 
void setMDT (const bool mdt)
 Cell::setMDT - switch the MDT flag on or off.
 
void setProtected (const bool prot)
 Cell::setProtected - switch protection on or off for this cell.
 
void setDisplay (const bool display)
 Cell::setDisplay - switch display on or offf for this cell.
 
void setPenSelect (const bool pensel)
 Cell::setPenSelect - set the lightpen-selectable on or off for the cell.
 
void setIntensify (const bool intens)
 Cell::setIntensify - set the intensity of the cell.
 
void setExtended (const bool extend)
 Cell::setExtended - set the extended field status.
 
void setHighlight (const Q3270::Highlight h)
 Cell::setHighlight - set the highlight of the cell to the specified value.
 
void setCharAttrs (Q3270::CharAttr, bool)
 Cell::setCharAttrs - set the characater attribute.
 
void resetCharAttrs ()
 Cell::resetCharAttrs - switch off all character attributes.
 
void copy (const Cell &)
 Cell::copy - copy pertinent parts from another Cell.
 
void reset ()
 Cell::reset - reset the cell to default values.
 

Constructor & Destructor Documentation

◆ Cell()

Cell::Cell ( )

Cell represents a single character cell on the display matrix and all the attributes that go with that (underscore, blink and so on).

Each Cell contains attributes that are only relevant in particular situations - protection, display, numeric and others can only be set by a Field Start, but given that any cell on the screen can be a field, all cells need to have that potential setting.

Each cell also contains a pointer to its Field Start cell (if one exists on the display), and field attributes colours, etc are taken from that cell (if appropriate).

Member Function Documentation

◆ copy()

void Cell::copy ( const Cell fromCell)

Cell::copy - copy pertinent parts from another Cell.

Parameters
fromCell- the source Cell

When moving characters around on the screen through the keyboard (ie, through insert or delete actions), character attributes move with the character.

◆ getField()

Cell * Cell::getField ( )

Cell::getField - get the address of the field cell that owns this one.

Returns
The address of this cell's field within the 3270 matrix.

When characters are entered into the display, either from the 3270 stream or from the keyboard, the field address is required to pick up the field attributes - if this field is a field start, then return this address, otherwise return the address of the field that owns this cell if there is one.

◆ getHighlight()

Q3270::Highlight Cell::getHighlight ( ) const

Cell::getHighlight - return the highlight status of this cell.

Return the highlight status of this cell. If this is a field start, then it's always the field's highlight status.

Returns
the highlight status of this cell

◆ hasCharAttrs()

bool Cell::hasCharAttrs ( const Q3270::CharAttr  ca) const

Cell::hasCharAttrs - return the status of the specified character attribute.

Parameters
ca- the CharAttr to be returne
Returns
the state of the specified CharAttr

This routine returns the state of the specified character attrbute for this Cell.

◆ isDisplay()

bool Cell::isDisplay ( ) const

Cell::isProtected - is this cell protected?

Returns
true if the cell is protected, false if unprotected

If this cell is not a field start, the value is taken from the field cell instead.

◆ isProtected()

bool Cell::isProtected ( ) const

Cell::isProtected - return whether this field is protected or not.

Returns
True for a protected field, false otherwise

Return the protected status of this cell. If this is a field start, then it's always protected.

◆ reset()

void Cell::reset ( )

Cell::reset - reset the cell to default values.

Called when a cell is reset, either at power on or by a Clear or EW(A). Resets all attributes to default values.

◆ resetCharAttrs()

void Cell::resetCharAttrs ( )

Cell::resetCharAttrs - switch off all character attributes.

This function clears all character attributes. This is called when placing a character in a cell (the attributes may be added subsequently).

◆ setChar()

void Cell::setChar ( const uchar  ebcdic)

Cell::setChar - set the cell to the character specified.

Parameters
ebcdic- the EBCDIC character code to be set

◆ setCharAttrs()

void Cell::setCharAttrs ( Q3270::CharAttr  ca,
bool  c 
)

Cell::setCharAttrs - set the characater attribute.

Parameters
ca- the CharAttr to be set
c- true to enable, false to disable

Character attributes allow the display to have adjacent characters of different colours.

Warning
Q3270 does not handle any other character attribute than extended.

◆ setColour()

void Cell::setColour ( const Q3270::Colour  c)

Cell::setColour - set the cell to colour specified.

Parameters
c- the new colour

This function sets the colour of the cell to the specified value

◆ setDisplay()

void Cell::setDisplay ( const bool  d)

Cell::setDisplay - switch display on or offf for this cell.

Parameters
d- true for display, false for non-display

Non-display fields are used for things like passwords; although the user can enter data into the cell, it is not shown on screen.

◆ setExtended()

void Cell::setExtended ( const bool  e)

Cell::setExtended - set the extended field status.

Parameters
e- true for extended field, false otherwise.

Extended fields can contain more colours than basic fields, and can contain additional hlighlighting like underscore, reverse or blinking.

◆ setField()

void Cell::setField ( Cell field)

Cell::setField - set this cell's field pointer.

Parameters
field- the address of the field in memory, or null

This routine is called when this cell's field position is changed. This occurs when the incoming 3270 data stream defines a new field, or when an existing field is overwritten by the incoming data.

When the field is set (rather than being set to null), the cell colour is taken from the field, unless character attributes are in effect.

◆ setFieldStart()

void Cell::setFieldStart ( const bool  fs)

Cell::setFieldStart - set the 'Field' flag to show whether this cell is the start of a field.

Parameters
fs- true for a field start, false for a normal character.

setFieldStart() is called when the incoming data stream contains a SF or SFE order; it is also called when the cell used to be a field start, but that has now been overwritten.

Setting the cell to a Field Start causes underscore, reverse and blinking to be switched off. If the FieldStart is set, this cell's field pointer is set to null (otherwise the cell would point to itself).

◆ setGraphic()

void Cell::setGraphic ( const bool  ge)

Cell::setGraphic - set the 'graphic escape' flag.

Parameters
ge- true for a graphic character, false for normal.

setGraphic() is used to switch on (or off) the selection of the character from the internal 0310 codepage, used for things like ISPF dialog box borders.

◆ setHighlight()

void Cell::setHighlight ( const Q3270::Highlight  h)

Cell::setHighlight - set the highlight of the cell to the specified value.

Parameters
h- the new highlight value

setHighlight is used to set the highlight of the cell to the specified value. Highlight is mutually exclusive, so setting one highlight will switch off the others.

◆ setIntensify()

void Cell::setIntensify ( const bool  i)

Cell::setIntensify - set the intensity of the cell.

Parameters
i- true for high-intensity, false for low-intensity

In basic four colour mode, high-intensity fields are displayed in red (unprotected) or white (protected); low-intensity fields are displayed in blue (protected) or green (unprotected).

◆ setMDT()

void Cell::setMDT ( const bool  m)

Cell::setMDT - switch the MDT flag on or off.

Parameters
m- true to turn it on, false to turn it off

The MDT flag is used to indicate whether the user has modified a particular field. If this cell is not a field start, the value is taken from the field cell instead.

◆ setNumeric()

void Cell::setNumeric ( const bool  n)

Cell::setNumeric - set the cell to be numeric input only.

Parameters
n- true for numeric input only, false for normal.

Setting a field to numeric input only should prevent any other characters from being entered.

Warning
Q3270 doesn't support numeric fields currently (ie, you can enter anything into a numeric field).

◆ setPenSelect()

void Cell::setPenSelect ( const bool  p)

Cell::setPenSelect - set the lightpen-selectable on or off for the cell.

Parameters
p- true for enabled, false for disabled

Lightpen selectable fields used to be able to be triggered by lightpen that was pointed at the screen (I've never seen one) as a slightly more interactive way of dealing with a 3270 display.

Warning
Q3270 doesn't support light pen selectable fields currently.

◆ setProtected()

void Cell::setProtected ( const bool  p)

Cell::setProtected - switch protection on or off for this cell.

Parameters
p- true for protected, false for unprotected

Protected cells cannot be modified by the user. They are intended for text on the screen that is meant to guide the user (field prompts, menu items and so on).


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