Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::containers::text::format_info_tag Structure
C++
struct format_info_tag {
  struct {
    BIT_FIELD prior_foreground : 1;
    BIT_FIELD prior_background : 1;
    BIT_FIELD default_foreground : 1;
    BIT_FIELD default_background : 1;
    BIT_FIELD foreground : 4;
    BIT_FIELD background : 4;
    BIT_FIELD blink : 1;
    BIT_FIELD reverse : 1;
    BIT_FIELD highlight : 1;
    BIT_FIELD tall : 1;
    BIT_FIELD bold : 1;
    BIT_FIELD underline : 1;
    BIT_FIELD strike : 1;
    BIT_FIELD wide : 1;
    BIT_FIELD italic : 1;
    BIT_FIELD bVertical : 1;
    BIT_FIELD bInvert : 1;
    BIT_FIELD bAlign : 2;
    BIT_FIELD format_op : 7;
  } flags;
  union {
    struct {
      S_16 x;
      S_16 y;
    } coords;
    struct {
      _16 tabs;
      _16 spaces;
    } offset;
  } position;
};
Members 
Description 
struct {
BIT_FIELD prior_foreground : 1;
BIT_FIELD prior_background : 1;
BIT_FIELD default_foreground : 1;
BIT_FIELD default_background : 1;
BIT_FIELD foreground : 4;
BIT_FIELD background : 4;
BIT_FIELD blink : 1;
BIT_FIELD reverse : 1;
BIT_FIELD highlight : 1;
BIT_FIELD tall : 1;
BIT_FIELD bold : 1;
BIT_FIELD underline : 1;
BIT_FIELD strike : 1;
BIT_FIELD wide : 1;
BIT_FIELD italic : 1;
BIT_FIELD bVertical : 1;
BIT_FIELD bInvert : 1;
BIT_FIELD bAlign : 2;
BIT_FIELD format_op : 7;
} flags; 
bit-packed flags indicating the type of format information that is applied to this segment. 
BIT_FIELD prior_foreground : 1; 
extended operation from enumeration above... might shrink if more attributes are desired... if many more are needed, one might consider adding FONT! this segment uses the prior foreground, not its own. 
BIT_FIELD prior_background : 1; 
this segment uses the prior background, not its own. 
BIT_FIELD default_foreground : 1; 
this segment uses the default foreground, not its own. 
BIT_FIELD default_background : 1; 
this segment uses the default background, not its own. 
BIT_FIELD foreground : 4; 
the foreground color of this segment (0-16 standard console text [ANSI text]) 
BIT_FIELD background : 4; 
the background color of this segment (0-16 standard console text [ANSI text]) 
BIT_FIELD blink : 1; 
a bit indicating the text should blink if supported 
BIT_FIELD reverse : 1; 
a bit indicating the foreground and background color should be reversed 
BIT_FIELD highlight : 1; 
usually highly is bolder, perhaps it's a highlighter effect and changes the background 
BIT_FIELD tall : 1; 
this is double height modifications to the font... 
BIT_FIELD bold : 1; 
this is thicker characters... 
BIT_FIELD underline : 1; 
draw a line under the text... 
BIT_FIELD strike : 1; 
strike through - if able, draw a line right through the middle of the text... maybe it's a wiggly scribble line? maybe that could be extended again? 
BIT_FIELD wide : 1; 
text is drawn wide (printer kinda font?) 
BIT_FIELD italic : 1; 
this is pretty common...... 
BIT_FIELD bVertical : 1; 
these flags are free, but since we already have text segments and I'm bringing in consoles, perhaps we should consider using this to describe captions, but provide the api layer for CTEXTSTRposition data remains constant. text is mounted at the top/left of the first character... (unless center, then the position specifies the middle of the text draw vertical instead of horizontal 
BIT_FIELD bInvert : 1; 
draw opposite/upside down from normal vertical/down, right/left upside down if not centered if centered, the text pivots around position. 
BIT_FIELD bAlign : 2; 
0 = default alignment 1 = left, 2 = center 3 = right 0 is not set, the flag set in the lower 32 bit flags is not needed any longer.... anything non zero is that operation to apply. 
BIT_FIELD format_op : 7; 
format op indicates one of the enum FORMAT_OPS applies to this segment 
union {
struct {
S_16 x;
S_16 y;
} coords;
struct {
_16 tabs;
_16 spaces;
} offset;
} position; 
if x,y are valid segment will have TF_POSFORMAT set... 
struct {
S_16 x;
S_16 y;
} coords; 
Coordinate information attached to a text segment. Positioning specification of this text segment. with basically 0 format options, position is used.
Position represents the distance from this segment to the prior segment in count of tabs and spaces.
coords specifies an x,y coordinate location for the segment.

Usage of this union is dependant on format_op
S_16 x; 
Signed coordinate of this segment on a text display. May be relative depending on format_op. 
S_16 y; 
Signed coordinate of this segment on a text display. May be relative depending on format_op. 
struct {
_16 tabs;
_16 spaces;
} offset; 
Defines the distance from the prior segment in count of tabs and spaces (mostly count of spaces). 
_16 tabs; 
tabs preceed spaces.... 
_16 spaces; 
not sure what else to put with this... 

extended position, added more information reduced color, 16 colors is really all that there are... 4 bits... added bits for extended formatting like blink, bold, wide, high foreground/background values will be sufficient... they retain full informaiton

Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!