Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Removed WIDGET_SPEC_END sentinel enum. This has not, to date, actually caught any compiler errors. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
c93887de3e4fc0291eaa6a0f8601d003 |
| User & Date: | jenglish 2005-08-17 23:05:41.000 |
Context
|
2005-08-19
| ||
| 02:06 | Ttk_Manager API rationalization phase 1: renamed public functions and data structures; partial opacification; added Ttk_PlaceSlave(). BUGFIX (notebook.c): NextTab() wasn't actually returning the index of the next tab. check-in: 50c3f108f9 user: jenglish tags: master, trunk | |
|
2005-08-17
| ||
| 23:05 | Removed WIDGET_SPEC_END sentinel enum. This has not, to date, actually caught any compiler errors. check-in: c93887de3e user: jenglish tags: master, trunk | |
| 22:49 | Drop optionTable, tkwin arguments to Ttk_Rebind[Sub]Layout; these don't ever change. check-in: 26a220ba18 user: jenglish tags: master, trunk | |
Changes
Changes to ChangeLog.
1 2 3 4 5 6 7 | 2005-08-17 Joe English <jenglish@users.sourceforge.net> * generic/layout.c, generic/tkTheme.h, generic/notebook.c, generic/treeview.c(Ttk_RebindSublayout): Drop optionTable, tkwin arguments to Ttk_Rebind[Sub]Layout; these don't ever change. 2005-08-13 Joe English <jenglish@users.sourceforge.net> | > > > > | 1 2 3 4 5 6 7 8 9 10 11 | 2005-08-17 Joe English <jenglish@users.sourceforge.net> * generic/widget.h, generic/widget.c, others: Remove WIDGET_SPEC_END sentinel enum. 2005-08-17 Joe English <jenglish@users.sourceforge.net> * generic/layout.c, generic/tkTheme.h, generic/notebook.c, generic/treeview.c(Ttk_RebindSublayout): Drop optionTable, tkwin arguments to Ttk_Rebind[Sub]Layout; these don't ever change. 2005-08-13 Joe English <jenglish@users.sourceforge.net> |
| ︙ | ︙ |
Changes to generic/button.c.
|
| | | 1 2 3 4 5 6 7 8 | /* $Id: button.c,v 1.40 2005/07/13 18:05:25 jenglish Exp $ * Copyright (c) 2003, Joe English * * Tile package: button, checkbutton, radiobutton, and menubutton widgets. */ #include <string.h> #include <tk.h> |
| ︙ | ︙ | |||
36 37 38 39 40 41 42 |
*/
Tcl_Obj *imageObj;
/*
* Compound label/image resources:
*/
Tcl_Obj *compoundObj;
| | | | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
*/
Tcl_Obj *imageObj;
/*
* Compound label/image resources:
*/
Tcl_Obj *compoundObj;
Tcl_Obj *paddingObj;
/*
* Compatibility/legacy options:
*/
Tcl_Obj *stateObj;
} BasePart;
typedef struct
{
|
| ︙ | ︙ | |||
68 69 70 71 72 73 74 |
0,0,0 },
/* SB: OPTION_INT, see <<NOTE-NULLOPTIONS>> */
{TK_OPTION_STRING, "-width", "width", "Width",
NULL, Tk_Offset(Base,base.widthObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
/*
| | | | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
0,0,0 },
/* SB: OPTION_INT, see <<NOTE-NULLOPTIONS>> */
{TK_OPTION_STRING, "-width", "width", "Width",
NULL, Tk_Offset(Base,base.widthObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
/*
* Image options
*/
{TK_OPTION_STRING, "-image", "image", "Image", NULL/*default*/,
Tk_Offset(Base,base.imageObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
/*
* Compound base/image options
*/
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
"none", Tk_Offset(Base,base.compoundObj), -1,
0,(ClientData)TTKCompoundStrings,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-padding", "padding", "Pad",
NULL, Tk_Offset(Base,base.paddingObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED},
/*
* Compatibility/legacy options
*/
{TK_OPTION_STRING, "-state", "state", "State",
"normal", Tk_Offset(Base,base.stateObj), -1,
0,0,STATE_CHANGED },
WIDGET_INHERIT_OPTIONS(CoreOptionSpecs)
};
|
| ︙ | ︙ | |||
285 286 287 288 289 290 291 |
return status;
}
/*------------------------------------------------------------------------
* +++ Label widget:
| | | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
return status;
}
/*------------------------------------------------------------------------
* +++ Label widget:
* Just a base widget that adds a few appearance-related options
*/
typedef struct
{
Tcl_Obj *backgroundObj;
Tcl_Obj *foregroundObj;
Tcl_Obj *fontObj;
|
| ︙ | ︙ | |||
362 363 364 365 366 367 368 |
BaseInitialize, /* initializeProc */
BaseCleanup, /* cleanupProc */
BaseConfigure, /* configureProc */
BasePostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
| | < | | 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
BaseInitialize, /* initializeProc */
BaseCleanup, /* cleanupProc */
BaseConfigure, /* configureProc */
BasePostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
WidgetDisplay /* displayProc */
};
/*------------------------------------------------------------------------
* +++ Button widget.
* Adds a new subcommand "invoke", and options "-command" and "-default"
*/
typedef struct
{
Tcl_Obj *commandObj;
Tcl_Obj *defaultStateObj;
} ButtonPart;
|
| ︙ | ︙ | |||
463 464 465 466 467 468 469 |
BaseInitialize, /* initializeProc */
BaseCleanup, /* cleanupProc */
ButtonConfigure, /* configureProc */
BasePostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
| | < < | 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 |
BaseInitialize, /* initializeProc */
BaseCleanup, /* cleanupProc */
ButtonConfigure, /* configureProc */
BasePostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
WidgetDisplay /* displayProc */
};
/*------------------------------------------------------------------------
* +++ Checkbutton widget.
*/
typedef struct
{
|
| ︙ | ︙ | |||
512 513 514 515 516 517 518 |
WIDGET_INHERIT_OPTIONS(BaseOptionSpecs)
};
CHECKBUTTON_COMPAT_OPTIONS
/*
| | | 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
WIDGET_INHERIT_OPTIONS(BaseOptionSpecs)
};
CHECKBUTTON_COMPAT_OPTIONS
/*
* Variable trace procedure for checkbutton -variable option
*/
static int
CheckbuttonVariableChanged(
Tcl_Interp *interp, /* Interpreter containing variable. */
void *clientData, /* widget record pointer */
const char *value) /* Variable's new value */
{
|
| ︙ | ︙ | |||
657 658 659 660 661 662 663 |
CheckbuttonInitialize, /* initializeProc */
CheckbuttonCleanup, /* cleanupProc */
CheckbuttonConfigure, /* configureProc */
CheckbuttonPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
| | < < | 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 |
CheckbuttonInitialize, /* initializeProc */
CheckbuttonCleanup, /* cleanupProc */
CheckbuttonConfigure, /* configureProc */
CheckbuttonPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
WidgetDisplay /* displayProc */
};
/*------------------------------------------------------------------------
* +++ Radiobutton widget.
*/
typedef struct
|
| ︙ | ︙ | |||
842 843 844 845 846 847 848 |
RadiobuttonInitialize, /* initializeProc */
RadiobuttonCleanup, /* cleanupProc */
RadiobuttonConfigure, /* configureProc */
RadiobuttonPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
| | < | 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 |
RadiobuttonInitialize, /* initializeProc */
RadiobuttonCleanup, /* cleanupProc */
RadiobuttonConfigure, /* configureProc */
RadiobuttonPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
WidgetDisplay /* displayProc */
};
/*------------------------------------------------------------------------
* +++ Menubutton widget.
*/
typedef struct
|
| ︙ | ︙ | |||
907 908 909 910 911 912 913 |
BaseInitialize, /* initializeProc */
BaseCleanup, /* cleanupProc */
BaseConfigure, /* configureProc */
BasePostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
| | < | 901 902 903 904 905 906 907 908 909 910 |
BaseInitialize, /* initializeProc */
BaseCleanup, /* cleanupProc */
BaseConfigure, /* configureProc */
BasePostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
WidgetDisplay /* displayProc */
};
|
Changes to generic/entry.c.
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * $Id: entry.c,v 1.31 2005/08/11 20:07:31 jenglish Exp $ * * DERIVED FROM: tk/generic/tkEntry.c r1.35. * * Copyright (c) 1990-1994 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 2000 Ajuba Solutions. * Copyright (c) 2002 ActiveState Corporation. |
| ︙ | ︙ | |||
1919 1920 1921 1922 1923 1924 1925 |
EntryInitialize, /* initializeProc */
EntryCleanup, /* cleanupProc */
EntryConfigure, /* configureProc */
EntryPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
EntryDoLayout, /* layoutProc */
| | < | 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 |
EntryInitialize, /* initializeProc */
EntryCleanup, /* cleanupProc */
EntryConfigure, /* configureProc */
EntryPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
EntryDoLayout, /* layoutProc */
EntryDisplay /* displayProc */
};
/*------------------------------------------------------------------------
* +++ Combobox widget record.
*/
typedef struct {
|
| ︙ | ︙ | |||
2076 2077 2078 2079 2080 2081 2082 |
ComboboxInitialize, /* initializeProc */
EntryCleanup, /* cleanupProc */
ComboboxConfigure, /* configureProc */
EntryPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
EntryDoLayout, /* layoutProc */
| | < < | 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 |
ComboboxInitialize, /* initializeProc */
EntryCleanup, /* cleanupProc */
ComboboxConfigure, /* configureProc */
EntryPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
EntryDoLayout, /* layoutProc */
EntryDisplay /* displayProc */
};
/*------------------------------------------------------------------------
* +++ Textarea element.
*
* Text display area for Entry widgets.
* Just computes requested size; display is handled by the widget itself.
*/
|
| ︙ | ︙ |
Changes to generic/frame.c.
|
| | | 1 2 3 4 5 6 7 8 | /* $Id: frame.c,v 1.38 2005/08/16 17:03:05 jenglish Exp $ * Copyright (c) 2004, Joe English * * Tile widget set: frame and labelframe widgets * * Note to maintainers: UNDER NO CIRCUMSTANCES is anyone to add * the -colormap, -visual, or -container resources to this widget. * Thank you. |
| ︙ | ︙ | |||
164 165 166 167 168 169 170 |
NullInitialize, /* initializeProc */
NullCleanup, /* cleanupProc */
FrameConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
FrameSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
| | < | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
NullInitialize, /* initializeProc */
NullCleanup, /* cleanupProc */
FrameConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
FrameSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
WidgetDisplay /* displayProc */
};
/* ======================================================================
* +++ Labelframe widget:
*/
#define LABELFRAME_SPACE 4
|
| ︙ | ︙ | |||
632 633 634 635 636 637 638 |
NullInitialize, /* initializeProc */
LabelframeCleanup, /* cleanupProc */
LabelframeConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
LabelframeSize, /* sizeProc */
LabelframeDoLayout, /* layoutProc */
| | < | 631 632 633 634 635 636 637 638 639 640 |
NullInitialize, /* initializeProc */
LabelframeCleanup, /* cleanupProc */
LabelframeConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
LabelframeSize, /* sizeProc */
LabelframeDoLayout, /* layoutProc */
WidgetDisplay /* displayProc */
};
|
Changes to generic/notebook.c.
|
| | | 1 2 3 4 5 6 7 8 | /* $Id: notebook.c,v 1.67 2005/08/17 22:49:14 jenglish Exp $ * Copyright (c) 2004, Joe English * * TODO: Possibly: track <Map>, <Unmap> events on the master, map/unmap slaves. * * NOTE-ACTIVE: activeTabIndex is not always correct (it's * more trouble than it's worth to track this 100%) */ |
| ︙ | ︙ | |||
988 989 990 991 992 993 994 |
NotebookInitialize, /* initializeProc */
NotebookCleanup, /* cleanupProc */
NotebookConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
NotebookGetLayout, /* getLayoutProc */
NotebookSize, /* geometryProc */
NotebookDoLayout, /* layoutProc */
| | < | 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 |
NotebookInitialize, /* initializeProc */
NotebookCleanup, /* cleanupProc */
NotebookConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
NotebookGetLayout, /* getLayoutProc */
NotebookSize, /* geometryProc */
NotebookDoLayout, /* layoutProc */
NotebookDisplay /* displayProc */
};
TTK_BEGIN_LAYOUT(NotebookLayout)
TTK_NODE("Notebook.client", TTK_FILL_BOTH)
TTK_END_LAYOUT
TTK_BEGIN_LAYOUT(TabLayout)
|
| ︙ | ︙ |
Changes to generic/paned.c.
|
| | | 1 2 3 4 5 6 7 8 | /* $Id: paned.c,v 1.4 2005/08/10 22:57:11 jenglish Exp $ * * Copyright (c) 2005, Joe English. Freely redistributable. * * Tile Widget Set: ttk::paned widget. * * TODO: track active/pressed sash. */ |
| ︙ | ︙ | |||
770 771 772 773 774 775 776 |
PanedInitialize, /* initializeProc */
PanedCleanup, /* cleanupProc */
CoreConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
PanedGetLayout, /* getLayoutProc */
PanedSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
| | < < | 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 |
PanedInitialize, /* initializeProc */
PanedCleanup, /* cleanupProc */
CoreConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
PanedGetLayout, /* getLayoutProc */
PanedSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
PanedDisplay /* displayProc */
};
/*------------------------------------------------------------------------
* +++ Elements and layouts.
*/
typedef struct {
|
| ︙ | ︙ |
Changes to generic/progress.c.
|
| | | 1 2 3 4 5 6 7 8 | /* $Id: progress.c,v 1.6 2005/03/26 23:26:22 jenglish Exp $ * * Copyright (c) Joe English, Pat Thoyts, Michael Kirkham * * Tile widget set: progress bar widget. */ #include <math.h> |
| ︙ | ︙ | |||
506 507 508 509 510 511 512 |
ProgressbarInitialize, /* initializeProc */
ProgressbarCleanup, /* cleanupProc */
ProgressbarConfigure, /* configureProc */
ProgressbarPostConfigure, /* postConfigureProc */
ProgressbarGetLayout, /* getLayoutProc */
ProgressbarSize, /* sizeProc */
ProgressbarDoLayout, /* layoutProc */
| | < < | 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 |
ProgressbarInitialize, /* initializeProc */
ProgressbarCleanup, /* cleanupProc */
ProgressbarConfigure, /* configureProc */
ProgressbarPostConfigure, /* postConfigureProc */
ProgressbarGetLayout, /* getLayoutProc */
ProgressbarSize, /* sizeProc */
ProgressbarDoLayout, /* layoutProc */
WidgetDisplay /* displayProc */
};
/*
* Layouts:
*/
TTK_BEGIN_LAYOUT(VerticalProgressbarLayout)
TTK_GROUP("Vertical.Progressbar.trough", TTK_FILL_BOTH,
|
| ︙ | ︙ |
Changes to generic/scale.c.
1 2 3 4 5 6 | /* scale.c - Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net> * * Themed scale widget implementation. * * This is EXPERIMENTAL code. * | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /* scale.c - Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net> * * Themed scale widget implementation. * * This is EXPERIMENTAL code. * * $Id: scale.c,v 1.40 2005/02/27 17:48:32 jenglish Exp $ * */ #include <tk.h> #include <string.h> #include <stdio.h> #include "tkTheme.h" |
| ︙ | ︙ | |||
586 587 588 589 590 591 592 |
ScaleInitialize, /* initialization proc */
NullCleanup, /* cleanup proc */
CoreConfigure, /* configure proc */
NullPostConfigure, /* postConfigure */
ScaleGetLayout, /* getLayoutProc */
ScaleSize, /* sizeProc */
ScaleDoLayout, /* layoutProc */
| | < | < | 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
ScaleInitialize, /* initialization proc */
NullCleanup, /* cleanup proc */
CoreConfigure, /* configure proc */
NullPostConfigure, /* postConfigure */
ScaleGetLayout, /* getLayoutProc */
ScaleSize, /* sizeProc */
ScaleDoLayout, /* layoutProc */
ScaleDisplay /* displayProc */
};
WidgetSpec ProgressWidgetSpec =
{
"TProgress", /* Class name */
sizeof(Scale), /* record size */
ScaleOptionSpecs, /* option specs */
ScaleCommands, /* widget commands */
ProgressInitialize, /* initialization proc */
NullCleanup, /* cleanup proc */
CoreConfigure, /* configure proc */
NullPostConfigure, /* postConfigureProc */
ProgressGetLayout, /* getLayoutProc */
ScaleSize, /* sizeProc */
ProgressDoLayout, /* layoutProc */
WidgetDisplay /* displayProc */
};
|
Changes to generic/scrollbar.c.
|
| | < < < | 1 2 3 4 5 6 7 8 9 10 | /* $Id: scrollbar.c,v 1.41 2005/02/27 17:48:32 jenglish Exp $ * Copyright (c) 2003, Joe English * Tile widget set: scrollbar widget implementation. */ #include <string.h> #include <tk.h> #include "tkTheme.h" #include "widget.h" |
| ︙ | ︙ | |||
311 312 313 314 315 316 317 |
ScrollbarInitialize, /* initializeProc */
NullCleanup, /* cleanupProc */
CoreConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
ScrollbarGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
ScrollbarDoLayout, /* layoutProc */
| | < < | 308 309 310 311 312 313 314 315 316 317 318 |
ScrollbarInitialize, /* initializeProc */
NullCleanup, /* cleanupProc */
CoreConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
ScrollbarGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
ScrollbarDoLayout, /* layoutProc */
WidgetDisplay /* displayProc */
};
/*EOF*/
|
Changes to generic/separator.c.
|
| | | 1 2 3 4 5 6 7 8 | /* $Id: separator.c,v 1.4 2005/02/27 17:48:32 jenglish Exp $ * * Copyright (c) 2004, Joe English * * Tile package: separator widget. */ #include <tk.h> |
| ︙ | ︙ | |||
71 72 73 74 75 76 77 |
NullInitialize, /* initializeProc */
NullCleanup, /* cleanupProc */
CoreConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
SeparatorGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
| | < < | 71 72 73 74 75 76 77 78 79 80 81 |
NullInitialize, /* initializeProc */
NullCleanup, /* cleanupProc */
CoreConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
SeparatorGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
WidgetDisplay /* displayProc */
};
/*EOF*/
|
Changes to generic/square.c.
1 2 3 4 | /* square.c - Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net> * * Minimal sample tile widget. * | | | 1 2 3 4 5 6 7 8 9 10 11 12 | /* square.c - Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net> * * Minimal sample tile widget. * * $Id: square.c,v 1.3 2004/12/31 01:32:57 jenglish Exp $ */ #include <tk.h> #include "tkTheme.h" #include "widget.h" #ifndef DEFAULT_BORDERWIDTH |
| ︙ | ︙ | |||
99 100 101 102 103 104 105 |
NullInitialize, /* initializeProc */
NullCleanup, /* cleanupProc */
CoreConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
| | < < | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
NullInitialize, /* initializeProc */
NullCleanup, /* cleanupProc */
CoreConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
WidgetGetLayout, /* getLayoutProc */
WidgetSize, /* sizeProc */
WidgetDoLayout, /* layoutProc */
WidgetDisplay /* displayProc */
};
/* ----------------------------------------------------------------------
* Square element
*
* In this section we demonstrate what is required to create a new themed
* element.
|
| ︙ | ︙ |
Changes to generic/treeview.c.
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * $Id: treeview.c,v 1.17 2005/08/17 22:49:14 jenglish Exp $ * Copyright (c) 2004, Joe English * * Tile widget set: treeview widget. */ #include <string.h> #include <tk.h> |
| ︙ | ︙ | |||
2352 2353 2354 2355 2356 2357 2358 |
TreeviewInitialize, /* initializeProc */
TreeviewCleanup, /* cleanupProc */
TreeviewConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
TreeviewGetLayout, /* getLayoutProc */
TreeviewSize, /* sizeProc */
TreeviewDoLayout, /* layoutProc */
| | < | 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 |
TreeviewInitialize, /* initializeProc */
TreeviewCleanup, /* cleanupProc */
TreeviewConfigure, /* configureProc */
NullPostConfigure, /* postConfigureProc */
TreeviewGetLayout, /* getLayoutProc */
TreeviewSize, /* sizeProc */
TreeviewDoLayout, /* layoutProc */
TreeviewDisplay /* displayProc */
};
/*------------------------------------------------------------------------
* +++ Layout specifications.
*/
TTK_BEGIN_LAYOUT(TreeviewLayout)
|
| ︙ | ︙ |
Changes to generic/widget.c.
|
| | | 1 2 3 4 5 6 7 8 | /* $Id: widget.c,v 1.43 2005/04/16 00:34:54 jenglish Exp $ * Copyright (c) 2003, Joe English * * Tile widget implementation, core widget utilities. * */ #include <string.h> |
| ︙ | ︙ | |||
27 28 29 30 31 32 33 |
}
corePtr->layout = newLayout;
}
}
static void UpdateGeometry(WidgetCore *corePtr)
{
| < | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
}
corePtr->layout = newLayout;
}
}
static void UpdateGeometry(WidgetCore *corePtr)
{
int reqWidth = 1, reqHeight = 1;
if (corePtr->widgetSpec->sizeProc(corePtr,&reqWidth,&reqHeight)) {
Tk_GeometryRequest(corePtr->tkwin, reqWidth, reqHeight);
}
}
/*
* RedisplayWidget --
* Redraw a widget. Called as an idle handler.
|
| ︙ | ︙ |
Changes to generic/widget.h.
|
| | | 1 2 3 4 5 6 7 8 | /* $Id: widget.h,v 1.44 2005/07/29 17:59:07 jenglish Exp $ * Copyright (c) 2003, Joe English * * Helper routines for widget implementations. * * Require: tkTheme.h. */ |
| ︙ | ︙ | |||
68 69 70 71 72 73 74 |
extern int WidgetEnsembleCommand( /* Run an ensemble command */
WidgetCommandSpec *commands, int cmdIndex,
Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], void *recordPtr);
/*
* Widget specifications:
*/
| < < < | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
extern int WidgetEnsembleCommand( /* Run an ensemble command */
WidgetCommandSpec *commands, int cmdIndex,
Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], void *recordPtr);
/*
* Widget specifications:
*/
struct WidgetSpec_
{
const char *className; /* Widget class name */
size_t recordSize; /* #bytes in widget record */
Tk_OptionSpec *optionSpecs; /* Option specifications */
WidgetCommandSpec *commands; /* Widget instance subcommands */
/*
* Hooks:
*/
int (*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:
*/
extern int NullInitialize(Tcl_Interp *, void *);
extern int NullPostConfigure(Tcl_Interp *, void *, int);
|
| ︙ | ︙ |