added wxSYS_COLOUR_LISTBOX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -58,6 +58,8 @@
|
|||||||
#define wxSYS_COLOUR_INFOTEXT 23
|
#define wxSYS_COLOUR_INFOTEXT 23
|
||||||
#define wxSYS_COLOUR_INFOBK 24
|
#define wxSYS_COLOUR_INFOBK 24
|
||||||
|
|
||||||
|
#define wxSYS_COLOUR_LISTBOX 25
|
||||||
|
|
||||||
#define wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_BACKGROUND
|
#define wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_BACKGROUND
|
||||||
#define wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNFACE
|
#define wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNFACE
|
||||||
#define wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_BTNSHADOW
|
#define wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_BTNSHADOW
|
||||||
|
@@ -74,6 +74,7 @@ wxColour wxSystemSettings::GetSystemColour(int index)
|
|||||||
break ;
|
break ;
|
||||||
case wxSYS_COLOUR_INFOBK :
|
case wxSYS_COLOUR_INFOBK :
|
||||||
case wxSYS_COLOUR_APPWORKSPACE:
|
case wxSYS_COLOUR_APPWORKSPACE:
|
||||||
|
case wxSYS_COLOUR_LISTBOX:
|
||||||
return *wxWHITE ;
|
return *wxWHITE ;
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
|
@@ -74,6 +74,7 @@ wxColour wxSystemSettings::GetSystemColour(int index)
|
|||||||
break ;
|
break ;
|
||||||
case wxSYS_COLOUR_INFOBK :
|
case wxSYS_COLOUR_INFOBK :
|
||||||
case wxSYS_COLOUR_APPWORKSPACE:
|
case wxSYS_COLOUR_APPWORKSPACE:
|
||||||
|
case wxSYS_COLOUR_LISTBOX:
|
||||||
return *wxWHITE ;
|
return *wxWHITE ;
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
|
@@ -51,6 +51,7 @@ wxColour wxSystemSettings::GetSystemColour(int index)
|
|||||||
}
|
}
|
||||||
case wxSYS_COLOUR_HIGHLIGHT:
|
case wxSYS_COLOUR_HIGHLIGHT:
|
||||||
case wxSYS_COLOUR_BTNHIGHLIGHT:
|
case wxSYS_COLOUR_BTNHIGHLIGHT:
|
||||||
|
case wxSYS_COLOUR_LISTBOX:
|
||||||
// case wxSYS_COLOUR_3DHIGHLIGHT: // Same as wxSYS_COLOUR_BTNHIGHLIGHT
|
// case wxSYS_COLOUR_3DHIGHLIGHT: // Same as wxSYS_COLOUR_BTNHIGHLIGHT
|
||||||
{
|
{
|
||||||
return *wxWHITE;
|
return *wxWHITE;
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 04/01/98
|
// Created: 04/01/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart and Markus Holzem
|
// Copyright: (c) Julian Smart and Markus Holzem
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows license
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
@@ -41,127 +41,136 @@
|
|||||||
|
|
||||||
wxColour wxSystemSettings::GetSystemColour(int index)
|
wxColour wxSystemSettings::GetSystemColour(int index)
|
||||||
{
|
{
|
||||||
COLORREF ref = ::GetSysColor(index);
|
switch (index)
|
||||||
wxColour col(GetRValue(ref), GetGValue(ref), GetBValue(ref));
|
{
|
||||||
return col;
|
case wxSYS_COLOUR_LISTBOX:
|
||||||
|
return *wxWHITE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
COLORREF ref = ::GetSysColor(index);
|
||||||
|
wxColour col(GetRValue(ref), GetGValue(ref), GetBValue(ref));
|
||||||
|
return col;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont wxSystemSettings::GetSystemFont(int index)
|
wxFont wxSystemSettings::GetSystemFont(int index)
|
||||||
{
|
{
|
||||||
HFONT hFont = (HFONT) ::GetStockObject(index);
|
HFONT hFont = (HFONT) ::GetStockObject(index);
|
||||||
if ( hFont != (HFONT) NULL )
|
if ( hFont != (HFONT) NULL )
|
||||||
{
|
{
|
||||||
LOGFONT lf;
|
LOGFONT lf;
|
||||||
if ( ::GetObject(hFont, sizeof(LOGFONT), &lf) != 0 )
|
if ( ::GetObject(hFont, sizeof(LOGFONT), &lf) != 0 )
|
||||||
{
|
{
|
||||||
// In fontdlg.cpp
|
// In fontdlg.cpp
|
||||||
return wxCreateFontFromLogFont(&lf);
|
return wxCreateFontFromLogFont(&lf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return wxNullFont;
|
return wxNullFont;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return wxNullFont;
|
return wxNullFont;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a system metric, e.g. scrollbar size
|
// Get a system metric, e.g. scrollbar size
|
||||||
int wxSystemSettings::GetSystemMetric(int index)
|
int wxSystemSettings::GetSystemMetric(int index)
|
||||||
{
|
{
|
||||||
switch ( index)
|
switch ( index)
|
||||||
{
|
{
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
case wxSYS_MOUSE_BUTTONS:
|
case wxSYS_MOUSE_BUTTONS:
|
||||||
return ::GetSystemMetrics(SM_CMOUSEBUTTONS);
|
return ::GetSystemMetrics(SM_CMOUSEBUTTONS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case wxSYS_BORDER_X:
|
case wxSYS_BORDER_X:
|
||||||
return ::GetSystemMetrics(SM_CXBORDER);
|
return ::GetSystemMetrics(SM_CXBORDER);
|
||||||
case wxSYS_BORDER_Y:
|
case wxSYS_BORDER_Y:
|
||||||
return ::GetSystemMetrics(SM_CYBORDER);
|
return ::GetSystemMetrics(SM_CYBORDER);
|
||||||
case wxSYS_CURSOR_X:
|
case wxSYS_CURSOR_X:
|
||||||
return ::GetSystemMetrics(SM_CXCURSOR);
|
return ::GetSystemMetrics(SM_CXCURSOR);
|
||||||
case wxSYS_CURSOR_Y:
|
case wxSYS_CURSOR_Y:
|
||||||
return ::GetSystemMetrics(SM_CYCURSOR);
|
return ::GetSystemMetrics(SM_CYCURSOR);
|
||||||
case wxSYS_DCLICK_X:
|
case wxSYS_DCLICK_X:
|
||||||
return ::GetSystemMetrics(SM_CXDOUBLECLK);
|
return ::GetSystemMetrics(SM_CXDOUBLECLK);
|
||||||
case wxSYS_DCLICK_Y:
|
case wxSYS_DCLICK_Y:
|
||||||
return ::GetSystemMetrics(SM_CYDOUBLECLK);
|
return ::GetSystemMetrics(SM_CYDOUBLECLK);
|
||||||
#if defined(__WIN32__) && defined(SM_CXDRAG)
|
#if defined(__WIN32__) && defined(SM_CXDRAG)
|
||||||
case wxSYS_DRAG_X:
|
case wxSYS_DRAG_X:
|
||||||
return ::GetSystemMetrics(SM_CXDRAG);
|
return ::GetSystemMetrics(SM_CXDRAG);
|
||||||
case wxSYS_DRAG_Y:
|
case wxSYS_DRAG_Y:
|
||||||
return ::GetSystemMetrics(SM_CYDRAG);
|
return ::GetSystemMetrics(SM_CYDRAG);
|
||||||
case wxSYS_EDGE_X:
|
case wxSYS_EDGE_X:
|
||||||
return ::GetSystemMetrics(SM_CXEDGE);
|
return ::GetSystemMetrics(SM_CXEDGE);
|
||||||
case wxSYS_EDGE_Y:
|
case wxSYS_EDGE_Y:
|
||||||
return ::GetSystemMetrics(SM_CYEDGE);
|
return ::GetSystemMetrics(SM_CYEDGE);
|
||||||
#endif
|
#endif
|
||||||
case wxSYS_HSCROLL_ARROW_X:
|
case wxSYS_HSCROLL_ARROW_X:
|
||||||
return ::GetSystemMetrics(SM_CXHSCROLL);
|
return ::GetSystemMetrics(SM_CXHSCROLL);
|
||||||
case wxSYS_HSCROLL_ARROW_Y:
|
case wxSYS_HSCROLL_ARROW_Y:
|
||||||
return ::GetSystemMetrics(SM_CYHSCROLL);
|
return ::GetSystemMetrics(SM_CYHSCROLL);
|
||||||
case wxSYS_HTHUMB_X:
|
case wxSYS_HTHUMB_X:
|
||||||
return ::GetSystemMetrics(SM_CXHTHUMB);
|
return ::GetSystemMetrics(SM_CXHTHUMB);
|
||||||
case wxSYS_ICON_X:
|
case wxSYS_ICON_X:
|
||||||
return ::GetSystemMetrics(SM_CXICON);
|
return ::GetSystemMetrics(SM_CXICON);
|
||||||
case wxSYS_ICON_Y:
|
case wxSYS_ICON_Y:
|
||||||
return ::GetSystemMetrics(SM_CYICON);
|
return ::GetSystemMetrics(SM_CYICON);
|
||||||
case wxSYS_ICONSPACING_X:
|
case wxSYS_ICONSPACING_X:
|
||||||
return ::GetSystemMetrics(SM_CXICONSPACING);
|
return ::GetSystemMetrics(SM_CXICONSPACING);
|
||||||
case wxSYS_ICONSPACING_Y:
|
case wxSYS_ICONSPACING_Y:
|
||||||
return ::GetSystemMetrics(SM_CYICONSPACING);
|
return ::GetSystemMetrics(SM_CYICONSPACING);
|
||||||
case wxSYS_WINDOWMIN_X:
|
case wxSYS_WINDOWMIN_X:
|
||||||
return ::GetSystemMetrics(SM_CXMIN);
|
return ::GetSystemMetrics(SM_CXMIN);
|
||||||
case wxSYS_WINDOWMIN_Y:
|
case wxSYS_WINDOWMIN_Y:
|
||||||
return ::GetSystemMetrics(SM_CYMIN);
|
return ::GetSystemMetrics(SM_CYMIN);
|
||||||
case wxSYS_SCREEN_X:
|
case wxSYS_SCREEN_X:
|
||||||
return ::GetSystemMetrics(SM_CXSCREEN);
|
return ::GetSystemMetrics(SM_CXSCREEN);
|
||||||
case wxSYS_SCREEN_Y:
|
case wxSYS_SCREEN_Y:
|
||||||
return ::GetSystemMetrics(SM_CYSCREEN);
|
return ::GetSystemMetrics(SM_CYSCREEN);
|
||||||
|
|
||||||
#if defined(__WIN32__) && defined(SM_CXSIZEFRAME)
|
#if defined(__WIN32__) && defined(SM_CXSIZEFRAME)
|
||||||
case wxSYS_FRAMESIZE_X:
|
case wxSYS_FRAMESIZE_X:
|
||||||
return ::GetSystemMetrics(SM_CXSIZEFRAME);
|
return ::GetSystemMetrics(SM_CXSIZEFRAME);
|
||||||
case wxSYS_FRAMESIZE_Y:
|
case wxSYS_FRAMESIZE_Y:
|
||||||
return ::GetSystemMetrics(SM_CYSIZEFRAME);
|
return ::GetSystemMetrics(SM_CYSIZEFRAME);
|
||||||
case wxSYS_SMALLICON_X:
|
case wxSYS_SMALLICON_X:
|
||||||
return ::GetSystemMetrics(SM_CXSMICON);
|
return ::GetSystemMetrics(SM_CXSMICON);
|
||||||
case wxSYS_SMALLICON_Y:
|
case wxSYS_SMALLICON_Y:
|
||||||
return ::GetSystemMetrics(SM_CYSMICON);
|
return ::GetSystemMetrics(SM_CYSMICON);
|
||||||
#endif
|
#endif
|
||||||
case wxSYS_HSCROLL_Y:
|
case wxSYS_HSCROLL_Y:
|
||||||
return ::GetSystemMetrics(SM_CYHSCROLL);
|
return ::GetSystemMetrics(SM_CYHSCROLL);
|
||||||
case wxSYS_VSCROLL_X:
|
case wxSYS_VSCROLL_X:
|
||||||
return ::GetSystemMetrics(SM_CXVSCROLL);
|
return ::GetSystemMetrics(SM_CXVSCROLL);
|
||||||
case wxSYS_VSCROLL_ARROW_X:
|
case wxSYS_VSCROLL_ARROW_X:
|
||||||
return ::GetSystemMetrics(SM_CXVSCROLL);
|
return ::GetSystemMetrics(SM_CXVSCROLL);
|
||||||
case wxSYS_VSCROLL_ARROW_Y:
|
case wxSYS_VSCROLL_ARROW_Y:
|
||||||
return ::GetSystemMetrics(SM_CYVSCROLL);
|
return ::GetSystemMetrics(SM_CYVSCROLL);
|
||||||
case wxSYS_VTHUMB_Y:
|
case wxSYS_VTHUMB_Y:
|
||||||
return ::GetSystemMetrics(SM_CYVTHUMB);
|
return ::GetSystemMetrics(SM_CYVTHUMB);
|
||||||
case wxSYS_CAPTION_Y:
|
case wxSYS_CAPTION_Y:
|
||||||
return ::GetSystemMetrics(SM_CYCAPTION);
|
return ::GetSystemMetrics(SM_CYCAPTION);
|
||||||
case wxSYS_MENU_Y:
|
case wxSYS_MENU_Y:
|
||||||
return ::GetSystemMetrics(SM_CYMENU);
|
return ::GetSystemMetrics(SM_CYMENU);
|
||||||
#if defined(__WIN32__) && defined(SM_NETWORK)
|
#if defined(__WIN32__) && defined(SM_NETWORK)
|
||||||
case wxSYS_NETWORK_PRESENT:
|
case wxSYS_NETWORK_PRESENT:
|
||||||
return ::GetSystemMetrics(SM_NETWORK) & 0x0001;
|
return ::GetSystemMetrics(SM_NETWORK) & 0x0001;
|
||||||
#endif
|
#endif
|
||||||
case wxSYS_PENWINDOWS_PRESENT:
|
case wxSYS_PENWINDOWS_PRESENT:
|
||||||
return ::GetSystemMetrics(SM_PENWINDOWS);
|
return ::GetSystemMetrics(SM_PENWINDOWS);
|
||||||
#if defined(__WIN32__) && defined(SM_SHOWSOUNDS)
|
#if defined(__WIN32__) && defined(SM_SHOWSOUNDS)
|
||||||
case wxSYS_SHOW_SOUNDS:
|
case wxSYS_SHOW_SOUNDS:
|
||||||
return ::GetSystemMetrics(SM_SHOWSOUNDS);
|
return ::GetSystemMetrics(SM_SHOWSOUNDS);
|
||||||
#endif
|
#endif
|
||||||
case wxSYS_SWAP_BUTTONS:
|
case wxSYS_SWAP_BUTTONS:
|
||||||
return ::GetSystemMetrics(SM_SWAPBUTTON);
|
return ::GetSystemMetrics(SM_SWAPBUTTON);
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user