diff options
author | jenglish@flightlab.com <jenglish> | 2011-09-22 18:10:30 (GMT) |
---|---|---|
committer | jenglish@flightlab.com <jenglish> | 2011-09-22 18:10:30 (GMT) |
commit | 4a094741098bad02d5555ffad6a292ccd7d29359 (patch) | |
tree | 1f3d74c51d27e678018aae35bf2e4f667359e082 /generic/ttk/ttkWidget.h | |
parent | a91307ce47c10ebb1d492b0131aad282303febff (diff) | |
download | tk-4a094741098bad02d5555ffad6a292ccd7d29359.zip tk-4a094741098bad02d5555ffad6a292ccd7d29359.tar.gz tk-4a094741098bad02d5555ffad6a292ccd7d29359.tar.bz2 |
Move -takefocus option out of ttkCoreOptionSpecs,
explicitly specify it on individual widgets.
[Bug 3404541], [Bug 1204186].
Diffstat (limited to 'generic/ttk/ttkWidget.h')
-rw-r--r-- | generic/ttk/ttkWidget.h | 23 |
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: */ |