Enlightenment CVS committal

Author  : handyande
Project : e17
Module  : apps/e

Dir     : e17/apps/e/data/themes


Modified Files:
        default_border.edc 


Log Message:
Use macro to minimise code for border buttons
Allow this to make other groups for each icon
This means the menu code can load the theme data to make icons :) :) :)

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/data/themes/default_border.edc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- default_border.edc  10 Jan 2005 22:33:53 -0000      1.2
+++ default_border.edc  16 Mar 2005 23:20:12 -0000      1.3
@@ -1,3 +1,169 @@
+#define BUTTON(NAME, TYPE, REL1X, REL1Y, OFF1X, OFF1Y, TO1, REL2X, REL2Y, 
OFF2X, OFF2Y, TO2) \
+      part { \
+        name:          NAME"_shadow2"; \
+        mouse_events:  0; \
+        description { \
+           state:    "default" 0.0; \
+           visible:  1; \
+           rel1 { \
+              relative: 0.0  0.0; \
+              offset:   0    0; \
+              to:       NAME"_bg"; \
+           } \
+           rel2 { \
+              relative: 1.0  1.0; \
+              offset:   -1    -1; \
+              to:       NAME"_bg"; \
+           } \
+           image { \
+              normal: "e17_mini_button_shadow2.png"; \
+              border: 8 8 8 8; \
+           } \
+           color: 255 255 255 255; \
+        } \
+        description { \
+           state:    "active" 0.0; \
+           visible:  0; \
+           rel1 { \
+              relative: 0.0  0.0; \
+              offset:   0    0; \
+              to:       NAME"_bg"; \
+           } \
+           rel2 { \
+              relative: 1.0  1.0; \
+              offset:   -1    -1; \
+              to:       NAME"_bg"; \
+           } \
+           image { \
+              normal: "e17_mini_button_shadow2.png"; \
+              border: 8 8 8 8; \
+           } \
+           color: 255 255 255 0; \
+        } \
+      } \
+      part { \
+        name:          NAME"_shadow1"; \
+        mouse_events:  0; \
+        description { \
+           state:    "default" 0.0; \
+           visible:  1; \
+           rel1 { \
+              relative: 0.0  0.0; \
+              offset:   0    0; \
+              to:       NAME"_bg"; \
+           } \
+           rel2 { \
+              relative: 1.0  1.0; \
+              offset:   -1    -1; \
+              to:       NAME"_bg"; \
+           } \
+           image { \
+              normal: "e17_mini_button_shadow1.png"; \
+              border: 8 8 8 8; \
+           } \
+           color:  255 255 255 255; \
+        } \
+        description { \
+           state:    "active" 0.0; \
+           visible:  0; \
+           rel1 { \
+              relative: 0.0  0.0; \
+              offset:   0    0; \
+              to:       NAME"_bg"; \
+           } \
+           rel2 { \
+              relative: 1.0  1.0; \
+              offset:   -1    -1; \
+              to:       NAME"_bg"; \
+           } \
+           image { \
+              normal: "e17_mini_button_shadow1.png"; \
+              border: 8 8 8 8; \
+           } \
+           color:  255 255 255 0; \
+        } \
+      } \
+      part { \
+        name:          NAME"_bg"; \
+        mouse_events:  0; \
+        description { \
+           state:    "default" 0.0; \
+           rel1 { \
+              relative: 0.0  0.0; \
+              offset:   0    0; \
+              to:       NAME; \
+           } \
+           rel2 { \
+              relative: 1.0  1.0; \
+              offset:   -1    -1; \
+              to:       NAME; \
+           } \
+           image { \
+              normal: "e17_mini_button.png"; \
+              border: 8 8 8 8; \
+           } \
+        } \
+        description { \
+           state:    "active" 0.0; \
+           rel1 { \
+              relative: 0.0  0.0; \
+              offset:   1    1; \
+              to:       NAME; \
+           } \
+           rel2 { \
+              relative: 1.0  1.0; \
+              offset:   0    0; \
+              to:       NAME; \
+           } \
+           image { \
+              normal: "e17_mini_button.png"; \
+              border: 8 8 8 8; \
+           } \
+        } \
+      } \
+      part { \
+        name:          NAME"_detail"; \
+        mouse_events:  0; \
+        description { \
+           state:    "default" 0.0; \
+           max:      16 16; \
+           rel1 { \
+              relative: 0.0  0.0; \
+              offset:   4    4; \
+              to:       NAME"_bg"; \
+           } \
+           rel2 { \
+              relative: 1.0  1.0; \
+              offset:   -5    -5; \
+              to:       NAME"_bg"; \
+           } \
+           image { \
+              normal: "e17_button_detail_"TYPE".png"; \
+           } \
+        } \
+      } \
+      part { \
+        name:          NAME; \
+        type:          RECT; \
+        description { \
+           state:    "default" 0.0; \
+           align:    1.0 0.0; \
+           aspect:   1.0 1.0; \
+           aspect_preference: VERTICAL; \
+           rel1 { \
+              relative: REL1X REL1Y; \
+              offset:   OFF1X OFF1Y; \
+              to:       TO1; \
+           } \
+           rel2 { \
+              relative: REL2X REL2Y; \
+              offset:   OFF2X OFF2Y; \
+              to:       TO2; \
+           } \
+           color: 0 0 0 0; \
+        } \
+      }
+
 images {
    image: "e17_border1.png" COMP;
    image: "e17_border2.png" COMP;
@@ -16,6 +182,8 @@
    image: "e17_button_detail_close.png" COMP;
    image: "e17_button_detail_maximize.png" COMP;
    image: "e17_button_detail_minimize.png" COMP;
+   image: "e17_button_detail_shade.png" COMP;
+   image: "e17_button_detail_stick.png" COMP;
    image: "e17_mini_button.png" COMP;
    image: "e17_mini_button_shadow1.png" COMP;
    image: "e17_mini_button_shadow2.png" COMP;
@@ -27,6 +195,22 @@
    }
    parts {
       part {
+        name:           "whole";
+        type:           RECT;
+        description {
+           state: "default" 0.0;
+           visible: 0;
+           rel1 {
+              relative: 0.0 0.0;
+              offset:   0   0;
+           }
+           rel2 {
+              relative: 1.0 1.0;
+              offset:   -1  -1;
+           }
+        }
+      }
+      part {
         name:           "title2";
         type:           TEXT;
         mouse_events:   0;
@@ -580,445 +764,6 @@
         }
       }
       part {
-        name:          "button_0_shadow2";
-        mouse_events:  0;
-        description {
-           state:    "default" 0.0;
-           visible:  1;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_0_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_0_bg";
-           }
-           image {
-              normal: "e17_mini_button_shadow2.png";
-              border: 8 8 8 8;
-           }
-           color: 255 255 255 255;
-        }
-        description {
-           state:    "active" 0.0;
-           visible:  0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_0_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_0_bg";
-           }
-           image {
-              normal: "e17_mini_button_shadow2.png";
-              border: 8 8 8 8;
-           }
-           color: 255 255 255 0;
-        }
-      }
-      part {
-        name:          "button_1_shadow2";
-        mouse_events:  0;
-        description {
-           state:    "default" 0.0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_1_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_1_bg";
-           }
-           image {
-              normal: "e17_mini_button_shadow2.png";
-              border: 8 8 8 8;
-           }
-        }
-        description {
-           state:    "active" 0.0;
-           visible:  0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_1_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_1_bg";
-           }
-           image {
-              normal: "e17_mini_button_shadow2.png";
-              border: 8 8 8 8;
-           }
-           color: 255 255 255 0;
-        }
-      }
-      part {
-        name:          "button_2_shadow2";
-        mouse_events:  0;
-        description {
-           state:    "default" 0.0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_2_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_2_bg";
-           }
-           image {
-              normal: "e17_mini_button_shadow2.png";
-              border: 8 8 8 8;
-           }
-        }
-        description {
-           state:    "active" 0.0;
-           visible:  0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_2_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_2_bg";
-           }
-           image {
-              normal: "e17_mini_button_shadow2.png";
-              border: 8 8 8 8;
-           }
-           color: 255 255 255 0;
-        }
-      }
-      part {
-        name:          "button_0_shadow1";
-        mouse_events:  0;
-        description {
-           state:    "default" 0.0;
-           visible:  1;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_0_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_0_bg";
-           }
-           image {
-              normal: "e17_mini_button_shadow1.png";
-              border: 8 8 8 8;
-           }
-           color:  255 255 255 255;
-        }
-        description {
-           state:    "active" 0.0;
-           visible:  0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_0_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_0_bg";
-           }
-           image {
-              normal: "e17_mini_button_shadow1.png";
-              border: 8 8 8 8;
-           }
-           color:  255 255 255 0;
-        }
-      }
-      part {
-        name:          "button_1_shadow1";
-        mouse_events:  0;
-        description {
-           state:    "default" 0.0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_1_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_1_bg";
-           }
-           image {
-              normal: "e17_mini_button_shadow1.png";
-              border: 8 8 8 8;
-           }
-        }
-        description {
-           state:    "active" 0.0;
-           visible:  0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_1_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_1_bg";
-           }
-           image {
-              normal: "e17_mini_button_shadow1.png";
-              border: 8 8 8 8;
-           }
-           color:  255 255 255 0;
-        }
-      }
-      part {
-        name:          "button_2_shadow1";
-        mouse_events:  0;
-        description {
-           state:    "default" 0.0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_2_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_2_bg";
-           }
-           image {
-              normal: "e17_mini_button_shadow1.png";
-              border: 8 8 8 8;
-           }
-        }
-        description {
-           state:    "active" 0.0;
-           visible:  0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_2_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_2_bg";
-           }
-           image {
-              normal: "e17_mini_button_shadow1.png";
-              border: 8 8 8 8;
-           }
-           color:  255 255 255 0;
-        }
-      }
-      part {
-        name:          "button_0_bg";
-        mouse_events:  0;
-        description {
-           state:    "default" 0.0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_0";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_0";
-           }
-           image {
-              normal: "e17_mini_button.png";
-              border: 8 8 8 8;
-           }
-        }
-        description {
-           state:    "active" 0.0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   1    1;
-              to:       "button_0";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   0    0;
-              to:       "button_0";
-           }
-           image {
-              normal: "e17_mini_button.png";
-              border: 8 8 8 8;
-           }
-        }
-      }
-      part {
-        name:          "button_1_bg";
-        mouse_events:  0;
-        description {
-           state:    "default" 0.0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_1";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_1";
-           }
-           image {
-              normal: "e17_mini_button.png";
-              border: 8 8 8 8;
-           }
-        }
-        description {
-           state:    "active" 0.0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   1    1;
-              to:       "button_1";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   0    0;
-              to:       "button_1";
-           }
-           image {
-              normal: "e17_mini_button.png";
-              border: 8 8 8 8;
-           }
-        }
-      }
-      part {
-        name:          "button_2_bg";
-        mouse_events:  0;
-        description {
-           state:    "default" 0.0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   0    0;
-              to:       "button_2";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -1    -1;
-              to:       "button_2";
-           }
-           image {
-              normal: "e17_mini_button.png";
-              border: 8 8 8 8;
-           }
-        }
-        description {
-           state:    "active" 0.0;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   1    1;
-              to:       "button_2";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   0   0;
-              to:       "button_2";
-           }
-           image {
-              normal: "e17_mini_button.png";
-              border: 8 8 8 8;
-           }
-        }
-      }
-      part {
-        name:          "button_0_detail";
-        mouse_events:  0;
-        description {
-           state:    "default" 0.0;
-           max:      16 16;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   4    4;
-              to:       "button_0_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -5    -5;
-              to:       "button_0_bg";
-           }
-           image {
-              normal: "e17_button_detail_close.png";
-           }
-        }
-      }
-      part {
-        name:          "button_1_detail";
-        mouse_events:  0;
-        description {
-           state:    "default" 0.0;
-           max:      16 16;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   4    4;
-              to:       "button_1_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -5    -5;
-              to:       "button_1_bg";
-           }
-           image {
-              normal: "e17_button_detail_maximize.png";
-           }
-        }
-      }
-      part {
-        name:          "button_2_detail";
-        mouse_events:  0;
-        description {
-           state:    "default" 0.0;
-           max:      16 16;
-           rel1 {
-              relative: 0.0  0.0;
-              offset:   4    4;
-              to:       "button_2_bg";
-           }
-           rel2 {
-              relative: 1.0  1.0;
-              offset:   -5    -5;
-              to:       "button_2_bg";
-           }
-           image {
-              normal: "e17_button_detail_minimize.png";
-           }
-        }
-      }
-      part {
-        name:          "client";
-        type:          RECT;
-        description {
-           state:    "default" 0.0;
-           rel1 {
-              relative: 0.0  1.0;
-              offset:   4    0;
-              to:       "t1";
-           }
-           rel2 {
-              relative: 0.0  0.0;
-              offset:   -1   -1;
-              to:       "b2";
-           }
-           color: 0 0 0 0;
-        }
-      }
-      part {
         name:          "icon_swallow";
         type:          SWALLOW;
         description {
@@ -1119,77 +864,38 @@
         }
       }
       part {
-        name:          "icon";
-        type:          RECT;
-        description {
-           state:    "default" 0.0;
-           rel1 {
-              to:    "icon_swallow";
-           }
-           rel2 {
-              to:    "icon_swallow";
-           }
-           color: 0 0 0 0;
-        }
-      }
-      part {
-        name:          "button_0";
+        name:          "client";
         type:          RECT;
         description {
            state:    "default" 0.0;
-           align:    1.0 0.0;
-           aspect:   1.0 1.0;
-           aspect_preference: VERTICAL;
            rel1 {
-              relative: 1.0  0.0;
-              offset:   0    0;
+              relative: 0.0  1.0;
+              offset:   4    0;
+              to:       "t1";
            }
            rel2 {
-              relative: 1.0  1.0;
-              offset:   0    5;
-              to_y:     "title2";
-           }
-           color: 0 0 0 0;
-        }
-      }
-      part {
-        name:          "button_1";
-        type:          RECT;
-        description {
-           state:    "default" 0.0;
-           align:    1.0 0.0;
-           aspect:   1.0 1.0;
-           aspect_preference: VERTICAL;
-           rel1 {
               relative: 0.0  0.0;
-              offset:   3    0;
-              to:      "button_0";
-           }
-           rel2 {
-              relative: 0.0  1.0;
-              offset:   3    -1;
-              to:      "button_0";
+              offset:   -1   -1;
+              to:       "b2";
            }
            color: 0 0 0 0;
         }
       }
