head	1.15;
access;
symbols
	core-8-5-9:1.9.2.1
	core-8-5-8:1.9
	macosx-cocoa-merge:1.11
	macosx-cocoa-premerge:1.11
	macosx-carbon-freeze:1.11
	core-8-5-7:1.9
	core-8-5-6:1.9
	core-8-6-b1:1.11
	core-8-6-a3:1.10
	core-8-5-5:1.9
	core-8-6-a2:1.10
	core-8-5-4:1.9
	core-8-5-3:1.9
	core-8-6-a1:1.10
	core-8-5-branch:1.9.0.2
	core-8-5-2:1.9
	core-8-5-1:1.9
	core-8-5-0:1.8
	core-8-5-b3:1.6
	core-8-5-b2:1.6
	core-8-5-b1:1.6
	core-stablilizer-merge:1.6
	core-stabilizer-branch:1.6.0.2
	core-stabilizer-merge:1.9
	core-8-5-a6:1.6;
locks; strict;
comment	@ * @;


1.15
date	2010.03.28.21.43.25;	author jenglish;	state Exp;
branches;
next	1.14;

1.14
date	2010.02.05.21.33.14;	author jenglish;	state Exp;
branches;
next	1.13;

1.13
date	2010.02.05.17.42.21;	author nijtmans;	state Exp;
branches;
next	1.12;

1.12
date	2010.01.31.22.50.56;	author jenglish;	state Exp;
branches;
next	1.11;

1.11
date	2008.11.09.23.53.09;	author jenglish;	state Exp;
branches;
next	1.10;

1.10
date	2008.05.23.20.20.05;	author jenglish;	state Exp;
branches;
next	1.9;

1.9
date	2008.01.06.22.33.14;	author jenglish;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	2007.12.13.15.26.26;	author dgp;	state Exp;
branches;
next	1.7;

1.7
date	2007.12.02.02.50.07;	author jenglish;	state Exp;
branches;
next	1.6;

1.6
date	2007.01.11.14.49.47;	author jenglish;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2007.01.03.05.06.25;	author nijtmans;	state Exp;
branches;
next	1.4;

1.4
date	2006.12.14.19.51.04;	author jenglish;	state Exp;
branches;
next	1.3;

1.3
date	2006.12.09.20.53.35;	author jenglish;	state Exp;
branches;
next	1.2;

1.2
date	2006.11.03.03.06.22;	author das;	state Exp;
branches;
next	1.1;

1.1
date	2006.10.31.01.42.26;	author hobbs;	state Exp;
branches;
next	;

1.6.2.1
date	2007.12.04.17.05.21;	author dgp;	state Exp;
branches;
next	1.6.2.2;

1.6.2.2
date	2008.01.23.16.39.12;	author dgp;	state Exp;
branches;
next	;

1.9.2.1
date	2010.08.26.02.06.10;	author hobbs;	state Exp;
branches;
next	;


desc
@@


1.15
log
@ttk::treeview widget: add 'tag names', 'tag add', and 'tag remove' methods.
@
text
@/* $Id: ttkWidget.h,v 1.14 2010/02/05 21:33:14 jenglish Exp $
 * Copyright (c) 2003, Joe English
 * Helper routines for widget implementations.
 */

#ifndef _TTKWIDGET
#define _TTKWIDGET

/*
 * State flags for 'flags' field.
 */
#define WIDGET_DESTROYED	0x0001
#define REDISPLAY_PENDING 	0x0002	/* scheduled call to RedisplayWidget */
#define CURSOR_ON 		0x0020	/* See TtkBlinkCursor() */
#define WIDGET_USER_FLAG        0x0100  /* 0x0100 - 0x8000 for user flags */

/*
 * Bit fields for OptionSpec 'mask' field:
 */
#define READONLY_OPTION 	0x1
#define STYLE_CHANGED   	0x2
#define GEOMETRY_CHANGED	0x4

/*
 * Core widget elements
 */
typedef struct WidgetSpec_ WidgetSpec;	/* Forward */

typedef struct
{
    Tk_Window tkwin;		/* Window associated with widget */
    Tcl_Interp *interp;		/* Interpreter associated with widget. */
    WidgetSpec *widgetSpec;	/* Widget class hooks */
    Tcl_Command widgetCmd;	/* Token for widget command. */
    Tk_OptionTable optionTable;	/* Option table */
    Ttk_Layout layout;  	/* Widget layout */

    /*
     * Storage for resources:
     */
    Tcl_Obj *takeFocusPtr;	/* Storage for -takefocus option */
    Tcl_Obj *cursorObj;		/* Storage for -cursor option */
    Tcl_Obj *styleObj;		/* Name of currently-applied style */
    Tcl_Obj *classObj;		/* Class name (readonly option) */

    Ttk_State state;		/* Current widget state */
    unsigned int flags;		/* internal flags, see above */

} WidgetCore;

/*
 * Widget specifications:
 */
