+ case wxSYS_COLOUR_SCROLLBAR:
+ case wxSYS_COLOUR_BACKGROUND:
+ case wxSYS_COLOUR_INACTIVECAPTION:
+ case wxSYS_COLOUR_MENU:
+ case wxSYS_COLOUR_WINDOWFRAME:
+ case wxSYS_COLOUR_ACTIVEBORDER:
+ case wxSYS_COLOUR_INACTIVEBORDER:
+ case wxSYS_COLOUR_BTNFACE:
+ case wxSYS_COLOUR_MENUBAR:
+ case wxSYS_COLOUR_3DLIGHT:
+ if (!gs_objects.m_colBtnFace.Ok())
+ {
+ gdkColor.red =
+ gdkColor.green = 0;
+ gdkColor.blue = 0x9c40;
+ GetColourFromGTKWidget(gdkColor);
+ gs_objects.m_colBtnFace = wxColor(gdkColor);
+ }
+ color = gs_objects.m_colBtnFace;
+ break;
+
+ case wxSYS_COLOUR_WINDOW:
+ if (!gs_objects.m_colWindow.Ok())
+ {
+ gdkColor.red =
+ gdkColor.green =
+ gdkColor.blue = 0xFFFF;
+ GetColourFromGTKWidget(gdkColor, wxGTK_TEXTCTRL, GTK_STATE_NORMAL, wxGTK_BASE);
+ gs_objects.m_colWindow = wxColor(gdkColor);
+ }
+ color = gs_objects.m_colWindow;
+ break;
+
+ case wxSYS_COLOUR_3DDKSHADOW:
+ color = *wxBLACK;
+ break;
+
+ case wxSYS_COLOUR_GRAYTEXT:
+ case wxSYS_COLOUR_BTNSHADOW:
+ //case wxSYS_COLOUR_3DSHADOW:
+ if (!gs_objects.m_colBtnShadow.Ok())
+ {
+ wxColour faceColour(GetColour(wxSYS_COLOUR_3DFACE));
+ gs_objects.m_colBtnShadow =
+ wxColour((unsigned char) (faceColour.Red() * 2 / 3),
+ (unsigned char) (faceColour.Green() * 2 / 3),
+ (unsigned char) (faceColour.Blue() * 2 / 3));
+ }
+ color = gs_objects.m_colBtnShadow;
+ break;
+
+ case wxSYS_COLOUR_3DHIGHLIGHT:
+ //case wxSYS_COLOUR_BTNHIGHLIGHT:
+ color = *wxWHITE;
+ break;
+
+ case wxSYS_COLOUR_HIGHLIGHT:
+ if (!gs_objects.m_colHighlight.Ok())
+ {
+ gdkColor.red =
+ gdkColor.green = 0;
+ gdkColor.blue = 0x9c40;
+ GetColourFromGTKWidget(
+ gdkColor, wxGTK_BUTTON, GTK_STATE_SELECTED);
+ gs_objects.m_colHighlight = wxColour(gdkColor);
+ }
+ color = gs_objects.m_colHighlight;
+ break;
+
+ case wxSYS_COLOUR_LISTBOX:
+ if (!gs_objects.m_colListBox.Ok())
+ {
+ if ( GetColourFromGTKWidget(gdkColor,
+ wxGTK_LIST,
+ GTK_STATE_NORMAL,
+ wxGTK_BASE) )
+ {
+ gs_objects.m_colListBox = wxColour(gdkColor);
+ }
+ else
+ {
+ gs_objects.m_colListBox = *wxWHITE;
+ }
+ }
+ color = gs_objects.m_colListBox;
+ break;
+
+ case wxSYS_COLOUR_MENUTEXT:
+ case wxSYS_COLOUR_WINDOWTEXT:
+ case wxSYS_COLOUR_CAPTIONTEXT:
+ case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
+ case wxSYS_COLOUR_BTNTEXT:
+ if (!gs_objects.m_colBtnText.Ok())
+ {
+ gdkColor.red =
+ gdkColor.green =
+ gdkColor.blue = 0;
+ GetColourFromGTKWidget(
+ gdkColor, wxGTK_BUTTON, GTK_STATE_NORMAL, wxGTK_FG);
+ gs_objects.m_colBtnText = wxColour(gdkColor);
+ }
+ color = gs_objects.m_colBtnText;
+ break;
+
+ case wxSYS_COLOUR_INFOBK:
+ if (!gs_objects.m_colTooltip.Ok()) {
+ GetTooltipColors();
+ }
+ color = gs_objects.m_colTooltip;
+ break;
+
+ case wxSYS_COLOUR_INFOTEXT:
+ if (!gs_objects.m_colTooltipText.Ok()) {
+ GetTooltipColors();
+ }
+ color = gs_objects.m_colTooltipText;
+ break;
+
+ case wxSYS_COLOUR_HIGHLIGHTTEXT:
+ if (!gs_objects.m_colHighlightText.Ok())
+ {
+ wxColour hclr = GetColour(wxSYS_COLOUR_HIGHLIGHT);
+ if (hclr.Red() > 200 && hclr.Green() > 200 && hclr.Blue() > 200)
+ gs_objects.m_colHighlightText = *wxBLACK;
+ else
+ gs_objects.m_colHighlightText = *wxWHITE;
+ }
+ color = gs_objects.m_colHighlightText;
+ break;
+
+ case wxSYS_COLOUR_APPWORKSPACE:
+ color = *wxWHITE; // ?
+ break;
+
+ case wxSYS_COLOUR_ACTIVECAPTION:
+ case wxSYS_COLOUR_MENUHILIGHT:
+ if (!gs_objects.m_colMenuItemHighlight.Ok())
+ {
+ gdkColor.red =
+ gdkColor.green =
+ gdkColor.blue = 0;
+ GetColourFromGTKWidget(
+ gdkColor, wxGTK_MENUITEM, GTK_STATE_SELECTED, wxGTK_BG);
+ gs_objects.m_colMenuItemHighlight = wxColour(gdkColor);
+ }
+ color = gs_objects.m_colMenuItemHighlight;
+ break;
+
+ case wxSYS_COLOUR_HOTLIGHT:
+ case wxSYS_COLOUR_GRADIENTACTIVECAPTION:
+ case wxSYS_COLOUR_GRADIENTINACTIVECAPTION:
+ // TODO
+ color = *wxBLACK;
+ break;
+
+ case wxSYS_COLOUR_MAX:
+ default:
+ wxFAIL_MSG( _T("unknown system colour index") );
+ color = *wxWHITE;
+ break;
+ }
+
+ return color;
+}
+
+wxFont wxSystemSettingsNative::GetFont( wxSystemFont index )
+{
+ wxFont font;
+ switch (index)