summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkWidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/ttk/ttkWidget.h')
-rw-r--r--generic/ttk/ttkWidget.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/generic/ttk/ttkWidget.h b/generic/ttk/ttkWidget.h
index fffd82b..9e9ab69 100644
--- a/generic/ttk/ttkWidget.h
+++ b/generic/ttk/ttkWidget.h
@@ -109,14 +109,18 @@ MODULE_SCOPE int TtkWidgetConstructorObjCmd(
Tcl_CreateObjCommand(interp, name, \
TtkWidgetConstructorObjCmd, (ClientData)specPtr,NULL)
-/* WIDGET_TAKES_FOCUS --
- * Add this to the OptionSpecs table of widgets that
- * take keyboard focus during traversal to override
- * CoreOptionSpec's -takefocus default value:
+/* WIDGET_TAKEFOCUS_TRUE --
+ * WIDGET_TAKEFOCUS_FALSE --
+ * Add one or the other of these to each OptionSpecs table
+ * to indicate whether the widget should take focus
+ * during keyboard traversal.
*/
-#define WIDGET_TAKES_FOCUS \
+#define WIDGET_TAKEFOCUS_TRUE \
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", \
"ttk::takefocus", Tk_Offset(WidgetCore, takeFocusPtr), -1, 0,0,0 }
+#define WIDGET_TAKEFOCUS_FALSE \
+ {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", \
+ "", Tk_Offset(WidgetCore, takeFocusPtr), -1, 0,0,0 }
/* WIDGET_INHERIT_OPTIONS(baseOptionSpecs) --
* Add this at the end of an OptionSpecs table to inherit
@@ -125,6 +129,10 @@ MODULE_SCOPE int TtkWidgetConstructorObjCmd(
#define WIDGET_INHERIT_OPTIONS(baseOptionSpecs) \
{TK_OPTION_END, 0,0,0, NULL, -1,-1, 0, (ClientData)baseOptionSpecs, 0}
+/* All widgets should inherit from ttkCoreOptionSpecs[].
+ */
+MODULE_SCOPE Tk_OptionSpec ttkCoreOptionSpecs[];
+
/*
* Useful routines for use inside widget implementations:
*/
@@ -235,11 +243,6 @@ MODULE_SCOPE void Ttk_TagSetValues(Ttk_TagTable, Ttk_TagSet, void *record);
MODULE_SCOPE void Ttk_TagSetApplyStyle(Ttk_TagTable,Ttk_Style,Ttk_State,void*);
/*
- * Useful widget base classes:
- */
-MODULE_SCOPE Tk_OptionSpec ttkCoreOptionSpecs[];
-
-/*
* String tables for widget resource specifications:
*/