struct WidgetSpec_
{
    const char 		*className;	/* Widget class name */
    size_t 		recordSize;	/* #bytes in widget record */
    const Tk_OptionSpec	*optionSpecs;	/* Option specifications */
    const Ttk_Ensemble	*commands;	/* Widget instance subcommands */

    /*
     * Hooks:
     */
    void  	(*initializeProc)(Tcl_Interp *, void *recordPtr);
    void	(*cleanupProc)(void *recordPtr);
    int 	(*configureProc)(Tcl_Interp *, void *recordPtr, int flags);
    int 	(*postConfigureProc)(Tcl_Interp *, void *recordPtr, int flags);
    Ttk_Layout	(*getLayoutProc)(Tcl_Interp *,Ttk_Theme, void *recordPtr);
    int 	(*sizeProc)(void *recordPtr, int *widthPtr, int *heightPtr);
    void	(*layoutProc)(void *recordPtr);
    void	(*displayProc)(void *recordPtr, Drawable d);
};

/*
 * Common factors for widget implementations:
 */
MODULE_SCOPE void TtkNullInitialize(Tcl_Interp *, void *);
MODULE_SCOPE int  TtkNullPostConfigure(Tcl_Interp *, void *, int);
MODULE_SCOPE void TtkNullCleanup(void *recordPtr);
MODULE_SCOPE Ttk_Layout TtkWidgetGetLayout(
	Tcl_Interp *, Ttk_Theme, void *recordPtr);
MODULE_SCOPE Ttk_Layout TtkWidgetGetOrientedLayout(
	Tcl_Interp *, Ttk_Theme, void *recordPtr, Tcl_Obj *orientObj);
MODULE_SCOPE int  TtkWidgetSize(void *recordPtr, int *w, int *h);
MODULE_SCOPE void TtkWidgetDoLayout(void *recordPtr);
MODULE_SCOPE void TtkWidgetDisplay(void *recordPtr, Drawable);

MODULE_SCOPE int TtkCoreConfigure(Tcl_Interp*, void *, int mask);

/* Common widget commands:
 */
MODULE_SCOPE int TtkWidgetConfigureCommand(
	void *,Tcl_Interp *, int, Tcl_Obj*const[]);
MODULE_SCOPE int TtkWidgetCgetCommand(
	void *,Tcl_Interp *, int, Tcl_Obj*const[]);
MODULE_SCOPE int TtkWidgetInstateCommand(
	void *,Tcl_Interp *, int, Tcl_Obj*const[]);
MODULE_SCOPE int TtkWidgetStateCommand(
	void *,Tcl_Interp *, int, Tcl_Obj*const[]);
MODULE_SCOPE int TtkWidgetIdentifyCommand(
	void *,Tcl_Interp *, int, Tcl_Obj*const[]);

/* Widget constructor:
 */
MODULE_SCOPE int TtkWidgetConstructorObjCmd(
	ClientData, Tcl_Interp*, int, Tcl_Obj*const[]);

#define RegisterWidget(interp, name, specPtr) \
    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:
 */
#define WIDGET_TAKES_FOCUS \
    {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", \
	"ttk::takefocus", Tk_Offset(WidgetCore, takeFocusPtr), -1, 0,0,0 }

/* WIDGET_INHERIT_OPTIONS(baseOptionSpecs) --
 * Add this at the end of an OptionSpecs table to inherit
 * the options from 'baseOptionSpecs'.
 */
#define WIDGET_INHERIT_OPTIONS(baseOptionSpecs) \
    {TK_OPTION_END, 0,0,0, NULL, -1,-1, 0, (ClientData)baseOptionSpecs, 0}

/*
 * Useful routines for use inside widget implementations:
 */
/* extern int WidgetDestroyed(WidgetCore *); */
#define WidgetDestroyed(corePtr) ((corePtr)->flags & WIDGET_DESTROYED)

MODULE_SCOPE void TtkWidgetChangeState(WidgetCore *,
	unsigned int setBits, unsigned int clearBits);

MODULE_SCOPE void TtkRedisplayWidget(WidgetCore *);
MODULE_SCOPE void TtkResizeWidget(WidgetCore *);

MODULE_SCOPE void TtkTrackElementState(WidgetCore *);
MODULE_SCOPE void TtkBlinkCursor(WidgetCore *);

/*
 * -state option values (compatibility)
 */
MODULE_SCOPE void TtkCheckStateOption(WidgetCore *, Tcl_Obj *);

/*
 * Variable traces:
 */
typedef void (*Ttk_TraceProc)(void *recordPtr, const char *value);
typedef struct TtkTraceHandle_ Ttk_TraceHandle;

MODULE_SCOPE Ttk_TraceHandle *Ttk_TraceVariable(
    Tcl_Interp*, Tcl_Obj *varnameObj, Ttk_TraceProc callback, void *clientData);
MODULE_SCOPE void Ttk_UntraceVariable(Ttk_TraceHandle *);
MODULE_SCOPE int Ttk_FireTrace(Ttk_TraceHandle *);

/*
 * Virtual events:
 */
MODULE_SCOPE void TtkSendVirtualEvent(Tk_Window tgtWin, const char *eventName);

/*
 * Helper routines for data accessor commands:
 */
MODULE_SCOPE int TtkEnumerateOptions(
    Tcl_Interp *, void *, const Tk_OptionSpec *, Tk_OptionTable, Tk_Window);
MODULE_SCOPE int TtkGetOptionValue(
    Tcl_Interp *, void *, Tcl_Obj *optName, Tk_OptionTable, Tk_Window);

/*
 * Helper routines for scrolling widgets (see scroll.c).
 */
typedef struct {
    int 	first;		/* First visible item */
    int 	last;		/* Last visible item */
    int 	total;		/* Total #items */
    char 	*scrollCmd;	/* Widget option */
} Scrollable;

typedef struct ScrollHandleRec *ScrollHandle;

MODULE_SCOPE ScrollHandle TtkCreateScrollHandle(WidgetCore *, Scrollable *);
MODULE_SCOPE void TtkFreeScrollHandle(ScrollHandle);

MODULE_SCOPE int TtkScrollviewCommand(
    Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], ScrollHandle);