+
+      BUTTON("button_0", "close", 0.0, 0.0, 0, 0, "whole", 1.0, 0.0, -1, 23, 
"whole")
+      BUTTON("button_1", "maximize", 0.0, 0.0, 3, 0, "button_0", 0.0, 1.0, 3, 
-1, "button_0")
+      BUTTON("button_2", "minimize", 0.0, 0.0, 3, 0, "button_1", 0.0, 1.0, 3, 
-1, "button_1")
+
       part {
-        name:          "button_2";
+        name:          "icon";
         type:          RECT;
         description {
            state:    "default" 0.0;
-           align:    1.0 0.0;
-           aspect:   1.0 1.0;
-           aspect_preference: VERTICAL;
            rel1 {
-              relative: 0.0  0.0;
-              offset:   3    0;
-              to:      "button_1";
+              to:    "icon_swallow";
            }
            rel2 {
-              relative: 0.0  1.0;
-              offset:   3    -1;
-              to:      "button_1";
+              to:    "icon_swallow";
            }
            color: 0 0 0 0;
         }
@@ -1327,12 +1033,24 @@
         action:  SIGNAL_EMIT "resize_stop" "mouse,1";
       }
       program {
-        name:    "menu_action";
+        name:    "menu_action_icon1";
         signal:  "mouse,clicked,1";
         source:  "icon";
         action:  SIGNAL_EMIT "action" "menu";
       }
       program {
+        name:    "menu_action_icon3";
+        signal:  "mouse,clicked,3";
+        source:  "icon";
+        action:  SIGNAL_EMIT "action" "menu";
+      }
+      program {
+         name:    "menu_action_title3";
+         signal:  "mouse,clicked,3";
+         source:  "title";
+         action:  SIGNAL_EMIT "action" "menu";
+      }
+      program {
         name:    "close_action";
         signal:  "mouse,clicked,1";
         source:  "button_0";
@@ -1664,3 +1382,120 @@
    }
 }
 
