summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkLabel.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/ttkLabel.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/ttkLabel.c')
-rw-r--r--generic/ttk/ttkLabel.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c
index e03fea4..11e6a73 100644
--- a/generic/ttk/ttkLabel.c
+++ b/generic/ttk/ttkLabel.c
@@ -1,4 +1,4 @@
-/* $Id: ttkLabel.c,v 1.3 2006/12/09 20:53:35 jenglish Exp $
+/* $Id: ttkLabel.c,v 1.4 2006/12/14 19:51:04 jenglish Exp $
*
* text, image, and label elements.
*
@@ -209,8 +209,7 @@ static void TextElementDraw(
}
}
-MODULE_SCOPE Ttk_ElementSpec ttkTextElementSpec;
-/*public*/ Ttk_ElementSpec ttkTextElementSpec =
+static Ttk_ElementSpec TextElementSpec =
{
TK_STYLE_VERSION_2,
sizeof(TextElement),
@@ -240,8 +239,7 @@ static void ImageTextElementDraw(
TextCleanup(text);
}
-MODULE_SCOPE Ttk_ElementSpec ttkImageTextElementSpec;
-/*public*/ Ttk_ElementSpec ttkImageTextElementSpec =
+static Ttk_ElementSpec ImageTextElementSpec =
{
TK_STYLE_VERSION_2,
sizeof(TextElement),
@@ -401,8 +399,7 @@ static void ImageElementDraw(
}
}
-MODULE_SCOPE Ttk_ElementSpec ttkImageElementSpec;
-/*public*/ Ttk_ElementSpec ttkImageElementSpec =
+static Ttk_ElementSpec ImageElementSpec =
{
TK_STYLE_VERSION_2,
sizeof(ImageElement),
@@ -699,8 +696,7 @@ static void LabelElementDraw(
LabelCleanup(l);
}
-MODULE_SCOPE Ttk_ElementSpec ttkLabelElementSpec;
-/*public*/ Ttk_ElementSpec ttkLabelElementSpec =
+static Ttk_ElementSpec LabelElementSpec =
{
TK_STYLE_VERSION_2,
sizeof(LabelElement),
@@ -709,3 +705,19 @@ MODULE_SCOPE Ttk_ElementSpec ttkLabelElementSpec;
LabelElementDraw
};
+/*------------------------------------------------------------------------
+ * +++ Initialization.
+ */
+
+MODULE_SCOPE
+void TtkLabel_Init(Tcl_Interp *interp)
+{
+ Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
+
+ Ttk_RegisterElement(interp, theme, "text", &TextElementSpec, NULL);
+ Ttk_RegisterElement(interp, theme, "image", &ImageElementSpec, interp);
+ Ttk_RegisterElement(interp, theme, "label", &LabelElementSpec, interp);
+ Ttk_RegisterElement(interp, theme, "Labelframe.text", /* @@@ */
+ &ImageTextElementSpec,NULL);
+}
+