GEOS SDK TechDocs
|
|
7 The Controllers
|
7.2 Paragraph Attribute Controllers
The following controllers affect character attributes within a text object. As such, they each affect the contents of a text object's character attributes instance field (usually the
VisTextCharAttr
structure).
This controller works with the style character attributes of the current text selection. The features and tools of this controller are shown in TextStyleControlClass Features .
Code Display 10-25 TextStyleControlClass Features
typedef WordFlags TSCFeatures; #define TSCF_PLAIN 0x0800 #define TSCF_BOLD 0x0400 #define TSCF_ITALIC 0x0200 #define TSCF_UNDERLINE 0x0100 #define TSCF_STRIKE_THRU 0x0080 #define TSCF_SUBSCRIPT 0x0040 #define TSCF_SUPERSCRIPT 0x0020 #define TSCF_BOXED 0x0010 #define TSCF_BUTTON 0x0008 #define TSCF_INDEX 0x0004 #define TSCF_ALL_CAP 0x0002 #define TSCF_SMALL_CAP 0x0001
typedef WordFlags TSCToolboxFeatures; #define TSCTF_PLAIN 0x0800 #define TSCTF_BOLD 0x0400 #define TSCTF_ITALIC 0x0200 #define TSCTF_UNDERLINE 0x0100 #define TSCTF_STRIKE_THRU 0x0080 #define TSCTF_SUBSCRIPT 0x0040 #define TSCTF_SUPERSCRIPT 0x0020 #define TSCTF_BOXED 0x0010 #define TSCTF_BUTTON 0x0008 #define TSCTF_INDEX 0x0004 #define TSCTF_ALL_CAP 0x0002 #define TSCTF_SMALL_CAP 0x0001
#define TSC_DEFAULT_FEATURES (TSCF_PLAIN | TSCF_BOLD | TSCF_ITALIC | TSCF_UNDERLINE | TSCF_SUBSCRIPT | TSCF_SUPERSCRIPT | TSCF_STRIKE_THRU | TSCF_BOXED | TSCF_BUTTON | TSCF_INDEX | TSCF_ALL_CAP | TSCF_SMALL_CAP) #define TSC_DEFAULT_TOOLBOX_FEATURES (TSCTF_PLAIN | TSCTF_BOLD | TSCTF_ITALIC | TSCTF_UNDERLINE)
This controller allows the user to change font types of the current text selection. Its features and tools are shown in FontControlClass Features .
Code Display 10-26 FontControlClass Features
typedef WordFlags FCFeatures; #define FCF_SHORT_LIST 0x0002 #define FCF_LONG_LIST 0x0001
typedef WordFlags FCToolboxFeatures; #define FCTF_ROMAN 0x0004 #define FCTF_SANS 0x0002 #define FCTF_MONO 0x0001
#define FC_DEFAULT_FEATURES (FCF_SHORT_LIST | FCF_LONG_LIST) #define FC_DEFAULT_TOOLBOX_FEATURES (FCTF_ROMAN | FCTF_SANS | FCTF_MONO)
This controller controls the point size of the current text selection. Its features and tools are shown in PointSizeControlClass Features .
Code Display 10-27 PointSizeControlClass Features
typedef WordFlags PSCFeatures; #define PSCF_9 0x0800 #define PSCF_10 0x0400 #define PSCF_12 0x0200 #define PSCF_14 0x0100 #define PSCF_18 0x0080 #define PSCF_24 0x0040 #define PSCF_36 0x0020 #define PSCF_54 0x0010 #define PSCF_72 0x0008 #define PSCF_SMALLER 0x0004 #define PSCF_LARGER 0x0002 #define PSCF_CUSTOM_SIZE 0x0001
typedef WordFlags PSCToolboxFeatures; #define PSCTF_9 0x0400 #define PSCTF_10 0x0200 #define PSCTF_12 0x0100 #define PSCTF_14 0x0080 #define PSCTF_18 0x0040 #define PSCTF_24 0x0020 #define PSCTF_36 0x0010 #define PSCTF_54 0x0008 #define PSCTF_72 0x0004 #define PSCTF_SMALLER 0x0002 #define PSCTF_LARGER 0x0001 #define PSC_DEFAULT_FEATURES (PSCF_9 | PSCF_10 | PSCF_12 | PSCF_14 | PSCF_18 | PSCF_24 | PSCF_36 | PSCF_72 | PSCF_CUSTOM_SIZE | PSCF_SMALLER | PSCF_LARGER) #define PSC_DEFAULT_TOOLBOX_FEATURES (PSCTF_9 | PSCTF_10 | PSCTF_12 | PSCTF_14 | PSCTF_18 | PSCTF_24 | PSCTF_36 | PSCTF_72 | PSCTF_SMALLER | PSCTF_LARGER)
These controllers handle changes to the foreground (text) and background colors of the current text selection. They are both subclassed from
ColorSelectorClass
and therefore inherit the feature set of that class. The additional definitions for these classes are given in Character Color Controller Features
.
Code Display 10-28 Character Color Controller Features
/* Both CharFGColorControlClass and CharBGColorControlClass are subclasses of * ColorSelectorClass. For full details, see that class. */
@class CharFGColorControlClass, ColorSelectorClass;
#define CFGCC_DEFAULT_FEATURES (CSF_INDEX | CSF_RGB | CSF_DRAW_MASK |
CSF_PATTERN)
@default GI_states = @default & ~GS_ENABLED;
@default GCI_output = (TO_APP_TARGET);
@endc
@class CharBGColorControlClass, ColorSelectorClass;
#define CBGCC_DEFAULT_FEATURES (CSF_INDEX | CSF_RGB | CSF_DRAW_MASK |
CSF_PATTERN)
@default GI_states = @default & ~GS_ENABLED;
@default GCI_output = (TO_APP_TARGET);
@endc
This controller controls the font weight, font width, and track kerning of characters of the current text selection. Its features are shown in FontAttrControlClass Features .
Code Display 10-29 FontAttrControlClass Features
typedef WordFlags FACFeatures; #define FACF_FONT_WEIGHT 0x0004 #define FACF_FONT_WIDTH 0x0002 #define FACF_TRACK_KERNING 0x0001
typedef WordFlags FACToolboxFeatures;
#define FAC_DEFAULT_FEATURES (FACF_FONT_WEIGHT | FACF_FONT_WIDTH |
FACF_TRACK_KERNING)
#define FAC_DEFAULT_TOOLBOX_FEATURES 0
@default GCI_output = (TO_APP_TARGET);
GEOS SDK TechDocs
|
|
7 The Controllers
|
7.2 Paragraph Attribute Controllers