MODULE_SCOPE void TtkScrollTo(ScrollHandle, int newFirst);
MODULE_SCOPE void TtkScrolled(ScrollHandle, int first, int last, int total);
MODULE_SCOPE void TtkScrollbarUpdateRequired(ScrollHandle);

/*
 * Tag sets (work in progress, half-baked)
 */

typedef struct TtkTag *Ttk_Tag;
typedef struct TtkTagTable *Ttk_TagTable;
typedef struct TtkTagSet {	/* TODO: make opaque */
    Ttk_Tag	*tags;
    int 	nTags;
} *Ttk_TagSet;

MODULE_SCOPE Ttk_TagTable Ttk_CreateTagTable(
	Tcl_Interp *, Tk_Window tkwin, Tk_OptionSpec[], int recordSize);
MODULE_SCOPE void Ttk_DeleteTagTable(Ttk_TagTable);

MODULE_SCOPE Ttk_Tag Ttk_GetTag(Ttk_TagTable, const char *tagName);
MODULE_SCOPE Ttk_Tag Ttk_GetTagFromObj(Ttk_TagTable, Tcl_Obj *);

MODULE_SCOPE Tcl_Obj *Ttk_TagOptionValue(
    Tcl_Interp *, Ttk_TagTable, Ttk_Tag, Tcl_Obj *optionName);

MODULE_SCOPE int Ttk_EnumerateTagOptions(
    Tcl_Interp *, Ttk_TagTable, Ttk_Tag);

MODULE_SCOPE int Ttk_EnumerateTags(Tcl_Interp *, Ttk_TagTable);

MODULE_SCOPE int Ttk_ConfigureTag(
    Tcl_Interp *interp, Ttk_TagTable tagTable, Ttk_Tag tag,
    int objc, Tcl_Obj *const objv[]);

MODULE_SCOPE Ttk_TagSet Ttk_GetTagSetFromObj(
    Tcl_Interp *interp, Ttk_TagTable, Tcl_Obj *objPtr);
MODULE_SCOPE Tcl_Obj *Ttk_NewTagSetObj(Ttk_TagSet);

MODULE_SCOPE void Ttk_FreeTagSet(Ttk_TagSet);

MODULE_SCOPE int Ttk_TagSetContains(Ttk_TagSet, Ttk_Tag tag);
MODULE_SCOPE int Ttk_TagSetAdd(Ttk_TagSet, Ttk_Tag tag);
MODULE_SCOPE int Ttk_TagSetRemove(Ttk_TagSet, Ttk_Tag tag);

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:
 */

MODULE_SCOPE const char *ttkOrientStrings[];
MODULE_SCOPE const char *ttkCompoundStrings[];
MODULE_SCOPE const char *ttkDefaultStrings[];

/*
 * ... other option types...
 */
MODULE_SCOPE int TtkGetLabelAnchorFromObj(
	Tcl_Interp*, Tcl_Obj*, Ttk_PositionSpec *);

/*
 * Platform-specific initialization.
 */

#if defined(__WIN32__)
#define Ttk_PlatformInit Ttk_WinPlatformInit
MODULE_SCOPE int Ttk_PlatformInit(Tcl_Interp *);
#elif defined(MAC_OSX_TK)
#define Ttk_PlatformInit Ttk_MacOSXPlatformInit
MODULE_SCOPE int Ttk_PlatformInit(Tcl_Interp *);
#else
#define Ttk_PlatformInit(interp) /* TTK_X11PlatformInit() */
#endif

#endif /* _TTKWIDGET */
@


1.14
log
@Laxative patch: Revert contravariant const qualifiers added by the
previous commit to keep codebase in sync with the Tile extension,
which must remain 8.4 compatible.
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.13 2010/02/05 17:42:21 nijtmans Exp $
d218 2
d226 1
d231 2
a232 2
MODULE_SCOPE void Ttk_TagSetAdd(Ttk_TagSet, Ttk_Tag tag);
MODULE_SCOPE void Ttk_TagSetRemove(Ttk_TagSet, Ttk_Tag tag);
@


