summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkScale.c
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2007-10-25 07:08:25 (GMT)
committerjenglish <jenglish@flightlab.com>2007-10-25 07:08:25 (GMT)
commit504f22c2002890ce5b39d30561d76cae861d0d40 (patch)
treecc3ec59b3743ffde75e375f9a9f2c21fcfbf95a2 /generic/ttk/ttkScale.c
parenta9b41e61dd1f2274961a88385d433a9bac66d44a (diff)
downloadtk-504f22c2002890ce5b39d30561d76cae861d0d40.zip
tk-504f22c2002890ce5b39d30561d76cae861d0d40.tar.gz
tk-504f22c2002890ce5b39d30561d76cae861d0d40.tar.bz2
Move widget layout registration from TtkElements_Init()
to widget *_Init() routines. Renaming/consistency: s/...ElementGeometry()/...ElementSize()/
Diffstat (limited to 'generic/ttk/ttkScale.c')
-rw-r--r--generic/ttk/ttkScale.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c
index 1f32d13..063116d 100644
--- a/generic/ttk/ttkScale.c
+++ b/generic/ttk/ttkScale.c
@@ -1,4 +1,4 @@
-/* $Id: ttkScale.c,v 1.5 2007/01/11 14:49:47 jenglish Exp $
+/* $Id: ttkScale.c,v 1.6 2007/10/25 07:08:26 jenglish Exp $
* Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
*
* ttk::scale widget.
@@ -501,12 +501,27 @@ static WidgetSpec ScaleWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(VerticalScaleLayout)
+ TTK_GROUP("Vertical.Scale.trough", TTK_FILL_BOTH,
+ TTK_NODE("Vertical.Scale.slider", TTK_PACK_TOP) )
+TTK_END_LAYOUT
+
+TTK_BEGIN_LAYOUT(HorizontalScaleLayout)
+ TTK_GROUP("Horizontal.Scale.trough", TTK_FILL_BOTH,
+ TTK_NODE("Horizontal.Scale.slider", TTK_PACK_LEFT) )
+TTK_END_LAYOUT
+
/*
* Initialization.
*/
MODULE_SCOPE
void TtkScale_Init(Tcl_Interp *interp)
{
+ Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
+
+ Ttk_RegisterLayout(theme, "Vertical.TScale", VerticalScaleLayout);
+ Ttk_RegisterLayout(theme, "Horizontal.TScale", HorizontalScaleLayout);
+
RegisterWidget(interp, "ttk::scale", &ScaleWidgetSpec);
}