git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16958
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
class WXDLLEXPORT wxCheckListBox : public wxListBox
{
public:
class WXDLLEXPORT wxCheckListBox : public wxListBox
{
public:
// Ctors
//
wxCheckListBox();
// Ctors
//
wxCheckListBox();
,const wxString& rsName = wxListBoxNameStr
);
,const wxString& rsName = wxListBoxNameStr
);
// Override base class virtuals
//
virtual void Delete(int n);
// Override base class virtuals
//
virtual void Delete(int n);
virtual bool SetFont(const wxFont &rFont);
virtual bool SetFont(const wxFont &rFont);
// Items may be checked
//
bool IsChecked(size_t uiIndex) const;
// Items may be checked
//
bool IsChecked(size_t uiIndex) const;
// Accessors
//
size_t GetItemHeight(void) const { return m_nItemHeight; }
protected:
// Accessors
//
size_t GetItemHeight(void) const { return m_nItemHeight; }
protected:
// We create our items ourselves and they have non-standard size,
// so we need to override these functions
//
virtual wxOwnerDrawn* CreateItem(size_t n);
// We create our items ourselves and they have non-standard size,
// so we need to override these functions
//
virtual wxOwnerDrawn* CreateItem(size_t n);
- virtual bool OS2OnMeasure(WXMEASUREITEMSTRUCT* pItem);
+ virtual long OS2OnMeasure(WXMEASUREITEMSTRUCT* pItem);
// Pressing space or clicking the check box toggles the item
//
void OnChar(wxKeyEvent& rEvent);
// Pressing space or clicking the check box toggles the item
//
void OnChar(wxKeyEvent& rEvent);
,const wxItemResource* pParentResource
,const wxResourceTable* pTable = (const wxResourceTable *) NULL
)
,const wxItemResource* pParentResource
,const wxResourceTable* pTable = (const wxResourceTable *) NULL
)
return(wxWindowBase::CreateItem( pChildResource
,pParentResource
,pTable
return(wxWindowBase::CreateItem( pChildResource
,pParentResource
,pTable
// For ownerdraw items
//
virtual bool OS2OnDraw(WXDRAWITEMSTRUCT* WXUNUSED(pItem)) { return FALSE; };
// For ownerdraw items
//
virtual bool OS2OnDraw(WXDRAWITEMSTRUCT* WXUNUSED(pItem)) { return FALSE; };
- virtual bool OS2OnMeasure(WXMEASUREITEMSTRUCT* WXUNUSED(pItem)) { return FALSE; };
+ virtual long OS2OnMeasure(WXMEASUREITEMSTRUCT* WXUNUSED(pItem)) { return 0L; };
wxArrayLong& GetSubcontrols() { return m_aSubControls; }
void OnEraseBackground(wxEraseEvent& rEvent);
wxArrayLong& GetSubcontrols() { return m_aSubControls; }
void OnEraseBackground(wxEraseEvent& rEvent);
// wxCheckListBox support
//
#if wxUSE_OWNER_DRAWN
// wxCheckListBox support
//
#if wxUSE_OWNER_DRAWN
- bool OS2OnMeasure(WXMEASUREITEMSTRUCT *item);
+ long OS2OnMeasure(WXMEASUREITEMSTRUCT *item);
bool OS2OnDraw(WXDRAWITEMSTRUCT *item);
virtual wxOwnerDrawn* CreateItem(size_t n);
bool OS2OnDraw(WXDRAWITEMSTRUCT *item);
virtual wxOwnerDrawn* CreateItem(size_t n);
virtual bool OS2OnDrawItem( int nId
,WXDRAWITEMSTRUCT* pItem
);
virtual bool OS2OnDrawItem( int nId
,WXDRAWITEMSTRUCT* pItem
);
- virtual bool OS2OnMeasureItem( int nId
+ virtual long OS2OnMeasureItem( int nId
,WXMEASUREITEMSTRUCT* pItem
);
,WXMEASUREITEMSTRUCT* pItem
);
+ ::WinQueryWindowRect( m_pParent->GetHWND()
+ ,&rDc.m_vRclPaint
+ );
if (IsChecked())
eStat = (wxOwnerDrawn::wxODStatus)(eStat | wxOwnerDrawn::wxODChecked);
if (IsChecked())
eStat = (wxOwnerDrawn::wxODStatus)(eStat | wxOwnerDrawn::wxODChecked);
m_pParent->GetSize( NULL
,&nParentHeight
);
m_pParent->GetSize( NULL
,&nParentHeight
);
- ::WinQueryWindowRect( m_pParent->GetHWND()
- ,&rDc.m_vRclPaint
- );
nY = nParentHeight - nY - nCheckHeight;
vPenBack = wxPen(vColour, 1, wxSOLID);
nY = nParentHeight - nY - nCheckHeight;
vPenBack = wxPen(vColour, 1, wxSOLID);
// Return item size
// ----------------
//
// Return item size
// ----------------
//
-bool wxCheckListBox::OS2OnMeasure (
+long wxCheckListBox::OS2OnMeasure (
WXMEASUREITEMSTRUCT* pItem
)
{
WXMEASUREITEMSTRUCT* pItem
)
{
// Add place for the check mark
//
pStruct->rclItem.xRight += wxOwnerDrawn::GetDefaultMarginWidth();
// Add place for the check mark
//
pStruct->rclItem.xRight += wxOwnerDrawn::GetDefaultMarginWidth();
+ return long(MRFROM2SHORT((USHORT)m_nItemHeight, (USHORT)(pStruct->rclItem.xRight - pStruct->rclItem.xLeft)));
} // end of wxCheckListBox::CreateItem
//
} // end of wxCheckListBox::CreateItem
//
if (m_windowStyle & wxLB_OWNERDRAW)
{
wxOwnerDrawn* pNewItem = CreateItem(nIndex); // dummy argument
if (m_windowStyle & wxLB_OWNERDRAW)
{
wxOwnerDrawn* pNewItem = CreateItem(nIndex); // dummy argument
+ wxScreenDC vDc;
+ wxCoord vHeight;
+
pNewItem->SetName(rsItem);
m_aItems.Insert(pNewItem, nIndex);
pNewItem->SetName(rsItem);
m_aItems.Insert(pNewItem, nIndex);
//
#define OWNER_DRAWN_LISTBOX_EXTRA_SPACE (1)
//
#define OWNER_DRAWN_LISTBOX_EXTRA_SPACE (1)
-bool wxListBox::OS2OnMeasure(
+long wxListBox::OS2OnMeasure(
WXMEASUREITEMSTRUCT* pItem
)
{
WXMEASUREITEMSTRUCT* pItem
)
{
vDc.SetFont(GetFont());
wxCoord vHeight;
vDc.SetFont(GetFont());
wxCoord vHeight;
+ wxCoord vWidth;
+
+ GetSize( &vWidth
+ ,NULL
+ );
- pMeasureStruct->rclItem.xRight = 0;
+ pMeasureStruct->rclItem.xRight = (USHORT)vWidth;
pMeasureStruct->rclItem.xLeft = 0;
pMeasureStruct->rclItem.yTop = 0;
pMeasureStruct->rclItem.yBottom = 0;
vHeight = vDc.GetCharHeight() * 2.5;
pMeasureStruct->rclItem.xLeft = 0;
pMeasureStruct->rclItem.yTop = 0;
pMeasureStruct->rclItem.yBottom = 0;
vHeight = vDc.GetCharHeight() * 2.5;
- pMeasureStruct->rclItem.yTop = vHeight;
+ pMeasureStruct->rclItem.yTop = (USHORT)vHeight;
- ::WinSendMsg( GetHWND()
- ,LM_SETITEMHEIGHT
- ,MPFROMLONG(vHeight)
- ,MPFROMLONG(pMeasureStruct->idItem)
- );
- return TRUE;
+ return long(MRFROM2SHORT((USHORT)vHeight, (USHORT)vWidth));
} // end of wxListBox::OS2OnMeasure
bool wxListBox::OS2OnDraw (
} // end of wxListBox::OS2OnMeasure
bool wxListBox::OS2OnDraw (
- bProcessed = OS2OnMeasureItem(nIdCtrl,
- (WXMEASUREITEMSTRUCT *)lParam);
+ return MRFROMLONG(OS2OnMeasureItem( nIdCtrl
+ ,(WXMEASUREITEMSTRUCT *)lParam
+ ));
return FALSE;
} // end of wxWindowOS2::OS2OnDrawItem
return FALSE;
} // end of wxWindowOS2::OS2OnDrawItem
-bool wxWindowOS2::OS2OnMeasureItem(
+long wxWindowOS2::OS2OnMeasureItem(
int lId
, WXMEASUREITEMSTRUCT* pItemStruct
)
int lId
, WXMEASUREITEMSTRUCT* pItemStruct
)
pMeasureStruct->rclItem.xRight = nWidth;
pMeasureStruct->rclItem.xLeft = 0L;
pMeasureStruct->rclItem.yTop = nHeight;
pMeasureStruct->rclItem.yBottom = 0L;
pMeasureStruct->rclItem.xRight = nWidth;
pMeasureStruct->rclItem.xLeft = 0L;
pMeasureStruct->rclItem.yTop = nHeight;
pMeasureStruct->rclItem.yBottom = 0L;
+ mRc = MRFROM2SHORT(nHeight, nWidth);
+ return LONGFROMMR(mRc);
}
}
wxWindow* pItem = FindItem(lId);
}
}
wxWindow* pItem = FindItem(lId);
-;From library: H:\Dev\Wx2\WxWindows\lib\wx.lib
+;From library: H:\DEV\WX2\WXWINDOWS\LIB\wx.lib
;From object file: dummy.cpp
;PUBDEFs (Symbols available from object file):
wxDummyChar
;From object file: dummy.cpp
;PUBDEFs (Symbols available from object file):
wxDummyChar
SetFont__14wxCheckListBoxFRC6wxFont
;wxCheckListBox::OnLeftClick(wxMouseEvent&)
OnLeftClick__14wxCheckListBoxFR12wxMouseEvent
SetFont__14wxCheckListBoxFRC6wxFont
;wxCheckListBox::OnLeftClick(wxMouseEvent&)
OnLeftClick__14wxCheckListBoxFR12wxMouseEvent
+ ;wxCheckListBox::OS2OnMeasure(void**)
+ OS2OnMeasure__14wxCheckListBoxFPPv
;From object file: ..\os2\choice.cpp
;PUBDEFs (Symbols available from object file):
;wxChoice::DoGetItemClientData(int) const
;From object file: ..\os2\choice.cpp
;PUBDEFs (Symbols available from object file):
;wxChoice::DoGetItemClientData(int) const
GetValue__10wxSpinCtrlCFv
;From object file: ..\os2\statbmp.cpp
;PUBDEFs (Symbols available from object file):
GetValue__10wxSpinCtrlCFv
;From object file: ..\os2\statbmp.cpp
;PUBDEFs (Symbols available from object file):
+ ;wxStaticBitmap::OnPaint(wxPaintEvent&)
+ OnPaint__14wxStaticBitmapFR12wxPaintEvent
+ ;wxStaticBitmap::sm_eventTable
+ sm_eventTable__14wxStaticBitmap
+ ;wxStaticBitmap::sm_eventTableEntries
+ sm_eventTableEntries__14wxStaticBitmap
__vft14wxStaticBitmap8wxObject
;wxStaticBitmap::Free()
Free__14wxStaticBitmapFv
;wxStaticBitmap::Create(wxWindow*,int,const wxGDIImage&,const wxPoint&,const wxSize&,long,const wxString&)
Create__14wxStaticBitmapFP8wxWindowiRC10wxGDIImageRC7wxPointRC6wxSizelRC8wxString
__vft14wxStaticBitmap8wxObject
;wxStaticBitmap::Free()
Free__14wxStaticBitmapFv
;wxStaticBitmap::Create(wxWindow*,int,const wxGDIImage&,const wxPoint&,const wxSize&,long,const wxString&)
Create__14wxStaticBitmapFP8wxWindowiRC10wxGDIImageRC7wxPointRC6wxSizelRC8wxString
+ ;wxStaticBitmap::GetEventTable() const
+ GetEventTable__14wxStaticBitmapCFv
;wxStaticBitmap::sm_classwxStaticBitmap
sm_classwxStaticBitmap__14wxStaticBitmap
;wxStaticBitmap::SetImage(const wxGDIImage&)
;wxStaticBitmap::sm_classwxStaticBitmap
sm_classwxStaticBitmap__14wxStaticBitmap
;wxStaticBitmap::SetImage(const wxGDIImage&)