+group {
+   name: "widgets/border/default/close";
+   parts {
+      part {
+        name:           "whole";
+        type:           RECT;
+        description {
+           state: "default" 0.0;
+           visible: 0;
+           rel1 {
+              relative: 0.0 0.0;
+              offset:   0   0;
+           }
+           rel2 {
+              relative: 1.0 1.0;
+              offset:   -1  -1;
+           }
+        }
+      }
+      BUTTON("button_0", "close", 0.0, 0.0, -3, -3, "whole", 1.0, 1.0, 2, 2, 
"whole")
+   }
+}
+
+group {
+   name:  "widgets/border/default/iconify";
+   parts {
+      part {
+        name:           "whole";
+        type:           RECT;
+        description {
+           state: "default" 0.0;
+           visible: 0;
+           rel1 {
+              relative: 0.0 0.0;
+              offset:   0   0;
+           }
+           rel2 {
+              relative: 1.0 1.0;
+              offset:   -1  -1;
+           }
+        }
+      }
+      BUTTON("button_1", "minimize", 0.0, 0.0, -3, -3, "whole", 1.0, 1.0, 2, 
2, "whole")
+   }
+}
+
+group {
+   name:  "widgets/border/default/maximize";
+   parts {
+      part {
+        name:           "whole";
+        type:           RECT;
+        description {
+           state: "default" 0.0;
+           visible: 0;
+           rel1 {
+              relative: 0.0 0.0;
+              offset:   0   0;
+           }
+           rel2 {
+              relative: 1.0 1.0;
+              offset:   -1  -1;
+           }
+        }
+      }
+
+      BUTTON("button_2", "maximize", 0.0, 0.0, -3, -3, "whole", 1.0, 1.0, 2, 
2, "whole")
+   }
+}
+
+group {
+   name:  "widgets/border/default/shade";
+   parts {
+      part {
+        name:           "whole";
+        type:           RECT;
+        description {
+           state: "default" 0.0;
+           visible: 0;
+           rel1 {
+              relative: 0.0 0.0;
+              offset:   0   0;
+           }
+           rel2 {
+              relative: 1.0 1.0;
+              offset:   -1  -1;
+           }
+        }
+      }
+
+      BUTTON("button_3", "shade", 0.0, 0.0, -3, -3, "whole", 1.0, 1.0, 2, 2, 
"whole")
+   }
+}
+
+group {
+   name:  "widgets/border/default/stick";
+   parts {
+      part {
+        name:           "whole";
+        type:           RECT;
+        description {
+           state: "default" 0.0;
+           visible: 0;
+           rel1 {
+              relative: 0.0 0.0;
+              offset:   0   0;
+           }
+           rel2 {
+              relative: 1.0 1.0;
+              offset:   -1  -1;
+           }
+        }
+      }
+
+      BUTTON("button_2", "stick", 0.0, 0.0, -3, -3, "whole", 1.0, 1.0, 2, 2, 
"whole")
+   }
+}




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to