Dialog unit mods; wxProp tidying
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -55,7 +55,6 @@ bool wxToolBarSimple::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos
|
||||
// Set it to grey (or other 3D face colour)
|
||||
wxSystemSettings settings;
|
||||
SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
SetDefaultBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
|
||||
if ( GetWindowStyleFlag() & wxTB_VERTICAL )
|
||||
{ m_lastX = 7; m_lastY = 3; }
|
||||
|
@@ -240,19 +240,19 @@ static char hexArray[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A'
|
||||
'C', 'D', 'E', 'F' };
|
||||
|
||||
// Convert 2-digit hex number to decimal
|
||||
int wxHexToDec(char *buf)
|
||||
int wxHexToDec(const wxString& buf)
|
||||
{
|
||||
int firstDigit, secondDigit;
|
||||
|
||||
if (buf[0] >= 'A')
|
||||
firstDigit = buf[0] - 'A' + 10;
|
||||
if (buf.GetChar(0) >= 'A')
|
||||
firstDigit = buf.GetChar(0) - 'A' + 10;
|
||||
else
|
||||
firstDigit = buf[0] - '0';
|
||||
firstDigit = buf.GetChar(0) - '0';
|
||||
|
||||
if (buf[1] >= 'A')
|
||||
secondDigit = buf[1] - 'A' + 10;
|
||||
if (buf.GetChar(1) >= 'A')
|
||||
secondDigit = buf.GetChar(1) - 'A' + 10;
|
||||
else
|
||||
secondDigit = buf[1] - '0';
|
||||
secondDigit = buf.GetChar(1) - '0';
|
||||
|
||||
return firstDigit * 16 + secondDigit;
|
||||
}
|
||||
@@ -267,6 +267,14 @@ void wxDecToHex(int dec, char *buf)
|
||||
buf[2] = 0;
|
||||
}
|
||||
|
||||
// Convert decimal integer to 2-character hex string
|
||||
wxString wxDecToHex(int dec)
|
||||
{
|
||||
char buf[3];
|
||||
wxDecToHex(dec, buf);
|
||||
return wxString(buf);
|
||||
}
|
||||
|
||||
// Match a string INDEPENDENT OF CASE
|
||||
bool
|
||||
StringMatch (char *str1, char *str2, bool subString, bool exact)
|
||||
|
@@ -64,3 +64,27 @@ void wxWindow::UpdateWindowUI()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dialog units translations. Implemented in wincmn.cpp.
|
||||
wxPoint wxWindow::ConvertPixelsToDialog(const wxPoint& pt)
|
||||
{
|
||||
int charWidth = GetCharWidth();
|
||||
int charHeight = GetCharHeight();
|
||||
wxPoint pt2;
|
||||
pt2.x = (int) ((pt.x * 4) / charWidth) ;
|
||||
pt2.y = (int) ((pt.y * 8) / charHeight) ;
|
||||
|
||||
return pt2;
|
||||
}
|
||||
|
||||
wxPoint wxWindow::ConvertDialogToPixels(const wxPoint& pt)
|
||||
{
|
||||
int charWidth = GetCharWidth();
|
||||
int charHeight = GetCharHeight();
|
||||
wxPoint pt2;
|
||||
pt2.x = (int) ((pt.x * charWidth) / 4) ;
|
||||
pt2.y = (int) ((pt.y * charHeight) / 8) ;
|
||||
|
||||
return pt2;
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,6 @@ bool wxPanel::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
if ( ret ) {
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
SetDefaultBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
|
||||
}
|
||||
|
||||
@@ -73,7 +72,6 @@ void wxPanel::SetFocus()
|
||||
void wxPanel::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
{
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
SetDefaultBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
Refresh();
|
||||
|
||||
// Propagate the event to the non-top-level children
|
||||
|
@@ -127,7 +127,7 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, con
|
||||
|
||||
wxSystemSettings settings;
|
||||
SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_WINDOW));
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour());
|
||||
SetForegroundColour(parent->GetForegroundColour());
|
||||
|
||||
SetName(name);
|
||||
SetValidator(validator);
|
||||
|
@@ -127,7 +127,7 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, con
|
||||
|
||||
wxSystemSettings settings;
|
||||
SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_WINDOW));
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour());
|
||||
SetForegroundColour(parent->GetForegroundColour());
|
||||
|
||||
SetName(name);
|
||||
SetValidator(validator);
|
||||
|
@@ -99,10 +99,9 @@ wxWindow::wxWindow()
|
||||
m_caretWidth = 0; m_caretHeight = 0;
|
||||
m_caretEnabled = FALSE;
|
||||
m_caretShown = FALSE;
|
||||
m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
|
||||
// m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
|
||||
m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
|
||||
m_foregroundColour = *wxBLACK;
|
||||
m_defaultForegroundColour = *wxBLACK ;
|
||||
m_defaultBackgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
m_pDropTarget = NULL;
|
||||
@@ -320,10 +319,10 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
|
||||
else
|
||||
m_windowId = id;
|
||||
|
||||
m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
|
||||
// m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
|
||||
m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
|
||||
m_foregroundColour = *wxBLACK;
|
||||
m_defaultForegroundColour = *wxBLACK ;
|
||||
m_defaultBackgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
|
||||
|
||||
m_windowStyle = style;
|
||||
|
||||
|
@@ -44,8 +44,8 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
|
||||
|
||||
parent->AddChild(this);
|
||||
|
||||
m_backgroundColour = parent->GetDefaultBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetDefaultForegroundColour() ;
|
||||
m_backgroundColour = parent->GetBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetForegroundColour() ;
|
||||
m_windowStyle = style;
|
||||
m_marginX = 0;
|
||||
m_marginY = 0;
|
||||
|
@@ -56,8 +56,8 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||
SetValidator(validator);
|
||||
|
||||
parent->AddChild((wxButton *)this);
|
||||
m_backgroundColour = parent->GetDefaultBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetDefaultForegroundColour() ;
|
||||
m_backgroundColour = parent->GetBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetForegroundColour() ;
|
||||
|
||||
m_windowStyle = (long&)style;
|
||||
|
||||
|
@@ -51,8 +51,8 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||
SetValidator(validator);
|
||||
if (parent) parent->AddChild(this);
|
||||
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
|
||||
m_windowStyle = style;
|
||||
|
||||
@@ -221,8 +221,8 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *l
|
||||
SetValidator(validator);
|
||||
if (parent) parent->AddChild(this);
|
||||
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
m_windowStyle = style;
|
||||
|
||||
if ( id == -1 )
|
||||
|
@@ -56,8 +56,8 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
||||
SetName(name);
|
||||
SetValidator(validator);
|
||||
if (parent) parent->AddChild(this);
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
m_noStrings = n;
|
||||
|
||||
m_windowStyle = style;
|
||||
|
@@ -70,8 +70,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
||||
SetName(name);
|
||||
SetValidator(validator);
|
||||
if (parent) parent->AddChild(this);
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
m_noStrings = n;
|
||||
|
||||
m_windowStyle = style;
|
||||
|
@@ -78,7 +78,6 @@ wxDialog::wxDialog(void)
|
||||
m_modalShowing = FALSE;
|
||||
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
SetDefaultBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
}
|
||||
|
||||
bool wxDialog::Create(wxWindow *parent, wxWindowID id,
|
||||
@@ -89,7 +88,6 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& name)
|
||||
{
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
SetDefaultBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
SetName(name);
|
||||
|
||||
if (!parent)
|
||||
@@ -592,7 +590,6 @@ void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
Ctl3dColorChange();
|
||||
#else
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
SetDefaultBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
|
||||
Refresh();
|
||||
#endif
|
||||
}
|
||||
|
@@ -52,8 +52,8 @@ bool wxGauge95::Create(wxWindow *parent, wxWindowID id,
|
||||
m_rangeMax = range;
|
||||
m_gaugePos = 0;
|
||||
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
|
||||
m_windowStyle = style;
|
||||
|
||||
|
@@ -87,8 +87,8 @@ bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id,
|
||||
m_rangeMax = range;
|
||||
m_gaugePos = 0;
|
||||
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
|
||||
m_windowStyle = style;
|
||||
|
||||
|
@@ -160,7 +160,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
wxSystemSettings settings;
|
||||
SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_WINDOW));
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour());
|
||||
SetForegroundColour(parent->GetForegroundColour());
|
||||
|
||||
m_windowId = ( id == -1 ) ? (int)NewControlId() : id;
|
||||
|
||||
@@ -266,7 +266,7 @@ wxListBox::~wxListBox(void)
|
||||
void wxListBox::SetupColours(void)
|
||||
{
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
|
||||
SetForegroundColour(GetParent()->GetDefaultForegroundColour());
|
||||
SetForegroundColour(GetParent()->GetForegroundColour());
|
||||
}
|
||||
|
||||
void wxListBox::SetFirstItem(int N)
|
||||
|
@@ -126,7 +126,7 @@ bool wxListCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, con
|
||||
|
||||
wxSystemSettings settings;
|
||||
SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_WINDOW));
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour());
|
||||
SetForegroundColour(parent->GetForegroundColour());
|
||||
|
||||
if (parent) parent->AddChild(this);
|
||||
|
||||
|
@@ -130,9 +130,6 @@ bool wxNotebook::Create(wxWindow *parent,
|
||||
m_backgroundColour = wxColour(GetSysColor(COLOR_BTNFACE));
|
||||
m_foregroundColour = *wxBLACK ;
|
||||
|
||||
m_defaultForegroundColour = *wxBLACK ;
|
||||
m_defaultBackgroundColour = wxColour(GetSysColor(COLOR_BTNFACE));
|
||||
|
||||
// style
|
||||
m_windowStyle = style | wxTAB_TRAVERSAL;
|
||||
|
||||
|
@@ -98,8 +98,8 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
SetValidator(val);
|
||||
|
||||
parent->AddChild(this);
|
||||
m_backgroundColour = parent->GetDefaultBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetDefaultForegroundColour() ;
|
||||
m_backgroundColour = parent->GetBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetForegroundColour() ;
|
||||
|
||||
m_windowStyle = (long&)style;
|
||||
|
||||
@@ -207,8 +207,8 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
SetValidator(val);
|
||||
|
||||
parent->AddChild(this);
|
||||
m_backgroundColour = parent->GetDefaultBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetDefaultForegroundColour() ;
|
||||
m_backgroundColour = parent->GetBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetForegroundColour() ;
|
||||
|
||||
m_windowStyle = (long&)style;
|
||||
|
||||
|
@@ -45,8 +45,8 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
if (parent) parent->AddChild(this);
|
||||
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour());
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour());
|
||||
SetBackgroundColour(parent->GetBackgroundColour());
|
||||
SetForegroundColour(parent->GetForegroundColour());
|
||||
|
||||
if ( id == -1 )
|
||||
m_windowId = (int)NewControlId();
|
||||
@@ -187,8 +187,8 @@ bool wxBitmapRadioButton::Create(wxWindow *parent, wxWindowID id,
|
||||
SetValidator(validator);
|
||||
|
||||
if (parent) parent->AddChild(this);
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour());
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour());
|
||||
SetBackgroundColour(parent->GetBackgroundColour());
|
||||
SetForegroundColour(parent->GetForegroundColour());
|
||||
|
||||
if ( id == -1 )
|
||||
m_windowId = (int)NewControlId();
|
||||
|
@@ -55,8 +55,8 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
||||
SetName(name);
|
||||
SetValidator(validator);
|
||||
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
m_windowStyle = style;
|
||||
|
||||
if ( id == -1 )
|
||||
|
@@ -68,8 +68,8 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id,
|
||||
SetValidator(validator);
|
||||
|
||||
if (parent) parent->AddChild(this);
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
|
||||
m_staticValue = 0;
|
||||
m_staticMin = 0;
|
||||
|
@@ -62,8 +62,8 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id,
|
||||
SetValidator(validator);
|
||||
|
||||
if (parent) parent->AddChild(this);
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
|
||||
m_staticValue = 0;
|
||||
m_staticMin = 0;
|
||||
|
@@ -47,8 +47,8 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c
|
||||
long style, const wxString& name)
|
||||
{
|
||||
wxSystemSettings settings;
|
||||
m_backgroundColour = parent->GetDefaultBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetDefaultForegroundColour() ;
|
||||
m_backgroundColour = parent->GetBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetForegroundColour() ;
|
||||
|
||||
SetName(name);
|
||||
|
||||
|
@@ -46,8 +46,8 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
|
||||
SetName(name);
|
||||
if (parent) parent->AddChild(this);
|
||||
|
||||
m_backgroundColour = parent->GetDefaultBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetDefaultForegroundColour() ;
|
||||
m_backgroundColour = parent->GetBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetForegroundColour() ;
|
||||
|
||||
if ( id == -1 )
|
||||
m_windowId = (int)NewControlId();
|
||||
|
@@ -52,8 +52,8 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
if (parent) parent->AddChild(this);
|
||||
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
|
||||
if ( id == -1 )
|
||||
m_windowId = (int)NewControlId();
|
||||
|
@@ -42,8 +42,8 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
||||
SetName(name);
|
||||
if (parent) parent->AddChild(this);
|
||||
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
|
||||
if ( id == -1 )
|
||||
m_windowId = (int)NewControlId();
|
||||
|
@@ -72,10 +72,6 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
|
||||
GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE)));
|
||||
m_foregroundColour = *wxBLACK ;
|
||||
|
||||
m_defaultForegroundColour = *wxBLACK ;
|
||||
m_defaultBackgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)),
|
||||
GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE)));
|
||||
|
||||
SetName(name);
|
||||
|
||||
int x = pos.x;
|
||||
@@ -196,8 +192,6 @@ void wxTabCtrl::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
{
|
||||
m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)),
|
||||
GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE)));
|
||||
m_defaultBackgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)),
|
||||
GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE)));
|
||||
|
||||
// Remap the buttons
|
||||
// CreateTools();
|
||||
|
@@ -100,10 +100,6 @@ bool wxToolBar95::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, co
|
||||
GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE)));
|
||||
m_foregroundColour = *wxBLACK ;
|
||||
|
||||
m_defaultForegroundColour = *wxBLACK ;
|
||||
m_defaultBackgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)),
|
||||
GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE)));
|
||||
|
||||
if (style & wxTB_VERTICAL)
|
||||
wxMessageBox("Sorry, wxToolBar95 under Windows 95 only supports horizontal orientation.", "wxToolBar95 usage", wxOK);
|
||||
m_maxWidth = -1;
|
||||
@@ -475,8 +471,6 @@ void wxToolBar95::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
{
|
||||
m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)),
|
||||
GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE)));
|
||||
m_defaultBackgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)),
|
||||
GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE)));
|
||||
|
||||
// Remap the buttons
|
||||
CreateTools();
|
||||
|
@@ -95,7 +95,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
|
||||
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
|
||||
if ( id == -1 )
|
||||
m_windowId = (int)NewControlId();
|
||||
@@ -254,7 +254,7 @@ void wxTextCtrl::AdoptAttributesFromHWND(void)
|
||||
void wxTextCtrl::SetupColours(void)
|
||||
{
|
||||
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
|
||||
SetForegroundColour(GetParent()->GetDefaultForegroundColour());
|
||||
SetForegroundColour(GetParent()->GetForegroundColour());
|
||||
}
|
||||
|
||||
wxString wxTextCtrl::GetValue(void) const
|
||||
|
@@ -61,7 +61,7 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, con
|
||||
{
|
||||
wxSystemSettings settings;
|
||||
SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_WINDOW));
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour());
|
||||
SetForegroundColour(parent->GetForegroundColour());
|
||||
|
||||
SetName(name);
|
||||
SetValidator(validator);
|
||||
|
@@ -238,10 +238,9 @@ wxWindow::wxWindow(void)
|
||||
|
||||
wxSystemSettings settings;
|
||||
|
||||
m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
|
||||
m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_3DFACE) ;
|
||||
// m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
|
||||
m_foregroundColour = *wxBLACK;
|
||||
m_defaultForegroundColour = *wxBLACK ;
|
||||
m_defaultBackgroundColour = settings.GetSystemColour(wxSYS_COLOUR_3DFACE) ;
|
||||
|
||||
/*
|
||||
wxColour(GetRValue(GetSysColor(COLOR_WINDOW)),
|
||||
@@ -437,9 +436,8 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
|
||||
wxSystemSettings settings;
|
||||
|
||||
m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
|
||||
// m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_3DFACE) ;
|
||||
m_foregroundColour = *wxBLACK;
|
||||
m_defaultForegroundColour = *wxBLACK ;
|
||||
m_defaultBackgroundColour = settings.GetSystemColour(wxSYS_COLOUR_3DFACE) ;
|
||||
|
||||
m_windowStyle = style;
|
||||
|
||||
|
@@ -75,10 +75,9 @@ wxWindow::wxWindow()
|
||||
m_caretWidth = 0; m_caretHeight = 0;
|
||||
m_caretEnabled = FALSE;
|
||||
m_caretShown = FALSE;
|
||||
m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
|
||||
m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
|
||||
// m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
|
||||
m_foregroundColour = *wxBLACK;
|
||||
m_defaultForegroundColour = *wxBLACK ;
|
||||
m_defaultBackgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
m_pDropTarget = NULL;
|
||||
@@ -185,10 +184,9 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
|
||||
else
|
||||
m_windowId = id;
|
||||
|
||||
m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
|
||||
// m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
|
||||
m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
|
||||
m_foregroundColour = *wxBLACK;
|
||||
m_defaultForegroundColour = *wxBLACK ;
|
||||
m_defaultBackgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
|
||||
|
||||
m_windowStyle = style;
|
||||
|
||||
|
Reference in New Issue
Block a user