Text Classes. by Tokyo

Every border for most parts has a Title_bar. Just like we have ImageClasses, we have Text_Classes. We need to define the text_class/font for this border:

/* TEXT CLASS DEFINITION */

__TCLASS __BGN
 __NAME "NEW_BORDER_TEXTCLASS_DEFINITION"
 __JUSTIFICATION 1024
 __NORMAL "-*-helvetica-*-r-*-*-10-*-*-*-*-*-*-*"
 __DRAWING_EFFECT __EFFECT_NONE
 __FORGROUND_COLOR 104 104 104
 __BACKGROUND_COLOR 255 255 255
 __JUSTIFICATION 1024
 __NORMAL_ACTIVE "-*-helvetica-*-r-*-*-10-*-*-*-*-*-*-*"
 __DRAWING_EFFECT __EFFECT_NONE
 __FORGROUND_COLOR 255 255 255
 __BACKGROUND_COLOR 255 255 255
__END

You can use the fonts installed on your System or TrueType fonts. For TrueType fonts, make sure you copy them to your theme's 'ttfonts' directory. Just like ImageClasses you can have as many TextClasses as you want. Like ImageClasses, TextClasses have to be unique. We tell Enlightenment about our new Textclass:

__TCLASS __BGN
We tell Enlightenment the name of this TextClass:
__NAME "NEW_BORDER_TEXTCLASS_DEFINITION"
We tell Enlightenemnt what JUSTIFICATION to use:
__JUSTIFICATION 1024
Justification can either be: 0, 512, 1024
We tell Enlightenment what font to use when the border is INACTIVE:
__NORMAL "-*-helvetica-*-r-*-*-10-*-*-*-*-*-*-*"
If you prefer to use a TrueType font use this format:
__NORMAL "helvetica/10"
We tell Enlightenment what drawing effect to use:
__DRAWING_EFFECT __EFFECT_NONE
You can use these effects: SHADOW OUTLINE or NONE
We tell Enlightenment what color to use for the foreground: (HEX TRIPPLET)
__FORGROUND_COLOR 104 104 104
If needed we tell Enlightenment what color to use for the background. Used in Shadow and Outline effects:
__BACKGROUND_COLOR 255 255 255
When the border focus is ACTIVE we tell Enlightenment to use this Justification:
__JUSTIFICATION 1024
We tell Enlightenment what font to use for the ACTIVE state:
__NORMAL_ACTIVE "-*-helvetica-*-r-*-*-10-*-*-*-*-*-*-*"
We tell Enlightenment what color to use for the forground:
__FORGROUND_COLOR 255 255 255
We tell Enlightenment what color to use for the background:
__BACKGROUND_COLOR 255 255 255
Just like an Imageclass has to end, a textclass has to have a start and an ending:
__END

This tutorial is available in a pdf format

| Home | To the top of this tutorial |

Page last updated: 06/10/04