1.13
log
@Make the various stub tables and hook pointers const,
just as Tcl and Tk.
Make more internal tables "const"
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.12 2010/01/31 22:50:56 jenglish Exp $
d243 3
a245 3
MODULE_SCOPE const char *const ttkOrientStrings[];
MODULE_SCOPE const char *const ttkCompoundStrings[];
MODULE_SCOPE const char *const ttkDefaultStrings[];
@


1.12
log
@Change signature of widget subcommand procedures to match Tcl_ObjCmdProc.
Merge now-redundant ensemble dispatch code.
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.11 2008/11/09 23:53:09 jenglish Exp $
d243 3
a245 3
MODULE_SCOPE const char *ttkOrientStrings[];
MODULE_SCOPE const char *ttkCompoundStrings[];
MODULE_SCOPE const char *ttkDefaultStrings[];
@


1.11
log
@Ttk widget initializeProc()s now return void instead of
a status code, and are no longer allowed to fail.
(Fix for #2207435 in progress).
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.10 2008/05/23 20:20:05 jenglish Exp $
a51 14
 * Subcommand specifications:
 */
typedef int (*WidgetSubcommandProc)(
    Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], void *recordPtr);
typedef struct {
    const char *name;
    WidgetSubcommandProc command;
} WidgetCommandSpec;

MODULE_SCOPE int TtkWidgetEnsembleCommand(	/* Run an ensemble command */
    const WidgetCommandSpec *commands, int cmdIndex,
    Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], void *recordPtr);

/*
d59 1
a59 1
    const WidgetCommandSpec *commands;	/* Widget instance subcommands */
d93 1
a93 1
	Tcl_Interp *, int, Tcl_Obj*const[], void *);
d95 1
a95 1
	Tcl_Interp *, int, Tcl_Obj*const[], void *);
d97 1
a97 1
	Tcl_Interp *, int, Tcl_Obj*const[], void *);
d99 1
a99 1
	Tcl_Interp *, int, Tcl_Obj*const[], void *);
d101 1
a101 1
	Tcl_Interp *, int, Tcl_Obj*const[], void *);
@


1.10
log
@Batch of ttk::treeview enhancements:
+ Added [$tv identify region], [$tv identify element],
  and [$tv identify item] subcommands.
+ Simplified bindings.
+ Added [$tv tag has] subcommand.
+ Tag-related display improvements: setting a tag -background
  or -foreground no longer overrides selection feedback.
+ Don't need separate 'Item', 'Cell', and 'Row' style
  settings anymore, only the base "Treeview" style is used.
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.9 2008/01/06 22:33:14 jenglish Exp $
d78 1
a78 1
    int  	(*initializeProc)(Tcl_Interp *, void *recordPtr);
d91 1
a91 1
MODULE_SCOPE int  TtkNullInitialize(Tcl_Interp *, void *);
@


1.9
log
@Call Tk_MakeWindowExist() in widget constructor.
Removed now-unnecessary initial ConfigureNotify processing.
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.8 2007/12/13 15:26:26 dgp Exp $
d214 4
d219 2
a220 1
MODULE_SCOPE Ttk_TagTable Ttk_CreateTagTable(Tk_OptionTable, int tagRecSize);
d226 2
a227 1
MODULE_SCOPE Tcl_Obj **Ttk_TagRecord(Ttk_Tag);
d229 2
a230 3
MODULE_SCOPE int Ttk_GetTagListFromObj(
    Tcl_Interp *interp, Ttk_TagTable, Tcl_Obj *objPtr,
    int *nTags_rtn, void **taglist_rtn);
d232 15
a246 1
MODULE_SCOPE void Ttk_FreeTagList(void **taglist);
@


1.9.2.1
log
@        Major backport of 8.6 Ttk for 8.5.9.  Most changes were only being
        committed to head (8.6), although they could apply for 8.5 as well.
        This re-sync makes future work easier to maintain and adds some
        useful work for 8.5 users. Notable changes:
        - Lots of code cleanup
        - Some bug fixes never backported
        - Addition of ttk::spinbox
        - minor color changes
        - Improved Vista/7 styling
        - Move to tile version 0.8.6 (pseudo-package)
        - ABI and API compatible (even $w identify)
        - minor new features (extended $w identify)
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.15 2010/03/28 21:43:25 jenglish Exp $
d52 14
d73 1
a73 1
    const Ttk_Ensemble	*commands;	/* Widget instance subcommands */
d78 1
a78 1
    void  	(*initializeProc)(Tcl_Interp *, void *recordPtr);
d91 1
a91 1
MODULE_SCOPE void TtkNullInitialize(Tcl_Interp *, void *);
d107 1
a107 1
	void *,Tcl_Interp *, int, Tcl_Obj*const[]);
d109 1
a109 1
	void *,Tcl_Interp *, int, Tcl_Obj*const[]);
d111 1
a111 1
	void *,Tcl_Interp *, int, Tcl_Obj*const[]);
