summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkSquare.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/ttk/ttkSquare.c')
-rw-r--r--generic/ttk/ttkSquare.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/generic/ttk/ttkSquare.c b/generic/ttk/ttkSquare.c
index b5ff73b..d2f4540 100644
--- a/generic/ttk/ttkSquare.c
+++ b/generic/ttk/ttkSquare.c
@@ -2,14 +2,14 @@
*
* Minimal sample ttk widget.
*
- * $Id: ttkSquare.c,v 1.6 2007/12/13 15:26:26 dgp Exp $
+ * $Id: ttkSquare.c,v 1.6.2.1 2010/08/26 02:06:09 hobbs Exp $
*/
#include <tk.h>
#include "ttkTheme.h"
#include "ttkWidget.h"
-#ifdef TTK_SQUARE_WIDGET
+#if defined(TTK_SQUARE_WIDGET) || 1
#ifndef DEFAULT_BORDERWIDTH
#define DEFAULT_BORDERWIDTH "2"
@@ -100,9 +100,9 @@ SquareDoLayout(void *clientData)
{
WidgetCore *corePtr = (WidgetCore *)clientData;
Ttk_Box winBox;
- Ttk_LayoutNode *squareNode;
+ Ttk_Element squareNode;
- squareNode = Ttk_LayoutFindNode(corePtr->layout, "square");
+ squareNode = Ttk_FindElement(corePtr->layout, "square");
winBox = Ttk_WinBox(corePtr->tkwin);
Ttk_PlaceLayout(corePtr->layout, corePtr->state, winBox);
@@ -116,12 +116,12 @@ SquareDoLayout(void *clientData)
Tk_Anchor anchor = TK_ANCHOR_CENTER;
Ttk_Box b;
- b = Ttk_LayoutNodeParcel(squareNode);
+ b = Ttk_ElementParcel(squareNode);
if (squarePtr->square.anchorObj != NULL)
Tk_GetAnchorFromObj(NULL, squarePtr->square.anchorObj, &anchor);
b = Ttk_AnchorBox(winBox, b.width, b.height, anchor);
- Ttk_PlaceLayoutNode(corePtr->layout, squareNode, b);
+ Ttk_PlaceElement(corePtr->layout, squareNode, b);
}
}
@@ -131,14 +131,13 @@ SquareDoLayout(void *clientData)
* that are sufficient for our needs.
*/
-static WidgetCommandSpec SquareCommands[] =
-{
- { "configure", TtkWidgetConfigureCommand },
- { "cget", TtkWidgetCgetCommand },
- { "identify", TtkWidgetIdentifyCommand },
- { "instate", TtkWidgetInstateCommand },
- { "state", TtkWidgetStateCommand },
- { NULL, NULL }
+static const Ttk_Ensemble SquareCommands[] = {
+ { "configure", TtkWidgetConfigureCommand,0 },
+ { "cget", TtkWidgetCgetCommand,0 },
+ { "identify", TtkWidgetIdentifyCommand,0 },
+ { "instate", TtkWidgetInstateCommand,0 },
+ { "state", TtkWidgetStateCommand,0 },
+ { 0,0,0 }
};
/*
@@ -192,7 +191,7 @@ static Ttk_ElementOptionSpec SquareElementOptions[] =
"raised" },
{ "-width", TK_OPTION_PIXELS, Tk_Offset(SquareElement,widthObj), "20"},
{ "-height", TK_OPTION_PIXELS, Tk_Offset(SquareElement,heightObj), "20"},
- { NULL }
+ { NULL, 0, 0, NULL }
};
/*