Files
wxWidgets/src/univ/settingsuniv.cpp
Vadim Zeitlin 3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00

112 lines
4.7 KiB
C++

///////////////////////////////////////////////////////////////////////////////
// Name: src/univ/settingsuniv.cpp
// Purpose: wxSystemSettings wxUniv-specific parts
// Author: Vadim Zeitlin
// Modified by:
// Created: 20.08.00
// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ===========================================================================
// declarations
// ===========================================================================
// ---------------------------------------------------------------------------
// headers
// ---------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/settings.h"
#include "wx/gdicmn.h"
#endif // WX_PRECOMP
#include "wx/univ/colschem.h"
#include "wx/univ/theme.h"
#include "wx/univ/renderer.h"
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// wxSystemSettings
// ----------------------------------------------------------------------------
wxColour wxSystemSettings::GetColour(wxSystemColour index)
{
// the elements of this enum must be kept in sync with wxSystemColour
static const wxColourScheme::StdColour s_mapSysToThemeCol[] =
{
wxColourScheme::SCROLLBAR /* wxSYS_COLOUR_SCROLLBAR */,
wxColourScheme::WINDOW /* wxSYS_COLOUR_BACKGROUND */,
wxColourScheme::TITLEBAR_ACTIVE_TEXT /* wxSYS_COLOUR_ACTIVECAPTION */,
wxColourScheme::TITLEBAR_TEXT /* wxSYS_COLOUR_INACTIVECAPTION */,
wxColourScheme::MAX /* wxSYS_COLOUR_MENU */,
wxColourScheme::MAX /* wxSYS_COLOUR_WINDOW */,
wxColourScheme::MAX /* wxSYS_COLOUR_WINDOWFRAME */,
wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_MENUTEXT */,
wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_WINDOWTEXT */,
wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_CAPTIONTEXT */,
wxColourScheme::MAX /* wxSYS_COLOUR_ACTIVEBORDER */,
wxColourScheme::MAX /* wxSYS_COLOUR_INACTIVEBORDER */,
wxColourScheme::FRAME /* wxSYS_COLOUR_APPWORKSPACE */,
wxColourScheme::HIGHLIGHT /* wxSYS_COLOUR_HIGHLIGHT */,
wxColourScheme::HIGHLIGHT_TEXT /* wxSYS_COLOUR_HIGHLIGHTTEXT */,
wxColourScheme::CONTROL /* wxSYS_COLOUR_BTNFACE */,
wxColourScheme::SHADOW_DARK /* wxSYS_COLOUR_BTNSHADOW */,
wxColourScheme::CONTROL_TEXT_DISABLED /* wxSYS_COLOUR_GRAYTEXT */,
wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_BTNTEXT */,
wxColourScheme::MAX /* wxSYS_COLOUR_INACTIVECAPTIONTEXT */,
wxColourScheme::SHADOW_HIGHLIGHT /* wxSYS_COLOUR_BTNHIGHLIGHT */,
wxColourScheme::SHADOW_DARK /* wxSYS_COLOUR_3DDKSHADOW */,
wxColourScheme::SHADOW_OUT /* wxSYS_COLOUR_3DLIGHT */,
wxColourScheme::MAX /* wxSYS_COLOUR_INFOTEXT */,
wxColourScheme::MAX /* wxSYS_COLOUR_INFOBK */,
wxColourScheme::WINDOW /* wxSYS_COLOUR_LISTBOX */,
wxColourScheme::MAX /* wxSYS_COLOUR_HOTLIGHT */,
wxColourScheme::TITLEBAR_ACTIVE_TEXT /* wxSYS_COLOUR_GRADIENTACTIVECAPTION */,
wxColourScheme::TITLEBAR_TEXT /* wxSYS_COLOUR_GRADIENTINACTIVECAPTION */,
wxColourScheme::MAX /* wxSYS_COLOUR_MENUHILIGHT */,
wxColourScheme::MAX /* wxSYS_COLOUR_MENUBAR */,
wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_LISTBOXTEXT */,
wxColourScheme::HIGHLIGHT_TEXT /* wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT */
};
wxCOMPILE_TIME_ASSERT( WXSIZEOF(s_mapSysToThemeCol) == wxSYS_COLOUR_MAX,
StdColDefsMismatch );
wxCHECK_MSG( index < (int)WXSIZEOF(s_mapSysToThemeCol), wxNullColour,
wxT("invalid wxSystemColour") );
wxColourScheme::StdColour col = s_mapSysToThemeCol[index];
if ( col == wxColourScheme::MAX )
{
// we don't have theme-equivalent for this colour
return wxSystemSettingsNative::GetColour(index);
}
return wxTheme::Get()->GetColourScheme()->Get(col);
}
int wxSystemSettings::GetMetric(wxSystemMetric index, wxWindow *win)
{
switch ( index )
{
case wxSYS_VSCROLL_X:
return wxTheme::Get()->GetRenderer()->GetScrollbarArrowSize().x;
case wxSYS_HSCROLL_Y:
return wxTheme::Get()->GetRenderer()->GetScrollbarArrowSize().y;
default:
return wxSystemSettingsNative::GetMetric(index, win);
}
}