Border Definitions. by Tokyo

This explains how to define the border_definitions. We start 'this section' by telling Enlightenmemt we have a border and what it's name is:

__BORDER __BGN
 __NAME NEW_BORDER
 __BORDER_SIZE_LEFT 5
 __BORDER_SIZE_RIGHT 5
 __BORDER_SIZE_TOP 21
 __BORDER_SIZE_BOTTOM 5
 __SHADE_DIRECTION __UP
 __CHANGES_SHAPE __OFF

You can name the border whatever you want. Just like ImageClasses and TextClasses, the border's name has to be unique. You must define it's LEFT, RIGHT, TOP, and BOTTOM size.

 __BORDER_SIZE_LEFT 5
 __BORDER_SIZE_RIGHT 5
 __BORDER_SIZE_TOP 21
 __BORDER_SIZE_BOTTOM 5

We want this example border to shade up: __SHADE_DIRECTION __UP You can use: __LEFT __RIGHT __UP __DOWN
Here is where the real magic begins. Withouts these definitions you wont have a border, or your border will look all inacurate. If you go back to step.2 - You will see the parts that make up the border:

1: TOP_LEFT
2: TOP_BORDER
3: TOP_RIGHT
4: LEFT_SIDE
5: RIGHT_SIDE
6: BOTTOM_LEFT
7: BOTTOM_BORDER
8: BOTTOM_RIGHT

We need match the ImageClasses that we will use for these border definitions. For example: 1 - TOP_LEFT:

__BORDER_PART __BGN
 __ICLASS NEW_BORDER_TOP_LEFT
 __ACLASS ACTION_MOVE
 __TCLASS NEW_BORDER_TEXTCLASS_DEFINITION
 __CURSOR MOVE
 __FLAGS __FLAG_TITLE
 __MIN_WIDTH 0
 __MIN_HEIGHT 21
 __MAX_HEIGHT 21
 __MAX_WIDTH 99999
 __TOPLEFT_ORIGIN -1
 __TOPLEFT_X_PERCENTAGE 0
 __TOPLEFT_X_ABSOLUTE 0
 __TOPLEFT_Y_PERCENTAGE 0
 __TOPLEFT_Y_ABSOLUTE 0
 __BOTTOMRIGHT_ORIGIN -1
 __BOTTOMRIGHT_X_PERCENTAGE 1024
 __BOTTOMRIGHT_X_ABSOLUTE -60
 __BOTTOMRIGHT_Y_PERCENTAGE 0
 __BOTTOMRIGHT_Y_ABSOLUTE 19
 __KEEP_WHEN_SHADED __ON
__END

Every border_definition has an ending and a starting point. Just like ImageClasses and textclasses:

__BORDER_PART __BGN

It is important that you match the ImageClass for this definition:

__ICLASS NEW_BORDER_TOP_LEFT

If you go back to ImageClass TOP_LEFT you will see that __ICLASS NEW_BORDER_TOP_LEFT is in fact:

__ICLASS __BGN
 __NAME NEW_BORDER_TOP_LEFT
 __NORMAL "borders/gabber/images/tl_inactive.png"
 __EDGE_SCALING 21 1 3 4
 __NORMAL_ACTIVE "borders/gabber/images/tl_active.png"
 __EDGE_SCALING 21 1 3 4
 __PADDING 27 0 4 5
__END

At least one border_definition must include a TEXTCLASS, otherwise your border wont have a TEXT_TITLE:

__TCLASS NEW_BORDER_TEXTCLASS_DEFINITION
__FLAGS __FLAG_TITLE

Where does your border begin and where does it stop:

__MIN_WIDTH 0
__MIN_HEIGHT 21 <--- this tell E to use a predefine size
__MAX_HEIGHT 21
__MAX_WIDTH 99999 <--- maximum

Here is the section I cant really explain, you will have to experience it for yourself. It basically tells E where on your X window to place the ImageClass defined.

__TOPLEFT_ORIGIN -1 <---- the origin
__TOPLEFT_X_PERCENTAGE 0
__TOPLEFT_X_ABSOLUTE 0
__TOPLEFT_Y_PERCENTAGE 0
__TOPLEFT_Y_ABSOLUTE 0
__BOTTOMRIGHT_ORIGIN -1
__BOTTOMRIGHT_X_PERCENTAGE 1024 <---- just like Justifications you can use 0, 512, 1024
__BOTTOMRIGHT_X_ABSOLUTE -60
__BOTTOMRIGHT_Y_PERCENTAGE 0
__BOTTOMRIGHT_Y_ABSOLUTE 19

Tell Enlightenment to keep the ImageClasses when shaded or not:
__KEEP_WHEN_SHADED __ON

You can also tell Enlightenment to KEEP_THE_IMAGE_TOP:
__KEEP_ON_TOP __OFF

Every border_definition must have an ending point:
> __END

Once you finish writting all your border definitions be sure to have an __END definition at the bottom of the page. Otherwise Enlightenment wont know where does the border finish.

This tutorial is available in a pdf format

| Home | To the top of this tutorial |

Page last updated: 06/10/04