define evenRowBackground = red; //Color { 80, 70, 60 };
define skinTextColor = skinMainColor;
-define skinInactiveTextColor = Color { skinMainColor.r - 20, skinMainColor.g - 20, skinMainColor.b - 20 };
+define skinInactiveTextColor = Color { 0, 51, 108 };
ColorKey skinGradient[3] =
{
{ Color { 40,40,40 }, 0.0f },
{ darkGray, 0.5f },
- { Color { 40,40,40 }, 1.0f },
+ { Color { 40,40,40 }, 1.0f }
};
class SimSkin_Window : Window
{
- void ShowDecorations(Font captionFont, Surface surface, char * name, bool active, bool moving)
+ void ShowDecorations(Font captionFont, Surface surface, const char * name, bool active, bool moving)
{
bool isNormal = (state == normal || state == maximized);
int top = 0, border = 0, bottom = 0;
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,
- size.w - (buttonsSize + border + 4), name, strlen(name));
+ surface.WriteTextDots(left, border + NAME_OFFSETX, top + NAME_OFFSET,
+ size.w - (buttonsSize + border + 4), name, (int)strlen(name));
}
}
if(((BorderBits)borderStyle).contour && !((BorderBits)borderStyle).fixed)
void SetWindowMinimum(MinMaxValue * mw, MinMaxValue * mh)
{
- bool isNormal = (state == normal || state == maximized);
+ //bool isNormal = (state == normal || state == maximized);
if(nativeDecorations && rootWindow == this) return;
if(((BorderBits)borderStyle).fixed && (state != maximized || !parent.menuBar))
{
}
}*/
-#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;
-static void Dummy()
+__attribute__((unused)) static void Dummy()
{
- Window a;
+ Window a = null;
a.OnApplyGraphics();
a.OnRedraw(null);
}
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(skinMainColor);
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);
{
if(isRadio)
{
- PUREVTBL(Button)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnRedraw](this, surface);
+ ((void (*)(Window, Surface))(void *)PUREVTBL(Button)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnRedraw])(this, surface);
return;
}
// if(bevel)
{
ButtonState state = this.buttonState;
Bitmap buttonBitmap = bitmap ? bitmap.bitmap : null;
- char * text = this.text;
+ const char * text = this.text;
int offset = (state == down && this.offset) ? 1 : 0;
- Color backColor = background;
+ //Color backColor = background;
int isDefault = this.isDefault;
Font font;
x, y,
0,0,buttonBitmap.width,buttonBitmap.height);
}
- else
+ else
{
// Push Buttons
if(scaleBitmap)
{
if(bevel || offset)
- surface.Stretch(buttonBitmap,
+ surface.Stretch(buttonBitmap,
1 + offset, 1 + offset,0,0,
clientSize.w-3,clientSize.h-3,buttonBitmap.width,buttonBitmap.height);
else
if(text)
{
int tw, th;
- surface.TextExtent(text, strlen(text),&tw, &th);
+ surface.TextExtent(text, (int)strlen(text),&tw, &th);
if((isRadio || isCheckbox) && !bevelOver)
- WriteCaption(surface, /*clientSize.h +*/ CAPTION_DISTANCE + 3,
+ WriteCaption(surface, /*clientSize.h +*/ CAPTION_DISTANCE + 3,
(clientSize.h - th - 4)/2);
- else
+ else
{
int x, y = (clientSize.h - th - 1)/2 + offset;
-
+
if(ellipsis)
{
int width = clientSize.w - 2*6;
int x = 6 + offset;
- surface.WriteTextDots(alignment, x, y, width, text, strlen(text));
+ surface.WriteTextDots(alignment, x, y, width, text, (int)strlen(text));
}
else
{
{
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 = { (direction == vertical) ? "<:ecere>elements/arrowDown.png" : "<:ecere>elements/arrowRight.png", monochrome = true };
thumb.background = Color { 70 * 6/10, 130* 6/10, 180* 6/10 }; //skinBackground;*/
- }
+ }
}
/*class SimSkin_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;
selectionColor = skinMainColor;
- }
+ }
}*/
/*class SimSkin_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;
selectionColor = skinMainColor;
- }
+ }
}*/
public class SimSkin : Skin
return { faceName = "Verdana", size = 6.5f };
}
- char * ::CursorsBitmaps(uint id, int *hotSpotX, int *hotSpotY, byte ** paletteShades)
+ const char * ::CursorsBitmaps(uint id, int *hotSpotX, int *hotSpotY, byte ** paletteShades)
{
return null;
}