d113 1
a113 1
	void *,Tcl_Interp *, int, Tcl_Obj*const[]);
d115 1
a115 1
	void *,Tcl_Interp *, int, Tcl_Obj*const[]);
a213 4
typedef struct TtkTagSet {	/* TODO: make opaque */
    Ttk_Tag	*tags;
    int 	nTags;
} *Ttk_TagSet;
d215 1
a215 2
MODULE_SCOPE Ttk_TagTable Ttk_CreateTagTable(
	Tcl_Interp *, Tk_Window tkwin, Tk_OptionSpec[], int recordSize);
d221 1
a221 17
MODULE_SCOPE Tcl_Obj *Ttk_TagOptionValue(
    Tcl_Interp *, Ttk_TagTable, Ttk_Tag, Tcl_Obj *optionName);

MODULE_SCOPE int Ttk_EnumerateTagOptions(
    Tcl_Interp *, Ttk_TagTable, Ttk_Tag);

MODULE_SCOPE int Ttk_EnumerateTags(Tcl_Interp *, Ttk_TagTable);

MODULE_SCOPE int Ttk_ConfigureTag(
    Tcl_Interp *interp, Ttk_TagTable tagTable, Ttk_Tag tag,
    int objc, Tcl_Obj *const objv[]);

MODULE_SCOPE Ttk_TagSet Ttk_GetTagSetFromObj(
    Tcl_Interp *interp, Ttk_TagTable, Tcl_Obj *objPtr);
MODULE_SCOPE Tcl_Obj *Ttk_NewTagSetObj(Ttk_TagSet);

MODULE_SCOPE void Ttk_FreeTagSet(Ttk_TagSet);
d223 3
a225 3
MODULE_SCOPE int Ttk_TagSetContains(Ttk_TagSet, Ttk_Tag tag);
MODULE_SCOPE int Ttk_TagSetAdd(Ttk_TagSet, Ttk_Tag tag);
MODULE_SCOPE int Ttk_TagSetRemove(Ttk_TagSet, Ttk_Tag tag);
d227 1
a227 2
MODULE_SCOPE void Ttk_TagSetValues(Ttk_TagTable, Ttk_TagSet, void *record);
MODULE_SCOPE void Ttk_TagSetApplyStyle(Ttk_TagTable,Ttk_Style,Ttk_State,void*);
@


1.8
log
@merge stable branch onto HEAD
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.6.2.1 2007/12/04 17:05:21 dgp Exp $
a13 1
#define WIDGET_REALIZED		0x0010	/* set at first ConfigureNotify */
@


1.7
log
@Internal Ttk_Manager API updates (missed from 2007-11-25 commit)
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.6 2007/01/11 14:49:47 jenglish Exp $
@


1.6
log
@Revert addition of contravariant 'const' qualifiers,
to keep in sync with Tile codebase (which must remain
compatible with Tk 8.4).
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.5 2007/01/03 05:06:25 nijtmans Exp $
d9 2
a10 1
/* State flags for 'flags' field.
d95 2
a96 1
MODULE_SCOPE Ttk_Layout TtkWidgetGetLayout(Tcl_Interp *, Ttk_Theme, void *recordPtr);
d98 1
a98 1
    Tcl_Interp *, Ttk_Theme, void *recordPtr, Tcl_Obj *orientObj);
d105 1
a105 1
/* Commands present in all widgets:
d107 10
a116 4
MODULE_SCOPE int TtkWidgetConfigureCommand(Tcl_Interp *, int, Tcl_Obj*const[], void *);
MODULE_SCOPE int TtkWidgetCgetCommand(Tcl_Interp *, int, Tcl_Obj*const[], void *);
MODULE_SCOPE int TtkWidgetInstateCommand(Tcl_Interp *, int, Tcl_Obj*const[], void *);
MODULE_SCOPE int TtkWidgetStateCommand(Tcl_Interp *, int, Tcl_Obj*const[], void *);
d118 1
a118 1
/* Common widget commands:
d120 2
a121 3
MODULE_SCOPE int TtkWidgetIdentifyCommand(Tcl_Interp *, int, Tcl_Obj*const[], void *);

MODULE_SCOPE int TtkWidgetConstructorObjCmd(ClientData,Tcl_Interp*,int,Tcl_Obj*CONST[]);
d246 2
a247 1
MODULE_SCOPE int TtkGetLabelAnchorFromObj(Tcl_Interp*,Tcl_Obj*,Ttk_PositionSpec *);
@


1.6.2.1
log
@merge updates from HEAD
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.6 2007/01/11 14:49:47 jenglish Exp $
d9 1
a9 2
/*
 * State flags for 'flags' field.
d94 1
a94 2
MODULE_SCOPE Ttk_Layout TtkWidgetGetLayout(
	Tcl_Interp *, Ttk_Theme, void *recordPtr);
d96 1
a96 1
	Tcl_Interp *, Ttk_Theme, void *recordPtr, Tcl_Obj *orientObj);
d103 7
d112 1
a112 10
MODULE_SCOPE int TtkWidgetConfigureCommand(
	Tcl_Interp *, int, Tcl_Obj*const[], void *);
MODULE_SCOPE int TtkWidgetCgetCommand(
	Tcl_Interp *, int, Tcl_Obj*const[], void *);
MODULE_SCOPE int TtkWidgetInstateCommand(
	Tcl_Interp *, int, Tcl_Obj*const[], void *);
MODULE_SCOPE int TtkWidgetStateCommand(
	Tcl_Interp *, int, Tcl_Obj*const[], void *);
MODULE_SCOPE int TtkWidgetIdentifyCommand(
	Tcl_Interp *, int, Tcl_Obj*const[], void *);
d114 1
a114 4
/* Widget constructor:
 */
