Image Classes. by Tokyo
Non-free shaped borders. Let's focus on:
1: TOP_LEFT
2: TOP_BORDER
3: TOP_RIGHT
4: LEFT_SIDE
5: RIGHT_SIDE
6: BOTTOM_LEFT
7: BOTTOM_BORDER
8: BOTTOM_RIGHT
Once you have split your border into smaller images you can start writting the ImageClasses. An ImageClass is always unique. An ImageClass is used to identify an image, graphic, pixmap. Once you define an ImageClass, it can be used for just about anything. Even for a different_border_style. Just remember: ImageClasses are unique.
Theme border format:
With an editor of your choice create a blank text file and name it 'border.cfg' The way I do it, is I create a blank directory inside your current theme's 'border' directory.
In this example, I will name my border 'gabber'. Inside this directory I created a new folder called 'images' where the graphics/images will reside.
ImageClasses:
Let's start with the TOP_LEFT (1)
__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
In this example we tell Enlightenment that we have a new Imageclass:
__ICLASS __BGN
We also tell Enlightenment the name of this new Imageclass:
__NAME NEW_BORDER_TOP_LEFT
We tell Enlightenment where and what Image to use when the border focus
is inactive:
__NORMAL "borders/gabber/images/tl_inactive.png"
We tell Enlightenment to scale this image: _LEFT _RIGHT _TOP _BOTTOM
__EDGE_SCALING 21 1 3 4
We tell Enlightenment where and what Image to use when the border focus
is active:
__NORMAL_ACTIVE "borders/gabber/images/tl_active.png"
We tell Enlightenment to scale this image: _LEFT _RIGHT _TOP _BOTTOM
__EDGE_SCALING 21 1 3 4
We tell Enlightement where how much padding to use: (TEXTCLASS) _LEFT
_RIGHT _TOP _BOTTOM
__PADDING 27 0 4 5
Every Imageclass has to have a starting and eding point.
__END
Now what you need to do is create an ImageClass for every side of your boder. Go back to step 2 and look at the remaining borders. You should end up with something similar to this:
/* IMAGECLASSES */
__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
__ICLASS __BGN
__NAME NEW_BORDER_TOP_RIGHT
__NORMAL "borders/gabber/images/tr_inactive.png"
__EDGE_SCALING 6 21 3 0
__NORMAL_ACTIVE "borders/gabber/images/tr_active.png"
__EDGE_SCALING 6 21 27 27
__END
__ICLASS __BGN
__NAME NEW_BORDER_ICONIFY_BUTTON
__NORMAL "borders/gabber/images/iconify_normal.png"
__NORMAL_ACTIVE� "borders/gabber/images/iconify_active.png"
__HILITED_ACTIVE "borders/gabber/images/iconify_active.png"
__CLICKED_ACTIVE "borders/gabber/images/iconify_clicked.png"
__END
__ICLASS __BGN
__NAME NEW_BORDER_WINDOW_DECORATION
__NORMAL "borders/gabber/images/decoration_inactive.png"
__NORMAL_ACTIVE� "borders/gabber/images/decoration_active.png"
__END
__ICLASS __BGN
__NAME NEW_BORDER_LEFT_SIDE
__NORMAL "borders/gabber/images/left_side.png"
__EDGE_SCALING 2 3 22 0
__END
__ICLASS __BGN
__NAME NEW_BORDER_RIGHT_SIDE
__NORMAL "borders/gabber/images/right_side.png"
__EDGE_SCALING 2 3 15 0
__END
__ICLASS __BGN
__NAME NEW_BORDER_BOTTOM_RIGHT
__NORMAL "borders/gabber/images/bottom_right.png"
__EDGE_SCALING 0 6 0 6
__END
__ICLASS __BGN
__NAME NEW_BORDER_BOTTOM_RIGHT_OVERLAP
__NORMAL "borders/gabber/images/bottom_right.png"
__EDGE_SCALING 0 6 0 6
__HILITED_ACTIVE "borders/gabber/images/bottom_right_active.png"
__EDGE_SCALING 1 1 1 1
__END
__ICLASS __BGN
__NAME NEW_BORDER_BOTTOM_SIDE
__NORMAL "borders/gabber/images/bottom_border.png"
__EDGE_SCALING 0 0 3 3
__END
__ICLASS __BGN
__NAME NEW_BORDER_BOTTOM_LEFT
__NORMAL "borders/gabber/images/bottom_left.png"
__EDGE_SCALING 6 0 0 6
__END
__ICLASS __BGN
__NAME NEW_BORDER_RIGHT_DECORATION
__NORMAL�"borders/gabber/images/right_deco_inactive.png"
__NORMAL_ACTIVE "borders/gabber/images/right_deco_active.png"
__END
__ICLASS __BGN
__NAME NEW_BORDER_BUTTON_CLOSE
__NORMAL"borders/gabber/images/close_normal.png"
__NORMAL_ACTIVE "borders/gabber/images/close_active.png"
__CLICKED_ACTIVE "borders/gabber/images/close_clicked.png"
__END
This tutorial is available in a pdf format
| Home | To the top of this tutorial |
Page last updated: 06/10/04

