summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkFrame.c
diff options
context:
space:
mode:
authorjenglish <jenglish@noemail.net>2007-10-25 07:08:24 (GMT)
committerjenglish <jenglish@noemail.net>2007-10-25 07:08:24 (GMT)
commitc64a8d99981285cedfa14d0b63da44771a5e75fb (patch)
treecc3ec59b3743ffde75e375f9a9f2c21fcfbf95a2 /generic/ttk/ttkFrame.c
parent78457997c54f8e15462b6753221cb9a4f7d79ba5 (diff)
downloadtk-c64a8d99981285cedfa14d0b63da44771a5e75fb.zip
tk-c64a8d99981285cedfa14d0b63da44771a5e75fb.tar.gz
tk-c64a8d99981285cedfa14d0b63da44771a5e75fb.tar.bz2
Move widget layout registration from TtkElements_Init()
to widget *_Init() routines. Renaming/consistency: s/...ElementGeometry()/...ElementSize()/ FossilOrigin-Name: 05eaff8c5983b921fdf93a2f1415a3fff3453cbb
Diffstat (limited to 'generic/ttk/ttkFrame.c')
-rw-r--r--generic/ttk/ttkFrame.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c
index 08f1f7f..b6f8fe8 100644
--- a/generic/ttk/ttkFrame.c
+++ b/generic/ttk/ttkFrame.c
@@ -1,4 +1,4 @@
-/* $Id: ttkFrame.c,v 1.6 2007/06/09 21:45:44 jenglish Exp $
+/* $Id: ttkFrame.c,v 1.7 2007/10/25 07:08:26 jenglish Exp $
* Copyright (c) 2004, Joe English
*
* ttk::frame and ttk::labelframe widgets.
@@ -165,6 +165,10 @@ static WidgetSpec FrameWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(FrameLayout)
+ TTK_NODE("Frame.border", TTK_FILL_BOTH)
+TTK_END_LAYOUT
+
/* ======================================================================
* +++ Labelframe widget:
*/
@@ -587,6 +591,11 @@ static WidgetSpec LabelframeWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
+TTK_BEGIN_LAYOUT(LabelframeLayout)
+ TTK_NODE("Labelframe.border", TTK_FILL_BOTH)
+ TTK_NODE("Labelframe.text", TTK_FILL_BOTH)
+TTK_END_LAYOUT
+
/* ======================================================================
* +++ Initialization:
*/
@@ -594,6 +603,12 @@ static WidgetSpec LabelframeWidgetSpec =
MODULE_SCOPE
void TtkFrame_Init(Tcl_Interp *interp)
{
+ Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
+
+ Ttk_RegisterLayout(theme, "TFrame", FrameLayout);
+ Ttk_RegisterLayout(theme, "TLabelframe", LabelframeLayout);
+
RegisterWidget(interp, "ttk::frame", &FrameWidgetSpec);
RegisterWidget(interp, "ttk::labelframe", &LabelframeWidgetSpec);
}
+