MODULE_SCOPE int TtkWidgetConstructorObjCmd(
	ClientData, Tcl_Interp*, int, Tcl_Obj*const[]);
d239 1
a239 2
MODULE_SCOPE int TtkGetLabelAnchorFromObj(
	Tcl_Interp*, Tcl_Obj*, Ttk_PositionSpec *);
@


1.6.2.2
log
@merge updates from HEAD
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.8 2007/12/13 15:26:26 dgp Exp $
d14 1
@


1.5
log
@various "const" additions, in line with TIP #27
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.4 2006/12/14 19:51:04 jenglish Exp $
d73 1
a73 1
    const WidgetCommandSpec	*commands;	/* Widget instance subcommands */
d176 1
a176 1
    Tcl_Interp *, void *recordPtr, const Tk_OptionSpec *, Tk_OptionTable, Tk_Window);
d178 1
a178 1
    Tcl_Interp *, void *recordPtr, Tcl_Obj *optName, Tk_OptionTable, Tk_Window);
@


1.4
log
@Global reduction: use per-file *_Init() routines to reduce
the number of globally-visible initialization records.
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.3 2006/12/09 20:53:35 jenglish Exp $
d62 1
a62 1
    WidgetCommandSpec *commands, int cmdIndex,
d72 2
a73 2
    Tk_OptionSpec	*optionSpecs;	/* Option specifications */
    WidgetCommandSpec	*commands;	/* Widget instance subcommands */
d176 1
a176 1
    Tcl_Interp *, void *recordPtr, Tk_OptionSpec *, Tk_OptionTable, Tk_Window);
@


1.3
log
@Merged duplicate functionality between image element factory,
image element, and -image option processing.  Image element
factory now takes an imageSpec argument instead of a separate
image name and -map option.
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.2 2006/11/03 03:06:22 das Exp $
a2 1
 *
a3 2
 *
 * Require: ttkTheme.h.
a9 2
 * @@@@@@ todo: distinguish:
 * need reconfigure, need redisplay, redisplay pending
a222 1

d242 1
a242 1
 * Package initialiation routines:
a243 1
MODULE_SCOPE void TtkRegisterElements(Tcl_Interp *);
@


1.2
log
@	* generic/ttk/ttkBlink.c, generic/ttk/ttkButton.c:
	* generic/ttk/ttkClamTheme.c, generic/ttk/ttkClassicTheme.c:
	* generic/ttk/ttkDecls.h, generic/ttk/ttkDefaultTheme.c:
	* generic/ttk/ttkElements.c, generic/ttk/ttkEntry.c:
	* generic/ttk/ttkFrame.c, generic/ttk/ttkImage.c:
	* generic/ttk/ttkInit.c, generic/ttk/ttkLabel.c:
	* generic/ttk/ttkLayout.c, generic/ttk/ttkManager.h:
	* generic/ttk/ttkNotebook.c, generic/ttk/ttkPanedwindow.c:
	* generic/ttk/ttkProgress.c, generic/ttk/ttkScale.c:
	* generic/ttk/ttkScroll.c, generic/ttk/ttkScrollbar.c:
	* generic/ttk/ttkSeparator.c, generic/ttk/ttkSquare.c:
	* generic/ttk/ttkStubInit.c, generic/ttk/ttkStubLib.c:
	* generic/ttk/ttkTheme.c, generic/ttk/ttkTheme.h:
	* generic/ttk/ttkThemeInt.h, generic/ttk/ttkTrack.c:
	* generic/ttk/ttkTreeview.c, generic/ttk/ttkWidget.c:
	* generic/ttk/ttkWidget.h, macosx/ttkMacOSXTheme.c:
	* win/ttkWinMonitor.c, win/ttkWinTheme.c, win/ttkWinXPTheme.c: ensure
	all global Ttk symbols have Ttk or ttk prefix; declare all externally
	visible Ttk symbols not contained in stubs table as MODULE_SCOPE (or as
	static when possible); so that 'make check{exports,stubs}' once again
	complete without errors.
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.1 2006/10/31 01:42:26 hobbs Exp $
a172 7
 * Utility routines for managing -image option:
 */
MODULE_SCOPE int TtkGetImageList(
    Tcl_Interp *, WidgetCore *, Tcl_Obj *imageOption, Tk_Image **imageListPtr);
