projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
destroying native and wx controls
[wxWidgets.git]
/
src
/
os2
/
textctrl.cpp
diff --git
a/src/os2/textctrl.cpp
b/src/os2/textctrl.cpp
index a1edc9510484103eec46dc94a252073f9b94c770..d315a58b5caf08293ec3da7809e4dac4e9213bf5 100644
(file)
--- a/
src/os2/textctrl.cpp
+++ b/
src/os2/textctrl.cpp
@@
-112,7
+112,7
@@
bool wxTextCtrl::Create(
,rValidator
,rsName
))
,rValidator
,rsName
))
- return
FALSE
;
+ return
false
;
wxPoint vPos = rPos; // The OS/2 position
SWP vSwp;
wxPoint vPos = rPos; // The OS/2 position
SWP vSwp;
@@
-123,7
+123,7
@@
bool wxTextCtrl::Create(
}
m_windowStyle = lStyle;
}
m_windowStyle = lStyle;
- m_bIsMLE =
FALSE
;
+ m_bIsMLE =
false
;
long lSstyle = WS_VISIBLE | WS_TABSTOP;
long lSstyle = WS_VISIBLE | WS_TABSTOP;
@@
-133,7
+133,7
@@
bool wxTextCtrl::Create(
if ( m_windowStyle & wxTE_MULTILINE )
{
lSstyle |= MLS_BORDER | MLS_WORDWRAP;
if ( m_windowStyle & wxTE_MULTILINE )
{
lSstyle |= MLS_BORDER | MLS_WORDWRAP;
- m_bIsMLE =
TRUE
;
+ m_bIsMLE =
true
;
if ((m_windowStyle & wxTE_NO_VSCROLL) == 0)
lSstyle |= MLS_VSCROLL;
if ((m_windowStyle & wxTE_NO_VSCROLL) == 0)
lSstyle |= MLS_VSCROLL;
@@
-191,7
+191,7
@@
bool wxTextCtrl::Create(
if (m_hWnd == 0)
{
if (m_hWnd == 0)
{
- return
FALSE
;
+ return
false
;
}
SubclassWin(GetHWND());
}
SubclassWin(GetHWND());
@@
-205,7
+205,7
@@
bool wxTextCtrl::Create(
,wxNORMAL
);
SetFont(*pTextFont);
,wxNORMAL
);
SetFont(*pTextFont);
- if (!rsValue.
IsE
mpty())
+ if (!rsValue.
e
mpty())
{
SetValue(rsValue);
}
{
SetValue(rsValue);
}
@@
-223,7
+223,7
@@
bool wxTextCtrl::Create(
,rSize.y
);
delete pTextFont;
,rSize.y
);
delete pTextFont;
- return
TRUE
;
+ return
true
;
} // end of wxTextCtrl::Create
//
} // end of wxTextCtrl::Create
//
@@
-456,10
+456,10
@@
bool wxTextCtrl::CanCut() const
bool wxTextCtrl::CanPaste() const
{
bool wxTextCtrl::CanPaste() const
{
- bool bIsTextAvailable =
FALSE
;
+ bool bIsTextAvailable =
false
;
if (!IsEditable())
if (!IsEditable())
- return
FALSE
;
+ return
false
;
//
// Check for straight text on clipboard
//
// Check for straight text on clipboard
@@
-502,7
+502,7
@@
void wxTextCtrl::SetInsertionPoint(
void wxTextCtrl::SetInsertionPointEnd()
{
void wxTextCtrl::SetInsertionPointEnd()
{
-
long
lPos = GetLastPosition();
+
wxTextPos
lPos = GetLastPosition();
//
// We must not do anything if the caret is already there because calling
//
// We must not do anything if the caret is already there because calling
@@
-530,7
+530,7
@@
long wxTextCtrl::GetInsertionPoint() const
return (dwPos & 0xFFFF);
} // end of wxTextCtrl::GetInsertionPoint
return (dwPos & 0xFFFF);
} // end of wxTextCtrl::GetInsertionPoint
-
long
wxTextCtrl::GetLastPosition() const
+
wxTextPos
wxTextCtrl::GetLastPosition() const
{
HWND hWnd = GetHwnd();
long lCharIndex;
{
HWND hWnd = GetHwnd();
long lCharIndex;
@@
-687,9
+687,9
@@
bool wxTextCtrl::LoadFile(
// Update the size limit if needed
//
AdjustSpaceLimit();
// Update the size limit if needed
//
AdjustSpaceLimit();
- return
TRUE
;
+ return
true
;
}
}
- return
FALSE
;
+ return
false
;
} // end of wxTextCtrl::LoadFile
bool wxTextCtrl::IsModified() const
} // end of wxTextCtrl::LoadFile
bool wxTextCtrl::IsModified() const
@@
-773,7
+773,7
@@
bool wxTextCtrl::PositionToXY(
if (nLineNo == -1)
{
// no such line
if (nLineNo == -1)
{
// no such line
- return
FALSE
;
+ return
false
;
}
//
}
//
@@
-805,7
+805,7
@@
bool wxTextCtrl::PositionToXY(
if (lCharIndex == -1)
{
if (lCharIndex == -1)
{
- return
FALSE
;
+ return
false
;
}
//
}
//
@@
-816,7
+816,7
@@
bool wxTextCtrl::PositionToXY(
if (plY)
*plY = nLineNo;
if (plY)
*plY = nLineNo;
- return
TRUE
;
+ return
true
;
} // end of wxTextCtrl::PositionToXY
void wxTextCtrl::ShowPosition(
} // end of wxTextCtrl::PositionToXY
void wxTextCtrl::ShowPosition(
@@
-956,7
+956,7
@@
bool wxTextCtrl::CanUndo() const
if (m_bIsMLE)
bOk = (::WinSendMsg(GetHwnd(), MLM_QUERYUNDO, 0, 0) != 0);
else
if (m_bIsMLE)
bOk = (::WinSendMsg(GetHwnd(), MLM_QUERYUNDO, 0, 0) != 0);
else
- bOk =
FALSE
; // can't undo regular edit fields in PM
+ bOk =
false
; // can't undo regular edit fields in PM
return bOk;
} // end of wxTextCtrl::CanUndo
return bOk;
} // end of wxTextCtrl::CanUndo
@@
-967,7
+967,7
@@
bool wxTextCtrl::CanRedo() const
if (m_bIsMLE)
bOk = (::WinSendMsg(GetHwnd(), MLM_QUERYUNDO, 0, 0) != 0);
else
if (m_bIsMLE)
bOk = (::WinSendMsg(GetHwnd(), MLM_QUERYUNDO, 0, 0) != 0);
else
- bOk =
FALSE
; // can't undo regular edit fields in PM
+ bOk =
false
; // can't undo regular edit fields in PM
return bOk;
} // end of wxTextCtrl::CanRedo
return bOk;
} // end of wxTextCtrl::CanRedo
@@
-1065,7
+1065,7
@@
void wxTextCtrl::OnChar(
wxNavigationKeyEvent vEventNav;
vEventNav.SetDirection(!rEvent.ShiftDown());
wxNavigationKeyEvent vEventNav;
vEventNav.SetDirection(!rEvent.ShiftDown());
- vEventNav.SetWindowChange(
FALSE
);
+ vEventNav.SetWindowChange(
false
);
vEventNav.SetEventObject(this);
if ( GetEventHandler()->ProcessEvent(vEventNav) )
vEventNav.SetEventObject(this);
if ( GetEventHandler()->ProcessEvent(vEventNav) )
@@
-1117,15
+1117,15
@@
bool wxTextCtrl::OS2Command(
case EN_SCROLL:
case EN_INSERTMODETOGGLE:
case EN_MEMERROR:
case EN_SCROLL:
case EN_INSERTMODETOGGLE:
case EN_MEMERROR:
- return
FALSE
;
+ return
false
;
default:
default:
- return
FALSE
;
+ return
false
;
}
//
// Processed
//
}
//
// Processed
//
- return
TRUE
;
+ return
true
;
} // end of wxTextCtrl::OS2Command
void wxTextCtrl::AdjustSpaceLimit()
} // end of wxTextCtrl::OS2Command
void wxTextCtrl::AdjustSpaceLimit()
@@
-1148,7
+1148,7
@@
void wxTextCtrl::AdjustSpaceLimit()
WNDPARAMS vParams;
vParams.fsStatus = WPM_CBCTLDATA;
WNDPARAMS vParams;
vParams.fsStatus = WPM_CBCTLDATA;
- vParams.pCtlData = &Efd;
+
vParams.pCtlData = &Efd;
vParams.cbCtlData = sizeof(ENTRYFDATA);
if (::WinSendMsg( GetHwnd()
vParams.cbCtlData = sizeof(ENTRYFDATA);
if (::WinSendMsg( GetHwnd()
@@
-1188,8
+1188,9
@@
wxSize wxTextCtrl::DoGetBestSize() const
{
int nCx;
int nCy;
{
int nCx;
int nCy;
+ wxFont vFont = (wxFont)GetFont();
- wxGetCharSize(GetHWND(), &nCx, &nCy,
(wxFont*)&GetFont()
);
+ wxGetCharSize(GetHWND(), &nCx, &nCy,
&vFont
);
int wText = DEFAULT_ITEM_WIDTH;
int hText = (int)(EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy) * .8);
int wText = DEFAULT_ITEM_WIDTH;
int hText = (int)(EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy) * .8);
@@
-1325,7
+1326,7
@@
bool wxTextCtrl::SetBackgroundColour(
{
if (m_bIsMLE)
::WinSendMsg(GetHwnd(), MLM_SETBACKCOLOR, (MPARAM)rColour.GetPixel(), MLE_INDEX);
{
if (m_bIsMLE)
::WinSendMsg(GetHwnd(), MLM_SETBACKCOLOR, (MPARAM)rColour.GetPixel(), MLE_INDEX);
- return
TRUE
;
+ return
true
;
} // end of wxTextCtrl::SetBackgroundColour
bool wxTextCtrl::SetForegroundColour(
} // end of wxTextCtrl::SetBackgroundColour
bool wxTextCtrl::SetForegroundColour(
@@
-1334,7
+1335,7
@@
bool wxTextCtrl::SetForegroundColour(
{
if (m_bIsMLE)
::WinSendMsg(GetHwnd(), MLM_SETTEXTCOLOR, (MPARAM)rColour.GetPixel(), MLE_INDEX);
{
if (m_bIsMLE)
::WinSendMsg(GetHwnd(), MLM_SETTEXTCOLOR, (MPARAM)rColour.GetPixel(), MLE_INDEX);
- return
TRUE
;
+ return
true
;
} // end of wxTextCtrl::SetForegroundColour
bool wxTextCtrl::SetStyle(
} // end of wxTextCtrl::SetForegroundColour
bool wxTextCtrl::SetStyle(
@@
-1381,6
+1382,6
@@
bool wxTextCtrl::SetStyle(
//
// TODO:: finish this part
//
//
// TODO:: finish this part
//
- return
TRUE
;
+ return
true
;
} // end of wxTextCtrl::SetStyle
} // end of wxTextCtrl::SetStyle