diff options
author | jenglish <jenglish@flightlab.com> | 2006-12-14 19:51:02 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2006-12-14 19:51:02 (GMT) |
commit | b822c063c5281f853e702026499f46c31b47e518 (patch) | |
tree | eddfc995a90320e7557281183d21567f58985d44 /generic/ttk/ttkFrame.c | |
parent | d4a63ee0259256e40eba77a360b9902afc472bc4 (diff) | |
download | tk-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/ttkFrame.c')
-rw-r--r-- | generic/ttk/ttkFrame.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c index 958cb3e..5ed6272 100644 --- a/generic/ttk/ttkFrame.c +++ b/generic/ttk/ttkFrame.c @@ -1,7 +1,7 @@ -/* $Id: ttkFrame.c,v 1.2 2006/11/03 03:06:22 das Exp $ +/* $Id: ttkFrame.c,v 1.3 2006/12/14 19:51:04 jenglish Exp $ * Copyright (c) 2004, Joe English * - * Ttk widget set: frame and labelframe widgets + * ttk::frame and ttk::labelframe widgets. */ #include <tk.h> @@ -149,9 +149,7 @@ static int FrameConfigure(Tcl_Interp *interp, void *recordPtr, int mask) return TtkCoreConfigure(interp, recordPtr, mask); } -/* public */ -MODULE_SCOPE WidgetSpec ttkFrameWidgetSpec; -WidgetSpec ttkFrameWidgetSpec = +static WidgetSpec FrameWidgetSpec = { "TFrame", /* className */ sizeof(Frame), /* recordSize */ @@ -160,8 +158,8 @@ WidgetSpec ttkFrameWidgetSpec = TtkNullInitialize, /* initializeProc */ TtkNullCleanup, /* cleanupProc */ FrameConfigure, /* configureProc */ - TtkNullPostConfigure, /* postConfigureProc */ - TtkWidgetGetLayout, /* getLayoutProc */ + TtkNullPostConfigure, /* postConfigureProc */ + TtkWidgetGetLayout, /* getLayoutProc */ FrameSize, /* sizeProc */ TtkWidgetDoLayout, /* layoutProc */ TtkWidgetDisplay /* displayProc */ @@ -602,9 +600,7 @@ static int LabelframeConfigure(Tcl_Interp *interp,void *recordPtr,int mask) return TCL_OK; } -/* public */ -MODULE_SCOPE WidgetSpec ttkLabelframeWidgetSpec; -WidgetSpec ttkLabelframeWidgetSpec = +static WidgetSpec LabelframeWidgetSpec = { "TLabelframe", /* className */ sizeof(Labelframe), /* recordSize */ @@ -614,9 +610,19 @@ WidgetSpec ttkLabelframeWidgetSpec = LabelframeCleanup, /* cleanupProc */ LabelframeConfigure, /* configureProc */ TtkNullPostConfigure, /* postConfigureProc */ - TtkWidgetGetLayout, /* getLayoutProc */ + TtkWidgetGetLayout, /* getLayoutProc */ LabelframeSize, /* sizeProc */ LabelframeDoLayout, /* layoutProc */ TtkWidgetDisplay /* displayProc */ }; +/* ====================================================================== + * +++ Initialization: + */ + +MODULE_SCOPE +void TtkFrame_Init(Tcl_Interp *interp) +{ + RegisterWidget(interp, "ttk::frame", &FrameWidgetSpec); + RegisterWidget(interp, "ttk::labelframe", &LabelframeWidgetSpec); +} |