deepBottom = (((BorderBits)borderStyle).sizable && isNormal) ? bottom : border;
}
- surface.Bevel(((BorderBits)borderStyle).bevel ? false : true, deepBorder, deepTop,
+ surface.Bevel(((BorderBits)borderStyle).bevel ? false : true, deepBorder, deepTop,
size.w - deepBorder - deepBorder, size.h - deepBottom - deepTop);
}
surface.SetForeground(activeBorder);
surface.Rectangle(2, 2, size.w-3, size.h-3);
- // Resizeable frame is 1 pixel thicker
+ // Resizeable frame is 1 pixel thicker
if(((BorderBits)borderStyle).sizable && isNormal)
surface.Rectangle(3, 3, size.w - 4, size.h - 4);
}
surface.Gradient(gradient, sizeof(gradient) / sizeof(ColorKey), GRADIENT_SMOOTHNESS, GRADIENT_DIRECTION,
border, top, size.w - border - 1, top + CAPTION - 2);
else
- surface.Gradient(gradientInactive, sizeof(gradientInactive) / sizeof(ColorKey),
+ surface.Gradient(gradientInactive, sizeof(gradientInactive) / sizeof(ColorKey),
GRADIENT_SMOOTHNESS, GRADIENT_DIRECTION,
border, top, size.w - border - 1, top + CAPTION - 2);
{
int buttonsSize = border +
((hasMaximize || hasMinimize) ? 52 : 18);
- surface.WriteTextDots(left, border + NAME_OFFSETX, top + NAME_OFFSET,
+ surface.WriteTextDots(left, border + NAME_OFFSETX, top + NAME_OFFSET,
size.w - (buttonsSize + border + 4), name, strlen(name));
}
}
}
}
-#define PUREVTBL(c) ((int (**)())*(void **)((byte *)class(c).data + 4))
+#define PUREVTBL(c) ((int (**)())*(void **)((byte *)class(c).data + sizeof(void *)))
extern int __ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnApplyGraphics;
extern int __ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnRedraw;
void OnRedraw(Surface surface)
{
int isDefault = (int)this.isDefault;
- PUREVTBL(Button)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnRedraw](this, surface);
+ ((void (*)(Window, Surface))(void *)PUREVTBL(Button)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnRedraw])(this, surface);
if(bevel || (bevelOver && (buttonState == down || buttonState == over || checked)))
{
Color c = steelBlue;
surface.SetForeground(Color { Min((int)c.r * 16/10, 255), Min((int)c.g * 16/10, 255), Min((int)c.b * 16/10,255) });
surface.HLine(0 + isDefault, clientSize.w-2 - isDefault, isDefault);
surface.VLine(1 + isDefault, clientSize.h-2 - isDefault, isDefault);
-
-
+
+
surface.SetForeground(selectionColor);
surface.HLine(1 + isDefault, clientSize.w-2 - isDefault, clientSize.h-2 - isDefault);
surface.VLine(1 + isDefault, clientSize.h-3 - isDefault, clientSize.w-2 - isDefault);
-
+
if(bevel)
{
//surface.SetForeground(skinForeground);
{
void OnApplyGraphics()
{
- PUREVTBL(ScrollBar)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnApplyGraphics](this);
+ ((void (*)(Window))(void *)PUREVTBL(ScrollBar)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnApplyGraphics])(this);
background = { skinBackground.r * 9 / 6, skinBackground.g * 9 / 6, skinBackground.b * 9 / 6 };
downBtn.background = Color { 70 * 6/10, 130* 6/10, 180* 6/10 }; //skinBackground;
downBtn.bitmap = { "<:ecere>elements/arrowDown.png", monochrome = true };
thumb.background = Color { 70 * 6/10, 130* 6/10, 180* 6/10 }; //skinBackground;
- }
+ }
}
class AcovelSkin_DropBox : DropBox
{
void OnApplyGraphics()
{
- PUREVTBL(DropBox)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnApplyGraphics](this);
+ ((void (*)(Window))(void *)PUREVTBL(DropBox)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnApplyGraphics])(this);
button.bitmap = { "<:ecere>elements/arrowDown.png", monochrome = true };
background = skinBackground;
foreground = skinForeground;
this.selectionColor = ::selectionColor;
- }
+ }
}
class AcovelSkin_ListBox : ListBox
{
void OnApplyGraphics()
{
- PUREVTBL(ListBox)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnApplyGraphics](this);
+ ((void (*)(Window))(void *)PUREVTBL(ListBox)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnApplyGraphics])(this);
background = skinBackground;
foreground = skinForeground;
this.selectionColor = ::selectionColor;
- }
+ }
}
public class AcovelSkin : Skin