summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkTreeview.c
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2007-12-02 04:32:22 (GMT)
committerjenglish <jenglish@flightlab.com>2007-12-02 04:32:22 (GMT)
commitb9257b2ca5a2c1098db948daf8a8b050caa0e96c (patch)
treedcc1e3b870946ba7a2888ef66bd97ad71aa71aa3 /generic/ttk/ttkTreeview.c
parent547f91bd5d798f6eb0d2993c410a0e4c6d31b8dd (diff)
downloadtk-b9257b2ca5a2c1098db948daf8a8b050caa0e96c.zip
tk-b9257b2ca5a2c1098db948daf8a8b050caa0e96c.tar.gz
tk-b9257b2ca5a2c1098db948daf8a8b050caa0e96c.tar.bz2
Improved macrology for statically-initialized layout template tables.
Diffstat (limited to 'generic/ttk/ttkTreeview.c')
-rw-r--r--generic/ttk/ttkTreeview.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index a9d53e3..bca2c10 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -1,4 +1,4 @@
-/* $Id: ttkTreeview.c,v 1.21 2007/11/08 01:40:25 jenglish Exp $
+/* $Id: ttkTreeview.c,v 1.22 2007/12/02 04:32:23 jenglish Exp $
* Copyright (c) 2004, Joe English
*
* ttk::treeview widget implementation.
@@ -3041,36 +3041,35 @@ static WidgetSpec TreeviewWidgetSpec =
* +++ Layout specifications.
*/
-TTK_BEGIN_LAYOUT(TreeviewLayout)
+TTK_BEGIN_LAYOUT_TABLE(LayoutTable)
+
+TTK_LAYOUT("Treeview",
TTK_GROUP("Treeview.field", TTK_FILL_BOTH|TTK_BORDER,
TTK_GROUP("Treeview.padding", TTK_FILL_BOTH,
- TTK_NODE("Treeview.treearea", TTK_FILL_BOTH)))
-TTK_END_LAYOUT
+ TTK_NODE("Treeview.treearea", TTK_FILL_BOTH))))
-TTK_BEGIN_LAYOUT(ItemLayout)
+TTK_LAYOUT("Item",
TTK_GROUP("Treeitem.padding", TTK_FILL_BOTH,
TTK_NODE("Treeitem.indicator", TTK_PACK_LEFT)
TTK_NODE("Treeitem.image", TTK_PACK_LEFT)
TTK_GROUP("Treeitem.focus", TTK_PACK_LEFT,
- TTK_NODE("Treeitem.text", TTK_PACK_LEFT)))
-TTK_END_LAYOUT
+ TTK_NODE("Treeitem.text", TTK_PACK_LEFT))))
-TTK_BEGIN_LAYOUT(CellLayout)
+TTK_LAYOUT("Cell",
TTK_GROUP("Treedata.padding", TTK_FILL_BOTH,
- TTK_NODE("Treeitem.text", TTK_FILL_BOTH))
-TTK_END_LAYOUT
+ TTK_NODE("Treeitem.text", TTK_FILL_BOTH)))
-TTK_BEGIN_LAYOUT(HeadingLayout)
+TTK_LAYOUT("Heading",
TTK_NODE("Treeheading.cell", TTK_FILL_BOTH)
TTK_GROUP("Treeheading.border", TTK_FILL_BOTH,
TTK_GROUP("Treeheading.padding", TTK_FILL_BOTH,
TTK_NODE("Treeheading.image", TTK_PACK_RIGHT)
- TTK_NODE("Treeheading.text", TTK_FILL_X)))
-TTK_END_LAYOUT
+ TTK_NODE("Treeheading.text", TTK_FILL_X))))
+
+TTK_LAYOUT("Row",
+ TTK_NODE("Treeitem.row", TTK_FILL_BOTH))
-TTK_BEGIN_LAYOUT(RowLayout)
- TTK_NODE("Treeitem.row", TTK_FILL_BOTH)
-TTK_END_LAYOUT
+TTK_END_LAYOUT_TABLE
/*------------------------------------------------------------------------
* +++ Tree indicator element.
@@ -3201,11 +3200,7 @@ void TtkTreeview_Init(Tcl_Interp *interp)
Ttk_RegisterElement(interp, theme, "Treeheading.cell", &RowElementSpec, 0);
Ttk_RegisterElement(interp, theme, "treearea", &ttkNullElementSpec, 0);
- Ttk_RegisterLayout(theme, TreeviewWidgetSpec.className, TreeviewLayout);
- Ttk_RegisterLayout(theme, "Item", ItemLayout);
- Ttk_RegisterLayout(theme, "Cell", CellLayout);
- Ttk_RegisterLayout(theme, "Heading", HeadingLayout);
- Ttk_RegisterLayout(theme, "Row", RowLayout);
+ Ttk_RegisterLayouts(theme, LayoutTable);
}
/*EOF*/