Rename misnamed XmNraisedBorderThickness to XmNaccentBorderThickness.
This commit is contained in:
Родитель
c519f97d51
Коммит
27a7aab848
|
@ -110,7 +110,7 @@ static void GetChildDimensions (Widget,Dimension *,Dimension *);
|
|||
/* XfeToolBar class methods */
|
||||
/* */
|
||||
/*----------------------------------------------------------------------*/
|
||||
static void DrawRaiseBorder (Widget,XEvent *,Region,XRectangle *);
|
||||
static void DrawAccentBorder (Widget,XEvent *,Region,XRectangle *);
|
||||
static void LayoutIndicator (Widget);
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
@ -277,11 +277,11 @@ static XtResource resources[] =
|
|||
(XtPointer) False
|
||||
},
|
||||
{
|
||||
XmNraiseBorderThickness,
|
||||
XmCRaiseBorderThickness,
|
||||
XmNaccentBorderThickness,
|
||||
XmCAccentBorderThickness,
|
||||
XmRHorizontalDimension,
|
||||
sizeof(Dimension),
|
||||
XtOffsetOf(XfeToolBarRec , xfe_tool_bar . raise_border_thickness),
|
||||
XtOffsetOf(XfeToolBarRec , xfe_tool_bar . accent_border_thickness),
|
||||
XmRImmediate,
|
||||
(XtPointer) 0
|
||||
},
|
||||
|
@ -460,9 +460,9 @@ static XtResource resources[] =
|
|||
static XmSyntheticResource syn_resources[] =
|
||||
{
|
||||
{
|
||||
XmNraiseBorderThickness,
|
||||
XmNaccentBorderThickness,
|
||||
sizeof(Dimension),
|
||||
XtOffsetOf(XfeToolBarRec , xfe_tool_bar . raise_border_thickness),
|
||||
XtOffsetOf(XfeToolBarRec , xfe_tool_bar . accent_border_thickness),
|
||||
_XmFromHorizontalPixels,
|
||||
_XmToHorizontalPixels
|
||||
},
|
||||
|
@ -640,7 +640,7 @@ _XFE_WIDGET_CLASS_RECORD(toolbar,ToolBar) =
|
|||
|
||||
/* XfeToolBar Part */
|
||||
{
|
||||
DrawRaiseBorder, /* draw_raise_border */
|
||||
DrawAccentBorder, /* draw_accent_border */
|
||||
LayoutIndicator, /* layout_indicator */
|
||||
NULL, /* extension */
|
||||
},
|
||||
|
@ -715,8 +715,8 @@ ClassPartInit(WidgetClass wc)
|
|||
XfeToolBarWidgetClass sc = (XfeToolBarWidgetClass) wc->core_class.superclass;
|
||||
|
||||
/* Resolve inheritance of all XfeToolBar class methods */
|
||||
_XfeResolve(cc,sc,xfe_tool_bar_class,draw_raise_border,
|
||||
XfeInheritDrawRaiseBorder);
|
||||
_XfeResolve(cc,sc,xfe_tool_bar_class,draw_accent_border,
|
||||
XfeInheritDrawAccentBorder);
|
||||
|
||||
_XfeResolve(cc,sc,xfe_tool_bar_class,layout_indicator,
|
||||
XfeInheritLayoutIndicator);
|
||||
|
@ -811,8 +811,8 @@ SetValues(Widget ow,Widget rw,Widget nw,ArgList args,Cardinal *nargs)
|
|||
_XfemConfigFlags(nw) |= XfeConfigLED;
|
||||
}
|
||||
|
||||
/* raise_border_thickness */
|
||||
if (np->raise_border_thickness != op->raise_border_thickness)
|
||||
/* accent_border_thickness */
|
||||
if (np->accent_border_thickness != op->accent_border_thickness)
|
||||
{
|
||||
_XfemConfigFlags(nw) |= XfeConfigGLED;
|
||||
}
|
||||
|
@ -1220,7 +1220,7 @@ DeleteDynamicChild(Widget child)
|
|||
static void
|
||||
DrawComponents(Widget w,XEvent * event,Region region,XRectangle * clip_rect)
|
||||
{
|
||||
_XfeToolBarDrawRaiseBorder(w,event,region,clip_rect);
|
||||
_XfeToolBarDrawAccentBorder(w,event,region,clip_rect);
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
static void
|
||||
|
@ -1313,7 +1313,7 @@ GetChildDimensions(Widget child,Dimension * width_out,Dimension * height_out)
|
|||
/* The button's height */
|
||||
height =
|
||||
force_dimension ?
|
||||
(_XfemBoundaryHeight(w) - 2 * tp->raise_border_thickness) :
|
||||
(_XfemBoundaryHeight(w) - 2 * tp->accent_border_thickness) :
|
||||
_XfeHeight(child);
|
||||
}
|
||||
else if (IsSeparatorChild(child))
|
||||
|
@ -1335,7 +1335,7 @@ GetChildDimensions(Widget child,Dimension * width_out,Dimension * height_out)
|
|||
/* The button's width */
|
||||
width =
|
||||
force_dimension ?
|
||||
(_XfemBoundaryWidth(w) - 2 * tp->raise_border_thickness) :
|
||||
(_XfemBoundaryWidth(w) - 2 * tp->accent_border_thickness) :
|
||||
_XfeWidth(child);
|
||||
|
||||
/* The button's height */
|
||||
|
@ -1382,18 +1382,18 @@ GetChildDimensions(Widget child,Dimension * width_out,Dimension * height_out)
|
|||
/* */
|
||||
/*----------------------------------------------------------------------*/
|
||||
static void
|
||||
DrawRaiseBorder(Widget w,XEvent *event,Region region,XRectangle * clip_rect)
|
||||
DrawAccentBorder(Widget w,XEvent *event,Region region,XRectangle * clip_rect)
|
||||
{
|
||||
XfeToolBarPart * tp = _XfeToolBarPart(w);
|
||||
|
||||
/* Make sure there is a highlight to draw */
|
||||
if (!tp->raise_border_thickness || !tp->raised)
|
||||
if (!tp->accent_border_thickness || !tp->raised)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* The shadow thickness can be used to tweak the raised effect */
|
||||
switch(tp->raise_border_thickness)
|
||||
switch(tp->accent_border_thickness)
|
||||
{
|
||||
case 2:
|
||||
case 4:
|
||||
|
@ -1405,17 +1405,17 @@ DrawRaiseBorder(Widget w,XEvent *event,Region region,XRectangle * clip_rect)
|
|||
0,
|
||||
_XfeWidth(w),
|
||||
_XfeHeight(w),
|
||||
tp->raise_border_thickness / 2);
|
||||
tp->accent_border_thickness / 2);
|
||||
|
||||
_XmDrawShadows(XtDisplay(w),
|
||||
_XfeWindow(w),
|
||||
_XfemTopShadowGC(w),
|
||||
_XfemBottomShadowGC(w),
|
||||
tp->raise_border_thickness / 2,
|
||||
tp->raise_border_thickness / 2,
|
||||
_XfeWidth(w) - 2 * (tp->raise_border_thickness / 2),
|
||||
_XfeHeight(w) - 2 * (tp->raise_border_thickness / 2),
|
||||
tp->raise_border_thickness / 2,
|
||||
tp->accent_border_thickness / 2,
|
||||
tp->accent_border_thickness / 2,
|
||||
_XfeWidth(w) - 2 * (tp->accent_border_thickness / 2),
|
||||
_XfeHeight(w) - 2 * (tp->accent_border_thickness / 2),
|
||||
tp->accent_border_thickness / 2,
|
||||
XmSHADOW_OUT);
|
||||
|
||||
break;
|
||||
|
@ -1429,7 +1429,7 @@ DrawRaiseBorder(Widget w,XEvent *event,Region region,XRectangle * clip_rect)
|
|||
0,
|
||||
_XfeWidth(w),
|
||||
_XfeHeight(w),
|
||||
tp->raise_border_thickness);
|
||||
tp->accent_border_thickness);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1721,11 +1721,11 @@ LayoutHorizontal(Widget w,
|
|||
|
||||
width =
|
||||
_XfemOffsetLeft(w) + _XfemOffsetRight(w) +
|
||||
2 * tp->raise_border_thickness;
|
||||
2 * tp->accent_border_thickness;
|
||||
|
||||
height =
|
||||
_XfemOffsetTop(w) + _XfemOffsetBottom(w) +
|
||||
2 * tp->raise_border_thickness;
|
||||
2 * tp->accent_border_thickness;
|
||||
|
||||
/* Initialize the number of rows */
|
||||
tp->num_rows = 1;
|
||||
|
@ -1737,15 +1737,15 @@ LayoutHorizontal(Widget w,
|
|||
|
||||
Position min_x =
|
||||
_XfemOffsetLeft(w) +
|
||||
tp->raise_border_thickness;
|
||||
tp->accent_border_thickness;
|
||||
|
||||
Position max_x =
|
||||
_XfeWidth(w) -
|
||||
_XfemOffsetRight(w) -
|
||||
tp->raise_border_thickness;
|
||||
tp->accent_border_thickness;
|
||||
|
||||
Position x = min_x;
|
||||
Position y = _XfemOffsetTop(w) + tp->raise_border_thickness;
|
||||
Position y = _XfemOffsetTop(w) + tp->accent_border_thickness;
|
||||
|
||||
/* Traverse the dynamic children */
|
||||
for (node = XfeLinkedHead(_XfemDynamicChildren(w));
|
||||
|
@ -1808,17 +1808,17 @@ LayoutVertical(Widget w,
|
|||
|
||||
width =
|
||||
_XfemOffsetLeft(w) + _XfemOffsetRight(w) +
|
||||
2 * tp->raise_border_thickness;
|
||||
2 * tp->accent_border_thickness;
|
||||
|
||||
height =
|
||||
_XfemOffsetTop(w) + _XfemOffsetBottom(w) +
|
||||
2 * tp->raise_border_thickness;
|
||||
2 * tp->accent_border_thickness;
|
||||
|
||||
if (_XfemNumDynamicChildren(w) > 0)
|
||||
{
|
||||
XfeLinkNode node;
|
||||
Position x = _XfemOffsetLeft(w) + tp->raise_border_thickness;
|
||||
Position y = _XfemOffsetTop(w) + tp->raise_border_thickness;
|
||||
Position x = _XfemOffsetLeft(w) + tp->accent_border_thickness;
|
||||
Position y = _XfemOffsetTop(w) + tp->accent_border_thickness;
|
||||
|
||||
/* Traverse the dynamic children */
|
||||
for (node = XfeLinkedHead(_XfemDynamicChildren(w));
|
||||
|
@ -2361,16 +2361,16 @@ _XfeToolBarLayoutIndicator(Widget w)
|
|||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* extern */ void
|
||||
_XfeToolBarDrawRaiseBorder(Widget w,
|
||||
_XfeToolBarDrawAccentBorder(Widget w,
|
||||
XEvent * event,
|
||||
Region region,
|
||||
XRectangle * clip_rect)
|
||||
{
|
||||
XfeToolBarWidgetClass tc = (XfeToolBarWidgetClass) XtClass(w);
|
||||
|
||||
if (tc->xfe_tool_bar_class.draw_raise_border)
|
||||
if (tc->xfe_tool_bar_class.draw_accent_border)
|
||||
{
|
||||
(*tc->xfe_tool_bar_class.draw_raise_border)(w,event,region,clip_rect);
|
||||
(*tc->xfe_tool_bar_class.draw_accent_border)(w,event,region,clip_rect);
|
||||
}
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
|
|
@ -50,7 +50,6 @@ XFE_BEGIN_CPLUSPLUS_PROTECTION
|
|||
#define XmNmaxNumColumns "maxNumColumns"
|
||||
#define XmNmaxNumRows "maxNumRows"
|
||||
#define XmNnumRows "numRows"
|
||||
#define XmNraiseBorderThickness "raiseBorderThickness"
|
||||
#define XmNselectedButton "selectedButton"
|
||||
#define XmNseparatorThickness "separatorThickness"
|
||||
#define XmNtoggleBehavior "toggleBehavior"
|
||||
|
@ -65,7 +64,6 @@ XFE_BEGIN_CPLUSPLUS_PROTECTION
|
|||
#define XmCMaxNumColumns "MaxNumColumns"
|
||||
#define XmCMaxNumRows "MaxNumRows"
|
||||
#define XmCNumRows "NumRows"
|
||||
#define XmCRaiseBorderThickness "RaiseBorderThickness"
|
||||
#define XmCSelectedButton "SelectedButton"
|
||||
#define XmCSeparatorThickness "SeparatorThickness"
|
||||
#define XmCToggleBehavior "ToggleBehavior"
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include <Xfe/ToolBar.h>
|
||||
#include <Xfe/OrientedP.h>
|
||||
#include <Xfe/ButtonP.h>
|
||||
|
||||
XFE_BEGIN_CPLUSPLUS_PROTECTION
|
||||
|
||||
|
@ -38,7 +39,6 @@ XFE_BEGIN_CPLUSPLUS_PROTECTION
|
|||
/* */
|
||||
/*----------------------------------------------------------------------*/
|
||||
#define XfeInheritLayoutIndicator ((XtWidgetProc) _XtInherit)
|
||||
#define XfeInheritDrawRaiseBorder ((XfeExposeProc) _XtInherit)
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* */
|
||||
|
@ -47,7 +47,7 @@ XFE_BEGIN_CPLUSPLUS_PROTECTION
|
|||
/*----------------------------------------------------------------------*/
|
||||
typedef struct
|
||||
{
|
||||
XfeExposeProc draw_raise_border; /* draw_raise_border */
|
||||
XfeExposeProc draw_accent_border; /* draw_accent_border */
|
||||
XtWidgetProc layout_indicator; /* layout_indicator */
|
||||
XtPointer extension; /* Extension */
|
||||
} XfeToolBarClassPart;
|
||||
|
@ -92,7 +92,7 @@ typedef struct _XfeToolBarPart
|
|||
int separator_thickness; /* Separator thickness */
|
||||
|
||||
/* Raised resources */
|
||||
Dimension raise_border_thickness; /* Raise border thickness*/
|
||||
Dimension accent_border_thickness;/* Accent border thickness*/
|
||||
Boolean raised; /* Raised ? */
|
||||
|
||||
/* Radio resources */
|
||||
|
@ -187,7 +187,7 @@ typedef struct _XfeToolBarConstraintRec
|
|||
/* */
|
||||
/*----------------------------------------------------------------------*/
|
||||
extern void
|
||||
_XfeToolBarDrawRaiseBorder (Widget w,
|
||||
_XfeToolBarDrawAccentBorder (Widget w,
|
||||
XEvent * event,
|
||||
Region region,
|
||||
XRectangle * clip_rect);
|
||||
|
|
Загрузка…
Ссылка в новой задаче