summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkScrollbar.c
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2006-12-14 19:51:02 (GMT)
committerjenglish <jenglish@flightlab.com>2006-12-14 19:51:02 (GMT)
commitb822c063c5281f853e702026499f46c31b47e518 (patch)
treeeddfc995a90320e7557281183d21567f58985d44 /generic/ttk/ttkScrollbar.c
parentd4a63ee0259256e40eba77a360b9902afc472bc4 (diff)
downloadtk-b822c063c5281f853e702026499f46c31b47e518.zip
tk-b822c063c5281f853e702026499f46c31b47e518.tar.gz
tk-b822c063c5281f853e702026499f46c31b47e518.tar.bz2
Global reduction: use per-file *_Init() routines to reduce
the number of globally-visible initialization records.
Diffstat (limited to 'generic/ttk/ttkScrollbar.c')
-rw-r--r--generic/ttk/ttkScrollbar.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/generic/ttk/ttkScrollbar.c b/generic/ttk/ttkScrollbar.c
index 4558a4c..ab32208 100644
--- a/generic/ttk/ttkScrollbar.c
+++ b/generic/ttk/ttkScrollbar.c
@@ -1,9 +1,9 @@
-/* $Id: ttkScrollbar.c,v 1.2 2006/11/03 03:06:22 das Exp $
+/* $Id: ttkScrollbar.c,v 1.3 2006/12/14 19:51:04 jenglish Exp $
* Copyright (c) 2003, Joe English
- * Ttk widget set: scrollbar widget implementation.
+ *
+ * ttk::scrollbar widget.
*/
-#include <string.h>
#include <tk.h>
#include "ttkTheme.h"
@@ -297,8 +297,7 @@ static WidgetCommandSpec ScrollbarCommands[] =
/*------------------------------------------------------------------------
* +++ Widget specification.
*/
-MODULE_SCOPE WidgetSpec ttkScrollbarWidgetSpec;
-WidgetSpec ttkScrollbarWidgetSpec =
+static WidgetSpec ScrollbarWidgetSpec =
{
"TScrollbar", /* className */
sizeof(Scrollbar), /* recordSize */
@@ -307,11 +306,21 @@ WidgetSpec ttkScrollbarWidgetSpec =
ScrollbarInitialize, /* initializeProc */
TtkNullCleanup, /* cleanupProc */
TtkCoreConfigure, /* configureProc */
- TtkNullPostConfigure, /* postConfigureProc */
+ TtkNullPostConfigure, /* postConfigureProc */
ScrollbarGetLayout, /* getLayoutProc */
TtkWidgetSize, /* sizeProc */
ScrollbarDoLayout, /* layoutProc */
TtkWidgetDisplay /* displayProc */
};
+/*------------------------------------------------------------------------
+ * +++ Initialization.
+ */
+
+MODULE_SCOPE
+void TtkScrollbar_Init(Tcl_Interp *interp)
+{
+ RegisterWidget(interp, "ttk::scrollbar", &ScrollbarWidgetSpec);
+}
+
/*EOF*/