summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkClassicTheme.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/ttk/ttkClassicTheme.c')
-rw-r--r--generic/ttk/ttkClassicTheme.c43
1 files changed, 18 insertions, 25 deletions
diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c
index c37b62e..6ca027b 100644
--- a/generic/ttk/ttkClassicTheme.c
+++ b/generic/ttk/ttkClassicTheme.c
@@ -1,5 +1,5 @@
/*
- * $Id: ttkClassicTheme.c,v 1.4 2007/10/25 07:08:26 jenglish Exp $
+ * $Id: ttkClassicTheme.c,v 1.5 2007/12/02 04:32:23 jenglish Exp $
*
* Copyright (c) 2004, Joe English
*
@@ -419,51 +419,49 @@ static Ttk_ElementSpec SashElementSpec = {
* +++ Widget layouts.
*/
-TTK_BEGIN_LAYOUT(ButtonLayout)
+TTK_BEGIN_LAYOUT_TABLE(LayoutTable)
+
+TTK_LAYOUT("TButton",
TTK_GROUP("Button.highlight", TTK_FILL_BOTH,
TTK_GROUP("Button.border", TTK_FILL_BOTH|TTK_BORDER,
TTK_GROUP("Button.padding", TTK_FILL_BOTH,
- TTK_NODE("Button.label", TTK_FILL_BOTH))))
-TTK_END_LAYOUT
+ TTK_NODE("Button.label", TTK_FILL_BOTH)))))
-TTK_BEGIN_LAYOUT(CheckbuttonLayout)
+TTK_LAYOUT("TCheckbutton",
TTK_GROUP("Checkbutton.highlight", TTK_FILL_BOTH,
TTK_GROUP("Checkbutton.border", TTK_FILL_BOTH,
TTK_GROUP("Checkbutton.padding", TTK_FILL_BOTH,
TTK_NODE("Checkbutton.indicator", TTK_PACK_LEFT)
- TTK_NODE("Checkbutton.label", TTK_PACK_LEFT|TTK_FILL_BOTH))))
-TTK_END_LAYOUT
+ TTK_NODE("Checkbutton.label", TTK_PACK_LEFT|TTK_FILL_BOTH)))))
-TTK_BEGIN_LAYOUT(RadiobuttonLayout)
+TTK_LAYOUT("TRadiobutton",
TTK_GROUP("Radiobutton.highlight", TTK_FILL_BOTH,
TTK_GROUP("Radiobutton.border", TTK_FILL_BOTH,
TTK_GROUP("Radiobutton.padding", TTK_FILL_BOTH,
TTK_NODE("Radiobutton.indicator", TTK_PACK_LEFT)
- TTK_NODE("Radiobutton.label", TTK_PACK_LEFT|TTK_FILL_BOTH))))
-TTK_END_LAYOUT
+ TTK_NODE("Radiobutton.label", TTK_PACK_LEFT|TTK_FILL_BOTH)))))
-TTK_BEGIN_LAYOUT(MenubuttonLayout)
+TTK_LAYOUT("TMenubutton",
TTK_GROUP("Menubutton.highlight", TTK_FILL_BOTH,
TTK_GROUP("Menubutton.border", TTK_FILL_BOTH,
TTK_NODE("Menubutton.indicator", TTK_PACK_RIGHT)
TTK_GROUP("Menubutton.padding", TTK_PACK_LEFT|TTK_EXPAND|TTK_FILL_X,
- TTK_NODE("Menubutton.label", 0))))
-TTK_END_LAYOUT
+ TTK_NODE("Menubutton.label", 0)))))
/* "classic" entry, includes highlight border */
-TTK_BEGIN_LAYOUT(EntryLayout)
+TTK_LAYOUT("TEntry",
TTK_GROUP("Entry.highlight", TTK_FILL_BOTH,
TTK_GROUP("Entry.field", TTK_FILL_BOTH|TTK_BORDER,
TTK_GROUP("Entry.padding", TTK_FILL_BOTH,
- TTK_NODE("Entry.textarea", TTK_FILL_BOTH))))
-TTK_END_LAYOUT
+ TTK_NODE("Entry.textarea", TTK_FILL_BOTH)))))
/* Notebook tabs -- omit focus ring */
-TTK_BEGIN_LAYOUT(TabLayout)
+TTK_LAYOUT("Tab",
TTK_GROUP("Notebook.tab", TTK_FILL_BOTH,
TTK_GROUP("Notebook.padding", TTK_FILL_BOTH,
- TTK_NODE("Notebook.label", TTK_FILL_BOTH)))
-TTK_END_LAYOUT
+ TTK_NODE("Notebook.label", TTK_FILL_BOTH))))
+
+TTK_END_LAYOUT_TABLE
/* POSSIBLY: include Scale layouts w/focus border
*/
@@ -509,12 +507,7 @@ MODULE_SCOPE int TtkClassicTheme_Init(Tcl_Interp *interp)
/*
* Register layouts:
*/
- Ttk_RegisterLayout(theme, "TButton", ButtonLayout);
- Ttk_RegisterLayout(theme, "TCheckbutton", CheckbuttonLayout);
- Ttk_RegisterLayout(theme, "TRadiobutton", RadiobuttonLayout);
- Ttk_RegisterLayout(theme, "TMenubutton", MenubuttonLayout);
- Ttk_RegisterLayout(theme, "TEntry", EntryLayout);
- Ttk_RegisterLayout(theme, "TNotebook.Tab", TabLayout);
+ Ttk_RegisterLayouts(theme, LayoutTable);
Tcl_PkgProvide(interp, "ttk::theme::classic", TTK_VERSION);