2 #define WIN32_LEAN_AND_MEAN
10 //define test = Color { 5, 4, 2 };
11 define skinMainColor = Color { 0, 71, 128 };
12 define skinOppositeColor = blue; //Color { 252, 114, 22 };
13 //define skinBackground = Color { 40, 40, 40 };
14 //define skinBackground = Color { 185, 201, 215 };
15 //define skinBackground = Color { 229, 236, 241 };
16 define skinBackground = Color { 255, 255, 255 };
21 #define CORNER (BORDER * 2)
26 #define BUTTON_OFFSET 0
28 #define NAME_OFFSETX 4
33 #define MENU_HEIGHT 25
34 #define STATUS_HEIGHT 18
36 define skinForeground = skinMainColor;
37 define skinTextForeground = black;
38 define evenRowBackground = red; //Color { 80, 70, 60 };
40 define skinTextColor = skinMainColor;
41 define skinInactiveTextColor = Color { skinMainColor.r - 20, skinMainColor.g - 20, skinMainColor.b - 20 };
43 ColorKey skinGradient[3] =
45 { Color { 40,40,40 }, 0.0f },
47 { Color { 40,40,40 }, 1.0f },
50 class SimSkin_Window : Window
52 void ShowDecorations(Font captionFont, Surface surface, char * name, bool active, bool moving)
54 bool isNormal = (state == normal || state == maximized);
55 int top = 0, border = 0, bottom = 0;
57 if(nativeDecorations && rootWindow == this) return;
59 if(state == minimized)
60 top = border = bottom = DEAD_BORDER;
61 else if(((BorderBits)borderStyle).sizable)
63 top = isNormal ? TOP : 0;
64 border = isNormal ? BORDER : 0;
67 else if(((BorderBits)borderStyle).fixed)
69 top = 2; //DEAD_BORDER;
73 else if(((BorderBits)borderStyle).contour)
80 if(((BorderBits)borderStyle).deep || ((BorderBits)borderStyle).bevel)
82 int deepTop = 0, deepBottom = 0, deepBorder = 0;
83 if(((BorderBits)borderStyle).contour)
86 deepTop = (((BorderBits)borderStyle).fixed && (state != maximized || !parent.menuBar)) ? (top + CAPTION) : top;
87 deepBottom = (((BorderBits)borderStyle).sizable && isNormal) ? bottom : border;
90 surface.Bevel(((BorderBits)borderStyle).bevel ? false : true, deepBorder, deepTop,
91 size.w - deepBorder - deepBorder, size.h - deepBottom - deepTop);
94 if(((BorderBits)borderStyle).fixed && (state != maximized || !parent.menuBar))
97 if(state != maximized || !((BorderBits)borderStyle).sizable)
99 // Frame for ES_CAPTION windows
100 surface.Bevel(false, 0, 0, size.w, size.h);
101 surface.SetForeground(activeBorder);
102 surface.Rectangle(2, 2, size.w-3, size.h-3);
104 // Resizeable frame is 1 pixel thicker
105 if(((BorderBits)borderStyle).sizable && isNormal)
106 surface.Rectangle(3, 3, size.w - 4, size.h - 4);
111 surface.Gradient(gradient, sizeof(gradient) / sizeof(ColorKey), GRADIENT_SMOOTHNESS, GRADIENT_DIRECTION,
112 border, top, size.w - border - 1, top + CAPTION - 2);
114 surface.Gradient(gradientInactive, sizeof(gradientInactive) / sizeof(ColorKey),
115 GRADIENT_SMOOTHNESS, GRADIENT_DIRECTION,
116 border, top, size.w - border - 1, top + CAPTION - 2);
118 surface.SetForeground(activeBorder);
119 if(state != minimized)
120 surface.HLine(border, size.w-border-1, top + CAPTION-1);
123 surface.SetForeground(skinBackground);
124 surface.Rectangle(0,0, size.w-1, size.h-1);
125 surface.SetForeground(active ? skinTextColor : skinInactiveTextColor);
126 surface.Rectangle(1,1, size.w-2, size.h-2);
127 surface.SetBackground(skinBackground);
128 surface.Area(2, 2, size.w-3, CAPTION + 1);
130 // surface.TextFont(captionFont);
131 // surface.WriteText(4,2, name, strlen(name));
133 surface.SetForeground((active ? skinTextColor : skinInactiveTextColor));
134 surface.TextOpacity(false);
135 surface.TextFont(captionFont);
138 int buttonsSize = border +
139 ((hasMaximize || hasMinimize) ? 52 : 18);
140 surface.WriteTextDots(left, border + NAME_OFFSETX, top + NAME_OFFSET,
141 size.w - (buttonsSize + border + 4), name, (int)strlen(name));
144 if(((BorderBits)borderStyle).contour && !((BorderBits)borderStyle).fixed)
146 surface.SetForeground(skinForeground /*black*/);
147 surface.Rectangle(0, 0, size.w - 1, size.h - 1);
150 if(state != minimized && hasHorzScroll && hasVertScroll)
152 if(sbh && sbh.visible && sbv && sbv.visible)
154 surface.SetBackground(activeBorder);
156 clientStart.x + clientSize.w,
157 clientStart.y + clientSize.h,
158 clientStart.x + clientSize.w + SB_WIDTH - 1,
159 clientStart.y + clientSize.h + SB_HEIGHT - 1);
164 void GetDecorationsSize(MinMaxValue * w, MinMaxValue * h)
168 if(hasMenuBar && state != minimized)
172 if(statusBar && state != minimized)
177 if(nativeDecorations && rootWindow == this)
180 RECT rcClient, rcWindow;
181 GetClientRect(systemHandle, &rcClient);
182 GetWindowRect(systemHandle, &rcWindow);
183 *w += (rcWindow.right - rcWindow.left) - rcClient.right;
184 *h += (rcWindow.bottom - rcWindow.top) - rcClient.bottom;
186 // PrintLn(_class.name, " is at l = ", rcWindow.left, ", r = ", rcWindow.right);
190 if((((BorderBits)borderStyle).deep || ((BorderBits)borderStyle).bevel) && state != minimized)
195 if(((BorderBits)borderStyle).sizable && (state == normal || state == maximized))
200 if(((BorderBits)borderStyle).fixed && (state != maximized || !parent.menuBar))
203 if(!((BorderBits)borderStyle).sizable || state == minimized)
209 if(((BorderBits)borderStyle).contour && !((BorderBits)borderStyle).fixed)
216 bool IsMouseMoving(int x, int y, int w, int h)
218 BorderBits style = (BorderBits)borderStyle; // TOFIX: borderStyle.fixed doesn't work
219 if(nativeDecorations && rootWindow == this) return false;
222 bool resizeX, resizeY, resizeEndX, resizeEndY;
223 if(!IsMouseResizing(x, y, w, h, &resizeX, &resizeY, &resizeEndX, &resizeEndY))
229 bool IsMouseResizing(int x, int y, int w, int h, bool *resizeX, bool *resizeY, bool *resizeEndX, bool *resizeEndY)
233 *resizeX = *resizeY = *resizeEndX = *resizeEndY = false;
234 if(nativeDecorations && rootWindow == this) return false;
236 if(((BorderBits)borderStyle).sizable && (state == normal))
239 if(Box { 0, 0,CORNER-1, TOP-1 }.IsPointInside({x, y}))
240 result = *resizeX = *resizeY = true;
242 if(Box { w-CORNER-1, 0, w-1, TOP-1 }.IsPointInside({x, y}))
243 result = *resizeEndX = *resizeY = true;
245 if(Box { 0, h-BOTTOM-1, CORNER-1, h-1 }.IsPointInside({x, y}))
246 result = *resizeX = *resizeEndY = true;
247 // BottomRight Corner
248 if(Box { w-CORNER-1, h-BOTTOM-1, w-1, h-1 }.IsPointInside({x, y}))
249 result = *resizeEndX = *resizeEndY = true;
251 if(Box { 0,TOP, BORDER, h-BOTTOM-1 }.IsPointInside({x, y}))
252 result = *resizeX = true;
254 if(Box { w-BORDER-1, TOP, w-1, h-BOTTOM-1 }.IsPointInside({x, y}))
255 result = *resizeEndX = true;
257 if(Box { CORNER, 0, w-CORNER-1, TOP-1 }.IsPointInside({x, y}))
258 result = *resizeY = true;
260 if(Box { CORNER, h-BOTTOM-1, w-CORNER-1, h-1 }.IsPointInside({x, y}))
261 result = *resizeEndY = true;
266 void SetWindowMinimum(MinMaxValue * mw, MinMaxValue * mh)
268 bool isNormal = (state == normal || state == maximized);
269 if(nativeDecorations && rootWindow == this) return;
270 if(((BorderBits)borderStyle).fixed && (state != maximized || !parent.menuBar))
278 if(((BorderBits)borderStyle).sizable && isNormal)
280 // GetDecorationsSize(window, mw, mh);
287 if(hasVertScroll && hasHorzScroll)
289 *mw += 2 * SB_WIDTH + SB_WIDTH;
290 *mh += 2 * SB_HEIGHT + SB_HEIGHT;
292 if(((BorderBits)borderStyle).sizable && isNormal)
298 void SetWindowArea(int * x, int * y, MinMaxValue * w, MinMaxValue * h, MinMaxValue * cw, MinMaxValue * ch)
300 bool isNormal = (state == normal || state == maximized);
301 MinMaxValue aw = 0, ah = 0;
310 GetDecorationsSize(&aw, &ah);
312 if(nativeDecorations && rootWindow == this)
316 POINT client00 = { 0, 0 };
317 ClientToScreen(systemHandle, &client00);
318 GetWindowRect(systemHandle, &rcWindow);
319 *x += client00.x - rcWindow.left;
320 *y += client00.y - rcWindow.top;
325 // Compute client area start
326 if(((BorderBits)borderStyle).deep || ((BorderBits)borderStyle).bevel)
332 if(((BorderBits)borderStyle).sizable && isNormal)
338 if(((BorderBits)borderStyle).fixed && (state != maximized || !parent.menuBar))
341 if(!((BorderBits)borderStyle).sizable || state == minimized)
348 if(((BorderBits)borderStyle).contour && !((BorderBits)borderStyle).fixed)
355 // Reduce client area
363 void UpdateNonClient()
365 bool isNormal = (state == normal || state == maximized);
366 int top = 0, border = 0;
369 if(!nativeDecorations || rootWindow != this)
371 if(state == minimized)
372 top = border = DEAD_BORDER;
373 else if(((BorderBits)borderStyle).sizable)
375 if(state == maximized && parent.menuBar)
382 top = isNormal ? TOP : 0;
383 border = isNormal ? BORDER : 0;
386 else if(((BorderBits)borderStyle).fixed)
391 else if(((BorderBits)borderStyle).contour)
396 insideBorder = border;
397 if(((BorderBits)borderStyle).deep)
402 if(state == minimized)
403 menuBar.visible = false;
405 menuBar.visible = true;
406 menuBar.Move(clientStart.x, clientStart.y - MENU_HEIGHT, size.w - insideBorder * 2, MENU_HEIGHT);
410 if(state == minimized)
411 statusBar.visible = false;
414 statusBar.visible = true;
415 statusBar.anchor = { left = clientStart.x, bottom = border };
416 statusBar.size.w = size.w - insideBorder * 2;
420 if(!nativeDecorations || rootWindow != this)
424 minimizeButton.anchor = { right = ((maximizeButton && !maximizeButton.disabled) ? 25 + 34 + 4 : 34 + 4) + border, top = top + BUTTON_OFFSET };
425 minimizeButton.size = { 20, 10 };
426 minimizeButton.foreground = skinForeground;
427 minimizeButton.background = skinBackground;
428 minimizeButton.bevel = false;
429 minimizeButton.OnRedraw = Minimize_OnRedraw;
430 minimizeButton.visible = true;
432 if(maximizeButton && !maximizeButton.disabled)
434 maximizeButton.anchor = { right = 34 + 4 + border, top = top + BUTTON_OFFSET };
435 maximizeButton.size = { 20, 10 };
436 maximizeButton.bevel = false;
437 maximizeButton.foreground = skinForeground;
438 maximizeButton.background = skinBackground;
439 maximizeButton.OnRedraw = Maximize_OnRedraw;
440 maximizeButton.visible = true;
444 closeButton.anchor = { right = -1 + border, top = top + BUTTON_OFFSET };
445 closeButton.size = { 34, 10 };
446 closeButton.bevel = false;
447 closeButton.foreground = skinForeground;
448 closeButton.background = skinBackground;
449 closeButton.OnRedraw = Close_OnRedraw;
450 closeButton.visible = true;
455 void OnApplyGraphics()
458 background = skinBackground;
459 foreground = skinForeground;*/
460 // Find something better?
464 static void Button::SmallButton_OnRedraw(Surface surface)
466 surface.SetBackground(parent.active ? background : skinBackground);
467 surface.Area(0, 0, clientSize.w - 2, clientSize.w - 1);
468 surface.SetForeground(parent.active ? skinTextColor : skinInactiveTextColor);
469 surface.VLine(0, clientSize.h - 2, 0);
470 surface.VLine(0, clientSize.h - 2, clientSize.w - 1);
471 surface.HLine(1, clientSize.w - 2, clientSize.h - 1);
474 static void Button::Minimize_OnRedraw(Surface surface)
476 SmallButton_OnRedraw(this, surface);
477 surface.DrawLine( 5, 3, 14, 3);
478 surface.DrawLine( 5, 4, 14, 4);
481 static void Button::Maximize_OnRedraw(Surface surface)
483 SmallButton_OnRedraw(this, surface);
484 surface.Rectangle( 5, 2, 14, 7);
485 surface.DrawLine( 5, 3, 14, 3);
488 static void Button::Close_OnRedraw(Surface surface)
490 SmallButton_OnRedraw(this, surface);
491 //surface.SetForeground(black);
492 surface.DrawLine( 7+7, 2, 12+7, 7);
493 surface.DrawLine( 8+7, 2, 13+7, 7);
494 surface.DrawLine( 12+7, 2, 7+7, 7);
495 surface.DrawLine( 13+7, 2, 8+7, 7);
498 /*class SimSkin_StatusBar : StatusBar
500 void OnApplyGraphics()
502 background = skinBackground;
503 foreground = skinForeground;
507 /*class SimSkin_FileDialog : FileDialog
509 void OnApplyGraphics()
512 background = skinBackground;
513 foreground = skinForeground;
514 for(child = firstChild; child; child = child.next)
517 child.foreground = skinForeground;
522 #define PUREVTBL(c) ((int (**)())*(void **)((byte *)class(c).data + sizeof(void *)))
524 extern int __ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnApplyGraphics;
525 extern int __ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnRedraw;
534 class SimSkin_Button : Button
536 void OnApplyGraphics()
538 //background = skinBackground;
539 background = Color { (int)70 * 6/10, (int)130* 6/10, (int)180* 6/10 };
540 foreground = skinForeground;
543 void OnRedraw(Surface surface)
545 int isDefault = (int)this.isDefault;
546 ((void (*)(Window, Surface))(void *)PUREVTBL(Button)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnRedraw])(this, surface);
547 if(bevel || (bevelOver && (buttonState == down || buttonState == over || checked)))
550 if(buttonState == down || checked)
552 surface.SetForeground(skinMainColor);
553 surface.HLine(isDefault + 0, clientSize.w-2-isDefault, 0);
554 surface.VLine(isDefault + 1, clientSize.h-2-isDefault, 0);
555 surface.SetForeground(Color { Min((int)c.r * 16/10, 255), Min((int)c.g * 16/10, 255), Min((int)c.b * 16/10,255) });
556 surface.HLine(isDefault + 0, clientSize.w-1-isDefault, clientSize.h-1-isDefault);
557 surface.VLine(isDefault + 0, clientSize.h-2-isDefault, clientSize.w-1-isDefault);
561 surface.SetForeground(Color { Min((int)c.r * 16/10, 255), Min((int)c.g * 16/10, 255), Min((int)c.b * 16/10,255) });
562 surface.HLine(0 + isDefault, clientSize.w-2 - isDefault, isDefault);
563 surface.VLine(1 + isDefault, clientSize.h-2 - isDefault, isDefault);
566 surface.SetForeground(skinMainColor);
567 surface.HLine(1 + isDefault, clientSize.w-2 - isDefault, clientSize.h-2 - isDefault);
568 surface.VLine(1 + isDefault, clientSize.h-3 - isDefault, clientSize.w-2 - isDefault);
572 //surface.SetForeground(skinForeground);
573 surface.SetForeground(Color { c.r * 4/10, c.g * 4/10, c.b * 4/10 });
574 surface.HLine( isDefault, clientSize.w-1 - isDefault, clientSize.h-1 - isDefault);
575 surface.VLine( isDefault, clientSize.h-2 - isDefault, clientSize.w-1 - isDefault);
581 surface.SetForeground(skinForeground);
582 surface.Rectangle(0,0,clientSize.w-1,clientSize.h-1);
584 if(!(bevelOver) && !isRemote)
589 int offset = (buttonState == down && this.offset) ? 1 : 0;
590 surface.SetForeground(skinForeground);
591 surface.LineStipple(0x5555);
593 #define CAPTION_DISTANCE 18
594 if((isRadio || isCheckbox) && text)
596 //x1 = clientSize.h + CAPTION_DISTANCE;
597 x1 = CAPTION_DISTANCE;
606 x2 = clientSize.w - 5+offset;
607 y2 = clientSize.h - 5+offset;
609 if(isRadio || isCheckbox)
617 if((x2 - x1) & 1) x2++;
618 if((y2 - y1) & 1) y2++;
620 surface.Rectangle(x1, y1, x2, y2);
621 surface.LineStipple(0);
626 #define CAPTION_DISTANCE 18
628 void OnRedraw(Surface surface)
632 ((void (*)(Window, Surface))(void *)PUREVTBL(Button)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnRedraw])(this, surface);
637 ButtonState state = this.buttonState;
638 Bitmap buttonBitmap = bitmap ? bitmap.bitmap : null;
639 char * text = this.text;
640 int offset = (state == down && this.offset) ? 1 : 0;
641 Color backColor = background;
642 int isDefault = this.isDefault;
647 if(bevelOver && checked)
654 if((bevel || bevelOver) /* && opacity && backColor*/)
656 if(!scaleBitmap || !buttonBitmap)
659 surface.SetBackground({(byte)(opacity * 255), backColor});
660 //surface.Area(1, 1,clientSize.w-3+offset,clientSize.h-3+offset);
661 surface.Area(0, 0,clientSize.w-1,clientSize.h-1);
663 ColorKey keys[2] = { { silver, 0.0f }, { white, 1.0f } };
664 surface.Gradient(keys, sizeof(keys) / sizeof(ColorKey), 1, vertical, 0, 0, clientSize.w-1, clientSize.h-1);
669 if(isCheckbox && !buttonBitmap)
672 int start = (clientSize.h - height) / 2;
675 // surface.SetBackground(activeBorder);
676 surface.SetBackground(gainsboro);
677 else if(active && !text)
678 surface.SetBackground((offset ? activeBorder : Color { 0,0,170 }));
680 surface.SetBackground((offset ? activeBorder : white));
681 surface.Area(2, start+2,height-3,start+height-3);
683 surface.SetForeground(Color { 85, 85, 85 });
684 surface.HLine(0, height - 2, start + 0);
685 surface.VLine(start+1, start+height - 2, 0);
687 surface.SetForeground(Color { 64,64,64 });
688 surface.HLine(1, height - 3, start + 1);
689 surface.VLine(start+2, start+height - 3, 1);
691 surface.SetForeground(Color { 212,208,200 });
692 surface.HLine(1, height - 2, start + height-2);
693 surface.VLine(start+1, start+height - 3, height-2);
695 surface.SetForeground(white);
696 surface.HLine(0, height - 1, start + height-1);
697 surface.VLine(start+0, start+height - 2, height-1);
702 surface.SetForeground(white);
704 surface.SetForeground(Color { 85, 85, 85 });
706 surface.SetForeground(black);
707 surface.DrawLine(4, start+8, 7,start+11);
708 surface.DrawLine(4, start+9, 7,start+12);
709 surface.DrawLine(7, start+11, 11,start+3);
710 surface.DrawLine(7, start+12, 11,start+4);
717 surface.SetForeground(white);
718 if(isRadio || isCheckbox)
720 int x = 0, y = (clientSize.h-buttonBitmap.height)/2;
721 if(bevelOver && text)
723 x = (CAPTION_DISTANCE-buttonBitmap.width)/2 + offset;
724 y = (clientSize.h-buttonBitmap.height)/2 + offset;
729 // Radio Buttons and Checkboxes
730 surface.Blit(buttonBitmap,
732 0,0,buttonBitmap.width,buttonBitmap.height);
740 surface.Stretch(buttonBitmap,
741 1 + offset, 1 + offset,0,0,
742 clientSize.w-3,clientSize.h-3,buttonBitmap.width,buttonBitmap.height);
744 surface.Stretch(buttonBitmap, 0,0, 0,0,
745 clientSize.w,clientSize.h,buttonBitmap.width,buttonBitmap.height);
750 surface.Blit(buttonBitmap,
751 (clientSize.w-buttonBitmap.width) /2 + offset,
752 (clientSize.h-buttonBitmap.height)/2 + offset,
753 0,0,buttonBitmap.width,buttonBitmap.height);
755 surface.Blit(buttonBitmap,
756 (clientSize.w-buttonBitmap.width)/2,
757 (clientSize.h-buttonBitmap.height)/2,
758 0,0,buttonBitmap.width,buttonBitmap.height);
764 if(bevel || (bevelOver && (state == down || state == over || checked)))
766 if(state == down || checked)
768 surface.SetForeground(Color { 85, 85, 85 });
769 surface.HLine(isDefault + 0, clientSize.w-2-isDefault, 0);
770 surface.VLine(isDefault + 1, clientSize.h-2-isDefault, 0);
771 surface.SetForeground(white);
772 surface.HLine(isDefault + 0, clientSize.w-1-isDefault, clientSize.h-1-isDefault);
773 surface.VLine(isDefault + 0, clientSize.h-2-isDefault, clientSize.w-1-isDefault);
777 surface.SetForeground(white);
778 surface.HLine(0 + isDefault, clientSize.w-2 - isDefault, isDefault);
779 surface.VLine(1 + isDefault, clientSize.h-2 - isDefault, isDefault);
780 surface.SetForeground(Color { 85, 85, 85 });
781 surface.HLine(1 + isDefault, clientSize.w-2 - isDefault, clientSize.h-2 - isDefault);
782 surface.VLine(1 + isDefault, clientSize.h-3 - isDefault, clientSize.w-2 - isDefault);
786 surface.SetForeground(black);
787 surface.HLine( isDefault, clientSize.w-1 - isDefault, clientSize.h-1 - isDefault);
788 surface.VLine( isDefault, clientSize.h-2 - isDefault, clientSize.w-1 - isDefault);
794 surface.TextOpacity(false);
795 surface.TextFont(font);
796 surface.SetForeground(foreground);
800 surface.TextExtent(text, (int)strlen(text),&tw, &th);
802 if((isRadio || isCheckbox) && !bevelOver)
803 WriteCaption(surface, /*clientSize.h +*/ CAPTION_DISTANCE + 3,
804 (clientSize.h - th - 4)/2);
807 int x, y = (clientSize.h - th - 1)/2 + offset;
811 int width = clientSize.w - 2*6;
814 surface.WriteTextDots(alignment, x, y, width, text, (int)strlen(text));
818 int width = clientSize.w - 2 * 6;
820 if(isCheckbox || ((isRadio || bevelOver) && buttonBitmap))
822 x += CAPTION_DISTANCE + 3;
827 if(alignment == right)
829 else if(alignment == center)
830 x += (width - tw) / 2;
832 WriteCaption(surface, x, y);
837 // Activation Highlight
840 surface.SetForeground(black);
841 surface.Rectangle(0,0,clientSize.w-1,clientSize.h-1);
843 if(!bevelOver && !isRemote)
845 if(active/* && (text || !(buttonStyle.radio || buttonStyle.checkBox))*/)
848 surface.SetForeground(black);
849 surface.LineStipple(0x5555);
851 if((isRadio || isCheckbox) && text)
853 x1 = /*clientSize.h + */CAPTION_DISTANCE;
862 x2 = clientSize.w - 5+offset;
863 y2 = clientSize.h - 5+offset;
865 if(isRadio || isCheckbox)
873 if((x2 - x1) & 1) x2++;
874 if((y2 - y1) & 1) y2++;
876 surface.Rectangle(x1, y1, x2, y2);
877 surface.LineStipple(0);
883 Button::OnRedraw(surface);
888 class SimSkin_ScrollBar : ScrollBar
890 void OnApplyGraphics()
892 ((void (*)(Window))(void *)PUREVTBL(ScrollBar)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnApplyGraphics])(this);
894 //background = { skinBackground.r * 9 / 6, skinBackground.g * 9 / 6, skinBackground.b * 9 / 6 };
896 upBtn.background = Color { 70 * 6/10, 130* 6/10, 180* 6/10 }; //skinBackground;
897 upBtn.bitmap = { (direction == vertical) ? "<:ecere>elements/arrowUp.png" : "<:ecere>elements/arrowLeft.png", monochrome = true };
898 downBtn.background = Color { 70 * 6/10, 130* 6/10, 180* 6/10 }; //skinBackground;
899 downBtn.bitmap = { (direction == vertical) ? "<:ecere>elements/arrowDown.png" : "<:ecere>elements/arrowRight.png", monochrome = true };
900 thumb.background = Color { 70 * 6/10, 130* 6/10, 180* 6/10 }; //skinBackground;*/
904 /*class SimSkin_DropBox : DropBox
906 void OnApplyGraphics()
908 ((void (*)(Window))(void *)PUREVTBL(DropBox)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnApplyGraphics])(this);
909 button.bitmap = { "<:ecere>elements/arrowDown.png", monochrome = true };
910 background = skinBackground;
911 foreground = skinForeground;
912 selectionColor = skinMainColor;
916 /*class SimSkin_ListBox : ListBox
918 void OnApplyGraphics()
920 ((void (*)(Window))(void *)PUREVTBL(ListBox)[__ecereVMethodID___ecereNameSpace__ecere__gui__Window_OnApplyGraphics])(this);
921 background = skinBackground;
922 foreground = skinForeground;
923 selectionColor = skinMainColor;
927 public class SimSkin : Skin
929 class_property(name) = "Sim";
930 class_property(selectionColor) = (Color)skinMainColor;
931 class_property(disabledBackColor) = (Color)Color{ 128,128,128 };
932 class_property(disabledFrontColor) = (Color)Color{ 255,255,255 };
933 class_property(selectionText) = (Color)white;
935 FontResource ::SystemFont()
937 return { faceName = "Tahoma", size = 8.25f };
940 FontResource ::CaptionFont()
942 return { faceName = "Verdana", size = 6.5f };
945 char * ::CursorsBitmaps(uint id, int *hotSpotX, int *hotSpotY, byte ** paletteShades)
950 BitmapResource ::GetBitmap(int id)
960 int ::HorizontalSBH()