summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkScrollbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/ttk/ttkScrollbar.c')
-rw-r--r--generic/ttk/ttkScrollbar.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/generic/ttk/ttkScrollbar.c b/generic/ttk/ttkScrollbar.c
index c3be30f..1e744c2 100644
--- a/generic/ttk/ttkScrollbar.c
+++ b/generic/ttk/ttkScrollbar.c
@@ -1,4 +1,4 @@
-/* $Id: ttkScrollbar.c,v 1.5 2007/01/11 14:49:47 jenglish Exp $
+/* $Id: ttkScrollbar.c,v 1.6 2007/10/25 07:08:26 jenglish Exp $
* Copyright (c) 2003, Joe English
*
* ttk::scrollbar widget.
@@ -313,6 +313,22 @@ static WidgetSpec ScrollbarWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(VerticalScrollbarLayout)
+ TTK_GROUP("Vertical.Scrollbar.trough", TTK_FILL_Y,
+ TTK_NODE("Vertical.Scrollbar.uparrow", TTK_PACK_TOP)
+ TTK_NODE("Vertical.Scrollbar.downarrow", TTK_PACK_BOTTOM)
+ TTK_NODE(
+ "Vertical.Scrollbar.thumb", TTK_PACK_TOP|TTK_EXPAND|TTK_FILL_BOTH))
+TTK_END_LAYOUT
+
+TTK_BEGIN_LAYOUT(HorizontalScrollbarLayout)
+ TTK_GROUP("Horizontal.Scrollbar.trough", TTK_FILL_X,
+ TTK_NODE("Horizontal.Scrollbar.leftarrow", TTK_PACK_LEFT)
+ TTK_NODE("Horizontal.Scrollbar.rightarrow", TTK_PACK_RIGHT)
+ TTK_NODE(
+ "Horizontal.Scrollbar.thumb", TTK_PACK_LEFT|TTK_EXPAND|TTK_FILL_BOTH))
+TTK_END_LAYOUT
+
/*------------------------------------------------------------------------
* +++ Initialization.
*/
@@ -320,7 +336,12 @@ static WidgetSpec ScrollbarWidgetSpec =
MODULE_SCOPE
void TtkScrollbar_Init(Tcl_Interp *interp)
{
+ Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
+
+ Ttk_RegisterLayout(theme,"Vertical.TScrollbar",VerticalScrollbarLayout);
+ Ttk_RegisterLayout(theme,"Horizontal.TScrollbar",HorizontalScrollbarLayout);
+
RegisterWidget(interp, "ttk::scrollbar", &ScrollbarWidgetSpec);
-}
+}
/*EOF*/