projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No *.h in src/common/ anymore.
[wxWidgets.git]
/
src
/
os2
/
listbox.cpp
diff --git
a/src/os2/listbox.cpp
b/src/os2/listbox.cpp
index 6d56ce18909a32c3dad9b9201f0a3257528b0ed4..8e785dc5d9632401b08a2b2a38e670148caa827d 100644
(file)
--- a/
src/os2/listbox.cpp
+++ b/
src/os2/listbox.cpp
@@
-56,7
+56,7
@@
wxListBoxItem::wxListBoxItem(
const wxString& rsStr
)
: wxOwnerDrawn( rsStr
const wxString& rsStr
)
: wxOwnerDrawn( rsStr
- ,
FALSE
+ ,
false
)
{
//
)
{
//
@@
-128,7
+128,7
@@
bool wxListBox::Create(
wxSystemSettings vSettings;
wxSystemSettings vSettings;
- SetBackgroundColour(vSettings.Get
System
Colour(wxSYS_COLOUR_WINDOW));
+ SetBackgroundColour(vSettings.GetColour(wxSYS_COLOUR_WINDOW));
SetForegroundColour(pParent->GetForegroundColour());
m_windowId = (vId == -1) ? (int)NewControlId() : vId;
SetForegroundColour(pParent->GetForegroundColour());
m_windowId = (vId == -1) ? (int)NewControlId() : vId;
@@
-172,7
+172,7
@@
bool wxListBox::Create(
);
if (m_hWnd == 0)
{
);
if (m_hWnd == 0)
{
- return
FALSE
;
+ return
false
;
}
//
}
//
@@
-194,7
+194,7
@@
bool wxListBox::Create(
SetFont(*pTextFont);
//
SetFont(*pTextFont);
//
- // Set standard wxWi
ndow
s colors for Listbox items and highlighting
+ // Set standard wxWi
dget
s colors for Listbox items and highlighting
//
wxColour vColour;
//
wxColour vColour;
@@
-221,7
+221,7
@@
bool wxListBox::Create(
,nHeight
);
delete pTextFont;
,nHeight
);
delete pTextFont;
- return
TRUE
;
+ return
true
;
} // end of wxListBox::Create
wxListBox::~wxListBox()
} // end of wxListBox::Create
wxListBox::~wxListBox()
@@
-281,31
+281,30
@@
int wxListBox::DoAppend(
const wxString& rsItem
)
{
const wxString& rsItem
)
{
-
int n
Index = 0;
-
SHORT n
IndexType = 0;
+
long l
Index = 0;
+
LONG l
IndexType = 0;
if (m_windowStyle & wxLB_SORT)
if (m_windowStyle & wxLB_SORT)
-
n
IndexType = LIT_SORTASCENDING;
+
l
IndexType = LIT_SORTASCENDING;
else
else
-
n
IndexType = LIT_END;
-
nIndex = (int)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)n
IndexType, (MPARAM)rsItem.c_str());
+
l
IndexType = LIT_END;
+
lIndex = (long)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)l
IndexType, (MPARAM)rsItem.c_str());
m_nNumItems++;
#if wxUSE_OWNER_DRAWN
if (m_windowStyle & wxLB_OWNERDRAW)
{
m_nNumItems++;
#if wxUSE_OWNER_DRAWN
if (m_windowStyle & wxLB_OWNERDRAW)
{
- wxOwnerDrawn* pNewItem = CreateItem(
n
Index); // dummy argument
+ wxOwnerDrawn* pNewItem = CreateItem(
l
Index); // dummy argument
wxScreenDC vDc;
wxScreenDC vDc;
- wxCoord vHeight;
pNewItem->SetName(rsItem);
pNewItem->SetName(rsItem);
- m_aItems.Insert(pNewItem,
n
Index);
- ::WinSendMsg(GetHwnd(), LM_SETITEMHANDLE, (MPARAM)
((SHORT)nIndex)
, MPFROMP(pNewItem));
+ m_aItems.Insert(pNewItem,
l
Index);
+ ::WinSendMsg(GetHwnd(), LM_SETITEMHANDLE, (MPARAM)
lIndex
, MPFROMP(pNewItem));
pNewItem->SetFont(GetFont());
}
#endif
pNewItem->SetFont(GetFont());
}
#endif
- return
n
Index;
+ return
(int)l
Index;
} // end of wxListBox::DoAppend
void wxListBox::DoSetItems(
} // end of wxListBox::DoAppend
void wxListBox::DoSetItems(
@@
-314,9
+313,8
@@
void wxListBox::DoSetItems(
)
{
BOOL bHideAndShow = IsShown();
)
{
BOOL bHideAndShow = IsShown();
- int nCount = 0;
int i;
int i;
-
SHORT n
IndexType = 0;
+
LONG l
IndexType = 0;
if (bHideAndShow)
{
if (bHideAndShow)
{
@@
-328,10
+326,10
@@
void wxListBox::DoSetItems(
{
if (m_windowStyle & wxLB_SORT)
{
if (m_windowStyle & wxLB_SORT)
-
n
IndexType = LIT_SORTASCENDING;
+
l
IndexType = LIT_SORTASCENDING;
else
else
-
n
IndexType = LIT_END;
- ::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)
n
IndexType, (MPARAM)raChoices[i].c_str());
+
l
IndexType = LIT_END;
+ ::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)
l
IndexType, (MPARAM)raChoices[i].c_str());
if (ppClientData)
{
if (ppClientData)
{
@@
-437,7
+435,7
@@
bool wxListBox::IsSelected(
int N
) const
{
int N
) const
{
- wxCHECK_MSG( N >= 0 && N < m_nNumItems,
FALSE
,
+ wxCHECK_MSG( N >= 0 && N < m_nNumItems,
false
,
wxT("invalid index in wxListBox::Selected") );
LONG lItem;
wxT("invalid index in wxListBox::Selected") );
LONG lItem;
@@
-635,7
+633,7
@@
void wxListBox::DoInsertItems(
m_aItems.Insert(pNewItem, nIndex);
::WinSendMsg( GetHwnd()
,LM_SETITEMHANDLE
m_aItems.Insert(pNewItem, nIndex);
::WinSendMsg( GetHwnd()
,LM_SETITEMHANDLE
- ,(MPARAM)((
SHORT
)nIndex)
+ ,(MPARAM)((
LONG
)nIndex)
,MPFROMP(pNewItem)
);
m_nNumItems += nItems;
,MPFROMP(pNewItem)
);
m_nNumItems += nItems;
@@
-787,7
+785,7
@@
bool wxListBox::OS2Command(
//
// Some event we're not interested in
//
//
// Some event we're not interested in
//
- return
FALSE
;
+ return
false
;
}
wxCommandEvent vEvent( eEvtType
,m_windowId
}
wxCommandEvent vEvent( eEvtType
,m_windowId
@@
-812,7
+810,7
@@
bool wxListBox::OS2Command(
{
n = -1;
}
{
n = -1;
}
- vEvent.
m_commandInt = n
;
+ vEvent.
SetInt(n)
;
return GetEventHandler()->ProcessEvent(vEvent);
} // end of wxListBox::OS2Command
return GetEventHandler()->ProcessEvent(vEvent);
} // end of wxListBox::OS2Command
@@
-857,7
+855,7
@@
long wxListBox::OS2OnMeasure(
pMeasureStruct->rclItem.yTop = 0;
pMeasureStruct->rclItem.yBottom = 0;
pMeasureStruct->rclItem.yTop = 0;
pMeasureStruct->rclItem.yBottom = 0;
- vHeight =
vDc.GetCharHeight() * 2.5
;
+ vHeight =
(wxCoord)(vDc.GetCharHeight() * 2.5)
;
pMeasureStruct->rclItem.yTop = (USHORT)vHeight;
return long(MRFROM2SHORT((USHORT)vHeight, (USHORT)vWidth));
pMeasureStruct->rclItem.yTop = (USHORT)vHeight;
return long(MRFROM2SHORT((USHORT)vHeight, (USHORT)vWidth));
@@
-875,14
+873,14
@@
bool wxListBox::OS2OnDraw (
//
// Only owner-drawn control should receive this message
//
//
// Only owner-drawn control should receive this message
//
- wxCHECK(((m_windowStyle & wxLB_OWNERDRAW) == wxLB_OWNERDRAW),
FALSE
);
+ wxCHECK(((m_windowStyle & wxLB_OWNERDRAW) == wxLB_OWNERDRAW),
false
);
//
// The item may be -1 for an empty listbox
//
if (lItemID == -1L)
//
// The item may be -1 for an empty listbox
//
if (lItemID == -1L)
- return
FALSE
;
+ return
false
;
wxListBoxItem* pData = (wxListBoxItem*)PVOIDFROMMR( ::WinSendMsg( GetHwnd()
,LM_QUERYITEMHANDLE
wxListBoxItem* pData = (wxListBoxItem*)PVOIDFROMMR( ::WinSendMsg( GetHwnd()
,LM_QUERYITEMHANDLE
@@
-891,7
+889,7
@@
bool wxListBox::OS2OnDraw (
)
);
)
);
- wxCHECK(pData,
FALSE
);
+ wxCHECK(pData,
false
);
wxDC vDc;
wxRect vRect( wxPoint( pDrawStruct->rclItem.xLeft
wxDC vDc;
wxRect vRect( wxPoint( pDrawStruct->rclItem.xLeft
@@
-964,7
+962,7
@@
bool wxListBox::OS2OnDraw (
// For now we don't care about anything else
// just ignore the entire message!
//
// For now we don't care about anything else
// just ignore the entire message!
//
- return
TRUE
;
+ return
true
;
}
}
return pData->OnDrawItem( vDc
}
}
return pData->OnDrawItem( vDc