Consistent naming of e.g. wxUSE_CTRL

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-02-02 12:37:14 +00:00
parent 0e1399b392
commit 1f11220943
38 changed files with 202 additions and 191 deletions

View File

@@ -3414,6 +3414,11 @@ void wxWindow::SetFont(const wxFont& font)
ChangeFont();
}
void wxWindow::SetToolTip(const wxString& tooltip)
{
// TODO
}
void wxWindow::ClearUpdateRects()
{
wxNode* node = m_updateRects.First();

View File

@@ -192,7 +192,7 @@ bool wxApp::Initialize()
wxFatalError(_("Cannot initialize OLE"));
#endif
#if CTL3D
#if wxUSE_CTL3D
if (!Ctl3dRegister(wxhInstance))
wxFatalError("Cannot register CTL3D");
@@ -511,7 +511,7 @@ void wxApp::CleanUp()
::OleUninitialize();
#endif
#if CTL3D
#if wxUSE_CTL3D
Ctl3dUnregister(wxhInstance);
#endif

View File

@@ -78,7 +78,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
wxGetInstance(), NULL);
#if CTL3D
#if wxUSE_CTL3D
// if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS))
// Ctl3dSubclassCtl(wx_button);
#endif

View File

@@ -95,7 +95,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
(HWND)parent->GetHWND(), (HMENU)m_windowId,
wxGetInstance(), NULL);
#if CTL3D
#if wxUSE_CTL3D
if (want3D)
{
Ctl3dSubclassCtl((HWND)m_hWnd);
@@ -186,7 +186,7 @@ bool wxCheckBox::GetValue(void) const
WXHBRUSH wxCheckBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
#if CTL3D
#if wxUSE_CTL3D
if ( m_useCtl3D )
{
HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam);
@@ -250,7 +250,7 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *l
0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
wxGetInstance(), NULL);
#if CTL3D
#if wxUSE_CTL3D
if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS))
{
Ctl3dSubclassCtl(wx_button);

View File

@@ -94,7 +94,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
wxCHECK_MSG( m_hWnd, FALSE, "Failed to create combobox" );
/*
#if CTL3D
#if wxUSE_CTL3D
if (want3D)
{
m_useCtl3D = TRUE;

View File

@@ -115,7 +115,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
wxCHECK_MSG( m_hWnd, FALSE, "Failed to create combobox" );
/*
#if CTL3D
#if wxUSE_CTL3D
if (want3D)
{
Ctl3dSubclassCtl(wx_combo);

View File

@@ -513,7 +513,7 @@ void wxDialog::EndModal(int retCode)
WXHBRUSH wxDialog::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
#if CTL3D
#if wxUSE_CTL3D
HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam);
return (WXHBRUSH) hbrush;
#else
@@ -607,7 +607,7 @@ bool wxDialog::Destroy(void)
void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event)
{
#if CTL3D
#if wxUSE_CTL3D
Ctl3dColorChange();
#else
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));

View File

@@ -192,7 +192,7 @@ bool wxFont::RealizeResource(void)
// up fonts. So, set ppInch to a constant 96 dpi.
ppInch = 96;
#if FONT_SIZE_COMPATIBILITY
#if wxFONT_SIZE_COMPATIBILITY
// Incorrect, but compatible with old wxWindows behaviour
int nHeight = (M_FONTDATA->m_pointSize*ppInch/72);
#else

View File

@@ -174,7 +174,7 @@ void wxFillLogFont(LOGFONT *logFont, wxFont *font)
// up fonts. So, set ppInch to a constant 96 dpi.
ppInch = 96;
#if FONT_SIZE_COMPATIBILITY
#if wxFONT_SIZE_COMPATIBILITY
// Incorrect, but compatible with old wxWindows behaviour
int nHeight = (font->GetPointSize()*ppInch/72);
#else

View File

@@ -216,7 +216,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
wxCHECK_MSG( m_hWnd, FALSE, "Failed to create listbox" );
#if CTL3D
#if wxUSE_CTL3D
if (want3D)
{
Ctl3dSubclassCtl(hwnd);
@@ -688,7 +688,7 @@ void wxListBox::Command (wxCommandEvent & event)
WXHBRUSH wxListBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
#if CTL3D
#if wxUSE_CTL3D
if ( m_useCtl3D )
{
HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam);

View File

@@ -235,6 +235,7 @@ MSWOBJS = \
$(MSWDIR)\textctrl.obj \
$(MSWDIR)\thread.obj \
$(MSWDIR)\timer.obj \
$(MSWDIR)\tooltip.obj \
$(MSWDIR)\treectrl.obj \
$(MSWDIR)\taskbar.obj \
$(MSWDIR)\tbar95.obj \
@@ -449,6 +450,8 @@ $(MSWDIR)\thread.obj: $(MSWDIR)\thread.$(SRCSUFF)
$(MSWDIR)\timer.obj: $(MSWDIR)\timer.$(SRCSUFF)
$(MSWDIR)\tooltip.obj: $(MSWDIR)\tooltip.$(SRCSUFF)
$(MSWDIR)\treectrl.obj: $(MSWDIR)\treectrl.$(SRCSUFF)
$(MSWDIR)\utils.obj: $(MSWDIR)\utils.$(SRCSUFF)

View File

@@ -228,6 +228,7 @@ MSWOBJS = \
$(MSWDIR)\tbarmsw.obj \
$(MSWDIR)\textctrl.obj \
$(MSWDIR)\timer.obj \
$(MSWDIR)\tooltip.obj \
$(MSWDIR)\utils.obj \
$(MSWDIR)\utilsexc.obj \
$(MSWDIR)\wave.obj \
@@ -434,6 +435,8 @@ $(MSWDIR)\thread.obj: $(MSWDIR)\thread.$(SRCSUFF)
$(MSWDIR)\timer.obj: $(MSWDIR)\timer.$(SRCSUFF)
$(MSWDIR)\tooltip.obj: $(MSWDIR)\tooltip.$(SRCSUFF)
# $(MSWDIR)\treectrl.obj: $(MSWDIR)\treectrl.$(SRCSUFF)
$(MSWDIR)\utils.obj: $(MSWDIR)\utils.$(SRCSUFF)

View File

@@ -195,6 +195,7 @@ MSWOBJS = \
$(MSWDIR)\tbarmsw.obj \
$(MSWDIR)\textctrl.obj \
$(MSWDIR)\timer.obj \
$(MSWDIR)\tooltip.obj \
$(MSWDIR)\utils.obj \
$(MSWDIR)\utilsexc.obj \
$(MSWDIR)\wave.obj \
@@ -614,6 +615,11 @@ $(MSWDIR)/timer.obj: $*.$(SRCSUFF)
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(MSWDIR)/tooltip.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(MSWDIR)/treectrl.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)

View File

@@ -218,6 +218,7 @@ MSWOBJS = \
textctrl.$(OBJSUFF) \
thread.$(OBJSUFF) \
timer.$(OBJSUFF) \
tooltip.$(OBJSUFF) \
treectrl.$(OBJSUFF) \
utils.$(OBJSUFF) \
utilsexc.$(OBJSUFF) \

View File

@@ -192,6 +192,7 @@ MSWOBJS = \
$(MSWDIR)\textctrl.obj \
$(MSWDIR)\thread.obj \
$(MSWDIR)\timer.obj \
$(MSWDIR)\tooltip.obj \
$(MSWDIR)\utils.obj \
$(MSWDIR)\utilsexc.obj \
$(MSWDIR)\wave.obj \

View File

@@ -180,6 +180,7 @@ MSWOBJS = \
textctrl.obj \
thread.obj \
timer.obj \
tooltip.obj \
treectrl.obj \
utils.obj \
utilsexc.obj \
@@ -455,6 +456,9 @@ thread.obj: $(MSWDIR)\thread.cpp
timer.obj: $(MSWDIR)\timer.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\timer.cpp /BINARY timer.obj
tooltip.obj: $(MSWDIR)\tooltip.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\tooltip.cpp /BINARY tooltip.obj
treectrl.obj: $(MSWDIR)\treectrl.cpp
cl @<<
$(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\treectrl.cpp /BINARY treectrl.obj

View File

@@ -215,6 +215,7 @@ MSWOBJS = \
textctrl.$(OBJSUFF) \
thread.$(OBJSUFF) \
timer.$(OBJSUFF) \
tooltip.$(OBJSUFF) \
treectrl.$(OBJSUFF) \
utils.$(OBJSUFF) \
utilsexc.$(OBJSUFF) \

View File

@@ -687,6 +687,11 @@ $(MSWDIR)/timer.obj: $*.$(SRCSUFF)
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
<<
$(MSWDIR)/tooltip.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
<<
$(MSWDIR)/treectrl.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@

View File

@@ -190,6 +190,7 @@ MSWOBJS = &
textctrl.obj &
thread.obj &
timer.obj &
tooltip.obj &
treectrl.obj &
utils.obj &
utilsexc.obj &
@@ -467,6 +468,9 @@ thread.obj: $(MSWDIR)\thread.cpp
timer.obj: $(MSWDIR)\timer.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
tooltip.obj: $(MSWDIR)\tooltip.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
treectrl.obj: $(MSWDIR)\treectrl.cpp
cl @<<
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<

View File

@@ -148,7 +148,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
NULL
);
#if CTL3D
#if wxUSE_CTL3D
if (want3D)
{
Ctl3dSubclassCtl((HWND)m_hWnd);
@@ -178,7 +178,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
m_radioButtons[i] = (WXHWND) CreateWindowEx(exStyle, RADIO_CLASS, choices[i],
msStyle,0,0,0,0,
the_handle, (HMENU)newId, wxGetInstance(), NULL);
#if CTL3D
#if wxUSE_CTL3D
if (want3D)
{
Ctl3dSubclassCtl((HWND) m_hWnd);
@@ -256,7 +256,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
the_handle = (HWND) parent->GetHWND();
#if CTL3D
#if wxUSE_CTL3D
if (want3D)
{
Ctl3dSubclassCtl((HWND) m_hWnd);
@@ -289,7 +289,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
m_radioButtons[i] = (WXHWND) CreateWindowEx(exStyle, RADIO_CLASS, tmp,
msStyle,0,0,0,0,
the_handle, (HMENU)newId, wxhInstance, NULL);
#if CTL3D
#if wxUSE_CTL3D
if (want3D)
{
Ctl3dSubclassCtl((HWND) m_hWnd);
@@ -488,7 +488,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
totHeight = nbVer * (maxHeight+cy1/2) ;
totWidth = nbHor * (maxWidth+cx1) ;
#if (!CTL3D)
#if (!wxUSE_CTL3D)
// Requires a bigger group box in plain Windows
MoveWindow((HWND) m_hWnd,x_offset,y_offset,totWidth+cx1,totHeight+(3*cy1)/2,TRUE) ;
#else
@@ -498,7 +498,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags)
y_offset += cy1;
}
#if (!CTL3D)
#if (!wxUSE_CTL3D)
y_offset += (int)(cy1/2); // Fudge factor since buttons overlapped label
// JACS 2/12/93. CTL3D draws group label quite high.
#endif
@@ -688,7 +688,7 @@ void wxRadioBox::Show(int item, bool show)
WXHBRUSH wxRadioBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
#if CTL3D
#if wxUSE_CTL3D
if ( m_useCtl3D )
{
HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam);

View File

@@ -96,7 +96,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
wxCHECK_MSG( m_hWnd, FALSE, "Failed to create radiobutton" );
#if CTL3D
#if wxUSE_CTL3D
if (want3D)
{
Ctl3dSubclassCtl((HWND) m_hWnd);
@@ -160,7 +160,7 @@ bool wxRadioButton::GetValue(void) const
WXHBRUSH wxRadioButton::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
#if CTL3D
#if wxUSE_CTL3D
if ( m_useCtl3D )
{
HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam);
@@ -231,7 +231,7 @@ bool wxBitmapRadioButton::Create(wxWindow *parent, wxWindowID id,
wxCHECK_MSG( m_hWnd, "Failed to create radio button", FALSE );
#if CTL3D
#if wxUSE_CTL3D
if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS))
{
Ctl3dSubclassCtl((HWND) GetHWND());

View File

@@ -76,7 +76,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
CreateWindowEx(exStyle, "BUTTON", (const char *)label, msStyle,
0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
wxGetInstance(), NULL);
#if CTL3D
#if wxUSE_CTL3D
if (want3D)
{
Ctl3dSubclassCtl(wx_button);
@@ -146,7 +146,7 @@ void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags)
WXHBRUSH wxStaticBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
#if CTL3D
#if wxUSE_CTL3D
if ( m_useCtl3D )
{
HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam);

View File

@@ -79,7 +79,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
wxCHECK_MSG( m_hWnd, FALSE, "Failed to create static ctrl" );
#if CTL3D
#if wxUSE_CTL3D
/*
if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS))
Ctl3dSubclassCtl(static_item);
@@ -171,7 +171,7 @@ WXHBRUSH wxStaticText::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
/*
#if CTL3D
#if wxUSE_CTL3D
if ( m_useCtl3D )
{
HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam);

View File

@@ -177,7 +177,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
wxCHECK_MSG( m_hWnd, FALSE, "Failed to create text ctrl" );
#if CTL3D
#if wxUSE_CTL3D
if ( want3D )
{
Ctl3dSubclassCtl((HWND)m_hWnd);
@@ -923,7 +923,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const char c)
WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
#if CTL3D
#if wxUSE_CTL3D
if ( m_useCtl3D )
{
HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam);

View File

@@ -3584,7 +3584,7 @@ WXDWORD wxWindow::Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D)
// 5) If this isn't a Win95 app, and we are using CTL3D, remove border
// effects from extended style
#if CTL3D
#if wxUSE_CTL3D
if ( *want3D )
nativeBorder = FALSE;
#endif
@@ -3594,7 +3594,7 @@ WXDWORD wxWindow::Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D)
// If we want 3D, but haven't specified a border here,
// apply the default border style specified.
// TODO what about non-Win95 WIN32? Does it have borders?
#if defined(__WIN95__) && !CTL3D
#if defined(__WIN95__) && !wxUSE_CTL3D
if (defaultBorderStyle && (*want3D) && ! ((m_windowStyle & wxDOUBLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) ||
(m_windowStyle & wxSTATIC_BORDER) || (m_windowStyle & wxSIMPLE_BORDER) ))
exStyle |= defaultBorderStyle; // WS_EX_CLIENTEDGE ;

View File

@@ -1293,6 +1293,11 @@ bool wxWindow::IsExposed(const wxRect& rect) const
return (m_updateRegion.Contains(rect) != wxOutRegion);
}
void wxWindow::SetToolTip(const wxString& tooltip)
{
// TODO
}
/*
* Allocates control IDs
*/