MODULE_SCOPE void TtkFreeImageList(Tk_Image *);

/*
@


1.1
log
@	* doc/ttk_Geometry.3, doc/ttk_Theme.3, doc/ttk_button.n:
	* doc/ttk_checkbutton.n, doc/ttk_combobox.n, doc/ttk_dialog.n:
	* doc/ttk_entry.n, doc/ttk_frame.n, doc/ttk_image.n:
	* doc/ttk_intro.n, doc/ttk_label.n, doc/ttk_labelframe.n:
	* doc/ttk_menubutton.n, doc/ttk_notebook.n, doc/ttk_panedwindow.n:
	* doc/ttk_progressbar.n, doc/ttk_radiobutton.n, doc/ttk_scrollbar.n:
	* doc/ttk_separator.n, doc/ttk_sizegrip.n, doc/ttk_style.n:
	* doc/ttk_treeview.n, doc/ttk_widget.n,:
	* generic/ttk/ttk.decls, generic/ttk/ttkBlink.c:
	* generic/ttk/ttkButton.c, generic/ttk/ttkCache.c:
	* generic/ttk/ttkClamTheme.c, generic/ttk/ttkClassicTheme.c:
	* generic/ttk/ttkDecls.h, generic/ttk/ttkDefaultTheme.c:
	* generic/ttk/ttkElements.c, generic/ttk/ttkEntry.c:
	* generic/ttk/ttkFrame.c, generic/ttk/ttkImage.c:
	* generic/ttk/ttkInit.c, generic/ttk/ttkLabel.c:
	* generic/ttk/ttkLayout.c, generic/ttk/ttkManager.c:
	* generic/ttk/ttkManager.h, generic/ttk/ttkNotebook.c:
	* generic/ttk/ttkPanedwindow.c, generic/ttk/ttkProgress.c:
	* generic/ttk/ttkScale.c, generic/ttk/ttkScroll.c:
	* generic/ttk/ttkScrollbar.c, generic/ttk/ttkSeparator.c:
	* generic/ttk/ttkSquare.c, generic/ttk/ttkState.c:
	* generic/ttk/ttkStubInit.c, generic/ttk/ttkStubLib.c:
	* generic/ttk/ttkTagSet.c, generic/ttk/ttkTheme.c:
	* generic/ttk/ttkTheme.h, generic/ttk/ttkThemeInt.h:
	* generic/ttk/ttkTrace.c, generic/ttk/ttkTrack.c:
	* generic/ttk/ttkTreeview.c, generic/ttk/ttkWidget.c:
	* generic/ttk/ttkWidget.h:
	* library/demos/ttk_demo.tcl, library/demos/ttk_iconlib.tcl:
	* library/demos/ttk_repeater.tcl:
	* library/ttk/altTheme.tcl, library/ttk/aquaTheme.tcl:
	* library/ttk/button.tcl, library/ttk/clamTheme.tcl:
	* library/ttk/classicTheme.tcl, library/ttk/combobox.tcl:
	* library/ttk/cursors.tcl, library/ttk/defaults.tcl:
	* library/ttk/dialog.tcl, library/ttk/entry.tcl:
	* library/ttk/fonts.tcl, library/ttk/icons.tcl:
	* library/ttk/keynav.tcl, library/ttk/menubutton.tcl:
	* library/ttk/notebook.tcl, library/ttk/panedwindow.tcl:
	* library/ttk/progress.tcl, library/ttk/scale.tcl:
	* library/ttk/scrollbar.tcl, library/ttk/sizegrip.tcl:
	* library/ttk/treeview.tcl, library/ttk/ttk.tcl:
	* library/ttk/utils.tcl, library/ttk/winTheme.tcl:
	* library/ttk/xpTheme.tcl:
	* macosx/ttkMacOSXTheme.c:
	* tests/ttk/all.tcl, tests/ttk/bwidget.test, tests/ttk/combobox.test:
	* tests/ttk/entry.test, tests/ttk/image.test:
	* tests/ttk/labelframe.test, tests/ttk/layout.test:
	* tests/ttk/misc.test, tests/ttk/notebook.test:
	* tests/ttk/panedwindow.test, tests/ttk/progressbar.test:
	* tests/ttk/scrollbar.test, tests/ttk/treetags.test:
	* tests/ttk/treeview.test, tests/ttk/ttk.test, tests/ttk/validate.test:
	* win/ttkWinMonitor.c, win/ttkWinTheme.c, win/ttkWinXPTheme.c:
	First import of Ttk themed Tk widgets as branched from tile 0.7.8

	* generic/tkInt.h, generic/tkWindow.c: add Ttk_Init call, copy
	tk classic widgets to ::tk namespace.
	* library/tk.tcl: add source of ttk/ttk.tcl, define $::ttk::library.
	* unix/Makefile.in, win/Makefile.in: add Ttk build bits
	* win/configure, win/configure.in: check for uxtheme.h (XP theme).
@
text
@d1 1
a1 1
/* $Id: ttkWidget.h,v 1.50 2006/09/21 18:22:34 jenglish Exp $
d9 2
a10 2
#ifndef WIDGET_H
#define WIDGET_H 1
d19 1
a19 1
#define CURSOR_ON 		0x0020	/* See BlinkCursor() */
d66 1
a66 1
extern int WidgetEnsembleCommand(	/* Run an ensemble command */
d96 5
a100 5
extern int  NullInitialize(Tcl_Interp *, void *);
extern int  NullPostConfigure(Tcl_Interp *, void *, int);
extern void NullCleanup(void *recordPtr);
extern Ttk_Layout WidgetGetLayout(Tcl_Interp *, Ttk_Theme, void *recordPtr);
extern Ttk_Layout WidgetGetOrientedLayout(
d102 3
a104 3
extern int  WidgetSize(void *recordPtr, int *w, int *h);
extern void WidgetDoLayout(void *recordPtr);
extern void WidgetDisplay(void *recordPtr, Drawable);
d106 1
a106 1
extern int CoreConfigure(Tcl_Interp*, void *, int mask);
d110 4
a113 4
extern int WidgetConfigureCommand(Tcl_Interp *, int, Tcl_Obj*const[], void *);
extern int WidgetCgetCommand(Tcl_Interp *, int, Tcl_Obj*const[], void *);
extern int WidgetInstateCommand(Tcl_Interp *, int, Tcl_Obj*const[], void *);
extern int WidgetStateCommand(Tcl_Interp *, int, Tcl_Obj*const[], void *);
d117 1
a117 1
extern int WidgetIdentifyCommand(Tcl_Interp *, int, Tcl_Obj*const[], void *);
d119 1
a119 1
extern int WidgetConstructorObjCmd(ClientData,Tcl_Interp*,int,Tcl_Obj*CONST[]);
d123 1
a123 1
	WidgetConstructorObjCmd, (ClientData)specPtr,NULL)
d144 1
a144 1
extern int WidgetDestroyed(WidgetCore *);
d147 1
a147 1
extern void WidgetChangeState(WidgetCore *,
d150 2
a151 2
extern void TtkRedisplayWidget(WidgetCore *);
extern void TtkResizeWidget(WidgetCore *);
d153 2
a154 2
extern void TrackElementState(WidgetCore *);
extern void BlinkCursor(WidgetCore *);
d159 1
a159 1
extern void CheckStateOption(WidgetCore *, Tcl_Obj *);
d167 1
a167 1
extern Ttk_TraceHandle *Ttk_TraceVariable(
d169 2
a170 2
extern void Ttk_UntraceVariable(Ttk_TraceHandle *);
extern int Ttk_FireTrace(Ttk_TraceHandle *);
d175 1
a175 1
extern int GetImageList(
d177 1
a177 1
extern void FreeImageList(Tk_Image *);
d182 1
a182 1
extern void SendVirtualEvent(Tk_Window tgtWin, const char *eventName);
d187 1
a187 1
extern int EnumerateOptions(
d189 1
a189 1
extern int GetOptionValue(
d204 2
a205 2
extern ScrollHandle CreateScrollHandle(WidgetCore *, Scrollable *);
extern void FreeScrollHandle(ScrollHandle);
d207 1
a207 1
extern int ScrollviewCommand(
d210 3
a212 3
extern void ScrollTo(ScrollHandle, int newFirst);
extern void Scrolled(ScrollHandle, int first, int last, int total);
extern void ScrollbarUpdateRequired(ScrollHandle);
d221 2
a222 2
extern Ttk_TagTable Ttk_CreateTagTable(Tk_OptionTable, int tagRecSize);
extern void Ttk_DeleteTagTable(Ttk_TagTable);
d224 2
a225 2
extern Ttk_Tag Ttk_GetTag(Ttk_TagTable, const char *tagName);
extern Ttk_Tag Ttk_GetTagFromObj(Ttk_TagTable, Tcl_Obj *);
d227 1
a227 1
extern Tcl_Obj **Ttk_TagRecord(Ttk_Tag);
d229 1
a229 1
extern int Ttk_GetTagListFromObj(
d233 1
a233 1
extern void Ttk_FreeTagList(void **taglist);
d239 1
a239 1
extern Tk_OptionSpec CoreOptionSpecs[];
d245 3
a247 3
extern const char *TTKOrientStrings[];
extern const char *TTKCompoundStrings[];
extern const char *TTKDefaultStrings[];
d252 1
a252 1
extern int TtkGetLabelAnchorFromObj(Tcl_Interp*,Tcl_Obj*,Ttk_PositionSpec *);
d257 1
a257 1
extern void RegisterElements(Tcl_Interp *);
d261 1
a261 1
extern int Ttk_WinPlatformInit(Tcl_Interp *);
d263 2
a264 2
#define Ttk_PlatformInit Ttk_MacPlatformInit
extern int Ttk_MacPlatformInit(Tcl_Interp *);
d269 1
a269 1
#endif /* WIDGET_H */
@

